:root {
  --ink: #0a0e14;
  --panel: #141a23;
  --panel-2: #1c242f;
  --panel-3: #253040;
  --line: #27313e;
  --gold: #ffb020;
  --gold-dim: #a86f0d;
  --win: #34d399;
  --lose: #f87171;
  --text: #eaf0f7;
  --muted: #8695a8;
  --radius: 10px;
  --shell: 560px;
  --tabbar-h: 58px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

body {
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 52px;
  padding: 0 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  max-width: var(--shell);
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 7px; }

/* The wordmark image, replacing the letter mark. Height-driven so it lines up
   with whatever else is in the bar without a fixed width to maintain. */
.brand-img { display: block; height: 22px; width: auto; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--gold);
  color: #10141b;
  border-radius: 7px;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
}

.brand-word {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.topbar-right { display: flex; align-items: center; gap: 7px; }

.balance-chip {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13.5px;
}
.balance-chip small { color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; }

.btn {
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  transition: filter .12s ease;
}
.btn:hover { filter: brightness(1.15); }
.btn-primary { background: var(--gold); color: #10141b; border-color: var(--gold); }
.btn-block { display: block; width: 100%; padding: 12px; font-size: 15px; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--lose); border-color: #43272b; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- sport tabs ---------- */

.sports {
  position: sticky;
  top: 52px;
  z-index: 35;
  display: flex;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  max-width: var(--shell);
  margin: 0 auto;
}

.sport {
  flex: 1;
  padding: 11px 4px 9px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.sport[aria-current="true"] { color: var(--text); border-bottom-color: var(--gold); }

.view { max-width: var(--shell); margin: 0 auto; padding: 10px 10px 24px; }

.loading, .empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 15px; }

/* ---------- filter chips ---------- */

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--panel-3); color: var(--text); border-color: var(--panel-3); }
.chip .dot { color: var(--lose); margin-right: 4px; }

/* ---------- match list ---------- */

.league-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.match {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 7px;
}

.match-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #37181b;
  color: var(--lose);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .05em;
}
.live-tag::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--lose);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.match-teams { margin-bottom: 9px; }
.match-team {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  padding: 1px 0;
}

/* The price rail — three cells, one row, the memorable part of the page. */
.rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.rail.two { grid-template-columns: repeat(2, 1fr); }

