/* ============================================================
   ТЕМА: TESLA DARK  · v2026-05-29
   Тёмная EV-приборка. Клон tesla-light, инвертированная палитра.
   Inter, hairlines, плоские поверхности, синий акцент.
   Никаких CRT-эффектов / Press Start 2P / scanlines / glow.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:          #0e0f12;
  --surface:     #17181c;
  --surface-2:   #131419;
  --surface-3:   #23252b;

  --fg:          #f3f4f6;
  --fg-2:        #a6a8b0;
  --fg-3:        #6e7079;
  --fg-4:        #494b54;

  --hairline:    #2a2c33;
  --hairline-2:  #222328;
  --hairline-3:  #1b1c21;

  --accent:      #5b9dff;
  --accent-hov:  #82b4ff;
  --accent-bg:   rgba(91,157,255,.14);

  --dc:          #e0a83a;
  --dc-bg:       rgba(224,168,58,.13);
  --ac:          #38c5e0;
  --ac-bg:       rgba(56,197,224,.13);

  --ok:          #34c759;
  --warn:        #e0a83a;
  --err:         #ff5b4d;

  --r-s:  6px;
  --r:   10px;
  --r-l: 14px;
  --r-xl:20px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;

  --font:     'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-num: 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  --shadow-1:   0 1px 2px rgba(0,0,0,.4);
  --shadow-2:   0 4px 14px rgba(0,0,0,.5);
  --shadow-pop: 0 8px 32px rgba(0,0,0,.6);

  /* compat с arcade-токенами (HTML/JS используют var(--yellow/cyan/green) inline) */
  --green:      var(--accent);
  --green-dim:  var(--fg-2);
  --green-dark: var(--hairline);
  --yellow:     var(--dc);
  --cyan:       var(--ac);
  --red:        var(--err);
  --text:       var(--fg);
  --text-dim:   var(--fg-3);
  --card-bg:    var(--surface);
  --bg-dark:    var(--bg);

  --statusbar-bg: rgba(20,21,26,.82);
  --statusbar-h: 56px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { padding-bottom: 60px; overflow-x: hidden; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hov); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
table { border-collapse: collapse; }

.total-count, .total-pct-value, .op-total-num, .op-chip b,
.countdown-num, .meta-val, .stat-val, .pts, .rank,
td, th, .cur-round-num, .tmr-val, .new-badge,
.forecast-table .num, .standings .td-num, .standings .td-last,
.standings .td-wins, .standings .td-metric,
.loc-total-power, .st-power, .month-btn, .city-btn,
.visit-counter span, #visit-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.container { max-width: 1200px; margin: 0 auto; }
.page-wrap { padding: var(--s-6) var(--s-5); }
@media (max-width: 640px) {
  .page-wrap { padding: var(--s-4) var(--s-3); }
}

/* ===== STATUSBAR ===== */
.statusbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px var(--s-4);
  background: var(--statusbar-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
  min-height: 48px;
}
.burger-btn {
  display: none;
  background: none; border: 0; padding: 6px;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; gap: 4px;
}
.burger-btn span {
  width: 18px; height: 1.5px; background: var(--fg);
  display: block; border-radius: 2px;
  transition: transform .22s, opacity .15s;
}
.burger-btn.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-desktop { display: flex; gap: 2px; flex: 1; }
.nav-link {
  font-size: 13px; font-weight: 500;
  color: var(--fg-2);
  padding: 8px 12px; border-radius: 6px;
  letter-spacing: 0;
  transition: color .15s, background .15s;
}
.nav-link:hover  { color: var(--fg); background: var(--surface-3); }
.nav-link.active { color: var(--fg); background: var(--surface-3); }

.nav-mobile-drop {
  position: fixed; left: 0; right: 0;
  top: var(--statusbar-h, 49px);
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  display: none; flex-direction: column;
  padding: 6px;
  box-shadow: var(--shadow-2);
  z-index: 99;
}
.nav-mobile-drop.open { display: flex; }
.nav-mobile-link {
  font-size: 14px; font-weight: 500;
  color: var(--fg);
  padding: 12px 14px; border-radius: 8px;
}
.nav-mobile-link.active { background: var(--surface-3); }

