/* Catsino: a debonair night at the tables. Mahogany, brass, felt and lamplight. Mobile first at 390x844, down to 360.
   The room (--room), the felt and the trim come from the room you sit in (rules.js THEMES, set by game.js). */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/playfair-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/cinzel-latin-700-normal.woff2") format("woff2"); }
:root {
  --bg: #120c08;
  --ink: #f6ecd6;
  --ink-soft: #cdbb98;
  --gold: #e6c26e;
  --gold-deep: #8a6420;
  --felt: #1f5e3b;
  --felt-deep: #123d26;
  --trim: #5a3418;
  --metal: #d9b46a;
  --room: url("assets/room-emerald.webp");
  --good: #6fd08c;
  --bad: #ff8a7a;
}
* { box-sizing: border-box; touch-action: manipulation; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(120% 60% at 50% 0%, #3a2414 0%, var(--bg) 70%) fixed, var(--bg);
  color: var(--ink);
  font-family: 'Baloo 2', system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }

/* the title screen's colors (shared/menu.css reads these) */
.sg-menu, .sg-sheet {
  --sg-bg: radial-gradient(130% 70% at 50% 0%, #4a2a14 0%, #1a100a 55%, #0b0705 100%);
  --sg-ink: #f6ecd6;
  --sg-ink-soft: #cdbb98;
  --sg-title: #f1d27f;
  --sg-title-shadow: 0 3px 0 #5e3d0c, 0 0 24px rgba(241, 210, 127, .35);
  --sg-accent: #e6c26e;
  --sg-accent-ink: #2a1a06;
  --sg-card: rgba(246, 236, 214, .08);
  --sg-card-ink: #f6ecd6;
  --sg-line: rgba(230, 194, 110, .3);
  --sg-sheet-bg: #fbf4e4;
  --sg-sheet-ink: #2a1a06;
  --sg-font: 'Baloo 2', system-ui, sans-serif;
}
#mm.sg-menu, #mm .sg-menu { --sg-bg: linear-gradient(180deg, rgba(11, 7, 5, .62) 0%, rgba(11, 7, 5, .5) 30%, rgba(11, 7, 5, .88) 62%, #0b0705 100%), var(--room) center 30% / cover no-repeat, #0b0705; }
.sg-menu .sg-title { font-family: "Playfair Display", Georgia, serif; letter-spacing: .01em; }

/* the title's picture gets the room it needs: the fan of cards is never cut off */
#mm .sg-art { height: clamp(180px, 31dvh, 270px); overflow: visible; }
#mm .sg-art > * { max-height: none; }
.cs-title-art { position: relative; height: 100%; width: 100%; max-width: 380px; margin: 0 auto; container-type: size; }
.cs-title-art .fan { position: absolute; left: 0; right: 0; top: 0; bottom: 30px; }
.cs-title-art .ta-chips { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 2px; z-index: 9; }
.cs-title-art .ta-chips svg { width: 36px; height: 36px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5)); }
.cs-title-art .ta-chips svg:nth-child(odd) { transform: translateY(-6px) rotate(-12deg); }

