﻿/* IceCore Analytics — Stylesheet (Design tokens loaded from /tokens.css) */

html[data-twa="1"]:not([data-theme="dark"]) {
  --bg: var(--tg-theme-bg-color, var(--color-paper));
  --surface-2: var(--tg-theme-secondary-bg-color, var(--color-paper-3));
}

html[data-theme="dark"],
html[data-twa="1"][data-theme="dark"] {
  color-scheme: dark;
}

.no-theme-transitions, .no-theme-transitions *, .no-theme-transitions *::before, .no-theme-transitions *::after {
  transition: none !important;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: dark;
  overflow-x: clip;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

body {
  min-height: var(--app-height, 100vh);
  height: var(--app-height, 100vh);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.48;
  letter-spacing: -.011em;
  font-variant-numeric: tabular-nums;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overflow-x: clip;
  overscroll-behavior-y: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ============ Доступность и Скип-ссылка ============ */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 16px;
  z-index: var(--z-skip);
  padding: 10px 18px;
  background: var(--surface-3);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-float);
  transition: top 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-link:focus-visible {
  top: 16px;
}

/* ============ Типографика (2+1: Manrope Display + IBM Plex Sans + IBM Plex Mono) ============ */
h1, h2, h3, h4, h5, h6, .brand-name, .page-title, .modal-title, .card-title, .section-head h2, .onboarding-step-title, #auth-modal-title {
  font-family: var(--font-display);
  font-style: normal;
  text-wrap: balance;
  letter-spacing: -0.025em;
}

p, .hero-sub, .onboarding-step-text, .footer-disclaimer, .form-hint, .hint, .ref-banner-desc {
  text-wrap: pretty;
}

table, td, th, .odds-val, .match-score, .countdown, .stat-val, .metric-value, .badge, .mono, .parlay-pill, .badge-ev, .badge-prob, .digit, .matrix-cell, .odds-tag, .parlay-count {
  font-variant-numeric: tabular-nums;
}

/* Защита от авто-зума на iOS Safari при фокусе на инпутах */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

svg.ic { width: 17px; height: 17px; flex: none; }
svg.ic-lg { width: 21px; height: 21px; flex: none; }

/* ============ верхняя панель ============ */

.topbar {
  position: relative;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  background: var(--glass-topbar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-width: 0;
}

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand .logo { width: 22px; height: 22px; color: var(--accent); }
.brand-name { font-size: 17.5px; font-weight: 600; letter-spacing: -.025em; color: var(--text-heading); }
.brand-name em, .brand-accent { font-style: normal; color: var(--accent-text); }
.tab-beta-tag {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--amber-soft);
  border: 1px solid var(--amber-soft);
  color: var(--amber);
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 3px;
  vertical-align: 1px;
}

.rhl-beta-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.rhl-beta-banner .ic {
  width: 16px;
  height: 16px;
  color: var(--amber);
  flex-shrink: 0;
}

.league-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
}
.league-tabs button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform 100ms var(--ease-out);
}
.league-tabs button:hover { color: var(--text-heading); background: var(--line-soft); }
.league-tabs button.active {
  background: var(--ink-inv-bg);
  border-color: transparent;
  color: var(--ink-inv-fg);
}

.topbar .burger-btn {
  display: none;
  padding: 6px 8px;
  margin-right: 4px;
}
@media (max-width: 980px) {
  .topbar .burger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0; flex-shrink: 1; }
@media (max-width: 1580px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar-right { gap: 4px; }
  .league-tabs button { padding: 4px 8px; font-size: 12px; }
  .topbar #sync-badge { display: none !important; }
  .topbar .cmd-k-pill,
  .topbar .ref-pill-text,
  #btn-cmd-palette > span:not(.ic) {
    display: none;
  }
  .topbar #btn-open-vip { padding: 5px 10px; font-size: 12px; }
}
.topbar-divider { width: 1px; height: 18px; background: var(--line); margin: 0 2px; flex-shrink: 0; }

.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  color: var(--accent-text);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px;
  cursor: pointer;
}
.live-dot {
  display: none;
}

.badge {
  font-size: 11.5px; color: var(--amber);
  border: 1px solid var(--amber-soft);
  background: var(--amber-soft);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.badge.ok { color: var(--green); border-color: var(--green-soft); background: var(--green-soft); }
.badge.err { color: var(--accent-text); border-color: var(--accent-soft); background: var(--accent-soft); }

/* Полная индикация синхронизации с плавной прогресс-полосой на всю ширину */
.badge-sync, #sync-badge {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  max-width: 155px;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

#sync-badge.syncing {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--blue);
  padding-bottom: 5px;
}

.sync-badge-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: var(--z-base);
}

.sync-track-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: var(--blue-soft);
  overflow: hidden;
  border-radius: 0 0 999px 999px;
  z-index: var(--z-base);
}

.sync-fill-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--blue-soft);
  animation: syncSweep 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes syncSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Restrained Swiss PRO trigger (monochrome ink + crimson precision dot) */
.btn-pro-tier {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-heading);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform 100ms var(--ease-out);
  touch-action: manipulation;
}
.btn-pro-tier:hover {
  background: var(--ink-inv-bg);
  border-color: var(--ink-inv-bg);
  color: var(--ink-inv-fg);
}
.btn-pro-tier:active {
  transform: scale(0.97);
}
.pro-text {
  letter-spacing: 0.04em;
}
.topbar-meta-btn {
  color: var(--text-dim);
  font-size: 12px;
  gap: 5px;
}
.topbar-meta-btn .ic {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
}

/* ============ кнопки ============ */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease-out;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  filter: brightness(1.08);
}

.btn-sm { padding: 5.5px 11px; font-size: 12px; }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { background: var(--line); border-color: var(--line); color: var(--text); }

/* ============ каркас ============ */

.layout { position: relative; z-index: var(--z-base); flex: 1; display: flex; min-height: 0; overflow: hidden; }

.sidebar {
  width: 232px;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  padding: 16px 10px 5px;
  user-select: none;
}
.nav-group-label:first-child { padding-top: 2px; }
.sidebar nav a {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500; font-size: 13px;
  min-width: 0;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.sidebar nav a > span:first-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar nav a .badge-pro-vip,
.sidebar nav a .nav-meta-tag {
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-meta-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}
.sidebar nav a .ic { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-faint); transition: color var(--dur-fast) var(--ease-out); }
.sidebar nav a:hover { color: var(--text-heading); background: var(--surface); }
.sidebar nav a:hover .ic { color: var(--text-dim); }
.sidebar nav a.active {
  color: var(--text-heading);
  font-weight: 600;
  background: var(--surface-2);
}
.sidebar nav a.active::before {
  content: "";
  position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 2px; border-radius: 1px;
  background: var(--accent);
}
.sidebar nav a.active .ic { color: var(--text-heading); }
.sidebar-foot {
  margin-top: auto;
  padding: 12px 11px 4px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-faint);
  border-top: 1px solid var(--line-soft);
}

.main-scroll-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.content {
  flex: 1 0 auto;
  width: 100%;
  min-height: calc(100dvh - 56px);
  padding: 26px 34px 48px;
  max-width: 1340px;
  margin: 0 auto;
}

/* ============ заголовки ============ */

.page-head { margin-bottom: 20px; animation: fadein .2s ease; }
.page-title { font-size: 21px; font-weight: 750; letter-spacing: -.022em; color: var(--text-heading); }
.page-sub { color: var(--text-dim); font-size: 12.5px; margin-top: 4px; }

@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ============ карточки ============ */

.card {
  background: var(--glass-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
  animation: fadein .2s cubic-bezier(0.16, 1, 0.3, 1);
  transition: border-color .2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--text-heading);
  margin-bottom: 14px;
}
.card-title .ic { color: var(--accent); width: 16px; height: 16px; }
.card-title .hint { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--text-faint); }

.grid { display: grid; gap: 14px; margin-bottom: 18px; min-width: 0; }
.grid > * { min-width: 0; }
.grid:last-child { margin-bottom: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* сетки внутри карточек не добавляют внешний отступ */
.card > .grid:last-child, .card > .grid { margin-bottom: 0; }
.card > .grid + * { margin-top: 14px; }

.stat {
  background: var(--glass-stat);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .15s ease;
}
.stat:hover {
  border-color: var(--border-strong);
}
.stat .v { font-size: 23px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--text-dim); font-size: 12px; margin-top: 4px; }
.stat .v.up { color: var(--green); }
.stat .v.down { color: var(--accent-text); }
.stat .v.mid { color: var(--amber); }

/* ============ таблицы ============ */

.tbl-wrap { overflow-x: auto; max-width: 100%; width: 100%; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
thead th {
  text-align: left;
  color: var(--text-faint);
  font-size: 11.5px; font-weight: 600;
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--line); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
td.ctr, th.ctr { text-align: center; }

.t-name { font-weight: 650; }
.t-dim { color: var(--text-dim); }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--accent-text); font-weight: 700; }
.win { color: var(--green); font-weight: 700; }
.lose { color: var(--accent-text); font-weight: 700; }

.link { color: var(--blue); cursor: pointer; text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color .15s; }
.link:hover { border-bottom-color: var(--blue); }

/* чипы */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.chip.blue { color: var(--blue); border-color: var(--border); background: var(--blue-soft); }
.chip.red { color: var(--accent-text); border-color: var(--border); background: var(--accent-soft); }
.chip.green { color: var(--green); border-color: var(--border); background: var(--green-soft); }
.chip.amber { color: var(--amber); border-color: var(--border); background: var(--amber-soft); }
.chip.gray { color: var(--text-dim); background: var(--surface-2); border-color: var(--border); }

/* ============ вероятностные полосы ============ */

.pbar {
  display: inline-block; vertical-align: middle;
  width: 52px; height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.pbar > span {
  display: block; height: 100%;
  border-radius: 3px;
  background: var(--blue);
}
.pbar.amber > span { background: var(--amber); }
.pbar.green > span { background: var(--green); }
.pbar.red > span { background: var(--red); }
.pval { font-size: 12px; min-width: 38px; display: inline-block; text-align: right; font-variant-numeric: tabular-nums; }
.pcell { display: inline-flex; align-items: center; gap: 6px; }

/* сегментированная полоса 1X2 */
.seg { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); }
.seg span { height: 100%; transition: width .3s ease; }
.seg .s1 { background: var(--blue); }
.seg .sx { background: var(--text-faint); }
.seg .s2 { background: var(--red); }
.seg-legend {
  display: flex; gap: 16px; margin-top: 8px;
  font-size: 11.5px; color: var(--text-dim); flex-wrap: wrap;
}
.seg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.seg-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.seg-legend .l-blue { background: var(--blue); }
.seg-legend .l-gray { background: var(--text-faint); }
.seg-legend .l-red { background: var(--red); }

/* ============ формы ============ */

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 11.5px; font-weight: 600; color: var(--text-dim); letter-spacing: .02em; }

select, input[type="text"], input[type="number"] {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font: inherit; font-size: 13px;
  min-width: 170px;
  transition: border-color .15s;
}
select:focus, input:focus {
  border-color: var(--color-focus);
}
select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
input[type="number"] { min-width: 90px; font-variant-numeric: tabular-nums; }

/* ползунки состава — высокая читаемость в обеих темах */
.range-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.range-row .team-label { width: 150px; font-weight: 600; font-size: 13px; color: var(--text-heading); }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 24px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--text-heading);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  cursor: pointer;
  transition: transform 100ms var(--ease-out), border-color 120ms var(--ease-out);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--text-heading);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  cursor: pointer;
}
input[type="range"]:hover::-webkit-slider-thumb {
  border-color: var(--accent);
}
.range-val { width: 48px; text-align: right; font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; color: var(--text-heading); font-variant-numeric: tabular-nums; }

