    
    *{box-sizing:border-box}body{margin:0;background:var(--background);color:var(--ink);font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.6}button,input{touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid var(--green);outline-offset:3px}
    .shell{max-width:740px;margin:auto;padding:32px 22px calc(35px + env(safe-area-inset-bottom))}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px}.brand{font-weight:700;}.brand span{color:var(--green);margin-right:8px}.tag{text-transform:uppercase;color:var(--muted)}h1{font-weight:600;margin:10px 0}h2{margin:0 0 10px}p{line-height:1.5}.muted{color:var(--muted)}.intro{margin:0 0 24px;color:var(--muted)}
    .personbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:22px 0}.people{display:flex;background:var(--segmented);padding:4px;border-radius:14px;gap:3px}.people button{border:0;background:none;color:var(--muted);border-radius:10px;padding:10px 16px;max-width:180px;overflow:hidden;text-overflow:ellipsis}.people button.active{background:var(--paper);color:var(--ink);box-shadow:0 2px 5px #22332210}
    nav{display:flex;gap:24px;border-bottom:1px solid var(--line);margin:26px 0 22px}nav button{border:0;background:none;padding:0 0 14px;color:var(--muted);position:relative;font-weight:600}nav button.active{color:var(--green)}nav button.active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:3px;background:var(--green);border-radius:3px}
    .progress{background:var(--progress);border-radius:19px;padding:20px 22px;margin-bottom:20px;display:flex;align-items:center;gap:20px}.ring{--p:0deg;background:conic-gradient(var(--green) var(--p),var(--track) 0);width:56px;height:56px;flex-shrink:0;border-radius:50%;display:grid;place-items:center}.ring:before{content:attr(data-count);border-radius:50%;width:43px;height:43px;background:var(--progress);display:grid;place-items:center;font-weight:700}.progress strong{display:block;margin-bottom:5px}.progress small{color:var(--progress-text)}.task{display:flex;align-items:center;gap:15px;width:100%;text-align:left;background:var(--paper);border:1px solid var(--line);border-radius:17px;padding:19px;margin:10px 0;color:var(--ink);min-height:84px}.task .check{width:28px;height:28px;border:2px solid var(--check-border);border-radius:50%;flex-shrink:0;display:grid;place-items:center}.task.done .check{background:var(--green);border-color:var(--green);color:var(--on-green)}.task.done{background:var(--completed)}.task strong{font-weight:600;display:block;overflow-wrap:anywhere}.task small{display:block;color:var(--muted);margin-top:6px;}.task.done strong{color:var(--completed-text)}.task .right{margin-left:auto;color:var(--subtle);flex-shrink:0}.empty{border:1px dashed var(--check-border);border-radius:20px;text-align:center;padding:36px 22px;background:var(--empty)}.empty p{color:var(--muted);max-width:330px;margin:10px auto 20px}.primary{background:var(--green);color:var(--on-green);border:0;border-radius:12px;padding:13px 20px;font-weight:600}.secondary{background:var(--secondary);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:11px 15px}.textbutton{border:0;background:none;color:var(--green);padding:10px 0}.danger{color:var(--danger)}.panel{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:23px;margin-bottom:18px}label{display:block;font-weight:600;margin-bottom:8px}input[type=text],input[type=password],input[type=date]{width:100%;border:1px solid var(--input-border);border-radius:11px;padding:12px;background:var(--input);color:var(--ink);min-width:0}input[type=date]{max-width:220px}input[type=checkbox]{accent-color:var(--green);width:18px;height:18px}.days{display:flex;gap:6px;flex-wrap:wrap;margin:15px 0 22px}.days label{display:flex;align-items:center;gap:5px;padding:9px 8px;background:var(--day-chip);border-radius:9px;font-weight:400;margin:0}.row{display:flex;align-items:center;justify-content:space-between;gap:15px}.actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}.routine{padding:15px 0;border-bottom:1px solid var(--line)}.routine:last-child{border:0}.routine strong{display:block;overflow-wrap:anywhere}.routine small{display:block;color:var(--muted);margin-top:5px}.routine button{border:0;background:none;color:var(--green);padding:10px;}.routine .danger{color:var(--danger)}.note{color:var(--muted);line-height:1.5}.foot{margin-top:30px;color:var(--muted);display:flex;gap:8px;align-items:center}.dot{width:6px;height:6px;background:var(--green);border-radius:50%}#toast{position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:var(--toast);color:var(--toast-text);padding:14px 20px;border-radius:13px;max-width:90%;z-index:5;box-shadow:0 4px 30px var(--shadow)}dialog{border:1px solid var(--line);border-radius:22px;padding:25px;max-width:440px;width:calc(100% - 32px);color:var(--ink);background:var(--paper)}dialog::backdrop{background:var(--backdrop)}[hidden]{display:none!important}@media(max-width:500px){.shell{padding:24px 17px 35px}h1{}.personbar{align-items:flex-start;flex-direction:column;gap:8px}.people{width:100%}.people button{flex:1;max-width:none}.tag{}.panel{padding:18px}.routine.row{align-items:flex-start}.routine .actions{margin:0;gap:0;flex-shrink:0}nav{gap:22px}.days{gap:4px}.days label{padding:8px 6px}.brand{}}

