:root {
  color: #1d2438;
  background: #f5f7ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at top right, #e6efff, transparent 34rem), #f5f7ff;
}

.shell {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  color: #27356d;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
}

.kicker {
  margin: 0;
  color: #67708c;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.intro { margin: 3.25rem 0 2rem; }
.intro h1 { margin: .4rem 0 .6rem; font-size: clamp(2.15rem, 8vw, 3.8rem); letter-spacing: -.055em; line-height: 1; }
.intro > p:last-child { max-width: 31rem; margin: 0; color: #59627b; font-size: 1.05rem; line-height: 1.55; }

.device-grid { display: grid; gap: 1rem; }
.single-device-grid { max-width: 27rem; }

.device-card, .state-card {
  border: 1px solid #e2e6f3;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 10px 30px rgba(38, 52, 104, .07);
}

.device-card { display: grid; grid-template-rows: auto 1fr auto; min-height: 13.5rem; padding: 1.35rem; color: inherit; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.device-card:hover { border-color: #cbd6fa; box-shadow: 0 16px 36px rgba(38, 52, 104, .12); transform: translateY(-2px); }
.card-heading { display: flex; align-items: center; gap: 1rem; }
.avatar { display: grid; width: 3.25rem; height: 3.25rem; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #dfe8ff; color: #334787; font-size: 1.05rem; font-weight: 800; }
.card-heading h2 { margin: 0; font-size: 1.42rem; letter-spacing: -.035em; }
.device-name { margin: .2rem 0 0; color: #6a738d; font-size: .92rem; }

.statuses { display: grid; gap: .8rem; margin: 1.65rem 0 1.15rem; }
.status-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .93rem; }
.status-label { color: #6a738d; }
.status-value { color: #26304c; font-weight: 700; text-align: right; }
.status-row:first-child .status-value { font-size: 1rem; }
.status-value.good::before, .status-value.caution::before, .status-value.quiet::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin: 0 .4rem .04rem 0; border-radius: 50%; background: currentColor; }
.status-value.good { color: #15714a; }
.status-value.caution { color: #a05a0b; }
.status-value.quiet { color: #6a738d; }

.card-footer { display: flex; align-self: end; align-items: center; justify-content: space-between; color: #30458e; font-size: .92rem; font-weight: 750; }
.chevron { font-size: 1.6rem; font-weight: 400; line-height: .7; transition: transform .18s ease; }
.device-card:hover .chevron { transform: translateX(.2rem); }
.device-card:focus-visible, .wordmark:focus-visible, button:focus-visible { outline: 3px solid #849dff; outline-offset: 3px; }

.state-card { display: grid; min-height: 9rem; place-items: center; gap: .75rem; padding: 1.25rem; color: #59627b; text-align: center; }
.state-card p { margin: 0; }
.loading-state { grid-auto-flow: column; justify-content: center; }
.spinner { width: 1rem; height: 1rem; border: 2px solid #cad4f4; border-top-color: #425cac; border-radius: 50%; animation: spin .75s linear infinite; }
button { border: 0; border-radius: .7rem; padding: .65rem .9rem; background: #30458e; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

.logout-button { margin-left: auto; background: transparent; color: #30458e; padding: .45rem .6rem; }
.auth-shell { max-width: 30rem; }
.auth-card { margin-top: 2rem; padding: 1.5rem; border-radius: 1.25rem; background: white; box-shadow: 0 12px 30px #22345e16; }
.auth-card h1 { margin: .25rem 0 .5rem; }
.auth-card > p { color: #59627b; line-height: 1.5; }
.auth-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.auth-card label { display: grid; gap: .45rem; font-weight: 700; color: #28324f; }
.auth-card input { width: 100%; padding: .75rem; border: 1px solid #b8c1d9; border-radius: .7rem; font: inherit; }
.auth-card input:focus-visible, .logout-button:focus-visible { outline: 3px solid #637fda; outline-offset: 2px; }
.form-error { color: #a32638 !important; font-weight: 700; margin: 0; }
.auth-switch { margin-top: 1.25rem; }

.detail-shell { max-width: 58rem; }
.back-link { display: inline-flex; margin: 2rem 0 1.5rem; color: #30458e; font-size: .94rem; font-weight: 750; text-decoration: none; }
.back-link:focus-visible { outline: 3px solid #849dff; outline-offset: 3px; }
.tracker-heading { display: flex; align-items: center; gap: 1rem; }
.detail-avatar { width: 3.75rem; height: 3.75rem; font-size: 1.2rem; }
.tracker-heading h1 { margin: 0; font-size: clamp(2rem, 8vw, 3rem); letter-spacing: -.05em; line-height: 1; }
.detail-statuses { display: grid; gap: .8rem; margin: 1.75rem 0; padding: 1.25rem; border: 1px solid #e2e6f3; border-radius: 1.1rem; background: rgba(255, 255, 255, .8); }
.detail-statuses .status-row:first-child .status-value { font-size: 1rem; }
.map-card, .history-card { overflow: hidden; border: 1px solid #e2e6f3; border-radius: 1.25rem; background: rgba(255, 255, 255, .95); box-shadow: 0 10px 30px rgba(38, 52, 104, .07); }
.tracker-map { height: min(58vw, 30rem); min-height: 18rem; }
.history-card { margin-top: 1rem; padding: 1.25rem; }
.history-card h2 { margin: 0 0 1rem; font-size: 1.15rem; letter-spacing: -.025em; }
.history-list { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.history-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .8rem; border-bottom: 1px solid #edf0f8; font-size: .95rem; font-weight: 700; }
.history-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.history-detail, .muted-copy { color: #6a738d; font-size: .88rem; font-weight: 500; text-align: right; }
.muted-copy { margin: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 42rem) {
  .shell { width: min(100% - 3rem, 72rem); padding-top: 2rem; }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 58rem; }
  .device-card { min-height: 14.25rem; padding: 1.5rem; }
  .detail-statuses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-statuses .status-row { display: grid; gap: .35rem; }
  .detail-statuses .status-value { text-align: left; }
  .tracker-map { height: min(46vw, 31rem); }
}

@media (min-width: 70rem) {
  .device-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 66rem; }
}

.family-map-card { margin-bottom: 1.5rem; }
.family-map-heading { padding: 1.25rem; }
.family-map-heading h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.family-map-heading p { margin: 0; color: #59627b; line-height: 1.5; }
.family-map { height: 20rem; isolation: isolate; }

@media (min-width: 90rem) and (min-height: 56rem) {
  .family-map { height: 28rem; }
}


.child-marker-group { display: flex; align-items: end; width: max-content; transform: translate(-50%, -100%); }
.child-map-marker { position: relative; display: flex; flex-direction: column; align-items: center; width: 48px; padding: 0; border: 0; border-radius: 24px; background: transparent; color: #30458e; font: 700 13px/1.3 system-ui, sans-serif; }
.child-marker-name { position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 8px; border: 1px solid #d5ddef; border-radius: 20px; background: white; color: #27356d; box-shadow: 0 2px 5px #1d243822; }
.child-marker-pin { position: relative; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border: 2px solid white; border-radius: 50%; background: #30458e; filter: drop-shadow(0 2px 2px #1d243844); }
.child-marker-pin::after { content: ''; position: absolute; top: 36px; left: 11px; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 18px solid #30458e; z-index: -1; }
.child-marker-identity { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #e5ecff; color: #30458e; font-size: 15px; }
.child-marker-identity > img, .child-marker-identity > svg { width: 100%; height: 100%; object-fit: cover; }
.child-map-marker[aria-pressed="true"] .child-marker-pin { box-shadow: 0 0 0 3px #9bb3f4; }
.child-map-marker[aria-pressed="true"] .child-marker-name { background: #e5ecff; border-color: #637fda; }
.child-map-marker:focus-visible { outline: 3px solid #637fda; outline-offset: 4px; }
.shared-position { gap: 80px; padding-bottom: 12px; }
.shared-position::before { content: ''; position: absolute; bottom: 11px; left: 24px; right: 24px; height: 2px; background: #30458e; }
.shared-position::after { content: ''; position: absolute; bottom: 0; left: calc(50% - 6px); border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 12px solid #30458e; }
.fit-family { margin-top: .8rem; font-size: .85rem; }
.fit-family:disabled { opacity: .5; cursor: default; }
.selected-child-panel { padding: 1rem 1.25rem; border-top: 1px solid #e2e6f3; }
.selected-child-panel h3 { margin: 0 0 .65rem; font-size: 1.1rem; }
.selected-child-panel .status-row { margin: .4rem 0; }
.map-details { display: inline-block; margin-top: .5rem; padding: .4rem 0; color: #30458e; font-weight: 700; }
.map-details:focus-visible { outline: 3px solid #849dff; outline-offset: 3px; }

/* The header and landscape frame one shared map and tracker surface. */
.dashboard-page { min-width: 0; background: #f0f7ff; isolation: isolate; color: #202754; }
.dashboard-page .shell { width: min(100% - 2rem, 86rem); padding-top: 0; }
.dashboard-scenery { position: absolute; z-index: -1; inset: 4.75rem 0 auto; width: 100%; height: 16rem; pointer-events: none; }
.dashboard-page .app-header { position: relative; min-height: 4.75rem; padding: .65rem 1.5rem; background: #ffffffdf; border-bottom: 1px solid #fff; box-shadow: 0 3px 18px #345b8b06; }
.dashboard-page .app-header::before { content: ''; position: absolute; z-index: -1; inset: 0 calc((min(100vw - 2rem, 86rem) - 100vw) / 2); background: #ffffffdf; }
.dashboard-page .wordmark { display: inline-flex; align-items: center; color: #171853; font-size: 2.35rem; letter-spacing: .015em; line-height: 1; font-weight: 850; }
.brand-pin { position: relative; width: .62em; height: .78em; margin: -.07em .08em 0 .04em; background: linear-gradient(145deg, #cc66ed, #8035db); border-radius: 55% 55% 55% 8%; transform: rotate(-45deg); }
.brand-pin::after { content: ''; position: absolute; inset: 24% 24% 37% 24%; background: white; border-radius: 50%; }
.brand-o { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.dashboard-page .logout-button { min-height: 44px; padding: .6rem 1rem; border: 1px solid #dce3f6; border-radius: .8rem; background: #f8faff; color: #414ba1; font-size: .9rem; }
.dashboard-page .logout-button:hover { background: #eeedfc; border-color: #b7b8e7; }
.header-actions { display: inline-flex; align-items: center; gap: .5rem; float: right; }
.header-link { display: inline-flex; align-items: center; min-height: 44px; padding: .6rem .75rem; color: #414ba1; font-size: .9rem; font-weight: 700; }
.header-link:focus-visible, .caregiver-form :focus-visible { outline: 3px solid #637fda; outline-offset: 3px; }
.dashboard-page .intro { margin: 0; padding: 2.65rem 2.6rem 1.5rem; }
.dashboard-page .intro h1 { margin: 0 0 .45rem; color: #191a54; font-size: clamp(2.1rem, 4vw, 3.15rem); line-height: 1.1; }
.dashboard-page .intro > p:last-child { max-width: 34rem; color: #405c90; font-size: 1rem; line-height: 1.5; }
.dashboard-page #dashboard > * { min-width: 0; }
.dashboard-page .family-map-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0; padding: 1rem; border: 1px solid #dddff5; border-radius: 1.5rem; background: #fff; box-shadow: 0 14px 38px #4a55a317, 0 2px 6px #4a55a306; overflow: hidden; }
.dashboard-page .family-map-card > * { min-width: 0; }
.dashboard-page .family-map-heading { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1rem; padding: 0 .25rem .15rem; }
.dashboard-page .family-map-heading h2 { align-self: center; margin: 0; color: #202254; font-size: 1.4rem; letter-spacing: -.035em; }
.dashboard-page .family-map-heading p { grid-column: 1 / -1; grid-row: 2; color: #566b99; font-size: .87rem; line-height: 1.45; }
.dashboard-page .fit-family { grid-column: 2; grid-row: 1; margin: 0; min-height: 44px; padding: .55rem 1rem; border: 1px solid #5751c7; border-radius: .8rem; background: linear-gradient(120deg, #425dc1, #6550ba); color: #fff; box-shadow: 0 3px 8px #5148b626, inset 0 1px #ffffff26; font-size: .85rem; }
.dashboard-page .fit-family:hover:not(:disabled) { background: linear-gradient(120deg, #344da9, #53409f); border-color: #5148b6; }
.dashboard-page .family-map { height: clamp(21rem, 52vw, 32rem); border: 1px solid #e3edf2; border-radius: 1rem; background: #e8f0ee; }
.dashboard-page .tracker-column { align-self: start; padding: .85rem; border: 1px solid #e4e1f6; border-radius: 1.1rem; background: linear-gradient(155deg, #f8f6ff, #f8fbff 65%, #fff); }
.dashboard-page .tracker-column > h2 { margin: 0 0 .8rem .2rem; font-size: 1.15rem; letter-spacing: -.025em; color: #242655; }
.dashboard-page .device-grid { grid-template-columns: minmax(0, 1fr); gap: .7rem; max-width: none; }
.dashboard-page .device-card { min-width: 0; min-height: 0; padding: .95rem 1rem .8rem; border: 1px solid var(--child-soft, #ebe8ff); border-radius: 1rem; background: linear-gradient(115deg, var(--child-soft, #ebe8ff), var(--child-wash, #f7f5ff)); box-shadow: inset 3px 0 var(--child-accent, #5148b6), 0 3px 9px #5148b60a; }
.dashboard-page .device-card:hover { border-color: var(--child-accent, #5148b6); box-shadow: 0 4px 12px #28476e10; }
/* A clipped identity slot supports initials now and future photo/character artwork. */
.dashboard-page .avatar { width: 3rem; height: 3rem; overflow: hidden; background: linear-gradient(145deg, #fff, #ede8ff); color: var(--child-accent, #5148b6); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--child-accent, #5148b6), 0 3px 8px #6650ba26; font-size: 1.15rem; }
.dashboard-page .avatar > img, .dashboard-page .avatar > svg { width: 100%; height: 100%; object-fit: cover; }
.dashboard-page .card-heading { gap: .85rem; }
.dashboard-page .card-heading > div { min-width: 0; }
.dashboard-page .card-heading h2 { font-size: 1.15rem; color: #252951; overflow-wrap: anywhere; }
.dashboard-page .device-name { font-size: .82rem; overflow-wrap: anywhere; }
.dashboard-page .statuses { margin: .9rem 0 .65rem; gap: .5rem; }
.dashboard-page .status-row { gap: .6rem; line-height: 1.4; font-size: .82rem; }
.dashboard-page .status-row:first-child .status-value { font-size: .85rem; }
.dashboard-page .status-value { min-width: 0; overflow-wrap: anywhere; }
.dashboard-page .status-label { flex-shrink: 0; color: #596780; }
.dashboard-page .card-footer { border-top: 1px solid #ffffffcf; padding-top: .55rem; color: #50409d; min-height: 36px; font-size: .82rem; }
.dashboard-page .card-footer .chevron { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #ffffffad; color: #5543ac; }
.dashboard-page .selected-child-panel { padding: 1rem; border: 1px solid #d9d3f3; border-radius: 1rem; background: linear-gradient(120deg, #f4f0ff, #f2f7ff); box-shadow: inset 3px 0 #7661c4; }
.dashboard-page .selected-child-panel[hidden] { display: none; }
.dashboard-page .selected-child-panel h3 { color: #293969; overflow-wrap: anywhere; }
.dashboard-page .map-details { min-height: 44px; padding: .65rem 1rem; border-radius: .7rem; background: #ebe8ff; color: #453c97; text-decoration: none; }
.child-accent-0 { --child-accent: #5148b6; --child-soft: #ebe8ff; --child-wash: #f7f5ff; }
.child-accent-1 { --child-accent: #236a9e; --child-soft: #deefff; --child-wash: #f0f7ff; }
.child-accent-2 { --child-accent: #397660; --child-soft: #e0f2e8; --child-wash: #f0faf5; }
.child-accent-3 { --child-accent: #a14f70; --child-soft: #f8e4ed; --child-wash: #fdf4f8; }
.child-marker-pin { background: var(--child-accent, #30458e); }
.child-marker-pin::after { border-top-color: var(--child-accent, #30458e); }
.child-marker-identity { background: var(--child-soft, #e5ecff); color: var(--child-accent, #30458e); }
.child-map-marker[aria-pressed="true"] .child-marker-pin { box-shadow: 0 0 0 3px #b7a2ed; }
.child-map-marker[aria-pressed="true"] .child-marker-name { background: #f2ecff; border-color: #7661c4; color: #45328a; }
@media (min-width: 42rem) {
  .dashboard-page .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-page .single-device-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 70rem) {
  .dashboard-page .family-map-card { grid-template-columns: minmax(0, 1fr) 22.5rem; grid-template-rows: auto auto; align-items: start; }
  .dashboard-page .family-map { grid-column: 1; grid-row: 2; height: clamp(27rem, 56vh, 35rem); }
  .dashboard-page .tracker-column { grid-column: 2; grid-row: 2 / span 2; }
  .dashboard-page .selected-child-panel { grid-column: 1; grid-row: 3; }
  .dashboard-page .device-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 41.99rem) {
  .dashboard-page .shell { width: calc(100% - 1.25rem); }
  .dashboard-page .app-header { padding: .6rem .65rem; min-height: 4.25rem; }
  .dashboard-page .app-header::before { inset-inline: -.625rem; }
  .dashboard-page .wordmark { font-size: 2rem; }
  .dashboard-scenery { top: 4.25rem; height: 16rem; }
  .dashboard-page .intro { padding: 1.95rem .85rem 1.5rem; }
  .dashboard-page .intro > p:last-child { font-size: .92rem; max-width: 22rem; }
  .dashboard-page .family-map-card { padding: .65rem; gap: .75rem; border-radius: 1.2rem; }
  .dashboard-page .family-map-heading { gap: .4rem .5rem; }
  .dashboard-page .family-map-heading h2 { font-size: 1.2rem; }
  .dashboard-page .family-map-heading p { font-size: .8rem; }
  .dashboard-page .fit-family { padding-inline: .65rem; }
  .dashboard-page .tracker-column { padding: .65rem; }
  .dashboard-page .device-card { padding: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .device-card, .chevron { transition: none; }
  .device-card:hover { transform: none; }
  .spinner { animation: none; }
}

/* Checkpoint 6: additive activation flow and dashboard entry. */
.add-tracker-bar { display: flex; justify-content: flex-end; margin: 0 .25rem .75rem; }
.add-tracker-link { display: inline-flex; align-items: center; min-height: 44px; padding: .65rem 1rem; border-radius: .8rem; background: linear-gradient(120deg, #425dc1, #6550ba); color: white; text-decoration: none; font-weight: 700; }
.add-tracker-link:focus-visible, .claim-qr summary:focus-visible { outline: 3px solid #637fda; outline-offset: 3px; }
.claim-shell { max-width: 30rem; }
.claim-shell .back-link { display: flex; margin: 1.5rem 0 0; min-height: 44px; align-items: center; }
.claim-card { margin-top: 1rem; }
.claim-card h1 { color: #202754; letter-spacing: -.035em; }
.claim-card input, .claim-card button { min-height: 48px; font-size: 1rem; }
.claim-help { margin: -.5rem 0 0; color: #59627b; font-size: .85rem; line-height: 1.5; }
.claim-qr { margin-top: 1rem; color: #59627b; font-size: .9rem; line-height: 1.5; }
.claim-qr summary { min-height: 44px; padding-block: .65rem; color: #30458e; cursor: pointer; }
.claim-qr p { margin: .25rem 0 0; }
.claim-card [hidden] { display: none; }
.claim-card button:disabled { opacity: .7; cursor: wait; }
@media (max-width: 359px) { .claim-card { padding: 1.1rem; } }

/* Optional profile editor and shared identity slots. */
.avatar { overflow: hidden; color: var(--child-accent, #334787); background: var(--child-soft, #dfe8ff); }
.avatar > img { width: 100%; height: 100%; object-fit: cover; }
.tracker-heading > div { min-width: 0; }
.tracker-heading h1, .tracker-heading .device-name { overflow-wrap: anywhere; }
.edit-profile { display: inline-flex; align-items: center; min-height: 44px; color: #453c97; font-weight: 700; font-size: .95rem; }
.tracker-heading .edit-profile + .edit-profile { margin-left: 1rem; }
.edit-profile:focus-visible, .photo-choose:focus-within { outline: 3px solid #637fda; outline-offset: 3px; }
.profile-shell { max-width: 30rem; }
.profile-shell .back-link { display: flex; min-height: 44px; align-items: center; margin: 1.5rem 0 0; }
.profile-card { margin-top: 1rem; }
.profile-card [hidden] { display: none; }
.profile-identity { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; font-weight: 750; }
.profile-identity > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.profile-identity .avatar { width: 4rem; height: 4rem; }
.profile-card input, .profile-card button { min-height: 48px; font-size: 1rem; }
.profile-card [role="status"], .profile-card [role="alert"] { margin: .5rem 0; line-height: 1.5; }
.profile-photo { border-top: 1px solid #e2e6f3; margin-top: 1.5rem; padding-top: 1rem; }
.profile-photo h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.profile-photo h2 span { color: #59627b; font-size: .9rem; font-weight: 400; }
.profile-help { color: #59627b; font-size: .9rem; line-height: 1.5; }
.photo-choose { display: block; margin-bottom: .5rem; font-weight: 700; }
.profile-card .photo-file { max-width: 100%; padding: .5rem; font-size: .85rem; }
.secondary-button { color: #453c97; background: #eeedfc; }
#remove-photo { margin-top: .75rem; }
.caregiver-form { display: grid; gap: .75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e2e6f3; }
.caregiver-form label { display: grid; gap: .3rem; font-weight: 700; }
.caregiver-form input, .caregiver-form select, .caregiver-form button { min-height: 44px; font: inherit; }
.caregiver-form li form, .caregiver-shell li form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.caregiver-shell li { margin-bottom: 1rem; overflow-wrap: anywhere; }
.development-code { padding: .75rem; border-radius: .6rem; background: #fff5d9; color: #51401b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
#photo-preview { margin-top: 1rem; padding: 1rem; border-radius: 1rem; background: #f5f7ff; }
#preview-image { display: block; width: 8rem; height: 8rem; border-radius: 50%; object-fit: cover; object-position: center; image-orientation: from-image; }
.photo-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.profile-card button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 359px) { .profile-card { padding: 1.1rem; } }

body:has(> .profile-shell), body:has(> .detail-shell) { min-width: 0; }
.leaflet-container .child-marker-identity > img { width: 32px; height: 32px; max-width: 32px; }

/* Status refresh controls share the existing mobile card spacing. */
.refresh-notice { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.refresh-notice p { flex: 1 1 160px; margin: 0; overflow-wrap: anywhere; }
.refresh-notice button { min-height: 48px; padding: 10px 18px; }