.odds-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
@media (max-width: 900px) {
  .odds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ матчи ============ */

.date-box {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px 6px;
  background: var(--surface-2);
}
.date-box .d { font-weight: 750; font-size: 14px; }
.date-box .t { font-size: 10.5px; color: var(--text-faint); }

.ot-chip { font-size: 10.5px; }

/* ============ периоды (прогноз) ============ */

.periods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}
.period {
  position: relative;
  min-width: 0;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 15px 16px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.period:last-child {
  border-right: 0;
}
.period-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.period .pl {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 0;
}
.period .xp {
  margin-top: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}
.period .score {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}
.period .xg {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--text-dim);
}
.period .xg b {
  color: var(--text-heading);
  font-weight: 600;
}
.period .dist {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.period .dist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name txt"
    "bar bar";
  align-items: baseline;
  column-gap: 8px;
  row-gap: 4px;
  min-width: 0;
}
.period .dist-name {
  grid-area: name;
  width: auto;
  min-width: 0;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.period .dist-txt {
  grid-area: txt;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--text-faint);
  white-space: nowrap;
  text-align: right;
}
.period .dist-bar {
  grid-area: bar;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  display: inline-flex;
  overflow: hidden;
  background: var(--surface-3);
}
.period .cum {
  margin-top: auto;
  padding-top: 11px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-faint);
}
.period .cum b {
  color: var(--text-heading);
  font-weight: 600;
}

.dist { display: flex; flex-direction: column; gap: 6px; }
.dist-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dist-name { flex: none; width: 84px; font-size: 11px; color: var(--text-faint); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-bar {
  display: inline-flex; flex: 1; min-width: 40px; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--surface-3);
}
.dist-bar > span { display: block; height: 100%; }
.dist-txt { flex: none; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }

@media (max-width: 1080px) {
  .periods {
    grid-template-columns: 1fr;
  }
  .period {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .period:last-child {
    border-bottom: 0;
  }
}

/* ============ прогресс / журнал ============ */

.logbox {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 12px 14px;
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ============ график ============ */

.curve-wrap {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px 4px;
}
.curve-wrap svg { width: 100%; height: auto; display: block; }

/* ============ скелетоны ============ */

.skel {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skel-row { height: 42px; margin-bottom: 8px; }
.skel-card { height: 130px; margin-bottom: 14px; }

/* ============ пустые состояния ============ */

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 20px;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
}
.empty svg { width: 40px; height: 40px; opacity: .5; }

/* ============ уведомление ============ */

.toast {
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  max-width: calc(100vw - 32px);
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  animation: fadein .2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}
@media (min-width: 981px) {
  .toast {
    bottom: 26px;
  }
}
.toast.err {
  border-color: var(--accent-soft);
  color: var(--err-text);
  background: var(--err-surface);
}
.toast-undo-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-heading);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.toast-undo-btn:hover {
  background: var(--surface-2);
}
.hidden { display: none !important; }

/* ============ разбор матчей ============ */

.game-review {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--surface);
}
.gr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gr-score {
  font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums;
  min-width: 34px; text-align: center;
}
.gr-sub {
  display: flex; gap: 10px; margin-top: 6px;
  font-size: 11.5px; color: var(--text-faint);
}

/* ============ стратегия на матч ============ */

.strategy-card { border-color: var(--border); }
.strategy-advice {
  list-style: none;
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.strategy-advice li {
  padding-left: 18px;
  position: relative;
  font-size: 13px;
  color: var(--text);
}
.strategy-advice li::before {
  content: "";
  position: absolute; left: 2px; top: 7px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--blue);
}
.strategy-factors { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.h2h-mini { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.h2h-mini b { color: var(--text); }
.h2h-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}
.h2h-row:last-child { border-bottom: 0; }

/* ============ уютная полировка ============ */
html { scroll-behavior: smooth; }

/* ============ live-режим ============ */

.live-card { border-color: var(--border-strong); }
.live-banner-card { border-color: var(--border-strong); }
.live-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-header-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.live-stat { cursor: pointer; border-color: var(--border); transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.live-stat:hover { border-color: var(--accent); background: var(--accent-soft); }
.live-score-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 4px 0 12px;
}
.live-team { flex: 1; text-align: center; }
.lt-name { font-weight: 700; font-size: 15px; color: var(--text-heading); }
.lt-p { color: var(--text-dim); font-size: 13px; margin-top: 3px; font-family: var(--mono); }
.live-center { min-width: 130px; text-align: center; }
.live-score {
  font-size: 34px; font-weight: 600; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; color: var(--accent-text);
}
.live-period { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.live-breakdown { font-size: 11px; color: var(--text-faint); font-family: var(--mono); margin-top: 3px; }
.live-meta-strip {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.live-meta-strip b { color: var(--text-heading); font-family: var(--mono); }
.live-totals-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.live-total-pill {
  flex: 1 1 92px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 10px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 12px; color: var(--text-dim);
}
.live-total-pill b { color: var(--text-heading); font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ============ скроллбар ============ */

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

@media (forced-colors: active) {
  :focus-visible {
    outline: 3px solid Highlight !important;
  }
  .btn, .badge, .chip, .modal-content, .topbar, .mobile-nav {
    border: 1px solid ButtonText !important;
  }
}

/* ============ адаптив ============ */

@media (max-width: 980px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .layout { margin-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .brand-sub { display: none; }
  .content { padding: 20px 16px 76px; }
  .grid-2, .grid-3, .grid-4, .periods { grid-template-columns: 1fr; }
}

/* ============ модальное окно ============ */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-modal);
  animation: modalBackdrop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg, 14px);
  padding: 24px 28px;
  max-width: 540px;
  width: 90%;
  box-shadow: var(--shadow), 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: modalEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  overflow: hidden;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content h2 {
  font-size: 20px;
  font-weight: 750;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.modal-content .field {
  margin-bottom: 18px;
}

.modal-content .field label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}

.modal-content .field label input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex: none;
  cursor: pointer;
}

.modal-content .hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: flex-end;
}

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text-dim);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
}


/* ============================================================
   Экспресс (Parlay) виджет
   ============================================================ */

.parlay-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 390px;
  max-height: calc(100vh - 76px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: var(--z-floating);
}

.parlay-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-dim);
  gap: 12px;
}

.parlay-icon {
  opacity: 0.4;
}

.parlay-hint {
  font-size: 12px;
  color: var(--text-faint);
}

.parlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.parlay-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.parlay-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.parlay-legs {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 290px;
}

.parlay-leg {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: border-color 0.2s ease;
}

.parlay-leg:hover {
  border-color: var(--line);
}

.parlay-leg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.parlay-leg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.parlay-leg-match {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.parlay-leg-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.parlay-leg-market {
  color: var(--text-dim);
}

.parlay-leg-prob {
  color: var(--blue);
  font-weight: 600;
}

.parlay-leg-odds {
  color: var(--green);
  font-weight: 600;
  font-family: var(--mono);
}

.parlay-actions {
  padding: 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.parlay-result {
  padding: 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-3);
}

.parlay-result-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.parlay-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.parlay-result-row:last-child {
  border-bottom: none;
}

.parlay-result-main {
  padding: 16px 0;
  border-bottom: 2px solid var(--line);
}

.parlay-result-label {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.parlay-result-value {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.parlay-prob-main {
  font-size: 20px;
  color: var(--blue);
  font-weight: 600;
}

.parlay-odds-main {
  font-size: 16px;
  color: var(--green);
  font-family: var(--mono);
}

.parlay-result-naive {
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--mono);
}

.parlay-penalties {
  margin-top: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.parlay-penalty-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.parlay-penalty-value {
  color: var(--amber);
  font-weight: 600;
  font-family: var(--mono);
}

.parlay-warnings {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.parlay-warning {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-dim);
}

.btn-add-parlay {
  margin-top: 8px;
  width: 100%;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--border);
}

.btn-add-parlay:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

/* Модальное окно */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--glass-modal);
}

.modal.active,
.modal:not(.hidden) {
  display: flex !important;
}

.modal.hidden {
  display: none !important;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: var(--glass-modal);
}

.modal-content {
  position: relative;
  z-index: var(--z-base);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px 24px;
}

.match-info {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.match-score-pred {
  font-weight: 600;
  color: var(--blue);
  font-family: var(--mono);
}

.match-markets {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.market-category {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.market-category-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.market-item {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.market-item:hover {
  border-color: var(--border-strong);
}

.market-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.market-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.market-prob {
  color: var(--blue);
  font-weight: 600;
}

.market-odds {
  color: var(--green);
  font-weight: 600;
  font-family: var(--mono);
}

.btn-icon {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  min-width: 36px;
  min-height: 36px;
  touch-action: manipulation;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}

.btn-icon:hover {
  background: var(--surface-3);
  color: var(--text);
}

.btn-icon:active {
  transform: scale(0.92);
}

.btn-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Кнопки для добавления в экспресс из сканера */
.scanner-match-row {
  position: relative;
}

.btn-view-match {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--blue-soft);
}

.btn-view-match:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

/* Адаптация для мобильных и купона */
@media (max-width: 768px) {
  .parlay-widget {
    width: calc(100% - 20px);
    right: 10px;
    left: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom, 12px));
    max-height: calc(80vh - env(safe-area-inset-bottom, 12px));
    z-index: var(--z-floating);
  }
  
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .market-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   v4.0 UI: Плавающий купон, поиск, фильтры, ELO, Симулятор 10k,
   Тепловая карта 7x7 и Калькулятор маржи / Келли
   ============================================================ */

.kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
}

/* Свёрнутая пилюля экспресса (купон) */
.parlay-widget-wrap.minimized {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: var(--z-floating);
}

@media (max-width: 980px) {
  .parlay-widget-wrap.minimized {
    right: 14px;
    bottom: calc(72px + env(safe-area-inset-bottom, 12px)) !important;
    z-index: var(--z-floating) !important;
  }
  .parlay-widget-wrap.minimized .parlay-pill {
    padding: 11px 18px;
    font-size: 13px;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-float);
  }
}

/* ============================================================
   Мобильное бургер-меню (Mobile Drawer & Navigation)
   ============================================================ */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--glass-modal);
  z-index: var(--z-drawer);
  transition: opacity 0.25s ease;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 312px;
  max-width: 86vw;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  visibility: visible;
  transition: transform 0.24s var(--ease-out), visibility 0s;
  overflow: hidden;
}

.mobile-drawer.hidden {
  transform: translateX(-100%);
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.24s var(--ease-out), visibility 0s linear 0.24s;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-drawer-body {
  padding: 14px 14px 44px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer-user-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.mobile-drawer-group-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  margin-top: 14px;
  margin-bottom: 4px;
  padding-left: 6px;
}

.mobile-league-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.mobile-league-grid button {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 0;
  border-radius: 7px;
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}

.mobile-league-grid button:active {
  transform: scale(0.96);
}

.mobile-league-grid button.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mobile-nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.mobile-nav-link:active {
  transform: scale(0.98);
}

.mobile-nav-link.active {
  background: var(--surface-2);
  color: var(--text-heading);
  font-weight: 600;
}

.mobile-nav-link .ic {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.parlay-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--ink-inv-bg);
  border: 1px solid var(--border-strong);
  color: var(--ink-inv-fg);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-float);
  touch-action: manipulation;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.parlay-pill:hover {
  opacity: 0.92;
}

.parlay-pill-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-float);
}

.parlay-pill-odds {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green);
  padding-left: 4px;
  border-left: 1px solid var(--line);
}

.parlay-odd-inp {
  width: 68px;
  padding: 4px 6px;
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  background: var(--surface);
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parlay-stake-bar {
  padding: 10px 14px;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}

.parlay-stake-inp {
  width: 110px;
  padding: 5px 8px;
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* Панель поиска и быстрых фильтров */
.toolbar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
  flex: 1;
  max-width: 340px;
}

.search-box .ic {
  position: absolute;
  left: 11px;
  color: var(--text-faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 8px 34px 8px 34px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.search-box input:focus {
  border-color: var(--color-focus);
}

.search-kbd {
  position: absolute;
  right: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  padding: 1px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-dim);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--blue);
}

.filter-pill:active {
  transform: scale(0.96);
}

.filter-pill.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue-soft);
}

/* Быстрое добавление исхода в экспресс прямо из таблицы матчей */
.quick-odd-btn {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 12px;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}

.quick-odd-btn:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.quick-odd-btn:active {
  transform: scale(0.95);
}

.quick-odd-btn.best-pick {
  border-color: var(--blue-soft);
  background: var(--blue-soft);
}

.quick-odd-btn .qo-plus {
  color: var(--blue);
  font-weight: 600;
  opacity: 0.55;
  font-size: 11px;
}

.quick-odd-btn:hover .qo-plus {
  opacity: 1;
}

/* Сортируемые заголовки таблиц и ELO-бейджи */
th.sortable {
  user-select: none;
  transition: color 0.15s ease;
}

th.sortable:hover {
  color: var(--blue);
}

