:root{--bg: #fff8ee;--surface: #ffffff;--surface-2: #f3e9d7;--text: #1e1b16;--muted: #4d4639;--border: #e8dcc6;--primary: #1e1b16;--primary-ink: #fff8ee;--primary-soft: #c5ecf8;--link: #086788;--accent: #ffbd00;--accent-ink: #1e1b16;--danger: #b3120f;--danger-soft: #ffdad4;--danger-strong: #dd1c1a;--warn: #6b4f00;--warn-soft: #ffe9a8;--ok: #086788;--ok-soft: #c5ecf8;--leaf: #2e5a1c;--leaf-soft: #e3f4d9;--tile-2: #086788;--tile-2-ink: #ffffff;--tile-3: #06aed5;--tile-3-ink: #00232d;--switch-on: #086788;--hero: #ffbd00;--hero-ink: #1e1b16;--hero-shape: #dd1c1a;--nav-bg: #1e1b16;--nav-ink: #e8e1d5;--fab-shadow: 0 6px 16px rgba(60, 40, 0, .25);--shadow: 0 1px 2px rgba(60, 40, 0, .08);--radius: 24px;--nav-h: 64px;color-scheme:light}@media (prefers-color-scheme: dark){:root:not([data-theme=light]){--bg: #16130f;--surface: #221e18;--surface-2: #2e2920;--text: #f5efe4;--muted: #cfc5b4;--border: #3a342a;--primary: #ffbd00;--primary-ink: #1e1b16;--primary-soft: rgba(255, 189, 0, .16);--link: #ffcf4d;--accent: #ffbd00;--accent-ink: #1e1b16;--danger: #ffb4a9;--danger-soft: rgba(221, 28, 26, .28);--danger-strong: #dd1c1a;--warn: #ffd36b;--warn-soft: rgba(255, 189, 0, .18);--ok: #7fd3ee;--ok-soft: rgba(6, 174, 213, .22);--leaf: #b5e3a0;--leaf-soft: rgba(120, 190, 90, .2);--tile-2: #086788;--tile-2-ink: #ffffff;--tile-3: #06aed5;--tile-3-ink: #00232d;--switch-on: #06aed5;--hero: #ffbd00;--hero-ink: #1e1b16;--hero-shape: #dd1c1a;--nav-bg: #2e2920;--nav-ink: #e8e1d5;--fab-shadow: 0 6px 18px rgba(0, 0, 0, .5);--shadow: none;color-scheme:dark}}:root[data-theme=dark]{--bg: #16130f;--surface: #221e18;--surface-2: #2e2920;--text: #f5efe4;--muted: #cfc5b4;--border: #3a342a;--primary: #ffbd00;--primary-ink: #1e1b16;--primary-soft: rgba(255, 189, 0, .16);--link: #ffcf4d;--accent: #ffbd00;--accent-ink: #1e1b16;--danger: #ffb4a9;--danger-soft: rgba(221, 28, 26, .28);--danger-strong: #dd1c1a;--warn: #ffd36b;--warn-soft: rgba(255, 189, 0, .18);--ok: #7fd3ee;--ok-soft: rgba(6, 174, 213, .22);--leaf: #b5e3a0;--leaf-soft: rgba(120, 190, 90, .2);--tile-2: #086788;--tile-2-ink: #ffffff;--tile-3: #06aed5;--tile-3-ink: #00232d;--switch-on: #06aed5;--hero: #ffbd00;--hero-ink: #1e1b16;--hero-shape: #dd1c1a;--nav-bg: #2e2920;--nav-ink: #e8e1d5;--fab-shadow: 0 6px 18px rgba(0, 0, 0, .5);--shadow: none;color-scheme:dark}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--text);font:16px/1.45 Roboto Flex,Roboto,system-ui,-apple-system,Segoe UI,sans-serif;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}a{color:var(--link)}button,input,select,textarea{font:inherit;color:inherit}h1{font-size:1.5rem;margin:0;line-height:1.2}h2{font-size:1.05rem;margin:0}h3{font-size:.95rem;margin:0}.muted{color:var(--muted)}.small{font-size:.85rem}.tiny{font-size:.75rem}.nowrap{white-space:nowrap}.grow{flex:1;min-width:0}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row{display:flex;align-items:center;gap:10px}.col{display:flex;flex-direction:column;gap:12px}.wrap{flex-wrap:wrap}.between{justify-content:space-between}.center{text-align:center}.app{min-height:100dvh;padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 40px)}.page{max-width:640px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 18px) 16px 16px;display:flex;flex-direction:column;gap:14px}.page-head{display:flex;align-items:center;gap:10px;min-height:44px}.page-head h1{flex:1;min-width:0;font-size:2rem;font-weight:850;letter-spacing:-.02em}.nav{position:fixed;left:12px;right:12px;bottom:calc(env(safe-area-inset-bottom) + 12px);z-index:20;max-width:560px;margin:0 auto;height:var(--nav-h);border-radius:32px;padding:0 8px;gap:4px;display:flex;align-items:center;background:var(--nav-bg);box-shadow:0 8px 24px #00000038}.nav a{flex:1 1 0;height:48px;border-radius:24px;display:flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;color:var(--nav-ink);font-size:.88rem;font-weight:750;min-width:0}.nav a .lbl{display:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav a.active{flex:2.2 1 0;background:var(--accent);color:var(--accent-ink)}.nav a.active .lbl{display:inline}.fab{position:fixed;right:16px;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 26px);z-index:21;width:60px;height:60px;border-radius:20px;border:0;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;box-shadow:var(--fab-shadow);cursor:pointer}.hero{background:var(--hero);color:var(--hero-ink);border-radius:32px;padding:22px;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;right:-40px;top:-40px;width:150px;height:150px;border-radius:48px;background:var(--hero-shape);transform:rotate(18deg)}.hero>*{position:relative;z-index:1}.hero h1{font-size:2.4rem;line-height:1.05;font-weight:850;letter-spacing:-.02em;margin-top:4px}.hero .small{font-weight:650}.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tile{aspect-ratio:1;max-height:130px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:0;cursor:pointer;font-family:inherit}.tile b{font-size:2.1rem;font-weight:850;line-height:1}.tile span{font-size:.75rem;font-weight:700}.tile.t1{background:var(--danger-strong);color:#fff;border-radius:50%;margin:0 auto;width:100%}.tile.t2{background:var(--tile-2);color:var(--tile-2-ink);border-radius:28px}.tile.t3{background:var(--tile-3);color:var(--tile-3-ink);border-radius:28px 28px 28px 8px}.tile.zero{opacity:.35}.stack{display:flex;flex-direction:column;gap:8px}.stack>.li{background:var(--surface);border-radius:24px;box-shadow:var(--shadow);border:1px solid var(--border)}.shape{width:48px;height:48px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.shape.s-late{background:var(--danger-soft);color:var(--danger);border-radius:50%}.shape.s-week{background:var(--ok-soft);color:var(--ok);border-radius:16px}.shape.s-month{background:var(--leaf-soft);color:var(--leaf);border-radius:16px 4px}.shape.s-later{background:var(--surface-2);color:var(--muted);border-radius:24px 24px 24px 8px}.shape.s-note{background:var(--warn-soft);color:var(--warn);border-radius:24px 24px 24px 8px}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.card.pad{padding:16px}.list{display:flex;flex-direction:column}.list>*+*{border-top:1px solid var(--border)}.li{display:flex;align-items:center;gap:12px;padding:12px 14px;min-height:58px;text-decoration:none;color:inherit;background:none;border:0;width:100%;text-align:left}button.li,a.li{cursor:pointer}.li .emoji,.ico{width:44px;height:44px;border-radius:14px;background:var(--surface-2);color:var(--text);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.ico.sm{width:32px;height:32px;border-radius:10px}.logo-mark{width:72px;height:72px;border-radius:24px;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;margin:0 auto}.li .title{font-weight:750}.chev{color:var(--muted)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:48px;padding:0 18px;border-radius:16px;border:1px solid var(--border);background:var(--surface);font-weight:750;cursor:pointer;text-decoration:none;color:var(--text)}.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}.btn.danger{color:var(--danger)}.btn.ghost{background:none;border-color:transparent}.btn.block{width:100%}.btn.sm{min-height:36px;padding:0 14px;font-size:.88rem;border-radius:14px}.btn:disabled{opacity:.55;cursor:default}.btn.done{width:48px;height:48px;min-height:48px;padding:0;border-radius:16px;border:0;background:var(--primary);color:var(--accent);flex-shrink:0}:root[data-theme=dark] .btn.done{color:var(--primary-ink)}@media (prefers-color-scheme: dark){:root:not([data-theme=light]) .btn.done{color:var(--primary-ink)}}.icon-btn{width:44px;height:44px;border-radius:22px;border:0;background:none;font-size:1.25rem;cursor:pointer;color:var(--text);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.icon-btn.filled{background:var(--surface-2)}.field{display:flex;flex-direction:column;gap:5px}.field>span{font-size:.82rem;font-weight:600;color:var(--muted)}.input,select.input,textarea.input{width:100%;min-height:48px;padding:10px 14px;border-radius:14px;border:1px solid var(--border);background:var(--surface);font-size:16px;outline:none}textarea.input{min-height:80px;resize:vertical}.input:focus{border-color:var(--link);box-shadow:0 0 0 3px var(--primary-soft)}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.grid2>.full{grid-column:1 / -1}.seg{display:flex;background:var(--surface-2);border-radius:24px;padding:4px;gap:4px}.seg button{flex:1;min-height:40px;border:0;background:none;border-radius:20px;font-weight:700;font-size:.85rem;color:var(--muted);cursor:pointer;padding:0 8px}.seg button.on{background:var(--primary);color:var(--primary-ink)}.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.chips::-webkit-scrollbar{display:none}.chip{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;min-height:40px;padding:0 16px;border-radius:20px;border:0;background:var(--surface-2);color:var(--muted);font-size:.88rem;font-weight:700;cursor:pointer;white-space:nowrap}.chips.pill{background:var(--surface-2);border-radius:24px;padding:4px;gap:4px;align-self:flex-start;max-width:100%}.chips.pill .chip{min-height:36px;background:transparent}.chips.pill .chip.on{background:var(--primary);color:var(--primary-ink)}.chip.on{background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:.75rem;font-weight:700;background:var(--surface-2);color:var(--muted);white-space:nowrap}.badge.red{background:var(--danger-soft);color:var(--danger)}.badge.amber{background:var(--warn-soft);color:var(--warn)}.badge.green,.badge.blue{background:var(--ok-soft);color:var(--ok)}.badge.leaf{background:var(--leaf-soft);color:var(--leaf)}.btn svg,.badge svg{flex-shrink:0}.banner{padding:12px 14px;border-radius:var(--radius);font-size:.9rem}.banner.warn{background:var(--warn-soft);color:var(--warn)}.banner.err{background:var(--danger-soft);color:var(--danger)}.banner.info{background:var(--ok-soft);color:var(--ok)}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:none}.tabs button{flex:1;min-height:42px;border:0;background:none;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap;padding:0 8px}.tabs button.on{color:var(--text);border-color:var(--accent);border-bottom-width:3px}.section-h{display:flex;align-items:center;gap:8px;padding:2px 4px;font-weight:700;font-size:.92rem;cursor:pointer;-webkit-user-select:none;user-select:none;background:none;border:0;width:100%;text-align:left}.section-h .count{margin-left:auto}.dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}.empty{text-align:center;padding:28px 16px;color:var(--muted)}.empty .big{font-size:2.4rem}.switch{position:relative;width:50px;height:30px;flex-shrink:0}.switch input{opacity:0;width:0;height:0;position:absolute}.switch span{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:99px;background:var(--border);transition:.2s;cursor:pointer}.switch span:after{content:"";position:absolute;left:3px;top:3px;width:24px;height:24px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px #0000004d}.switch input:checked+span{background:var(--switch-on)}.switch input:checked+span:after{transform:translate(20px)}.switch input:disabled+span{opacity:.5}.thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.thumb{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex-direction:column;text-decoration:none;color:inherit;font-size:.72rem;padding:4px;text-align:center}.thumb img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover}.thumb .tag{position:absolute;left:4px;bottom:4px;background:#0009;color:#fff;font-size:.65rem;padding:1px 6px;border-radius:6px}.thumb .x{position:absolute;top:4px;right:4px;width:26px;height:26px;border-radius:50%;border:0;background:#0009;color:#fff;cursor:pointer;z-index:1}.bar{height:10px;border-radius:99px;background:var(--surface-2);overflow:hidden}.bar>div{height:100%;background:var(--hero);border-radius:99px}.big-num{font-size:2rem;font-weight:800;letter-spacing:-.02em}.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;background:#0a0c1073;display:flex;align-items:flex-end;justify-content:center;animation:fade .15s}.sheet{width:100%;max-width:640px;max-height:92dvh;overflow-y:auto;background:var(--surface);border-radius:20px 20px 0 0;padding:8px 16px calc(16px + env(safe-area-inset-bottom));animation:up .2s ease-out}.sheet .grab{width:40px;height:5px;border-radius:9px;background:var(--border);margin:4px auto 10px}.sheet-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}.sheet-head h2{flex:1}@keyframes up{0%{transform:translateY(40px);opacity:.5}}@keyframes fade{0%{opacity:0}}@media (min-width: 700px){.sheet-backdrop{align-items:center}.sheet{border-radius:20px}}.toast{position:fixed;left:50%;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 86px);transform:translate(-50%);z-index:60;background:var(--text);color:var(--bg);padding:10px 16px;border-radius:12px;font-size:.9rem;max-width:calc(100% - 32px);box-shadow:0 6px 20px #00000040;animation:fade .2s}.toast.err{background:var(--danger);color:#fff}.spinner{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite;margin:40px auto}@keyframes spin{to{transform:rotate(360deg)}}.login{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px 16px}.login .card{width:100%;max-width:400px;padding:24px}.logo{font-size:3rem;text-align:center}.step-dots{display:flex;gap:6px;justify-content:center}.step-dots span{width:28px;height:4px;border-radius:4px;background:var(--border)}.step-dots span.on{background:var(--accent)}.tpl{display:flex;gap:12px;padding:12px 14px;align-items:flex-start}.tpl input[type=checkbox],.check input[type=checkbox]{width:22px;height:22px;accent-color:var(--primary);flex-shrink:0;margin-top:2px}.check{display:flex;gap:12px;align-items:center;padding:12px 14px;min-height:52px;cursor:pointer}.check.done .grow{text-decoration:line-through;color:var(--muted)}
