/* CASINO M2 step 2: Mayor Pinto's Twenty-One and Hold'em with Casino Chips (bean-machine/twentyone.html, holdem.html).
   PRESENTATION ONLY. Loaded after casino-skin.css and casino-games-v2.css; every rule is scoped to body.ct-page and uses
   the casino's own tokens (--cg-*), so Light, Dark and Dood come from the existing theme switch. The felt and the
   cards keep their own colours in every theme: they are the table. */
body.ct-page { background: var(--cg-page); color: var(--cg-text); font-family: var(--cg-body); }
body.ct-page .ct-app { max-width: 920px; margin: 0 auto; padding: 6px 16px calc(28px + env(safe-area-inset-bottom)); }
body.ct-page .ct-app * { box-sizing: border-box; }
body.ct-page .ct-app [hidden] { display: none !important; } /* a panel's own display never shows a hidden one */
body.ct-page .ct-app a { color: var(--cg-gold-2); font-weight: 600; }
body.ct-page .ct-app h1, body.ct-page .ct-app h2 { font-family: var(--cg-display); color: var(--cg-gold-2); margin: 14px 0 6px; line-height: 1.1; }
body.ct-page .ct-app h1 { font: 400 clamp(24px, 5vw, 32px)/1.1 var(--cg-logo); }
body.ct-page[data-theme="light"] .ct-app h1 { color: #4b2690; }
body.ct-page .ct-app h2 { font-size: 21px; font-weight: 700; }
body.ct-page .ct-muted { color: var(--cg-muted); font-size: 14px; line-height: 1.45; }
body.ct-page .ct-small { font-size: 13px; }
body.ct-page .ct-msg { min-height: 1.3em; color: var(--cg-gold-2); font-weight: 600; margin: 6px 0; }
body.ct-page .ct-msg.bad { color: var(--cg-bad); }

/* panels and buttons */
body.ct-page .ct-panel { background: var(--cg-panel); border: 1px solid var(--cg-rim); border-radius: var(--cg-r); padding: 14px; margin: 12px 0; }
body.ct-page .ct-gate { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
body.ct-page .ct-btn { min-height: var(--cg-tap); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--cg-rim); background: transparent; color: var(--cg-text); font: 700 15px var(--cg-body); cursor: pointer; }
body.ct-page .ct-btn:hover:not(:disabled) { background: var(--cg-hover); }
body.ct-page .ct-btn.play { background: var(--cg-play); color: var(--cg-play-ink); border-color: transparent; box-shadow: 0 6px 18px var(--cg-play-glow); }
body.ct-page .ct-btn.warn { background: #7a2f26; color: #fff; border-color: transparent; }
body.ct-page .ct-btn:disabled { opacity: .45; cursor: not-allowed; }
body.ct-page .ct-btn:focus-visible, body.ct-page .ct-chip:focus-visible, body.ct-page .ct-input:focus-visible { outline: 3px solid var(--cg-rim-strong); outline-offset: 2px; }
body.ct-page .ct-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
body.ct-page .ct-input { min-height: var(--cg-tap); padding: 6px 12px; border-radius: 12px; border: 1px solid var(--cg-rim); background: var(--cg-field); color: var(--cg-text); font: 600 16px var(--cg-num); width: 120px; }

/* lobby */
body.ct-page .ct-tables { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
body.ct-page .ct-tcard { display: flex; flex-direction: column; gap: 8px; }
body.ct-page .ct-tcard b { font-size: 17px; }

/* the felt */
body.ct-page .ct-felt { background: radial-gradient(120% 90% at 50% 0%, #1d7a4a, #0c4a2c 70%); border: 3px solid #d9b25a; border-radius: 28px; padding: 14px 12px; color: #f8f0dc; box-shadow: inset 0 0 40px #0006; }
body.ct-page .ct-felt .ct-label { font: 700 12px var(--cg-body); letter-spacing: .08em; text-transform: uppercase; color: #f6d98bcc; }
body.ct-page .ct-felt .ct-total { font: 700 15px var(--cg-num); color: #fff7dc; }
body.ct-page .ct-dealer { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed #f6d98b55; margin-bottom: 10px; }
body.ct-page .ct-cards { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 64px; }
body.ct-page .ct-card { width: 44px; height: 62px; border-radius: 7px; background: #fffdf6; color: #1b1b1f; display: inline-grid; place-items: center; font: 700 17px/1 var(--cg-num); box-shadow: 0 2px 6px #0007; position: relative; }
body.ct-page .ct-card.red { color: #c4262e; }
body.ct-page .ct-card small { position: absolute; left: 4px; top: 4px; font-size: 11px; }
body.ct-page .ct-card.back { background: repeating-linear-gradient(45deg, #5a2fc4 0 6px, #4b2690 6px 12px); border: 2px solid #fffdf6; }
body.ct-page .ct-seats { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
body.ct-page .ct-seat { border-radius: 16px; padding: 8px; background: #0006; border: 1px solid #f6d98b33; min-height: 74px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
body.ct-page .ct-seat.you { border-color: #f6d98b; box-shadow: 0 0 0 2px #f6d98b55; }
body.ct-page .ct-seat.turn { border-color: #ffd166; box-shadow: 0 0 0 3px #ffd16699; }
body.ct-page .ct-seat.out { opacity: .55; }
body.ct-page .ct-seat .ct-name { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ct-page .ct-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 700 12px var(--cg-body); background: #f6d98b; color: #2a1a05; }
body.ct-page .ct-pill.win { background: #5ee39b; color: #0b2a1a; }
body.ct-page .ct-pill.lose { background: #ff9a90; color: #3a0a06; }
body.ct-page .ct-pill.dim { background: #ffffff22; color: #f8f0dc; }
body.ct-page .ct-board { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 12px; }
body.ct-page .ct-pot { font: 700 18px var(--cg-num); color: #fff7dc; }

/* the action bar */
body.ct-page .ct-actions { margin-top: 12px; background: var(--cg-glass); border: 1px solid var(--cg-rim); border-radius: var(--cg-r); padding: 10px; backdrop-filter: blur(6px); }
body.ct-page .ct-clock { height: 6px; border-radius: 999px; background: var(--cg-hover); overflow: hidden; margin-bottom: 8px; }
body.ct-page .ct-clock i { display: block; height: 100%; background: var(--cg-gold); transition: width .25s linear; }
body.ct-page .ct-chips { display: flex; gap: 6px; flex-wrap: wrap; }
body.ct-page .ct-chip { min-width: 52px; min-height: 44px; border-radius: 999px; border: 2px dashed #fffdf6aa; background: #7a2f26; color: #fff; font: 700 14px var(--cg-num); cursor: pointer; }
body.ct-page .ct-chip[aria-pressed="true"] { background: #e2b955; color: #2a1a05; border-style: solid; }
body.ct-page .ct-proof { font: 12px/1.4 var(--cg-num); word-break: break-all; color: var(--cg-muted); }
body.ct-page details summary { cursor: pointer; font-weight: 700; }
body.still.ct-page .ct-clock i { transition: none; }
@media (max-width: 420px) { body.ct-page .ct-card { width: 38px; height: 54px; font-size: 15px; } body.ct-page .ct-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.ct-page .ct-felt .ct-muted { color: #f8f0dcb3; } /* on the felt every theme reads light-on-green */

/* ── tables-v2 (G 6 Nov 2026: "needs to look better ... circular looks more fun") ──
   The oval table: a wood rail, a gold pinstripe and green felt; the dealer (Twenty-One) or the board and pot (Hold'em)
   in the middle, the seats around the edge (placed by ct-felt.mjs). Phones keep the stacked layout. */
body.ct-page .ct-card { width: 50px; height: 72px; padding: 4px 5px; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: space-between; place-items: initial; font: 800 16px/1 var(--cg-num); }
body.ct-page .ct-card b { font: inherit; }
body.ct-page .ct-card i { align-self: center; font-style: normal; font-size: 26px; line-height: 1; margin-bottom: 10px; }
body.ct-page .ct-card.back { padding: 0; }
body.ct-page .ct-card.ghost { opacity: .22; box-shadow: none; }
body.ct-page .ct-card.deal { animation: ctdeal .5s cubic-bezier(.2, .9, .25, 1) both; animation-delay: var(--d, 0ms); }
@keyframes ctdeal { from { transform: translateY(-140px) rotate(-22deg) scale(.55); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
body.ct-page .ct-stack { position: relative; display: inline-flex; align-items: flex-end; gap: 6px; height: 30px; padding-left: 30px; }
body.ct-page .ct-stack i { position: absolute; left: 0; width: 26px; height: 9px; border-radius: 50%; background: #e2b955; border: 2px dashed #7a2f26; box-shadow: 0 1px 0 #0008; }
body.ct-page .ct-stack i:nth-child(1) { bottom: 0; } body.ct-page .ct-stack i:nth-child(2) { bottom: 6px; background: #c4262e; border-color: #fff6; } body.ct-page .ct-stack i:nth-child(3) { bottom: 12px; }
body.ct-page .ct-stack b { font: 800 15px var(--cg-num); color: #fff7dc; }
body.ct-page .ct-callout { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 20px; border-radius: 999px; background: #0b0614d9; border: 2px solid #e2c477; color: #fff7dc; text-align: center; pointer-events: none; box-shadow: 0 10px 30px #0008; animation: ctpulse 1.6s ease-in-out infinite; }
body.ct-page .ct-callout b { font: 400 clamp(18px, 3vw, 24px)/1.1 var(--cg-logo, "Bagel Fat One", Poppins, sans-serif); color: #ffd977; }
body.ct-page .ct-callout span { font-weight: 700; font-size: 14px; }
@keyframes ctpulse { 50% { box-shadow: 0 0 0 6px #e2c47733, 0 10px 30px #0008; } }
body.ct-page .ct-btn.big { min-height: 52px; padding: 10px 26px; font-size: 17px; }
body.ct-page .ct-auto { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; cursor: pointer; }
body.ct-page .ct-auto input { width: 20px; height: 20px; accent-color: #e2b955; }
body.ct-page .ct-invite { min-height: 40px; padding: 6px 14px; font-size: 14px; }
body.ct-page .ct-tophead { justify-content: flex-start; }
body.ct-page .ct-tophead .ct-balpill { margin-left: auto; }
body.ct-page .ct-felt { position: relative; }
@media (min-width: 720px) {
  body.ct-page .ct-felt.oval { aspect-ratio: 16 / 10.5; padding: 0; border-radius: 50% / 44%; border: 12px solid #5a3417;
    background: radial-gradient(ellipse at 50% 40%, #23915a 0%, #156b40 55%, #0c4a2c 100%);
    box-shadow: inset 0 0 0 3px #d9b25a, inset 0 0 70px #0009, 0 18px 40px #0009, 0 0 0 2px #2a1708; }
  body.ct-page .ct-felt.oval .ct-dealer { position: absolute; left: 50%; top: 7%; transform: translateX(-50%); border: 0; margin: 0; padding: 0; min-width: 260px; }
  body.ct-page .ct-felt.oval.ring .ct-dealer { top: 50%; transform: translate(-50%, -50%); }
  body.ct-page .ct-felt.oval:not(.ring)::after { content: "BLACKJACK PAYS 3 TO 2 · DEALER STANDS ON SOFT 17"; position: absolute; left: 50%; top: 36%; transform: translateX(-50%); font: 800 11px/1 var(--cg-body); letter-spacing: .18em; color: #f6d98b88; white-space: nowrap; pointer-events: none; }
  body.ct-page .ct-felt.oval .ct-seats { position: absolute; inset: 0; display: block; }
  body.ct-page .ct-felt.oval .ct-seat { position: absolute; left: var(--sx, 50%); top: var(--sy, 50%); transform: translate(-50%, -50%); width: 128px; min-height: 70px; padding: 6px; background: #0b0614a6; backdrop-filter: blur(2px); }
  body.ct-page .ct-felt.oval .ct-seat.turn { transform: translate(-50%, -50%) scale(1.06); }
  body.ct-page .ct-felt.oval .ct-cards { min-height: 0; flex-wrap: nowrap; gap: 0; }
  body.ct-page .ct-felt.oval .ct-seat .ct-card + .ct-card { margin-left: -22px; }
  body.ct-page .ct-felt.oval .ct-callout { top: 52%; }
}
@media (prefers-reduced-motion: reduce) { body.ct-page .ct-card.deal, body.ct-page .ct-callout { animation: none; } }
body.still.ct-page .ct-card.deal, body.still.ct-page .ct-callout { animation: none; }
@media (max-width: 719px) {
  body.ct-page .ct-seats { align-items: start; }
  body.ct-page .ct-seat { min-height: 0; }
  body.ct-page .ct-seat.out:not(:has(.ct-card)) { padding: 6px; }
  body.ct-page .ct-felt .ct-cards { flex-wrap: nowrap; gap: 0; min-height: 0; }
  body.ct-page .ct-seat .ct-card + .ct-card { margin-left: -18px; }
  body.ct-page .ct-callout { top: 50%; }
}

/* house-players-v1: Mayor's Regulars */
.ct-seat.house{opacity:.92}
.ct-house{display:inline-block;align-self:center;margin:0 auto 2px;line-height:1.4;padding:1px 6px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.06em;vertical-align:middle;background:#f3d27a;color:#3a2a06}
