/* ENOT ROAD — общая часть скопирована из BanFB (шапка, HUD, панели, оверлеи, честность) + дорога. */
/* BAN FB — поверх hub.css. */
.brand-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.all-games { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border: 3px solid var(--ink); background: var(--yellow);
  font-weight: 700; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); white-space: nowrap; }
.all-games:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.small { font-size: 12px; margin: 10px 0 0; }
.bf-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-bottom: 18px; }
.bf-title h1 { font-family: var(--font-head); margin: 0; font-size: clamp(38px, 4.6vw, 64px); line-height: .9; letter-spacing: -.04em; }
.bf-title .slogan { font-size: clamp(18px, 2vw, 28px); }
.bf-title .slogan { margin: 0; }
.bf-hud { grid-area: hud; }
.bf-ctrl { grid-area: ctrl; }
.bf-hud { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; border: 5px solid var(--ink); background: var(--ink); gap: 5px; box-shadow: 8px 8px 0 var(--ink); }
.hud-box { background: var(--paper); padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.hud-main { background: var(--yellow); grid-column: 1 / -1; }
.hud-k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.hud-v { font-family: var(--font-num); font-weight: 700; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-main .hud-v { font-family: var(--font-head); font-size: clamp(22px, 2.4vw, 34px); }
.hud-v.bump { animation: bump .35s ease-out; }
@keyframes bump { 0% { transform: scale(1.25); color: var(--green); } 100% { transform: scale(1); } }
.bf-phrase { min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center; margin-bottom: 12px;
  border: 3px solid var(--ink); background: var(--paper); padding: 6px 12px; font-weight: 700; font-size: 17px; }
.bf-phrase.is-win { background: #E7F6EE; border-color: var(--green); color: var(--green); }
.bf-phrase.is-ban { background: var(--red); color: var(--paper); }
.bf-phrase span { animation: phrase-in .3s ease-out; }
@keyframes phrase-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* эффекты поверх поля */
.fx { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 12px; }
.fx-ban { background: rgba(180, 35, 24, .38); animation: fx-in .2s ease-out; }
@keyframes fx-in { from { opacity: 0; } to { opacity: 1; } }
.fx-ban-card, .fx-win-card { background: var(--paper); border: 5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); width: min(400px, 100%); padding: 14px 16px 16px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.ban-sub { margin: 4px 0 0; font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.ban-reason { margin: 0; font-weight: 700; color: var(--red); }
.ban-loss { margin: 0; font-family: var(--font-head); font-size: 26px; }
.ban-sub, .ban-reason, .ban-loss, .fx-ban-card > button { opacity: 0; animation: fade .3s 1.1s forwards; }
@keyframes fade { to { opacity: 1; } }
.fx-ban-card > button, .fx-win-card > button { width: 100%; margin-top: 6px; }
.fx-win { background: rgba(255, 212, 0, .35); animation: fx-in .2s ease-out; }
.fx-win-card { background: var(--yellow); animation: pop .4s cubic-bezier(.2,1.6,.5,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.fx-win-card .win-racc { width: 86px; height: 88px; display: block; overflow: visible; animation: hop .6s .2s ease-out; }
@keyframes hop { 30% { transform: translateY(-18px) rotate(-8deg); } 60% { transform: translateY(0) rotate(4deg); } }
.win-k { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.win-v { margin: 0; font-family: var(--font-head); font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--green); background: var(--paper); border: 3px solid var(--ink); padding: 4px 12px; }
.win-x { margin: 0; font-family: var(--font-num); font-weight: 700; font-size: 18px; }
/* управление */
.panel-head .snd { min-height: 34px; padding: 2px 8px; background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: none; font-size: 16px; }
.panel-head .snd[aria-pressed="false"] { opacity: .55; }
.ctrl-body { display: grid; gap: 12px; }
.fld { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; align-items: center; }
.step button { min-height: 44px; padding: 0; box-shadow: 3px 3px 0 var(--ink); font-size: 20px; }
.step input[type=number] { text-align: center; font-weight: 700; font-size: 18px; -moz-appearance: textfield; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=range] { width: 100%; height: 44px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 30px; margin-top: -10px; background: var(--yellow); border: 3px solid var(--ink); }
input[type=range]::-moz-range-track { height: 10px; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 20px; height: 26px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 0; }
input:disabled { opacity: .5; cursor: not-allowed; }
.chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.chips button { min-height: 38px; padding: 2px 0; font-size: 13px; box-shadow: 3px 3px 0 var(--ink); background: var(--paper); color: var(--ink); }
.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.presets button { flex-direction: column; gap: 0; min-height: 54px; padding: 4px 2px; font-size: 10px; line-height: 1.1; letter-spacing: 0; box-shadow: 3px 3px 0 var(--ink);
  background: var(--paper); color: var(--ink); text-transform: none; font-weight: 600; }
.presets button b { font-family: var(--font-head); font-size: 18px; line-height: 1.05; }
.presets button.is-on { background: var(--yellow); }
.hint { margin: 0; font-family: var(--font-mono); font-size: 13px; border: 3px dashed var(--ink); padding: 8px 10px; background: var(--bg); }
.big { min-height: 60px; font-size: 20px; font-family: var(--font-head); letter-spacing: .02em; }
#btn-main.is-cash { background: var(--green); color: var(--paper); }
.credit { display: grid; gap: 6px; }
.credit .mono { font-size: 12px; }
/* ниже игры */
.bf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; margin-bottom: 30px; }
.hist td, .hist th { font-size: 14px; }
.hist .vbtn { min-height: 30px; padding: 2px 8px; font-size: 11px; box-shadow: 2px 2px 0 var(--ink); background: var(--paper); color: var(--ink); }
.tag-ban { background: var(--red); color: var(--paper); padding: 1px 6px; font-weight: 700; }
.tag-win { color: var(--green); font-weight: 700; }
.fair { margin-bottom: 10px; }
.fair-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; }
.kv { display: grid; gap: 4px; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.kv small { font-weight: 400; font-family: var(--font-mono); font-size: 11px; color: #444; }
.kv code, .verify code { font-family: var(--font-num); font-size: 13px; background: var(--bg); border: 2px solid var(--ink); padding: 6px 8px; overflow-wrap: anywhere; word-break: break-all; font-weight: 400; }
.seed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.seed-row button { min-height: 44px; box-shadow: 3px 3px 0 var(--ink); font-size: 13px; }
.fair-how h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: 20px; }
.fair-how ol { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.fair-how code { font-family: var(--font-num); background: var(--bg); padding: 0 4px; }
.verify code { display: block; margin-top: 2px; }
.verify { margin-top: 12px; border: 3px solid var(--ink); padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; }
.verify.is-ok { border-color: var(--green); background: #E7F6EE; }
.verify.is-bad { border-color: var(--red); background: #FDECEA; }
@media (max-width: 720px) {
  .brand-row { width: 100%; justify-content: space-between; }
  .all-games { min-height: 40px; padding: 4px 10px; font-size: 14px; }
  .bf-title { margin-bottom: 14px; }
  .bf-title .slogan { font-size: 18px; line-height: 1.45; }
  .bf-hud { grid-template-columns: repeat(4, minmax(0, 1fr)); box-shadow: 5px 5px 0 var(--ink); border-width: 4px; gap: 4px; }
  .hud-box { padding: 5px 6px; }
  .hud-k { font-size: 9px; letter-spacing: .02em; }
  .hud-v, .hud-main .hud-v { font-size: 16px; }
  .hud-main { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .hud-main .hud-v { font-size: 22px; }
  .hud-v { font-size: 14px; }
  .bf-ctrl .ctrl-body > .hint { order: -3; }
  .bf-ctrl .ctrl-body > #gmsg { order: -4; }
  .fx { padding: 8px; align-items: flex-end; }
  .fx-ban-card, .fx-win-card { padding: 10px; gap: 4px; box-shadow: 6px 6px 0 var(--ink); }
  .ban-sub { font-size: 12px; }
  .ban-loss { font-size: 20px; }
  .fx-ban-card > button, .fx-win-card > button { min-height: 40px; margin-top: 2px; }
  .fx-win-card .win-racc { width: 60px; height: 62px; }
  .win-x { font-size: 14px; }
  .bf-phrase { min-height: 42px; font-size: 15px; margin-bottom: 10px; }
  .bf-row { grid-template-columns: 1fr; gap: 22px; }
  .fair-grid { grid-template-columns: 1fr; }
  .top .hide-m { display: none; }
  .hist td, .hist th { font-size: 13px; padding: 7px 4px; }
}

/* ================= ENOT ROAD ================= */
.rd-game { display: grid; gap: 22px; margin-bottom: 30px; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); grid-template-areas: "ctrl main"; align-items: start; }
.rd-main { grid-area: main; min-width: 0; }
.rd-ctrl { grid-area: ctrl; }
.rd-hud { grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; margin-bottom: 14px; }
.rd-hud .hud-main { grid-column: auto; }

.road-wrap { --lane-w: 116px; --curb-w: 124px; --fin-w: 104px; --road-h: 440px; --racc: 104px;
  position: relative; border: 5px solid var(--ink); background: var(--ink); box-shadow: 10px 10px 0 var(--yellow), 10px 10px 0 5px var(--ink); }
.road-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--ink) var(--yellow); }
.road-scroll { cursor: pointer; touch-action: pan-x pan-y; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.road-tap { margin: 18px 0 0; font-size: 13px; letter-spacing: .02em; color: #444; text-align: right; }
.road-tap span[aria-hidden] { font-size: 14px; }
.road-scroll::-webkit-scrollbar { height: 10px; background: var(--yellow); }
.road-scroll::-webkit-scrollbar-thumb { background: var(--ink); }
.road { position: relative; display: flex; height: var(--road-h); width: max-content; min-width: 100%; background: #CFCFCF; }
.road.shake { animation: rshake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes rshake { 20%, 80% { transform: translate(4px, -2px); } 40%, 60% { transform: translate(-7px, 3px); } }

.curb { flex: 0 0 var(--curb-w); position: relative; background: repeating-linear-gradient(135deg, #FFFFFF 0 16px, #F0F0F0 16px 32px); border-right: 8px solid var(--ink); }
.curb-lbl { position: absolute; left: 8px; right: 8px; bottom: 14px; text-align: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; line-height: 1.2;
  border: 3px solid var(--ink); background: var(--paper); padding: 4px 2px; text-transform: uppercase; }
.finish { flex: 0 0 var(--fin-w); position: relative; border-left: 8px solid var(--ink);
  background: conic-gradient(var(--ink) 25%, var(--paper) 0 50%, var(--ink) 0 75%, var(--paper) 0) 0 0 / 26px 26px; }
.finish span { position: absolute; left: 8px; right: 8px; top: 50%; transform: translateY(-50%); background: var(--yellow); border: 3px solid var(--ink); text-align: center;
  font-family: var(--font-head); font-size: 15px; line-height: 1.2; padding: 6px 2px; }

.lanes { display: flex; }
.lane { position: relative; flex: 0 0 var(--lane-w); width: var(--lane-w); overflow: hidden; background: #CFCFCF; container-type: inline-size;
  transition: background-color .3s; }
.lane + .lane::before { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 4px; z-index: 1;
  background: repeating-linear-gradient(to bottom, var(--ink) 0 22px, transparent 22px 40px); }
.lane .lr { position: absolute; left: 6px; right: 6px; top: 8px; z-index: 2; text-align: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.8); border: 2px solid var(--ink); padding: 1px 2px; white-space: nowrap; overflow: hidden; }
.lane .plate { position: absolute; left: 6px; right: 6px; bottom: 50px; z-index: 2; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: var(--yellow); border: 3px solid var(--ink); padding: 3px 2px; font-family: "IBM Plex Mono", var(--font-mono); font-weight: 700;
  font-size: 14px; line-height: 1.1; text-transform: uppercase; overflow: hidden; }
.lane .plate span { display: block; white-space: nowrap; }
.lane .lx { position: absolute; left: 6px; right: 6px; bottom: 10px; z-index: 2; text-align: center; font-family: var(--font-num); font-weight: 700; font-size: 16px;
  background: var(--paper); border: 3px solid var(--ink); padding: 3px 0; white-space: nowrap; overflow: hidden; }
.lane .bar { position: absolute; left: 0; right: 0; top: 40px; z-index: 3; height: 30px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--yellow) 0 14px, var(--ink) 14px 28px); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: scaleX(0); transform-origin: left center; transition: transform .35s .15s cubic-bezier(.3,1.4,.5,1); }
.lane .bar b { background: var(--yellow); border: 2px solid var(--ink); font-family: var(--font-mono); font-size: 10px; padding: 0 4px; }
.lane.is-passed { background: #BFE3CD; }
.lane.is-passed .bar { transform: scaleX(1); }
.lane.is-passed .plate { background: var(--green); color: var(--paper); }
.lane.is-passed .lr { background: var(--green); color: var(--paper); border-color: var(--ink); }
.lane.is-passed .lx { color: var(--green); }
.lane.is-cur .lx { background: var(--yellow); color: var(--ink); }
.lane.is-next { background: #E9E9E9; }
.lane.is-next .lx { background: var(--ink); color: var(--yellow); }
.lane.is-next .plate { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.lane.is-death { background: #E9B3AE; }
.lane.is-death .plate { background: var(--red); color: var(--paper); }
.lane.is-death .lr { background: var(--red); color: var(--paper); }
.lane.would-pass { background: #D8E9DF; }
.lane.would-pass .lr { background: #E7F6EE; color: var(--green); }
.lane.would-ban { background: #E6CFCD; }
.lane.would-ban .lr { background: #FDECEA; color: var(--red); }
.lane.would-pass .plate, .lane.would-ban .plate { opacity: .75; }

/* машины модерации (фон) */
.tcar { position: absolute; left: 50%; top: -90px; width: 44px; height: 76px; margin-left: -22px; z-index: 1; display: none; animation: drive var(--dur, 3s) linear var(--del, 0s) infinite; }
.lane.is-ahead .tcar { display: block; }
@keyframes drive { from { transform: translateY(0); } to { transform: translateY(calc(var(--road-h) + 180px)); } }
@media (prefers-reduced-motion: reduce) { .tcar { animation: none; display: none !important; } }

/* енот — персонаж SVG (морда = трассировка иконки EnotWeb из Avia) */
.racc { position: absolute; z-index: 5; left: 0; top: calc(50% - var(--racc) / 2 - 6px); width: calc(var(--racc) * .9375); height: var(--racc); margin-left: calc(var(--racc) * -.47);
  transition: left .34s cubic-bezier(.4,0,.3,1); pointer-events: none; }
.racc .rc { width: 100%; height: 100%; display: block; overflow: visible; }
.rc-shadow, .rc-pshadow { fill: rgba(10,10,10,.26); transform-box: view-box; transform-origin: 60px 120px; }
.rc-shadow { animation: rc-shadow-idle 1.4s ease-in-out infinite; }
.rc-bod, .rc-pan { transform-box: view-box; transform-origin: 60px 119px; }
.rc-bod { animation: rc-idle 1.4s ease-in-out infinite; }
.rc-tail, .rc-armn, .rc-armf, .rc-legn, .rc-legf { transform-box: view-box; }
.rc-tail { transform-origin: 42px 101px; animation: rc-wag 1.4s ease-in-out infinite; }
.rc-armn { transform-origin: 39.5px 56px; }
.rc-armf { transform-origin: 84px 57px; }
.rc-legn { transform-origin: 42px 99px; }
.rc-legf { transform-origin: 80px 102px; }
.rc-pan, .rc-pshadow { display: none; }
@keyframes rc-idle { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-2px) scale(.985, 1.02); } }
@keyframes rc-idle2 { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-2px) scale(.985, 1.02); } }
@keyframes rc-shadow-idle { 0%, 100% { transform: scale(1); } 50% { transform: scale(.95); } }
@keyframes rc-shadow-idle2 { 0%, 100% { transform: scale(1); } 50% { transform: scale(.95); } }
@keyframes rc-wag { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(7deg); } }
@keyframes rc-wag2 { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(7deg); } }
/* прыжок: присел → вытянулся в воздухе (лапы поджаты, руки вверх) → приземлился */
.racc.hop .rc-bod { animation: rc-hop .38s ease-out, rc-idle2 1.4s ease-in-out .38s infinite; } /* после приземления снова дышит (отдельное имя — иначе старый rc-idle перекрывает прыжок) */
.racc.hop .rc-shadow { animation: rc-shadow-hop .38s ease-out, rc-shadow-idle2 1.4s ease-in-out .38s infinite; }
.racc.hop .rc-armn, .racc.is-rich .rc-armn { animation: rc-armn-up .38s ease-out; }
.racc.hop .rc-armf, .racc.is-rich .rc-armf { animation: rc-armf-up .38s ease-out; }
.racc.hop .rc-legn, .racc.is-rich .rc-legn { animation: rc-legn-tuck .38s ease-out; }
.racc.hop .rc-legf, .racc.is-rich .rc-legf { animation: rc-legf-tuck .38s ease-out; }
.racc.hop .rc-tail { animation: rc-tail-hop .38s ease-out, rc-wag2 1.4s ease-in-out .38s infinite; }
@keyframes rc-hop { 0% { transform: translateY(0) scale(1.12, .86); } 22% { transform: translateY(-24px) scale(.93, 1.1); } 55% { transform: translateY(-32px) scale(.98, 1.03) rotate(3deg); }
  84% { transform: translateY(0) scale(1.12, .87); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes rc-shadow-hop { 0% { transform: scale(1.08); } 55% { transform: scale(.55); opacity: .6; } 84% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes rc-armn-up { 0%, 100% { transform: rotate(0); } 18%, 72% { transform: rotate(118deg); } }
@keyframes rc-armf-up { 0%, 100% { transform: rotate(0); } 18%, 72% { transform: rotate(-120deg); } }
@keyframes rc-legn-tuck { 0%, 100% { transform: translate(0, 0) rotate(0); } 18%, 72% { transform: translate(2px, -7px) rotate(-16deg); } }
@keyframes rc-legf-tuck { 0%, 100% { transform: translate(0, 0) rotate(0); } 18%, 72% { transform: translate(-1px, -8px) rotate(12deg); } }
@keyframes rc-tail-hop { 0%, 100% { transform: rotate(0); } 25%, 70% { transform: rotate(-12deg); } }
/* бан: блин — голова и тело одним куском, глаза крестиком, хвост торчит */
.racc.is-flat .rc-bod { animation: none; transform: none; }
.racc.is-flat .rc-stand, .racc.is-flat .rc-shadow { display: none; }
.racc.is-flat .rc-pan, .racc.is-flat .rc-pshadow { display: inline; }
.racc.is-flat .rc-pan { animation: rc-splat .24s ease-out; }
@keyframes rc-splat { 0% { transform: scale(.72, 1.8); } 45% { transform: scale(1.1, .8); } 100% { transform: scale(1, 1); } }
.racc .bag { position: absolute; right: -10px; bottom: 2px; font-size: calc(var(--racc) * .38); display: none; }
.racc.is-rich .bag { display: block; animation: hop .5s ease-out 2; }
.racc.is-rich .rc-bod { animation: rc-hop .5s ease-out 2, rc-idle2 1.4s ease-in-out 1s infinite; }
@keyframes hop { 40% { transform: translateY(-20px) rotate(-8deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rc-bod, .rc-tail, .rc-shadow, .rc-armn, .rc-armf, .rc-legn, .rc-legf, .rc-pan { animation: none !important; } }

/* машина Цукерберга */
.zcar { position: absolute; z-index: 7; width: 84px; height: 149px; margin-left: -42px; top: -150px; pointer-events: none; }
.zcar svg { width: 100%; height: 100%; display: block; filter: drop-shadow(5px 5px 0 rgba(10,10,10,.6)); }
.hit { position: absolute; width: 0; height: 0; pointer-events: none; } /* без z-index: вспышка под енотом, штамп над машиной */
.hit .boom { position: absolute; left: -70px; top: -60px; width: 140px; height: 120px; background: var(--yellow); border: 0;
  clip-path: polygon(50% 0, 60% 30%, 92% 12%, 72% 42%, 100% 55%, 70% 62%, 86% 94%, 56% 72%, 44% 100%, 38% 70%, 8% 88%, 26% 58%, 0 42%, 30% 36%, 14% 6%, 42% 26%);
  animation: boom .35s ease-out forwards; z-index: 4; }
@keyframes boom { from { transform: scale(.2) rotate(-20deg); } to { transform: scale(1) rotate(0); } }
.hit-stamp { position: absolute; z-index: 9; left: 0; top: calc(var(--racc) * -1.3); font-family: "Archivo Black", "Onest", sans-serif; font-weight: 900; font-size: 30px; line-height: 1; color: var(--red);
  border: 5px solid var(--red); background: rgba(255,255,255,.9); padding: 4px 10px; white-space: nowrap; transform: translate(-50%, -50%) rotate(var(--stamp-rot, -12deg)) scale(3); opacity: 0;
  animation: stamp .2s .05s cubic-bezier(.6,0,.9,.6) forwards; }
@keyframes stamp { to { opacity: 1; transform: translate(-50%, -50%) rotate(var(--stamp-rot, -12deg)) scale(1); } }
.flash { position: absolute; inset: 0; z-index: 8; background: #FFFFFF; pointer-events: none; animation: camflash .7s ease-out forwards; }
@keyframes camflash { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }

/* оверлеи на дороге */
.road-wrap .fx { z-index: 10; }
.rd-loss > * { animation-delay: .15s !important; }
.rd-loss .loss-k { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 14px; }
.rd-loss .loss-lane { margin: 0; font-family: var(--font-head); font-weight: 900; font-synthesis: none; font-size: 30px; line-height: 1; background: var(--red); color: var(--paper); padding: 4px 12px; }
.loss-reveal { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.35; }
.fx-win-card .loss-reveal { background: var(--paper); border: 2px solid var(--ink); padding: 4px 8px; }

/* управление */
.acts { display: grid; gap: 10px; grid-template-columns: 1fr; }
.acts.two { grid-template-columns: 1fr 1fr; }
.acts .big { min-height: 64px; padding: 6px 8px; line-height: 1.1; }
.acts .big small { display: block; font-family: var(--font-num); font-size: 13px; font-weight: 700; }
#btn-cash { background: var(--green); color: var(--paper); flex-direction: column; gap: 2px; }
#btn-main { flex-direction: column; gap: 2px; }
.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.levels button { flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 6px 8px; text-transform: none; letter-spacing: 0; text-align: left;
  background: var(--paper); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); font-weight: 600; }
.levels button b { font-family: var(--font-head); font-size: 16px; font-weight: 900; font-synthesis: none; line-height: 1.05; }
.levels button span { font-family: var(--font-mono); font-size: 11px; line-height: 1.25; }
.levels button.is-on { background: var(--yellow); }
.levels button[data-l="solo"] b { color: var(--red); }
.keys { color: #444; }
.lvl-tag { display: inline-block; border: 2px solid var(--ink); padding: 0 4px; font-family: var(--font-mono); font-size: 11px; }

.verify .lanes-mini { display: flex; flex-wrap: wrap; gap: 3px; }
.verify .lanes-mini i { width: 18px; height: 18px; border: 2px solid var(--ink); background: var(--paper); font-style: normal; font-size: 9px; line-height: 14px; text-align: center; font-family: var(--font-mono); }
.verify .lanes-mini i.p { background: var(--green); color: var(--paper); }
.verify .lanes-mini i.b { background: var(--red); color: var(--paper); }
.verify .lanes-mini i.w { background: #BFE3CD; }
.verify .lanes-mini i.x { background: #F3C9C5; }

@media (max-width: 1180px) {
  .rd-game { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "ctrl"; }
  .rd-ctrl .ctrl-body { grid-template-columns: 1fr 1fr; align-items: start; }
  .rd-ctrl .ctrl-body > .acts, .rd-ctrl .ctrl-body > .hint, .rd-ctrl .ctrl-body > #gmsg, .rd-ctrl .ctrl-body > .keys { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .rd-hud { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 10px; }
  .rd-hud .hud-main { grid-column: 1 / -1; }
  .road-wrap { --lane-w: 90px; --curb-w: 78px; --fin-w: 78px; --road-h: 330px; --racc: 78px; box-shadow: 6px 6px 0 var(--yellow), 6px 6px 0 4px var(--ink); border-width: 4px; }
  .lane .plate { font-size: 12px; min-height: 42px; bottom: 44px; left: 4px; right: 4px; }
  .lane .lx { font-size: 14px; left: 4px; right: 4px; bottom: 8px; }
  .lane .lr { font-size: 10px; left: 4px; right: 4px; }
  .lane .bar { top: 34px; height: 24px; }
  .curb-lbl { font-size: 10px; left: 4px; right: 4px; }
  .finish span { font-size: 12px; left: 4px; right: 4px; }
  .tcar { width: 36px; height: 62px; margin-left: -18px; }
  .zcar { width: 66px; height: 117px; margin-left: -33px; }
  .hit .boom { left: -48px; top: -38px; width: 96px; height: 76px; }
  .hit-stamp { font-size: 19px; border-width: 4px; padding: 3px 8px; --stamp-rot: -5deg; }
  .rd-ctrl .ctrl-body { grid-template-columns: 1fr; }
  .acts .big { min-height: 58px; font-size: 18px; }
  .rd-loss .loss-lane { font-size: 22px; }
  .keys { display: none; }
}
@media (max-width: 720px) { .road-tap { margin-top: 12px; font-size: 12px; text-align: center; } .road-tap-x { display: none; } }