th.sortable.sorted {
  color: var(--blue);
}

.elo-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}

.elo-elite {
  color: var(--green);
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}

.elo-mid {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue-soft);
}

.elo-low {
  color: var(--text-dim);
}

.xg-idx {
  font-family: var(--mono);
  font-size: 12px;
}

/* Кнопка смены команд местами */
.btn-swap {
  padding: 8px 10px;
  align-self: flex-end;
}

/* Симулятор Монте-Карло 10k: Арена и 7x7 Heatmap */
.sim-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
html[data-theme="light"] .sim-arena {
  background: var(--accent-soft);
}

.sim-side {
  text-align: center;
}

.sim-team-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.sim-win-big {
  font-size: 28px;
  font-weight: 600;
  font-family: var(--mono);
}

.sim-score-center {
  text-align: center;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.sim-avg-score {
  font-size: 26px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  color: var(--text);
}

.heatmap-wrap {
  overflow-x: auto;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(46px, 1fr));
  gap: 4px;
  min-width: 390px;
}

.hm-hdr {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 6px 2px;
}

.hm-cell {
  appearance: none;
  font: inherit;
  color: inherit;
  width: 100%;
  border-radius: 6px;
  padding: 7px 4px;
  text-align: center;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.hm-cell:hover {
  border-color: var(--text-heading);
}

.hm-cell.hm-best {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.45);
}

.hm-score {
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.72);
}

.hm-prob {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

/* Распределение разницы шайб */
.gdiff-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gdiff-row {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.gdiff-lbl {
  font-family: var(--mono);
  font-weight: 700;
  text-align: right;
  color: var(--text-dim);
}

.gdiff-track {
  height: 12px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}

.gdiff-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.25s ease;
}

/* Калькулятор маржи БК */
.margin-gauge-wrap {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.margin-track {
  height: 10px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.margin-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .sim-arena {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ============================================================
   IceCore v4.1 — Cyber-Ice Esports & Match Analytics
   ============================================================ */

/* 3-way Probability Bar in Match Cards & Rows */
.match-prob-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  width: 100%;
}
.match-prob-bar {
  display: flex;
  gap: 2px;
  height: 5px;
  background: transparent;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.prob-seg {
  height: 100%;
  transition: width 0.28s var(--ease-out);
  position: relative;
  border-radius: 2px;
}
.prob-seg-p1 {
  background: var(--blue);
}
.prob-seg-px {
  background: var(--border-strong);
}
.prob-seg-p2 {
  background: var(--accent);
}
.prob-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  line-height: 1;
}
.pbl-p1 { color: var(--blue); }
.pbl-px { color: var(--text-faint); }
.pbl-p2 { color: var(--accent-text); }

/* Group headings for upcoming matches — clean editorial date rule, zero side-stripe */
.match-day-group {
  margin-top: 20px;
}
.match-day-group:first-child {
  margin-top: 0;
}
.match-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 0 8px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.match-day-header.today {
  border-bottom-color: var(--border-strong);
}
.match-day-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}
.match-day-title .ic {
  display: none;
}
/* today marker uses text label without decorative dot */
.match-day-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: transparent;
  color: var(--text-faint);
  padding: 0;
  border: 0;
}

/* Conference Switcher Tabs */
.conf-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.conf-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
}
.conf-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.conf-tab:hover {
  color: var(--text);
}
.conf-tab:active {
  transform: scale(0.96);
}
.conf-tab.active {
  background: var(--surface-3);
  color: var(--text-heading);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.conf-tab[data-conf="Запад"].active {
  border-color: var(--blue-soft);
  color: var(--blue);
  background: var(--blue-soft);
}
.conf-tab[data-conf="Восток"].active {
  border-color: rgba(251, 191, 36, 0.45);
  color: var(--amber);
  background: rgba(251, 191, 36, 0.12);
}

/* Playoff cutoff border and zone */
tr.zone-playoff td:first-child {
  box-shadow: inset 2px 0 0 var(--blue);
}
tr.playoff-cutoff {
  border-bottom: 1.5px dashed var(--blue) !important;
}
.playoff-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-dim);
}
.playoff-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue);
}

/* Form Dots in Standings */
.form-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.f-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--mono);
}
.f-dot.f-w {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--border);
}
.f-dot.f-l {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
}
.f-dot.f-ot {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--border);
}

/* City & Conference tag */
.city-tag {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 6px;
}
.conf-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
  margin-left: 6px;
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
}
.conf-badge.west,
.conf-badge.east {
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* Analytical & Value Badges */
.chip.cyan {
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--border);
}
.chip.value {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--border);
  font-weight: 700;
}

/* ============================================================
   IceCore PRO Subscriptions & Monetization Styles
   ============================================================ */

.btn-pro {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.btn-pro:hover {
  background: var(--amber-soft);
  border-color: var(--amber);
}
.btn-pro:active {
  transform: scale(0.97);
}
.pro-crown {
  font-size: 13px;
}

.nav-vip-link {
  margin-top: 2px;
}
.badge-pro-vip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-heading);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* VIP Subscriptions Grid — Swiss Editorial Pricing */
.vip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 1020px) {
  .vip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .vip-grid {
    grid-template-columns: 1fr;
  }
}
.vip-tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color var(--dur-short) var(--ease-out);
}
.vip-tier:hover {
  border-color: var(--border-strong);
}
.vip-tier.featured {
  background: var(--surface-2);
  border: 1.5px solid var(--text-heading);
  box-shadow: none;
}
.vip-tier.syndicate {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.vip-tier.syndicate:hover {
  border-color: var(--blue);
}
.vt-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.vt-badge.hot {
  color: var(--accent-text);
}
.vt-badge.syndicate-badge {
  color: var(--blue);
}
.vt-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.vt-price {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  white-space: nowrap;
}
.vt-old {
  font-size: 13px;
  color: var(--text-faint);
  text-decoration: line-through;
  font-weight: 400;
  white-space: nowrap;
}
.vt-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  flex: 1;
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vt-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.vt-features .ic-check {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.btn-primary-vip {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border: 1px solid var(--accent);
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: filter var(--dur-fast) var(--ease-out), transform 100ms var(--ease-out);
}
.btn-primary-vip:hover {
  filter: brightness(1.08);
}
.btn-primary-vip:active {
  transform: scale(0.97);
}
.btn-outline-vip {
  background: var(--surface-2);
  color: var(--text-heading);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform 100ms var(--ease-out);
}
.btn-outline-vip:hover {
  background: var(--surface-3);
  border-color: var(--text-dim);
  color: var(--text-heading);
}
.btn-outline-vip:active {
  transform: scale(0.97);
}

/* Pay methods & promo */
.vip-methods-box {
  background: var(--surface-3);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  border: 1px solid var(--line-soft);
}
.vip-pay-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pay-tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.promo-box {
  display: flex;
  gap: 8px;
}
.promo-box input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.promo-box input:focus {
  border-color: var(--color-focus);
}

/* Paywall Blur on Scanner and Pro sections */
.paywall-wrapper {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.paywall-blurred {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
}
.paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--glass-modal);
  z-index: var(--z-sticky);
  padding: 24px;
  text-align: center;
}
.paywall-card {
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-float);
}
.paywall-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.paywall-card p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.45;
}

/* Bookmaker affiliate links in match card */
.bk-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.bk-btn {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}
.bk-btn:hover {
  background: var(--surface-2);
  border-color: var(--blue);
  color: var(--text-heading);
}
.bk-btn:active {
  transform: scale(0.96);
}
.bk-btn.fonbet:hover { border-color: #ef4444; color: #f87171; }
.bk-btn.winline:hover { border-color: #f97316; color: #fb923c; }
.bk-btn.betboom:hover { border-color: #eab308; color: #facc15; }




/* ==========================================================================
   Аутентификация, Профиль, Чекаут и Админ-панель
   ========================================================================== */

/* Топбар: бейдж пользователя */
#topbar-user-wrap {
  display: flex;
  align-items: center;
}
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.user-pill:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.user-pill:active {
  transform: scale(0.97);
}
.user-avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink-inv-bg);
  color: var(--ink-inv-fg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Статусные бейджи */
.badge-tier {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-tier.free {
  background: var(--line);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
html[data-theme="light"] .badge-tier.free {
  background: rgba(71, 85, 105, 0.10);
  border-color: rgba(71, 85, 105, 0.28);
  color: var(--text-dim, #475569);
}
.badge-tier.vip {
  background: var(--amber-soft);
  border: 1px solid rgba(251, 191, 36, 0.7);
  color: var(--amber);
  animation: vipPulse 3s infinite;
}
html[data-theme="light"] .badge-tier.vip {
  background: rgba(180, 83, 9, 0.12);
  border-color: rgba(180, 83, 9, 0.45);
  color: #92400e;
  box-shadow: none;
}
.badge-tier.admin {
  background: var(--blue-soft);
  border: 1px solid var(--blue-soft);
  color: var(--blue);
}
html[data-theme="light"] .badge-tier.admin {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.42);
  color: #0369a1;
  box-shadow: none;
}
@keyframes vipPulse {
  0%, 100% { }
  50% { }
}

/* Вкладки авторизации */
.auth-tabs {
  display: flex;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid var(--line-soft);
}
.auth-tab {
  flex: 1;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease-out;
}
.auth-tab:active {
  transform: scale(0.97);
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text-heading);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.auth-form .form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.auth-form label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.auth-form input {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s ease;
}
.auth-form input:focus {
  border-color: var(--color-focus);
}

/* Карточка профиля */
.profile-sub-card {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--amber-soft);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Модальное окно чекаута */
.checkout-summary {
  background: var(--amber-soft);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.checkout-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkout-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease-out;
}
.checkout-method:hover {
  background: var(--surface-3);
  border-color: rgba(255, 255, 255, 0.25);
}
.checkout-method:active {
  transform: scale(0.98);
}
.checkout-method.active {
  background: rgba(251, 191, 36, 0.08);
  border-color: var(--amber);
}
.cm-icon {
  font-size: 20px;
}
.cm-info {
  flex: 1;
}
.cm-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-heading);
}
.cm-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
}
.cm-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 70, 85, 0.2);
  color: var(--accent);
  border: 1px solid var(--accent);
  text-transform: uppercase;
}
.checkout-pay-box {
  margin-top: 14px;
  background: var(--surface-2);
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
}

/* Админ-панель */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.admin-stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-soft);
}
.admin-stat-card.vip::after {
  background: var(--amber-soft);
}
.admin-stat-val {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.1;
  margin-bottom: 6px;
}
.admin-stat-lbl {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.admin-subnav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.admin-subnav button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.admin-subnav button:active {
  transform: scale(0.96);
}
.admin-subnav button.active {
  background: var(--surface-2);
  border-color: var(--line-soft);
  color: var(--text-heading);
}
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.1s ease-out;
}
.admin-action-btn:active {
  transform: scale(0.95);
}
.admin-action-btn:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--text-heading);
}
.admin-action-btn.danger:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}


/* ==========================================================================
   11/10 Polish: Анонсы, Конфетти, Кибер-карты и VIP-тизеры
   ========================================================================== */

/* Глобальный баннер-анонс (v6.1: типовые варианты + кликабельный промо-чип) */
.announcement-bar {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--amber-soft);
  padding: 8px 16px;
  position: relative;
  z-index: var(--z-sticky);
  animation: slideDown 0.25s var(--ease-out-quart, ease-out);
}
.announcement-bar.ann-info {
  background: var(--blue-soft);
  border-bottom-color: var(--blue-soft);
}
.announcement-bar.ann-warning {
  background: var(--accent-soft);
  border-bottom-color: var(--accent-soft);
}
.announcement-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-heading);
}
.announcement-badge {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.announcement-bar.ann-info .announcement-badge {
  background: var(--blue-soft);
}
.announcement-bar.ann-warning .announcement-badge {
  background: var(--accent-soft);
}
.announcement-text {
  flex: 1;
  min-width: 180px;
  font-weight: 600;
  line-height: 1.35;
}
.announcement-cta-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ann-promo-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.16);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s var(--ease-out-quart, ease), background 0.15s ease;
}
.ann-promo-pill:active {
  transform: scale(0.96);
}
.announcement-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 6px 8px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.announcement-close:hover {
  color: var(--text-heading);
  background: var(--surface-2);
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Холст конфетти */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
  z-index: var(--z-confetti);
  display: none;
}