/* A dealer's playing card: cream stock, gold rule, corners, a framed portrait (the cat whole, never cropped). */
.dcard {
  --cw: 116px;
  position: relative; display: block; width: var(--cw); aspect-ratio: 5 / 7; padding: 0; border-radius: calc(var(--cw) * .08);
  background: linear-gradient(160deg, #fffaf0, #f3e6c8); border: 1px solid #c9b48a; color: #1b1b1f; text-align: left;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 22px rgba(0, 0, 0, .45), 0 2px 4px rgba(0, 0, 0, .3);
  font-family: Georgia, 'Times New Roman', serif;
}
.dcard::before { content: ""; position: absolute; inset: 4px; border-radius: calc(var(--cw) * .06); border: 1px solid rgba(138, 100, 32, .55); pointer-events: none; }
.dc-corner { position: absolute; top: 4px; left: 6px; display: flex; flex-direction: column; align-items: center; font-weight: 700; font-size: calc(var(--cw) * .15); line-height: .9; z-index: 2; }
.dc-corner i { font-style: normal; font-size: .8em; }
.dc-corner.red { color: #b3202f; }
.dc-corner.flip { top: auto; left: auto; bottom: 5px; right: 7px; transform: rotate(180deg); }
.dc-frame {
  position: absolute; left: 9%; right: 9%; top: 10%; bottom: 17%; border-radius: 44% 44% 8px 8px / 30% 30% 8px 8px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 18%, color-mix(in srgb, var(--tc) 55%, #fff3d6), var(--tc) 60%, color-mix(in srgb, var(--tc) 60%, #000));
  border: 2px solid #c8a24e; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25);
  display: flex; align-items: flex-end; justify-content: center;
}
.dc-frame img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }
.dc-frame .dealer-code { width: 96%; }
.dc-slot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; width: 88%; margin-bottom: 30%; padding: 4px; border-radius: 6px; background: #1a0a06; }
.dc-slot svg { width: 100%; height: auto; background: #fffdf6; border-radius: 3px; }
.dc-name { position: absolute; left: 10%; right: 10%; bottom: 5.5%; text-align: center; font: 800 calc(var(--cw) * .12)/1.1 "Playfair Display", Georgia, serif; color: #5e3d0c; }

/* the title: five cards fanned from a point under the middle, like a winning hand */
.fan-card { position: absolute; left: 50%; bottom: 0; --cw: min(29cqw, 66cqh, 140px); margin-left: calc(var(--cw) / -2);
  transform-origin: 50% 100%; transform: translateX(calc(var(--k) * var(--cw) * .46)) rotate(calc(var(--k) * 8deg)) translateY(calc(var(--k) * var(--k) * 5px)); z-index: calc(10 - var(--k) * var(--k));
  animation: fanout .7s cubic-bezier(.2, .9, .3, 1.1) backwards; animation-delay: calc(var(--i) * .06s + .1s); }
@keyframes fanout { from { transform: rotate(0deg) translateY(30px); opacity: 0; } }

.screen { min-height: 100dvh; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; position: relative; }
.bar { display: flex; align-items: center; gap: 10px; padding: var(--sg-corner-top, 12px) 0 8px var(--sg-corner-left, 0); min-height: 60px; position: relative; z-index: 2; }
.bar-title { flex: 1; margin: 0; font: 700 17px/1.1 "Cinzel", Georgia, serif; letter-spacing: .08em; text-align: center; color: var(--gold); text-transform: uppercase; text-shadow: 0 2px 4px #000, 0 0 12px rgba(0, 0, 0, .9); }
.bal { margin: 0; min-width: 84px; text-align: right; }
.bal b { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(230, 194, 110, .55); color: #ffe7a3; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-soft); }

/* ---------- the lobby ---------- */
.claim { margin: 6px 0 14px; min-height: 72px; }
.claim-btn {
  position: relative; width: 100%; min-height: 72px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 10px 16px; border: 0; border-radius: 16px; text-align: left; color: #2a1a06;
  background: linear-gradient(180deg, #ffe7a3, #e0b04f); box-shadow: 0 4px 0 #8a6420, 0 10px 24px rgba(224, 176, 79, .25);
  animation: glow 2.4s ease-in-out infinite;
}
.claim-btn span { grid-row: span 2; display: flex; }
.claim-btn b { font-size: 21px; line-height: 1; font-weight: 800; }
.claim-btn small { font-size: 14px; color: #5e3d0c; }
.claim-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a6420; }
@keyframes glow { 50% { box-shadow: 0 4px 0 #8a6420, 0 10px 30px rgba(255, 215, 120, .5); } }
.claim-wait { min-height: 64px; display: flex; flex-direction: column; justify-content: center; padding: 10px 16px; border-radius: 16px; border: 1px dashed rgba(230, 194, 110, .4); background: rgba(0, 0, 0, .25); }
.claim-wait b { font: 700 13px/1.2 "Cinzel", Georgia, serif; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
.claim-wait small { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }

.lobby-screen > *:not(.room-bg) { position: relative; z-index: 1; }
.lobby-screen .room-bg::after { background: linear-gradient(180deg, rgba(8, 5, 3, .5) 0%, rgba(8, 5, 3, .72) 30%, rgba(8, 5, 3, .9) 70%); }
.marquee-title { padding: 6px 0; border-radius: 10px; background: radial-gradient(circle, #ffe7a3 0 1.6px, transparent 2.2px) 0 0 / 12px 12px repeat-x, radial-gradient(circle, #ffe7a3 0 1.6px, transparent 2.2px) 6px 100% / 12px 12px repeat-x; animation: bulbs 1.6s steps(2) infinite; }
@keyframes bulbs { 50% { background-position: 6px 0, 0 100%; } }
.doors { display: flex; flex-direction: column; gap: 4px; margin: 4px -16px 0; padding: 10px 0 6px; }
.hand { display: flex; justify-content: center; align-items: flex-start; }
.table-card { --cw: min(30vw, 128px); margin: 0 -3px; transform: rotate(calc(var(--k) * 6deg)) translateY(calc(var(--k) * var(--k) * 9px)); transition: transform .18s ease-out; z-index: calc(2 - var(--k) * var(--k)); }
.table-card:active, .table-card:focus-visible { transform: rotate(calc(var(--k) * 6deg)) translateY(calc(var(--k) * var(--k) * 9px - 10px)) scale(1.04); z-index: 5; }
.table-card .dc-frame { bottom: 30%; }
.tc-plate { position: absolute; left: 6px; right: 6px; bottom: 7px; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.05; }
.tc-plate b { font: 800 calc(var(--cw) * .125)/1.05 "Playfair Display", Georgia, serif; color: #3a2408; }
.tc-plate small { font: 600 calc(var(--cw) * .1)/1.2 'Baloo 2', system-ui, sans-serif; color: #7a5a2a; }
.table-card .dc-corner.flip { display: none; }
.door-go svg { width: 22px; height: 22px; color: var(--gold); }
.rooms-btn {
  width: 100%; margin-top: 14px; min-height: 84px; display: grid; grid-template-columns: 96px 1fr 22px; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; text-align: left;
  border-radius: 14px; border: 1px solid #c9b48a; background: linear-gradient(160deg, #fffaf0, #f0e0bd); color: #2a1a06; box-shadow: 0 10px 22px rgba(0, 0, 0, .45);
}
.rb-pic { height: 68px; border-radius: 8px; background: var(--pic) center 30% / cover, var(--felt); border: 2px solid #c8a24e; }
.rb-words { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.rooms-btn b { font: 700 15px/1.1 "Cinzel", Georgia, serif; letter-spacing: .12em; color: #8a6420; text-transform: uppercase; }
.rooms-btn small { font-size: 15px; font-weight: 700; color: #2a1a06; }
.rooms-btn small.rb-next { font-size: 13px; font-weight: 600; color: #7a5a2a; }
.rooms-btn .door-go svg { color: #8a6420; }
.fine { text-align: center; color: var(--ink-soft); font-size: 13px; margin: 18px 0 0; }

/* rooms sheet */
.sheet-note { margin: 0 0 12px; }
.rooms { display: grid; gap: 10px; }
.room { display: grid; grid-template-columns: 74px 1fr; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(42, 26, 6, .06); border: 1px solid rgba(42, 26, 6, .12); }
.room.locked { opacity: .62; }
.room-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); }
.room-perk { font-size: 12px !important; color: #7a4a12; opacity: 1 !important; font-weight: 700; }
.room.here { border-color: #b8894a; background: rgba(230, 194, 110, .2); }
.room-pic { grid-row: span 2; width: 74px; height: 96px; border-radius: 10px; background-size: cover; background-position: center 30%; position: relative; overflow: hidden; background-color: var(--felt); }
.room-felt { position: absolute; left: -10%; right: -10%; bottom: -14px; height: 34px; border-radius: 50% 50% 0 0; background: var(--felt); border-top: 3px solid var(--metal); }
.room-words { display: flex; flex-direction: column; line-height: 1.15; }
.room-words b { font: 800 17px/1.15 "Playfair Display", Georgia, serif; }
.room-words small { font-size: 13px; opacity: .75; }
.pp-btn {
  min-height: 44px; padding: 6px 16px; border: 0; border-radius: 12px; font-weight: 800; font-size: 16px;
  background: linear-gradient(180deg, #ffe7a3, #e0b04f); color: #2a1a06; box-shadow: 0 3px 0 #8a6420;
}
.pp-btn.ghost { background: transparent; box-shadow: none; border: 2px solid #b8894a; color: #5e3d0c; }
.pp-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #8a6420; }
.pp-btn.big { width: 100%; min-height: 54px; font-size: 19px; }
.room .pp-btn { justify-self: start; }

/* ---------- a table ---------- */
.table-screen { display: flex; flex-direction: column; padding-bottom: 0; }
.table-screen > .felt { flex: 1; }
.room-bg { position: fixed; inset: 0; z-index: 0; background: var(--room) center 18% / cover no-repeat, #140d08; }
.room-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, .1) 45%, rgba(8, 5, 3, .92) 75%); }
.table-screen > *:not(.room-bg) { position: relative; z-index: 1; }
.table-screen > .bar { z-index: 4; }
.table-screen .bar .bal b { background: rgba(0, 0, 0, .6); }
.stage { height: clamp(170px, 28dvh, 260px); display: flex; align-items: flex-end; justify-content: center; position: relative; }
.stage[data-table="roulette"] { height: clamp(110px, 16dvh, 160px); }
.stage[data-table="slots"] { height: clamp(40px, 6dvh, 60px); }
.dealer { width: min(62%, 250px); margin-bottom: -18px; display: flex; justify-content: center; }
.stage[data-table="roulette"] .dealer { width: min(40%, 160px); margin-bottom: -10px; }
.dealer img { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .55)); }
.dealer-code { position: relative; width: 100%; }
.dealer-code svg:first-child { width: 100%; height: auto; display: block; }
.dealer-code .tie { position: absolute; left: 50%; bottom: 6%; width: 28%; transform: translateX(-50%); }
.say {
  position: absolute; top: 4px; right: 0; max-width: 46%; margin: 0; padding: 6px 12px; border-radius: 14px 14px 4px 14px;
  background: #fbf4e4; color: #2a1a06; font-size: 14px; font-weight: 700; line-height: 1.2; box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
.say:empty { display: none; }
.say.pop { animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

.felt {
  position: relative; margin: 0 -16px; padding: 18px 16px 14px; min-height: 230px;
  background: radial-gradient(130% 90% at 50% 0%, color-mix(in srgb, var(--felt) 85%, #fff) 0%, var(--felt) 45%, var(--felt-deep) 100%);
  border-top: 5px solid var(--metal); border-radius: 46% 46% 0 0 / 34px 34px 0 0;
  box-shadow: inset 0 10px 24px rgba(0, 0, 0, .35), 0 -2px 0 var(--trim), 0 -8px 0 color-mix(in srgb, var(--trim) 80%, #000);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.felt::before { content: ""; position: absolute; inset: 10px 12px auto; height: 1px; border-top: 1px dashed rgba(255, 255, 255, .15); border-radius: 50%; }
.felt-rule { margin: 0; font: 700 11px/1.2 "Cinzel", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--metal) 80%, #fff); opacity: .85; text-align: center; }
.felt-hint { margin: 18px 0; color: rgba(255, 255, 255, .75); font-size: 16px; }
.table-screen > .controls { position: sticky; bottom: 0; z-index: 3; margin: 0 -16px; padding-left: 16px; padding-right: 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.controls { padding: 12px 0 0; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, rgba(8, 5, 3, .55), rgba(8, 5, 3, .96) 40%); }
.ctl-note { margin: 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
.broke { margin: 0; text-align: center; color: #ffd8a8; font-size: 15px; }

/* cards */
.cards { display: flex; justify-content: center; }
.cards .card + .card { margin-left: -22px; }
.cards.ghost { opacity: .25; }
.card {
  width: 62px; height: 88px; border-radius: 8px; background: #fffdf6; position: relative; flex: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15), 0 6px 12px rgba(0, 0, 0, .35); border: 1px solid #d8ccb0;
  font-family: Georgia, 'Times New Roman', serif; font-weight: 700;
}
.card.red { color: #b3202f; }
.card.black { color: #1b1b1f; }
.card .ci { position: absolute; top: 4px; left: 5px; font-size: 15px; line-height: .95; text-align: center; }
.card .ci.flip { top: auto; left: auto; bottom: 4px; right: 5px; transform: rotate(180deg); }
.card .cm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.card .cm.face svg { width: 34px; height: 34px; }
.card.back { background: repeating-linear-gradient(45deg, var(--felt-deep) 0 6px, color-mix(in srgb, var(--felt-deep) 70%, var(--metal)) 6px 8px); border: 3px solid #fffdf6; }
.card.back i { position: absolute; inset: 8px; border-radius: 4px; border: 1.5px solid color-mix(in srgb, var(--metal) 70%, #fff); }
.card.slot { background: transparent; border: 2px dashed rgba(255, 255, 255, .25); box-shadow: none; }
.card.deal { animation: deal .38s cubic-bezier(.2, .9, .3, 1.15) backwards; }
@keyframes deal { from { transform: translate(40px, -140px) rotate(-18deg); opacity: 0; } }
.total { display: inline-block; margin-top: 6px; padding: 1px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-weight: 800; font-size: 15px; }
.verdict { display: block; margin-top: 4px; font: 800 19px/1.1 "Playfair Display", Georgia, serif; color: #ffe7a3; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.stake { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-weight: 800; font-size: 14px; }

.bj-dealer, .bj-hand, .hd-dealer, .hd-you { display: flex; flex-direction: column; align-items: center; }
.bj-hands { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.bj-hand { padding: 4px 6px; border-radius: 12px; }
.bj-hand.at { background: rgba(255, 231, 163, .14); outline: 2px solid rgba(255, 231, 163, .5); }
.bj-hand.r-lose .cards, .bj-hand.r-bust .cards, .hd-you.r-lose .cards, .hd-you.r-fold .cards { filter: saturate(.4) brightness(.8); }
.board-row { display: flex; gap: 5px; justify-content: center; margin: 4px 0; }
.board-row .card { width: 56px; height: 80px; }
.board-row .card .cm { font-size: 30px; }

/* actions */
.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.acts.two { grid-template-columns: 1fr 2fr; }
.act {
  min-height: 54px; border-radius: 14px; border: 1px solid rgba(230, 194, 110, .55); background: rgba(20, 12, 6, .8);
  color: var(--ink); font-weight: 800; font-size: 17px;
}
.act:active:not(:disabled) { transform: translateY(2px); }
.act-hit, .act-go { background: linear-gradient(180deg, #ffe7a3, #e0b04f); color: #2a1a06; border-color: #8a6420; box-shadow: 0 3px 0 #8a6420; }
.act-stand { background: linear-gradient(180deg, #7a1f2b, #4d0f18); }
.bet-picker { display: grid; grid-template-columns: auto 48px 1fr 48px auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 14px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(230, 194, 110, .35); }
.bp-label { font: 700 12px/1 "Cinzel", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding-left: 4px; }
.bp-amt { text-align: center; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bp-step, .bp-max { min-height: 44px; min-width: 44px; border-radius: 12px; border: 1px solid rgba(230, 194, 110, .5); background: rgba(255, 255, 255, .06); font-size: 22px; font-weight: 800; }
.bp-max { font-size: 14px; padding: 0 10px; }

/* roulette */
.wheel-box { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; width: 100%; }
.wheel { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 8px 18px rgba(0, 0, 0, .5); }
.spin-result { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.spin-result b { font: 800 20px/1.15 "Playfair Display", Georgia, serif; }
.pocket { min-width: 52px; height: 52px; padding: 0 8px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; border: 2px solid var(--metal); }
.pocket.red, .spot.red { background: #b3202f; }
.pocket.black, .spot.black { background: #15151a; }
.pocket.green, .spot.green { background: #1f8a4c; }
.board { width: 100%; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.tab { min-height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .25); font-weight: 700; font-size: 14px; }
.tab.on { background: rgba(255, 231, 163, .2); border-color: var(--gold); color: #ffe7a3; }
.outside { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.outside .grp { grid-column: 1 / -1; margin: 4px 0 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .7); }
.trio { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.spot {
  position: relative; min-height: 46px; border-radius: 10px; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .12);
  font-weight: 800; font-size: 16px; color: #fff;
}
.spot.won { box-shadow: 0 0 0 3px #ffe7a3, 0 0 16px rgba(255, 231, 163, .7); }
.spot .stack {
  position: absolute; top: -8px; right: -6px; min-width: 28px; height: 28px; padding: 0 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #fffdf6; color: #2a1a06; font-size: 12px; font-style: normal; font-weight: 800; border: 3px dashed #c0392b; box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}
.num-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.num-grid .spot { min-height: 44px; font-size: 15px; }
.num-grid .zero { grid-column: 1 / -1; }
.chip-row { display: flex; justify-content: center; gap: 6px; }
.chip-pick { width: 52px; height: 52px; border-radius: 50%; border: 0; background: none; padding: 4px; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
.chip-pick.on { transform: translateY(-6px) scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 231, 163, .9)); }

/* baccarat */
.acts.three { grid-template-columns: 1fr 1fr 1.6fr; }
.bac-hands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.bac-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); transition: box-shadow .3s; }
.bac-side.won { box-shadow: 0 0 0 2px #ffe7a3, 0 0 18px rgba(255, 231, 163, .5); }
.bac-label { font: 700 11px/1.2 "Cinzel", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--metal) 80%, #fff); }
.bac-side .card { width: 50px; height: 72px; }
.bac-side .card .cm { font-size: 26px; }
.bac-side .card .ci { font-size: 13px; }
.bac-side .cards .card + .card { margin-left: -16px; }
.bac-caption .verdict { margin-top: 2px; }
.bac-caption { margin: 2px 0 0; min-height: 2.5em; text-align: center; font-size: 15px; font-weight: 700; color: #fff4d8; max-width: 320px; }
.bac-caption.live { color: #ffe7a3; }
.bac-spots { display: grid; grid-template-columns: 1fr .8fr 1fr; gap: 8px; width: 100%; margin-top: 4px; }
.bac-spot { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; border-radius: 40px 40px 12px 12px; }
.bac-spot b { font: 800 17px/1.1 "Playfair Display", Georgia, serif; }
.bac-spot small { font-size: 12px; opacity: .8; }
.bac-player { background: rgba(37, 99, 168, .35); }
.bac-banker { background: rgba(179, 32, 47, .35); }
.bac-tie { background: rgba(31, 138, 76, .35); }

/* pai gow */
.pg-dealer { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cards.tiny .card { width: 30px; height: 44px; border-width: 2px; }
.cards.tiny .card + .card { margin-left: -12px; }
.cards.tiny .card.back i { inset: 4px; }
.pg-zone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 8px; border-radius: 14px; border: 1.5px dashed rgba(255, 255, 255, .25); }
.pg-low { border-color: rgba(255, 231, 163, .55); background: rgba(255, 231, 163, .06); }
.pg-row { gap: 4px; min-height: 76px; }
.pg-row .card { width: 52px; height: 74px; }
.pg-row .card .cm { font-size: 27px; }
.pg-row .card .ci { font-size: 13px; }
.pg-row.n6 .card-btn + .card-btn { margin-left: -6px; }
.pg-row.n7 .card-btn + .card-btn { margin-left: -14px; }
.card-btn { padding: 0; border: 0; background: none; border-radius: 8px; }
.card-btn:active .card { transform: translateY(-4px); }
.card.picked { box-shadow: 0 0 0 3px #ffe7a3, 0 6px 12px rgba(0, 0, 0, .35); }
.pg-foul { margin: 0; color: #ffd2c8; font-weight: 700; text-align: center; font-size: 14px; }
.pg-result { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.pg-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pg-col small { font-size: 13px; color: #fff4d8; font-weight: 700; margin-bottom: 4px; }
.pg-line { display: flex; align-items: center; gap: 4px; }
.cards.small .card { width: 34px; height: 50px; }
.cards.small .card + .card { margin-left: -14px; }
.cards.small .card .cm { font-size: 18px; }
.cards.small .card .ci { font-size: 10px; top: 2px; left: 3px; }
.cards.small .card .ci.flip { display: none; }
.pg-mark { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.pg-mark.win { background: #6fd08c; color: #0b2a14; }
.pg-mark.lose { background: rgba(0, 0, 0, .45); color: #ffb3a7; }
.card.joker { color: #7a3bb0; }
.card.court .cm { inset: 18% 14%; border-radius: 4px; overflow: hidden; }
.card.court .cm img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* slots */
.machine {
  width: min(100%, 340px); padding: 14px 14px 16px; border-radius: 26px 26px 18px 18px; margin-top: 4px;
  background: linear-gradient(180deg, #7a1f2b, #3d0b14); border: 4px solid var(--metal); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 10px 24px rgba(0, 0, 0, .5);
}
.marquee { text-align: center; margin-bottom: 10px; }
.marquee span { display: inline-block; padding: 4px 14px; border-radius: 10px; background: #1a0a06; color: #ffe7a3; font: 700 15px/1.2 "Cinzel", Georgia, serif; letter-spacing: .16em; box-shadow: 0 0 0 2px var(--metal), 0 0 14px rgba(255, 215, 120, .5); }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-radius: 14px; background: #1a0a06; position: relative; }
.reels::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: rgba(255, 90, 90, .55); }
.reels.hit { box-shadow: 0 0 0 3px #ffe7a3, 0 0 24px rgba(255, 231, 163, .7); }
.reel { aspect-ratio: 3 / 4; border-radius: 10px; background: linear-gradient(180deg, #d8d2c4, #fffdf6 30%, #fffdf6 70%, #d8d2c4); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel .sym { width: 74%; }
.reel .sym svg { width: 100%; height: auto; display: block; }
.reel.spinning .sym { filter: blur(1.5px); transform: scaleY(1.15); }
.payline-note { margin-top: 10px; text-align: center; font: 800 18px/1.2 "Playfair Display", Georgia, serif; color: #ffe7a3; }

/* sheets */
.pays table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.pays td { padding: 6px 4px; border-bottom: 1px solid rgba(42, 26, 6, .12); font-weight: 700; }
.pays td:last-child { text-align: right; white-space: nowrap; }
.pays .sy { display: flex; align-items: center; gap: 2px; }
.pays .sy svg { width: 30px; height: 30px; }
.pays .any { display: inline-flex; width: 30px; justify-content: center; font-size: 11px; opacity: .6; }
.pp-how ul { padding-left: 20px; }

.toast {
  position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translate(-50%, -16px); z-index: 30;
  margin: 0; padding: 10px 18px; border-radius: 999px; background: #fbf4e4; color: #2a1a06; font-weight: 800; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: #ffe7a3; }
.toast.bad { background: #ffd2c8; }

@media (max-height: 720px) {
  .stage { height: clamp(120px, 21dvh, 170px); }
  .dealer { width: min(46%, 180px); }
  .stage[data-table="roulette"] { height: 84px; }
  .stage[data-table="roulette"] .dealer { width: 104px; }
  .felt { padding-top: 14px; gap: 6px; min-height: 0; }
  .card { width: 52px; height: 74px; }
  .card .cm { font-size: 28px; }
  .card .ci { font-size: 13px; }
  .board-row .card { width: 48px; height: 68px; }
  .felt-rule { display: none; }
  .bac-side .card { width: 44px; height: 62px; }
  .bac-side .card .cm { font-size: 22px; }
  .bac-caption { min-height: 0; font-size: 14px; }
  .bac-caption .verdict { font-size: 17px; }
  .bac-spot { min-height: 52px; }
  .pg-row { min-height: 66px; }
  .pg-row .card { width: 46px; height: 66px; }
  .pg-row.n7 .card-btn + .card-btn { margin-left: -10px; }
}
@media (max-width: 370px) {
  .bar-title { font-size: 15px; letter-spacing: .05em; }
  .card { width: 56px; height: 80px; }
  .board-row .card { width: 50px; height: 72px; }
  .wheel-box { grid-template-columns: 124px 1fr; }
  .wheel { width: 124px; height: 124px; }
  .acts { gap: 6px; }
  .act { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .card.deal, .say.pop, .claim-btn, .fan-card, .marquee-title { animation: none; }
  .table-card { transition: none; }
}

/* ---------- live poker (live.js) ---------- */
.live-btn .live-pic { background: url("assets/mack-dealer.webp") center 18% / 150% auto no-repeat, radial-gradient(circle, #2a6a46, #12341f); }
.live-faces { display: flex; align-items: center; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.live-faces .ls-av { width: 26px; height: 26px; border-width: 1.5px; }
.live-faces small { font-size: 13px; font-weight: 600; color: #7a5a2a; margin-left: 4px; }
.live-list { display: grid; gap: 10px; }
.live-pick {
  display: grid; gap: 3px; text-align: left; padding: 12px 14px; min-height: 64px; border-radius: 14px;
  background: linear-gradient(180deg, #fffaf0, #f2e3c4); border: 1px solid #c8a24e; color: #2a1a06; box-shadow: 0 3px 0 #a8823a;
}
.live-pick b { font: 700 16px/1.1 "Cinzel", Georgia, serif; letter-spacing: .06em; color: #6a4810; }
.live-pick small { font-size: 14px; color: #5a4220; }
.live-pick:active { transform: translateY(2px); box-shadow: 0 1px 0 #a8823a; }

.live-screen { display: flex; flex-direction: column; padding-bottom: 0; }
.live-screen > *:not(.room-bg) { position: relative; z-index: 1; }
.live-screen > .bar { z-index: 4; }
.live-screen .bar .bal b { background: rgba(0, 0, 0, .6); }
.live-link { margin: 0 auto 4px; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: 13px; font-weight: 700; color: #ffd8a8; }
.live-felt { flex: 1; display: flex; align-items: center; justify-content: center; padding: 6px 0 10px; min-height: 0; }
.live-wait { color: rgba(255, 255, 255, .8); }
.ltable { position: relative; width: min(100%, 470px); aspect-ratio: 3 / 4.1; max-height: calc(100dvh - 250px); container-type: size; }
.lt-rail {
  position: absolute; inset: 9% 13% 8%; border-radius: 48% / 34%;
  background: radial-gradient(80% 70% at 50% 40%, color-mix(in srgb, var(--felt) 88%, #fff) 0%, var(--felt) 50%, var(--felt-deep) 100%);
  border: 9px solid color-mix(in srgb, var(--trim) 85%, #000); box-shadow: 0 0 0 3px var(--metal), inset 0 0 26px rgba(0, 0, 0, .45), 0 14px 30px rgba(0, 0, 0, .55);
}
.lt-rail::after { content: ""; position: absolute; inset: 7%; border-radius: inherit; border: 1.5px dashed rgba(255, 255, 255, .14); }
.lt-dealer { position: absolute; left: 50%; top: -2%; width: 23%; transform: translateX(-50%); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); pointer-events: none; opacity: 0; }
.lt-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54%; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.lt-board { display: flex; gap: 3px; }
.lt-board .card { width: min(10cqw, 46px); height: min(14.3cqw, 66px); border-radius: 6px; }
.lt-board .card .ci { font-size: min(3.2cqw, 13px); top: 2px; left: 3px; }
.lt-board .card .ci.flip { display: none; }
.lt-board .card .cm { font-size: min(6cqw, 24px); }
.lt-board .card .cm.face svg { width: 60%; height: 60%; }
.lt-pot { margin: 2px 0 0; font-weight: 800; font-size: 15px; line-height: 1.2; color: #fff7dc; text-shadow: 0 1px 3px #000; min-height: 18px; }
.lt-blinds { margin: 0; font: 700 10px/1 "Cinzel", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--metal) 80%, #fff); opacity: .85; }
.lseat {
  position: absolute; transform: translate(-50%, -50%); width: 22%; min-width: 70px; display: flex; flex-direction: column; align-items: center;
  padding: 4px 2px 3px; border-radius: 12px; background: rgba(12, 8, 4, .82); border: 1px solid rgba(230, 194, 110, .45); color: #fff7dc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45); transition: box-shadow .2s, border-color .2s;
}
.lseat.empty { min-height: 54px; width: 18%; min-width: 56px; justify-content: center; background: rgba(0, 0, 0, .35); border-style: dashed; color: var(--gold); font-weight: 800; font-size: 14px; }
.lseat.empty:disabled { opacity: .45; }
.lseat.you { border-color: #ffe7a3; background: rgba(40, 26, 6, .9); }
.lseat.turn { border-color: #ffe7a3; box-shadow: 0 0 0 2px #ffe7a3, 0 0 18px rgba(255, 231, 163, .6); }
.lseat.won { border-color: #7fe0a0; box-shadow: 0 0 0 2px #7fe0a0, 0 0 18px rgba(127, 224, 160, .55); }
.lseat.folded, .lseat.away { opacity: .62; }
.ls-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid var(--metal); background: #3a2a14; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ls-av img, .ls-av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.ls-av b { font-size: 16px; color: #ffe7a3; }
.lseat .ls-av { margin-top: -18px; }
.ls-name { font-size: 12px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.ls-stack { font-size: 12px; font-weight: 700; color: #ffe7a3; font-variant-numeric: tabular-nums; }
.ls-cards { display: flex; gap: 2px; margin-top: 2px; }
.ls-cards .card { width: 26px; height: 37px; border-radius: 4px; }
.ls-cards .card .ci { font-size: 11px; top: 2px; left: 2px; }
.ls-cards .card .ci.flip, .ls-cards .card .cm { display: none; }
.lseat.you .ls-cards .card { width: 34px; height: 48px; }
.lseat.you .ls-cards .card .ci { font-size: 14px; }
.ls-cards .card.back { border-width: 2px; }
.ls-cards .card.back i { inset: 3px; }
.ls-note { font-size: 11px; font-weight: 700; color: #ffd8a8; min-height: 13px; line-height: 1.15; text-align: center; }
.lseat.won .ls-note { color: #9ff0b8; }
.ls-clock { position: absolute; left: 8px; right: 8px; bottom: -4px; height: 4px; border-radius: 4px; background: rgba(0, 0, 0, .6); overflow: hidden; }
.ls-clock i, .lc-clock i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #e0b04f, #ffe7a3); }
.ls-btn { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: #fffdf6; color: #2a1a06; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.ls-off { position: absolute; top: -8px; left: -4px; padding: 0 5px; border-radius: 6px; background: #5a1a1a; font-size: 10px; font-weight: 800; }
.lbet { position: absolute; transform: translate(-50%, -50%); padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .65); border: 1px solid var(--metal); font-size: 12px; font-weight: 800; color: #ffe7a3; }
.live-screen > .controls { position: sticky; bottom: 0; z-index: 3; margin: 0 -16px; padding-left: 16px; padding-right: 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.lc-say { margin: 0; text-align: center; font-size: 15px; color: var(--ink-soft, #e8dcc0); }
.lc-row { display: flex; gap: 8px; }
.lc-row .btn { flex: 1; }
.lc-clock { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.live-screen .btn, .lr .btn {
  min-height: 54px; border-radius: 14px; border: 1px solid rgba(230, 194, 110, .55); background: rgba(20, 12, 6, .85);
  color: var(--ink, #fff7dc); font-weight: 800; font-size: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 4px 8px;
}
.live-screen .btn small, .lr .btn small { font-size: 13px; font-weight: 700; opacity: .85; }
.live-screen .btn.gold, .lr .btn.gold { background: linear-gradient(180deg, #ffe7a3, #e0b04f); color: #2a1a06; border-color: #8a6420; box-shadow: 0 3px 0 #8a6420; }
.live-screen .btn:disabled { opacity: .4; }
.live-screen .btn:active:not(:disabled), .lr .btn:active { transform: translateY(2px); }
.lr { display: grid; gap: 8px; padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(230, 194, 110, .35); }
.lr.buyin { background: none; border: 0; padding: 0; color: inherit; }
.lr.buyin .btn { color: #2a1a06; }
.lr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lr-val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lr.buyin .lr-val { text-align: center; font-size: 30px; }
.lr-quick { display: flex; gap: 6px; }
.chipbtn { min-height: 44px; min-width: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(230, 194, 110, .5); background: rgba(255, 255, 255, .08); color: inherit; font-weight: 800; font-size: 13px; }
.lr input[type="range"] { width: 100%; height: 44px; accent-color: #e0b04f; }
@media (max-height: 700px) { .ltable { max-height: calc(100dvh - 220px); } .lseat .ls-av { width: 30px; height: 30px; margin-top: -14px; } }
.live-fine { margin: 0; font-size: 14px; color: #6a5432; line-height: 1.35; }
.live-screen.raising .ltable { max-height: calc(100dvh - 330px); }
.lt-pot { font-size: min(15px, 4cqw); }

/* blackjack's shoe: cards left, the cut card marked */
.shoe { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -2px 0 6px; font-size: 12px; color: rgba(255, 240, 200, .8); font-weight: 700; }
.shoe-bar { position: relative; width: 84px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .35); overflow: visible; }
.shoe-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #e6c26e; }
.shoe-bar em { position: absolute; top: -3px; width: 3px; height: 12px; margin-left: -1px; border-radius: 1px; background: #d8443a; }
.say .cb { display: block; margin-top: 2px; font-size: 13px; color: #6b4a08; }
@media (max-height: 720px) { .shoe { display: none; } }

/* ---------- moments (fx.js, 2026-11-29): the big win, the allowance's coins, the slots' held reel, streaks ---------- */
.bigwin { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 50% 46%, rgba(40, 24, 4, .25), rgba(0, 0, 0, .78) 70%); animation: bw-dim .3s ease-out; }
.bigwin.out { opacity: 0; transition: opacity .3s; }
.bw-box { display: flex; flex-direction: column; align-items: center; gap: 4px; transform: scale(.6); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.5, .4, 1), opacity .2s; position: relative; z-index: 2; }
.bigwin.go .bw-box { transform: scale(1); opacity: 1; }
.bigwin.landed .bw-amt { animation: bw-land .45s ease-out; }
.bw-word { font: 700 clamp(18px, 6vw, 26px)/1 "Cinzel", Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: #ffe7a3; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.bw-amt { font: 800 clamp(44px, 15vw, 76px)/1 "Playfair Display", Georgia, serif; font-variant-numeric: tabular-nums; color: #fff4c8;
  background: linear-gradient(180deg, #fffbe6 10%, #ffd86b 55%, #c8901e 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .7)) drop-shadow(0 0 22px rgba(255, 210, 110, .45)); }
.bigwin.t3 .bw-amt { font-size: clamp(52px, 18vw, 92px); }
.bigwin.t3::before { content: ""; position: absolute; left: 50%; top: 46%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; z-index: 1;
  background: repeating-conic-gradient(rgba(255, 220, 130, .16) 0 8deg, transparent 8deg 20deg); animation: bw-rays 9s linear infinite; opacity: 0; transition: opacity .4s; }
.bigwin.t3.go::before { opacity: 1; }
.bw-p { position: absolute; bottom: -40px; width: 30px; height: 30px; z-index: 3; animation: bw-fly 1.6s cubic-bezier(.2, .7, .5, 1) both; }
.bw-p svg { width: 100%; height: 100%; display: block; }
.bw-p.coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c8, #f0c040 45%, #a8741a); box-shadow: inset 0 0 0 2px rgba(120, 80, 10, .5); }
@keyframes bw-dim { from { background-color: transparent; opacity: 0; } }
@keyframes bw-land { 50% { transform: scale(1.12); } }
@keyframes bw-rays { to { transform: rotate(360deg); } }
@keyframes bw-fly {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  45% { transform: translate(calc(var(--dx) * .5), var(--up)) rotate(calc(var(--spin) * .5)); }
  100% { transform: translate(var(--dx), 10vh) rotate(var(--spin)); opacity: .9; }
}
.flycoin { position: fixed; z-index: 55; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #f0c040 45%, #a8741a); box-shadow: 0 2px 4px rgba(0, 0, 0, .4); animation: flycoin .9s cubic-bezier(.4, 0, .6, 1) both; }
@keyframes flycoin {
  0% { transform: translate(0, 0) scale(.4); opacity: 0; }
  15% { opacity: 1; transform: translate(var(--mx), var(--my)) scale(1.1); }
  100% { transform: translate(var(--ex), var(--ey)) scale(.6); opacity: .2; }
}
.bal.bump b { animation: bal-bump .5s ease-out; }
@keyframes bal-bump { 40% { transform: scale(1.18); box-shadow: 0 0 18px rgba(255, 220, 120, .8); } }
.claim-btn.ready { animation: claim-glow 2.4s ease-in-out infinite; }
@keyframes claim-glow { 50% { box-shadow: 0 0 0 2px #ffe7a3, 0 0 26px rgba(255, 220, 120, .7); } }
/* the slots' last reel held when the first two match */
.reel.held { box-shadow: 0 0 0 3px #ffd86b, 0 0 18px rgba(255, 216, 107, .8); animation: reel-held .25s ease-in-out infinite alternate; }
@keyframes reel-held { to { box-shadow: 0 0 0 3px #fff3c4, 0 0 30px rgba(255, 216, 107, 1); } }
.reel.landed { animation: reel-land .22s ease-out; }
@keyframes reel-land { 40% { transform: translateY(5px); } }
/* the dealer's reactions */
.dealer.react-win { animation: dealer-win .7s ease-out; }
.dealer.react-big { animation: dealer-big 1s ease-out; }
.dealer.react-lose { animation: dealer-lose .6s ease-out; }
@keyframes dealer-win { 30% { transform: translateY(-8px) rotate(-2deg); } 60% { transform: translateY(0) rotate(1deg); } }
@keyframes dealer-big { 20% { transform: translateY(-14px) scale(1.04) rotate(-3deg); } 45% { transform: translateY(0) scale(1) rotate(2deg); } 65% { transform: translateY(-6px) rotate(-1deg); } }
@keyframes dealer-lose { 40% { transform: rotate(-2.5deg) translateY(2px); } }
/* a run of wins: a small flame by the dealer's word (resets on a loss; nothing is at stake) */
.streak { position: absolute; top: 8px; right: 10px; z-index: 3; padding: 3px 10px 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); border: 1px solid #e0b04f;
  font-weight: 800; font-size: 13px; color: #ffe7a3; display: inline-flex; gap: 4px; align-items: center; animation: pop .35s ease-out; }
.streak svg { width: 14px; height: 14px; }
.streak.hot { border-color: #ff9a4a; color: #ffd3a8; box-shadow: 0 0 12px rgba(255, 140, 60, .55); }
@media (prefers-reduced-motion: reduce) {
  .bigwin, .bw-box, .bigwin.landed .bw-amt, .bigwin.t3::before, .claim-btn.ready, .reel.held, .reel.landed, .dealer.react-win, .dealer.react-big, .dealer.react-lose, .bal.bump b, .streak { animation: none; transition: none; }
  .bigwin .bw-box { transform: none; opacity: 1; }
}

/* ---------- live blackjack (livebj.js) ---------- */
.bjt .lt-rail { border-radius: 50% 50% 28% 28% / 18% 18% 50% 50%; }
.bjt-dealer { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bjt-kento { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid var(--metal); background: #3a2a14; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); }
.bjt-kento img, .bjt-kento svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.bjt-dealer .cards .card { width: min(12cqw, 52px); height: min(17cqw, 74px); }
.bjt-dealer .cards .card + .card { margin-left: max(-4cqw, -18px); }
.bjt-dealer .total { margin-top: 0; font-size: 13px; }
.bjt-rule { position: absolute; left: 50%; top: 43%; transform: translateX(-50%); width: 58%; text-align: center; margin: 0; font: 700 10px/1.3 "Cinzel", Georgia, serif; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--metal) 80%, #fff); opacity: .8; }
.bjt-line { position: absolute; left: 50%; top: 44%; transform: translateX(-50%); width: 46%; margin: 0; text-align: center; font-weight: 800; font-size: min(15px, 4cqw); color: #fff7dc; text-shadow: 0 1px 3px #000; min-height: 18px; }
.bseat { width: 19%; min-width: 64px; }
.bseat .ls-av { width: 32px; height: 32px; margin-top: -14px; }
.bseat .bs-hands { display: flex; flex-direction: column; gap: 2px; align-items: center; margin-top: 2px; }
.bs-hand { position: relative; display: flex; align-items: center; border-radius: 6px; padding: 2px 4px 1px; }
.bs-hand.at { background: rgba(255, 231, 163, .2); outline: 1px solid rgba(255, 231, 163, .6); }
.bs-hand .ls-cards .card + .card { margin-left: -12px; }
.lseat.you .bs-hand .ls-cards .card + .card { margin-left: -14px; }
.bs-tot { position: absolute; right: -10px; top: -7px; z-index: 2; font-size: 11px; font-weight: 800; padding: 0 5px; border-radius: 999px; background: rgba(0, 0, 0, .8); border: 1px solid rgba(230, 194, 110, .5); white-space: nowrap; }
.bs-hand.r-lose, .bs-hand.r-bust { opacity: .55; }
.bs-hand.r-win .bs-tot, .bs-hand.r-blackjack .bs-tot { background: #2f7a48; }
.bs-bet { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; color: #ffe7a3; }
.bs-bet svg { width: 16px; height: 16px; }
.bj-betbar { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.bj-betbar .chip-pick { width: 46px; height: 46px; padding: 0; border: 0; background: none; border-radius: 50%; }
.bj-betbar .chip-pick svg { width: 46px; height: 46px; display: block; }
.bj-betamt { min-width: 76px; text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: #ffe7a3; }
.lc-row .btn.act-sm { flex: 0 0 auto; min-width: 64px; }
