/* ============================================================= *
 *  Vertixa Sportsbook — player UI
 *  Matches VertixaTrade blue dark theme (accent #2A94F3)
 * ============================================================= */

:root {
  --bg-0: #0a0e13;
  --bg-1: #10151c;
  --bg-2: #151c25;
  --bg-3: #1b232e;
  --bg-4: #202a37;
  --border: #232d39;
  --border-2: #2c3846;
  --text: #e7edf3;
  --muted: #7e8a99;
  --muted-2: #5c6673;

  --accent: #2A94F3;
  --accent-2: #1878d6;
  --accent-dim: rgba(42, 148, 243, 0.14);
  --accent-glow: rgba(42, 148, 243, 0.45);

  --up: #16c784;
  --up-dim: rgba(22, 199, 132, 0.14);
  --down: #f6465d;
  --down-dim: rgba(246, 70, 93, 0.14);
  --warn: #f0b90b;

  --live: #ff4d67;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 12px;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --topbar-h: 74px;
  --pitch-0: #0f3d2b;
  --pitch-1: #12563a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 82% -12%, rgba(42, 148, 243, 0.08), transparent 60%),
    radial-gradient(900px 520px at -12% 112%, rgba(18, 130, 209, 0.06), transparent 55%),
    var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3d4a5a; background-clip: padding-box; }

.sb { height: 100%; display: flex; flex-direction: column; }

/* ---------- icon button ---------- */
.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  font-weight: 700; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--ghost { border: 1px solid var(--border-2); color: var(--text); background: var(--bg-2); }
.btn--ghost:hover { background: var(--bg-3); border-color: #384555; }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #55a9f7);
  color: #04121f; box-shadow: 0 6px 18px -6px var(--accent-glow);
}
.btn--primary:hover { box-shadow: 0 8px 22px -6px var(--accent-glow); }

/* ============ TOP BAR ============ */
.topbar {
  height: var(--topbar-h); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 0 clamp(14px, 2.4vw, 30px);
  background:
    linear-gradient(180deg, rgba(24, 33, 46, .92), rgba(14, 19, 26, .88));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-2);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.9);
  position: relative; z-index: 40;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent); opacity: .5;
}
.topbar__l, .topbar__r { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

.brand { display: flex; align-items: center; gap: 12px; user-select: none; }
.brand__logo { height: 36px; width: auto; max-width: 190px; display: block; object-fit: contain; }
/* embedded inside the platform sheet: brand + back-link + ACCOUNT are all redundant — the platform's
   own top bar already shows VertixaTrade + the Demo/Real account chip (which drives /api/account/mode,
   the same mode the sportsbook reads). Hiding .acct kills the duplicate account on every width. */
html.sb-embed .brand,
html.sb-embed .back-link,
html.sb-embed .acct { display: none; }
html.sb-embed .topbar__l { flex: 0 0 auto; }
/* DESKTOP embed (>=961px): the left category rail + right bet-slip rail are permanent grid columns and
   the platform supplies brand/account/close, so the ENTIRE top bar is redundant here → one clean header. */
@media (min-width: 961px) { html.sb-embed .topbar { display: none; } }
/* MOBILE embed: keep the top bar but (with .acct hidden) it collapses to just the ☰ menu + Slip button. */
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #6bb8ff);
  box-shadow: 0 0 22px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35);
  position: relative; flex: 0 0 auto;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 10px 10px auto 10px; height: 4px;
  border-radius: 2px; background: #04121f; box-shadow: 0 8px 0 rgba(4, 18, 31, 0.55);
}
.brand__name {
  font-family: 'Clash Display', var(--font); font-weight: 700;
  font-size: 23px; letter-spacing: -0.02em; line-height: 1;
}
.brand__name span { color: var(--accent); }

/* account block */
.acct { display: flex; align-items: center; gap: 14px; }
.acct__mode {
  display: inline-flex; padding: 3px; border-radius: 11px;
  background: var(--bg-3); border: 1px solid var(--border);
}
.acct__seg {
  height: 34px; padding: 0 15px; border-radius: 9px;
  font-weight: 700; font-size: 13px; color: var(--muted);
  transition: background .15s, color .15s;
}
.acct__seg.is-active { color: #04121f; background: linear-gradient(135deg, var(--accent), #55a9f7); }
.acct__seg[data-mode="demo"].is-active { background: linear-gradient(135deg, var(--warn), #ffcf5a); color: #241c00; }
.acct__bal {
  display: flex; flex-direction: column; line-height: 1.1; text-align: right;
  padding: 6px 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border);
}
.acct__label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 700; }
.acct__amt { font-size: 19px; font-weight: 800; }
.acct__amt.is-demo { color: var(--warn); }
.acct__usd { font-size: 10px; color: var(--muted-2); font-family: var(--mono); font-weight: 700; }

.topbar .btn { height: 42px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.topbar .icon-btn { width: 42px; height: 42px; border-radius: 11px; }
.slip-toggle { display: none; position: relative; }
.slip-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 800;
  background: #04121f; color: #cfe6ff;
}

/* ============ GRID ============ */
.grid {
  flex: 1 1 auto; min-height: 0;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) 336px;
  gap: 0;
}

/* ---------- LEFT RAIL ---------- */
.rail {
  grid-column: 1; min-height: 0; overflow-y: auto;
  background: var(--bg-1); border-right: 1px solid var(--border);
  padding: 12px 10px 40px;
}
.rail__head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted-2); padding: 6px 8px 10px;
}
.rail__close { display: none; }
.rail__link {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 10px; text-align: left;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: background .14s, color .14s;
}
.rail__link:hover { background: var(--bg-2); color: var(--text); }
.rail__link svg { flex: 0 0 auto; color: var(--muted-2); }
.rail__link.is-active { background: var(--accent-dim); color: var(--text); }
.rail__link.is-active svg { color: var(--accent); }
.rail__link--home { margin-bottom: 4px; }

