@font-face { font-family: Inter; src: url("../fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #f7f6f2; --surface: #ffffff; --line: #e4e0d6; --ink: #1a1a1a; --muted: #6f6c64;
  --gold: #8a6a32; --gold-soft: #c9a96e; --gold-light: #e8d5a8; --navy: #0c1222; --ok: #2e7d4f; --err: #b71c1c;
  --radius: 14px; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.45 Inter, system-ui, sans-serif; }
button { font: inherit; }
.app { max-width: 1120px; margin: 0 auto; padding: 16px; display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1fr) 370px; grid-template-areas: "head head" "stage panel" "foot foot"; }
@media (max-width: 860px) { .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "panel" "foot"; } }
header { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; letter-spacing: -.01em; }
h1 em { font-style: normal; color: var(--gold); }
.hright { display: flex; align-items: center; gap: 10px; }
.brand { font: 600 12px Inter; letter-spacing: .14em; color: var(--navy); text-transform: uppercase; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
.stage { grid-area: stage; position: relative; min-width: 0; background: radial-gradient(120% 90% at 50% 30%, #ffffff 0%, #efece5 75%);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
#cv { display: block; width: 100%; height: min(64vh, 600px); min-height: 340px; touch-action: none; }
@media (max-width: 860px) { #cv { height: 40vh; min-height: 260px; } }
.hud { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font: 500 12px Inter; }
.score { text-align: right; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; min-width: 96px; }
.score b { display: block; font: 800 22px/1.1 Inter; font-variant-numeric: tabular-nums; }
.score small { font: 500 11px Inter; color: var(--muted); }
.combo { font: 700 12px Inter; color: var(--gold); min-height: 16px; }
.pop { position: absolute; right: 22px; top: 70px; font: 800 20px Inter; pointer-events: none; animation: pop 1.1s ease-out forwards; }
.pop.plus { color: var(--ok); } .pop.minus { color: var(--err); }
@keyframes pop { 0% { opacity: 0; transform: translateY(8px) scale(.9); } 15% { opacity: 1; transform: translateY(0) scale(1.05); } 100% { opacity: 0; transform: translateY(-34px); } }
.scheme { position: absolute; left: 12px; bottom: 10px; font: 400 11px Inter; color: var(--muted); }
.toast { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%) translateY(8px); opacity: 0; transition: .25s;
  max-width: calc(100% - 32px); background: var(--navy); color: #f0ede6; padding: 10px 14px; border-radius: 10px; font: 500 14px Inter; text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); } .toast.ok { background: var(--ok); }
.flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 45%, rgba(201,169,110,.55), transparent 60%); opacity: 0; }
.flash.go { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
.panel { grid-area: panel; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.eyebrow { font: 600 11px Inter; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.card h2 { margin: 0 0 6px; font-size: 19px; line-height: 1.25; }
.card h3 { margin: 12px 0 6px; font-size: 15px; }
.card p { margin: 0; color: #3b3935; }
.card p + p { margin-top: 8px; }
.list { margin: 8px 0 0; padding-left: 18px; color: #3b3935; } .list li + li { margin-top: 4px; }
.steps { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.steps i { width: 28px; height: 28px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-style: normal; }
.steps i.done { border-style: solid; border-color: rgba(0,0,0,.15); }
.tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tray.busy { pointer-events: none; opacity: .55; transition: opacity .2s; }
.drill { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; font: 600 14px Inter; color: var(--ink); transition: transform .12s, border-color .12s; }
.drill:hover { border-color: var(--gold-soft); } .drill:active { transform: scale(.97); }
.drill:focus-visible, .btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ring { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); flex: none; }
.drill img { width: 100%; max-width: 84px; aspect-ratio: 1; object-fit: contain; display: block; }
.drill .lab { display: flex; align-items: center; gap: 5px; }
.drill .lab i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); }
.product { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 10px 8px; }
.product:hover { border-color: var(--gold-soft); }
.product img { width: 52px; height: 60px; object-fit: contain; flex: none; }
.product b { display: block; font-size: 14px; } .product span { font-size: 12px; color: var(--muted); }
.drill.used { opacity: .45; } .drill.shake { animation: shake .35s; border-color: var(--err); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--navy); background: var(--navy); color: #f7f6f2; font: 600 15px Inter; cursor: pointer; text-decoration: none; text-align: center; }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.small { width: auto; padding: 8px 12px; font-size: 13px; }
.stack { display: grid; gap: 8px; margin-top: 14px; }
.row { display: flex; gap: 8px; }
.dial-wrap { display: grid; justify-items: center; gap: 8px; }
.dial { width: 150px; height: 150px; border-radius: 50%; touch-action: none; cursor: grab; position: relative;
  background: conic-gradient(from 0deg, #e9e4d8, #ffffff, #e9e4d8, #ffffff, #e9e4d8); border: 1px solid var(--line); box-shadow: inset 0 0 0 10px #fff; }
.dial::after { content: ""; position: absolute; left: 50%; top: 8px; width: 6px; height: 34px; margin-left: -3px; border-radius: 3px; background: var(--gold); }
@media (max-width: 860px) { .dial { width: 130px; height: 130px; } }
.meter { font: 500 13px Inter; color: var(--muted); text-align: center; } .meter b { color: var(--ink); font-weight: 700; }
.fact { border-left: 3px solid var(--gold-soft); padding-left: 10px; margin-top: 12px; font-size: 14px; }
.fact small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cmp { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.cmp td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: middle; }
.cmp .n { color: var(--muted); width: 22px; } .cmp .st { text-align: right; font-weight: 700; }
.cmp .dd { display: flex; align-items: center; gap: 8px; } .cmp .ring { width: 18px; height: 18px; }
.cmp .note { color: var(--muted); font-size: 12px; }
.ok { color: var(--ok); } .bad { color: var(--err); }
.breakdown { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.breakdown .tot { font-weight: 800; border-top: 1px solid var(--line); padding-top: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: 500 13px Inter; }
.chip[aria-pressed="true"] { background: var(--navy); color: #f7f6f2; border-color: var(--navy); }
.big { font: 800 44px/1 Inter; font-variant-numeric: tabular-nums; margin: 6px 0; }
.rank { font: 700 18px Inter; color: var(--gold); }
.best { font: 500 13px Inter; color: var(--muted); margin-top: 4px; }
.legend { font-size: 12px; color: var(--muted); margin-top: 10px; }
footer { grid-area: foot; font: 400 12px Inter; color: var(--muted); }
.hidden { display: none !important; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; }

/* ---- v3 ---- */
.col { display: grid; gap: 10px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.levels { display: grid; gap: 8px; margin-top: 12px; }
.level { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; color: var(--ink); }
.level:hover { border-color: var(--gold-soft); }
.lv-n { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #f7f6f2; display: grid; place-items: center; font-weight: 700; }
.lv-t b { display: block; font-size: 15px; } .lv-t small { color: var(--muted); font-size: 12px; }
.lv-s { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; } .lv-s small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.tray { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.drill { padding: 8px 2px; font-size: 12px; }
.drill img { width: 100%; max-width: 72px; aspect-ratio: 1; object-fit: contain; display: block; }
.drill .lab { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
i.dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); display: inline-block; flex: none; }
i.ring { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); display: inline-block; flex: none; }
.steps i.done { border: 1px solid rgba(0,0,0,.2); }
.cmp .code { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chc { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: start; }
.chc img { width: 90px; height: auto; }
.product img { width: 44px; height: 52px; object-fit: contain; flex: none; }
.btn.wa { background: #1f8f4e; border-color: #1f8f4e; }
.submit { margin-top: 12px; display: grid; gap: 6px; font-size: 13px; }
.submit input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 500 15px Inter; }
.boardList { margin: 8px 0 0; padding-left: 0; list-style: none; font-size: 14px; }
.boardList li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.chips + .chips { margin-top: 4px; }
body.kiosk { font-size: 18px; }
body.kiosk .app { max-width: 1400px; grid-template-columns: minmax(0, 1fr) 460px; }
body.kiosk .btn { padding: 16px 18px; font-size: 18px; } body.kiosk .drill { font-size: 15px; }
@media (max-width: 860px) { .tray { grid-template-columns: repeat(5, minmax(0, 1fr)); } .drill { font-size: 11px; } }

body.embed { background: transparent; } body.embed .app { padding: 0; }
body.embed header h1, body.embed .brand { display: none; } body.embed header { justify-content: flex-end; }  /* заголовок даёт страница сайта, кнопка звука остаётся */

footer small.model-note { font-size: 11px; color: var(--muted); }
