/* 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-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; }
.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.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; }

/* ---------- главная ---------- */
.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; }
.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; }
.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; }
  .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; }
  .hdr-right .series-chip { display: none; }
}

/* правки 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; }
.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; }
@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); }
/* рекламодателям */
.adv-hero { padding: 10px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 26px; max-width: 860px; }
.adv-hero .sub { color: #aab0bc; font-size: 18px; line-height: 1.5; }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 40px; }
.adv-card { background: var(--surface); padding: 20px; position: relative; }
.adv-card b { display: block; font-size: 17px; margin-bottom: 6px; } .adv-card p { color: #a3a8b2; font-size: 14px; line-height: 1.45; margin: 0; }
.adv-k { position: absolute; top: 14px; right: 14px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.adv-form-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; align-items: start; }
.ftr-link { color: #aab0bc; } .ftr-link:hover { color: #fff; }
@media (max-width: 860px) {
  .adm-grid, .adv-form-wrap, .row2 { grid-template-columns: 1fr; } .adm-list { position: static; } .adv-grid { grid-template-columns: 1fr; }
  .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; }
