/* REDLINE - неоновый гараж. Цвета и размеры - переменные ниже, те же, что у 3D-витрины (v/neon.html). */
@font-face { font-family: 'Golos'; font-weight: 400 600; font-display: swap; src: url('../fonts/golos-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos'; font-weight: 400 600; font-display: swap; src: url('../fonts/golos-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-weight: 500 800; font-display: swap; src: url('../fonts/unbounded-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 500 800; font-display: swap; src: url('../fonts/unbounded-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #04050A;          /* ночь гаража */
  --panel: #0A0C18;       /* панели */
  --panel-2: #11142A;     /* панель под пальцем */
  --edge: rgba(130, 155, 255, 0.16);
  --edge-2: rgba(130, 155, 255, 0.32);
  --ink: #F3F5FF;
  --muted: #98A1BB;
  --hint: #7D86A3;        /* подсказки в полях */
  --cyan: #2EEBFF;        /* неон: выбор, фокус, ссылки */
  --pink: #FF3ACF;        /* неон: заголовки, главное действие */
  --violet: #8B5CFF;
  --go-a: #D6249F;        /* главная кнопка: от малинового к фиолетовому, белый текст читается на всей длине */
  --go-b: #7A3CFF;
  --plus: #45EE95;
  --minus: #FF6A86;
  --star: #FFC83D;        /* звёзды прохождения */
  --r: 12px;
  --r-big: 18px;
  --display: 'Unbounded', system-ui, sans-serif;
  --text: 'Golos', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --col: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; scrollbar-color: #2A3052 var(--bg); }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--text); -webkit-tap-highlight-color: transparent; caret-color: var(--cyan); }
/* дымка неона сверху: бирюза слева, розовый справа - как подсветка гаража */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 38% at 8% -6%, rgba(46, 235, 255, 0.1), transparent 70%), radial-gradient(45% 34% at 100% -4%, rgba(255, 58, 207, 0.09), transparent 70%); }
::selection { background: rgba(255, 58, 207, 0.4); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2A3052; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: var(--bg); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; text-shadow: 0 0 26px rgba(255, 58, 207, 0.35); }
h2 { font-size: clamp(20px, 4.2vw, 26px); }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: inherit; text-underline-offset: 3px; }
.muted { color: var(--muted); }
small { font-size: 13px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); color: var(--ink); padding: 8px 12px; border-radius: var(--r); z-index: 50; }
.skip:focus { left: 8px; }
.num, .price, .balance-big, .facts dd, .seg button, .rows b { font-variant-numeric: tabular-nums; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(4, 5, 10, 0.78); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--edge); }
.top-in { max-width: var(--col); margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 28px; }
.logo { font: 800 18px/1 var(--display); text-decoration: none; letter-spacing: 0.08em; display: flex; align-items: center; gap: 10px; color: #fff;
  text-shadow: 0 0 10px rgba(46, 235, 255, 0.85), 0 0 26px rgba(46, 235, 255, 0.45); }
/* знак - неоновое кольцо подиума */
.logo i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid; border-color: var(--cyan) var(--cyan) var(--pink) var(--pink); transform: rotate(-30deg); box-shadow: 0 0 10px rgba(46, 235, 255, 0.6), inset 0 0 6px rgba(255, 58, 207, 0.5); display: inline-block; }
.nav-top { display: flex; gap: 2px; flex: 1; }
.nav-top a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap; transition: color 0.15s; }
@media (max-width: 1000px) { .nav-top a { padding: 8px 9px; } .nav-wide { display: none; } } /* меню в одну строку и на узком компьютере */
@media (max-width: 860px) { .wallet-pill small { display: none; } } /* планшет стоя: шапка без сдвига вбок */
.nav-top a:hover { color: var(--ink); }
.nav-top a.on { color: #fff; box-shadow: inset 0 -2px 0 var(--pink); text-shadow: 0 0 12px rgba(255, 58, 207, 0.8); border-radius: 0; }
.wallet-pill { margin-left: auto; display: flex; align-items: baseline; gap: 6px; text-decoration: none; background: rgba(10, 12, 24, 0.7); border: 1px solid var(--edge-2); border-radius: 999px; padding: 8px 14px; white-space: nowrap; transition: border-color 0.15s; }
.wallet-pill:hover { border-color: var(--cyan); }
.wallet-pill .js-balance { font: 700 15px/1 var(--display); }
.wallet-pill small { color: var(--muted); }
.demo-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink); font-weight: 600; margin-left: 2px; }

