/* ===== מועדון המזל ===== */
:root {
  --bg: #12082a;
  --bg2: #1d0f42;
  --panel: rgba(255, 255, 255, .06);
  --panel2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .13);
  --text: #fff8ec;
  --muted: #bfb2e0;
  --gold: #f7c948;
  --gold2: #d49a12;
  --red: #e11d48;
  --green: #16a34a;
  --blue: #2563eb;
  --purple: #9333ea;
  --felt: #0d7a43;
  --felt2: #064e2b;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --card-w: 86px;
  font-size: 18px;
  color-scheme: dark;
}
html.big-text { font-size: 21px; --card-w: 96px; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Heebo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
svg { display: block; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.muted { color: var(--muted); }
.gold { background: linear-gradient(180deg, #ffe58a, #f2b01e 60%, #c98a0c); -webkit-background-clip: text; background-clip: text; color: transparent; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 500px at 85% -10%, rgba(147, 51, 234, .35), transparent 60%),
    radial-gradient(700px 500px at 0% 30%, rgba(225, 29, 72, .18), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(13, 148, 136, .2), transparent 60%),
    var(--bg);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: rgba(18, 8, 42, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 500; }
.brand b { font-weight: 900; color: var(--gold); }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: url(../assets/emblem.webp) center/cover; box-shadow: 0 0 0 2px rgba(247, 201, 72, .5), 0 0 18px rgba(247, 201, 72, .35); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.wallet {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px;
  border-radius: 999px; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, rgba(247, 201, 72, .22), rgba(247, 201, 72, .08));
  border: 1px solid rgba(247, 201, 72, .45);
}
.chip-ico { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle, #fff 0 22%, transparent 23%), repeating-conic-gradient(var(--gold) 0 30deg, #b45309 30deg 60deg); box-shadow: inset 0 0 0 3px #fde68a; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); transition: background .2s, transform .1s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--panel2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.off { color: var(--muted); }

main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 14px;
  font-weight: 700; font-size: 1rem; white-space: nowrap;
  transition: transform .12s, filter .2s, box-shadow .2s, background .2s;
  user-select: none;
}
.btn svg { width: 20px; height: 20px; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; }
.btn-lg { min-height: 56px; font-size: 1.05rem; padding: 12px 24px; }
.btn-xl { min-height: 62px; font-size: 1.2rem; padding: 12px 30px; border-radius: 16px; font-weight: 800; }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn-gold { color: #3b2203; background: linear-gradient(180deg, #ffe17a, #f5b81f 55%, #d9930b); box-shadow: 0 6px 0 #9a6406, 0 10px 24px rgba(245, 184, 31, .35); }
.btn-gold:hover:not(:disabled) { filter: brightness(1.07); }
.btn-ghost { background: var(--panel); border: 1px solid var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--panel2); }
.btn-ghost.on { background: rgba(247, 201, 72, .2); border-color: var(--gold); }
.btn-green { background: linear-gradient(180deg, #34d36f, #15a34a); box-shadow: 0 5px 0 #0d6b31; color: #fff; }
.btn-red { background: linear-gradient(180deg, #fb5a7a, #e11d48); box-shadow: 0 5px 0 #8f1030; color: #fff; }
.btn-blue { background: linear-gradient(180deg, #5b8cff, #2563eb); box-shadow: 0 5px 0 #173d96; color: #fff; }
.btn-purple { background: linear-gradient(180deg, #b26bff, #9333ea); box-shadow: 0 5px 0 #5b1d96; color: #fff; }
.btn-chip { background: linear-gradient(180deg, #fff3c4, #f7c948); color: #3b2203; box-shadow: 0 4px 0 #a06d0a; }
.btn.suggest { outline: 4px solid #fde047; outline-offset: 3px; animation: glow 1.2s ease-in-out infinite; }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); box-shadow: 0 6px 0 #9a6406, 0 0 40px rgba(247, 201, 72, .6); } }
@keyframes glow { 50% { outline-color: #fff7c2; } }

/* ---------- welcome ---------- */
.welcome { min-height: calc(100vh - 120px); display: grid; place-items: center; padding-top: 70px; }
.welcome-card {
  width: min(560px, 100%); text-align: center; padding: 36px 28px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.welcome-emblem { margin: -90px auto 10px; border-radius: 50%; box-shadow: 0 0 60px rgba(247, 201, 72, .45); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.welcome h1 { font-size: 2.1rem; margin: 6px 0; font-weight: 900; line-height: 1.15; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 18px; }
.notice { display: flex; gap: 10px; align-items: flex-start; text-align: right; padding: 12px 14px; border-radius: 14px; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .35); margin-bottom: 18px; }
.notice svg { width: 22px; height: 22px; flex: none; color: #4ade80; margin-top: 2px; }
.field { display: block; text-align: right; margin: 0 0 16px; }
.field > span { display: block; font-weight: 700; margin-bottom: 8px; }
.field input:not([type=range]) {
  width: 100%; min-height: 58px; padding: 10px 16px; border-radius: 14px; font: inherit; font-size: 1.2rem;
  background: rgba(0, 0, 0, .3); color: var(--text); border: 2px solid var(--line);
}
.field input:focus { outline: none; border-color: var(--gold); }
.field input[type=range] { width: 100%; accent-color: var(--gold); height: 32px; }
.color-row { display: flex; flex-wrap: wrap; gap: 10px; }
.color-dot { width: 44px; height: 44px; border-radius: 50%; background: var(--c); border: 3px solid transparent; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.color-dot.on { border-color: #fff; box-shadow: 0 0 0 3px var(--c); }
.tiny { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- lobby ---------- */
.hero {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
  box-shadow: var(--shadow); border: 1px solid rgba(247, 201, 72, .25);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 40%; animation: kenburns 30s ease-in-out infinite alternate; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18, 8, 42, .95) 5%, rgba(18, 8, 42, .45) 55%, rgba(18, 8, 42, .15)); }
@keyframes kenburns { to { transform: scale(1.08); } }
.hero-content, .hero-actions { position: relative; }
.hero-content { display: flex; align-items: center; gap: 18px; }
.hero-emblem { border-radius: 50%; flex: none; box-shadow: 0 0 40px rgba(247, 201, 72, .5); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; margin: 2px 0 8px; font-weight: 900; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero-greet { margin: 0; color: var(--gold); font-weight: 700; font-size: 1.15rem; }
.hero-sub { margin: 0; color: #e9e1ff; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.bonus-done { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: rgba(0, 0, 0, .35); color: #d9f99d; }
.bonus-done svg { width: 20px; height: 20px; }

.online-panel {
  margin: 22px 0 8px; padding: 22px; border-radius: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(110deg, rgba(37, 99, 235, .28), rgba(147, 51, 234, .25) 50%, rgba(225, 29, 72, .22));
  border: 1px solid rgba(255, 255, 255, .16);
}
.online-text { display: flex; gap: 16px; align-items: center; flex: 1 1 360px; }
.online-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .14); }
.online-ico svg { width: 34px; height: 34px; }
.online-panel h2 { margin: 0 0 2px; font-size: 1.35rem; }
.online-panel p { margin: 0; color: #e4dcff; }
.online-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.section-title { font-size: 1.5rem; margin: 26px 4px 14px; font-weight: 900; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.game-tile {
  position: relative; text-align: right; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  border: 1px solid var(--line);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s;
  animation: rise .5s both; animation-delay: calc(var(--i) * 60ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.game-tile:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0, 0, 0, .45), 0 0 0 1px var(--accent), 0 0 40px color-mix(in srgb, var(--accent) 40%, transparent); }
.tile-art { aspect-ratio: 4/3; overflow: hidden; background: #2a1458; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.game-tile:hover .tile-art img { transform: scale(1.06); }
.tile-body { padding: 14px 16px 18px; }
.tile-body h3 { margin: 6px 0 2px; font-size: 1.35rem; font-weight: 900; }
.tile-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.tile-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 30%, transparent); color: #fff; }
.tag svg { width: 14px; height: 14px; }
.tag.online { background: rgba(247, 201, 72, .2); color: var(--gold); }
.tile-play { position: absolute; top: 14px; left: 14px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #3b2203; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); transform: scale(.85); opacity: .92; transition: transform .25s; }
.tile-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 3px; }
.game-tile:hover .tile-play { transform: scale(1); }

.stats-panel { margin-top: 28px; padding: 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); }
.stats-panel h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.35rem; }
.stats-panel h2 svg { width: 28px; height: 28px; color: #f0abfc; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .25); }
.stat b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--gold); }
.stat span { color: var(--muted); font-size: .9rem; }
.foot { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 30px; }

/* ---------- modal & toast ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 3, 20, .72); backdrop-filter: blur(6px); animation: fade .2s; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 26px 24px 22px; border-radius: 24px;
  background: linear-gradient(180deg, #2b1760, #1b0e3d); border: 1px solid rgba(247, 201, 72, .3);
  box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.modal-card h2 { margin: 0 0 12px; font-size: 1.45rem; padding-left: 40px; }
.modal-x { position: absolute; top: 14px; left: 14px; }
.modal-body { font-size: 1.05rem; }
.modal-body ul { padding-right: 20px; margin: 8px 0; }
.modal-body li { margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 18px; flex-wrap: wrap; }
.modal-actions .btn { min-width: 120px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; z-index: 120; transform: translate(-50%, 30px);
  padding: 14px 22px; border-radius: 16px; font-weight: 700; max-width: calc(100% - 32px); text-align: center;
  background: #2b1760; border: 1px solid rgba(247, 201, 72, .4); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { border-color: #4ade80; }
.toast.bad { border-color: #fb7185; }

.pick-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.pick-game { border-radius: 16px; overflow: hidden; background: var(--panel); border: 2px solid var(--line); text-align: center; transition: .2s; }
.pick-game:hover { border-color: var(--accent); transform: translateY(-3px); }
.pick-game img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.pick-game b { display: block; padding: 8px 4px; font-size: .95rem; }
.room-code { display: flex; justify-content: center; gap: 10px; margin: 14px 0; direction: ltr; }
.room-code span { width: 64px; height: 80px; display: grid; place-items: center; font-size: 2.6rem; font-weight: 900; border-radius: 14px; background: #fff; color: #1b0e3d; box-shadow: 0 6px 0 #c4b5fd; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.code-input { width: 100%; text-align: center; letter-spacing: .5em; font-size: 2.4rem; font-weight: 900; padding: 10px; border-radius: 16px; border: 2px solid var(--gold); background: rgba(0, 0, 0, .3); color: #fff; direction: ltr; font-family: inherit; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; direction: ltr; }
.key { min-height: 58px; border-radius: 14px; font-size: 1.5rem; font-weight: 800; background: var(--panel2); border: 1px solid var(--line); }
.key:active { background: rgba(247, 201, 72, .3); }
.key[data-key="⌫"] { font-size: 1rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.switch-row input { width: 26px; height: 26px; accent-color: var(--gold); }

/* ---------- game shell ---------- */
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.game-head h1 { margin: 0; font-size: 1.6rem; font-weight: 900; text-align: center; flex: 1; }
.game-head-side { display: flex; gap: 8px; align-items: center; min-width: 120px; justify-content: flex-end; }
.back-btn svg { width: 22px; height: 22px; }
.room-pill { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(247, 201, 72, .18); border: 1px solid var(--gold); font-weight: 700; }
.room-pill svg { width: 18px; height: 18px; }
.room-pill b { letter-spacing: .12em; color: var(--gold); direction: ltr; }

.felt {
  position: relative; border-radius: 30px; padding: 22px 18px;
  background: radial-gradient(ellipse at 50% 35%, #17a05a 0%, var(--felt) 40%, var(--felt2) 100%);
  border: 10px solid #5a2d0c;
  box-shadow: inset 0 0 0 2px #c08a2a, inset 0 0 80px rgba(0, 0, 0, .45), var(--shadow);
}
.felt::before { content: ''; position: absolute; inset: 0; border-radius: 20px; pointer-events: none; opacity: .18; background-image: radial-gradient(rgba(255, 255, 255, .4) 1px, transparent 1px); background-size: 4px 4px; }
.table-rules { text-align: center; color: rgba(255, 248, 220, .75); font-weight: 700; font-size: .85rem; letter-spacing: .03em; border: 1px solid rgba(255, 230, 160, .35); border-radius: 999px; width: fit-content; margin: 0 auto 12px; padding: 4px 16px; }
.table-msg { text-align: center; font-size: 1.25rem; font-weight: 800; margin: 12px 0; min-height: 1.9em; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.zone-label { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; font-size: 1.1rem; }
.total { display: inline-grid; place-items: center; min-width: 40px; height: 34px; padding: 0 10px; border-radius: 999px; background: #fff; color: #111; font-weight: 900; font-size: 1.05rem; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.total.bust { background: var(--red); color: #fff; }

.controls { margin-top: 14px; padding: 16px; border-radius: 22px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.controls-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stack-pill { padding: 6px 14px; border-radius: 999px; background: var(--panel); font-size: .95rem; }
.stack-pill b { color: var(--gold); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.bet-row, .action-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.bet-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.bet-amount { text-align: center; min-width: 110px; }
.bet-amount span { display: block; color: var(--muted); font-size: .85rem; }
.bet-amount b { font-size: 1.8rem; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.wait-msg { font-size: 1.15rem; font-weight: 700; color: #e9e1ff; padding: 12px; text-align: center; }
.coach-tip { width: 100%; text-align: center; font-weight: 800; color: #fde047; font-size: 1.1rem; }
.toggle { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: .95rem; }
.toggle .dot { width: 40px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .2); position: relative; transition: .2s; }
.toggle .dot::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle.on .dot { background: #22c55e; }
.toggle.on .dot::after { right: 19px; }

.bet-select { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bet-select > span { color: var(--muted); font-weight: 700; font-size: .9rem; margin-left: 4px; }
.bet-opt { min-width: 58px; min-height: 48px; padding: 6px 12px; border-radius: 12px; font-weight: 800; background: var(--panel); border: 2px solid var(--line); font-variant-numeric: tabular-nums; }
.bet-opt.on { background: var(--gold); color: #3b2203; border-color: #fff3c4; }
.bet-opt:disabled { opacity: .35; }

/* chips */
.chip-picker { display: flex; gap: 8px; }
.chip-btn { border-radius: 50%; transition: transform .15s; padding: 2px; }
.chip-btn.on { transform: translateY(-6px); filter: drop-shadow(0 0 10px rgba(255, 230, 120, .9)); }
.chip-btn:disabled { opacity: .3; }
.chip {
  --s: 56px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle, var(--c) 0 50%, transparent 51%), repeating-conic-gradient(var(--c) 0 22.5deg, #fff 22.5deg 45deg);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .25), 0 3px 0 rgba(0, 0, 0, .4);
}
.chip span { width: 66%; height: 66%; border-radius: 50%; display: grid; place-items: center; border: 2px dashed rgba(255, 255, 255, .7); background: var(--c); font-weight: 900; font-size: .9rem; color: #fff; }
.chip.sm { --s: 30px; }
.chip.sm span { font-size: .55rem; border-width: 1px; }
.chip-stack { display: inline-flex; flex-direction: column-reverse; vertical-align: middle; }
.chip-stack > span { margin-top: -24px; }
.chip-stack > span:last-child { margin-top: 0; }

/* cards */
.cards { direction: ltr; display: flex; justify-content: center; gap: 0; min-height: calc(var(--card-w) * 1.4); }
.cards .card + .card { margin-left: calc(var(--card-w) * -.38); }
.pk-cards, .pk-board { direction: ltr; }
.card {
  --w: var(--card-w); width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .1); flex: none;
  position: relative; background: linear-gradient(160deg, #fff, #f1ede4); color: #141414;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.card.red { color: #d11a3a; }
.card .corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 900; font-size: calc(var(--w) * .24); }
.card .corner .suit { width: calc(var(--w) * .18); height: calc(var(--w) * .18); margin-top: 2px; fill: currentColor; }
.card .tl { top: 6%; left: 8%; }
.card .br { bottom: 6%; right: 8%; transform: rotate(180deg); }
.card .pip { position: absolute; inset: 0; display: grid; place-items: center; }
.card .pip .suit.big { width: 46%; height: 46%; fill: currentColor; }
.card .face-letter { font-size: calc(var(--w) * .55); font-weight: 900; font-family: Georgia, 'Times New Roman', serif; }
.card.face .pip { inset: 20% 18%; border-radius: 6px; background: linear-gradient(160deg, rgba(247, 201, 72, .35), rgba(147, 51, 234, .18)); box-shadow: inset 0 0 0 2px currentColor; }
.card.back { background: linear-gradient(135deg, #7c1d3f, #3b0f6b); box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.card-back-pattern { position: absolute; inset: 7%; border-radius: 6px; border: 2px solid rgba(247, 201, 72, .7); background: repeating-linear-gradient(45deg, rgba(247, 201, 72, .25) 0 4px, transparent 4px 10px), repeating-linear-gradient(-45deg, rgba(247, 201, 72, .25) 0 4px, transparent 4px 10px); }
.card.slot { background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.card.deal { animation: deal .45s cubic-bezier(.2, .8, .3, 1.1) both; }
.card.flip { animation: flipin .45s both; }
@keyframes deal { from { opacity: 0; transform: translate(-60px, -120px) rotate(-25deg) scale(.6); } }
@keyframes flipin { from { transform: rotateY(90deg); } }
.card.win-card { box-shadow: 0 0 0 4px #fde047, 0 0 22px rgba(253, 224, 71, .9); transform: translateY(-8px); transition: .3s; }
.cards.small .card, .card.small { --w: calc(var(--card-w) * .62); }
.card.mini { --w: 44px; }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-weight: 900; flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 0 0 2px rgba(255, 255, 255, .7); }
.avatar svg { width: 60%; height: 60%; }

/* flash + confetti */
.flash { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); z-index: 20; pointer-events: none; font-size: clamp(2.4rem, 8vw, 4.2rem); font-weight: 900; color: #fde047; -webkit-text-stroke: 2px #7c2d12; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); animation: flash 2.2s ease-out forwards; white-space: nowrap; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%); } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
body > .confetti { position: fixed; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 10px; height: 16px; background: var(--c); border-radius: 2px; animation: fall var(--d) var(--delay) ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(var(--r)); opacity: .8; } }

.turn-timer { position: absolute; bottom: 0; right: 0; height: 5px; width: 100%; background: linear-gradient(90deg, #f43f5e, #fde047); border-radius: 4px; transform-origin: right; animation: timer var(--ms) linear forwards; }
@keyframes timer { to { transform: scaleX(0); } }

/* ---------- blackjack ---------- */
.bj-table { min-height: 460px; }
.dealer-zone { text-align: center; }
.others { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 14px; }
.other { padding: 10px; border-radius: 16px; background: rgba(0, 0, 0, .2); min-width: 170px; border: 2px solid transparent; }
.other.active { border-color: #fde047; }
.other-head { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 6px; }
.other-head span { margin-right: auto; color: var(--gold); font-weight: 700; }
.my-zone { position: relative; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 12px; border-radius: 20px; }
.my-zone.my-turn { background: rgba(253, 224, 71, .08); box-shadow: inset 0 0 0 2px rgba(253, 224, 71, .5); }
.bj-hand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px; border-radius: 16px; }
.bj-hand.active { background: rgba(255, 255, 255, .08); }
.bj-hand.empty { min-height: 100px; justify-content: center; }
.hand-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.bet-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--gold); }
.result { padding: 4px 12px; border-radius: 999px; font-weight: 900; animation: pop .3s; }
.result.good { background: #22c55e; color: #052e16; }
.result.bad { background: #e11d48; color: #fff; }
.result.mid { background: #e5e7eb; color: #111; }

/* ---------- roulette ---------- */
.rl-layout { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 18px; align-items: start; }
.wheel-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 380px; margin: 0 auto; }
.wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 20px 50px rgba(0, 0, 0, .55), 0 0 0 6px #c08a2a, 0 0 60px rgba(247, 201, 72, .25); }
.wheel-svg { width: 100%; height: 100%; }
.wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 3; width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid var(--gold); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.ball-track { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ball { position: absolute; top: 9%; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #cbd5e1); box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.ball-track.run { animation: ball 6s cubic-bezier(.15, .55, .2, 1) both; }
.ball-track.run .ball { animation: balldrop 6s ease-in both; }
@keyframes ball { from { transform: rotate(-1800deg); } to { transform: rotate(0); } }
@keyframes balldrop { 0%, 55% { top: 3%; } 100% { top: 9%; } }
.wheel-result { position: absolute; inset: 0; margin: auto; width: 34%; height: 34%; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; font-weight: 900; z-index: 4; opacity: 0; transform: scale(.5); transition: .4s cubic-bezier(.2, .9, .3, 1.4); border: 4px solid var(--gold); }
.wheel-result.show { opacity: 1; transform: scale(1); }
.wheel-result.red { background: #dc2626; }
.wheel-result.black { background: #18181b; }
.wheel-result.green { background: #16a34a; }
.rl-history { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-size: .9rem; color: var(--muted); }
.rl-history em { font-style: normal; }
.hist { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .9rem; }
.hist.last { box-shadow: 0 0 0 3px var(--gold); }
.hist.red, .rl-cell.red { background: #c81e3a; }
.hist.black, .rl-cell.black { background: #1c1c22; }
.hist.green, .rl-cell.green { background: #12893f; }
.rl-board { direction: ltr; display: grid; grid-template-columns: 1.2fr repeat(12, 1fr) 1.1fr; grid-template-rows: repeat(3, 56px); gap: 3px; padding: 8px; border-radius: 16px; background: #0b5e33; border: 3px solid #c08a2a; }
.rl-cell { position: relative; border-radius: 8px; font-weight: 900; font-size: 1.15rem; color: #fff; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); transition: transform .1s, box-shadow .2s; }
.rl-cell:hover:not(:disabled) { box-shadow: inset 0 0 0 3px #fde047; }
.rl-cell:active:not(:disabled) { transform: scale(.95); }
.rl-cell.num { grid-column: var(--hc); grid-row: var(--hr); }
.rl-cell.zero { grid-column: 1; grid-row: 1 / span 3; font-size: 1.6rem; }
.rl-cell.col { grid-column: var(--hc); grid-row: var(--hr); background: rgba(0, 0, 0, .25); font-size: .9rem; }
.rl-cell.out { background: rgba(0, 0, 0, .25); min-height: 54px; font-size: 1rem; }
.rl-cell.out.red { background: #c81e3a; }
.rl-cell.out.black { background: #1c1c22; }
.rl-cell.winner { animation: winner 0.6s ease-in-out 5; box-shadow: inset 0 0 0 4px #fde047, 0 0 20px #fde047; z-index: 2; }
@keyframes winner { 50% { transform: scale(1.08); } }
.rl-cell:disabled { cursor: default; }
.bet-dot { position: absolute; inset: auto 0 2px 0; display: flex; justify-content: center; align-items: center; gap: 2px; font-style: normal; pointer-events: none; }
.bet-dot .chip { position: absolute; bottom: 8px; left: -6px; --s: 24px; z-index: 2; }
.rl-cell.has-bet .bet-dot .chip { animation: pop .25s; }
.bet-dot em { position: absolute; bottom: 0; left: -6px; z-index: 3; font-style: normal; font-size: .62rem; font-weight: 900; background: #fde047; color: #111; padding: 0 4px; border-radius: 6px; }
.bet-dot u { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px #fff; }
.rl-outside { direction: ltr; display: grid; gap: 3px; margin-top: 6px; }
.rl-dozens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.rl-evens { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.rl-tip { text-align: center; font-weight: 700; color: #fde68a; margin-bottom: 10px; min-height: 1.5em; }
.mini-players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.mini { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--panel); font-size: .9rem; }
.mini.ready { box-shadow: inset 0 0 0 2px #22c55e; }

/* ---------- poker ---------- */
.pk-wrap { position: relative; }
.pk-table { position: relative; height: clamp(440px, 60vw, 560px); border-radius: 50% / 46%; padding: 0; }
.pk-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; }
.pk-street { font-weight: 700; color: rgba(255, 248, 220, .8); font-size: .9rem; }
.pk-board { display: flex; gap: 6px; }
.pk-board .card { --w: calc(var(--card-w) * .78); }
.pk-pot { padding: 4px 16px; border-radius: 999px; background: rgba(0, 0, 0, .35); font-weight: 700; }
.pk-pot b { color: var(--gold); font-size: 1.2rem; }
.pk-seat { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; transition: opacity .3s; }
.pk-seat.top { flex-direction: column-reverse; }
.pk-plate { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(15, 6, 34, .88); border: 2px solid rgba(255, 255, 255, .2); min-width: 130px; white-space: nowrap; }
.pk-plate b { display: block; font-size: .9rem; }
.pk-plate span { display: block; color: var(--gold); font-weight: 800; font-size: .9rem; }
.pk-seat.turn .pk-plate { border-color: #fde047; box-shadow: 0 0 20px rgba(253, 224, 71, .7); animation: glow 1.2s infinite; }
.pk-seat.me .pk-plate { border-color: rgba(247, 201, 72, .7); }
.pk-seat.folded { opacity: .45; }
.pk-seat.out { opacity: .3; }
.pk-seat.won .pk-plate { border-color: #22c55e; box-shadow: 0 0 24px rgba(34, 197, 94, .8); }
.pk-cards { display: flex; gap: 3px; min-height: 10px; }
.pk-seat.me .pk-cards .card { --w: calc(var(--card-w) * .82); }
.pk-last { font-size: .8rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #fff; color: #1b0e3d; }
.pk-won { font-size: .85rem; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: #22c55e; color: #052e16; animation: pop .3s; white-space: nowrap; }
.pk-bet { font-size: .85rem; font-weight: 800; color: #fde68a; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .4); }
.pk-seat .turn-timer { bottom: -8px; }
.dealer-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #111; font-size: .7rem; font-weight: 900; vertical-align: middle; }
.pk-log { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; min-height: 30px; }
.pk-log span { font-size: .85rem; padding: 3px 10px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.pk-log span:first-child { color: var(--text); background: var(--panel2); }
.pk-coach { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; padding: 10px; margin-bottom: 12px; border-radius: 14px; background: rgba(253, 224, 71, .08); border: 1px dashed rgba(253, 224, 71, .45); }
.pk-coach b { color: #fde047; }
.pk-coach .tip { width: 100%; text-align: center; font-weight: 800; color: #fde047; }
.raise-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 8px; border-radius: 16px; background: var(--panel); }
.raise-presets { display: flex; gap: 6px; }
.raise-stepper { display: flex; align-items: center; gap: 8px; }
.raise-stepper b { min-width: 80px; text-align: center; font-size: 1.3rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.host-tag svg { width: 14px; height: 14px; display: inline; color: var(--gold); vertical-align: -2px; }

/* ---------- slots ---------- */
.slots-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.slot-machine { position: relative; padding: 46px 22px 22px; border-radius: 36px; background: linear-gradient(180deg, #e11d75, #9d174d 50%, #6b21a8); box-shadow: inset 0 0 0 4px #fbcfe8, inset 0 0 0 10px #be185d, var(--shadow), 0 0 60px rgba(236, 72, 153, .35); }
.slot-lights { position: absolute; top: 14px; left: 30px; right: 30px; display: flex; justify-content: space-between; }
.slot-lights i { width: 14px; height: 14px; border-radius: 50%; background: #fde047; box-shadow: 0 0 10px #fde047; animation: blink 1s calc(var(--i) * 80ms) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.slot-window { --sym: clamp(90px, 18vw, 150px); direction: ltr; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-radius: 20px; background: #1f0a35; box-shadow: inset 0 8px 20px rgba(0, 0, 0, .6); }
.reel { height: calc(var(--sym) * 3); overflow: hidden; border-radius: 12px; background: linear-gradient(180deg, #d9d2e9, #fff 20%, #fff 80%, #d9d2e9); }
.strip { will-change: transform; }
.sym { height: var(--sym); display: grid; place-items: center; padding: 14%; transition: transform .2s; }
.sym svg { width: 100%; height: 100%; }
.sym.win { animation: symwin .6s ease-in-out 4; background: radial-gradient(circle, rgba(253, 224, 71, .5), transparent 70%); }
@keyframes symwin { 50% { transform: scale(1.15); } }
.paylines { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); pointer-events: none; }
.paylines polyline { fill: none; stroke: rgba(253, 224, 71, .0); stroke-width: 4; }
.paylines polyline.hit { stroke: #fde047; filter: drop-shadow(0 0 6px #fde047); stroke-dasharray: 12 6; animation: dash .6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
.slot-win { text-align: center; margin-top: 14px; font-size: 1.6rem; font-weight: 900; padding: 8px; border-radius: 14px; background: #1f0a35; color: #fde047; font-variant-numeric: tabular-nums; }
.paytable { padding: 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.pt-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; border-radius: 10px; }
.pt-row:nth-child(odd) { background: rgba(0, 0, 0, .2); }
.pt-syms { display: flex; direction: ltr; gap: 2px; }
.pt-syms svg { width: 30px; height: 30px; }
.pt-syms i { width: 30px; }
.pt-row b { color: var(--gold); font-size: 1.1rem; }

/* ---------- video poker ---------- */
.vp-wrap { display: grid; gap: 14px; }
.vp-paytable { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; padding: 12px; border-radius: 18px; background: #0b1d4a; border: 2px solid #22d3ee; }
.vp-pay { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; color: #fde68a; font-weight: 700; }
.vp-pay b { color: #fff; font-variant-numeric: tabular-nums; }
.vp-pay.hit { background: #fde047; color: #111; animation: winner .6s 4; }
.vp-pay.hit b { color: #111; }
.vp-screen { position: relative; padding: 24px 12px; border-radius: 24px; background: radial-gradient(ellipse at top, #1e3a8a, #0b1d4a); border: 3px solid #22d3ee; box-shadow: 0 0 40px rgba(34, 211, 238, .25), inset 0 0 60px rgba(0, 0, 0, .5); }
.vp-cards { display: flex; justify-content: center; gap: clamp(6px, 2vw, 16px); direction: ltr; }
.vp-card { display: flex; flex-direction: column; align-items: center; gap: 8px; border-radius: 14px; padding: 4px; transition: transform .15s; }
.vp-card .card { --w: clamp(58px, 15vw, 120px); }
.vp-card.held .card { transform: translateY(-12px); box-shadow: 0 0 0 4px #22d3ee, 0 12px 20px rgba(0, 0, 0, .5); }
.vp-card.suggest .card { outline: 4px dashed #fde047; outline-offset: 4px; }
.hold-tag { font-weight: 800; font-size: .85rem; min-height: 1.4em; color: #67e8f9; }
.vp-card.held .hold-tag { color: #0b1d4a; background: #22d3ee; padding: 0 10px; border-radius: 6px; }
.vp-msg { text-align: center; margin-top: 16px; font-weight: 800; font-size: 1.15rem; color: #e0f2fe; }

/* ---------- baccarat ---------- */
.bac-table { background: radial-gradient(ellipse at 50% 35%, #14b8a6, #0f766e 45%, #134e4a); }
.bac-hands { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; }
.bac-hand { text-align: center; padding: 12px 16px; border-radius: 20px; min-width: 240px; background: rgba(0, 0, 0, .15); transition: .3s; }
.bac-hand h3 { margin: 0 0 10px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.3rem; }
.bac-hand.win { background: rgba(253, 224, 71, .18); box-shadow: inset 0 0 0 3px #fde047; }
.bac-vs { font-weight: 900; color: var(--gold); font-size: 1.2rem; }
.bac-road { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.bac-road i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: .8rem; }
.bac-road .player { background: #2563eb; }
.bac-road .banker { background: #dc2626; }
.bac-road .tie { background: #16a34a; }
.bac-sides { display: grid; grid-template-columns: 1fr .8fr 1fr; gap: 10px; margin-bottom: 14px; }
.bac-side { padding: 14px 8px; border-radius: 18px; border: 3px solid transparent; text-align: center; transition: .2s; }
.bac-side b { display: block; font-size: 1.4rem; font-weight: 900; }
.bac-side span { font-size: .85rem; opacity: .9; }
.bac-side.player { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.bac-side.banker { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.bac-side.tie { background: linear-gradient(180deg, #22c55e, #15803d); }
.bac-side.on { border-color: #fde047; transform: translateY(-4px); box-shadow: 0 0 24px rgba(253, 224, 71, .6); }

/* ---------- hi-lo ---------- */
.hilo-table { background: radial-gradient(ellipse at 50% 35%, #c026d3, #86198f 45%, #4a044e); }
.hilo-trail { display: flex; justify-content: center; gap: 4px; min-height: 66px; direction: ltr; opacity: .85; }
.hilo-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 14px 0; }
.hilo-card .card { --w: clamp(110px, 22vw, 150px); }
.hilo-btn { padding: 18px 10px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s; color: #fff; }
.hilo-btn b { font-size: 1.35rem; font-weight: 900; }
.hilo-btn em { font-style: normal; font-weight: 900; font-size: 1.1rem; padding: 2px 12px; border-radius: 999px; background: rgba(0, 0, 0, .25); }
.hilo-btn.up { background: linear-gradient(180deg, #4ade80, #16a34a); box-shadow: 0 6px 0 #0d6b31; }
.hilo-btn.down { background: linear-gradient(180deg, #fb7185, #e11d48); box-shadow: 0 6px 0 #8f1030; }
.hilo-btn:active:not(:disabled) { transform: translateY(3px); }
.hilo-btn:disabled { opacity: .35; }
.hilo-best { text-align: center; color: rgba(255, 255, 255, .75); font-size: .9rem; }

/* ---------- dice ---------- */
.dice-table { background: radial-gradient(ellipse at 50% 35%, #fb923c, #c2410c 45%, #7c2d12); }
.dice-row { display: flex; justify-content: center; gap: 28px; margin: 18px 0; }
.die { width: clamp(90px, 18vw, 120px); aspect-ratio: 1; border-radius: 22%; background: linear-gradient(145deg, #fff, #e7e5e4); box-shadow: 0 10px 0 #a8a29e, 0 18px 30px rgba(0, 0, 0, .4); display: grid; grid-template-columns: repeat(3, 1fr); padding: 14%; gap: 6%; }
.die i { border-radius: 50%; }
.die i.on { background: radial-gradient(circle at 35% 35%, #444, #000); }
.die.roll { animation: roll .22s linear infinite; }
.die.roll.r2 { animation-direction: reverse; }
@keyframes roll { 0% { transform: rotate(0) translateY(0); } 50% { transform: rotate(180deg) translateY(-14px); } 100% { transform: rotate(360deg) translateY(0); } }
.dice-sum { text-align: center; font-size: 1.4rem; }
.dice-sum b { font-size: 2.2rem; color: #fde047; }
.dice-hist { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.dice-hist b { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .85rem; background: rgba(0, 0, 0, .3); }
.dice-hist b.seven { background: #fde047; color: #111; }
.dice-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.dice-opt { padding: 14px 8px; border-radius: 18px; background: var(--panel); border: 3px solid var(--line); text-align: center; }
.dice-opt b { display: block; font-size: 1.2rem; font-weight: 900; }
.dice-opt span { font-size: .82rem; color: var(--muted); }
.dice-opt.on { border-color: #fde047; background: rgba(253, 224, 71, .15); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .rl-layout { grid-template-columns: 1fr; }
  .wheel-wrap { max-width: 300px; }
  .slots-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  :root { --card-w: 70px; font-size: 17px; }
  html.big-text { --card-w: 78px; font-size: 19px; }
  main { padding: 12px 12px 30px; }
  .brand-text { display: none; }
  .hero { min-height: 300px; padding: 20px; border-radius: 22px; }
  .hero-content { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-emblem { width: 70px; height: 70px; }
  .hero-actions .btn { width: 100%; }
  .online-actions { width: 100%; }
  .online-actions .btn { flex: 1; }
  .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile-body { padding: 10px 12px 14px; }
  .tile-body h3 { font-size: 1.1rem; }
  .tile-body p { display: none; }
  .tile-play { width: 38px; height: 38px; top: 8px; left: 8px; }
  .game-head h1 { font-size: 1.25rem; }
  .back-btn span { display: none; }
  .game-head-side { min-width: 0; }
  .felt { padding: 16px 10px; border-width: 7px; border-radius: 22px; }
  .chip { --s: 48px; }
  .chip-picker { gap: 4px; }
  .btn-xl { min-height: 58px; font-size: 1.1rem; padding: 10px 18px; }
  .action-row .btn-xl { flex: 1 1 40%; }
  .bet-row > .btn-xl { width: 100%; }
  /* roulette board goes vertical on phones */
  .rl-board { grid-template-columns: repeat(3, 1fr) ; grid-template-rows: 46px repeat(12, 40px) 40px; }
  .rl-cell.num { grid-column: var(--vc); grid-row: var(--vr); font-size: 1rem; }
  .rl-cell.zero { grid-column: 1 / span 3; grid-row: 1; }
  .rl-cell.col { grid-column: var(--vc); grid-row: var(--vr); }
  .rl-evens { grid-template-columns: repeat(3, 1fr); }
  .bet-dot .chip { top: -26px; }
  .pk-table { height: 520px; border-radius: 42% / 30%; }
  .pk-plate { min-width: 0; padding: 4px 10px 4px 4px; }
  .pk-plate b, .pk-plate span { font-size: .78rem; }
  .pk-seat .avatar { width: 30px !important; height: 30px !important; font-size: 14px !important; }
  .pk-board .card { --w: 46px; }
  .pk-center { top: 12%; }
  .pk-seat.top { flex-direction: column; }
  .pk-board { gap: 4px; }
  .pk-seat:not(.me) .pk-cards .card { --w: 34px; }
  .pk-seat:not(.me) .pk-cards .card + .card { margin-left: -12px; }
  .pk-last, .pk-bet, .pk-won { font-size: .72rem; }
  .raise-box { width: 100%; }
  .pk-actions .btn-xl { flex: 1 1 40%; }
  .bac-sides { grid-template-columns: 1fr 1fr 1fr; }
  .bac-hand { min-width: 0; flex: 1 1 100%; }
  .dice-options { grid-template-columns: 1fr 1fr; }
  .hilo-main { grid-template-columns: 1fr 1fr; }
  .hilo-card { grid-column: 1 / span 2; grid-row: 1; display: flex; justify-content: center; }
  .pick-games { grid-template-columns: 1fr; }
  .pick-game { display: flex; align-items: center; gap: 10px; }
  .pick-game img { width: 90px; }
  .room-code span { width: 54px; height: 68px; font-size: 2.2rem; }
  .others { gap: 8px; }
  .other { min-width: 0; flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
