/* BetGr9 design system (loaded last). Layout and components are BetGr9's own:
   floating bottom dock with the betslip in the middle, sport icon rail, live scoreboard rail,
   time-block match rows with joined odds, versus cards. Dark (default) and light themes. */
:root {
  --r: #e3161c; --r2: #ff3b3b; --r3: #a30d12;
  --bg0: #08080a; --bg1: #0f0f12; --bg2: #16161a; --bg3: #1e1e23; --line: #24242a;
  --tx: #f4f4f6; --tx2: #b7b8bf; --tx3: #7d7e86; --gold: #f5c518;
}
body { background: var(--bg0); }
.app { background: var(--bg0); padding-bottom: 92px; }

/* ---------- header ---------- */
.hdr { background: rgba(8, 8, 10, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.hdr::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--r), transparent); }
.subhead { top: 50px; }

/* ---------- floating dock ---------- */
.g9-dock { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  width: min(calc(100% - 20px), 520px); height: 62px; display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; align-items: center;
  border-radius: 20px; background: rgba(18, 18, 22, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 14px 34px rgba(0, 0, 0, .6); }
.g9-dock a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--tx3); font-size: 10.5px; font-weight: 600; }
.g9-dock a .ic { width: 21px; height: 21px; }
.g9-dock a.on { color: var(--tx); }
.g9-dock a.on .ic { color: var(--r2); filter: drop-shadow(0 0 6px rgba(227, 22, 28, .6)); }
.g9-dock-gap { display: block; }
/* the betslip button becomes the dock's centre */
.slip-fab { left: 50% !important; right: auto !important; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)) !important;
  width: 62px; height: 62px; border-radius: 50%; z-index: 41; background: radial-gradient(circle at 50% 30%, #ff3a3f, #b30b10 75%);
  border: 4px solid var(--bg0); box-shadow: 0 8px 22px -4px rgba(227, 22, 28, .75); }
.app:not(.chrome-full) ~ .slip-fab, .slip-fab[hidden] { display: none; }

