/* Ultimate Texas Hold'em — casino-authentic table + dense terminal readouts */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0a12; --bg2: #000; --bg3: #0f1a2e;
  --fg: #e0e0e0; --fg2: #a0a0a0;
  --accent: #00d4ff; --green: #00ff88; --red: #ff4444; --yellow: #ffaa00;
  --gold: #d4af37; --gold2: #ffe08a; --border: #2a2a4a;
  --glass: rgba(7, 9, 18, .88); --focus: #8be9ff;
  --felt1: #1a6b4a; --felt2: #0d4530; --felt3: #072b1d;
  --print: rgba(242, 230, 190, 0.55);          /* felt-printed text */
  --card-w: 56px;
}
html, body { height: 100%; }
body {
  background:
    radial-gradient(ellipse at 50% -8%, rgba(101, 72, 30, .27), transparent 43%),
    radial-gradient(ellipse at 50% 48%, #101422, #070810 66%, #030306);
  color: var(--fg);
  font: 12px 'Consolas', 'Monaco', 'Courier New', monospace;
  line-height: 1.4; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit; color: var(--fg); background: var(--bg3);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 10px; cursor: pointer; white-space: nowrap;
}
button:hover { border-color: var(--accent); }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 212, 255, .14);
}
button.primary { background: #123a55; border-color: var(--accent); color: #cff3ff; }
button.danger  { border-color: var(--red); color: #ffb3b3; }
input, select {
  font: 11px 'Consolas', monospace; color: var(--fg);
  background: #0a1220; border: 1px solid var(--border); border-radius: 3px;
  padding: 3px 6px;
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--green); } .neg { color: var(--red); } .warn { color: var(--yellow); }

/* ---------------------------------------------------------------- top bars */
#topbar {
  display: flex; align-items: center; gap: 3px 8px; flex-wrap: wrap;
  min-height: 38px; padding: 5px 12px;
  background: linear-gradient(180deg, rgba(8,9,17,.98), rgba(3,4,9,.94));
  border-bottom: 1px solid rgba(212,175,55,.28);
  box-shadow: 0 4px 16px rgba(0,0,0,.38); position: relative; z-index: 55;
}
#brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#topbar h1 { font-size: 13px; letter-spacing: 2px; color: var(--gold);
  text-transform: uppercase; white-space: nowrap; }
#togglebar { display: contents; }
.tog { font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
  min-height: 26px; padding: 3px 9px; border: 1px solid #303652; border-radius: 13px;
  cursor: pointer; color: var(--fg2); user-select: none; -webkit-user-select: none;
  white-space: nowrap; background: linear-gradient(#111525, #080a13);
  box-shadow: inset 0 1px rgba(255,255,255,.035); }
.tog:hover { color: #d8f6ff; background: linear-gradient(#151c30, #0a0d18); }
.tog.on { color: var(--accent); border-color: var(--accent);
  background: linear-gradient(rgba(0, 112, 156, .25), rgba(0, 42, 70, .42));
  box-shadow: 0 0 10px rgba(0,212,255,.12), inset 0 1px rgba(255,255,255,.06); }
.tog.warn-on.on { color: var(--yellow); border-color: var(--yellow);
  background: rgba(255, 170, 0, .08); }
#togglebar .spacer { flex: 1; }
#phaseStatus { min-height: 24px; display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 12px; border: 1px solid rgba(212,175,55,.35);
  color: #c7b36d; background: rgba(91,68,18,.12); font-size: 9px;
  letter-spacing: 1.4px; white-space: nowrap; }
#phaseStatus.live { color: #c9f6ff; border-color: rgba(0,212,255,.6);
  background: rgba(0,112,156,.18); box-shadow: 0 0 12px rgba(0,212,255,.14); }

/* ---------------------------------------------------------------- main layout */
#main { display: flex; gap: 0; align-items: stretch; max-width: 1560px; margin: 0 auto; }
#stage { position: relative; flex: 1; height: 730px; min-width: 0;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,.22)); }

/* wood rail + felt: half-oval casino table */
#rail {
  position: absolute; left: 10px; right: 10px; top: 6px; height: 500px;
  border-radius: 26px 26px 46% 46% / 26px 26px 82% 82%;
  background: linear-gradient(160deg, #5a3a1e, #3a2412 45%, #241608);
  box-shadow: 0 10px 34px rgba(0,0,0,.75), inset 0 2px 3px rgba(255,220,160,.25);
}
#felt {
  position: absolute; left: 24px; right: 24px; top: 18px; height: 474px;
  border-radius: 22px 22px 46% 46% / 22px 22px 82% 82%;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(ellipse at 50% 30%, var(--felt1), var(--felt2) 62%, var(--felt3));
  box-shadow: inset 0 0 70px rgba(0,0,0,.6), inset 0 0 8px rgba(0,0,0,.8);
}
.felt-title {
  position: absolute; left: 50%; top: 306px; transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  font-size: 15px; letter-spacing: 7px; color: var(--print);
  text-transform: uppercase; white-space: nowrap; opacity: .55;
  text-shadow: 0 1px 0 rgba(0,0,0,.4); pointer-events: none;
}
/* felt-printed paytables */
.feltprint {
  position: absolute; z-index: 3; color: var(--print); font-size: 9px;
  letter-spacing: 1px; text-transform: uppercase; line-height: 1.35;
  pointer-events: none; text-shadow: 0 1px 1px rgba(0,0,0,.5);
}
.feltprint h5 { font-size: 10px; letter-spacing: 2px; margin-bottom: 2px;
  color: rgba(250, 240, 200, 0.75); border-bottom: 1px solid rgba(242,230,190,.35);
  padding-bottom: 1px; }
.feltprint table { border-collapse: collapse; width: auto; }
.feltprint td { padding: 0 4px 0 0; white-space: nowrap; }
.feltprint td:last-child { text-align: right; padding: 0 0 0 8px; }
#printTrips { left: 15.5%; top: 26px; }
#printBlind { left: 60%; top: 26px; right: auto; }

/* shuffle machine (cards deal from here) */
#shuffler { position: absolute; left: 7%; top: 26px; z-index: 6; width: 84px; }
#shuffler .shoe-body { height: 46px; border-radius: 6px;
  background: linear-gradient(#2b2b34, #141419);
  border: 1px solid #45454f; box-shadow: 0 3px 10px rgba(0,0,0,.6);
  position: relative; }
#shuffler .shoe-slot { position: absolute; right: 6px; top: 8px; width: 34px;
  height: 30px; border-radius: 3px; background: #101c42;
  border: 1px solid #3452a5; }
