:root{--bg:#f6f7f9;--surface:#fff;--surface-2:#eef0f4;--text:#16181d;--muted:#646b7a;--border:#d9dde5;--accent:#3b5bdb;--accent-text:#fff;--danger:#c92a2a;--radius:12px;--tap:44px;--pad:16px;--shadow:0 1px 2px #10141e14, 0 8px 24px #10141e0f}@media (prefers-color-scheme:dark){:root{--bg:#14161a;--surface:#1d2026;--surface-2:#262a32;--text:#eceef2;--muted:#99a1b0;--border:#333944;--accent:#5c7cfa;--accent-text:#0b0d10;--danger:#ff6b6b;--shadow:0 1px 2px #0006, 0 8px 24px #0000004d}}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);color:var(--text);-webkit-text-size-adjust:100%;overscroll-behavior-y:none;font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}#root{min-height:100dvh}input,textarea,button,select{font:inherit;color:inherit;font-size:max(16px,1em)}button{min-height:var(--tap);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);cursor:pointer;touch-action:manipulation;padding:0 16px}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--accent);color:var(--accent-text);border-color:#0000;font-weight:600}button.ghost{background:0 0;border-color:#0000}button.danger{color:var(--danger)}input[type=text],input[type=number],textarea{width:100%;min-height:var(--tap);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);padding:10px 12px}textarea{resize:vertical;line-height:1.5}:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.app{flex-direction:column;height:100dvh;display:flex;overflow:hidden}.topbar{z-index:5;padding:8px var(--pad);padding-top:calc(8px + env(safe-area-inset-top));background:var(--surface);border-bottom:1px solid var(--border);align-items:center;gap:8px;display:flex;position:sticky;top:0}.topbar h1{text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:18px;font-weight:650;overflow:hidden}.icon-btn{min-width:var(--tap);background:0 0;border-color:#0000;padding:0 10px;font-size:20px;line-height:1}.content{-webkit-overflow-scrolling:touch;min-height:0;padding:var(--pad);gap:var(--pad);flex-direction:column;flex:1;padding-bottom:24px;display:flex;overflow-y:auto}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:var(--pad)}.muted{color:var(--muted);font-size:14px}.empty{text-align:center;color:var(--muted);padding:32px 16px}.list-cards{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.list-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);align-items:stretch;gap:4px;display:flex;overflow:hidden}.list-card>button.open{text-align:left;background:0 0;border:none;border-radius:0;flex-direction:column;flex:1;justify-content:center;gap:2px;min-height:60px;padding:12px 14px;display:flex}.list-card .name{font-weight:600}.fab{padding:12px 0 calc(12px + env(safe-area-inset-bottom));background:linear-gradient(to top, var(--bg) 60%, transparent);position:sticky;bottom:0}.fab button{width:100%;min-height:52px}.stepper{align-items:center;gap:12px;display:flex}.stepper button{border-radius:50%;width:52px;min-height:52px;padding:0;font-size:24px}.stepper .count{text-align:center;font-variant-numeric:tabular-nums;flex:1;font-size:32px;font-weight:650}.row{align-items:center;gap:12px;display:flex}.row.between{justify-content:space-between}.row.wrap{flex-wrap:wrap}.toggle{min-height:var(--tap);cursor:pointer;justify-content:space-between;align-items:center;gap:12px;display:flex}.toggle input{width:22px;height:22px;accent-color:var(--accent);flex:none}.draw-bar{padding:12px var(--pad) calc(12px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border);flex:none;gap:10px;display:flex}.draw-bar .primary{flex:1;min-height:52px;font-size:18px}.result ol{flex-direction:column;gap:8px;margin:0;padding-left:28px;display:flex}.result li{overflow-wrap:anywhere;font-size:20px;font-weight:600}@keyframes rise{0%{opacity:0;transform:translateY(6px)}}.result li{animation:.26s both rise}@media (prefers-reduced-motion:reduce){.result li{animation:none}}.items{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.item-row{align-items:center;gap:8px;display:flex}.item-row input[type=text]{flex:1;min-width:0}.item-row .weight{text-align:center;flex:none;width:5.5em}.item-row.drawn input[type=text]{color:var(--muted);text-decoration:line-through}.scrim{z-index:20;background:#00000073;border:none;align-items:flex-end;width:100%;height:100%;padding:0;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);width:100%;max-height:88dvh;padding:var(--pad);padding-bottom:calc(var(--pad) + env(safe-area-inset-bottom));box-shadow:var(--shadow);border-radius:16px 16px 0 0;flex-direction:column;gap:12px;animation:.22s slide-up;display:flex;overflow-y:auto}@keyframes slide-up{0%{transform:translateY(100%)}}@media (prefers-reduced-motion:reduce){.sheet{animation:none}}.sheet h2{margin:0;font-size:18px}.sheet .actions{gap:10px;display:flex}.sheet .actions button{flex:1;min-height:48px}.banner{border-radius:var(--radius);background:color-mix(in srgb, var(--danger) 14%, var(--surface));border:1px solid var(--danger);padding:12px;font-size:14px}.history li{border-bottom:1px solid var(--border);padding:8px 0}.history li:last-child{border-bottom:none}.history ul{margin:0;padding:0;list-style:none}details>summary{min-height:var(--tap);cursor:pointer;align-items:center;font-weight:600;display:flex}@media (width>=768px){.app{max-width:1100px;margin:0 auto}.split{gap:var(--pad);padding:var(--pad);grid-template-columns:300px 1fr;align-items:start;display:grid}.split>*{padding:0}.draw-bar{border-top:none;margin:0;padding:0;position:static}.fab{background:0 0;position:static}}
