:root { --bg:#0e1116; --card:#181d25; --line:#2a313c; --ink:#eef1f5; --muted:#8e99a8; --accent:#3ddc97; --accent-ink:#06281a; --bad:#ff6b6b; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.35 -apple-system, system-ui, sans-serif; }
body { padding: env(safe-area-inset-top) 0 calc(64px + env(safe-area-inset-bottom)); }
main { max-width: 560px; margin: 0 auto; padding: 14px 14px 96px; }
h1 { font-size: 26px; margin: 6px 0 14px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
button, input, select { font: inherit; color: inherit; }
button { border:0; border-radius:12px; background:var(--card); padding:10px 14px; cursor:pointer; }
button.primary { background:var(--accent); color:var(--accent-ink); font-weight:700; }
button.ghost { background:transparent; color:var(--muted); padding:8px 10px; }
button.warn { color:var(--bad); }
input { background:#0b0e12; border:1px solid var(--line); border-radius:10px; padding:10px; min-width:0; }
input:focus { outline:2px solid var(--accent); outline-offset:-1px; }
.card { background:var(--card); border-radius:16px; padding:14px; margin-bottom:12px; }
.row { display:flex; align-items:center; gap:8px; }
.grow { flex:1; min-width:0; }
.muted { color:var(--muted); font-size:13px; }
.title { font-weight:700; font-size:17px; }
.empty { color:var(--muted); text-align:center; padding:28px 10px; }

.sets { margin-top:10px; display:grid; gap:6px; }
.set { display:grid; grid-template-columns: 22px 1fr 14px 1fr 46px 30px; align-items:center; gap:6px; }
.set .n { color:var(--muted); font-size:13px; text-align:center; }
.set .x { color:var(--muted); text-align:center; font-size:13px; }
.set input { text-align:center; font-size:18px; font-weight:600; padding:9px 4px; width:100%; }
.set .done { height:42px; padding:0; font-size:18px; background:#0b0e12; border:1px solid var(--line); color:var(--muted); }
.set.isDone .done { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.set.isDone input { border-color:transparent; background:#141a21; }
.set .del { padding:0; height:42px; background:transparent; color:var(--muted); }
.setHead { display:grid; grid-template-columns: 22px 1fr 14px 1fr 46px 30px; gap:6px; font-size:11px; color:var(--muted); text-align:center; text-transform:uppercase; letter-spacing:.05em; }

.bar { position:fixed; left:0; right:0; bottom:calc(56px + env(safe-area-inset-bottom)); padding:10px 14px; background:linear-gradient(transparent, var(--bg) 35%); }
.bar .in { max-width:532px; margin:0 auto; display:flex; gap:8px; }
.bar .primary { flex:1; padding:14px; font-size:17px; }
nav { position:fixed; left:0; right:0; bottom:0; display:flex; background:#0b0e12; border-top:1px solid var(--line); padding-bottom:env(safe-area-inset-bottom); }
nav button { flex:1; background:transparent; border-radius:0; padding:17px 0; color:var(--muted); font-weight:600; }
nav button.on { color:var(--accent); }
#toast { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(140px + env(safe-area-inset-bottom)); background:#eef1f5; color:#0e1116; padding:10px 16px; border-radius:999px; font-weight:600; max-width:90%; text-align:center; z-index:5; }

.chips { display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; scrollbar-width:none; }
.chips button { white-space:nowrap; padding:8px 12px; border-radius:999px; font-size:14px; }
.chips button.on { background:var(--ink); color:var(--bg); font-weight:700; }
.seg { display:flex; background:#0b0e12; border-radius:10px; padding:3px; margin:10px 0; }
.seg button { flex:1; background:transparent; padding:7px 0; font-size:13px; color:var(--muted); border-radius:8px; }
.seg button.on { background:var(--card); color:var(--ink); font-weight:700; }
.hero { font-size:34px; font-weight:800; letter-spacing:-.02em; }
.delta { font-size:14px; font-weight:600; color:var(--muted); margin-left:8px; }
svg.chart { width:100%; height:auto; display:block; margin-top:8px; touch-action:pan-y; }
svg.chart text { fill:var(--muted); font-size:11px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
td, th { text-align:right; padding:7px 4px; border-top:1px solid var(--line); font-variant-numeric:tabular-nums; }
th { color:var(--muted); font-weight:500; font-size:12px; border-top:0; }
td:first-child, th:first-child { text-align:left; }
.sync { position:fixed; top:calc(10px + env(safe-area-inset-top)); right:14px; font-size:12px; color:var(--muted); }