#shuffler .shoe-lbl { font-size: 6.5px; letter-spacing: 1px; color: #8a8a98;
  position: absolute; left: 6px; top: 6px; width: 36px; line-height: 1.35;
  text-transform: uppercase; }
#shuffler .shoe-light { position: absolute; left: 8px; bottom: 6px; width: 6px;
  height: 6px; border-radius: 50%; background: #1a5a1a; }
#shuffler.dealing .shoe-light { background: #37e837;
  box-shadow: 0 0 6px 1px rgba(60,255,60,.8); }

/* dealer chip tray (pays originate here) */
#dealertray { position: absolute; left: 50%; top: 22px; z-index: 6;
  margin-left: -186px; width: 118px; height: 64px; border-radius: 6px;
  background: linear-gradient(#241a10, #14100a);
  border: 1px solid #56421e; box-shadow: inset 0 2px 6px rgba(0,0,0,.7);
  padding: 5px 6px; }
#dealertray .trayrows { display: flex; flex-direction: column; gap: 3px; }
#dealertray .trow { display: flex; gap: 2px; justify-content: center; }
#dealertray .trow svg { display: block; }

#dealerArea { position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  -webkit-transform: translateX(-50%); text-align: center; z-index: 5; }
#boardArea { position: absolute; left: 50%; top: 142px; transform: translateX(-50%);
  -webkit-transform: translateX(-50%); text-align: center; z-index: 5; }
.arealabel { font-size: 9px; letter-spacing: 3px; color: var(--print);
  text-transform: uppercase; margin-bottom: 3px; opacity: .8; }
.cardrow { display: flex; gap: 6px; justify-content: center;
  min-height: calc(var(--card-w) * 1.41); }
/* boxed board, dealer's view: flop group on the right, cards run right-to-left */
#boardCards { gap: 20px; align-items: flex-start; }
.bgroup { display: flex; flex-direction: row-reverse; gap: 6px;
  padding: 7px 8px 15px; border: 1.5px dashed rgba(242, 230, 190, .4);
  border-radius: 10px; position: relative;
  min-height: calc(var(--card-w) * 1.41 + 24px); }
.bgroup-tr { min-width: calc(var(--card-w) * 2 + 24px); }
.bgroup-flop { min-width: calc(var(--card-w) * 3 + 30px); }
.bgroup::after { content: attr(data-lbl); position: absolute; bottom: 2px;
  left: 50%; transform: translateX(-50%); -webkit-transform: translateX(-50%);
  font-size: 7px; letter-spacing: 2px; color: var(--print); white-space: nowrap; }
.handname { font-size: 11px; color: #ffe9a8; margin-top: 3px; min-height: 15px;
  letter-spacing: 1px; text-shadow: 0 1px 2px #000; }
.qual-badge { font-size: 9px; padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.qual-yes { background: rgba(0,255,136,.15); color: var(--green); }
.qual-no  { background: rgba(255,68,68,.18); color: var(--red); }

#dealbtns { position: absolute; left: 50%; top: 246px; transform: translateX(-50%);
  -webkit-transform: translateX(-50%); z-index: 12; display: flex; gap: 6px;
  align-items: center; flex-direction: column; }
#dealbtns .hint { font-size: 9px; color: var(--print); }
#dealBtn, #revealBtn { font-size: 18px; letter-spacing: 4px; padding: 11px 40px;
  border-radius: 12px; border-width: 2px; }
#dealBtn { background: #123a55; border-color: var(--accent); color: #cff3ff;
  box-shadow: 0 4px 18px rgba(0, 90, 140, .45); }
#dealBtn:not(:disabled):hover { box-shadow: 0 4px 24px rgba(0,180,255,.5); }
#skipBtn { background: #1c2733; border: 2px solid #4a6a8a; color: #cfe3f5;
  font-size: 14px; letter-spacing: 3px; padding: 8px 26px; border-radius: 10px; }
#skipBtn:disabled { opacity: .5; }
#revealBtn { background: #4a1310; border-color: #ff6a45; color: #ffd9c8;
  box-shadow: 0 4px 18px rgba(200, 60, 20, .5);
  -webkit-animation: breathe 1.7s ease-in-out infinite;
  animation: breathe 1.7s ease-in-out infinite; }
#revealBtn:hover { box-shadow: 0 4px 26px rgba(255, 110, 60, .65); }

/* topbar widgets */
#handCount { font-size: 11px; letter-spacing: 2px; color: var(--accent);
  border: 1px solid var(--border); border-radius: 10px; padding: 3px 10px;
  font-variant-numeric: tabular-nums; }
#gearBtn { font-size: 15px; padding: 2px 9px; border-radius: 50%; }

/* settings panel */
.set-grid { display: grid; grid-template-columns: auto auto auto; gap: 4px 8px;
  align-items: center; margin: 6px 0; }