/* Кибер-карта оплаты */
.cyber-card {
  background: var(--surface-2);
  border: 1px solid var(--blue-soft);
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-top: 10px;
}
.cyber-card::after {
  display: none;
}
.cyber-card-chip {
  width: 32px;
  height: 24px;
  background: var(--amber-soft);
  border-radius: 4px;
  margin-bottom: 12px;
}
.cyber-card-number {
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--text-heading);
  font-weight: 700;
  margin-bottom: 12px;
}
.cyber-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.cyber-card-holder {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cyber-card-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--blue);
}

/* QR СБП со сканирующей линией */
.qr-wrap-interactive {
  position: relative;
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-scan-line {
  display: none;
}
@keyframes qrScan {
  0%, 100% { top: 4px; }
  50% { top: 74px; }
}

/* Крипто-кошелек */
.crypto-addr-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  margin-top: 8px;
}
.crypto-addr-code {
  font-family: monospace;
  font-size: 11.5px;
  color: var(--blue);
  flex: 1;
  word-break: break-all;
}

/* VIP тизер на инструментах */
.vip-feature-teaser {
  background: var(--amber-soft);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}


/* ==========================================================================
   SVG Vector Icons Polish & Bookmaker Indicators (No Emojis)
   ========================================================================== */

.bk-dot {
  width: 3px;
  height: 11px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: -1px;
  flex-shrink: 0;
}
.bk-dot.fonbet {
  background: #ef4444;
}
.bk-dot.winline {
  background: #f97316;
}
.bk-dot.betboom {
  background: #eab308;
}

.ic-check {
  color: var(--green) !important;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  flex-shrink: 0;
  margin-right: 6px;
  display: inline-block;
}

.cm-icon.cm-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: unset;
}
.cm-icon.cm-svg .ic {
  width: 22px;
  height: 22px;
}

.paywall-crown-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  animation: floatSubtle 3s ease-in-out infinite;
}
@keyframes floatSubtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.admin-subnav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-stat-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-tier {
  display: inline-flex;
  align-items: center;
}
.badge-tier .ic {
  vertical-align: -1px;
}


/* ==========================================================================
   Mobile Bottom Navigation
   ========================================================================== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  background: var(--glass-topbar);
  border-top: 1px solid var(--border);
  z-index: var(--z-nav);
  justify-content: space-around;
  align-items: center;
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.mobile-nav-item {
  flex: 1;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
  touch-action: manipulation;
  transition: color 0.15s ease, transform 0.1s ease-out;
}
.mobile-nav-item:hover, .mobile-nav-item.active {
  color: var(--text-heading);
}
.mobile-nav-item:active {
  transform: scale(0.93);
}
.mobile-nav-item.active .ic {
  color: var(--accent);
  transform: translateY(-1px);
}
.mobile-nav-item.vip,
.mobile-nav-item.vip .ic,
.mobile-nav-item.vip.active .ic {
  color: var(--amber);
}
.mobile-nav-item .ic {
  width: 20px;
  height: 20px;
}
.mobile-parlay-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 16px);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 600;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  border-radius: 999px;
  padding: 0 3px;
}
@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
  }
  .sidebar {
    display: none;
  }
  .layout {
    margin-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Telegram AI Studio & Odds Shopping
   ========================================================================== */
.tg-preview-card {
  background: #182533;
  border: 1px solid #243447;
  border-radius: 12px;
  padding: 16px 18px;
  color: #e4ecf2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  max-width: 580px;
  margin: 14px 0;
}
.tg-preview-card b {
  color: #fff;
}
.tg-bubble-foot {
  display: flex;
  justify-content: flex-end;
  font-size: 11px;
  color: #6c7883;
  margin-top: 8px;
}

/* Line shopping card */
.line-shopping-box {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 14px;
}
.line-shopping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.line-shop-item {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  position: relative;
}
.line-shop-item.best {
  border-color: var(--green);
  background: var(--green-soft);
}
.line-shop-item.best::after {
  content: 'ТОП КЭФ';
  position: absolute;
  top: -8px;
  right: 8px;
  background: var(--green);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}
.line-shop-odd {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 4px 0 2px;
}
.line-shop-boost {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
}

/* ============================================================
   Terminal-Grade FinTech & Visual Excellence Enhancements
   ============================================================ */

/* Tabular numbers for financial and predictive precision */
.num, table td, table th, .stat .v, .line-shop-odd, .vt-price,
.odd-val, .pcell .pval, .equity-val, .kbd {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* Topbar Command Palette Pill */
.cmd-k-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Command Palette Modal */
.cmd-palette-content {
  max-width: 620px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-float);
  border-radius: var(--radius);
  overflow: hidden;
}

.cmd-palette-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.cmd-palette-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-heading);
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
}

.cmd-palette-search input::placeholder {
  color: var(--text-faint);
  font-weight: 400;
}

.cmd-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-group-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  padding: 8px 12px 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  color: var(--text);
  font-size: 13.5px;
}
.cmd-item:active {
  transform: scale(0.98);
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--surface-3);
  color: var(--text-heading);
}

.cmd-item.selected {
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
}

.cmd-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}

.cmd-item-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 1px;
}

.cmd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ============================================================
   Live Odds Market Matrix & Ticker
   ============================================================ */
.odds-matrix-card {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.odds-cell-bk {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
}

.steam-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.steam-badge.steam-drop {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-soft);
}

.steam-badge.steam-rise {
  background: rgba(52, 211, 153, 0.2);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.tick-flash-green {
  animation: tickGreen 1.4s ease;
}

.tick-flash-red {
  animation: tickRed 1.4s ease;
}

@keyframes tickGreen {
  0% { background-color: rgba(52, 211, 153, 0.35); }
  100% { background-color: transparent; }
}

@keyframes tickRed {
  0% { background-color: var(--accent-soft); }
  100% { background-color: transparent; }
}

/* ============================================================
   Verifiable Public Audit & Equity Curve
   ============================================================ */
.audit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.audit-kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.audit-kpi-card.highlight {
  border-color: rgba(52, 211, 153, 0.4);
  background: var(--surface-2);
}

.audit-kpi-val {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.1;
  margin-top: 4px;
}

.audit-kpi-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.audit-kpi-sub {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 4px;
}

.equity-curve-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.equity-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.hash-pill {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hash-pill:active {
  transform: scale(0.96);
}

.hash-pill:hover {
  border-color: var(--blue);
  color: var(--text-heading);
  background: var(--blue-soft);
}

/* ================= Матрица 4 БК, Сканер +EV и Steam Drops ================= */

.odds-matrix-card {
  border: 1px solid var(--blue-soft);
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

.odds-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.odds-matrix-table th {
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.odds-matrix-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.odds-matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.odds-cell-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
}

.odds-pin-cell {
  background: var(--blue-soft);
  border-radius: 4px;
  padding: 3px 6px;
}

.odds-num {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
}

.odds-best-glow {
  color: var(--blue) !important;
  font-weight: 700 !important;
  background: var(--blue-soft);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.chip-steam {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  text-transform: uppercase;
}
.chip-steam .ic {
  width: 10px;
  height: 10px;
}

@keyframes steam-pulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

.btn-matrix-add {
  padding: 4px 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}

.btn-matrix-add:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--text-heading);
}

.btn-matrix-add:active {
  transform: scale(0.93);
}

.btn-radar-go {
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}

.btn-radar-go:active {
  transform: scale(0.95);
}

.btn-radar-go:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue);
}

/* --- 6-Axis Matchup Balance Widget & Odds Category Tabs --- */
.matchup-balance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 16px;
  margin-bottom: 16px;
}

.matchup-axes-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.matchup-axis-row {
  display: grid;
  grid-template-columns: 140px 60px 1fr 60px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .matchup-axis-row {
    grid-template-columns: 100px 45px 1fr 45px;
    gap: 8px;
    font-size: 11px;
  }
}

.matchup-axis-label {
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.matchup-val-home {
  text-align: right;
  font-weight: 700;
  color: var(--blue);
  font-family: var(--font-mono, monospace);
}

.matchup-val-away {
  text-align: left;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono, monospace);
}

.matchup-axis-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  position: relative;
}

.matchup-center-pin {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(-50%);
  z-index: var(--z-base);
}

.matchup-bar-home {
  background: var(--blue-soft);
  height: 100%;
  transition: width 0.4s ease;
}

.matchup-bar-away {
  background: var(--accent-soft);
  height: 100%;
  transition: width 0.4s ease;
}

.odds-filter-btn {
  background: var(--surface-2, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}
.odds-filter-btn:active {
  transform: scale(0.96);
}

.odds-filter-btn:hover {
  background: var(--blue-soft);
  color: var(--text);
  border-color: var(--blue-soft);
}

.odds-filter-btn.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue);
}

/* ==========================================================================
   Реферальная система, Ежедневные серии & Crowd vs Quant Опросы
   ========================================================================== */

.ref-step {
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ref-step.completed {
  border-color: rgba(52, 211, 153, 0.45) !important;
  background: rgba(52, 211, 153, 0.08) !important;
}

.ref-step.active {
  border-color: var(--blue) !important;
  background: var(--blue-soft) !important;
}

.ref-step.gold.completed {
  border-color: rgba(251, 191, 36, 0.5) !important;
  background: rgba(251, 191, 36, 0.1) !important;
}

.match-poll-card {
  border: 1px solid var(--purple-soft) !important;
  background: var(--surface) !important;
  position: relative;
  overflow: hidden;
}

.match-poll-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue-soft);
}

.poll-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.poll-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  color: var(--text);
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease-out;
  user-select: none;
}

.poll-btn:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.poll-btn:active {
  transform: scale(0.97);
}

.poll-btn.selected {
  border-color: var(--purple) !important;
  background: var(--purple-soft) !important;
}

.poll-btn-team {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.poll-btn-action {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: 0.5px;
}

.poll-results-grid {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poll-comparison-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.poll-comparison-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}

.poll-bar-dual {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.poll-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
}

.poll-bar-label {
  width: 58px;
  color: var(--text-dim);
  font-weight: 600;
  flex-shrink: 0;
}

.poll-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  overflow: hidden;
}

