/* Crimson — Club 21 homepage concept, round two.
   Charcoal and red. Sharp geometry, competitive edge, the weekly race
   carrying the page. Radii stay tight: 6px on surfaces, 4px on controls,
   3px on chips and plates. Notches are used only on the race panel, the
   race badges and the ticker label so the motif stays an accent. */

:root {
  --page: #111318;
  --sidebar: #14171E;
  --surface: #181B22;
  --surface-2: #1F232C;
  --surface-3: #262B36;
  --border: #2A2F3A;
  --border-2: #353B48;
  --text: #FFFFFF;
  --muted: #9AA3B5;
  --red: #FF3B3B;          /* accent: rules, numbers, marks, active text */
  --red-hover: #FF5C5C;
  --red-fill: #D92626;     /* filled elements: white text on this passes AA */
  --red-fill-hover: #E62E2E;
  --red-wash: rgba(255, 59, 59, .12);
  --red-edge: rgba(255, 59, 59, .35);
  --win: #3DDC84;
  --focus: #FF5C5C;

  --r-card: 6px;
  --r-btn: 4px;
  --r-chip: 3px;
  --notch: 18px;

  --font-head: "Chakra Petch", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --sidebar-w: 208px;
  --topbar-h: 60px;
  --content-max: 1240px;
  --gutter: 24px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 14px/1.5 var(--font-body);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 700; line-height: 1.12; }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }

/* Shared eyebrow / label type */
.label {
  display: flex; align-items: center; gap: 8px;
  font: 700 11px/1 var(--font-head);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.fine { color: var(--muted); font-size: 12px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 59, .18);
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-btn);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: 600 13px/1 var(--font-head);
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-2); }
.btn-primary { background: var(--red-fill); border-color: var(--red-fill); color: #fff; }
.btn-primary:hover { background: var(--red-fill-hover); border-color: var(--red-fill-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: transparent; }
.btn-quiet { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }

.link { color: var(--muted); font-weight: 500; transition: color .15s ease; }
.link:hover { color: var(--text); }
.link-red { color: var(--red); font: 600 12px/1 var(--font-head); letter-spacing: .04em; text-transform: uppercase; }
.link-red:hover { color: var(--red-hover); }

/* ---------- App shell ---------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 12px 10px;
  overflow-y: auto;
}

.sidebar-brand { display: flex; align-items: center; height: 36px; padding: 0 8px; margin-bottom: 14px; }
.sidebar-group { margin-bottom: 10px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 10px;
  border-radius: var(--r-btn);
  color: var(--muted);
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease;
}
.sidebar-link:hover { background: var(--surface-2); color: var(--text); }
.sidebar-link[aria-current="page"] { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.sidebar-link[aria-current="page"] .icon { color: var(--red); }
.sidebar-link .pill {
  margin-left: auto;
  font: 700 10px/1 var(--font-head);
  padding: 4px 6px; border-radius: var(--r-chip);
  background: var(--red-fill); color: #fff;
  letter-spacing: .04em;
}

/* Sidebar race readout — the race is present in the navigation too */
.sidebar-race {
  margin-top: auto;
  display: block;
  padding: 12px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--red);
  border-radius: var(--r-btn);
  transition: border-color .15s ease, background-color .15s ease;
}
.sidebar-race:hover { background: var(--surface-3); border-color: var(--border-2); border-left-color: var(--red); }
.sidebar-race .label { font-size: 9px; letter-spacing: .12em; }
.sidebar-race-time { display: block; margin-top: 8px; font: 600 12px/1 var(--font-head); color: var(--muted); letter-spacing: .04em; }
.sidebar-race-time b { font-size: 17px; font-weight: 700; color: var(--text); }
.sidebar-race-prize { display: block; margin-top: 6px; font: 700 12px/1 var(--font-head); color: var(--red-hover); letter-spacing: .04em; }

.sidebar-foot { padding: 12px 10px 4px; color: var(--muted); font-size: 12px; }
.sidebar-foot .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--win); margin-right: 6px; vertical-align: middle; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-word { font: 700 18px/1 var(--font-head); letter-spacing: .08em; color: var(--text); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--red-fill); color: #fff;
  font: 700 13px/1 var(--font-head); letter-spacing: -.02em;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  flex: none;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: var(--page);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin: 0 auto; height: 100%;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 14px;
}
.topbar-logo { display: none; flex: none; }