.rail__groups { margin-top: 4px; display: flex; flex-direction: column; gap: 1px; }
.grp__head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 10px; text-align: left;
  font-size: 13.5px; font-weight: 700; color: var(--text);
  transition: background .14s;
}
.grp__head:hover { background: var(--bg-2); }
.grp__icon {
  width: 24px; height: 24px; border-radius: 7px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 14px;
  background: var(--bg-3); color: var(--accent);
}
.grp__name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp__count { font-size: 11px; font-weight: 700; color: var(--muted-2); font-family: var(--mono); }
.grp__caret { color: var(--muted-2); transition: transform .2s; flex: 0 0 auto; }
.grp.is-open .grp__caret { transform: rotate(90deg); }
.grp__leagues { display: none; padding: 2px 0 6px 12px; margin-left: 11px; border-left: 1px solid var(--border); }
.grp.is-open .grp__leagues { display: block; }
.lg {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; text-align: left;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  transition: background .14s, color .14s;
}
.lg:hover { background: var(--bg-2); color: var(--text); }
.lg.is-active { color: var(--accent); background: var(--accent-dim); font-weight: 600; }
.lg__title { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg__n { font-size: 10.5px; color: var(--muted-2); font-family: var(--mono); }

.rail-scrim { display: none; }

/* ---------- CENTER ---------- */
.main {
  grid-column: 2; min-height: 0; overflow-y: auto;
  padding: 16px clamp(12px, 2vw, 26px) 60px;
}
.crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--muted); margin-bottom: 14px; min-height: 20px;
}
.crumbs b { color: var(--text); font-weight: 700; }
.crumbs__sep { color: var(--muted-2); }
.crumbs__live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: var(--live);
  padding: 2px 8px; border-radius: 20px; background: rgba(255,77,103,.12);
  text-transform: uppercase; letter-spacing: .05em;
}
.crumbs__live::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--live); animation: pulse 1.4s infinite; }

.feed { display: flex; flex-direction: column; gap: 22px; }

/* section (league block) */
.sec { animation: rise .45s cubic-bezier(.2,.7,.2,1) backwards; }
.sec__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.sec__title { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.sec__badge {
  font-size: 10.5px; font-weight: 700; color: var(--muted-2);
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 20px;
}
.sec__grp { font-size: 11px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.sec__body { display: flex; flex-direction: column; gap: 8px; }

/* featured match highlight (the single match shown on the home screen) */
.sec--feat .evt {
  background: linear-gradient(135deg, var(--accent-dim), var(--bg-1) 55%);
  border-color: var(--border-2);
}

/* ---- sports grid (home screen 3-wide picker) ---- */
.sportgrid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.sporttile {
  flex: 0 0 calc(33.333% - 7px); max-width: calc(33.333% - 7px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 7px; padding: 18px 10px; min-height: 118px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, background .15s, transform .06s;
  animation: rise .45s cubic-bezier(.2,.7,.2,1) backwards;
}
button.sporttile { cursor: pointer; }
button.sporttile:hover { border-color: var(--accent); background: var(--bg-2); }
button.sporttile:active { transform: scale(.98); }
.sporttile__ic {
  font-size: 30px; line-height: 1; width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border-radius: 14px;
}
button.sporttile:hover .sporttile__ic { background: var(--accent-dim); }
.sporttile__name { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.2; }
.sporttile__meta {
  font-size: 10.5px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .04em;
}
.sporttile--soon { opacity: .5; }
.sporttile--soon .sporttile__ic { filter: grayscale(1); }
.sporttile--soon .sporttile__meta { color: var(--muted-2); }

/* event card */
.evt {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center;
  transition: border-color .15s, background .15s;
}
.evt:hover { border-color: var(--border-2); }
.evt__info { min-width: 0; }
.evt__meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 11.5px; color: var(--muted);
}
.evt__time { font-family: var(--mono); font-size: 11.5px; }
.evt__live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800; color: var(--live);
  text-transform: uppercase; letter-spacing: .04em;
}
.evt__live::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--live); animation: pulse 1.4s infinite; }
.evt__teams { display: flex; flex-direction: column; gap: 7px; }
.evt__team { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 700; min-width: 0; }
.evt__tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt__team--away { color: var(--text); }
.evt__vs { font-size: 10px; color: var(--muted-2); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }

.evt__mkts { display: flex; align-items: stretch; gap: 8px; }
.mkt-col { display: flex; flex-direction: column; gap: 6px; min-width: 84px; }
.mkt-col__cap {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted-2); text-align: center;
}