/* ---------- section scaffolding ---------- */
.g9-home { padding-top: 4px; }
.g9-sec { margin: 14px 0 0; }
.g9-h { display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; }
.g9-h h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-family: var(--head-font); font-size: 19px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--tx); }
.g9-h h2 small { font-family: Roboto, sans-serif; font-size: 11px; font-weight: 700; color: var(--tx3); letter-spacing: 0; }
.g9-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--r); box-shadow: 0 0 0 4px rgba(227, 22, 28, .2); animation: g9-pulse 1.4s ease-in-out infinite; }
@keyframes g9-pulse { 50% { box-shadow: 0 0 0 7px rgba(227, 22, 28, 0); } }
.g9-link { margin-left: auto; display: inline-flex; align-items: center; color: var(--tx2); font-size: 12px; font-weight: 600; }
.g9-link .ic { width: 14px; height: 14px; }
.g9-all { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 8px 12px 0; height: 40px; border-radius: 10px; border: 1px dashed #33333a; color: var(--tx2); font-size: 12.5px; font-weight: 700; }
.g9-all .ic { width: 14px; height: 14px; }

/* ---------- sport rail ---------- */
.g9-sports { display: flex; gap: 12px; padding: 12px 12px 2px; }
.g9-sport { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.g9-sport-ic { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 25px;
  background: linear-gradient(160deg, #1d1d22, #121215); border: 1px solid var(--line); }
.g9-sport.has-live .g9-sport-ic { border-color: rgba(227, 22, 28, .55); box-shadow: inset 0 0 0 1px rgba(227, 22, 28, .25), 0 6px 16px -8px rgba(227, 22, 28, .8); }
.g9-sport-ic i { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--r); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg0); }
.g9-sport b { font-size: 10.5px; font-weight: 600; color: var(--tx2); white-space: nowrap; }

/* ---------- live scoreboard rail ---------- */
.g9-rail { display: flex; gap: 10px; padding: 0 12px 4px; scroll-snap-type: x mandatory; }
.g9-lc { flex: none; width: 260px; scroll-snap-align: start; padding: 10px; border-radius: 14px; background: linear-gradient(170deg, #1c1013, #131316 55%); border: 1px solid #2a1c1e; }
.g9-lc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.g9-min { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; background: rgba(227, 22, 28, .16); color: var(--r2); font-size: 11px; font-weight: 800; }
.g9-min i { width: 6px; height: 6px; border-radius: 50%; background: var(--r2); animation: g9-blink 1s steps(2) infinite; }
@keyframes g9-blink { 50% { opacity: .2; } }
.g9-lc-lg { flex: 1; min-width: 0; color: var(--tx3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g9-lc-body { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.g9-lc-body span { display: flex; align-items: center; gap: 8px; }
.g9-lc-body em { flex: 1; min-width: 0; font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g9-lc-body b { min-width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: #0b0b0d; color: #fff; font-size: 14px; font-weight: 800; }

/* ---------- crests ---------- */
.g9-crest { width: 20px; height: 20px; object-fit: contain; flex: none; }
.g9-crest.ph { display: inline-grid; place-items: center; border-radius: 50%; background: #26262c; color: var(--tx2); font-size: 10px; font-weight: 800; }

/* ---------- joined odds ---------- */
.g9-seg { display: grid; border-radius: 10px; overflow: hidden; background: #0c0c0e; border: 1px solid var(--line); }
.g9-seg.c3 { grid-template-columns: repeat(3, 1fr); } .g9-seg.c2 { grid-template-columns: repeat(2, 1fr); }
.g9-seg .odd { height: 42px; border: 0; border-radius: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0 2px; color: var(--tx); box-shadow: none; }
.g9-seg .odd + .odd { border-left: 1px solid var(--line); }
.g9-seg .odd em { font-style: normal; font-size: 9.5px; font-weight: 600; color: var(--tx3); }
.g9-seg .odd b { font-size: 13.5px; font-weight: 800; }
.g9-seg .odd.sel { background: linear-gradient(180deg, #ff2a2f, #c80f14); color: #fff; }
.g9-seg .odd.sel em { color: rgba(255, 255, 255, .85); }
.g9-seg .odd.up b { color: #34d399; } .g9-seg .odd.down b { color: #ff6b6b; }
.g9-seg .odd.lock { color: var(--tx3); }
.g9-seg .odd.lock .ic { width: 13px; height: 13px; }

/* ---------- match rows ---------- */
.g9-list { padding: 0 12px; display: flex; flex-direction: column; gap: 8px; }
.g9-row { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px 9px 0; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.g9-time { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-right: 1px solid var(--line); }
.g9-time b { font-size: 14px; font-weight: 800; color: var(--tx); }
.g9-time span { font-size: 9.5px; font-weight: 600; color: var(--tx3); text-transform: uppercase; }
.g9-time.live b { color: var(--r2); }
.g9-time.live span { color: #fff; background: var(--r); padding: 1px 5px; border-radius: 4px; font-size: 8.5px; letter-spacing: .5px; }
.g9-teams { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.g9-teams > span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.g9-teams em { flex: 1; min-width: 0; font-style: normal; font-size: 13px; font-weight: 600; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g9-teams b { color: var(--r2); font-size: 13.5px; font-weight: 800; }
.g9-teams small { color: var(--tx3); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g9-hot { color: var(--gold); font-style: normal; font-weight: 800; }
.g9-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.g9-side .g9-seg { width: 168px; }
.g9-side .g9-seg.c2 { width: 120px; }
.g9-more-mk { font-size: 10.5px; font-weight: 700; color: var(--tx3); }
.g9-lg { margin: 0 12px 10px; }
.g9-lg-h { display: flex; align-items: center; gap: 7px; padding: 10px 2px 7px; color: var(--tx2); font-size: 12px; font-weight: 700; }
.g9-lg-h .ic { width: 14px; height: 14px; margin-left: auto; color: var(--tx3); }
.g9-lg .g9-row + .g9-row { margin-top: 6px; }

/* ---------- market switch ---------- */
.g9-mk { margin-left: auto; display: flex; padding: 3px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.g9-mk button { padding: 4px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--tx3); }
.g9-mk button.on { background: var(--r); color: #fff; }

/* ---------- leagues ---------- */
.g9-leagues { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 12px; }
.g9-league { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.g9-league-ic { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #17171b; font-size: 10px; font-weight: 800; }
.g9-league-ic img { width: 26px; height: 26px; object-fit: contain; }
.g9-league b { font-size: 10.5px; font-weight: 600; color: var(--tx2); text-align: center; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- casino ---------- */
.g9-casino { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; padding: 0 12px; }
.g9-game { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 150px; padding: 10px; border-radius: 14px; color: #fff; border: 1px solid rgba(255, 255, 255, .08); }
.g9-game.jet { background: radial-gradient(120% 80% at 50% 0%, #5a0609, #160304 70%); }
.g9-game.mines { background: radial-gradient(120% 80% at 50% 0%, #3a2a06, #120d03 70%); }
.g9-game.dice { background: radial-gradient(120% 80% at 50% 0%, #0d2f45, #05101a 70%); }
.g9-game-art { position: absolute; top: 14px; left: 0; right: 0; display: grid; place-items: center; font-size: 44px; }
.g9-game-jet { width: 82%; }
.g9-game b { font-family: var(--head-font); font-size: 17px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.g9-game small { font-size: 10px; color: rgba(255, 255, 255, .7); }

/* ---------- versus card ---------- */
.g9-vs { padding: 10px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.g9-vs-top { display: flex; align-items: center; gap: 6px; color: var(--tx3); font-size: 11px; margin-bottom: 8px; }
.g9-vs-mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin-bottom: 10px; }
.g9-vs-mid .t { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.g9-vs-mid .t .g9-crest { width: 40px; height: 40px; }
.g9-vs-mid .t em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--tx); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g9-vs-mid .k { display: flex; flex-direction: column; align-items: center; }
.g9-vs-mid .k b { font-family: var(--head-font); font-size: 22px; font-weight: 800; color: var(--tx); }
.g9-vs-mid .k small { color: var(--tx3); font-size: 10.5px; }

@media (min-width: 900px) {
  .g9-leagues { grid-template-columns: repeat(8, 1fr); }
  .g9-side .g9-seg { width: 220px; }
}

/* ---------- light theme ---------- */
[data-theme="light"] {
  --bg0: #f2f2f4; --bg1: #ffffff; --bg2: #ffffff; --bg3: #f4f4f7; --line: #e6e6eb;
  --tx: #17171b; --tx2: #4a4b52; --tx3: #85868e;
}
[data-theme="light"] .hdr { background: rgba(255, 255, 255, .94); }
[data-theme="light"] .g9-dock { background: rgba(255, 255, 255, .96); border-color: #e6e6eb; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); }
[data-theme="light"] .slip-fab { border-color: var(--bg0); }
[data-theme="light"] .g9-sport-ic { background: #ffffff; }
[data-theme="light"] .g9-lc { background: linear-gradient(170deg, #fff1f1, #ffffff 55%); border-color: #f1dcdc; }
[data-theme="light"] .g9-lc-body b { background: #17171b; }
[data-theme="light"] .g9-seg { background: #f7f7f9; }
[data-theme="light"] .g9-crest.ph { background: #ececf0; }
[data-theme="light"] .g9-all { border-color: #d6d6dc; }
[data-theme="light"] .g9-league-ic { box-shadow: 0 0 0 1px #e6e6eb; }

/* ================= match page ================= */
.g9m-board { margin: 8px 10px 0; padding: 12px 12px 10px; border-radius: 18px; color: #fff;
  background: radial-gradient(110% 100% at 50% 0%, #4a0609 0%, #160304 55%, #0b0b0d 100%); border: 1px solid #2a1517; }
.g9m-lg { display: flex; align-items: center; justify-content: center; gap: 6px; color: #e8b7b8; font-size: 11.5px; font-weight: 600; }
.g9m-mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 14px 0 12px; }
.g9m-team { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.g9m-team .g9-crest { width: 56px; height: 56px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.g9m-team .g9-crest.ph { font-size: 20px; }
.g9m-team b { font-size: 13.5px; font-weight: 700; text-align: center; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.g9m-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 90px; }
.g9m-score { font-family: var(--head-font); font-size: 40px; font-weight: 800; line-height: 1; }
.g9m-score i { font-style: normal; color: var(--r2); margin: 0 6px; }
.g9m-min { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--r); font-size: 11px; font-weight: 800; }
.g9m-min i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: g9-blink 1s steps(2) infinite; }
.g9m-ko { font-family: var(--head-font); font-size: 34px; font-weight: 800; line-height: 1; }
.g9m-date { font-size: 11.5px; color: #e8b7b8; font-weight: 600; }
.g9m-count { padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 10.5px; font-weight: 700; }
.g9m-prob .bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .1); gap: 2px; }
.g9m-prob .bar i { display: block; height: 100%; }
.g9m-prob .h { background: var(--r2); } .g9m-prob .d { background: #8d8e95; } .g9m-prob .a { background: #f4f4f6; }
.g9m-prob .lbl { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10.5px; font-weight: 700; color: #d9b2b4; }
.g9m-id { margin-top: 8px; text-align: center; font-size: 10px; color: rgba(255, 255, 255, .45); letter-spacing: .3px; }
.g9m-tabs { position: sticky; top: 50px; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 10px 10px 0; padding: 4px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.g9m-tabs button { height: 34px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--tx3); }
.g9m-tabs button small { font-size: 10.5px; opacity: .8; }
.g9m-tabs button.on { background: var(--r); color: #fff; }
.g9m-groups { display: flex; gap: 6px; padding: 10px 10px 2px; }
.g9m-groups button { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); background: var(--bg2); color: var(--tx2); font-size: 12px; font-weight: 600; }
.g9m-groups button.on { border-color: var(--r); color: #fff; background: rgba(227, 22, 28, .18); }
.g9m-mkts { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px 16px; }
.g9m-mkt { border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); padding: 0 10px; }
.g9m-mkt[open] { padding-bottom: 10px; }
.g9m-mkt summary { display: flex; align-items: center; gap: 8px; height: 42px; list-style: none; cursor: pointer; }
.g9m-mkt summary::-webkit-details-marker { display: none; }
.g9m-mkt summary b { font-size: 13px; font-weight: 700; color: var(--tx); }
.g9m-mkt summary small { padding: 0 6px; border-radius: 6px; background: var(--bg3); color: var(--tx3); font-size: 10.5px; font-weight: 700; }
.g9m-mkt summary .ic { width: 16px; height: 16px; margin-left: auto; color: var(--tx3); transition: transform .15s; }
.g9m-mkt:not([open]) summary .ic { transform: rotate(-90deg); }
.g9m-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.g9m-tile { height: 46px; border-radius: 10px; border: 1px solid var(--line); background: #0c0c0e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--tx); box-shadow: none; }
.g9m-tile em { font-style: normal; font-size: 10px; color: var(--tx3); font-weight: 600; }
.g9m-tile b { font-size: 13.5px; font-weight: 800; }
.g9m-tile.sel { background: linear-gradient(180deg, #ff2a2f, #c80f14); border-color: #ff4a4f; color: #fff; }
.g9m-tile.sel em { color: rgba(255, 255, 255, .85); }
[data-theme="light"] .g9m-board { background: radial-gradient(110% 100% at 50% 0%, #ffd9da 0%, #fff3f3 55%, #ffffff 100%); border-color: #f0d7d8; color: #17171b; }
[data-theme="light"] .g9m-lg, [data-theme="light"] .g9m-date, [data-theme="light"] .g9m-prob .lbl { color: #a30d12; }
[data-theme="light"] .g9m-count { background: rgba(0, 0, 0, .06); }
[data-theme="light"] .g9m-id { color: #8a8b92; }
[data-theme="light"] .g9m-prob .a { background: #17171b; }
[data-theme="light"] .g9m-tile { background: #f7f7f9; }
[data-theme="light"] .g9m-groups button.on { color: #a30d12; }

/* ================= bet slip ================= */
.g9s { background: #0f0f12 !important; color: var(--tx); border-radius: 22px 22px 0 0; border-top: 1px solid #26262c; }
.g9s-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: #3a3a42; margin: 8px auto 2px; cursor: pointer; }
.g9s-top { display: flex; align-items: center; gap: 10px; padding: 6px 14px 8px; }
.g9s-title { display: flex; align-items: center; gap: 7px; font-family: var(--head-font); font-size: 21px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.g9s-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--r); color: #fff; font-family: Roboto, sans-serif; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.g9s-mode { margin-left: auto; display: flex; padding: 3px; border-radius: 10px; background: #1b1b20; border: 1px solid #26262c; }
.g9s-mode button { position: relative; padding: 4px 11px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--tx3); }
.g9s-mode button.on { background: var(--r); color: #fff; }
.g9s-mode .dot { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.g9s-close { width: 32px; height: 32px; border-radius: 50%; background: #1b1b20; display: grid; place-items: center; color: var(--tx2); }
.g9s-close .ic { width: 16px; height: 16px; }
.g9s-bal { display: flex; align-items: center; gap: 7px; margin: 0 14px 8px; padding: 8px 10px; border-radius: 10px; background: #16161a; border: 1px solid #222228; font-size: 12px; color: var(--tx2); }
.g9s-bal .ic { width: 15px; height: 15px; color: var(--r2); }
.g9s-bal b { margin-left: auto; color: var(--tx); font-size: 13px; }
.g9s-scroll { padding: 0 14px 14px; }
.g9s-code { padding: 10px; border-radius: 14px; background: #16161a; border: 1px solid #222228; margin-bottom: 10px; }
.g9s-code-row { display: flex; height: 40px; border-radius: 10px; overflow: hidden; border: 1px solid #2c2c33; background: #0b0b0d; }
.g9s-code-row input { flex: 1; min-width: 0; padding: 0 12px; background: none; border: 0; outline: 0; color: var(--tx); font-size: 13.5px; letter-spacing: 1px; text-transform: uppercase; }
.g9s-code-row button { padding: 0 16px; background: var(--r); color: #fff; font-weight: 800; font-size: 13px; }
.g9s-code-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.g9s-code-links button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 9px; background: #1d1d22; color: var(--tx2); font-size: 10.5px; font-weight: 600; }
.g9s-code-links button .ic { width: 16px; height: 16px; color: var(--r2); }
.g9s-code-links button.on { background: rgba(227, 22, 28, .18); color: #fff; }
.g9s-type { display: flex; align-items: center; margin: 4px 0 8px; }
.g9s-type span { font-size: 12px; font-weight: 800; color: var(--tx); text-transform: uppercase; letter-spacing: .5px; }
.g9s-clear { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--tx3); font-size: 11.5px; font-weight: 600; }
.g9s-clear .ic { width: 13px; height: 13px; }
.g9s-picks { display: flex; flex-direction: column; gap: 6px; }
.g9s-pick { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 34px 10px 12px; border-radius: 12px; background: #16161a; border: 1px solid #222228; }
.g9s-pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.g9s-pick-name { font-size: 14px; font-weight: 800; color: var(--tx); }
.g9s-pick-mk { font-size: 11px; color: var(--r2); font-weight: 700; }
.g9s-pick-match { font-size: 12px; color: var(--tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g9s-pick-match i { font-style: normal; color: var(--tx3); }
.g9s-pick-when { font-size: 10.5px; color: var(--tx3); }
.g9s-live { font-style: normal; color: #fff; background: var(--r); padding: 0 5px; border-radius: 3px; font-weight: 800; }
.g9s-odd { padding: 6px 10px; border-radius: 9px; background: #0b0b0d; border: 1px solid #2c2c33; font-size: 15px; font-weight: 800; color: var(--tx); white-space: nowrap; }
.g9s-odd.up { color: #34d399; } .g9s-odd.down { color: #ff6b6b; }
.g9s-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--tx3); }
.g9s-x .ic { width: 14px; height: 14px; }
.g9s-receipt { position: relative; margin-top: 10px; padding: 12px; border-radius: 14px; background: #16161a; border: 1px solid #222228; }
.g9s-receipt::before { content: ''; position: absolute; left: 12px; right: 12px; top: -1px; border-top: 2px dashed #2c2c33; }
.g9s-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--tx2); margin-bottom: 10px; }
.g9s-line b { color: var(--tx); font-size: 15px; }
.g9s-stake { display: block; }
.g9s-stake > span { display: block; font-size: 11px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 5px; }
.g9s-stake > div { display: flex; align-items: center; height: 50px; padding: 0 12px; border-radius: 12px; background: #0b0b0d; border: 1px solid #2c2c33; }
.g9s-stake > div:focus-within { border-color: var(--r); box-shadow: 0 0 0 3px rgba(227, 22, 28, .18); }
.g9s-stake em { font-style: normal; color: var(--tx3); font-size: 15px; font-weight: 700; margin-right: 6px; }
.g9s-stake input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--tx); font-size: 22px; font-weight: 800; text-align: right; }
.g9s-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 12px; }
.g9s-quick button { height: 32px; border-radius: 9px; background: #1d1d22; color: var(--tx2); font-size: 12px; font-weight: 700; }
.g9s-win { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(245, 197, 24, .14), rgba(245, 197, 24, .04)); border: 1px solid rgba(245, 197, 24, .3); }
.g9s-win span { font-size: 12px; color: #e9d38a; font-weight: 700; }
.g9s-win b { font-size: 19px; font-weight: 900; color: var(--gold); }
.g9s-accept { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--tx2); }
.g9s-accept input { display: none; }
.g9s-accept i { width: 32px; height: 18px; border-radius: 9px; background: #2a2a31; position: relative; flex: none; transition: background .15s; }
.g9s-accept i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.g9s-accept input:checked + i { background: var(--r); }
.g9s-accept input:checked + i::after { left: 16px; }
.g9s-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin-top: 12px; padding: 10px 0 calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(15, 15, 18, 0), #0f0f12 30%); }
.g9s-book { height: 50px; border-radius: 14px; border: 1px solid #33333a; color: var(--tx); font-weight: 800; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.g9s-book .ic { width: 16px; height: 16px; }
.g9s-place { height: 50px; border-radius: 14px; background: linear-gradient(180deg, #ff2a2f, #c80f14); color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .3px; box-shadow: 0 10px 22px -10px rgba(227, 22, 28, .9); padding: 0 18px; }
.g9s-place:disabled { opacity: .6; }
.g9s-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 10px; }
.g9s-empty-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(227, 22, 28, .14); color: var(--r2); }
.g9s-empty-ic .ic { width: 26px; height: 26px; }
.g9s-empty h4 { margin: 4px 0 0; font-size: 15px; }
.g9s-empty p { margin: 0 0 8px; color: var(--tx3); font-size: 12.5px; }
[data-theme="light"] .g9s { background: #ffffff !important; border-top-color: #e6e6eb; }
[data-theme="light"] .g9s-mode, [data-theme="light"] .g9s-close, [data-theme="light"] .g9s-code-links button, [data-theme="light"] .g9s-quick button { background: #f2f2f5; border-color: #e6e6eb; }
[data-theme="light"] .g9s-bal, [data-theme="light"] .g9s-code, [data-theme="light"] .g9s-pick, [data-theme="light"] .g9s-receipt { background: #f8f8fa; border-color: #e9e9ee; }
[data-theme="light"] .g9s-code-row, [data-theme="light"] .g9s-odd, [data-theme="light"] .g9s-stake > div { background: #ffffff; border-color: #e3e3e8; }
[data-theme="light"] .g9s-code-links button.on { color: #a30d12; }
[data-theme="light"] .g9s-receipt::before { border-top-color: #e3e3e8; }
[data-theme="light"] .g9s-win span { color: #8a6d00; } [data-theme="light"] .g9s-win b { color: #b38600; }
[data-theme="light"] .g9s-actions { background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 30%); }
[data-theme="light"] .g9s-book { border-color: #d6d6dc; }
[data-theme="light"] .g9s-accept i { background: #d6d6dc; }
[data-theme="light"] .g9s-grab { background: #d6d6dc; }
.g9s-title, .g9s-empty h4, .g9s-type span, .g9s-pick-name { color: var(--tx) !important; }
.g9s-win b, #slip-win { color: var(--gold) !important; }
[data-theme="light"] .g9s-win b, [data-theme="light"] #slip-win { color: #b38600 !important; }
.g9s-actions { position: static; background: none; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

/* ================= account, wallet, payments, KYC, My Bets, ticket (BetGr9 layer) ================= */
/* cards: square 14px, hairline border, no glow */
.card, .md-card, .tk-card, .tx, .bet.card, .kyc-note, .success-box { border-radius: 14px; background: var(--bg2) !important; border: 1px solid var(--line); box-shadow: none; }
.list-title, .plain-label { font-family: var(--head-font); font-size: 15px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--tx); margin: 14px 0 8px; }
/* inputs: flat 10px boxes with the label on top */
.ofield { margin-bottom: 12px; }
.ofield-label { position: static !important; display: block; transform: none !important; padding: 0 !important; margin: 0 0 5px; background: none !important; font-size: 11px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .6px; }
.ofield-box, .phone-box { height: 48px; border-radius: 10px !important; border: 1px solid #2c2c33 !important; background: #0b0b0d !important; }
.ofield-box:focus-within, .phone-box:focus-within { border-color: var(--r) !important; box-shadow: 0 0 0 3px rgba(227, 22, 28, .18); }
/* buttons */
.btn { border-radius: 12px; }
.btn.lg, .btn.block { height: 48px; }
.btn-green, .btn-brand, .bwk-cta { background: linear-gradient(180deg, #ff2a2f, #c80f14) !important; color: #fff !important; box-shadow: 0 10px 22px -12px rgba(227, 22, 28, .9); }
.btn-dark { background: var(--bg3); color: var(--tx); border: 1px solid var(--line); }
.btn-outline-green { border: 1px solid var(--r); color: var(--r2); background: transparent; }
.btn-gold { background: linear-gradient(180deg, #ffd34d, #e0a400) !important; color: #2a1f00 !important; border-radius: 12px; }
/* method chips / quick amounts */
.method, .chip, .quick-stakes button { border-radius: 10px !important; border: 1px solid var(--line) !important; background: var(--bg3) !important; color: var(--tx2) !important; }
.method.on, .chip.on { border-color: var(--r) !important; color: #fff !important; background: rgba(227, 22, 28, .18) !important; }
/* balance card on wallet / deposit / withdraw: black card with a red edge and the BG mark */
.wallet-card { position: relative; overflow: hidden; border-radius: 18px !important; background: linear-gradient(135deg, #1a0405 0%, #0b0b0d 60%) !important; border: 1px solid #3a1214; box-shadow: none !important; }
.wallet-card::after { content: ''; position: absolute; right: -20px; top: -10px; width: 140px; height: 90px; background: url(/assets/mark.png) center/contain no-repeat; opacity: .12; }
.wallet-card small { color: #e8b7b8 !important; text-transform: uppercase; font-size: 10px; letter-spacing: .8px; }
.wallet-card b { font-family: var(--head-font); font-size: 30px !important; letter-spacing: .3px; }
/* transactions */
.tx { padding: 10px 12px; margin-bottom: 6px; }
.tx-ic { border-radius: 10px !important; background: var(--bg3) !important; }
.tx-ic.in { color: var(--gold) !important; } .tx-ic.out { color: var(--tx2) !important; }
.tx-amt .green, .tx-amt b.green { color: var(--gold) !important; }
/* segmented tabs (My Bets, transactions filter) */
.seg { display: grid; grid-auto-flow: column; gap: 4px; margin: 10px; padding: 4px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.seg button { height: 34px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--tx3); background: none; border: 0; }
.seg button.on { background: var(--r); color: #fff; }
.seg button.on::after { display: none; }
/* open bets */
.bet.card { padding: 0; overflow: hidden; margin-bottom: 10px; }
.bet-head, .bet-bar { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bet-sub { padding: 6px 12px; }
.bet-sel { padding: 8px 12px; border-top: 1px solid var(--line); }
.bet-foot { padding: 10px 12px; border-top: 1px dashed #2c2c33; background: var(--bg3); }
.bet-foot b.green { color: var(--gold) !important; }
.bet .btn { margin: 0 12px 12px; width: calc(100% - 24px); }
.hb { padding: 0 !important; overflow: hidden; }
.hb-bar { padding: 10px 12px !important; }
.hb-row, .hb-games { padding-left: 12px !important; padding-right: 12px !important; }
.hb-date b { font-family: var(--head-font); color: var(--tx); }
/* ticket */
.tk-card { padding: 14px; }
.tk-return b { font-family: var(--head-font); font-size: 28px !important; }
.tk-leg { border-radius: 12px; }
/* account drawer */
.md-panel { background: var(--bg1) !important; }
.md-bal { border-radius: 18px !important; background: linear-gradient(135deg, #2a0507 0%, #0d0d10 70%) !important; border: 1px solid #3a1214 !important; }
.md-dep { background: linear-gradient(180deg, #ff2a2f, #c80f14) !important; }
.md-row .ic:first-child { color: var(--r2) !important; }
/* KYC & payment overlays */
.pw-card { border-radius: 20px !important; background: var(--bg2) !important; border: 1px solid var(--line) !important; }
.bwk-fee { background: linear-gradient(150deg, #3a0709, #0e0e10 70%) !important; border-color: #3a1214 !important; }
.bwk-bar i.done, .bwk-bar i.on { background: var(--r) !important; }
.bwk-prog-top small { color: var(--r2) !important; }
.bwk-list b, .bwk-ring { color: var(--r2) !important; }
/* help / support */
details.faq, .faq details, .help details { border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); margin-bottom: 6px; padding: 10px 12px; }

/* light theme for this layer */
[data-theme="light"] .ofield-box, [data-theme="light"] .phone-box { background: #f6f6f8 !important; border-color: #e3e3e8 !important; }
[data-theme="light"] .wallet-card { background: linear-gradient(135deg, #2a0507, #6b0a0e) !important; color: #fff; }
[data-theme="light"] .md-bal { background: linear-gradient(135deg, #2a0507, #6b0a0e) !important; }
[data-theme="light"] .bet-foot { background: #f6f6f8; }
[data-theme="light"] .btn-dark { background: #f1f1f4; color: #17171b; }
[data-theme="light"] .bwk-fee { background: linear-gradient(150deg, #3a0709, #6b0a0e) !important; color: #fff; }

/* ================= casino lobby + games ================= */
.g9-cas { padding: 10px 0 6px; }
.g9-cas-hero { position: relative; display: flex; align-items: center; min-height: 180px; margin: 0 12px; padding: 16px; border-radius: 20px; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, #7a080c 0%, #2a0405 45%, #0b0b0d 100%); border: 1px solid #3a1214; }
.g9-cas-art { position: absolute; right: -10px; top: 20px; width: 58%; transform: rotate(-6deg); filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); }
.g9-cas-jet { width: 100%; }
.g9-cas-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; max-width: 58%; }
.g9-cas-txt > b { font-family: var(--head-font); font-size: 28px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.g9-cas-txt small { font-size: 12px; color: #e8c0c1; line-height: 1.4; }
.g9-cas-live { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 10.5px; font-style: normal; font-weight: 700; }
.g9-cas-live b { width: 6px; height: 6px; border-radius: 50%; background: var(--r2); animation: g9-blink 1s steps(2) infinite; }
.g9-cas-btn { align-self: flex-start; margin-top: 4px; padding: 8px 18px; border-radius: 10px; background: #fff; color: #17171b; font-size: 12.5px; font-weight: 900; text-transform: uppercase; }
.g9-cas .g9-h { margin-top: 16px; }
.g9-cas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; }
.g9-cas-note { display: flex; gap: 6px; margin: 14px 12px 4px; color: var(--tx3); font-size: 11px; line-height: 1.5; }
.g9-cas-note .ic { width: 14px; height: 14px; flex: none; color: var(--r2); }
/* game pages: BetGr9 accent */
.jp-go:not(.cash):not(.cancel):not(.won) { background: linear-gradient(180deg, #ff2a2f, #c80f14); color: #fff; }
.jp, .jet-bets, .mn-ctl, .mn-info > div, .dc-info > div, .dc-result, .mn-board { border-radius: 14px; background: var(--bg2) !important; border: 1px solid var(--line); }
.jet-stage { border-radius: 18px; background: radial-gradient(110% 90% at 15% 100%, rgba(227, 22, 28, .25), transparent 60%), #0b0b0d !important; border-color: #2a1517; }
.mn-ch button.on, .dc-side button.on { background: var(--r) !important; color: #fff !important; }
.dc-fill { background: var(--r) !important; }
.g9-cas-grid .g9-game { width: 100%; min-height: 170px; }
.bwk-fee > p, .bwk-how li { color: #e9e2e2 !important; }
.bwk-fee-top span { color: #f1c9ca !important; }
