*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ClickTV surfaces — official dark palette */
  --bg:        #141414;
  --bg-card:   #1e1e1e;
  --bg-card2:  #272829;
  --bg-hover:  #2d2d2d;

  /* ClickTV Electric Blue — primary brand color */
  --accent:    #0077FF;
  --accent-dim: rgba(0,119,255,0.14);
  --accent-glow: 0 0 30px rgba(0,119,255,0.3), 0 0 60px rgba(0,119,255,0.1);

  /* ClickTV Premium Gold — also WC 2026 championship */
  --gold:      #E0A500;
  --gold-dim:  rgba(224,165,0,0.14);
  --gold-glow: 0 0 24px rgba(224,165,0,0.4);

  /* ClickTV alert colors */
  --red:       #FF4400;
  --green:     #00CC62;


  /* ClickTV text — official grey scale for dark */
  --text:      #FFFFFF;
  --text2:     #B8C4BE;   /* secondary — readable labels, stats, meta */
  --text3:     #7A8388;   /* muted — decorative separators, placeholders */

  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.13);
  --radius:    14px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  background-image: url('/static/bg-desktop.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 14, 0.72);
  z-index: 0;
  pointer-events: none;
}
.sticky-wrap, .main {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  body {
    background-image: url('/static/bg-mobile.jpg');
  }
}

/* ── STICKY WRAP ─────────────────────────────────────────── */
.sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14,14,14,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── HEADER ─────────────────────────────────────────────── */
.header {
  background: transparent;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.logo { justify-self: start; display: flex; align-items: center; text-decoration: none; transition: opacity .2s; }
.logo:hover { opacity: .7; }
.logo-img { height: 34px; width: auto; display: block; }

.header-title {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
.header-title-text { text-align: center; }
.header-h1 {
  font-size: clamp(13px, 2vw, 20px);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}
.header-h1 span { color: var(--accent); }
.header-sub {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 500;
  margin-top: 3px;
}
.trophy-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  animation: trophy-float 4s ease-in-out infinite;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(224,165,0,0.6));
}
.trophy-icon:last-child { animation-delay: 2s; }
@keyframes trophy-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
.header-right { justify-self: end; }

/* ── LANG SWITCHER ───────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  transition: color .2s, background .2s;
  text-transform: uppercase;
}
.lang-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.lang-btn.active { color: var(--accent); background: var(--accent-dim); }

/* Language menu — collapses RU/UZ/EN behind one button on mobile (declutters the tab row).
   Hidden on desktop, where the header switcher (#langSwitcherDesktop) is used instead. */
.lang-menu { position: relative; display: none; flex-shrink: 0; }
.lang-menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-card2); border: 1px solid var(--border2); color: var(--text);
  border-radius: 999px; padding: 7px 11px;
  font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  line-height: 1; cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.lang-menu-btn:hover { background: var(--bg-card); }
.lang-menu-globe { width: 15px; height: 15px; opacity: .8; }
.lang-menu.open .lang-menu-btn { border-color: var(--accent); color: var(--accent); }
.lang-menu-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  flex-direction: column; gap: 3px; min-width: 148px;
  background: var(--bg-card); border: 1px solid var(--border2); border-radius: 12px;
  padding: 6px; box-shadow: 0 16px 38px -12px rgba(0,0,0,.65);
  display: none;
}
.lang-menu.open .lang-menu-pop { display: flex; }
.lang-menu-pop .lang-btn {
  width: 100%; text-align: left; padding: 10px 12px;
  font-size: 13px; text-transform: none; letter-spacing: normal; border-radius: 8px;
}
.lang-menu-pop .lang-btn.active { color: var(--accent); background: var(--accent-dim); }

/* ── TABS ────────────────────────────────────────────────── */
.tabs-nav {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.tabs-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.tabs-left {
  display: flex;
  position: relative;
}
/* Mobile lang menu is hidden on desktop (see .lang-menu base rule above). */
.tab {
  background: none;
  border: none;
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 16px 22px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s;
  white-space: nowrap;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); }
.tab-slider {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: left .25s cubic-bezier(.4,0,.2,1), width .25s cubic-bezier(.4,0,.2,1);
}

/* ── MAIN ────────────────────────────────────────────────── */
.main {
  max-width: 1280px; margin: 0 auto; padding: 32px 24px 80px;
  /* Sticky footer without changing body scroll: fill at least the space between
     header and footer so a short view (e.g. finished schedule) still pins the
     footer to the bottom instead of leaving a grey gap under it. */
  min-height: calc(100dvh - var(--header-h, 152px) - 130px);
}

/* ── LOADER / EMPTY ──────────────────────────────────────── */
.loader { text-align: center; padding: 100px 20px; color: var(--text2); }
.spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 100px 20px; color: var(--text2); font-size: 15px; line-height: 1.7; }
.btn-sync {
  margin-top: 20px; padding: 12px 28px;
  background: var(--accent); color: #000;
  border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 800; font-size: 13px;
  cursor: pointer; transition: opacity .2s; letter-spacing: .5px;
}
.btn-sync:hover { opacity: .85; }

.hidden { display: none !important; }
.view { min-height: 200px; }
.no-data { text-align:center; color:var(--text2); padding:80px 20px; font-size:15px; }

/* ── GROUPS GRID ─────────────────────────────────────────── */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.group-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,119,255,0.2);
}
.group-title {
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.group-expand-hint { color: var(--text3); font-size: 11px; opacity: 0; transition: opacity .2s; }
.group-card:hover .group-expand-hint { opacity: 1; }

.standings-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.standings-table th {
  padding: 5px 4px; text-align: center;
  font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text2); border-bottom: 1px solid var(--border); width: 24px;
}
.standings-table th.th-team { text-align: left; padding-left: 12px; width: auto; }
.standings-table th.th-pts { color: var(--accent); width: 26px; }
.st-row td {
  padding: 8px 4px; text-align: center;
  border-bottom: 1px solid var(--border); color: var(--text);
  overflow: hidden; transition: background .15s;
}
.st-row:last-child td { border-bottom: none; }
.st-row:hover td { background: var(--bg-hover); }
.st-row.advance td:first-child { border-left: 2px solid var(--accent); }
.td-team { text-align: left !important; padding-left: 10px !important; }
.td-team-inner { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.st-logo { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-card2); }
.st-logo-txt {
  width: 20px; height: 20px; border-radius: 50%; background: var(--bg-card2);
  border: 1px solid var(--border2); display: inline-flex; align-items: center;
  justify-content: center; font-size: 7px; font-weight: 700; color: var(--text3); flex-shrink: 0;
}
.st-name { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.td-pts { font-weight: 900; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }

/* ── SCHEDULE ────────────────────────────────────────────── */
.date-group { margin-bottom: 40px; }
.date-header { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.date-header-line { flex: 1; height: 1px; background: var(--border); }
.date-header-text {
  font-size: 15px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text); white-space: nowrap;
}
.date-header-text.today { color: var(--accent); }
.match-list { display: grid; gap: 6px; }
.date-group { scroll-margin-top: 120px; }

/* Past-matches archive (collapsible) */
.sched-archive-wrap { margin-bottom: 28px; }
.sched-archive-toggle {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text2); font-size: 12px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  transition: border-color .15s, background .15s, color .15s;
  /* Pinned below the header so the archive can be collapsed without scrolling up. */
  position: sticky;
  top: calc(var(--header-h, 120px) + 6px);
  z-index: 40;
}
.sched-archive-toggle:hover { border-color: var(--border2); background: var(--bg-card2); color: var(--text); }
.sched-archive-ic { font-size: 15px; }
.sched-archive-txt { flex: 1; text-align: left; }
.sched-archive-count {
  min-width: 22px; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-card2); color: var(--text2);
  font-size: 11px; font-weight: 800; letter-spacing: 0;
}
.sched-archive-arrow { transition: transform .2s; font-size: 11px; }
.sched-archive-toggle.open .sched-archive-arrow { transform: rotate(180deg); }
.sched-archive { margin-top: 18px; }
.sched-archive[hidden] { display: none; }

/* ── MATCH CARD ──────────────────────────────────────────── */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.match-card:hover {
  border-color: rgba(0,119,255,0.35);
  background: var(--bg-card2);
  transform: translateX(3px);
}
.match-card.live { border-color: rgba(0,119,255,0.4); }

