:root{--bg:#f7f6f3;--surface:#fff;--surface-2:#efede8;--border:#e3e0d9;--text:#1d1d1f;--muted:#6e6c68;--accent:#0f766e;--accent-soft:#d5ede9;--on-accent:#fff;--danger:#c2410c;--danger-soft:#fbe5da;--p1:#2563eb;--p2:#d97706;--p3:#dc2626;--shadow:0 8px 30px #0000001f;--radius:14px;--tabbar-h:60px;--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#16171a;--surface:#1f2024;--surface-2:#2a2b30;--border:#33343a;--text:#ececee;--muted:#9a9aa2;--accent:#2dd4bf;--accent-soft:#123a36;--on-accent:#06201d;--danger:#fb923c;--danger-soft:#3b2216;--p1:#60a5fa;--p2:#fbbf24;--p3:#f87171;--shadow:0 8px 30px #00000080;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none;margin:0;font:16px/1.4 -apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,Roboto,sans-serif}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:0;padding:0}button:disabled{cursor:default;opacity:.45}input,select,textarea{font:inherit;color:inherit;background:var(--surface);border:1px solid var(--border);border-radius:10px;outline:none;width:100%;padding:10px 12px;font-size:16px}input:focus,select:focus,textarea:focus{border-color:var(--accent)}input[type=checkbox]{width:auto}.app{min-height:100dvh}.content{max-width:640px;padding:calc(var(--safe-t) + 12px) 16px calc(var(--tabbar-h) + var(--safe-b) + 90px);margin:0 auto}.view-header{padding:8px 2px 12px}.view-header h1{letter-spacing:-.02em;margin:0;font-size:30px;line-height:1.15}.subtitle{color:var(--muted);margin:2px 0 0}.progress{color:var(--muted);align-items:center;gap:10px;margin-top:12px;font-size:14px;display:flex}.progress strong{color:var(--accent)}.progress-bar{background:var(--surface-2);border-radius:3px;flex:1;height:6px;overflow:hidden}.progress-bar div{background:var(--accent);border-radius:3px;height:100%;transition:width .4s}.quick-add{margin-bottom:14px}.quick-add-row{gap:8px;display:flex}.quick-add input{border-radius:12px;padding:12px 14px}.add-btn{background:var(--accent);width:46px;color:var(--on-accent);border-radius:12px;flex:none;font-size:26px;font-weight:500;line-height:1}.chips{flex-wrap:wrap;gap:6px;margin-top:8px;display:flex}.chip{background:var(--accent-soft);color:var(--accent);border-radius:999px;padding:3px 9px;font-size:13px}.section{margin-top:18px}.section-title{text-transform:uppercase;letter-spacing:.05em;color:var(--muted);align-items:center;gap:8px;margin:0 2px 6px;font-size:13px;font-weight:600;display:flex}.section-title.danger{color:var(--danger)}.count{background:var(--surface-2);color:var(--muted);border-radius:999px;padding:0 7px;font-size:12px;font-weight:500}.tasks{background:var(--surface);border-radius:var(--radius);border:1px solid var(--border);margin:0;padding:0;list-style:none;overflow:hidden}.tasks:empty{display:none}.task{border-bottom:1px solid var(--border);align-items:flex-start;gap:4px;transition:opacity .25s,transform .25s;display:flex}.task:last-child{border-bottom:0}.task.checking{opacity:.4}.task.projected{opacity:.6}.task.done .task-title{color:var(--muted);text-decoration:line-through}.check{flex:none;place-items:center;width:44px;height:48px;display:grid}.check:before{content:"";border:2px solid var(--muted);border-radius:50%;grid-area:1/1;width:22px;height:22px;transition:background .15s,border-color .15s}.check.p1:before{border-color:var(--p1)}.check.p2:before{border-color:var(--p2)}.check.p3:before{border-color:var(--p3);background:color-mix(in srgb, var(--p3) 10%, transparent)}.check svg{fill:none;width:16px;height:16px;stroke:var(--on-accent);stroke-width:3px;stroke-linecap:round;stroke-linejoin:round;opacity:0;grid-area:1/1}.check.checked:before,.task.checking .check:before{background:var(--accent);border-color:var(--accent)}.check.checked svg,.task.checking .check svg{opacity:1}@media (hover:hover){.check:not(:disabled):hover svg{opacity:.35;stroke:var(--muted)}}.task-body{text-align:left;flex-direction:column;flex:1;gap:3px;min-width:0;padding:12px 14px 12px 0;display:flex}.task-body.static{cursor:default}.task-title{overflow-wrap:anywhere}.task-meta{color:var(--muted);flex-wrap:wrap;gap:4px 10px;font-size:13px;display:flex}.task-meta:empty{display:none}.due.overdue{color:var(--danger);font-weight:500}.repeat{color:var(--accent)}.tag{color:var(--muted)}.empty{text-align:center;color:var(--muted);padding:40px 0 20px}.empty-icon{background:var(--accent-soft);width:56px;height:56px;color:var(--accent);border-radius:50%;place-items:center;margin:0 auto 10px;font-size:28px;display:grid}.muted{color:var(--muted)}.small{font-size:14px}.pad{padding:8px 2px}.cal-header{justify-content:space-between;align-items:center;display:flex}.cal-header h1{font-size:24px}.icon-btn{width:44px;height:44px;color:var(--accent);border-radius:50%;font-size:28px}.today-link{margin:-6px auto 8px;display:block}.cal-grid{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);grid-template-columns:repeat(7,1fr);gap:2px;padding:6px;display:grid}.cal-dow{text-align:center;color:var(--muted);padding:4px 0;font-size:12px}.cal-day{aspect-ratio:1/1.05;border-radius:10px;flex-direction:column;justify-content:center;align-items:center;gap:4px;display:flex}.cal-day.other{opacity:.35}.cal-day .num{border-radius:50%;place-items:center;width:30px;height:30px;font-size:15px;display:grid}.cal-day.today .num{color:var(--accent);font-weight:700}.cal-day.selected .num{background:var(--accent);color:var(--on-accent);font-weight:600}.dots{gap:3px;height:5px;display:flex}.dots i{background:var(--accent);border-radius:50%;width:5px;height:5px}.dots i.projected{box-shadow:inset 0 0 0 1px var(--accent);background:0 0}.dots i.done{background:var(--muted);opacity:.5}.dots i.late{background:var(--danger)}.search{border-radius:12px;margin-bottom:10px}.tag-filter{scrollbar-width:none;gap:6px;margin:0 -16px;padding-bottom:10px;padding-left:16px;padding-right:16px;display:flex;overflow-x:auto}.tag-filter button{background:var(--surface);border:1px solid var(--border);border-radius:999px;flex:none;padding:6px 12px;font-size:14px}.tag-filter button span{color:var(--muted);margin-left:2px}.tag-filter button.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.tag-filter button.on span{color:inherit;opacity:.8}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:14px;padding:16px}.card h2{margin:0 0 10px;font-size:17px}.steps{margin:0;padding-left:20px;line-height:1.8}.row{justify-content:space-between;align-items:center;gap:12px;display:flex}.ok{color:var(--accent);font-weight:600}.setting-row{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding:10px 0;display:flex}.setting-row>span,.switch-row>span{flex-direction:column;display:flex}.setting-row small,.switch-row small{color:var(--muted);font-size:13px}.setting-row input[type=time]{flex:none;width:120px}.setting-row .switch-row{flex:1}.cheats{margin:0;padding-left:18px;font-size:14px;line-height:2}code{background:var(--surface-2);border-radius:6px;padding:2px 6px;font:13px ui-monospace,Menlo,monospace}.pw-form{flex-direction:column;gap:8px;display:flex}.primary{background:var(--accent);color:var(--on-accent);border-radius:12px;padding:12px 18px;font-weight:600}.secondary{background:var(--surface-2);border-radius:10px;padding:10px 14px;font-weight:500}.danger{background:var(--danger);color:#fff;border-radius:12px;padding:12px 18px;font-weight:600}.ghost-danger{color:var(--danger);border-radius:12px;padding:12px 18px}.full{width:100%}.link{color:var(--accent);padding:8px 4px}.link.strong{font-weight:600}.switch-row{justify-content:space-between;align-items:center;gap:12px;display:flex}.switch-row input[type=checkbox]{appearance:none;background:var(--surface-2);cursor:pointer;border:0;border-radius:15px;flex:none;width:48px;height:30px;padding:0;transition:background .2s;position:relative}.switch-row input[type=checkbox]:after{content:"";background:#fff;border-radius:50%;width:24px;height:24px;transition:transform .2s;position:absolute;top:3px;left:3px;box-shadow:0 1px 3px #0000004d}.switch-row input[type=checkbox]:checked{background:var(--accent)}.switch-row input[type=checkbox]:checked:after{transform:translate(18px)}.sheet-backdrop{z-index:20;background:#00000059;justify-content:center;align-items:flex-end;animation:.15s fade;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);width:100%;max-width:640px;max-height:92dvh;padding:8px 16px calc(var(--safe-b) + 20px);box-shadow:var(--shadow);border-radius:18px 18px 0 0;flex-direction:column;gap:12px;animation:.22s ease-out slide-up;display:flex;overflow-y:auto}@media (width>=700px){.sheet-backdrop{align-items:center}.sheet{border-radius:18px}}.sheet-header{background:var(--bg);z-index:1;justify-content:space-between;padding-top:4px;display:flex;position:sticky;top:-8px}.title-input{border:0;border-bottom:1px solid var(--border);background:0 0;border-radius:0;padding:4px 0;font-size:20px;font-weight:600}.notes-input{resize:vertical;min-height:70px}.field-grid{grid-template-columns:1fr 1fr;gap:10px;display:grid}.field,.field-grid label{flex-direction:column;gap:4px;display:flex}.field>span,.field-grid span{color:var(--muted);font-size:13px}.hint{color:var(--muted);margin:-4px 0 0;font-size:13px}.snooze{color:var(--muted);flex-wrap:wrap;align-items:center;gap:6px;font-size:14px;display:flex}.snooze button{background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:999px;padding:5px 11px}.segmented{background:var(--surface-2);border-radius:10px;gap:3px;padding:3px;display:flex}.segmented button{border-radius:8px;flex:1;padding:8px 6px;font-size:14px}.segmented button.on{background:var(--surface);font-weight:600;box-shadow:0 1px 3px #0000001f}.segmented button.on.p1{color:var(--p1)}.segmented button.on.p2{color:var(--p2)}.segmented button.on.p3{color:var(--p3)}.repeat-box{background:var(--surface);border:1px solid var(--border);border-radius:12px;flex-direction:column;gap:10px;padding:12px;display:flex}.repeat-row{align-items:center;gap:8px;display:flex}.repeat-row input{width:72px}.repeat-row select{flex:1}.weekdays{justify-content:space-between;gap:6px;display:flex}.weekdays button{background:var(--surface-2);border-radius:50%;width:38px;height:38px;font-size:14px;font-weight:600}.weekdays button.on{background:var(--accent);color:var(--on-accent)}.sheet-actions{justify-content:space-between;gap:10px;margin-top:4px;display:flex}.sheet-actions .primary{flex:1}.tabbar{z-index:10;height:calc(var(--tabbar-h) + var(--safe-b));padding-bottom:var(--safe-b);background:color-mix(in srgb, var(--bg) 88%, transparent);-webkit-backdrop-filter:blur(16px);border-top:1px solid var(--border);justify-content:space-around;display:flex;position:fixed;bottom:0;left:0;right:0}.tabbar button{color:var(--muted);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:2px;font-size:11px;display:flex}.tabbar svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.tabbar button.on{color:var(--accent)}.toast{z-index:30;left:50%;bottom:calc(var(--tabbar-h) + var(--safe-b) + 14px);background:var(--text);max-width:calc(100% - 32px);color:var(--bg);box-shadow:var(--shadow);border-radius:12px;align-items:center;gap:16px;padding:12px 16px;font-size:15px;animation:.2s ease-out pop;display:flex;position:fixed;transform:translate(-50%)}.toast button{color:var(--accent-soft);font-weight:700}@media (prefers-color-scheme:dark){.toast button{color:var(--accent)}.toast{background:var(--surface-2);color:var(--text)}}.login{max-width:320px;padding:calc(var(--safe-t) + 18vh) 16px 0;flex-direction:column;align-items:center;gap:12px;margin:0 auto;display:flex}.login img{border-radius:16px}.login h1{margin:0 0 8px}.login .primary{width:100%}.error{color:var(--danger);margin:0;font-size:14px}@keyframes fade{0%{opacity:0}}@keyframes slide-up{0%{opacity:.5;transform:translateY(40px)}}@keyframes pop{0%{opacity:0;transform:translate(-50%)translateY(10px)}}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