.set-grid .snm { font-size: 11px; color: #fff; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 110px; }
.set-sec { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 8px; }
.set-sec h5 { font-size: 9px; letter-spacing: 2px; color: var(--accent);
  text-transform: uppercase; margin-bottom: 5px; }
#modal .box.wide { max-width: 660px; max-height: 86vh; overflow: auto; }

/* pre-deal house-edge strip */
.edgeline { font-size: 10px; color: var(--fg2); }
.edgeline b { color: var(--yellow); }
.edgeline .nm { color: #fff; }

/* ------------------------------------------------------------ decision charts */
#chartOverlay { position: fixed; inset: 0; z-index: 135; display: none;
  background: rgba(0,0,0,.86); overflow: auto; padding: 18px; }
#chartOverlay .cwrap { max-width: 1250px; margin: 0 auto; }
#chartOverlay h3 { color: var(--gold); font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; margin-bottom: 8px; }
#chartOverlay .charts2 { display: flex; gap: 18px; flex-wrap: wrap; }
.chartbox { flex: 1; min-width: 420px; }
.chartbox h4 { font-size: 10px; letter-spacing: 1px; color: var(--fg); margin: 4px 0;
  display: flex; gap: 8px; align-items: center; }
/* Wizard-of-Odds-style triangle chart */
.wchart { width: max-content; }
.wc-row { display: flex; gap: 1px; margin-bottom: 1px; }
.wc-rh { width: 22px; font-size: 10px; color: var(--fg2); display: flex;
  align-items: center; justify-content: center; }
.wc-c { width: 30px; height: 26px; display: flex; align-items: center;
  justify-content: center; font: bold 11px 'Consolas', monospace; color: #08140a;
  border-radius: 2px; cursor: help; }
.wc-hdr { background: none; color: var(--fg2); font-weight: normal; font-size: 10px;
  cursor: default; }
.wc-void { visibility: hidden; cursor: default; }
.wc-dead { background: #17171f; }
.wc-pair { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.cg-Y  { background: #35b45c; }
.cg-S  { background: #efe23a; color: #4a3c00; }
.cg-N  { background: #d0392e; color: #ffe0dc; }
.cg-F  { background: #e67e22; color: #3a1e00; }
.cg-F1 { background: #f3b13c; color: #3a2600; }
.cg-SP { background: #a8d84a; color: #1e3000; }
.cg-M  { background: #9b59b6; color: #f4e6fb; }
.cg-V  { background: #b8860b; color: #fff8e0; font-weight: bold; }
.wc-hero { position: relative; z-index: 3; overflow: visible; }
.wc-hero::after { content: ''; position: absolute; left: 50%; top: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 2.5px solid #ffd75e; pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 215, 94, .8), inset 0 0 6px rgba(255, 215, 94, .35); }
.wc-pairline { font-size: 10px; color: var(--fg); margin: 6px 0 2px; }
.wc-pairline b { color: #ffe9a8; }
.wc-pairs { margin-top: 6px; }
.cg-diff { outline: 2px solid #4be3ff; outline-offset: -2px; z-index: 2;
  -webkit-animation: diffGlow 1.1s infinite alternate; animation: diffGlow 1.1s infinite alternate; }
@-webkit-keyframes diffGlow { from { box-shadow: 0 0 2px rgba(75,227,255,.5); }
  to { box-shadow: 0 0 10px rgba(75,227,255,.95); } }
@keyframes diffGlow { from { box-shadow: 0 0 2px rgba(75,227,255,.5); }
  to { box-shadow: 0 0 10px rgba(75,227,255,.95); } }
.chart-legend { font-size: 9px; color: var(--fg2); margin-top: 8px; line-height: 1.7; }
.chart-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px;
  vertical-align: -1px; margin: 0 3px 0 8px; }
.chartbox { min-width: 400px; }
@media (max-width: 980px) { .chartbox { min-width: 300px; }
  .wc-c { width: 22px; height: 20px; font-size: 9px; }
  .wc-rh { width: 16px; } }

/* ---------------------------------------------------------------- stations */
.station { position: absolute; width: 154px; z-index: 10;
  transform: translateX(-50%); -webkit-transform: translateX(-50%);
  transition: opacity .25s; }
.station.empty-seat { opacity: .55; }
.station.folded .cards, .station.folded .slots { opacity: .45; }
.act-frame { position: absolute; left: -5px; right: -5px; display: none;
  border: 2px solid rgba(0, 212, 255, .6); border-radius: 14px;
  pointer-events: none; z-index: 1;
  -webkit-animation: breathe 1.7s ease-in-out infinite;
  animation: breathe 1.7s ease-in-out infinite; }
@-webkit-keyframes breathe {
  0%, 100% { box-shadow: 0 0 5px 1px rgba(0,212,255,.18),
             inset 0 0 6px rgba(0,212,255,.08); border-color: rgba(0,212,255,.35); }
  50% { box-shadow: 0 0 24px 7px rgba(0,212,255,.65),
        inset 0 0 14px rgba(0,212,255,.18); border-color: rgba(0,212,255,.95); } }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 5px 1px rgba(0,212,255,.18),
             inset 0 0 6px rgba(0,212,255,.08); border-color: rgba(0,212,255,.35); }
  50% { box-shadow: 0 0 24px 7px rgba(0,212,255,.65),
        inset 0 0 14px rgba(0,212,255,.18); border-color: rgba(0,212,255,.95); } }
/* arc positions: 1 & 6 high on the curve, 3 & 4 at the bottom */
.station[data-pos="0"] { left: 9%;  top: 128px; }
.station[data-pos="1"] { left: 23%; top: 268px; }
.station[data-pos="2"] { left: 39.5%; top: 330px; }
.station[data-pos="3"] { left: 60.5%; top: 330px; }
.station[data-pos="4"] { left: 77%; top: 268px; }
.station[data-pos="5"] { left: 91%; top: 128px; }

.station .cards { display: flex; gap: 4px; justify-content: center;
  min-height: calc(var(--card-w) * 1.41); }
.station .statline { font-size: 8.5px; color: #cfe3d8; text-align: center;
  min-height: 12px; text-shadow: 0 1px 1px #000; letter-spacing: .5px; }
.station .statline .handrank { color: #ffe9a8; font-size: 10px; letter-spacing: 1px; }
.station .net { position: absolute; top: -16px; left: 50%;
  transform: translateX(-50%); -webkit-transform: translateX(-50%);
  font-size: 14px; font-weight: bold; text-shadow: 0 0 6px #000; z-index: 12; }

.slots { display: flex; flex-direction: column; align-items: center; gap: 3px;
  margin-top: 3px; position: relative; }
.coach { font-size: 18px; padding: 0 2px; background: none; border: none;
  filter: drop-shadow(0 0 3px rgba(255, 230, 160, .8)) brightness(1.15);
  -webkit-filter: drop-shadow(0 0 3px rgba(255, 230, 160, .8)) brightness(1.15);
  cursor: pointer; line-height: 1; align-self: center;
  filter: drop-shadow(0 1px 2px #000); -webkit-filter: drop-shadow(0 1px 2px #000);
  transition: -webkit-transform .12s; transition: transform .12s; }
.coach:hover { -webkit-transform: scale(1.35); transform: scale(1.35); border: none; }
.slot { position: relative; cursor: default; }
.slot.editable { cursor: pointer; }
.slot-lbl { pointer-events: none; }

/* progressive circle — red ring with a center lamp: dark when off, lit red
   when the bet is active */
.prog-slot.circle { border-color: rgba(235, 90, 70, .85); }
.prog-slot.circle .slot-lbl { color: #ff9a8a; }
.prog-lamp { position: absolute; left: 50%; top: 55%; width: 15px; height: 15px;
  border-radius: 50%; transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #1c1c1e, #060607);
  border: 2px solid #33191a; box-shadow: inset 0 1px 2px rgba(0,0,0,.9); }
.prog-slot.circle.armed { border-color: #ff5040; }
.prog-slot.circle.armed .prog-lamp {
  background: radial-gradient(circle at 35% 35%, #ffb0a0, #e81400 65%, #a80c00);
  border-color: #ff6a55;
  box-shadow: 0 0 12px 3px rgba(255, 40, 20, .85);
  -webkit-animation: lampPulse 1.4s infinite; animation: lampPulse 1.4s infinite; }
.prog-slot.circle.won { border-color: var(--green);
  box-shadow: 0 0 12px rgba(0,255,136,.6); }
@-webkit-keyframes lampPulse {
  0%,100% { box-shadow: 0 0 12px 3px rgba(255,40,20,.85); }
  50% { box-shadow: 0 0 4px 1px rgba(255,40,20,.35); } }
@keyframes lampPulse {
  0%,100% { box-shadow: 0 0 12px 3px rgba(255,40,20,.85); }
  50% { box-shadow: 0 0 4px 1px rgba(255,40,20,.35); } }

/* betting circles */
.slot.circle { width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid rgba(232,208,140,.75);
  background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.025), rgba(0,0,0,.10));
  box-shadow: inset 0 0 8px rgba(0,0,0,.42), 0 1px 0 rgba(255,255,255,.035);
  display: flex; align-items: flex-start; justify-content: center; }
.slot.circle .slot-lbl { font-size: 7px; letter-spacing: 1px; color: var(--print);
  margin-top: 5px; }
.slot.circle .stack { position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%);
  transition: -webkit-transform .6s ease-in-out; transition: transform .6s ease-in-out; }
.st-win { position: absolute; left: 27px; top: 12px; }
/* dealer didn't open: ante chips slid diagonally outside the circle (no action) */
.slot.circle.no-action .stack {
  transform: translate(2px, 26px); -webkit-transform: translate(2px, 26px); }
.slot.circle.no-action { border-style: dotted; opacity: .9; }
.slot.circle .amt { position: absolute; left: 50%; bottom: -13px;
  transform: translateX(-50%); -webkit-transform: translateX(-50%);
  font-size: 9px; color: #ffe9a8; text-shadow: 0 1px 2px #000; }
.slot.circle.won  { border-color: var(--green); box-shadow: 0 0 10px rgba(0,255,136,.55); }
.slot.circle.lost { border-color: rgba(255,68,68,.8); }
.slot.circle.push { border-color: #9a9ab0; }
.ab-row { display: flex; gap: 8px; margin: 4px 0 6px; }
.play-slot { margin-top: 4px; }

.chipstack { position: relative; width: 32px; height: 32px; }
.chipstack-c { position: absolute; left: 0; }

/* player tray (outside the rail) */
.tray { margin-top: 14px; text-align: center; padding: 6px 6px 5px;
  border: 1px solid rgba(71,78,111,.42); border-radius: 10px;
  background: linear-gradient(180deg, rgba(17,20,34,.90), rgba(5,6,12,.94));
  box-shadow: 0 7px 18px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.035); }
.tray .trayrow { display: flex; justify-content: center; gap: 8px;
  align-items: baseline; }
.tray .nmrow { text-align: center; margin-top: 2px; }
.tray .nm { font-size: 12px; color: #fff; letter-spacing: 1.5px; cursor: pointer;
  max-width: 148px; display: inline-block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  padding: 0 2px; border: 0; background: transparent; }
.tray .bank { font-size: 13px; color: var(--gold); }
.tray .chips { display: flex; justify-content: center; gap: 4px; margin-top: 4px;
  min-height: 40px; }
.traychip { cursor: grab; touch-action: none; transition: -webkit-transform .12s;
  transition: transform .12s; border: 0; background: transparent; padding: 0;
  border-radius: 50%; }
.traychip:hover { -webkit-transform: translateY(-4px); transform: translateY(-4px); }
.tray .seatbtns { display: flex; justify-content: center; gap: 4px; margin-top: 3px;
  flex-wrap: wrap; }
.tray .seatbtns button, .tray .seatbtns .tog { font-size: 9.5px; padding: 3px 8px;
  min-height: 24px; }
.chip-ghost { position: fixed; z-index: 120; pointer-events: none; }
.anim-lock { pointer-events: none; opacity: .35; }
#dealerCards .card { transition: transform .45s ease;
  -webkit-transition: -webkit-transform .45s ease; }
#dealerCards .card.best5 { transform: translateY(-7px);
  -webkit-transform: translateY(-7px); }
#dealerCards .card.unused-card { transform: rotate(-10deg) translateY(3px);
  -webkit-transform: rotate(-10deg) translateY(3px); opacity: .88; }
.lasthand { background: #10101f; border: 1px solid var(--border); color: #9ab;
  font-size: 9px; letter-spacing: 1px; padding: 6px 10px; border-radius: 6px;
  cursor: pointer; }
.lasthand:hover { border-color: var(--accent); color: var(--accent); }
/* ------------- optional animated dealer ------------- */
#dealerGirl { position: absolute; left: 50%; top: -280px; width: 950px;
  margin-left: -475px; z-index: 4; pointer-events: none; }
#dlrImg { width: 100%; display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 100%),
    linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 100%),
    linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-composite: intersect;
  -webkit-animation: dlrBreathe 7s ease-in-out infinite;
  animation: dlrBreathe 7s ease-in-out infinite; }
@-webkit-keyframes dlrBreathe { 0%,100% { -webkit-transform: scale(1); }
  50% { -webkit-transform: scale(1.012); } }
@keyframes dlrBreathe { 0%,100% { transform: scale(1); }
  50% { transform: scale(1.012); } }
#dlrBubble { position: absolute; left: 50%; top: 64px; transform: translateX(120px);
  -webkit-transform: translateX(46px); background: #0b0b18; color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px 10px 10px 2px;
  padding: 4px 9px; font-size: 10px; white-space: nowrap; opacity: 0;
  transition: opacity .25s; -webkit-transition: opacity .25s; }
#dlrBubble.show { opacity: 1; }
/* dealer on: the rail/felt drop and grow, and EVERY internal element —
   board, bet spots, prints, title, deal button — shifts down with them so
   nothing squeezes against her. The stage grows so panels move down too. */
/* board cards inherit her best-five treatment */
#boardArea .card { transition: transform .45s ease;
  -webkit-transition: -webkit-transform .45s ease; }
#boardArea .card.best5 { transform: translateY(-7px);
  -webkit-transform: translateY(-7px); }
#boardArea .card.unused-card { transform: rotate(-10deg) translateY(3px);
  -webkit-transform: rotate(-10deg) translateY(3px); opacity: .88; }

/* CPU seats: the chip rail is decoration you can't bet — hide it */
.cpu-seat .chips { display: none; }
/* everyone's rail hides mid-hand — chips are for betting time only */
body.in-hand .tray .chips { display: none; }
.cpu-expand { display: none; background: #10101f; border: 1px solid var(--border);
  color: #9ab; font-size: 10px; border-radius: 6px; padding: 0 5px;
  margin-left: 6px; cursor: pointer; vertical-align: middle; }
.knuckle { position: fixed; z-index: 126; font-size: 26px; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
  -webkit-animation: knock2 0.9s ease-in-out; animation: knock2 0.9s ease-in-out; }
@-webkit-keyframes knock2 {
  0% { opacity: 0; -webkit-transform: translateY(-10px); }
  12% { opacity: 1; -webkit-transform: translateY(0); }
  22% { -webkit-transform: translateY(9px); } 32% { -webkit-transform: translateY(0); }
  44% { -webkit-transform: translateY(9px); } 56% { -webkit-transform: translateY(0); }
  85% { opacity: 1; } 100% { opacity: 0; -webkit-transform: translateY(-8px); } }
@keyframes knock2 {
  0% { opacity: 0; transform: translateY(-10px); }
  12% { opacity: 1; transform: translateY(0); }
  22% { transform: translateY(9px); } 32% { transform: translateY(0); }
  44% { transform: translateY(9px); } 56% { transform: translateY(0); }
  85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }

.station .actions { display: flex; gap: 4px; justify-content: center;
  flex-wrap: wrap; margin-top: 6px; min-height: 0; }
.station .actions button { font-size: 10px; padding: 5px 10px; min-height: 30px;
  box-shadow: 0 3px 10px rgba(0,0,0,.22); }

/* ---------------------------------------------------------------- scoreboard */
#signcol { width: 246px; padding: 8px 10px 8px 0; }
#jackpotSign { border: 3px solid #6b5518; border-radius: 10px;
  background: linear-gradient(#171009, #0a0704 70%);
  box-shadow: 0 6px 22px rgba(0,0,0,.7), inset 0 0 18px rgba(0,0,0,.8);
  overflow: hidden; }
#jackpotSign .sign-head { text-align: center; font-size: 10px; letter-spacing: 2px;
  color: #f6d87c; padding: 7px 4px 5px; text-transform: uppercase;
  background: linear-gradient(#2a1f08, #171009);
  border-bottom: 1px solid #6b5518; text-shadow: 0 0 8px rgba(246,216,124,.5); }
.sign-meter { padding: 5px 10px 4px; border-bottom: 1px solid #241a08; }
.sign-meter .lbl { display: flex; flex-direction: column; gap: 1px; font-size: 9px;
  letter-spacing: 2px; color: #c8a54a; text-transform: uppercase; }
.sign-meter .lbl .cond { color: #8a7440; letter-spacing: .4px; font-size: 7.5px;
  text-transform: none; }
.sign-meter .lbl .cond i { font-style: normal; cursor: help; color: #6a5830; }
.sign-meter .val { font-size: 19px; color: #ffbf3f; font-variant-numeric: tabular-nums;
  text-align: right; letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255,170,30,.75), 0 0 2px rgba(255,200,80,.9); }
.sign-meter.sm .val { font-size: 15px; }
.sign-pays { padding: 5px 10px 7px; display: flex; gap: 12px; }
.sign-pays .paycol { flex: 1; }
.sign-pays h6 { font-size: 8px; letter-spacing: 2px; color: #c8a54a;
  text-transform: uppercase; margin: 3px 0 2px; }
.sign-pays table { border-collapse: collapse; width: 100%; }
.sign-pays td { font-size: 9px; color: #e8d9a8; padding: 0.5px 0; white-space: nowrap;
  text-align: left; }
.sign-pays td:last-child { text-align: right; color: #ffce6b;
  font-variant-numeric: tabular-nums; padding-left: 6px; }
.sign-pays .envy-sub { font-size: 7px; color: #8a7440; letter-spacing: .5px; }
.sign-he { padding: 4px 10px 6px; font-size: 8.5px; color: #c8a54a;
  border-top: 1px solid #241a08; }
.sign-he b { color: #ffce6b; font-variant-numeric: tabular-nums; }
.sign-foot { font-size: 7.5px; color: #7a6636; padding: 0 10px 7px;
  letter-spacing: .5px; }

/* ---------------------------------------------------------------- cards */
.card { width: var(--card-w); height: calc(var(--card-w) * 1.41);
  border-radius: 5px; position: relative; flex: 0 0 auto;
  -webkit-perspective: 420px; perspective: 420px; }
.card svg { width: 100%; height: 100%; display: block; border-radius: 5px; }
.card .flipper { position: absolute; inset: 0;
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
  transition: -webkit-transform .5s; transition: transform .5s; }
.card .facef, .card .backf { position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.card .facef { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }
.card.revealed .flipper { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }

/* ---------------------------------------------------------------- panels */
#panels { max-width: 1560px; margin: 0 auto 20px; display: flex; gap: 10px;
  flex-wrap: wrap; padding: 0 12px; }
.panel { background: linear-gradient(180deg, rgba(6,9,17,.98), rgba(1,2,6,.98));
  border: 1px solid #2c3550; border-radius: 9px;
  padding: 9px 11px; min-width: 0; box-shadow: 0 10px 28px rgba(0,0,0,.32); }
.panel h3 { font-size: 10px; letter-spacing: 2px; color: var(--accent);
  text-transform: uppercase; margin-bottom: 6px; display: flex; gap: 8px;
  align-items: center; flex-wrap: wrap; }
.engine-chip { font-size: 8px; padding: 1px 6px; border-radius: 8px;
  background: rgba(0,212,255,.12); color: var(--accent);
  border: 1px solid var(--accent); letter-spacing: 1px; white-space: nowrap; }
.engine-chip.exact { background: rgba(0,255,136,.10); color: var(--green);
  border-color: var(--green); }
.engine-chip.opt { background: rgba(212,175,55,.12); color: var(--gold);
  border-color: var(--gold); }

table.stats { border-collapse: collapse; width: auto; }
table.stats th, table.stats td { padding: 2px 6px; white-space: nowrap;
  font-size: 11px; }
table.stats th { font-size: 10px; color: var(--fg2); text-transform: uppercase;
  letter-spacing: 1px; text-align: left; }
table.stats td.num { min-width: 58px; text-align: right; } /* fits "100.00%" */
.analysis-grid { margin-bottom: 5px; }
.analysis-grid tr:nth-child(2) { background: rgba(255,255,255,.018); }
.analysis-grid tr:nth-child(3) { background: rgba(0,212,255,.045); }
.analysis-grid .model-self, .analysis-grid .model-aware { font-size: 9px;
  letter-spacing: 1px; text-transform: uppercase; color: #aab3c7; }
.analysis-grid .model-aware { color: var(--accent); }
.method-note { margin-top: 7px; padding: 5px 7px; border: 1px solid #26314a;
  border-radius: 6px; color: #8792aa; background: rgba(13,19,34,.72);
  font-size: 9px; line-height: 1.55; }
.method-note summary { cursor: pointer; color: #b8c8df; letter-spacing: 1px;
  text-transform: uppercase; }
.method-note[open] summary { margin-bottom: 4px; color: var(--accent); }
.method-note b { color: #d5dceb; }

.wtlbar { display: flex; height: 10px; width: 220px; border-radius: 3px;
  overflow: hidden; border: 1px solid var(--border); margin: 3px 0; }
.wtlbar .w { background: var(--green); } .wtlbar .t { background: #666; }
.wtlbar .l { background: var(--red); }

.advice { font-size: 11px; padding: 5px 8px; border-radius: 4px; margin-top: 5px; }
.advice.bet { background: rgba(0,255,136,.08); color: var(--green);
  border: 1px solid rgba(0,255,136,.35); }
.advice.check { background: rgba(0,212,255,.07); color: var(--accent);
  border: 1px solid rgba(0,212,255,.3); }
.advice.fold { background: rgba(255,68,68,.08); color: var(--red);
  border: 1px solid rgba(255,68,68,.35); }

/* ---------------------------------------------------------------- overlays */
#tooltip .tt-table { border-collapse: collapse; margin-top: 3px; }
#tooltip .tt-table th { color: #667; font-size: 8.5px; text-transform: uppercase;
  letter-spacing: 1px; text-align: left; padding: 1px 8px 1px 0; }
#tooltip .tt-table td { padding: 1px 8px 1px 0; white-space: nowrap; }
#tooltip .tt-table .num { text-align: right; font-variant-numeric: tabular-nums; }
#tooltip .tt-table .gap { padding-left: 14px; }  /* book | aware group divide */
#tooltip .tt-table td.pos { color: #00ff88; }
#tooltip .tt-table td.neg { color: #ff6655; }
#tooltip .tt-table td.warn { color: #ffd75e; }
#tooltip .tt-table .dim { color: #8aa; }
#tooltip { position: fixed; z-index: 149; background: #0b0b18; color: var(--fg);
  border: 1px solid var(--accent); border-radius: 5px; padding: 7px 9px;
  font-size: 10px; max-width: 320px; pointer-events: none; display: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.7); line-height: 1.45; }
#tooltip .tt-title { color: var(--accent); letter-spacing: 1px;
  text-transform: uppercase; font-size: 9px; margin-bottom: 3px; }
#tooltip .tt-he { color: var(--yellow); }

#modal { position: fixed; inset: 0; z-index: 140; background: rgba(0,0,0,.72);
  display: none; align-items: center; justify-content: center; padding: 16px; }
#modal .box { background: var(--bg2); border: 1px solid var(--yellow);
  border-radius: 8px; padding: 16px 18px; max-width: 400px; overflow-x: auto; }
#modal .box h4 { color: var(--yellow); font-size: 12px; letter-spacing: 1px;
  margin-bottom: 8px; }
#modal .box .btns { display: flex; gap: 8px; margin-top: 12px;
  justify-content: flex-end; }

#jackpotOverlay { position: fixed; inset: 0; z-index: 150; display: none;
  align-items: center; justify-content: center; flex-direction: column;
  background: rgba(0,0,0,.85); text-align: center; }
#jackpotOverlay .jp-tier { font-size: 26px; letter-spacing: 8px; color: var(--gold);
  text-transform: uppercase; -webkit-animation: jpPulse .8s infinite alternate;
  animation: jpPulse .8s infinite alternate; }
#jackpotOverlay .jp-amt { font-size: 46px; color: #ffe9a8;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(255,215,100,.8); margin: 10px 0; }
#jackpotOverlay .jp-who { font-size: 14px; color: var(--fg); }
@-webkit-keyframes jpPulse { from { opacity: .6; } to { opacity: 1; } }
@keyframes jpPulse { from { opacity: .6; } to { opacity: 1; } }

.floatnum { position: fixed; z-index: 125; font: bold 16px 'Consolas', monospace;
  pointer-events: none; text-shadow: 0 0 8px #000;
  -webkit-animation: floatUp 1.6s ease-out forwards;
  animation: floatUp 1.6s ease-out forwards; }
@-webkit-keyframes floatUp { from { opacity: 1; -webkit-transform: translateY(0); }
  to { opacity: 0; -webkit-transform: translateY(-46px); } }
@keyframes floatUp { from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-46px); } }

.flycard { position: fixed; z-index: 115; width: var(--card-w);
  height: calc(var(--card-w) * 1.41); pointer-events: none; }

#toast { position: fixed; left: 50%; bottom: 18px; z-index: 145; background: #300;
  border: 1px solid var(--red); color: #ffcccc; border-radius: 6px;
  padding: 7px 14px; font-size: 11px; display: none;
  -webkit-transform: translateX(-50%); transform: translateX(-50%); }

/* ---------------------------------------------------------------- phone view */
body.phone #main { display: block; }
body.phone #signcol { width: auto; padding: 6px 8px; }
body.phone #jackpotSign { display: flex; flex-wrap: wrap; align-items: stretch; }
body.phone #jackpotSign .sign-head { flex-basis: 100%; }
body.phone .sign-meter { flex: 1; border-right: 1px solid #241a08; }
body.phone .sign-pays { flex-basis: 100%; display: flex; gap: 14px; }
body.phone #stage { height: auto; position: static; }
body.phone #rail, body.phone .felt-title { display: none; }
body.phone .slots { flex-direction: row; flex-wrap: wrap; justify-content: center;
  gap: 5px; }
body.phone .slots .ab-row { flex-basis: 100%; justify-content: center; }
body.phone .slot.circle { width: 42px; height: 42px; }
body.phone #felt { position: static; height: auto; border-radius: 14px;
  margin: 6px; padding: 8px 4px 12px; }
body.phone #dealerArea, body.phone #boardArea, body.phone #dealbtns {
  position: static; transform: none; -webkit-transform: none; margin: 6px auto; }
body.phone .station { position: relative; left: auto; top: auto;
  transform: none; -webkit-transform: none;
  width: auto; max-width: 300px; margin: 0 auto; }
body.phone .station .cards { --card-w: 86px; }
body.phone .station .cards .card { width: 86px; height: 121px; }
body.phone .slot.circle { width: 56px; height: 56px; }
body.phone .traychip { touch-action: none; }
body.phone .bigactions { display: flex; gap: 8px; padding: 10px;
  position: sticky; bottom: 0; background: rgba(5,5,12,.96);
  border-top: 1px solid var(--border); z-index: 60; }
body.phone .bigactions button { flex: 1; font-size: 16px; padding: 13px 4px;
  border-radius: 8px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1420px) {
  #signcol { width: 216px; }
  #jackpotSign { font-size: 90%; }
}
@media (max-width: 1150px) {
  #signcol { width: 188px; padding: 6px 6px 6px 0; }
  #jackpotSign { font-size: 80%; }
  .sign-pays { display: none; }        /* pays live in the ⚙/tooltips too */
}
@media (max-width: 1000px) {
  #signcol { display: none; }          /* too small — the sign sits out */
}
@media (max-width: 780px) {
  :root { --card-w: 40px; }
  /* the felt covers EVERYTHING — board and every player section sit on green */
  #stage { height: auto;
    background:
      radial-gradient(ellipse at 50% 12%, rgba(255,255,255,.08), transparent 55%),
      radial-gradient(ellipse at 50% 20%, var(--felt1), var(--felt2) 70%, var(--felt3));
    border-radius: 16px; margin: 6px; padding-bottom: 10px; }
  #rail, #shuffler, #dealertray, .felt-title, .feltprint { display: none; }
  #felt { position: static; height: auto; border-radius: 14px; margin: 0;
    padding: 8px 4px 10px; background: none; box-shadow: none; }
  /* compact bet spots: PROG sits left of TRIPS (saves a row), all smaller */
  .slots { flex-direction: row; flex-wrap: wrap; justify-content: center;
    gap: 5px; }
  .slots .ab-row { flex-basis: 100%; justify-content: center; }
  .slot.circle { width: 40px; height: 40px; }
  .cpu-seat:not(.expanded) .slots, .cpu-seat:not(.expanded) .tray .trayrow,
  .cpu-seat:not(.expanded) .seatbtns,
  .empty-seat:not(.expanded) .slots, .empty-seat:not(.expanded) .tray .trayrow,
  .empty-seat:not(.expanded) .tray .chips,
  .empty-seat:not(.expanded) .seatbtns { display: none; }
  .cpu-expand { display: inline-block; }
  /* collapse vertical dead space: tight dealer/board/deal margins, empty
     station boxes take no room, names hug the cards */
  #topbar { padding: 3px 8px 2px; }
  #gearBtn { padding: 2px 9px; font-size: 13px; }
  #stage { margin: 2px 6px 6px; padding-bottom: 4px; }
  /* DEAL/REVEAL floats top-left OVER the felt — saves a row without ever
     nudging the dealer's cards, which stay centered in normal flow.
     left/top: 0 kill the base rule's 24px/18px offsets, which would
     otherwise shift the relative felt offscreen-right at phone widths */
  #felt { position: relative; left: 0; top: 0; }
  #dealbtns { position: absolute; left: 6px; top: 8px; margin: 0; z-index: 12; }
  #dealerArea .arealabel { display: none; }   /* label costs a row on phones */
  #dealerArea { margin: 0 auto 2px; }
  #boardArea { margin: 0 auto; }
  /* the play-circle amount labels need breathing room above the bank row */
  .station .slots { margin-bottom: 12px; }
  #dealbtns .hint { display: none; }
  #dealBtn, #revealBtn { font-size: 15px; letter-spacing: 3px; padding: 8px 26px; }
  #stations { gap: 4px; padding: 4px; }
  .station .cards { margin: 0; }
  .station .actions:empty, .station .net:empty,
  .station .statline:empty { display: none; }
  .station .tray { margin: 0; }
  .station .nmrow { margin: 0; }
  #felt { padding: 4px 4px 6px; }
  .slot.circle .slot-lbl { font-size: 6px; }
  .tray .chips { zoom: .78; }
  .slot.circle .stack { zoom: .8; }
  #dealerArea, #boardArea { position: static; transform: none;
    -webkit-transform: none; margin: 8px auto; text-align: center;
    justify-content: center; }
  #dealbtns { transform: none; -webkit-transform: none; }
  #stations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    padding: 6px; }
  .station { position: relative; width: auto; }
  /* the arc's per-seat left/top would apply as relative offsets and scatter
     the grid — force them off with priority over [data-pos] selectors */
  #stage .station { left: auto !important; top: auto !important;
    transform: none !important; -webkit-transform: none !important;
    margin-top: 0 !important; }
  #stage { height: auto !important; }
}
@media (max-width: 430px) {
  #stations { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  :root { --card-w: 38px; }
  .slot.circle { width: 40px; height: 40px; }
  .wtlbar { width: 150px; }
}

