/* Steel — Club 21 homepage concept (round two)
   A calm blue-charcoal product shell with a competitive edge.
   Blue is the environment: navigation, links, product furniture.
   Red is the heat: the weekly race, multipliers and anything with a clock on it.
   The two never do the same job. Spacing sits on an 8px grid (4px for micro steps);
   cards are 6px, controls 4px, borders a crisp 1px. */

:root {
  --page: #0E1A22;
  --sidebar: #12212B;
  --surface: #172A35;
  --surface-2: #1E3542;
  --surface-3: #27414F;
  --border: #27414F;
  --border-soft: #1F3746;

  --text: #FFFFFF;
  --muted: #9FB3C0;

  --accent: #2E7FD4;        /* steel blue: structure, navigation, product furniture */
  --accent-fill: #1F6FC4;   /* filled controls — white text clears AA at 5.1:1 */
  --accent-fill-hover: #2E7FD4;
  --link: #6FAEEA;          /* lighter tint so link text clears AA on every surface */

  --heat: #E23A3A;          /* race red, non-text only: rules, dots, bars */
  --heat-fill: #D92626;     /* filled race controls — white text clears AA at 4.9:1 */
  --heat-fill-hover: #E23A3A;
  --heat-text: #FF6B6B;     /* race red as text, clears AA on page and surfaces */

  --win: #35CE84;           /* payouts in the bets feed only */
  --focus: #A8D3FF;

  --r-card: 6px;
  --r-ctl: 4px;

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

  --topbar-h: 60px;
  --content: 1240px;
  --gutter: 24px;

  /* sidebar: wide by default, rail when collapsed or on narrow viewports */
  --sb-w: 240px;
  --label-d: inline;
  --side-jc: flex-start;
  --side-px: 12px;
}

body.rail {
  --sb-w: 64px;
  --label-d: none;
  --side-jc: center;
  --side-px: 0;
}

/* ---------- base ---------- */

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

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

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

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.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;
}

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

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

.skip {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: var(--r-ctl);
  background: var(--accent-fill); color: #fff; font-weight: 600;
}
.skip:focus { top: 8px; }

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

/* small tracked labels — the competitive voice, used for meta only */
.eyebrow, .kicker, .race-label, .lead {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 11px/1 var(--font-head);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.kicker-heat { color: var(--heat-text); }

.fine { color: var(--muted); font-size: 12px; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--surface-2); color: var(--text);
  font: 600 13px/1 var(--font); white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--surface-3); border-color: #34515F; }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.btn-primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.btn-heat { background: var(--heat-fill); border-color: var(--heat-fill); color: #fff; }
.btn-heat:hover { background: var(--heat-fill-hover); border-color: var(--heat-fill-hover); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px;
  border: 1px solid transparent; border-radius: var(--r-ctl);
  color: var(--muted);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }

.text-link { color: var(--link); font-weight: 500; }
.text-link:hover { color: var(--text); text-decoration: underline; }

.live-dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: var(--heat); box-shadow: 0 0 0 3px rgba(226, 58, 58, .18);
}

/* ---------- logo ---------- */

.logo { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: var(--r-ctl);
  background: var(--accent-fill); color: #fff;
  font: 700 13px/1 var(--font-head); letter-spacing: -.02em;
}
.logo-word { font: 700 18px/1 var(--font-head); letter-spacing: .02em; white-space: nowrap; }
.logo-word b { color: var(--link); font-weight: 700; }

/* ---------- sidebar ---------- */

.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 30;
  width: var(--sb-w);
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 10px 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  transition: width .2s ease;
}
.side-head {
  display: flex; align-items: center; justify-content: var(--side-jc); gap: 10px;
  height: 44px; padding: 0 2px;
}
body.rail .side-logo { display: none; }

.side-nav {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 8px; border-top: 1px solid var(--border-soft);
}
.side-nav a {
  display: flex; align-items: center; justify-content: var(--side-jc); gap: 12px;
  height: 40px; padding: 0 var(--side-px);
  border: 1px solid transparent; border-radius: var(--r-ctl);
  color: var(--muted); font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.side-nav a[aria-current="page"] .ic { color: var(--accent); }
.side-label { display: var(--label-d); white-space: nowrap; }
.side-nav .pill {
  margin-left: auto;
  padding: 4px 6px; border-radius: 3px;
  background: var(--heat-fill); color: #fff;
  font: 700 10px/1 var(--font-head); letter-spacing: .04em;
}

.side-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: var(--side-jc); gap: 8px;
  padding: 8px var(--side-px);
  color: var(--muted); font-size: 12px;
}
.side-foot .dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--win); }