.theme-seg {
  display: flex; gap: 0;
  background: var(--surface-3);
  border-radius: 8px;
  padding: 2px;
}
.theme-seg-btn {
  font-size: 11px; font-weight: 500;
  color: var(--fg-2);
  background: transparent; border: 0;
  padding: 5px 10px; border-radius: 6px;
  letter-spacing: 0;
  transition: background .15s, color .15s;
}
.theme-seg-btn:hover  { color: var(--fg); }
.theme-seg-btn.active {
  background: var(--surface); color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.fx-toggle {
  display: flex; gap: 0;
  background: var(--surface-3);
  border: 0; border-radius: 8px;
  padding: 2px;
}
.fx-seg {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  padding: 5px 9px; border-radius: 6px;
  letter-spacing: 0;
  transition: background .15s, color .15s;
}
.fx-seg.active {
  background: var(--surface); color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

@media (max-width: 880px) {
  .nav-desktop  { display: none; }
  .burger-btn   { display: flex; }
  .theme-seg-btn{ padding: 5px 8px; font-size: 10px; }
  .fx-toggle    { display: none; }
}

/* ===== HERO ===== */
.hero { text-align: left; padding: var(--s-7) 0 var(--s-4); }
.header-subtitle {
  font-size: 11px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: .8px; text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.hero-title {
  font-family: var(--font);
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 200;
  letter-spacing: -.04em;
  line-height: .95;
  color: var(--fg);
  margin: 0;
}
.cursor { display: none; }
.header-year {
  font-size: 13px; font-weight: 500;
  color: var(--fg-2);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-top: var(--s-2);
}
.header-intro {
  font-size: 15px; line-height: 1.65;
  color: var(--fg-2);
  max-width: 720px;
  margin-top: var(--s-5);
}
.header-intro strong { color: var(--fg); font-weight: 600; }
.highlight { color: var(--accent); font-weight: 600; }

.upd-block {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  padding: var(--s-4) var(--s-5);
  margin: var(--s-5) 0 0;
  max-width: 720px;
}
.upd-block.upd2 { border-left-color: var(--dc); }
.upd-label {
  font-size: 11px; font-weight: 600;
  color: var(--accent);
  letter-spacing: .6px; text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.upd-block.upd2 .upd-label { color: var(--dc); }
.upd-text { font-size: 14px; line-height: 1.6; color: var(--fg); }
.upd-sign { font-size: 11px; color: var(--fg-3); margin-top: var(--s-3); }
.upd-sign span { color: var(--fg-2); font-weight: 500; }

/* ===== COUNTDOWN ===== */
.countdown-title {
  font-size: 11px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin: var(--s-7) 0 var(--s-3);
}
.countdown-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}
.countdown-block {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-4) var(--s-3);
  text-align: center;
}
.countdown-num {
  display: block;
  font-family: var(--font-num);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 300;
  color: var(--fg);
  letter-spacing: -.03em;
  line-height: 1;
}
.countdown-label {
  display: block;
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  margin-top: var(--s-2);
}
.start-point {
  font-size: 11px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: .6px; text-transform: uppercase;
  text-align: center;
  margin: var(--s-4) 0 var(--s-3);
}

/* ===== TOTAL SECTION ===== */
.total-section {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-6);
  margin-bottom: var(--s-7);
}
.total-section-label {
  font-size: 11px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.total-numbers {
  display: flex; align-items: baseline; gap: var(--s-6);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.total-count {
  font-family: var(--font-num);
  font-size: clamp(56px, 10vw, 96px);
  font-weight: 200;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--fg);
}
.total-goal { font-size: 14px; color: var(--fg-3); }
.total-goal span { color: var(--fg-2); font-weight: 500; }
.total-pct-block { margin-left: auto; text-align: right; }
.total-pct-label {
  font-size: 10px; color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
}
.total-pct-value {
  font-family: var(--font-num);
  font-size: 32px; font-weight: 300;
  color: var(--accent);
  letter-spacing: -.02em;
}
.progress-bar-wrap {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-stacked { display: flex; height: 100%; border-radius: 999px; overflow: hidden; }
.stack-seg { height: 100%; transition: width 1s cubic-bezier(.4,.0,.2,1); }
.updated {
  font-size: 11px; color: var(--fg-3);
  letter-spacing: .4px;
  margin-top: var(--s-3);
  text-transform: uppercase;
}

/* ===== OPERATORS GRID ===== */
.operators-title {
  font-size: 11px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: 1.5px; text-transform: uppercase;
  text-align: center;
  margin: var(--s-6) 0 var(--s-4);
}
.operators-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
@media (max-width: 980px) { .operators-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .operators-grid { grid-template-columns: 1fr; } }

.op-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-5);
  display: flex; flex-direction: column;
  gap: var(--s-3);
  transition: border-color .15s;
}
.op-card:hover { border-color: var(--fg-4); }
.op-rank { position: absolute; top: var(--s-4); right: var(--s-4); }
.op-rank .medal { line-height: 0; }

.op-head { display: flex; align-items: center; gap: var(--s-3); min-height: 36px; }
.op-logo { width: 32px; height: 32px; object-fit: contain; }
.op-logo.dark-bg { background: var(--fg); border-radius: 6px; padding: 4px; }
.op-name {
  font-size: 15px; font-weight: 600;
  color: var(--fg);
  letter-spacing: -.01em;
}

.op-total { display: flex; align-items: baseline; gap: var(--s-2); margin-top: var(--s-2); }
.op-total-num {
  font-family: var(--font-num);
  font-size: 64px; font-weight: 200;
  letter-spacing: -.04em;
  line-height: 1;
  text-shadow: none !important;  /* перебиваем inline glow */
}
.op-total-x {
  font-size: 24px; font-weight: 300;
  color: var(--fg-4);
  letter-spacing: -.02em;
}
.op-total-label {
  font-size: 10px; color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  margin-left: auto; padding-bottom: 4px;
}

.op-bar-v2 {
  display: flex; height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: var(--s-2);
}
.op-bar-v2 .seg-dc { height: 100%; opacity: 1;   transition: width 1s cubic-bezier(.4,.0,.2,1); }
.op-bar-v2 .seg-ac { height: 100%; opacity: .42; transition: width 1s cubic-bezier(.4,.0,.2,1); }

.op-split { display: flex; gap: var(--s-2); margin-top: var(--s-1); }
.op-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--surface-3);
  color: var(--fg-2);
}
.op-chip b { color: var(--fg); font-weight: 600; }
.op-chip::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 999px; display: inline-block;
}
.op-chip.chip-dc::before { background: var(--dc); }
.op-chip.chip-ac::before { background: var(--ac); }
.op-chip.dim { opacity: .5; }

.op-meta {
  font-size: 11px; color: var(--fg-3);
  margin-top: var(--s-2);
  letter-spacing: .2px;
}
.op-card.debut .op-rank { opacity: .35; }
.op-debut {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s-1);
  font-size: 13px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: .4px; text-transform: uppercase;
  padding: var(--s-3) 0;
  line-height: 1.4;
}
.op-debut .zzz { font-size: 22px; margin-right: var(--s-1); }

.medal { display: inline-block; }
.medal svg { display: block; }

/* ===== RACE ===== */
.race-section { margin: var(--s-7) 0; }
.race-title-label {
  font-size: 11px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: 1.5px; text-transform: uppercase;
  text-align: center;
  margin-bottom: var(--s-3);
}
.race-block {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-3);
}
.race-canvas {
  width: 100%; display: block;
  border-radius: var(--r);
  background: var(--surface-2);
}
.race-foot {
  font-size: 10px; color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  text-align: center;
  margin-top: var(--s-3);
}

/* ===== VOTE ===== */
.vote-section {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-6);
  margin: var(--s-6) 0;
}
.vote-section-label {
  font-size: 11px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.vote-question {
  font-size: 17px; font-weight: 500;
  color: var(--fg);
  margin-bottom: var(--s-4);
  line-height: 1.4;
}
.vote-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.vote-btn {
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-3) var(--s-4);
  font-size: 14px; font-weight: 500;
  color: var(--fg);
  transition: border-color .15s, background .15s;
}
.vote-btn:hover { border-color: var(--fg-4); background: var(--surface-2); }
.vote-btn.selected { border-color: var(--accent); background: var(--accent-bg); }
.vote-btn img { width: 22px; height: 22px; object-fit: contain; }
.vote-btn:disabled { opacity: .5; cursor: default; }

.vote-submit {
  width: 100%;
  background: var(--accent); color: #fff;
  border: 0; border-radius: var(--r);
  padding: 14px 20px;
  font-size: 14px; font-weight: 600;
  letter-spacing: .4px;
  transition: background .15s;
}
.vote-submit:hover:not(:disabled) { background: var(--accent-hov); }
.vote-submit:disabled { background: var(--surface-3); color: var(--fg-4); cursor: not-allowed; }

