:root{font-family:Arial,Helvetica,system-ui,sans-serif;font-synthesis:none;color-scheme:light;--bg: #fafafa;--surface: #fff;--ink: #202124;--muted: #727272;--faint: #a6a6a6;--line: #dadada;--accent: #1674b8;--soft: #eeeeee;background:var(--bg);color:var(--ink);font-size:16px}:root[data-theme=dark]{color-scheme:dark;--bg: #121212;--surface: #161616;--ink: #eee;--muted: #aaa;--faint: #666;--line: #333;--accent: #64b5f6;--soft: #232323}:root[data-theme=dark][data-black=true]{--bg: #000;--surface: #000;--soft: #181818;--line: #282828}@media(prefers-color-scheme:dark){:root[data-theme=system]{color-scheme:dark;--bg: #121212;--surface: #161616;--ink: #eee;--muted: #aaa;--faint: #666;--line: #333;--accent: #64b5f6;--soft: #232323}:root[data-theme=system][data-black=true]{--bg: #000;--surface: #000;--soft: #181818;--line: #282828}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}button{color:inherit;cursor:pointer}.monthly-overview{padding:16px;max-width:1100px;margin:auto}.monthly-habit{padding:14px;margin:12px 0}.monthly-habit>button{border:0;background:none;font-weight:650;font-size:1.05rem;padding:8px 0 12px}.monthly-days{display:grid;grid-template-columns:repeat(31,minmax(24px,1fr));gap:4px;overflow-x:auto}.monthly-days span{display:grid;place-items:center;min-height:32px;border-radius:7px;background:var(--soft);font-size:14px}.monthly-days [data-state=missing]{color:var(--faint)}.monthly-days [data-state=completed],.monthly-days [data-state=value]{color:var(--accent)}.monthly-days [data-state=missed]{color:#e57373}@media(max-width:700px){:root{font-size:17px}.monthly-overview{padding:10px}.monthly-days{grid-template-columns:repeat(31,minmax(28px,1fr))}}button:disabled{opacity:.4;cursor:default}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button{border:1px solid var(--line);border-radius:3px;background:transparent;padding:11px 16px;min-height:44px;font-size:14px}button:hover{background:var(--soft)}h1,h2,p{margin:0}h1{font-size:20px;font-weight:600}h2{font-size:17px;font-weight:500;line-height:1.4}p{font-size:14px;line-height:1.55;margin:12px 0}.muted{color:var(--muted)}small,.small{font-size:12px;line-height:1.4}.eyebrow{font-size:11px;color:var(--muted);font-weight:400;letter-spacing:.2px;margin:0 0 10px}.app-bar{position:relative;display:flex;align-items:center;gap:12px;width:100%;max-width:1240px;min-height:72px;margin:0 auto;padding:12px 24px;background:var(--bg);z-index:5}.app-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bar-actions{display:flex;align-items:center;gap:4px}.icon-button{display:grid;place-items:center;min-height:44px;width:44px;padding:8px;border:0;border-radius:50%;color:var(--ink)}.menu-dismiss{position:fixed;inset:0;width:100%;height:100dvh;background:transparent!important;border:0;z-index:6;cursor:default}.popup-menu{position:absolute;right:20px;top:58px;z-index:7;width:255px;padding:6px 0;background:var(--surface);box-shadow:0 6px 26px #0005;border:1px solid var(--line);border-radius:3px}.popup-menu>button,.popup-menu>label{display:flex;justify-content:space-between;align-items:center;gap:18px;width:100%;min-height:48px;margin:0;padding:10px 18px;text-align:left;border:0;border-radius:0;font-size:14px}.popup-menu>label:hover{background:var(--soft)}.popup-menu select{max-width:145px;font-size:12px;border:0;background:transparent;padding:8px 0}.popup-menu hr{border:0;border-top:1px solid var(--line);margin:4px 0}input[type=checkbox]{accent-color:var(--accent);width:18px;height:18px;flex-shrink:0;cursor:pointer;margin:0}main{max-width:1240px;margin:0 auto;padding:12px 24px 40px;min-height:calc(100dvh - 72px)}.grid-wrap{overflow:auto;width:100%;isolation:isolate;scrollbar-width:thin;scrollbar-color:var(--line) var(--bg)}.habit-grid{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content}.habit-grid th,.habit-grid td{width:68px;min-width:68px;padding:0;text-align:center;border:0}.habit-grid thead th{height:52px;vertical-align:top;font-size:11px;line-height:1.15;font-weight:600;color:var(--muted)}.habit-grid thead th>span{display:block;font-size:10px;text-transform:uppercase;margin-bottom:3px}.habit-grid .habit-title{position:sticky;left:0;z-index:2;width:270px;min-width:270px;background:var(--bg);text-align:left;padding:0 12px 0 0}.habit-grid tbody th,.habit-grid td{height:58px}.habit-label{display:flex;align-items:center;gap:11px;min-height:50px}.color-dot{width:15px;height:15px;border-radius:50%;flex-shrink:0;background:conic-gradient(var(--habit-color) var(--completion),var(--line) 0);position:relative}.color-dot:after{content:"";position:absolute;inset:3px;background:var(--bg);border-radius:50%}.habit-label>button{min-width:0;min-height:44px;border:0;padding:9px 0;text-align:left;flex:1;font-weight:400;background:transparent}.habit-label strong{font-size:14px;font-weight:400;display:block;overflow-wrap:anywhere}.habit-label small{display:none}.reorder{display:flex;gap:0;opacity:0}.habit-label:hover .reorder,.habit-label:focus-within .reorder{opacity:1}.reorder button{padding:0;width:24px;min-height:32px;border:0;font-size:12px;color:var(--muted)}.cell{height:52px;width:100%;min-height:48px;padding:4px 0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0;border:0;border-radius:0;background:none;-webkit-user-select:none;user-select:none;touch-action:pan-x pan-y;overflow:hidden}.cell-value{font-size:17px;font-weight:600;line-height:20px;max-width:100%;overflow:hidden;text-overflow:ellipsis}.cell-unit{font-size:10px;line-height:13px;color:var(--faint);font-weight:400;max-width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.cell.missing{color:var(--faint)}.cell.completed{color:var(--habit-color)}.cell.completed .cell-value{font-size:23px}.cell.value{color:var(--muted)}.cell.value .cell-value{font-size:14px}.cell.missed{color:#bd6b6b}.cell.skipped{color:var(--muted)}.cell:hover{background:var(--soft)}.legend{display:flex;gap:16px;flex-wrap:wrap;color:var(--faint);font-size:11px;margin-top:28px}.legend-tip{margin-left:auto}.empty{max-width:420px;margin:100px auto 0;text-align:center;color:var(--muted);padding:24px}.empty h2{font-size:18px;color:var(--ink)}.empty p{font-size:14px;margin:16px 0 24px}.empty-symbol{display:block;font-size:30px;margin-bottom:18px;color:var(--faint)}.primary{border-color:var(--accent);color:var(--accent);font-weight:600;text-transform:uppercase;font-size:12px;letter-spacing:.7px}.danger{border-color:#d47777;color:#d47777}.text-danger{color:#d47777}.actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center;margin-top:12px}.actions button{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.3px}.offline-status{position:fixed;bottom:0;left:0;right:0;text-align:center;padding:6px;margin:0;background:var(--soft);color:var(--muted);font-size:11px;z-index:4}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}dialog{background:var(--surface);color:var(--ink);border:1px solid var(--faint);border-radius:4px;width:min(480px,calc(100% - 32px));max-height:90dvh;padding:22px;box-shadow:0 18px 60px #0004}dialog::backdrop{background:#0009}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.modal-heading h2{font-size:19px;font-weight:600}.modal-heading button{border:0;font-size:24px;padding:0 8px;min-height:36px}.type-chooser{border:0;background:transparent;box-shadow:none;padding:0;max-width:520px}.type-chooser .modal-heading{margin-bottom:12px}.type-chooser .modal-heading h2{font-size:14px;color:var(--muted)}.type-choice{display:block;width:100%;background:var(--surface);border:2px solid var(--ink);text-align:left;padding:16px 14px;margin:0 0 14px;border-radius:4px}.type-choice strong{display:block;font-size:19px;font-weight:600;margin-bottom:8px}.type-choice span{font-size:14px;line-height:1.5;display:block}form{display:flex;flex-direction:column;gap:19px}form>label,form .form-row>label{position:relative;display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--muted)}form label .muted{font-size:11px}input:not([type=checkbox]),textarea,select{width:100%;min-width:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:13px 12px;border-radius:3px;min-height:48px;font-size:14px}input::placeholder,textarea::placeholder{color:var(--faint)}input[type=color]{width:68px;height:48px;padding:8px}textarea{resize:vertical;min-height:84px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.habit-editor{width:min(600px,calc(100% - 32px))}.entry-editor{max-width:350px}.entry-editor .modal-heading{margin-bottom:8px}.entry-editor .eyebrow{font-size:11px}.entry-editor form{gap:13px}.entry-editor textarea{min-height:66px}.entry-editor input[type=number]{font-size:22px}.entry-editor .actions{gap:5px;justify-content:space-between}.entry-editor .actions button{padding:9px 10px}.entry-editor .actions .primary{margin-left:auto}.error{background:var(--soft);border:1px solid #cc7777;padding:15px;font-size:14px;margin-bottom:20px;line-height:1.6}.error button{margin-left:12px;min-height:36px;font-size:12px}.card{margin:0 0 28px;padding:0;background:none;border:0}.card h2{color:var(--accent);margin:0 0 16px;font-size:15px;font-weight:400}.settings{max-width:780px}.settings h2{margin:14px 0 5px;font-size:13px}.setting{display:flex;align-items:center;justify-content:space-between;gap:32px;min-height:78px;padding:16px 0;font-size:14px}.setting strong{font-size:14px;font-weight:400}.setting small{display:block;color:var(--muted);font-size:13px;max-width:600px;line-height:1.3;margin-top:4px}.setting select{width:auto;max-width:180px;border:0;background:transparent;padding-right:0}.setting input[type=checkbox]{appearance:none;position:relative;width:34px;height:14px;border:0;border-radius:14px;background:#555;flex-shrink:0;margin:0 3px}.setting input[type=checkbox]:before{content:"";position:absolute;left:-2px;top:-3px;width:20px;height:20px;border-radius:50%;background:#bbb}.setting input[type=checkbox]:checked{background:color-mix(in srgb,var(--accent) 35%,transparent)}.setting input[type=checkbox]:checked:before{left:16px;background:var(--accent)}.backup-actions{display:flex;align-items:stretch;flex-direction:column;max-width:780px;gap:2px}.backup-actions button,.file-button{position:relative;display:flex;align-items:center;text-align:left;border:0;border-radius:0;min-height:58px;padding:14px 0;font-weight:400;font-size:14px;color:var(--ink);cursor:pointer}.file-button input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.help{max-width:780px}.help>h1{font-size:24px;margin:14px 0 30px}.help .card h2{margin-top:28px}.help .card p{color:var(--muted)}.detail-intro{margin:14px 0 25px;padding:0 36px}.detail-question{font-size:16px;color:var(--habit-color);margin:0 0 8px}.detail-meta{font-size:12px;color:var(--muted);margin:0}.summary{padding:0 0 22px;margin-bottom:24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;align-items:center}.summary h2{font-size:20px;margin:8px 0}.summary p:not(.eyebrow){font-size:12px;color:var(--muted);margin:8px 0}.summary small{color:var(--muted);font-size:11px}.summary-number{text-align:center;min-width:85px;font-size:28px;color:var(--muted)}.summary-number small{display:block;margin-top:8px;font-size:10px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:0 0 32px}.stats article{font-size:12px;color:var(--muted)}.stats strong{display:block;color:var(--ink);font-size:24px;font-weight:400;margin:12px 0}.stats small{font-size:10px;display:block}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:15px}.section-heading h2{margin:0}.section-heading p{color:var(--faint);font-size:11px;margin:8px 0}.section-heading label{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.section-heading select,.section-heading input{padding:8px;border:0;min-height:44px;width:auto;max-width:180px;color:var(--muted)}.score-chart{width:100%;height:auto;max-height:300px;display:block;overflow:visible;margin:15px 0 20px}.score-chart line{stroke:var(--line);stroke-width:.8}.score-chart text{fill:var(--muted);font-family:inherit;font-size:10px}.score-chart .score-line{stroke-width:2;stroke:var(--habit-color)}.chart{height:180px;display:flex;gap:12px;margin:20px 0 25px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(to top,transparent 0,transparent 43px,var(--line) 44px,transparent 45px)}.chart-column{flex:1;text-align:center;display:flex;flex-direction:column;align-items:center;min-width:0;color:var(--muted);font-size:10px}.bar-track{flex:1;width:70%;max-width:56px;display:flex;align-items:flex-end;margin:7px 0;background:transparent}.bar-track>div{width:100%;opacity:.75}.chart-column small{font-size:10px;white-space:nowrap;padding-bottom:6px}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;max-width:700px;margin:15px auto 0}.weekday{text-align:center;font-size:11px;color:var(--muted);padding:10px 0}.calendar-day{display:flex;flex-direction:column;gap:6px;min-height:64px;text-align:left;padding:8px;font-size:12px;border-color:var(--line)}.calendar-day strong{align-self:center;font-size:15px;color:var(--faint)}.calendar-day.completed strong{color:var(--accent)}.calendar-day.missed strong{color:#d47777}.calendar-day:disabled{opacity:.25}.projection{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.projection>div{background:var(--soft);padding:12px;text-align:center}.projection span,.projection strong,.projection small{display:block;color:var(--muted)}.projection span{font-size:11px}.projection strong{font-size:20px;font-weight:400;margin:10px 0}.projection small{font-size:10px}.prewrap{white-space:pre-wrap}@media(min-width:900px){main:has(.detail-intro){display:grid;grid-template-columns:1fr 1fr;column-gap:50px;align-items:start}main:has(.detail-intro)>.detail-intro,main:has(.detail-intro)>.summary,main:has(.detail-intro)>.stats{grid-column:1/-1}main:has(.detail-intro)>.detail-intro{padding-left:0}.summary{max-width:100%}.habit-editor{padding:28px}.habit-grid tbody tr:hover .habit-title{background:var(--soft)}}@media(max-width:700px){.app-bar{padding:8px 12px;min-height:64px;gap:12px}.app-title{font-size:20px}.bar-actions{gap:0}.icon-button{width:44px}.popup-menu{right:8px;top:52px;width:240px}main{padding:16px 10px 30px;min-height:calc(100dvh - 64px)}.habit-grid .habit-title{width:150px;min-width:150px;padding-right:8px}.habit-grid th,.habit-grid td{min-width:47px;width:47px}.habit-grid thead th{height:40px;font-size:10px}.habit-grid thead th>span{font-size:9px;margin-bottom:2px}.habit-grid tbody th,.habit-grid td{height:50px}.habit-label{gap:8px}.habit-label strong{font-size:14px}.color-dot{width:14px;height:14px}.cell{height:50px}.cell-unit{font-size:10px}.cell-value{font-size:16px}.cell.value .cell-value{font-size:13px}.reorder,.legend{display:none}.empty{margin-top:100px}.habit-editor{position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-height:100dvh;max-width:none;border:0;border-radius:0;padding:16px 10px 32px;box-shadow:none}.habit-editor .modal-heading{margin:0 0 24px;padding:0 6px}.habit-editor .modal-heading h2{font-size:20px}.habit-editor .modal-heading button{min-height:44px}.habit-editor form{gap:20px}.habit-editor .actions{position:sticky;bottom:-32px;margin:0 -10px -32px;padding:16px 10px;background:var(--bg);border-top:1px solid var(--line)}dialog{padding:18px}.type-chooser{width:calc(100% - 30px);padding:0}.type-choice{padding:14px 12px;margin-bottom:14px}.type-choice strong{font-size:18px}.type-choice span{font-size:13px}.entry-editor{max-width:310px}.entry-editor form{gap:12px}.entry-editor .modal-heading h2{font-size:17px}.setting{padding:19px 5px;min-height:90px;gap:28px}.settings h2{padding-left:5px}.settings{margin-bottom:28px}.setting small{font-size:13px}.card:has(.backup-actions)>h2,.card:has(.backup-actions)>p{padding-left:5px}.backup-actions button,.file-button{padding-left:5px}.detail-intro{padding-left:46px;margin:2px 0 26px}.detail-question{font-size:15px}.detail-meta{font-size:12px}.summary{margin:0 8px 24px;padding-bottom:20px}.summary h2{font-size:18px}.summary p:not(.eyebrow){font-size:11px}.stats{gap:15px;padding:0 8px}.stats article{font-size:11px}.stats strong{font-size:23px}.stats small{font-size:10px}.card{margin:0 8px 32px}.settings{margin-left:0;margin-right:0}.card h2{font-size:16px}.settings h2{font-size:13px}.section-heading{gap:12px}.section-heading label{font-size:10px}.section-heading p{max-width:210px;line-height:1.4}.card>p.muted.small{font-size:11px;line-height:1.4}.projection{grid-template-columns:1fr;gap:3px;margin:12px 0}.projection>div{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;min-height:28px}.projection strong{font-size:12px;margin:0}.projection small{max-width:90px}.score-chart{margin-top:18px;min-height:180px}.calendar{gap:4px}.calendar-day{min-height:58px;padding:6px}.chart{gap:6px}.chart-column small{font-size:8px}.help{padding:0 5px}.help>.eyebrow{display:none}.help>h1{font-size:22px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}.grid-wrap.reordering .reorder{display:flex;opacity:1}.score-chart .score-line{stroke-width:2}.name-color-row{display:grid;grid-template-columns:minmax(0,1fr) 68px;gap:10px}.name-color-row>label{position:relative;display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--muted)}.habit-editor form>label,.habit-editor .form-row>label,.habit-editor .name-color-row>label,.habit-editor form>div:not([class])>label{position:relative;display:flex;flex-direction:column}.habit-editor form>label>span:first-child,.habit-editor .form-row>label>span:first-child,.habit-editor .name-color-row>label>span:first-child,.habit-editor form>div:not([class])>label>span:first-child{position:absolute;left:11px;top:-7px;background:var(--surface);padding:0 4px;z-index:1;font-size:11px}.habit-editor input,.habit-editor select,.habit-editor textarea{padding-top:18px;min-height:58px}.habit-editor input[type=color]{padding:12px;width:68px}.habit-editor .modal-heading{position:relative;padding-left:40px;padding-right:85px;min-height:44px}.habit-editor .modal-heading>button{position:absolute;left:0;top:0;width:32px;display:grid;place-items:center}.habit-editor .actions .primary{position:absolute;right:20px;top:20px;min-width:80px;min-height:36px;padding:8px 12px;border-color:var(--ink);color:var(--ink)}.habit-editor .type-setting{margin-top:3px}.projection-note{font-size:11px;margin:0 0 12px!important}.target-card{max-width:100%}.projection>div{padding:4px 10px}.projection strong{font-size:13px;margin:5px 0}.projection small{display:none}@media(max-width:700px){.habit-editor .actions .primary{position:fixed;top:20px;right:16px}.habit-editor .actions{position:static;border:0;padding:0 10px;margin:0;justify-content:flex-start}.habit-editor .actions .primary{z-index:2}.habit-editor .modal-heading{padding-left:40px;padding-right:100px}.habit-editor form{padding-top:4px}.projection{gap:3px}.target-card h2{margin-bottom:10px}.target-card .projection>div{min-height:22px;padding:3px 10px}}.chart-explainer{color:var(--muted);font-size:11px;margin:0 0 18px}.chart-explainer summary{cursor:pointer;min-height:32px;padding:6px 0}.chart-explainer p{font-size:11px}@media(max-width:700px){.projection>div{height:22px;min-height:22px}.projection strong{margin:0;font-size:11px}}.entry-editor form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.entry-editor form>label{font-size:11px}.entry-editor .entry-note{grid-column:1/-1;order:-1}.entry-editor .entry-note textarea{min-height:70px}.entry-editor form:not(:has(input[type=number]))>label{grid-column:1/-1}.entry-editor .actions{grid-column:1/-1;gap:3px;margin-top:0}.entry-editor .actions button{padding:8px 10px;min-height:40px;border-color:var(--line);letter-spacing:0}.entry-editor .actions .primary{border-color:var(--accent)}.entry-editor input[type=number]{font-size:19px;min-height:48px}.entry-editor select{min-height:48px;padding:10px 5px;font-size:12px}.numeric-entry{width:min(440px,calc(100% - 32px));max-width:none;padding:22px;border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:auto}.numeric-entry .modal-heading{margin-bottom:8px}.numeric-entry form{display:flex;flex-direction:column;gap:18px}.entry-date{color:var(--muted);margin:0 0 20px;font-size:14px}.numeric-total,.numeric-notes{display:flex;flex-direction:column;gap:8px;margin:0}.numeric-total>span,.numeric-notes>span{font-size:14px}.numeric-total input{min-height:64px;padding:12px 16px;font-size:28px;appearance:textfield}.numeric-notes textarea{min-height:88px;padding:12px;resize:vertical;font-size:16px}.numeric-actions{order:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.numeric-actions button{min-height:48px;padding:10px 6px;font-size:14px}.numeric-actions .primary{grid-column:1 / -1;order:1;font-size:16px}.numeric-advanced{order:1;color:var(--muted)}.numeric-advanced summary{cursor:pointer;min-height:44px;padding:12px 0;font-size:14px}.numeric-advanced button{width:100%;min-height:48px;font-size:14px}.numeric-entry .error{padding:12px;font-size:14px}.modal-heading>button{min-width:44px;min-height:44px;flex-shrink:0}.discard-prompt{position:sticky;top:0;z-index:5;border:1px solid var(--accent);border-radius:12px;padding:14px;margin-bottom:18px;background:var(--surface)}.discard-prompt p{margin:0 0 12px}.discard-prompt .actions{position:static!important;padding:0!important;margin:0!important;display:flex;flex-wrap:wrap;gap:8px;border:0}.discard-prompt button{min-height:48px;flex:1}.habit-editor .actions .primary{position:static;min-height:48px}.habit-editor .modal-heading{padding-right:0}.habit-editor .actions{display:flex;gap:12px;justify-content:flex-end}.habit-editor .actions>button{min-height:48px}@media(max-width:700px){dialog:not(.habit-editor){background:var(--surface);position:fixed;inset:auto 0;top:calc(var(--viewport-top, 0px) + var(--viewport-height, 100dvh));transform:translateY(-100%);margin:0 auto;width:100%;max-width:none;max-height:calc(var(--viewport-height, 100dvh) - 12px);border-radius:22px 22px 0 0;border:1px solid var(--line);border-bottom:0;padding:20px 18px max(20px,env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;scroll-padding:20px;box-sizing:border-box}dialog .modal-heading h2{font-size:20px;overflow-wrap:anywhere}dialog input:not([type=color]),dialog select,dialog textarea{font-size:16px}dialog button{min-height:48px}dialog .actions{flex-wrap:wrap;gap:10px}.type-chooser .type-choice{width:100%;margin:8px 0;padding:18px;border-radius:12px}.entry-editor form{gap:18px}.entry-editor .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.entry-editor .actions .primary{grid-column:1 / -1}.numeric-total input{font-size:28px!important}.numeric-entry form{gap:16px}.numeric-entry .numeric-actions{position:sticky;bottom:-20px;padding:12px 0 max(20px,env(safe-area-inset-bottom));margin-bottom:-20px;background:var(--surface);z-index:2}.habit-editor{top:var(--viewport-top, 0px);bottom:auto;height:var(--viewport-height, 100dvh);max-height:var(--viewport-height, 100dvh);padding:0;display:flex;flex-direction:column;overflow:hidden}.habit-editor .modal-heading{position:relative;flex-shrink:0;margin:0;padding:18px 18px 18px 62px;border-bottom:1px solid var(--line)}.habit-editor .modal-heading>button{top:12px;left:10px;width:44px}.habit-editor>form{flex:1;min-height:0;overflow:auto;padding:24px 18px 0;gap:24px;scroll-padding:24px;overscroll-behavior:contain}.habit-editor .actions{position:sticky;bottom:0;margin:0 -18px;padding:14px 18px max(14px,env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);z-index:3}.habit-editor .actions>button{flex:1}.habit-editor>.discard-prompt{flex-shrink:0;margin:12px 18px 0}}.update-ready{position:fixed;bottom:18px;right:18px;z-index:8;background:var(--surface);border-color:var(--accent);color:var(--accent)}.update-dialog{max-width:390px}.update-dialog p{color:var(--muted)}.sync-status{position:fixed;bottom:12px;left:12px;z-index:4;max-width:calc(100vw - 150px);min-height:32px;padding:6px 10px;font-size:11px;background:var(--surface);color:var(--muted);border-color:var(--line)}.cloud-panel .actions{justify-content:flex-start}.cloud-panel p{font-size:13px}.ritual-wordmark{display:flex;align-items:center;gap:14px;margin:6px 0 20px}.ritual-wordmark img{border-radius:11px}.ritual-wordmark span{font-size:29px;font-weight:500;letter-spacing:-1px}.login-page{min-height:100dvh;max-width:none;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px 24px;background:radial-gradient(ellipse at 50% 0%,#c5a5e412 0,transparent 55%),var(--bg)}.login-card{width:100%;max-width:380px;text-align:center}.login-logo{display:block;margin:0 auto 24px;border-radius:22px}.login-kicker{color:var(--muted);font-size:10px;letter-spacing:2.2px;margin:0 0 14px}.login-card h1{font-size:32px;font-weight:500;letter-spacing:-1px;line-height:1.2}.login-intro{font-size:15px;line-height:1.7;color:var(--muted);margin:18px 0 30px}.google-sign-in{display:flex;align-items:center;justify-content:center;position:relative;gap:12px;background:#fff;color:#1f1f1f;border:1px solid #747775;border-radius:4px;min-height:48px;width:100%;font-size:14px;font-weight:500;padding:12px 16px}.google-sign-in:hover{background:#f2f2f2}.google-sign-in img{object-fit:contain;position:absolute;left:14px}.login-divider{display:flex;align-items:center;gap:14px;color:var(--faint);font-size:12px;margin:23px 0 16px}.login-divider:before,.login-divider:after{content:"";height:1px;background:var(--line);flex:1}.device-sign-in{border:0;background:none;color:var(--ink);width:100%;font-size:14px;min-height:44px}.login-local-note{font-size:12px;line-height:1.6;color:var(--muted);margin:8px 0 30px}.login-benefits{display:flex;flex-wrap:wrap;justify-content:center;gap:15px;color:var(--faint);font-size:10px;border-top:1px solid var(--line);padding-top:22px}.login-footer{margin:50px 0 0;color:var(--faint);font-size:11px}.login-status{font-size:12px;color:var(--muted);margin:14px 0;line-height:1.5}.login-error{font-size:13px;text-align:left;line-height:1.55;color:#edaaaa;background:#bc5a5a15;border:1px solid #bc5a5a55;border-radius:4px;padding:12px;margin:15px 0 0}.login-page .google-sign-in:disabled{opacity:.65}@media(max-width:450px){.login-page{padding:32px 24px 24px}.login-card h1{font-size:30px}.login-footer{margin-top:34px}}.today-shortcut{min-height:44px;padding:8px 10px;color:var(--accent);font-size:14px}.habit-grid th.today{color:var(--accent);box-shadow:inset 0 -2px var(--accent)}.habit-grid th.today:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.sync-status{display:flex;flex-direction:column;align-items:flex-start;gap:3px;max-width:calc(100vw - 130px);text-align:left}.sync-status small{font-size:10px;color:var(--muted)}.sync-recovery-hint{color:var(--accent)!important;font-size:13px!important;font-weight:650}.habit-grid thead th{font-size:13px}.habit-grid thead th>span{font-size:12px}.habit-grid tbody th,.habit-grid td{height:64px}.habit-cell,.habit-grid td button,.habit-label strong{font-size:17px}@media(max-width:700px){.habit-grid thead th{font-size:12px}.habit-grid thead th>span{font-size:11px}.habit-grid th,.habit-grid td{min-width:54px;width:54px}.habit-grid tbody th,.habit-grid td{height:58px}.habit-label strong{font-size:16px}.sync-status{font-size:14px;min-height:44px}.sync-status small{font-size:12px}}.review-nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}.review-nav button{min-height:44px}.weekly-review{max-width:900px;margin:auto;padding-bottom:70px}.weekly-review>h2{font-size:20px}.review-habit{margin:20px 0}.review-habit-name{font-size:20px;font-weight:600;padding:8px 0;border:0;text-align:left}.review-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:16px 0}.review-days>div{display:flex;flex-direction:column;gap:8px;align-items:center;border:1px solid var(--line);padding:10px 2px;border-radius:8px}.review-days small{font-size:11px;color:var(--muted)}.review-days strong{font-size:16px;overflow-wrap:anywhere;max-width:100%}.review-days [data-state=completed]{color:var(--accent)}.review-days [data-state=missing]{color:var(--muted);border-style:dashed}.review-rates{display:flex;gap:24px;flex-wrap:wrap}.review-rates p{display:flex;flex-direction:column;gap:5px}.review-rates strong{font-size:24px}.review-rates span{font-size:12px;color:var(--muted)}.reminder-settings fieldset{border:1px solid var(--line);border-radius:10px;margin:18px 0;padding:12px;min-width:0}.reminder-settings legend{padding:0 6px;overflow-wrap:anywhere}.reminder-settings input[type=time]{font-size:16px;min-height:48px}.reminder-days{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.reminder-days label{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:64px;padding:6px;border:1px solid var(--line);border-radius:8px;font-size:12px}.reminder-settings .actions{flex-wrap:wrap}.reminder-settings .actions button{min-height:48px}@media(max-width:450px){.today-shortcut{padding:8px;font-size:12px}.app-bar{gap:8px}.review-days{gap:4px}.review-days strong{font-size:14px}.review-nav button{font-size:12px;padding:10px}}.pause-badge{display:inline-block;margin-left:8px;padding:3px 6px;border:1px solid var(--line);border-radius:6px;color:var(--muted);font-size:10px;font-weight:400;vertical-align:middle}.habit-paused .color-dot{opacity:.4}.paused-cell{color:var(--muted);background:var(--surface)}.history-toolbar{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:12px 0 22px;padding:14px;border:1px solid var(--accent);border-radius:12px}.history-toolbar label{display:flex;flex-direction:column;gap:8px;font-size:13px}.history-toolbar input{font-size:16px;min-height:44px}.history-toolbar p{font-size:12px;color:var(--muted);margin:0;max-width:260px}