/* ---------- shell and top bar ---------- */

.shell { margin-left: var(--sb-w); min-height: 100vh; transition: margin-left .2s ease; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--content); height: 100%; margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.top-logo { display: none; }

.search {
  flex: 1 1 auto; min-width: 0; max-width: 440px;
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 12px;
  background: var(--page); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  transition: border-color .15s ease;
}
.search:hover { border-color: #34515F; }
.search:focus-within { border-color: var(--accent); color: var(--text); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: 0; outline: 0; color: var(--text);
  font: 500 14px var(--font);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search kbd {
  flex: none;
  padding: 3px 5px; border: 1px solid var(--border); border-radius: 3px;
  font: 600 10px/1 var(--font-head); color: var(--muted);
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.search-btn { display: none; }

/* language switcher */
.lang { position: relative; }
.lang-btn { gap: 6px; padding: 0 10px; font-family: var(--font-head); letter-spacing: .04em; }
.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: 190px; 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, .45);
}
.lang.up .lang-menu { top: auto; bottom: calc(100% + 6px); right: auto; left: 0; }
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; height: 34px; padding: 0 10px;
  border-radius: 3px; text-align: left; color: var(--text); font-weight: 500;
}
.lang-menu button span { color: var(--muted); font: 700 11px/1 var(--font-head); letter-spacing: .06em; }
.lang-menu button:hover { background: var(--surface); }
.lang-menu button[aria-selected="true"] { background: var(--surface); }
.lang-menu button[aria-selected="true"] span { color: var(--link); }

/* ---------- content ---------- */

.content {
  max-width: var(--content); margin: 0 auto;
  padding: 24px var(--gutter) 56px;
  display: flex; flex-direction: column; gap: 32px;
}

.row-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.section-title {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  font-size: 16px; letter-spacing: .01em;
}
.section-title .ic { color: var(--accent); }
.see-all {
  margin-left: auto;
  color: var(--link); font-size: 13px; font-weight: 500;
}
.see-all:hover { color: var(--text); text-decoration: underline; }
.see-all + .row-nav { margin-left: 0; }

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