/* odds button */
.odd {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 84px; min-height: 46px; padding: 6px 10px;
  border-radius: 10px; background: var(--bg-3); border: 1px solid var(--border);
  transition: background .13s, border-color .13s, transform .05s;
}
.odd:hover { background: var(--bg-4); border-color: var(--border-2); }
.odd:active { transform: scale(.97); }
.odd__lab { font-size: 11px; font-weight: 600; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odd__pt { font-size: 10px; color: var(--muted-2); font-family: var(--mono); }
.odd__price { font-size: 14.5px; font-weight: 800; color: var(--text); font-family: var(--mono); }
.odd.is-picked {
  background: var(--accent-dim); border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.odd.is-picked .odd__price, .odd.is-picked .odd__lab { color: var(--accent); }
.odd__price.up { animation: flash-up .6s; }
.odd__price.down { animation: flash-down .6s; }

/* "more markets" pill */
.evt__more {
  min-width: 84px; min-height: 46px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: transparent; border: 1px dashed var(--border-2); color: var(--muted);
  font-size: 11px; font-weight: 700; transition: border-color .13s, color .13s, background .13s;
}
.evt__more:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.evt__more b { font-size: 15px; font-family: var(--mono); }

/* event detail view (all markets) */
.detail { display: flex; flex-direction: column; gap: 18px; }
.detail__mkt { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.detail__mkt-h {
  padding: 11px 14px; font-size: 13px; font-weight: 800;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.detail__mkt-h span { font-size: 11px; color: var(--muted); font-weight: 600; }
.detail__outs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px; padding: 12px;
}
.detail__outs .odd { flex-direction: row; justify-content: space-between; min-height: 50px; padding: 0 14px; }
.detail__outs .odd__lab { font-size: 13px; font-weight: 700; color: var(--text); text-align: left; }
.detail__outs .odd.is-picked .odd__lab { color: var(--accent); }
.detail__outs .odd__price { font-size: 16px; }
.detail__back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 12px;
  border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border);
}
.detail__back:hover { color: var(--text); border-color: var(--border-2); }

/* ---------- states in feed ---------- */
.state { text-align: center; padding: 60px 24px; max-width: 420px; margin: 24px auto; }
.state__mark {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px;
  display: grid; place-items: center; color: var(--accent);
  background: var(--accent-dim); border: 1px solid rgba(42,148,243,.24);
}
.state__title { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.state__sub { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 auto 20px; max-width: 340px; }

/* skeleton loaders */
.sk { border-radius: var(--radius); background:
  linear-gradient(100deg, var(--bg-1) 30%, var(--bg-2) 50%, var(--bg-1) 70%);
  background-size: 220% 100%; animation: shimmer 1.3s infinite; }
.sk-evt { height: 74px; margin-bottom: 8px; }
.sk-head { height: 20px; width: 180px; margin-bottom: 12px; }

/* ============ RIGHT RAIL / BET SLIP ============ */
.slip {
  grid-column: 3; min-height: 0;
  background: var(--bg-1); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.slip__tabs {
  flex: 0 0 auto; display: flex; align-items: center;
  border-bottom: 1px solid var(--border); padding: 0 6px;
}
.slip__tab {
  flex: 1 1 0; height: 48px; font-size: 13.5px; font-weight: 700; color: var(--muted);
  position: relative; transition: color .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.slip__tab:hover { color: var(--text); }
.slip__tab.is-active { color: var(--text); }
.slip__tab.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.slip__tabnum {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 800;
  background: var(--accent); color: #04121f; font-family: var(--mono);
}
.slip__tabnum:empty, .slip__tabnum[data-n="0"] { background: var(--bg-3); color: var(--muted); }
.slip__close { display: none; }

.slip__pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

.slip__mode { display: flex; gap: 4px; padding: 12px 14px 6px; }
.slip__modebtn {
  flex: 1 1 0; height: 34px; border-radius: 9px; font-weight: 700; font-size: 12.5px;
  color: var(--muted); background: var(--bg-3); border: 1px solid var(--border);
  transition: color .15s, background .15s, border-color .15s;
}
.slip__modebtn.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.slip__modebtn:disabled { opacity: .45; cursor: not-allowed; }

.slip__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }

.pick {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 11px; position: relative; animation: rise .28s cubic-bezier(.2,.7,.2,1) backwards;
}
.pick__x {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; color: var(--muted-2); transition: color .13s, background .13s;
}
.pick__x:hover { color: var(--down); background: var(--down-dim); }
.pick__mkt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: 3px; }
.pick__sel { font-size: 13.5px; font-weight: 700; padding-right: 26px; line-height: 1.3; }
.pick__evt { font-size: 11.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pick__odds { font-size: 15px; font-weight: 800; color: var(--text); font-family: var(--mono); }
.pick__stake { display: flex; align-items: center; gap: 6px; }
.pick__stake input {
  width: 78px; height: 30px; border-radius: 8px; text-align: right;
  background: var(--bg-0); border: 1px solid var(--border-2); color: var(--text);
  padding: 0 9px; font-family: var(--mono); font-size: 12.5px;
}
.pick__stake input:focus { outline: none; border-color: var(--accent); }
.pick__stake .cur { color: var(--muted); font-size: 10px; font-weight: 700; }
.pick__win { font-size: 11px; color: var(--up); margin-top: 6px; text-align: right; font-family: var(--mono); }
.pick__win-main { display: block; }
.pick__usd { display: block; font-size: 10px; color: var(--muted-2); font-weight: 700; margin-top: 1px; }
.pick.is-dupe { border-color: var(--warn); }
.pick__warn { font-size: 10.5px; color: var(--warn); margin-top: 6px; }

/* empty */
.slip__empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 24px; }
.slip__empty-mark { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; color: var(--muted-2); background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 16px; }
.slip__empty-title { font-size: 15px; font-weight: 800; margin: 0 0 6px; }
.slip__empty-sub { font-size: 12.5px; color: var(--muted); margin: 0; }

/* foot */
.slip__foot { flex: 0 0 auto; border-top: 1px solid var(--border); padding: 12px 14px 14px; background: var(--bg-1); }
.stake { margin-bottom: 10px; }
.stake__label { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); margin-bottom: 6px; }
.stake__field { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 11px; background: var(--bg-0); border: 1px solid var(--border-2); transition: border-color .15s; }
.stake__field:focus-within { border-color: var(--accent); }
.stake__cur { color: var(--muted); font-weight: 700; font-size: 12px; }
.summary__pay { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.summary__usd { font-size: 10.5px; color: var(--muted-2); font-family: var(--mono); font-weight: 700; }
.stake__input { flex: 1 1 auto; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-size: 17px; font-weight: 700; }
.stake__max { font-size: 11px; font-weight: 800; color: var(--accent); padding: 5px 9px; border-radius: 7px; background: var(--accent-dim); }
.stake__max:hover { background: rgba(42,148,243,.24); }

.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.chip { height: 32px; border-radius: 8px; font-weight: 700; font-size: 12.5px; color: var(--text); background: var(--bg-3); border: 1px solid var(--border); transition: background .14s, border-color .14s; }
.chip:hover { background: var(--bg-4); border-color: var(--border-2); }

.summary { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px dashed var(--border); margin-bottom: 4px; }
.summary__row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.summary__row span:last-child { color: var(--text); font-weight: 700; }
.summary__row--pay { font-size: 14px; }
.summary__row--pay span:first-child { color: var(--text); font-weight: 700; }
.summary__row--pay span:last-child { color: var(--up); font-weight: 800; font-size: 16px; }

.slip__err { margin: 4px 0 10px; font-size: 12px; color: var(--down); background: var(--down-dim); border: 1px solid rgba(246,70,93,.28); border-radius: 9px; padding: 8px 10px; }

.btn--place {
  width: 100%; height: 48px; border-radius: 12px; font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, var(--accent), #55a9f7); color: #04121f;
  box-shadow: 0 8px 22px -8px var(--accent-glow); transition: filter .15s, transform .05s;
}
.btn--place:hover { filter: brightness(1.05); }
.btn--place:active { transform: translateY(1px); }
.btn--place:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn--place.is-loading { color: transparent; position: relative; }
.btn--place.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
  border: 2.5px solid rgba(4,18,31,.35); border-top-color: #04121f; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.slip__clear { width: 100%; margin-top: 8px; height: 34px; font-size: 12.5px; font-weight: 700; color: var(--muted); border-radius: 8px; transition: color .14s, background .14s; }
.slip__clear:hover { color: var(--down); background: var(--down-dim); }

/* ---------- MY BETS ---------- */
.mybets__filters { flex: 0 0 auto; display: flex; gap: 6px; padding: 12px 14px 8px; flex-wrap: wrap; }
.bfilter { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg-3); border: 1px solid var(--border); transition: color .14s, background .14s, border-color .14s; }
.bfilter.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.mybets__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 10px; }