.match-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge {
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 9px; border-radius: 6px; text-transform: uppercase;
}
.badge-stage { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,119,255,0.25); }
.badge-live  { background: var(--green); color: #000; animation: pulse-live 2s ease-in-out infinite; }
.badge-ft    { background: var(--bg-card2); color: var(--text2); border: 1px solid var(--border2); }
.badge-ns    { background: var(--bg-card2); color: var(--text2); border: 1px solid var(--border2); }
.badge-ht    { background: var(--gold); color: #000; }
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50%       { opacity: .7; }
}
.match-meta-venue { font-size: 11px; color: var(--text2); margin-left: auto; }

.match-score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.team { display: flex; align-items: center; gap: 10px; }
.team.away { flex-direction: row-reverse; text-align: right; }
.team-logo {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; background: var(--bg-card2); flex-shrink: 0;
}
.team-logo-placeholder {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card2); border: 1px solid var(--border2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text2);
}
.team-name { font-size: 15px; font-weight: 700; }

.score-box { text-align: center; min-width: 80px; }
.score-nums {
  font-size: 28px; font-weight: 900; letter-spacing: -1px; line-height: 1;
  color: var(--text);
}
.score-nums.live-score { color: var(--green); }
.score-sep { color: var(--text3); margin: 0 2px; }
.score-vs { font-size: 22px; font-weight: 900; color: var(--text); letter-spacing: 3px; }
.score-time { font-size: 11px; font-weight: 700; color: var(--accent); margin-top: 4px; letter-spacing: 1px; }

/* ── BRACKET TREE ────────────────────────────────────────── */
.bk-page { padding: 0; }

/* Prediction toolbar */
.bk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 12px 4px;
}
.bk-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--bg-card);
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.bk-toolbar-btn:hover { background: var(--bg-hover); color: var(--text); }
.bk-toolbar-btn--active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.bk-toolbar-btn--reset {
  background: transparent;
  border-color: var(--border);
  color: var(--text3);
  font-weight: 500;
}
.bk-toolbar-btn--reset:hover { border-color: rgba(255,68,0,0.4); color: var(--red); }
.bk-pred-hint {
  font-size: 11px;
  color: var(--text3);
  padding: 0 4px 12px 4px;
  margin: 0;
}

/* Prediction cards */
.bk-card--pred { cursor: default; }
.bk-card--pred:hover { border-color: var(--border); background: var(--bg-card); }
.bk-card--pred .bk-row--pickable {
  cursor: pointer;
  border-radius: 6px;
  transition: background .12s;
}
.bk-card--pred .bk-row--pickable:hover { background: var(--bg-hover); }
.bk-card--pred .bk-row--picked {
  background: var(--gold-dim);
  border-radius: 6px;
}
.bk-card--pred .bk-row--picked .bk-nm {
  color: var(--gold);
  font-weight: 700;
}
.bk-card--pred .bk-row--picked .bk-logo-x {
  color: var(--gold);
  background: rgba(224,165,0,0.12);
  border-color: rgba(224,165,0,0.3);
}
.bk-card--pred .bk-row--picked img.bk-logo {
  filter: drop-shadow(0 0 4px rgba(224,165,0,0.5));
}

/* Desktop: JS applies zoom to fit — no scroll needed */
.bk-scroll { overflow: visible; }

/* Round header row (lives above the tree body) */
.bk-hdr-row {
  display: inline-flex;
  align-items: flex-end;
  padding: 12px 16px 6px;
  min-width: max-content;
}
.bk-col-hd {
  width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.bk-rnd-lbl {
  font-size: 10px; font-weight: 900; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text2);
}
.bk-rnd-dt {
  font-size: 10px; font-weight: 400;
  color: var(--text2); letter-spacing: 0.3px;
}
.bk-conn-hd { width: 32px; flex-shrink: 0; }

/* Tree body — matches + connectors in a fixed-height flex row */
.bk-tree {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  min-width: max-content;
  padding: 2px 16px 12px;
}

/* Match column */
.bk-col {
  width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.bk-col-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Slot — equal-height flex item, centers its match card */
.bk-slot {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 5px 0;
}

/* Compact match card */
.bk-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.bk-card:hover          { border-color: rgba(0,119,255,0.35); background: var(--bg-card2); }
.bk-card--tbd           { cursor: default; }
.bk-card--tbd:hover     { border-color: var(--border); background: var(--bg-card); }
.bk-card--live          { border-color: rgba(0,220,100,0.3); }

/* Team row inside card */
.bk-row {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 0;
  font-size: 12px; font-weight: 600;
  color: var(--text2); min-width: 0;
}
.bk-row--win { color: var(--text); }

.bk-logo {
  width: 17px; height: 17px; border-radius: 50%;
  object-fit: cover; background: var(--bg-card2); flex-shrink: 0;
}
.bk-logo-x {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg-card2); border: 1px solid var(--border2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 7px; font-weight: 700; color: var(--text2); flex-shrink: 0;
}
.bk-nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bk-nm--tbd { color: var(--text2); font-style: italic; }
.bk-sc { font-weight: 900; font-size: 13px; color: var(--text2); flex-shrink: 0; }
.bk-sc.win { color: var(--text); }
.bk-pen { font-size: 9px; font-weight: 700; margin-left: 1px; opacity: 0.75; }
.bk-hr { height: 1px; background: var(--border); margin: 1px 0; }

/* Connector column between rounds */
.bk-conn {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* One connector segment merges 2 adjacent slots → 1 next-round slot.
   The connector is 2× the height of one slot, so:
     25% of segment = center of slot 1  (top half)
     75% of segment = center of slot 2  (bottom half) */
.bk-conn-seg {
  flex: 1;
  position: relative;
}
/* ⌐ bracket: top stub + right vertical + bottom stub */
.bk-conn-seg::before {
  content: '';
  position: absolute;
  left: 0;
  width: 10px;
  top: 25%;
  height: 50%;
  border-top: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
  box-sizing: border-box;
}
/* Horizontal line from bracket corner to next column */
.bk-conn-seg::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: var(--border2);
}

/* 3rd-place match shown below tree */
.bk-third {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 8px;
  border-top: 1px solid var(--border);
}
.bk-third-lbl {
  font-size: 8px; font-weight: 900;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text2); white-space: nowrap; flex-shrink: 0;
}
.bk-card--third { width: 190px; flex-shrink: 0; }
/* winner panel */
.bk-winner-conn { width: 32px; flex-shrink: 0; display: flex; align-items: center; }
.bk-winner-conn-line { width: 100%; height: 1px; background: var(--gold); opacity: 0.5; }
.bk-winner-col { width: 190px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.bk-winner-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 12px 8px; }
.bk-trophy-img {
  width: 130px; height: auto; object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(224,165,0,0.55)) drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
.bk-trophy-emoji { font-size: 52px; line-height: 1; display: block; }
.bk-champion-lbl { font-size: 10px; font-weight: 900; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); }
.bk-winner-team { display: flex; align-items: center; gap: 6px; }
.bk-winner-logo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.bk-winner-logo-x { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: var(--text2); }
.bk-winner-nm { font-size: 13px; font-weight: 700; color: var(--text); }

/* ── MOBILE PAGINATED BRACKET (Google-style round-by-round) ── */
/* The bracket tab hides the page watermark entirely (see body.bkm-view below),
   so the whole view — tabs, cards, gaps, footer surround — is one flat, even
   backdrop with nothing showing through during swipe/scroll. */
.bkm {
  padding: 0 0 40px;
  min-height: calc(100dvh - var(--header-h, 120px));
}
@media (max-width: 640px) {
  body.bkm-view { background-image: none; }
  body.bkm-view::before { display: none; }
}
.bkm-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 12px 10px;
  scrollbar-width: none;
  /* No strip background: only the pills are solid, so they float on the page's
     backdrop instead of sitting on a flat rectangle over it. */
}
.bkm-tabs::-webkit-scrollbar { display: none; }
.bkm-tab {
  flex: none; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border2); background: var(--bg-card);
  color: var(--text2); font-size: 13px; font-weight: 800; white-space: nowrap;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.bkm-tab.active { background: #1a6dff; border-color: transparent; color: #fff; }

.bkm-panel { display: none; padding: 8px 12px 0; }
.bkm-panel.active { display: block; animation: bkmFade .34s ease both; }
@keyframes bkmFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.bkm-hdr {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 2px 2px 10px; gap: 10px;
}
.bkm-hdr span {
  font-size: 10px; font-weight: 900; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text2);
}
.bkm-hdr span:last-child { text-align: right; }