.search {
  flex: 1 1 auto; min-width: 0; max-width: 460px;
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  color: var(--muted);
  transition: border-color .15s ease;
}
.search:focus-within { border-color: var(--red); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: 0; outline: 0;
  color: var(--text); font: inherit;
}
.search input::placeholder { color: var(--muted); }
.search kbd {
  font: 600 10px/1 var(--font-head); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--r-chip);
  padding: 3px 5px; flex: none;
}

.search-btn {
  display: none; flex: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  background: var(--surface-2); color: var(--muted);
  align-items: center; justify-content: center;
}

.topbar-actions { margin-left: auto; min-width: 0; display: flex; align-items: center; gap: 8px; }

/* Language menu */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px;
  border-radius: var(--r-btn); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font: 600 12px/1 var(--font-head); letter-spacing: .06em;
}
.lang-btn:hover { background: var(--surface-3); }
.lang-btn .chev { transition: transform .15s ease; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 180px; padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.lang-menu.up { top: auto; bottom: calc(100% + 6px); }
.lang-menu li button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; height: 34px; padding: 0 10px;
  border-radius: var(--r-btn); text-align: left;
  color: var(--text);
}
.lang-menu li button:hover { background: var(--surface); }
.lang-menu li button span { color: var(--muted); font: 600 11px/1 var(--font-head); letter-spacing: .08em; }
.lang-menu li button[aria-checked="true"],
.lang-menu li button[aria-checked="true"] span { color: var(--red-hover); }

/* ---------- Content shell ---------- */

.content {
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 20px var(--gutter) 48px;
  display: flex; flex-direction: column; gap: 34px;
}

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }

/* Section headers — a skewed mark, the title, then a rule across the grid */
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; letter-spacing: .06em; text-transform: uppercase;
}
.section-title::before {
  content: ""; width: 4px; height: 17px;
  background: var(--red); transform: skewX(-14deg); flex: none;
}
.section-title .icon { color: var(--red); width: 18px; height: 18px; }
.rule {
  flex: 1 1 auto; min-width: 8px; height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, var(--border) 55%, rgba(42, 47, 58, 0) 100%);
}
.section-head .link { font-size: 13px; white-space: nowrap; }

.row-nav { display: flex; gap: 6px; }
.row-nav button {
  width: 32px; height: 32px;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  background: var(--surface-2); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.row-nav button:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-2); }
.row-nav button:disabled { opacity: .4; cursor: default; }

/* ---------- Hero: the welcome offer leads ---------- */

.offer {
  position: relative; overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
  gap: 24px;
  padding: 34px 34px 30px;
  background:
    linear-gradient(105deg, var(--surface) 0%, var(--surface) 52%, #1B1E26 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.offer::before {
  content: ""; position: absolute; left: 0; top: 0; width: 220px; height: 2px;
  background: linear-gradient(90deg, var(--red), rgba(255, 59, 59, 0));
}
.offer::after {
  content: ""; position: absolute; right: -8%; top: -50%;
  width: 62%; height: 200%;
  background: radial-gradient(closest-side, rgba(217, 38, 38, .20), rgba(217, 38, 38, 0));
  pointer-events: none;
}
.offer-copy { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 11px/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--red); }
.offer h1 { font-size: 44px; letter-spacing: -.005em; }
.offer h1 strong { color: var(--red); font-weight: 700; }
.offer-sub { color: var(--muted); margin-top: 14px; max-width: 40ch; font-size: 15px; }

