:root{--bg: #f6f7f5;--card: #fff;--text: #1a1f1c;--muted: #6b746e;--line: #e3e7e4;--accent: #16a34a;--accent-text: #fff;--danger: #dc2626;--late: #d97706;color-scheme:light dark}@media(prefers-color-scheme:dark){:root{--bg: #121513;--card: #1b201d;--text: #eef1ef;--muted: #96a09a;--line: #2a312d;--accent: #22c55e;--accent-text: #06210f;--danger: #f87171;--late: #fbbf24}}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 system-ui,-apple-system,sans-serif;-webkit-tap-highlight-color:transparent}h1{font-size:1.6rem;margin:.2rem 0 .6rem}h2{font-size:1.05rem;margin:0}.app{min-height:100dvh;padding-bottom:calc(64px + env(safe-area-inset-bottom))}.page{max-width:640px;margin:0 auto;padding:max(16px,env(safe-area-inset-top)) 16px 24px;display:flex;flex-direction:column;gap:12px}.center{min-height:100dvh;display:grid;place-items:center}.muted{color:var(--muted)}.cap{text-transform:capitalize;margin:-8px 0 0}.error{color:var(--danger);margin:0}.banner{background:var(--late);color:#000;text-align:center;padding:6px;font-size:.9rem}.stack{display:flex;flex-direction:column;gap:12px}.grow{flex:1;min-width:0}.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.list{list-style:none;margin:0;padding:0}.list.card{padding:0 14px}.list li+li{border-top:1px solid var(--line)}label{display:flex;flex-direction:column;gap:4px;font-size:.9rem;color:var(--muted)}input,select,button{font:inherit}input:not([type=checkbox]),select{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--text);min-height:44px}fieldset{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}legend{font-size:.9rem;color:var(--muted);margin-bottom:6px}button{min-height:44px;padding:0 16px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--text);cursor:pointer}button.primary{background:var(--accent);color:var(--accent-text);border-color:transparent;font-weight:600}button.danger{color:var(--danger)}button.sm{min-height:36px;padding:0 12px}button.link{border:0;background:none;color:var(--accent);padding:0;min-height:36px;text-align:left}button:disabled{opacity:.5}button.btn-row{text-align:left;font-size:1.1rem;padding:16px}button.row{width:100%;border:0;background:none;display:flex;align-items:center;gap:8px;text-align:left;padding:12px 0;min-height:56px;border-radius:0}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row-form{display:flex;gap:8px;align-items:center}.badge{background:var(--accent);color:var(--accent-text);border-radius:99px;padding:2px 10px;font-size:.8rem;white-space:nowrap}.seg{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:var(--line);padding:4px;border-radius:12px}.seg button{border:0;background:none}.seg button.on{background:var(--card);font-weight:600}.chips{display:flex;gap:6px;flex-wrap:wrap}.chips button{padding:0 12px;min-height:40px;border-radius:99px}.chips button.on{background:var(--accent);color:var(--accent-text);border-color:transparent}.bar{height:8px;background:var(--line);border-radius:99px;overflow:hidden;margin:10px 0 6px}.bar div{height:100%;background:var(--accent);transition:width .3s}.check{flex-direction:row;align-items:center;gap:12px;color:var(--text);font-size:1rem;padding:12px 0;min-height:52px}.check input{width:24px;height:24px;accent-color:var(--accent);flex:none}li.done .grow{text-decoration:line-through;color:var(--muted)}.late{color:var(--late);font-style:normal;font-size:.85rem}.later summary{cursor:pointer;color:var(--muted);padding:8px 0}.tabbar{position:fixed;inset:auto 0 0;display:flex;background:var(--card);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}.tabbar button{flex:1;border:0;background:none;border-radius:0;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:.75rem;color:var(--muted)}.tabbar button.active{color:var(--accent);font-weight:600}.tabbar span{font-size:1.3rem}.sheet-bg{position:fixed;inset:0;background:#0008;display:flex;align-items:flex-end;justify-content:center;z-index:10}.sheet{background:var(--card);width:100%;max-width:640px;max-height:92dvh;overflow:auto;border-radius:18px 18px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}.timer{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}.timer>.stack,.timer .sessions{width:100%;text-align:left}.timer h3{margin:0;font-size:1rem}.timer-dial{position:relative;width:210px;height:210px}.timer-dial svg{width:100%;height:100%;transform:rotate(-90deg)}.timer-dial circle{fill:none;stroke-width:7}.timer-dial .track{stroke:var(--line)}.timer-dial .arc{stroke:var(--accent);stroke-linecap:round;transition:stroke-dashoffset .25s linear}.timer.stopped .arc{stroke:var(--late);stroke-dashoffset:0!important}.timer.running .timer-dial{animation:timer-pulse 2s ease-in-out infinite}.timer-face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.timer .clock{font-size:2.6rem;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.02em}button.big{width:100%;min-height:56px;font-size:1.1rem;border-radius:14px}button.stop{background:var(--danger);color:#fff;border-color:transparent;font-weight:600}.center-link{align-self:center}.session{display:flex;align-items:center;gap:10px;padding:10px 0;font-size:.95rem}@keyframes timer-pulse{50%{filter:drop-shadow(0 0 10px color-mix(in srgb,var(--accent) 55%,transparent))}}@media(prefers-reduced-motion:reduce){.timer.running .timer-dial{animation:none}}.shop .check{padding:6px 0}.shop .item-title{text-align:left;min-height:44px;color:inherit;font-size:1rem}.shop li.done .item-title{text-decoration:line-through;color:var(--muted)}.shop button.icon{border:0;background:none;min-height:44px;min-width:40px;padding:0;color:var(--muted)}.handle{flex:none;width:40px;height:44px;display:flex;align-items:center;justify-content:center;font-size:1.3rem;color:var(--muted);cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}.shop li.dragging{background:color-mix(in srgb,var(--accent) 12%,var(--card));border-radius:10px;box-shadow:0 4px 14px #00000040}.shop .check{display:flex}.shop .check input.grow{width:auto;height:44px}.topbar-wrap{position:sticky;top:0;z-index:5;background:var(--bg);border-bottom:1px solid var(--line)}.topbar{max-width:640px;margin:0 auto;min-height:48px;padding:env(safe-area-inset-top) 16px 0;display:flex;align-items:center;justify-content:space-between;gap:8px}.topbar .name{color:var(--muted);font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar .icon-btn{width:44px;min-height:44px;padding:0;border:0;background:none;color:var(--text);display:grid;place-items:center;border-radius:12px;margin-right:-10px}.topbar .icon-btn svg{width:24px;height:24px}.topbar+.page{padding-top:12px}.seg.four{grid-template-columns:repeat(4,1fr)}.stats-nav{display:flex;align-items:center;justify-content:space-between;gap:8px}.stats-nav button{width:44px;padding:0;font-size:1.3rem}.stats-nav button:disabled{opacity:.35}.cap-first:first-letter{text-transform:uppercase}.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tile{display:flex;flex-direction:column;gap:2px}.big-num{font-size:1.9rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.1}.chart{display:flex;align-items:stretch;gap:3px;height:150px}.chart .col{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}.chart .stackbar{width:100%;max-width:28px;min-height:0;display:flex;flex-direction:column-reverse;border-radius:4px 4px 0 0;overflow:hidden}.chart .stackbar span{min-height:3px}.chart .tick{height:14px;font-size:.68rem;line-height:14px;white-space:nowrap}.chart.month{gap:2px}.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:4px}.person .bar{margin:6px 0 0}.top-row{display:flex;gap:12px;padding:10px 0}textarea{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--text);font:inherit;resize:vertical}.desc{display:block;color:var(--muted);font-size:.85rem;white-space:pre-line;margin-top:2px}.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line}.shop-section{gap:6px}.shop-head{font-size:.95rem;margin:6px 2px 0}.shop-head .muted{font-weight:400;font-size:.85rem}.cat-row{gap:4px}.cat-row .emoji{width:52px;flex:none;text-align:center;padding:10px 4px}.cat-row button.icon{border:0;background:none;min-height:44px;min-width:34px;padding:0;color:var(--muted)}.cat-row button.icon.grip{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.cat-row.dragging{opacity:.7;box-shadow:0 4px 14px #0003}.install-trigger{display:inline-flex;align-items:center;gap:4px;font-size:.8rem;font-weight:600;color:var(--accent);background:none;border:1px solid var(--accent);border-radius:99px;padding:0 12px 0 8px;min-height:36px}.install-trigger svg,.install-dialog .ico svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.install-trigger svg{width:20px;height:20px}@media(max-width:420px){.topbar .install-trigger span{display:none}.topbar .install-trigger{padding:0 8px}}.topbar .tools{display:flex;align-items:center;gap:8px}.top-install{display:flex;justify-content:flex-end}.install-dialog{border:0;padding:0;background:transparent;color:var(--text);width:100%;max-width:480px;margin:auto auto 0}.install-dialog::backdrop{background:#00000080}.install-dialog .sheet{background:var(--card);border-radius:20px 20px 0 0;padding:20px 16px calc(16px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:16px}@media(min-width:520px){.install-dialog{margin:auto}.install-dialog .sheet{border-radius:20px}}.install-dialog .head{display:flex;gap:12px;align-items:center}.install-dialog .head img{border-radius:11px;border:1px solid var(--line);flex-shrink:0}.install-dialog .head p{margin:2px 0 0}.install-dialog ol{margin:0;padding-left:1.4em;display:flex;flex-direction:column;gap:12px;line-height:1.5}.install-dialog ol .small{display:block}.install-dialog .small{font-size:.85rem}.install-dialog .ico{display:inline-grid;place-items:center;vertical-align:middle;width:28px;height:28px;border-radius:7px;background:var(--bg);color:#2f7cf6}.install-dialog .ico svg{width:18px;height:18px}.install-dialog .note{margin:0;padding:10px 12px;border-radius:10px;background:var(--bg);color:var(--muted)}.install-dialog .center{text-align:center;margin:-8px 0 0}input,select{min-width:0;max-width:100%}input[type=time],input[type=date]{-webkit-appearance:none;appearance:none;display:block;text-align:left}input[type=time]::-webkit-date-and-time-value,input[type=date]::-webkit-date-and-time-value{text-align:left}.row-form input:not([type=checkbox]){flex:1 1 0}.cat-row .emoji{flex:none}.cat-row button.icon{min-width:28px}@media(max-width:400px){.cat-row{gap:0}.cat-row .emoji{width:44px}}.freq input[type=number]{flex:none;width:76px;text-align:center}