/* ---------- 2. hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.hero-main { display: grid; grid-template-rows: auto 1fr; gap: 28px; min-width: 0; }

/* welcome offer leads */
.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 20px 24px;
  background: linear-gradient(180deg, #1B3140 0%, var(--surface) 100%);
}
.welcome-text { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.welcome h1 { font-size: 25px; letter-spacing: .005em; }
.welcome h1 b { color: var(--link); font-weight: 700; }
.welcome-sub { color: var(--muted); }
.welcome-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.welcome-actions .fine { flex-basis: 100%; }

/* paired entry cards, artwork spilling above the top edge */
.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
.entry {
  position: relative; display: flex; min-height: 196px;
  padding: 20px;
  background: linear-gradient(180deg, #1B3140 0%, var(--surface) 100%);
  transition: border-color .15s ease, transform .15s ease;
}
.entry:hover { border-color: var(--accent); }
.entry-body {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; gap: 4px; align-self: flex-end;
}
.entry-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 11px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.entry-title { font: 700 22px/1.1 var(--font-head); }
.entry-sub { color: var(--muted); font-size: 13px; }

.entry-art { position: absolute; right: 20px; top: -20px; width: 250px; height: 180px; z-index: 1; }
.entry-art img {
  position: absolute; top: 0;
  width: 135px; height: 180px; object-fit: cover;
  border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
  transition: transform .2s ease;
}
.entry-art img:nth-child(1) { right: 114px; transform: rotate(-11deg) translateY(14px); z-index: 1; }
.entry-art img:nth-child(2) { right: 57px;  transform: rotate(-3deg) translateY(-4px); z-index: 2; }
.entry-art img:nth-child(3) { right: 0;     transform: rotate(8deg) translateY(8px); z-index: 3; }
.entry:hover .entry-art img:nth-child(1) { transform: rotate(-13deg) translateY(6px); }
.entry:hover .entry-art img:nth-child(2) { transform: rotate(-3deg) translateY(-12px); }
.entry:hover .entry-art img:nth-child(3) { transform: rotate(10deg) translateY(0); }

/* the race board: the one hot thing on the page */
.race {
  display: flex; flex-direction: column;
  padding: 18px 20px 16px;
  border-top: 2px solid var(--heat);
  box-shadow: 0 24px 56px -28px rgba(226, 58, 58, .5);
}
.race-top { display: flex; align-items: center; gap: 12px; }
.race-state {
  margin-left: auto;
  padding: 4px 7px; border-radius: 3px;
  background: rgba(226, 58, 58, .14); border: 1px solid rgba(226, 58, 58, .45);
  color: var(--heat-text);
  font: 700 10px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase;
}
.race-prize {
  margin-top: 10px;
  font: 700 34px/1 var(--font-head); letter-spacing: -.01em;
  color: var(--heat-text);
}
.race-prize small {
  margin-left: 8px;
  color: var(--muted); font: 700 12px/1 var(--font-head);
  letter-spacing: .08em; text-transform: uppercase;
}

.countdown { margin-top: 16px; }
.countdown-time { display: flex; gap: 6px; margin-top: 8px; }
.countdown-time span {
  flex: 1; min-width: 0;
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 6px 4px 5px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-ctl);
  font: 700 18px/1 var(--font-head);
}
.countdown-time i {
  margin-top: 5px;
  font: 600 9px/1 var(--font-head); font-style: normal;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

.race-table { margin-top: 18px; font-size: 13px; }
.race-table th {
  padding: 0 0 8px; text-align: left;
  font: 700 10px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.race-table td { padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.race-table tr:last-child td { border-bottom: 0; }
.race-table .num, .race-table th.num { text-align: right; }
.race-table .rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--border);
  font: 700 11px/1 var(--font-head);
}
.race-table tr:first-child .rank { background: var(--heat-fill); border-color: var(--heat-fill); color: #fff; }
.race-table .player { font-weight: 500; }
.race-table .col-wager { font: 600 13px/1 var(--font-head); color: var(--muted); }
.race-table .prize-cell { font: 700 13px/1 var(--font-head); color: var(--heat-text); }

.race-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 12px; }
.race-foot .btn { margin-left: auto; flex: none; }

/* ---------- big wins ticker ---------- */

.ticker {
  display: flex; align-items: center;
  height: 40px; margin-top: -16px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden;
}
.ticker-label {
  flex: none; height: 100%;
  padding: 0 14px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  color: var(--text);
}
.ticker-label .ic { color: var(--heat-text); }
.ticker-viewport { flex: 1; min-width: 0; overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: ticker 62s linear infinite; }
.ticker-viewport:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 18px; white-space: nowrap;
  border-right: 1px solid var(--border-soft);
  font-size: 13px; color: var(--muted);
}
.ticker-item b { color: var(--text); font-weight: 500; }
.ticker-item .x { font: 700 12px/1 var(--font-head); color: var(--heat-text); }
.ticker-item .amt { font: 700 13px/1 var(--font-head); color: var(--text); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 3. category chips ---------- */

.chips {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px; margin: -4px;
}
.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-ctl);
  background: var(--surface-2); color: var(--muted);
  font: 600 13px/1 var(--font);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--text); border-color: #34515F; }
.chip[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }

/* ---------- 4. game rows ---------- */

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

.tile { position: relative; display: block; min-width: 0; scroll-snap-align: start; }
.tile-art {
  position: relative; display: block;
  aspect-ratio: 3 / 4; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-card);
  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, .tile:focus-visible .tile-art { transform: translateY(-3px); border-color: var(--accent); }
.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(14, 26, 34, .55);
  opacity: 0; transition: opacity .18s ease;
}
.tile:hover .tile-play, .tile:focus-visible .tile-play { opacity: 1; }
.tile-play > span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r-ctl);
  background: var(--accent-fill); color: #fff;
}
.tile-play .ic { fill: currentColor; stroke: none; }

.tile-name, .tile-prov, .tile-live { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tile-name { margin-top: 8px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.tile-prov { color: var(--muted); font-size: 12px; line-height: 1.3; }
.tile-live { margin-top: 3px; color: var(--muted); font-size: 12px; }
.tile-live i {
  display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px;
  border-radius: 50%; background: var(--accent);
}

.badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 7px; border-radius: 3px;
  font: 700 10px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase;
}
.badge-race { background: var(--heat-fill); color: #fff; }
.badge-new, .badge-live { background: rgba(14, 26, 34, .85); border: 1px solid var(--border); color: var(--text); }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--heat); }
.badge-x { left: auto; right: 8px; background: rgba(14, 26, 34, .85); border: 1px solid var(--border); color: var(--text); }

.tile-more .tile-art {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border-style: dashed;
}
.more-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px; text-align: center; color: var(--muted); font-size: 12px;
}
.more-inner .ic { color: var(--accent); }
.more-inner b { font: 700 22px/1 var(--font-head); color: var(--text); }
.tile-more:hover .more-inner { color: var(--text); }

/* ---------- 5. live bets ---------- */