.offer-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 24px; }
.offer-stats li {
  position: relative;
  min-width: 104px; padding: 11px 14px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-btn);
}
.offer-stats li::after { content: ""; position: absolute; left: -1px; bottom: -1px; width: 28px; height: 2px; background: var(--red); }
.offer-stats b { display: block; font: 700 26px/1 var(--font-head); letter-spacing: -.01em; }
.offer-stats b i { font-style: normal; font-size: 13px; color: var(--red-hover); margin-left: 3px; vertical-align: 6px; letter-spacing: .02em; }
.offer-stats span { display: block; margin-top: 7px; font: 600 10px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.offer .cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.offer .fine { margin-top: 14px; }

.offer-art { position: relative; min-height: 300px; }
.offer-art img {
  position: absolute; bottom: 0;
  width: 45%; height: auto; aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-card);
  border: 1px solid var(--border-2);
  box-shadow: 0 22px 46px rgba(0, 0, 0, .62);
  transform-origin: bottom center;
}
.offer-art img:nth-child(1) { left: -4%; bottom: 12%; transform: rotate(-13deg); z-index: 1; }
.offer-art img:nth-child(2) { left: 19%; bottom: 19%; transform: rotate(-4deg); z-index: 2; }
.offer-art img:nth-child(3) { left: 43%; bottom: 19%; transform: rotate(4deg); z-index: 3; }
.offer-art img:nth-child(4) { left: 65%; bottom: 12%; transform: rotate(13deg); z-index: 2; }

.offer-jump {
  position: absolute; left: 34px; bottom: 30px; z-index: 3;
  display: none; align-items: center; gap: 8px;
  font: 600 12px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.offer-jump:hover { color: var(--red); }
.offer-jump .icon { color: var(--red); }

/* ---------- The weekly race ---------- */

.arena {
  background: var(--border);
  padding: 1px;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  filter: drop-shadow(0 22px 44px rgba(217, 38, 38, .16));
}
.arena-inner {
  position: relative;
  padding: 24px 24px 20px;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .022) 0 1px, rgba(255, 255, 255, 0) 1px 56px),
    radial-gradient(90% 110% at 100% 0%, rgba(217, 38, 38, .16), rgba(217, 38, 38, 0) 62%),
    var(--surface);
}
.arena-inner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 34%, rgba(255, 59, 59, .15) 100%);
}

.arena-head { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.arena-title { flex: 1 1 340px; min-width: 0; }
.arena-title h2 { margin-top: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.prize-figure { font-size: 46px; letter-spacing: -.02em; line-height: 1; }
.prize-word { font: 600 13px/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.arena-sub { color: var(--muted); margin-top: 10px; max-width: 46ch; }

.countdown { flex: 0 0 auto; text-align: right; }
.countdown .label { justify-content: flex-end; }
.countdown-time { display: flex; gap: 6px; margin-top: 10px; justify-content: flex-end; }
.cd {
  position: relative;
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 58px; padding: 9px 6px 7px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-btn);
}
.cd::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--border-2); }
.cd b { font: 700 26px/1 var(--font-head); letter-spacing: .01em; }
.cd i { font: 600 9px/1 var(--font-head); font-style: normal; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 7px; }
.cd-sec { background: var(--red-wash); border-color: var(--red-edge); }
.cd-sec b { color: var(--red-hover); }
.cd-sec::after { background: var(--red); }
.countdown-fine { margin-top: 8px; }

.arena-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 20px;
  margin-top: 22px;
}

/* Leaderboard */
.race-table { font-size: 13px; }
.race-table th {
  text-align: left; padding: 0 12px 9px 0;
  font: 700 10px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.race-table th:last-child, .race-table td:last-child { padding-right: 0; }
.race-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.race-table .num, .race-table th.num { text-align: right; }
.race-table .col-rank { width: 52px; }

.rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted);
  font: 700 15px/1 var(--font-head);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.rank-1 { background: var(--red-fill); border-color: var(--red-fill); color: #fff; }
.rank-2, .rank-3 { background: var(--red-wash); border-color: var(--red-edge); color: var(--red-hover); }
.rank-you { background: transparent; border: 1px dashed var(--border-2); color: var(--muted); }

.race-table .player { font-weight: 500; }
.race-table .player small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 2px; }
.race-table .col-wager { position: relative; }
.wager-figure { font: 600 13px/1 var(--font-head); letter-spacing: .01em; }
.wager-figure.zero { color: var(--muted); }
.wager-bar {
  display: block; height: 3px; margin-top: 7px; margin-left: auto;
  width: var(--p); max-width: 100%;
  background: linear-gradient(90deg, rgba(255, 59, 59, .25), var(--red));
}
.you-row .wager-bar { background: var(--border-2); }
.prize-cell { color: var(--red); font: 700 14px/1 var(--font-head); letter-spacing: .01em; }
.prize-cell.muted { color: var(--muted); }
.lead-row td { background: linear-gradient(90deg, rgba(255, 59, 59, .06), rgba(255, 59, 59, 0) 70%); }
.race-table tfoot td { border-bottom: 0; border-top: 1px dashed var(--border-2); padding-top: 12px; }
.race-table tbody tr:last-child td { border-bottom: 0; }