.vote-results { display: none; margin-top: var(--s-4); }
.vote-message { font-size: 16px; font-weight: 600; color: var(--fg); margin-bottom: var(--s-3); }
.vote-result-item { margin-bottom: var(--s-3); }
.vote-result-top {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 4px;
}
.vote-result-top .rname { color: var(--fg-2); font-weight: 500; }
.vote-result-top .rpct  { color: var(--fg-2); font-weight: 600; }
.vote-result-bar-wrap {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px; overflow: hidden;
}
.vote-result-bar {
  height: 100%;
  background: var(--fg-4);
  border-radius: 999px;
  transition: width .9s cubic-bezier(.4,.0,.2,1);
}
.vote-result-bar.mine { background: var(--accent); }
.vote-total-players {
  font-size: 12px; color: var(--fg-3);
  letter-spacing: .4px;
  text-align: center;
  margin-top: var(--s-4);
}

/* ===== BIG PHRASE ===== */
.big-phrase {
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 200;
  color: var(--fg);
  letter-spacing: -.02em;
  text-align: center;
  margin: var(--s-7) 0;
  line-height: 1.2;
}

/* ===== AUTHOR ===== */
.author-section {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-6);
  margin: var(--s-6) 0;
  display: flex; flex-direction: column; gap: var(--s-3);
}
.author-about-btn, .author-chat-btn,
.author-link-btn, .author-contact-btn {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-3) var(--s-4);
  font-size: 13px; font-weight: 500;
  color: var(--fg);
  transition: background .15s, border-color .15s;
}
.author-about-btn:hover, .author-chat-btn:hover,
.author-link-btn:hover, .author-contact-btn:hover {
  background: var(--surface-3); border-color: var(--fg-4);
}
.author-chat-btn { flex-direction: column; gap: 4px; padding: var(--s-4); }
.chat-sub { font-size: 11px; color: var(--fg-3); font-weight: 400; }
.section-label {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-top: var(--s-3);
}
.author-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.author-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
@media (max-width: 480px) { .author-contacts { grid-template-columns: 1fr; } }

/* ===== VISIT / FOOTER ===== */
.visit-counter {
  font-size: 11px; color: var(--fg-3);
  letter-spacing: .6px;
  text-align: center;
  margin: var(--s-5) 0 var(--s-3);
  text-transform: uppercase;
}
.visit-counter span { color: var(--fg-2); font-weight: 500; }

.theme-footer-switch {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  margin: var(--s-4) 0;
}
.theme-foot-lbl {
  font-size: 11px; color: var(--fg-3);
  letter-spacing: .6px; text-transform: uppercase;
  margin-right: 4px;
}
.theme-foot-btn {
  width: 32px; height: 32px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 14px; color: var(--fg-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.theme-foot-btn:hover { border-color: var(--fg-4); }
.theme-foot-btn.active {
  background: var(--fg); color: var(--surface);
  border-color: var(--fg);
}

.footer {
  text-align: center;
  padding: var(--s-6) var(--s-3);
  border-top: 1px solid var(--hairline);
  margin-top: var(--s-6);
}
.footer-disclaimer {
  font-size: 11px; line-height: 1.7;
  color: var(--fg-3);
  margin-bottom: var(--s-3);
}
.footer-copy {
  font-size: 10px; color: var(--fg-4);
  letter-spacing: .6px; text-transform: uppercase;
}

/* ===== COOKIE ===== */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-3) var(--s-4);
  display: flex; align-items: center; gap: var(--s-3);
  box-shadow: var(--shadow-pop);
  z-index: 200;
  max-width: 480px; margin: 0 auto;
}
.cookie-text { font-size: 12px; color: var(--fg-2); flex: 1; }
.cookie-btn {
  background: var(--accent); color: #fff;
  border: 0; border-radius: var(--r-s);
  padding: 8px 14px;
  font-size: 12px; font-weight: 600;
}


/* ============================================================
   TOUR.HTML — мета, текущий круг, рейтинги, прогноз, сетка
   ============================================================ */

.meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
  margin: var(--s-5) 0 var(--s-6);
}
.meta-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-3) var(--s-4);
}
.meta-label {
  font-size: 10px; color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 4px;
}
.meta-val {
  font-family: var(--font-num);
  font-size: clamp(15px, 3.4vw, 22px); font-weight: 300;
  color: var(--fg);
  letter-spacing: -.02em;
  line-height: 1.2;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .meta-row { grid-template-columns: repeat(2, 1fr); }
}

.section-head {
  font-size: 13px; font-weight: 600;
  color: var(--fg);
  letter-spacing: .4px;
  margin: var(--s-7) 0 var(--s-3);
  display: flex; align-items: baseline; gap: var(--s-2);
  flex-wrap: wrap;
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--hairline);
  text-transform: uppercase;
}
.section-sub {
  font-size: 11px; font-weight: 400;
  color: var(--fg-3);
  letter-spacing: 0;
  text-transform: none;
}

.loading {
  font-size: 13px; color: var(--fg-3);
  letter-spacing: .4px;
  text-align: center;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
}

/* ===== Текущий круг ===== */
.cur-round {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-l) var(--r-l) 0;
  padding: var(--s-5);
}
.cur-round-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.cur-round-num {
  font-family: var(--font-num);
  font-size: 22px; font-weight: 500;
  color: var(--fg);
  letter-spacing: -.01em;
}
.cur-round-timer {
  font-size: 12px; color: var(--fg-3);
  margin-top: 4px;
}
.tmr-lbl { letter-spacing: .4px; text-transform: uppercase; font-size: 10px; }
.tmr-val { color: var(--fg); font-weight: 500; }
.cur-round-dates {
  font-size: 12px; color: var(--fg-3);
  text-align: right;
  letter-spacing: .4px;
}
.cur-round-dates span {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: var(--accent-bg);
  color: var(--accent) !important;
  border-radius: 999px;
  font-size: 10px !important;
  font-weight: 600;
  letter-spacing: .6px; text-transform: uppercase;
}

.cur-round-table { width: 100%; font-size: 13px; }
.cur-round-table th {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.cur-round-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--hairline-2);
  color: var(--fg);
  font-family: var(--font) !important;
  font-size: 13px !important;
  vertical-align: middle;
}
.cur-round-table td:nth-child(2) { white-space: nowrap; }
.cur-round-table tr:last-child td { border-bottom: 0; }