/* The private-seat page is a purpose-built single-player surface. Keep these
   rules after the shared responsive grid so table-view breakpoints cannot turn
   its lone station into half of a two-column layout. */
@media (max-width: 780px) {
  body.phone { min-height: 100%; display: flex; flex-direction: column;
    background:
      radial-gradient(ellipse at 50% 20%, rgba(30,86,68,.20), transparent 45%),
      linear-gradient(180deg, #070a12, #030408); }
  body.phone #topbar { position: sticky; top: 0; z-index: 80; flex-wrap: nowrap;
    justify-content: space-between; padding: 6px 9px; min-height: 36px; }
  body.phone #topbar h1 { font-size: 12px; letter-spacing: 1.4px; }
  body.phone #phaseStatus { font-size: 8px; min-height: 23px; padding: 2px 7px; }
  body.phone #togglebar { display: flex; flex: 0 0 auto; gap: 5px;
    overflow-x: auto; padding: 5px 7px 6px; background: rgba(4,5,10,.96);
    border-bottom: 1px solid rgba(42,42,74,.75); scrollbar-width: none; }
  body.phone #togglebar::-webkit-scrollbar { display: none; }
  body.phone #togglebar .tog { flex: 0 0 auto; min-height: 28px; padding: 4px 8px;
    font-size: 9px; }
  body.phone #main { display: flex; flex: 1 0 auto; flex-direction: column;
    width: 100%; margin: 0; }
  body.phone #signcol { display: block; order: 0; width: auto; padding: 6px 7px 2px; }
  body.phone #jackpotSign { display: grid; grid-template-columns: repeat(3, 1fr);
    border-width: 1px; border-radius: 9px; }
  body.phone #jackpotSign .sign-head { grid-column: 1 / -1; padding: 4px 5px;
    font-size: 9px; line-height: 1.2; }
  body.phone .sign-meter { min-width: 0; padding: 4px 6px 5px;
    border-bottom: 0; border-right: 1px solid #382a0c; }
  body.phone #sm-minor { border-right: 0; }
  body.phone .sign-meter .lbl { gap: 0; font-size: 8px; letter-spacing: 1.2px; }
  body.phone .sign-meter .lbl .cond { font-size: 6.5px; }
  body.phone .sign-meter .val, body.phone .sign-meter.sm .val { font-size: 13px;
    text-align: left; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  body.phone .sign-pays { display: none; }
  body.phone #stage { order: 1; width: auto; margin: 4px 7px 7px;
    padding: 0; border: 1px solid rgba(67,112,91,.42); border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,.30), inset 0 1px rgba(255,255,255,.035); }
  body.phone #felt { margin: 0; padding: 8px 7px 10px; min-height: 0; }
  body.phone[data-phase="betting"] #dealerArea,
  body.phone[data-phase="betting"] #boardArea,
  body.phone[data-phase="betting"] #dealbtns { display: none; }
  body.phone #dealerArea, body.phone #boardArea { margin: 4px auto; }
  body.phone #dealerCards:empty, body.phone #boardCards:empty { min-height: 0; }
  body.phone #stations { display: block; width: 100%; padding: 2px 0 0; }
  body.phone #stage .station { position: relative; width: 100%; max-width: 350px;
    margin: 0 auto !important; padding: 2px 6px 6px; }
  body.phone .station .cards { --card-w: 82px; min-height: 0; margin-bottom: 4px; }
  body.phone .station .cards .card { width: 82px; height: 116px; }
  body.phone .station .statline { font-size: 10px; min-height: 0; margin-bottom: 4px; }
  body.phone .station .slots { display: grid; grid-template-columns: repeat(5, 54px);
    justify-content: center; align-items: center; gap: 7px; margin: 4px 0 15px; }
  body.phone .station .slots .ab-row { display: contents; }
  body.phone .station .slot.circle { width: 54px; height: 54px; margin: 0; }
  body.phone .slot.circle .slot-lbl { font-size: 7px; margin-top: 5px; }
  body.phone .slot.circle .stack { zoom: .92; }
  body.phone .tray { max-width: 330px; margin: 0 auto; padding: 8px 8px 7px;
    border-color: rgba(76,91,128,.62); }
  body.phone .tray .trayrow { min-height: 24px; }
  body.phone .tray .bank { font-size: 15px; }
  body.phone .tray .nm { font-size: 13px; }
  body.phone .tray .chips { min-height: 44px; zoom: 1; }
  body.phone .tray .seatbtns button { min-height: 30px; font-size: 10px; }
  body.phone .station .actions { margin-top: 7px; }
  body.phone .bigactions { padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(10,13,23,.96), rgba(2,3,8,.99));
    box-shadow: 0 -8px 22px rgba(0,0,0,.38); }
  body.phone .bigactions button { min-height: 52px; font-size: 15px;
    letter-spacing: .5px; }
  body.phone #panels { display: block; width: 100%; min-width: 0; max-width: 100%;
    padding: 0 7px; margin-bottom: 7px; overflow: hidden; }
  body.phone .panel { width: 100%; max-width: 100%; overflow-x: auto; }
}

