/* Игра «Безопасное вождение» — единые стили (25.11.2026, docs/design/road-safety/TZ-render.md).
   Пишется с нуля по макетам Claude Design: одна система с приложением «Danone Поле».
   Правило: один класс — одно описание, без слоёв-переопределений и без !important (кроме [hidden]). */

/* ---------- шрифт: свой файл, без Google (кириллицы в Figtree нет — она берётся из системного) ---------- */
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

/* ---------- токены ---------- */
:root {
  --accent: #005eb8; --accent-dark: #002677; --accent-soft: #ccdff1; --tint: #e6eff9; --soft: #f4f6f9;
  --text: #000; --muted: rgba(0, 0, 0, .62); --faint: rgba(0, 0, 0, .45); --line: rgba(0, 0, 0, .12); --track: #e3e7ee;
  --ok: #00843d; --ok-ink: #00572a; --ok-bg: #e5f3eb;
  --warn: #b45309; --warn-ink: #7a3a05; --warn-bg: #fdf1e3;
  --bad: #c8102e; --bad-ink: #9e0c24; --bad-bg: #fbe8eb;
  --gold: #f5b800; --gold-ink: #5c4300; --gold-bg: #fff4cc;
  --pill: 999px; --r: 16px; --r-s: 12px;
  --font: "DanoneOne Regular", "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nav-h: 120px;
}

/* ---------- основа ---------- */
* { box-sizing: border-box }
[hidden] { display: none !important }
html { background: #fff; -webkit-text-size-adjust: 100%; overscroll-behavior-y: contain; overflow-x: clip }
body { margin: 0; min-height: 100dvh; background: #fff; color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; touch-action: manipulation; overflow-x: clip }
h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em }
h2 { margin: 24px 0 10px; font-size: 20px; line-height: 1.25; font-weight: 800 }
h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800 }
p { margin: 8px 0 }
b, strong { font-weight: 700 }
button { font-family: inherit; color: inherit }
a { color: var(--accent) }
.lead { font-size: 16px; color: var(--muted) }
.mut, .muted { color: var(--muted) }
.cap { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted) }
.cap.acc { color: var(--accent) }
.center { text-align: center }
.num { font-variant-numeric: tabular-nums }
.src { font-size: 13px; color: var(--muted); margin: 6px 0 0 }
.term { color: var(--accent-dark) }
.term b { font-weight: 700 }
.tr { color: var(--muted); font-style: normal; font-weight: 500; font-size: .9em; white-space: nowrap }

/* иконки: линейные, цвет — от текста */
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px }
svg.i.s { width: 16px; height: 16px; vertical-align: -3px }
svg.i.lost { opacity: .25 }
svg.i.on { color: var(--bad); fill: var(--bad) }
.ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-s); background: var(--tint); color: var(--accent); flex: none }

@keyframes in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@keyframes shake { 25% { transform: translateX(-5px) } 75% { transform: translateX(5px) } }
@keyframes bump { 40% { transform: scale(1.25) } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(0, 94, 184, .18) } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }

/* ---------- шапка ---------- */
header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2px; min-height: 56px; padding: env(safe-area-inset-top, 0px) 4px 0; background: #fff; border-bottom: 1px solid var(--line) }
.ib { width: 44px; height: 44px; display: grid; place-items: center; flex: none; padding: 0; border: 0; border-radius: var(--pill); background: none; color: var(--text); cursor: pointer; text-decoration: none }
.hbtn { color: var(--accent) }
.hbtn.off { color: var(--faint) }
.ht { flex: 1; min-width: 0; padding: 0 4px }
.ht b { display: block; font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.pips { display: flex; gap: 2px; margin-top: 6px }
.pips i { flex: 1; height: 4px; border-radius: 2px; background: var(--track) }
.pips i.d { background: var(--accent) }
.pips i.c { background: var(--accent-dark) }
#count { padding: 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap }
.errs { display: inline-flex; align-items: center; gap: 3px; height: 24px; margin-right: 2px; padding: 0 8px; border-radius: 12px; background: var(--bad-bg); color: var(--bad-ink); font-size: 12px; font-weight: 800 }
.errs.bump { animation: bump .4s }
.brand, .bar { display: none }
body.tg #closeG { display: none }
@media (max-width: 359px) { .ht b { display: none } .pips { margin-top: 0 } }

/* ---------- экран ---------- */
main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px)) }
.slide { display: flex; flex-direction: column; animation: in .2s ease }
.slide > * { min-width: 0 }
.slide > .wroad { order: -5 }
.slide > h1 { order: -4 }
.slide > .quest:not(.quest2) { order: -3 }
#boot { text-align: center; padding: 48px 16px }

