/* TelBet Mini App — colours from the TelBet diamond logo */
:root, :root[data-theme="dark"] {
  --bg: #0d141c; --bg2: #121c26; --card: #18232e; --card2: #1f2c39; --line: #2a3a4a;
  --text: #e9f2f9; --muted: #8ea3b6; --brand: #42abde; --brand2: #1d7fd0; --brand-glow: rgba(66,171,222,.35);
  --win: #22c55e; --lose: #ef4444; --gold: #f5b301; --warn: #f59e0b; --chip: #243444;
  --shadow: 0 8px 24px rgba(0,0,0,.35); --radius: 14px;
}
:root[data-theme="light"] {
  --bg: #eef4f9; --bg2: #e3ecf4; --card: #ffffff; --card2: #f3f7fb; --line: #d6e1eb;
  --text: #0f1b26; --muted: #5d7387; --brand: #1d8fd0; --brand2: #1569b0; --brand-glow: rgba(29,143,208,.25);
  --chip: #e2ebf3; --shadow: 0 6px 18px rgba(15,27,38,.12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 Vazirmatn, Vazir, Tahoma, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.win { color: var(--win); } .lose { color: var(--lose); } .gold { color: var(--gold); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ---------- shell */
#app { padding: 64px 12px 84px; max-width: 720px; margin: 0 auto; }
header.top { position: fixed; inset: 0 0 auto 0; height: 56px; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .logo { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 14px var(--brand-glow); }
header.top .brand { font-weight: 800; letter-spacing: .3px; direction: ltr; }
header.top .brand b { color: var(--brand); }
.balance-pill { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 700; cursor: pointer; }
.balance-pill .plus { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 16px; line-height: 1; }
.balance-pill.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.12); } }
nav.tabs { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--bg2) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
nav.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; padding: 4px 0; position: relative; }
nav.tabs a .ic { font-size: 21px; line-height: 1; filter: grayscale(.4); transition: transform .2s; }
nav.tabs a.on { color: var(--brand); }
nav.tabs a.on .ic { filter: none; transform: translateY(-2px) scale(1.08); }
nav.tabs .badge { position: absolute; top: 0; inset-inline-end: 22%; background: var(--lose); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; }

/* ---------- cards / buttons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card + .card { margin-top: 10px; }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 8px; font-weight: 800; font-size: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 11px 16px;
  background: var(--card2); color: var(--text); font-weight: 700; cursor: pointer; transition: transform .08s, filter .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; box-shadow: 0 6px 18px var(--brand-glow); }
.btn.success { background: linear-gradient(135deg, #2bd46b, #15a34a); color: #fff; box-shadow: 0 6px 18px rgba(34,197,94,.3); }
.btn.danger { background: linear-gradient(135deg, #f15b5b, #c62828); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.big { padding: 15px; font-size: 17px; border-radius: 14px; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--chip); border: 1px solid transparent; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.on { background: color-mix(in srgb, var(--brand) 22%, var(--chip)); border-color: var(--brand); color: var(--brand); }
input.inp, select.inp, textarea.inp { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; outline: none; }
input.inp:focus, textarea.inp:focus { border-color: var(--brand); }
.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-weight: 800; flex: none; overflow: hidden; color: var(--brand); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; border: 2px solid var(--brand); box-shadow: 0 0 18px var(--brand-glow); }
.progress { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #7fd3ff); border-radius: 99px; transition: width .6s; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--bg2); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 17px; }
.stat span { font-size: 12px; color: var(--muted); }
.tabs-inline { display: flex; background: var(--bg2); border-radius: 12px; padding: 4px; gap: 4px; }
.tabs-inline button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: 13px; }
.tabs-inline button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--chip); }
.pill.live { background: var(--lose); color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- toast / modal / sheet */
#toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); animation: tin .25s; font-weight: 600; }
.toast.ok { border-color: var(--win); } .toast.err { border-color: var(--lose); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 70; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; inset: auto 0 0 0; z-index: 71; max-height: 86vh; overflow: auto; background: var(--bg2); border-radius: 20px 20px 0 0;
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom)); animation: sup .25s cubic-bezier(.2,.8,.2,1); max-width: 720px; margin: 0 auto; }
.sheet .grab { width: 44px; height: 5px; background: var(--line); border-radius: 9px; margin: 2px auto 12px; }
@keyframes sup { from { transform: translateY(100%); } }