.poll-bar-fill-crowd {
  height: 100%;
  background: var(--purple-soft);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.poll-bar-fill-quant {
  height: 100%;
  background: var(--blue-soft);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.poll-bar-val {
  width: 38px;
  text-align: right;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 11px;
}

.streak-pulse {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.streak-pulse:hover {
  opacity: 0.9;
}

/* ==========================================================================
   Компактный режим терминала (Dense Mode)
   ========================================================================== */
body.dense-mode .card {
  padding: 10px 14px !important;
  margin-bottom: 8px !important;
}

body.dense-mode table td {
  padding: 4px 8px !important;
  font-size: 11.5px !important;
}

body.dense-mode table th {
  padding: 6px 8px !important;
  font-size: 10.5px !important;
}

body.dense-mode .stat {
  padding: 6px 10px !important;
}

body.dense-mode .stat .v {
  font-size: 16px !important;
}

/* ==========================================================================
   Индикаторы движения и прогруза линии (Odds Movement)
   ========================================================================== */
.odds-move-drop {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.odds-move-rise {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.odds-steam-chip {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  color: var(--accent-text);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ==========================================================================
   Бейджи квантовых достижений (Profile Badges)
   ========================================================================== */
.quant-badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.quant-badge-card.unlocked {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.quant-badge-card.gold.unlocked {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.45);
}

.quant-badge-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.quant-badge-card.unlocked .quant-badge-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.quant-badge-card.gold.unlocked .quant-badge-icon {
  background: rgba(251, 191, 36, 0.2);
  color: var(--amber);
}

.quant-badge-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.quant-badge-desc {
  font-size: 9.5px;
  color: var(--text-dim);
  margin-top: 3px;
  line-height: 1.2;
}

/* ==========================================================================
   Подборка дня (Daily Quant Slip)
   ========================================================================== */
.secret-parlay-card {
  border: 1px solid var(--border);
  border-top: 2px solid var(--text-heading);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.secret-parlay-card::before {
  display: none;
}

.secret-leg-locked {
  background: var(--surface-2);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}

.secret-leg-locked:active {
  transform: scale(0.98);
}

.secret-leg-locked:hover {
  background: var(--blue-soft);
  border-color: var(--blue-soft);
}



/* ==================== Юридический футер и дисклеймер 18+ ==================== */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 22px 34px 28px;
  font-size: 11.5px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.footer-inner {
  max-width: 1272px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  background: none;
  border: none;
  padding: 2px 2px;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.legal-link:hover {
  color: var(--text);
}

.footer-disclaimer {
  margin-top: 14px;
  line-height: 1.6;
  color: var(--text-faint);
  font-size: 11px;
}

.footer-copy {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-faint);
}

/* ==================== Подвкладки в карточке прогноза матча ==================== */
.pred-subtabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.pred-subtab-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.pred-subtab-btn:active {
  transform: scale(0.97);
}
.pred-subtab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .03);
}
.pred-subtab-btn.active {
  color: var(--text-heading);
  background: var(--surface-3);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.pred-subtab-btn .ic {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
}
.pred-subtab-btn.active .ic {
  color: var(--blue);
}

/* ==================== Правовые модальные окна и табы ==================== */
.legal-tabs-bar {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
}

.legal-doc-section {
  margin-bottom: 18px;
}

.legal-doc-section h3 {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 8px;
}

/* ==================== Интерактивный онбординг ==================== */
.onboarding-steps-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.onboarding-step-card {
  display: flex;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color 0.2s ease;
}

.onboarding-step-card:hover {
  border-color: var(--blue-soft);
}

.onboarding-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.onboarding-step-content {
  flex: 1;
}

.onboarding-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.onboarding-step-text {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.onboarding-bonus-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-sm);
}

/* ==================== PWA Инсталлятор ==================== */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: var(--z-nav);
  max-width: 360px;
  width: calc(100% - 40px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-float);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 980px) {
  .pwa-install-banner {
    bottom: 72px;
    left: 14px;
    width: calc(100% - 28px);
  }
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sidebar-tg-link {
  color: var(--blue) !important;
  font-weight: 600;
}

/* ==========================================================================
   Better-Accessibility & Reduced Motion Standards
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .badge-tier.vip, .floatSubtle, .live-dot, .paywall-crown-icon {
    animation: none !important;
  }
}

/* Tactile micro-interactions & touch-device safety (v6.1 Design Engineering) */
.btn:active,
.filter-pill:active,
.quick-odd-btn:active,
.audit-tab-btn:active,
.league-tabs button:active,
.mobile-nav-item:active {
  transform: scale(0.97);
}

@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .filter-pill:hover,
  .quick-odd-btn:hover {
    transform: none;
  }
}

/* Light-Theme Adaptive Component Overrides */
html[data-theme="light"] .mobile-nav-link.active,
html[data-theme="light"] .conf-tab.active,
html[data-theme="light"] .paywall-modal-title,
html[data-theme="light"] .paywall-card h3,
html[data-theme="light"] .paywall-overlay-title,
html[data-theme="light"] .auth-tab.active,
html[data-theme="light"] .cm-title,
html[data-theme="light"] .vip-price-amount,
html[data-theme="light"] .admin-subnav button.active,
html[data-theme="light"] .announcement-bar,
html[data-theme="light"] .announcement-content,
html[data-theme="light"] .promo-code-text,
html[data-theme="light"] .mobile-nav-item:hover,
html[data-theme="light"] .mobile-nav-item.active,
html[data-theme="light"] .tg-preview-card b,
html[data-theme="light"] .cmd-item:hover,
html[data-theme="light"] .cmd-item.selected,
html[data-theme="light"] .pred-subtab-btn.active,
html[data-theme="light"] .odds-cell.active,
html[data-theme="light"] .admin-stat-val,
html[data-theme="light"] .audit-kpi-val,
html[data-theme="light"] .sidebar a.active,
html[data-theme="light"] .modal-header h2,
html[data-theme="light"] .match-day-header.today .match-day-title,
html[data-theme="light"] .bk-btn:hover,
html[data-theme="light"] .admin-action-btn:hover,
html[data-theme="light"] .rhl-beta-banner,
html[data-theme="light"] .tab-beta-tag {
  color: var(--text-heading);
}

html[data-theme="light"] .vt-price,
html[data-theme="light"] .vt-badge.hot,
html[data-theme="light"] #checkout-tier-price,
html[data-theme="light"] .chip.yellow {
  color: var(--amber);
}

html[data-theme="light"] .vt-badge.syndicate-badge,
html[data-theme="light"] .fan-summary-header,
html[data-theme="light"] .chip.cyan {
  color: var(--blue);
}

html[data-theme="light"] .chip.value {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: none;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .parlay-widget,
html[data-theme="light"] .mobile-nav,
html[data-theme="light"] .mobile-drawer,
html[data-theme="light"] .equity-curve-card,
html[data-theme="light"] .checkout-summary,
html[data-theme="light"] .admin-stat-card,
html[data-theme="light"] .audit-kpi-card,
html[data-theme="light"] .odds-matrix-card,
html[data-theme="light"] .match-poll-card,
html[data-theme="light"] .app-footer,
html[data-theme="light"] .pwa-install-banner,
html[data-theme="light"] .logbox {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
}

html[data-theme="light"] .rhl-beta-banner {
  background: var(--surface-2);
  border-color: rgba(2, 132, 199, 0.25);
}

html[data-theme="light"] .paywall-overlay,
html[data-theme="light"] .scanner-paywall-overlay {
  background: var(--surface-2);
}

html[data-theme="light"] .paywall-card {
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .poll-btn-action {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="light"] .poll-comparison-row {
  background: var(--surface-2);
  border-color: var(--line-soft);
}

html[data-theme="light"] .prob-seg-p1 {
  color: #ffffff;
}

html[data-theme="light"] .skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
}

html[data-theme="light"] .mobile-league-grid button.active,
html[data-theme="light"] #sync-badge.syncing {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(2, 132, 199, 0.35);
}

html[data-theme="light"] .btn-pro-tier {
  background: var(--surface-2);
  color: var(--text-heading);
  border-color: var(--border-strong);
}
html[data-theme="light"] .btn-pro-tier:hover {
  background: var(--ink-inv-bg);
  color: var(--ink-inv-fg);
  border-color: var(--ink-inv-bg);
}

html[data-theme="light"] .ice-rink-card,
html[data-theme="light"] .momentum-wave-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text);
}

html[data-theme="light"] .goalie-net-widget {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="light"] .rink-container {
}
html[data-theme="light"] .rink-zones-legend {
  color: var(--text-dim, #475569);
  border-top-color: var(--border);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

html[data-theme="light"] table th {
  color: var(--text-dim);
  border-bottom-color: var(--border);
}

html[data-theme="light"] table td {
  border-bottom-color: var(--line-soft);
}

html[data-theme="light"] .chip.gray {
  background: var(--surface-2);
  color: var(--text-dim);
  border-color: var(--border);
}

html[data-theme="light"] .user-pill {
  font-family: inherit;
  color: var(--text);
}

html[data-theme="light"] .user-pill:hover {
  border-color: var(--border-strong);
}

html[data-theme="light"] .tg-preview-card {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="light"] .toast {
  background: var(--surface);
  color: var(--text-heading);
}

html[data-theme="light"] .toast.err {
  background: var(--err-surface);
  color: var(--err-text);
}

html[data-theme="light"] .secret-parlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text-heading);
  color: var(--text);
}

html[data-theme="light"] .secret-leg-locked {
  background: var(--surface-2);
  color: var(--text);
}

html[data-theme="light"] .parlay-pill {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

/* Ergonomic scrolling & tactile polish */
.main-scroll-area {
  scrollbar-gutter: stable;
  padding-bottom: 64px;
}
.modal-content {
  overscroll-behavior: contain;
}
.btn:active, .filter-pill:active, .user-pill:active, .poll-btn-action:active, .checkout-method:active {
  transform: scale(0.97);
}
.checkout-gw-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  margin-top: 6px;
}
.journal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}
.journal-quick-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.journal-quick-form > *, .stat, input, select {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.journal-quick-form input,
.journal-quick-form select,
.journal-quick-form button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
.sidebar nav a {
  white-space: nowrap;
  gap: 8px;
}
.sidebar nav a .badge-pro-vip,
.match-day-badge {
  white-space: nowrap;
  flex-shrink: 0;
}
#btn-open-vip,
#topbar-user-wrap,
#topbar-user-wrap > * {
  flex-shrink: 0;
  white-space: nowrap;
}
.user-pill > span:not(.badge-tier) {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pill .badge-tier {
  max-width: none;
  overflow: visible;
  flex-shrink: 0;
  white-space: nowrap;
}
.calc-cmp-table th,
.calc-cmp-table td {
  padding: 8px 8px;
  font-size: 12px;
}
@media (max-width: 1380px) {
  .topbar-right .user-pill > span:not(.badge-tier) {
    max-width: 100px;
  }
  .badge-sync, #sync-badge {
    max-width: 132px;
  }
}
@media (max-width: 1180px) {
  .topbar {
    gap: 6px;
    padding: 0 10px;
  }
  .league-tabs button {
    padding: 4px 7px;
    font-size: 11.5px;
  }
  .topbar #btn-streak,
  .topbar #btn-open-ref,
  .topbar #btn-toggle-dense,
  .topbar #btn-cmd-palette,
  .topbar .topbar-divider,
  .topbar #sync-badge {
    display: none !important;
  }
  .topbar #btn-open-vip {
    padding: 0 9px;
    gap: 5px;
  }
  .topbar #btn-open-vip .pro-text {
    display: inline;
  }
}
@media (max-width: 420px) {
  .topbar #btn-open-vip .pro-text {
    display: none;
  }
}

/* Explicit hover rules gated to pointer devices */
@media (hover: hover) {
  .user-pill:hover, .filter-pill:hover, .btn-ghost:hover {
    border-color: var(--border-strong);
  }
}

/* Mobile ergonomic 44x44px hit areas + clean 2-row 390px topbar + bottom bar parity */
@media (max-width: 768px) {
  .btn, .btn-sm, .btn-icon, .mobile-nav-item, .league-tabs button, .conf-tab,
  .filter-pill, .mobile-drawer-close, .odds-btn, .quick-odd-btn, .burger-btn {
    min-height: 44px;
  }
  .btn-icon, .mobile-drawer-close, .burger-btn, .quick-odd-btn {
    min-width: 44px;
  }
  .topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 52px;
    gap: 6px 8px;
    padding: 6px 10px 8px;
  }
  .topbar .brand {
    flex-shrink: 0;
  }
  .topbar .league-tabs {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: space-between;
  }
  .topbar .league-tabs::-webkit-scrollbar { display: none; }
  .topbar .league-tabs button {
    flex: 1 0 auto;
    min-height: 36px;
    padding: 4px 10px;
    font-size: 12px;
    text-align: center;
  }
  .topbar-right {
    margin-left: auto;
    flex-shrink: 1;
    gap: 4px;
    min-width: 0;
    max-width: calc(100% - 140px);
  }
  .topbar .user-pill {
    padding: 4px 8px;
    gap: 5px;
    max-width: 138px;
  }
  .topbar .user-pill > span:not(.badge-tier) {
    max-width: 56px;
  }
  .topbar #btn-streak,
  .topbar #btn-open-ref,
  .topbar #btn-cmd-palette,
  .topbar #btn-toggle-dense,
  .topbar #btn-open-vip,
  .topbar .topbar-divider,
  .topbar #sync-badge {
    display: none !important;
  }
  .parlay-widget-wrap.minimized {
    display: none !important;
  }
  input, select, textarea {
    font-size: 16px;
  }
}
@media (max-width: 480px) {
  .topbar {
    gap: 6px 4px;
    padding: 6px 8px 8px;
  }
  .topbar .brand {
    gap: 5px;
  }
  .topbar .brand .logo {
    width: 19px;
    height: 19px;
  }
  .brand-name {
    font-size: 14.5px;
  }
  .topbar .btn,
  .topbar .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    gap: 4px;
  }
  .topbar #btn-toggle-theme,
  .topbar #btn-toggle-lang {
    min-width: 36px;
    min-height: 36px;
    padding: 4px 6px;
  }
  .topbar .burger-btn {
    min-width: 38px;
    min-height: 38px;
    padding: 4px;
  }
  .topbar #btn-settings {
    display: none !important;
  }
  .topbar .user-pill {
    max-width: 124px;
    padding: 3px 6px;
  }
  .topbar .user-pill > span:not(.badge-tier) {
    max-width: 48px;
  }
  .topbar .user-pill .badge-tier {
    font-size: 9px;
    padding: 1px 4px;
  }
}