.board { display: flex; flex-direction: column; }
.board-foot { margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.board-foot .link-red { margin-left: auto; }

/* Your standing */
.standing {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  border-radius: var(--r-card);
}
.standing-rank { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.standing-rank b { font: 700 40px/0.9 var(--font-head); color: var(--muted); }
.standing-rank span { font: 700 14px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.standing-copy { color: var(--muted); font-size: 13px; }
.standing-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.step { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.step-n {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  background: var(--surface); border: 1px solid var(--border);
  font: 700 10px/1 var(--font-head); color: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}
.standing .btn { margin-top: 4px; }

/* Games that count double — the link to the badged tiles */
.arena-foot {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: center;
}
.double-head .fine { margin-top: 8px; max-width: 30ch; }
.double-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.double-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-btn);
  transition: border-color .15s ease, background-color .15s ease;
}
.double-list a:hover { border-color: var(--red-edge); background: var(--surface-3); }
.double-list img { width: 34px; height: 45px; object-fit: cover; border-radius: var(--r-chip); border: 1px solid var(--border); flex: none; }
.double-list span { min-width: 0; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.double-list small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Big wins ticker ---------- */

.ticker {
  display: flex; align-items: stretch;
  height: 58px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-top: -12px;
}
.ticker-label {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 26px 0 16px;
  background: var(--red-fill); color: #fff;
  font: 700 11px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.ticker-label .icon { width: 16px; height: 16px; }
.ticker-viewport {
  flex: 1; min-width: 0; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
}
.ticker-track {
  display: flex; width: max-content; height: 100%;
  animation: ticker 64s linear infinite;
}
.ticker-viewport:hover .ticker-track,
.ticker-viewport:focus-within .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 18px;
  font-size: 13px; color: var(--muted);
  white-space: nowrap;
  border-right: 1px solid var(--border);
}
.ticker-item img { width: 26px; height: 34px; object-fit: cover; border-radius: var(--r-chip); border: 1px solid var(--border); }
.ticker-item b { color: var(--text); font-weight: 500; }
.ticker-item .tk-game { color: var(--muted); }
.ticker-item .tk-x {
  font: 700 12px/1 var(--font-head);
  color: var(--red-hover);
  background: var(--red-wash); border: 1px solid var(--red-edge);
  padding: 4px 6px; border-radius: var(--r-chip);
}
.ticker-item .tk-amt { color: var(--win); font: 700 13px/1 var(--font-head); letter-spacing: .01em; }
.ticker-pause {
  flex: none; align-self: stretch;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted);
  font: 600 10px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase;
}
.ticker-pause:hover { color: var(--text); background: var(--surface-3); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Chips ---------- */

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  background: var(--surface-2); color: var(--muted);
  font: 600 13px/1 var(--font-head); letter-spacing: .04em;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip[aria-pressed="true"] { background: var(--red-fill); border-color: var(--red-fill); color: #fff; }
.chip .icon { width: 16px; height: 16px; }

/* ---------- Game rows ---------- */

.row-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 6 * 12px) / 7);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 6px; margin: -6px;
}
.row-track::-webkit-scrollbar { display: none; }

.tile { position: relative; display: block; scroll-snap-align: start; outline-offset: 3px; min-width: 0; }
.tile-art {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: transform .18s ease, border-color .18s ease;
}
.tile-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.tile:hover .tile-art { transform: translateY(-3px); border-color: var(--border-2); }
.tile:hover .tile-art img { transform: scale(1.04); }
.tile-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(17, 19, 24, .58);
  opacity: 0; transition: opacity .18s ease;
}
.tile:hover .tile-play, .tile:focus-visible .tile-play { opacity: 1; }
.tile-play span {
  width: 44px; height: 44px;
  background: var(--red-fill); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
}
.tile-play .icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.tile-name { margin-top: 8px; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-provider { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 7px;
  border-radius: var(--r-chip);
  font: 700 10px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase;
}
.badge-race {
  background: var(--red-fill); color: #fff; border-radius: 0;
  padding-right: 9px;
  clip-path: polygon(0 0, 100% 0, 100% 62%, calc(100% - 7px) 100%, 0 100%);
}
.badge-race .icon { width: 11px; height: 11px; stroke-width: 2.2; }
.badge-inline { position: static; height: 18px; padding: 0 7px 0 5px; vertical-align: -4px; }
.badge-inline .icon { width: 10px; height: 10px; }
.badge-new, .badge-live { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.badge-x { right: 8px; left: auto; background: rgba(17, 19, 24, .88); color: var(--text); border: 1px solid var(--border); font-size: 9px; }

.tile-more .tile-art {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--muted); text-align: center; padding: 12px;
  background: var(--surface);
}
.tile-more .tile-art strong { font: 700 24px/1 var(--font-head); color: var(--text); }
.tile-more .tile-art span { font-size: 12px; }
.tile-more .tile-art .icon { color: var(--red); }

/* ---------- Live bets ---------- */

.bets .section-head { flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-btn); }
.tab {
  height: 28px; padding: 0 12px;
  border-radius: var(--r-chip);
  font: 600 12px/1 var(--font-head); letter-spacing: .04em;
  color: var(--muted);
  transition: background-color .15s ease, color .15s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--red-fill); color: #fff; }

