/* LapRadar — строгий стиль «табло тайминга»: чёрный, тёмно-синий, тонкие линии, узкие цифры */
:root {
  --bg: #000; --surface: #0a0c11; --surface-2: #11141c; --line: #1b202b; --line-2: #262c39;
  --navy: #0b1d44; --accent: #3478f6; --accent-2: #6ea0ff; --text: #f2f3f5; --muted: #878d99; --dim: #5b616d;
  --gold: #d9b45a; --up: #3ecf6e; --down: #ff5a4f; --live: #ff3b30;
  --r: 8px; --r-sm: 6px;
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --num: "Barlow Condensed", "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --tabbar: 0px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; margin: 0 0 10px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; }
.num { font-family: var(--num); font-weight: 600; font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; } .r { text-align: right; } .c { text-align: center; } .up { color: var(--up); } .down { color: var(--down); }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.eyebrow b { color: var(--accent-2); font-weight: 600; }
.link { color: var(--accent-2); font-size: 14px; } .link:hover { text-decoration: underline; }

/* ---------- шапка ---------- */
#hdr { position: sticky; top: 0; z-index: 50; background: rgba(0,0,0,.82); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.hdr-in { max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.logo svg { width: 26px; height: 26px; flex: none; }
.logo span { font-family: var(--num); font-weight: 700; font-style: italic; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }
nav.top { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; height: 100%; }
nav.top::-webkit-scrollbar { display: none; }
nav.top a { padding: 0 11px; font-size: 14px; color: #b9bdc6; white-space: nowrap; display: flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent; }
nav.top a:hover { color: #fff; } nav.top a.on { color: #fff; border-bottom-color: var(--accent); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.hdr-right { display: flex; align-items: center; gap: 12px; }
.series-wrap { position: relative; }
.series-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 190px; background: var(--bg-2, #0d1220); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.series-menu.open { display: grid; gap: 2px; }
.series-menu button { text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 9px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.series-menu button:hover { background: rgba(255,255,255,.06); }
.series-menu button.on { background: rgba(77,124,255,.18); color: #fff; font-weight: 600; }
button.series-chip { background: none; cursor: pointer; }
.series-chip { display: inline-flex; align-items: center; height: 30px; font-family: var(--num); font-size: 15px; font-weight: 700; font-style: italic; padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: #dfe6ff; }
/* длинная метка серии (MotoGP, NASCAR) на узком телефоне: компактнее чип и отступы, чтобы шапка влезла в 375px; у F1 без изменений */
@media (max-width: 420px) { .hdr-right:has(.series-chip.long) { gap: 7px; } .series-chip.long { font-size: 13px; padding: 0 6px; letter-spacing: -.01em; } }
.gear { display: flex; color: var(--muted); } .gear:hover { color: #fff; } .gear svg { width: 18px; height: 18px; }

/* ---------- страница ---------- */
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 20px 64px; flex: 1; }
.page-live { max-width: 1480px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 8px 0 28px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 20px; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; } section.grid-2, section.grid-3 { margin-bottom: 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: transparent; color: #fff; font: 500 14px var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #3a4252; background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); } .btn.primary:hover { background: #4787ff; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
/* собственный вид выпадающих списков — одинаково во всех браузерах */
.select { -webkit-appearance: none; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23878d99' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #fff; border: 1px solid var(--line-2); border-radius: var(--r-sm); height: 36px; padding: 0 30px 0 12px; font: 500 14px/1 var(--font); cursor: pointer; }
.select:hover { border-color: #3a4252; } .select:focus { outline: none; border-color: var(--accent); }
.select.sm { height: 30px; padding: 0 26px 0 10px; font-size: 13px; background-position: right 8px center; }
.page-head .select { align-self: flex-end; }
.chip { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: var(--surface-2); color: #c9cdd6; white-space: nowrap; }
.chip.blue { background: var(--navy); color: #cfe0ff; } .chip.purple { background: #2d1a52; color: #d6c2ff; }
.chip.gold { background: rgba(217,180,90,.14); color: var(--gold); }
.chip.warn { background: rgba(255,176,32,.14); color: #ffb020; } .prov-note { margin: 0 0 8px; }
.chip.live { background: rgba(255,59,48,.14); color: #ff9e97; display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 3px; height: 15px; border-radius: 1px; margin-right: 9px; vertical-align: -2px; }
.drv:hover { color: var(--accent-2); }
.crown { color: var(--gold); width: 15px; height: 15px; vertical-align: -2px; margin-left: 6px; }

.loader { display: flex; gap: 5px; padding: 30px 0; justify-content: center; }
.loader span { width: 22px; height: 3px; background: var(--accent); animation: b 1s infinite ease-in-out; }
.loader span:nth-child(2) { animation-delay: .15s; } .loader span:nth-child(3) { animation-delay: .3s; }
@keyframes b { 0%, 80%, 100% { opacity: .15; } 40% { opacity: 1; } }
.error-box { border: 1px solid rgba(255,90,79,.35); color: #ffb4ae; padding: 14px 16px; border-radius: var(--r); font-size: 14px; overflow-wrap: anywhere; }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 8px 0 34px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.hero .sub { color: #aab0bc; font-size: 17px; }
.countdown { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 26px 0 8px; font-family: var(--num); }
.cd-cell { display: flex; align-items: baseline; gap: 4px; }
.cd-cell b { font-size: clamp(48px, 7vw, 76px); font-weight: 600; line-height: .9; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.cd-cell span { font-family: var(--font); font-size: 13px; color: var(--muted); margin-right: 14px; }
.hero-sessions { display: flex; flex-direction: column; align-self: end; border-top: 1px solid var(--line); }
.sess { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sess span { color: #aab0bc; } .sess b { font-weight: 500; font-variant-numeric: tabular-nums; } .sess.past { opacity: .4; }
.sessions-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 24px; margin-bottom: 26px; border-top: 1px solid var(--line); }
.sessions-row .sess { flex-direction: column; gap: 3px; }
.live-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: rgba(255,59,48,.08); border: 1px solid rgba(255,59,48,.3); margin-bottom: 24px; font-weight: 600; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; animation: p 1.4s infinite; flex: none; }
@keyframes p { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,.6); } 100% { box-shadow: 0 0 0 8px rgba(255,59,48,0); } }

.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 14px; }
.pod { background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--c); min-width: 0; }
.pod-pos { font-family: var(--num); font-size: 34px; font-weight: 600; line-height: 1; color: var(--muted); }
.pod b { font-family: var(--num); font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.pod small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- таблицы ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 600; color: var(--dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl th.r { text-align: right; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
/* таблицы серий: штурман (WRC) под именем, заголовок зачёта (WEC: Hypercar / LMGT3) */
.driver-grid .dg-grp { grid-column: 1 / -1; background: var(--bg, #000); padding: 14px 14px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.tbl small.co { display: block; font-size: 12px; margin-top: 2px; }
.tbl tr.grp td { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); background: var(--bg-2, transparent); padding-top: 16px; }
.tbl td.pos { width: 44px; font-family: var(--num); font-size: 18px; font-weight: 600; color: #d7dae0; }
.tbl td.big { font-family: var(--num); font-size: 18px; font-weight: 600; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.news-mini { list-style: none; padding: 0; margin: 0; }
.news-mini li { padding: 12px 0; border-bottom: 1px solid var(--line); } .news-mini li:last-child { border: 0; }
.news-mini b { display: block; font-weight: 500; font-size: 15px; line-height: 1.35; margin-bottom: 4px; }
.news-mini a:hover b { color: var(--accent-2); }

/* ---------- календарь ---------- */
.cal-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cal-item { display: grid; grid-template-columns: 50px 1fr 100px 150px; gap: 14px; align-items: center; padding: 14px 10px; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.cal-item:hover { background: var(--surface); }
.cal-item.next { background: linear-gradient(90deg, rgba(52,120,246,.12), transparent 70%); box-shadow: inset 3px 0 0 var(--accent); }
.cal-item.done .cal-round { color: var(--dim); }
.cal-round { font-family: var(--num); font-size: 24px; font-weight: 600; color: var(--accent-2); }
.cal-main b { display: block; font-weight: 600; } .cal-date { color: #c9cdd6; font-size: 14px; } .cal-win { text-align: right; font-weight: 600; font-size: 14px; }

/* ---------- вкладки (подчёркивание) ---------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 500 14px var(--font); padding: 10px 0; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs .on { color: #fff; border-bottom-color: var(--accent); }

/* ---------- пилоты и команды ---------- */
.driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.driver-card { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 18px 18px 16px; min-height: 150px; background: var(--surface); border-top: 3px solid var(--c); }
.driver-card:hover { background: var(--surface-2); }
.dc-num { position: absolute; right: 16px; top: 10px; font-family: var(--num); font-style: italic; font-size: 54px; font-weight: 700; color: var(--c); opacity: .85; line-height: 1; }
.dc-pos { font-family: var(--num); font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.dc-first { font-weight: 400; font-size: 15px; color: #c3c7cf; } .dc-last { font-size: 21px; letter-spacing: -0.01em; text-transform: uppercase; font-weight: 700; }
.dc-pts { margin-top: auto; padding-top: 12px; font-family: var(--num); font-size: 24px; font-weight: 600; } .dc-pts small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 500; }
.team-card .dc-drivers { font-size: 13px; color: #c3c7cf; margin-top: 6px; }
.driver-hero { display: flex; gap: 26px; align-items: flex-end; padding: 8px 0 28px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.driver-hero h1 b { text-transform: uppercase; }
.dh-num { font-family: var(--num); font-style: italic; font-size: 120px; font-weight: 700; color: var(--c); line-height: .8; }
.dh-bar { width: 6px; align-self: stretch; background: var(--c); border-radius: 2px; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.tile { background: var(--surface); padding: 16px 18px; }
.tile b { display: block; font-family: var(--num); font-size: 36px; font-weight: 600; line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.chart { width: 100%; height: 240px; display: block; margin-bottom: 8px; } .chart.tall { height: 340px; margin: 0; }
.season-bars .sb { display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px 44px 70px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.season-bars .sb:last-child { border: 0; }
.season-bars .sb.head { color: var(--dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding-top: 0; }
.sb-year { font-family: var(--num); font-size: 18px; font-weight: 600; }
.sb-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-pos { font-family: var(--num); font-size: 20px; font-weight: 600; text-align: right; }
.sb-pos.p1 { color: var(--gold); }
.sb-pts { font-family: var(--num); font-size: 18px; font-weight: 600; text-align: right; }

/* ---------- история ---------- */
.decade h3 { color: var(--muted); font-weight: 600; margin: 28px 0 10px; font-size: 13px; letter-spacing: .1em; }
.year-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.year { text-align: center; padding: 14px 0; background: var(--surface); font-family: var(--num); font-size: 19px; font-weight: 600; }
.year:hover { background: var(--navy); }
.champ-card { padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--c); }
.champ-card h2 { font-size: 26px; letter-spacing: -0.02em; text-transform: none; color: var(--text); margin-bottom: 6px; }

/* ---------- топы ---------- */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 22px 170px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.bar-rank { color: var(--dim); font-family: var(--num); font-size: 15px; } .bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 6px; background: rgba(255,255,255,.05); border-radius: 3px; overflow: hidden; }
.bar-fill { display: block; height: 100%; }
.bar-value { text-align: right; font-family: var(--num); font-size: 18px; font-weight: 600; }
.progress { height: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .5s; }

/* ---------- новости ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 22px; }
.news-card { display: flex; flex-direction: column; }
.news-card:hover h3 { color: var(--accent-2); }
.news-img { aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: var(--surface-2); border-radius: var(--r); }
.news-img.empty { background: var(--surface); border: 1px solid var(--line); }
.news-body { padding: 12px 0 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-body h3 { font-size: 17px; line-height: 1.3; margin: 0; } .news-body p { color: #a3a8b2; font-size: 14px; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article { max-width: 720px; margin: 0 auto; }
.article h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 22px; }
.article-img { aspect-ratio: 16/9; background-size: cover; background-position: center; border-radius: var(--r); margin-bottom: 26px; background-color: var(--surface-2); }
.article-body p { font-size: 18px; line-height: 1.65; color: #d6d8de; margin: 0 0 18px; }
.article-note { color: var(--muted); font-size: 14px; border-left: 2px solid var(--line-2); padding-left: 12px; margin: 6px 0 0; }
.article-src { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.article-src b { color: var(--text); }

/* ---------- настройки ---------- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.series { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); cursor: pointer; font-size: 14px; }
.series.off { opacity: .45; cursor: default; } .series small { margin-left: auto; color: var(--muted); }

/* ---------- этап ---------- */
.race-map { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.race-map svg { width: 100%; height: auto; display: block; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts .tile b { font-size: 28px; }
.wx { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.wx div { background: var(--surface); padding: 14px; }
.wx b { display: block; font-family: var(--num); font-size: 26px; font-weight: 600; }
.wx span { font-size: 12px; color: var(--muted); display: block; }

/* ===== Live-центр ===== */
.live-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.live-head h1 { font-size: clamp(26px, 3.6vw, 40px); }
.picker { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.next-banner { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin-bottom: 14px; font-size: 14px; line-height: 1.6; }
.status-bar { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.flag-pill { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; background: #0d3a1d; color: #7dffa3; }
.flag-pill.sc, .flag-pill.vsc { background: #423300; color: #ffd84d; } .flag-pill.red { background: #4a0d0b; color: #ff8a80; }
.flag-pill.chequered { background: #fff; color: #000; }
.lapc { font-family: var(--num); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.live-grid { display: grid; grid-template-columns: 1fr 500px; gap: 16px; }
.track-wrap { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #03060c; min-height: 560px; }
.track { position: absolute; inset: 0; } .track canvas { width: 100%; height: 100%; display: block; }
.track-fallback { padding: 70px 30px; color: var(--muted); }
.track-tools { position: absolute; top: 10px; left: 10px; display: flex; gap: 2px; background: rgba(0,0,0,.6); padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.track-tools button { background: none; border: 0; color: #c9cdd6; font: 500 12px var(--font); padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.track-tools button.on { background: var(--accent); color: #fff; }
.track-tools .sep { width: 1px; background: var(--line-2); margin: 3px 2px; }
.track-hint { position: absolute; bottom: 10px; left: 12px; }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 6px; max-height: 560px; overflow-y: auto; }
.board-wait { padding: 18px 12px; margin: 0; line-height: 1.5; }
.brow { display: grid; grid-template-columns: 30px minmax(132px, 1fr) 72px 64px 74px 50px; gap: 6px; align-items: center; padding: 7px 6px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.brow:last-of-type { border-bottom: 0; }
.brow.head { color: var(--dim); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; cursor: default; position: sticky; top: -4px; background: var(--surface); z-index: 1; }
.brow:not(.head):hover { background: var(--surface-2); }
.brow.sel { background: color-mix(in srgb, var(--c) 18%, var(--surface-2)); }
.brow .pos { font-family: var(--num); font-size: 18px; font-weight: 600; text-align: center; }
.brow .who { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.brow .who b { font-family: var(--num); font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.brow .who small { font-size: 11px; flex: none; }
.brow .tc { width: 3px; height: 18px; border-radius: 1px; background: var(--c); flex: none; }
.brow .pts { color: var(--up); font-weight: 600; font-size: 12px; }
.brow .cp { display: inline-flex; align-items: center; gap: 3px; color: #b8c8ee; font-weight: 600; font-size: 11px; }
.brow .cp svg { width: 11px; height: 11px; color: var(--gold); }
.board-legend { padding: 8px 6px 6px; font-size: 11px; color: var(--dim); display: flex; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.board-legend svg { width: 11px; height: 11px; color: var(--gold); vertical-align: -1px; }
.tyre { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--t); font: 700 10px var(--font); font-style: normal; color: var(--t); margin-right: 3px; }
.timeline { display: flex; align-items: center; gap: 10px; margin: 14px 0; border: 1px solid var(--line); padding: 8px 12px; border-radius: var(--r); }
.timeline input[type=range] { flex: 1; accent-color: var(--accent); min-width: 80px; }
.live-btn { border-color: rgba(255,59,48,.4); }
.pred { display: flex; flex-direction: column; gap: 9px; }
.pred-row { display: grid; grid-template-columns: 52px 1fr 50px 220px; gap: 12px; align-items: center; font-size: 14px; }
.pred-row b { font-family: var(--num); font-size: 18px; }
.pbar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.05); overflow: hidden; } .pbar span { display: block; height: 100%; background: var(--c); transition: width .6s; }
.rc { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.rc li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.rc-flag { width: 9px; height: 9px; border-radius: 1px; background: #4a505c; flex: none; align-self: center; }
.rc-flag.green { background: #34c759; } .rc-flag.yellow, .rc-flag.doubleyellow, .rc-flag.safetycar { background: #ffd60a; } .rc-flag.red { background: #ff3b30; }
.rc-flag.blue { background: #3478f6; } .rc-flag.chequered { background: repeating-conic-gradient(#fff 0 25%, #000 0 50%) 0 0/5px 5px; }

/* ---------- футер и мобильное меню ---------- */
.ftr { color: var(--dim); font-size: 12px; padding: 22px 20px calc(26px + var(--tabbar)); border-top: 1px solid var(--line); margin-top: auto; }
.ftr-in { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabbar { display: none; }
.more-sheet { display: none; }

@media (max-width: 1100px) {
  .live-grid { grid-template-columns: 1fr; } .track-wrap { min-height: 440px; } .board { max-height: none; }
  .tiles { grid-template-columns: repeat(3, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --tabbar: calc(62px + env(safe-area-inset-bottom)); }
  nav.top { display: none; } .hdr-in { justify-content: space-between; height: 52px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: var(--tabbar); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(8,10,14,.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font: 500 10px var(--font); background: none; border: 0; padding: 0; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: #fff; } .tabbar .on svg { color: var(--accent-2); }
  .more-sheet.open { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); }
  .more-sheet .sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line-2); border-radius: 14px 14px 0 0; padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); }
  .more-sheet a { display: flex; align-items: center; gap: 12px; padding: 14px 12px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .more-sheet a:last-child { border: 0; }
  .more-sheet a svg { width: 20px; height: 20px; color: var(--muted); }
  .more-sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 2px auto 8px; }
  .page { padding: 20px 16px 40px; }
  .grid-2, .grid-3, .hero { grid-template-columns: 1fr; } .hero { gap: 20px; padding-bottom: 24px; }
  .card { padding: 16px; } .tbl-wrap { margin: 0 -16px; padding: 0 16px; }
  .tbl td, .tbl th { padding-left: 6px; padding-right: 6px; }
  .hide-sm { display: none; } .cal-item { grid-template-columns: 38px 1fr 64px; gap: 10px; padding: 12px 6px; } .cal-win { display: none; }
  .cal-round { font-size: 20px; }
  .year-grid { grid-template-columns: repeat(5, 1fr); } .bar-row { grid-template-columns: 18px 118px 1fr 36px; }
  .brow { grid-template-columns: 26px minmax(110px, 1fr) 66px 60px 40px; padding: 8px 4px; }
  .pred-row { grid-template-columns: 46px 1fr 44px; }
  .driver-hero { gap: 16px; } .dh-num { font-size: 72px; }
  .tiles { grid-template-columns: repeat(2, 1fr); } .tile b { font-size: 30px; }
  .track-wrap { min-height: 0; aspect-ratio: 4/3.4; }
  .live-head .picker { width: 100%; } .live-head .picker .select { flex: 1; min-width: 0; }
  .live-head .picker #pk-y { flex: 0 0 76px; } .live-head .picker #pk-m { flex: 1 1 calc(100% - 92px); } .live-head .picker #pk-s { flex: 1 1 auto; } /* этап — на всю строку, сессия с кнопкой — второй строкой: названия не обрезаются */
  .timeline { flex-wrap: wrap; } .timeline input[type=range] { order: 5; flex-basis: 100%; }
  .driver-grid { grid-template-columns: 1fr 1fr; } .driver-card { min-height: 130px; padding: 14px; } .dc-num { font-size: 40px; } .dc-last { font-size: 17px; }
  .season-bars .sb { grid-template-columns: 44px minmax(0, 1fr) 40px 54px; } .season-bars .sb-wins { display: none; }
  .podium .pod b { font-size: 22px; }
  .countdown .cd-cell span { margin-right: 6px; } .cd-cell b { font-size: 42px; }
}

/* правки v0.4 */
.rest-list { margin-top: 10px; }
.rest-row { display: grid; grid-template-columns: 26px auto 44px 1fr auto 36px; align-items: center; gap: 6px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rest-row:last-child { border: 0; } .rest-row:hover { background: var(--surface-2); }
.rest-row .num { font-size: 17px; color: #c9cdd6; } .rest-row b { font-family: var(--num); font-size: 17px; }
.rest-row .dot { margin-right: 0; }
.wk-row { grid-template-columns: 26px auto 44px 1fr auto 70px; } /* карточка уикенда: время + отрыв */
.wk-row > span.muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .wk-row { grid-template-columns: 22px auto 40px 1fr auto 58px; gap: 4px; font-size: 13px; } }
.wk-seg { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 2px; }
.wk-cut { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #ff6b6b; border-top: 1px dashed #ff6b6b80; padding: 4px 2px 0; margin-top: 2px; }
.sess-wx { font-style: normal; color: #aab0bc; font-size: 13px; white-space: nowrap; }
.hero-sessions .sess { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: baseline; }
.hero-sessions .sess .sess-wx { order: 2; } .hero-sessions .sess b { order: 3; }
.sessions-row .sess-wx { margin-top: 2px; }

.track-hint { right: 12px; pointer-events: none; } #env-note { color: var(--accent-2); }

/* финиш */
.finish-banner { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 14px 22px 14px 16px;
  background: rgba(5,8,14,.86); border: 1px solid var(--line-2); border-radius: var(--r); backdrop-filter: blur(10px); animation: fin .5s ease-out; pointer-events: none; transition: opacity .8s; }
.finish-banner.out { opacity: 0; }
.finish-banner .cheq { width: 34px; height: 34px; border-radius: 4px; background: repeating-conic-gradient(#fff 0 25%, #000 0 50%) 0 0/12px 12px; }
.finish-banner small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.finish-banner b { display: block; font-family: var(--num); font-style: italic; font-size: 30px; font-weight: 700; line-height: 1.1; }
@keyframes fin { from { opacity: 0; transform: translate(-50%, -12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }

/* шкала перемотки: круги и нейтрализации */
.scrub-wrap { position: relative; flex: 1; min-width: 80px; padding: 8px 0 16px; }
.scrub-wrap input[type=range] { width: 100%; position: relative; z-index: 2; margin: 0; display: block; }
.lap-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; }
.lap-ticks i { position: absolute; top: 0; width: 1px; height: 4px; background: var(--line-2); cursor: pointer; }
.lap-ticks i.major { height: 7px; background: #4b5466; }
.lap-ticks i.start { height: 10px; width: 2px; background: #fff; }
.lap-ticks i span { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); font: 600 10px var(--num); color: var(--muted); white-space: nowrap; }
.lap-bands { position: absolute; left: 0; right: 0; top: 13px; height: 6px; z-index: 1; pointer-events: none; }
.lap-bands b { position: absolute; top: 0; height: 100%; border-radius: 2px; opacity: .55; }
.lap-bands b.sc { background: #ffd60a; } .lap-bands b.vsc { background: #c9a227; } .lap-bands b.red { background: #ff3b30; }
.brow.out { opacity: .45; } .brow.out .pos { font-size: 12px; color: var(--down); }
.flag-pill.formation, .flag-pill.pre { background: #1b2232; color: #cfe0ff; }
/* квалификация: сегменты Q1/Q2/Q3 */
.seg-tabs { display: inline-flex; gap: 2px; margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg-tabs button { font: 700 13px var(--num); letter-spacing: .04em; color: var(--muted); background: none; border: 0; border-radius: 6px; padding: 5px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg-tabs button.on { background: var(--accent, #3b6cff); color: #fff; }
.seg-tabs button:disabled { opacity: .35; cursor: default; }
.seg-tabs button .pulse { width: 6px; height: 6px; }
.brow.elim { opacity: .45; }
.brow.elim .who small { font-size: 10px; text-transform: none; }
.brow-cut { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--down, #ff6b6b); border-top: 1px dashed color-mix(in srgb, var(--down, #ff6b6b) 60%, transparent); padding: 3px 6px 2px; }
.brow-cut.elim { color: var(--dim); border-top-color: var(--line-2); padding: 0; height: 6px; }
.lap-ticks i.qseg { height: 10px; width: 2px; background: #cfe0ff; }
.lap-ticks i.qseg span { font-size: 11px; color: #cfe0ff; }
.lap-ticks i.qseg-end { height: 10px; width: 2px; background: #fff; }
.lap-bands b.qseg { background: #6ea0ff; opacity: .5; height: 3px; top: 11px; }
@media (max-width: 860px) { .scrub-wrap { order: 5; flex-basis: 100%; } }

/* формы */
.input { width: 100%; background: var(--surface); color: #fff; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; font: 14px var(--font); }
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { resize: vertical; }
.adm-form { display: flex; flex-direction: column; gap: 14px; }
.adm-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.adm-form label.chk, label.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }
.adm-form fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-form legend { font-size: 12px; color: var(--muted); padding: 0 6px; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-err { color: #ffb4ae; font-size: 14px; min-height: 1em; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.auth { max-width: 380px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }
.auth label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload .thumb { height: 44px; border-radius: 4px; border: 1px solid var(--line-2); }
/* админка */
.adm-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.adm-list { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 76px; }
.adm-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; color: var(--text); cursor: pointer; font: 13px var(--font); }
.adm-item.on { border-color: var(--accent); }
.adm-item img, .adm-item > i { width: 56px; height: 32px; object-fit: cover; border-radius: 3px; background: var(--surface-2); }
.adm-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.adm-item em { font-style: normal; font-size: 11px; color: var(--muted); } .adm-item em.on { color: var(--up); }
.adm-preview { position: relative; height: 460px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #03060c; margin-bottom: 20px; }
.adm-preview .track canvas { width: 100%; height: 100%; display: block; }
.pv-bar { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 2; }
.pv-bar .chk { background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: var(--r-sm); font-size: 12px; }
.pv-bar .muted { background: rgba(0,0,0,.55); padding: 4px 8px; border-radius: 4px; }
.slot-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.slot-list b { display: inline-block; min-width: 26px; font-family: var(--num); font-size: 18px; color: var(--accent-2); }
/* рекламодателям (#/advertise): первый экран — настоящий кадр 3D-карты, заголовок узким курсивом, как логотип */
.adv { --adv-gap: 72px; }
.adv-sec { margin-top: var(--adv-gap); }
.adv-h { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; text-transform: none; color: var(--text); margin: 0 0 10px; }
.adv-lead { color: #aab0bc; font-size: 16px; line-height: 1.55; max-width: 62ch; margin: 0 0 22px; }
.adv-small { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 12px 0 0; max-width: 72ch; }

.adv-hero { position: relative; min-height: 580px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; align-items: flex-end; background: #05070c; }
.adv-hero-img, .adv-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.adv-hero-img img { object-fit: cover; object-position: 62% 50%; transform-origin: 72% 45%; animation: adv-drift 26s ease-in-out infinite alternate; }
@keyframes adv-drift { from { transform: scale(1); } to { transform: scale(1.07); } }
.adv-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.7) 34%, rgba(0,0,0,0) 62%), linear-gradient(0deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 40%); }
.adv-hero-txt { position: relative; z-index: 1; max-width: 600px; padding: 48px; }
.adv-hero h1 { font-family: var(--num); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: clamp(42px, 6vw, 82px); line-height: .9; letter-spacing: -.01em; margin: 0 0 18px; text-wrap: balance; }
.adv-sub { color: #c4c8d0; font-size: 17px; line-height: 1.5; margin: 0 0 24px; max-width: 48ch; }
.adv-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.adv-cta .btn { padding: 13px 20px; font-size: 15px; font-weight: 600; }
.adv-cta .btn:not(.primary) { background: rgba(0,0,0,.35); }
.adv-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.adv-cap { position: absolute; z-index: 1; right: 16px; bottom: 14px; font-size: 12px; color: rgba(255,255,255,.55); }
.btn:focus-visible, .adv-tab:focus-visible, .adv-tt:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.adv-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.adv-tabs::-webkit-scrollbar { display: none; }
.adv-tab { flex: none; font: 500 14px var(--font); color: #b9bdc6; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 15px; cursor: pointer; white-space: nowrap; }
.adv-tab:hover { color: #fff; border-color: #3a4252; }
.adv-tab.on { color: #fff; background: var(--navy); border-color: var(--accent); }
.adv-view { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: end; }
.adv-frame { aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #05070c; }
.adv-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-view figcaption { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.adv-view figcaption b { font-family: var(--num); font-style: italic; font-weight: 700; font-size: 30px; line-height: 1; text-transform: uppercase; }
.adv-view figcaption span { color: #aab0bc; font-size: 15px; line-height: 1.5; }

.adv-vid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: center; }
.adv-phone { position: relative; aspect-ratio: 9 / 16; border-radius: 30px; border: 7px solid #1b202b; overflow: hidden; background: #05070c; box-shadow: 0 30px 60px -30px rgba(52,120,246,.45); }
.adv-phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-play { position: absolute; left: 50%; top: 78%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.35); }
.adv-play::after { content: ""; position: absolute; left: 23px; top: 18px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.adv-tts { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; }
.adv-tt { display: flex; flex-direction: column; gap: 2px; padding: 11px 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); min-width: 170px; }
.adv-tt b { font-size: 16px; } .adv-tt span { color: var(--muted); font-size: 13px; }
.adv-tt:hover { border-color: var(--accent); }

.adv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.adv-list li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.5; color: #d5d8de; }
.adv-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: 10px; height: 2px; background: var(--accent); }

.adv-fmts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.adv-fmt { background: var(--surface); padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.adv-fmt b { font-size: 16px; line-height: 1.3; } .adv-fmt p { color: #a3a8b2; font-size: 14px; line-height: 1.45; margin: 0; }
.adv-where { font-size: 12px; font-weight: 600; color: var(--accent-2); }
.adv-fmt.req .adv-where { color: var(--gold); }
.adv-inc { margin-top: 22px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.adv-inc h3 { margin: 0; color: var(--muted); font-weight: 500; font-size: 15px; }
.adv-inc .adv-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }

.adv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.adv-two .adv-h { margin-bottom: 20px; }
.adv-steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: flex; flex-direction: column; gap: 18px; }
.adv-steps li { counter-increment: st; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; }
.adv-steps li::before { content: counter(st); grid-row: span 2; font-family: var(--num); font-style: italic; font-weight: 700; font-size: 40px; line-height: .9; color: var(--accent); }
.adv-steps b { font-size: 16px; } .adv-steps p { margin: 4px 0 0; color: #a3a8b2; font-size: 14px; line-height: 1.5; }

.adv-form-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: start; scroll-margin-top: 72px; }
#adv-fmt, #adv-look { scroll-margin-top: 72px; }
.adv-form { margin: 0; }
.adv-form .chk-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.adv-send { align-self: flex-start; padding: 13px 22px; font-size: 15px; font-weight: 600; }
.adv-opt { color: var(--dim); }
.adv-play:hover { background: rgba(52,120,246,.8); }
.adv-f1 { margin-top: 18px; }
.adv-indep { margin-top: 40px; color: var(--dim); font-size: 12px; }
/* у иероглифов нет курсива: не делаем искусственный наклон */
:lang(zh) .adv-hero h1, :lang(zh) .adv-view figcaption b { font-style: normal; }
.adv-ok h3 { font-size: 22px; margin-bottom: 6px; }

@media (max-width: 1100px) { .adv-fmts { grid-template-columns: repeat(2, 1fr); } .adv-view { grid-template-columns: 1fr; gap: 14px; } }
@media (max-width: 860px) {
  .adv { --adv-gap: 56px; }
  .adv-vid, .adv-two, .adv-form-wrap, .adv-inc { grid-template-columns: 1fr; gap: 24px; }
  .adv-inc .adv-list { grid-template-columns: 1fr; }
  .adv-vid { gap: 28px; } .adv-phone { width: 220px; margin: 0 auto; order: 2; }
}
@media (max-width: 700px) {
  .page:has(.adv) { padding-top: 0; }
  .adv-hero { display: block; min-height: 0; border: 0; border-radius: 0; margin: 0 calc(50% - 50vw); background: none; overflow: visible; }
  .adv-hero::after { display: none; }
  .adv-hero-img { position: relative; display: block; aspect-ratio: 5 / 4; max-height: 46vh; overflow: hidden; }
  .adv-hero-img img { position: absolute; object-position: 50% 50%; }
  .adv-hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 38%); }
  .adv-hero-txt { padding: 0 16px; margin-top: -34px; max-width: none; }
  .adv-hero h1 { font-size: clamp(38px, 11vw, 52px); margin-bottom: 12px; }
  .adv-sub { font-size: 15px; margin-bottom: 18px; }
  .adv-cta .btn { flex: 1 1 auto; justify-content: center; }
  .adv-cta .btn.primary { flex-basis: 100%; }
  .adv-cap { top: 10px; left: 12px; right: auto; bottom: auto; font-size: 11px; background: rgba(0,0,0,.45); padding: 3px 7px; border-radius: 4px; }
  .adv-frame { margin: 0 calc(50% - 50vw); border-radius: 0; border-left: 0; border-right: 0; }
  .adv-view figcaption b { font-size: 26px; }
  .adv-fmts { grid-template-columns: 1fr; }
  .adv-fmt { padding: 14px 16px 16px; }
  .adv-tt { flex: 1 1 140px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .adv-hero-img img { animation: none; } }
.ftr-link { color: #aab0bc; } .ftr-link:hover { color: #fff; }
@media (max-width: 860px) {
  .adm-grid, .row2 { grid-template-columns: 1fr; } .adm-list { position: static; }
  .adm-preview { height: 340px; }
}

/* раскладка рекламной картинки */
.lay-canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line, #2a2f3a); border-radius: 6px; cursor: grab; touch-action: none; background: #000; margin-bottom: 8px; }
.lay-canvas.grab { cursor: grabbing; }
.lay-ctrl { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin: 6px 0 10px; }
.lay-ctrl label { display: flex; align-items: center; gap: 10px; margin: 0; }
.lay-range input[type=range] { width: 180px; accent-color: #3478f6; }
.lay-range span { min-width: 44px; font-variant-numeric: tabular-nums; color: var(--muted, #8a93a5); }
.lay-bg input[type=color] { width: 36px; height: 28px; padding: 0; border: 1px solid var(--line, #2a2f3a); border-radius: 6px; background: none; }
.lay-bg input[type=color]:disabled { opacity: .4; }
.lay-bg .chk { display: inline-flex; gap: 6px; align-items: center; }

/* переключатель из нескольких кнопок */
.seg { display: inline-flex; border: 1px solid var(--line, #2a2f3a); border-radius: 6px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted, #8a93a5); padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line, #2a2f3a); }
.seg button.on { background: #3478f6; color: #fff; }
.brand-tbl td { vertical-align: middle; padding: 8px 10px; }

[hidden] { display: none !important; }
.view { display: contents; }

/* админка: статистика */
.sb { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
/* админка: посещаемость */
.an-online { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.an-online.zero i { background: var(--dim); box-shadow: none; }
.an-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px rgba(62,207,110,.18); }
.an-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px -4px 0; padding: 0 4px 2px; }
.an-chips::-webkit-scrollbar { display: none; }
.an-chip { flex: none; height: 34px; padding: 0 13px; border-radius: 17px; border: 1px solid var(--line-2); background: transparent; color: #c9cdd6; font: 500 13px var(--font); cursor: pointer; white-space: nowrap; }
.an-chip:hover { border-color: #3a4252; color: #fff; }
.an-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.an-custom { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 12px; }
.an-custom[hidden] { display: none; }
.an-custom label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.an-custom .input { padding: 8px 10px; color-scheme: dark; min-width: 0; height: 38px; }
.an-custom .btn { height: 38px; }
.an-range { margin: 12px 0 14px; font-size: 13px; color: var(--muted); }
#an-body.busy { opacity: .45; transition: opacity .15s; pointer-events: none; }
.an-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.an-kpi { background: var(--surface); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.an-k-l { font-size: 12px; color: var(--muted); line-height: 1.25; }
.an-kpi b { font-family: var(--num); font-size: 32px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.an-k-d { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 12px; }
.an-k-d small, .an-k-h { color: var(--dim); font-size: 11.5px; }
.an-d { font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-d.up { color: var(--up); } .an-d.down { color: var(--down); }
.an-kpi.live b { color: var(--up); }
.an-chart-box { margin-top: 18px; }
.an-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.an-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.an-seg button { background: none; border: 0; color: var(--muted); font: 500 13px var(--font); padding: 8px 12px; cursor: pointer; }
.an-seg button + button { border-left: 1px solid var(--line-2); }
.an-seg button.on { background: var(--surface-2); color: #fff; }
.an-tip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-height: 44px; margin: 12px 0 8px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 13px; color: var(--muted); }
.an-tip b { flex-basis: 100%; color: var(--text); font-weight: 600; }
.an-tip strong { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 3px; }
.an-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 170px auto; column-gap: 8px; }
.an-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; margin: -7px 0; }
.an-plot { position: relative; border-bottom: 1px solid var(--line-2); }
.an-gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.an-bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; }
.an-bar { flex: 1; min-width: 0; position: relative; background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: flex-end; }
.an-bar i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 0; transition: background .1s; }
.an-bar:hover i { background: #4d8bff; }
.an-bar.sel { background: rgba(255,255,255,.05); }
.an-bar.sel i { background: var(--accent-2); }
.an-bar.fut { cursor: default; }
.an-bar em { position: absolute; left: 50%; transform: translate(-50%, -3px); font: 600 11px var(--font); font-style: normal; color: var(--muted); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.an-x { grid-column: 2; display: flex; gap: 2px; margin-top: 5px; }
.an-x span { flex: 1 1 0; min-width: 0; width: 0; font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: visible; }
.an-cap { margin: 8px 0 0; font-size: 12px; color: var(--dim); }
.an-cap.warn { color: var(--gold); }
.an-note { margin: 0 2px 12px; }
.an-grid.grid-2 { align-items: start; }
.an-tbl { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.an-tbl th { font-weight: 500; color: var(--dim); font-size: 11.5px; text-align: right; padding: 0 0 8px 6px; border-bottom: 1px solid var(--line-2); width: 78px; white-space: nowrap; }
.an-tbl th:first-child { text-align: left; width: auto; padding-left: 0; }
.an-tbl th:last-child { width: 46px; }
.an-tbl td { padding: 8px 0 7px 6px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; vertical-align: top; }
.an-tbl td:first-child { text-align: left; padding-left: 0; }
.an-tbl td:last-child { color: var(--muted); }
.an-tbl tr:last-child td { border-bottom: 0; }
.an-n { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-sh { display: block; height: 3px; margin-top: 5px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.an-sh i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.an-all { margin-top: 10px; width: 100%; justify-content: center; }
.an-legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
.an-legend dt { font-weight: 600; } .an-legend dd { margin: 0; color: var(--muted); }
@media (max-width: 600px) {
  .an-kpis { grid-template-columns: repeat(2, 1fr); }
  .an-kpi { padding: 12px 12px 10px; } .an-kpi b { font-size: 28px; }
  .an-custom { grid-template-columns: 1fr 1fr; } .an-custom .btn { grid-column: span 2; justify-content: center; }
  .an-tbl { font-size: 13px; } .an-tbl th { width: 70px; font-size: 11px; } .an-tbl th:last-child { width: 40px; }
  .an-legend dl { grid-template-columns: 1fr; gap: 0; } .an-legend dd { margin-bottom: 8px; }
}
/* админка: гео рекламы */
.seg-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.geo-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.geo-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.geo-sel .chip { cursor: pointer; border: 0; }
.geo-list { max-height: 260px; overflow: auto; margin-top: 8px; }

/* разборы */
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.art-card { display: grid; background: var(--card, #0d1220); border: 1px solid var(--line-2, #1d2640); border-radius: 18px; overflow: hidden; color: inherit; text-decoration: none; }
.art-card img { width: 100%; aspect-ratio: 1200/630; object-fit: cover; display: block; }
.art-card > div { padding: 16px 18px 20px; }
.art-card h2 { font-size: 21px; margin: 6px 0 8px; line-height: 1.25; letter-spacing: -0.01em; text-transform: none; color: var(--text); font-weight: 700; }
.art-card:hover { border-color: #3478f6; }
.own-article { max-width: 760px; margin: 0 auto; }
.own-article h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; margin: 8px 0 14px; }
.own-article .lead { font-size: 19px; color: #c7d0e6; line-height: 1.5; }
.art-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }
.art-tools .seg { display: inline-flex; border: 1px solid var(--line-2, #1d2640); border-radius: 10px; overflow: hidden; }
.art-tools .seg a { padding: 6px 12px; color: inherit; text-decoration: none; font-weight: 600; }
.art-tools .seg a.on { background: #3478f6; color: #fff; }
.art-video { width: 100%; max-width: min(380px, calc(68vh * 9 / 16)); display: block; margin: 0 auto 20px; border-radius: 18px; background: #000; aspect-ratio: 9/16; }
.art-cover { width: 100%; border-radius: 18px; margin-bottom: 20px; }
.art-body h2 { font-size: 24px; margin: 30px 0 10px; letter-spacing: -0.01em; text-transform: none; color: var(--text); font-weight: 700; }
.art-body p { font-size: 18px; line-height: 1.65; color: #dfe5f3; }
.art-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-top: 30px; }
.art-fig { margin: 26px 0; } .art-fig img { width: 100%; border-radius: 16px; display: block; background: #0d1119; }
.art-fig figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.art-video.wide { max-width: 100%; aspect-ratio: 16/9; border-radius: 16px; }
/* текст для поисковиков, виден до загрузки приложения */
.seo{max-width:760px;margin:16px auto;line-height:1.55}.seo h1{font-size:26px;margin:0 0 10px}.seo h2{font-size:19px;margin:18px 0 8px}.seo img{max-width:100%;border-radius:12px}.seo figcaption{font-size:13px;opacity:.6}.seo a{color:inherit}
/* админка рекламы: архив и статистика */
.adm-list .seg { display: flex; gap: 4px; margin: 10px 0; } .adm-list .seg button { flex: 1; background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: var(--r-sm); padding: 6px; cursor: pointer; font: 600 12px var(--font); } .adm-list .seg button.on { color: var(--text); border-color: var(--accent); }
.ad-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0; } .ad-stats div { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; } .ad-stats b { display: block; font-size: 20px; } .ad-stats span { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .ad-stats { grid-template-columns: repeat(2, 1fr); } }
.btn.danger { border-color: #ef4444; color: #ef4444; }
/* подиум с пилотами */
.ph { margin-top: 14px; }
.ph-stage { display: grid; grid-template-columns: 1fr 1.08fr 1fr; gap: 10px; align-items: end; }
.ph-step { position: relative; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text); min-width: 0; }
.ph-num { position: absolute; top: 0; right: 4%; font: 800 clamp(64px, 11vw, 120px)/1 var(--num); color: var(--c); opacity: .22; z-index: 0; }
.pod-fig { position: relative; z-index: 1; width: 100%; max-width: 190px; display: block; margin-bottom: -2px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.ph2 .pod-fig, .ph3 .pod-fig { max-width: 160px; }
.ph-card { position: relative; z-index: 2; width: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); border-radius: 18px 18px 6px 6px; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ph1 .ph-card { border-color: #e8b931; background: linear-gradient(180deg, rgba(232,185,49,.18), var(--surface)); padding-bottom: 26px; }
.ph2 .ph-card { padding-bottom: 14px; }
.ph-team { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ph-team i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ph-name { font: 800 clamp(15px, 2.2vw, 22px)/1.05 var(--font); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.ph-row { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--muted); } .ph-row .mono { color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 14px; }
.ph-cell { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; } .ph-cell b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ph-cell .purple { color: #b26bff; }
@media (max-width: 520px) { .ph-stage { gap: 6px; } .ph-card { padding: 9px 8px 8px; border-radius: 14px 14px 5px 5px; } .ph-row { font-size: 11px; flex-direction: column; gap: 0; } .ph-name { font-size: 14px; } }
/* «главное о гонке»: 3 колонки (2 на телефоне), последняя клетка растягивается — пустых квадратов нет */
.ph-grid { grid-template-columns: repeat(3, 1fr); }
.ph-grid > .ph-cell:last-child:nth-child(3n+1) { grid-column: span 3; } .ph-grid > .ph-cell:last-child:nth-child(3n+2) { grid-column: span 2; }
@media (max-width: 600px) { .ph-grid { grid-template-columns: repeat(2, 1fr); } .ph-grid > .ph-cell:last-child:nth-child(3n+1), .ph-grid > .ph-cell:last-child:nth-child(3n+2) { grid-column: auto; } .ph-grid > .ph-cell:last-child:nth-child(odd) { grid-column: span 2; } }
.ph-cell b { white-space: normal; overflow-wrap: anywhere; }

/* ---------- дуэли напарников ---------- */
#mini-duels { margin-top: 16px; }
.du-ctl { margin: -6px 0 14px; } .seg button.on { background: var(--surface-2); color: #fff; }
.du-list { display: flex; flex-direction: column; gap: 8px; }
.du-row { display: grid; grid-template-columns: minmax(84px, 120px) 1fr minmax(84px, 120px); align-items: center; gap: 12px; }
.du-row.sub { opacity: .5; }
.du-d { display: flex; align-items: center; gap: 8px; font-family: var(--num); font-size: 20px; letter-spacing: .02em; }
.du-d.du-a { justify-content: flex-end; } .du-d:hover .du-code { color: var(--accent-2); }
.du-code { font-weight: 700; } .du-n { font-weight: 500; color: var(--muted); min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; } .du-n.lead { color: #fff; font-weight: 700; }
.du-up { color: var(--up); font-size: 15px; width: 10px; font-family: var(--font); }
.du-bar { position: relative; height: 22px; border-radius: 4px; background: #e9ecf2; overflow: hidden; }
.du-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px 0 0 4px; }
.du-bar s { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.35); }
.du-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 8px 0 2px; }
.du-sep::before, .du-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.du-foot { margin: 12px 0 0; }
@media (max-width: 560px) { .du-row { grid-template-columns: 74px 1fr 74px; gap: 8px; } .du-d { font-size: 17px; gap: 5px; } .du-bar { height: 18px; } }
/* другие серии: результаты пилота по этапам, чемпионы по годам */
.s-res td.ev { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-res td, .s-res th { padding-left: 6px; padding-right: 6px; }
.s-hist td { vertical-align: top; }
.team-card .dc-drivers a { color: inherit; }
@media (max-width: 480px) { .s-res td.ev { max-width: 130px; } .s-res { font-size: 13px; } }
/* другие серии: дуэль двух пилотов (#/sduel), дуэли напарников, «сравнить с…» */
a.du-row { color: inherit; } a.du-row:hover .du-code { color: var(--accent-2); }
.s-links { margin: -8px 0 16px; }
.sd-pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 16px; }
.sd-pick .select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.card .sd-pick + .btn { width: 100%; justify-content: center; }
.sd-swap { padding: 0 12px; height: 36px; font-size: 16px; }
.sd-hero { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; margin-bottom: 20px; }
.sd-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--r); color: inherit; }
.sd-side.sd-b { text-align: right; align-items: flex-end; }
.sd-side:hover .sd-last { color: var(--accent-2); }
.sd-num { font-family: var(--num); font-size: 26px; font-weight: 700; font-style: italic; color: var(--c); line-height: 1; min-height: 26px; }
.sd-first { color: #c3c7cf; font-size: 13px; } .sd-last { font-family: var(--num); font-size: 22px; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.sd-side .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sd-pts { font-family: var(--num); font-size: 18px; margin-top: 6px; } .sd-pts small { font-family: var(--font); font-size: 12px; color: var(--muted); }
.sd-vs { align-self: center; color: var(--muted); font-family: var(--num); font-style: italic; font-size: 18px; }
.sd-h2h + .sd-h2h { margin-top: 14px; }
.sd-lbl { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.sd-stats { display: flex; flex-direction: column; }
.sd-stat { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sd-stat:last-child { border: 0; }
.sd-stat span { text-align: center; color: var(--muted); font-size: 13px; } .sd-stat span small { font-size: 11px; }
.sd-stat b { font-family: var(--num); font-size: 19px; font-weight: 500; color: #c3c7cf; font-variant-numeric: tabular-nums; } .sd-stat b:last-child { text-align: right; }
.sd-stat b.win { color: #fff; font-weight: 700; } .sd-stat b.win::after { content: " ●"; font-size: 9px; color: var(--up); vertical-align: 3px; }
.sd-stat b:last-child.win::after { content: none; } .sd-stat b:last-child.win::before { content: "● "; font-size: 9px; color: var(--up); vertical-align: 3px; }
.sd-codes { padding-top: 0; } .sd-codes b { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.sd-res td.sd-w { background: rgba(62,207,110,.08); }
.sd-cmp { margin: -8px 0 18px; } .sd-cmp .select { width: 100%; max-width: 360px; }
@media (max-width: 480px) { .sd-hero { gap: 6px; } .sd-side { padding: 10px; } .sd-last { font-size: 18px; } .sd-num { font-size: 22px; min-height: 22px; } .sd-stat { grid-template-columns: 58px 1fr 58px; } .sd-vs { font-size: 14px; } }
/* другие серии: страница команды; NASCAR — пояснение про зачёт владельцев */
.st-note { margin: -8px 0 16px; max-width: 640px; }
.team-card a.dc-last { color: inherit; } .team-card a.dc-last:hover { color: var(--accent-2); }
.driver-hero .eyebrow a { color: inherit; } .driver-hero .eyebrow a:hover { color: var(--accent-2); }
/* другие серии: live-тайминг */
.lv-head { border-top: 3px solid var(--c); }
.lv-top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; min-height: 22px; }
.lv-sess { color: #fff; font-size: 20px; letter-spacing: 0; text-transform: none; margin: 0 0 4px; }
.lv-prog { margin: 10px 0 0; font-family: var(--num); font-size: 18px; }
.lv-flag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.lv-green { background: #1f8f4a; color: #fff; } .lv-yellow { background: #f2c230; color: #111; } .lv-red { background: #e0352b; color: #fff; } .lv-white { background: #f2f3f5; color: #111; }
.lv-next-name { color: #fff; font-size: 18px; letter-spacing: 0; text-transform: none; margin: 0 0 10px; }
.lv-tbl td { vertical-align: middle; } .lv-tbl .lv-drv { line-height: 1.3; max-width: 240px; }
.lv-l1, .lv-l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lv-l2 { font-size: 12px; margin-top: 2px; } .lv-l2 .chip { font-size: 10px; padding: 1px 5px; }
.lv-num { display: inline-block; min-width: 26px; text-align: center; font-family: var(--num); font-weight: 700; font-style: italic; border-left: 3px solid var(--tc); padding-left: 4px; }
.lv-out { opacity: .55; }
@media (max-width: 480px) { .lv-tbl { font-size: 13px; } .lv-tbl td, .lv-tbl th { padding-left: 5px; padding-right: 5px; } .lv-tbl .lv-drv { max-width: 148px; } .lv-l2 { font-size: 11px; } }
.lv-err { margin: -8px 0 12px; color: #ffb4ae; } .lv-stale .lv-tower, .lv-stale .lv-head { opacity: .7; }
.lv-tbl th { font-size: 10px; letter-spacing: .04em; }
/* live-чемпионат: замок «место закреплено», команды, «показать всех» */
.lock { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: #9fb3d9; cursor: help; }
.lock-ic { width: 13px; height: 13px; }
.board-legend .lock-ic { color: #9fb3d9; }
.champ-tbl .tname { display: inline-block; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.champ-more { margin-top: 10px; }
@media (max-width: 520px) { .champ-tbl .tname { max-width: 104px; } .champ-tbl .chip { font-size: 10px; padding: 2px 5px; } }
/* LapRadar Game Creator (#/admin/game) */
.gc-title { font-size: 20px; margin: 4px 0 12px; }
.gc-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gc-list { display: flex; flex-direction: column; gap: 6px; }
.gc-wk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); gap: 10px; align-items: center; padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.gc-wk.now { border-color: var(--accent, #3478f6); }
.gc-wk em { font-style: normal; font-size: 11px; color: var(--accent, #3478f6); }
.gc-wk small, .gc-tbl small { display: block; font-size: 12px; }
.gc-lg { display: flex; flex-wrap: wrap; } .gc-lg button { flex: 1 1 45%; }
.gc-tbl td { padding: 8px 6px; vertical-align: top; } .gc-tbl td:last-child { text-align: right; }
.gc-tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; padding: 4px 6px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.gc-tr .btn { min-width: 34px; }
.gc-tbl tr.now td { color: var(--accent, #3478f6); }
.gc-warn { color: #f59e0b; }
.gc-au { font-size: 10px; font-weight: 700; padding: 1px 4px; border-radius: 4px; border: 1px solid var(--line-2, #3a3f4a); color: var(--muted); }
@media (max-width: 520px) { .gc-wk { grid-template-columns: 1fr; gap: 4px; } }
/* Game Creator: редактор трассы — во весь экран: карта + панель справа (телефон: шторка снизу) */
.te-lock, .te-lock body { overflow: hidden; }
.te-fs { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: minmax(0, 1fr) 360px; background: #05070b; color: var(--text); }
.te-fs[hidden] { display: none; }
.te-cv { position: relative; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; }
.te-cv canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.te-top { position: absolute; left: 10px; top: 10px; right: 60px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.te-top > * { pointer-events: auto; }
.te-top .btn, .te-top .select, .te-zoom .btn { background-color: rgba(11,16,32,.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.te-top .select { max-width: 190px; }
.te-top .btn[data-act=undo], .te-top .btn[data-act=redo] { min-width: 36px; font-size: 16px; }
.te-top .btn:disabled { opacity: .4; }
.te-dirty { padding: 3px 8px; border-radius: 6px; background: rgba(11,16,32,.85); color: var(--muted); }
.te-dirty.on { color: #fbbf24; }
.te-hud { position: absolute; left: 10px; bottom: 10px; max-width: min(560px, calc(100% - 20px)); padding: 5px 9px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; pointer-events: none; }
.te-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.te-zoom .btn { min-width: 36px; }
.te-legend { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 3px; padding: 7px 10px; border-radius: 8px; background: rgba(0,0,0,.65); color: #fff; max-width: 300px; pointer-events: none; }
.te-legend span { display: flex; gap: 7px; align-items: center; }
.te-legend em { font-style: normal; } .te-legend em.sh { display: none; }
.te-legend i { flex: none; width: 20px; height: 4px; border-radius: 2px; }
.te-legend i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 10px); }
.te-sw { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; }
.te-side { position: relative; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
#te-side-in > * { flex: none; }
#te-side-in { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.te-grab { display: none; }
.te-side h3 { font-size: 14px; margin: 0 0 4px; }
.te-side label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.te-side label.chk { flex-direction: row; align-items: center; color: var(--text); gap: 6px; }
.te-side fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 8px 6px; margin: 0; }
.te-side legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.te-tools { display: flex; flex-wrap: wrap; width: 100%; position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 0 -12px 0 var(--surface); }
.te-tools button { flex: 1 1 auto; padding: 8px 4px; font-size: 12.5px; white-space: nowrap; }
.te-props { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); }
.te-props p { margin: 0; }
.te-subsel { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--line-2); }
.te-board { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 2px 4px; border-radius: 6px; }
.te-board.on { background: rgba(249,115,22,.18); }
.te-err { color: #f87171; margin: 0; }
.te-sec summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.te-sec p { margin: 4px 0; }
.te-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.te-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.te-list button { display: flex; gap: 8px; align-items: center; text-align: left; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--text); padding: 5px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.te-list button:hover { background: var(--surface-2); }
.te-list button.on { border-color: #f97316; background: rgba(249,115,22,.12); }
.te-list button b { min-width: 24px; color: #fdba74; }
.te-list button span { margin-left: auto; color: var(--muted); font-size: 12px; }
.te-col { display: grid; grid-template-columns: 1fr 44px auto; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.te-col input[type=color] { width: 44px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.te-foot { position: sticky; bottom: -12px; margin: 0 -12px -12px; padding: 10px 12px 12px; background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.te-btns { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 6px; } .te-btns .btn { padding-left: 6px; padding-right: 6px; }
.te-more { gap: 6px; } .te-more .btn { font-size: 12px; }
@media (max-width: 760px) {
  .te-fs { grid-template-columns: 1fr; }
  .te-side { position: absolute; left: 0; right: 0; bottom: 0; max-height: 58vh; height: 58vh; border-left: 0; border-top: 1px solid var(--line-2); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.5);
    transform: translateY(calc(100% - 96px - env(safe-area-inset-bottom))); transition: transform .22s ease; }
  .te-side.open { transform: none; }
  .te-grab { display: flex; justify-content: center; align-items: center; height: 22px; flex: none; background: none; border: 0; cursor: pointer; }
  .te-grab i { width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); }
  #te-side-in { padding-top: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .te-top { right: 56px; } .te-top .select { max-width: 130px; }
  .te-hud { bottom: 106px; font-size: 11px; }
  .te-legend { top: 96px; bottom: auto; right: auto; left: 10px; font-size: 11px; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; max-width: calc(100% - 20px); padding: 5px 8px; }
  .te-legend b { display: none; } .te-legend em.lg { display: none; } .te-legend em.sh { display: inline; } .te-legend i { width: 14px; }
  .te-zoom { top: auto; bottom: 150px; }
  .te-tools button { flex: 1 1 18%; padding: 9px 2px; font-size: 12px; }
  .te-foot { bottom: calc(-12px - env(safe-area-inset-bottom)); }
}
/* редактор трассы: 2D / 3D, график профиля высоты, предупреждения */
.te-view { display: inline-flex; border-radius: 8px; overflow: hidden; background: rgba(11,16,32,.85); border: 1px solid var(--line); }
.te-view button { padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; }
.te-view button.on { color: #0b1020; background: #22d3ee; }
.te-top { z-index: 3; } .te-hud { z-index: 3; }
.te-fs.te-3d .te-zoom, .te-fs.te-3d .te-legend, .te-fs.te-3d #te-c { display: none; }
.te-graph { flex: none; border-top: 1px solid var(--line); padding: 6px 10px 8px; background: var(--surface); }
.tp-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.tp-head .tp-btns { margin-left: auto; display: flex; gap: 4px; } .tp-head .btn { padding: 2px 8px; min-width: 28px; }
.tp-c { display: block; width: 100%; height: 124px; margin-top: 4px; border-radius: 6px; background: #0a0f1c; touch-action: none; cursor: ns-resize; }
.tp-hint { margin: 3px 0 0; font-size: 11px; }
.te-warn { display: flex; flex-direction: column; gap: 4px; padding: 7px 9px; margin: 4px 0; border-radius: 8px; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35); font-size: 12.5px; }
.te-warn.ok { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.3); }
.te-warn span { color: var(--muted); }
/* 3D-сцена поверх холста 2D */
.t3 { position: absolute; inset: 0; z-index: 1; background: #05070b; }
.t3-c { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.t3-msg { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); padding: 6px 12px; border-radius: 8px; background: rgba(239,68,68,.9); color: #fff; z-index: 2; }
.t3-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(11,16,32,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.t3-bar .seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.t3-bar .seg button { padding: 6px 10px; font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.t3-bar .seg button.on { background: #22d3ee; color: #0b1020; font-weight: 600; }
.t3-bar label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.t3-bar b { color: var(--text); font-size: 12px; min-width: 56px; }
.t3-spd input { width: 110px; } .t3-pos { flex: 1 1 200px; } .t3-pos input { flex: 1; min-width: 120px; }
.t3-play { min-width: 36px; } .t3:not(.ride) .t3-play { display: none; }
.t3-bar select { max-width: 200px; }
.t3-help { position: absolute; left: 10px; top: 52px; z-index: 2; max-width: min(620px, calc(100% - 20px)); padding: 4px 9px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; pointer-events: none; }
.t3-sticks { display: none; }
.t3.touch .t3-sticks { display: block; }
.t3-stick { position: absolute; bottom: 150px; width: 112px; height: 112px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); z-index: 2; touch-action: none; }
.t3-stick[data-st=move] { left: 16px; } .t3-stick[data-st=look] { right: 16px; }
.t3-stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(34,211,238,.55); pointer-events: none; }
.t3-ud { position: absolute; right: 140px; bottom: 166px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.t3-ud button { width: 42px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(11,16,32,.7); color: #fff; font-size: 15px; touch-action: none; }
.t3.ride .t3-sticks { display: none; }
@media (max-width: 760px) {
  .t3-bar { bottom: 104px; left: 6px; right: 6px; gap: 6px; padding: 6px 8px; }
  .t3-bar .seg button { padding: 6px 7px; font-size: 12px; }
  .t3-spd span { display: none; } .t3-spd input { width: 80px; }
  .t3-bar select { max-width: 130px; }
  .t3-help { top: 96px; font-size: 11px; }
  .t3-stick { bottom: 232px; width: 96px; height: 96px; } .t3-ud { bottom: 246px; right: 122px; }
  .te-graph { padding: 4px 10px 6px; } .tp-c { height: 84px; } .tp-hint { display: none; }
}
.gc-login { max-width: 420px; margin: 40px auto; }
.gc-log { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Live 3D (#/live3d): картинка во всю ширину, таблица и камеры поверх ---------- */
.l3d-go { margin-left: auto; }
.l3d-stage { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #03060c; height: min(72vh, 760px); min-height: 380px; touch-action: none; user-select: none; -webkit-user-select: none; }
.l3d-stage:fullscreen, .l3d-stage.is-fs { height: 100%; border-radius: 0; border: 0; }
.l3d-stage:-webkit-full-screen { width: 100%; height: 100%; }
/* «во весь экран» там, где у элемента нет Fullscreen API (iPhone Safari): сцена поверх страницы, шапка и меню скрыты */
.l3d-stage.pseudo-fs { position: fixed; inset: 0; z-index: 400; width: 100vw; height: 100vh; height: 100dvh; min-height: 0; margin: 0; border: 0; border-radius: 0; }
html.l3d-lock, html.l3d-lock body { overflow: hidden; overscroll-behavior: none; }
.l3d-stage.pseudo-fs .l3d-tower, .l3d-stage.pseudo-fs .l3d-btns { top: calc(8px + env(safe-area-inset-top)); }
.l3d-stage.pseudo-fs .l3d-right { top: calc(8px + env(safe-area-inset-top)); }
.l3d-stage.pseudo-fs .l3d-cams { bottom: calc(8px + env(safe-area-inset-bottom)); }
.l3d-pnl-btn { display: none !important; }
.l3d-stage.is-fs .l3d-pnl-btn { display: grid !important; }
.l3d-stage.is-fs .l3d-rows { max-height: calc(100vh - 120px); }
.l3d-pnl-btn[aria-expanded="true"] { background: var(--accent); color: #fff; }
/* мини-карта и секторы выбранного пилота: справа сверху, рядом с кнопками */
.l3d-right { position: absolute; top: 10px; right: 52px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.l3d-right > * { pointer-events: auto; }
.l3d-mini { position: relative; width: 200px; height: 150px; background: rgba(6,9,16,.55); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-sm); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.l3d-mini svg { width: 100%; height: 100%; display: block; cursor: pointer; }
.l3d-mini .trk { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2.4; stroke-linejoin: round; }
.l3d-mini .dot circle { stroke: rgba(0,0,0,.55); stroke-width: 1; }
.l3d-mini .dot text { display: none; font: 700 9px var(--font); fill: #fff; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 2.5px; }
.l3d-mini .dot.pit { opacity: .45; }
.l3d-mini .dot.lead circle { r: 4.6; stroke: #ffd23f; stroke-width: 1.6; }
.l3d-mini .dot.sel circle { r: 5.4; stroke: #fff; stroke-width: 2; }
.l3d-mini .dot.sel text, .l3d-mini .dot.lead text { display: block; }
.l3d-mini-tg { position: absolute; top: 3px; right: 3px; z-index: 1; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; background: rgba(0,0,0,.45); color: #dfe3ea; border: 0; border-radius: 4px; cursor: pointer; opacity: .75; }
.l3d-mini.closed { width: 34px; height: 34px; }
.l3d-mini.closed svg { display: none; }
.l3d-mini.closed .l3d-mini-tg { inset: 0; width: 100%; height: 100%; opacity: 1; background: rgba(0,0,0,.6); }
.l3d-sect { width: 200px; background: rgba(6,9,16,.82); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 6px 7px 7px; font-size: 12px; }
.l3d-sect .hd { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.l3d-sect .hd i { width: 3px; height: 13px; border-radius: 1px; background: var(--c); }
.l3d-sect .hd span { margin-left: auto; color: var(--muted); font-size: 11px; }
.l3d-sect .ss, .l3d-sect .ll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.l3d-sect .ll { grid-template-columns: 1fr 1fr; margin-top: 3px; }
.l3d-sect .ss span, .l3d-sect .ll span { display: flex; flex-direction: column; align-items: center; padding: 2px 0 3px; border-radius: 4px; background: rgba(255,255,255,.06); font-family: var(--num); font-weight: 600; font-size: 12.5px; color: #e9edf5; border-bottom: 2px solid transparent; }
.l3d-sect small { font: 600 9px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.l3d-sect small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.l3d-mini svg { overflow: visible; }
.l3d-sect span.purple { background: rgba(168,85,247,.28); border-bottom-color: #a855f7; color: #e4ccff; }
.l3d-sect span.green { background: rgba(34,197,94,.22); border-bottom-color: #22c55e; color: #c9f7d8; }
.l3d-sect span.yellow { background: rgba(250,204,21,.16); border-bottom-color: #facc15; color: #fdf0b0; }
/* вкладки под сценой; в полноэкранном режиме — в выезжающей панели (сбоку на компьютере, снизу на телефоне) */
.l3d-panels { margin-top: 14px; }
.l3d-panels .champ-tbl tbody tr, .l3d-panels .pred-row { cursor: pointer; }
.l3d-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92%); z-index: 7; overflow-y: auto; background: rgba(6,9,16,.92); border-left: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 44px 12px 16px; animation: l3dIn .22s ease; }
.l3d-drawer .champ-tbl tbody tr, .l3d-drawer .pred-row { cursor: pointer; }
.l3d-drawer .tabs { flex-wrap: nowrap; gap: 14px; margin-bottom: 10px; }
.l3d-drawer .tabs button { padding: 6px 0; font-size: 12.5px; }
.l3d-drawer .card { padding: 10px; }
.l3d-drawer-x { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.l3d-stage.drawer-open .l3d-btns { right: calc(min(420px, 92%) + 10px); }
.l3d-stage.drawer-open .l3d-right { display: none; }
@keyframes l3dIn { from { transform: translateX(30px); opacity: 0; } }
@keyframes l3dUp { from { transform: translateY(40px); opacity: 0; } }
.l3d-toast { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; max-width: min(460px, calc(100% - 480px)); min-width: 220px; padding: 7px 12px; background: rgba(6,9,16,.9); color: #fff; border: 1px solid rgba(255,255,255,.12); border-left: 3px solid #ffd23f; border-radius: var(--r-sm); font: 500 12.5px var(--font); text-align: left; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: l3dToast .3s ease; }
.l3d-toast small { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.l3d-toast .tx { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.l3d-toast .rc-flag { flex: 0 0 auto; }
@keyframes l3dToast { from { transform: translate(-50%, -8px); opacity: 0; } }
.l3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.l3d-load { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; color: var(--muted); font-size: 14px; background: #03060c; z-index: 5; padding: 20px; }
.l3d-load:not(.err)::after { content: ''; width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: l3dspin 0.9s linear infinite; }
.l3d-load.err p { color: var(--text); max-width: 360px; margin: 0 auto; }
@keyframes l3dspin { to { transform: rotate(360deg); } }
.l3d-tower { position: absolute; top: 10px; left: 10px; z-index: 3; width: 196px; background: rgba(6,9,16,.78); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; }
.l3d-tw-btn { display: block; width: 100%; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--muted); font: 600 11px var(--font); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; text-align: left; cursor: pointer; }
.l3d-tw-btn::after { content: '▾'; float: right; transition: transform .2s; }
.l3d-tower:not(.open) .l3d-tw-btn::after { transform: rotate(-90deg); }
.l3d-tower:not(.open) .l3d-rows { max-height: 0; }
.l3d-rows { max-height: calc(min(72vh, 760px) - 120px); overflow-y: auto; scrollbar-width: thin; transition: max-height .25s ease; }
.l3d-stage:fullscreen .l3d-rows { max-height: calc(100vh - 120px); }
.l3d-row { display: grid; grid-template-columns: 20px 3px 1fr auto 34px; align-items: center; gap: 6px; padding: 3px 8px; font-size: 12.5px; cursor: pointer; border-left: 2px solid transparent; }
.l3d-row:hover { background: rgba(255,255,255,.05); }
.l3d-row .p { color: var(--muted); font-family: var(--num); font-weight: 600; font-size: 14px; text-align: right; }
.l3d-row > i { width: 3px; height: 13px; background: var(--c); border-radius: 1px; }
.l3d-row b { font-weight: 600; letter-spacing: .02em; }
.l3d-row .v { font-size: 11px; color: #c9cdd6; }
.l3d-row.onair { background: rgba(52,120,246,.16); }
.l3d-row.sel { border-left-color: var(--accent); background: rgba(52,120,246,.26); }
.l3d-row.out { opacity: .45; }
.l3d-row .ty { display: flex; align-items: center; justify-content: flex-end; gap: 1px; }
.l3d-row .ty .tyre { width: 15px; height: 15px; border-width: 1.5px; font-size: 8.5px; margin: 0; background: rgba(0,0,0,.35); border-radius: 50%; }
.l3d-row .ty small { font-size: 10px; color: var(--muted); min-width: 13px; text-align: right; font-family: var(--num); }
.l3d-pit { color: #ffd23f; font-weight: 600; }
.l3d-wait { padding: 8px 10px; margin: 0; }
.l3d-lower { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); z-index: 3; pointer-events: none; text-align: center; }
.l3d-lower small { display: inline-block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #dfe6f5; background: rgba(52,120,246,.85); padding: 3px 9px; border-radius: 4px 4px 0 0; }
.l3d-lower div { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; background: rgba(6,9,16,.82); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.l3d-lower .p { font-family: var(--num); font-weight: 700; font-size: 18px; color: var(--muted); }
.l3d-lower i { width: 4px; height: 20px; border-radius: 2px; background: var(--c); }
.l3d-lower b { font-family: var(--num); font-size: 22px; font-weight: 700; font-style: italic; letter-spacing: .02em; }
.l3d-lower .nm { color: #c9cdd6; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.l3d-lower .spd { font-size: 13px; color: #fff; min-width: 70px; text-align: right; }
.l3d-cams { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; display: flex; gap: 2px; background: rgba(0,0,0,.62); padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); max-width: calc(100% - 20px); overflow-x: auto; scrollbar-width: none; }
.l3d-cams button { background: none; border: 0; color: #c9cdd6; font: 500 12.5px var(--font); padding: 7px 11px; border-radius: 4px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.l3d-cams button:hover { color: #fff; }
.l3d-cams button.on { background: var(--accent); color: #fff; }
.l3d-btns { position: absolute; top: 10px; right: 10px; z-index: 6; display: flex; flex-direction: column; gap: 6px; }
.l3d-fs { position: relative; width: 34px; height: 34px; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #dfe3ea; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.l3d-hint { margin-top: -4px; }
.l3d-stage .finish-banner { z-index: 4; }
.l3d-pk-btn { display: none; }
@media (max-width: 700px) {
  .page-live3d { padding-top: 12px; }
  .l3d-shell .live-head { flex-wrap: nowrap; align-items: center; margin-bottom: 8px; gap: 10px; }
  .l3d-shell .live-head > div:first-child { min-width: 0; }
  .l3d-shell .live-head .eyebrow { margin-bottom: 4px; font-size: 11px; }
  .l3d-shell .live-head h1 { font-size: 22px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .l3d-shell #lv-sub { display: none; }
  .l3d-shell .picker { display: none; }
  .l3d-shell.pk-open .live-head { flex-wrap: wrap; }
  .l3d-shell.pk-open .picker { display: flex; }
  .l3d-pk-btn { display: inline-flex; flex: 0 0 auto; }
  .l3d-shell .status-bar { gap: 10px; margin-bottom: 8px; flex-wrap: nowrap; } .l3d-shell .status-bar #wx { display: none; }
  .l3d-shell .lapc { font-size: 17px; white-space: nowrap; }
  .l3d-stage { height: max(300px, calc(100dvh - var(--tabbar) - 205px)); min-height: 300px; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .l3d-tower { width: 150px; top: 8px; left: 8px; }
  .l3d-row { font-size: 12px; padding: 2px 6px; gap: 4px; grid-template-columns: 18px 3px 1fr auto 15px; }
  .l3d-row .ty small { display: none; }
  .l3d-btns { top: 8px; right: 8px; }
  .l3d-right { top: 8px; right: 48px; gap: 6px; }
  .l3d-mini { width: 120px; height: 90px; }
  .l3d-mini .trk { stroke-width: 3.2; }
  .l3d-mini .dot circle { r: 5; } .l3d-mini .dot.lead circle { r: 6; } .l3d-mini .dot.sel circle { r: 7; }
  .l3d-mini .dot text { font-size: 13px; }
  .l3d-sect { width: 150px; padding: 5px; font-size: 11px; }
  .l3d-sect .ss span, .l3d-sect .ll span { font-size: 11px; }
  .l3d-drawer { top: auto; left: 0; width: auto; height: 62%; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); border-radius: 14px 14px 0 0; padding: 42px 10px calc(14px + env(safe-area-inset-bottom)); animation-name: l3dUp; }
  .l3d-stage.drawer-open .l3d-btns { right: 8px; }
  .l3d-stage.drawer-open .l3d-cams, .l3d-stage.drawer-open .l3d-lower { display: none; }
  .l3d-toast { top: auto; bottom: 104px; max-width: calc(100% - 24px); min-width: 0; width: max-content; }
  .l3d-panels { margin: 12px 0 0; }
  .l3d-rows { max-height: max(190px, calc(100dvh - var(--tabbar) - 320px)); }
  .l3d-lower { bottom: 56px; } .l3d-lower .nm { display: none; } .l3d-lower b { font-size: 19px; }
  .l3d-cams { left: 6px; right: 6px; transform: none; justify-content: space-between; bottom: 8px; }
  .l3d-cams button { padding: 7px 5px; font-size: 11px; flex: 1 1 auto; }
}

/* ---------- LapRadar League (#/league) и вход (#/account) ---------- */
.acct { display: flex; color: var(--muted); } .acct:hover { color: #fff; } .acct svg { width: 19px; height: 19px; }
.acct-av, .ac-av { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #cfe0ff; font: 700 12px var(--font); border: 1px solid #23407e; }
.ac-av { width: 52px; height: 52px; font-size: 22px; flex: none; }
.lg-head h1 { margin-bottom: 0; }
.lg-wsel { display: flex; flex-direction: column; gap: 6px; }
.lg-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 20px; }
.lg-top > .card { margin-bottom: 0; }
.lg-status .eyebrow { flex-wrap: wrap; }
.lg-cd { margin: 6px 0 4px; } .lg-cd .cd-cell b { font-size: clamp(38px, 5.4vw, 60px); }
.lg-next { align-self: center; }
.lg-champ { background: linear-gradient(135deg, rgba(217,180,90,.10), transparent 60%), var(--surface); border-color: rgba(217,180,90,.35); }
.lg-champ-row { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.lg-champ-row .crown { width: 40px; height: 40px; color: var(--gold); flex: none; }
.lg-champ-row h3 { font-size: 26px; margin: 2px 0 0; } .lg-ct { font-size: 26px; color: var(--gold); margin-left: 6px; }
.lg-you.me { border-color: #23407e; background: linear-gradient(135deg, rgba(52,120,246,.12), transparent 70%), var(--surface); }
.lg-you-row { display: flex; align-items: center; gap: 16px; }
.lg-yp { font-size: 54px; line-height: .9; color: #fff; min-width: 46px; }
.lg-yt { font-size: 30px; margin: 0; }
.lg-tabs a { display: inline-flex; align-items: center; gap: 5px; }
.lg-tc .crown { width: 13px; height: 13px; color: var(--gold); vertical-align: -1px; }
.lg-tbl tr.me td { background: rgba(52,120,246,.13); } .lg-tbl tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.lg-tbl tr.champ td.pos, .lg-tbl tr.champ .lg-nm { color: var(--gold); }
.lg-tbl tr.bot .lg-nm { color: #aab0bc; }
.lg-tbl tr.gap td { padding: 4px; }
.lg-nm { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.lg-cr .crown { width: 15px; height: 15px; color: var(--gold); }
.lg-t { font-size: 17px; }
.chip.lg-bot { background: #1b2230; color: #9fb4d9; border: 1px solid #2b3446; font-size: 10px; padding: 2px 5px; letter-spacing: .08em; vertical-align: 1px; }
.lg-sl { display: none; }
.lg-note { margin: 14px 0 0; } .lg-rules { margin: 0 2px 24px; max-width: 760px; }
.ac-card { max-width: 640px; }
.ac-who { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; } .ac-who h3 { font-size: 22px; margin: 0 0 2px; }
.ac-provs { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; max-width: 360px; }
.ac-prov { justify-content: center; padding: 12px 18px; font-size: 15px; font-weight: 600; }
.ac-prov.ac-google { background: #fff; color: #1f1f1f; border-color: #fff; } .ac-prov.ac-google:hover { background: #eef1f6; }
.ac-prov.ac-apple { background: #000; color: #fff; border-color: #3a4252; }
.ac-prov.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.ac-nc { margin: -4px 0 4px; text-align: center; }
.ac-form { margin: 0 0 6px; max-width: 360px; }
.ac-ok { color: var(--up); } .ac-err { color: #ff8a80; }
.ac-test { max-width: 640px; border-style: dashed; }
@media (max-width: 860px) {
  .lg-top { grid-template-columns: 1fr; gap: 14px; }
  .lg-sl { display: block; font-size: 12px; margin-top: 2px; }
  .lg-wsel { width: 100%; } .lg-wsel .select { width: 100%; }
}
@media (max-width: 420px) { .hide-xs { display: none; } }
/* Creator: расписание LapRadar League */
#gc-league .gc-wk { grid-template-columns: minmax(0, 1fr) minmax(220px, 360px); }
#gc-league .gc-tr { grid-template-columns: 28px minmax(0, 1fr) auto auto auto auto; }
#gc-league .gc-tr small { display: block; }
.adm-form label.gc-bot { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; color: #c9cdd6; }
.gc-bot small { display: inline !important; }
@media (max-width: 520px) { #gc-league .gc-wk { grid-template-columns: 1fr; } #gc-league .gc-tr { grid-template-columns: 24px minmax(0, 1fr) auto auto auto; } #gc-league .gc-tr .gc-bot { grid-column: 2 / -1; grid-row: 2; } }
.ga-lbl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ga-lbl .chip { flex: none; }
/* LapRadar League: аватары пилотов, конструктор, подиум, серия */
.lg-av { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: var(--surface-2); flex: none; border: 1px solid var(--line-2); }
.lg-av .pod-fig { width: 100%; height: 100%; } .lg-av.bot { opacity: .55; }
.lg-you-row .lg-av { width: 46px; height: 46px; }
.ac-av-fig .lg-av { width: 56px; height: 56px; }
.ac-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 20px; } .ac-grid > .card { margin-bottom: 0; }
.ac-bwrap { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.ac-prev { background: radial-gradient(circle at 50% 35%, #1b2a4a, transparent 70%); border-radius: 12px; } .ac-prev .pod-fig { width: 100%; height: auto; display: block; }
.ac-l { margin: 12px 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.ac-sw { display: flex; flex-wrap: wrap; gap: 7px; }
.ac-sw button { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid var(--line-2); cursor: pointer; padding: 0; }
.ac-sw button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.ac-seg { margin-left: 0; flex-wrap: wrap; }
.ac-num { width: 90px; padding: 6px 10px; text-transform: none; }
.ac-carprev { display: flex; justify-content: center; padding: 10px 0; } .ac-carsvg { width: 140px; height: 140px; }
.lg-pod .ph-step { text-decoration: none; } .lg-pod .ph-step.me .ph-card { border-color: var(--accent); }
.lg-pod.compact .pod-fig { max-height: 150px; }
.lg-home { margin-bottom: 20px; }
.lg-pnote { margin: 10px 0 0; }
.ls-week h3 a:hover { text-decoration: underline; }
.ls-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ls-stat { display: flex; flex-direction: column; gap: 4px; } .ls-stat b { font-size: 30px; }
.ls-bars { display: flex; flex-direction: column; gap: 8px; }
.ls-bar { display: grid; grid-template-columns: 90px 1fr 36px; gap: 10px; align-items: center; } .ls-bar i { display: block; height: 10px; border-radius: 5px; background: var(--accent); min-width: 2px; }
.gc-ban td { opacity: .6; } .gc-test { border-color: #ffb020; }
@media (max-width: 860px) { .ac-grid { grid-template-columns: 1fr; } .ac-bwrap { grid-template-columns: 1fr; } .ac-prev { max-width: 200px; margin: 0 auto; } .ls-stats { grid-template-columns: 1fr 1fr; } }
.lg-fl { font-size: 1.05em; line-height: 1; margin-right: 2px; }
.ac-flag-now { margin: 6px 0 10px; }
.ac-flist { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; margin-top: 10px; }
.ac-flist button { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 6px 10px; font: 13px var(--font); cursor: pointer; }
.ac-flist button.on { border-color: var(--accent); background: rgba(52,120,246,.15); }
.ac-mlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ac-mrow { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.ac-mname { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; } .ac-pwh { margin-top: 16px; }
.ac-pwlogin { margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); max-width: 360px; }
/* вступление LapRadar League — в стиле hero главной */
.lg-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: 8px 0 30px; margin-bottom: 26px; border-bottom: 1px solid var(--line); align-items: end; }
.lg-intro h1 { margin-bottom: 14px; }
.lg-intro-p { color: #aab0bc; font-size: 17px; line-height: 1.5; max-width: 640px; }
.lg-intro-facts { display: flex; flex-wrap: wrap; gap: 6px 10px; color: #d7dae0; font-size: 14px; font-weight: 500; margin: 14px 0 8px; }
.lg-intro-facts i { color: var(--dim); font-style: normal; }
.lg-intro .btn-row { margin-top: 18px; }
.lg-intro-vis { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; max-width: 420px; justify-self: end; width: 100%; border-bottom: 1px solid var(--line-2); }
.lg-intro-vis .pod-fig { max-width: none; filter: drop-shadow(0 12px 24px rgba(0,0,0,.5)); }
.lg-iv1, .lg-iv2 { opacity: .9; transform: scale(.86); transform-origin: bottom center; }
@media (max-width: 860px) {
  .lg-intro { grid-template-columns: 1fr; gap: 12px; padding-bottom: 20px; margin-bottom: 18px; }
  .lg-intro h1 { font-size: 30px; } .lg-intro-p { font-size: 15px; }
  .lg-intro-vis { order: -1; max-width: 220px; justify-self: start; }
  .lg-intro-facts { font-size: 13px; }
}
@media (max-width: 520px) { .lg-intro-vis { display: none; } .lg-intro h1 { font-size: 27px; } }
.lg-testc { border-color: #ffb020; border-style: dashed; }
.gc-tabs { flex-wrap: nowrap; margin-bottom: 18px; }
.gc-star { background: none; border: 0; color: var(--gold); font-size: 16px; cursor: pointer; padding: 0 2px; } .gc-star:not(.on) { color: var(--dim); }
.gc-botrow { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); }