/* ---------- нижняя панель ---------- */
nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px max(12px, calc(8px + env(safe-area-inset-bottom, 0px))); background: #fff; border-top: 1px solid var(--line) }
nav #lock { order: -1; flex: 0 0 100%; display: flex; align-items: center; gap: 6px; min-height: 20px; margin: 0 2px; font-size: 13px; font-weight: 600; color: var(--muted) }
nav #lock[style*="none"] { display: none }
nav .btn { margin: 0 }
nav #back { width: 52px; flex: none; padding: 0 }
nav #next, nav #finAct { flex: 1 }
nav #next:disabled { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--faint) }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; max-width: 100%; margin: 0; padding: 10px 22px; border: 0; border-radius: var(--pill);
  background: var(--accent); color: #fff; font: 700 16px/1.2 var(--font); text-align: center; text-decoration: none; cursor: pointer; transition: transform .1s, background .15s }
.btn:hover { background: var(--accent-dark) }
.btn:active { transform: scale(.97) }
.btn:disabled { background: #e9edf2; color: var(--faint); cursor: not-allowed; transform: none }
.btn.sm { min-height: 44px; padding: 8px 18px; font-size: 15px }
.btn.ghost { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .5) }
.btn.ghost:hover { background: var(--soft) }
.btn.ghost:disabled { background: #fff; box-shadow: inset 0 0 0 1px var(--line) }
.btn.gold { background: var(--gold); color: #2b1f00 }
.btn.gold:hover { background: #e6ad00 }
.btn.brakebtn { background: var(--bad) }
.btn.brakebtn:hover { background: var(--bad-ink) }
.btn.link { min-height: 44px; padding: 0 10px; background: none; color: var(--accent); box-shadow: none }
.btn.link:hover { background: var(--tint) }
.btn.wide { width: 100% }
.btn.pulse { animation: pulse 1.6s infinite }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px }
.acts .btn { flex: 1 }

/* ---------- «Задание» ---------- */
.quest { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 16px; padding: 14px; border-radius: var(--r); background: var(--tint) }
.quest .qic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--r-s); background: var(--accent); color: #fff }
.quest .qtx { flex: 1; min-width: 0 }
.quest small { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--accent) }
.quest-b { margin-top: 2px; font-size: 16px; line-height: 1.4; font-weight: 600 }
.quest-b p { margin: 0 0 10px }
.quest b { color: var(--accent-dark) }
.quest .pips { gap: 4px; margin-top: 10px }
.quest .pips i { max-width: 40px; height: 6px; border-radius: 3px; background: #fff; box-shadow: inset 0 0 0 1px var(--accent-soft) }
.quest .pips i.d { background: var(--accent); box-shadow: none }
.quest.done { background: var(--ok-bg) }
.quest.done .qic { background: var(--ok) }
.quest.done small { color: var(--ok-ink) }
.quest.done .pips i { background: var(--ok); box-shadow: none }
.quest.quest2 { background: var(--soft) }
.quest.quest2 .qic { background: var(--muted) }

/* ---------- блоки текста ---------- */
.box { padding: 14px 16px; border-radius: var(--r); background: var(--soft); font-size: 15px; line-height: 1.45 }
.box.star { background: var(--gold-bg); color: var(--gold-ink) }
.ibox { display: flex; gap: 12px; align-items: flex-start }
.ibox > .ico { width: 32px; height: 32px; border-radius: 10px; background: #fff }
.ibox > div { flex: 1; min-width: 0 }
.tipbox, .warnbox { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px }
.tipbox .tic { color: var(--accent); flex: none }
.warnbox { background: var(--warn-bg); color: var(--warn-ink) }
.warnbox .tic { color: var(--warn); flex: none }
.grid { display: grid; gap: 8px; margin-top: 12px }
.g2, .g3 { grid-template-columns: 1fr }
@media (min-width: 560px) { .g2 { grid-template-columns: 1fr 1fr } .g3 { grid-template-columns: repeat(3, 1fr) } }
.list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px }
.list li { display: flex; gap: 8px; align-items: flex-start }
.list li svg.i { color: var(--accent); margin-top: 2px }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--soft); font-size: 15px }
.rule .ico { width: 32px; height: 32px; background: #fff }
.brk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 15px }
.brk span { padding: 4px 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line) }
.brk i { font-style: normal; color: var(--accent); font-weight: 800 }