.cur-no-data {
  font-size: 13px; color: var(--fg-3);
  text-align: center; padding: var(--s-5);
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: 1px;
  flex-shrink: 0;
}

.cr-split {
  display: inline-flex; gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.cr-pill {
  font-size: 10px; font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: .3px;
  font-family: var(--font) !important;
}
.cr-pill.dc { background: var(--dc-bg); color: var(--dc); }
.cr-pill.ac { background: var(--ac-bg); color: var(--ac); }

/* ===== Forecast ===== */
.forecast-section {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-5);
}
.forecast-hint {
  font-size: 12px; color: var(--fg-3);
  line-height: 1.5;
  margin-bottom: var(--s-3);
}
.forecast-table { width: 100%; font-size: 13px; }
.forecast-table th {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 10px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}
.forecast-table th.num { text-align: right; }
.forecast-table td {
  padding: 10px;
  border-bottom: 1px solid var(--hairline-2);
  color: var(--fg);
}
.forecast-table tr:last-child td { border-bottom: 0; }
.forecast-table td.op { font-weight: 500; }
.forecast-table td.num { text-align: right; }
.forecast-table td.tempo { color: var(--fg-2); font-weight: 500; }
.forecast-table td.forecast strong {
  font-size: 18px; font-weight: 500; color: var(--fg);
  font-family: var(--font-num);
}
.forecast-tilde { color: var(--fg-4); font-weight: 300; }
.forecast-table .unit {
  font-size: 11px; color: var(--fg-3);
  font-weight: 400;
  margin-left: 4px;
}
.forecast-note {
  font-size: 12px; color: var(--fg-2);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline);
  line-height: 1.5;
}

/* ===== Standings ===== */
.standings-wrap { /* без горизонтального скролла — таблица ужимается */ }
.standings {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  overflow: hidden;
  font-size: 13px;
}
.standings th {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  text-align: left;
  white-space: nowrap;
}
.standings th.th-num, .standings th.th-last { text-align: right; }
.standings th.th-pts {
  background: var(--dc-bg);
  color: var(--dc);
  font-weight: 600;
}
.standings td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline-2);
  color: var(--fg);
  vertical-align: middle;
}
.standings tr:last-child td { border-bottom: 0; }
.standings .rank {
  font-family: var(--font-num);
  font-size: 14px; font-weight: 500;
  color: var(--fg-3);
}
.standings .rank.r1 { color: var(--dc); font-weight: 700; }
.standings .rank.r2 { color: var(--fg-2); font-weight: 600; }
.standings .rank.r3 { color: #c9853f; font-weight: 600; }
.standings .td-num { text-align: right; }
.standings .td-pts {
  background: var(--dc-bg);
  text-align: right;
}
.standings .td-pts .pts {
  font-family: var(--font-num);
  font-size: 18px; font-weight: 600;
  color: var(--dc);
}
.standings .td-wins { color: var(--fg-2); }
.standings .td-last { text-align: right; }
.standings .td-metric { font-weight: 500; }
.standings .td-metric.stations { color: var(--accent); }
.standings .td-metric.power    { color: var(--dc); }
.standings .td-metric .unit {
  font-size: 11px; color: var(--fg-3);
  font-weight: 400;
  margin-left: 4px;
}

/* streak badges */
.streak-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  vertical-align: middle;
}
.streak-badge.hot   { background: rgba(216, 71, 56,.10); color: var(--err); }
.streak-badge.cold  { background: rgba(3,146,179,.10);   color: var(--ac); }
.streak-badge.sleep { background: var(--surface-3);       color: var(--fg-3); }
.streak-badge .n { font-weight: 700; }

/* ===== Rounds grid (победители) ===== */
.rounds-legend {
  font-size: 11px; color: var(--fg-3);
  letter-spacing: .2px;
  margin: var(--s-2) 0 var(--s-3);
}
.rounds-legend .lg-item b { color: var(--fg-2); font-weight: 600; }
.rounds-legend .lg-sep { color: var(--fg-4); margin: 0 6px; }

.rounds-grid-wrap { position: relative; }
.rounds-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-2);
}
@media (max-width: 480px) {
  .rounds-grid { grid-template-columns: repeat(3, 1fr); }
}
.rounds-grid-fade {
  display: none;
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.rounds-grid-wrap:not(.expanded) .rounds-grid-fade { display: block; }

.round-cell {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 10px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 76px;
  font-size: 11px;
}
.round-cell.active {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.round-cell .r-num {
  font-size: 10px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: .8px; text-transform: uppercase;
}
.round-cell.active .r-num { color: var(--accent); }
.round-cell .r-win {
  font-size: 12px; color: var(--fg);
  line-height: 1.3;
}
.round-cell .r-live {
  font-weight: 500;
}
.round-cell .r-idet {
  font-size: 9px; font-weight: 700;
  color: var(--accent);
  letter-spacing: .8px; text-transform: uppercase;
  margin-top: auto;
}
.round-cell .r-empty {
  color: var(--fg-4);
  font-size: 11px;
  font-style: italic;
}
.round-cell .r-date {
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: .2px;
  margin-top: auto;
}

.rounds-toggle-btn, .hist-toggle-btn {
  display: block;
  margin: var(--s-3) auto 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--fg-2);
  border-radius: var(--r);
  padding: 8px 16px;
  font-size: 12px; font-weight: 500;
  letter-spacing: .4px;
  transition: background .15s, border-color .15s, color .15s;
}
.rounds-toggle-btn:hover, .hist-toggle-btn:hover {
  background: var(--surface-3); border-color: var(--fg-4); color: var(--fg);
}

/* ===== History ===== */
.hist-grid-wrap { position: relative; }
.hist-wrap {
  display: flex; flex-direction: column;
  gap: var(--s-2);
}
.hist-grid-fade {
  display: none;
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hist-grid-wrap:not(.expanded) .hist-grid-fade { display: block; }

.hist-row {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-3) var(--s-4);
  display: flex; gap: var(--s-4);
  align-items: flex-start;
  flex-wrap: wrap;
}
.hist-meta { min-width: 120px; }
.hist-round {
  font-size: 13px; font-weight: 600;
  color: var(--fg);
}
.hist-dates {
  font-size: 11px; color: var(--fg-3);
  margin-top: 2px;
}
.hist-ops { flex: 1; font-size: 12px; line-height: 1.6; }
.hist-op { display: inline-flex; align-items: center; }
.hist-op .sep, .hist-ops .sep { color: var(--fg-4); margin: 0 4px; }

/* ===== Rules ===== */
.rules-title {
  font-size: 11px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: 1.5px; text-transform: uppercase;
  text-align: center;
  margin: var(--s-6) 0 var(--s-3);
}
.rules-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
@media (max-width: 640px) {
  .rules-section { grid-template-columns: 1fr; }
}
.rule-block {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-4);
}
.rule-h {
  font-size: 11px; font-weight: 600;
  color: var(--accent);
  letter-spacing: .6px; text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.rule-t {
  font-size: 13px; line-height: 1.6;
  color: var(--fg-2);
}
.rule-t span { color: var(--fg); font-weight: 500; }
.rule-note {
  font-size: 11px; color: var(--fg-3);
  font-style: italic;
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px dashed var(--hairline);
  line-height: 1.5;
}
.pts-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0;
  font-size: 12px; color: var(--fg-2);
}
.pts-row + .pts-row { border-top: 1px solid var(--hairline-3); }
.pts-row .pts-v { font-weight: 600; color: var(--fg); }