.betcard { background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; animation: rise .3s cubic-bezier(.2,.7,.2,1) backwards; }
.betcard__top { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.betcard__kind { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.betcard__kind .betcard__legs { color: var(--accent); }
.pill { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 20px; }
.pill--pending { color: var(--warn); background: rgba(240,185,11,.14); }
.pill--won { color: var(--up); background: var(--up-dim); }
.pill--lost { color: var(--down); background: var(--down-dim); }
.pill--void, .pill--canceled { color: var(--muted); background: var(--bg-3); }
.betcard__legs-list { padding: 6px 12px; display: flex; flex-direction: column; gap: 7px; }
.leg { display: flex; align-items: flex-start; gap: 9px; }
.leg__dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; background: var(--muted-2); }
.leg--won .leg__dot { background: var(--up); }
.leg--lost .leg__dot { background: var(--down); }
.leg--void .leg__dot { background: var(--muted); }
.leg__body { flex: 1 1 auto; min-width: 0; }
.leg__sel { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg__evt { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg__price { font-size: 12px; font-weight: 700; color: var(--muted); font-family: var(--mono); flex: 0 0 auto; }
.betcard__foot { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-top: 1px solid var(--border); background: var(--bg-1); font-size: 12px; }
.betcard__stat { display: flex; flex-direction: column; gap: 2px; }
.betcard__stat span { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.betcard__stat b { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.betcard__stat--pay b { color: var(--up); }
.betcard__mode { font-size: 9.5px; font-weight: 800; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; letter-spacing: .05em; }
.betcard__mode--demo { color: var(--warn); background: rgba(240,185,11,.12); }
.betcard__mode--real { color: var(--accent); background: var(--accent-dim); }
.betcard__date { color: var(--muted-2); font-family: var(--mono); font-size: 11px; }
/* result-coloured left accent so win/lose reads at a glance (won=green / lost=red) */
.betcard--won { box-shadow: inset 3px 0 0 var(--up); }
.betcard--lost { box-shadow: inset 3px 0 0 var(--down); }
.betcard--pending { box-shadow: inset 3px 0 0 var(--warn); }
.betcard--void, .betcard--canceled { box-shadow: inset 3px 0 0 var(--muted); }
.betcard--lost .betcard__stat--pay b { color: var(--down); }
.betcard--void .betcard__stat--pay b, .betcard--canceled .betcard__stat--pay b { color: var(--muted); }
/* "your bets on this match" block on the finished/live event-detail page */
.matchbets { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 12px; }
.matchbets__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.matchbets__title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.matchbets__sum { font-size: 11px; font-weight: 700; color: var(--muted-2); font-family: var(--mono); }

/* ============ OVERLAY (full states) ============ */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(6,10,15,.72); backdrop-filter: blur(6px); }
.overlay__card { width: 100%; max-width: 400px; background: var(--bg-1); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow); padding: 34px 28px; text-align: center; animation: rise .35s cubic-bezier(.2,.7,.2,1); }
.overlay__card .state { padding: 0; margin: 0; }

/* ============ TOASTS ============ */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border-2); box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 600; animation: toast-in .3s cubic-bezier(.2,.7,.2,1);
}
.toast.is-out { animation: toast-out .25s forwards; }
.toast__ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; color: #04121f; }
.toast--ok .toast__ico { background: var(--up); }
.toast--err .toast__ico { background: var(--down); color: #fff; }
.toast--info .toast__ico { background: var(--accent); }
.toast b { font-family: var(--mono); }

/* ============ ANIMATIONS ============ */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes flash-up { 0% { color: var(--up); } 100% {} }
@keyframes flash-down { 0% { color: var(--down); } 100% {} }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ============================================================= *
 *  STAKE-STYLE SPORT VIEW + EVENT DETAIL
 * ============================================================= */

/* ---- generic round crest (colored circle + initials, NO real logos) ---- */
.crest {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: -.02em; color: #fff;
  font-family: var(--font); text-shadow: 0 1px 2px rgba(0,0,0,.4);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16), 0 2px 6px rgba(0,0,0,.3);
}
.crest--sm { width: 24px; height: 24px; font-size: 8.5px; }
.crest--lg { width: 56px; height: 56px; font-size: 18px; border-radius: 50%; }
.crest--xl { width: 68px; height: 68px; font-size: 22px; }
.crest__img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
/* MMA fighter cutout (tall portrait): fill the circle, anchored to the head so the face shows */
.crest__img--photo { object-fit: cover; object-position: top center; border-radius: 50%; background: var(--bg-3); }
/* generic fighter avatar (no real photo in any DB): white silhouette sits ON the coloured circle */
.crest__img--sil { object-fit: contain; object-position: center bottom; padding: 12% 12% 0; filter: none; border-radius: 50%; background: transparent; }

/* ---- back chip + sport pill (view headers) ---- */
.viewhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.backchip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px;
  border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border-2);
  font-size: 13px; font-weight: 700; color: var(--text); transition: background .14s, border-color .14s;
}
.backchip:hover { background: var(--bg-3); border-color: #3a4655; }
.backchip svg { color: var(--muted); }
.sportpill {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px;
  border-radius: 11px; font-size: 15px; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(135deg, var(--accent-dim), rgba(42,148,243,.05));
  border: 1px solid rgba(42,148,243,.28); color: var(--text);
}
.sportpill__ico { font-size: 18px; line-height: 1; }

/* ---- sub-tabs (Live & Upcoming / Outrights / All) ---- */
.subtabs {
  display: flex; align-items: center; gap: 4px; margin-bottom: 16px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 4px;
  overflow-x: auto; scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
  flex: 0 0 auto; height: 36px; padding: 0 16px; border-radius: 9px; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: var(--muted); transition: background .14s, color .14s;
}
.subtab:hover { color: var(--text); }
.subtab.is-active { color: #04121f; background: linear-gradient(135deg, var(--accent), #55a9f7); }
.subtab .subtab__dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 6px; vertical-align: middle; animation: pulse 1.4s infinite; }

/* ---- "Top <Sport>" bar + sort ---- */
.topbar-sec {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin-bottom: 12px; border-radius: 12px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
}
.topbar-sec__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-sec__grid { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-3); color: var(--accent); flex: 0 0 auto; }
.topbar-sec__title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sortctl { position: relative; flex: 0 0 auto; }
.sortctl__btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  border-radius: 9px; background: var(--bg-3); border: 1px solid var(--border-2);
  font-size: 12.5px; font-weight: 700; color: var(--text);
}
.sortctl__btn:hover { border-color: #3a4655; }
.sortctl__btn svg { color: var(--muted); transition: transform .2s; }
.sortctl.is-open .sortctl__btn svg { transform: rotate(180deg); }
.sortctl__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 160px;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 11px;
  box-shadow: var(--shadow); padding: 5px; display: none;
}
.sortctl.is-open .sortctl__menu { display: block; animation: rise .16s; }
.sortctl__opt { width: 100%; text-align: left; padding: 8px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sortctl__opt:hover { background: var(--bg-3); color: var(--text); }
.sortctl__opt.is-active { color: var(--accent); background: var(--accent-dim); }

/* ---- country → league accordions ---- */
.acc { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-1); margin-bottom: 10px; }
.acc__head {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 14px; text-align: left;
  background: var(--bg-2); transition: background .14s;
}
.acc__head:hover { background: var(--bg-3); }
.acc__flag {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.acc__name { flex: 1 1 auto; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc__n { font-size: 11px; font-weight: 700; color: var(--muted-2); font-family: var(--mono); }
.acc__caret { color: var(--muted-2); transition: transform .2s; flex: 0 0 auto; }
.acc.is-open > .acc__head .acc__caret { transform: rotate(90deg); }
.acc__body { display: none; }
.acc.is-open > .acc__body { display: block; }

.lgroup { border-top: 1px solid var(--border); }
.lgroup__head {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 16px; text-align: left;
  transition: background .14s;
}
.lgroup__head:hover { background: var(--bg-2); }
.lgroup__badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: var(--accent-dim); padding: 2px 7px; border-radius: 6px; flex: 0 0 auto; }
.lgroup__name { flex: 1 1 auto; font-size: 12.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgroup__n { font-size: 10.5px; font-weight: 700; color: var(--muted-2); font-family: var(--mono); }
.lgroup__caret { color: var(--muted-2); transition: transform .2s; flex: 0 0 auto; }
.lgroup.is-open .lgroup__caret { transform: rotate(90deg); }
.lgroup__body { display: none; padding: 4px 8px 10px; }
.lgroup.is-open .lgroup__body { display: flex; flex-direction: column; gap: 8px; }

/* ---- sport event row (stake-style) ---- */
.srow {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; transition: border-color .15s, background .15s;
}
.srow:hover { border-color: var(--border-2); background: var(--bg-3); }
.srow__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.srow__when { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); min-width: 0; }
.srow__when b { color: var(--text); font-weight: 700; }
.srow__live { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; color: var(--live); text-transform: uppercase; letter-spacing: .04em; }
.srow__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }
.srow__more {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; font-family: var(--mono);
  color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(42,148,243,.2);
  padding: 3px 9px; border-radius: 20px; flex: 0 0 auto;
}
.srow__body { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; }
.srow__teams { min-width: 0; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.srow__team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.srow__tname { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow__vs { display: none; }   /* desktop keeps teams side-by-side w/ odds — VS only in the mobile stack */
.srow__ou { display: flex; align-items: center; gap: 8px; }
.srow__oucap { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); align-self: center; writing-mode: vertical-rl; transform: rotate(180deg); }
.srow__odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
@media (min-width: 561px) { .srow__odds { grid-template-columns: repeat(3, 78px); } }
/* "starts in Xh Ym" countdown next to the kick-off time */
.srow__soon { font-size: 10.5px; color: var(--accent); font-weight: 700; margin-left: 6px; }
.evt__soon { font-size: 10.5px; color: var(--accent); font-weight: 700; margin-left: 6px; }
/* once a match has kicked off there's no in-play betting → grey + disable its odds (server also blocks it) */
.srow--live .odd, .evt--live .odd,
.odd--closed, .odd:disabled { opacity: .42; pointer-events: none; filter: grayscale(.6); cursor: not-allowed; }
/* event-detail "betting closed" banner (shown once the match has started) */
.mkt-closed { display: flex; align-items: center; gap: 9px; padding: 12px 14px; margin-bottom: 12px; border-radius: 10px;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.38); color: var(--text); font-size: 13px; font-weight: 700; }
.mkt-closed__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; flex: 0 0 auto; }
/* "Currently Playing · 39'" — replaces the odds on a live match (tap to open the match) */
.playing { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  padding: 10px 14px; border-radius: 10px; background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.30); white-space: nowrap; }
.playing:hover { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.5); }
.playing__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; flex: 0 0 auto; }
.playing__t { font-size: 12px; font-weight: 800; color: var(--live); text-transform: uppercase; letter-spacing: .03em; }
.playing__min { font-size: 12.5px; font-weight: 800; color: var(--text); font-family: var(--mono); background: var(--bg-3); padding: 2px 9px; border-radius: 20px; }
/* GOLDEN finished-match card + final score (tap for the result) */
.srow--result, .evt--result { cursor: pointer; border-color: rgba(240,200,80,.45);
  background: linear-gradient(135deg, rgba(240,200,80,.09), var(--bg-1) 60%); }