/* ---------- home / lobby */
.hero { position: relative; overflow: hidden; border-radius: 18px; padding: 18px; min-height: 140px;
  background: radial-gradient(120% 140% at 10% 0%, #1b5f8f 0%, #0d2236 55%, #081320 100%); color: #fff; box-shadow: var(--shadow); }
.hero .stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 60%, #fff6, transparent),
  radial-gradient(1.5px 1.5px at 40% 80%, #fff7, transparent), radial-gradient(1px 1px at 85% 20%, #fff9, transparent); animation: twinkle 6s infinite alternate; }
@keyframes twinkle { to { opacity: .4; } }
.hero h2 { margin: 0 0 4px; font-size: 20px; position: relative; }
.hero p { margin: 0; opacity: .85; position: relative; font-size: 13px; }
.hero .cta { position: relative; margin-top: 12px; }
.hero img.dia { position: absolute; inset-inline-end: -10px; bottom: -18px; width: 130px; opacity: .9; border-radius: 50%; filter: drop-shadow(0 0 24px #42abdeaa); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
.banners { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-top: 10px; }
.banners::-webkit-scrollbar { display: none; }
.banner { flex: 0 0 82%; scroll-snap-align: start; border-radius: 16px; padding: 14px; color: #fff; min-height: 92px; position: relative; overflow: hidden; }
.banner b { display: block; font-size: 16px; margin-bottom: 2px; }
.banner span { font-size: 13px; opacity: .9; }
.banner::after { content: ""; position: absolute; inset: auto -20px -40px auto; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.12); }
.ticker { margin-top: 10px; overflow: hidden; white-space: nowrap; border-radius: 12px; background: var(--card); border: 1px solid var(--line); padding: 8px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker .track { display: inline-block; padding-inline-start: 100%; animation: marquee 30s linear infinite; direction: ltr; }
.ticker .track span { margin: 0 18px; font-size: 13px; }
@keyframes marquee { to { transform: translateX(-100%); } }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.game-tile { position: relative; aspect-ratio: 1 / 1.12; border-radius: 16px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 8px; color: #fff; box-shadow: var(--shadow); transition: transform .15s; isolation: isolate; }
.game-tile:active { transform: scale(.96); }
.game-tile .gi { position: absolute; inset: 10% 0 auto 0; text-align: center; font-size: 42px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); transition: transform .3s; }
.game-tile:hover .gi { transform: scale(1.1) rotate(-4deg); }
.game-tile .gn { font-weight: 800; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.game-tile .gp { font-size: 10px; opacity: .9; display: flex; align-items: center; gap: 4px; }
.game-tile .gp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.game-tile .tag { position: absolute; top: 6px; inset-inline-start: 6px; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.35); }

/* ---------- game screen + bet panel */
.game-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.game-head .back { width: 36px; height: 36px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; }
.game-head h2 { margin: 0; font-size: 18px; }
.stage { position: relative; background: radial-gradient(110% 90% at 50% 0%, #15314a, #0b1520 70%); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); min-height: 220px; color: #fff; }
:root[data-theme="light"] .stage { background: radial-gradient(110% 90% at 50% 0%, #1d4f78, #0f2840 70%); }
.betpanel { margin-top: 10px; }
.amount-row { display: flex; gap: 6px; align-items: stretch; }
.amount-row input { flex: 1; text-align: center; font-weight: 800; font-size: 17px; direction: ltr; }
.amount-row .btn { padding: 8px 10px; min-width: 42px; }
.result-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.6); opacity: 0; padding: 12px 22px; border-radius: 16px;
  font-size: 24px; font-weight: 900; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); transition: all .35s cubic-bezier(.2,1.4,.4,1); pointer-events: none; z-index: 5; text-align: center; }
.result-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.result-banner.w { color: #4ade80; box-shadow: 0 0 40px rgba(74,222,128,.35); }
.result-banner.l { color: #f87171; }
.result-banner small { display: block; font-size: 13px; color: #fff; opacity: .8; font-weight: 600; }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* crash */
.crash-hist { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 8px; direction: ltr; }
.crash-hist::-webkit-scrollbar { display: none; }
.crash-hist span { flex: none; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: var(--card); }
.crash-hist .lo { color: var(--lose); } .crash-hist .hi { color: var(--win); } .crash-hist .mega { color: var(--gold); }
.crash-stage { height: 250px; }
.crash-stage canvas { width: 100%; height: 100%; display: block; }
.crash-mult { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; font-weight: 900; direction: ltr; pointer-events: none; text-shadow: 0 0 30px rgba(66,171,222,.5); }
.crash-mult.crashed { color: #f87171; text-shadow: 0 0 30px rgba(248,113,113,.6); }
.crash-mult small { display: block; font-size: 14px; opacity: .8; text-align: center; font-weight: 700; }
.crash-count { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 6px; background: rgba(255,255,255,.15); border-radius: 9px; overflow: hidden; }
.crash-count i { display: block; height: 100%; background: linear-gradient(90deg, #42abde, #a5e4ff); }
.bet-slots { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
@media (min-width: 560px) { .bet-slots { grid-template-columns: 1fr 1fr; } }
.slot-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.slot-card .auto { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; }
.slot-card .auto input { width: 80px; text-align: center; direction: ltr; padding: 6px; }
.players { width: 100%; border-collapse: collapse; font-size: 13px; }
.players td, .players th { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: start; }
.players th { color: var(--muted); font-weight: 600; font-size: 12px; }
.players tr.out td { color: var(--win); }
.chatbox { height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.chatmsg { background: var(--bg2); border-radius: 12px; padding: 6px 10px; max-width: 88%; }
.chatmsg b { font-size: 12px; color: var(--brand); }
.chatmsg.me { align-self: flex-end; background: color-mix(in srgb, var(--brand) 20%, var(--bg2)); }

/* cards (blackjack / hi-lo / poker) */
.pcard { width: 54px; height: 78px; border-radius: 9px; background: #fff; color: #111; display: inline-flex; flex-direction: column; justify-content: space-between;
  padding: 4px 6px; font-weight: 900; box-shadow: 0 6px 14px rgba(0,0,0,.35); position: relative; direction: ltr; animation: deal .35s cubic-bezier(.2,.9,.3,1.2) both; }
.pcard.red { color: #d61f2c; }
.pcard .s { font-size: 22px; text-align: center; line-height: 1; }
.pcard .r2 { transform: rotate(180deg); align-self: flex-end; }
.pcard.back { background: repeating-linear-gradient(45deg, #1d7fd0 0 6px, #42abde 6px 12px); border: 3px solid #fff; }
.pcard.big { width: 96px; height: 138px; font-size: 22px; } .pcard.big .s { font-size: 46px; }
@keyframes deal { from { opacity: 0; transform: translateY(-40px) rotate(-10deg) scale(.8); } }
.hand { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 80px; }

/* mines / tower */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 12px; }
.tile { aspect-ratio: 1; border-radius: 12px; border: 0; background: linear-gradient(160deg, #2b4a63, #1a2f42); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25);
  font-size: 26px; display: grid; place-items: center; cursor: pointer; transition: transform .15s; perspective: 400px; }
.tile:active { transform: scale(.94); }
.tile.gem { background: linear-gradient(160deg, #1fa5d8, #13608f); animation: flip .4s; }
.tile.bomb { background: linear-gradient(160deg, #e5484d, #8f1d21); animation: flip .4s, shake .4s .3s; }
.tile.dim { opacity: .45; animation: flip .4s; }
@keyframes flip { from { transform: rotateY(90deg); } }
.tower { display: flex; flex-direction: column-reverse; gap: 6px; padding: 12px; }
.floor { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 6px; align-items: center; opacity: .55; }
.floor.cur { opacity: 1; }
.floor.done { opacity: .9; }
.floor .fm { width: 54px; font-size: 12px; font-weight: 800; color: #9fd8ff; direction: ltr; }
.door { height: 42px; border-radius: 10px; border: 0; background: linear-gradient(160deg, #6b4b2a, #3d2a17); color: #fff; font-size: 20px; cursor: pointer; }
.floor.cur .door { box-shadow: 0 0 0 2px #42abde, 0 0 14px rgba(66,171,222,.5); }
.door.safe { background: linear-gradient(160deg, #1fa5d8, #13608f); } .door.trap { background: linear-gradient(160deg, #e5484d, #8f1d21); }

/* coin / dice / slot */
.coin3d { width: 130px; height: 130px; margin: 40px auto; position: relative; transform-style: preserve-3d; }
.coin3d .face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 56px; backface-visibility: hidden;
  background: radial-gradient(circle at 35% 30%, #ffe58a, #f5b301 60%, #b77b00); box-shadow: inset 0 0 0 6px #d99a00, 0 10px 30px rgba(0,0,0,.4); }
.coin3d .face.back { transform: rotateY(180deg); }
.coin3d.spin-heads { animation: coinH 1.6s cubic-bezier(.3,.1,.2,1) forwards; }
.coin3d.spin-tails { animation: coinT 1.6s cubic-bezier(.3,.1,.2,1) forwards; }
@keyframes coinH { from { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(1080deg) translateY(-60px); } to { transform: rotateY(2160deg); } }
@keyframes coinT { from { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(1080deg) translateY(-60px); } to { transform: rotateY(2340deg); } }
.dice-scene { width: 110px; height: 110px; margin: 50px auto; perspective: 600px; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 1.4s cubic-bezier(.2,.8,.25,1); }
.cube .f { position: absolute; inset: 0; background: #fff; border-radius: 16px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 14px; box-shadow: inset 0 0 12px rgba(0,0,0,.2); }
.cube .f i { width: 18px; height: 18px; border-radius: 50%; background: #1d2b3a; place-self: center; }
.reels { display: flex; justify-content: center; gap: 8px; padding: 30px 10px; }
.reel { width: 84px; height: 96px; overflow: hidden; border-radius: 14px; background: linear-gradient(#fff, #e8eef3 50%, #fff); box-shadow: inset 0 0 12px rgba(0,0,0,.35); position: relative; }
.reel .strip { position: absolute; left: 0; right: 0; top: 0; }
.reel .strip div { height: 96px; display: grid; place-items: center; font-size: 50px; }
.shot { height: 220px; position: relative; }
.shot .goal { position: absolute; font-size: 70px; top: 20px; left: 50%; transform: translateX(-50%); }
.shot .ball { position: absolute; font-size: 36px; bottom: 16px; left: 50%; transform: translateX(-50%); }

/* plinko / wheel / limbo / roulette */
.canvas-stage canvas { width: 100%; display: block; }
.bins { display: grid; gap: 3px; padding: 0 8px 10px; }
.bins div { text-align: center; font-size: 11px; font-weight: 800; padding: 5px 0; border-radius: 6px; color: #111; direction: ltr; transition: transform .2s; }
.bins div.hit { transform: translateY(5px) scale(1.08); box-shadow: 0 0 14px #fff8; }
.limbo-num { font-size: 64px; font-weight: 900; text-align: center; padding: 60px 0 10px; direction: ltr; transition: color .2s; }
.limbo-target { text-align: center; opacity: .8; padding-bottom: 30px; }
.wheel-wrap { position: relative; width: 260px; height: 260px; margin: 20px auto; }
.wheel-wrap canvas { width: 100%; height: 100%; }
.wheel-wrap .pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border: 12px solid transparent; border-top: 20px solid #fff; filter: drop-shadow(0 2px 4px #0008); z-index: 2; }
.rboard { display: grid; grid-template-columns: 34px repeat(12, 1fr); gap: 2px; direction: ltr; font-size: 11px; }
.rboard .c { position: relative; padding: 9px 0; text-align: center; border-radius: 5px; font-weight: 800; cursor: pointer; color: #fff; }
.rboard .r { background: #c62828; } .rboard .b { background: #1d2731; } .rboard .z { background: #15803d; grid-row: span 3; display: grid; place-items: center; }
.rboard .o { background: #29445c; grid-column: span 2; }
.rboard .dz { background: #29445c; grid-column: span 4; }
.chipmark { position: absolute; top: -6px; right: -4px; background: var(--gold); color: #111; border-radius: 999px; font-size: 9px; padding: 0 4px; border: 2px solid #fff; z-index: 2; }
.scratch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; position: relative; }
.scratch-grid div { aspect-ratio: 1; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 40px; }
.scratch-grid canvas { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); border-radius: 12px; touch-action: none; cursor: crosshair; }

/* poker */
.felt { background: radial-gradient(ellipse at center, #1a6b46 0%, #0f4a30 60%, #0a2f1f 100%); border-radius: 120px / 80px; padding: 18px 10px; border: 8px solid #4a2c17; box-shadow: inset 0 0 40px rgba(0,0,0,.5); }
.seat { text-align: center; color: #fff; }
.seat .nm { font-size: 13px; font-weight: 700; }
.seat.turn .avatar { box-shadow: 0 0 0 3px var(--gold), 0 0 18px var(--gold); }
.board { display: flex; gap: 5px; justify-content: center; min-height: 80px; margin: 12px 0; }
.pot { text-align: center; color: #ffe58a; font-weight: 800; }

/* sports */
.match { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.match .mh { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.match .teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; margin-bottom: 8px; cursor: pointer; }
.match .teams .t { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.match .teams .t.a { justify-content: flex-end; text-align: end; }
.match .teams img { width: 22px; height: 22px; object-fit: contain; }
.match .sc { font-weight: 900; font-size: 16px; direction: ltr; padding: 2px 8px; border-radius: 8px; background: var(--bg2); }
.odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.odds.two { grid-template-columns: repeat(2, 1fr); }
.odd { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 4px; text-align: center; cursor: pointer; transition: all .15s; }
.odd small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.odd b { direction: ltr; display: inline-block; }
.odd.on { background: color-mix(in srgb, var(--brand) 25%, var(--bg2)); border-color: var(--brand); }
.odd.on small { color: var(--brand); }
.odd.off { opacity: .4; pointer-events: none; }
.odd.up b { color: var(--win); } .odd.down b { color: var(--lose); }
.market { margin-top: 12px; }
.market h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.slip-fab { position: fixed; bottom: 78px; inset-inline-end: 14px; z-index: 40; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff;
  border-radius: 999px; padding: 10px 16px; font-weight: 800; box-shadow: 0 8px 22px var(--brand-glow); cursor: pointer; animation: tin .3s; }
.form-dots { display: inline-flex; gap: 3px; direction: ltr; }
.form-dots i { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; font-style: normal; display: grid; place-items: center; color: #fff; font-weight: 800; }
.form-dots .W { background: var(--win); } .form-dots .D { background: #64748b; } .form-dots .L { background: var(--lose); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
table.tbl td, table.tbl th { padding: 6px 3px; border-bottom: 1px solid var(--line); text-align: center; }
table.tbl td:nth-child(2) { text-align: start; }
table.tbl tr.me td { color: var(--brand); font-weight: 800; }

/* onboarding */
.tour-hole { position: fixed; z-index: 95; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(3,8,14,.78); transition: all .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.tour-tip { position: fixed; z-index: 96; left: 14px; right: 14px; max-width: 420px; margin: 0 auto; background: var(--card); border: 1px solid var(--brand);
  border-radius: 16px; padding: 14px; box-shadow: var(--shadow); animation: tin .3s; }
.tour-tip h4 { margin: 0 0 4px; }
.tour-dots { display: flex; gap: 5px; } .tour-dots i { width: 7px; height: 7px; border-radius: 9px; background: var(--line); } .tour-dots i.on { background: var(--brand); width: 18px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; }
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; min-height: 60px; }
@keyframes sk { to { background-position: -200% 0; } }
.lite *, .lite *::before, .lite *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; } }