.bets .row-head { flex-wrap: wrap; }
.tabs {
  margin-left: auto;
  display: flex; gap: 4px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-ctl);
}
.tab {
  height: 28px; padding: 0 12px; border-radius: 3px;
  color: var(--muted); font: 600 12px/1 var(--font);
  transition: background-color .15s ease, color .15s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent-fill); color: #fff; }

.bets-wrap {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card);
  overflow-x: auto; overscroll-behavior-x: contain;
}
.bets-table { min-width: 720px; font-size: 13px; }
.bets-table th {
  padding: 11px 14px; text-align: left; white-space: nowrap;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font: 700 10px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.bets-table td { padding: 10px 14px; white-space: nowrap; border-bottom: 1px solid var(--border-soft); }
.bets-table tbody tr:last-child td { border-bottom: 0; }
.bets-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.bets-table .num, .bets-table th.num { text-align: right; font-family: var(--font-head); font-weight: 600; }
.bets-table .g { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.bets-table .g img { width: 30px; height: 40px; flex: none; object-fit: cover; border: 1px solid var(--border); border-radius: 3px; }
.bets-table .g small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.bets-table .player { color: var(--muted); font-family: var(--font); font-weight: 500; }
.bets-table .col-time { color: var(--muted); font-size: 12px; }
.bets-table .tick { color: var(--muted); font-size: 11px; font-weight: 600; }
.bets-table .hot { color: var(--heat-text); }
.bets-table .win { color: var(--win); }
.bets-table .win .tick { color: var(--win); opacity: .8; }
.hidden-user { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }

.bets-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12px;
}
.bets-foot .dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--win); }

/* ---------- 6. promotions ---------- */

.promo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.promo {
  position: relative; overflow: hidden;
  display: flex; min-height: 196px; padding: 20px;
  transition: border-color .15s ease;
}
.promo:hover { border-color: #34515F; }
.promo-race:hover { border-color: var(--heat); }
.promo-copy {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; flex: 1;
  max-width: calc(100% - 92px);
}
.promo h3 { margin: 10px 0 8px; font-size: 19px; }
.promo h3 + p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.promo-copy .btn { margin-top: auto; }
.promo-art {
  position: absolute; right: -18px; top: 14px; z-index: 1;
  width: 124px; height: 166px; object-fit: cover;
  border: 1px solid var(--border); border-radius: var(--r-card);
  transform: rotate(8deg);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .5);
  pointer-events: none;
  transition: transform .2s ease;
}
.promo:hover .promo-art { transform: rotate(6deg) translateY(-6px); }

/* ---------- 7. VIP ---------- */

.vip {
  display: grid; grid-template-columns: minmax(260px, 1fr) 1.7fr; gap: 32px;
  padding: 24px;
}
.vip-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.vip-intro h2 { font-size: 21px; }
.vip-lead { color: var(--muted); }
.vip-progress { width: 100%; margin-top: 4px; }
.progress-meta {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px; color: var(--muted); font-size: 12px;
}
.progress-meta b { color: var(--text); font-family: var(--font-head); font-weight: 700; }
.vip-bar {
  height: 6px; border-radius: 3px; overflow: hidden;
  background: var(--page); border: 1px solid var(--border);
}
.vip-bar span { display: block; height: 100%; min-width: 6px; background: var(--accent); }

.tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tier {
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-card);
}
.tier-mark {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 3px;
  background: var(--surface);
  font: 700 11px/1 var(--font-head); color: var(--link);
}
.tier h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.tier p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }

/* ---------- 8. payments ---------- */

