:root{--brand:#475569;--brand-strong:#334155;--brand-hover:#334155;--brand-darker:#1e293b;--brand-soft:#e6ebf2;--brand-soft-2:#d7deea;--brand-ink:#ffffff;--on-soft:#334155;--bg:#f4f6f8;--bg-glow:#eef1f5;--header-bg:rgba(255,255,255,0.82);--surface:#ffffff;--surface-2:#f6f8fa;--ink:#1e293b;--ink-2:#334155;--muted:#64748b;--line:#e2e8f0;--line-strong:#cbd5e1;--placeholder:#94a3b8;--overdue:#b45309;--overdue-tint:#fdf6ec;--overdue-line:#f3d9a8;--due:#334155;--due-tint:#e6ebf2;--due-line:#d7deea;--done:#15803d;--done-tint:#ecfdf3;--done-line:#b6e6c8;--danger:#b91c1c;--danger-tint:#fdf1f1;--danger-line:#f2c4c4;--r-xs:8px;--r-sm:10px;--r:14px;--r-lg:18px;--r-xl:24px;--r-pill:999px;--shadow-sm:0 1px 2px rgba(15,23,42,0.06);--shadow:0 1px 3px rgba(15,23,42,0.08),0 6px 16px -6px rgba(15,23,42,0.12);--shadow-lg:0 12px 34px -10px rgba(15,23,42,0.24);--ring:0 0 0 3px rgba(71,85,105,0.35);--font:"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji",sans-serif;color-scheme:light}:root[data-theme=dark]{--brand:#cbd5e1;--brand-strong:#cbd5e1;--brand-hover:#b8c4d4;--brand-darker:#e2e8f0;--brand-soft:#1f2a3a;--brand-soft-2:#27344a;--brand-ink:#0f172a;--on-soft:#cbd5e1;--bg:#0f172a;--bg-glow:#131f36;--header-bg:rgba(15,23,42,0.72);--surface:#1a2438;--surface-2:#212c42;--ink:#f1f5f9;--ink-2:#cbd5e1;--muted:#94a3b8;--line:#2a374d;--line-strong:#3a4a63;--placeholder:#64748b;--overdue:#e3a94f;--overdue-tint:#2d2412;--overdue-line:#5a4622;--due:#cbd5e1;--due-tint:#1f2a3a;--due-line:#27344a;--done:#56d68a;--done-tint:#123021;--done-line:#2f5e42;--danger:#f0776f;--danger-tint:#2d1817;--danger-line:#5a2c29;--shadow-sm:0 1px 2px rgba(0,0,0,0.4);--shadow:0 1px 3px rgba(0,0,0,0.5),0 6px 16px -6px rgba(0,0,0,0.55);--shadow-lg:0 12px 34px -10px rgba(0,0,0,0.7);--ring:0 0 0 3px rgba(203,213,225,0.4);color-scheme:dark}*{box-sizing:border-box}body,html{margin:0;padding:0}body{background:radial-gradient(1100px 560px at 100% -12%,var(--brand-soft) 0,transparent 52%),radial-gradient(820px 480px at -10% 0,var(--bg-glow) 0,transparent 44%),var(--bg);color:var(--ink-2);font-family:var(--font);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.app,body{min-height:100vh;min-height:100dvh}.app{width:100%;max-width:480px;margin:0 auto;display:flex;flex-direction:column;background:transparent}.app-header{position:-webkit-sticky;position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:max(14px,env(safe-area-inset-top)) clamp(14px,5vw,20px) 14px;background:var(--header-bg);-webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}.app-main{flex:1 1;padding:clamp(16px,5vw,22px) clamp(14px,5vw,20px) 96px}.app-title{margin:0 0 2px;font-size:1.5rem;font-weight:800;letter-spacing:-.02em;color:var(--ink)}.app-subtitle{margin:0 0 18px;color:var(--muted);font-size:.95rem}.tabbar{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:480px;z-index:30;display:flex;justify-content:space-around;gap:4px;padding:8px 10px max(8px,env(safe-area-inset-bottom));background:var(--header-bg);-webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);border-top:1px solid var(--line)}.tab{flex:1 1;display:inline-flex;flex-direction:column;align-items:center;gap:3px;padding:6px 4px;min-height:52px;justify-content:center;border:none;background:transparent;color:var(--muted);border-radius:var(--r-sm);font:inherit;font-size:.7rem;font-weight:600;cursor:pointer;text-decoration:none}.tab[aria-current=page]{color:var(--brand-strong)}.tab:hover{color:var(--ink);background:var(--surface-2)}.tab:focus-visible{outline:none;box-shadow:var(--ring)}.tab .tab-icon{width:22px;height:22px}.tab-add{color:var(--brand-ink)}.tab-add .tab-fab{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:var(--r-pill);background:var(--brand);color:var(--brand-ink);box-shadow:var(--shadow);margin-top:-14px}.tab-add:hover .tab-fab{background:var(--brand-hover)}.sidebar{display:none}@media (min-width:860px){.app{max-width:1080px;display:grid;grid-template-columns:244px minmax(0,1fr);align-items:start}.app-header,.tabbar{display:none}.sidebar{position:-webkit-sticky;position:sticky;top:0;align-self:stretch;height:100vh;height:100dvh;display:flex;flex-direction:column;gap:4px;padding:22px 16px;border-right:1px solid var(--line)}.sidebar-brand{padding:4px 8px 18px}.sidebar-add,.sidebar-brand{display:inline-flex;text-decoration:none}.sidebar-add{align-items:center;gap:9px;padding:11px 14px;margin-bottom:10px;border-radius:var(--r);background:var(--brand);color:var(--brand-ink);font-weight:700;font-size:.95rem;box-shadow:var(--shadow)}.sidebar-add:hover{background:var(--brand-hover)}.sidebar-add:focus-visible{outline:none;box-shadow:var(--ring)}.sidebar-nav{display:flex;flex-direction:column;gap:2px}.snav{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:var(--r-sm);color:var(--muted);font-weight:600;font-size:.95rem;text-decoration:none}.snav:hover{color:var(--ink);background:var(--surface-2)}.snav:focus-visible{outline:none;box-shadow:var(--ring)}.snav[aria-current=page]{background:var(--brand-soft);color:var(--on-soft)}.snav svg{width:20px;height:20px;flex:0 0 auto}.sidebar-foot{margin-top:auto;padding-top:12px;border-top:1px solid var(--line)}.app-main{max-width:760px;padding:30px 40px 48px}}.logo{display:inline-flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink)}.logo-mark{display:block;filter:drop-shadow(0 3px 8px rgba(15,23,42,.28));flex:0 0 auto}.logo-text{display:inline-flex;flex-direction:column;gap:1px;line-height:1.02}.logo-word{font-weight:800;font-size:1.25rem;letter-spacing:-.02em;color:var(--ink)}.logo-byline{font-size:.6rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}a.brand{text-decoration:none;border-radius:var(--r-sm)}a.brand:focus-visible{outline:none;box-shadow:var(--ring)}h1{font-size:clamp(1.5rem,5vw,1.9rem);line-height:1.15;letter-spacing:-.025em;margin:0 0 6px;font-weight:800}h1,h2{color:var(--ink)}h2{font-size:1.05rem;letter-spacing:-.01em;font-weight:700}h2,p{margin:0 0 12px}a{color:var(--brand-strong);font-weight:600}.muted,.section-label{color:var(--muted)}.section-label{display:flex;align-items:center;gap:8px;margin:22px 0 10px;font-size:.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.section-label .count{color:var(--ink);background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-pill);padding:1px 8px;font-size:.72rem}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:clamp(16px,4vw,20px)}.card+.card{margin-top:14px}.stack{gap:12px}.list,.stack{display:flex;flex-direction:column}.list{list-style:none;margin:0;padding:0;gap:10px}.row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:13px 14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-sm);cursor:pointer;font:inherit;color:var(--ink-2);transition:border-color .15s ease,box-shadow .15s ease,transform .05s ease}.row:hover{border-color:var(--line-strong);box-shadow:var(--shadow)}.row:active{transform:translateY(1px)}.row:focus-visible{outline:none;box-shadow:var(--ring)}.row-icon{flex:0 0 auto;width:40px;height:40px;border-radius:var(--r-sm);display:inline-grid;place-items:center;background:var(--brand-soft);color:var(--on-soft)}.row-body{flex:1 1;min-width:0}.row-title{font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row-sub{font-size:.85rem;color:var(--muted);margin-top:2px}.row-done{flex:0 0 auto}.check{width:40px;height:40px;border-radius:var(--r-pill);border:1.5px solid var(--line-strong);background:var(--surface);color:var(--muted);display:inline-grid;place-items:center;cursor:pointer}.check:hover{border-color:var(--done);color:var(--done);background:var(--done-tint)}.check:focus-visible{outline:none;box-shadow:var(--ring)}.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:var(--r-pill);font-size:.76rem;font-weight:700;border:1px solid var(--line);white-space:nowrap}.chip-overdue{color:var(--overdue);border-color:var(--overdue-line);background:var(--overdue-tint)}.chip-due{color:var(--on-soft);border-color:var(--due-line);background:var(--due-tint)}.chip-done{color:var(--done);border-color:var(--done-line);background:var(--done-tint)}.chip-upcoming{color:var(--muted);border-color:var(--line);background:var(--surface-2)}.btn,button{font:inherit;font-weight:600;line-height:1;border:1.5px solid var(--line-strong);background:var(--surface);color:var(--ink);padding:12px 18px;border-radius:var(--r-sm);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .05s ease}.btn:hover,button:hover{border-color:var(--brand);background:var(--surface-2)}.btn:active,button:active{transform:translateY(1px)}.btn:focus-visible,button:focus-visible{outline:none;box-shadow:var(--ring)}.btn:disabled,button:disabled{opacity:.55;cursor:default;transform:none}.btn-primary{background:var(--brand);color:var(--brand-ink);border-color:var(--brand)}.btn-primary:hover{background:var(--brand-hover);border-color:var(--brand-hover)}.btn-ghost{background:transparent;border-color:transparent;color:var(--brand-strong)}.btn-ghost:hover{background:var(--brand-soft);border-color:transparent}.btn-danger{color:var(--danger);border-color:var(--danger-line);background:var(--danger-tint)}.btn-danger:hover{border-color:var(--danger);background:var(--danger-tint)}.btn-block{width:100%}.btn-sm{padding:8px 12px;min-height:36px;font-size:.875rem;border-radius:var(--r-xs)}.btn-row{display:flex;gap:10px}.btn-row>*{flex:1 1}.header-actions{display:flex;align-items:center;gap:6px}.icon-btn{width:40px;min-height:40px;padding:0;border-radius:var(--r-sm);background:transparent;border-color:transparent;color:var(--ink)}.icon-btn:hover{background:var(--brand-soft);border-color:transparent}.theme-menu-wrap{position:relative;display:inline-flex}.theme-menu{position:absolute;right:0;top:calc(100% + 8px);min-width:172px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;gap:2px;z-index:60}.theme-menu[hidden]{display:none}.theme-menu-item{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:8px 10px;border:0;border-radius:var(--r-xs);background:transparent;color:var(--ink);font:inherit;font-size:.92rem;cursor:pointer;text-align:left}.theme-menu-item svg{width:18px;height:18px;flex:0 0 auto}.theme-menu-item:hover{background:var(--surface-2)}.theme-menu-item:focus-visible{outline:none;box-shadow:var(--ring)}.theme-menu-item[aria-checked=true]{color:var(--brand-darker);font-weight:600}.theme-menu-item .tm-check{margin-left:auto;opacity:0}.theme-menu-item[aria-checked=true] .tm-check{opacity:1}.sidebar-foot .theme-menu{top:auto;bottom:calc(100% + 8px);right:auto;left:0}label{font-weight:600;font-size:.9rem;color:var(--ink);display:block;margin-bottom:6px}label .opt{color:var(--muted);font-weight:500}input[type=date],input[type=number],input[type=text],input[type=time],input[type=url],select,textarea{width:100%;padding:12px 13px;border:1.5px solid var(--line-strong);border-radius:var(--r-sm);font:inherit;color:var(--ink);background:var(--surface);transition:border-color .15s ease,box-shadow .15s ease}input::placeholder,textarea::placeholder{color:var(--placeholder)}input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none;border-color:var(--brand);box-shadow:var(--ring)}textarea{min-height:80px;resize:vertical}.field{margin-bottom:14px}.field-row{display:flex;gap:12px}.field-row>*{flex:1 1}.help{font-size:.82rem;color:var(--muted);margin-top:5px}.error{color:var(--danger);font-size:.85rem;margin:5px 0 0}.segmented{display:flex;gap:6px;padding:5px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r)}.segmented .seg{flex:1 1;min-height:40px;border:1.5px solid transparent;background:transparent;color:var(--ink-2);border-radius:var(--r-xs);font-weight:600}.segmented .seg:hover{background:var(--surface)}.segmented .seg[aria-pressed=true]{background:var(--surface);color:var(--brand-darker);border-color:var(--brand);box-shadow:var(--shadow-sm)}.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:10px;gap:10px}.tile{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);cursor:pointer;text-align:left;font:inherit;color:var(--ink-2);min-height:96px}.tile:hover{border-color:var(--brand);background:var(--surface-2)}.tile:focus-visible{outline:none;box-shadow:var(--ring)}.tile-icon{width:34px;height:34px;border-radius:var(--r-sm);display:inline-grid;place-items:center;background:var(--brand-soft);color:var(--on-soft)}.tile-title{font-weight:700;color:var(--ink);font-size:.92rem}.tile-sub{font-size:.78rem;color:var(--muted)}.sheet-backdrop{position:fixed;inset:0;z-index:40;background:rgba(15,23,42,.45);display:flex;align-items:flex-end;justify-content:center;animation:fade .15s ease}.sheet{width:100%;max-width:480px;background:var(--surface);border-radius:var(--r-xl) var(--r-xl) 0 0;border:1px solid var(--line);border-bottom:none;box-shadow:var(--shadow-lg);padding:10px clamp(16px,5vw,22px) max(20px,env(safe-area-inset-bottom));max-height:88vh;overflow-y:auto;animation:slide-up .2s ease}.sheet-grip{width:42px;height:5px;border-radius:var(--r-pill);background:var(--line-strong);margin:4px auto 14px}.sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}.sheet-head h2{margin:0}@keyframes fade{0%{opacity:0}}@keyframes slide-up{0%{transform:translateY(16px)}}.empty{text-align:center;padding:44px 20px;color:var(--muted)}.empty-icon{width:56px;height:56px;border-radius:var(--r-lg);display:inline-grid;place-items:center;background:var(--brand-soft);color:var(--on-soft);margin-bottom:14px}.empty h2{color:var(--ink);margin-bottom:4px}.banner{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--brand-soft-2);background:var(--brand-soft);color:var(--on-soft);border-radius:var(--r);padding:13px 15px;font-size:.9rem}.banner-warn{border-color:var(--overdue-line);background:var(--overdue-tint);color:var(--overdue)}.setting{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.setting:last-child{border-bottom:none}.setting-label{font-weight:600;color:var(--ink)}.setting-sub{font-size:.82rem;color:var(--muted);margin-top:2px}.switch{position:relative;width:46px;height:28px;border-radius:var(--r-pill);border:none;background:var(--line-strong);cursor:pointer;flex:0 0 auto;transition:background .15s ease}.switch[aria-checked=true]{background:var(--brand)}.switch:after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:var(--shadow-sm);transition:transform .15s ease}.switch[aria-checked=true]:after{transform:translateX(18px)}.switch:focus-visible{outline:none;box-shadow:var(--ring)}.byline{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:.8rem}@media (prefers-reduced-motion:reduce){*,.sheet,.sheet-backdrop{animation:none!important;transition:none!important}}