.price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px 7px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background .12s ease, color .12s ease, transform .1s ease;
}
.price:active { transform: scale(.97); }
.price .k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.price .v {
  font-family: Archivo, sans-serif;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.price[aria-pressed="true"] { background: var(--gold); color: #10141b; }
.price[aria-pressed="true"] .k { color: #4a3a12; }
.price.dead { opacity: .35; pointer-events: none; }

.market-label {
  margin: 9px 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- betslip ---------- */

.slipbar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  z-index: 38;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 10px 8px;
}

.slipbar-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: var(--gold);
  color: #10141b;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.slipbar-count {
  display: grid;
  place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: #10141b;
  color: var(--gold);
  border-radius: 999px;
  font-size: 12.5px;
}
.slipbar-label { flex: 1; text-align: left; font-size: 14px; }
.slipbar-odds { font-family: Archivo, sans-serif; font-variant-numeric: tabular-nums; font-size: 15px; }

.slip-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 7px;
}
.slip-item.dead { border-color: #4a2328; }
.slip-item.dead .slip-pick,
.slip-item.dead .slip-odds { opacity: .45; }
.slip-item.dead .slip-match b { color: var(--lose); font-weight: 600; }

.slip-item-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.slip-pick { font-weight: 600; font-size: 14px; }
.slip-match { font-size: 12px; color: var(--muted); margin-top: 2px; }
.slip-odds { font-family: Archivo, sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.slip-remove { color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 4px; }

.stake-row { display: flex; gap: 7px; margin: 12px 0 8px; }
.stake-row input {
  flex: 1;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.quick { display: flex; gap: 6px; margin-bottom: 12px; }
.quick button {
  flex: 1;
  padding: 8px 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  margin-bottom: 12px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.summary-row.total { color: var(--text); font-weight: 700; font-size: 16px; padding-top: 8px; margin-top: 5px; border-top: 1px solid var(--line); }
.summary-row.total b { color: var(--gold); font-family: Archivo, sans-serif; }

/* ---------- bets & wallet lists ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card h3 { margin: 0 0 8px; font-size: 15px; font-family: Archivo, sans-serif; }

.tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--panel-3);
  color: var(--muted);
}
.tag.won { background: #12352a; color: var(--win); }
.tag.lost { background: #35191c; color: var(--lose); }
.tag.open { background: #33290f; color: var(--gold); }
.tag.void, .tag.pending { background: var(--panel-3); color: var(--muted); }

.leg {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.leg:first-of-type { border-top: none; }
.leg small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.leg-odds { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.leg.won .leg-odds { color: var(--win); }
.leg.lost .leg-odds { color: var(--lose); }

.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.kv span:first-child { color: var(--muted); }

.section-title {
  margin: 18px 0 8px;
  font-family: Archivo, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-balance {
  background: linear-gradient(150deg, #1d2634, var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
}
.hero-balance .label { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-balance .amount {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 14px;
}
.hero-balance .amount small { font-size: 15px; color: var(--muted); margin-left: 6px; }
.hero-actions { display: flex; gap: 8px; }
.hero-actions .btn { flex: 1; text-align: center; }

/* ---------- forms ---------- */

.field { margin-bottom: 12px; }
.field label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select {
  width: 100%;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
}
.field .hint { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.4; }

.form-error {
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #35191c;
  border: 1px solid #4a2328;
  border-radius: 8px;
  color: #fca5a5;
  font-size: 13.5px;
}
.form-note {
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--panel-2);
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.switch-line { margin-top: 14px; text-align: center; font-size: 13.5px; color: var(--muted); }
.switch-line button { color: var(--gold); font-weight: 600; }

/* ---------- deposit invoice ---------- */

.invoice { text-align: center; }
.invoice img {
  width: 190px; height: 190px;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  margin: 6px 0 14px;
}
.addr {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  word-break: break-all;
  text-align: left;
  line-height: 1.5;
}
.pay-amount {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}

/* ---------- bottom nav ---------- */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 39;
  display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--panel);
  border-top: 1px solid var(--line);
  max-width: var(--shell);
  margin: 0 auto;
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}
.tabbar a .ico { font-size: 15px; line-height: 1; }
.tabbar a[aria-current="page"] { color: var(--gold); }

/* ---------- sheet & toast ---------- */

.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(4, 7, 11, .72); }
.sheet-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: var(--shell);
  margin: 0 auto;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  animation: rise .2s ease;
}
@keyframes rise { from { transform: translateY(16px); opacity: .6 } }
@media (prefers-reduced-motion: reduce) {
  .sheet-panel { animation: none; }
  .live-tag::before { animation: none; }
  .price:active { transform: none; }
}

.sheet-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-family: Archivo, sans-serif; font-size: 17px; }
.sheet-close { color: var(--muted); font-size: 16px; padding: 4px 6px; }
.sheet-body { padding: 14px 16px 4px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 74px);
  transform: translateX(-50%);
  z-index: 80;
  max-width: 90vw;
  padding: 11px 16px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.toast.bad { background: #3a1a1e; border-color: #55262c; color: #fecaca; }
.toast.good { background: #12352a; border-color: #1d4d3c; color: #a7f3d0; }

#siteFooter { padding-top: 0; }

.footnote {
  /* Owns its own width and centring. It used to also carry .view, whose
     `margin: 0 auto` was overridden by the margin here, so the footer sat
     hard against the left edge instead of centring under the app. */
  max-width: var(--shell);
  margin: 8px auto;
  padding: 16px 12px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}
.footnote p { margin: 0 0 12px; }
.footnote .doc-nav { margin: 0 0 14px; }
.foot-logo {
  display: block;
  margin: 4px auto 12px;
  height: 40px;
  width: 40px;
  opacity: .95;
}
.footnote .doc-nav a { color: var(--gold); font-weight: 600; font-size: 13px; }
/* The description reads as a paragraph, so it is left-aligned — but boxed to a
   comfortable measure and centred, rather than stretching edge to edge. */
.footnote p:last-child {
  margin: 0 auto;
  max-width: 46ch;
  text-align: left;
  line-height: 1.65;
}

/* The addiction warning has to read as a warning, not as small print. */
.footnote .warn {
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
}

.social {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .12s ease, color .12s ease;
}
.social a:hover { border-color: var(--gold); color: var(--gold); }
.social svg { flex: 0 0 auto; }

@media (min-width: 600px) {
  body { background: #06090d; }
  .topbar, .sports, .tabbar { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* ---------- search ---------- */

.searchwrap {
  position: sticky;
  top: 52px;
  z-index: 36;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.searchbox:focus-within { border-color: var(--gold); }
.search-ico { color: var(--muted); font-size: 17px; line-height: 1; }
.searchbox input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  background: none;
  border: none;
  font-size: 15px;
  outline: none;
}
.searchbox input::-webkit-search-cancel-button { display: none; }
.search-clear { color: var(--muted); font-size: 14px; padding: 4px 2px; }

/* When search is active the sport tabs act as result filters */
.sports.filtering .sport[aria-current="true"] { border-bottom-color: var(--gold); }

.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 4px 6px;
  font-size: 12px;
  color: var(--muted);
}
.result-head b { color: var(--text); font-size: 13px; }

/* ---------- match card additions ---------- */

.match-tap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 0;
}
.more-markets {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 6px 10px;
  width: 100%;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.more-markets b { color: var(--gold); }

.sport-pill {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--panel-3);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- event detail ---------- */

.event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.event-actions .chip { display: inline-flex; align-items: center; gap: 5px; }
.event-actions .chip svg { opacity: .7; }

.event-head {
  background: linear-gradient(150deg, #1d2634, var(--panel));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.event-head .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 7px; align-items: center; }
.event-head .teams { font-family: Archivo, sans-serif; font-size: 18px; font-weight: 700; line-height: 1.35; }

.market-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.market-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}
.market-toggle .caret { color: var(--muted); font-size: 11px; transition: transform .15s ease; }
.market-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.market-body { padding: 0 12px 12px; }
.market-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 0 5px;
}
.rail.stack { grid-template-columns: 1fr; }
.rail.wide .price { flex-direction: row; justify-content: space-between; padding: 10px 12px; }
.rail.wide .price .k { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 500; }
.rail.wide .price[aria-pressed="true"] .k { color: #10141b; }

/* ---------- league browser ---------- */

.league-search {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
}
.league-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  text-align: left;
}
.league-row[aria-pressed="true"] { border-color: var(--gold); }
.league-row .star { color: var(--gold); font-size: 11px; }

/* ---------- live scores ---------- */

.match-team { align-items: center; }
.match-team .score {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  min-width: 18px;
  text-align: right;
}

.score-line {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--panel-3);
  color: var(--gold);
  font-weight: 800;
  font-size: 11px;
}

.live-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  margin-bottom: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--lose);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.event-head .team-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}
.event-head .team-line b {
  font-family: Archivo, sans-serif;
  font-size: 22px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.live-note {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- booking code ---------- */

.booking {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 14px 0 4px;
}
.booking h3 {
  margin: 0 0 10px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.booking input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.booking input::placeholder {
  color: var(--muted);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
.booking input:focus { outline: none; border-color: var(--gold); }
.booking .btn-block {
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 14.5px;
}

.booking-error {
  margin: -2px 0 10px;
  font-size: 12.5px;
  color: #fca5a5;
}

/* ---------- copyable booking code ---------- */

.code-line { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: border-color .12s ease, color .12s ease;
}
.code-copy:hover { border-color: var(--gold); color: var(--gold); }
.code-copy svg { opacity: .65; }
.code-copy:hover svg { opacity: 1; }

/* ---------- fixtures with no prices yet ---------- */

/* Muted rather than marked. The fixture is real; only the market is missing. */
.match.unpriced { opacity: .72; }
.match.unpriced .match-tap { cursor: default; }
.rail-soon {
  min-width: 46px;
  padding: 8px 0;
  text-align: center;
  color: var(--muted);
  font-family: Archivo, sans-serif;
  font-size: 15px;
}


/* ---------- promo slides ---------- */

/* The strip has a DEFINITE height, and every slide fills it.
   Without that, a text-only slide and an image-only slide size themselves
   differently inside the same flex row: one collapses to nothing and the track
   no longer lines up with the frame, which showed as a blank second slide and a
   first slide cut off at the edge. A fixed frame removes the whole class of
   problem — content adapts to the box rather than the box to the content. */
.slides {
  --slide-h: 104px;
  max-width: var(--shell);
  margin: 10px auto 0;
  padding: 0 10px;
}
.slide-frame {
  height: var(--slide-h);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}
.slide-track {
  display: flex;
  height: 100%;
  transition: transform .35s ease;
}
.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  color: var(--text);
  text-decoration: none;
}
a.slide:hover { filter: brightness(1.08); }

/* An image fills the frame and is cropped to it, so any shape uploaded still
   produces the same tidy strip. */
.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 14px 18px;
}
.slide-text b {
  font-family: Archivo, sans-serif;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -.01em;
  /* Two lines maximum, so a long headline cannot push the layout around. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide-text span {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Text over a photo needs its own contrast, whatever the operator uploads. */
.slide.has-img .slide-text {
  background: linear-gradient(90deg, rgba(8, 11, 16, .93) 0%, rgba(8, 11, 16, .78) 55%, rgba(8, 11, 16, .15) 100%);
}
.slide.has-img .slide-text span { color: #d6dce8; }

.slide-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.slide-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  transition: background .2s ease, width .2s ease;
}
.slide-dot.on { background: var(--gold); width: 16px; border-radius: 3px; }

/* Wider screens get a taller strip and a readable measure, rather than one
   line of text stranded across the full width. */
@media (min-width: 640px) {
  .slides { --slide-h: 132px; }
  .slide-text { padding: 16px 24px; max-width: 560px; }
  .slide-text b { font-size: 17px; }
  .slide-text span { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide-track { transition: none; }
}

/* ---------- admin: slide editor ---------- */

.slide-edit { margin-bottom: 10px; }
.slide-edit-body { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.slide-preview {
  flex: 0 0 140px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.slide-preview img { width: 100%; height: 100%; object-fit: cover; }
.slide-fields { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.slide-fields input[type="text"],
.slide-fields input[type="url"] {
  width: 100%;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
}
.slide-fields input:focus { outline: none; border-color: var(--gold); }
.slide-edit .btn { position: relative; overflow: hidden; }

/* ---------- affiliate dashboard ---------- */

.doc-main { max-width: 880px; }

.aff-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.aff-head h1 { margin: 0 0 4px; }
.aff-sub { margin: 0; font-size: 13.5px; color: var(--muted); }
.aff-sub b { color: var(--text); }
.aff-status {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.aff-status.ok { background: #14361f; color: #6ee7a0; }
.aff-status.wait { background: #3a2a12; color: #ffd479; }
.aff-status.bad { background: #3a1a1f; color: #fca5a5; }

.aff-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: var(--panel);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.aff-section {
  margin: 26px 0 10px;
  font-family: Archivo, sans-serif;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.aff-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.aff-card h2 {
  margin: 0 0 12px;
  font-family: Archivo, sans-serif;
  font-size: 15px;
  letter-spacing: .03em;
}

.ref-link { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ref-link input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 11px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  color: var(--text);
  /* A long URL must shrink to fit rather than push the card sideways. */
  text-overflow: ellipsis;
}
.ref-link .btn { flex: 0 0 auto; }
.qr {
  display: flex;
  justify-content: center;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 10px;
}
.qr img { display: block; max-width: 100%; height: auto; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.stat {
  padding: 14px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: Archivo, sans-serif;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.stat span { display: block; font-size: 12px; margin-top: 4px; }
.stat small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.aff-figures { margin: 0; }
.aff-figures > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.aff-figures > div:last-child { border-bottom: none; }
.aff-figures dt { font-size: 13.5px; color: var(--muted); margin: 0; }
.aff-figures dd { margin: 0; font-family: Archivo, sans-serif; font-size: 15px; }
.aff-figures .total dt { color: var(--text); font-weight: 600; }
.aff-figures .total dd { color: var(--gold); font-size: 20px; }

/* ---------- affiliate tables ---------- */

.aff-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.aff-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aff-table thead th {
  padding: 11px 12px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.aff-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.aff-table tbody tr:last-child td { border-bottom: none; }
.aff-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.aff-table code { font-size: 11.5px; color: var(--muted); }
.aff-table .under-review td { background: rgba(247, 181, 26, .05); }
.aff-table td b { font-weight: 700; }
.aff-table .tag { margin-left: 6px; }

/* Below 640px a six-column table cannot be read. Each row becomes a labelled
   block instead, so every value still says what it is — which a horizontal
   scrollbar or a footnote listing the column order does not. */
@media (max-width: 639px) {
  .aff-table thead { display: none; }
  .aff-table, .aff-table tbody, .aff-table tr, .aff-table td { display: block; width: 100%; }
  .aff-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }
  .aff-table tbody tr:last-child { border-bottom: none; }
  .aff-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border: none;
  }
  .aff-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .aff-table .num { text-align: right; }
  .aff-table td:first-child {
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
  }
}

@media (min-width: 560px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ---------- welcome bonus ---------- */

.bonus-panel {
  margin: 10px 0 14px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.bonus-bar {
  height: 6px;
  margin: 10px 0 8px;
  border-radius: 3px;
  background: var(--panel-3, var(--panel-2));
  overflow: hidden;
}
.bonus-bar span { display: block; height: 100%; background: var(--gold); transition: width .3s ease; }
.bonus-panel .hint { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- account warnings ---------- */

/* Used for the missing recovery code. Deliberately loud: the consequence is
   permanent loss of the account, and it is invisible until it is too late. */
.warn-panel {
  display: block;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #3a2a12;
  border: 1px solid #8a6520;
}
.warn-panel b { display: block; font-size: 13.5px; color: #ffd479; margin-bottom: 4px; }
.warn-panel span { display: block; font-size: 12.5px; color: #e3d5b8; line-height: 1.5; }

/* ---------- betslip ---------- */

/* Slip page: leaving and clearing are different actions and should not sit on
   one button. */
.slip-head { display: flex; gap: 8px; margin-bottom: 10px; }
.slip-head .btn { flex: 1; }
