/* Game rooms. Control cards are solid and opaque and sit beside the game on desktop, below it on phones. */
.game-wrap { padding: 20px 0 34px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; font-size: 0.9rem; 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) 372px; grid-template-areas: "stage controls" "info controls"; grid-template-rows: auto 1fr; gap: 22px 26px; 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 16px; margin-bottom: 16px; }
.stage-head img { width: 60px; height: 60px; border-radius: 16px; object-fit: cover; border: 1.5px solid var(--line-strong); }
.stage-head h1 { margin: 0; font-size: clamp(2rem, 3.4vw, 3rem); }
.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 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: var(--cloud); border: 1.5px solid var(--line-strong); }

/* cabinet: gilt frame, solid white panel, no shadows or filters around moving canvases */
.cabinet { padding: 8px; border-radius: 30px; background: linear-gradient(135deg, #f6e2a4, #d6aa4a 30%, #fff6dc 55%, #c99a3a 80%, #f6e2a4); }
.cabinet.cab-plane { background: linear-gradient(135deg, #b9c8ff, #4c4cf5 30%, #e7e8ff 55%, #3434c6 80%, #b9c8ff); }
.cabinet.cab-cascade { background: linear-gradient(135deg, #f6e2a4, #4c4cf5 45%, #d6aa4a); }
.cab-frame { display: grid; gap: 12px; padding: clamp(10px, 1.4vw, 18px); border-radius: 23px; background: var(--cloud); }
.marquee { display: grid; justify-items: center; margin: 0; text-align: center; }
.marquee b { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.05; color: var(--ink); }
.marquee small { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); }
.reel-window { position: relative; border-radius: 18px; background: var(--mist); 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 32px; border-radius: 22px; text-align: center; background: var(--ink); border: 2px 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: 600; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.05; color: #f6e2a4; }
.win-banner span { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.cab-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 0; font-size: 0.92rem; font-weight: 500; 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: 38px; border-radius: 12px; background: var(--mist); border: 1.5px solid var(--line-strong); font-weight: 700; 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: #e6cd8a; color: var(--gold-deep); }
.trail li.is-on { background: var(--peri-deep); border-color: var(--peri-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: 22px; 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 -6px 0; border-radius: 999px; background: var(--halo); }
.controls > * { min-width: 0; margin: 0; }
.result { padding: 12px 14px; border-radius: 14px; background-color: var(--mist); border: 1.5px solid var(--line); font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; min-height: 3.2em; }
.result.is-win { background-color: var(--gold-soft); border-color: #e0bf6a; }
.result.is-lose { background-color: #f1f4fa; border-color: var(--line-strong); }
.amount { display: grid; gap: 6px; }
.amount-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.stepper { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 8px; align-items: center; }
.step { width: 52px; height: 52px; min-height: 48px; border-radius: 16px; border: 2px solid var(--ink); background: var(--cloud); color: var(--ink); font-family: var(--body); font-size: 1.6rem; font-weight: 600; line-height: 1; cursor: pointer; touch-action: manipulation; }
.step:hover { background: var(--gold-soft); }
.step[disabled] { background: #e9eef6; border-color: #a9b6cc; color: #5d6a8a; cursor: not-allowed; }
.stepper output { display: grid; place-items: center; min-height: 52px; padding: 0 8px; border-radius: 16px; background: var(--gold-soft); border: 1.5px solid #e0bf6a; font-size: 1.14rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.spin-btn { width: 100%; min-height: 60px; font-size: 1.24rem; border-radius: 18px; letter-spacing: 0.02em; }
.spin-btn[disabled] { color: #fff; background-image: none; background-color: #7f86b4; border-color: #6a719e; }
.spin-btn.is-busy[disabled] { background-color: #5d63a6; }
.ctrl-row.main { display: grid; gap: 12px; }
.feature-note { padding: 10px 12px; border-radius: 12px; background: var(--peri-soft); color: var(--ink); font-size: 0.94rem; font-weight: 500; overflow-wrap: anywhere; }
.feature-note.is-live { background: var(--peri-deep); color: #fff; }
.last-line { font-size: 0.94rem; color: var(--ink-2); overflow-wrap: anywhere; }
.last-line span { color: var(--ink); font-weight: 600; }
.ctrl-row.util { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1.5px dashed var(--line-strong); }
.ctrl-row.util .bal { flex: 1 1 100%; font-weight: 500; color: var(--ink-2); }
.ctrl-row.util .bal strong { color: var(--ink); font-size: 1.12rem; 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: 52px; padding: 0 8px; font-size: 1.02rem; border-radius: 16px; }
.ctrl-row.actions .btn[disabled] { color: #4a5578; background-image: none; background-color: #e6ecf5; border-color: #b7c4da; 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: #5d6a8a; background: #eef2f8; border-color: #b7c4da; }
.stake-line { font-weight: 500; 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: 52px; border-radius: 999px; border: 3px dashed rgba(255, 255, 255, 0.9); font-family: var(--body); font-weight: 700; font-size: 1rem; color: #fff; cursor: pointer; touch-action: manipulation; transition: transform var(--t-fast) var(--ease-spring); }
.chip-10 { background: var(--sky-btn); }
.chip-25 { background: #8a6412; }
.chip-100 { background: var(--peri-deep); }
.chip-500 { background: var(--ink); }
.chip[aria-checked="true"] { transform: translateY(-3px); outline: 3px solid var(--gold); outline-offset: 2px; }

/* info panel */
.msg { padding: 10px 14px; border-radius: 12px; background: var(--cloud); border: 1.5px solid var(--line); font-size: 0.94rem; color: var(--ink-2); }
.info details { border-radius: 16px; background: var(--cloud); border: 1.5px solid var(--line); padding: 0 18px; }
.info summary { cursor: pointer; padding: 13px 0; font-weight: 700; }
.info details ul { padding-left: 1.2em; font-size: 0.96rem; 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: 42px minmax(0, 1fr); gap: 12px; align-items: center; }
.paytable img { width: 42px; height: 42px; border-radius: 10px; }
.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, 26px); }
.wheel-stage { position: relative; display: grid; place-items: center; }
.wheel-canvas { width: min(100%, 420px); aspect-ratio: 1; }
.wheel-readout { position: absolute; right: 2%; top: 2%; }
.pocket-badge { display: grid; place-items: center; min-width: 58px; height: 58px; padding: 0 8px; border-radius: 999px; background: var(--cloud); border: 2px solid var(--ink); font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.pocket-badge.red { background: #d2334a; border-color: #8f1c2c; color: #fff; }
.pocket-badge.black { background: #1b2346; border-color: #0b1028; color: #fff; }
.pocket-badge.green { background: #0b8461; border-color: #065a42; 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: 16px; background: #2a5fae; border: 2px solid #1d4688; }
.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, 255, 255, 0.7); background: #3a70c2; color: #fff; font-family: var(--body); font-weight: 700; 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: #f6e2a4; }
.cell:active { transform: scale(0.96); }
.cell.red { background: #d2334a; }
.cell.black { background: #1b2346; }
.cell.green { background: #0b8461; }
.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 var(--gold); 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: 700; color: var(--ink); background: #f6e2a4; 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: 700; 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: 700; letter-spacing: 0; color: #fff; animation: marker-in 300ms var(--ease-spring); }
.recent li.red { background: #d2334a; }
.recent li.black { background: #1b2346; }
.recent li.green { background: #0b8461; }

/* blackjack: sky-blue felt, white 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: 20px; background-color: #4f86cf; background-image: radial-gradient(ellipse 90% 70% at 50% 25%, #77a5e3, #4a80c9 70%, #3a6db4); border: 2px solid #2c5a9c; --cw: clamp(66px, 7.6vw, 104px); }
.felt-arc { justify-self: center; margin: 0; padding: 5px 16px; border-radius: 999px; background: #f6e2a4; color: var(--ink); font-size: clamp(0.72rem, 1.1vw, 0.88rem); font-weight: 700; 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 14px; border-radius: 999px; background: var(--cloud); color: var(--ink); font-weight: 700; font-size: 0.92rem; }
.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 #fff; }
.shoe span { padding: 1px 8px; border-radius: 999px; background: var(--cloud); font-size: 0.74rem; font-weight: 700; 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(255, 255, 255, 0.75); border-radius: 16px; 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(255, 255, 255, 0.8); }
.hand { display: grid; justify-items: center; gap: 6px; padding: 8px 10px 10px; border-radius: 18px; border: 2px dashed rgba(255, 255, 255, 0.6); transition: border-color var(--t-med) ease, background-color var(--t-med) ease; }
.hand.is-active { border: 2px solid #f6e2a4; background-color: rgba(255, 255, 255, 0.16); }
.hand.is-waiting { opacity: 0.85; }
.hand-tag { margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--cloud); color: var(--ink); font-size: 0.9rem; font-weight: 500; text-align: center; }
.hand-tag b { font-weight: 700; }
.out { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; font-weight: 700; font-size: 0.8rem; color: #fff; background: #5d6a8a; }
.out.win, .out.blackjack { background: var(--peri-deep); }
.out.push { background: #8a6412; }
.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: #ffffff; border: 1.5px solid #c9d4e6; color: #1b2346; }
.card .face.red { color: #c22a40; }
.card .back { transform: rotateY(180deg); overflow: hidden; border: 3px solid #ffffff; background: var(--peri); }
.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: 700; 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, #fbf1d2, #e7ecff); border: 1.5px solid var(--gold); }
.card .pip.court b { font-family: var(--display); font-weight: 600; font-size: calc(var(--cw) * 0.44); 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) 330px; }
  .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: 16px; }
  .ctrl-row.actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stage-head img { width: 46px; height: 46px; }
  .cabinet { padding: 6px; border-radius: 24px; }
  .cab-frame { border-radius: 19px; 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: 32px; 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; }
}