/* цифры статистики: три в ряд */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0 }
.stat { padding: 12px 6px; border-radius: 14px; background: var(--tint); text-align: center }
.stat .sn { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--accent-dark); font-variant-numeric: tabular-nums }
.stat .st { margin-top: 4px; font-size: 13px; color: var(--muted) }
.stat.red { background: var(--bad-bg) }
.stat.red .sn { color: var(--bad-ink) }

/* ---------- вопросы ---------- */
.qz { margin: 20px 0 0 }
.q { margin: 0 0 10px; font-size: 17px; font-weight: 800; line-height: 1.35 }
.opt { display: block; width: 100%; min-height: 56px; margin: 0 0 8px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font: 600 16px/1.35 var(--font); text-align: left; cursor: pointer; transition: border-color .15s }
.opt:hover { border-color: var(--accent) }
.opt.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink) }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad-ink); animation: shake .35s }
.opt:disabled { cursor: default }
.fb { display: none; position: relative; margin-top: 8px; padding: 12px 14px 12px 42px; border-radius: 14px; font-size: 15px; line-height: 1.45 }
.fb::before { content: ""; position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat }
.fb.ok, .fb.bad, .fb.info, .fb.warn { display: block }
.fb.ok { background: var(--ok-bg); color: var(--ok-ink); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") }
.fb.bad { background: var(--bad-bg); color: var(--bad-ink); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") }
.fb.info { background: var(--tint); color: var(--accent-dark); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E") }
.fb.warn { display: flex; gap: 10px; padding: 12px 14px; margin: 0 0 14px; background: var(--warn-bg); color: var(--warn-ink) }
.fb.warn::before { display: none }
.fb.warn b { display: block }
.fb i { font-style: normal; font-weight: 600 }
.fb .btn { margin-top: 10px }

/* ---------- карточки-перевёртыши ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)) } }
.card { height: 204px; perspective: 900px; cursor: pointer }
.card .in { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d }
.card.f .in { transform: rotateY(180deg) }
.card .fr, .card .bk { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; border-radius: var(--r); backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: center }
.card .fr { justify-content: center; gap: 6px; padding: 10px; background: #fff; border: 1.5px solid var(--line) }
.card .fr .e { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--tint); color: var(--accent) }
.card .fr .e svg.i { width: 26px; height: 26px }
.card .fr b { font-size: 16px; font-weight: 800; line-height: 1.2 }
.card .fr small { font-size: 13px; font-weight: 700; color: var(--accent) }
.card .bk { justify-content: flex-start; padding: 12px; overflow: auto; transform: rotateY(180deg); background: var(--tint); border: 2px solid var(--accent); font-size: 14px; line-height: 1.35; text-align: left; justify-content: center }
.card.seen .fr { background: var(--ok-bg); border-color: transparent; color: var(--ok-ink) }
.card.seen .fr .e { background: #fff; color: var(--ok) }
.card.seen .fr small { color: var(--ok-ink) }

/* ---------- вкладки «нажми — узнай» ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px }
.tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--pill); background: #fff; font: 700 15px var(--font); cursor: pointer }
.tabs button svg.i { color: var(--accent) }
.tabs button.seen { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink) }
.tabs button.seen svg.i { color: var(--ok) }
.tabs button.on, .tabs button.on.seen { border-color: var(--accent); background: var(--accent); color: #fff }
.tabs button.on svg.i { color: #fff }
.tabd { min-height: 72px; background: var(--tint); font-size: 15px }
.tabd.empty { display: flex; align-items: center; gap: 8px; background: var(--soft); color: var(--muted) }

/* ---------- мультик ---------- */
.toon { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r) }
.tstage { position: relative }
.toon svg:not(.i) { display: block; width: 100%; height: auto }
.tstart { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 38, 119, .35) }
.tcap { min-height: 72px; padding: 12px 14px; font-size: 16px; line-height: 1.4; border-top: 1px solid var(--line); transition: background .3s }
.tcap.flash { background: var(--gold-bg) }
.toonbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; background: var(--soft) }
.tnav { flex: none }
.tnav.next { flex: 1 }
.tcnt { min-width: 44px; text-align: center; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums }
.tprog { height: 4px; background: var(--track) }
.tprog i { display: block; height: 100%; width: 0; background: var(--accent) }