@media (max-width: 350px) {
  body.phone .station .slots { grid-template-columns: repeat(5, 48px); gap: 4px; }
  body.phone .station .slot.circle { width: 48px; height: 48px; }
}

/* the dealer scene needs the wide layout; on narrow windows she retires and the classic table returns */
@media (min-width: 781px) {
body.dealer-on #topbar { position: relative; z-index: 50;
  background: transparent; border-bottom: none; }
body.dealer-on #togglebar .tog, body.dealer-on #topbar select,
body.dealer-on #gearBtn {
  background: rgba(8, 8, 18, .92); }
body.dealer-on #brand h1, body.dealer-on #handCount,
body.dealer-on #seedBadge {
  background: rgba(8, 8, 18, .9); border-radius: 8px; padding: 2px 8px; }
body.dealer-on #rail { top: 223px; height: 590px; }
body.dealer-on #felt { top: 235px; height: 560px; }
body.dealer-on #dealerArea { top: 34px; z-index: 5; }
body.dealer-on #boardArea { top: 162px; }
body.dealer-on #dealbtns { top: 285px; }
body.dealer-on #dealbtns .hint { display: none; }
body.dealer-on #dealBtn, body.dealer-on #revealBtn, body.dealer-on #skipBtn {
  font-size: 12px; letter-spacing: 3px; padding: 4px 16px; border-radius: 8px; }