/* ==========================================================================
   i18n Language Switcher & Compact Mode Refinements
   ========================================================================== */
.lang-switch-btn {
  padding: 4px 8px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  font-size: 11px !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-switch-btn:hover {
  border-color: var(--blue) !important;
  background: var(--blue-soft) !important;
  color: var(--blue) !important;
}

.lang-pill {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--blue);
  padding: 1px 4px;
  border-radius: 4px;
}

#btn-toggle-dense.active {
  background: var(--blue-soft) !important;
  color: var(--blue) !important;
  border-color: var(--blue) !important;
}

body.dense-mode .match-card {
  padding: 10px 12px !important;
  margin-bottom: 8px !important;
}

body.dense-mode .matches-grid {
  gap: 8px !important;
}

/* ==========================================================================
   PRO Scanner Paywall Blur Overlay
   ========================================================================== */
.scanner-paywall-wrap {
  position: relative;
  margin-top: 14px;
  min-height: 290px;
}

.scanner-paywall-blur {
  filter: blur(6px) opacity(0.35);
  pointer-events: none;
  user-select: none;
}

.scanner-paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-float);
}

.paywall-crown-big {
  width: 36px;
  height: 36px;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.paywall-overlay-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.paywall-overlay-desc {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 460px;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ==========================================================================
   Editorial Metrics Ledger (Monochrome Precision — Zero Rainbow KPI Slop)
   ========================================================================== */
.quant-trust-badge {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  padding: 14px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0 20px;
  position: relative;
}

.trust-item:not(:last-child) {
  border-right: 1px solid var(--border);
}

.trust-val,
.trust-val.highlight,
.trust-val.green,
.trust-val.gold {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-heading);
  letter-spacing: -0.03em;
}

.trust-lbl {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .quant-trust-badge {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
    padding: 12px 0;
  }
  .trust-item:nth-child(2) {
    border-right: none;
  }
  .trust-item:nth-child(1), .trust-item:nth-child(2) {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .trust-item:nth-child(3), .trust-item:nth-child(4) {
    padding-top: 4px;
  }
  .trust-val {
    font-size: 17px;
  }
}

/* ==========================================================================
   Editorial Fan Brief (Clean Hairline Box — Zero Side-Stripe)
   ========================================================================== */
.fan-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.fan-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.fan-summary-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 14px;
  max-width: 78ch;
}

.fan-summary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.quant-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.quant-accordion-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--blue-soft);
}

/* ==========================================================================
   IceCore v6.0 — Design Engineering, Simplified Pricing, Two-Tab Audit,
   Inline Fair Odds / +EV Calculator, Password UX & Legal Compliance
   ========================================================================== */

/* Tactile micro-interactions & pointer-aware hover polish */
.btn:active:not(:disabled),
.audit-tab-btn:active,
.pred-subtab-btn:active,
.pw-toggle-btn:active {
  transform: scale(0.97);
}

@media (hover: none) and (pointer: coarse) {
  .vip-tier:hover,
  .vip-tier-compact:hover {
    transform: none;
  }
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11.5px;
  line-height: 1.3;
  border-radius: 6px;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: color 0.16s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.16s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-link:hover {
    color: var(--text-heading);
    background: var(--surface-2);
  }
}

.modal-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: -2px;
}

/* Simplified 3+2 Pricing Architecture (v6.0) */
.vip-grid-primary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.vip-secondary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.vip-tier-compact {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.vip-tier-compact.syndicate {
  background: var(--blue-soft);
  border-color: var(--blue-soft);
}

@media (hover: hover) and (pointer: fine) {
  .vip-tier-compact:hover {
    border-color: var(--border-strong);
  }
  .vip-tier-compact.syndicate:hover {
    border-color: var(--blue);
  }
}

.vip-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vip-compact-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.48;
  margin-bottom: 4px;
}

@media (max-width: 820px) {
  .vip-grid-primary {
    grid-template-columns: 1fr;
  }
  .vip-secondary-row {
    grid-template-columns: 1fr;
  }
}

/* Two-Tab Scientific Audit (Walk-Forward + Live SHA-256) */
.audit-tab-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.audit-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s cubic-bezier(0.23, 1, 0.32, 1),
              color 0.18s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.18s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.12s ease;
}

.audit-tab-btn.active {
  background: var(--surface-3);
  color: var(--text-heading);
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

@media (hover: hover) and (pointer: fine) {
  .audit-tab-btn:not(.active):hover {
    color: var(--text);
    background: var(--line);
  }
}

.sha-code-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.5;
}

/* Honest Fair Odds & Interactive +EV / Kelly Inline Calculator */
.fair-benchmark-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-soft);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
}

.quick-ev-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.inline-ev-input,
.inline-ev-input-sm {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 12.5px;
  font-weight: 600;
  width: 84px;
  text-align: center;
  transition: border-color 0.16s ease;
}

.inline-ev-input-sm {
  width: 72px;
  padding: 4px 6px;
  font-size: 12px;
}

.inline-ev-input:focus,
.inline-ev-input-sm:focus {
  border-color: var(--color-focus);
}

/* Password Eye Toggle & Strength Meter */
.pw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-input-wrap input {
  width: 100%;
  padding-right: 42px;
}

.pw-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.pw-toggle-btn:active {
  transform: translateY(-50%) scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
  .pw-toggle-btn:hover {
    color: var(--text-heading);
    background: var(--surface-3);
  }
}

.pw-strength-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.pw-strength-bar {
  flex: 1;
  height: 5px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.pw-strength-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.22s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.22s ease;
}

.pw-strength-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  min-width: 72px;
  text-align: right;
}

/* Checkout Promo Row & Gateway Badge */
.checkout-promo-row input {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 38px;
}

.checkout-promo-row input:focus {
  border-color: var(--color-focus);
}

.checkout-gw-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

/* Anti-Abuse Referral Modal KPI Strip & Steps */
.ref-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.ref-ladder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .ref-kpi-strip {
    grid-template-columns: 1fr;
  }
  .audit-tab-bar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .audit-tab-btn {
    justify-content: center;
    min-height: 44px;
    font-size: 12px;
    padding: 8px 10px;
  }
  .pw-toggle-btn {
    width: 42px;
    height: 42px;
  }
  .inline-ev-input {
    min-height: 44px;
    width: 92px;
  }
}

/* Footer Legal Self-Employed (НПД) Bar */
.footer-legal-entity {
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 8px 12px;
  margin: 8px 0;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  line-height: 1.45;
}

/* Light-Theme Overrides for v6.0 Components */
html[data-theme="light"] .audit-tab-bar {
  background: var(--surface-2);
  border-color: var(--border);
}

html[data-theme="light"] .audit-tab-btn.active {
  background: var(--surface);
  color: var(--text-heading);
  border-color: var(--border-strong);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .sha-code-box {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-heading);
}

html[data-theme="light"] .fair-benchmark-notice {
  background: var(--blue-soft);
  border-color: rgba(2, 132, 199, 0.25);
  color: var(--text-heading);
}

html[data-theme="light"] .vip-tier-compact {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .vip-tier-compact.syndicate {
  background: var(--surface-2);
  border-color: rgba(2, 132, 199, 0.35);
}

html[data-theme="light"] .footer-legal-entity {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-dim);
}

html[data-theme="light"] .inline-ev-input,
html[data-theme="light"] .inline-ev-input-sm {
  background: var(--surface);
  color: var(--text-heading);
  border-color: var(--border-strong);
}

html[data-theme="light"] .quant-accordion-toggle {
  background: var(--surface-2);
  color: var(--text-dim);
  border-color: var(--border);
}

html[data-theme="light"] .quant-accordion-toggle:hover {
  background: var(--surface-3);
  color: var(--text-heading);
}

/* ==========================================================================
   IceCore v6.1 — Missing Utility Classes, Real Quant Visuals & Mobile Cards
   ========================================================================== */

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  transition: background 0.16s var(--ease-out-quart, ease), border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover {
    background: var(--surface-2);
    border-color: var(--blue);
    color: var(--text-heading);
  }
}

.chip-sm {
  font-size: 10.5px;
  padding: 2px 7px;
  line-height: 1.3;
}
.chip.purple {
  background: var(--purple-soft);
  color: var(--purple);
  border: 1px solid var(--purple-soft);
}
.font-mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.small {
  font-size: 11.5px;
}

/* Fix heatmap & light-theme text contrast */
html[data-theme="light"] .hm-score {
  color: var(--text-heading);
}
html[data-theme="light"] .hash-pill:hover {
  color: var(--text-heading);
  background: var(--surface-3);
}
html[data-theme="light"] .btn-matrix-add:hover {
  color: var(--text-heading);
}
html[data-theme="light"] .announcement-bar.ann-promo {
  background: var(--accent-soft);
  border-bottom-color: rgba(180, 83, 9, 0.28);
}
html[data-theme="light"] .announcement-bar.ann-info {
  background: var(--surface-2);
  border-bottom-color: rgba(2, 132, 199, 0.28);
}

/* 1. Real Interactive 7x7 Dixon-Coles Score Matrix Heatmap */
.dc-quant-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.dc-matrix-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dc-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
  min-width: 310px;
}
.dc-matrix-table th {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
  padding: 4px 2px;
  background: transparent;
  border: none;
}
.dc-matrix-table td {
  padding: 0;
  border: none;
}
.dc-matrix-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-heading);
  transition: transform 0.14s var(--ease-out-quart, ease), border-color 0.14s ease;
  cursor: default;
}
.dc-matrix-cell .dc-sc {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.65;
  line-height: 1.1;
}
.dc-matrix-cell.is-top {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber-soft);
}
.dc-matrix-cell.is-diag {
  border-style: dashed;
}
@media (hover: hover) and (pointer: fine) {
  .dc-matrix-cell:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
  }
}

.dc-top-scores-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dc-top-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.dc-top-score-row.primary {
  border-color: var(--amber-soft);
  background: var(--amber-soft);
}
.dc-score-pill {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-heading);
  min-width: 42px;
}
.dc-ci-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.dc-ci-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 3px 0;
  font-family: var(--mono);
}

/* 2. Real Per-Period Expected Goals & Factor Attribution */
.period-xg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.period-xg-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.period-xg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.period-xg-vals {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.period-xg-bar {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: var(--surface-3);
  margin-bottom: 8px;
}
.period-xg-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.factor-wf-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}
.factor-wf-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) minmax(80px, 1.5fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-size: 12px;
}
.factor-wf-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  overflow: hidden;
}
.factor-wf-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

/* 3. Adaptive Mobile Match Card Stack (zero horizontal scroll <768px) */
.mobile-match-cards {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.mobile-match-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mmc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.mmc-teams {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 0;
  line-height: 1.3;
}
.mmc-odds-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.mmc-odds-row .quick-odd-btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.mmc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

/* 4. Global Currency Pill & Odds API Quota Bar */
.currency-store-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--blue-soft);
}
.quota-meter-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin: 8px 0;
}
.quota-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s var(--ease-out-quart, ease);
}