/* ---------- «Найди на картинке» ---------- */
.hidwrap { position: relative }
.hidden { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #fff }
.hidden svg:not(.i) { display: block; width: 100%; height: auto; cursor: pointer; touch-action: manipulation }
.hcap { margin: 8px 0 0; font-size: 14px; color: var(--muted) }
.hhud { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px }
.hhud .htime { margin-left: auto }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--pill); background: var(--soft); font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums }
.chip.gold { background: var(--gold-bg); color: var(--gold-ink) }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink) }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink) }
.htime { color: var(--bad-ink); background: var(--bad-bg) }
.hhud .btn { min-height: 40px; padding: 0 14px; font-size: 14px }
/* всплывающая карточка находки — снизу экрана, поверх панели */
.hpop { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 80dvh; overflow: auto; padding: 8px 16px max(16px, calc(12px + env(safe-area-inset-bottom, 0px))); background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -8px 32px rgba(0, 0, 0, .18) }
.hpop.open { display: block; animation: sheet .22s ease }
.hpop::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: var(--track) }
@keyframes sheet { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.hpop .quest { margin: 0 0 6px }
.sheet-h { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--accent) }
.sheet-t { margin: 0 0 6px; font-size: 20px; font-weight: 800; line-height: 1.25 }
.sheet-d { margin: 0 0 12px; font-size: 16px; line-height: 1.45 }
.sheet-q { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--muted) }
.hpop .btn { width: 100% }
.hpop .opt { display: flex; align-items: center; gap: 10px }
.gfb { display: none; margin: 4px 0 12px; padding: 12px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45 }
.gfb.on { display: block }
.gfb.ok { background: var(--ok-bg); color: var(--ok-ink) }
.gfb.bad { background: var(--bad-bg); color: var(--bad-ink) }
.scrim { display: none; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .28) }
.scrim.on { display: block }

/* ---------- пары ---------- */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch }
.mcol { display: grid; grid-auto-rows: minmax(72px, 1fr); gap: 8px }
.mc { display: flex; align-items: center; justify-content: center; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font: 600 14px/1.3 var(--font); text-align: left; cursor: pointer }
.mc.a svg:not(.i) { width: 52px; height: auto }
.mc.b { justify-content: flex-start }
.mc.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.mc.done { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink); cursor: default }
.mc.bad { border-color: var(--bad); animation: shake .35s }
.mhint { margin: 0 0 10px; font-size: 14px; color: var(--muted) }