body.dealer-on .felt-title { top: 384px; }
body.dealer-on #printTrips { top: 30px; }
body.dealer-on #printBlind { top: 30px; }
body.dealer-on .station { margin-top: 216px; }
body.dealer-on #shuffler, body.dealer-on #dealertray { z-index: 6; }
body.dealer-on #dealertray { top: 245px; margin-left: -228px; }
body.dealer-on #shuffler { top: 249px; }
}
/* narrow: Gabby appears as a small floating cameo, top-right of the felt,
   mirroring the floating DEAL button on the left */
@media (max-width: 780px) {
  /* the cameo paints as a background crop (never an oversized <img>, which
     would stretch the page sideways) so the box can stay overflow-visible
     and the caption hangs BELOW the cameo instead of covering Gabby's face.
     Keep the url in sync with dlrImg's src in dealer.js. */
  #dealerGirl { display: block; position: absolute; left: auto; right: 6px;
    top: 8px; width: 86px; height: 100px; margin: 0; overflow: visible;
    background: #0a0a14 url('/static/img/dealer_gabby6.png')
      no-repeat -167px -4px / 420px auto;
    border-radius: 12px; border: 1px solid rgba(255, 215, 94, .35);
    box-shadow: 0 3px 10px rgba(0,0,0,.5); z-index: 11; }
  #dlrImg { display: none; }
  #dlrBubble { left: auto; right: 0; top: calc(100% + 4px); bottom: auto;
    transform: none; -webkit-transform: none; max-width: 200px;
    white-space: normal; font-size: 9px; border-radius: 10px 2px 10px 10px; }
}