/* ============================================================
   STATIONS.HTML — статистика, фильтры, таблица, мобильные карточки
   ============================================================ */

/* ===== Stats row ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-2);
  margin: var(--s-5) 0 var(--s-4);
}
@media (max-width: 880px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-3);
  text-align: left;
}
.stat-label {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: .8px; text-transform: uppercase;
  margin-bottom: 4px;
}
.stat-val-unit { color: var(--fg-4); font-weight: 400; }
.stat-val {
  font-family: var(--font-num);
  font-size: 22px; font-weight: 300;
  color: var(--fg);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.stat-val--compound { font-size: 18px; }

/* ===== Фильтры (НЕ sticky — прокручиваются вместе со страницей, как в аркаде) ===== */
.filters-sticky {
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  margin: 0 calc(-1 * var(--s-5)) var(--s-4);
  padding: var(--s-3) var(--s-5);
}
@media (max-width: 640px) {
  .filters-sticky { margin: 0 calc(-1 * var(--s-3)) var(--s-4); padding: var(--s-3); }
}
.filters-wrap { display: flex; flex-direction: column; gap: var(--s-2); }
.filter-row {
  display: flex; align-items: center; gap: var(--s-2);
  flex-wrap: wrap;
}
.filter-label {
  font-size: 10px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: .8px; text-transform: uppercase;
  min-width: 64px;
}

/* месяцы / города как тонкие пилюли */
.month-filters, .op-filters, .city-filters {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.month-btn, .city-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px; font-weight: 500;
  color: var(--fg-2);
  letter-spacing: .2px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.month-btn:hover, .city-btn:hover {
  border-color: var(--fg-4); color: var(--fg);
}
.month-btn.on, .city-btn.on {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--surface);
}
/* месяцы — лёгкий «нагрев» через CSS var --heat, оставляем как тонкий бг */
.month-btn:not(.on) {
  background: color-mix(in srgb, var(--surface) calc(100% - var(--heat,0) * 18%), var(--accent-bg) calc(var(--heat,0) * 18%));
}