/* ---------- тренажёры ---------- */
.sim { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #fff }
.sim svg:not(.i), .sim canvas { display: block; width: 100%; height: auto }
.simcap { margin: 0 0 8px; font-size: 15px; font-weight: 700 }
.simbar { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--soft) }
.simbar > .btn { width: 100% }
.ctl-h { font-size: 14px; font-weight: 700 }
.rng { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center }
.rng span { font-size: 14px; font-weight: 700 }
.rng b { grid-row: 1; grid-column: 2; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums }
.rng input { grid-column: 1 / -1; width: 100%; height: 32px; margin: 0; accent-color: var(--accent) }
.segrow { display: grid; gap: 6px }
.segrow > span { font-size: 14px; font-weight: 700 }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px 4px }
.seg::-webkit-scrollbar { display: none }
.seg button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--pill); background: #fff; font: 600 15px var(--font); cursor: pointer; white-space: nowrap }
.seg button svg.i { color: var(--accent) }
.seg button.on { border-color: var(--accent); background: var(--accent); color: #fff }
.seg button.on svg.i { color: #fff }
.simres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px }
.simres:empty { display: none }
.simres div { padding: 8px 10px; border-radius: var(--r-s); background: #fff; font-size: 12px; line-height: 1.3; color: var(--muted) }
.simres b { display: block; margin-top: 2px; font-size: 20px; color: var(--text) }
.simres .w b { color: var(--warn) }
.simres .r b { color: var(--bad) }
.verdict { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); font-size: 15px; font-weight: 600; line-height: 1.4 }
.verdict.ok { background: var(--ok-bg); color: var(--ok-ink) }
.verdict.bad { background: var(--bad-bg); color: var(--bad-ink) }
.verdict.mid { background: var(--warn-bg); color: var(--warn-ink) }
.verdict > div { flex: 1 }
.verdict .btn { margin-top: 10px; width: 100% }
.tries { display: flex; flex-direction: column; gap: 4px }
.tries:empty { display: none }
.tries::before { content: attr(data-h); font-size: 13px; font-weight: 700; color: var(--muted) }
.tries span { display: flex; align-items: center; gap: 6px; font-size: 13px }
.tries span .ok { color: var(--ok) }
.tries span .bad { color: var(--bad) }
.fkgrid { display: grid; grid-template-columns: 1.75fr 1fr; background: #fff }
.fkgrid svg:not(.i) { display: block; width: 100% }
@media (max-width: 559px) { .fkgrid { grid-template-columns: 1fr } .fkgrid > div:last-child svg { max-width: 200px; margin: 0 auto } }
.blindsim { max-width: 360px; margin: 0 auto }
.bsp { cursor: pointer }

/* ---------- аркада ---------- */
.arc { padding: 10px; border-radius: var(--r); background: var(--soft); user-select: none; -webkit-user-select: none }
.hud { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; margin: 0 0 8px }
.hud span { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--pill); background: #fff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums }
.hud .gold { background: var(--gold-bg); color: var(--gold-ink) }
.arcfield { position: relative; max-width: 380px; margin: 0 auto }
.arc canvas { display: block; width: auto; max-width: 100%; max-height: 46dvh; margin: 0 auto; border-radius: var(--r-s); background: #3b4148; touch-action: none }
.arcgo { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: var(--r-s); background: rgba(0, 38, 119, .55); color: #fff; text-align: center; font-weight: 700 }
.arcgo p { margin: 0; max-width: 260px; font-size: 15px; line-height: 1.4 }
.arcbtns { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; max-width: 380px; margin: 10px auto 0 }
.arcbtns button { display: grid; place-items: center; min-height: 56px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font: 800 17px var(--font); cursor: pointer; touch-action: manipulation }
.arcbtns button.brake { background: var(--bad) }
.arcbtns button:active { transform: translateY(2px) }
.arcbtns svg.i { width: 26px; height: 26px }
.arcmsg { min-height: 24px; margin: 10px 0 0; font-size: 15px; font-weight: 600; text-align: center }
.arcmsg:empty { display: none }
.phonepop { display: none; position: absolute; left: 50%; top: 14%; z-index: 3; width: min(84%, 300px); padding: 12px 14px; border-radius: var(--r); background: rgba(255, 255, 255, .97); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transform: translateX(-50%); cursor: pointer; font-size: 15px }
.phonepop.on { display: block; animation: in .25s }
.phonepop .ph { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; font-weight: 800 }
.phonepop .ph .ico { width: 28px; height: 28px; border-radius: 8px; background: var(--ok); color: #fff }
.phonepop small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted) }
.blind { display: none; position: absolute; inset: 0; z-index: 2; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--r-s); background: #000; color: #fff; font-size: 18px; font-weight: 800; text-align: center }
.blind.on { display: flex }
.blind.full { position: fixed; z-index: 70; border-radius: 0; font-size: 22px }
.blind svg.i { width: 40px; height: 40px }

/* ---------- «Миф или правда» ---------- */
.swhud { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px }
.swstage { display: grid; place-items: center; min-height: 240px; padding: 20px 0; overflow: hidden; border-radius: var(--r); background: var(--soft); touch-action: pan-y }
.swlbl { display: none }
.swcard { position: relative; width: 86%; padding: 18px 16px; border: 1.5px solid var(--line); border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 8px 24px rgba(0, 38, 119, .12); transform-origin: 50% 120%; cursor: grab; transition: transform .35s, opacity .35s; touch-action: none; user-select: none; -webkit-user-select: none }
.swcard.res { cursor: default; text-align: left }
.swres { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--pill); font-size: 15px; font-weight: 800 }
.swres.t { background: var(--ok-bg); color: var(--ok-ink) }
.swres.m { background: var(--bad-bg); color: var(--bad-ink) }
.swwhy { margin-top: 10px; font-size: 16px; line-height: 1.45 }
.swnext { margin-top: 10px }
.swcard.shake { animation: shake .35s }
.swe { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; background: var(--tint); color: var(--accent) }
.swe svg.i { width: 30px; height: 30px }
.swt { margin-top: 10px; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--accent-dark) }
.swh { margin-top: 10px; font-size: 13px; color: var(--muted) }
.swbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px }

