:root {
  --ink: #24342e;
  --muted: #6c7b75;
  --soft: #f7f4ed;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --line: #dedfd8;
  --green: #2e6d58;
  --green-dark: #20513f;
  --green-soft: #dcebe3;
  --sage: #97b9aa;
  --peach: #efd2ba;
  --peach-soft: #faeee4;
  --amber: #b57b2f;
  --amber-soft: #faefd9;
  --red: #a65345;
  --shadow: 0 20px 60px rgba(45, 61, 54, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body.caregiver-pending .app-shell { visibility: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
svg { display: block; }
.app-shell { min-height: 100vh; }
.topbar { height: 78px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(87, 107, 98, .14); background: rgba(247, 244, 237, .92); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 700; cursor: pointer; padding: 4px; }
.brand > span:last-child { white-space: nowrap; }
.brand-tagline { display: inline; }
.brand-mark { width: 25px; height: 36px; display: grid; place-items: center; }
.brand-mark img { width: auto; height: 34px; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.caregiver-switch { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 5px 10px 5px 6px; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: .2s ease; }
.caregiver-switch:hover { border-color: var(--sage); transform: translateY(-1px); }
.caregiver-switch.is-locked { cursor: default; }
.caregiver-switch.is-locked:hover { border-color: var(--line); transform: none; }
.caregiver-switch-avatar { width: 31px; height: 31px; flex: 0 0 auto; border-radius: 50%; background: var(--peach); display: grid; place-items: center; color: #6d4e39; font-family: Georgia, serif; font-weight: 800; }
.caregiver-switch-copy { display: flex; align-items: center; line-height: 1.05; }
.caregiver-switch-copy strong { font-size: 12px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caregiver-switch svg { width: 15px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.live-pill { font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.65); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: .2s ease; }
.icon-button:hover { transform: translateY(-1px); border-color: var(--sage); }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
main { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }
.view { display: none; padding: 64px 0 96px; animation: reveal .32s ease both; }
.view.is-active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
.hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(38px, 7vw, 88px); align-items: center; margin-bottom: 72px; }
.eyebrow { margin: 0 0 10px; color: var(--green); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.025em; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 6vw, 72px); line-height: 1; margin-bottom: 16px; font-weight: 500; }
.hero-subtitle { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 510px; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.hero-actions .button { min-width: 178px; }
.button { border: 1px solid transparent; border-radius: 13px; min-height: 46px; padding: 0 19px; font-weight: 750; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.button-primary { color: white; background: var(--green); box-shadow: 0 10px 28px rgba(46, 109, 88, .18); }
.button-primary:hover { background: var(--green-dark); }
.button-large { min-height: 54px; padding: 0 24px; border-radius: 15px; }
.button-quiet { background: var(--surface); border-color: var(--line); }
.button-quiet:hover { border-color: var(--sage); }
.button-danger { color: #984b43; background: #fff; border-color: rgba(152,75,67,.42); box-shadow: none; }
.button-danger:hover { color: #7d3731; background: #fff7f5; border-color: #b55c52; }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 800; cursor: pointer; padding: 5px; }
.text-button.danger { color: var(--red); }
.progress-card, .next-card, .care-card, .chart-card, .settings-card, .data-tools { background: var(--surface); border: 1px solid rgba(120,135,128,.18); box-shadow: var(--shadow); border-radius: var(--radius); }
.progress-card { padding: clamp(25px, 4vw, 38px); }
.progress-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.card-kicker { color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.progress-card h2 { font-size: clamp(38px, 5vw, 56px); line-height: 1; margin: 0; font-weight: 650; }
.progress-card h2 small { color: var(--muted); font-size: 20px; font-weight: 550; }
.progress-percent { font-size: 13px; font-weight: 800; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 8px 10px; }
.progress-track { height: 12px; border-radius: 99px; background: #e7e5df; margin: 31px 0 13px; overflow: visible; position: relative; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #6da78e); width: 0; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.progress-track i { position: absolute; top: -4px; left: 0; width: 2px; height: 20px; background: var(--ink); border-radius: 2px; opacity: .65; transition: left .5s ease; }
.progress-legend, .chart-key { display: flex; flex-wrap: wrap; gap: 18px; font-size: 11px; color: var(--muted); }
.progress-legend span, .chart-key span { display: flex; gap: 6px; align-items: center; }
.progress-legend i, .chart-key i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: var(--green); }
.progress-legend .legend-pace { background: var(--ink); width: 2px; border-radius: 0; }
.stat-row { margin-top: 27px; border-top: 1px solid var(--line); padding-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-row div { display: flex; flex-direction: column; gap: 6px; }
.stat-row span { color: var(--muted); font-size: 11px; }
.stat-row strong { font-size: 15px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; }
.section-block + .section-block { margin-top: 62px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2, .chart-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 500; margin: 0; }
.section-heading .eyebrow, .chart-heading .eyebrow { margin-bottom: 5px; }
.live-pill { border: 0; background: var(--green-soft); color: var(--green); }
.guidance-card { min-height: 112px; padding: 24px; border-radius: 18px; display: flex; align-items: center; gap: 19px; background: var(--green-soft); border: 1px solid #c7ddd1; }
.guidance-card.is-behind { background: var(--amber-soft); border-color: #ecd6ac; }
.guidance-card.is-ahead { background: #e8eee9; }
.guidance-icon { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; background: var(--green); position: relative; }
.guidance-icon::before { content: ""; position: absolute; left: 14px; top: 12px; width: 13px; height: 8px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg); }
.is-behind .guidance-icon { background: var(--amber); }
.is-behind .guidance-icon::before { content: "!"; color: white; border: 0; transform: none; inset: 0; width: auto; height: auto; display: grid; place-items: center; font-weight: 900; }
.guidance-card strong { display: block; margin-bottom: 5px; font-size: 16px; }
.guidance-card p { color: #56665f; margin: 0; line-height: 1.55; font-size: 14px; }
.guidance-basis { display: block; color: #708078; font-size: 10px; margin-top: 8px; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; top: 19px; bottom: 20px; left: 17px; width: 1px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 35px 90px 1fr auto; gap: 16px; align-items: center; min-height: 78px; padding: 7px 0; }
button.timeline-item { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; border-radius: 14px; cursor: pointer; font: inherit; padding-left: 0; padding-right: 0; transition: background .2s ease, transform .2s ease; }
button.timeline-item:hover { background: rgba(220,235,227,.55); transform: translateX(3px); }
button.timeline-item:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.timeline-item.is-actionable .timeline-main span { color: var(--green); }
.timeline-item.is-next .timeline-main span { font-weight: 750; }
.timeline-item.is-editable .timeline-main span { color: var(--green); }
.timeline-dot { width: 35px; height: 35px; z-index: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--soft); display: grid; place-items: center; }
.timeline-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b2b9b5; }
.timeline-item.is-done .timeline-dot { background: var(--green); border-color: var(--green); }
.timeline-item.is-done .timeline-dot::after { background: white; }
.timeline-item.is-next .timeline-dot { border: 2px solid var(--green); background: var(--surface); box-shadow: 0 0 0 5px var(--green-soft); }
.timeline-item.is-next .timeline-dot::after { background: var(--green); }
.timeline-time { font-weight: 800; font-size: 14px; }
.timeline-main strong { font-size: 14px; display: block; margin-bottom: 4px; }
.timeline-main span { color: var(--muted); font-size: 12px; }
.timeline-amount { font-size: 14px; font-weight: 800; text-align: right; }
.timeline-amount small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.timeline-item.is-adjusted .timeline-amount { min-width: 118px; padding: 7px 9px; border: 1px solid #e9d29f; border-radius: 10px; background: var(--amber-soft); color: #76501f; }
.timeline-item.is-adjusted .timeline-amount small { color: #8a6534; }
.side-column { display: flex; flex-direction: column; gap: 20px; }
.next-card { padding: 29px; }
.next-time { font-family: Georgia, serif; font-size: 43px; margin: 14px 0 2px; line-height: 1; }
.next-card h2 { font-size: 18px; margin-bottom: 7px; }
.next-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.55; }
.mini-divider { height: 1px; background: var(--line); margin: 22px 0 15px; }
.next-detail { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 7px 0; }
.next-detail span { color: var(--muted); }
.next-detail-emphasis { gap: 12px; margin: 0 -10px 2px; padding: 11px 10px; border-radius: 10px; background: var(--green-soft); }
.next-detail-emphasis span { color: var(--green-dark); font-weight: 700; line-height: 1.25; }
.next-detail-emphasis strong { flex: 0 0 auto; white-space: nowrap; }
.care-card { background: var(--peach-soft); border-color: #efdcca; box-shadow: none; padding: 22px 26px 26px; overflow: hidden; }
.care-illustration { height: 112px; display: grid; place-items: center; margin: -9px 0 5px; }
.care-illustration svg { width: 180px; }
.care-card h3 { font-family: Georgia, serif; font-size: 20px; margin-bottom: 8px; }
.care-card p { color: #74685e; line-height: 1.55; font-size: 12px; margin: 0; }
.care-card .daily-tip-label { margin: 0 0 7px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 850; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.page-heading.compact { display: block; }
.page-heading h1 { font-size: clamp(40px, 5vw, 61px); margin-bottom: 10px; }
.page-heading p:not(.eyebrow) { color: var(--muted); margin: 0; line-height: 1.6; }
.segmented { display: inline-flex; background: #ebe8e1; padding: 4px; border-radius: 12px; flex-shrink: 0; }
.segmented button { border: 0; background: transparent; padding: 9px 13px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.segmented .is-selected { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(44,53,49,.08); }
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 22px; }
.insight-grid article { padding: 23px; border-left: 1px solid var(--line); }
.insight-grid span, .insight-grid small { color: var(--muted); font-size: 11px; display: block; }
.insight-grid strong { font-family: Georgia, serif; font-size: 34px; font-weight: 500; display: block; margin: 7px 0 3px; }
.chart-card { padding: clamp(22px, 4vw, 36px); }
.chart-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.chart-key i { border-radius: 2px; }
.chart-key span:nth-child(2) i { background: transparent; border: 1px dashed var(--sage); }
.chart-wrap { height: 310px; position: relative; }
#intake-chart { width: 100%; height: 100%; }
.empty-chart { display: none; position: absolute; inset: 0; place-items: center; color: var(--muted); text-align: center; }
.empty-chart.is-visible { display: grid; }
.history-list-section { margin-top: 58px; }
.caregiver-insights-section { margin-top: 58px; }
.caregiver-insights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.caregiver-insight-card { background: var(--surface); border: 1px solid var(--line); border-radius: 19px; padding: 24px; overflow: hidden; position: relative; }
.caregiver-insight-card::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; background: var(--peach-soft); right: -61px; top: -71px; pointer-events: none; }
.caregiver-insight-card:nth-child(even)::after { background: var(--green-soft); }
.caregiver-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; position: relative; z-index: 1; }
.caregiver-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.caregiver-avatar { width: 39px; height: 39px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--peach); color: #6d4e39; font-family: Georgia, serif; font-size: 18px; font-weight: 700; }
.caregiver-insight-card:nth-child(even) .caregiver-avatar { background: var(--sage); color: var(--green-dark); }
.caregiver-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caregiver-identity span { color: var(--muted); font-size: 11px; }
.share-pill { padding: 7px 9px; border-radius: 999px; background: var(--peach-soft); color: #7c5a42; font-size: 11px; font-weight: 850; white-space: nowrap; }
.caregiver-insight-card:nth-child(even) .share-pill { background: var(--green-soft); color: var(--green-dark); }
.caregiver-share-track { height: 7px; border-radius: 99px; background: #e7e5df; overflow: hidden; margin-bottom: 22px; }
.caregiver-share-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #d69f79; transition: width .5s ease; }
.caregiver-insight-card:nth-child(even) .caregiver-share-track span { background: var(--green); }
.caregiver-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
.caregiver-metric span { color: var(--muted); display: block; font-size: 10px; margin-bottom: 5px; }
.caregiver-metric strong { font-size: 16px; }
.caregiver-rhythm { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 15px; display: flex; justify-content: space-between; gap: 14px; font-size: 11px; }
.caregiver-rhythm span { color: var(--muted); }
.caregiver-summary { background: rgba(220,235,227,.65); color: #4e635a; border-radius: 13px; padding: 14px 17px; margin: 15px 0 0; font-size: 12px; line-height: 1.55; }
.history-list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.history-row { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 24px; align-items: center; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-date strong, .history-details strong { display: block; font-size: 13px; }
.history-date span, .history-details span { color: var(--muted); font-size: 11px; }
.history-amount { font-weight: 850; }
.history-left { color: var(--muted); font-size: 11px; min-width: 65px; text-align: right; }
.history-row button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; }
.empty-state { color: var(--muted); text-align: center; padding: 45px 20px; }
.settings-layout { display: flex; flex-direction: column; gap: 17px; }
.settings-card { padding: clamp(22px, 4vw, 34px); box-shadow: 0 10px 30px rgba(45, 61, 54, .04); }
.settings-card-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 25px; }
.settings-card-heading h2 { margin: 2px 0 4px; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.settings-card-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.settings-card-heading .schedule-mode-help { max-width: 780px; margin-top: 8px; line-height: 1.55; }
.schedule-mode-help span { display: block; }
.schedule-mode-help strong { color: var(--ink); }
.field-grid { display: grid; gap: 18px; margin-top: 18px; }
.field-grid.two { grid-template-columns: repeat(2, 1fr); }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-weight: 750; font-size: 12px; }
.field span small { color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #d3d6d0; background: #fff; color: var(--ink); border-radius: 11px; padding: 12px 13px; outline: none; transition: .2s; }
.field input, .field select { height: 46px; }
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,109,88,.1); }
.check-card { height: 46px; min-height: 46px; align-self: end; border: 1px solid #d3d6d0; background: white; border-radius: 11px; padding: 6px 13px; display: flex; align-items: center; gap: 11px; cursor: pointer; }
.check-card input { position: absolute; opacity: 0; }
.check-mark { width: 21px; height: 21px; flex: 0 0 auto; border: 1px solid #bfc5c0; border-radius: 6px; position: relative; transition: .2s; }
.check-card input:checked + .check-mark { background: var(--green); border-color: var(--green); }
.check-card input:checked + .check-mark::after { content: ""; position: absolute; left: 6px; top: 3px; width: 6px; height: 10px; border-right: 2px solid white; border-bottom: 2px solid white; transform: rotate(45deg); }
.check-card > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.check-card strong { font-size: 12px; }
.check-card small { color: var(--muted); font-size: 9px; line-height: 1.1; font-weight: 500; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 58px; }
.input-suffix span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.field input[readonly] { background: #f1f2ee; color: #55645e; cursor: default; }
.schedule-mode { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.schedule-mode legend { width: 100%; padding: 0; margin-bottom: 2px; font-size: 12px; font-weight: 800; }
.schedule-mode label { position: relative; min-height: 40px; cursor: pointer; }
.schedule-mode input { position: absolute; opacity: 0; }
.schedule-mode label > span { min-width: 104px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid #cbd0ca; border-radius: 10px; background: white; transition: .2s ease; }
.schedule-mode strong { font-size: 12px; }
.schedule-mode input:checked + span { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 2px rgba(46,109,88,.08); }
.schedule-mode input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.sleep-window-group { margin-top: 18px; padding: 15px 16px 17px; border: 1px solid rgba(46,109,88,.18); border-radius: 12px; background: rgba(220,235,227,.38); }
.settings-subsection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.settings-subsection-heading > span { color: var(--green); text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 850; }
.settings-subsection-heading small { color: var(--muted); font-size: 10px; }
.sleep-window-group .field-grid { margin-top: 12px; }
.schedule-output { margin-top: 18px; padding: 14px 16px; border: 1px solid #d9dcd6; border-radius: 12px; background: #efeee9; }
.schedule-output > span { display: block; margin-bottom: 5px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 850; }
.schedule-summary { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.schedule-summary .calculation-rest { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(108,123,117,.2); }
.schedule-summary strong { color: var(--ink); }
.schedule-summary.is-warning { color: #76501f; }
.settings-save { display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding: 14px 0 0; }
.settings-save p { color: var(--green); margin: 0; font-size: 12px; }
.access-management-card > .settings-card-heading { margin-bottom: 25px; }
.access-management-subsection { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.55); }
.access-management-subsection + .access-management-subsection { margin-top: 18px; }
.access-subsection-heading { margin-bottom: 15px; }
.access-subsection-heading h3 { margin: 0 0 4px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.access-subsection-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.caregiver-settings-list { display: flex; flex-direction: column; gap: 10px; }
.caregiver-setting-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.caregiver-setting-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--peach-soft); color: #805f49; font-family: Georgia, serif; font-size: 18px; font-weight: 800; }
.caregiver-setting-main { min-width: 0; }
.caregiver-setting-main strong, .caregiver-setting-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caregiver-setting-main strong { font-size: 13px; }
.caregiver-setting-main small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.caregiver-edit { min-height: 36px; padding: 0 13px; font-size: 11px; }
.access-profile-list { display: flex; flex-direction: column; gap: 10px; }
.access-profile-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.access-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-family: Georgia, serif; font-size: 18px; font-weight: 800; }
.access-profile-main { min-width: 0; }
.access-profile-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.access-profile-heading strong { font-size: 13px; }
.access-profile-main > span, .access-profile-main > small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { display: inline-flex; align-items: center; min-height: 21px; padding: 0 8px; border-radius: 999px; background: #efeee9; color: var(--muted); font-size: 9px; font-weight: 800; }
.role-badge.is-superAdmin { background: var(--peach-soft); color: #855c3e; }
.role-badge.is-admin { background: var(--green-soft); color: var(--green-dark); }
.access-edit { min-height: 36px; padding: 0 13px; font-size: 11px; }
.access-protected { max-width: 100px; color: var(--muted); font-size: 9px; line-height: 1.3; text-align: right; }
.empty-access { padding: 20px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.add-access-profile { margin-top: 14px; min-height: 40px; }
.field-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.add-caregiver-button { margin-top: 14px; min-height: 40px; }
.data-tools { padding: 25px 31px; margin-top: 50px; display: flex; align-items: center; justify-content: space-between; gap: 25px; background: transparent; box-shadow: none; }
.data-tools h2 { font-family: Georgia, serif; font-size: 22px; margin-bottom: 5px; }
.data-tools p { color: var(--muted); font-size: 12px; margin: 0; }
.data-tools > div:last-child { display: flex; gap: 10px; align-items: center; }
.danger-zone { margin-top: 17px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-color: rgba(168,79,69,.25); background: rgba(255,250,248,.74); box-shadow: none; }
.danger-zone-copy { max-width: 680px; }
.danger-zone-label { margin: 0 0 7px; color: var(--red); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 850; }
.danger-zone h2 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.danger-zone-copy > p:not(.danger-zone-label) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.danger-zone .field-note { margin-top: 9px !important; font-size: 10px !important; }
.danger-zone .button { flex: 0 0 auto; }
.feed-dialog { width: min(600px, calc(100% - 28px)); max-height: min(90vh, 820px); border: 0; border-radius: 24px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 35px 100px rgba(29,45,38,.25); overflow: auto; }
.feed-dialog::backdrop { background: rgba(28, 39, 34, .5); backdrop-filter: blur(4px); }
.feed-dialog form { padding: 30px; }
.confirm-dialog { width: min(430px, calc(100% - 28px)); border: 0; border-radius: 21px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 35px 100px rgba(29,45,38,.3); }
.confirm-dialog::backdrop { background: rgba(28,39,34,.38); backdrop-filter: blur(3px); }
.confirm-dialog-content { padding: 30px; text-align: center; }
.confirm-icon { width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-size: 20px; font-weight: 900; }
.confirm-dialog h2 { margin-bottom: 9px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.confirm-dialog p { margin: 0 auto 23px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.confirm-dialog .dialog-actions { justify-content: center; }
.is-hidden { display: none !important; }
.account-dialog { width: min(470px, calc(100% - 28px)); border: 0; border-radius: 23px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 35px 100px rgba(29,45,38,.3); }
.account-dialog::backdrop { background: rgba(28,39,34,.58); backdrop-filter: blur(6px); }
.account-dialog-content { padding: 34px; position: relative; }
.account-dialog-close { position: absolute; right: 17px; top: 17px; }
.account-dialog h2 { margin: 5px 46px 10px 0; font-family: Georgia, serif; font-size: 30px; line-height: 1.08; font-weight: 500; }
.account-dialog-content > p:not(.eyebrow):not(.account-message) { color: var(--muted); font-size: 13px; line-height: 1.55; }
.account-profile { margin: 20px 0 4px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.account-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-family: Georgia, serif; font-size: 18px; font-weight: 800; }
.account-profile strong, .account-profile small { display: block; }
.account-profile small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.account-profile .account-role { color: var(--green); font-weight: 750; }
.household-setup { margin: 18px 0 0; padding: 16px; border-radius: 14px; background: var(--green-soft); }
.household-setup p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.account-message { min-height: 18px; margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.account-message.is-error { color: #a84f45; }
.account-actions { align-items: center; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }
.dialog-head h2 { font-family: Georgia, serif; font-size: 32px; font-weight: 500; margin: 0; }
.retro-hint { color: var(--muted); background: #efeee9; border-radius: 10px; margin: -8px 0 18px; padding: 10px 12px; font-size: 11px; line-height: 1.45; }
.feed-kind-field { padding: 0; margin: 0 0 20px; border: 0; }
.feed-kind-field legend { margin-bottom: 9px; font-size: 12px; font-weight: 750; }
.feed-kind-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feed-kind-options input { position: absolute; opacity: 0; }
.feed-kind-options label > span { min-height: 68px; padding: 11px 13px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; transition: .18s ease; }
.feed-kind-options strong, .feed-kind-options small { display: block; }
.feed-kind-options strong { color: var(--ink); font-size: 12px; }
.feed-kind-options small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.feed-kind-options input:checked + span { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(46,109,88,.1); }
.feed-kind-options input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.scheduled-feed-field { margin-top: 12px; }
.timeline-item.is-additional { margin: 3px 0; padding: 7px 10px 7px 0; border-radius: 12px; background: rgba(226, 239, 232, .55); }
.timeline-item.is-additional .timeline-dot { border-color: var(--green); background: var(--green-soft); }
.timeline-item.is-additional .timeline-dot::after { background: var(--green); }
.first-feed-prompt { padding: 16px; margin-bottom: 22px; border-radius: 15px; background: var(--peach-soft); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.first-feed-prompt.is-hidden { display: none; }
.first-feed-prompt strong { font-size: 13px; display: block; margin-bottom: 3px; }
.first-feed-prompt p { color: #74685e; font-size: 11px; margin: 0; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 45px; height: 26px; border-radius: 99px; background: #c6c7c3; display: block; position: relative; cursor: pointer; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: white; top: 3px; left: 3px; transition: .2s; box-shadow: 0 2px 7px rgba(0,0,0,.15); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 22px; }
.amount-guidance { margin: 12px 0 8px; padding: 12px 14px; border: 1px solid #dbe5df; border-radius: 11px; background: var(--green-soft); color: var(--muted); font-size: 11px; line-height: 1.45; }
.amount-guidance strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 12px; }
.amount-guidance p { margin: 0; }
.amount-guidance small { display: block; margin-top: 5px; color: var(--green); font-size: 11px; font-weight: 700; }
.amount-guidance #feed-target-status { color: var(--ink); }
.form-error { min-height: 17px; margin: 13px 0 0; color: var(--red); font-size: 11px; }
.access-profile-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; }
.access-profile-actions .danger:disabled { opacity: .45; cursor: not-allowed; }
.caregiver-profile-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; }
.caregiver-profile-actions .danger:disabled { opacity: .45; cursor: not-allowed; }
.history-locked { color: var(--muted); font-size: 9px; }
.amount-preview { margin: 15px 0 20px; background: #efeee9; padding: 12px 14px; border-radius: 10px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.amount-preview strong { color: var(--ink); }
.caregiver-field { border: 0; padding: 0; margin: 0 0 20px; }
.caregiver-field legend { font-size: 12px; font-weight: 750; margin-bottom: 9px; }
.caregiver-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.caregiver-option input { position: absolute; opacity: 0; }
.caregiver-option span { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 750; }
.caregiver-option span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--peach); }
.caregiver-option input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.caregiver-option:nth-child(2) span::before { background: var(--sage); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: white; padding: 12px 17px; border-radius: 11px; font-size: 12px; font-weight: 700; transition: .25s; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }
.caregiver-gate { width: min(530px, calc(100% - 30px)); border: 0; border-radius: 26px; padding: 0; color: var(--ink); background: var(--surface); box-shadow: 0 38px 110px rgba(26,43,35,.3); }
.caregiver-gate::backdrop { background: rgba(31,45,39,.72); backdrop-filter: blur(8px); }
.caregiver-gate-content { padding: 38px; text-align: center; position: relative; }
.caregiver-gate-close { position: absolute; right: 18px; top: 18px; }
.caregiver-gate-close.is-hidden { display: none; }
.gate-mark { width: 36px; height: 66px; display: grid; place-items: center; margin: 0 auto 18px; }
.gate-mark img { width: auto; height: 64px; display: block; }
.caregiver-gate h2 { font-family: Georgia, serif; font-weight: 500; font-size: 35px; line-height: 1.05; margin-bottom: 11px; }
.gate-copy { max-width: 390px; margin: 0 auto 25px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.caregiver-gate-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.caregiver-choice { min-height: 66px; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 10px 13px; display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer; transition: .2s ease; }
.caregiver-choice:hover, .caregiver-choice:focus-visible { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); outline: none; }
.caregiver-choice-avatar { width: 39px; height: 39px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--peach); color: #73523d; font-family: Georgia, serif; font-size: 18px; font-weight: 800; }
.caregiver-choice:nth-child(even) .caregiver-choice-avatar { background: var(--green-soft); color: var(--green-dark); }
.caregiver-choice strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 35px; }
  .hero-copy { text-align: center; }
  .hero-copy .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .content-grid { grid-template-columns: 1fr; gap: 45px; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; }
  .field-grid.three { grid-template-columns: 1fr 1fr; }
  .timeline::before { left: 14px; top: 15px; bottom: 15px; }
  .timeline-item { grid-template-columns: 29px 72px 1fr auto; gap: 11px; min-height: 62px; padding: 4px 0; }
  .timeline-dot { width: 29px; height: 29px; }
  .timeline-dot::after { width: 7px; height: 7px; }
  .timeline-main strong { margin-bottom: 2px; }
}

@media (max-width: 640px) {
  body { background: #f8f5ef; }
  .topbar { height: 64px; padding: 0 17px; }
  .brand { font-size: clamp(14px, 2.7vw, 18px); gap: 7px; }
  .brand-mark { width: 19px; height: 29px; }
  .brand-mark img { height: 28px; }
  .topbar-actions { gap: 7px; }
  .caregiver-switch { height: 38px; min-height: 38px; padding: 3px 8px 3px 3px; justify-content: center; gap: 6px; }
  .caregiver-switch-avatar { width: 30px; height: 30px; }
  .caregiver-switch-copy { display: flex; }
  .caregiver-switch-copy strong { max-width: 64px; }
  .caregiver-switch svg { display: none; }
  .topbar .icon-button { width: 38px; height: 38px; }
  main { width: min(100% - 28px, 580px); }
  .view { padding: 37px 0 105px; }
  h1 { font-size: 44px; }
  .hero-grid { margin-bottom: 48px; }
  .hero-subtitle { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button-large { width: 100%; }
  .hero-actions .button-quiet { background: transparent; }
  .progress-card { border-radius: 19px; padding: 23px 20px; }
  .progress-card h2 { font-size: 39px; }
  .progress-card h2 small { font-size: 16px; }
  .stat-row { gap: 7px; }
  .stat-row strong { font-size: 13px; }
  .content-grid { gap: 40px; }
  .section-block + .section-block { margin-top: 48px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 27px; }
  .guidance-card { align-items: flex-start; padding: 19px; }
  .timeline::before { left: 13px; top: 14px; bottom: 14px; }
  .timeline-item { grid-template-columns: 27px 62px 1fr auto; gap: 8px; min-height: 56px; padding: 3px 0; }
  .timeline-dot { width: 27px; height: 27px; }
  .timeline-dot::after { width: 6px; height: 6px; }
  .timeline-time, .timeline-main strong, .timeline-amount { font-size: 12px; }
  .timeline-main span { font-size: 10px; line-height: 1.25; }
  .timeline-amount small { font-size: 9px; margin-top: 1px; }
  .timeline-item.is-adjusted .timeline-amount { min-width: 94px; padding: 5px 6px; }
  .side-column { grid-template-columns: 1fr; }
  .care-card { display: block; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 43px; }
  .segmented { margin-top: 24px; }
  .insight-grid { gap: 0; overflow-x: auto; }
  .insight-grid article { min-width: 130px; padding: 17px 12px; }
  .insight-grid strong { font-size: 26px; }
  .chart-card { border-radius: 18px; }
  .chart-heading { align-items: flex-start; flex-direction: column; }
  .chart-wrap { height: 250px; }
  .caregiver-insights-grid { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 84px 1fr auto; gap: 10px; padding: 17px 15px; }
  .history-left { display: none; }
  .field-grid.two, .field-grid.three { grid-template-columns: 1fr; }
  .schedule-mode { grid-template-columns: 1fr; }
  .settings-subsection-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .settings-card { border-radius: 18px; }
  .settings-save { position: sticky; bottom: 74px; background: rgba(248,245,239,.94); padding: 12px 0; z-index: 3; }
  .settings-save .button { width: 100%; }
  .settings-save p { display: none; }
  .data-tools { flex-direction: column; align-items: flex-start; padding: 22px; }
  .data-tools > div:last-child { width: 100%; flex-direction: column; align-items: stretch; }
  .access-management-subsection { padding: 14px; }
  .caregiver-setting-card { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 11px; }
  .caregiver-setting-avatar { width: 36px; height: 36px; }
  .access-profile-card { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 11px; }
  .access-avatar { width: 36px; height: 36px; }
  .access-protected { display: none; }
  .access-profile-actions { grid-template-columns: 1fr 1fr; }
  .access-profile-actions span { display: none; }
  .access-profile-actions .danger { grid-column: 1 / -1; justify-self: start; }
  .caregiver-profile-actions { grid-template-columns: 1fr 1fr; }
  .caregiver-profile-actions span { display: none; }
  .caregiver-profile-actions .danger { grid-column: 1 / -1; justify-self: start; }
  .danger-zone { align-items: stretch; flex-direction: column; gap: 18px; }
  .danger-zone .button { width: 100%; }
  .feed-dialog { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 25px 25px 0 0; }
  .feed-dialog form { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .feed-dialog .field-grid.two { grid-template-columns: 1fr 1fr; }
  .feed-kind-options { grid-template-columns: 1fr; }
  .feed-kind-options label > span { min-height: 58px; }
  .caregiver-gate { width: calc(100% - 24px); border-radius: 22px; }
  .caregiver-gate-content { padding: 31px 20px 22px; }
  .caregiver-gate h2 { font-size: 30px; }
  .caregiver-gate-options { grid-template-columns: 1fr; max-height: 43vh; overflow-y: auto; }
  .account-dialog { width: calc(100% - 24px); border-radius: 21px; }
  .account-dialog-content { padding: 29px 20px 22px; }
  .account-actions { flex-direction: column-reverse; align-items: stretch; }
  .mobile-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(68px + env(safe-area-inset-bottom)); padding: 6px 14px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,253,248,.95); backdrop-filter: blur(16px); display: grid; grid-template-columns: repeat(3, 1fr); }
  .mobile-nav.is-guest { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #85908b; font-size: 10px; font-weight: 750; cursor: pointer; }
  .mobile-nav button.is-active { color: var(--green); }
  .mobile-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .toast { bottom: 86px; max-width: calc(100% - 34px); white-space: nowrap; }
}

@media (max-width: 760px) {
  .brand-tagline { display: none; }
}

@media (max-width: 520px) {
  .brand-name { display: none; }
  .topbar [data-view-link="settings"].icon-button { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
