:root {
  --bg: #090916;
  --panel: #111126;
  --panel-2: #191936;
  --line: #2a2a52;
  --text: #fff;
  --muted: #8f8fb8;
  --pink: #ff2d78;
  --purple: #7b2ff7;
  --gold: #ffb71b;
  --green: #2bd67b;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--gold); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

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

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: #0c0c1c; border-right: 1px solid #17172f;
  padding: 14px 12px; display: flex; flex-direction: column; gap: 12px;
}
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-inline { display: inline-grid; width: 190px; margin-bottom: 12px; }
.seg-btn { padding: 7px 0; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--purple); }
.seg-btn.active { background: var(--pink); color: #fff; box-shadow: 0 4px 14px #ff2d7866; }
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 10px; padding: 0 10px; color: var(--muted); }
.search-ico { width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 50%; position: relative; flex: none; }
.search-ico::after { content: ""; position: absolute; width: 2px; height: 6px; background: currentColor; right: -4px; bottom: -6px; transform: rotate(-45deg); border-radius: 2px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); padding: 9px 0; font: inherit; }

.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px;
  background: linear-gradient(100deg, #24245a, #3b1c7a); border: 1px solid #3d3d8a;
}
.user-chip .avatar { flex: none; }
.user-chip b { display: block; font-size: 13px; }
.user-chip small { color: var(--gold); font-weight: 700; }
.user-chip.guest { cursor: pointer; }

