/* MOMENTUM 3.9 — iPhone-first hierarchy; original web components. */
:root,html[data-theme="light"],html[data-theme="auto"]{
 --bg:#f2f2f7;--surface:#fff;--surface-2:#f2f2f7;--field:#f2f2f7;
 --text:#1c1c1e;--ink:#1c1c1e;--dark:#1c1c1e;--muted:#68686f;--secondary:#68686f;
 --border:#e5e5ea;--line:#e5e5ea;--elevated:#fff;--brand-blue:#007aff;--lime:#007aff;
 --brand-navy:#1c1c1e;--interactive:#007aff;--blue-wash:#eaf3ff;--mint:#248a3d;--success:#248a3d;
 --soft-mint:#eaf7ed;--nav-glass:rgba(250,250,252,.88);--nav-stroke:rgba(255,255,255,.9);
 --shadow-color:transparent;--focus-ring:#007aff;
 font-family:-apple-system,BlinkMacSystemFont,system-ui,"Segoe UI",sans-serif;
}
html[data-theme="dark"]{
 --bg:#000;--surface:#1c1c1e;--surface-2:#2c2c2e;--field:#2c2c2e;--elevated:#1c1c1e;
 --text:#f5f5f7;--ink:#f5f5f7;--dark:#f5f5f7;--muted:#aaaab2;--secondary:#aaaab2;
 --border:#38383a;--line:#38383a;--brand-blue:#0a84ff;--lime:#0a84ff;--interactive:#0a84ff;
 --brand-navy:#f5f5f7;--blue-wash:#152d47;--mint:#30d158;--success:#30d158;--soft-mint:#163421;
 --nav-glass:rgba(35,35,37,.9);--nav-stroke:rgba(255,255,255,.13);--focus-ring:#64aaff;
}
@media(prefers-color-scheme:dark){html[data-theme="auto"]{
 --bg:#000;--surface:#1c1c1e;--surface-2:#2c2c2e;--field:#2c2c2e;--elevated:#1c1c1e;
 --text:#f5f5f7;--ink:#f5f5f7;--dark:#f5f5f7;--muted:#aaaab2;--secondary:#aaaab2;
 --border:#38383a;--line:#38383a;--brand-blue:#0a84ff;--lime:#0a84ff;--interactive:#0a84ff;
 --brand-navy:#f5f5f7;--blue-wash:#152d47;--mint:#30d158;--success:#30d158;--soft-mint:#163421;
 --nav-glass:rgba(35,35,37,.9);--nav-stroke:rgba(255,255,255,.13);--focus-ring:#64aaff;
}}
body{font-size:17px;letter-spacing:-.015em;line-height:1.47}
.app-shell,.main-area{background:var(--bg);color:var(--text)}
.sidebar{background:var(--bg)!important;box-shadow:none!important;border-color:var(--line)!important}
.brandname{letter-spacing:.02em;font-size:16px;color:var(--text)!important}
.brandsub{font-size:9px;color:var(--muted)}
.nav-item.active{background:var(--blue-wash)!important;color:var(--brand-blue)!important;box-shadow:none!important}
.nav-item{border-radius:11px;font-weight:600}
.sidebar .brandmark{background:var(--surface)!important;border:0!important}
.topbar{min-height:80px;padding-bottom:0}
.topbar .eyebrow{font-size:13px;letter-spacing:0;font-weight:500;color:var(--muted)}
.header-brand{font-size:14px!important;letter-spacing:.025em!important;font-weight:650!important;color:var(--muted)}
.header-mark{width:22px;height:22px}
.icon-btn,.round-icon{border:0!important;border-radius:50%;box-shadow:none!important;background:var(--surface)!important;color:var(--brand-blue)!important}
.content-area{padding-top:12px}
.welcome,.page-head{margin:10px 0 28px;align-items:center}
.welcome h2,.page-head h2{font-size:36px;line-height:1.13;letter-spacing:-.035em;font-weight:750;margin:0;color:var(--text)}
.welcome .section-kicker{display:none}
.welcome p,.page-head p{font-size:15px;line-height:1.45;margin-top:8px;color:var(--muted)}
.welcome>.round-icon{display:none}
.panel,.project,.report-tile,.focus-card,.overview-tile,.day-guide{border:0!important;box-shadow:none!important;background:var(--surface)!important;color:var(--text);border-radius:20px}
.panel{padding:24px}.panel-title{font-size:20px;letter-spacing:-.025em;font-weight:700;margin-bottom:18px}
.panel-title small{font-size:13px;font-weight:400;color:var(--muted)}
.action{background:var(--brand-blue)!important;color:#fff!important;border:0!important;box-shadow:none!important;border-radius:100px;min-height:48px;font-size:16px;font-weight:600;letter-spacing:-.015em;padding:12px 20px}
.action.secondary,.action.ghost{background:var(--blue-wash)!important;color:var(--brand-blue)!important;border:0!important}
.action.danger{background:var(--surface-2)!important;color:#e03038!important}
.action.small{font-size:14px;min-height:44px}
.inline-link{color:var(--brand-blue)!important;font-size:15px;font-weight:500;min-height:44px}
.experience-hero,.empty-hero{background:var(--surface)!important;color:var(--text);border:0;border-radius:24px;box-shadow:none!important;min-height:230px;padding:28px;margin-bottom:18px}
.experience-hero:before,.experience-hero:after{display:none}
.experience-hero h2{color:var(--text);font-weight:700;font-size:32px;letter-spacing:-.035em;margin:20px 0 10px}
.experience-hero .hero-first,.empty-hero p,.hero-time,.hero-time-range,.overline,.empty-hero .hero-info{color:var(--muted)!important}
.hero-time{font-weight:500;font-size:13px}.hero-count{color:var(--text)!important;font-size:44px;font-weight:400;letter-spacing:-.04em}
.hero-topline{color:var(--text)!important}.live-pill{background:var(--soft-mint);color:var(--success)!important;border:0;letter-spacing:.03em;font-size:11px}
.live-pill i{background:var(--success)}
.hero-symbol{color:var(--brand-blue);opacity:1;background:var(--blue-wash);border:0;border-radius:25px;width:90px;height:90px}
.hero-symbol .icon{width:40px;height:40px}
.hero-buttons{gap:8px}.hero-bottom{margin-top:28px}
.overview-grid{gap:12px;margin-bottom:24px}
.overview-tile{padding:18px;display:flex;flex-direction:column;gap:0;position:relative}
.overview-tile .ov-icon{width:30px;height:30px;border-radius:50%;margin-bottom:14px;background:var(--blue-wash)!important;color:var(--brand-blue)!important}
.overview-tile:nth-child(2) .ov-icon{background:var(--soft-mint)!important;color:var(--success)!important}
.overview-tile strong{font-size:32px;font-weight:650;letter-spacing:-.04em;color:var(--text)}
.overview-tile small{font-size:13px;font-weight:600;margin-top:5px}.overview-tile>span{font-size:12px;color:var(--muted);line-height:1.4;margin-top:4px}
.home-grid,.home-grid>div{gap:20px}
.momentum-coach{background:var(--surface)!important}.momentum-coach h3{font-size:27px;font-weight:650;letter-spacing:-.035em}
.coach-icon{background:var(--blue-wash)!important;color:var(--brand-blue)!important;border-radius:50%}
.momentum-coach p{font-size:15px;color:var(--muted)}
.section-kicker,.eyebrow{font-size:11px;font-weight:600;letter-spacing:.07em;color:var(--muted)!important}
.soft-note,.notice,.focus-prompt,.first-step,.closing-next{background:var(--surface-2)!important;color:var(--muted)!important;border:0!important;border-radius:12px;padding:14px;font-size:14px;line-height:1.5}
.soft-note{background:transparent!important;padding:6px 0 18px}
.task-list,.habit-list,.day-list{gap:0}
.task,.habit{border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0;background:transparent!important;padding:15px 0;box-shadow:none;margin:0!important;min-height:76px}
.task:last-child,.habit:last-child{border-bottom:0!important}
.task-title,.habit .label{font-size:17px;font-weight:500;line-height:1.4}.task-meta,.habit small{font-size:13px;font-weight:400}
.tick-box{width:30px;height:30px;border-radius:50%;border:1.5px solid var(--muted);background:transparent!important;color:#fff!important}
.tick-box.checked{background:var(--brand-blue)!important;border-color:var(--brand-blue)}
.habit-check{border-radius:50%;background:var(--surface-2);border-color:var(--line);color:var(--brand-blue)}
.habit-check.yes{background:var(--soft-mint)!important;color:var(--success)!important;border:0}
.more-btn,.small-round{background:transparent!important;border:0!important;color:var(--brand-blue)!important;border-radius:50%;box-shadow:none}
.small-round.is-done{background:var(--soft-mint)!important;color:var(--success)!important}
.mini-pill,.now-pill{background:var(--blue-wash)!important;color:var(--brand-blue)!important;font-weight:500}
.tabs{gap:5px}.tab{border:0!important;border-radius:9px;background:var(--surface-2)!important;font-size:14px;font-weight:500;padding:9px 14px;color:var(--muted)!important}
.tab.active{background:var(--surface)!important;color:var(--text)!important;box-shadow:0 1px 4px #0000001a}
.segmented{border:0;background:var(--surface-2);border-radius:11px;padding:3px}.segment{border-radius:8px;font-weight:500}
.segment.active{background:var(--surface)!important;color:var(--text)!important}
.date-strip{border:0;border-radius:15px;background:var(--surface);padding:9px 12px;margin-bottom:24px}.date-strip strong{font-size:17px;font-weight:600}.date-strip small{font-size:13px}
.agenda-status span{background:transparent!important;color:var(--muted)!important;padding:3px 0;margin-right:12px}
.agenda-group-title h3{font-size:22px;font-weight:700;letter-spacing:-.02em}
.day-list{background:var(--surface);border-radius:20px;overflow:hidden;padding:0 18px}
.routine-card{border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0;box-shadow:none!important;background:transparent!important;min-height:91px;padding:17px 0;gap:13px}
.routine-card:last-child{border-bottom:0!important}.routine-card.active-now{background:var(--blue-wash)!important;margin:0 -18px;padding:17px 18px;border-radius:0}
.routine-hour{min-width:49px}.routine-hour strong{font-weight:600;font-size:15px;color:var(--text)}.routine-hour small{font-size:12px}
.routine-name{font-size:16px;font-weight:600}.routine-kind{font-size:13px;line-height:1.45}.routine-status{color:var(--success)}
.routine-buttons{gap:0}.routine-buttons .small-round{width:44px;min-width:44px;height:44px}
.focus-card{padding:32px 24px}.focus-card h2{font-size:27px;font-weight:600}.focus-card p{font-size:15px;line-height:1.5}
.ring{padding:5px;background:conic-gradient(var(--brand-blue) var(--progress,0%),var(--surface-2) 0);height:280px;width:280px;margin:32px auto}
.ring-inner{background:var(--surface)}.ring-time{font-size:72px;font-weight:300;letter-spacing:-.055em;color:var(--text)}.ring-inner small{font-size:11px;letter-spacing:.06em}
.focus-actions{margin-top:22px}.focus-actions .action{min-width:130px}
.sheet{border:0!important;background:var(--surface)!important;box-shadow:0 25px 80px #0003!important;border-radius:28px;width:min(540px,calc(100% - 30px))}
.sheet::backdrop{background:#0005;backdrop-filter:blur(6px)}
.sheet-content{padding:28px}.sheet-head{margin-bottom:24px;gap:20px}.sheet-head h2{font-size:24px;font-weight:700;line-height:1.2;letter-spacing:-.025em}
.sheet-head .icon-btn{background:var(--surface-2)!important;color:var(--muted)!important;width:36px;height:36px;min-width:36px;min-height:36px}
.field label{font-size:14px;font-weight:500;color:var(--muted)}
.field input,.field textarea,.field select{border:1px solid transparent;background:var(--field);border-radius:12px;padding:14px;font-size:17px;min-height:50px;color:var(--text)}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--brand-blue)}
.form{gap:20px}.setting-row{padding:18px 0}.setting-row strong{font-size:16px;font-weight:500}.setting-row small{font-size:13px;line-height:1.5}
.switch input:checked+span{background:#34c759!important}.switch input:focus-visible+span{outline:3px solid var(--focus-ring);outline-offset:3px}
.empty{font-size:15px;padding:30px 14px}.empty strong{font-size:18px;font-weight:600}.footer-note{font-size:13px}
.report-lead{background:var(--surface)!important;color:var(--text)!important;border:0}.report-lead h3,.report-lead p{color:var(--text)!important}
.alert-status,.alert-controls{background:var(--surface)!important;border:0!important}.alert-status p{font-size:15px}
.bar{background:var(--surface-2)}.bar.has{background:var(--brand-blue)}.toast{background:var(--text);color:var(--surface);font-size:15px;font-weight:500;border-radius:100px;box-shadow:0 4px 24px #0002}
button{transition:background-color .16s,transform .16s,opacity .16s}button:active{opacity:.7}
@media(max-width:690px){
 .topbar{padding:calc(14px + env(safe-area-inset-top,0px)) 22px 0;min-height:76px;gap:8px}
 .topbar .eyebrow{font-size:12px}.header-brand{margin-top:4px!important;font-size:12px!important}.header-mark{width:18px;height:18px}
 .head-actions{gap:8px}.head-actions .icon-btn{width:44px;height:44px}
 .content-area{padding:16px 20px calc(125px + env(safe-area-inset-bottom,0px))}
 .welcome,.page-head{margin:4px 0 25px;gap:12px}.welcome h2,.page-head h2{font-size:34px;letter-spacing:-.035em}
 .welcome p,.page-head p{font-size:15px}.welcome p{max-width:280px}
 .page-head .action{min-height:44px;font-size:14px;padding:10px 15px}
 .panel{padding:20px}.panel-title{font-size:20px}
 .experience-hero,.empty-hero{padding:24px;min-height:245px;border-radius:22px;align-items:flex-start}
 .experience-hero h2{font-size:29px}.empty-hero h2{font-size:28px}.empty-hero p{font-size:15px}.empty-hero .hero-symbol{display:none}
 .hero-buttons{justify-content:flex-start}.hero-bottom{align-items:flex-start;flex-direction:column;gap:18px}.hero-buttons>.action{font-size:15px}
 .overview-grid{gap:8px;margin-bottom:24px}.overview-tile{padding:15px 12px;border-radius:17px}.overview-tile strong{font-size:29px}.overview-tile small{font-size:12px}.overview-tile>span{font-size:11px;line-height:1.45}
 .overview-tile .ov-icon{margin-bottom:12px;width:29px;height:29px}
 .home-grid,.home-grid>div{gap:20px}.momentum-coach h3{font-size:26px}
 .mobile-nav{left:14px;right:14px;bottom:calc(10px + env(safe-area-inset-bottom,0px));border-radius:100px;background:var(--nav-glass);border:1px solid var(--nav-stroke);padding:5px 6px;box-shadow:0 4px 24px #00000014;backdrop-filter:blur(24px) saturate(1.5);-webkit-backdrop-filter:blur(24px) saturate(1.5);gap:2px}
 .mobile-link{border-radius:100px;min-height:59px;padding:7px 2px;gap:4px;color:var(--muted)!important;font-size:10px;font-weight:500}
 .mobile-link.active{color:var(--brand-blue)!important;background:var(--blue-wash)!important}.mobile-link .icon{width:24px;height:24px;stroke-width:1.8}
 .sheet{width:100%;max-width:100%;max-height:calc(94dvh - env(safe-area-inset-top,0px));margin:auto auto 0;border-radius:28px 28px 0 0!important;padding-bottom:env(safe-area-inset-bottom,0px)}
 .sheet-content{padding:28px 22px 30px}.sheet-head h2{font-size:23px}.sheet-head{margin-bottom:26px}
 .sheet-content:before{content:"";display:block;width:36px;height:5px;border-radius:100px;background:var(--line);margin:-16px auto 21px}
 .focus-card{padding:27px 16px}.ring{width:min(260px,100%);height:auto;aspect-ratio:1}.ring-time{font-size:66px}.focus-card h2{font-size:25px}
 .day-list{padding:0 14px}.routine-card{gap:9px}.routine-card.active-now{margin:0 -14px;padding-left:14px;padding-right:14px}.routine-name{font-size:15px}.routine-kind{font-size:12px}
 .routine-buttons{flex-direction:column;gap:0}.routine-buttons .small-round{height:44px;width:44px;min-height:44px;min-width:44px}
 .day-guide{padding:18px}.guide-info strong{font-size:17px}.guide-info small{font-size:14px}
 .report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-tile{padding:18px}
}
@media(max-width:360px){.content-area{padding-left:16px;padding-right:16px}.welcome h2,.page-head h2{font-size:32px}.overview-tile{padding:13px 10px}.overview-tile small{font-size:11px}.mobile-nav{left:9px;right:9px}.mobile-link{font-size:9px}.form-row{grid-template-columns:1fr}}
@media(prefers-reduced-transparency:reduce){.mobile-nav{background:var(--surface)!important;backdrop-filter:none;-webkit-backdrop-filter:none}.sheet::backdrop{backdrop-filter:none}}
@media(prefers-contrast:more){.panel,.overview-tile,.day-list,.sheet{outline:1px solid var(--muted)}.mobile-nav{border-color:var(--muted)}}
@media(prefers-reduced-motion:reduce){button{transition:none}button:active{transform:none}}

/* Accessible controls and narrow-screen resilience. */
button.task-main{appearance:none;border:0;background:transparent;color:inherit;font:inherit;text-align:left;padding:6px 0;min-height:44px;cursor:pointer}
.sheet-head .icon-btn{width:44px;height:44px;min-width:44px;min-height:44px;flex-shrink:0}
.inline-link,.more-btn,.tick-box{min-height:44px}.more-btn,.tick-box{min-width:44px}
.task-title,.routine-name,.sheet-head h2,.setting-row strong,.setting-row small{overflow-wrap:anywhere}
@media(max-width:420px){.setting-row{flex-wrap:wrap}.setting-row>div:first-child{flex:1 1 180px}.setting-row select{max-width:100%;font-size:16px}.ring{width:min(280px,100%);height:auto;aspect-ratio:1}.quiet-pair{flex-wrap:wrap}.report-detail-row{flex-wrap:wrap}.report-detail-row strong{margin-left:auto}}

button.task-main .task-title,button.task-main .task-meta{display:block}