/* ---------- порядок действий ---------- */
.ord-h { margin: 14px 0 8px; font-size: 14px; font-weight: 700; color: var(--muted) }
.oseq { list-style: none; counter-reset: o; display: grid; gap: 6px; margin: 0; padding: 0 }
.oseq li { counter-increment: o; position: relative; min-height: 48px; padding: 12px 12px 12px 50px; border-radius: 14px; font-size: 15px; line-height: 1.35 }
.oseq li::before { content: counter(o); position: absolute; left: 10px; top: 10px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--tint); color: var(--accent-dark); font-weight: 800; font-size: 14px }
.oseq li.empty { border: 1.5px dashed var(--accent-soft); color: var(--faint) }
.oseq li.next { border-color: var(--accent); color: var(--accent) }
.oseq li.fill { background: var(--ok-bg); color: var(--ok-ink); animation: in .3s }
.oseq li.fill::before { background: var(--ok); color: #fff }
.opool { display: grid; gap: 8px }
.ochip { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font: 600 15px/1.35 var(--font); text-align: left; cursor: pointer }
.ochip:hover { border-color: var(--accent) }
.ochip.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad-ink); animation: shake .35s }

/* ---------- конвейер ---------- */
.convgo { margin: 0 0 10px }
.convgo .btn { width: 100% }
.conv { position: relative; overflow: hidden; border-radius: var(--r); background: var(--soft); user-select: none }
.chud { display: flex; gap: 6px; justify-content: space-between; padding: 10px 10px 0 }
.chud span { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--pill); background: #fff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums }
.belt { position: relative; height: 200px; margin-top: 6px }
.belt .track { position: absolute; left: 0; right: 0; bottom: 22px; height: 30px; background: repeating-linear-gradient(90deg, #3d4a58 0 22px, #55636f 22px 44px); border-top: 4px solid #22303d; border-bottom: 4px solid #22303d }
.belt .legs { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(90deg, transparent 0 60px, #22303d 60px 70px) }
.zone { position: absolute; right: 0; top: 0; bottom: 22px; width: 56px; background: repeating-linear-gradient(45deg, rgba(200, 16, 46, .16) 0 10px, transparent 10px 20px) }
.ccard { position: absolute; left: 0; bottom: 60px; display: flex; gap: 8px; align-items: flex-start; width: 210px; padding: 10px 12px; border: 2px solid var(--accent); border-radius: 14px; background: #fff; font-size: 14px; font-weight: 700; line-height: 1.3; box-shadow: 0 6px 16px rgba(0, 0, 0, .12) }
.ccard .ico { width: 30px; height: 30px; border-radius: 9px }
.ccard.fly { opacity: 0; transition: transform .45s ease-in, opacity .45s }
.ccard.wrong { border-color: var(--bad); animation: shake .35s }
.bins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px }
.bin { min-height: 72px; padding: 10px 8px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; font: 800 15px/1.2 var(--font); cursor: pointer }
.bin .tr { display: block; margin-top: 4px; font-size: 12px; white-space: normal }
.bin:active { transform: translateY(2px) }
.bin.c0 { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink) }
.bin.c1 { border-color: var(--bad); color: var(--bad-ink) }
.bin.c2 { border-color: var(--warn); color: var(--warn-ink) }
.bin.c3 { border-color: var(--accent); color: var(--accent-dark) }
.bin.flash { outline: 3px solid var(--gold); outline-offset: 2px }
.cmsg { min-height: 48px; padding: 0 14px 14px; font-size: 15px; font-weight: 700; text-align: center }
.cmsg.ok { color: var(--ok-ink) }
.cmsg.bad { color: var(--bad-ink) }

/* ---------- супер-викторина ---------- */
.show { padding: 14px; border-radius: var(--r); background: var(--tint) }
.showtop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px }
.showtop .chip { background: #fff }
.lifes { display: flex; gap: 6px; margin-left: auto }
.life { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--pill); background: #fff; font: 700 14px var(--font); cursor: pointer }
.life:disabled { opacity: .4; cursor: not-allowed }
.qbox { margin: 0 0 10px; padding: 14px 16px; border-radius: var(--r); background: #fff; font-size: 18px; font-weight: 700; line-height: 1.35; text-align: center }
.answers { display: grid; gap: 8px }
.ans4 { display: flex; gap: 8px; align-items: center; min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font: 600 16px/1.3 var(--font); text-align: left; cursor: pointer }
.ans4 b { color: var(--accent-dark) }
.ans4.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink) }
.ans4.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad-ink) }
.ans4.gone { visibility: hidden }
.showmsg { display: none; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; font-size: 15px; line-height: 1.45 }
.showmsg.on { display: block }
.showmsg.ok { background: var(--ok-bg); color: var(--ok-ink) }
.showmsg.bad { background: var(--bad-bg); color: var(--bad-ink) }
.showmsg .btn { width: 100%; margin-top: 10px }