/* операторы — пилюля с цветной точкой; цвет идёт из --c */
.op-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 11px 4px 9px;
  font-size: 11px; font-weight: 500;
  color: var(--fg-2);
  letter-spacing: .2px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.op-filter-btn::before {
  content: ''; width: 8px; height: 8px;
  border-radius: 999px;
  display: inline-block;
  background: var(--c, var(--fg-4));
}
.op-filter-btn:hover { border-color: var(--fg-4); color: var(--fg); }
.op-filter-btn.on {
  background: var(--surface-3);
  border-color: var(--fg);
  color: var(--fg);
}
.op-filter-btn.op-bf { --c: #005EEB; }
.op-filter-btn.op-fo { --c: #b44fff; }
.op-filter-btn.op-za { --c: #00cfff; }
.op-filter-btn.op-uc { --c: #F5821F; }
.op-filter-btn.op-cs { --c: #FF6B6B; }
.op-filter-btn.op-ma { --c: #00aa55; }
.op-filter-btn.op-ev { --c: #7c3aed; }
.op-filter-btn.op-or { --c: #ff8c00; }
.op-filter-btn.op-pr { --c: #ec4899; }

.reset-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--err);
  color: var(--err);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  margin-left: auto;
}
.reset-btn:hover { background: rgba(216,71,56,.06); }
.reset-btn.visible { display: inline-flex; align-items: center; gap: 4px; }
.reset-count { font-variant-numeric: tabular-nums; opacity: .8; }

/* поиск */
.search-wrap {
  display: flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-2);
}
.search-input-wrap {
  position: relative; flex: 1; max-width: 480px;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 8px 30px 8px 12px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--fg);
  letter-spacing: .2px;
  transition: border-color .15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,157,255,.22);
}
.search-input::placeholder { color: var(--fg-3); }
.search-clear {
  display: none;
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px;
  background: var(--surface-3);
  border-radius: 999px;
  color: var(--fg-2);
  font-size: 11px;
  align-items: center; justify-content: center;
  cursor: pointer;
}

/* ===== Section head + view toggle ===== */
.section-head-stations {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: var(--s-2);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s-2);
}
.view-toggle {
  display: flex;
  background: var(--surface-3);
  border-radius: 8px;
  padding: 2px;
}
.view-toggle-btn {
  background: transparent;
  border: 0;
  padding: 5px 11px;
  font-size: 11px; font-weight: 500;
  color: var(--fg-2);
  border-radius: 6px;
  letter-spacing: .3px;
}
.view-toggle-btn.active {
  background: var(--surface); color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* ===== Реестр (таблица) ===== */
.table-wrap { overflow-x: auto; }
.reg {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  overflow: hidden;
  font-size: 13px;
}
.reg th {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  text-align: left;
  white-space: nowrap;
}
.reg th.center { text-align: center; }
.reg th.right  { text-align: right; }
.reg th.sortable { cursor: pointer; user-select: none; }
.reg th.sortable:hover { color: var(--fg); }
.reg th.sortable.sort-asc::after  { content: ' ↑'; color: var(--accent); }
.reg th.sortable.sort-desc::after { content: ' ↓'; color: var(--accent); }
.reg td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline-2);
  color: var(--fg);
  vertical-align: middle;
}
.reg td.center { text-align: center; }
.reg td.right  { text-align: right; }
.reg td.city   { color: var(--fg); font-weight: 500; }
.reg td.addr   { color: var(--fg-2); }
.reg td.power  { color: var(--fg); font-weight: 500; }
.reg td.date   { color: var(--fg-2); font-size: 12px; }
.reg tr:last-child td { border-bottom: 0; }
.reg .loading {
  border: 0; background: transparent;
  color: var(--fg-3);
}

.loc-name {
  display: block;
  font-weight: 600; color: var(--fg);
  font-size: 13px;
}
.loc-address {
  display: block;
  color: var(--fg-3);
  font-size: 11px;
  margin-top: 2px;
}

/* ===== Бэйджи операторов (плашки в реестре) ===== */
.op-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  letter-spacing: .2px;
  white-space: nowrap;
}
.op-badge::before {
  content: ''; width: 7px; height: 7px;
  border-radius: 999px;
  display: inline-block;
  background: var(--c, var(--fg-4));
}
.op-badge.op-bf { --c: #005EEB; }
.op-badge.op-fo { --c: #b44fff; }
.op-badge.op-za { --c: #00cfff; }
.op-badge.op-uc { --c: #F5821F; }
.op-badge.op-cs { --c: #FF6B6B; }
.op-badge.op-ma { --c: #00aa55; }
.op-badge.op-ev { --c: #7c3aed; }
.op-badge.op-or { --c: #ff8c00; }
.op-badge.op-pr { --c: #ec4899; }
.op-badge.op-other {
  --c: var(--fg-4);
  color: var(--fg-2);
  background: var(--surface-2);
  border-color: var(--hairline-2);
}

.op-cell { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.op-via {
  font-size: 10px; color: var(--fg-3);
  letter-spacing: .2px;
  padding-left: 17px;  /* выравниваем под точку */
}

/* ===== Type badges ===== */
.badge-dc, .badge-ac, .badge-acdc {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px; font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.badge-dc   { background: var(--dc-bg); color: var(--dc); }
.badge-ac   { background: var(--ac-bg); color: var(--ac); }
.badge-acdc {
  background: linear-gradient(90deg, var(--dc-bg) 50%, var(--ac-bg) 50%);
  color: var(--fg);
}

/* ===== Пистолеты ===== */
.gun-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 10px; font-weight: 500;
  color: var(--fg-2);
  letter-spacing: .2px;
}
.gun-dot {
  width: 5px; height: 5px;
  border-radius: 999px;
  background: var(--accent);
}
.no-gun, .st-no-gun {
  color: var(--fg-4);
  font-size: 11px;
}

/* NEW badge / NEW flash */
.new-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 9px; font-weight: 700;
  letter-spacing: .6px;
  vertical-align: 1px;
}
@keyframes tl-new-flash {
  0%   { background: rgba(26,115,232,.18); }
  100% { background: transparent; }
}
.new-flash { animation: tl-new-flash 2s ease-out 1; }

/* Rating slot — placeholder */
.loc-rating {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  gap: 1px;
}
.loc-rating-stars { color: var(--fg-4); font-size: 11px; letter-spacing: 1px; }
.loc-rating-soon {
  font-size: 9px; font-weight: 600;
  color: var(--fg-3);
  letter-spacing: .6px; text-transform: uppercase;
}

/* ===== Mobile cards ===== */
.cards-wrap {
  display: none;
  flex-direction: column;
  gap: var(--s-3);
}
@media (max-width: 640px) {
  .table-wrap { display: none; }
  .cards-wrap { display: flex; }
}
.loc-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.loc-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--s-3);
}
.loc-head-left { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.loc-head-right { text-align: right; }
.loc-city {
  font-size: 12px; font-weight: 600;
  color: var(--fg);
  letter-spacing: .2px;
  margin-top: 2px;
}
.loc-card .loc-name {
  font-size: 14px; font-weight: 600;
  color: var(--fg);
}
.loc-card .loc-addr {
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.4;
}
.loc-total-power {
  font-family: var(--font-num);
  font-size: 20px; font-weight: 300;
  color: var(--fg);
  letter-spacing: -.02em;
  line-height: 1;
}
.loc-total-label {
  font-size: 10px; color: var(--fg-3);
  letter-spacing: .8px; text-transform: uppercase;
  margin-top: 2px;
}
.station-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s-2) 0;
  border-top: 1px solid var(--hairline-2);
}
.station-row .st-left {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.st-guns {
  display: flex; gap: 4px;
  flex-wrap: wrap;
}
.st-power {
  font-family: var(--font-num);
  font-size: 13px; font-weight: 500;
  color: var(--fg);
}
.loc-footer {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-top: var(--s-2);
  border-top: 1px solid var(--hairline-2);
  font-size: 11px;
  color: var(--fg-3);
}
.loc-footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.loc-page-btn {
  display: inline-block; padding: 5px 10px; font-family: var(--font-ui); font-size: 10px;
  font-weight: 500; text-decoration: none; border: 1px solid var(--hairline); border-radius: var(--r);
  background: transparent; white-space: nowrap;
}
.loc-page-btn:hover { background: var(--surface-2); }
.loc-date { color: var(--fg-2); font-weight: 500; }
.loc-card .loc-rating { align-self: flex-start; margin-top: var(--s-2); }

/* LOCATION PAGE — Infrastructure Platform (Stage 2.2) */
.location-page .page-wrap { padding-bottom: var(--s-4); }
.loc-breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--fg-3); margin-bottom: var(--s-3); }
.loc-breadcrumbs a { color: var(--fg); text-decoration: none; font-weight: 500; }
.location-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); padding: var(--s-3); margin-bottom: var(--s-3); }
.loc-identity { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
@media (min-width: 720px) { .loc-identity { grid-template-columns: 1fr 280px; } }
.loc-identity-title { font-size: 22px; font-weight: 600; margin: 0 0 var(--s-2); color: var(--fg); }
.loc-identity-addr { font-size: 14px; color: var(--fg-2); margin: 0 0 var(--s-2); }
.loc-agg-line { font-size: 13px; color: var(--accent); margin-bottom: var(--s-2); }
.loc-single-tech { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--fg-2); margin-bottom: var(--s-2); }
.loc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-2); }
.loc-btn { font-size: 13px; font-weight: 500; padding: 10px 16px; border: 1px solid var(--hairline); border-radius: var(--r); background: var(--surface-2); color: var(--fg); text-decoration: none; cursor: pointer; }
.loc-btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.loc-map-embed { width: 100%; height: 220px; border: 1px solid var(--hairline); border-radius: var(--r); }
.location-rating-big { font-size: 24px; font-weight: 600; color: var(--fg); }
.location-rating-count { font-size: 13px; color: var(--fg-3); margin-left: 8px; }
.loc-section-title { font-size: 16px; font-weight: 600; margin: 0 0 var(--s-3); color: var(--fg); }
.stations-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); margin-bottom: var(--s-3); }
@media (min-width: 520px) { .stations-summary { grid-template-columns: repeat(5, 1fr); } }
.stations-summary-cell { text-align: center; padding: var(--s-2); border: 1px solid var(--hairline); border-radius: var(--r); }
.stations-summary-cell .ss-val { display: block; font-size: 18px; font-weight: 600; color: var(--fg); }
.stations-summary-cell .ss-lbl { display: block; font-size: 11px; color: var(--fg-3); margin-top: 4px; }
.loc-table-wrap { overflow-x: auto; }
.loc-st-agg { display: block; font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.loc-nearby-list { display: flex; flex-direction: column; gap: var(--s-2); }
.loc-nearby-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: var(--s-2); border: 1px solid var(--hairline); border-radius: var(--r); text-decoration: none; color: inherit; }
.loc-nearby-item:hover { border-color: var(--fg-4); background: var(--surface-2); }
.loc-nearby-title { flex: 1; min-width: 0; font-size: 13px; color: var(--fg-2); }
.loc-nearby-dist { font-size: 12px; color: var(--fg-3); }
.loc-nearby-empty, .loc-soon-text { font-size: 14px; color: var(--fg-2); margin: 0; }