.bkm-tree { display: flex; flex-direction: row; align-items: stretch; }
.bkm-tree .bk-col { width: auto; flex: 1 1 0; min-width: 0; }
.bkm-tree .bk-conn { width: 20px; flex: none; }
.bkm-tree .bk-slot { padding: 4px 0; }
.bkm-tree .bk-card { padding: 8px 10px; }
.bkm-tree .bk-row { font-size: 13px; padding: 4px 0; }
.bkm-tree .bk-logo, .bkm-tree .bk-logo-x { width: 19px; height: 19px; }
.bkm-tree .bk-sc { font-size: 14px; }

/* Per-card date + status (mobile only) */
.bkm-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin: -1px 0 5px; gap: 6px;
}
.bkm-meta > span { font-size: 9.5px; font-weight: 700; color: var(--text2); letter-spacing: .2px; }
.bkm-st { font-size: 8.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--text2); }
.bkm-st--live { color: #2ec26a; }

/* Final tab: gold connector to the champion */
.bkm-col--win .bk-slot { align-items: center; }
.bkm-seg--gold::before { border-color: var(--gold) !important; opacity: .6; }
.bkm-seg--gold::after  { background: var(--gold) !important; opacity: .6; }
.bkm-tree .bk-trophy-img { width: 96px; }

/* ── GROUP POPUP ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px; overflow-y: auto;
  backdrop-filter: blur(6px);
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%; max-width: 580px; margin: auto;
  position: relative; padding: 32px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8);
}
.group-modal-box { max-width: 680px !important; padding: 0 !important; overflow: hidden; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-card2); border: 1px solid var(--border2);
  color: var(--text2); width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* match modal header */
.modal-header { text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.modal-stage { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.modal-teams { display: flex; align-items: center; justify-content: center; gap: 16px; }
.modal-team { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 90px; flex: 1; }
.modal-team-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--bg-card2); }
.modal-team-placeholder {
  width: 64px; height: 64px; border-radius: 50%; background: var(--bg-card2);
  border: 1px solid var(--border2); display: flex; align-items: center;
  justify-content: center; font-size: 22px; font-weight: 800; color: var(--text2);
}
.modal-team-name { font-size: 14px; font-weight: 700; text-align: center; line-height: 1.3; }
.modal-score-center { text-align: center; flex-shrink: 0; }
.modal-score { font-size: 48px; font-weight: 900; letter-spacing: -2px; line-height: 1; color: var(--text); }
.modal-score-sep { color: var(--text3); }
.modal-score-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-top: 8px; color: var(--text2); }
.modal-kickoff { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: .5px; padding: 4px 0; }

/* modal sections */
.modal-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.modal-section-title { font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--text2); margin-bottom: 14px; }

/* events */
.event-list { display: flex; flex-direction: column; gap: 5px; }
.event-row {
  display: flex; align-items: center; gap: 12px; font-size: 13px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-card2); border: 1px solid var(--border);
  transition: background .15s;
}
.event-row:hover { background: var(--bg-hover); }
.event-row.away { flex-direction: row-reverse; text-align: right; }
.event-min { font-size: 11px; font-weight: 800; color: var(--accent); min-width: 30px; text-align: center; }
.event-icon { font-size: 15px; flex-shrink: 0; }
.event-player { font-weight: 600; flex: 1; }
.event-result { font-size: 11px; color: var(--text2); font-weight: 600; }

/* statistics */
.stat-list { display: flex; flex-direction: column; gap: 14px; }
.stat-labels { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; align-items: center; }
.stat-val-home { font-weight: 900; color: var(--accent); min-width: 32px; }
.stat-name { color: var(--text2); font-weight: 500; text-align: center; flex: 1; font-size: 12px; }
.stat-val-away { font-weight: 700; color: var(--gold); min-width: 32px; text-align: right; }
.stat-bar-wrap { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; align-items: center; }
.stat-bar-home { height: 4px; background: var(--accent); border-radius: 2px 0 0 2px; transition: width .4s, height .3s; min-width: 2px; }
.stat-bar-away { height: 4px; background: var(--gold); border-radius: 0 2px 2px 0; transition: width .4s, height .3s; min-width: 2px; }
.stat-bar-home.stat-bar--lead { height: 8px; border-radius: 4px 0 0 4px; }
.stat-bar-away.stat-bar--lead { height: 8px; border-radius: 0 4px 4px 0; }
.modal-venue { text-align: center; font-size: 12px; color: var(--text2); margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }

.modal-watch-row { display: flex; justify-content: center; padding: 24px 0; }
.watch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 32px;
  background: var(--accent);
  color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(0,119,255,0.35);
}
.watch-btn:hover {
  background: #0066ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,119,255,0.5);
}
.watch-btn--live {
  background: var(--green);
  box-shadow: 0 4px 20px rgba(0,204,98,0.35);
  animation: watch-pulse 2s ease-in-out infinite;
}
.watch-btn--live:hover {
  background: #00b355;
  box-shadow: 0 6px 28px rgba(0,204,98,0.5);
}
@keyframes watch-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,204,98,0.35); }
  50%       { box-shadow: 0 4px 28px rgba(0,204,98,0.65), 0 0 0 6px rgba(0,204,98,0.1); }
}

/* ── GROUP MODAL CONTENT ─────────────────────────────────── */
.gm-header {
  padding: 28px 28px 4px;
  font-size: 24px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent);
}
.gm-subtitle { padding: 0 28px 10px; font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text2); }
.gm-table-wrap { padding: 0 28px; }
.gm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gm-table th {
  padding: 7px 8px; text-align: center;
  font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text2); border-bottom: 1px solid var(--border);
}
.gm-table th.gm-th-team { text-align: left; }
.gm-table th.gm-th-pts { color: var(--accent); }
.gm-row td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--border); font-size: 14px; }
.gm-row:last-child td { border-bottom: none; }
.gm-row:hover td { background: var(--bg-card2); }
.gm-row.advance .gm-team { border-left: 2px solid var(--accent); padding-left: 8px; }
.gm-pos { color: var(--text2); font-size: 11px; font-weight: 700; width: 28px; }
.gm-team { text-align: left !important; overflow: hidden; }
.gm-team-inner { display: flex; align-items: center; gap: 10px; }
.gm-team-inner span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gm-logo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-card2); }
.gm-logo-txt { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-card2); border: 1px solid var(--border2); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.gm-pts { font-weight: 900; color: var(--text); }

/* group fixtures inside popup */
.group-fixtures { background: var(--bg); border-top: 1px solid var(--border); padding-bottom: 8px; }
.gf-row {
  display: grid; grid-template-columns: 52px 1fr auto 1fr;
  align-items: center; gap: 10px;
  padding: 12px 28px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.gf-row:last-child { border-bottom: none; }
.gf-row:hover { background: var(--bg-card); }
.gf-date { font-size: 11px; color: var(--text2); white-space: nowrap; }
.gf-team { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; overflow: hidden; }
.gf-team.away { justify-content: flex-end; text-align: right; }
.gf-team.away span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gf-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-logo { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-card2); }
.gf-logo-txt { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-card2); display: inline-flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.gf-score { font-size: 15px; font-weight: 900; color: var(--text); text-align: center; white-space: nowrap; letter-spacing: 1px; }
.gf-score.live { color: var(--green); }
.gf-time { font-size: 14px; font-weight: 800; color: var(--accent); text-align: center; white-space: nowrap; }

/* ── TEAM DETAIL (inside group modal) ───────────────────── */
.gm-row--clickable { cursor: pointer; }

.td-header {
  padding: 16px 24px 0;
}
.td-back {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.td-back:hover { color: var(--text); }

.td-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.td-logo {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; background: var(--bg-card2); flex-shrink: 0;
}
.td-logo-txt {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg-card2); border: 1px solid var(--border2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--text2); flex-shrink: 0;
}
.td-hero-name { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.td-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-group-badge {
  font-size: 12px; font-weight: 600; color: var(--text3);
  background: var(--bg-card2); border: 1px solid var(--border2);
  padding: 2px 8px; border-radius: 20px;
}
.td-advancing-tag {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-dim); border: 1px solid rgba(0,119,255,0.25);
  padding: 2px 8px; border-radius: 20px;
}