@media (max-width: 820px) {
  .dc-quant-grid {
    grid-template-columns: 1fr;
  }
  .period-xg-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility & UI Polish v6.2 (better-ui + better-accessibility) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.checkout-method:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.btn:active:not(:disabled),
.btn-icon:active:not(:disabled),
.league-tabs button:active:not(:disabled) {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 768px) {
  .upcoming-tbl-wrap {
    display: none;
  }
  .mobile-match-cards {
    display: flex;
  }
  .btn, .filter-pill, .mobile-nav-link, .auth-tab, .pw-toggle-btn, .announcement-close {
    min-height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 480px) {
  .btn-icon, .league-tabs button, .mobile-league-grid button, .filter-pill {
    min-height: 44px;
  }
  .factor-wf-row {
    grid-template-columns: 1fr auto;
  }
  .factor-wf-track {
    display: none;
  }
}


/* ==========================================================================
   Strict PRO Paywall, Layout Polish & Mobile/Desktop Responsiveness Fixes
   ========================================================================== */

.pro-gate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  gap: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: var(--amber-soft);
}

.pro-gate-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.pro-gate-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.14);
  padding: 4px 10px;
  border-radius: 999px;
}
html[data-theme="light"] .pro-gate-badge {
  color: #92400e;
  background: rgba(180, 83, 9, 0.12);
  border: 1px solid rgba(180, 83, 9, 0.28);
}
html[data-theme="light"] .conf-badge.west { color: #0369a1; background: rgba(2, 132, 199, 0.12); }
html[data-theme="light"] .conf-badge.east { color: #92400e; background: rgba(180, 83, 9, 0.12); }
html[data-theme="light"] .f-dot.f-ot { color: #92400e; }
html[data-theme="light"] .pbl-p1 { color: #0369a1; }
html[data-theme="light"] .pbl-p2 { color: #be123c; }
html[data-theme="light"] .sidebar-tg-link { color: #0369a1 !important; }
html[data-theme="light"] .odds-filter-btn.active { color: #0369a1; border-color: rgba(2, 132, 199, 0.45); background: rgba(2, 132, 199, 0.10); }
html[data-theme="light"] .matchup-val-home { color: #0369a1; }
html[data-theme="light"] .onboarding-step-num { color: #0369a1; background: rgba(2, 132, 199, 0.12); }
@media (max-width: 480px) {
  .ref-kpi-strip { grid-template-columns: 1fr !important; }
}

.pro-gate-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.pro-gate-sub {
  margin: 0;
  max-width: 540px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

.pro-gate-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  max-width: 440px;
  width: 100%;
}

.pro-gate-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
}

.pro-gate-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.pro-lock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pro-lock-pill:hover {
  border-color: var(--amber);
}

.pro-lock-pill .ic {
  width: 11px;
  height: 11px;
  color: var(--amber);
}

html[data-theme="light"] .pro-lock-pill {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--border-strong);
}

html[data-theme="light"] .pro-lock-pill:hover {
  border-color: var(--amber);
}

html[data-theme="light"] .pro-lock-pill .ic {
  color: var(--amber);
}

/* Hide floating Combinator FAB whenever a modal is open so it never blocks modal buttons */
body.modal-open #parlay-widget,
body.modal-open .parlay-widget-wrap {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Extra bottom breathing room so floating Combinator FAB never covers bottom action buttons */
.main,
.content,
#sec-body,
#section-body {
  padding-bottom: 92px;
}

/* Strict horizontal containment across grid/flex layouts so wide tables always scroll inside .tbl-wrap */
.layout,
.main-scroll-area,
.content,
#sec-body,
.card,
.grid,
.grid > * {
  min-width: 0;
  max-width: 100%;
}

.page-title,
.page-sub {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .content {
    padding: 16px 14px 96px !important;
  }
}

/* Prevent topbar sync badge wrapping onto 2 lines */
.topbar #sync-badge,
#sync-badge {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Prevent sidebar nav text & badges from colliding in RU/EN */
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-item .nav-badge,
.nav-item .chip {
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Balanced 3x2 grid for Audit Tab A 6 KPI cards instead of 5+1 orphan */
.audit-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
@media (max-width: 900px) {
  .audit-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Responsive table scroll containment on desktop & tablet */
.tbl-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1360px) and (min-width: 769px) {
  .tbl-wrap table th,
  .tbl-wrap table td {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 12.5px;
  }
}

/* Mobile fixes (390px): Combinator drawer above bottom nav, crisp pills, no squished headers */
@media (max-width: 768px) {
  #parlay-widget:not(.minimized),
  .parlay-widget-wrap:not(.minimized) {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: var(--z-drawer) !important;
    max-height: calc(100dvh - 80px - env(safe-area-inset-bottom, 0px)) !important;
  }
  .parlay-widget {
    max-height: calc(100dvh - 86px - env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    padding-bottom: 16px !important;
  }
  .mobile-drawer .league-btn,
  .league-pills button,
  .chip,
  .secret-parlay-card .chip {
    white-space: nowrap;
  }
  .card-title {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .card-title .hint {
    margin-left: 0;
    width: 100%;
  }
}

/* ==========================================================================
   Swiss Editorial Quant Desk v6.7 — Final Craft & Anti-Slop Polish Layer
   ========================================================================== */

/* Calm 52px topbar + crisp typography */
.topbar {
  height: 52px;
  padding: 0 18px;
  gap: 12px;
}

.content {
  padding: 24px 32px 104px;
  max-width: 1280px;
}

.page-head {
  margin-bottom: 18px;
  animation: none;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.2;
}

.page-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Cards: flat hairline containment, no heavy hover jump or enter flicker */
.card {
  animation: none;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: var(--border);
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.card-title > .ic {
  color: var(--text-faint);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.btn .ic {
  color: currentColor;
  flex-shrink: 0;
}
.btn-primary .ic {
  color: var(--accent-ink);
}

/* Hairline Daily Combinator Slip (Zero Card-in-Card Nesting) */
.secret-parlay-card {
  padding: 16px 20px;
}
.secret-parlay-list {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}
.secret-leg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.secret-leg-row:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}
.secret-leg-row:hover {
  background: var(--line-soft);
}
.secret-leg-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  width: 22px;
  flex-shrink: 0;
}
.secret-leg-main {
  min-width: 0;
  flex: 1;
}
.secret-leg-match {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
}
.secret-leg-market {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.secret-leg-nums {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.secret-leg-prob {
  font-size: 12px;
  color: var(--text-dim);
}
.secret-leg-odd {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  min-width: 40px;
  text-align: right;
}
.secret-meta-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-heading);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}
.secret-status-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.03em;
}

/* Precision Upcoming Matches Table — Zero Pill-Soup & Zero Right-Edge Clipping at 1440px */
.upcoming-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.upcoming-tbl thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 6px 6px 8px;
  border-bottom: 1px solid var(--border);
}
.upcoming-tbl tbody td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.upcoming-tbl tbody tr:hover {
  background: var(--line-soft);
}
.match-time-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}
.upcoming-tbl td.t-name {
  white-space: normal;
  min-width: 195px;
}
.upcoming-tbl .link {
  display: inline-block;
  min-height: 24px;
  line-height: 1.45;
  padding: 3px 0;
  color: var(--text-heading);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.upcoming-tbl .link:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.match-meta-inline {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.35;
}
.match-xg-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}
.match-exact-tag {
  display: inline-block;
  margin-left: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 1px 4px;
}

/* Exchange-style precision Fair Odds buttons */
.quick-odd-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 6px;
  min-width: 54px;
  justify-content: space-between;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform 90ms var(--ease-out);
}
.quick-odd-btn:hover {
  border-color: var(--text-dim);
  background: var(--surface-3);
  color: var(--text-heading);
  transform: none;
}
.quick-odd-btn.best-pick {
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: var(--text-heading);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.quick-odd-btn .qo-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-faint);
}
.quick-odd-btn .qo-val {
  font-weight: 600;
  color: var(--text-heading);
}
.quick-odd-btn .qo-plus {
  display: none;
}

.pick-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-heading);
}
.pick-tag.is-strong {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--border);
}

/* Clean User Pill in Topbar (no double-pill clutter) */
.user-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  gap: 7px;
}
.user-pill .badge-tier {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* Clean Filter Pills & Search Box */
.filter-pill {
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-heading);
}
.filter-pill.active {
  background: var(--ink-inv-bg);
  border-color: var(--ink-inv-bg);
  color: var(--ink-inv-fg);
}

/* Keep Floating Combinator pill sleek & unobtrusive */
.parlay-widget-wrap.minimized {
  right: 20px;
  bottom: 16px;
}
.parlay-pill .parlay-count {
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.parlay-pill-active .parlay-count {
  background: var(--ink-inv-bg);
  color: var(--ink-inv-fg);
}

/* Ensure Light Theme parity for active tabs, modals, and secondary surfaces */
html[data-theme="light"] .sidebar {
  background: var(--bg);
}
html[data-theme="light"] .sidebar nav a.active {
  background: var(--surface-2);
  color: var(--text-heading);
}
html[data-theme="light"] .vip-tier.featured {
  background: var(--surface);
  border-color: var(--text-heading);
}
html[data-theme="light"] .vt-price {
  color: var(--text-heading);
}
html[data-theme="light"] .vt-badge.hot {
  color: var(--accent);
}
html[data-theme="light"] .parlay-pill {
  background: var(--ink-inv-bg);
  color: var(--ink-inv-fg);
  border-color: transparent;
  box-shadow: var(--shadow-float);
}
html[data-theme="light"] .parlay-pill-active {
  background: var(--accent);
  color: var(--accent-ink);
}
html[data-theme="light"] .secret-parlay-card {
  background: var(--surface);
  border-color: var(--border);
  border-top: 2px solid var(--text-heading);
}
html[data-theme="light"] .match-day-header.today .match-day-title {
  color: var(--text-heading);
}
html[data-theme="light"] .pbl-p1 {
  color: var(--blue);
}
html[data-theme="light"] .pbl-p2 {
  color: var(--accent-text);
}
html[data-theme="light"] .fan-summary-header {
  color: var(--text-dim);
}
html[data-theme="light"] .lang-pill {
  color: var(--text-heading);
}
.lang-pill {
  color: var(--text-heading);
}
.lang-switch-btn {
  border-color: var(--border) !important;
}
.lang-switch-btn:hover {
  border-color: var(--border-strong) !important;
  background: var(--surface-2) !important;
  color: var(--text-heading) !important;
}

/* Consistent focus ring — instant, never animated */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  transition: none;
}

/* Mobile topbar auto-height & single-line badges (never overlap content at 320–768px) */
@media (max-width: 768px) {
  .topbar {
    height: auto;
    min-height: 52px;
    padding: 6px 10px 8px;
    gap: 6px 8px;
    flex-wrap: wrap;
  }
  .topbar-right {
    flex-wrap: nowrap;
  }
  .secret-meta-pill {
    white-space: nowrap;
  }
}

/* ==========================================================================
   Swiss Editorial v6.8 — Cross-Section Zero-Slop Polish (All Views & Themes)
   ========================================================================== */

/* Unified hairline-divided Editorial Stat Ledger (Team / Special Teams) */
.editorial-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.editorial-stat-grid.editorial-stat-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 0;
  background: var(--surface-2);
}
.es-cell {
  padding: 15px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.editorial-stat-grid:not(.editorial-stat-5) .es-cell:nth-child(3n) {
  border-right: 0;
}
.editorial-stat-grid:not(.editorial-stat-5) .es-cell:nth-last-child(-n+3) {
  border-bottom: 0;
}
.editorial-stat-5 .es-cell {
  border-bottom: 0;
}
.editorial-stat-5 .es-cell:last-child {
  border-right: 0;
}
.es-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  line-height: 1.2;
}
.es-val.pos { color: var(--green); }
.es-val.neg { color: var(--accent-text); }
.es-lbl {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.35;
}
@media (max-width: 820px) {
  .editorial-stat-grid,
  .editorial-stat-grid.editorial-stat-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .es-cell {
    border-right: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
  }
}

/* Unified Swiss Audit KPI Ledger (zero rainbow floating cards) */
.audit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.audit-kpi-card,
.audit-kpi-card.highlight {
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 16px 20px !important;
  min-width: 0;
}
.audit-kpi-lbl {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
}
.audit-kpi-card:nth-child(3n) {
  border-right: 0 !important;
}
.audit-kpi-card:nth-last-child(-n+3) {
  border-bottom: 0 !important;
}
@media (max-width: 900px) {
  .audit-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .audit-kpi-card:nth-child(3n) {
    border-right: 1px solid var(--border) !important;
  }
  .audit-kpi-card:nth-child(2n) {
    border-right: 0 !important;
  }
  .audit-kpi-card:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--border) !important;
  }
  .audit-kpi-card:nth-last-child(-n+2) {
    border-bottom: 0 !important;
  }
  .audit-kpi-card,
  .audit-kpi-card.highlight {
    padding: 12px 12px !important;
  }
  .audit-kpi-lbl {
    font-size: 10px !important;
    letter-spacing: 0.03em !important;
  }
  .audit-kpi-val {
    font-size: 19px !important;
  }
}
@media (max-width: 380px) {
  .audit-kpi-card,
  .audit-kpi-card.highlight {
    padding: 10px 10px !important;
  }
  .audit-kpi-lbl {
    font-size: 9.5px !important;
  }
  .audit-kpi-val {
    font-size: 17px !important;
  }
}
.main-scroll-area,
.card,
.matches-slate-section,
.match-day-group {
  min-width: 0;
  max-width: 100%;
}
.audit-kpi-val {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
  color: var(--text-heading);
}
.audit-kpi-val.pos { color: var(--green); }
.audit-kpi-val.neg { color: var(--accent-text); }