.bets-table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.bets-table { min-width: 700px; font-size: 13px; }
.bets-table th {
  text-align: left; padding: 12px 14px;
  font: 700 10px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.bets-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.bets-table tbody tr:last-child td { border-bottom: 0; }
.bets-table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.bets-table .num, .bets-table th.num { text-align: right; }
.bets-table .game { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.bets-table .game img { width: 30px; height: 40px; object-fit: cover; border-radius: var(--r-chip); border: 1px solid var(--border); }
.bets-table .game small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.bets-table .player { color: var(--muted); }
.bets-table .player.is-hidden { font-style: italic; }
.bets-table .time { color: var(--muted); font-size: 12px; }
.bets-table .wager, .bets-table .payout { font: 600 13px/1 var(--font-head); }
.mx {
  display: inline-flex; align-items: baseline; justify-content: flex-end;
  min-width: 72px; padding: 4px 7px;
  border: 1px solid var(--border); border-radius: var(--r-chip);
  background: var(--surface-2);
  font: 700 13px/1 var(--font-head); letter-spacing: .01em;
}
.mx i { font-style: normal; color: var(--muted); margin-left: 2px; font-size: 11px; }
.mx.hot { color: var(--red-hover); background: var(--red-wash); border-color: var(--red-edge); }
.mx.hot i { color: var(--red-hover); }
.bets-table .payout.win { color: var(--win); }
.bets-table .payout.loss { color: var(--muted); }
.bets-table .coin {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; margin-left: 6px; vertical-align: -3px;
  font: 700 7px/1 var(--font-head); background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.bets-table tr[hidden] { display: none; }
.bets-foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.bets-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--win); flex: none; }

/* ---------- Promotions ---------- */

.promos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.promo { position: relative; overflow: hidden; padding: 20px; min-height: 200px; display: flex; flex-direction: column; }
.promo .kicker { font: 700 10px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.promo h3 { font-size: 20px; max-width: 14ch; }
.promo p { color: var(--muted); margin: 8px 0 16px; max-width: 26ch; }
.promo-art {
  position: absolute; right: -20px; top: 10px;
  width: 132px; height: 176px;
  border-radius: var(--r-card); border: 1px solid var(--border);
  object-fit: cover;
  transform: rotate(8deg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.promo-copy { position: relative; z-index: 1; max-width: calc(100% - 96px); display: flex; flex-direction: column; flex: 1; }
.promo-copy .btn { margin-top: auto; align-self: flex-start; }

/* ---------- VIP ---------- */

.vip { padding: 24px; }
.vip-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.vip-head h2 { font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.vip-head p { color: var(--muted); margin-top: 8px; max-width: 52ch; }
.vip-head .btn { margin-left: auto; }

.vip-progress { margin-top: 22px; }
.vip-progress .meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.vip-progress .meta b { color: var(--text); font: 700 12px/1.5 var(--font-head); }
.vip-bar { height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-chip); overflow: hidden; }
.vip-bar span { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--red-fill), var(--red)); }

.tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.tier { position: relative; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); }
.tier .tier-mark {
  width: 30px; height: 30px;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font: 700 11px/1 var(--font-head);
  color: var(--muted);
  margin-bottom: 10px;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.tier h3 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.tier p { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tier.current { border-color: var(--red); }
.tier.current .tier-mark { background: var(--red-fill); color: #fff; border-color: var(--red-fill); }
.tier .you { position: absolute; top: 12px; right: 12px; font: 700 9px/1 var(--font-head); letter-spacing: .12em; color: var(--red-hover); text-transform: uppercase; }

/* ---------- Payments ---------- */

.payments { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.pay-card { padding: 20px; }
.pay-card h2 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.pay-card h2 .icon { color: var(--red); width: 18px; height: 18px; }
.coins { display: flex; flex-wrap: wrap; gap: 10px; }
.coin-glyph {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px 0 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px;
  font: 600 12px/1 var(--font-head); letter-spacing: .04em;
}
.coin-glyph i {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 9px/1 var(--font-head); font-style: normal; color: var(--muted);
}
.coin-glyph.is-card i { border-radius: var(--r-chip); width: 30px; height: 22px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fact { display: flex; gap: 12px; align-items: flex-start; }
.fact .icon { color: var(--red); margin-top: 1px; }
.fact b { display: block; font: 700 13px/1.3 var(--font-head); }
.fact span { color: var(--muted); font-size: 12px; }

/* ---------- Providers ---------- */

.providers {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px;
  padding: 18px 4px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.providers .lead { font: 700 10px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wordmark {
  font: 700 14px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); opacity: .85;
  transition: color .15s ease, opacity .15s ease;
}
.wordmark:hover { color: var(--text); opacity: 1; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--border); background: var(--sidebar); }
.footer-inner { max-width: calc(var(--content-max) + var(--gutter) * 2); margin: 0 auto; padding: 40px var(--gutter) 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 34ch; }
.footer h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { color: var(--muted); font-size: 13px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 12px;
}
.footer-bottom .age { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--font-head); color: var(--text); }
.footer-bottom .age i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--red); color: var(--red);
  font: 700 10px/1 var(--font-head); font-style: normal;
}
.footer-bottom .lang { margin-left: auto; }
.footer-legal { margin-top: 14px; color: var(--muted); font-size: 12px; }

/* ---------- Bottom nav (mobile) ---------- */

.bottomnav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--sidebar);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 60px; }
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 0; padding: 0 2px;
  color: var(--muted); font: 600 10px/1 var(--font-head); letter-spacing: .04em; text-transform: uppercase;
}
.bottomnav a[aria-current="page"] { color: var(--text); }
.bottomnav a[aria-current="page"] .icon { color: var(--red); }