.nav { display: flex; flex-direction: column; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.nav a i { width: 18px; height: 18px; display: grid; place-items: center; }
.nav a:hover, .nav a.active { color: #fff; background: #ffffff0a; }
.nav a.active { box-shadow: inset -3px 0 0 var(--purple); }
.dot { margin-left: auto; background: var(--purple); color: #fff; font-size: 10px; border-radius: 99px; padding: 1px 6px; }

.rooms { display: grid; gap: 7px; }
.room { display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 9px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: 12px; }
.room:hover { border-color: var(--purple); }
.room small { display: block; color: var(--muted); font-weight: 500; }
.room small b { color: var(--gold); }
.room-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #2b2b63; }
.room-ico .ic { width: 15px; height: 15px; }
.s-dark { color: #dcdcff; } .s-red { color: var(--pink); }
.tournament { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: 12px; }
.tournament > .ic { color: var(--gold); }
.tournament span { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #3a2800; font-size: 9px; }

/* ---------- Top bar ---------- */
.main { min-width: 0; padding: 0 22px 30px; display: flex; flex-direction: column; gap: 28px; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  margin: 0 -22px; padding: 12px 22px; background: #090916e6; backdrop-filter: blur(10px); border-bottom: 1px solid #17172f;
}
.logo { font-size: 20px; font-weight: 900; font-style: italic; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--pink), var(--purple)); transform: skewX(-12deg); box-shadow: 0 0 18px #7b2ff7aa; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 6px 5px 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.balance .coin { color: var(--gold); display: grid; }
.balance button { width: 24px; height: 24px; border-radius: 50%; background: var(--purple); font-weight: 900; line-height: 1; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(135deg, var(--gold), var(--pink)); color: #2a0b1e; text-transform: uppercase; }
.link-btn { color: var(--muted); font-weight: 700; font-size: 12px; }
.link-btn:hover { color: #fff; }

.btn { padding: 9px 18px; border-radius: 10px; font-weight: 800; font-size: 13px; transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-pink { background: linear-gradient(180deg, #ff4d8f, var(--pink)); box-shadow: 0 6px 20px #ff2d7855, inset 0 -2px 0 #c2185b; }
.btn-ghost { background: var(--panel-2); border: 1px solid var(--line); }
.btn-lg { padding: 13px 40px; font-size: 15px; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; min-height: 300px; margin: 0 -22px; padding: 40px 22px;
  display: flex; align-items: center; margin-top: -28px;
  background: radial-gradient(900px 400px at 75% 40%, #6d28d955, transparent 70%), linear-gradient(120deg, #101030 10%, #1b1050 55%, #3a1470);
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 11px; }
.hero h1 { margin: 0 0 22px; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.05; font-weight: 900; text-transform: uppercase; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #090916f2 0%, #090916a6 32%, #09091600 62%); }

.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-xl { width: 54px; height: 54px; stroke-width: 1.4; }
.ic-check { color: var(--green); } .ic-cross, .ic-clock { color: var(--muted); } .ic-wallet, .ic-alert { color: var(--gold); }

/* ---------- Sections ---------- */
.section-title { margin: 0 0 14px; font-size: 17px; font-weight: 800; text-transform: uppercase; }
.section-title::after { content: ""; display: block; width: 54px; height: 3px; margin-top: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff 60%, var(--purple) 60%); }

.g-purple { background: linear-gradient(135deg, #5b21d6, #9333ea 55%, #c026d3); }
.g-pink   { background: linear-gradient(135deg, #7c3aed, #ec4899 60%, #f59e0b); }
.g-green  { background: linear-gradient(135deg, #2563eb, #22c55e 55%, #eab308); }
.g-indigo { background: linear-gradient(135deg, #312e81, #4f46e5 60%, #7c3aed); }
.g-blue   { background: linear-gradient(135deg, #1d4ed8, #06b6d4); }
.g-orange { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.g-red    { background: linear-gradient(135deg, #f43f5e, #b91c1c); }
.g-orange em { color: #4a1d00; }
.g-sunset { background: linear-gradient(135deg, #6d28d9, #db2777 55%, #f97316); }

.tile, .promo {
  position: relative; overflow: hidden; text-align: left; border-radius: var(--radius); padding: 14px;
  min-height: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
.tile:hover, .promo:hover, .game:hover, .vip-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px #0008; }
.tile-title { font-weight: 900; text-transform: uppercase; font-size: 13px; line-height: 1.1; position: relative; z-index: 1; }
.tile-title em { display: block; }
.tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.tile-bg-center { object-position: center 38%; }
.tile::after, .promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b0b2099 0%, #0b0b2040 40%, transparent 70%); pointer-events: none; }
.tile > span, .promo > span { position: relative; z-index: 1; text-shadow: 0 1px 6px #0007; }
.tile-sm { width: 100%; min-height: 110px; }
.pill { position: relative; z-index: 1; background: #0b0b20; border-radius: 99px; padding: 5px 12px; font-size: 10px; font-weight: 800; }

.cat-grid { display: grid; gap: 10px; grid-template-columns: 1.15fr 1fr 1fr 1fr 1.15fr; grid-template-rows: 96px 96px; }
.cat-grid > :nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
.cat-grid > :nth-child(2) { grid-area: 1 / 2 / 2 / 4; }
.cat-grid > :nth-child(3) { grid-area: 1 / 4 / 2 / 5; }
.cat-grid > :nth-child(4) { grid-area: 1 / 5 / 3 / 6; }

.games { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.game { position: relative; height: 164px; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 12px 8px; transition: transform .15s, box-shadow .15s; }
.game-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #0b0b20d9); }
.game b { z-index: 1; position: relative; font-size: 16px; font-weight: 900; text-align: center; line-height: 1.05; text-shadow: 0 2px 0 #0006, 0 0 12px #0008; }

.promos { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; }
.promo { min-height: 190px; padding: 22px; }
.promo-kicker { font-size: 9px; letter-spacing: .35em; text-transform: uppercase; opacity: .8; }
.promo-title { font-size: 21px; font-weight: 900; text-transform: uppercase; line-height: 1.15; flex: 1; position: relative; z-index: 1; }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px 14px; overflow-x: auto; }
.bets { width: 100%; border-collapse: separate; border-spacing: 0 6px; min-width: 620px; font-variant-numeric: tabular-nums; }
.bets th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 600; padding: 8px 12px; }
.bets td { background: var(--panel-2); padding: 9px 12px; font-weight: 700; font-size: 12px; }
.bets td:first-child { border-radius: 9px 0 0 9px; } .bets td:last-child { border-radius: 0 9px 9px 0; }
.bets .num { text-align: right; }
.bets .ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; margin-right: 8px; overflow: hidden; vertical-align: middle; }
.bets .ico img { width: 100%; height: 100%; object-fit: cover; }
.bets .ico-user { border-radius: 50%; background: linear-gradient(135deg, #4f46e5, #9333ea); font-size: 11px; text-transform: uppercase; }
.bets .win { color: var(--gold); } .bets .lose { color: var(--muted); }
.bets tr.new td { animation: flash .8s; }
@keyframes flash { from { background: #3b2a7a; } }

.vip-title { text-align: center; text-transform: uppercase; font-size: 22px; font-weight: 900; margin: 0 0 16px; }
.vip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.vip-card { position: relative; height: 230px; border-radius: 16px; border: 1px solid #3b5bdb88; overflow: hidden; background: linear-gradient(180deg, #23237a, #3a1d8a 60%, #6d28d9); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 14px; transition: transform .15s, box-shadow .15s; }
.vip-card.locked { filter: saturate(.45) brightness(.75); }
.vip-card .cup { position: absolute; top: 34px; color: var(--gold); filter: drop-shadow(0 8px 14px #0008); }
.vip-card .cup .ic { width: 92px; height: 92px; stroke-width: 1.1; }
.cup.tier-1 { color: #d08a4e; } .cup.tier-2 { color: #cfd6e6; } .cup.tier-3 { color: var(--gold); } .cup.tier-4 { color: #9fe3f0; } .cup.tier-5 { color: #d7b6ff; }
.vip-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.vip-card::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, #0d0a2ee6 70%); }
.vip-card .name, .vip-card .lvl { z-index: 1; }
.vip-card .name, .vip-card .lvl { position: relative; text-shadow: 0 2px 8px #000a; }
.vip-card .name { font-size: 11px; color: #c9c9f5; text-transform: uppercase; letter-spacing: .15em; }
.vip-card .lvl { font-size: 24px; font-weight: 900; -webkit-text-stroke: 1px #fff; color: transparent; }
.vip-card .lvl em { -webkit-text-stroke: 0; }
.vip-card::before { content: ""; z-index: 1; position: absolute; left: 0; right: 0; bottom: 62px; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.footer { border-top: 1px solid #17172f; padding-top: 18px; color: var(--muted); font-size: 12px; }
.footer p { margin: 0 0 6px; }

/* ---------- Modals ---------- */
.modal { max-height: 94dvh; overflow-y: auto; width: min(420px, 94vw); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); padding: 24px; box-shadow: 0 30px 80px #000c; }
.modal-wide { width: min(520px, 94vw); }
.modal::backdrop { background: #05050fcc; backdrop-filter: blur(4px); }
.modal-x { position: absolute; right: 14px; top: 10px; font-size: 24px; color: var(--muted); }
.modal-title { margin: 0 0 14px; font-size: 18px; font-weight: 900; text-transform: uppercase; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel-2); border-radius: 10px; padding: 3px; margin-bottom: 18px; }
.tab { padding: 9px; border-radius: 8px; font-weight: 800; color: var(--muted); }
.tab.active { background: var(--purple); color: #fff; }

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.form input:not([type=checkbox]), .form select, .amount-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--text); font: inherit; font-size: 15px;
}
.form input:focus, .form select:focus, .amount-input:focus { outline: 0; border-color: var(--purple); }
.form select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form input[type=date] { min-height: 46px; -webkit-appearance: none; appearance: none; }
.form-step { display: grid; gap: 12px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.steps i { height: 4px; border-radius: 4px; background: var(--line); transition: background .2s; }
.steps i.on { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.step-label { margin: 0; }
.form-actions { display: flex; gap: 10px; }
.form-actions .btn-ghost { padding: 13px 20px; font-size: 15px; }
.form .check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form-error { margin: 0; color: #ff6b8e; font-size: 13px; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }

.label { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.methods { display: grid; gap: 8px; margin-bottom: 18px; }
.method { display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 12px; border-radius: 12px; background: var(--panel-2); border: 1.5px solid var(--line); }
.method.active { border-color: var(--pink); background: #2a1640; }
.method-ico { color: #c9b8ff; width: 78px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; background: #0b0b20; flex: none; }
.pay { display: block; height: 26px; width: 26px; }
.pay-rampay { height: 32px; width: 32px; }
.pay-visa, .pay-mastercard { width: 32px; height: 22px; padding: 4px 5px; border-radius: 5px; background: #fff; object-fit: contain; }
.method b { display: block; font-size: 14px; }
.method small { color: var(--muted); }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.amounts button { padding: 10px 0; border-radius: 10px; background: var(--panel-2); border: 1.5px solid var(--line); font-weight: 800; }
.amounts button.active { border-color: var(--gold); color: var(--gold); }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 14px; }

.history { display: grid; gap: 8px; max-height: 380px; overflow-y: auto; }
.history-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 12px; background: var(--panel-2); border-radius: 12px; }
.history-row b { font-variant-numeric: tabular-nums; }
.history-row small { color: var(--muted); }
.history-row .actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.history-row .actions button { padding: 6px 12px; font-size: 12px; }
.st { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; align-self: start; }
.st-ok { background: #2bd67b22; color: var(--green); }
.st-wait { background: #ffb71b22; color: var(--gold); }
.st-bad { background: #ffffff12; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

.status { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 8px 0; }
.status h3 { margin: 0; font-size: 19px; }
.status p { margin: 0; color: var(--muted); }
.status-icon { height: 60px; display: grid; place-items: center; }
.status-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--pink); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: 10px; padding: 11px 16px; font-weight: 700; box-shadow: 0 10px 30px #0009; animation: rise .25s; max-width: 320px; }
.toast.ok { border-left-color: var(--green); } .toast.err { border-left-color: var(--pink); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Mobile chrome (hidden on desktop) ---------- */
.scrim, .tabbar, .chip-out { display: none; }
section { scroll-margin-top: 70px; }
html { -webkit-text-size-adjust: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cat-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 104px; }
  .cat-grid > * { grid-area: auto !important; }
  .promos { grid-template-columns: 1fr 1fr; }
  .promo-wide { grid-column: 1 / -1; }
  .vip { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 160px; overflow-x: auto; padding-bottom: 8px; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .main { padding: 0 14px calc(92px + env(safe-area-inset-bottom)); gap: 26px; }
  .topbar, .hero { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; gap: 8px; }
  .topbar-right { gap: 8px; }
  .logo { font-size: 17px; }
  .hide-sm { display: none; }

  /* Drawer */
  .sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; height: 100dvh; width: min(84vw, 300px);
    padding: calc(16px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
    transform: translateX(-102%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
  }
  .sidebar.open { transform: none; visibility: visible; box-shadow: 20px 0 60px #000a; }
  .sidebar.open ~ .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: #05050fb3; backdrop-filter: blur(3px); }
  body:has(.sidebar.open) { overflow: hidden; }
  .nav a { padding: 12px 10px; font-size: 14px; }
  .seg-btn { padding: 10px 0; font-size: 13px; }
  .search input { font-size: 16px; padding: 11px 0; }
  .user-chip { padding: 11px 12px; }
  .chip-out { display: block; margin-left: auto; padding: 8px 4px; }

  /* Bottom tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: #0c0c1cf0; backdrop-filter: blur(16px); border-top: 1px solid #22224a;
  }
  .tabbar > * { display: grid; justify-items: center; gap: 3px; padding: 6px 0 2px; min-height: 46px; font-size: 10px; font-weight: 700; color: var(--muted); }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar .active { color: #fff; }
  .tabbar .active .ic { color: var(--pink); }
  .tb-cta { color: #fff !important; }
  .tb-cta span {
    width: 50px; height: 50px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(180deg, #ff5a98, var(--pink)); border: 4px solid #0c0c1c; box-shadow: 0 6px 22px #ff2d7880;
  }
  .tb-cta .ic { stroke-width: 2.4; }
  .toasts { left: 14px; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); justify-items: center; }

  /* Edge-to-edge swipe rows */
  .games, .vip {
    margin: 0 -14px; padding: 0 14px 4px; scroll-padding: 0 14px;
    scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .games::-webkit-scrollbar, .vip::-webkit-scrollbar { display: none; }
  .games > *, .vip > * { scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .btn { padding: 10px 14px; }
  .btn-lg { padding: 14px 34px; font-size: 15px; }

  .hero { min-height: 250px; padding-top: 30px; padding-bottom: 30px; align-items: flex-end; }
  .hero h1 { font-size: 30px; margin-bottom: 16px; }
  .hero-img { object-position: 72% center; }
  .hero::after { background: linear-gradient(90deg, #090916f5 0%, #090916bf 45%, #09091626 100%), linear-gradient(0deg, #090916 0%, transparent 35%); }

  .section-title { font-size: 16px; }
  .cat-grid { grid-auto-rows: minmax(112px, auto); gap: 10px; }
  .cat-grid > :first-child { grid-column: 1 / -1 !important; min-height: 136px; }
  .cat-grid > :first-child .tile-title { font-size: 17px; }
  .tile { padding: 13px; }
  .pill { padding: 7px 13px; font-size: 11px; }

  .games { grid-auto-columns: 37vw; gap: 10px; }
  .game { height: 46vw; }
  .game b { font-size: 15px; }

  .promos { gap: 10px; }
  .promo { min-height: 168px; padding: 16px; }
  .promo-wide { min-height: 184px; padding: 20px; }
  .promo-title { font-size: 18px; }
  .promo-wide .promo-title { font-size: 21px; }

  /* Bets table: game · user · multiplier · payout, no sideways scroll */
  .table-wrap { padding: 2px 8px 8px; overflow: visible; }
  .bets { min-width: 0; table-layout: fixed; }
  .bets th:nth-child(2), .bets td:nth-child(2), .bets th:nth-child(4), .bets td:nth-child(4) { display: none; }
  .bets th:nth-child(1) { width: 35%; } .bets th:nth-child(3) { width: 24%; } .bets th:nth-child(5) { width: 17%; }
  .bets td:last-child { text-overflow: clip; }
  .bets th, .bets td { padding: 9px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bets th:nth-child(5) { font-size: 0; } .bets th:nth-child(5)::after { content: "Multi"; font-size: 11px; }
  .bets .ico { margin-right: 6px; }
  .bets .ico-user { display: none; }
  .seg-inline { width: 100%; display: grid; }

  .vip { grid-auto-columns: 40vw; gap: 10px; }
  .vip-card { height: 210px; }
  .footer { text-align: center; }

  /* Modals become bottom sheets */
  .modal, .modal-wide {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh; overflow-y: auto;
    border-radius: 22px 22px 0 0; border-width: 1px 0 0;
    padding: 26px 16px calc(20px + env(safe-area-inset-bottom));
  }
  .modal[open] { animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .modal::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
  .modal-x { width: 44px; height: 44px; right: 6px; top: 6px; }
  .tab { padding: 12px; }
  #authModal, #statusModal { padding-top: 54px; }
  .method:not(.active) small { display: none; }
  .methods { margin-bottom: 14px; }
  .form input:not([type=checkbox]), .form select, .amount-input { font-size: 16px; padding: 14px 12px; }
  .form input[type=date] { min-height: 52px; }
  .form .check input { width: 20px; height: 20px; flex: none; }
  .amounts button { padding: 13px 0; }
  .method { padding: 12px; }
  .history { max-height: 52dvh; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 370px) {
  .logo-mark { display: none; }
  .logo { font-size: 15px; }
  .hero h1 { font-size: 26px; }
}
@media (hover: none) {
  .tile:hover, .promo:hover, .game:hover, .vip-card:hover, .btn:hover { transform: none; box-shadow: none; filter: none; }
  .btn-pink:hover { box-shadow: 0 6px 20px #ff2d7855, inset 0 -2px 0 #c2185b; }
  .tile:active, .promo:active, .game:active, .btn:active { transform: scale(.97); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