/* Clean Neutral Scanner Radar Items (zero red error frames or double pills) */
.radar-signal-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.radar-signal-item:hover {
  border-color: var(--border-strong);
}
.radar-signal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.radar-signal-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.radar-signal-src {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}
.radar-signal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.35;
}
.radar-signal-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 3px;
  line-height: 1.4;
}
.radar-signal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

/* Crowd vs Model Poll — Zero Purple, Clean Slate vs Steel-Blue */
.poll-bar-track {
  background: var(--surface-3);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}
.poll-bar-fill-crowd {
  background: var(--text-dim) !important;
  box-shadow: none !important;
}
.poll-bar-fill-quant {
  background: var(--blue) !important;
  box-shadow: none !important;
}
.poll-consensus-note {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 4px;
  line-height: 1.45;
}
.match-poll-card {
  border-color: var(--border) !important;
}

/* Simulator Arena — Calm Neutral Surface (zero blue/pink box wash) */
.sim-arena,
html[data-theme="light"] .sim-arena {
  background: var(--surface);
  border: 1px solid var(--border);
}
.sim-score-center {
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.card .stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* 7x7 Score Matrix & Top-5 Exact Scores — Zero Neon Yellow or Glowing Dots */
.rink-legend-dot {
  box-shadow: none !important;
  border-radius: 2px;
}
.dc-matrix-cell.is-top {
  border: 1.5px solid var(--text-heading) !important;
  box-shadow: none !important;
}
.dc-matrix-cell.is-diag {
  border-style: solid;
}
.dc-top-score-row.primary {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.hm-cell.hm-best {
  border: 1.5px solid var(--text-heading) !important;
  box-shadow: none !important;
}
.hm-score {
  color: var(--text-dim);
}

/* Fair Benchmark Notice — Neutral Hairline Banner */
.fair-benchmark-notice,
html[data-theme="light"] .fair-benchmark-notice {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Standings Table Craft: Crisp Ink Team Names & Subtle Mono ELO */
table td .link {
  display: inline-block;
  min-height: 24px;
  line-height: 1.45;
  padding: 3px 0;
  color: var(--text-heading);
  font-weight: 600;
}
table td .link:hover {
  color: var(--blue);
}
.elo-badge,
.elo-elite,
.elo-mid,
.elo-low {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-heading);
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  font-weight: 600;
}
.elo-elite { color: var(--green); }
.elo-mid { color: var(--text-heading); }
.elo-low { color: var(--text-dim); }
html[data-theme="light"] .conf-badge.west,
html[data-theme="light"] .conf-badge.east {
  background: var(--surface-2);
  color: var(--text-dim);
  border-color: var(--border);
}

/* Unobtrusive Floating Combinator Pill when empty (0 legs) — lights up only when active */
.parlay-widget-wrap.minimized {
  right: 14px;
  bottom: 12px;
}
.parlay-pill:not(.parlay-pill-active),
html[data-theme="light"] .parlay-pill:not(.parlay-pill-active) {
  height: 32px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  opacity: 0.86;
}
.parlay-pill:not(.parlay-pill-active):hover,
html[data-theme="light"] .parlay-pill:not(.parlay-pill-active):hover {
  opacity: 1;
  color: var(--text-heading);
  border-color: var(--text-dim);
  transform: none;
}
.parlay-pill:not(.parlay-pill-active) .parlay-count {
  background: var(--surface-3);
  color: var(--text-dim);
  min-width: 18px;
  height: 18px;
  font-size: 10.5px;
}

/* ==========================================================================
   Swiss Ice Broadsheet v6.9 — Studio Editorial Composition & Visual Rhythm
   ========================================================================== */

/* 1. Asymmetric Editorial Masthead */
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 28px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-strong);
}
.page-head-main {
  min-width: 0;
}
.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.036em;
  line-height: 1.08;
  color: var(--text-heading);
}
.page-sub {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.48;
  max-width: 66ch;
}
.page-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  flex-shrink: 0;
  padding-bottom: 2px;
}
.page-meta-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-heading);
  padding: 2px 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
}
.page-meta-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--text-faint);
}

/* 2. Flush Canvas-Native Telemetry Strip (Breaks Uniform Card Stack!) */
.quant-trust-badge {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 24px;
  padding: 2px 0 18px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.trust-item {
  padding: 0 18px;
}
.trust-item:first-child {
  padding-left: 0;
}
.trust-item:last-child {
  padding-right: 0;
}
.trust-val,
.trust-val.highlight,
.trust-val.green,
.trust-val.gold {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.trust-lbl {
  font-size: 10px;
  letter-spacing: 0.055em;
  margin-top: 5px;
}

/* 3. Horizontal 3-Column Feature Strip for Daily Quant Slip */
.secret-parlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text-heading);
  border-radius: var(--radius-md);
  padding: 0;
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.secret-parlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.secret-parlay-head-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.secret-kicker {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-text);
}
.secret-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.secret-parlay-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.secret-parlay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.secret-leg-col {
  min-width: 0;
  padding: 16px 18px 17px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.secret-leg-col:last-child {
  border-right: 0;
}
.secret-leg-col:hover {
  background: var(--line-soft);
}
.secret-leg-col.secret-leg-locked {
  cursor: pointer;
}
.secret-leg-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.secret-leg-idx {
  width: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.secret-leg-nums {
  gap: 8px;
}
.secret-leg-odd {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  min-width: 0;
}
.secret-leg-prob {
  font-size: 11.5px;
  color: var(--text-dim);
}
.secret-leg-match {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-heading);
  line-height: 1.3;
}
.secret-leg-market {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.4;
}

/* 4. Canvas-Native Upcoming Matches Slate (Zero Double-Box Wrapper) */
.matches-slate-section {
  margin-bottom: 28px;
}
.slate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.slate-head-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.slate-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--text-heading);
}
.slate-hint {
  font-size: 12px;
  color: var(--text-faint);
}
.slate-count-tag {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-heading);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: var(--radius-xs);
}
.matches-slate-section .toolbar-bar {
  margin-bottom: 16px;
}
.matches-slate-section .match-day-group {
  margin-bottom: 20px;
}
.matches-slate-section .match-day-header {
  padding: 10px 2px 9px;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border-strong);
}
.matches-slate-section .match-day-header.today {
  background: transparent;
  border-bottom: 2px solid var(--text-heading);
}
.matches-slate-section .match-day-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-heading);
}
.matches-slate-section .match-day-title .ic {
  display: none;
}
/* today marker uses text label without decorative dot */
.matches-slate-section .upcoming-tbl-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow);
}
.matches-slate-section .upcoming-tbl thead th {
  padding: 9px 8px;
  background: var(--surface-2);
}
.matches-slate-section .upcoming-tbl tbody td {
  padding: 10px 8px;
}
.matches-slate-section .upcoming-tbl tbody tr:last-child td {
  border-bottom: 0;
}

/* 5. Match Forecast Lead Verdict & Period Scoreboard Polish */
.fan-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text-heading);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.period .dist-bar > span:first-child {
  background: var(--text-faint) !important;
  opacity: 0.42;
}
.periods-summary-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr);
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}
.psl-cell {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--border);
}
.psl-cell:last-child {
  border-right: 0;
}
.psl-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  line-height: 1.15;
}
.psl-lbl {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.35;
}
.psl-alt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.psl-alt-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-dim);
}
.psl-alt-item b {
  color: var(--text-heading);
  font-weight: 700;
}

/* 6. Tactile Micro-Interactions & Crisp Icon Color Inheritance */
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.btn .ic,
.btn svg.ic {
  color: currentColor !important;
}
.btn-primary .ic,
.btn-primary svg.ic {
  color: var(--accent-ink) !important;
}

/* 7. Studio Colophon Footer */
.app-footer {
  border-top: 1px solid var(--border-strong);
  padding: 28px 34px 36px;
}
.footer-top {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.footer-brand {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.footer-disclaimer {
  max-width: 92ch;
}

/* 8. Responsive Breakpoints for Broadsheet Overhaul */
@media (max-width: 920px) {
  .secret-parlay-grid {
    grid-template-columns: 1fr;
  }
  .secret-leg-col {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 13px 16px;
  }
  .secret-leg-col:last-child {
    border-bottom: 0;
  }
  .periods-summary-ledger {
    grid-template-columns: 1fr;
  }
  .psl-cell {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .psl-cell:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 768px) {
  .page-head {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 16px;
  }
  .page-head-meta {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
  }
  .quant-trust-badge {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
    padding: 4px 0 14px;
  }
  .trust-item {
    padding: 0 12px;
  }
  .trust-item:nth-child(odd) {
    padding-left: 0;
  }
  .trust-item:nth-child(even) {
    border-right: 0;
    padding-right: 0;
  }
  .matches-slate-section .upcoming-tbl-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 440px) {
  .topbar .user-pill > span:not(.badge-tier):not(.user-avatar-circle) {
    display: none;
  }
}

#checkout-tier-price {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.15;
}
#checkout-tier-price span {
  white-space: nowrap;
  margin-right: 0 !important;
}


/* ============ Accessibility, Reflow & Modal Fit Additions ============ */
button.secret-leg-col {
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
}
button.secret-leg-col:last-child {
  border-right: 0;
}
@media (max-width: 920px) {
  button.secret-leg-col {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  button.secret-leg-col:last-child {
    border-bottom: 0;
  }
}

.th-sort-btn {
  appearance: none;
  background: transparent;
  border: 0;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 4px;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.th-sort-btn:hover {
  color: var(--text-heading);
}

.pro-cell-muted {
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.error-recovery-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#vip-modal .modal-content {
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  padding: 0;
}
#vip-modal .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 18px !important;
}
#vip-modal .vip-tier {
  padding: 14px 16px;
}
#vip-modal .vt-price {
  font-size: 21px;
  margin-bottom: 10px;
}
#vip-modal .vt-features {
  margin-bottom: 12px;
}
#vip-modal .vip-secondary-row {
  margin-bottom: 12px;
}
#vip-modal .vip-tier-compact {
  padding: 12px 14px;
  gap: 8px;
}

#sync-badge:empty {
  display: none !important;
}

.upcoming-tbl {
  table-layout: fixed;
}
.pro-locked-span {
  color: var(--text-dim);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-wf-tbl th,
.audit-wf-tbl td {
  padding: 8px 6px;
  font-size: 12px;
}

@media (max-width: 980px), (pointer: coarse) {
  .search-kbd {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-head {
    padding-bottom: 10px;
    margin-bottom: 12px;
  }
  .page-head-meta {
    display: none;
  }
}

@media (max-width: 768px) {
  .pro-lock-pill {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 12.5px;
  }
}

@media (max-width: 980px) {
  #parlay-widget:not(.minimized),
  .parlay-widget-wrap:not(.minimized) {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: var(--z-drawer) !important;
    max-height: calc(100dvh - 80px - env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Keep 200% zoom (e.g. 640x400) chrome compact so >=75% of viewport stays readable */
@media (max-height: 480px) and (max-width: 980px) {
  .topbar {
    flex-wrap: nowrap;
    height: 44px;
    min-height: 44px;
    padding: 0 8px;
    gap: 6px;
  }
  .topbar .league-tabs {
    order: 0;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .topbar .league-tabs button {
    min-height: 30px;
    padding: 3px 7px;
    font-size: 11px;
  }
  .topbar .burger-btn,
  .topbar #btn-toggle-theme,
  .topbar #btn-toggle-lang {
    min-height: 32px;
    min-width: 32px;
  }
  .mobile-nav {
    height: 46px;
  }
  .mobile-nav-item {
    min-height: 44px;
    padding: 2px 0;
    gap: 1px;
  }
  .layout {
    margin-bottom: 46px;
  }
}

.scanner-tbl th,
.scanner-tbl td {
  padding: 7px 5px;
  font-size: 12px;
}
.scanner-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.scanner-actions .btn-sm {
  padding: 4px 8px;
  font-size: 11.5px;
}

@media (max-width: 640px) {
  .recent-results-tbl {
    table-layout: fixed;
    width: 100%;
  }
  .recent-results-tbl th,
  .recent-results-tbl td {
    padding: 6px 4px;
    font-size: 11px;
    white-space: normal;
    word-break: break-word;
  }
}