/* ===== Load more ===== */
.load-more-btn, .show-all-btn {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--fg);
  border-radius: var(--r);
  padding: var(--s-3);
  font-size: 13px; font-weight: 500;
  letter-spacing: .3px;
  margin-top: var(--s-3);
  transition: background .15s, border-color .15s;
}
.load-more-btn:hover, .show-all-btn:hover {
  background: var(--surface-3); border-color: var(--fg-4);
}
.lm-rem { color: var(--fg-3); font-weight: 400; font-size: 11px; margin-left: 6px; }


/* ============================================================
   LETTERS.HTML — обращения, фильтры, модалка
   ============================================================ */

.let-hero-terminal {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .4px;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  margin-bottom: var(--s-4);
  display: inline-block;
}
.let-hero-copy {
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-2);
  max-width: 640px;
  margin-bottom: var(--s-5);
}
.let-hero-copy-accent { color: var(--accent); font-weight: 600; }

.let-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
@media (max-width: 480px) { .let-stats { grid-template-columns: 1fr; } }

.write-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  background: var(--accent); color: #fff;
  border: 0; border-radius: var(--r);
  padding: 16px 20px;
  font-size: 15px; font-weight: 600;
  letter-spacing: .4px;
  margin: var(--s-4) 0;
  transition: background .15s;
}
.write-btn:hover { background: var(--accent-hov); }

/* ===== Рейтинг отзывчивости ===== */
.let-rating-block {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: var(--s-4);
}
.let-rating-none {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.6;
  letter-spacing: .2px;
  text-align: center;
  padding: var(--s-3) 0;
}
.let-rating-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--hairline-2);
}
.let-rating-row:last-child { border-bottom: 0; }
.let-rating-row .lr-rank {
  font-family: var(--font-num);
  font-size: 14px; font-weight: 600;
  color: var(--fg-3);
  min-width: 24px;
}
.let-rating-row .lr-op { flex: 1; font-weight: 500; color: var(--fg); }
.let-rating-row .lr-stat {
  font-size: 12px; color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}

/* ===== Фильтры (общие .filters-wrap уже есть; добавки) ===== */
.op-filter-all, .op-filter-yellow, .op-filter-warn, .op-filter-replied {
  font-weight: 600;
}
.op-filter-all { --c: var(--fg); }
.op-filter-all.on { background: var(--fg); border-color: var(--fg); color: var(--surface); }

.op-filter-yellow { --c: var(--dc); color: var(--dc); border-color: rgba(184,134,11,.3); }
.op-filter-yellow.on { background: var(--dc); border-color: var(--dc); color: #fff; }

.op-filter-warn { --c: var(--warn); color: var(--warn); border-color: rgba(201,122,0,.3); }
.op-filter-warn.on { background: var(--warn); border-color: var(--warn); color: #fff; }

.op-filter-replied { --c: var(--ac); color: var(--ac); border-color: rgba(3,146,179,.3); }
.op-filter-replied.on { background: var(--ac); border-color: var(--ac); color: #fff; }

.tag-count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 10px; font-weight: 600;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}

/* ===== Карточка письма ===== */
.letter-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-3);
}
.letter-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  flex-wrap: wrap;
}
.letter-from {
  font-size: 12px; color: var(--fg-2);
  font-weight: 500;
}
.letter-from b { color: var(--fg); font-weight: 600; }
.letter-to {
  font-size: 11px; color: var(--fg-3);
  letter-spacing: .2px;
  margin-top: 2px;
}
.letter-date {
  font-size: 11px; color: var(--fg-3);
  letter-spacing: .4px;
  text-align: right;
}
.letter-body {
  font-size: 14px; line-height: 1.65;
  color: var(--fg);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.letter-tags {
  display: flex; gap: 4px;
  flex-wrap: wrap;
  margin-top: var(--s-3);
}
.letter-tag {
  display: inline-block;
  padding: 2px 9px;
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 11px; color: var(--fg-2);
  letter-spacing: .2px;
}
.letter-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline-2);
  flex-wrap: wrap; gap: var(--s-2);
}
.letter-want-reply, .let-responded {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .2px;
}
.letter-want-reply { background: rgba(201,122,0,.10); color: var(--warn); }
.let-responded     { background: rgba(3,146,179,.10); color: var(--ac); }

.letter-reply {
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--ac-bg);
  border-left: 3px solid var(--ac);
  border-radius: 0 var(--r) var(--r) 0;
}
.letter-reply-head {
  font-size: 11px; font-weight: 600;
  color: var(--ac);
  letter-spacing: .4px; text-transform: uppercase;
  margin-bottom: 6px;
}
.letter-reply-body {
  font-size: 13px; line-height: 1.6;
  color: var(--fg);
}

.show-more-btn {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--fg);
  border-radius: var(--r);
  padding: var(--s-3);
  font-size: 13px; font-weight: 500;
  letter-spacing: .3px;
  margin-top: var(--s-3);
  transition: background .15s, border-color .15s;
}
.show-more-btn:hover { background: var(--surface-3); border-color: var(--fg-4); }

