/* ==========================================================
   Real-casino skin: felt, wood/leather rails, printed tables,
   realistic cards & chips. Loaded after style.css.
   ========================================================== */
:root {
  --tex-felt: url(../assets/tex/felt-green.webp);
  --tex-wood: url(../assets/tex/wood.webp);
  --tex-leather: url(../assets/tex/leather.webp);
  --print: rgba(255, 236, 179, .85);
  --print-line: rgba(255, 236, 179, .55);
}

/* ---------- room atmosphere behind the tables ---------- */
body[data-screen="game"] .bg-glow {
  background:
    radial-gradient(1200px 520px at 50% -140px, rgba(255, 214, 140, .2), transparent 70%),
    radial-gradient(900px 600px at 50% 120%, rgba(120, 20, 60, .35), transparent 70%),
    linear-gradient(180deg, #160a24, #0a0512 70%);
}
.game-screen { max-width: 1240px; margin: 0 auto; }

/* ---------- the table: felt surface inside a polished wood rail ---------- */
.felt {
  --felt-tex: var(--tex-felt);
  border: 18px solid transparent;
  border-radius: 34px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 255, 255, .13), transparent 70%) padding-box,
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55)) padding-box,
    var(--felt-tex) center/360px padding-box,
    var(--tex-wood) center/300px border-box;
  box-shadow:
    inset 0 0 0 2px rgba(255, 220, 140, .55),
    inset 0 0 0 6px rgba(0, 0, 0, .25),
    inset 0 12px 40px rgba(0, 0, 0, .45),
    0 0 0 1px #2a1306,
    0 30px 60px rgba(0, 0, 0, .65),
    0 2px 0 3px rgba(255, 200, 120, .15);
}
.felt::before { display: none; }
.felt::after {
  /* lacquer reflection along the rail */
  content: ''; position: absolute; inset: -18px; border-radius: 34px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 18%, transparent 82%, rgba(0, 0, 0, .25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 18px;
}
.leather-rail {
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 255, 255, .13), transparent 70%) padding-box,
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55)) padding-box,
    var(--felt-tex) center/360px padding-box,
    var(--tex-leather) center/260px border-box;
}
.table-rules {
  font-family: Georgia, 'Heebo', serif; color: var(--print); border-color: var(--print-line);
  background: rgba(0, 0, 0, .12); letter-spacing: .04em;
}
.table-msg { font-size: 1.3rem; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.felt-print { position: absolute; left: 0; right: 0; pointer-events: none; color: var(--print); }
.felt-print text { fill: var(--print); font-family: 'Heebo', sans-serif; font-weight: 800; letter-spacing: .06em; }
.print-big { font-size: 40px; }
.print-small { font-size: 22px; font-weight: 500 !important; opacity: .85; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(165deg, #ffffff, #f6f2e8 60%, #ece6d6);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 8px 18px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .12);
  overflow: hidden;
}
.card > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .idx { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 19px; text-anchor: middle; letter-spacing: -1px; }
.card.back {
  background: url(../assets/cards/back.webp) center/cover;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 8px 18px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .3);
}
.card.back::after { content: ''; position: absolute; inset: 0; background: linear-gradient(130deg, rgba(255, 255, 255, .18), transparent 40%); }
.card::before {
  /* subtle gloss */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .35), transparent 35%);
}
.card.slot { background: transparent; box-shadow: inset 0 0 0 2px var(--print-line); border-radius: 8px; }
.card.slot::before { display: none; }
.card.win-card { box-shadow: 0 0 0 3px #ffd34d, 0 0 26px rgba(255, 211, 77, .9), 0 10px 20px rgba(0, 0, 0, .5); }
@keyframes deal { from { opacity: 0; transform: translate(-160px, -240px) rotate(-30deg) scale(.75); } 60% { opacity: 1; } }
html, body, main { overflow-x: clip; }
.card.deal { animation: deal .55s cubic-bezier(.18, .8, .25, 1) both; }

/* ---------- chips ---------- */
.chip { background: none; box-shadow: none; position: relative; border-radius: 50%; }
.chip > svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .45)) drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.chip-btn { padding: 4px; }
.chip-btn.on .chip > svg { filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 12px rgba(255, 220, 100, .95)); }
.chip-stack > span { margin-top: -26px; }
.chip-stack .chip.sm { --s: 32px; }
.chip-stack .chip.sm > svg { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55)); }