.srow--result:hover, .evt--result:hover { border-color: rgba(240,200,80,.75); background: linear-gradient(135deg, rgba(240,200,80,.14), var(--bg-1) 60%); }
.srow__ft, .evt__ft { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #f0c850; }
.result { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 2px 10px; }
.result__score { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 800; font-size: 22px; color: var(--text); }
.result__dash { color: var(--muted-2); }
.result__n { min-width: 16px; text-align: center; }
.result__tap { font-size: 9.5px; font-weight: 800; color: #f0c850; text-transform: uppercase; letter-spacing: .05em; }
.pitch__score { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-weight: 800; font-size: 34px; color: #fff; }
.pitch__score-dash { color: rgba(255,255,255,.5); }
/* "Latest Results" section — all recent golden result cards together, at the top of the sport view */
.results-sec { margin-bottom: 16px; }
.results-sec__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.results-sec__t { font-size: 14px; font-weight: 800; color: #f0c850; letter-spacing: -0.01em; }
.results-sec__n { font-size: 10.5px; font-weight: 700; color: var(--muted-2); background: var(--bg-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 20px; }
.results-sec__list { display: flex; flex-direction: column; gap: 8px; }
/* MOBILE: 2-up grid of COMPACT result cards (teams stacked + centered, no "VS", score under) */
@media (max-width: 560px) {
  .results-sec__list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
  .results-sec .srow { padding: 10px 9px; }
  .results-sec .srow__top { margin-bottom: 8px; }
  .results-sec .srow__body { grid-template-columns: 1fr; gap: 8px; }
  .results-sec .srow__teams { flex-direction: column; align-items: center; gap: 5px; }
  .results-sec .srow__vs { display: none; }
  .results-sec .srow__team { justify-content: center; gap: 6px; }
  .results-sec .srow__tname { font-size: 11.5px; white-space: normal; text-align: center; line-height: 1.15; }
  .results-sec .result { padding: 0; }
  .results-sec .result__score { font-size: 20px; gap: 8px; }
}
/* MOBILE: stack the sport-view row into 2 rows — teams (full names + logos) on top, the 1/X/2 odds
   full-width below — so names no longer truncate to "Ast…". The rotated side "1X2" label is redundant
   (each odds box already shows its 1/X/2 cap), so hide it. */
@media (max-width: 560px) {
  .srow__body { grid-template-columns: 1fr; gap: 10px; }
  .srow__oucap { display: none; }
  .srow__ou { display: block; }
  .srow__odds { grid-template-columns: repeat(3, 1fr); }
  /* teams row: ONE centered horizontal line — "Aston Villa VS Arsenal" */
  .srow__teams { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px 8px; }
  .srow__team { justify-content: center; flex: 0 1 auto; min-width: 0; gap: 7px; }
  .srow__tname { font-size: 13.5px; }
  .srow__vs { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
}

/* ============================================================= *
 *  EVENT DETAIL (VIEW 2)
 * ============================================================= */
.ev2 { display: flex; flex-direction: column; gap: 16px; animation: rise .4s cubic-bezier(.2,.7,.2,1) backwards; }
.ev2__abbr {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 11px;
  font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border-2);
}
.ev2__abbr .sep { color: var(--muted-2); }

/* banner on a green pitch */
.pitch {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border-2);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.028) 0 44px, transparent 44px 88px),
    radial-gradient(120% 130% at 50% -10%, var(--pitch-1), var(--pitch-0) 70%);
  box-shadow: inset 0 0 60px rgba(0,0,0,.35);
}
.pitch::before {
  content: ""; position: absolute; left: 50%; top: 14px; bottom: 14px; width: 1px;
  background: rgba(255,255,255,.14); transform: translateX(-.5px);
}
.pitch::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 50%;
}
.pitch__row { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 20px 16px; }
.pitch__side { display: flex; flex-direction: column; align-items: center; gap: 9px; min-width: 0; }
.pitch__name { font-size: 13.5px; font-weight: 800; text-align: center; color: #eafff4; text-shadow: 0 1px 3px rgba(0,0,0,.5); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitch__mid { text-align: center; }
.pitch__vs { font-size: 11px; font-weight: 800; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .12em; }
.pitch__date { margin-top: 4px; font-size: 12px; font-weight: 700; color: #fff; font-family: var(--mono); white-space: nowrap; }
.pitch__live { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; color: #fff; background: var(--live); padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .05em; }

/* info tabs (icon tabs) */
.itabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.itab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 4px; border-radius: 11px; background: var(--bg-1); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--muted); transition: background .14s, color .14s, border-color .14s;
}
.itab svg { width: 20px; height: 20px; }
.itab:hover { color: var(--text); background: var(--bg-2); }
.itab.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* analysis panel (carousel / h2h / standings / lineup) */
.panel { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }

/* carousel */
.carousel { position: relative; }
.carousel__track { overflow: hidden; }
.carslide { padding: 18px 18px 20px; animation: fade .4s; }
.carslide__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); text-align: center; margin-bottom: 16px; }
.carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(20,28,38,.8); border: 1px solid var(--border-2); color: var(--text); z-index: 2; transition: background .14s; }
.carousel__nav:hover { background: var(--bg-4); }
.carousel__nav--prev { left: 8px; }
.carousel__nav--next { right: 8px; }
.carousel__dots { display: flex; justify-content: center; gap: 6px; padding: 0 0 14px; }
.cardot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); transition: background .2s, width .2s; }
.cardot.is-active { background: var(--accent); width: 20px; border-radius: 4px; }