.payments { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.pay-card { padding: 20px; }
.pay-card .section-title { margin-bottom: 8px; }
.pay-lead { color: var(--muted); font-size: 13px; }

.coins { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.coins li {
  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;
  color: var(--muted); font-size: 12px; font-weight: 500;
}
.coin {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--page); border: 1px solid var(--border-soft);
  font: 700 9px/1 var(--font-head); color: var(--text);
}
.coin-fiat { font-size: 14px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts .ic { margin-top: 2px; color: var(--accent); }
.facts b { display: block; margin-bottom: 2px; font: 700 13px/1.3 var(--font-head); }
.facts span { color: var(--muted); font-size: 12px; line-height: 1.4; }

/* ---------- 9. providers ---------- */

.providers {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.providers ul { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.providers li {
  color: var(--muted); opacity: .9;
  font: 700 13px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- 10. footer ---------- */

.footer { background: var(--sidebar); border-top: 1px solid var(--border); }
.footer-inner { max-width: var(--content); margin: 0 auto; padding: 40px var(--gutter) 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer-brand p { max-width: 34ch; color: var(--muted); font-size: 13px; }
.footer h3 {
  margin-bottom: 14px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.footer-col li + li { margin-top: 10px; }
.footer-col a { color: var(--muted); font-size: 13px; }
.footer-col a:hover { color: var(--text); text-decoration: underline; }

.footer-bottom {
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  color: var(--muted); font-size: 12px;
}
.footer-bottom .age { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.footer-bottom .age i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  border: 2px solid var(--muted); color: var(--text);
  font: 700 10px/1 var(--font-head); font-style: normal;
}
.footer-bottom .copy { margin-left: auto; }

/* ---------- phone tab bar ---------- */

.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--sidebar); border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted);
  font: 600 10px/1 var(--font-head); letter-spacing: .04em; text-transform: uppercase;
}
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] .ic { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 1280px) {
  .tiles { --cols: 6; }
}

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .race { max-width: none; }
  .tiles { --cols: 5; }
  .vip { grid-template-columns: 1fr; gap: 24px; }
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  body { --sb-w: 64px; --label-d: none; --side-jc: center; --side-px: 0; }
  #rail-toggle { display: none; }
  .side-head { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .promo-grid { grid-template-columns: minmax(0, 1fr); }
  .promo { min-height: 0; }
  .payments { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .sidebar { display: none; }
  .shell { margin-left: 0; }
  .tabbar { display: flex; }
  .top-logo { display: inline-flex; }
  .search { display: none; }
  .search-btn { display: inline-flex; }
  .topbar-inner { gap: 8px; }
  .top-actions { gap: 4px; }
  .lang-btn { padding: 0 8px; }
  .content { padding-top: 16px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); gap: 24px; }
  .tiles { --cols: 4; }
  .welcome { padding: 18px; }
  .welcome h1 { font-size: 22px; }
  .welcome-actions { width: 100%; }
  .entry { min-height: 168px; padding: 16px; }
  .entry-title { font-size: 19px; }
  .entry-art { right: 14px; top: -16px; width: 186px; height: 136px; }
  .entry-art img { width: 102px; height: 136px; }
  .entry-art img:nth-child(1) { right: 84px; }
  .entry-art img:nth-child(2) { right: 42px; }
  .race-prize { font-size: 30px; }
  .tabs { margin-left: 0; width: 100%; }
  .tab { flex: 1; padding: 0 8px; }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier:last-child { grid-column: 1 / -1; }
  .footer-bottom .copy { margin-left: 0; }
}

@media (max-width: 560px) {
  .tiles { --cols: 3.2; }
  .hero-main { gap: 24px; }
  .welcome h1 { font-size: 20px; }
  .welcome-actions { gap: 12px; }
  .entry { min-height: 148px; }
  .entry-sub { display: none; }
  .entry-art { right: 8px; top: -14px; width: 132px; height: 100px; }
  .entry-art img { width: 75px; height: 100px; }
  .entry-art img:nth-child(1) { right: 56px; transform: rotate(-11deg) translateY(10px); }
  .entry-art img:nth-child(2) { right: 28px; }
  .entry-art img:nth-child(3) { transform: rotate(8deg) translateY(6px); }
  .promo-copy { max-width: calc(100% - 72px); }
  .promo-art { width: 96px; height: 128px; right: -14px; }
  .col-time, .col-mult { display: none; }
  .bets-table { min-width: 0; }
  .bets-table th, .bets-table td { padding: 10px; }
  .bets-table .g img { display: none; }
  .race-table .col-wager { display: none; }
  .ticker-label span { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 420px) {
  .logo-word { font-size: 16px; }
  .btn { padding: 0 12px; }
  .tabbar a span { font-size: 9px; }
}

/* the top bar has to survive 280px: drop the word mark, the log-in link
   and the language code, leaving mark + search + globe + Register */
@media (max-width: 380px) {
  .top-logo .logo-word { display: none; }
  .btn-login { display: none; }
  .lang-btn .lang-code, .lang-btn .chev { display: none; }
  .lang-btn { width: 36px; padding: 0; justify-content: center; }
  .topbar-inner { padding: 0 12px; gap: 6px; }
  .entries { grid-template-columns: 1fr; }
  .entry-art { right: 12px; }
  .countdown-time span { font-size: 16px; }
  .race-foot { flex-wrap: wrap; }
  .race-foot .btn { margin-left: 0; width: 100%; }
  .footer-bottom { gap: 10px; }
}

@media (max-width: 300px) {
  .content, .footer-inner { padding-left: 10px; padding-right: 10px; }
  .topbar-inner { padding: 0 10px; }
  .search-btn { display: none; }
  .tiles { --cols: 2.2; }
}

/* ---------- motion ---------- */

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