.td-stats-row {
  display: flex;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.td-stat {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.td-stat-val { font-size: 20px; font-weight: 900; color: var(--text); }
.td-stat-val.pos { color: var(--green); }
.td-stat-val.neg { color: var(--red); }
.td-stat-pts { color: var(--gold); }
.td-stat-lbl { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }

.td-matches { padding-bottom: 8px; }
.td-match-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.td-match-row:last-child { border-bottom: none; }
.td-match-row:hover { background: var(--bg-card2); }
.td-match-date { font-size: 11px; color: var(--text3); width: 50px; flex-shrink: 0; }
.td-match-teams { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.td-opp-logo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.td-opp-logo-x {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-card2); border: 1px solid var(--border2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: var(--text2); flex-shrink: 0;
}
.td-match-opp { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-match-result { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.td-match-score { font-size: 14px; font-weight: 900; color: var(--text); letter-spacing: 0.5px; }
.td-match-score.live { color: var(--green); }
.td-match-time { font-size: 13px; font-weight: 700; color: var(--accent); }
.td-result {
  width: 22px; height: 22px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; flex-shrink: 0;
}
.td-result--W { background: rgba(0,204,98,0.15); color: var(--green); }
.td-result--L { background: rgba(255,68,0,0.15); color: var(--red); }
.td-result--D { background: var(--bg-card2); color: var(--text3); }
.td-result--live { background: rgba(0,204,98,0.15); color: var(--green); }

/* ── SAVE BUTTON ─────────────────────────────────────────── */
.bk-toolbar-btn--save {
  background: linear-gradient(135deg, #1a8a2e, #22b83c) !important;
  border-color: #22b83c !important;
  color: #fff !important;
  font-weight: 700;
}
.bk-toolbar-btn--save:hover { opacity: .88; }

/* ── LOCKED ROUND CARDS ──────────────────────────────────── */
.bk-card--locked { opacity: .55; pointer-events: none; }

/* ── SHARED VIEW TOOLBAR ─────────────────────────────────── */
.bk-toolbar--shared { background: var(--bg-card2); border: 1px solid var(--border); }
.bk-shared-badge {
  font-size: 14px; color: var(--text2);
  display: flex; align-items: center; gap: 6px;
}
.bk-shared-badge strong { color: var(--text); }

/* ── LEADERBOARD ─────────────────────────────────────────── */
.bk-lb-wrap { margin: 32px 0 16px; }
.bk-lb-empty {
  text-align: center; color: var(--text3);
  font-size: 13px; padding: 24px 0;
}
.bk-lb {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}
.bk-lb-title {
  padding: 16px 20px 12px;
  font-size: 15px; font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.bk-lb-table {
  width: 100%; border-collapse: collapse;
}
.bk-lb-table thead tr {
  border-bottom: 1px solid var(--border);
}
.bk-lb-table th {
  padding: 8px 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--text3); letter-spacing: .5px;
  text-align: left;
}
.bk-lb-table th:first-child { text-align: center; }
.bk-lb-row { transition: background .12s; }
.bk-lb-row:hover { background: var(--bg-card2); }
.bk-lb-row--mine { background: rgba(0,119,255,.07); }
.bk-lb-row--mine:hover { background: rgba(0,119,255,.12); }
.bk-lb-row td { padding: 10px 12px; }
.bk-lb-rank {
  text-align: center; font-size: 13px;
  font-weight: 700; color: var(--text3); width: 40px;
}
.bk-lb-row:nth-child(1) .bk-lb-rank { color: #f5c518; font-size: 15px; }
.bk-lb-row:nth-child(2) .bk-lb-rank { color: #b0b8c4; }
.bk-lb-row:nth-child(3) .bk-lb-rank { color: #cd7f32; }
.bk-lb-nick {
  font-size: 14px; font-weight: 600; color: var(--text);
}
.bk-lb-score {
  font-size: 15px; font-weight: 900;
  color: var(--gold); text-align: right; width: 60px;
}
.bk-lb-view {
  background: none; border: 1px solid var(--border2);
  color: var(--text2); font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 6px;
  cursor: pointer; transition: all .15s;
}
.bk-lb-view:hover {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}

/* ── PREDICTION SAVE MODAL ───────────────────────────────── */
.pred-save-box {
  max-width: 420px !important;
  padding: 32px 28px !important;
}
.pred-save-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.pred-save-hint {
  font-size: 13px; color: var(--text3); margin-bottom: 20px;
}
.pred-nickname-input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-card2); border: 1px solid var(--border2);
  border-radius: 10px; color: var(--text); font-size: 15px;
  outline: none; box-sizing: border-box;
  transition: border-color .15s;
}
.pred-nickname-input:focus { border-color: var(--accent); }
.pred-submit-btn {
  margin-top: 14px; width: 100%;
  padding: 13px; border-radius: 10px;
  background: var(--accent); border: none;
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.pred-submit-btn:hover { opacity: .88; }
.pred-submit-btn:disabled { opacity: .5; cursor: default; }
.pred-save-error {
  margin-top: 10px; color: var(--red);
  font-size: 13px; font-weight: 600;
}
/* save result */
.pred-saved-icon { font-size: 36px; text-align: center; margin-bottom: 8px; }
.pred-saved-title {
  font-size: 17px; font-weight: 800; color: var(--text);
  text-align: center; margin-bottom: 4px;
}
.pred-saved-nickname {
  font-size: 14px; color: var(--text2);
  text-align: center; margin-bottom: 20px;
}
.pred-saved-link-wrap { display: flex; gap: 8px; }
.pred-share-input {
  flex: 1; padding: 10px 12px;
  background: var(--bg-card2); border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text); font-size: 12px;
  outline: none; min-width: 0;
}
.pred-copy-btn {
  padding: 10px 14px; border-radius: 8px;
  background: var(--accent); border: none;
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.pred-copy-btn:hover { opacity: .85; }

/* ── GIVEAWAY TAB ────────────────────────────────────────── */
.gw-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.gw-banner {
  background: linear-gradient(135deg, rgba(0,119,255,0.10) 0%, rgba(224,165,0,0.07) 100%);
  border: 1px solid rgba(0,119,255,0.18);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  text-align: center;
  margin: 0 auto 18px;
  max-width: 560px;
}
.gw-banner-title {
  font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
}
.gw-banner-text {
  font-size: 12px; color: var(--text3); line-height: 1.5;
  max-width: 480px; margin: 0 auto;
}

/* Telegram bot action buttons */
.gw-bot-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  max-width: 560px; margin: 0 auto 18px;
}
.gw-bot-btn {
  flex: 1 1 0; min-width: 160px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); transition: border-color .15s, background .15s, transform .1s;
}
.gw-bot-btn:hover { border-color: var(--border2); background: var(--bg-card2); }
.gw-bot-btn:active { transform: scale(0.98); }
.gw-bot-btn--tickets {
  background: linear-gradient(135deg, #0077ff 0%, #0a5fd0 100%);
  border-color: transparent; color: #fff;
}
.gw-bot-btn--tickets:hover { background: linear-gradient(135deg, #1a86ff 0%, #0d6ae0 100%); }

/* ── PROMO / GIVEAWAY LANDING ("🎁 Розыгрыш") ─────────────── */
.promo { display: flex; flex-direction: column; align-items: center; padding-bottom: 20px; }
/* The whole creative (headline → hero → steps) is one link to the bot. */
.promo-clickable { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; cursor: pointer; }
.promo-hero {
  display: block; text-decoration: none; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative; width: 100%; max-width: 440px; container-type: inline-size;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border2);
  box-shadow: 0 16px 44px -16px rgba(0,0,0,.7);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.promo-hero:hover { transform: translateY(-2px); box-shadow: 0 22px 54px -16px rgba(0,0,0,.75); filter: brightness(1.03); }
.promo-hero:active { transform: translateY(0) scale(.995); }
.promo-img { display: block; width: 100%; height: auto; }
.promo-steps { position: absolute; inset: 0; pointer-events: none; }
.promo-step { position: absolute; top: 56.4%; width: 28.5%; text-align: center; color: #0a2a63; }
.promo-no { font-size: 5.2cqw; font-weight: 900; line-height: 1; color: #0a2a63; }
.promo-ti { font-size: 2.5cqw; font-weight: 800; line-height: 1.08; margin-top: .15em; }
.promo-rw {
  display: inline-block; margin-top: .4em; background: #1560d8; color: #fff;
  font-size: 2.1cqw; font-weight: 700; padding: .34em .7em; border-radius: 999px; white-space: nowrap;
}
/* All promo copy is overlaid on the TEXT-FREE creative so it localizes (ru/uz/en).
   Every % is measured against the 941×1672 art; cqw font sizes scale with the frame. */
/* Top headline over the sky */
.promo-head { position: absolute; left: 6.4%; top: 8.4%; width: 62%; pointer-events: none; }
.ph-top { color: #14285c; font-weight: 800; font-size: 4.4cqw; line-height: 1; letter-spacing: .01em; }
.ph-big { color: #1466d6; font-weight: 900; font-size: 8cqw; line-height: 1; margin-top: .06em; }
.ph-sub { color: #17315f; font-weight: 600; font-size: 2.55cqw; line-height: 1.28; margin-top: .55em; max-width: 78%; }
/* "ГЛАВНЫЙ ПРИЗ · ТЕЛЕВИЗОР" centered above the prize podiums */
.promo-prize-hdr {
  position: absolute; left: 0; right: 0; top: 82.4%; height: 2.6%;
  display: flex; align-items: center; justify-content: center; gap: .4em;
  line-height: 1; white-space: nowrap; pointer-events: none;
}
.promo-prize-hdr .pph-main { color: #14307a; font-weight: 800; font-size: 3.4cqw; letter-spacing: .02em; }
.promo-prize-hdr .pph-tv   { color: #F2900A; font-weight: 800; font-size: 3.4cqw; letter-spacing: .02em; }
/* Per-podium prize labels (centered on each item's x-position) */
.promo-prizes { position: absolute; inset: 0; pointer-events: none; }
.promo-prize {
  position: absolute; top: 86.2%; transform: translateX(-50%);
  width: 13%; text-align: center; color: #14285c; line-height: 1.14;
}
.pp-place { font-size: 2.1cqw; font-weight: 800; }
.pp-sub { font-size: 1.8cqw; font-weight: 600; color: #46587f; margin-top: .2em; }

/* Prize-first headline over the hero banner (both creatives). Positions are % of
   the art; cqw font sizes scale with the frame. */
/* Light scene (creative A): a top scrim keeps the white/gold text legible over
   the bright blue sky. */
.promo-hero--light::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%;
  background: linear-gradient(to bottom, rgba(2,10,32,.62), rgba(2,10,32,.12) 70%, transparent);
  pointer-events: none; z-index: 1;
}
.pb-head { position: absolute; left: 6%; right: 6%; top: 5%; text-align: center; pointer-events: none; z-index: 2; }
.pb-kicker { color: #8fbaff; font-weight: 800; font-size: 4cqw; letter-spacing: .04em; text-transform: uppercase; }
.pb-prize-lbl { color: #fff; font-weight: 800; font-size: 5.4cqw; letter-spacing: .05em; text-transform: uppercase; margin-top: .5em; }
.pb-prize-tv {
  color: #ffb020; font-weight: 900; font-size: 11cqw; line-height: 1; margin-top: .02em;
  text-shadow: 0 3px 26px rgba(255,150,10,.45);
}
.pb-sub { color: #cbd8ef; font-weight: 600; font-size: 3.1cqw; line-height: 1.3; margin-top: .7em; }

/* ── CREATIVE B: taller scroll-through promo (headline → hero+prize → 3 steps) ── */
.pa2-headline { margin: 6px 0 13px; }
.pb2-headline {
  width: 100%; max-width: 440px; margin: 4px 0 8px; text-align: center;
  color: #fff; font-weight: 900; font-size: 46px; line-height: .92;
  letter-spacing: .5px; text-transform: uppercase; font-style: italic;
  text-shadow: 0 4px 26px rgba(0,70,180,.45);
}
.pb2-headline span {
  display: inline-block; margin-top: 2px; color: #eaf2ff; font-size: 34px;
  border-bottom: 3px solid #ff3b47; padding-bottom: 3px;
}
.pb2-subline {
  width: 100%; max-width: 440px; margin: 0 0 14px; text-align: center;
  color: #b9c6de; font-weight: 700; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .3px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
}
.pb2-subline .pb2-red { color: #ff3b47; }
.pb2-subline i { color: #4a5a76; font-style: normal; }
/* A top scrim keeps the prize text legible over both the dark (B) and bright (A) sky. */
.pb2-hero::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%;
  background: linear-gradient(to bottom, rgba(2,10,32,.72), rgba(2,10,32,.15) 70%, transparent);
  pointer-events: none; z-index: 1;
}
/* Prize callout — ABOVE the TV, in the sky area of the banner. */
.pb2-prize { position: absolute; left: 6%; right: 6%; top: 5%; text-align: center; pointer-events: none; z-index: 2; }
.pb2-prize-lbl { color: #cdd8ee; font-weight: 700; font-size: 3cqw; letter-spacing: .25em; text-transform: uppercase; }
.pb2-prize-tv { color: #fff; font-weight: 900; font-size: 8cqw; line-height: 1.02; letter-spacing: .03em; margin-top: .25em; text-shadow: 0 2px 16px rgba(0,0,0,.7); }
.pb2-prize-size { font-size: 1.12em; color: #fff; }
/* Steps — stacked cards so the promo scrolls rather than cramming one screen. */
.pb2-steps { width: 100%; max-width: 440px; margin: 18px 0 4px; display: flex; flex-direction: column; gap: 12px; }
.pb2-step { display: flex; align-items: center; gap: 14px; background: var(--bg-card); border: 1px solid var(--border2); border-radius: 14px; padding: 12px 16px; }
.pb2-ic { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.pb2-ic svg { width: 25px; height: 25px; }
.pb2-ic--b { background: radial-gradient(circle at 32% 28%, #2a93ff, #0062e0); box-shadow: 0 6px 18px -6px rgba(0,110,255,.7); }
.pb2-ic--r { background: radial-gradient(circle at 32% 28%, #ff4d5a, #d11020); box-shadow: 0 6px 18px -6px rgba(210,20,40,.7); }
.pb2-tx { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.pb2-tx b { color: #fff; font-weight: 800; font-size: 15px; }
.pb2-tx span { color: var(--text2); font-size: 13px; }

/* Creative A (live) — prize on the white podium space of the hero + a row of 3
   transparent step cards. */
/* Title text INSIDE the TV screen. A SOFT radial darkening (no hard box edges)
   behind the text keeps it readable over the bright stadium. */
.pa2-tv {
  position: absolute; left: 15%; right: 15%; top: 14%; bottom: 59.5%;
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  pointer-events: none; z-index: 2;
}
.pa2-tv-top { color: #eaf3ff; font-weight: 800; font-size: 3cqw; letter-spacing: .18em; text-transform: uppercase; text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 2px 14px rgba(0,0,0,.8); }
.pa2-tv-big { color: #fff; font-weight: 900; font-size: 7.2cqw; line-height: 1; letter-spacing: .01em; margin-top: .16em; text-transform: uppercase; text-shadow: 0 1px 3px rgba(0,0,0,.95), 0 3px 18px rgba(0,0,0,.85); }
.pa2-prize { position: absolute; left: 8%; right: 8%; top: 62%; text-align: center; pointer-events: none; z-index: 2; }
.pa2-l { color: #1a66d6; font-weight: 800; font-size: 3.4cqw; letter-spacing: .26em; text-transform: uppercase; }
.pa2-t { color: #08234f; font-weight: 900; font-size: 12.5cqw; line-height: 1; margin-top: .14em; }
.pa2-s { color: #3a5488; font-weight: 700; font-size: 3.1cqw; margin-top: .6em; text-transform: uppercase; letter-spacing: .02em; }
/* Prize list under the conditions — place badges + names. */
.pa2-prizes { width: 100%; max-width: 440px; margin: 16px 0 0; background: var(--bg-card); border: 1px solid var(--border2); border-radius: 16px; padding: 6px 16px 12px; }
.pa2-prizes-h { color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; text-align: center; padding: 12px 0 8px; }
.pa2-prow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.pa2-prow b { color: #fff; font-weight: 800; font-size: 15px; }
.pa2-prow span:last-child { color: var(--text2); font-size: 14px; }
.pa2-pl { flex-shrink: 0; min-width: 52px; height: 27px; padding: 0 9px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12.5px; color: #fff; background: var(--bg-card2); white-space: nowrap; }
.pa2-pl--g { background: linear-gradient(135deg, #ffd257, #e6a100); color: #3a2600; }
.pa2-pl--s { background: linear-gradient(135deg, #e2e9f1, #a9b7c8); color: #26313e; }
.pa2-pl--b { background: linear-gradient(135deg, #eda877, #c56e30); color: #3a1c0a; }
.pa2-prizes-f { text-align: center; color: var(--text3); font-size: 12.5px; padding-top: 11px; border-top: 1px solid var(--border); }

.pa2-steps { width: 100%; max-width: 440px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 4px; align-items: start; }
.pa2-steps img { display: block; width: 100%; height: auto; }

/* Creative A — light infographic card, fully HTML/CSS (transparent element assets). */
.promo--ca .promo-clickable { max-width: 460px; }
.ca {
  width: 100%; box-sizing: border-box;
  background: linear-gradient(180deg, #eaf1ff 0%, #ffffff 62%);
  border: 1px solid #dbe6fb; border-radius: 22px;
  padding: 22px 18px 24px; text-align: center;
  box-shadow: 0 20px 48px -22px rgba(26,109,255,.35);
}
.ca-h { font-weight: 900; line-height: 1.02; color: #0b2a5e; font-size: 46px; letter-spacing: -.5px; }
.ca-h span { display: block; color: #1a6dff; font-size: 50px; }
.ca-sub { margin: 12px auto 0; max-width: 340px; color: #3f5573; font-size: 17px; line-height: 1.4; }

.ca-tv { position: relative; margin: 18px 0 6px; }
.ca-tvimg { display: block; width: 100%; height: auto; }
.ca-badge { position: absolute; top: -8px; right: -2px; width: 58%; }
.ca-badge img { display: block; width: 100%; height: auto; }
.ca-btx { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #4a2c00; }
.ca-btx small { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; opacity: .8; }
.ca-btx b { font-size: 17px; font-weight: 900; }

.ca-sec {
  position: relative; margin: 20px 0 12px; color: #0b2a5e;
  font-size: 23px; font-weight: 900; letter-spacing: -.3px;
}

.ca-step {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff; border: 1px solid #e6eefb; border-radius: 18px;
  padding: 12px 14px; margin-bottom: 12px;
  box-shadow: 0 10px 26px -18px rgba(26,109,255,.4);
}
.ca-num {
  flex: none; width: 44px; height: 62px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #3f8bff, #1a6dff);
  color: #fff; font-size: 30px; font-weight: 900;
}
.ca-sic {
  flex: none; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #eef4ff; border: 1px solid #dce8ff;
}
.ca-sic img { width: 42px; height: 42px; object-fit: contain; }
.ca-stx { flex: 1 1 auto; min-width: 0; }
.ca-stx b { display: block; color: #14274a; font-size: 19px; font-weight: 800; }
.ca-stx span { display: block; color: #5a6b85; font-size: 14.5px; line-height: 1.35; margin-top: 2px; }
.ca-pill {
  flex: none; padding: 8px 12px; border-radius: 12px;
  background: linear-gradient(160deg, #3f8bff, #1a6dff);
  color: #fff; font-size: 23px; font-weight: 900; white-space: nowrap;
}

.ca-prow {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border: 1px solid #e6eefb; border-radius: 16px;
  padding: 12px 14px; margin-bottom: 10px;
}
.ca-prow.win { border-color: #ffd888; box-shadow: 0 10px 26px -16px rgba(255,176,32,.6); background: linear-gradient(180deg, #fffdf5, #fff); }
.ca-prow img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.ca-ptx { flex: 1 1 auto; min-width: 0; }
.ca-ptx b { display: block; color: #0b2a5e; font-size: 18px; font-weight: 900; }
.ca-ptx span { display: block; color: #5a6b85; font-size: 14.5px; line-height: 1.35; margin-top: 1px; }

.ca-trust {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #eaf2ff; border: 1px solid #d6e5ff; border-radius: 16px;
  padding: 14px 16px; margin-top: 16px;
}
.ca-trust svg { flex: none; width: 34px; height: 34px; color: #1a6dff; }
.ca-ttx b { display: block; color: #0b2a5e; font-size: 16px; font-weight: 800; line-height: 1.3; }
.ca-ttx span { display: block; color: #5a6b85; font-size: 14px; margin-top: 3px; }

/* Creative A (older illustrated cards — kept for reference, unused). */
.pa-cards { width: 100%; max-width: 440px; margin: 18px 0 4px; display: flex; flex-direction: column; gap: 14px; }
.pa-card {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border2); background: #0b0e15;
  box-shadow: 0 12px 34px -16px rgba(0,0,0,.65);
}
.pa-img { display: block; width: 100%; height: 300px; object-fit: cover; object-position: center 44%; }
.pa-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 15px;
  background: linear-gradient(to top, rgba(5,9,18,.96) 28%, rgba(5,9,18,.55) 66%, transparent);
}
.pa-cap b { display: block; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.pa-cap span { color: #c6d3ec; font-size: 13.5px; }

.promo-actions { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.promo-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px;
  border-radius: var(--radius); font-weight: 800; font-size: 15px; letter-spacing: .3px;
  cursor: pointer; text-decoration: none; border: 0; font-family: inherit;
  transition: filter .15s, background .15s, border-color .15s, transform .1s;
}
.promo-btn:active { transform: scale(.99); }
.promo-btn--cta {
  background: linear-gradient(135deg, #1a86ff 0%, #0066e0 100%); color: #fff;
  box-shadow: 0 14px 30px -14px rgba(0,119,255,.6);
}
.promo-btn--cta:hover { filter: brightness(1.07); }
.promo-btn--board { background: var(--bg-card); color: var(--text); border: 1px solid var(--border2); }
.promo-btn--board:hover { background: var(--bg-card2); }

/* Floating CTA pinned to the bottom of the screen while scrolling. On promo it
   hides once the real "Участвовать" button scrolls into view; on the schedule tab
   ("Смотреть") it stays put — there's no bottom button there. */
.promo-cta-float, .watch-cta-float {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.promo-cta-float .promo-btn--cta, .watch-cta-float .promo-btn--cta {
  max-width: 440px; margin: 0 auto; pointer-events: auto;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.55), 0 14px 30px -14px rgba(0,119,255,.6);
}
.promo-cta-float.hide, .watch-cta-float.hide { opacity: 0; transform: translateY(130%); pointer-events: none; }

/* ── SITE FOOTER (legal docs + app store links) ──────────── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg-card);
}
/* Schedule's fixed "Смотреть" CTA sits at the very bottom — reserve room in the
   footer so the button overlays empty padding, not the links/store buttons. */
body.sched-view .site-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.footer-inner {
  max-width: 1000px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.footer-links a {
  color: var(--text2); font-size: 12px; font-weight: 600; text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-apps { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 10px;
  background: #000; border: 1px solid var(--border2); color: #fff;
  text-decoration: none; transition: transform .1s, border-color .15s;
}
.store-btn:hover { border-color: rgba(255,255,255,.4); }
.store-btn:active { transform: scale(.98); }
.store-ic { width: 18px; height: 18px; flex-shrink: 0; }
.store-tx { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-tx small { font-size: 8px; opacity: .85; text-transform: uppercase; letter-spacing: .3px; }
.store-tx b { font-size: 13px; font-weight: 700; }
.footer-copy { color: var(--text3); font-size: 11px; }

/* Stats hero */
.gw-stats { text-align: center; margin: 2px 0 26px; }
.gw-stats-main { font-size: 15px; color: var(--text2); }
.gw-stats-num {
  font-size: 28px; font-weight: 900; color: var(--accent);
  margin-right: 6px; vertical-align: -3px;
}
.gw-stats-sub { font-size: 12px; color: var(--text3); margin-top: 6px; }

.gw-sync-btn {
  padding: 9px 18px; border-radius: 8px;
  background: var(--accent); border: none;
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: opacity .15s; white-space: nowrap;
}
.gw-sync-btn:hover:not(:disabled) { opacity: .85; }
.gw-sync-btn:disabled { opacity: .5; cursor: not-allowed; }
.gw-sync-btn--loading { animation: gw-pulse 1.4s ease-in-out infinite; }
@keyframes gw-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* List (ranks 4+) */
.gw-list {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
}

/* Prize zone (ranks 4–10) — framed in gold to mark prize winners */
.gw-prize { margin-bottom: 18px; }
.gw-prize-cap {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 9px; padding-left: 2px;
}
.gw-list--prize {
  border: 1.5px solid rgba(224,165,0,0.45);
  box-shadow: 0 0 0 3px rgba(224,165,0,0.07), 0 6px 22px rgba(224,165,0,0.10);
  background: linear-gradient(180deg, rgba(224,165,0,0.06) 0%, rgba(224,165,0,0.01) 100%);
}
.gw-list--prize .gw-row { border-bottom-color: rgba(224,165,0,0.16); }
.gw-list--prize .gw-row-rank {
  color: var(--gold);
  background: rgba(224,165,0,0.12);
  border: 1px solid rgba(224,165,0,0.30);
}
.gw-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.gw-row:last-child { border-bottom: none; }
.gw-row:hover { background: var(--bg-hover); }
.gw-row-rank {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text3);
  background: var(--bg-card2);
}
.gw-row-phone {
  flex: 1; min-width: 0;
  font-family: 'Courier New', monospace;
  font-size: 14px; color: var(--text); letter-spacing: 0.04em;
}
.gw-row-tickets {
  flex-shrink: 0; white-space: nowrap;
  font-size: 14px; font-weight: 800; color: var(--accent);
}
.gw-empty {
  padding: 48px 24px; text-align: center;
  color: var(--text3); font-size: 15px;
  background: var(--bg-card); border-radius: var(--radius);
}
.gw-note {
  margin: 16px auto 0; max-width: 560px; text-align: center;
  color: var(--text3); font-size: 12px; line-height: 1.5;
}
.gw-loading {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  padding: 60px 24px; color: var(--text3);
}

/* ── GIVEAWAY PODIUM (top 3) ─────────────────────────────── */
.gw-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin: 0 0 28px;
}
.gw-podium-card {
  flex: 1 1 0;
  max-width: 210px;
  border-radius: 18px;
  padding: 22px 14px 20px;
  text-align: center;
  position: relative;
  border: 1px solid var(--border2);
  background: var(--bg-card);
  transition: transform .2s, box-shadow .2s;
}
.gw-podium-card:hover { transform: translateY(-4px); }

.gw-podium-medal {
  display: block; width: 88px; height: auto;
  margin: -6px auto 10px;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.45));
}
.gw-podium-phone {
  font-family: 'Courier New', monospace;
  font-size: 14px; color: var(--text);
  letter-spacing: 0.04em; margin-bottom: 16px;
  word-break: break-all;
}
.gw-podium-tickets {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 22px; font-weight: 900; color: var(--text);
  background: rgba(255,255,255,0.05);
  padding: 7px 16px; border-radius: 999px;
  white-space: nowrap;
}
.gw-podium-tickets span {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text3);
}

/* 1st — gold, tallest, centered, crowned */
.gw-podium--1 {
  order: 2;
  padding: 30px 16px 24px;
  border-color: rgba(224,165,0,0.55);
  background: linear-gradient(160deg, rgba(224,165,0,0.20) 0%, rgba(224,165,0,0.04) 100%);
  box-shadow: var(--gold-glow);
}
.gw-podium--1 .gw-podium-medal { width: 116px; margin-top: -16px; }
.gw-podium--1 .gw-podium-tickets { color: var(--gold); background: rgba(224,165,0,0.13); }

/* 2nd — silver, left */
.gw-podium--2 {
  order: 1;
  border-color: rgba(192,200,210,0.40);
  background: linear-gradient(160deg, rgba(192,200,210,0.14) 0%, rgba(192,200,210,0.02) 100%);
}

/* 3rd — bronze, right */
.gw-podium--3 {
  order: 3;
  border-color: rgba(205,127,50,0.40);
  background: linear-gradient(160deg, rgba(205,127,50,0.14) 0%, rgba(205,127,50,0.02) 100%);
}

/* ── GIVEAWAY ADMIN PANEL (hidden behind #admin) ─────────── */
.gw-admin {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px dashed var(--border2);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}
.gw-admin-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text3);
}
.gw-admin-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.gw-admin-btn {
  padding: 9px 16px; border-radius: 8px;
  background: var(--accent); border: none;
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: opacity .15s; white-space: nowrap;
}
.gw-admin-btn--matches { background: var(--gold); color: #1a1a1a; }
.gw-admin-export {
  margin-top: 4px; padding: 12px 14px;
  border: 1px dashed var(--border2); border-radius: 10px;
}
.gw-admin-export-title {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text3); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .04em;
}
.gw-admin-export-grid {
  display: grid; grid-template-columns: auto 1fr 1fr;
  gap: 8px; align-items: center;
}
.gw-admin-export-lbl { font-size: 13px; font-weight: 600; color: var(--text2); }
.gw-admin-export-btn {
  padding: 8px 10px; border-radius: 7px; cursor: pointer;
  background: var(--bg-card2); border: 1px solid var(--border2);
  color: var(--text); font-size: 12px; font-weight: 700;
  transition: border-color .15s, color .15s;
}
.gw-admin-export-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.gw-admin-export-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Admin: per-phone ticket lookup */
.gw-admin-lookup {
  margin-top: 4px; padding: 12px 14px;
  border: 1px dashed var(--border2); border-radius: 10px;
}
.gw-lookup-input-row { display: flex; gap: 8px; margin: 10px 0 4px; }
.gw-lookup-input-row .gw-admin-input { flex: 1; min-width: 0; }
.gw-lookup-result:not(:empty) {
  margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px;
}
.gw-lookup-total { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.gw-lookup-total b { color: var(--gold); font-size: 16px; }
.gw-lookup-item {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--text2); padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.gw-lookup-item:last-child { border-bottom: none; }
.gw-lookup-item span:last-child { color: var(--text3); white-space: nowrap; }
.gw-lookup-muted { color: var(--text3); justify-content: center; }
.gw-lookup-err { color: var(--red); justify-content: center; font-weight: 600; }
.gw-lookup-bonus { color: var(--gold); }
.gw-lookup-bonus span:last-child { color: var(--gold); font-weight: 700; }
.gw-admin-btn:hover:not(:disabled) { opacity: .85; }
.gw-admin-btn:disabled { opacity: .5; cursor: not-allowed; }
.gw-admin-btn--busy { animation: gw-pulse 1.4s ease-in-out infinite; }

/* Admin login gate — full-screen token prompt opened by #admin */
.admin-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(4px);
  padding: 20px;
}
.admin-gate-box {
  width: 100%; max-width: 360px;
  background: var(--bg-card); border: 1px solid var(--border2);
  border-radius: 16px; padding: 26px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.admin-gate-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  text-align: center; margin-bottom: 18px;
}
.admin-gate-input {
  width: 100%; padding: 11px 14px; border-radius: 9px;
  background: var(--bg-card2); border: 1px solid var(--border2);
  color: var(--text); font-size: 14px; outline: none;
}
.admin-gate-input:focus { border-color: var(--accent); }
.admin-gate-err { font-size: 12px; color: var(--red); font-weight: 600; margin-top: 8px; }
.admin-gate-actions { display: flex; gap: 10px; margin-top: 16px; }
.admin-gate-btn, .admin-gate-cancel {
  flex: 1; padding: 11px; border-radius: 9px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: opacity .15s, border-color .15s;
}
.admin-gate-btn { background: var(--accent); border: none; color: #fff; }
.admin-gate-btn:hover { opacity: .85; }
.admin-gate-cancel {
  background: transparent; border: 1px solid var(--border2); color: var(--text3);
}
.admin-gate-cancel:hover { color: var(--text); border-color: var(--text3); }

/* Authed admin panel — stacked rows */
.gw-admin--panel { flex-direction: column; align-items: stretch; gap: 14px; }
.gw-admin-row { display: flex; align-items: center; justify-content: space-between; }

/* Visibility toggle switch */
.gw-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.gw-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.gw-toggle-track {
  position: relative; flex-shrink: 0;
  width: 42px; height: 24px; border-radius: 999px;
  background: var(--bg-card2); border: 1px solid var(--border2);
  transition: background .18s, border-color .18s;
}
.gw-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text3); transition: transform .18s, background .18s;
}
.gw-toggle input:checked + .gw-toggle-track {
  background: var(--accent-dim); border-color: var(--accent);
}
.gw-toggle input:checked + .gw-toggle-track .gw-toggle-thumb {
  transform: translateX(18px); background: var(--accent);
}
.gw-toggle input:disabled + .gw-toggle-track { opacity: .5; }
.gw-toggle-lbl { font-size: 13px; color: var(--text2); font-weight: 600; }

/* Admin login form */
.gw-admin--login { flex-direction: column; align-items: stretch; gap: 10px; }
.gw-admin-login-row { display: flex; gap: 10px; }
.gw-admin-input {
  flex: 1; min-width: 0;
  padding: 9px 14px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border2);
  color: var(--text); font-size: 13px; outline: none;
}
.gw-admin-input:focus { border-color: var(--accent); }
.gw-admin-err { font-size: 12px; color: var(--red); font-weight: 600; }
.gw-admin-logout {
  padding: 9px 12px; border-radius: 8px;
  background: transparent; border: 1px solid var(--border2);
  color: var(--text3); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.gw-admin-logout:hover:not(:disabled) { color: var(--red); border-color: var(--red); }
.gw-admin-logout:disabled { opacity: .5; cursor: not-allowed; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── TABLET (≤ 1024px) ──────────────────────────────────── */
@media (max-width: 1024px) {
  .main { padding: 24px 20px 60px; }
  .groups-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── MOBILE (≤ 640px) ───────────────────────────────────── */
@media (max-width: 640px) {
  /* Header */
  .header-inner {
    padding: 13px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: static;
    gap: 8px;
  }
  .logo { flex-shrink: 0; }
  .logo-img { height: 22px; }
  .header-title {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    white-space: nowrap;
    pointer-events: none;
  }
  .header-title-text { text-align: right; }
  .header-h1 { font-size: 11px; letter-spacing: 0.5px; }
  .header-sub { font-size: 8px; letter-spacing: 1px; margin-top: 1px; }
  .trophy-icon { display: none; }
  .header-right { display: none; }

  /* Tabs */
  .tabs-inner { padding: 0 4px; }
  .tab { padding: 13px 16px; font-size: 11px; letter-spacing: 0; }


  /* Main */
  .main { padding: 14px 10px 60px; }
  .groups-grid { grid-template-columns: 1fr; gap: 8px; }

  /* Match cards */
  .match-card { padding: 10px 12px; }
  .match-meta-venue { display: none; }
  .team { gap: 6px; min-width: 0; overflow: hidden; }
  .team-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .team-logo,
  .team-logo-placeholder { width: 26px; height: 26px; flex-shrink: 0; }
  .score-box { min-width: 50px; flex-shrink: 0; }
  .score-nums { font-size: 20px; }
  .score-vs { font-size: 15px; letter-spacing: 0; }
  .team-logo,
  .team-logo-placeholder { width: 24px; height: 24px; }
  .team { gap: 5px; }

  /* Standings table — hide low-priority columns (В, Н, П = columns 3,4,5) */
  .th-hide { display: none !important; }
  .standings-table th:nth-child(3),
  .standings-table th:nth-child(4),
  .standings-table th:nth-child(5),
  .standings-table td:nth-child(3),
  .standings-table td:nth-child(4),
  .standings-table td:nth-child(5) { display: none !important; }

  /* Match modal */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: 100% !important;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 24px 16px 32px;
    margin: 0;
    max-height: 90dvh;
    overflow-y: auto;
  }
  .modal-score { font-size: 36px; }
  .modal-team-logo,
  .modal-team-placeholder { width: 48px; height: 48px; }
  .modal-team-name { font-size: 12px; }
  .modal-kickoff { font-size: 17px; }

  /* Group popup */
  .group-modal-box {
    border-radius: 16px 16px 0 0 !important;
    max-height: 90dvh;
    overflow-y: auto;
  }
  /* hide ГЗ/ГП columns in group popup table (7th and 8th col) */
  .gm-table th:nth-child(7), .gm-table th:nth-child(8),
  .gm-table td:nth-child(7), .gm-table td:nth-child(8) { display: none !important; }
  .gm-header { padding: 20px 16px 4px; font-size: 18px; letter-spacing: 2px; }
  .gm-subtitle { padding: 0 16px 8px; }
  .gm-table-wrap { padding: 0 16px; }
  .gm-table { font-size: 12px; }
  .gm-row td { padding: 10px 6px; font-size: 12px; }
  .gf-row {
    padding: 10px 16px;
    grid-template-columns: 38px 1fr auto 1fr;
    gap: 5px;
  }
  .gf-team { font-size: 11px; gap: 4px; }
  .gf-logo { width: 16px; height: 16px; }
  .gf-score { font-size: 13px; }
  .gf-time { font-size: 12px; }

  /* Tabs: horizontally scrollable strip + mobile lang switcher fixed on right */
  .tabs-inner { justify-content: space-between; padding: 0 10px; gap: 8px; }
  .tabs-left {
    flex: 1 1 auto; min-width: 0;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .tabs-left::-webkit-scrollbar { display: none; }
  .lang-menu { display: block; }
  .tab { padding: 14px 9px; font-size: 11px; }

  /* Bracket: horizontal scroll on mobile (no JS zoom) */
  /* Bracket is a single 2D-pannable window (scroll freely in any direction,
     like a map) instead of horizontal-in-container + vertical-on-page. */
  .bk-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    height: calc(100dvh - var(--header-h, 120px) - 8px);
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .bk-scroll::-webkit-scrollbar { display: none; }

  /* Giveaway mobile */
  .gw-page { padding: 12px 10px 60px; }
  .gw-banner { padding: 14px; }
  .gw-banner-title { font-size: 14px; }
  .gw-banner-text { font-size: 12px; }
  .gw-stats { margin-bottom: 18px; }
  .gw-stats-num { font-size: 24px; }
  .gw-row { padding: 11px 12px; gap: 10px; }
  .gw-row-rank { width: 26px; height: 26px; font-size: 12px; }
  .gw-row-phone { font-size: 12px; }

  /* Podium: keep 3-up but tighten */
  .gw-podium { gap: 7px; margin: 6px 0 22px; }
  .gw-podium-card { padding: 14px 5px 14px; border-radius: 14px; }
  .gw-podium--1 { padding: 16px 5px 16px; }
  .gw-podium-medal { width: 62px; margin: -4px auto 8px; }
  .gw-podium--1 .gw-podium-medal { width: 80px; margin-top: -10px; }
  .gw-podium-phone { font-size: 10px; margin-bottom: 11px; letter-spacing: 0; }
  .gw-podium-tickets { font-size: 18px; padding: 5px 12px; gap: 5px; }
  .gw-podium-tickets span { display: none; } /* drop "билета" — tight on mobile */

  /* Admin panel */
  .gw-admin { flex-direction: column; align-items: stretch; }
  .gw-admin-btns { flex-direction: column; }
  .gw-admin-btn { width: 100%; }
}

/* ── SEO content (server-rendered; hidden by JS once the app loads) ──────────── */
.seo-content {
  max-width: 900px; margin: 0 auto; padding: 24px 16px 60px;
  color: var(--text2); line-height: 1.7; font-size: 14px;
}
.seo-content h1 { font-size: 22px; color: var(--text); margin: 0 0 12px; }
.seo-content h2 { font-size: 17px; color: var(--text); margin: 24px 0 10px; }
.seo-content p { margin: 0 0 12px; }
.seo-content ul { margin: 0 0 12px; padding-left: 20px; }
.seo-content li { margin: 3px 0; }

/* Standalone SEO pages (/match, /team) — simple header */
.seo-page-bar {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 14px 16px; text-align: center;
}
.seo-page-logo {
  color: var(--text); font-weight: 800; font-size: 16px; text-decoration: none;
}
.seo-content a { color: var(--accent); text-decoration: none; }
.seo-content a:hover { text-decoration: underline; }
