:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#193e46;background:#f2f5f1;font-size:15px;--ink:#214b50;--muted:#617877;--line:#dfe7e2;--soft:#e5ece7;--surface:#fff;--gold:#e8c886;--app-height:100dvh}
*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #ac7e27;outline-offset:3px}svg{width:20px;height:20px;flex-shrink:0}h1,h2,h3,p{margin:0}h1{font:400 29px/1.15 Georgia,serif}h2{font-size:16px;font-weight:600}h3{font-size:14px;font-weight:600}small,.muted{font-size:12px;color:var(--muted)}
.app-shell{height:100vh;height:var(--app-height,100dvh);max-width:620px;margin:auto;display:flex;flex-direction:column;position:relative;background:#f2f5f1;padding-top:env(safe-area-inset-top)}.app-header{padding:14px 20px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;min-height:82px}.eyebrow{font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-bottom:4px}.screen{padding:0 18px 16px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px;position:relative}.screen[data-view=tasks]{overflow:hidden;padding-bottom:0}.panel{border:1px solid var(--line);background:var(--surface);border-radius:18px;padding:14px;flex-shrink:0}.row{display:flex;align-items:center;gap:8px}.spread{justify-content:space-between}.hero{background:var(--ink);color:#fff;border:0}.hero .eyebrow,.hero small{color:#d5e3df}.hero h2{font:400 24px/1.25 Georgia,serif;margin:5px 0 12px;overflow-wrap:anywhere}.hero .btn{background:var(--gold);color:#263d3d;border:0}.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hero-trigger{display:block;text-align:left;width:100%;background:none;border:0;color:inherit;padding:0}.hero-trigger h2{margin-bottom:0}.text-link{border:0;background:none;color:var(--ink);font-size:12px;padding:5px 0;min-height:34px;display:inline-flex;align-items:center;gap:5px}.text-link svg{width:16px;height:16px}.icon-button{width:44px;height:44px;flex-shrink:0;border:1px solid var(--line);border-radius:13px;background:var(--surface);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.icon-button.small{width:38px;height:38px}.btn{min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:11px;background:var(--surface);display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:500;text-decoration:none}.primary{background:var(--ink);border-color:var(--ink);color:#fff}.wide{width:100%}.danger{color:#9e3e35}.bottom-nav{flex-shrink:0;display:flex;gap:4px;background:var(--surface);border-top:1px solid var(--line);padding:7px 10px max(8px,env(safe-area-inset-bottom));min-height:70px}.bottom-nav button{flex:1;min-width:0;background:none;border:0;color:var(--muted);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;font-size:11px;border-radius:12px;min-height:51px}.bottom-nav button[aria-current=page]{background:var(--soft);color:var(--ink)}.progress{height:3px;background:var(--line);border-radius:3px;overflow:hidden;margin-top:4px}.progress i{height:100%;display:block;background:#bc9647}.signals{display:flex;gap:3px;padding:3px;background:var(--soft);border-radius:13px}.signals button{width:38px;height:36px;border:0;border-radius:10px;background:none;display:grid;place-items:center}.signals button[aria-pressed=true]{background:var(--surface);box-shadow:0 1px 3px #0001}.signal-dot{width:12px;height:12px;border-radius:50%;background:#568e73}.signal-dot.yellow{background:#bd943e}.signal-dot.red{background:#b3665d}.habits{display:flex;justify-content:space-between;gap:3px;margin-top:10px}.habit{display:flex;flex-direction:column;align-items:center;gap:5px;border:0;background:none;padding:0;min-width:44px;font-size:11px}.habit span{width:40px;height:40px;border-radius:12px;background:var(--soft);display:grid;place-items:center}.habit[aria-pressed=true] span{background:var(--ink);color:white}input[type=checkbox]{width:23px;height:23px;margin:0;accent-color:var(--ink);flex-shrink:0}.mini-task{display:flex;gap:10px;align-items:center;min-height:42px;border-top:1px solid var(--line);font-size:13px}.mini-task span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.today-tasks{min-height:0;flex-shrink:0}.empty{padding:22px 8px;color:var(--muted);text-align:center;line-height:1.5}.segment{display:flex;gap:3px;padding:4px;background:var(--soft);border-radius:13px;flex-shrink:0}.segment button{flex:1;min-width:0;min-height:37px;padding:8px 5px;background:none;border:0;border-radius:10px;color:var(--muted);font-size:12px}.segment button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #0001}.filter-row{display:flex;gap:8px;flex-shrink:0}.filter-row select{flex:1;min-width:0;margin:0;font-size:13px}.task-list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding-bottom:82px}.task-items{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:0 13px}.task-item{display:flex;align-items:center;gap:11px;min-height:68px;border-top:1px solid var(--line)}.task-item:first-child{border-top:0}.task-open{min-width:0;flex:1;border:0;background:none;text-align:left;padding:12px 0}.task-title{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-weight:500;font-size:14px}.task-meta{font-size:11px;color:var(--muted);display:block;margin-top:4px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.task-done .task-title{text-decoration:line-through;color:var(--muted)}.fab{position:absolute;bottom:18px;right:24px;width:54px;height:54px;background:var(--ink);color:#fff;border:0;border-radius:18px;display:grid;place-items:center;box-shadow:0 5px 15px #173e4930;z-index:2}.fab svg{width:25px;height:25px}.menu-list{padding:0 14px}.menu-item{background:none;border:0;border-top:1px solid var(--line);width:100%;display:flex;align-items:center;gap:12px;text-align:left;min-height:57px;padding:10px 0}.menu-item:first-child{border-top:0}.menu-copy{flex:1;min-width:0}.menu-copy strong{font-weight:500;font-size:14px;display:block;overflow-wrap:anywhere}.menu-copy small{display:block;font-size:11px;margin-top:3px}.weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-top:12px}.weekdays button{min-height:48px;border:0;border-radius:10px;background:var(--soft);padding:6px 0;font-size:13px}.weekdays small{display:block;font-size:10px;margin-bottom:3px}.weekdays .active{background:var(--ink);color:#fff}.weekdays .active small{color:#d5e3df}.phase-label{font-size:12px;color:var(--muted)}
dialog{position:fixed;top:var(--viewport-top,0px);bottom:var(--keyboard-inset,0px);padding:0;border:0;width:min(100%,620px);max-width:100%;margin:auto auto 0;max-height:calc(var(--app-height,100dvh) - env(safe-area-inset-top) - 20px);border-radius:25px 25px 0 0;background:var(--surface);color:#193e46;box-shadow:0 -10px 40px #0002}dialog::backdrop{background:#071b2366}dialog[open]{display:flex;flex-direction:column}.sheet-head{flex-shrink:0;padding:10px 20px 12px;border-bottom:1px solid var(--line)}.sheet-handle{width:32px;height:4px;background:var(--line);border-radius:3px;margin:0 auto 12px}.sheet-head h2{font:400 23px/1.25 Georgia,serif;overflow-wrap:anywhere}.sheet-head .row{gap:10px}.sheet-head h2{flex:1}.sheet-body{padding:16px 20px max(22px,env(safe-area-inset-bottom));min-height:0;overflow-y:auto;overscroll-behavior:contain}.sheet-body p{font-size:14px;line-height:1.6;margin:0 0 14px}.sheet-body h3{margin:15px 0 8px}.sheet-body .panel{margin:12px 0}.field{display:block;margin:14px 0}.field>span{font-size:12px;color:var(--muted);display:block;margin-bottom:6px}textarea,input[type=date],input[type=text],select{width:100%;border:1px solid var(--line);border-radius:11px;background:#f7f9f6;padding:12px;color:#193e46;font-size:16px;min-height:46px}textarea{resize:vertical;min-height:74px;line-height:1.5}.sheet-actions{display:flex;gap:8px;margin-top:16px}.sheet-actions .primary{flex:1}.sheet-save{font-size:11px;color:var(--muted);min-height:16px;margin-top:8px}.source{white-space:pre-line;line-height:1.7;font-size:14px;overflow-wrap:anywhere}.notice{background:#fff4dd;border-left:3px solid #ba913d;border-radius:6px;padding:12px 14px;font-size:13px;line-height:1.5;margin:12px 0}.notice p{margin:0}.calendar90{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.calendar90 button{min-height:40px;border:1px solid var(--line);border-radius:8px;background:#fff}.calendar90 .has-entry{border-bottom:3px solid #bd943e}.calendar90 .active{background:var(--ink);color:white}.category-item{display:flex;align-items:center;gap:8px;min-height:57px;border-bottom:1px solid var(--line)}.category-name{flex:1;min-width:0;overflow-wrap:anywhere}.category-name strong{font-weight:500;font-size:14px}.category-name small{display:block}.chips{display:flex;gap:7px;margin:10px 0}.chips button{flex:1;border:1px solid var(--line);border-radius:10px;background:#f7f9f6;min-height:40px;padding:8px;font-size:12px}.chips button[aria-pressed=true]{background:var(--soft);border-color:var(--ink)}.tracker{overflow-x:auto}table{width:100%;border-collapse:collapse;min-width:430px;font-size:12px}th,td{text-align:center;padding:9px 5px;border-bottom:1px solid var(--line)}th:first-child{text-align:left;max-width:100px}table input{width:22px;height:22px}.signal-note{border-left:4px solid #568e73;padding-left:12px;margin:10px 0 16px}.signal-note.yellow{border-color:#bd943e}.signal-note.red{border-color:#b3665d}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.toast{position:fixed;bottom:calc(84px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:var(--ink);color:white;border-radius:12px;padding:13px 18px;max-width:90%;width:max-content;z-index:60;font-size:13px}.sheet-body .toast{position:sticky;left:0;bottom:0;transform:none;max-width:100%;width:auto}.update-banner{position:fixed;bottom:84px;left:12px;right:12px;z-index:50;max-width:580px;margin:auto;background:#fff4dd;border:1px solid #ba913d;padding:12px;border-radius:12px;display:flex;gap:12px;align-items:center;font-size:12px}.update-banner button{flex-shrink:0}.storage-banner{padding:7px 16px;background:#fff4dd;color:#694916;font-size:11px;flex-shrink:0}
@media(max-height:720px){.app-header{min-height:69px;padding-top:10px;padding-bottom:10px}h1{font-size:26px}.screen{gap:9px;padding-bottom:10px}.panel{padding:12px}.hero h2{font-size:21px;margin:4px 0 9px}.habit span{width:35px;height:35px}.habits{margin-top:7px}.bottom-nav{min-height:63px;padding-top:5px;padding-bottom:max(5px,env(safe-area-inset-bottom))}.bottom-nav button{min-height:47px}.menu-item{min-height:50px;padding:8px 0}.menu-list{padding-top:0;padding-bottom:0}.weekdays button{min-height:42px}.weekdays{margin-top:9px}.signals button{height:32px}.hero .btn{min-height:39px;padding:8px 10px}.phase-label{font-size:11px}}
@media(max-width:350px){.screen{padding-left:12px;padding-right:12px}.app-header{padding-left:15px;padding-right:15px}.panel{padding:11px}.menu-list{padding-top:0;padding-bottom:0}.segment button{font-size:11px}.hero h2{font-size:20px}.sheet-body{padding-left:15px;padding-right:15px}.row{gap:6px}}
@media(min-width:700px){body{background:#e5ece7}.app-shell{border-left:1px solid var(--line);border-right:1px solid var(--line)}dialog{margin:auto;border-radius:24px;max-height:min(90vh,calc(var(--app-height,100dvh) - 20px))}}
@media(prefers-reduced-motion:no-preference){dialog[open]{animation:slide-up .16s ease-out}@keyframes slide-up{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}}

@media(max-height:650px){.app-header{min-height:64px}h1{font-size:24px}.screen{gap:8px;padding-bottom:8px}.screen[data-view=day] .hero h2{font-size:20px;line-height:1.2;-webkit-line-clamp:1;margin-top:0}.screen[data-view=profile] .menu-copy small,.screen[data-view=plan] .menu-copy small{display:none}.screen[data-view=profile] .menu-item,.screen[data-view=plan] .menu-item{min-height:45px}.screen[data-view=profile] .hero h2{font-size:20px}}
.priority-field{padding:0;border:0;margin:16px 0;min-width:0}.priority-field legend{font-size:12px;color:var(--muted);padding:0}.priority-field .priority-help{font-size:11px;color:var(--muted);line-height:1.45;margin:0}.priority-choices button[aria-pressed=true]{background:#fff1d3;border-color:#b89959;color:#6e511a}.priority-badge{font-size:11px;font-weight:600;color:#755922}.priority-today{color:#87511f}.task-focus{border:0;background:none;width:44px;height:44px;color:#83938c;border-radius:12px}.task-focus[aria-pressed=true]{background:#fff1d3;color:#87511f}.task-focus[aria-pressed=true] svg{fill:#e8c886}.mini-task-title{min-width:0}.mini-task .mini-priority{display:inline-block;margin-right:6px;vertical-align:middle;color:#87511f}.mini-priority svg{width:15px;height:15px;fill:#e8c886}
.task-schedule,.task-repeat{border:0;padding:0;margin:16px 0;min-width:0}.task-schedule legend,.task-repeat legend{font-weight:600;font-size:14px}.task-date-row{display:flex;gap:8px;min-width:0}.task-date-row input{min-width:0;flex:1}.task-date-row button{display:flex;align-items:center;gap:5px;flex-shrink:0;padding:8px;font-size:12px}.task-date-row svg{width:18px;height:18px}.task-repeat select{min-width:0}.repeat-interval input{width:86px;min-height:46px;border:1px solid var(--line);border-radius:11px;padding:10px;font-size:16px;color:inherit;background:var(--surface)}.repeat-days{display:flex;gap:4px;margin:12px 0}.repeat-days button{flex:1;min-width:0;min-height:44px;padding:4px 0;border:1px solid var(--line);border-radius:9px;font-size:12px;background:var(--surface);color:inherit}.repeat-days button[aria-pressed=true]{background:var(--ink);color:var(--surface)}.repeat-preview{font-size:12px!important;color:var(--muted)}.task-repeat:disabled{opacity:.7}

.sync-panel .btn{margin:7px 0;white-space:normal}.sync-code{display:block;font:700 28px/1.6 monospace;letter-spacing:3px;text-align:center}.sync-panel p{overflow-wrap:anywhere}

.sync-panel .notice>small,.sync-panel .notice>strong{display:block}.sync-panel .notice>small{margin-top:8px}
@media(max-height:650px){.screen[data-view=profile] .hero .eyebrow,.screen[data-view=profile] .hero small{display:none}.screen[data-view=profile] .hero h2{margin:0}}

.task-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}.task-filters button{min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere}

@media(min-width:900px){.task-filters{grid-template-columns:repeat(6,minmax(0,1fr))}}

:root{--routine-accent:#28665f;--routine-soft:#e5f2ee;--league-accent:#6844a2;--league-soft:#f1eafa}
[data-theme=fire]{--routine-accent:#9bded4;--routine-soft:#183c37;--league-accent:#ddc0ff;--league-soft:#392544}
.task-view-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px;padding:0 2px 8px;font-size:.85rem}.task-view-summary strong{font-weight:600}.task-view-summary small{max-width:55%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.task-filter-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}.task-filter-choices button{min-height:44px;min-width:0;white-space:normal;overflow-wrap:anywhere}.task-filter-trigger{min-height:44px;padding:9px 12px;gap:6px;white-space:nowrap}.task-filter-trigger svg{width:18px;height:18px}
.item-kind{display:inline-flex;align-items:center;gap:4px;vertical-align:middle;border:1px solid currentColor;border-radius:6px;padding:2px 6px;margin-right:6px;font-size:10px;font-weight:650;line-height:1.35;white-space:nowrap}.item-kind-routine{color:var(--routine-accent);background:var(--routine-soft)}.item-kind-league{color:var(--league-accent);background:var(--league-soft)}.item-kind-event{color:var(--muted)}
.task-item.task-routine,.calendar-task.task-routine{border-inline-start:3px dashed var(--routine-accent);padding-inline-start:9px}.mini-task.task-routine{border-inline-start:3px dashed var(--routine-accent);padding-inline-start:7px}.mini-task .item-kind{font-size:9px;margin-left:6px}
.calendar-event.calendar-league{border-inline-start:4px solid var(--league-accent)}.calendar-event .item-kind{font-size:10px;opacity:1;width:fit-content;max-width:100%}.calendar-event.calendar-league strong{font-weight:700}.calendar-event .calendar-event-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;font-size:1rem;opacity:1}.calendar-event-heading .item-kind{flex-shrink:0}.calendar-event-heading strong{min-width:0;overflow-wrap:anywhere}
@media(max-width:380px){.task-filter-trigger{padding:9px 10px}.task-filter-trigger svg{display:none}}

/* v66: one visual-viewport coordinate system; no competing top/bottom anchors. */
dialog{top:var(--sheet-top,8px);bottom:auto;margin:0 auto;height:var(--sheet-height,auto);max-height:calc(var(--app-height,100dvh) - 16px)}
dialog[open]{animation:none}.sheet-body{flex:1;overflow-anchor:none;scroll-behavior:auto;scroll-padding-block:12px}
@media(min-width:700px){dialog{margin:0 auto;max-height:calc(var(--app-height,100dvh) - 16px)}}

/* v67: prevent focus zoom from inherited small labels; preserve user pinch zoom. */
#sheet .sheet-body input:not([type=checkbox]):not([type=radio]),#sheet .sheet-body select,#sheet .sheet-body textarea{font-size:16px;font-size:max(16px,1rem);min-inline-size:0;max-inline-size:100%;box-sizing:border-box}
#sheet{left:var(--sheet-left,0px);right:auto;width:var(--sheet-width,min(100%,620px));max-width:none;margin:0;overflow:hidden}
#sheet .sheet-head,#sheet .sheet-head .row,#sheet .sheet-head h2,#sheet .sheet-body{min-width:0;max-width:100%}
#sheet .sheet-body{overflow-x:hidden}#sheet .sheet-head h2{overflow-wrap:anywhere}
.form-field-label{display:flex;align-items:center;gap:7px;min-width:0;line-height:1.4}
.form-field-label svg{width:18px;height:18px;flex:0 0 18px;color:var(--muted)}
@media(min-width:700px){#sheet{margin:0}}
