/* Game rooms. Control cards are solid and opaque and sit beside the game on desktop, below it on phones. */
.game-wrap { padding: 24px 0 40px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; font-size: 0.92rem; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); }

.game-shell { display: grid; grid-template-columns: minmax(0, 1fr) 390px; grid-template-areas: "stage controls" "info controls"; grid-template-rows: auto 1fr; gap: 24px 30px; align-items: start; }
.stage { grid-area: stage; min-width: 0; }
.info { grid-area: info; min-width: 0; display: grid; gap: 10px; }
.controls { grid-area: controls; min-width: 0; }

.stage-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 18px; margin-bottom: 18px; }
.stage-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); background: var(--card); }
.stage-head h1 { margin: 0; font-size: clamp(2.3rem, 3.8vw, 3.5rem); }
.stage-head .kicker { margin: 0; }
.stage-tags { grid-column: 1 / -1; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.stage-tags li { padding: 3px 13px; border-radius: 999px; font-size: 0.84rem; font-weight: 700; background: var(--card); border: 1.5px solid var(--line-strong); }

/* cabinet: gilt frame, solid panel, no shadows or filters around moving canvases */
.cabinet { padding: 10px; border-radius: 34px; background: linear-gradient(150deg, #f6e2a8, #c9a14a 32%, #8a6526 58%, #ecd08c 82%, #b88a36); }
.cabinet.cab-encore { background: linear-gradient(150deg, #a35b93, #6b2a5e 35%, #c9a14a 55%, #4e1c45 80%, #8b3d7d); }
.cabinet.cab-cascade { background: linear-gradient(135deg, #e8973a, #f6e2a8 35%, #c9a14a 60%, #6b2a5e); }
.cabinet-wheel, .cabinet-felt { background: linear-gradient(150deg, #ecd08c, #fffaf2 38%, #e2c77f 68%, #a8823a); }
.cab-frame { display: grid; gap: 12px; padding: clamp(10px, 1.4vw, 20px); border-radius: 25px; background: var(--paper); }
.marquee { display: grid; justify-items: center; margin: 0; text-align: center; }
.marquee b { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1.02; color: var(--ink); }
.marquee small { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber-deep); }
.reel-window { position: relative; border-radius: 20px; background: var(--cream); border: 1.5px solid var(--line-strong); overflow: hidden; }
.reels-canvas { width: 100%; aspect-ratio: 5 / 3.1; }
.win-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transform: scaleX(0.04); transform-origin: 0 50%; }
.win-lines.is-on { opacity: 1; transform: none; transition: transform 650ms var(--ease-out), opacity 160ms ease; }
.gem-canvas { width: 100%; aspect-ratio: 6 / 5; }
.win-banner { position: absolute; left: 50%; top: 50%; z-index: 3; display: grid; justify-items: center; gap: 2px; padding: 14px 34px; border-radius: 22px; text-align: center; background: var(--plum-deep); border: 3px solid var(--gold); color: #fff; transform: translate(-50%, -50%) scale(0.7); opacity: 0; pointer-events: none; transition: opacity 260ms ease, transform 420ms var(--ease-spring); }
.win-banner.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.win-banner b { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.02; color: #f6d48d; }
.win-banner span { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.cab-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin: 0; font-size: 0.94rem; font-weight: 600; color: var(--ink-2); }
.cab-foot strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.trail { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; }
.trail li { display: grid; place-items: center; min-height: 42px; border-radius: 999px; background: var(--cream); border: 1.5px solid var(--line-strong); font-weight: 800; color: var(--ink-2); transition: background-color var(--t-med) ease, color var(--t-med) ease, transform var(--t-med) var(--ease-spring); }
.trail li.is-past { background: var(--gold-soft); border-color: #e2c77f; color: var(--gold-deep); }
.trail li.is-on { background: var(--plum); border-color: var(--plum-deep); color: #fff; transform: scale(1.06); }

/* control card: solid, opaque, every label wraps inside the padding */
.controls { position: static; display: grid; gap: 14px; padding: 24px; border-radius: 26px; background-color: #ffffff; background-image: none; border: 1.5px solid var(--line-strong); opacity: 1; isolation: isolate; overflow: visible; }
.controls::before { content: ""; display: block; height: 4px; margin: -8px 0 0; border-radius: 4px; background: var(--rule); }
.controls > * { min-width: 0; margin: 0; }
.result { padding: 13px 15px; border-radius: 16px; background-color: var(--cream); border: 1.5px solid var(--line); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; min-height: 3.2em; }
.result.is-win { background-color: var(--gold-soft); border-color: #e2c77f; }
.result.is-lose { background-color: #f6eee6; border-color: var(--line-strong); }
.amount { display: grid; gap: 6px; }
.amount-label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.stepper { display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; gap: 8px; align-items: center; }
.step { width: 54px; height: 54px; min-height: 48px; border-radius: 50%; border: 2px solid var(--plum); background: var(--card); color: var(--plum-deep); font-family: var(--body); font-size: 1.6rem; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation; }
.step:hover { background: var(--plum-soft); }
.step[disabled] { background: #f1e8ee; border-color: #c7aebf; color: #7a6271; cursor: not-allowed; }
.stepper output { display: grid; place-items: center; min-height: 54px; padding: 0 8px; border-radius: 999px; background: var(--gold-soft); border: 1.5px solid #e2c77f; font-size: 1.16rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.spin-btn { width: 100%; min-height: 64px; font-size: 1.28rem; letter-spacing: 0.02em; }
.spin-btn[disabled] { color: var(--ink-2); background-image: none; background-color: #ecdcc4; border-color: #cdb391; }
.spin-btn.is-busy[disabled] { color: var(--ink); background-color: #f2c98f; border-color: #c98a3a; }
.ctrl-row.main { display: grid; gap: 12px; }
.feature-note { padding: 10px 14px; border-radius: 14px; background: var(--plum-soft); color: var(--ink); font-size: 0.95rem; font-weight: 600; overflow-wrap: anywhere; }
.feature-note.is-live { background: var(--plum); color: #fff; }
.last-line { font-size: 0.95rem; color: var(--ink-2); overflow-wrap: anywhere; }
.last-line span { color: var(--ink); font-weight: 700; }
.ctrl-row.util { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1.5px dotted var(--line-strong); }
.ctrl-row.util .bal { flex: 1 1 100%; font-weight: 600; color: var(--ink-2); }
.ctrl-row.util .bal strong { color: var(--ink); font-size: 1.14rem; font-variant-numeric: tabular-nums; }
.ctrl-row.util .btn { flex: 1 1 auto; }
.ctrl-row.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ctrl-row.actions .btn { min-width: 0; min-height: 54px; padding: 0 8px; font-size: 1.04rem; }
.ctrl-row.actions .btn[disabled] { color: #6f5868; background-image: none; background-color: #efe5ec; border-color: #cbb3c4; opacity: 1; }
.ctrl-row.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ctrl-row.tools .btn { min-width: 0; padding: 0 6px; }
.ctrl-row.tools .btn[disabled], .ctrl-row.util .btn[disabled] { color: #6f5868; background: #f4ede6; border-color: #cdbba6; }
.stake-line { font-weight: 600; color: var(--ink-2); }
.stake-line strong { color: var(--ink); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.chip-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chip { display: grid; place-items: center; min-height: 54px; border-radius: 999px; border: 3px dashed rgba(255, 250, 242, 0.9); font-family: var(--body); font-weight: 800; font-size: 1rem; color: #fff; cursor: pointer; touch-action: manipulation; transition: transform var(--t-fast) var(--ease-spring); }
.chip-10 { background: #2f8a5b; }
.chip-25 { background: var(--amber-deep); }
.chip-100 { background: var(--plum); }
.chip-500 { background: var(--ink); }
.chip[aria-checked="true"] { transform: translateY(-3px); outline: 3px solid var(--gold); outline-offset: 2px; }

/* info panel */
.msg { padding: 11px 15px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); font-size: 0.95rem; color: var(--ink-2); }
.info details { border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); padding: 0 20px; }
.info summary { cursor: pointer; padding: 14px 0; font-weight: 800; }
.info details ul { padding-left: 1.2em; font-size: 0.97rem; color: var(--ink-2); }
.info details li { margin-bottom: 0.35em; }
.info .fine { margin: 0; }
.paytable { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.paytable li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; }
.paytable img { width: 46px; height: 46px; border-radius: 12px; }
.win-list { font-variant-numeric: tabular-nums; }

/* roulette */
.wheel-frame { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.5fr); align-items: center; gap: clamp(12px, 2vw, 28px); }
.wheel-stage { position: relative; display: grid; place-items: center; }
.wheel-canvas { width: min(100%, 430px); aspect-ratio: 1; }
.wheel-readout { position: absolute; right: 2%; top: 2%; }
.pocket-badge { display: grid; place-items: center; min-width: 60px; height: 60px; padding: 0 8px; border-radius: 999px; background: var(--card); border: 2px solid var(--plum); font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.pocket-badge.red { background: #b8323f; border-color: #7c1d28; color: #fff; }
.pocket-badge.black { background: #2b1630; border-color: #150a18; color: #fff; }
.pocket-badge.green { background: #2f8a5b; border-color: #1c5a3a; color: #fff; }
.pocket-badge.is-pop { animation: pop 480ms var(--ease-spring); }
@keyframes pop { 40% { transform: scale(1.25); } }
.board-zone { display: grid; gap: 10px; min-width: 0; }
.board { display: grid; grid-template-columns: 1.1fr repeat(12, minmax(0, 1fr)) 1.2fr; grid-template-rows: repeat(3, minmax(42px, 1fr)) minmax(40px, auto) minmax(40px, auto); gap: 4px; padding: 8px; border-radius: 18px; background: #5a2350; border: 2px solid var(--plum-deep); }
.board.is-locked .cell { cursor: default; }
.cell { position: relative; display: grid; place-items: center; min-width: 0; min-height: 42px; padding: 2px; border-radius: 8px; border: 1.5px solid rgba(255, 244, 222, 0.7); background: #7a3470; color: #fff; font-family: var(--body); font-weight: 800; font-size: clamp(0.74rem, 1vw, 0.95rem); font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation; transition: transform var(--t-fast) ease; }
.cell:hover { border-color: #f6d48d; }
.cell:active { transform: scale(0.96); }
.cell.red { background: #b8323f; }
.cell.black { background: #2b1630; }
.cell.green { background: #2f8a5b; }
.cell.num { grid-column: var(--hc); grid-row: var(--hr); }
.cell.zero { grid-column: 1; grid-row: 1 / span 3; }
.cell.col { grid-column: 14; grid-row: var(--hr); font-size: 0.76rem; }
.cell.dozen { grid-row: 4; grid-column: var(--hc) / span 4; }
.cell.even { grid-row: 5; grid-column: var(--hc) / span 2; font-size: 0.82rem; }
.cell.is-win { outline: 3px solid #f6d48d; outline-offset: 1px; z-index: 1; animation: cell-win 900ms var(--ease-out) 2; }
@keyframes cell-win { 50% { transform: scale(1.08); } }
.marker { position: absolute; right: -5px; top: -7px; z-index: 2; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; font-size: 0.68rem; font-weight: 800; color: var(--ink); background: #f6d48d; border: 2px solid var(--ink); animation: marker-in 260ms var(--ease-spring); pointer-events: none; }
@keyframes marker-in { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.recent-row { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); min-width: 0; }
.recent { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; overflow: hidden; min-width: 0; }
.recent li { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; font-size: 0.8rem; font-weight: 800; letter-spacing: 0; color: #fff; animation: marker-in 300ms var(--ease-spring); }
.recent li.red { background: #b8323f; }
.recent li.black { background: #2b1630; }
.recent li.green { background: #2f8a5b; }

/* blackjack: plum felt behind a brass rail, cream card faces */
.felt { position: relative; display: grid; grid-template-rows: auto auto auto; align-content: start; gap: 10px; min-height: clamp(440px, 56vw, 620px); padding: 18px 14px 20px; border-radius: 22px; background-color: #6b2a5e; background-image: radial-gradient(ellipse 90% 70% at 50% 25%, #8f4382, #6b2a5e 70%, #561f4b); border: 3px solid #c9a14a; --cw: clamp(66px, 7.6vw, 104px); }
.felt-arc { justify-self: center; margin: 0; padding: 5px 18px; border-radius: 999px; background: #f6d48d; color: var(--ink); font-size: clamp(0.72rem, 1.1vw, 0.88rem); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; }
.hand-zone { display: grid; justify-items: center; gap: 8px; }
.zone-label { margin: 0; padding: 4px 16px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 800; font-size: 0.94rem; }
.shoe { position: absolute; right: 14px; top: 14px; z-index: 1; display: grid; justify-items: center; gap: 4px; }
.shoe img { width: 50px; height: 66px; border-radius: 6px; border: 2px solid #f6e2a8; }
.shoe span { padding: 1px 8px; border-radius: 999px; background: var(--paper); font-size: 0.74rem; font-weight: 800; color: var(--ink); }
.cards { display: flex; justify-content: center; min-height: calc(var(--cw) * 1.4); padding: 0 calc(var(--cw) * 0.2); perspective: 900px; }
.dealer-zone .cards { min-width: calc(var(--cw) * 2.6); padding: 8px calc(var(--cw) * 0.25); border: 2px dashed rgba(246, 226, 168, 0.75); border-radius: 18px; min-height: calc(var(--cw) * 1.4 + 20px); }
.hands { display: flex; flex-wrap: wrap; justify-content: center; align-items: end; gap: 14px 22px; min-height: calc(var(--cw) * 1.4 + 56px); }
.hands:empty::before { content: ""; width: calc(var(--cw) * 1.4); aspect-ratio: 1; align-self: center; border-radius: 50%; border: 3px dashed rgba(246, 226, 168, 0.8); }
.hand { display: grid; justify-items: center; gap: 6px; padding: 8px 10px 10px; border-radius: 20px; border: 2px dashed rgba(246, 226, 168, 0.55); transition: border-color var(--t-med) ease, background-color var(--t-med) ease; }
.hand.is-active { border: 2px solid #f6d48d; background-color: #7d3570; }
.hand.is-waiting { opacity: 0.85; }
.hand-tag { margin: 0; padding: 4px 13px; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 0.9rem; font-weight: 600; text-align: center; }
.hand-tag b { font-weight: 800; }
.out { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 6px; font-weight: 800; font-size: 0.8rem; color: #fff; background: #6f5868; }
.out.win, .out.blackjack { background: #2f8a5b; }
.out.push { background: var(--amber-deep); }
.card { position: relative; width: var(--cw); aspect-ratio: 5 / 7; flex: 0 0 auto; transform-style: preserve-3d; transition: transform 340ms var(--ease-out); animation: deal-in 460ms var(--ease-out) both; }
.card + .card { margin-left: calc(var(--cw) * -0.3); }
.card.is-down { transform: rotateY(180deg); animation-name: deal-in-down; }
@keyframes deal-in { from { transform: translate(var(--fx, 300px), var(--fy, -200px)) rotate(-14deg) rotateY(180deg); opacity: 0; } 30% { opacity: 1; } }
@keyframes deal-in-down { from { transform: translate(var(--fx, 300px), var(--fy, -200px)) rotate(-14deg) rotateY(180deg); opacity: 0; } 30% { opacity: 1; } to { transform: rotateY(180deg); } }
.card.is-dealt { animation: none; }
.card .face, .card .back { position: absolute; inset: 0; border-radius: calc(var(--cw) * 0.1); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card .face { background: #fffbf3; border: 1.5px solid #dcc9a8; color: #2b1630; }
.card .face.red { color: #b8323f; }
.card .back { transform: rotateY(180deg); overflow: hidden; border: 3px solid #fffbf3; background: var(--plum-deep); }
.card .back img { width: 100%; height: 100%; object-fit: cover; }
.card .corner { position: absolute; left: 8%; top: 5%; display: grid; justify-items: center; line-height: 1; font-family: var(--body); font-weight: 800; font-size: calc(var(--cw) * 0.22); }
.card .corner small { font-size: 0.82em; }
.card .corner.br { left: auto; top: auto; right: 8%; bottom: 5%; transform: rotate(180deg); }
.card .pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--cw) * 0.48); line-height: 1; }
.card .pip.court { inset: 20% 16%; place-content: center; gap: 2px; border-radius: 8px; background: linear-gradient(160deg, #fbeccb, #f3e4ee); border: 1.5px solid var(--gold); }
.card .pip.court b { font-family: var(--display); font-weight: 700; font-size: calc(var(--cw) * 0.46); line-height: 1; }
.card .pip.court i { font-style: normal; font-size: calc(var(--cw) * 0.22); text-align: center; }

@media (max-width: 1360px) {
  .wheel-frame { grid-template-columns: minmax(0, 1fr); }
  .wheel-canvas { width: min(100%, 360px); }
  .wheel-readout { right: 12%; }
}
@media (max-width: 1180px) {
  .game-shell { grid-template-columns: minmax(0, 1fr) 340px; }
  .stage-tags { display: none; }
}
@media (max-width: 900px) {
  .game-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "controls" "info"; grid-template-rows: none; gap: 16px; }
  .controls { padding: 18px; }
  .ctrl-row.actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stage-head img { width: 48px; height: 48px; }
  .cabinet { padding: 7px; border-radius: 26px; }
  .cab-frame { border-radius: 20px; padding: 10px; }
  .marquee small { display: none; }
  .felt { min-height: 0; padding: 14px 10px 18px; --cw: clamp(58px, 15vw, 86px); }
}
@media (max-width: 600px) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(36px, auto); }
  .cell.num { grid-column: var(--vc); grid-row: var(--vr); }
  .cell.zero { grid-column: 1 / span 3; grid-row: 1; }
  .cell.col { grid-column: var(--vc); grid-row: 14; }
  .cell.dozen { grid-column: var(--vc); grid-row: 15; }
  .cell.even { grid-column: var(--vc); grid-row: var(--vr); }
  .cell { min-height: 36px; font-size: 0.9rem; }
  .ctrl-row.actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trail li { min-height: 34px; font-size: 0.9rem; }
  .shoe { right: 8px; top: 8px; }
  .shoe img { width: 36px; height: 48px; }
  .dealer-zone { padding-top: 34px; }
  .cab-foot { gap: 4px 14px; font-size: 0.86rem; }
}
@media (max-width: 380px) {
  .controls { padding: 14px; }
  .stepper { grid-template-columns: 48px minmax(0, 1fr) 48px; }
  .step { width: 48px; height: 48px; }
  .stepper output { font-size: 1.02rem; }
  .chip { font-size: 0.92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card.is-down { animation: none; }
  .win-lines, .win-lines.is-on { transform: none; transition: none; }
}