/* ---------- Responsive ---------- */

@media (min-width: 1024px) {
  .offer-jump { display: inline-flex; }
  .offer-copy { padding-bottom: 26px; }
}

@media (max-width: 1200px) {
  .row-track { grid-auto-columns: calc((100% - 5 * 12px) / 6); }
  .offer h1 { font-size: 36px; }
  .prize-figure { font-size: 40px; }
  .arena-grid { grid-template-columns: minmax(0, 1fr) 264px; }
}

@media (max-width: 1023px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar-logo { display: inline-flex; }
  .search { max-width: 340px; }
  .row-track { grid-auto-columns: calc((100% - 4 * 12px) / 5); }
  .offer { grid-template-columns: minmax(0, 1fr); padding: 26px 22px 24px; }
  .offer h1 { font-size: 34px; }
  .offer-art { min-height: 0; height: 180px; }
  .offer-art img { width: 23%; bottom: 0 !important; }
  .offer-art img:nth-child(1) { left: 3%; }
  .offer-art img:nth-child(2) { left: 27%; }
  .offer-art img:nth-child(3) { left: 51%; }
  .offer-art img:nth-child(4) { left: 75%; }
  .arena-grid { grid-template-columns: minmax(0, 1fr); }
  .arena-foot { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .double-head .fine { max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .bottomnav { display: block; }
  body { padding-bottom: 60px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; --notch: 14px; }
  .content { gap: 28px; padding-bottom: 34px; }
  .row-track { grid-auto-columns: calc((100% - 3 * 10px) / 4); gap: 10px; }
  .search { display: none; }
  .search-btn { display: inline-flex; }
  .topbar-inner { gap: 10px; }
  .btn-login { display: none; }

  .offer { padding: 22px 18px 20px; }
  .offer h1 { font-size: 30px; }
  .offer-sub { font-size: 14px; }
  .offer-stats li { min-width: 0; flex: 1 1 84px; padding: 10px 12px; }
  .offer-stats b { font-size: 22px; }
  .offer .cta .btn { flex: 1 1 auto; }

  .arena-inner { padding: 18px 16px 16px; }
  .arena-head { gap: 14px; }
  .prize-figure { font-size: 34px; }
  .countdown { text-align: left; width: 100%; }
  .countdown .label, .countdown-time { justify-content: flex-start; }
  .countdown-time { gap: 5px; }
  .cd { flex: 1 1 0; min-width: 0; padding: 8px 4px 6px; }
  .cd b { font-size: 22px; }
  .double-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .ticker { height: 52px; }
  .ticker-label { padding: 0 20px 0 12px; }
  .ticker-label-text { display: none; }

  .promos-grid { grid-template-columns: minmax(0, 1fr); }
  .payments { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier:last-child { grid-column: 1 / -1; }
  .vip-head .btn { margin-left: 0; }
  .bets .tabs { width: 100%; }
  .bets .tab { flex: 1; }
  .footer-grid { gap: 24px; }
  .footer-bottom .lang { margin-left: 0; }
}

@media (max-width: 479px) {
  .row-track { grid-auto-columns: calc((100% - 2 * 10px) / 2.6); }
  .offer h1 { font-size: 26px; }
  .prize-figure { font-size: 30px; }
  .race-table .col-wager, .bets-table .hide-xs { display: none; }
  .board-foot { gap: 10px; }
  .board-foot .link-red { margin-left: 0; }
  .promo-copy { max-width: calc(100% - 74px); }
  .promo-art { width: 104px; height: 138px; right: -16px; }
  .section-title { font-size: 15px; }
}

/* Nothing in the top bar may overflow a very narrow viewport */
@media (max-width: 400px) {
  .topbar-inner { gap: 8px; }
  .topbar-actions { gap: 6px; }
  .lang-btn { padding: 0 8px; gap: 0; }
  .lang-btn .lang-code, .lang-btn .chev { display: none; }
  .btn-register { padding: 0 10px; font-size: 12px; }
  .search-btn { width: 34px; height: 34px; }
}

@media (max-width: 340px) {
  :root { --gutter: 12px; }
  .topbar-logo .logo-word { display: none; }
  .offer h1 { font-size: 23px; }
  .double-list { grid-template-columns: minmax(0, 1fr); }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier:last-child { grid-column: auto; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .bottomnav a { font-size: 9px; letter-spacing: 0; }
  .providers { gap: 10px 20px; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .row-track { scroll-behavior: auto; }
  .ticker-track { animation: none; transform: none; }
  .ticker-viewport {
    overflow-x: auto;
    -webkit-mask-image: none; mask-image: none;
  }
  .tile:hover .tile-art, .tile:hover .tile-art img { transform: none; }
}