/* ---------- нижнее меню (телефон) ---------- */
.nav-bottom { display: none; }
@media (max-width: 760px) {
  .nav-top { display: none; }
  .top-in { height: 56px; justify-content: space-between; }
  .nav-bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(6, 7, 14, 0.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--edge); padding-bottom: var(--safe-b); }
  .nav-bottom a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; min-height: 58px; }
  .nav-bottom svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .nav-bottom a.on { color: var(--cyan); }
  .nav-bottom a.on svg { filter: drop-shadow(0 0 6px rgba(46, 235, 255, 0.75)); }
  main { padding-bottom: calc(76px + var(--safe-b)); }
  .foot { padding-bottom: calc(80px + var(--safe-b)); }
}
@media (max-width: 360px) { .wallet-pill small { display: none; } .top-in { gap: 12px; }
  /* NEONGRAD шире прежнего REDLINE: на 320 знак и кошелёк сжимаются, иначе шапка уходит вбок */
  .logo { font-size: 15px; letter-spacing: 0.04em; gap: 8px; } .logo i { width: 16px; height: 16px; } .wallet-pill { padding: 8px 10px; } }

main { flex: 1 0 auto; width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 16px 48px; outline: none; } /* подвал - внизу экрана даже на короткой странице */
#app:focus, #app:focus-visible { outline: none; }
.foot { border-top: 1px solid var(--edge); margin-top: 24px; color: var(--muted); }
.foot-in { max-width: var(--col); margin: 0 auto; padding: 22px 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.foot-in p { margin: 0; }
.foot a { color: var(--ink); }
.age { display: inline-block; border: 1.5px solid var(--pink); color: #fff; border-radius: 4px; padding: 0 4px; font-size: 12px; margin-right: 4px; box-shadow: 0 0 10px -2px rgba(255, 58, 207, 0.7); }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r); border: 1px solid var(--edge-2); background: rgba(255, 255, 255, 0.04); font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 0.12s ease, border-color 0.15s, box-shadow 0.2s, filter 0.15s; }
.btn:hover:not(:disabled) { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(46, 235, 255, 0.3) inset, 0 6px 22px -12px rgba(46, 235, 255, 0.9); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-accent { background: linear-gradient(100deg, var(--go-a), var(--go-b)); border: 0; color: #fff; box-shadow: 0 10px 30px -12px rgba(214, 36, 159, 0.95); }
.btn-accent:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 12px 34px -10px rgba(214, 36, 159, 1); }
.btn-big { min-height: 56px; padding: 0 30px; font: 700 16px/1 var(--display); letter-spacing: 0.02em; }
.btn-ghost { background: none; border: 0; color: var(--muted); font-weight: 500; padding: 6px 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-ghost:hover { color: var(--ink); }
.link { color: var(--cyan); font-weight: 500; }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(10, 12, 24, 0.7); border: 1px solid var(--edge-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.label small { font-weight: 400; color: var(--muted); }
.field { display: block; margin: 0 0 18px; }
input { width: 100%; min-height: 48px; border: 1px solid var(--edge-2); border-radius: 10px; padding: 0 14px; background: #070913; font-size: 16px; transition: border-color 0.15s, box-shadow 0.15s; }
input::placeholder { color: var(--hint); }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(46, 235, 255, 0.16); outline: none; }
.form-error { color: var(--minus); font-weight: 500; }
.form-error:empty { display: none; }
.warn-text { color: var(--minus); font-size: 14px; margin-top: 10px; }
.plus { color: var(--plus); }
.minus { color: var(--minus); }

/* выбранное горит бирюзой изнутри - как кнопки витрины */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 18px; padding: 4px 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1px solid var(--edge-2); background: rgba(10, 12, 24, 0.7); border-radius: 999px; padding: 9px 16px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color 0.15s, box-shadow 0.2s; }
.tab:hover { border-color: rgba(46, 235, 255, 0.6); }
.tab[aria-selected="true"] { border-color: var(--cyan); color: #fff; box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 18px -6px rgba(46, 235, 255, 0.9); }
.tab.locked { color: var(--muted); border-style: dashed; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { border: 1px solid var(--edge-2); background: rgba(10, 12, 24, 0.7); border-radius: 10px; padding: 10px 6px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.25; transition: border-color 0.15s, box-shadow 0.2s; }
.seg button small { color: var(--muted); font-weight: 400; font-size: 12px; }
.seg button:hover { border-color: rgba(46, 235, 255, 0.6); }
.seg button[aria-checked="true"] { border-color: var(--cyan); color: #fff; box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 18px -6px rgba(46, 235, 255, 0.9); }

.facts { margin: 0; display: grid; gap: 6px; }
.facts div { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts.row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.facts.row div { flex-direction: column; justify-content: flex-start; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r); padding: 12px 14px; }
.facts.row dd { text-align: left; }
.facts.big dd { font: 700 21px/1.2 var(--display); }

.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-big); padding: 20px; margin-bottom: 16px; }
.empty { border: 1px dashed var(--edge-2); border-radius: var(--r-big); padding: 28px 20px; text-align: center; }
.rows { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-big); }
.rows li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--edge); font-size: 14px; }
.rows li:first-child { border-top: 0; }
.rows li b { text-align: right; min-width: 72px; }
.rows li small { display: block; font-size: 12px; }
@media (max-width: 520px) { .rows li { grid-template-columns: 1fr auto; } .rows li > span.muted { grid-column: 1; grid-row: 2; font-size: 12px; } .rows li b { grid-row: 1 / span 2; grid-column: 2; } }

/* ---------- страницы ---------- */
.page { padding-top: 26px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.sub { margin-top: 34px; }
.block { padding: 48px 0 8px; }
.block-lead { color: var(--muted); max-width: 640px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { color: var(--ink); }
.plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 760px; }
.plain li { padding-left: 22px; position: relative; }
.plain li::before { content: ''; position: absolute; left: 0; top: 11px; width: 10px; height: 2px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.prose { max-width: 720px; }
.prose h2 { margin-top: 28px; }

/* ---------- машина на неоновом кольце (картинки 3D-машин в списках) ---------- */
.car-shot { position: relative; display: block; aspect-ratio: 16 / 9; isolation: isolate; }
.car-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
/* кольцо подиума на полу: тонкий неон бирюза → розовый, вокруг - его свет */
.car-shot::before, .car-shot::after { content: ''; position: absolute; left: 7%; right: 7%; top: 47%; height: 36%; border-radius: 50%; z-index: 0; pointer-events: none; }
.car-shot::before { background: conic-gradient(from 200deg, var(--cyan), var(--violet) 35%, var(--pink) 55%, var(--cyan) 85%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); }
.car-shot::after { background: radial-gradient(closest-side, rgba(46, 235, 255, 0.12), rgba(46, 235, 255, 0.03) 70%, transparent);
  box-shadow: 0 0 22px -2px rgba(46, 235, 255, 0.35), inset 0 0 18px -4px rgba(255, 58, 207, 0.45); }
a.car-shot { transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
a.car-shot:hover { transform: translateY(-3px); }

/* 3D-сцена в странице: пока грузится - картинка той же машины */
.stage { position: relative; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.6s ease; }
.stage .stage-poster { position: absolute; left: 50%; top: 52%; width: min(86%, 760px); transform: translate(-50%, -50%); transition: opacity 0.6s ease; pointer-events: none; }
.stage.ready canvas { opacity: 1; }
.stage.ready .stage-poster { opacity: 0; }
.stage-load { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; font-size: 13px; color: var(--muted); opacity: 0; transition: opacity 0.3s; pointer-events: none; white-space: nowrap; }
.stage.loading .stage-load { opacity: 1; }
.credit { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.credit a { color: inherit; }

/* ---------- главная: гараж с машиной класса ---------- */
.hero { position: relative; margin: 0 calc(50% - 50vw); }
.hero .stage { position: absolute; inset: 0; background: radial-gradient(70% 60% at 62% 58%, #0B0F22, var(--bg) 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }
.hero .stage canvas { cursor: grab; }
.hero .stage canvas:active { cursor: grabbing; }
.hero-in { position: relative; z-index: 1; max-width: var(--col); margin: 0 auto; padding: 0 16px; height: min(calc(100svh - 60px), 800px); min-height: 600px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.hero-in > * { pointer-events: auto; }
.hero-copy { padding-top: clamp(28px, 6vh, 64px); max-width: 470px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 0.98; margin-bottom: 18px; text-shadow: 0 0 2px #fff, 0 0 26px rgba(255, 58, 207, 0.55); }
.lead { font-size: 17px; color: #C3C9DC; margin-bottom: 0; text-wrap: pretty; }
.hero-dock { padding-bottom: 26px; }
/* лестница классов: семь ступеней от двора до болида */
.ladder { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ladder button { width: 100%; min-height: 64px; padding: 10px 10px 9px; border: 1px solid var(--edge-2); border-radius: var(--r); background: rgba(6, 8, 18, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 3px; transition: border-color 0.15s, box-shadow 0.2s; }
.ladder button b { font: 700 14px/1.15 var(--display); }
.ladder button small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ladder button:hover { border-color: rgba(46, 235, 255, 0.6); }
.ladder button[aria-pressed="true"] { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 22px -6px rgba(46, 235, 255, 0.9); }
.ladder button[aria-pressed="true"] small { color: #C3C9DC; }
.class-card { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; padding: 16px 18px; border: 1px solid var(--edge); border-radius: var(--r-big); background: rgba(6, 8, 18, 0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.class-card p { margin: 0 0 8px; color: #C3C9DC; font-size: 15px; }
.class-card .facts { grid-auto-flow: column; justify-content: start; gap: 4px 26px; }
.class-card .facts div { flex-direction: column; gap: 0; font-size: 13px; }
.class-card .facts dd { text-align: left; font: 700 16px/1.3 var(--display); white-space: nowrap; }
.class-car { margin: 0 0 6px; font: 700 18px/1.2 var(--display); }
.class-car small { font: 400 14px var(--text); color: var(--muted); margin-left: 6px; }

@media (max-width: 760px) {
  .hero .stage { position: relative; height: clamp(230px, 64vw, 330px); inset: auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); }
  .hero { display: flex; flex-direction: column; }
  .hero-in { display: contents; }
  .hero-copy { order: -1; padding: 22px 16px 0; max-width: none; }
  .hero h1 { font-size: clamp(36px, 11vw, 48px); margin-bottom: 10px; }
  .lead { font-size: 15px; }
  .hero-dock { padding: 0 16px; }
  .ladder { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
  .ladder::-webkit-scrollbar { display: none; }
  .ladder li { flex: none; scroll-snap-align: start; }
  .ladder button { min-width: 96px; min-height: 58px; }
  .class-card { grid-template-columns: 1fr; padding: 14px; }
  .class-card .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .class-card .btn { width: 100%; }
  .class-card .btn-big { font-size: 14px; padding: 0 14px; white-space: nowrap; }
}

/* как едет заезд: одна приборная панель, три зоны */
.how { display: grid; grid-template-columns: 1.25fr 1fr 1fr; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-big); overflow: hidden; }
.how-item { padding: 24px 22px; }
.how-item + .how-item { border-left: 1px solid var(--edge); }
.how-item p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } .how-item + .how-item { border-left: 0; border-top: 1px solid var(--edge); } }
.react-out { min-height: 22px; margin: 12px 0 0; }
.demo-lights, .lights { display: flex; gap: 10px; margin-bottom: 16px; }
.demo-lights i, .lights i { width: 22px; height: 22px; border-radius: 50%; background: #1A1D2E; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.4); transition: background-color 0.05s; }
.demo-lights i.red, .lights i.red { background: #FF3B47; box-shadow: 0 0 14px #FF3B47, 0 0 30px rgba(255, 59, 71, 0.5); }
.demo-lights i.green, .lights i.green { background: #3BFF8A; box-shadow: 0 0 14px #3BFF8A, 0 0 30px rgba(59, 255, 138, 0.5); }
.demo-leds, .leds { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; }
.demo-leds { margin-bottom: 16px; height: 22px; }
.demo-leds i, .leds i { border-radius: 3px; background: #1A1D2E; }
.demo-leds i:nth-child(-n+8) { background: #3BFF8A; box-shadow: 0 0 8px rgba(59, 255, 138, 0.6); }
.demo-leds i:nth-child(n+9):nth-child(-n+10) { background: #FFD23D; box-shadow: 0 0 8px rgba(255, 210, 61, 0.6); }
.demo-leds i:nth-child(n+11):nth-child(-n+13) { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.demo-leds i:nth-child(14) { background: #FF3B47; box-shadow: 0 0 8px rgba(255, 59, 71, 0.7); }
.demo-nitro { display: flex; gap: 6px; margin-bottom: 16px; height: 22px; }
.demo-nitro i { width: 40px; border-radius: 4px; background: var(--violet); box-shadow: 0 0 12px rgba(139, 92, 255, 0.8); }
.demo-nitro i:nth-child(2) { background: linear-gradient(90deg, var(--violet) 0 50%, #1A1D2E 50%); }
.demo-nitro i:nth-child(3) { background: #1A1D2E; box-shadow: none; }

/* ---------- заезды: лобби ---------- */
.lobby { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; align-items: center; max-width: 980px; padding: 20px 22px 22px; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-big); }
.lobby-car .car-shot { margin: -6px -6px 6px; }
.lobby-car-name { font: 700 19px/1.2 var(--display); margin-bottom: 4px; }
.lobby-car .muted { font-size: 14px; margin-bottom: 6px; }
.sum { margin: 4px 0 18px; display: grid; gap: 7px; border-top: 1px solid var(--edge); padding-top: 14px; }
.sum div { display: flex; justify-content: space-between; font-size: 15px; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; font-weight: 600; }
.sum .sum-main { font-size: 17px; }
.sum .sum-main dt { color: var(--ink); font-weight: 600; }
.sum .sum-main dd { font-family: var(--display); font-weight: 700; color: #fff; text-shadow: 0 0 14px rgba(46, 235, 255, 0.55); }
.sum .sum-main dd small { color: var(--muted); font: 400 13px var(--text); text-shadow: none; }
.lobby .btn-big { width: 100%; }
.lobby-fuel { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--edge); }
.lobby-fuel .muted { font-size: 14px; margin: 8px 0 0; }
@media (max-width: 760px) { .lobby { grid-template-columns: 1fr; padding: 14px 14px 16px; } }

.matchmaking { position: fixed; inset: 0; z-index: 40; background: rgba(2, 3, 8, 0.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.mm-card { background: var(--panel); border: 1px solid var(--edge-2); border-radius: var(--r-big); padding: 24px; width: min(440px, 100%); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 50px -20px rgba(46, 235, 255, 0.5); }
.mm-seats { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 6px; }
.mm-seats li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px dashed var(--edge-2); border-radius: 10px; font-size: 14px; }
.mm-seats li.in { border-style: solid; border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(46, 235, 255, 0.35) inset, 0 0 18px -8px rgba(46, 235, 255, 0.9); animation: seatIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.mm-seats li span { color: var(--muted); text-align: right; }
.mm-note { font-size: 13px; margin: 0; }
.mm-actions { display: flex; justify-content: center; margin-top: 16px; }
.mm-actions .btn { min-width: 160px; }
/* где ждут сбора: под выбором мест - чипами, нажал - тот же вход и места */
.waiting { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; }
.waiting .chip { cursor: pointer; font-size: 13px; padding: 5px 10px; border-color: rgba(46, 235, 255, 0.45); color: #fff; }
.waiting .chip:hover { border-color: var(--cyan); }
.seg button small.wait { color: var(--cyan); }
@keyframes seatIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- экран заезда ---------- */
body.in-race { overflow: hidden; }
body.in-race::before { display: none; }
body.in-race .top, body.in-race .foot, body.in-race .nav-bottom { display: none; }
body.in-race main { max-width: none; padding: 0; }
.race { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.race-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--edge); background: #06070F; }
.race-pot { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.race-pot b { font-family: var(--display); color: #fff; text-shadow: 0 0 12px rgba(46, 235, 255, 0.7); }
.race-sound { flex: none; width: 40px; height: 40px; margin: -4px -4px -4px 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--edge); background: none; color: var(--muted); cursor: pointer; transition: color 0.15s, border-color 0.15s, box-shadow 0.15s; }
.race-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.race-sound[aria-pressed="true"] { color: var(--cyan); border-color: rgba(46, 235, 255, 0.45); box-shadow: 0 0 14px -4px rgba(46, 235, 255, 0.8); }
.race-sound[aria-pressed="true"] .x, .race-sound[aria-pressed="false"] .w { display: none; }
/* телефон: сверху куш, звук и «Выйти», под ними класс и ставка - шапка не разъезжается и при большом куше */
@media (max-width: 420px) {
  .race-top { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "pot sound exit" "info info info"; gap: 0 10px; padding: 6px 14px 8px; }
  .race-info { grid-area: info; font-size: 13px; }
  .race-pot { grid-area: pot; margin-left: 0; }
  .race-sound { grid-area: sound; margin: 0; }
  .race-top .js-exit { grid-area: exit; }
}
.race-stage { position: relative; flex: 1; min-height: 0; }
.race-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lights { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(4, 5, 10, 0.85); border: 1px solid var(--edge); padding: 8px 12px; border-radius: 999px; margin: 0; transition: opacity 0.3s; }
.lights.off { opacity: 0; }
.race-toast { position: absolute; top: 34%; left: 50%; transform: translate(-50%, 6px); font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; padding: 9px 16px; border-radius: 10px; background: rgba(4, 5, 10, 0.78); opacity: 0; pointer-events: none; transition: opacity 0.12s, transform 0.12s; white-space: nowrap; text-shadow: 0 0 14px currentColor; }
.race-toast.show { opacity: 1; transform: translate(-50%, 0); }
.race-toast.ok { color: var(--cyan); }
.race-toast.mid { color: #3BFF8A; }
.race-toast.warn { color: #FFD23D; }
.race-toast.bad { color: #FF6A86; }
.race-toast.nitro { color: #C4A5FF; }
.hud { padding: 10px 14px 6px; background: #06070F; border-top: 1px solid var(--edge); }
.leds { height: 16px; margin-bottom: 8px; }
.leds i.on.g { background: #3BFF8A; box-shadow: 0 0 8px rgba(59, 255, 138, 0.7); }
.leds i.on.y { background: #FFD23D; box-shadow: 0 0 8px rgba(255, 210, 61, 0.7); }
.leds i.on.b { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.leds i.on.r { background: #FF3B47; box-shadow: 0 0 10px rgba(255, 59, 71, 0.8); }
.leds.limiter i.on { animation: blink 0.12s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.hud-row { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.hud-row > div { display: flex; flex-direction: column; }
.hud-row span { font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.hud-row small { font-size: 11px; color: var(--muted); }
.hud-gear span { color: #fff; font-size: 26px; text-shadow: 0 0 14px rgba(255, 58, 207, 0.8); }
.controls { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; padding: 10px 14px calc(12px + var(--safe-b)); background: #06070F; }
.ctl { min-height: 88px; border-radius: 16px; border: 1px solid transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font: 800 18px/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; touch-action: none; -webkit-touch-callout: none; transition: background-color 0.1s, box-shadow 0.15s, transform 0.08s; }
.ctl small { font: 500 12px/1 var(--text); text-transform: none; letter-spacing: 0; opacity: 0.85; }
.ctl-main { background: #121630; color: #fff; border-color: rgba(46, 235, 255, 0.45); box-shadow: 0 0 0 1px rgba(46, 235, 255, 0.2) inset, 0 8px 24px -14px rgba(46, 235, 255, 0.9); }
.ctl-main:active { transform: translateY(2px); }
.ctl-main.go { background: #0E3A26; border-color: #3BFF8A; color: #fff; box-shadow: 0 0 0 1px #3BFF8A inset, 0 0 30px -6px rgba(59, 255, 138, 0.9); }
.ctl-main.now { background: #0C3442; border-color: var(--cyan); color: #fff; box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 34px -4px rgba(46, 235, 255, 1); }
.ctl-nitro { background: #1A1235; color: #D9C8FF; border-color: rgba(139, 92, 255, 0.5); }
.ctl-nitro:disabled { opacity: 0.45; cursor: default; }
.ctl-nitro.burning { background: #4B2DC4; color: #fff; border-color: #C4A5FF; box-shadow: 0 0 34px -4px rgba(139, 92, 255, 1); }
.charges { display: flex; gap: 4px; }
.charges i { width: 18px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #B794FF calc(var(--f, 0) * 100%), #3A3258 0); }
.ctl-nitro.no-nitro .charges { display: none; }
.keys-hint { margin: 0; padding: 0 14px 8px; background: #06070F; font-size: 12px; color: var(--muted); text-align: center; }
@media (pointer: coarse) { .keys-hint { display: none; } }
@media (min-width: 761px) { .race { left: 50%; transform: translateX(-50%); width: 520px; border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); box-shadow: 0 0 80px -30px rgba(46, 235, 255, 0.35); } }
.race-result { position: absolute; inset: 0; background: rgba(2, 3, 8, 0.76); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: grid; padding: 16px; overflow-y: auto; }
.race-result > .result-card { margin: auto; } /* по центру, а выше экрана - с начала: верх длинной карточки не уходит за край */
.race-result[hidden] { display: none; }
.result-card { background: var(--panel); border: 1px solid var(--edge-2); color: var(--ink); border-radius: var(--r-big); padding: 22px; width: min(460px, 100%); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 50px -20px rgba(255, 58, 207, 0.5); }
.result-card h2 { font-size: 28px; margin-bottom: 4px; text-shadow: 0 0 22px rgba(255, 58, 207, 0.55); }
.result-money { font: 700 22px/1.2 var(--display); margin-bottom: 8px; }
.result-card .muted { font-size: 14px; }
.result-table { width: 100%; border-collapse: collapse; margin: 12px 0 14px; font-size: 14px; }
.result-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--edge); }
.result-table td { padding: 8px 6px; border-bottom: 1px solid var(--edge); }
.result-table .num { text-align: right; }
.result-table tr.me td { font-weight: 700; background: rgba(46, 235, 255, 0.08); }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- салон и гараж ---------- */
.shop-class { padding: 30px 0 10px; border-top: 1px solid var(--edge); scroll-margin-top: 60px; } /* переход к классу с главной - заголовок не под шапкой */
.shop-head { max-width: 760px; }
.shop-head h2 { margin-bottom: 4px; }
.shop-head .facts { margin: 12px 0 8px; grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 26px; }
.shop-head .facts div { background: none; border: 0; padding: 0; }
@media (max-width: 480px) { .shop-head .facts { grid-template-columns: repeat(2, auto); } }
.cars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 28px; }
@media (max-width: 640px) { .cars { grid-template-columns: 1fr; } }
.car-item { display: flex; flex-direction: column; }
.car-item-body { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; padding: 0 4px 8px; }
.car-item-body h3 { margin: 0; font-size: 17px; }
.car-item-body h3 a { text-decoration: none; }
.car-item-body h3 a:hover { color: var(--cyan); }
.car-item-body .muted { font-size: 14px; grid-column: 1; }
.car-item-body .btn, .car-item-body .warn-text { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.car-item-body .warn-text { grid-column: 1 / -1; grid-row: auto; }
.price { font: 700 18px/1.2 var(--display); }
.price small { font: 400 13px var(--text); color: var(--muted); }

.car-page .stage { height: clamp(260px, 50vw, 540px); margin: 0 calc(50% - 50vw); background: radial-gradient(60% 70% at 50% 60%, #0B0F22, var(--bg) 75%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent); }
.car-page .stage canvas { cursor: grab; }
.car-page-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 16px 0 6px; border-bottom: 1px solid var(--edge); margin-bottom: 18px; }
.car-page-bar .credit { margin: 0; }
.buy-box { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.garage-active { margin-bottom: 16px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--edge-2); background: rgba(10, 12, 24, 0.7); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 14px; transition: border-color 0.15s, box-shadow 0.2s; }
.swatch:hover { border-color: rgba(46, 235, 255, 0.6); }
.swatch i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset; }
.swatch small { color: var(--muted); }
.swatch.on { border-color: var(--cyan); color: #fff; box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 18px -6px rgba(46, 235, 255, 0.9); }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 600px) { .options { grid-template-columns: 1fr; } }
.option { text-align: left; border: 1px solid var(--edge-2); background: rgba(10, 12, 24, 0.7); border-radius: var(--r); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color 0.15s, box-shadow 0.2s; }
.option span { color: var(--muted); font-size: 14px; }
.option:hover { border-color: rgba(46, 235, 255, 0.6); }
.option.on { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 18px -6px rgba(46, 235, 255, 0.9); }

/* ---------- кошелёк ---------- */
.balance-card { padding: 22px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-big); }
.balance-big { font: 800 clamp(34px, 8vw, 46px)/1.05 var(--display); margin: 6px 0; color: #fff; text-shadow: 0 0 24px rgba(46, 235, 255, 0.45); }
.balance-big small { font: 400 15px var(--text); color: var(--muted); text-shadow: none; }
.balance-card p { margin: 8px 0 0; font-size: 14px; }
.wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .wallet-grid { grid-template-columns: 1fr; } }
.wallet-grid .panel { margin: 0; }
.wallet-grid .seg { margin-bottom: 16px; }
.danger { margin-top: 28px; }

/* ---------- авторы 3D-моделей ---------- */
.authors { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.authors li { padding: 12px 0; border-bottom: 1px solid var(--edge); }
.authors b { display: block; font-weight: 600; }
.authors a { color: var(--cyan); }

/* ---------- кампания: звание, сезон, предложения команд ---------- */
.class-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rank-card .label, .season-card > .label, .next-card .label { margin: 0; color: var(--muted); font-weight: 500; font-size: 13px; }

.rank-card { background: var(--panel); border: 1px solid var(--edge-2); border-radius: var(--r-big); padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 0 40px -22px rgba(46, 235, 255, 0.7); }
.rank-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 12px; }
.rank-name { display: block; font: 800 clamp(22px, 5vw, 30px)/1.15 var(--display); color: #fff; text-shadow: 0 0 22px rgba(46, 235, 255, 0.45); }
.rank-pts { display: flex; flex-direction: column; align-items: flex-end; }
.rank-pts b { font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-pts small { color: var(--muted); white-space: nowrap; }
.rank-pts b small { font-size: 15px; font-weight: 600; }
.rank-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); margin: 12px 0 10px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 12px rgba(46, 235, 255, 0.6); }
.rank-card p { margin: 0; font-size: 14px; }

/* идущий сезон: полоса цвета команды слева */
.season-card { --team: var(--cyan); position: relative; background: var(--panel); border: 1px solid var(--edge-2); border-radius: var(--r-big); padding: 18px 20px; margin-bottom: 16px; }
.season-card::before { content: ''; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--team); box-shadow: 0 0 14px var(--team); }
.season-card h2 { margin: 2px 0 4px; }
.season-card > p { margin: 0; font-size: 14px; }
.goal-line { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--r); font-size: 14px; }
.season-card .goal-line { margin: 12px 0 0; }
.goal-line span { color: var(--muted); }
.goal-line.ok { border-color: rgba(69, 238, 149, 0.45); }
.goal-line.ok span { color: var(--plus); }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; padding: 16px 18px; margin: 12px 0; background: var(--panel-2); border: 1px solid var(--edge-2); border-radius: var(--r-big); box-shadow: 0 0 40px -18px rgba(255, 58, 207, 0.6); }
.next-card > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.next-card b { font: 700 19px/1.2 var(--display); }
.next-card small { font-size: 13px; line-height: 1.4; }
.calendar { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.calendar li { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 10px; font-size: 13px; }
.calendar b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar small { color: var(--muted); font-size: 12px; }
.calendar span { font-weight: 600; color: var(--cyan); }
.calendar li.now { border-color: var(--pink); box-shadow: 0 0 0 1px rgba(255, 58, 207, 0.3) inset; }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings td { padding: 7px 6px; border-bottom: 1px solid var(--edge); }
.standings td:first-child { width: 26px; color: var(--muted); }
.standings .num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.standings tr.me td { background: rgba(46, 235, 255, 0.08); font-weight: 700; color: var(--ink); }
.standings tr.mate td { background: rgba(46, 235, 255, 0.03); }
/* зачёт сезона: личный или командный - по одной таблице (вкладки .tab - как в заездах и гараже) */
.season-card .tabs { margin: 0 0 6px; padding: 2px; }
.season-card .tab { padding: 7px 14px; font-size: 14px; }
.team-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.season-card .small { margin: 10px 0 0; }
.season-card .js-quit { margin-top: 6px; padding-left: 0; }
.small { font-size: 13px; }

/* новый сезон: классы, два предложения команд */
.new-season { margin-bottom: 16px; }
/* шаги нового сезона: 1. Класс, 2. Команда */
.step { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 14px 0 8px; }
.step span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(46, 235, 255, 0.14); color: var(--cyan); font-size: 12px; font-weight: 700; }
.need-car { text-align: left; padding: 16px 18px; margin-bottom: 10px; }
.need-car p { margin: 0 0 12px; }
.class-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; }
.class-tabs::-webkit-scrollbar { display: none; }
.class-tab { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.03); cursor: pointer; text-align: left; transition: border-color 0.15s, box-shadow 0.2s; }
.class-tab b { font-weight: 600; font-size: 14px; }
.class-tab small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.class-tab:hover { border-color: var(--edge-2); }
.class-tab[aria-pressed="true"] { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(46, 235, 255, 0.35) inset, 0 0 18px -8px rgba(46, 235, 255, 0.9); }
.class-tab.locked b { color: var(--muted); }
.offers-note { font-size: 14px; margin: 6px 0 0; }
/* лестница команд класса: слабая → сильная, горят три, что зовут на этой ступени */
.ladder { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ladder li { --team: var(--cyan); padding: 6px 8px; border-top: 3px solid var(--team); border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 13px; line-height: 1.25; opacity: 0.45; overflow-wrap: anywhere; }
.ladder li.on { opacity: 1; color: var(--ink); border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 16px; }
.offer { --team: var(--cyan); display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--panel); border: 1px solid var(--edge); border-top: 3px solid var(--team); border-radius: var(--r-big); }
.offer-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; } /* узко - номер под названием */
.offer-head h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.offer > p { margin: 0; font-size: 14px; }
.offer-facts { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.offer-facts div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.offer-facts dt { color: var(--muted); }
.offer-facts dd { margin: 0; }
.offer .btn { margin-top: auto; }
.new-season .empty { margin-top: 6px; }

/* прошлые сезоны - свёрнуты */
.history-box { border: 1px solid var(--edge); border-radius: var(--r-big); padding: 12px 16px; background: var(--panel); }
.history-box summary { cursor: pointer; font-weight: 600; }
.history { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.history li { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 10px; font-size: 14px; }
.history li.ok { border-color: rgba(69, 238, 149, 0.35); }
.history .ok { color: var(--plus); }

/* итог этапа сезона */
.result-gift { color: var(--star); font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.result-h { font-size: 15px; margin: 4px 0 0; }
.result-card .standings { margin: 4px 0 8px; }
.result-card .goal-line { margin: 10px 0 12px; }
.result-card .team-dot { margin-right: 6px; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 6px; background: rgba(255, 200, 61, 0.15); color: var(--star); font-size: 11px; font-weight: 600; white-space: nowrap; }
.result-actions .wide { grid-column: 1 / -1; }

@media (max-width: 900px) { .offers { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .next-card .btn { width: 100%; }
  .rank-card, .season-card { padding: 16px; }
}
@media (max-width: 380px) {
  .calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* аккаунт в профиле: вход и регистрация */
.account [hidden] { display: none; } /* поле «Пароль ещё раз» - только при регистрации (.field сам по себе block) */
.account .tabs { margin: 0 0 16px; padding: 4px 0; }
.account .hint { font-size: 13px; margin-top: -6px; }
.account .btn { min-width: 160px; }
/* без входа - только экран входа: без баланса и разделов */
body.guest .wallet-pill, body.guest .nav-top, body.guest .nav-bottom { display: none; }
body.guest.closed .foot-open { display: none; } /* закрытый тест: гостю - только вход */
.gate .account { max-width: 480px; }
/* своя ссылка для друзей */
.ref-link { display: flex; gap: 8px; margin-bottom: 12px; }
.ref-link input { flex: 1; min-width: 0; font-size: 14px; }
.ref-link .btn { flex: none; }