/* dealer furniture */
.chip-rack {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 3px; padding: 6px 8px; border-radius: 0 0 14px 14px; z-index: 1;
  background: linear-gradient(180deg, #1b1b1f, #3a3a42); box-shadow: 0 6px 12px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.chip-rack .tube {
  width: 18px; height: 40px; border-radius: 9px;
  background: repeating-linear-gradient(180deg, var(--c) 0 4px, rgba(0, 0, 0, .35) 4px 5px, var(--c) 5px 7px, #fff 7px 7.6px);
  box-shadow: inset 2px 0 3px rgba(255, 255, 255, .35), inset -3px 0 4px rgba(0, 0, 0, .45);
}
.card-shoe {
  position: absolute; top: 18px; left: 26px; width: 92px; height: 70px; z-index: 1; transform: rotate(-8deg);
  border-radius: 10px 10px 24px 10px; background: linear-gradient(160deg, #2a2a30, #0d0d10);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.card-shoe .shoe-cards { position: absolute; right: 8px; top: 10px; width: 48px; height: 46px; border-radius: 4px; background: url(../assets/cards/back.webp) center/cover; transform: skewX(-10deg); box-shadow: 4px 0 0 #e8e1d0, 8px 0 0 #d9d1bd; }
.bet-circle { position: absolute; bottom: 14px; left: 50%; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%; border: 3px solid var(--print-line); pointer-events: none; }

/* ---------- blackjack ---------- */
.bj-table { min-height: 520px; padding-top: 70px; display: flex; flex-direction: column; }
.bj-table .dealer-zone { order: 1; position: relative; z-index: 2; }
.bj-print { order: 2; position: relative; display: block; width: min(820px, 96%); height: auto; margin: -6px auto -70px; }
.bj-table .table-msg { order: 3; position: relative; z-index: 2; margin: 0 0 8px; }
.bj-table .others { order: 4; }
.bj-table .my-zone { order: 5; }
.zone-label .avatar { box-shadow: 0 0 0 2px #fde68a; }
.my-zone { min-height: 220px; align-items: flex-end; }
.my-zone.my-turn { background: radial-gradient(ellipse at 50% 80%, rgba(255, 220, 120, .16), transparent 70%); box-shadow: none; }
.bj-hand.active { background: rgba(255, 220, 120, .1); box-shadow: inset 0 0 0 2px rgba(255, 220, 120, .6); }
.other { background: rgba(0, 0, 0, .18); border: 1px solid var(--print-line); }

/* ---------- roulette wheel ---------- */
.rl-layout.felt { padding: 22px; grid-template-columns: minmax(280px, 420px) 1fr; }
.wheel-wrap { max-width: 420px; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .7)); }
.wheel-pointer { display: none; }
.rw-bowl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; user-select: none; }
.wheel.rw-rotor {
  position: absolute; z-index: 2; width: 63.4%; height: 63.4%; left: 17.2%; top: 18.2%;
  border-radius: 50%; box-shadow: 0 0 0 3px #3b1c08, 0 0 18px rgba(0, 0, 0, .8);
}
.rotor-svg { width: 100%; height: 100%; display: block; }
.rw-turret { position: absolute; width: 50%; height: 50%; left: 25%; top: 25%; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .6)); user-select: none; }
.rw-gloss { position: absolute; inset: 0; z-index: 3; border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse 60% 40% at 38% 26%, rgba(255, 255, 255, .22), transparent 70%); }
.ball-track { z-index: 4; }
.ball { top: 9%; width: 3.6%; height: 3.6%; margin-left: -1.8%; background: radial-gradient(circle at 35% 30%, #fff 0 25%, #e5e7eb 50%, #9ca3af); box-shadow: 0 2px 3px rgba(0, 0, 0, .7); }
.ball-track.run { animation: ball 6.2s cubic-bezier(.12, .55, .18, 1) both; }
.ball-track.run .ball { animation: balldrop 6.2s ease-in both; }
@keyframes balldrop { 0%, 58% { top: 7%; } 82% { top: 22%; } 88% { top: 19.5%; } 100% { top: 21.6%; } }
.ball-track:not(.run) .ball { top: 21.6%; }
.wheel-result { z-index: 5; width: 26%; height: 26%; font-family: Georgia, serif; font-size: clamp(1.6rem, 4vw, 2.6rem); border: 4px solid #f7d27a; box-shadow: 0 0 30px rgba(0, 0, 0, .6); }

/* ---------- roulette layout: printed on felt ---------- */
.rl-board {
  grid-template-rows: repeat(3, 72px);
  background: transparent; border: 0; padding: 0; gap: 0;
  border-top: 2px solid var(--print-line); border-left: 2px solid var(--print-line);
}
.rl-cell {
  border-radius: 0; background: transparent !important; border: 0;
  border-right: 2px solid var(--print-line); border-bottom: 2px solid var(--print-line);
  color: #fff; font-family: Georgia, serif;
}
.rl-cell:hover:not(:disabled) { background: rgba(255, 255, 255, .1) !important; box-shadow: none; }
.rl-cell .oval {
  display: grid; place-items: center; width: 80%; max-width: 50px; aspect-ratio: 1 / 1.25; border-radius: 50%;
  font-size: 1.25rem; font-weight: 700; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 1px 0 rgba(255, 255, 255, .2);
}
.rl-cell.red .oval { background: radial-gradient(circle at 40% 30%, #e23146, #a3101f); }
.rl-cell.black .oval { background: radial-gradient(circle at 40% 30%, #3a3a42, #0c0c10); }
.rl-cell.zero { clip-path: none; }
.rl-cell.zero .oval { background: radial-gradient(circle at 40% 30%, #25b45a, #0c6b30); width: 80%; max-width: 56px; font-size: 1.6rem; }
.rl-cell.col { color: var(--print); font-size: .95rem; }
.rl-cell.out { color: var(--print); font-weight: 700; font-family: 'Heebo', sans-serif; min-height: 66px; font-size: 1.15rem; }
.rl-outside { gap: 0; margin-top: 0; border-left: 2px solid var(--print-line); }
.rl-dozens, .rl-evens { gap: 0; }
.rl-cell.out.red, .rl-cell.out.black { background: transparent !important; }
.diamond { width: 34px; height: 34px; transform: rotate(45deg) scaleY(.7); border-radius: 3px; box-shadow: 0 0 0 2px rgba(255, 236, 179, .6); }
.diamond.red { background: linear-gradient(135deg, #e23146, #a3101f); }
.diamond.black { background: linear-gradient(135deg, #3a3a42, #0c0c10); }
.rl-cell.winner { background: rgba(255, 220, 100, .28) !important; box-shadow: inset 0 0 0 3px #ffd34d; }
.bet-dot .chip { --s: 34px; bottom: 50%; left: 50%; transform: translate(-50%, 50%); }
.bet-dot em { bottom: 2px; left: 50%; transform: translateX(-50%); }
.rl-history .hist { font-family: Georgia, serif; }

/* ---------- poker ---------- */
.pk-table {
  border-width: 26px; border-radius: 50% / 46%;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(255, 255, 255, .14), transparent 70%) padding-box,
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55)) padding-box,
    var(--tex-felt) center/360px padding-box,
    var(--tex-leather) center/240px border-box;
  box-shadow: inset 0 0 0 2px rgba(255, 220, 140, .5), inset 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 4px #1a0d05, 0 0 0 9px #5a2d0c, 0 30px 70px rgba(0, 0, 0, .7);
}
.pk-table::after { inset: -26px; border-radius: 50% / 46%; padding: 26px; background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 25%); }
.pk-print { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; opacity: .16; pointer-events: none; transform: translateY(-28%); }
.pk-print img { width: 90px; height: 90px; border-radius: 50%; filter: grayscale(1) brightness(1.8); }
.pk-print span { font-weight: 900; font-size: 1.6rem; letter-spacing: .2em; color: #fff; }
.pk-plate { background: linear-gradient(180deg, rgba(30, 14, 50, .95), rgba(12, 5, 24, .95)); border-color: rgba(255, 220, 140, .35); }
.pk-table { height: clamp(500px, 50vw, 620px); }
.pk-bet { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .35); padding: 2px 10px 2px 4px; border-radius: 999px; font-weight: 800; color: #fde68a; font-size: .85rem; }
.pk-seat.top { flex-direction: column; }
.pk-seat.top .pk-plate { order: -1; }
.pk-print { transform: translateY(30%); }
.pk-print span { font-size: 1.1rem; }
.pk-bet .chip-stack > span { margin-top: -27px; }
.pk-pot { background: rgba(0, 0, 0, .4); border: 1px solid var(--print-line); }
.dealer-btn { width: 24px; height: 24px; background: radial-gradient(circle at 40% 30%, #fff, #d6d3cc); box-shadow: 0 2px 0 #8a857a, 0 3px 6px rgba(0, 0, 0, .5); font-family: Georgia, serif; }

/* ---------- baccarat ---------- */
.bac-table { --felt-tex: url(../assets/tex/felt-blue.webp); padding-top: 70px; }
.bac-table .bac-hands { position: relative; z-index: 2; }
.bac-hand { background: transparent; border: 2px solid var(--print-line); }
.bac-hand h3 { color: var(--print); letter-spacing: .08em; }
.bac-vs { color: var(--print); font-family: Georgia, serif; }
.bac-sides { position: relative; z-index: 2; margin: 18px auto 10px; max-width: 760px; gap: 0; grid-template-columns: 1fr .75fr 1fr; }
.bac-side {
  position: relative; background: transparent !important; border: 2px solid var(--print-line); border-radius: 0;
  color: var(--print); padding: 16px 8px 18px; min-height: 108px; transform: none !important;
}
.bac-side:first-child { border-radius: 0 60px 60px 0; }
.bac-side:last-child { border-radius: 60px 0 0 60px; }
.bac-side:not(:first-child) { border-right-width: 0; }
.bac-side b { font-size: 1.6rem; letter-spacing: .1em; }
.bac-side.player b { color: #93c5fd; }
.bac-side.banker b { color: #fca5a5; }
.bac-side.tie b { color: #86efac; }
.bac-side.on { background: rgba(255, 220, 120, .12) !important; box-shadow: inset 0 0 0 3px #ffd34d !important; }
.bac-side.won { animation: winner .6s 4; background: rgba(255, 220, 120, .25) !important; }
.spot-chip { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-style: normal; }
.spot-chip .chip { --s: 44px; }
.spot-chip em { font-style: normal; font-size: .75rem; font-weight: 900; background: #fde047; color: #111; padding: 0 6px; border-radius: 6px; margin-top: -6px; }

/* ---------- hi-lo & dice tables ---------- */
.hilo-table { --felt-tex: url(../assets/tex/felt-red.webp); }
.hilo-btn { border: 2px solid rgba(255, 236, 179, .5); }
.dice-table { --felt-tex: var(--tex-felt); }
.dice-row { perspective: 900px; gap: 60px; margin: 30px 0 34px; min-height: 130px; }
.die3d { --size: clamp(80px, 14vw, 110px); --h: calc(var(--size) / 2); position: relative; width: var(--size); height: var(--size); transform-style: preserve-3d; }
.die3d .cube { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.die3d.roll .cube { animation: tumble 1.2s cubic-bezier(.2, .7, .25, 1) var(--delay) both; }
.die3d.roll { animation: hop 1.2s ease-out var(--delay) both; }
@keyframes tumble { from { transform: rotateX(var(--fx)) rotateY(var(--fy)); } }
@keyframes hop { 0% { transform: translate(-30vw, -60px); } 45% { transform: translate(20px, -30px); } 70% { transform: translate(0, 0); } 82% { transform: translate(0, -10px); } 100% { transform: none; } }
.die3d .side {
  position: absolute; inset: 0; border-radius: 18%; display: grid; grid-template-columns: repeat(3, 1fr); padding: 15%; gap: 6%;
  background: radial-gradient(circle at 30% 25%, #ff5a6b, #c3112a 60%, #8d0a1d);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), inset 0 0 18px rgba(0, 0, 0, .35);
  backface-visibility: hidden;
}
.die3d .side i { border-radius: 50%; }
.die3d .side i.on { background: radial-gradient(circle at 40% 35%, #fff, #e5e7eb 60%, #a1a1aa); box-shadow: inset 0 2px 2px rgba(0, 0, 0, .3); }
.die-shadow { position: absolute; left: 10%; right: 10%; bottom: -18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .45); filter: blur(6px); transform: translateZ(-60px); }
.die { display: none; }

/* ---------- slot machine cabinet ---------- */
.slot-machine {
  padding: 18px 18px 22px; border-radius: 40px 40px 26px 26px;
  background: linear-gradient(90deg, #6b5a2b, #f5df9b 12%, #b8903a 24%, #fff2c4 50%, #b8903a 76%, #f5df9b 88%, #6b5a2b);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .7), inset 0 2px 0 rgba(255, 255, 255, .6), 0 0 80px rgba(255, 190, 80, .18);
}
.slot-topper {
  margin: -4px 10px 12px; padding: 14px 10px 10px; border-radius: 30px 30px 12px 12px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #ff4a7a, #9b0f3c 60%, #4c0620);
  box-shadow: inset 0 0 0 3px #ffd98a, inset 0 -10px 20px rgba(0, 0, 0, .4);
}
.slot-topper span { display: block; font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 900; color: #ffe9a8; text-shadow: 0 0 10px #ff9d00, 0 0 24px #ff3d6e, 0 3px 0 #6b0a24; letter-spacing: .05em; }
.slot-topper em { font-style: normal; color: #ffd5e2; font-weight: 700; font-size: .9rem; }
.slot-lights { position: static; display: flex; justify-content: space-between; padding: 0 14px 10px; }
.slot-lights i { background: #ffe680; box-shadow: 0 0 8px #ffd000, 0 0 16px #ff9900; }
.slot-glass { display: grid; grid-template-columns: 34px 1fr 34px; gap: 6px; align-items: center; padding: 12px; border-radius: 22px; background: linear-gradient(180deg, #1a0b10, #320c1b); box-shadow: inset 0 0 0 3px #7a5a1d, inset 0 10px 30px rgba(0, 0, 0, .8); }
.line-tabs { display: flex; flex-direction: column; justify-content: space-around; height: 100%; }
.line-tabs span { display: grid; place-items: center; height: 28px; border-radius: 8px; font-weight: 900; font-size: .85rem; background: #3a2a10; color: #8a744a; }
.line-tabs span.on { background: linear-gradient(180deg, #ffe07a, #e2a81c); color: #3a2203; box-shadow: 0 0 10px rgba(255, 200, 60, .6); }
.slot-window { --sym: clamp(76px, 10vw, 118px); padding: 0; gap: 6px; background: transparent; box-shadow: none; }
.slot-glass { direction: ltr; }
.reel {
  background: linear-gradient(180deg, #b9b2a3 0%, #fbf8f1 16%, #ffffff 50%, #fbf8f1 84%, #b9b2a3 100%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3); border-radius: 8px;
}
.sym { padding: 14%; }
.slots-wrap { grid-template-columns: 1fr 260px; max-width: 980px; margin: 0 auto; }
.slot-topper { padding: 10px 10px 8px; }
.sym img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); user-select: none; }
.reel-shade { position: absolute; inset: 0; pointer-events: none; border-radius: 8px; background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 22%, transparent 78%, rgba(0, 0, 0, .45)); }
.paylines { inset: 0; width: 100%; height: 100%; z-index: 2; }
.paylines polyline.hit { stroke: #ff3d6e; stroke-width: 5; filter: drop-shadow(0 0 6px #ff3d6e); }
.slot-panel { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 18px; background: linear-gradient(180deg, #2b1220, #160710); box-shadow: inset 0 0 0 2px #7a5a1d; }
.led { padding: 6px 12px; border-radius: 10px; background: #0b0204; box-shadow: inset 0 0 0 2px #3b0a14, inset 0 0 18px rgba(255, 30, 60, .15); text-align: center; }
.led small { display: block; color: #ffb3c1; font-size: .72rem; font-weight: 700; letter-spacing: .1em; }
.led b { display: block; color: #ff3b5c; font-family: 'Courier New', monospace; font-size: 1.35rem; font-weight: 900; text-shadow: 0 0 8px rgba(255, 50, 80, .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spin-round {
  width: 92px; height: 92px; border-radius: 50%; font-size: 1.2rem; font-weight: 900; color: #3b0610;
  background: radial-gradient(circle at 40% 30%, #fff1a8, #ffc52e 45%, #d48a06);
  box-shadow: 0 6px 0 #8a5404, 0 10px 24px rgba(255, 180, 40, .45), inset 0 -4px 8px rgba(0, 0, 0, .2), 0 0 0 5px #3b2203;
  transition: transform .1s;
}
.spin-round:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #8a5404, 0 0 0 5px #3b2203; }
.spin-round:disabled { filter: grayscale(.6) brightness(.7); }
.slot-win { display: none; }
.paytable { background: linear-gradient(180deg, #2b1220, #160710); border: 2px solid #7a5a1d; }
.pt-syms img { width: 34px; height: 34px; object-fit: contain; }
.pt-syms i { width: 34px; }
.pt-row b { font-family: Georgia, serif; }

/* ---------- video poker machine ---------- */
.vp-wrap { padding: 16px; border-radius: 30px; background: linear-gradient(90deg, #4a4a52, #c9c9d2 10%, #7d7d88 22%, #e8e8ee 50%, #7d7d88 78%, #c9c9d2 90%, #4a4a52); box-shadow: 0 30px 60px rgba(0, 0, 0, .7); }
.vp-paytable { background: #001a8c; border: 4px solid #ffd700; border-radius: 10px; gap: 0 18px; box-shadow: inset 0 0 30px rgba(0, 0, 0, .5); }
.vp-pay { color: #ffd700; font-family: Georgia, 'Heebo', serif; font-weight: 700; text-transform: uppercase; border-radius: 0; border-bottom: 1px solid rgba(255, 215, 0, .15); }
.vp-pay b { color: #ffd700; }
.vp-pay.hit { background: #d40000; color: #fff; }
.vp-pay.hit b { color: #fff; }
.vp-screen { background: radial-gradient(ellipse at 50% 40%, #0a3cc4, #002080 60%, #001050); border: 4px solid #0b0b10; border-radius: 16px; box-shadow: inset 0 0 50px rgba(0, 0, 0, .6), 0 0 0 4px #2a2a30; }
.vp-card .card { --w: clamp(60px, 15vw, 128px); }
.vp-card.held .card { transform: translateY(-10px); box-shadow: 0 0 0 4px #ffd700, 0 12px 20px rgba(0, 0, 0, .5); }
.hold-tag { font-family: Georgia, serif; color: #ffd700; letter-spacing: .1em; }
.vp-card.held .hold-tag { background: #ffd700; color: #001a8c; }
.vp-msg { color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }

/* ---------- bet panel under the tables ---------- */
.controls {
  background: linear-gradient(180deg, rgba(40, 20, 10, .9), rgba(18, 8, 4, .92)), var(--tex-wood) center/300px;
  border: 1px solid rgba(255, 210, 140, .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 20px 40px rgba(0, 0, 0, .5);
}

@media (max-width: 900px) {
  .rl-layout.felt { grid-template-columns: 1fr; }
  .slots-wrap { grid-template-columns: 1fr; }
  .slot-side { order: 2; }
}
@media (max-width: 680px) {
  .felt { border-width: 12px; border-radius: 24px; }
  .felt::after { inset: -12px; padding: 12px; border-radius: 24px; }
  .pk-table { border-width: 16px; border-radius: 42% / 30%; height: 540px; }
  .pk-bet { font-size: .72rem; padding: 1px 8px 1px 2px; }
  .pk-bet .chip-stack .chip.sm { --s: 24px; }
  .pk-bet .chip-stack > span { margin-top: -20px; }
  .pk-table::after { inset: -16px; padding: 16px; border-radius: 42% / 30%; }
  .chip-rack { transform: translateX(-50%) scale(.7); transform-origin: top center; }
  .card-shoe { transform: rotate(-8deg) scale(.6); transform-origin: top left; left: 10px; top: 10px; }
  .bj-table { padding-top: 54px; min-height: 0; }
  .bj-print { width: 100%; margin-bottom: -30px; }
  .print-big { font-size: 46px; }
  .print-small { font-size: 26px; }
  .bac-table { padding-top: 54px; }
  .bac-side { min-height: 90px; padding: 12px 4px 18px; }
  .bac-side b { font-size: 1.2rem; }
  .bac-side span { font-size: .72rem; }
  .bac-side:first-child { border-radius: 0 36px 36px 0; }
  .bac-side:last-child { border-radius: 36px 0 0 36px; }
  .rl-layout.felt { padding: 10px; }
  .rl-board { grid-template-rows: 50px repeat(12, 44px) 42px; }
  .rl-cell.out { min-height: 52px; font-size: 1rem; }
  .rl-cell .oval { font-size: .95rem; width: auto; height: 80%; aspect-ratio: 1.35 / 1; max-width: none; }
  .rl-cell.zero .oval { width: auto; height: 84%; aspect-ratio: 1.6 / 1; max-width: none; }
  .bet-dot .chip { --s: 28px; }
  .slot-glass { grid-template-columns: 22px 1fr 22px; padding: 8px; gap: 4px; }
  .line-tabs span { height: 22px; font-size: .7rem; border-radius: 6px; }
  .slot-panel { grid-template-columns: 1fr 1fr; }
  .spin-round { grid-column: 1 / span 2; justify-self: center; }
  .vp-wrap { padding: 8px; }
  .dice-row { gap: 40px; }
}

/* ---------- fit the whole game in one screen (no scrolling on desktop/laptop) ---------- */
@media (min-width: 681px) {
  main:has(.game-screen) { padding-top: 10px; padding-bottom: 12px; }
  .game-head { margin-bottom: 8px; }
  .game-head h1 { font-size: 1.4rem; }
  .pk-table { height: clamp(380px, calc(100dvh - 400px), 620px); margin-bottom: 26px; }
  .pk-log { margin-top: 2px; min-height: 0; }
  .bj-table { min-height: 0; padding-top: 62px; }
  .wheel-wrap { max-width: min(420px, calc(100dvh - 330px)); }
  .slot-window { --sym: clamp(64px, min(10vw, calc((100dvh - 470px) / 3)), 118px); }
  .controls { margin-top: 10px; padding: 10px 14px; }
  .controls-top { margin-bottom: 8px; }
  .pk-coach { padding: 6px 10px; margin-bottom: 8px; gap: 4px 14px; }
  .pk-coach .tip { width: auto; }
}
@media (min-width: 681px) and (max-height: 860px) {
  :root { --card-w: 72px; }
  .btn-xl { min-height: 52px; font-size: 1.1rem; }
  .chip { --s: 48px; }
  .bj-table { padding-top: 56px; }
  .bj-print { margin-bottom: -86px; }
  .my-zone { min-height: 170px; }
  .bac-table { padding-top: 56px; }
  .bac-side { min-height: 88px; padding: 10px 6px 16px; }
  .dice-row { margin: 16px 0 22px; }
  .hilo-main { margin: 6px 0; }
  .slot-topper { margin-bottom: 6px; }
  .slot-topper em { display: none; }
  .vp-paytable { padding: 8px; }
  .vp-screen { padding: 14px 10px; }
}
@media (min-width: 681px) {
  .wheel-wrap { max-width: min(420px, calc(100dvh - 350px)); }
  .slot-window { --sym: clamp(60px, min(10vw, calc((100dvh - 570px) / 3)), 118px); }
  .bj-print { width: min(700px, 80%); margin: -14px auto -100px; }
  .my-zone { min-height: 0; padding: 6px; }
  .bj-table .table-msg { margin-bottom: 2px; }
}
@media (min-width: 681px) and (max-height: 860px) {
  .bj-print { width: min(560px, 70%); margin: -16px auto -84px; }
  .bj-table { padding-top: 48px; padding-bottom: 8px; }
  .zone-label { margin-bottom: 4px; }
  .chip-rack { transform: translateX(-50%) scale(.8); transform-origin: top center; }
  .slot-panel { margin-top: 8px; padding: 8px; }
  .spin-round { width: 76px; height: 76px; }
  .slot-lights { padding-bottom: 6px; }
}
@media (min-width: 681px) and (max-height: 860px) {
  .rl-board { grid-template-rows: repeat(3, 62px); }
  .rl-cell.out { min-height: 54px; }
  .rl-layout.felt { padding: 14px 18px; }
  .rl-tip { margin-bottom: 6px; }
  .bj-table .dealer-zone .cards, .bj-table .my-zone .cards { min-height: 0; }
  .hand-meta { margin-top: -4px; }
  .bj-hand { gap: 4px; padding: 2px 6px; }
}
@media (min-width: 681px) {
  .coach-tip { width: auto; order: -1; padding: 0 8px; }
  .controls-top { margin-bottom: 6px; }
}

/* ==========================================================
   Accessibility, legal pages, consent
   ========================================================== */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -60px; right: 12px; z-index: 300; padding: 12px 18px; border-radius: 12px; background: var(--gold); color: #2b1600; font-weight: 800; transition: top .2s; }
.skip-link:focus { top: 10px; }
.a11y-fab {
  position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 16px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: #1d4ed8; color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .5), 0 0 0 3px #fff;
}
.a11y-fab svg { width: 30px; height: 30px; }
.a11y-panel {
  position: fixed; bottom: 82px; left: 16px; z-index: 95; width: min(320px, calc(100vw - 32px));
  padding: 16px; border-radius: 18px; background: #fff; color: #111; box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
.a11y-panel h2 { margin: 0 0 10px; font-size: 1.2rem; }
.a11y-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.a11y-row > span { font-weight: 700; margin-left: auto; }
.a11y-opt { min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 2px solid #c7c7d1; font-weight: 700; color: #111; }
.a11y-opt.on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.a11y-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 4px; font-weight: 700; color: #111; border-bottom: 1px solid #eee; text-align: right; }
.a11y-toggle .dot { width: 44px; height: 26px; border-radius: 999px; background: #c7c7d1; position: relative; flex: none; }
.a11y-toggle .dot::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.a11y-toggle.on .dot { background: #16a34a; }
.a11y-toggle.on .dot::after { right: 21px; }
.a11y-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.a11y-link { color: #1d4ed8; text-decoration: underline; font-weight: 700; min-height: 40px; }
html.huge-text { font-size: 24px; --card-w: 104px; }
html.a11y-focus :focus { outline: 4px solid #ffd400 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #000 !important; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
html.a11y-still .hero-bg { animation: none !important; }
html.a11y-contrast { --muted: #fff; --print: #fff; --print-line: rgba(255, 255, 255, .9); }
html.a11y-contrast body { background: #000; }
html.a11y-contrast .bg-glow { background: #000 !important; }
html.a11y-contrast .btn-ghost, html.a11y-contrast .stack-pill, html.a11y-contrast .bet-opt, html.a11y-contrast .toggle { background: #000; border: 2px solid #fff; color: #fff; }
html.a11y-contrast .muted, html.a11y-contrast .tile-body p, html.a11y-contrast .hero-sub { color: #fff; }
html.a11y-contrast .table-msg, html.a11y-contrast .wait-msg { color: #ffff00; text-shadow: 0 0 0 #000, 0 2px 4px #000; }
html.a11y-contrast .modal-card { background: #000; border: 3px solid #fff; }
html.a11y-contrast .felt { filter: contrast(1.15); }

.consent { display: flex; gap: 10px; align-items: flex-start; text-align: right; margin: 4px 0 16px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: .95rem; cursor: pointer; }
.consent input { width: 26px; height: 26px; flex: none; accent-color: var(--gold); margin-top: 2px; }
.text-link { color: var(--gold); text-decoration: underline; font-weight: 700; padding: 0; min-height: 0; display: inline; }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: .85rem; font-weight: 400; }
.foot { line-height: 1.7; }
.foot-note { max-width: 760px; margin: 0 auto 8px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-bottom: 6px; }
.foot-links .text-link { min-height: 36px; font-weight: 500; }
.legal { font-size: 1rem; line-height: 1.7; }
.legal h3 { font-size: 1.1rem; margin: 18px 0 6px; color: var(--gold); }
.legal ul { padding-right: 22px; }
.legal a { color: var(--gold); text-decoration: underline; }
.legal-meta { color: var(--muted); font-size: .85rem; }
.modal-card:has(.legal) { width: min(760px, 100%); }
.settings-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0; }
.select { width: 100%; min-height: 52px; padding: 8px 14px; border-radius: 14px; font: inherit; font-size: 1.05rem; background: rgba(0, 0, 0, .3); color: var(--text); border: 2px solid var(--line); }
.btn.danger { color: #fecaca; border-color: rgba(248, 113, 113, .5); }
.small { font-size: .85rem; }
body.modal-open { overflow: hidden; }
@media (max-width: 680px) { .a11y-fab { width: 48px; height: 48px; bottom: 12px; left: 12px; } }
.host-panel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.host-panel h3 { margin: 0 0 6px; font-size: 1.1rem; }
.host-panel .switch-row svg { width: 18px; height: 18px; display: inline; vertical-align: -3px; }
.host-players { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.host-players li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--panel); }
.host-players li .btn { margin-right: auto; }
.react-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.reaction {
  position: absolute; top: 14%; left: 50%; z-index: 30; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 18px; font-weight: 800; font-size: 1.15rem; white-space: nowrap;
  background: #fff; color: #1b0e3d; border: 3px solid var(--c); box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  animation: reactIn 3.2s ease forwards; pointer-events: none;
}
@keyframes reactIn { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.8); } 10% { opacity: 1; transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -20px); } }

[hidden] { display: none !important; }
.bonus-wheel-wrap { position: relative; width: min(300px, 80vw); margin: 0 auto 10px; }
.bonus-wheel { width: 100%; height: auto; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .5)); }
.bw-pointer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 2; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid #fde68a; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .6)); }
.center { text-align: center; }

/* keep the floating accessibility button from covering the last buttons */
@media (max-width: 1340px) { main#app { padding-bottom: 84px !important; } }
.ach-title { margin: 20px 0 10px; font-size: 1.15rem; display: flex; gap: 10px; align-items: baseline; }
.ach-title .muted { font-size: .9rem; font-weight: 500; }
.ach-grid { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ach { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); opacity: .55; }
.ach.got { opacity: 1; border-color: rgba(247, 201, 72, .6); background: linear-gradient(135deg, rgba(247, 201, 72, .18), rgba(0, 0, 0, .2)); }
.ach-ico { grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--muted); }
.ach.got .ach-ico { background: var(--gold); color: #3b2203; }
.ach-ico svg { width: 20px; height: 20px; }
.ach b { font-size: .95rem; }
.ach small { color: var(--muted); font-size: .8rem; }
.paused-tab { min-height: 100vh; display: grid; place-content: center; gap: 16px; text-align: center; padding: 24px; }
.toast { bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px)); }
