:root {
  --bg: #121413; --surface: #1c201e; --fg: #f4f0e8; --muted: #9a9890;
  --accent: #c99552; --sage: #6f8d78; --err: #c4664d; --track: #2a2f2c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.45 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; }
main { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: calc(16px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); }
.screen { display: none; flex-direction: column; gap: 14px; min-height: calc(100dvh - 40px); }
.screen.on { display: flex; }
.step { display: none; flex-direction: column; gap: 14px; }
.step.on { display: flex; }
h1 { font-size: 28px; margin: 12px 0 0; font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: 20px; margin: 0; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
button { font: inherit; padding: 16px 18px; border: 0; border-radius: 14px; background: var(--surface); color: var(--fg); min-height: 56px; }
button.primary { background: var(--accent); color: #1a1408; font-weight: 600; }
button.primary:disabled { opacity: .45; }
button.ghost { background: transparent; color: var(--muted); }
button.big { font-size: 22px; min-height: 72px; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
label.check { flex-direction: row; align-items: center; gap: 10px; }
input[type=text], input:not([type]) { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid #333; background: var(--surface); color: var(--fg); }
.meter { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--sage); transition: width .08s; }
.bigtime { font-size: 56px; font-variant-numeric: tabular-nums; text-align: center; margin: 24px 0; }
.verify-count { font-size: 96px; text-align: center; font-variant-numeric: tabular-nums; line-height: 1; margin: 12px 0; color: var(--accent); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--track); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
/* практика */
#s-practice { background: #000; margin: 0 -20px; padding: 0 20px; }
.topbar { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; padding-top: 8px; }
.status { color: var(--sage); }
.status.off { color: var(--err); }
.ring { position: relative; width: min(78vw, 340px); aspect-ratio: 1; margin: 8px auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .track { stroke: var(--track); }
.ring .arc { stroke: var(--accent); stroke-dasharray: 553; stroke-dashoffset: 553; transition: stroke-dashoffset .25s; }
.ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(80px, 30vw, 128px); font-variant-numeric: tabular-nums; font-weight: 300; line-height: 1; }
.ring .of { position: absolute; left: 0; right: 0; top: 68%; text-align: center; color: var(--muted); font-size: 18px; }
.adjust { display: flex; justify-content: center; gap: 12px; }
.adjust button { min-width: 72px; min-height: 44px; padding: 8px; font-size: 16px; color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.debug { color: var(--muted); font-size: 13px; }
.debug canvas { width: 100%; height: 90px; background: #0a0c0b; border-radius: 8px; display: block; margin: 8px 0; }
.flash { animation: flash .35s ease-out; }
@keyframes flash { from { color: var(--accent); } to { color: var(--fg); } }
/* этап 3 */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices button { text-align: left; padding: 12px 14px; min-height: 52px; border: 1px solid transparent; }
.choices button.on { border-color: var(--accent); color: var(--accent); }
.small-choices { grid-template-columns: repeat(5, 1fr); }
.small-choices button { text-align: center; padding: 8px; min-height: 44px; }
.topbar .icon { min-height: 36px; padding: 4px 10px; font-size: 20px; background: transparent; color: var(--muted); }
.hero { text-align: center; margin: 12px 0 4px; }
.hero-num { font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 300; }
.hero-of { font-size: 22px; color: var(--muted); }
.bar { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; margin: 12px 0 0; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { background: var(--surface); border-radius: 14px; padding: 14px; }
.card-num { font-size: 28px; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.tabs { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 8px; }
.tabs button { background: transparent; color: var(--muted); min-height: 44px; }
.tabs button.on { color: var(--fg); background: var(--surface); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button { min-height: 40px; padding: 8px; color: var(--muted); }
.seg button.on { color: var(--fg); border: 1px solid var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding: 8px 0; }
.bars .b { flex: 1; background: var(--track); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.bars .b.on { background: var(--accent); }
.bars .b.today { outline: 1px solid var(--sage); }
.bars .b span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
hr { border: 0; border-top: 1px solid #2a2f2c; margin: 8px 0; }
button.danger { color: var(--err); }
input[type=number], input[type=time] { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid #333; background: var(--surface); color: var(--fg); }