/* ---------- приветствие ---------- */
.wroad { height: 120px; margin: 0 0 14px; overflow: hidden; border-radius: 24px; background: #d4eef9 }
.wroad svg:not(.i) { display: block; width: 100%; height: 100% }
.wfeat { margin: 4px 0 12px }
.wlinks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px }

/* ---------- финиш ---------- */
.fhero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px 12px; border-radius: 24px; text-align: center }
.fhero.ok { background: var(--tint) }
.fhero > i { position: absolute; max-height: 12px; border-radius: 2px; animation: conf 1.2s ease-out both }
@keyframes conf { from { opacity: 0; transform: translateY(-14px) scale(.6) } to { opacity: 1 } }
.fhero .big { margin: 0; font-size: 80px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--accent-dark) }
.fhero .fplace { font-size: 88px }
.fhero .big small { margin-left: 2px; font-size: .36em; letter-spacing: 0; vertical-align: .9em }
.fhero .reason { margin: 0; font-size: 16px; font-weight: 600 }
.fhero .fsub { margin: 0; font-size: 14px; color: var(--muted) }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--pill); font-size: 13px; font-weight: 700 }
.badge.ok { background: #fff; color: var(--ok-ink) }
.fstats { position: relative; z-index: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; width: 100%; padding-top: 6px }
.fstats div { padding: 12px 6px; border-radius: var(--r-s); background: #fff }
.fstats b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1 }
.fstats span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted) }
.fbadges { margin-top: 14px }
.fbadges .h { display: flex; justify-content: space-between; align-items: baseline }
.fbadges .h a { font-size: 14px; font-weight: 700; text-decoration: none }
.fbadges .row { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0 }
.fmed { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; flex: none; text-align: center }
.fmed .medal { width: 52px; height: 52px }
.fmed small { font-size: 12px; line-height: 1.2 }
.frows { display: flex; flex-direction: column; margin-top: 12px }
.frow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: 600 16px var(--font); text-align: left; text-decoration: none; cursor: pointer }
.frow .e { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-s); background: var(--tint); color: var(--accent) }
.frow .e.gold { background: var(--gold-bg); color: #8a6200 }
.frow .tx { flex: 1; min-width: 0 }
.frow small { display: block; font-size: 13px; font-weight: 500; color: var(--muted) }
.frow > svg:last-child { color: var(--faint) }
.frow[aria-expanded="true"] > svg:last-child { transform: rotate(180deg) }
.ftopics { padding: 4px 0 8px }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px 44px; gap: 10px; align-items: center; min-height: 40px; font-size: 14px }
.rrow b { text-align: right; font-variant-numeric: tabular-nums }
.rrow.low { color: var(--bad-ink) }
.rbar { height: 8px; overflow: hidden; border-radius: 4px; background: var(--track) }
.rbar i { display: block; height: 100%; border-radius: 4px; background: var(--accent) }
.rrow.low .rbar i { background: var(--bad) }
.keys { display: grid; gap: 8px }
.fend { display: flex; justify-content: center; margin-top: 16px }
.skel { display: block; border-radius: 10px; background: linear-gradient(90deg, #eef1f5, #f6f8fa, #eef1f5); background-size: 200% 100%; animation: sk 1.2s infinite }
@keyframes sk { to { background-position: -200% 0 } }
.bmoment { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 8px; text-align: center }
.bmoment h1 { margin: 0 }
.bmoment .mut { max-width: 300px; margin: 0 }
.medal { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 50% }
.medal.xl { width: 128px; height: 128px; margin: 8px 0 }
.medal.xl svg { width: 56px; height: 56px }
.medal.gold { background: var(--gold-bg); color: #8a6200; box-shadow: inset 0 0 0 4px var(--gold) }
.medal.blue { background: var(--tint); color: var(--accent); box-shadow: inset 0 0 0 4px var(--accent) }

/* ---------- всплывашка ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); z-index: 30; width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: var(--pill); background: var(--accent-dark); color: #fff; font-weight: 700; text-align: center; opacity: 0; transform: translateX(-50%) translateY(16px); transition: .25s; pointer-events: none }
#toast.show { opacity: 1; transform: translateX(-50%) }

/* ---------- выбор языка и «Продолжить» (bridge.js) ---------- */
#langpick { position: fixed; inset: 0; z-index: 50; overflow: auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 24px; background: #fff }
#langpick .box { max-width: 480px; margin: 0 auto; padding: 0; background: #fff }
#langpick .btn { display: flex; width: 100%; min-height: 56px; margin: 8px 0; font-size: 17px }
#langpick .lrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin: 8px 0; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; font: 700 17px var(--font); text-align: left; cursor: pointer }
#langpick .lrow:hover { border-color: var(--accent) }
#langpick .lrow .k { width: 36px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--soft); font-size: 13px; font-weight: 800; color: var(--accent-dark) }
#langpick .lrow svg { margin-left: auto; color: var(--faint) }
#langpick .rcard { margin: 16px 0 8px; padding: 14px; border-radius: var(--r); background: var(--tint) }
#langpick .rcard .h { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700 }
#langpick .rcard .rbar { margin: 8px 0 6px; background: #fff }

/* ---------- иконки на месте эмодзи (iconize в engine.js) ---------- */
.emo { display: inline-flex; vertical-align: -4px; margin-right: 4px; color: var(--accent) }
.fb .emo, .gfb .emo, .verdict .emo, .cmsg .emo, .showmsg .emo, .tries .emo, .opt .emo, .btn .emo, .ochip .emo, .oseq .emo, #toast .emo, .blind .emo, .tabs .emo, .seg .emo, .bin .emo, .rule.star .emo { color: inherit }
.card .fr .e .emo, .ico .emo, .swe .emo { margin: 0; vertical-align: 0 }
.card .fr .e svg.i { width: 26px; height: 26px }
.blind .emo svg.i { width: 40px; height: 40px }

/* ---------- добавки ---------- */
.slide > .box, .slide > .grid { margin-top: 12px }
.rule.star { background: var(--gold-bg); color: var(--gold-ink) }
.rule.star .ico { color: #8a6200 }
.keys .rule { align-items: center }
.fb.stick { position: sticky; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom, 0px)); z-index: 5; margin-top: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12) }
.sheet-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 6px 0 12px }
.sheet-stats div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: var(--r-s); background: var(--soft); font-size: 13px; color: var(--muted) }
.sheet-stats b { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums }
.chs { display: grid; gap: 0 }
.gfb + .btn { margin-top: 4px }

@media (max-height: 700px) { header { min-height: 48px } .quest { padding: 12px } .quest-b { font-size: 15px } }
@media print { header, nav { display: none } }
.simbar > .chip { align-self: flex-start; background: #fff }
.arcfield { width: fit-content; max-width: 100% }
nav #back:disabled { box-shadow: inset 0 0 0 1px var(--line); color: var(--faint); background: #fff }