input::placeholder{color:var(--muted);opacity:1}.theme-options{display:flex;flex-wrap:wrap;gap:8px}.theme-options button{border:1px solid var(--line);border-radius:12px;padding:11px 14px;background:var(--secondary);color:var(--ink)}.theme-options button[aria-pressed=true]{background:var(--green);color:var(--on-green);border-color:var(--green)}
.history-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-top:18px}.history-day{border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:12px;padding:10px 3px;min-width:0}.history-day small,.history-day strong,.history-day span{display:block}.history-day small,.history-day span{color:var(--muted)}.history-day strong{margin:8px 0;}.history-day.complete{background:var(--completed);border-color:var(--green)}.history-day.partial{background:var(--progress)}.history-routine{display:flex;gap:12px;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:17px 0}.history-routine strong{overflow-wrap:anywhere}.history-routine small{display:block;color:var(--muted);margin-top:6px;}.history-routine b{white-space:nowrap;color:var(--green)}summary{cursor:pointer;font-weight:600}@media(max-width:500px){nav{gap:0;justify-content:space-between}nav button{}.history-grid{gap:4px}.history-day strong{}#history>.row{align-items:flex-start;gap:8px}#history>.row h2{}#history .theme-options{gap:4px}#history .theme-options button{padding:8px}}
.parent-switch{border:1px solid var(--line);background:var(--paper);color:var(--green);border-radius:12px;padding:9px 12px;max-width:48%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}#parentSettings .people button{flex:1;max-width:none}@media(max-width:600px){.shell{padding-top:calc(14px + env(safe-area-inset-top))}header{margin-bottom:10px}#heading,.intro{display:none}nav{margin:17px 0 14px;justify-content:space-between;gap:8px}nav button{padding-bottom:11px}.progress{padding:15px 17px;gap:15px;margin-bottom:14px}.task{padding:16px;min-height:76px}#dateLabel{}.foot{margin-top:20px}}
#archiveList .actions{max-width:135px}#archiveList button{text-align:right}
/* Shared calendar, using the existing light/dark theme. */
nav{gap:18px}select,textarea,input[type=datetime-local]{font:inherit;width:100%;border:1px solid var(--input-border);border-radius:11px;padding:12px;background:var(--input);color:var(--ink);min-width:0}textarea{resize:vertical}select:focus-visible,textarea:focus-visible{outline:3px solid var(--green);outline-offset:3px}.calendar-heading{margin-bottom:16px}.calendar-heading h2{margin-bottom:4px}.calendar-heading .note{margin:0}.calendar-heading .primary{white-space:nowrap}.month-controls h3{margin:0;text-transform:capitalize;}.month-controls button{padding:7px 15px;}.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.calendar-weekdays{margin:18px 0 8px;text-align:center;color:var(--muted)}.calendar-day{border:1px solid transparent;background:none;color:var(--ink);border-radius:11px;min-height:46px;padding:7px 2px;position:relative}.calendar-day.today{border-color:var(--green);font-weight:700}.calendar-day.selected{background:var(--green);color:var(--on-green)}.calendar-day.has-events:after{content:'';position:absolute;width:5px;height:5px;border-radius:50%;background:var(--green);bottom:4px;left:calc(50% - 2.5px)}.calendar-day.selected:after{background:var(--on-green)}.calendar-bottom{margin-top:14px}.calendar-bottom .note{text-align:right}.event-card{display:flex;gap:14px;width:100%;text-align:left;border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:17px;padding:17px;margin:10px 0}.event-card .event-time{flex-shrink:0;color:var(--green);font-weight:700;min-width:48px}.event-card .event-time small{display:block;margin-top:5px;color:var(--muted);font-weight:400}.event-card strong{display:block;overflow-wrap:anywhere}.event-card .event-info{min-width:0}.event-card .event-info small{display:block;color:var(--muted);margin-top:6px;line-height:1.4;overflow-wrap:anywhere}.event-card .event-notes{white-space:pre-wrap}.event-dates{display:grid;grid-template-columns:1fr;gap:14px;margin-top:16px}#eventForm>label{margin-top:16px}#eventDialog{max-height:90dvh;overflow:auto;max-width:480px}#eventForm .row h2{}#eventForm .actions{align-items:center}.form-error{color:var(--danger);line-height:1.5}.subscription-open{display:block;text-decoration:none;text-align:center}#subscriptionUrl{}#subscriptionDialog{max-height:90dvh;overflow:auto}#subscriptionDialog h2{}.event-count{color:var(--muted)}
@media(max-width:600px){nav{gap:0;justify-content:space-between}nav button{}.calendar-panel{padding:16px}.calendar-heading h2{}.calendar-heading .primary{padding:11px 13px;}.calendar-heading .note{}.calendar-bottom{align-items:flex-start;gap:8px}.calendar-bottom .note{max-width:130px;margin:8px 0 0}.event-card{padding:14px;gap:10px}.calendar-day{min-height:42px}}

.dev-badge{font-weight:700;background:var(--green);color:var(--on-green);padding:4px 6px;border-radius:6px;vertical-align:middle;}.dev-notice{line-height:1.5;color:var(--muted);border-left:3px solid var(--green);padding:9px 12px;margin:10px 0 16px;background:var(--progress);border-radius:0 8px 8px 0}.dev-subscription-note{border-left:2px solid var(--green);padding-left:10px}
/* Three primary destinations; less frequent actions live in context. */
header{gap:12px}.header-actions{display:flex;align-items:center;gap:8px;min-width:0;max-width:56%}.header-actions .parent-switch{max-width:calc(100% - 48px);margin:0}.settings-button{width:40px;height:40px;display:grid;place-items:center;flex-shrink:0;border:1px solid var(--line);background:var(--paper);color:var(--muted);border-radius:12px;padding:0}.settings-button[aria-pressed=true]{background:var(--progress);color:var(--green);border-color:var(--green)}nav{gap:0;background:var(--segmented);padding:5px;border:0;border-radius:15px;margin:22px 0}nav button{flex:1;min-height:43px;padding:10px 12px;border-radius:11px;font-weight:600}nav button.active{background:var(--paper);color:var(--green);box-shadow:0 2px 6px #20354f0d}nav button.active:after{display:none}.section-heading{margin:20px 0 12px;align-items:center}.section-heading h2{margin:0}.section-heading .textbutton{padding:9px 0;white-space:nowrap}.today-plan{margin:0 0 22px}.next-plan{display:flex;align-items:center;gap:13px;padding:17px 18px;width:100%;background:var(--progress);border:1px solid var(--line);border-radius:18px;text-align:left;color:var(--ink)}.next-plan-icon{width:38px;height:38px;flex-shrink:0;border-radius:12px;background:var(--paper);display:grid;place-items:center;color:var(--green);}.next-plan-info{min-width:0;flex:1}.next-plan-info small{display:block;color:var(--muted);line-height:1.5;margin-bottom:4px}.next-plan-info strong{display:block;overflow-wrap:anywhere;font-weight:600}.next-plan-info>span{display:block;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.next-plan-arrow{color:var(--green);flex-shrink:0}.no-plans{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);padding:9px 0;border-bottom:1px solid var(--line)}.no-plans button{white-space:nowrap}.plan-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:20px}.plan-tools button{padding:8px 0;display:flex;align-items:center;gap:6px}.plan-tools button span{}.agenda-date{font-weight:600;color:var(--muted);text-transform:capitalize;margin:24px 0 10px}.agenda-date:first-child{margin-top:0}.empty-symbol{display:block;color:var(--green);margin-bottom:15px}.plan-empty{padding-top:30px;padding-bottom:30px}.back-button{padding:5px 0 14px}.subpage-title{margin:0 0 22px;outline:none}.dev-notice{padding:6px 10px;margin:9px 0 14px}.calendar-heading h2{}.calendar-heading .note{}.calendar-heading{margin-bottom:12px}.brand{white-space:nowrap}
@media(max-width:600px){nav{margin:16px 0 20px;padding:4px}nav button{min-height:42px;padding:9px 8px}.shell{padding-left:17px;padding-right:17px}.brand{}.header-actions{gap:6px;max-width:54%}.header-actions .parent-switch{padding:9px;max-width:calc(100% - 43px)}.settings-button{height:36px;width:36px}.section-heading{gap:8px}.section-heading h2{}.section-heading .textbutton{}.next-plan{padding:14px;gap:11px}.next-plan-info strong{}.next-plan-icon{height:34px;width:34px}.calendar-heading h2{}.today-plan{margin-bottom:18px}.subpage-title{}}
#eventDetailsDialog{max-width:460px;max-height:90dvh;overflow:auto}#eventDetailsTitle{line-height:1.2;margin:14px 0 20px;overflow-wrap:anywhere}.event-detail-time{background:var(--progress);border-radius:15px;padding:17px;margin-bottom:18px}.event-detail-time small{display:block;color:var(--muted);text-transform:capitalize}.event-detail-time strong{display:block;margin:8px 0;overflow-wrap:anywhere}.event-detail-time>span{color:var(--muted)}.event-detail-row{margin:17px 0}.event-detail-row>small{color:var(--muted);}.event-detail-row p{margin:6px 0;overflow-wrap:anywhere}.event-detail-notes{white-space:pre-wrap}.event-detail-actions{padding-top:8px;align-items:center;gap:14px}.event-detail-actions .textbutton{}#quickTimeForm{margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}#quickTimeForm h3{margin:0}.history-day.selected{outline:2px solid var(--green);outline-offset:2px;background:var(--progress)}.history-hint{margin:12px 0}.history-detail-heading{margin:22px 0 12px}#historyDetails{scroll-margin-top:18px}#historyDayEvents .event-card:last-child{margin-bottom:0}#historyDetails>summary{text-transform:capitalize}#historyDetails .empty{padding:20px 14px}#historyDetails .progress{padding:15px}.event-detail-time strong{font-variant-numeric:tabular-nums}
@media(max-width:500px){#eventDetailsTitle{}.event-detail-time strong{}.event-detail-actions{gap:12px}.event-detail-actions .primary{padding:12px 15px}}

/* Keep primary actions visible while only the event fields scroll. */
.plans-toolbar{position:sticky;top:0;z-index:2;background:var(--background);padding:12px 0 1px}.plans-toolbar .plan-tools{margin-bottom:14px}.plans-toolbar .calendar-heading{gap:10px}
#eventDialog{padding:0;overflow:hidden;max-height:90dvh}#eventForm{display:flex;flex-direction:column;max-height:90dvh}.event-form-header{padding:18px 22px 12px;flex-shrink:0;border-bottom:1px solid var(--line)}.event-form-header h2{margin:0}.event-form-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:8px 22px 16px}.event-form-scroll>label{margin-top:16px}#eventForm .dialog-footer{margin:0;padding:14px 22px max(14px,env(safe-area-inset-bottom));border-top:1px solid var(--line);flex-shrink:0;background:var(--paper)}.dialog-footer .primary{flex:1}.time-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}input[type=time]{font:inherit;font-variant-numeric:tabular-nums;width:100%;min-width:0;border:1px solid var(--input-border);border-radius:11px;padding:12px;background:var(--input);color:var(--ink)}.schedule-date-label{margin-top:16px}#eventDate,#quickEventDate,#eventEndDate,#quickEventEndDate{max-width:none}.cross-day-label{display:flex;align-items:center;gap:8px;font-weight:400;margin:14px 0}.attendance-fieldset{border:0;padding:0;margin:20px 0}.attendance-fieldset legend{font-weight:600;margin-bottom:10px}.attendance-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.attendance-options label{position:relative;margin:0;font-weight:500}.attendance-options input{position:absolute;opacity:0;width:1px;height:1px}.attendance-options span{display:block;border:1px solid var(--line);background:var(--secondary);border-radius:11px;padding:13px 8px;text-align:center;}.attendance-options input:checked+span{background:var(--progress);border-color:var(--green);color:var(--green);font-weight:600}.attendance-options input:focus-visible+span{outline:3px solid var(--green);outline-offset:2px}
@media(max-width:500px){.plans-toolbar .calendar-heading .primary{padding:12px}.event-form-header{padding:16px 18px 12px}.event-form-scroll{padding:6px 18px 14px}#eventForm .dialog-footer{padding-left:18px;padding-right:18px}.dialog-footer .textbutton{}}

.time-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:56px;border:1px solid var(--input-border);border-radius:12px;padding:12px 14px;background:var(--input);color:var(--ink);font-variant-numeric:tabular-nums;text-align:left}.time-trigger-icon{color:var(--muted)}#timeWheelDialog{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:480px;max-height:95dvh;border-radius:24px 24px 0 0;padding:0;overflow-y:auto;box-shadow:0 -12px 50px var(--shadow)}.time-sheet-header{padding:22px 24px 8px}.time-sheet-header h2{margin:0;}.time-sheet-header p{margin:7px 0 0;text-transform:capitalize}.time-wheel-headings{display:grid;grid-template-columns:1fr 1fr;gap:24px;text-align:center;color:var(--muted);padding:10px 36px}.time-wheels{position:relative;display:flex;align-items:center;padding:0 36px;gap:18px}.time-wheel{height:220px;flex:1;min-width:0;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;padding:88px 0;scrollbar-width:none;touch-action:pan-y;-webkit-overflow-scrolling:touch;mask-image:linear-gradient(transparent,#000 25%,#000 75%,transparent);position:relative;z-index:1}.time-wheel::-webkit-scrollbar{display:none}.wheel-option{height:44px;line-height:44px;text-align:center;scroll-snap-align:center;color:var(--muted);font-variant-numeric:tabular-nums;cursor:pointer;user-select:none}.wheel-option[aria-selected=true]{color:var(--ink);font-weight:600;}.wheel-selection{position:absolute;left:24px;right:24px;top:88px;height:44px;background:var(--progress);border-radius:12px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);pointer-events:none}.wheel-colon{color:var(--ink);font-weight:600}.time-sheet-note{text-align:center;color:var(--muted);margin:15px 0}.time-sheet-actions{display:flex;gap:12px;padding:16px 24px max(20px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper);position:sticky;bottom:0}.time-sheet-actions button{flex:1;min-height:48px}@media(prefers-reduced-motion:reduce){.time-wheel{scroll-behavior:auto}}

/* Shared type scale: screen titles, section titles, body, supporting text. */
:root{--font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--text-body:16px;--text-action:14px;--text-note:13px;--text-small:12px;--text-section:20px;--text-title:24px;--text-time:24px;--wheel-row:44px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{font-family:var(--font-ui);font-size:var(--text-body);line-height:1.45}button,input,select,textarea{font-family:inherit}button{line-height:1.35}input,select,textarea{font-size:var(--text-body);line-height:1.4}h1,h2,h3{line-height:1.25;font-weight:600;letter-spacing:-.35px;overflow-wrap:anywhere}h1{font-size:32px}h2{font-size:var(--text-section)}h3{font-size:var(--text-body)}strong,b{font-weight:600}.brand{font-size:18px;letter-spacing:-.35px}.tag{font-size:var(--text-small);letter-spacing:.8px;line-height:1.4}.dev-badge{font-size:10px;letter-spacing:.5px}.dev-notice,.foot{font-size:var(--text-small)}.note,.muted,small{font-size:var(--text-note);line-height:1.5}.primary,.secondary,.textbutton,.parent-switch,.people button,.theme-options button,nav button{font-size:var(--text-action)}.primary,.secondary{min-height:44px}.textbutton{min-height:40px}.header-actions .parent-switch{font-size:var(--text-action)}nav button{font-size:var(--text-action);min-height:44px}
.calendar-heading h2,.subpage-title,#history>.row h2,#eventForm .row h2,#eventDetailsTitle,#subscriptionDialog h2,.time-sheet-header h2{font-size:var(--text-title)}.section-heading h2,.panel h2,.empty h2,#quickTimeForm h3{font-size:var(--text-section)}.section-heading .textbutton,.plan-tools button,.back-button,.routine button,.event-detail-actions .textbutton,.dialog-footer .textbutton{font-size:var(--text-action)}.calendar-heading .note,.calendar-bottom .note,.calendar-weekdays,.task small,.event-card .event-info small,.event-card .event-time small,.next-plan-info small,.next-plan-info>span,.no-plans,.no-plans button,.history-routine small,.event-detail-row>small,.event-detail-time small,.event-detail-time>span,.event-count,.agenda-date,.time-sheet-note{font-size:var(--text-note)}.task strong,.event-card strong,.next-plan-info strong,.routine strong,.history-routine strong,.event-detail-row p{font-size:var(--text-body);line-height:1.4}.month-controls h3,#selectedDayLabel,.history-detail-heading{font-size:var(--text-body)}.calendar-day,.history-day strong{font-size:var(--text-body)}.history-day small,.history-day span{font-size:10px}.event-card .event-time{font-size:var(--text-body)}.event-detail-time strong,.time-trigger{font-size:var(--text-time);line-height:1.25;font-variant-numeric:tabular-nums}.form-error{font-size:var(--text-action)}label,.attendance-fieldset legend,.attendance-options span{font-size:var(--text-action)}.cross-day-label{font-size:var(--text-note)}summary{font-size:var(--text-body)}#subscriptionUrl{font-size:var(--text-note)}
/* Icons keep their own sizes, independent of text. */
.month-controls button{font-size:24px;min-width:44px;line-height:1}.plan-tools button span{font-size:18px}.next-plan-icon{font-size:22px}.next-plan-arrow{font-size:26px}.empty-symbol{font-size:32px}.time-trigger-icon{font-size:20px}
/* Balanced wheel sheet: safe screen margins, aligned columns, stable numerals. */
#timeWheelDialog{inset:auto 0 max(12px,env(safe-area-inset-bottom));margin:0 auto;width:calc(100% - 24px);max-width:440px;max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)) - 12px);border-radius:24px;overflow-x:hidden;overflow-y:auto;padding:0}
.time-sheet-header{padding:20px 20px 8px}.time-sheet-header p{margin:6px 0 0}.time-wheel-headings,.time-wheels{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:0;padding-left:24px;padding-right:24px}.time-wheel-headings{padding-top:8px;padding-bottom:8px;font-size:var(--text-note)}.time-wheels{--wheel-height:clamp(132px,32dvh,220px);height:var(--wheel-height);align-items:center}.time-wheel{height:var(--wheel-height);width:100%;padding:calc((var(--wheel-height) - var(--wheel-row))/2) 0;scroll-padding:0;min-width:0}.wheel-option,.wheel-option[aria-selected=true]{height:var(--wheel-row);line-height:var(--wheel-row);font-size:28px;font-weight:500;letter-spacing:0}.wheel-option[aria-selected=true]{font-weight:600}.wheel-selection{left:20px;right:20px;top:50%;height:var(--wheel-row);transform:translateY(-50%)}.wheel-colon{text-align:center;font-size:24px;line-height:1;z-index:1}.time-sheet-note{margin:12px 0}.time-sheet-actions{padding:14px 20px;gap:12px}.time-sheet-actions button{font-size:var(--text-action);min-height:48px}
@media(max-width:600px){.shell{padding-bottom:calc(28px + env(safe-area-inset-bottom))}.calendar-heading{align-items:flex-start;flex-wrap:wrap}.plans-toolbar .calendar-heading .primary{font-size:var(--text-action);padding:12px 14px}.calendar-heading>div{flex:1 1 140px}.calendar-heading>.primary{flex:0 0 auto}.section-heading{flex-wrap:wrap;gap:4px 12px}.section-heading .textbutton{white-space:normal}.calendar-bottom{align-items:center;flex-wrap:wrap}.calendar-bottom .note{max-width:none;margin:0}#history .theme-options button{font-size:var(--text-action)}#history>.row{flex-wrap:wrap;align-items:center;gap:8px}.event-form-header{gap:8px}.event-form-header .textbutton{flex-shrink:0}.event-detail-actions{align-items:stretch}.event-detail-actions .primary{flex:1}.header-actions{max-width:55%}.header-actions .parent-switch{font-size:var(--text-note)}}
@media(max-width:360px){.brand{font-size:16px}.calendar-heading>.primary{width:100%}.plan-tools{gap:8px}.plan-tools button{font-size:var(--text-note)}.history-grid{gap:3px}.history-day strong{font-size:14px}}
@media(max-height:420px){.time-sheet-header{padding:12px 20px 4px}.time-sheet-header h2{font-size:var(--text-section)}.time-sheet-header p{margin-top:3px}.time-sheet-note{display:none}.time-wheel-headings{padding-top:4px;padding-bottom:4px}.time-sheet-actions{padding:8px 20px}.time-sheet-actions button{min-height:44px}}

/* Surface depth comes from the theme, without changing layout. */
.panel,.task,.event-card{box-shadow:var(--card-shadow)}nav button.active,.people button.active{box-shadow:var(--active-shadow)}.next-plan{background:var(--featured-surface);border-color:var(--featured-line);box-shadow:var(--card-shadow)}.event-detail-time{background:var(--featured-surface)}.time-trigger{box-shadow:inset 0 1px 0 #ffffff03}.wheel-selection{border-color:var(--featured-line)}
/* Compact event dialogs with one bounded scroll area and fixed actions. */
:root{--dialog-top-gap:max(12px,env(safe-area-inset-top));--dialog-bottom-gap:max(12px,env(safe-area-inset-bottom));--dialog-available-height:calc(100dvh - var(--dialog-top-gap) - var(--dialog-bottom-gap))}
#eventDialog,#eventDetailsDialog,#subscriptionDialog{position:fixed;inset:var(--dialog-top-gap) 0 var(--dialog-bottom-gap);margin:auto;width:calc(100% - 24px);max-width:440px;max-height:var(--dialog-available-height);border-radius:20px;overscroll-behavior:contain}
#eventDialog{height:min(720px,var(--dialog-available-height));padding:0;overflow:hidden}#eventForm{height:100%;max-height:100%;min-height:0}.event-form-header{padding:12px 16px;min-height:58px}.event-form-scroll{padding:0 16px 12px;flex:1;min-height:0;scroll-padding:12px}.event-form-scroll>label{margin-top:12px;margin-bottom:6px}#eventForm .row h2,#eventDetailsTitle{font-size:22px}#eventForm input[type=text],#eventForm input[type=date],#eventForm select,#eventForm textarea,#quickTimeForm input[type=date]{padding:10px 12px;font-size:16px}#eventForm input[type=text],#eventForm input[type=date],#eventForm select,#quickTimeForm input[type=date]{min-height:44px}#eventForm textarea{min-height:80px}.event-form-scroll .note{font-size:var(--text-small);margin:8px 0;line-height:1.45}.event-form-scroll .time-fields{margin-top:12px;gap:10px}.time-fields label{margin-bottom:6px}.time-trigger{min-height:48px;padding:10px 12px;font-size:22px}.event-form-scroll .cross-day-label{margin:10px 0}.attendance-fieldset{margin:14px 0}.attendance-fieldset legend{margin-bottom:8px}.attendance-options{gap:6px}.attendance-options span{padding:11px 8px;min-height:44px}#eventForm .dialog-footer{padding:10px 16px;gap:8px;min-height:66px}.dialog-footer .primary{min-height:44px}.dialog-footer .textbutton{min-height:44px}
#eventDetailsDialog,#subscriptionDialog{padding:18px;height:fit-content;overflow-y:auto}#eventDetailsTitle{margin:10px 0 14px}.event-detail-time{padding:14px;margin-bottom:14px}.event-detail-time strong{font-size:22px;margin:6px 0}.event-detail-row{margin:12px 0}.event-detail-row p{margin:4px 0}#quickTimeForm{margin-top:16px;padding-top:14px}#quickTimeForm .schedule-date-label{margin-top:12px}#quickTimeForm .time-fields{margin-top:12px}.event-detail-actions{gap:10px;padding-top:4px}.event-detail-actions .primary{padding:11px 14px}.event-detail-actions .textbutton{padding:11px 0}
@media(max-height:620px){#eventDialog{border-radius:16px}.event-form-header{min-height:52px;padding-top:8px;padding-bottom:8px}#eventForm .row h2{font-size:20px}#eventForm .dialog-footer{min-height:62px;padding-top:8px;padding-bottom:8px}.event-form-scroll>label{margin-top:10px}}

.accent-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.accent-options button{display:flex;align-items:center;gap:10px;padding:12px;font-size:var(--text-action);min-height:48px;border:1px solid var(--line);border-radius:12px;background:var(--secondary);color:var(--ink);text-align:left}.accent-options button[aria-pressed=true]{border-color:var(--green);background:var(--progress);color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}.accent-swatch{height:18px;width:18px;border-radius:50%;background:var(--swatch);flex-shrink:0;box-shadow:inset 0 0 0 1px #00000018}

/* Wheel gestures have one controlled inertia model, with no native snap jumps. */
.time-wheel{touch-action:none;scroll-snap-type:none;scroll-behavior:auto;overflow-anchor:none}.wheel-option{scroll-snap-align:none}.time-wheel:focus-visible{outline:2px solid var(--green);outline-offset:-2px;border-radius:12px}#eventFormHeading:focus,#eventDetailsTitle:focus{outline:none}

#timeWheelTitle:focus{outline:none}

#subscriptionHeading:focus{outline:none}

/* One form control geometry. The native date picker is an invisible hit area,
   so its intrinsic iOS content width never determines the layout. */
#eventDialog,#eventDetailsDialog{min-width:0;min-inline-size:0;overflow-x:hidden}#eventForm,.event-form-scroll,#quickTimeForm{min-width:0;max-width:100%;width:100%;box-sizing:border-box}.event-form-scroll{overflow-x:hidden}.event-form-scroll>*{min-inline-size:0;max-inline-size:100%}.event-form-header{display:grid;grid-template-columns:minmax(0,1fr) auto}.event-form-header h2{min-width:0}.time-fields>div{min-width:0}.attendance-fieldset{min-inline-size:0;width:100%}.attendance-options label{min-width:0}.attendance-options span{overflow-wrap:anywhere}
.date-control{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-width:0;max-width:100%;height:48px;padding:10px 12px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink);overflow:hidden;box-sizing:border-box}.date-display,.time-trigger{font-family:var(--font-ui);font-size:16px;font-weight:500;line-height:1.4;font-variant-numeric:tabular-nums}.date-display{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}.date-caret,.time-trigger-icon{color:var(--muted);font-size:18px;line-height:1}
#eventForm .date-control input[type=date],#quickTimeForm .date-control input[type=date]{position:absolute;inset:0;display:block;width:100%;inline-size:100%;min-width:0;min-inline-size:0;max-width:100%;max-inline-size:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;font-size:16px;box-sizing:border-box;cursor:pointer}.date-control:focus-within{outline:2px solid var(--green);outline-offset:2px}.time-trigger{height:48px;min-height:48px;max-width:100%;padding:10px 12px;box-sizing:border-box}
#eventForm input[type=text],#eventForm select,#quickTimeForm select{width:100%;max-width:100%;min-width:0;height:48px;font-size:16px;padding:10px 12px;box-sizing:border-box}#eventForm textarea{width:100%;max-width:100%;min-width:0;font-size:16px;box-sizing:border-box}.cross-day-label{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:10px;white-space:normal}.cross-day-label input{margin:0}.cross-day-label span{min-width:0;overflow-wrap:anywhere}
@media(max-width:340px){.time-fields{grid-template-columns:minmax(0,1fr)}.event-form-header{padding-left:12px;padding-right:12px}#eventForm .row h2{font-size:20px}.event-form-scroll{padding-left:12px;padding-right:12px}#eventForm .dialog-footer{padding-left:12px;padding-right:12px}.dialog-footer .primary{flex-basis:100%}.attendance-options{grid-template-columns:minmax(0,1fr)}}

.app-update{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);background:var(--paper);border-radius:16px;margin:12px 0;font-size:14px}
.app-update[hidden]{display:none}


.skeleton-card{display:flex;align-items:center;gap:16px;padding:18px;background:var(--paper);border:1px solid var(--line);border-radius:16px;margin-bottom:10px;min-height:86px}
.skeleton-progress{display:flex;align-items:center;gap:20px;background:var(--progress);border-radius:19px;padding:20px 22px;margin-bottom:20px}
.skeleton-lines{flex:1;min-width:0;display:grid;gap:12px;max-width:340px}
.skeleton-block{display:block;height:14px;width:90%;border-radius:7px;background:var(--line);animation:skeleton-pulse 1.8s ease-in-out infinite}
.skeleton-short{width:44%;height:12px}.skeleton-medium{width:65%;height:12px}
.skeleton-check{width:26px;height:26px;flex-shrink:0;border-radius:9px}.skeleton-icon{width:42px;height:42px;flex-shrink:0;border-radius:12px}
.skeleton-ring{width:56px;height:56px;flex-shrink:0;border-radius:50%}.skeleton-plan{min-height:112px;margin-bottom:22px;background:var(--featured-surface)}
@keyframes skeleton-pulse{50%{opacity:.45}}
@media(prefers-reduced-motion:reduce){.skeleton-block{animation:none}}

.child-brand{border:0;background:none;padding:0;text-align:left;display:flex;align-items:center;gap:7px;min-width:0;color:var(--ink)}.child-brand #childName{color:var(--ink);margin:0;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.child-chevron{font-size:13px}.child-profile h2{margin-top:10px}.child-profile-symbol{font-size:36px;color:var(--green)}.child-age{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}.age-stat{flex:1;min-width:120px;padding:14px;background:var(--progress);border-radius:14px}.age-stat strong,.age-stat small{display:block}.age-stat strong{font-size:20px;color:var(--ink);margin-top:5px}.age-stat small{color:var(--muted);font-size:13px}.child-profile details{margin-top:12px}.child-vaccine-heading{margin-top:28px;gap:12px}.child-vaccine-heading .note{margin:4px 0}.vaccine-filters{margin:12px 0 18px}.vaccination-card{padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--paper);margin:12px 0}.vaccination-card h3{margin:10px 0 5px;font-size:18px}.vaccination-card .actions{flex-wrap:wrap;margin-top:12px}.vaccination-card .note{margin:5px 0;white-space:pre-wrap;overflow-wrap:anywhere}.vaccine-status{font-size:12px;padding:5px 9px;border-radius:8px;background:var(--progress);color:var(--green)}#childProfileForm input,#vaccinationForm input,#vaccinationForm select,#vaccinationForm textarea{width:100%;min-width:0;max-width:100%;font-size:16px}#childProfileForm input[type=date],#vaccinationForm input[type=date]{display:block;min-height:48px;-webkit-appearance:none;appearance:none;text-align:left}#vaccinationDialog{width:min(560px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:18px;overflow:hidden}#vaccinationForm{display:flex;flex-direction:column;max-height:calc(100dvh - 72px - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:0}#vaccinationForm .event-form-scroll{overflow-y:auto;min-height:0}#vaccinationForm .dialog-footer{flex-shrink:0}#vaccinationDialog h2{font-size:20px}@media(max-width:360px){.child-brand #childName{max-width:90px}.child-vaccine-heading{align-items:flex-start}.child-vaccine-heading .primary{font-size:14px;padding:10px}}

.child-brand>span{margin:0}.child-brand{gap:5px;flex:1}.child-brand #childName{max-width:110px}#childProfileForm .date-control input,#vaccinationForm .date-control input{opacity:0;position:absolute;inset:0;width:100%;height:100%;min-width:0;cursor:pointer}#vaccinationPlannedDate:disabled{cursor:default}

/* Child avatar and a single compact type/spacing scale for the vaccination sheet. */
.child-avatar{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;border-radius:50%;background:var(--segmented);color:var(--muted);overflow:hidden}.child-avatar svg{width:18px;height:18px}.child-avatar img,#profileChildAvatar img{width:100%;height:100%;object-fit:cover;display:block}.profile-avatar{width:64px;height:64px;flex-basis:64px;position:relative;overflow:visible;border:1px solid var(--line);padding:0}.profile-avatar #profileChildAvatar{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;overflow:hidden}.profile-avatar svg{width:30px;height:30px}.photo-edit-badge{position:absolute;bottom:-2px;right:-2px;display:grid;place-items:center;background:var(--paper);border:1px solid var(--line);color:var(--ink);width:22px;height:22px;border-radius:50%;font-size:15px}.photo-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}.photo-actions .note{flex-basis:100%;margin:0}.child-brand{font-size:16px}.child-brand #childName{max-width:100px}
#vaccinationDialog{padding:0;height:min(700px,calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));border-radius:22px}#vaccinationForm{height:100%;max-height:100%;min-width:0}#vaccinationForm .event-form-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:14px 16px;min-height:60px;flex-shrink:0}#vaccinationHeading{font-size:20px;line-height:1.25;margin:0;font-weight:600}#vaccinationForm .event-form-scroll{flex:1;padding:4px 16px 16px}#vaccinationForm label{display:block;font-size:14px;line-height:1.4;font-weight:500;margin:12px 0 6px}#vaccinationForm input:not([type=date]),#vaccinationForm select{display:block;height:48px;margin:0;padding:10px 12px;font-size:16px;line-height:24px;border-radius:12px;box-sizing:border-box}#vaccinationForm select{appearance:none;-webkit-appearance:none;background:var(--input);color:var(--ink);border:1px solid var(--input-border);padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818b99' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;white-space:nowrap;text-overflow:ellipsis}#vaccinationForm .date-control{height:48px;padding:10px 12px}#vaccinationForm .date-display{font-size:16px;line-height:24px;font-weight:400}#vaccinationForm textarea{padding:10px 12px;font-size:16px;line-height:24px;min-height:88px;border-radius:12px;resize:vertical}#vaccinationForm .note{font-size:13px;line-height:1.45;margin:8px 0}#vaccinationForm .dialog-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));margin:0;gap:12px;border-top:1px solid var(--line);background:var(--paper)}#vaccinationForm button{font-size:14px}#vaccinationForm .dialog-footer .primary{flex:1;min-height:44px}#vaccinationForm .date-control input{opacity:0;position:absolute;inset:0;width:100%;height:100%}#vaccinationOtherRow[hidden]{display:none}@media(max-width:360px){.child-brand #childName{max-width:75px}.child-brand .dev-badge{font-size:9px}#vaccinationForm .event-form-header,#vaccinationForm .dialog-footer{padding-left:12px;padding-right:12px}#vaccinationForm .event-form-scroll{padding-left:12px;padding-right:12px}}
.child-brand .child-avatar{color:var(--muted)}

/* Profile edit fields use their own spacing; native input defaults never affect layout. */
#childProfileEdit{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}#childProfileEdit>summary{font-size:16px;line-height:24px;font-weight:600;padding:0;margin:0;min-height:24px}#childProfileForm{display:grid;gap:18px;margin:18px 0 0;padding:0;min-width:0}.profile-field{display:grid;gap:6px;min-width:0}#childProfileForm label{display:block;font-size:14px;line-height:20px;font-weight:500;margin:0;color:var(--ink)}#childProfileForm .optional-field{font-size:13px;font-weight:400;color:var(--muted)}#childProfileInput,#childProfileForm .date-control{width:100%;height:48px;min-height:48px;box-sizing:border-box;margin:0;padding:10px 12px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink);font-size:16px;font-weight:400;line-height:26px;-webkit-appearance:none;appearance:none}#childProfileForm .date-display{font-size:16px;line-height:26px;font-weight:400;color:var(--ink)}#childProfileForm .date-control input[type=date]{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;font-size:16px}#childProfileForm .profile-field-help{font-size:13px;line-height:19px;color:var(--muted);margin:2px 0 0}#childProfileForm .primary{width:100%;margin:0;min-height:46px;font-size:14px;line-height:20px;padding:12px 16px}#childProfileForm .form-error{margin:0;font-size:13px;line-height:19px}.child-age .age-stat>small:first-child{min-height:38px;line-height:19px}.child-age .age-stat>strong{margin-top:6px;font-size:19px;line-height:26px}.child-age .age-stat>small:last-child{margin-top:6px;line-height:19px}#childPhotoStatus:empty{display:none}

.vaccine-event-label{color:var(--green);font-weight:500}.vaccination-followup{padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--paper);margin-bottom:16px}.vaccination-followup h3{font-size:18px;margin:12px 0 6px}.vaccination-followup p{margin:6px 0}.vaccination-followup .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.vaccination-followup .actions button{font-size:14px;min-height:44px}#vaccinationCompletionDialog{width:min(480px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:18px;overflow-y:auto}#vaccinationCompletionForm{display:grid;gap:16px;min-width:0}#vaccinationCompletionHeading{font-size:20px;line-height:1.25;margin:0}#vaccinationCompletionForm .row{gap:12px;align-items:center}#vaccinationCompletionForm label{font-size:14px;font-weight:500;line-height:20px;margin:0}#vaccinationCompletionForm input[type=text],#vaccinationCompletionForm .date-control{width:100%;height:48px;min-height:48px;font-size:16px;line-height:24px;padding:10px 12px;margin:0;box-sizing:border-box;background:var(--input);color:var(--ink);border:1px solid var(--input-border);border-radius:12px}#vaccinationCompletionForm .date-control input{opacity:0;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0}#vaccinationCompletionForm .date-display{font-size:16px}#vaccinationCompletionForm .note{margin:0}#eventVaccinationFields input,#eventVaccinationFields select{width:100%;min-width:0;font-size:16px}#eventVaccinationFields[hidden],#eventVaccineOtherRow[hidden],#eventTitleRow[hidden]{display:none}

.fact-time{color:var(--green);font-size:22px}.fact-time small{font-size:12px}#vaccinationFactDialog{width:min(480px,calc(100vw - 24px));max-width:calc(100vw - 24px);padding:18px;max-height:calc(100dvh - 40px);overflow-y:auto}#vaccinationFactHeading{font-size:20px;line-height:1.25;margin:0}#vaccinationFactDialog>.row{gap:10px;margin-bottom:20px}#vaccinationFactInfo h3{font-size:20px;line-height:1.3;margin:12px 0 8px}#vaccinationFactInfo p{font-size:16px;line-height:1.45;overflow-wrap:anywhere}#vaccinationFactDialog>.primary{width:100%;margin-top:16px}#openExistingVaccination{margin-top:10px}

.calendar-group-heading{font-size:13px;font-weight:600;line-height:20px;color:var(--muted);margin:18px 0 8px}#eventHasTimeRow{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:10px;font-size:14px;margin:12px 0}#eventHasTimeRow[hidden],#eventTimingFields[hidden],#vaccinationTimeRow[hidden],#vaccinationCompletionTimeRow[hidden],#vaccinationTimeSection[hidden]{display:none}#vaccinationForm .cross-day-label,#vaccinationCompletionForm .cross-day-label{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:10px;font-size:14px;line-height:20px}#vaccinationForm .cross-day-label input,#vaccinationCompletionForm .cross-day-label input,#eventHasTime{width:18px;height:18px;min-height:18px;margin:0;padding:0;appearance:auto;-webkit-appearance:checkbox}#vaccinationForm .time-trigger,#vaccinationCompletionForm .time-trigger{font-size:16px;height:48px;min-height:48px;padding:10px 12px}#vaccinationTimeSection{margin:12px 0}#vaccinationTimeSection .time-trigger{margin-top:8px}

#taskForm{display:grid;gap:12px}#taskForm>label{margin:4px 0 -6px;font-size:14px;font-weight:500}#taskForm input:not([type=checkbox]),#taskForm select{width:100%;min-width:0;box-sizing:border-box;margin:0;padding:10px 12px;height:48px;font:inherit;font-size:16px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink)}#taskAdvanced{padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}#taskAdvanced>summary{font-size:14px;font-weight:500;cursor:pointer}.routine-fields{display:grid;gap:16px;padding-top:16px}.routine-fields label,#taskIntervalRow label{display:block;font-size:14px;line-height:20px;margin:0 0 6px}#taskForm .note{font-size:13px;line-height:19px;margin:6px 0 0}#taskForm [hidden]{display:none}#taskForm .primary{margin:0;min-height:46px}#taskForm #cancelEdit{margin:0!important}.routine small{line-height:1.5} .routine.row{gap:12px;align-items:flex-start}.routine.row>div:first-child{min-width:0;overflow-wrap:anywhere}@media(max-width:420px){.routine.row{flex-direction:column}.routine .actions{align-self:flex-end}}
.routine-kind{display:block;color:var(--muted);font-size:12px;line-height:18px;margin-top:3px}

#taskNewKindRow{margin-top:12px}#routineCategoryForm input{height:48px;width:100%;box-sizing:border-box;font-size:16px;padding:10px 12px;background:var(--input);color:var(--ink);border:1px solid var(--input-border);border-radius:12px}#routineCategoriesSettings>summary{font-size:16px}#routineCategoryList .routine{padding:12px 0;border-bottom:1px solid var(--line)}

.routine-filter{display:flex;align-items:center;gap:10px;margin:0 0 16px;min-width:0}.routine-filter label{font-size:13px;color:var(--muted);margin:0}.routine-filter select{min-width:0;max-width:100%;flex:1;height:44px;box-sizing:border-box;padding:8px 12px;font-size:16px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink)}.routine-filter button{font-size:13px;padding:8px 0;min-height:44px;flex-shrink:0}@media(max-width:360px){.routine-filter{flex-wrap:wrap}.routine-filter select{flex-basis:65%}}

#routineCategoryArchive{margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}#routineCategoryArchive>summary{font-size:14px;color:var(--muted)}#routineCategoryArchiveList .routine{padding:12px 0;border-bottom:1px solid var(--line)}

#taskForm .date-control{height:48px;min-height:48px;padding:10px 12px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink);box-sizing:border-box;font-size:16px;line-height:26px}#taskForm .date-control input[type=date]{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;padding:0;border:0;cursor:pointer}#taskForm .date-display{font-size:16px;line-height:26px}#clearTaskEnd{font-size:13px;margin-top:4px}#categoryEditForm{display:grid;gap:16px}#categoryEditForm h2{font-size:20px;margin:0}#categoryEditForm label{font-size:14px;margin:0 0 -10px}#categoryEditName{margin:0;width:100%;height:48px;box-sizing:border-box;font-size:16px;padding:10px 12px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink)}#categoryEditForm .primary{margin:0;min-height:46px}
/* Baby journal and growth: compact entry points, detail on demand. */
.baby-quick{padding:16px!important;margin-bottom:18px}.baby-quick .tag{font-size:11px}.baby-quick .note{margin:7px 0 12px;font-size:13px}.baby-quick-actions,.journal-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.baby-quick-actions button{min-height:44px;font-size:14px}.today-journal{margin-top:12px;border-top:1px solid var(--line)}.journal-row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:14px 0;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink)}.journal-row>span:nth-child(2){flex:1;min-width:0}.journal-row strong{display:block;font-size:15px;line-height:22px;font-weight:600}.journal-row small,.journal-note{display:block;color:var(--muted);font-size:12px;line-height:18px;margin-top:3px;overflow-wrap:anywhere}.journal-note{white-space:pre-wrap;max-height:56px;overflow:hidden}.journal-symbol{width:32px;height:32px;flex-shrink:0;border-radius:10px;background:var(--progress);color:var(--green);display:grid;place-items:center;font-size:20px}.history-edit-heading{align-items:center;gap:10px}.history-edit-heading h3{margin:22px 0 12px}.history-edit-heading button{font-size:13px;min-height:44px}#historyEditHint{font-size:13px;line-height:19px}#childGrowthPanel,#childJournalPanel{scroll-margin-top:16px}#childGrowthPanel>summary,#childJournalPanel>summary{font-size:17px;line-height:24px}.growth-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}.growth-stats div{min-width:0;border-radius:13px;background:var(--progress);padding:12px 9px}.growth-stats small{display:block;font-size:11px;line-height:16px;color:var(--muted)}.growth-stats strong{display:block;font-size:18px;line-height:26px;margin:4px 0;white-space:nowrap}.growth-tabs{display:flex;padding:4px;gap:4px;background:var(--segmented);border-radius:12px;margin:10px 0}.growth-tabs button{flex:1;min-width:0;min-height:42px;background:transparent;border:0;border-radius:9px;font-size:14px;color:var(--muted);padding:8px}.growth-tabs button[aria-pressed=true]{background:var(--paper);color:var(--green);box-shadow:0 2px 5px var(--shadow)}.growth-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 2px;font-size:13px;color:var(--muted)}.growth-toolbar select{min-width:0;max-width:160px;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);padding:6px 9px;font-size:14px}.growth-chart{margin:0 -14px}.growth-chart svg{display:block;width:100%;height:auto;overflow:visible}.growth-chart text{font-size:12px;fill:var(--muted);font-family:inherit}.growth-grid{stroke:var(--line);stroke-width:1}.growth-reference-line{fill:none;stroke:var(--green);stroke-width:1;opacity:.2}.growth-reference-line.median{stroke-width:1.6;opacity:.6;stroke-dasharray:4 4}.growth-personal-line{fill:none;stroke:var(--green);stroke-width:3;stroke-linejoin:round;stroke-linecap:round}.growth-dot{fill:var(--green);stroke:var(--paper);stroke-width:2.5}.growth-chart g[role=button]{cursor:pointer}.growth-chart g[role=button]:focus .growth-dot{stroke:var(--ink);stroke-width:3}.growth-point{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px;margin:8px 0 12px;padding:10px 12px;background:var(--progress);border-radius:12px}.growth-point:empty{display:none}.growth-point strong{font-size:19px}.growth-point>span{grid-column:1 / -1;grid-row:2;font-size:12px;color:var(--muted)}.growth-point button{grid-column:2;grid-row:1;margin:0;padding:0;min-height:40px;font-size:13px}.growth-legend{display:flex;flex-wrap:wrap;gap:8px 14px;font-size:11px;line-height:17px;color:var(--muted)}.legend-personal:before,.legend-band:before{content:'';display:inline-block;width:14px;height:5px;background:var(--green);border-radius:3px;margin:0 5px 2px 0}.legend-band:before{height:11px;opacity:.2}.growth-reference{font-size:13px;margin:14px 0}.growth-reference p{font-size:12px;line-height:19px}.growth-reference a{color:var(--green)}#growthBasis{font-size:12px;line-height:19px}#growthBasis button{font-size:12px}.journal-actions{margin:16px 0 8px}#childProfileForm select{width:100%;height:48px;box-sizing:border-box;font-size:16px;margin:0;padding:10px 12px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink)}
#journalDialog{width:min(480px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow-y:auto;padding:18px}#journalForm{display:grid;gap:17px;min-width:0}#journalHeading{font-size:20px;line-height:26px;margin:0}#journalForm .row{gap:10px}#journalForm button{font-size:14px;min-height:44px}#journalForm .primary{flex:1}.journal-field{display:grid;gap:6px;min-width:0}#journalForm label{font-size:14px;line-height:20px;margin:0;font-weight:500}#journalForm input,#journalForm select,#journalForm textarea,#journalForm .date-control{width:100%;min-width:0;height:48px;min-height:48px;box-sizing:border-box;margin:0;padding:10px 12px;font-size:16px;line-height:26px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink)}#journalForm .date-control input{position:absolute;inset:0;opacity:0;width:100%;height:100%;border:0;margin:0;padding:0}#journalForm .date-display{font-size:16px;line-height:26px}#journalForm textarea{height:auto;min-height:90px;margin-top:10px}#entryNoteDetails>summary{font-size:14px;font-weight:500}.measure-input{display:flex;align-items:center;gap:10px}.measure-input input{flex:1}.measure-input #entryUnit{width:80px;flex-shrink:0}#entryCm{font-size:14px;color:var(--muted)}.journal-date-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,110px);gap:12px}#journalForm [hidden]{display:none}#journalForm .form-error{margin:0;font-size:13px;line-height:19px}@media(max-width:360px){.growth-stats{gap:6px}.growth-stats strong{font-size:16px}.growth-stats div{padding:10px 6px}.journal-date-grid{grid-template-columns:minmax(0,1fr)}.baby-quick-actions{gap:8px}.baby-quick-actions button{font-size:13px}}

#historyExtraMarks{margin:14px 0;font-size:13px}#historyExtraTask{width:100%;height:44px;margin:6px 0 10px;font-size:16px;background:var(--input);color:var(--ink);border:1px solid var(--input-border);border-radius:10px;padding:8px 10px}

.today-journal>summary{font-size:12px;font-weight:500;color:var(--muted);padding:10px 0 0}.growth-chart .growth-percentile{font-size:11px}

#journalHeading:focus{outline:none}#journalForm .date-control{overflow:hidden}#journalForm .journal-time-control{justify-content:center;padding-left:6px;padding-right:6px}.growth-chart{touch-action:pan-y pinch-zoom;user-select:none}.growth-navigation{display:flex;align-items:center;justify-content:flex-end;gap:2px;color:var(--muted);font-size:12px;white-space:nowrap}.growth-navigation button{min-width:44px;min-height:44px;font-size:25px}.growth-navigation button:disabled{opacity:.3}#growthPanHint{font-size:11px;text-align:center;margin:0 0 6px}

.growth-axis-title{display:block;color:var(--muted);font-size:11px;line-height:16px;margin:0}#growthLoadStatus:empty{display:none}.growth-toolbar select{width:126px;max-width:45%;flex-shrink:1}.growth-navigation button{padding:0;flex-shrink:0}

.journal-thumb{width:46px;height:46px;flex:0 0 46px;object-fit:cover;border-radius:10px;background:var(--progress)}.entry-photo-preview:empty,#entryPhotoStatus:empty{display:none}.entry-photo-preview img{display:block;width:100%;max-height:280px;object-fit:contain;border-radius:12px;background:var(--input)}.journal-photo-actions{display:flex;align-items:center;gap:16px;margin-top:10px}#entryPhotoStatus{font-size:12px;line-height:18px;margin:6px 0 0}
/* One add action and detail screens keep the daily view quiet. */
.shell{padding-bottom:calc(100px + env(safe-area-inset-bottom))}.global-add{position:fixed;right:max(20px,calc((100vw - 700px)/2));bottom:calc(22px + env(safe-area-inset-bottom));z-index:4;width:56px;height:56px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;font-size:34px;line-height:1;background:var(--green);color:var(--on-green);box-shadow:0 5px 20px var(--shadow)}
#addDialog{width:min(420px,calc(100vw - 24px));padding:18px}#addHeading{font-size:22px;margin:0;outline:none}.add-choices{display:grid;gap:8px;margin-top:18px}.add-choices button{display:block;text-align:left;width:100%;border:1px solid var(--line);border-radius:13px;background:var(--secondary);color:var(--ink);padding:13px 15px}.add-choices strong,.add-choices small{display:block}.add-choices strong{font-size:16px}.add-choices small{font-size:12px;color:var(--muted);margin-top:3px}
.baby-quick{padding:0!important;margin:0 0 16px}.journal-summary,.profile-link{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;background:transparent;border:0;border-bottom:1px solid var(--line);padding:12px 0;color:var(--ink);text-align:left}.journal-summary strong,.journal-summary small{display:block}.journal-summary strong{font-size:15px}.journal-summary small{font-size:12px;color:var(--muted);margin-top:4px}.profile-link{margin:0 0 20px;padding:16px;font-size:16px;border:1px solid var(--line);border-radius:15px;background:var(--paper)}
#todayJournal{display:none}#childGrowthPanel{margin:0;padding:14px;border-radius:16px}.dynamics-panel .growth-tabs{margin-top:0}.dynamics-panel .growth-reference,.measurement-history{border-top:1px solid var(--line);padding-top:12px;margin-top:16px;font-size:13px}.dynamics-panel .growth-reference summary,.measurement-history>summary{min-height:32px;font-weight:500}.dynamics-panel .growth-point{margin-bottom:4px}#dynamics>.row{align-items:baseline}#dynamics .subpage-title{margin-bottom:16px}#childJournalPanel{margin:0 0 18px}#childJournalPanel>summary{font-size:15px}#childGrowthPanel .growth-chart{margin-left:-10px;margin-right:-10px}.routine-slot-time{display:block;font-size:12px;color:var(--green);margin-top:5px}.routine-event-done{opacity:.75}.routine-event-done strong{text-decoration:line-through}.check-label{display:flex;align-items:center;gap:10px}.check-label input{width:18px!important;height:18px!important;min-height:18px!important;flex-shrink:0}.routine-calendar-options .check-label{margin:0;font-weight:500}#taskPlanTimeRow{margin-top:14px}#routineMoveForm{display:grid;gap:8px;margin-top:12px}#routineMoveForm label{font-size:14px;margin:0}#routineMoveForm input{height:48px;max-width:100%;font-size:16px}#routineMoveForm button{margin-top:6px}#routineMoveDetails{margin-top:18px;font-size:14px}#routineMoveDetails>summary{min-height:36px}.batch-measures{display:grid;gap:12px}#entryBatchFields>.note{font-size:12px;margin:0 0 12px}.today-events h3{font-size:14px;margin:0 0 8px}.today-events .event-card{padding:12px;margin:8px 0}.today-plan .next-plan{padding:12px;font-size:14px}
#addEvent,#dynamics>.row>[data-new-entry],#addMeasurement{display:none}#toast{bottom:calc(90px + env(safe-area-inset-bottom))}.global-add:focus-visible{outline-offset:4px}

/* Full screen editors: stable header, top aligned fields, independently scrolling body. */
html:has(.editor-dialog[open]){overflow:hidden}
#journalDialog.editor-dialog,#eventDialog.editor-dialog,#routineDialog.editor-dialog,#vaccinationDialog.editor-dialog,#activityDialog.editor-dialog,#familyMemberDialog.editor-dialog{position:fixed;inset:var(--editor-top,0px) 0 auto;margin:0 auto;width:100%;max-width:680px;height:var(--editor-height,100dvh);max-height:none;padding:0;border-radius:0;overflow:hidden;box-sizing:border-box}
.editor-dialog>form,#journalDialog #journalForm,#routineDialog #taskForm{display:flex;flex-direction:column;gap:0;height:100%;max-height:100%;min-height:0;margin:0}
.editor-header,.editor-dialog .event-form-header{display:flex;align-items:center;justify-content:space-between;flex:none;gap:12px;padding:calc(14px + env(safe-area-inset-top)) 18px 14px;border-bottom:1px solid var(--line);margin:0}
.editor-header h2{margin:0;font-size:22px;line-height:1.25}
.editor-header h2:focus{outline:none}
.editor-header button{flex:none}
.editor-scroll,.editor-dialog .event-form-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:20px;padding:18px;box-sizing:border-box}
#journalForm .editor-scroll{display:flex;flex-direction:column;gap:18px}
#taskForm .editor-scroll>label{display:block;margin:18px 0 6px}
#taskForm .editor-scroll>label:first-of-type{margin-top:14px}
#taskForm .editor-scroll>input,#taskForm .editor-scroll>select{width:100%}
.editor-footer,.editor-dialog .dialog-footer{flex:none;margin:0;padding:12px 18px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper)}
.editor-dialog input,.editor-dialog select,.editor-dialog textarea{font-size:16px;scroll-margin:20px}
.header-actions{max-width:62%;flex-shrink:0}.header-actions .parent-switch{max-width:104px;min-width:0}.child-brand #childName{max-width:110px}.today-plan-date{font-size:13px;color:var(--muted);margin:12px 0 5px}.today-plan .section-heading{margin-bottom:10px}
@media(max-width:380px){.header-actions{gap:4px}.header-actions .parent-switch{max-width:74px;padding:8px 6px}.child-brand #childName{max-width:76px}.child-brand{gap:4px}.dev-badge{padding:4px}.settings-button{width:34px;height:36px}.child-brand .child-avatar{width:28px;height:28px;flex-basis:28px}}

#eventForm .event-form-header,#vaccinationForm .event-form-header{padding-top:calc(14px + env(safe-area-inset-top))}#eventForm .dialog-footer{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
/* History: one journal, one day view, one compact overview. */
.history-segments{display:flex;padding:4px;background:var(--segmented);border-radius:14px;gap:4px;margin:16px 0 20px}.history-segments button{flex:1;border:0;border-radius:11px;padding:11px 8px;background:none;color:var(--muted);font-size:15px;font-weight:600}.history-segments button[aria-pressed=true]{background:var(--paper);color:var(--green);box-shadow:0 2px 8px #0000000a}
.journal-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:18px 0}.journal-filters select,.journal-filters .date-control{height:46px;font-size:14px;padding:10px 12px}.journal-filters .date-display{font-size:14px}.journal-filters #clearTimelineDay{grid-column:1/-1;justify-self:end;padding:0 4px;min-height:30px}
.timeline-day{font-size:14px;color:var(--muted);margin:25px 0 10px;font-weight:500;letter-spacing:0}.timeline-row{width:100%;display:flex;align-items:center;text-align:left;gap:12px;padding:16px 0;color:var(--ink);background:none;border:0;border-bottom:1px solid var(--line);border-radius:0}.timeline-copy{flex:1;min-width:0}.timeline-copy strong{font-size:14px;font-weight:500;line-height:1.4;display:block;overflow-wrap:anywhere}.timeline-copy small{font-size:12px;color:var(--muted);display:block;margin-top:4px;line-height:1.5}.timeline-note{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;font-size:12px;line-height:1.45;margin-top:4px}.timeline-symbol{flex:none;width:42px;height:42px;display:grid;place-items:center;background:var(--progress);color:var(--green);border-radius:14px}.timeline-symbol svg{width:19px;height:19px}.timeline-symbol.kind-stool{color:#a67a34;background:#b88a331a}.timeline-symbol.kind-routine{color:#8970bd;background:#8970bd1a}.timeline-thumb{width:56px;height:56px;border-radius:12px;object-fit:cover;background:var(--progress);flex:none}.timeline-arrow{color:var(--muted);font-size:22px}.record-status{padding:9px 13px;border-radius:10px;background:var(--progress);font-size:14px;color:var(--green);margin:0}
#timelineDialog.editor-dialog{position:fixed;inset:var(--editor-top,0px) 0 auto;margin:0 auto;width:100%;max-width:680px;height:var(--editor-height,100dvh);max-height:none;padding:0;border-radius:0;overflow:hidden}#timelineForm .editor-scroll{display:flex;flex-direction:column;gap:18px}#timelineForm textarea{width:100%;min-height:110px;padding:12px;resize:vertical}#timelineForm .editor-footer .primary{flex:1}.editor-dialog input[type=time],input[type=date]{font-size:16px}
.add-choices button{display:grid;grid-template-columns:50px minmax(0,1fr);column-gap:14px;align-items:center;text-align:left;padding:16px}.add-choices .add-symbol{grid-row:1/3;display:grid;place-items:center;width:50px;height:50px;border-radius:17px;background:var(--progress);color:var(--green)}.add-symbol svg{width:28px;height:28px}.add-choices strong{align-self:end;font-size:16px}.add-choices small{align-self:start;font-size:13px;line-height:1.4;margin-top:4px}.add-choices .add-stool{color:#a67a34;background:#b88a331a}.add-choices .add-routine{color:#8970bd;background:#8970bd1a}.add-choices .add-event{color:#448c82;background:#448c821a}
#diaperPanel .section-heading select{width:130px;font-size:14px}.pattern-panel h3{font-size:18px;margin:0 0 18px}.pattern-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.pattern-stats strong{display:block;font-size:25px;line-height:1.3}.pattern-stats small{display:block;color:var(--muted);font-size:12px;line-height:1.4;margin-top:5px}.pattern-bars{display:flex;align-items:flex-end;gap:3px;height:105px;margin-top:22px;overflow:hidden}.pattern-bar{flex:1;min-width:0;display:flex;align-items:flex-end;justify-content:center;height:100%;padding:0;background:none;border:0;border-radius:0}.pattern-bar span{display:block;width:100%;max-width:22px;border-radius:4px 4px 0 0;background:var(--green);min-width:2px}.pattern-bar .no-records{background:var(--line)}.pattern-axis{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin:8px 0 18px}.pattern-panel .note{font-size:13px;line-height:1.6}.pattern-panel>p{font-size:14px}.brand-logo{width:32px;height:32px;vertical-align:middle;border-radius:10px}.settings-app-logo{display:flex;align-items:center;gap:14px;margin:18px 0}.settings-app-logo img{width:56px;height:56px;border-radius:17px}.settings-app-logo strong{display:block}.settings-app-logo small{color:var(--muted);display:block;margin-top:4px}
.date-control input[type=time]{opacity:0;position:absolute;inset:0;width:100%;height:100%;min-width:0;cursor:pointer}.date-control{min-width:0}.date-control .date-display{pointer-events:none}.time-fields .date-control{height:48px}.time-fields .date-display{font-size:18px}.date-control button[hidden]{display:none!important}#taskPlanTime{height:48px;padding:10px 12px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink);width:100%}
@media(max-width:360px){.timeline-row{gap:9px}.timeline-symbol{width:32px;height:32px;border-radius:10px}.timeline-thumb{width:46px;height:46px}.pattern-stats strong{font-size:22px}.add-choices button{grid-template-columns:44px minmax(0,1fr);padding:14px;column-gap:12px}.add-choices .add-symbol{width:44px;height:44px}.journal-filters{grid-template-columns:minmax(0,1fr)}}
.routine-record-link{display:block;margin:-6px 0 16px auto;font-size:13px;min-height:36px}.timeline-task-filter{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--progress);padding:8px 12px;border-radius:12px;font-size:14px}.timeline-task-filter .textbutton{font-size:13px;white-space:nowrap}
/* Frequency answers first, then the daily count chart and the exact times. */
.frequency-summary{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:6px 0 22px}.frequency-summary>div{min-width:0}.frequency-summary small{display:block;font-size:12px;line-height:1.5;color:var(--muted)}.frequency-summary strong{display:block;font-size:23px;line-height:1.35;margin:7px 0;letter-spacing:-.4px}.frequency-summary span{display:block;font-size:12px;color:var(--muted);line-height:1.5}.frequency-counts{display:grid;grid-template-columns:repeat(3,1fr);background:var(--progress);padding:13px 10px;border-radius:14px;gap:10px;margin-bottom:26px}.frequency-counts>div{text-align:center}.frequency-counts strong{display:block;font-size:23px;line-height:1.2}.frequency-counts small{display:block;margin-top:5px;font-size:12px;color:var(--muted)}.frequency-heading h4{font-size:15px;font-weight:600;margin:0}.frequency-heading>span{font-size:12px;color:var(--muted)}.frequency-chart{display:grid;grid-template-columns:20px minmax(0,1fr);gap:7px;margin-top:16px}.frequency-scale{height:148px;position:relative;font-size:11px;color:var(--muted)}.frequency-scale span{position:absolute;right:0;transform:translateY(50%)}.frequency-scroll{overflow-x:auto;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:thin;padding-bottom:8px}.frequency-columns{display:flex;gap:4px;background:repeating-linear-gradient(to top,var(--line),var(--line) 1px,transparent 1px,transparent var(--grid-step,42px));background-position:left bottom 28px;background-size:100% 126px;background-repeat:no-repeat}.frequency-column{display:flex;flex:1;min-width:28px;flex-direction:column;padding:0 2px;border:0;background:transparent;border-radius:8px;color:var(--ink)}.frequency-bar-space{height:148px;display:block;position:relative;width:100%}.frequency-bar{position:absolute;bottom:0;left:22%;width:56%;border-radius:5px 5px 0 0;background:var(--green);opacity:.8;min-height:3px}.frequency-bar.no-records{background:var(--muted);opacity:.3;border-radius:2px}.frequency-value{position:absolute;left:0;right:0;font-size:12px;line-height:20px;text-align:center}.frequency-column small{height:28px;font-size:10px;line-height:28px;color:var(--muted);white-space:nowrap}.frequency-column[aria-pressed=true]{background:var(--progress)}.frequency-column[aria-pressed=true] .frequency-bar{opacity:1}.frequency-column[aria-pressed=true] small{color:var(--green);font-weight:600}.pattern-panel .frequency-hint{font-size:12px;margin:6px 0 14px}.frequency-comparison{font-size:13px;color:var(--muted);line-height:1.5}.frequency-method{margin:16px 0}.frequency-method summary{font-size:13px;color:var(--muted);font-weight:500}.pattern-day-detail{background:var(--progress);padding:14px;border-radius:14px;margin:18px 0}.pattern-day-detail:empty{display:none}.pattern-day-detail>.row{gap:10px;flex-wrap:wrap;font-size:13px}.pattern-day-detail>.row>span{color:var(--muted)}.pattern-times{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 5px}.pattern-times span{padding:5px 10px;background:var(--paper);border-radius:9px;font-size:14px}.pattern-day-detail .textbutton{font-size:13px;padding:6px 0}.pattern-day-detail .note{margin-bottom:0}
@media(max-width:360px){.frequency-summary{gap:14px}.frequency-summary strong{font-size:20px}.frequency-summary small,.frequency-summary span{font-size:11px}.frequency-columns{gap:2px}}

/* Secondary history navigation is a text rail, distinct from primary segmented tabs. */
#history .history-page-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#history .history-segments{display:flex;justify-content:flex-start;gap:22px;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:0;margin:0 0 16px}
#history .history-segments button{flex:0 0 auto;min-height:44px;padding:10px 1px;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;box-shadow:none;color:var(--muted);font-size:14px;font-weight:500;line-height:1.4;margin-bottom:-1px}
#history .history-segments button[aria-pressed=true]{color:var(--ink);border-bottom-color:var(--green);font-weight:600;background:none;box-shadow:none}
#historyJournalPane>p.note{font-size:13px;line-height:1.5;margin:0 0 12px}
#history .journal-filters{margin:0 0 12px;gap:8px}#history .journal-filters select,#history .journal-filters .date-control{height:42px;padding:9px 12px}
#timelineStatus:empty{display:none}#timelineStatus{margin:0 0 12px}#timelineList .timeline-day{margin:18px 0 4px;font-size:13px}#timelineList .timeline-day:first-child{margin-top:8px}#timelineList .timeline-row{padding:10px 0;min-height:62px}
#diaperPanel .history-overview-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 12px}#diaperPanel .history-overview-toolbar h3{font-size:15px;line-height:1.4;margin:0;font-weight:500;color:var(--muted)}#diaperPanel .history-overview-toolbar select{width:112px;min-height:40px;padding:8px 10px;font-size:14px}
#diaperPanel .pattern-panel{padding:16px;margin:0 0 16px;border-radius:16px}#diaperPanel .pattern-panel>h3{font-size:17px;margin:0 0 14px}
#diaperPanel .frequency-summary{gap:16px;margin:0 0 16px}#diaperPanel .frequency-summary strong{margin:5px 0;font-size:22px}#diaperPanel .frequency-counts{padding:12px 8px;margin:0 0 18px}#diaperPanel .frequency-chart{margin-top:12px}#diaperPanel .frequency-hint{margin:4px 0 12px}#diaperPanel .frequency-comparison{margin:12px 0;font-size:12px}#diaperPanel .frequency-method{margin:12px 0}#diaperPanel .pattern-day-detail{padding:12px;margin:14px 0}#diaperPanel .pattern-panel>p.note{margin:12px 0 4px;font-size:12px;line-height:1.5}#diaperPanel #patternRecords{min-height:40px;padding:8px 0;font-size:13px}
#diaperPanel>.profile-link{background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:10px 0;margin:0 0 16px;font-size:14px;min-height:44px}#diaperPanel>details.panel{padding:16px;border-radius:16px;margin:0}#diaperPanel>details.panel>summary{font-size:14px}#diaperPanel>details.panel>p.note{font-size:12px;margin:12px 0}
#historyDaysPane>.row{margin:0 0 12px;gap:12px}#historyDaysPane>.row>h3{font-size:15px;margin:0}#historyDaysPane .history-grid{margin-top:0}#historyDetails{margin-top:16px;padding:16px}#historyDetails .history-date-picker{margin:16px 0;gap:12px}#historyDetails .history-detail-heading{margin:18px 0 10px}#historyDetails .history-edit-heading{margin-top:16px}#historyDetails .history-edit-heading h3{margin:0}
@media(max-width:360px){#history .history-segments{gap:18px}#diaperPanel .pattern-panel{padding:14px}#diaperPanel .frequency-summary{gap:12px}#diaperPanel .frequency-summary strong{font-size:20px}}
/* Overview uses compact reading rows, not oversized metric tiles. */
#diaperPanel .frequency-summary{display:block;margin:0 0 14px}
#diaperPanel .frequency-summary-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;min-width:0}
#diaperPanel .frequency-summary-row>span{color:var(--muted);font-size:13px;line-height:1.5;min-width:0}
#diaperPanel .frequency-summary-row>strong{display:block;font-size:16px;line-height:1.5;letter-spacing:0;font-weight:600;margin:0;text-align:right;max-width:68%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#diaperPanel .frequency-summary .frequency-average,#diaperPanel .frequency-summary .frequency-last-date{margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
#diaperPanel .frequency-summary .frequency-last-row{margin-top:12px}
#diaperPanel .frequency-counts{background:none;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;padding:11px 0;margin:0 0 18px;gap:6px}
#diaperPanel .frequency-counts>div{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;text-align:left}
#diaperPanel .frequency-counts>div+div{border-left:1px solid var(--line);padding-left:6px}
#diaperPanel .frequency-counts strong{font-size:17px;line-height:1.4;font-weight:600;flex-shrink:0;font-variant-numeric:tabular-nums}
#diaperPanel .frequency-counts small{font-size:11px;line-height:1.4;margin:0;color:var(--muted)}
#diaperPanel .pattern-day-detail{background:none;border-left:2px solid var(--line);border-radius:0;padding:0 0 0 12px;margin:16px 0}
#diaperPanel .pattern-day-detail>.row{font-size:12px}#diaperPanel .pattern-times span{background:var(--progress);font-size:13px;padding:4px 8px}
/* On the read-only overview the add action belongs to the toolbar, away from chart data. */
body:has(#history:not([hidden]) #diaperPanel:not([hidden])) #globalAdd{display:none}
.history-overview-actions{display:flex;align-items:center;gap:8px}
#addOverview{display:grid;place-items:center;width:40px;height:40px;flex:none;border:1px solid var(--line);border-radius:11px;background:var(--paper);color:var(--green);font-size:25px;line-height:1;padding:0}
@media(max-width:360px){#diaperPanel .frequency-summary-row>strong{font-size:15px}#diaperPanel .frequency-counts{gap:4px}#diaperPanel .frequency-counts strong{font-size:16px}#diaperPanel .frequency-counts small{font-size:10px}#diaperPanel .frequency-counts>div{gap:4px}#diaperPanel .frequency-counts>div+div{padding-left:4px}#diaperPanel .history-overview-toolbar select{width:100px}}
/* A selected empty day must not look like a full-height data column. */
#diaperPanel .frequency-column[aria-pressed=true]{background:transparent}
#diaperPanel .frequency-column[aria-pressed=true] small{background:var(--progress);border-radius:6px}

#history .journal-filters{grid-template-columns:minmax(0,1fr)}
.timeline-day-context{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 12px;padding:8px 12px;background:var(--progress);border-radius:10px;font-size:13px}.timeline-day-context .textbutton{font-size:12px;padding:4px 0;min-height:32px;white-space:nowrap}
.journal-kind-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--input-border);border-radius:11px;background:var(--input);color:var(--ink);font-size:14px;text-align:left}
#timelineKindCurrent{display:flex;align-items:center;gap:9px;min-width:0}#timelineKindCurrent>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.journal-kind-icon{width:24px;height:24px;display:grid;place-items:center;flex:none;color:var(--green)}.journal-kind-icon svg{width:21px;height:21px}.journal-kind-caret{color:var(--muted);flex:none}.journal-kind-icon.kind-stool{color:#a67a34}.journal-kind-icon.kind-routine{color:#8970bd}
#timelineKindDialog{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:480px;max-height:calc(100dvh - 24px - env(safe-area-inset-top));padding:16px 16px calc(14px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0;overflow:auto}#timelineKindDialog>.row{gap:12px;margin:0 0 12px}#timelineKindHeading{margin:0;font-size:18px;line-height:1.4}#timelineKindHeading:focus{outline:none}#closeTimelineKind{font-size:14px;min-height:44px}.journal-kind-options{display:grid;gap:4px}.journal-kind-choice{display:flex;align-items:center;gap:12px;min-height:48px;width:100%;border:0;border-radius:11px;padding:10px 12px;background:none;color:var(--ink);text-align:left;font-size:15px;line-height:1.4}.journal-kind-choice[aria-pressed=true]{background:var(--progress)}.journal-kind-check{margin-left:auto;flex:none;color:var(--green);font-size:16px}html:has(#timelineKindDialog[open]){overflow:hidden}

/* Diaper editor and a period chart that always fits the selected range. */
.diaper-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.diaper-choices button{-webkit-appearance:none;appearance:none;min-height:46px;font-size:14px;line-height:1.4;font-weight:500;padding:10px 8px;border:1px solid var(--input-border);border-radius:12px;background:var(--input);color:var(--ink);box-shadow:none}.diaper-choices button[aria-pressed="true"]{background:var(--green);color:var(--on-green);border-color:var(--green)}
.field-label{display:block;margin-bottom:8px}.diaper-stat-scope{margin:4px 0 18px}.frequency-range{font-size:.8rem;color:var(--muted);margin:4px 0 14px}.frequency-fit{grid-template-columns:26px minmax(0,1fr);gap:6px}.frequency-fit .frequency-columns{min-width:0;width:100%;gap:2px}.frequency-fit .frequency-column{flex:1 1 0;min-width:0;padding:0;border:0;border-radius:3px}.frequency-fit .frequency-bar{left:50%;transform:translateX(-50%);width:100%;max-width:32px;border-radius:4px 4px 0 0}.frequency-fit .frequency-column small{position:relative;left:50%;transform:translateX(-50%);width:34px;white-space:nowrap;font-size:.65rem;overflow:visible}.frequency-fit .frequency-column[aria-pressed="true"] .frequency-bar{background:var(--green);outline:1px solid var(--ink)}.pattern-bucket-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;color:var(--muted);font-size:.8rem}.pattern-day-detail .pattern-bucket-nav button{min-width:44px;min-height:44px;font-size:1.5rem}.pattern-bucket-day{display:block;width:100%;text-align:left;padding:10px 0}.pattern-bucket-day small{display:block;color:var(--muted);font-size:.8rem;margin-top:4px}

.offline-state{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 16px;font-size:12px;line-height:1.5;color:var(--muted);flex-wrap:wrap}.offline-state .textbutton{font-size:12px;min-height:36px;padding:4px}.offline-conflict-actions{display:grid;gap:10px;margin-top:20px}

/* Today: one clear reading path, with secondary controls kept quiet. */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.day-context{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}.day-context .tag{font-size:11px;letter-spacing:.6px}.sync-compact{font-size:11px;line-height:1.4;color:var(--muted);white-space:nowrap;flex-shrink:0}.sync-compact[data-state="ready"]{color:var(--green)}.sync-compact[data-state="pending"],.sync-compact[data-state="error"]{color:var(--danger)}
.shell>header{margin-bottom:12px}.shell>nav{margin:12px 0 24px;padding:4px;border-radius:17px}.shell>nav button{min-height:44px;padding:10px 8px;font-size:14px;border-radius:13px}
#today .section-heading{margin:0 0 10px;align-items:center;gap:10px}#today .section-heading h2{font-size:17px;font-weight:600;margin:0;line-height:1.35;letter-spacing:-.2px}#today .section-heading>.textbutton{font-size:12px;min-height:40px;padding:8px 0;white-space:nowrap}
#todayPlan{margin:0 0 24px}#todayPlan .today-plan-date{font-size:12px;color:var(--muted);margin:0 0 8px}#todayPlan .event-card{padding:14px;border-radius:16px;margin:0;gap:14px;min-height:76px}#todayPlan .event-time{font-size:16px;font-weight:600;line-height:1.45;min-width:46px;font-variant-numeric:tabular-nums}#todayPlan .event-info strong{font-size:15px;font-weight:500;line-height:1.45}#todayPlan .event-info small{font-size:12px;margin-top:5px}#todayPlan .event-notes{display:none}
#today .today-routine-toolbar{margin-bottom:12px}#today .today-routine-actions{display:flex;align-items:center;gap:4px;min-width:0}#today .routine-filter{display:flex;align-items:center;gap:0;margin:0;padding:0;min-width:0}#today .routine-filter select{width:140px;max-width:36vw;min-height:44px;padding:9px 24px 9px 10px;font-size:12px;border-color:transparent;border-radius:11px;background-color:var(--segmented);text-overflow:ellipsis}#today #todayCategoryReset{padding:5px;min-width:28px;min-height:44px;font-size:20px}#today .routine-settings{display:grid;place-items:center;width:40px;min-width:40px;min-height:44px;padding:8px;color:var(--muted)}.routine-settings svg{width:20px;height:20px}
#today .progress{padding:12px 14px;margin:0 0 14px;gap:12px;border-radius:15px}#today .ring{width:40px;height:40px}#today .ring::before{width:31px;height:31px;font-size:11px}#today .progress strong{font-size:14px;margin:0;line-height:1.4}#today .progress small{display:none}
#today .task{padding:14px;min-height:76px;gap:12px;border-radius:15px;margin:8px 0;border-color:var(--line)}#today .task .check{width:25px;height:25px;border-width:1.5px}#today .task>span:not(.check){min-width:0}#today .task strong{font-size:15px;line-height:1.45;font-weight:500}#today .task small:empty{display:none}#today .task small,#today .task .routine-kind{font-size:12px;line-height:1.4;margin-top:5px}#today .task .routine-slot-time{font-size:12px;margin-top:4px}
#globalAdd{width:50px;height:50px;font-size:34px}#today{padding-bottom:68px}.offline-state{margin:0 0 12px;padding:8px 10px;background:var(--progress);border-radius:10px;font-size:12px}.offline-state .textbutton{font-size:12px}.dev-notice{font-size:11px;line-height:1.5;padding:9px 11px;margin:0 0 14px}
@media(max-width:360px){#today .routine-filter select{width:116px}#today .section-heading h2{font-size:16px}.shell>nav button{font-size:13px}}

/* The stored weight remains grams; these controls only change the input unit. */
.weight-units{display:flex;flex-shrink:0;gap:3px;background:var(--segmented);padding:3px;border-radius:11px}.weight-units button{min-width:42px;min-height:42px;border:0;border-radius:8px;background:transparent;color:var(--muted);padding:8px;font-size:14px;font-weight:500}.weight-units button[aria-pressed="true"]{background:var(--paper);color:var(--green);box-shadow:var(--active-shadow)}#journalForm .weight-units button{min-height:42px}#journalForm .measure-input>input:not([type="hidden"]){width:0;flex:1 1 0;min-width:0}.measure-input .weight-units{flex:0 0 auto}

.sync-record-choice{border:1px solid var(--line);border-radius:12px;padding:12px;margin:8px 0 14px;background:var(--paper);font-size:13px;line-height:1.5}.sync-record-choice>strong{display:block;font-size:13px}.sync-record-choice>p{margin:6px 0 10px;color:var(--muted);font-size:12px}.sync-choice-actions{display:flex;gap:8px;flex-wrap:wrap}.sync-choice-actions button{min-height:44px;font-size:12px;padding:9px 10px}.sync-field-comparison{margin:10px 0;font-size:12px}.sync-field-comparison>div{padding:8px 0;border-top:1px solid var(--line)}.sync-field-comparison dt{font-weight:600}.sync-field-comparison dd{margin:5px 0;overflow-wrap:anywhere}.sync-field-comparison dd>span{color:var(--muted);display:inline-block;min-width:90px}.sync-field-comparison dd{white-space:pre-wrap}#offlineConflictDialog{max-height:85dvh;overflow:auto}#offlineIssues:empty{display:none}

/* Sleep shares the journal's editor and keeps analytics below one secondary tab. */
.dynamics-sections{display:flex;gap:20px;border-bottom:1px solid var(--line);margin:0 0 20px}.dynamics-sections button{border:0;background:none;border-radius:0;padding:10px 0;color:var(--muted);font-size:14px;min-height:44px}.dynamics-sections button[aria-pressed=true]{color:var(--ink);box-shadow:inset 0 -2px var(--green)}.sleep-today{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:0 0 12px;margin:0 0 18px}.sleep-status-link{border:0;background:none;color:var(--ink);display:flex;gap:10px;align-items:center;text-align:left;padding:4px 0}.sleep-status-link strong{display:block;font-size:14px;font-weight:500}.sleep-status-link small{display:block;font-size:12px;color:var(--muted);margin-top:3px}.sleep-moon{font-size:26px;color:var(--green)}.sleep-today>.primary,.sleep-today>.textbutton{font-size:13px;min-height:44px}.sleep-toolbar h3{margin:0;font-size:16px}.sleep-toolbar .note{margin:4px 0}.sleep-toolbar select{width:114px;font-size:14px}.sleep-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}.sleep-summary small{display:block;font-size:12px;color:var(--muted);line-height:1.5}.sleep-summary strong{display:block;font-size:17px;overflow-wrap:anywhere;font-weight:500;margin:6px 0}.sleep-insight{background:var(--progress);border-radius:14px;padding:14px;margin:16px 0;font-size:13px;line-height:1.5}.sleep-insight strong{font-size:13px}.sleep-insight p{margin:6px 0}.sleep-insight small{color:var(--muted);font-size:12px}.sleep-section-title{font-size:15px;margin:20px 0 8px}.sleep-rhythm{overflow:visible;max-height:none;border:1px solid var(--line);border-radius:12px;padding:12px 14px 12px 4px;overscroll-behavior-x:contain}.sleep-grid{width:100%;min-width:0}.sleep-grid-axis,.sleep-grid-row{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center}.sleep-grid-axis{height:24px;font-size:10px;color:var(--muted);position:sticky;top:-12px;background:var(--paper);z-index:2}.sleep-grid-axis>div{grid-column:2;position:relative;height:20px;margin:0}.sleep-grid-axis>div>span{position:absolute;transform:translateX(-50%);white-space:nowrap}.sleep-grid-axis>div>span:first-child{transform:none}.sleep-grid-axis>div>span:last-child{transform:translateX(-100%)}.sleep-grid-row>button{font-size:10px;padding:8px 3px;border:0;background:none;color:var(--muted);min-height:32px}.sleep-grid-row.selected>button{color:var(--green);font-weight:600}.sleep-track{height:25px;position:relative;background:linear-gradient(to right,var(--segmented) 25%,transparent 25%,transparent 83.33%,var(--segmented) 83.33%);border-bottom:1px solid var(--line)}.sleep-segment{position:absolute;top:4px;height:17px;min-height:0;border:0;background:var(--green);border-radius:4px;padding:0;opacity:.8}.sleep-segment.active{background:transparent;border:2px dashed var(--green);opacity:1}.sleep-segment:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.sleep-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:11px;color:var(--muted);margin:10px 0 20px}#sleepDayDetails h3{font-size:15px;margin:0}#sleepDayDetails .textbutton{font-size:12px;min-height:44px}.sleep-record{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);padding:14px 0;text-align:left;font-size:13px;min-height:48px}.sleep-record strong{font-size:13px;font-weight:500}.sleep-record small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.sleep-reference{border-top:1px solid var(--line);padding-top:15px;margin:20px 0}.sleep-reference summary{font-size:14px}.sleep-add{margin:0 0 20px;font-size:14px}.add-sleep,.kind-sleep{color:var(--green);background:var(--progress)}#sleepDialog.editor-dialog{position:fixed;inset:var(--editor-top,0px) 0 auto;margin:0 auto;width:100%;max-width:680px;height:var(--editor-height,100dvh);max-height:none;padding:0;border-radius:0;overflow:hidden}#sleepForm .editor-scroll{display:flex;flex-direction:column;gap:16px}.sleep-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:0;margin:0;padding:0}.sleep-mode label{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.4;font-weight:500;margin:0;padding:12px 10px;border:1px solid var(--input-border);border-radius:12px;min-width:0;background:var(--input)}.sleep-mode label:has(input:checked){border-color:var(--green);background:var(--progress)}.sleep-mode input{width:18px;height:18px;min-height:18px;flex-shrink:0;margin:0;accent-color:var(--green)}.sleep-date-time{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:12px}.sleep-date-time input[type=time]{min-width:0;width:100%;box-sizing:border-box;background:var(--input);color:var(--ink);border:1px solid var(--input-border);border-radius:11px;padding:12px;font:inherit;font-size:16px}#sleepEndFields>.field-label{display:block;margin-bottom:12px}#sleepForm .editor-footer .primary{width:100%}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

/* Explicit control geometry avoids native iOS button/date appearance changes. */
.diaper-choices button[aria-pressed="true"]{border-radius:12px}.diaper-choices button:focus-visible{outline:2px solid var(--green);outline-offset:2px}#sleepForm .date-control{height:48px;min-height:48px;font-size:16px;line-height:24px}#sleepForm .date-control>input[type=date]{position:absolute;inset:0;width:100%;max-width:100%;height:100%;min-height:0;min-width:0;opacity:0;border:0;margin:0;padding:0;cursor:pointer}#sleepForm input[type=time]{height:48px;min-height:48px;line-height:24px;-webkit-appearance:none;appearance:none}#sleepForm .field-label{font-size:14px;font-weight:500;margin:0}#sleepForm .sleep-date-time{gap:10px;align-items:start}#sleepForm #sleepEndFields{min-width:0}.sleep-live-timer{display:grid;justify-items:center;gap:12px;background:var(--progress);border:1px solid var(--line);border-radius:16px;padding:20px 16px}.sleep-live-timer>span{font-size:12px;color:var(--muted)}.sleep-live-timer output{font-size:36px;font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--ink)}.sleep-live-timer button{min-height:44px;font-size:14px}.sleep-toolbar{flex-wrap:wrap;gap:12px;align-items:center}.sleep-toolbar>div{min-width:0}.sleep-toolbar select{flex:none;width:110px}.sleep-insight,.sleep-summary>div{min-width:0;overflow-wrap:anywhere}.sleep-rhythm{padding:12px 10px 12px 4px;isolation:isolate}.sleep-grid-row>button{min-width:0;white-space:nowrap}.sleep-track{min-width:0;overflow:hidden}.sleep-grid-axis{font-variant-numeric:tabular-nums}.sleep-record>span{min-width:0}.sleep-record strong,.sleep-record small{overflow-wrap:anywhere;line-height:1.5}.sleep-record>span:last-child{font-size:12px;white-space:nowrap;color:var(--muted)}#sleepDayDetails>.row{flex-wrap:wrap;gap:8px;align-items:center}#sleepPanel .note{font-size:12px;line-height:1.6}#sleepDayDetails>.row>.textbutton{white-space:normal;text-align:right;max-width:65%}#sleepPanel{min-width:0}#sleepPanel h3{line-height:1.4}.style-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.style-options button{appearance:none;-webkit-appearance:none;border:1px solid var(--input-border);border-radius:14px;padding:12px;background:var(--input);color:var(--ink);font-size:14px;min-height:44px;text-align:left}.style-options button[aria-pressed=true]{border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}.style-preview{display:block;height:44px;border-radius:9px;margin-bottom:10px;border:1px solid var(--line)}.style-preview-classic{background:linear-gradient(90deg,var(--progress) 0 22%,var(--paper) 22% 100%)}.style-preview-playful{background:radial-gradient(circle at 15% 50%,#c4b5eb 0 11px,transparent 12px),radial-gradient(circle at 43% 50%,#9cd4c2 0 11px,transparent 12px),radial-gradient(circle at 71% 50%,#f3c17f 0 11px,transparent 12px),#fff7ed}
@media(max-width:360px){.sleep-summary{grid-template-columns:minmax(0,1fr);gap:12px}.sleep-summary>div+div{border-top:1px solid var(--line);padding-top:12px}.sleep-mode{grid-template-columns:minmax(0,1fr)}.sleep-date-time{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}.sleep-record{gap:8px}.sleep-grid-axis,.sleep-grid-row{grid-template-columns:52px minmax(0,1fr)}}

/* A complete week, with no nested vertical scroll or auto-shrinking grid. */
#sleepRhythm{width:100%;height:auto;max-height:none;overflow:visible;padding:10px 10px 6px;border-radius:14px;background:var(--paper)}#sleepRhythm>svg.sleep-rhythm-svg{display:block;width:100%;height:auto;max-height:none;overflow:visible;font-family:var(--font-ui);touch-action:pan-y}.sleep-svg-grid{stroke:var(--line);stroke-width:.6}.sleep-svg-hour{fill:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}.sleep-svg-day{fill:var(--muted);font-size:11px}.sleep-svg-day.selected{fill:var(--green);font-weight:600}.sleep-svg-background{fill:var(--paper)}.sleep-svg-hit{fill:var(--paper);fill-opacity:0;cursor:pointer}.sleep-svg-hit.selected{fill:var(--progress);fill-opacity:.6}.sleep-svg-night{fill:var(--segmented)}.sleep-svg-block{fill:var(--green);pointer-events:none}.sleep-svg-block.active{fill:none;stroke:var(--green);stroke-width:1.5;stroke-dasharray:3 2}.sleep-svg-complete{fill:var(--green)}.sleep-rhythm-svg g:focus-visible{outline:none}.sleep-rhythm-svg g:focus-visible .sleep-svg-hit{stroke:var(--green);stroke-width:1}.sleep-chart-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;font-size:12px;color:var(--muted)}.sleep-chart-nav button{min-width:44px;min-height:40px;font-size:24px;padding:0 8px}.sleep-observations{margin:18px 0;border-top:1px solid var(--line);padding-top:14px}.sleep-observations summary{font-size:13px;font-weight:500;min-height:32px}.sleep-observations .sleep-insight{margin:8px 0 0;background:transparent;border:0;padding:0}.sleep-observations .sleep-insight p{font-size:12px}.sleep-observations .sleep-insight small{font-size:11px}.sleep-record small{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.sleep-legend{margin:8px 0 16px;font-size:11px}#sleepDayDetails>.note{margin:8px 0}#sleepPanel .sleep-section-title{margin-top:18px}.sleep-summary{padding:10px 0 12px}.sleep-summary strong{font-size:17px}.sleep-summary small{font-size:11px}#sleepStatus{font-size:11px}
/* One compact context card keeps the checklist close to the top. */
.today-context{margin:0 0 16px;border:1px solid var(--line);border-radius:16px;background:var(--paper);padding:0 12px;overflow:hidden}.today-context #sleepToday{margin:0;padding:7px 0;min-height:54px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}.today-context .sleep-moon{font-size:22px}.today-context .sleep-status-link{gap:9px}.today-context .sleep-status-link strong{font-size:13px;font-weight:500}.today-context .sleep-status-link small{font-size:11px;margin-top:2px}.today-context #sleepToday>.primary,.today-context #sleepToday>.textbutton{font-size:12px;min-height:40px;padding:8px 10px}.today-context #todayPlan{margin:0}.context-plan-row{display:flex;align-items:center;gap:4px;min-height:58px}.context-plan-row>.context-empty{flex:1;font-size:12px;color:var(--muted)}#todayPlan .event-card.next-plan-compact{border:0;box-shadow:none;border-radius:0;background:none;padding:10px 0;margin:0;min-height:58px;align-items:center;gap:10px;flex:1;min-width:0}#todayPlan .next-plan-compact .event-time{font-size:14px;font-weight:600;line-height:1.3;min-width:48px;max-width:60px;overflow-wrap:anywhere}#todayPlan .next-plan-compact .event-info{flex:1;min-width:0}#todayPlan .next-plan-compact .event-info strong{font-size:13px;font-weight:500;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}#todayPlan .next-plan-compact .event-info small{font-size:10px;line-height:1.3;margin:0 0 3px}.context-all-plans{font-size:23px;width:30px;min-width:30px;min-height:44px;padding:2px}#timelineList .timeline-day{font-size:12px;margin:18px 0 4px}.timeline-copy strong{font-size:14px;font-weight:500;line-height:1.4}.timeline-copy small{font-size:11px;line-height:1.45;margin-top:3px}.timeline-note{font-size:12px;margin-top:4px;-webkit-line-clamp:1;line-height:1.4}.timeline-thumb{width:40px;height:40px;border-radius:9px}.timeline-arrow{font-size:18px}.journal-kind-trigger{min-height:40px;font-size:13px}.journal-kind-trigger .journal-kind-icon{width:24px;height:24px}.timeline-row{gap:10px}#diaperPanel .history-overview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}#diaperPanel .history-overview-toolbar h3{font-size:16px;font-weight:500;color:var(--ink)}#diaperPanel .pattern-panel{padding:14px;border-radius:16px}

/* Plans share the compact hierarchy of the journal. */
#calendar .plans-toolbar{margin-bottom:14px}#calendar .calendar-heading{margin-bottom:6px}#calendar .calendar-heading h2{font-size:20px;font-weight:600;margin:0}#calendar .plan-tools{margin:0;padding:0;border:0;gap:8px}#calendar .plan-tools button{font-size:12px;min-height:44px;padding:8px 0}#calendar .calendar-panel{padding:12px;margin:0 0 18px;border-radius:16px;box-shadow:none}#calendar .month-controls{gap:8px}#calendar .month-controls h3{font-size:15px;font-weight:500}#calendar .month-controls button{width:40px;height:40px;padding:0;border:0;background:transparent;font-size:25px}#calendar .calendar-weekdays{font-size:11px;margin:8px 0 4px;gap:2px}#calendar .calendar-grid{gap:2px}#calendar .calendar-day{min-height:40px;height:40px;font-size:14px;border-radius:12px;padding:3px 2px 10px}#calendar .calendar-day.has-events:after{display:none}.calendar-markers{position:absolute;bottom:5px;left:0;right:0;display:flex;gap:3px;justify-content:center}.plan-dot,.routine-dot{display:inline-block;width:4px;height:4px;border-radius:50%;background:var(--green)}.routine-dot{background:var(--muted);opacity:.7}.calendar-day.selected .plan-dot,.calendar-day.selected .routine-dot{background:var(--on-green)}.calendar-legend{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted)}.calendar-legend .routine-dot{margin-left:5px}#calendar .calendar-bottom{margin-top:6px;align-items:center;gap:6px}#calendar .calendar-bottom button{min-height:40px;font-size:12px;padding:6px}#selectedDayLabel{font-size:16px;font-weight:600;margin:18px 0 8px;text-transform:capitalize}#calendar .calendar-group-heading{font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:500;color:var(--muted);margin:14px 0 4px}#calendar .event-card{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding:12px 0;margin:0;gap:12px;align-items:flex-start}#calendar .event-time{font-size:14px;line-height:1.4;font-weight:600;min-width:50px;max-width:65px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}#calendar .event-time small{font-size:11px;margin-top:4px}#calendar .event-info{flex:1;border-left:2px solid var(--green);padding-left:10px}#calendar .routine-event .event-info{border-left-color:var(--muted)}#calendar .plan-vaccine .event-info{border-left-color:var(--play-mint-ink,var(--green))}#calendar .event-info strong{font-size:14px;font-weight:500;line-height:1.4}#calendar .event-info small{font-size:11px;margin-top:4px;line-height:1.45}#calendar .event-info .plan-kind{display:block;font-size:10px;line-height:1.3;color:var(--muted);margin-bottom:3px}#calendar .event-notes{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}#calendar .agenda-date{font-size:14px;margin:20px 0 6px}#calendarStatus,#upcomingStatus{font-size:11px}#calendar .month-agenda{padding:14px 0;margin-top:16px;border-top:1px solid var(--line)}#calendar .month-agenda>summary{font-size:13px;font-weight:500}#calendar .empty{padding:18px 10px}#calendar .empty h2{font-size:16px}#calendar .empty p{font-size:12px}

/* Icon selection is an installation preference, independent of family records. */
.app-icon-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0 10px}.app-icon-options button{appearance:none;min-width:0;display:flex;align-items:center;flex-direction:column;gap:8px;padding:10px 3px;background:var(--secondary);color:var(--ink);border:2px solid transparent;border-radius:14px;font:inherit;font-size:11px}.app-icon-options button[aria-pressed=true]{border-color:var(--green);background:var(--progress)}.app-icon-options img{width:100%;max-width:64px;height:auto;border-radius:15px}.icon-install-link{display:inline-block;text-align:center;text-decoration:none;font-size:14px;line-height:1.45}.icon-choice-caption{font-size:12px;line-height:1.5}.install-shell{max-width:440px;margin:auto;padding:calc(24px + env(safe-area-inset-top)) 22px calc(32px + env(safe-area-inset-bottom))}.install-back{display:inline-block;color:var(--green);text-decoration:none;font-size:14px;margin-bottom:28px;padding:10px 0}.install-icon{display:block;border-radius:23px;box-shadow:var(--card-shadow);margin-bottom:18px}.install-shell h1{font-size:24px;line-height:1.25;margin:8px 0 12px}.install-eyebrow{font-size:12px;margin:0}.install-steps{padding-left:22px;margin:24px 0}.install-steps li{padding-left:5px;margin:0 0 20px;color:var(--green)}.install-steps strong,.install-steps span{display:block}.install-steps strong{color:var(--ink);font-size:15px;font-weight:500}.install-steps span{color:var(--muted);font-size:13px;line-height:1.5;margin-top:5px}.install-help{padding:16px;background:var(--paper);border:1px solid var(--line);border-radius:14px}.install-help summary{font-size:14px;line-height:1.5;font-weight:500}.install-help button{margin-top:12px;font-size:13px}.install-help input{font-size:12px}.install-limit{font-size:12px;margin-top:18px}
/* Compact live activities and the shared rhythm view. */
#activeActivities{padding:2px 0}.active-activity-row{display:flex;align-items:center;gap:8px;min-height:50px;border-bottom:1px solid var(--line)}.active-activity-row:last-child{border:0}.activity-open{display:flex;align-items:center;gap:9px;flex:1;min-width:0;background:none;border:0;color:var(--ink);padding:8px 0;text-align:left}.activity-open strong{display:block;font-size:13px;font-weight:500;line-height:1.4}.activity-open small{display:block;font-size:10px;color:var(--muted);margin-top:2px}.activity-symbol{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;background:var(--progress);color:var(--green);flex-shrink:0}.activity-stop{font-size:12px;min-height:44px;padding:8px}.activity-quick{font-size:12px;min-height:40px;padding:8px 0}.today-context:has(>#activeActivities[hidden]):has(>#sleepToday[hidden]):has(>#todayPlan[hidden]){display:none}.activity-options{border:0;padding:0;margin:4px 0 18px;display:flex;flex-wrap:wrap;gap:8px}.activity-options legend{font-size:14px;margin-bottom:8px}.activity-options label{font-size:13px;font-weight:400;display:flex;align-items:center;gap:6px;padding:9px 11px;margin:0;background:var(--segmented);border:1px solid var(--line);border-radius:11px;min-height:44px}.activity-options label:has(input:checked){border-color:var(--green);background:var(--progress)}.activity-options input{accent-color:var(--green);margin:0}.activity-date-time{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:10px;margin:6px 0 16px}.activity-date-time input[type=time]{font:inherit;appearance:none;border:1px solid var(--input-border);border-radius:11px;background:var(--input);color:var(--ink);height:48px;min-width:0;padding:10px;width:100%;font-size:16px}.activity-date-time .date-control{height:48px;min-height:48px;font-size:16px}.activity-date-time .date-control>input[type=date]{position:absolute;inset:0;width:100%;max-width:100%;height:100%;opacity:0;margin:0;padding:0;border:0}#activityForm .field-label{font-size:14px;font-weight:500}#activityForm input[type=number]{font:inherit;font-size:16px;width:100%;padding:12px;border:1px solid var(--input-border);border-radius:11px;background:var(--input);color:var(--ink);margin-bottom:16px}#activityForm details{margin:16px 0}#activityForm summary{font-size:14px;font-weight:500}.rhythm-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.rhythm-toolbar h3{font-size:17px;font-weight:500}.rhythm-toolbar select{width:auto;max-width:125px;font-size:13px;padding:10px}.rhythm-filters{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.rhythm-filters button{font:inherit;font-size:12px;min-height:40px;padding:8px 12px;border-radius:12px;background:var(--paper);border:1px solid var(--line);color:var(--muted)}.rhythm-filters button[aria-pressed=true]{background:var(--progress);border-color:var(--green);color:var(--ink)}.rhythm-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.rhythm-summary>div{padding:12px;border-radius:13px;background:var(--paper);border:1px solid var(--line)}.rhythm-summary strong,.rhythm-summary span,.rhythm-summary small{display:block}.rhythm-summary strong{font-size:20px;font-weight:500}.rhythm-summary span{font-size:12px;margin-top:6px}.rhythm-summary small{font-size:10px;line-height:1.5;color:var(--muted);margin-top:4px}.rhythm-svg{display:block;width:100%;height:auto;max-height:none}.rhythm-grid{stroke:var(--line);stroke-width:1}.rhythm-hour{fill:var(--muted);font-size:10px}.rhythm-hit{fill:transparent;cursor:pointer}.rhythm-hit.selected{fill:var(--segmented)}.rhythm-block{pointer-events:none;stroke-width:1.5}.rhythm-sleep{--rhythm-color:var(--play-lilac-ink,#705096);color:var(--rhythm-color);fill:var(--rhythm-color)}.rhythm-feed{--rhythm-color:var(--play-peach-ink,#97572d);color:var(--rhythm-color);fill:var(--rhythm-color)}.rhythm-walk{--rhythm-color:var(--play-mint-ink,#306d5d);color:var(--rhythm-color);fill:var(--rhythm-color)}.rhythm-block.ongoing{fill:none;stroke:var(--rhythm-color);stroke-dasharray:3 2}.rhythm-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:11px;margin:14px 0}.rhythm-caption{font-size:11px;line-height:1.5}.rhythm-record{display:flex;justify-content:space-between;gap:12px;width:100%;background:none;border:0;border-bottom:1px solid var(--line);padding:12px 0;text-align:left;color:var(--ink)}.rhythm-record>span:first-child{min-width:0;flex:1}.rhythm-record>span:last-child{font-size:11px;color:var(--muted);white-space:nowrap;align-self:center}.rhythm-record strong{font-size:13px;font-weight:500;display:block;line-height:1.5}.rhythm-record small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.family-members-settings{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}.family-members-settings summary{font-size:14px;font-weight:500}.family-member-row{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px;border-bottom:1px solid var(--line);padding:8px 0}.family-member-row .textbutton{font-size:12px}#parentSettings .people{flex-wrap:wrap}#parentSettings .people button{font-size:13px;flex:none;max-width:100%;white-space:normal;overflow-wrap:anywhere}.add-feed,.kind-feed{background:var(--play-peach,var(--progress));color:var(--play-peach-ink,var(--green))}.add-walk,.kind-walk{background:var(--play-mint,var(--progress));color:var(--play-mint-ink,var(--green))}#rhythmDay h3{font-size:16px;font-weight:500;margin-top:20px}

#activityAttachments,#deleteActivity{display:block;margin:8px 0}#activityForm .editor-scroll{padding-bottom:16px}

#addDialog{max-height:calc(100dvh - 32px);overflow-y:auto}.add-choices .add-feed{background:var(--play-peach,var(--progress));color:var(--play-peach-ink,var(--green))}.add-choices .add-walk{background:var(--play-mint,var(--progress));color:var(--play-mint-ink,var(--green))}:root[data-theme="dark"] .rhythm-sleep{--rhythm-color:var(--play-lilac-ink,#d5baf9)}:root[data-theme="dark"] .rhythm-feed{--rhythm-color:var(--play-peach-ink,#f2c1a1)}:root[data-theme="dark"] .rhythm-walk{--rhythm-color:var(--play-mint-ink,#a2decd)}

/* Activity editors use the shared viewport shell, including the on-screen keyboard. */
#activityForm .editor-footer .primary,#familyMemberForm .editor-footer .primary{width:100%}.activity-options input[type=radio]{width:18px;height:18px;min-height:18px;flex-shrink:0}.activity-options label{min-width:0;line-height:1.4}.activity-date-time>*,#activityForm .editor-scroll{min-width:0}#activityNote,#familyMemberName{width:100%;padding:12px;border:1px solid var(--input-border);border-radius:11px;background:var(--input);color:var(--ink);box-sizing:border-box}#activityNote{margin-top:12px;resize:vertical}

/* Compact secondary-page header: one row instead of a separate back-link and title. */
#dynamics>.dynamics-heading{align-items:center;justify-content:flex-start;gap:8px;margin:0 0 8px;min-height:44px}#dynamics .dynamics-heading .back-button{display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:44px;padding:0;font-size:25px;border-radius:12px}#dynamics .dynamics-heading .subpage-title{font-size:20px;line-height:1.3;margin:0}#dynamics .dynamics-sections{margin-bottom:12px}#dynamics .rhythm-toolbar h3{margin:8px 0}.shell:has(>#dynamics:not([hidden]))>nav{margin-bottom:10px}

/* Profile and dynamics are secondary destinations, outside the main tab bar. */
.shell:has(>#child:not([hidden]))>nav,.shell:has(>#dynamics:not([hidden]))>nav{display:none}:is(#child,#dynamics)>.subpage-heading{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-height:44px;margin:0 0 8px}:is(#child,#dynamics) .subpage-heading .back-button{display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:44px;padding:0;font-size:25px;border-radius:12px}:is(#child,#dynamics) .subpage-heading .subpage-title{font-size:20px;line-height:1.3;margin:0}