/* ===== "Как это работает" ===== */
.how-block {
  display: flex; flex-direction: column;
  gap: var(--s-2);
  margin: var(--s-3) 0 var(--s-5);
}
.how-line {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  padding: var(--s-3) var(--s-4);
  font-size: 13px;
  color: var(--fg);
  line-height: 1.5;
}

/* ============================================================
   МОДАЛКА (форма письма)
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: var(--s-5) var(--s-4);
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: var(--s-5);
  width: 100%; max-width: 560px;
  box-shadow: var(--shadow-pop);
  margin: auto;
  display: flex; flex-direction: column; gap: var(--s-4);
}
.modal-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; font-weight: 600;
  color: var(--fg);
  letter-spacing: .4px;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--hairline);
}
.modal-close {
  background: var(--surface-3);
  border: 0;
  width: 28px; height: 28px;
  border-radius: 999px;
  font-size: 14px; color: var(--fg-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--fg); color: var(--surface); }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-lbl {
  font-size: 11px; font-weight: 600;
  color: var(--fg);
  letter-spacing: .4px; text-transform: uppercase;
}
.form-lbl span {
  color: var(--fg-3);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.form-inp, .form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--fg);
  transition: border-color .15s, box-shadow .15s;
}
.form-inp:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,157,255,.22);
}
.form-textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.form-counter {
  font-size: 11px; color: var(--fg-3);
  text-align: right;
  letter-spacing: .2px;
}

.modal-op-wrap { width: 100%; }
.modal-op-scroll {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.modal-op-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  font-size: 12px; font-weight: 500;
  color: var(--fg-2);
  letter-spacing: .2px;
  transition: border-color .15s, background .15s, color .15s;
}
.modal-op-btn::before {
  content: ''; width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--c, var(--fg-4));
  display: inline-block;
}
.modal-op-btn:hover { border-color: var(--fg-4); color: var(--fg); }
.modal-op-btn.sel {
  background: var(--surface-3); border-color: var(--fg); color: var(--fg);
}
.modal-op-btn.mbf { --c: #005EEB; }
.modal-op-btn.mev { --c: #7c3aed; }
.modal-op-btn.mfo { --c: #b44fff; }
.modal-op-btn.mma { --c: #00aa55; }
.modal-op-btn.mor { --c: #ff8c00; }
.modal-op-btn.mpr { --c: #ec4899; }
.modal-op-btn.muc { --c: #F5821F; }
.modal-op-btn.mza { --c: #00cfff; }
.modal-op-btn.mall { --c: var(--dc); }
.modal-op-btn.mall.sel { background: var(--dc); border-color: var(--dc); color: #fff; }
.modal-op-btn.mall.sel::before { background: #fff; }

.form-tag-section {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.form-tag-btn {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: .2px;
  transition: border-color .15s, background .15s, color .15s;
}
.form-tag-btn:hover { border-color: var(--fg-4); color: var(--fg); }
.form-tag-btn.sel {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}
.form-tag-warn {
  display: none;
  font-size: 11px;
  color: var(--err);
  margin-top: 4px;
  letter-spacing: .2px;
}
.form-tag-warn.show { display: block; }

.form-checkbox-row {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.form-checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
}
.form-checkbox-label {
  font-size: 13px; font-weight: 500;
  color: var(--fg);
  letter-spacing: .2px;
}

.form-submit {
  width: 100%;
  background: var(--accent); color: #fff;
  border: 0; border-radius: var(--r);
  padding: 14px 20px;
  font-size: 14px; font-weight: 600;
  letter-spacing: .4px;
  transition: background .15s;
}
.form-submit:hover:not(:disabled) { background: var(--accent-hov); }
.form-submit:disabled {
  background: var(--surface-3); color: var(--fg-4); cursor: not-allowed;
}
.form-privacy {
  font-size: 11px; color: var(--fg-3);
  letter-spacing: .2px;
  text-align: center;
}
.form-error {
  display: none;
  font-size: 12px;
  color: var(--err);
  text-align: center;
}
.form-error.show { display: block; }
.form-success {
  display: none;
  font-size: 13px; font-weight: 600;
  color: var(--ok);
  text-align: center;
  padding: var(--s-3);
  background: rgba(30,156,74,.08);
  border: 1px solid rgba(30,156,74,.2);
  border-radius: var(--r);
}
.form-success.show { display: block; }

/* ============================================================
   SCROLL-TOP — общий с inline-стилями в HTML.
   На странице есть inline body.theme-tesla-light #scroll-top — пусть
   срабатывает; этот блок служит fallback'ом.
   ============================================================ */
#scroll-top {
  background: var(--surface) !important;
  border-color: var(--hairline) !important;
  color: var(--fg-2) !important;
  font-family: var(--font) !important;
  box-shadow: var(--shadow-2);
}
#scroll-top:hover { background: var(--surface-3) !important; }

/* ============================================================
   МОБИЛЬНОЕ УЖАТИЕ ТАБЛИЦ TOUR — без горизонтального скролла
   (как в arcade: шрифт меньше + узкие отступы, всё влезает)
   ============================================================ */
@media (max-width: 560px) {
  .standings { font-size: 12px; }
  .standings th { font-size: 9px; padding: 9px 6px; letter-spacing: .4px; }
  .standings td { padding: 10px 6px; }
  .standings .td-pts .pts { font-size: 15px; }
  .standings .rank { font-size: 12px; }
  /* streak-бэйдж компактнее, переносится под имя */
  .standings .streak-badge {
    margin-left: 0; margin-top: 3px;
    padding: 1px 6px; font-size: 10px;
  }
  .standings td .dot { margin-right: 5px; }

  .cur-round-table { font-size: 12px; }
  .cur-round-table th { font-size: 9px !important; padding: 6px 5px; }
  .cur-round-table td { padding: 8px 5px; font-size: 12px !important; }
  .cr-split { margin-left: 6px; }
  .cr-pill { padding: 1px 5px; font-size: 9px; }

  .forecast-table { font-size: 12px; }
  .forecast-table th { font-size: 9px; padding: 6px 5px; }
  .forecast-table td { padding: 8px 5px; }
  .forecast-table td.forecast strong { font-size: 15px; }
}
@media (max-width: 380px) {
  .standings th { padding: 8px 4px; }
  .standings td { padding: 9px 4px; }
}