/* win probability split bar */
.winprob { display: flex; align-items: flex-end; justify-content: center; gap: 18px; margin-bottom: 16px; }
.winprob__col { text-align: center; }
.winprob__pct { font-size: 22px; font-weight: 800; font-family: var(--mono); }
.winprob__pct--h { color: var(--accent); }
.winprob__pct--d { color: var(--muted); }
.winprob__pct--a { color: #f0a35a; }
.winprob__cap { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); margin-top: 2px; }
.splitbar { display: flex; height: 12px; border-radius: 7px; overflow: hidden; background: var(--bg-3); }
.splitbar > span { display: block; }
.splitbar__h { background: linear-gradient(90deg, var(--accent), #55a9f7); }
.splitbar__d { background: var(--muted-2); }
.splitbar__a { background: linear-gradient(90deg, #f0a35a, #f0b90b); }

/* stat trio (previous meetings) */
.mrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mstat { text-align: center; padding: 12px 6px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); }
.mstat__n { font-size: 22px; font-weight: 800; font-family: var(--mono); }
.mstat__l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); margin-top: 3px; }

/* dual bar (goals / season) */
.dbar { display: flex; flex-direction: column; gap: 14px; }
.dbar__row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 12px; }
.dbar__team { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbar__track { height: 14px; border-radius: 8px; background: var(--bg-3); overflow: hidden; }
.dbar__fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), #55a9f7); min-width: 4px; transition: width .5s; }
.dbar__row:nth-child(2) .dbar__fill { background: linear-gradient(90deg, #f0a35a, #f0b90b); }
.dbar__val { font-size: 15px; font-weight: 800; font-family: var(--mono); }

/* form chips */
.formteam { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.formteam + .formteam { border-top: 1px dashed var(--border); }
.formteam__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.formteam__pos { font-size: 11px; font-weight: 800; color: var(--muted-2); font-family: var(--mono); }
.formteam__name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.formchips { display: flex; gap: 4px; flex: 0 0 auto; }
.fchip { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; }
.fchip--W { background: var(--up); }
.fchip--D { background: var(--muted-2); }
.fchip--L { background: var(--down); }

/* period bar chart */
.periods { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 6px 4px 0; }
.pcol { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.pcol__bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.pcol__bar { width: 9px; border-radius: 4px 4px 0 0; min-height: 3px; }
.pcol__bar--h { background: linear-gradient(180deg, #55a9f7, var(--accent)); }
.pcol__bar--a { background: linear-gradient(180deg, #f0b90b, #f0a35a); }
.pcol__lab { font-size: 9.5px; font-weight: 700; color: var(--muted-2); font-family: var(--mono); }
.legend { display: flex; justify-content: center; gap: 16px; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* venue slide */
.venue { text-align: center; padding: 8px 0; }
.venue__name { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.venue__cap { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }

/* standings table */
.stbl { width: 100%; }
.stbl table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stbl th { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); text-align: right; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.stbl th:nth-child(2) { text-align: left; }
.stbl td { padding: 9px 6px; text-align: right; border-bottom: 1px solid var(--border); font-family: var(--mono); font-weight: 600; }
.stbl td:nth-child(2) { text-align: left; font-family: var(--font); font-weight: 700; }
.stbl tr:last-child td { border-bottom: none; }
.stbl .st-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stbl .st-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stbl tr.is-me td { background: var(--accent-dim); }
.stbl tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.stbl td.pts { color: var(--text); font-weight: 800; }

/* lineup pitch */
.lineup { padding: 14px; }
.lineup__legend { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 12px; font-weight: 800; }
.lineup__legend .home { color: var(--accent); }
.lineup__legend .away { color: #f0a35a; }
.minipitch {
  position: relative; border-radius: 14px; height: 420px; max-height: 62vh; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 40px, transparent 40px 80px),
    radial-gradient(120% 90% at 50% 50%, var(--pitch-1), var(--pitch-0));
}
.minipitch::before { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 1px; background: rgba(255,255,255,.18); }
.minipitch::after { content: ""; position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.dot { position: absolute; width: 26px; height: 26px; border-radius: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4), inset 0 0 0 1.5px rgba(255,255,255,.25); }
.dot--home { background: linear-gradient(135deg, var(--accent), #1878d6); }
.dot--away { background: linear-gradient(135deg, #f0a35a, #e0870f); }

/* market category tabs + search */
.mkcats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mkcats::-webkit-scrollbar { display: none; }
.mkcat { flex: 0 0 auto; height: 36px; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--bg-1); border: 1px solid var(--border); transition: color .14s, background .14s, border-color .14s; }
.mkcat:hover { color: var(--text); }
.mkcat.is-active { color: #04121f; background: linear-gradient(135deg, var(--accent), #55a9f7); border-color: transparent; }
.mksearch { position: relative; }
.mksearch input {
  width: 100%; height: 42px; border-radius: 11px; padding: 0 14px 0 40px;
  background: var(--bg-1); border: 1px solid var(--border-2); color: var(--text);
  font-size: 13.5px; outline: none; transition: border-color .15s;
}
.mksearch input:focus { border-color: var(--accent); }
.mksearch input::placeholder { color: var(--muted-2); }
.mksearch svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }

/* collapsible market groups */
.mgroup { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.mgroup__head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; text-align: left;
  background: var(--bg-2); transition: background .14s;
}
.mgroup__head:hover { background: var(--bg-3); }
.mgroup__title { flex: 1 1 auto; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.mgroup__tag { font-size: 11px; font-weight: 700; color: var(--muted-2); }
.mgroup__caret { color: var(--muted-2); transition: transform .2s; flex: 0 0 auto; }
.mgroup.is-open .mgroup__caret { transform: rotate(180deg); }
.mgroup__body { display: none; padding: 12px; background: var(--bg-1); }
.mgroup.is-open .mgroup__body { display: block; }

/* odds as pills: outcome name left, blue price right */
.mkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mkgrid--c2 { grid-template-columns: repeat(2, 1fr); }
.mkgrid--c3 { grid-template-columns: repeat(3, 1fr); }
.mkgrid--c4 { grid-template-columns: repeat(4, 1fr); }
.mkgrid--score { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.mkgrid .odd { flex-direction: row; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; background: var(--bg-2); }
.mkgrid .odd:hover { background: var(--bg-3); }
.mkgrid--score .odd { flex-direction: column; min-height: 54px; padding: 8px 4px; gap: 3px; }
.mkgrid .odd__lab { font-size: 13px; font-weight: 600; color: var(--text); text-align: left; }
.mkgrid--score .odd__lab { text-align: center; font-family: var(--mono); font-weight: 700; }
.mkgrid .odd.is-picked .odd__lab { color: var(--accent); }
.mkgrid .odd__price { font-size: 14.5px; color: var(--accent); font-weight: 800; }

/* Asian two-column line tables (Over/Under · Handicap) */
.atable { display: flex; flex-direction: column; gap: 8px; }
.atable__head { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atable__head span { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.atable__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atable__col { display: flex; flex-direction: column; gap: 6px; }
.atable__col .odd { flex-direction: row; justify-content: space-between; align-items: center; min-height: 42px; padding: 0 12px; background: var(--bg-2); }
.atable__col .odd:hover { background: var(--bg-3); }
.atable__col .odd__lab { font-size: 13px; font-weight: 600; color: var(--text); font-family: var(--mono); }
.atable__col .odd__price { font-size: 14px; color: var(--accent); font-weight: 800; }
.atable__col .odd__pt { display: none; }
.atable__blank { min-height: 42px; }

.mksearch-empty { text-align: center; padding: 24px; font-size: 13px; color: var(--muted); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1120px) {
  .grid { grid-template-columns: 220px minmax(0,1fr) 320px; }
}
@media (max-width: 960px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .rail, .main, .slip { grid-column: auto; }   /* single column: main must NOT stay in desktop col 2 (that left an empty gutter column) */
  .nav-toggle { display: inline-grid; }
  .slip-toggle { display: inline-flex; }
  .back-link span { display: none; }
  .back-link { padding: 0 11px; }

  /* left rail = drawer */
  .rail {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 84vw); z-index: 70;
    transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.7,.2,1);
    will-change: transform;
    border-right: 1px solid var(--border-2); box-shadow: var(--shadow); padding-top: 14px;
  }
  .rail.is-open { transform: translateX(0); }   /* explicit 0 (NOT `none`): keyword `none` can fail to interpolate → drawer won't slide in */
  .rail__close { display: inline-grid; }
  .rail-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(6,10,15,.6); backdrop-filter: blur(3px); animation: rise .2s; }
  .rail-scrim[hidden] { display: none; }

  /* slip = bottom sheet */
  .slip {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: min(82vh, 620px); border-left: none; border-top: 1px solid var(--border-2);
    border-radius: 18px 18px 0 0; box-shadow: var(--shadow);
    transform: translateY(102%); transition: transform .3s cubic-bezier(.2,.7,.2,1); will-change: transform;
  }
  .slip.is-open { transform: translateY(0); }   /* explicit 0, not `none`, so the sheet always animates up reliably */
  .slip::before { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 3px; background: var(--border-2); }
  .slip__tabs { padding-top: 8px; }
  .slip__close { display: inline-grid; }
  .slip-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(6,10,15,.6); backdrop-filter: blur(3px); animation: rise .2s; }
  .slip-scrim[hidden] { display: none; }
}
@media (max-width: 520px) {
  /* top bar must fit a phone: brand may shrink, but the mode toggle + balance +
     Slip button (the only way to bet on mobile) stay pinned and fully visible. */
  .topbar { height: 58px; gap: 8px; padding: 0 10px; }
  .topbar .btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .topbar__l { gap: 8px; min-width: 0; flex: 1 1 auto; }
  .topbar__r { gap: 8px; flex: 0 0 auto; }
  .back-link { display: none; }                 /* redundant on mobile: the brand links to /platform */
  .brand { min-width: 0; flex: 0 0 auto; }
  .brand__logo { height: 28px; max-width: 132px; }   /* compact logo on phones */
  .topbar__l { flex: 0 0 auto; }                /* nav + logo are fixed; the space goes to the account block */
  .topbar__r { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
  .acct__bal { padding: 3px 9px; }
  .acct { gap: 8px; }
  .acct__seg { height: 28px; padding: 0 10px; font-size: 12px; }
  .acct__bal { display: flex; }                 /* re-show balance (compact: amount only) */
  .acct__label { display: none; }
  .acct__amt { font-size: 13.5px; }
  .slip-toggle { flex: 0 0 auto; padding: 0 12px; }
  .main { padding: 12px 12px 80px; }
  /* mobile: event cards read centered & balanced (stacked layout) */
  .evt { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .evt__meta { justify-content: center; }
  .evt__teams { align-items: center; }
  .evt__team { justify-content: center; }
  .evt__mkts { overflow-x: auto; padding-bottom: 2px; justify-content: center; }
  .mkt-col, .odd, .evt__more { min-width: 76px; }
  /* sports grid stays 3-wide and centered, sized down for phones */
  .sportgrid { gap: 8px; }
  .sporttile { padding: 14px 6px; min-height: 104px; gap: 6px; }
  .sporttile__ic { width: 46px; height: 46px; font-size: 26px; }
  .sporttile__name { font-size: 12px; }
  .sporttile__meta { font-size: 9.5px; }
  /* market pills: stack name over price in 3/4-col groups so full team names fit on a phone */
  .mgroup__body { padding: 10px; }
  .mkgrid { gap: 6px; }
  .mkgrid--c3 .odd, .mkgrid--c4 .odd { flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 54px; padding: 7px 5px; gap: 2px; }
  .mkgrid--c3 .odd__lab, .mkgrid--c4 .odd__lab { text-align: center; white-space: normal; font-size: 11px; line-height: 1.15; max-width: 100%; }
  .atable__cols, .atable__head { gap: 8px; }
  .atable__col .odd { padding: 0 10px; }
  .toasts { bottom: 90px; }
  .winprob { gap: 12px; }
  .winprob__pct { font-size: 19px; }
  .itab { font-size: 10px; padding: 9px 2px; }
  .dbar__row { grid-template-columns: 74px 1fr auto; gap: 8px; }
  .stbl table { font-size: 11px; }
  .stbl th, .stbl td { padding: 8px 4px; }
  .pitch__row { padding: 16px 10px; }
}
/* hard guard: the page itself never scrolls sideways on any device */
@media (max-width: 960px) {
  html, body { overflow-x: hidden; max-width: 100%; }
}
@media (max-width: 360px) {
  .brand__name { display: none; }               /* tiniest phones: logo mark only, keep the rest usable */
  .acct__seg { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
