/* ============================================================
   21 Royale — shared stylesheet (lobby + table pages)
   Dark green-gold casino palette, glass panels, gold accents.
   ============================================================ */

:root {
  --bg: #070a09; --bg2: #0b1210; --panel: rgba(18, 26, 23, .78); --panel-solid: #101915;
  --line: rgba(217, 164, 65, .16); --line2: rgba(255, 255, 255, .07);
  --gold: #d9a441; --gold-bright: #f1c40f; --gold-dim: #8a6a2a;
  --ink: #e9ecdf; --mut: #93a09a;
  --red: #e05252; --green: #3fbf7f; --green-felt: #0d4f30;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--ink);
  font: 15px/1.5 system-ui, 'Segoe UI', sans-serif;
  background:
    radial-gradient(1100px 700px at 50% -8%, #10241a 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #0c1a12 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}
h1, h2, .brand { font-family: Georgia, 'Times New Roman', serif; }

/* ---------- lobby page ---------- */

#bgfx { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orbit {
  position: absolute; font-size: 220px; color: rgba(217, 164, 65, .05);
  font-family: Georgia, serif; user-select: none;
  animation: drift 26s ease-in-out infinite alternate;
}
.orbit.o1 { top: -60px; left: 2%; }
.orbit.o2 { top: 30%; right: -40px; animation-delay: -7s; }
.orbit.o3 { bottom: -80px; left: 28%; animation-delay: -13s; }
.orbit.o4 { bottom: 12%; right: 22%; font-size: 150px; animation-delay: -19s; }
@keyframes drift { from { transform: translateY(-16px) rotate(-4deg); } to { transform: translateY(16px) rotate(5deg); } }
.chipfloat {
  position: absolute; width: 74px; height: 74px; border-radius: 50%;
  border: 3px dashed rgba(217, 164, 65, .22); background: rgba(20, 30, 25, .5);
  animation: float 11s ease-in-out infinite alternate;
}
.chipfloat::after {
  content: ''; position: absolute; inset: 12px; border-radius: 50%;
  border: 2px solid rgba(217, 164, 65, .3);
}
.chipfloat.c1 { top: 14%; left: 68%; }
.chipfloat.c2 { bottom: 20%; left: 10%; animation-delay: -4s; width: 46px; height: 46px; }
.chipfloat.c3 { top: 58%; right: 8%; animation-delay: -8s; width: 34px; height: 34px; }
@keyframes float { from { transform: translateY(-20px) rotate(-14deg); } to { transform: translateY(24px) rotate(10deg); } }

#hdr {
  position: relative; z-index: 2; max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 6px;
}
.hdr-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: .14em; color: var(--gold); font-size: 17px; display: inline-flex; align-items: center; }
.brand em { color: var(--ink); font-style: normal; font-weight: 400; letter-spacing: .2em; font-size: 12px; margin-left: 8px; }
.brand-mark { display: inline-block; width: 30px; height: 30px; border-radius: 7px; margin-right: 9px;
  box-shadow: 0 2px 10px rgba(0,0,0,.55), 0 0 0 1px rgba(217,164,65,.28); }
img.hdr-logo { width: 34px; height: 34px; border-radius: 8px; vertical-align: -8px; margin-right: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.55), 0 0 0 1px rgba(217,164,65,.28); }
.sig-logo img { width: 52px; height: 52px; border-radius: 12px; display: block; margin: 0 auto 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5), 0 0 0 1px rgba(217,164,65,.3); }
.wallet { font-size: 14px; color: var(--mut); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
.wallet b { color: var(--gold-bright); font-size: 15px; margin-left: 4px; font-variant-numeric: tabular-nums; }

main { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 6px 20px 46px; }

/* hero */
.hero { display: flex; align-items: center; gap: 20px; padding: 26px 0 34px; }
.hero-copy { flex: 1; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); margin: 0 0 10px; line-height: 1.12; letter-spacing: .01em; }
.hero h1 .gold { color: var(--gold-bright); }
.hero p { color: var(--mut); max-width: 480px; margin: 0 0 18px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cards { display: flex; perspective: 700px; }
.hcard {
  width: 86px; height: 124px; margin-left: -26px; border-radius: 9px;
  background: linear-gradient(160deg, #fdfcf5, #e8e4d2);
  color: #14141f; font: 700 40px/124px Georgia, serif; text-align: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px #cfc9b4;
  animation: hover-card 4.2s ease-in-out infinite alternate;
}
.hcard.v1 { transform: rotate(-10deg) translateY(6px); color: #14141f; }
.hcard.v2 { transform: rotate(-2deg); animation-delay: -1.2s; color: #b02a25; }
.hcard.v3 { transform: rotate(7deg) translateY(8px); animation-delay: -2.4s; color: #b02a25; }
@keyframes hover-card { from { transform: translateY(0) rotate(var(--r, 0deg)); } to { transform: translateY(-10px) rotate(var(--r, 0deg)); } }

/* section headings */
h2 { display: flex; align-items: center; gap: 12px; font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 26px 0 14px; }
h2 .rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* table cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lob-item {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: var(--panel); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.lob-item:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 10px 26px rgba(0, 0, 0, .45), 0 0 0 1px var(--gold) inset; }
.tcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* the room's own skin, at a glance: cloth inside a ring of its rail */
.felt-chip {
  position: relative;
  width: 28px; height: 18px; flex: 0 0 auto; border-radius: 6px;
  background: var(--cloth, #0c3524);
  box-shadow: inset 0 0 0 3.5px var(--rail, #4c3320), inset 0 0 10px rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .14);
}
/* progression rewards: the exotic chip glints gold when it is yours… */
.felt-chip.earned { border-color: rgba(217, 164, 65, .55); }
.felt-chip .felt-lock {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1; pointer-events: auto;
}
.felt-chip .felt-lock.earned { color: #f1c96a; text-shadow: 0 0 4px rgba(0, 0, 0, .8); }
/* …and dims under a padlock until it is */
.felt-chip.locked { filter: saturate(.55) brightness(.72); }
.felt-chip.locked .felt-lock { font-size: 8px; }
/* a locked card reads as locked before you even look at the chip */
a[data-locked] .go { opacity: .45; }
a[data-locked] { cursor: not-allowed; }
/* pushed right so the card reads: name on the left, skin + heads on the right */
.tcard-top .limit-badge + .felt-chip { margin-left: auto; }
.limit-badge {
  font: 700 13.5px Georgia, serif; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 7px; color: #f5edd8;
  background: linear-gradient(180deg, rgba(217, 164, 65, .22), rgba(217, 164, 65, .08));
  border: 1px solid var(--line);
}
.limit-badge.micro { color: #b9e4c9; }
.limit-badge.nosebleed { color: #f0b1a9; border-color: rgba(224, 82, 82, .35); }
.limit-badge.sng { color: var(--gold-bright); }
.limit-badge.sng .mtt {
  font-size: .62em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-bright); border: 1px solid rgba(241, 196, 15, .45);
  border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: 2px;
  background: rgba(241, 196, 15, .08);
}
.seated { font-size: 12px; color: var(--mut); display: inline-flex; align-items: center; gap: 5px; }
.seated .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.lob-item .meta { color: var(--mut); font-size: 12.5px; margin: 8px 0 10px; }
.lob-item .go { color: var(--gold-bright); font-weight: 700; font-size: 13px; }

/* footer */
#ftr { display: flex; justify-content: space-between; color: var(--mut); font-size: 12.5px; border-top: 1px solid var(--line2); margin-top: 34px; padding-top: 14px; flex-wrap: wrap; gap: 4px 14px; }
#ftr a { color: var(--gold-dim); text-decoration: none; }
#ftr a:hover { color: var(--gold); }

/* ---------- shared bits ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 system-ui, sans-serif; color: #171105; text-decoration: none;
  background: linear-gradient(180deg, #f3d678, var(--gold));
  border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 164, 65, .25), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: filter .12s ease, transform .12s ease;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { min-width: 140px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.wide { width: 100%; }

button { font: inherit; }
button.ghost {
  background: rgba(10, 14, 12, .55); color: var(--mut);
  border: 1px solid var(--line2); border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
button.ghost:hover { color: var(--ink); border-color: var(--gold); }
button.ghost.danger-ghost:hover { color: var(--red); border-color: var(--red); }

input[type="number"], input[type="text"], #name {
  background: #0b120f; color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 13px; font: 15px system-ui; width: 150px; outline: none;
}
input:focus { border-color: var(--gold); }
.err { color: var(--red); font-size: 13px; min-height: 16px; margin-top: 8px; }
.muted { color: var(--mut); font-size: 13px; }
.row { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--mut); font-size: 13.5px; }
.stats b { color: var(--ink); }

/* overlays */
.overlay {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 7, 5, .72); backdrop-filter: blur(5px);
}
.overlay .card {
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 28px; min-width: 340px; max-width: 460px; box-shadow: var(--shadow);
  animation: card-in .22s ease-out;
  max-height: min(86vh, 760px); overflow: auto;
}
@media (max-width: 480px) {
  .overlay .card { min-width: 0; width: calc(100vw - 24px); padding: 20px 16px; }
}
@keyframes card-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.card h2 { margin: 0 0 4px; letter-spacing: .02em; text-transform: none; font-size: 20px; }
.card h1 { color: var(--gold); font-size: 21px; margin: 0 0 8px; letter-spacing: .1em; }
.card .sub { color: var(--mut); font-size: 13px; }
.card.center { text-align: center; }
.sig-logo { font-size: 42px; color: var(--gold); transform: rotate(-8deg); margin-bottom: 2px; }
#name { width: 100%; margin: 14px 0 10px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #161f1a; color: var(--ink); border: 1px solid var(--gold);
  border-radius: 12px; padding: 11px 20px; font-size: 14px; z-index: 60;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6); animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateX(-50%) translateY(8px); opacity: 0; } }

/* ============================================================
   table page — fixed 16:9 stage, letterboxed, fullscreen-ready
   ============================================================ */

body.table-page { overflow: hidden; background: #050705; }

#stage {
  /* the dock's column, in stage pixels: everything that has to sit beside it
     (the command bar, the salon's bet pad) centres against this one number,
     and folding the dock narrows it via :has() below */
  --dock-col: 348px;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 1600px; height: 900px; transform-origin: center; flex-direction: column;
  display: flex; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 50% -10%, #10241a 0%, transparent 60%),
    #050705;
}

#topbar {
  flex: 0 0 52px; display: flex; align-items: center; gap: 16px;
  padding: 0 18px; border-bottom: 1px solid var(--line2);
  background: rgba(8, 12, 10, .7);
}
.tinfo { flex: 1; text-align: center; color: var(--mut); font-size: 14px; }
.tinfo b { color: var(--gold); letter-spacing: .06em; }
.tright { display: flex; align-items: center; gap: 8px; }
#wallet { padding: 6px 14px; }

#stageInner { position: relative; flex: 1; }

#feltHost { position: absolute; inset: 12px; border-radius: 18px; overflow: hidden; }
/* the rebuilt tables bake their own room, floor and furniture, so the canvas
   runs nearly edge to edge inside a hairline bezel instead of an inset panel */
.pixi-on #feltHost { inset: 6px; border-radius: 20px; }
#feltHost canvas { display: block; width: 100% !important; height: 100% !important; }

/* result banner */
.result {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
  max-width: 720px; z-index: 6; display: none;
  background: rgba(10, 15, 12, .88); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 18px; font-size: 13.5px; line-height: 1.5; box-shadow: var(--shadow);
  animation: card-in .2s ease-out;
}
.result .win { color: var(--green); font-weight: 700; }

/* ============================================================
   THE COMMAND BAR — everything that is used mid-hand lives in
   ONE place: the pot, the action, the sizing rail, the clock.
   It sits bottom-centre, clear of the near rail.
   ============================================================ */

#actions {
  /* centred on the FELT's frame, not the canvas: the dock owns the right-hand
     column, so the bar lines up under the table instead of under the panel */
  position: absolute; left: calc(50% - var(--dock-col) / 2); transform: translateX(-50%);
  bottom: 14px;
  display: none; flex-direction: column; gap: 8px; align-items: center; z-index: 10;
  padding: 9px 14px 11px; border-radius: 16px; min-width: 400px; max-width: calc(100% - var(--dock-col));
  background: rgba(8, 12, 10, .84); border: 1px solid var(--line2);
  box-shadow: var(--shadow); backdrop-filter: blur(6px);
}
body:has(#dock.folded) #actions { left: calc(50% - 74px); }
/* turn clock: a bar that drains while the server is waiting on you */
#turnTimer {
  position: absolute; left: 12px; right: 12px; top: 4px; height: 3px;
  border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden;
}
#turnTimerFill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f1c40f, #e0a52c); }
#turnTimer.warn #turnTimerFill { background: linear-gradient(90deg, #e67e22, #c0392b); }

#actRow { display: flex; align-items: center; gap: 10px; }
#actBtns { display: flex; align-items: center; gap: 10px; }
#waitHint { color: var(--mut); font-size: 13px; letter-spacing: .02em; }
#waitHint b { color: var(--ink); font-weight: 600; }
#turnTimer { opacity: 0; transition: opacity .2s ease; }
#turnTimer.live { opacity: 1; }
#potChip {
  display: flex; align-items: baseline; gap: 6px; margin-right: 2px;
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; color: var(--mut); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
#potChip b { color: var(--gold-bright); font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
#turnSecs { min-width: 30px; font: 700 13px/1 system-ui; color: var(--gold-bright); font-variant-numeric: tabular-nums; }

#actions button {
  min-width: 92px; border-radius: 12px; padding: 13px 16px;
  font: 700 15px/1 system-ui; cursor: pointer; border: 1px solid transparent;
  transition: transform .1s ease, filter .1s ease;
}
#actions button:hover { transform: translateY(-2px); filter: brightness(1.12); }
#actions kbd {
  font: 600 10px/1 system-ui; opacity: .5; margin-left: 7px; padding: 2px 4px;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 4px;
}
#a-fold { background: linear-gradient(180deg, #b8453c, #8f2f28); color: #fff; box-shadow: 0 6px 18px rgba(180, 60, 50, .35); }
#a-check { background: linear-gradient(180deg, #2b3a44, #1d2930); color: var(--ink); border-color: var(--line2); }
#a-call { background: linear-gradient(180deg, #2e6b4f, #1e4c37); color: #eafff3; box-shadow: 0 6px 18px rgba(40, 120, 80, .3); }
#a-raise { background: linear-gradient(180deg, #f3d678, var(--gold)); color: #171105; box-shadow: 0 6px 18px rgba(217, 164, 65, .35); }
#a-raise.on { box-shadow: 0 0 0 2px rgba(241, 196, 15, .35), 0 6px 18px rgba(217, 164, 65, .35); }

/* the sizing rail: presets, a scrubber and the exact number, all three views
   of one value — no more typing a number you have to guess at */
/* the rail is ONE line on a desktop (presets · scrubber · number · raise) so
   opening it never grows the bar up into the hero's name plate; a phone
   stacks it, where width is the scarce resource */
#raisebox { display: flex; flex-direction: row; align-items: center; gap: 10px; }
#presets { display: flex; gap: 6px; }
#presets button {
  min-width: 0; padding: 7px 13px; font: 600 12.5px/1 system-ui; cursor: pointer;
  color: var(--ink); background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line2); border-radius: 999px;
}
#presets button:hover { border-color: var(--gold); color: var(--gold-bright); }
#presets button.on { border-color: var(--gold); color: var(--gold-bright); background: rgba(241, 196, 15, .14); }
#presets button:disabled { opacity: .4; cursor: default; border-color: var(--line2); color: var(--mut); }
#raiseRow { display: flex; gap: 8px; align-items: center; }
#raiseSlider { width: 210px; accent-color: var(--gold); }
#raiseAmt { width: 104px; padding: 8px 10px; text-align: right; font-variant-numeric: tabular-nums; }
#a-raise-go { background: linear-gradient(180deg, #f3d678, var(--gold)); border: 0; border-radius: 9px; padding: 10px 16px; font-weight: 700; cursor: pointer; color: #171105; }
#a-raise-cancel { min-width: 0 !important; padding: 8px 11px !important; border-radius: 9px !important; color: var(--mut); background: rgba(255, 255, 255, .04); border-color: var(--line2); }
#raiseHint { font-size: 11.5px; color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================================================
   THE DOCK — table talk, who's here and chat in ONE panel in ONE
   place. The old layout floated three boxes over the felt (and two
   of them over a player's name); this is one column on the right,
   collapsible to a strip.
   ============================================================ */

#dock {
  position: absolute; right: 14px; top: 12px; bottom: 12px; width: 318px; z-index: 9;
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(8, 12, 10, .80); border: 1px solid var(--line2);
  border-radius: 14px; backdrop-filter: blur(6px); box-shadow: var(--shadow);
}
#dockTabs { display: flex; align-items: center; gap: 2px; padding: 5px 6px 0; border-bottom: 1px solid var(--line2); }
#dockTabs .dockTab {
  flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--mut); font: 600 11.5px/1 system-ui; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 4px 9px; cursor: pointer;
}
#dockTabs .dockTab:hover { color: var(--ink); }
#dockTabs .dockTab.on { color: var(--gold-bright); border-bottom-color: var(--gold); }
#dockTabs .dockTab b { color: var(--gold); font-weight: 700; margin-left: 3px; }
#dockTabs .dockTab b.ping { color: #171105; background: var(--gold); border-radius: 999px; padding: 1px 6px; }
#dockFold { margin-left: 4px; padding: 6px 9px; font-size: 13px; }
.dockPane { display: none; flex-direction: column; flex: 1; min-height: 0; }
.dockPane.on { display: flex; }
#log, #presenceList, #chatLog { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px; font-size: 12.5px; color: var(--mut); }
#log div { padding: 1px 0; border-bottom: 1px dashed rgba(255, 255, 255, .04); }
#presenceList { padding: 8px 10px; }
.dockFoot, #dockFoot {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-top: 1px solid var(--line2); background: rgba(0, 0, 0, .18);
}
#dockFoot input[type="range"] { flex: 1; min-width: 0; accent-color: var(--gold); }
#dockHint { font-size: 10.5px; color: var(--mut); letter-spacing: .08em; text-transform: uppercase; }

/* collapsed: the dock keeps its tabs' height and nothing else */
#dock.folded { width: 118px; bottom: auto; }
#dock.folded .dockPane, #dock.folded #dockFoot, #dock.folded .dockTab { display: none; }
#dock.folded #dockFold { margin-left: auto; position: relative; }
/* collapsed, the badges live on the flap — otherwise a chat line would arrive
   with nothing anywhere on screen to say so */
#dockFold.has-news { color: var(--gold-bright); border-color: var(--gold); }
#dockFold.has-news::after {
  content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px rgba(241, 196, 15, .9);
}

/* presence + chat rows (unchanged shapes, new home) */
.presrow { display: flex; align-items: center; gap: 7px; padding: 4px 2px; font-size: 12.5px; }
.presrow b { font-weight: 600; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presrow.spect b { color: var(--mut); font-weight: 500; }
.presdot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .18); flex: 0 0 auto; }
.presdot.on { background: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, .8); }
.badgetag { font-size: 10px; letter-spacing: .06em; padding: 1px 7px; border-radius: 8px; flex: 0 0 auto; }
.badgetag.seated { color: #9fe6bd; background: rgba(46, 204, 113, .12); border: 1px solid rgba(46, 204, 113, .35); }
.badgetag.spect { color: var(--mut); background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); }
.presrow .wsp { background: transparent; border: 0; color: var(--mut); cursor: pointer; font-size: 12px; padding: 0 2px; }
.presrow .wsp:hover { color: var(--gold-bright); }
.chatline { padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .04); color: var(--ink); overflow-wrap: anywhere; }
.chatline b { color: var(--gold); font-weight: 600; margin-right: 6px; font-size: 12px; }
.chatline.bot b { color: #9fe6bd; }
.chatline.bot span { color: var(--mut); font-style: italic; }
.chatline.mine b { color: var(--gold-bright); }
.chatline.ko { color: #ffd7a1; }
#typingLine {
  min-height: 15px; padding: 0 12px; font-size: 11.5px; font-style: italic;
  color: var(--mut); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
#chatBar { display: flex; gap: 6px; padding: 6px 8px 8px; align-items: center; }
#chatInput { flex: 1; min-width: 0; padding: 7px 10px; font-size: 12.5px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); border-radius: 9px; color: var(--ink); }
#chatInput:focus { outline: none; border-color: var(--gold); }
#chatBar .primary { padding: 7px 12px; font-size: 12.5px; }
#emoteBtn { font-size: 16px; padding: 4px 8px; }
#emotePicker {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  padding: 8px; border-top: 1px solid var(--line2);
}
#emotePicker button { font-size: 18px; background: rgba(255, 255, 255, .04); border: 1px solid transparent; border-radius: 8px; padding: 6px 0; cursor: pointer; }
#emotePicker button:hover { background: rgba(241, 196, 15, .12); border-color: var(--gold); }

/* ============================================================
   PHONE — the 16:9 stage scaled to a 390px viewport makes 12px
   buttons, so a phone gets its own arrangement instead: felt on
   top, command bar under it, the dock as a bottom sheet. Set by
   table.js (body.phone) whenever the viewport is narrow or tall.
   ============================================================ */

body.phone #stage {
  left: 0; top: 0; transform: none; width: 100vw; height: 100vh; height: 100dvh;
}
body.phone #topbar { flex: 0 0 46px; gap: 8px; padding: 0 10px; }
body.phone .tinfo { font-size: 12px; }
body.phone .tinfo #handWrap { display: none; }   /* the room name is what matters here */
body.phone #topbar .tright { gap: 6px; }
body.phone #wallet { padding: 5px 9px; font-size: 12px; }
body.phone #backBtn, body.phone #fsBtn { padding: 6px 9px; font-size: 12px; }
body.phone #stageInner {
  /* felt at a fixed slice of the viewport, command bar under it, and the dock
     taking whatever is left — a tall felt leaves the table small and the room
     empty, so the split is deliberate rather than "as big as it gets" */
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 6px; padding: 0 6px 6px;
  min-height: 0; overflow: hidden;
}
/* min-height:0 on the ITEM too — the pixi canvas' own height would otherwise
   set a floor on the row and push the dock off the bottom of the screen */
body.phone #feltHost {
  position: relative; inset: auto; border-radius: 12px; min-height: 0; overflow: hidden;
  height: 52vh; height: 52dvh;
}
body.phone #actions {
  position: static; left: auto; transform: none; min-width: 0; max-width: none; width: 100%;
  padding: 12px 8px 10px; border-radius: 14px; gap: 7px;
}
body.phone #actRow { width: 100%; gap: 6px; justify-content: space-between; }
body.phone #actions button { min-width: 0; flex: 1; padding: 15px 6px; font-size: 15px; }
body.phone #actBtns { flex: 1; }
body.phone #turnSecs { min-width: 26px; }
body.phone #actions kbd { display: none; }
body.phone #potChip { padding: 6px 10px; font-size: 11px; }
body.phone #presets { gap: 5px; width: 100%; }
body.phone #presets button { flex: 1; padding: 9px 4px; font-size: 12px; }
body.phone #raisebox { flex-direction: column; align-items: stretch; gap: 7px; width: 100%; }
body.phone #raiseRow { width: 100%; gap: 6px; }
body.phone #raiseSlider { flex: 1; width: auto; }
body.phone #raiseAmt { width: 82px; padding: 9px 8px; }
body.phone #a-raise-go { flex: 0 0 auto !important; padding: 10px 14px !important; }
body.phone #dock {
  position: static; inset: auto; width: 100%; max-height: none; border-radius: 14px;
}
/* folded on a phone the dock is a strip, not a sheet: give the height back to
   the felt instead of leaving an empty panel under the bar */
body.phone:has(#dock.folded) #stageInner { grid-template-rows: minmax(0, 1fr) auto auto; }
body.phone:has(#dock.folded) #feltHost { height: auto; }
body.phone #dock.folded { width: 100%; }
body.phone #dockTabs .dockTab { padding: 11px 4px 10px; font-size: 11.5px; }
body.phone #chatInput { font-size: 15px; padding: 9px 10px; }   /* ≥16px avoids iOS zoom */
body.phone #chatSend { padding: 9px 14px; font-size: 13px; }
body.phone #dockHint { display: none; }
/* the result banner must not eat the table on a phone: shorter, tighter, and
   it never grows past a third of the felt */
body.phone .result {
  top: 6px; max-width: calc(100vw - 20px); font-size: 11.5px; padding: 7px 12px;
  line-height: 1.35; max-height: 34%; overflow: hidden;
}
body.phone .result .win { font-weight: 600; }
body.phone #sngclock { top: 6px; gap: 8px; padding: 6px 10px; font-size: 11.5px; }
body.phone #sngclock .next { display: none; }
body.phone #soundBtn { font-size: 16px; }
body.phone #log, body.phone #presenceList, body.phone #chatLog { padding: 8px 10px; }

/* the salon has no command bar: felt on top at the same slice of the screen,
   then the dock as the sheet with everything left over — which is where the
   roads and the chat actually need the height */
body.phone.bac-page #stageInner { grid-template-rows: auto minmax(0, 1fr); }
body.phone #bacPad { left: 8px; right: 8px; width: auto; max-width: none; transform: none; bottom: 8px; padding: 10px; }
body.phone .bac-bet { padding: 12px 10px; }
body.phone .bac-bet .side { font-size: 14px; }
body.phone #bacAmt { width: 88px; }
body.phone #bacYou { font-size: 12px; }

/* the salon's bet pad shares the bottom with the dock: it spans the felt left
   of it instead of running under it */
.bac-page #bacPad { left: 22px; right: 344px; width: auto; max-width: none; transform: none; }
@media (min-width: 901px) {
  .bac-page #bacPad { grid-template-columns: 1fr 1fr 1fr; }
}
/* a folded dock gives the pad its width back (no JS needed) */
body:has(#dock.folded) #bacPad { right: 146px; }

/* overlays reuse .overlay/.card above */
#buyin input { margin-top: 4px; }
/* one-tap buy-ins: the room's minimum, the middle and the full stack */
.buyinquick { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.buyinquick button { flex: 1; padding: 9px 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.buyinquick button:disabled { opacity: .4; }
#buyinBtn:disabled { opacity: .5; cursor: default; }

/* ---------- SNG live blind clock (table stage, top center) ---------- */
#sngclock {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 9;
  display: flex; align-items: center; gap: 14px;
  background: rgba(8, 12, 10, .78); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 18px; backdrop-filter: blur(4px);
  font-size: 13px; color: var(--mut); box-shadow: var(--shadow);
}
#sngclock .lv { color: var(--gold-bright); font-weight: 700; letter-spacing: .04em; }
#sngclock .blinds { color: var(--ink); font-weight: 700; }
#sngclock .next { color: var(--mut); }
#sngclock .alive { color: #9fe6bd; }

/* ---------- SNG podium overlay ---------- */
#podium { z-index: 55; }  /* above sngpanel (40), below toasts (60) */
.podium-card {
  background: linear-gradient(180deg, rgba(20, 27, 22, .97), rgba(10, 14, 11, .97));
  border: 1px solid var(--gold); border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(217, 164, 65, .25) inset, 0 30px 80px rgba(0, 0, 0, .7), 0 0 90px rgba(217, 164, 65, .12);
  padding: 30px 40px; min-width: 480px; max-width: 640px; text-align: center;
  animation: podium-in .45s cubic-bezier(.2, 1.4, .4, 1);
}
@media (max-width: 640px) {
  .podium-card { min-width: 0; width: calc(100vw - 24px); padding: 22px 14px; }
}
@keyframes podium-in {
  from { transform: translateY(34px) scale(.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.podium-title {
  font-family: Georgia, serif; font-size: 24px; letter-spacing: .12em;
  color: var(--gold-bright); text-shadow: 0 0 24px rgba(241, 196, 15, .4); margin-bottom: 18px;
}
.podium-places { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pp {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line2); border-radius: 12px;
  padding: 11px 16px; font-size: 15px;
}
.pp .medal { width: 44px; font-size: 21px; text-align: left; }
.pp .pname { flex: 1; text-align: left; color: var(--ink); font-weight: 600; }
.pp .pname .house { color: var(--mut); font-size: 11px; font-style: italic; margin-left: 6px; }
.pp .pamt { color: var(--green); font-weight: 800; font-variant-numeric: tabular-nums; }
.pp.p1 { border-color: rgba(241, 196, 15, .55); background: linear-gradient(90deg, rgba(241, 196, 15, .10), rgba(241, 196, 15, .02)); }
.pp.p1 .pamt { color: var(--gold-bright); font-size: 17px; }
.pp.p2 { border-color: rgba(200, 205, 215, .35); }
.pp.p3 { border-color: rgba(205, 127, 50, .4); }
.pp.me { outline: 2px solid var(--gold-bright); outline-offset: 1px; }
.podium-note { color: var(--mut); font-size: 13.5px; margin-bottom: 18px; }
.podium-card .row { display: flex; gap: 10px; justify-content: center; }

/* ---------- lobby SNG card states ---------- */
.scard { cursor: pointer; }
.scard .meta { margin-bottom: 8px; }

/* your tournament record on the SNG card (ROI · entries · last cash) */
.record-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; align-items: center; }
.rec-badge { display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line2); color: var(--mut);
  font-variant-numeric: tabular-nums; }
.rec-badge.roi.up { color: var(--green); border-color: rgba(46, 204, 113, .35); background: rgba(46, 204, 113, .08); }
.rec-badge.roi.down { color: var(--red); border-color: rgba(224, 82, 82, .3); background: rgba(224, 82, 82, .07); }
.rec-badge.cash { color: var(--gold-bright); border-color: var(--line); background: rgba(217, 164, 65, .10); }

.seated.live { color: #ff8d7a; font-weight: 700; }
.scard.ph-playing { border-color: rgba(224, 82, 82, .35); }
.scard.ph-playing:hover { border-color: #e05252; }
.scard.ph-finished { opacity: .55; }
.sng-btn {
  display: block; width: 100%; border: 1px solid var(--gold); border-radius: 10px;
  background: linear-gradient(180deg, #f3d678, var(--gold)); color: #171105;
  font: 700 13.5px/1 system-ui; padding: 11px 0; cursor: pointer; margin-bottom: 8px;
  transition: filter .1s ease, transform .1s ease;
}
.sng-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sng-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.sng-btn.unregister {
  background: transparent; color: #9fe6bd; border-color: rgba(39, 174, 96, .5);
}


/* ---------------- whispers + social polish (table page) ---------------- */

.chatline.pm { background: linear-gradient(90deg, rgba(217,164,65,.14), rgba(217,164,65,.03)); border: 1px solid rgba(217,164,65,.25); border-radius: 8px; padding: 4px 8px; margin: 3px 0; }
.chatline.pm b { color: var(--gold-bright); }
/* knock-out call-out: red flare, brief emphasis like a floor announcement */
.chatline.ko { background: linear-gradient(90deg, rgba(231,76,60,.16), rgba(231,76,60,.02)); border-radius: 8px; padding: 4px 8px; margin: 3px 0; }
.chatline.ko b { color: #ff7a5c; }
.chatline.ko span { color: #ffd9d0; font-weight: 600; }

.wsp { margin-left: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--gold);
  border-radius: 6px; font-size: 11px; line-height: 1; padding: 2px 5px; cursor: pointer; opacity: .75; flex: 0 0 auto; }
.wsp:hover { opacity: 1; background: rgba(217,164,65,.12); border-color: var(--gold); }

#specPill { border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05);
  color: var(--ink); font-size: 12px; padding: 3px 12px; cursor: pointer; }
#specPill u { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 2px; }
#specPill:hover { border-color: var(--gold); background: rgba(217,164,65,.08); }


/* ---------------- cashier page ---------------- */

.cash-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 26px 28px; margin: 18px 0; border-radius: 16px; }
.cash-bal { display: flex; align-items: baseline; gap: 10px; }
.cash-label { color: var(--mut); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.cash-amount { font-family: Georgia, serif; font-size: 44px; font-weight: 700; color: var(--gold-bright);
  text-shadow: 0 2px 18px rgba(241,196,15,.25); }
.cash-unit { color: var(--mut); font-size: 14px; }
.cash-actions { display: flex; gap: 10px; align-items: center; }
.cash-note { flex-basis: 100%; margin: 4px 0 0; color: var(--mut); font-size: 12.5px; }
.cash-ledger { padding: 18px 20px; border-radius: 16px; }
.ledger-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ledger-top h2 { margin: 0; }
.ledger-top .btn { padding: 7px 14px; font-size: 12.5px; }

/* tournaments: per-format stat chips + history table */
.cash-tourneys { padding: 18px 20px; border-radius: 16px; }

/* bankroll sparkline */
.cash-chart { padding: 18px 20px; border-radius: 16px; }
.cash-chart h2 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 18px; color: var(--gold); }

/* range switcher: today / week / all-time (choice remembered in localStorage) */
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chart-head h2 { margin: 0; }
.chart-ranges { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; gap: 2px; background: rgba(255,255,255,.04); }
.crange { border: 0; background: transparent; color: var(--mut); font: 600 11.5px/1 system-ui; letter-spacing: .02em;
  padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: color .12s ease, background .12s ease; }
.crange:hover { color: var(--ink); }
.crange.on { background: linear-gradient(180deg, #f3d678, var(--gold)); color: #171105; }
.crange:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 1px; }
.chart-caption { color: var(--mut); font-size: 12.5px; margin-bottom: 10px; }
.chart-caption b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-caption b.up { color: var(--green); }
.chart-caption b.down { color: var(--red); }
.chart-wrap { position: relative; max-width: 100%; overflow: hidden; }
.chart-wrap canvas { display: block; max-width: 100%; cursor: crosshair; touch-action: pan-y; }
#chartTip {
  position: absolute; top: 4px; transform: translateX(0); pointer-events: none;
  background: rgba(8, 12, 10, .95); border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 10px; font-size: 12px; color: var(--ink); white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.5); z-index: 5;
}
#chartTip b { color: var(--gold-bright); font-variant-numeric: tabular-nums; }
#chartTip i { color: var(--mut); font-style: normal; font-size: 11px; }

/* marker legend: swatch + count, one chip per kind present in range */
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px;
  font-size: 12px; color: var(--mut); }
.lg-item { display: inline-flex; align-items: center; gap: 5px; }
.lg-item i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(5,8,6,.9); display: inline-block; }
.lg-item i.sq { border-radius: 3px; border-color: rgba(122,150,255,.4); }   /* span-overlay chips are square */
.lg-item b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cash-tourneys h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 18px; color: var(--gold); }
.tstats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tstat { background: rgba(255,255,255,.04); border: 1px solid var(--line2); border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; color: var(--mut); }
.tstat b { color: var(--ink); font-weight: 600; }
.tstat.fmt { background: rgba(217,164,65,.10); border-color: var(--line); color: var(--gold);
  font-family: Georgia, serif; letter-spacing: .04em; }
.tstat.ko { color: #e8964f; border-color: rgba(232,150,79,.35); background: rgba(232,150,79,.08); }
.trow .what .ko-tag { color: #e8964f; font-weight: 700; margin-left: 6px; }

/* ============================================================
   Leaderboard (/leaderboard) — weekly ROI + prize rankings
   ============================================================ */

.lb-hero { padding: 22px 26px; margin: 18px 0; border-radius: 16px; }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.lb-head h2 { margin: 0; font-family: Georgia, serif; font-size: 20px; color: var(--gold); }
.lb-controls label { display: inline-flex; align-items: center; gap: 8px; color: var(--mut); font-size: 13px; }
.lb-controls select { background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 10px; font-size: 13px; }
.lb-note { margin: 8px 0 0; color: var(--mut); font-size: 12.5px; }
.lb-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 18px 20px; border-radius: 16px; }
.lb-board h3 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 16px; color: var(--ink); }
.lb-qual { font-family: system-ui; font-size: 11px; font-weight: 400; color: var(--mut); margin-left: 6px; }
.lb-cols, .lb-row { display: grid; grid-template-columns: 34px 1fr 64px 84px 64px; gap: 8px; align-items: center; }
.lb-cols { padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--mut);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.lb-row { padding: 7px 4px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.lb-row:last-child { border-bottom: none; }
.lb-row .pos { color: var(--mut); font-variant-numeric: tabular-nums; }
.lb-row.top .pos { font-size: 15px; }
.lb-row .who { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .who i { color: var(--gold-bright); font-style: normal; font-size: 11px; }
.lb-row.me { background: rgba(217, 164, 65, .07); border-radius: 8px; }
.lb-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-row .num.mut { color: var(--mut); }
.lb-row .num.up { color: var(--green); font-weight: 700; }
.lb-row .num.down { color: var(--red); font-weight: 700; }
.lb-row .num.gold { color: var(--gold-bright); font-weight: 700; }
.lb-empty { color: var(--mut); padding: 14px 4px; font-size: 13px; }
@media (max-width: 900px) { .lb-boards { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .lb-cols, .lb-row { grid-template-columns: 28px 1fr 58px 64px; }
  .lb-cols span:nth-child(5), .lb-row > span:nth-child(5) { display: none; }
}
.tstat.up b { color: var(--green); }
.tstat.down b { color: var(--red); }
.tstat.muted { border-style: dashed; color: var(--mut); }
.thead { display: grid; grid-template-columns: 110px 1fr 80px 70px 90px; gap: 10px;
  margin-top: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  color: var(--mut); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.thead .num { text-align: right; }
.trow { display: grid; grid-template-columns: 110px 1fr 80px 70px 90px; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.trow:last-child { border-bottom: none; }
.trow .when { color: var(--mut); font-size: 12px; }
.trow .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .num { text-align: right; }
.trow .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.trow.up .amt { color: var(--green); }
.trow.down .amt { color: var(--red); }
.trow .place { color: var(--gold); font-family: Georgia, serif; }
.cash-ledger h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 18px; color: var(--gold); }
.ledger-head { display: grid; grid-template-columns: 110px 1fr 110px 90px 90px; gap: 10px;
  color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ledger-head .num { text-align: right; }
.ledger-row { display: grid; grid-template-columns: 110px 1fr 110px 90px 90px; gap: 10px;
  padding: 8px; border-bottom: 1px dashed rgba(255,255,255,.05); font-size: 13.5px; align-items: center; }
.ledger-row .when { color: var(--mut); font-size: 12px; }
.ledger-row .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-row .tbl { color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ledger-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-row.up .amt { color: var(--green); font-weight: 700; }
.ledger-row.down .amt { color: var(--red); font-weight: 700; }
.ledger-row .bal { color: var(--ink); opacity: .8; }
.ledger-empty { color: var(--mut); padding: 18px 8px; font-size: 13.5px; }
@media (max-width: 700px) {
  .ledger-head, .ledger-row { grid-template-columns: 80px 1fr 70px 70px; }
  .ledger-head .tbl, .ledger-row .tbl { display: none; }
}


/* ---------------- cashier juice ---------------- */

.cash-amount.up { animation: balUp .9s ease-out; }
.cash-amount.down { animation: balDown .9s ease-out; }
@keyframes balUp { 0% { color: var(--green); text-shadow: 0 0 24px rgba(63,191,127,.55); } 100% { color: var(--gold-bright); text-shadow: 0 2px 18px rgba(241,196,15,.25); } }
@keyframes balDown { 0% { color: var(--red); text-shadow: 0 0 24px rgba(224,82,82,.55); } 100% { color: var(--gold-bright); text-shadow: 0 2px 18px rgba(241,196,15,.25); } }

.ledger-row.flash { animation: rowFlash 1.6s ease-out; }
@keyframes rowFlash {
  0% { background: rgba(241,196,15,.22); transform: translateX(0); }
  12% { transform: translateX(3px); }
  24% { transform: translateX(-3px); }
  36% { transform: translateX(0); }
  100% { background: transparent; }
}


/* ---------------- lobby cashier strip ---------------- */

.cash-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 18px; margin: 14px 0 4px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.strip-bal, .strip-last { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.strip-label { color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.strip-amount { font-family: Georgia, serif; font-size: 26px; font-weight: 700; color: var(--gold-bright); }
.strip-unit { color: var(--mut); font-size: 12px; }
.strip-sep { width: 1px; height: 26px; background: var(--line); }
#stripLast { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; flex-wrap: wrap; }
.strip-last span { font-size: 13.5px; }
.strip-last b { color: var(--ink); font-weight: 600; }
.strip-amt.up { color: var(--green); font-weight: 700; }
.strip-amt.down { color: var(--red); font-weight: 700; }
.strip-last i { color: var(--mut); font-style: normal; font-size: 12px; }
.strip-bonus { margin-left: auto; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); }
.strip-bonus.ready { border-color: var(--gold); color: var(--gold-bright); background: rgba(217,164,65,.12);
  animation: bonusPulse 2.2s ease-in-out infinite; }
.strip-bonus.wait { opacity: .55; cursor: default; }
@keyframes bonusPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,164,65,.35); } 50% { box-shadow: 0 0 0 7px rgba(217,164,65,0); } }

/* ============================================================
   Baccarat salon (/baccarat) — bet pad, squeeze felt, bead road
   ============================================================ */

.bac-page { overflow: hidden; }

#bacTable {
  position: absolute; inset: 0;
}
/* the roads moved into the dock, so nothing sits on the felt but the table */
#bacFelt {
  position: absolute; inset: 10px 14px 14px;
  border-radius: 26px;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(255, 232, 180, .13), transparent 60%),
    radial-gradient(120% 130% at 50% 40%, #11663c, #0a3d24 58%, #062415 100%);
  border: 1px solid rgba(217, 164, 65, .28);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5), inset 0 0 90px rgba(0, 0, 0, .45);
  overflow: hidden;
}
#bacWatermark {
  position: absolute; right: 26px; bottom: 8px;
  font: 700 118px/1 Georgia, serif; color: rgba(233, 236, 223, .06);
  letter-spacing: 2px; pointer-events: none;
}
/* The roads live in the dock (a pane of their own), not on the felt: the
   panel used to grow across the table as the shoe went on and cover the
   hands. Here they get the dock's full height and scroll. */
#bacRoads { padding: 10px 12px 14px; }
#pane-roads { overflow-y: auto; }
.road-label { font: 600 9.5px/1 system-ui; letter-spacing: .18em; color: var(--mut); margin-bottom: 6px; }
#beadGrid { display: grid; grid-template-columns: repeat(10, 20px); grid-auto-rows: 20px; gap: 3px; }
.bead {
  display: grid; place-items: center; border-radius: 50%;
  font: 700 10px/1 Georgia, serif; color: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .18);
}
.bead.wP { background: #1f6fb2; }
.bead.wB { background: #b23a3a; }
.bead.wT { background: #1f8f4e; }

#bacDeal {
  position: absolute; left: 50%; top: 44%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 34px;
}
.bac-hand { text-align: center; min-width: 220px; }
.bac-label { font: 600 11px/1 system-ui; letter-spacing: .3em; color: var(--gold); margin-bottom: 10px; }
.bac-cards { display: flex; gap: 8px; justify-content: center; min-height: 92px; }
.bac-card {
  width: 66px; height: 92px; border-radius: 7px;
  display: grid; place-items: center;
  font: 700 26px/1 Georgia, serif;
  background: linear-gradient(160deg, #fdfbf3, #ece5d2);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .12);
  animation: bacDeal .38s cubic-bezier(.2, .9, .3, 1.2) both;
}
.bac-card.red { color: #b23a3a; }
.bac-card.blk { color: #1c232f; }
@keyframes bacDeal { from { transform: translateY(-26px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.bac-total {
  margin-top: 10px; display: inline-grid; place-items: center;
  min-width: 40px; padding: 5px 12px; border-radius: 20px;
  font: 700 20px/1 Georgia, serif; color: #fff;
  background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .16);
}
.bac-hand.win .bac-total { background: rgba(217, 164, 65, .28); border-color: var(--gold); }
.bac-hand.lose { opacity: .62; }
.bac-vs { font: 700 13px/1 Georgia, serif; color: rgba(233, 236, 223, .4); letter-spacing: .2em; }
#bacResult {
  position: absolute; left: 50%; top: 16%;
  transform: translateX(-50%);
  padding: 10px 30px; border-radius: 30px;
  font: 700 22px/1 Georgia, serif; letter-spacing: .12em;
  border: 1px solid; animation: bacPop .45s cubic-bezier(.2, .9, .3, 1.25) both;
}
#bacResult.wP { color: #9fd0f5; border-color: #1f6fb2; background: rgba(31, 111, 178, .18); }
#bacResult.wB { color: #f3b0b0; border-color: #b23a3a; background: rgba(178, 58, 58, .2); }
#bacResult.wT { color: #a9e8c4; border-color: #1f8f4e; background: rgba(31, 143, 78, .2); }
@keyframes bacPop { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

/* ---- bet pad (floats over the felt's bottom-center, between the drawers) ---- */
#bacPad {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 880px; max-width: calc(100% - 28px);
  padding: 12px 14px;
  border-radius: 18px; display: grid; gap: 10px;
  background: rgba(10, 16, 13, .88); border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas: "p t b" "row row row" "you you timer";
  z-index: 5;
}
#betP { grid-area: p; } #betT { grid-area: t; } #betB { grid-area: b; }
.bac-bet {
  position: relative; padding: 14px 16px; border-radius: 14px; cursor: pointer;
  display: grid; gap: 3px; justify-items: start; text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid var(--line2); color: var(--ink);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.bac-bet:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--gold); }
.bac-bet:disabled { opacity: .45; cursor: default; }
.bac-bet .side { font: 700 17px/1 Georgia, serif; letter-spacing: .1em; }
#betP .side { color: #7fc0ee; } #betB .side { color: #f0938c; } #betT .side { color: #7fe0a8; }
.bac-bet .odds { font-size: 11.5px; color: var(--mut); }
.bac-bet .potsum { font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums; }
#bacBetRow { grid-area: row; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#bacBetRow .lbl { font-size: 12px; color: var(--mut); letter-spacing: .08em; }
#bacAmt {
  width: 110px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--ink);
  font: 600 15px/1 system-ui; font-variant-numeric: tabular-nums;
}
.quick { display: flex; gap: 6px; }
.chipq { padding: 6px 12px !important; border-radius: 10px !important; font-weight: 600; }
#bacYou { grid-area: you; font-size: 13px; color: var(--mut); align-self: center; }
#bacYou.on { color: var(--gold-bright); font-weight: 600; }
#bacTimer {
  grid-area: timer; position: relative; height: 26px; border-radius: 13px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); overflow: hidden;
}
#bacTimerFill {
  position: absolute; inset: 0; width: 0%;
  background: linear-gradient(90deg, rgba(217, 164, 65, .35), rgba(217, 164, 65, .65));
  transition: width .1s linear;
}
#bacTimerTxt {
  position: relative; z-index: 1; display: grid; place-items: center; height: 100%;
  font: 600 11.5px/1 system-ui; color: var(--ink); letter-spacing: .06em;
}
@media (max-width: 900px) {
  #bacDeal { gap: 14px; }
  .bac-hand { min-width: 150px; }
  #bacPad { grid-template-areas: "p t b" "row row row" "you you timer"; z-index: 30; }
}
.bac-card.back {
  background:
    repeating-linear-gradient(45deg, rgba(241, 196, 15, .16) 0 6px, transparent 6px 12px),
    linear-gradient(160deg, #6d1f24, #45141a);
  border: 1px solid rgba(241, 196, 15, .25);
  color: transparent;
}

/* ============ squeeze theater (slow peel, suspense, payout flight) ============ */

/* slow corner-peel: the card rises folded off the stack, then stamps flat.
   Two-stage: .peel plays the fold-up entrance; removing .peel releases the
   stamp transition (dampened, like card stock settling). */
.bac-card.peel {
  animation: bacPeel 0.62s cubic-bezier(.22, .8, .3, 1) both;
  transform-origin: 50% 115%;
}
@keyframes bacPeel {
  0%   { transform: perspective(700px) rotateX(84deg) translateY(-30px) scale(.86); opacity: 0; filter: brightness(.55); }
  55%  { transform: perspective(700px) rotateX(38deg) translateY(-9px) scale(.96); opacity: 1; filter: brightness(.8); }
  78%  { transform: perspective(700px) rotateX(4deg) translateY(0) scale(1.03); filter: brightness(1.12); }
  100% { transform: perspective(700px) rotateX(0deg) scale(1); filter: brightness(1); }
}

/* third-card suspense: arrives face-down tilted (peeking), then flips */
.bac-card.peek {
  animation: bacPeek 0.42s cubic-bezier(.3, .9, .35, 1.25) both;
}
@keyframes bacPeek {
  0%   { transform: perspective(700px) rotateY(70deg) translateX(26px) scale(.85); opacity: 0; }
  100% { transform: perspective(700px) rotateY(18deg) translateX(0) scale(1); opacity: 1; }
}
.bac-card.peek ~ * { }

/* total tick: gold ring pulse when a peel lands and the number updates */
.bac-total.tick { animation: bacTick 0.8s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes bacTick {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
  30%  { transform: scale(1.22); box-shadow: 0 0 0 5px rgba(241, 196, 15, .35); color: var(--gold-bright); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}

/* payout chips: hop up out of the winning bet button and drift toward the felt */
.bac-chipfly {
  position: absolute;
  bottom: 12px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--gold) 55%, #8a6a24);
  box-shadow: 0 0 6px rgba(241, 196, 15, .55), inset 0 0 0 2px rgba(120, 84, 20, .55);
  pointer-events: none;
  animation: bacChipFly 0.95s cubic-bezier(.3, .7, .4, 1) both;
}
@keyframes bacChipFly {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  18%  { transform: translate(calc(var(--fly-x) * .15), -34px) scale(1.05); opacity: 1; }
  100% { transform: translate(var(--fly-x), var(--fly-y, 120px)) scale(.8); opacity: 0; }
}

/* ============ derived roads (Big Road, Big Eye Boy, Small, Cockroach) ============ */

.derived-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.road-strip {
  display: grid;
  grid-template-columns: repeat(12, 17px);
  grid-auto-rows: 17px;
  grid-auto-flow: column;      /* column-major: fill top-to-bottom, then right */
  grid-template-rows: repeat(6, 17px);
  gap: 3px;
}
.road-strip.mini {
  grid-template-columns: repeat(12, 13px);
  grid-auto-rows: 13px;
  grid-template-rows: repeat(6, 13px);
  gap: 2px;
}
.road-strip i { display: block; }

/* Big Road: outlined circles — hollow P/B rings, solid when the cell wins */
.road-strip i.br {
  border-radius: 50%;
  border: 2px solid transparent;
}
.road-strip i.br.p { border-color: #2b7fc1; }
.road-strip i.br.b { border-color: #c0392b; }
/* tie badge: green slash overlay */
.road-strip i.br.tie {
  background:
    linear-gradient(45deg, transparent 44%, #1f8f4e 44%, #1f8f4e 56%, transparent 56%)
    no-repeat center / 100% 100%;
}
/* pair badges: corner dots */
.road-strip i.br.pp::after {
  content: ''; position: relative; display: block;
  margin: -7px 0 0 9px; width: 4px; height: 4px; border-radius: 50%;
  background: #2b7fc1;
}
.road-strip i.br.bp::after {
  content: ''; position: relative; display: block;
  margin: 0 9px 0 -13px; width: 4px; height: 4px; border-radius: 50%;
  background: #c0392b;
}
/* dragon tail hint: cells beyond row 6 of a virtual column get a tail mark */
.road-strip i.br.tail { opacity: .55; border-style: dotted; }

/* derived roads: solid mini circles — red = repetition, blue = breaking */
.road-strip i.dr {
  border-radius: 50%;
}
.road-strip i.dr.r { background: #c0392b; }
.road-strip i.dr.b { background: #2b7fc1; }

/* pixi salon: the felt owns the cards AND the material — DOM stand-downs */
.pixi-on #bacDeal { display: none; }
.pixi-on #bacWatermark { display: none; }   /* the pixi felt bakes its own */
.pixi-on #bacFelt {
  background: transparent;                   /* canvas provides the material */
  border-color: transparent;
  box-shadow: none;
}

/* pixi salon layering: canvas below the DOM chrome (roads, watermark).
   bacTable MUST stay absolute — relative would void its inset:0 sizing
   and collapse the chrome to height 0, clipping roads/pad to nothing. */
#feltHost > canvas { z-index: 0; }
#feltHost > #bacTable { position: absolute; z-index: 2; }

/* ============================================================
   Responsive pass — phone portrait → tablet → desktop. The table and
   salon pages scale their 1600×900 stage via fitStage(); these rules
   cover the DOM chrome around them and the document pages.
   ============================================================ */

/* tablet-ish: tighten the document pages */
@media (max-width: 900px) {
  main { padding: 6px 12px 40px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 18px 0 24px; }
  .cash-hero { padding: 20px 18px; }
  .cash-amount { font-size: 34px; }
}

/* phone portrait */
@media (max-width: 560px) {
  .record-row { gap: 4px; }
  .rec-badge { font-size: 10.5px; padding: 2px 7px; }
  #hdr { flex-direction: column; gap: 8px; padding: 12px 12px 4px; }
  .brand { font-size: 15px; letter-spacing: .1em; }
  .brand-mark { width: 26px; height: 26px; }
  img.hdr-logo { width: 28px; height: 28px; vertical-align: -7px; margin-right: 8px; }
  .wallet { padding: 6px 12px; font-size: 13px; }
  main { padding: 4px 10px 34px; }
  .hero h1 { font-size: clamp(26px, 8vw, 34px); }
  .hero-cards { display: none; }              /* hero art yields to copy on phones */
  .card h1 { font-size: 17px; }

  /* lobby cards stack cleanly */
  .limit-badge { flex-wrap: wrap; }

  /* cashier: single-column stats, tighter ledger */
  .cash-actions { width: 100%; flex-wrap: wrap; }
  .cash-actions .btn { flex: 1 1 130px; text-align: center; }
  .crange { padding: 6px 10px; font-size: 11px; }
  .tstats { gap: 6px; }
  .tstat { padding: 3px 9px; font-size: 11.5px; }
  .thead, .trow { grid-template-columns: 74px 1fr 52px 64px; }
  .thead span:nth-child(3), .trow > span:nth-child(3) { display: none; }   /* entrants yields */

  /* table + salon chrome: slimmer bars so the 16:9 felt keeps room */
  #topbar { flex: 0 0 44px; gap: 8px; padding: 0 10px; }
  .tinfo { font-size: 12px; }
  #wallet { padding: 4px 10px; font-size: 12.5px; }
  #backBtn, #fsBtn, #standBtn { padding: 5px 9px; font-size: 12px; }

  /* The table and salon chrome at this width is handled by the body.phone grid
     (see THE DOCK / PHONE above), which has a higher specificity and a real
     arrangement rather than a squeezed 16:9 stage. Only the salon's bet pad
     needs a nudge here — the beat-the-keyboard sizing lives in body.phone. */
  #bacPad { padding: 10px 12px; }
}


/* landscape phones: keep the felt big, panels dock tighter */
@media (max-height: 480px) and (orientation: landscape) {
  #topbar { flex: 0 0 40px; }
  #result { max-width: 62vw; font-size: 12.5px; }
  body.phone #feltHost { height: 60dvh; }
  body.phone #dock { max-height: none; }
}

/* ============================================================
   Retention layer (§B1 streak wheel · §B7 VIP tiers · §B6 offers)
   ============================================================ */

/* tier ink — the hub hands us a colour per tier; these are the fallbacks */
.tier-bronze { --tier: #b08d57; }
.tier-silver { --tier: #cbd5e1; }
.tier-gold { --tier: #e8c96a; }
.tier-platinum { --tier: #9fe6ef; }
.tier-diamond { --tier: #c9b8ff; }
.tier-black { --tier: #f0f4ff; }
.tier-bronze, .tier-silver, .tier-gold, .tier-platinum, .tier-diamond, .tier-black { color: var(--tier); }

/* ---- cash strip: the VIP chip ---- */
.strip-vip { margin-left: 10px; }
.vip-chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px;
  background: rgba(255, 255, 255, .04); font-size: 12px; color: var(--tier, var(--gold));
}
.vip-chip b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.vip-pts { color: var(--mut); font-size: 11.5px; }
.vip-bar { display: inline-block; width: 46px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.vip-bar i { display: block; height: 100%; background: var(--tier, var(--gold)); }
.strip-bonus.wait { cursor: pointer; }                 /* the wheel still opens: it shows the ladder */

/* ---- contextual offer card (§B6) ---- */
.offer-slot { max-width: 1180px; margin: 10px auto 0; padding: 0 22px; }
.offer-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 3px 14px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
  background: linear-gradient(90deg, rgba(217, 164, 65, .13), rgba(18, 26, 23, .62) 46%);
  animation: card-in .22s ease-out;
}
.offer-kind { grid-row: 1; align-self: end; font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--gold); }
.offer-title { grid-column: 2; font: 600 15px/1.25 Georgia, serif; color: var(--ink); }
.offer-body { grid-column: 2; font-size: 12.5px; color: var(--mut); }
.offer-row { grid-column: 3; grid-row: 1 / span 2; display: flex; align-items: center; gap: 10px; }
.offer-grant { font: 700 17px Georgia, serif; color: var(--gold-bright); white-space: nowrap; }
.offer-skip { background: none; border: 0; color: var(--mut); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.offer-skip:hover { color: var(--ink); }
@media (max-width: 760px) {
  .offer-card { grid-template-columns: 1fr; }
  .offer-row { grid-column: 1; grid-row: auto; flex-wrap: wrap; }
}

/* ---- streak wheel modal (§B1) ---- */
.wheel-card { position: relative; max-width: 430px; text-align: center; }
.wheel-x { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: var(--mut); font-size: 15px; cursor: pointer; }
.wheel-x:hover { color: var(--ink); }
.wheel-head h1 { font-size: 19px; letter-spacing: .06em; }
.wheel-sub { margin: 2px 0 0; font-size: 13px; color: var(--mut); }
.wheel-sub .mut { color: var(--mut); }
.wheel-tier {
  display: inline-block; margin-bottom: 6px; padding: 3px 10px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.wheel-stage { position: relative; width: min(330px, 78vw); margin: 14px auto 8px; }
#wheelCanvas { display: block; width: 100%; aspect-ratio: 1 / 1; will-change: transform; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .5)); }
.wheel-pointer {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 0; height: 0; border: 11px solid transparent; border-top: 21px solid var(--gold-bright);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .65));
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 78px; height: 78px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--gold); background: radial-gradient(circle at 34% 28%, #2c3a31, #111915);
  color: var(--gold-bright); font: 700 13px/1 system-ui, sans-serif; letter-spacing: .12em;
}
.wheel-hub:hover:not(:disabled) { background: radial-gradient(circle at 34% 28%, #3a4a3f, #16211b); }
.wheel-hub:disabled { color: var(--mut); border-color: var(--line); cursor: default; }
.wheel-streak { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 6px 0; }
.sday { min-width: 40px; padding: 4px 5px; border: 1px solid var(--line2); border-radius: 8px; font-size: 10px; color: var(--mut); }
.sday .d { letter-spacing: .06em; }
.sday .amt { font: 700 11px Georgia, serif; color: var(--ink); }
.sday.hit { border-color: rgba(63, 191, 127, .55); opacity: .6; }
.sday.today { border-color: var(--gold); background: rgba(217, 164, 65, .15); color: var(--gold-bright); }
.sday.today .amt { color: var(--gold-bright); }
.sday.max { border-color: var(--gold-bright); background: rgba(241, 196, 15, .16); }
.wheel-result { min-height: 22px; font: 600 14px/1.3 Georgia, serif; color: var(--mut); }
.wheel-result.won { color: var(--gold-bright); animation: pop .3s ease-out; }
.wheel-note { margin: 6px 0 0; font-size: 12px; color: var(--mut); }
.wheel-foot { margin-top: 10px; }

/* ---- cashier: the VIP ladder ---- */
.cash-vip { margin-top: 14px; padding: 18px 20px; border-radius: 16px; }
.cash-vip h2 { margin: 0 0 10px; }
.vip-hero { margin-bottom: 10px; }
.vip-ladder { display: grid; gap: 5px; }
.vtier { display: grid; grid-template-columns: 14px 84px 82px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mut); opacity: .5; }
.vtier.reached { opacity: 1; color: var(--ink); }
.vdot { width: 9px; height: 9px; border-radius: 50%; background: var(--tier, var(--gold)); }
.vname { font-weight: 600; }
.vmin { color: var(--gold); }
.vperk { font-size: 12px; }
@media (max-width: 520px) {
  .vtier { grid-template-columns: 14px 1fr auto; }
  .vperk { display: none; }
}

/* ---------------- locked skin (deep link) ----------------
   A deep link into an exotic room you have not earned yet still paints the
   felt — the room is the reward's showpiece — but the lock explains itself
   instead of letting you believe the seat is broken. */
.skin-locked {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 6, 5, .55); backdrop-filter: blur(2px);
}
.skin-locked-card {
  max-width: 420px; margin: 16px; padding: 26px 28px;
  text-align: center; border-radius: 14px;
  background: linear-gradient(180deg, #10171a, #0a0f11);
  border: 1px solid rgba(217, 164, 65, .4);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .6);
}
.skin-locked-title { font: 700 19px Georgia, serif; color: #f1c96a; letter-spacing: .03em; margin-bottom: 10px; }
.skin-locked-card p { color: #cfd6d2; font-size: 14px; line-height: 1.55; margin: 8px 0; }
.skin-locked-card .skin-locked-how { color: #8d968f; font-size: 12.5px; }
.skin-locked-card .btn { margin-top: 12px; }
/* NOTE — do not re-add a bare `#feltHost { position: relative; }` here.
   One used to live at this spot and it silently killed the felt on every
   desktop table page: it overrides the real rule at the top of this file
   (`#feltHost { position: absolute; inset: 12px; }`) because it comes later at
   the same specificity, and `inset` is inert on a relatively-positioned box. So
   #feltHost lost its fill, took its height from a canvas that is `height: 100%`
   of a zero-height parent, and collapsed to 0px — the table rendered nothing.
   The phone layouts set their own `position`, `inset` and `height` in
   `body.phone #feltHost` and never needed this. */

/* ============================================================
   LOBBY LANES — Practice | Public | Private
   One stake lane at a time, so two lanes' rooms can never share a stack; the
   lanes you are not in stay on screen as chips (count · cheapest stake · 🔒).
   Career gets its own band inside Practice, apart from the cash rooms.
   ============================================================ */

.pitch { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 14px 0 16px; }
.pitch h1 { margin: 0; font-size: clamp(20px, 2.2vw, 26px); }
.pitch h1 .gold { color: var(--gold-bright); }
.pitch p { margin: 0; color: var(--mut); font-size: 13px; }

#lanes { margin-top: 4px; }
.lane-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lane-tabs { display: inline-flex; gap: 4px; background: rgba(10, 14, 12, .55); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.lane-tab { display: flex; align-items: baseline; gap: 8px; background: transparent; border: 0; color: var(--mut); font-size: 13.5px; padding: 9px 18px; border-radius: 11px; cursor: pointer; }
.lane-tab small { font-size: 10.5px; color: inherit; opacity: .75; }
.lane-tab .n { font-size: 11px; opacity: .8; font-variant-numeric: tabular-nums; }
.lane-tab[aria-selected="true"] { background: linear-gradient(180deg, #f3d678, var(--gold)); color: #1a1305; font-weight: 700; }
.lane-tab[aria-selected="true"] small { opacity: .65; }
.lane-tab:focus-visible, .lane-chip:focus-visible, .career-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
/* a lane you have not graduated into: still readable, clearly not open */
.lane-tab.locked { color: var(--mut); }
.lane-tab.locked .lane-need { color: var(--gold-bright); opacity: .9; font-style: normal; }
.lane-tab[aria-selected="true"].locked { background: transparent; border: 1px dashed var(--line); color: var(--mut); font-weight: 600; }
.lane-tab[aria-selected="true"].locked .lane-need { color: var(--gold-bright); }

.lane-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lane-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mut); background: var(--panel); border: 1px dashed var(--line); border-radius: 999px; padding: 7px 15px; cursor: pointer; }
.lane-chip:hover { border-color: var(--gold); color: var(--ink); }
.lane-chip b { color: var(--ink); }
.lane-chip i { font-style: normal; color: var(--gold-bright); white-space: nowrap; }

.lane-panel { margin-top: 6px; }
.lane-panel h2 .lane-note { font-size: 11px; letter-spacing: .04em; text-transform: none; color: var(--mut); }
/* ?game=<id> landing (see focusGame in lobby.js): a brief nudge on the group you
   exited from, so it is obvious the page landed ON it and not at the top */
.lane-panel h2.game-focus { animation: game-focus 1.4s ease-out 1; }
@keyframes game-focus {
  0%   { transform: translateX(-6px); opacity: .55; }
  100% { transform: none; opacity: 1; }
}
.lane-empty { border: 1px dashed var(--line); border-radius: 14px; padding: 28px 18px; text-align: center; color: var(--mut); font-size: 13.5px; }

/* the graduation note at the top of a lane you can see but not yet sit in */
.lane-locked { border: 1px solid rgba(217, 164, 65, .38); background: linear-gradient(180deg, rgba(217, 164, 65, .12), rgba(217, 164, 65, .03)); border-radius: 14px; padding: 14px 18px; margin: 0 0 6px; }
.lane-locked b { display: block; color: var(--gold-bright); font-size: 14px; letter-spacing: .02em; }
.lane-locked p { margin: 6px 0 0; color: var(--mut); font-size: 12.5px; line-height: 1.5; }
/* every card in a shut lane reads as un-clickable, exactly like a locked felt
   (the tag is left off on purpose: SNG cards are divs, cash/salon cards are links) */
[data-lane-locked] { cursor: not-allowed; }
[data-lane-locked] .go { opacity: .45; }

.career-band { border: 1px solid rgba(217, 164, 65, .32); background: linear-gradient(180deg, rgba(217, 164, 65, .10), rgba(217, 164, 65, .02)); border-radius: 16px; padding: 2px 16px 16px; margin: 18px 0 4px; }
.career-band h2 { margin: 16px 0 12px; }
.career-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.career-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; transition: transform .12s ease, border-color .12s ease; }
.career-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.career-card .ico { font-size: 22px; line-height: 1; }
.career-card b { display: block; font-size: 15px; }
.career-card small { color: var(--mut); font-size: 12px; }
.career-card .go { margin-left: auto; color: var(--gold-bright); font-weight: 700; font-size: 13px; white-space: nowrap; }

@media (max-width: 720px) {
  .lane-head { gap: 10px; }
  .lane-tabs { display: flex; width: 100%; overflow-x: auto; }
  .lane-tab { flex: 1 0 auto; padding: 9px 14px; }
  .lane-tab small { display: none; }
  .career-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Rank-up (SoT §5) — the flourish, the badge, the grant row
   ------------------------------------------------------------
   A Rank-up is information, not decoration: under
   prefers-reduced-motion the card still appears, it just does not
   animate (so the media block at the bottom is a belt to the JS
   braces, not the only guard).
   ============================================================ */

.rankup {
  position: fixed; left: 50%; top: 74px; transform: translateX(-50%);
  z-index: 90; pointer-events: none;
}
.rankup-card {
  min-width: 236px; text-align: center;
  padding: 14px 26px 15px;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(38,30,12,.97), rgba(14,13,9,.97));
  box-shadow: 0 18px 48px rgba(0,0,0,.6), 0 0 0 1px rgba(217,164,65,.14) inset;
}
.rankup-badge {
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 3px;
}
.rankup-amount {
  font-family: Georgia, serif; font-size: 30px; font-weight: 700; line-height: 1.05;
  color: var(--gold-bright);
}
.rankup-line { margin-top: 5px; font-size: 12.5px; color: var(--ink); }
.rankup-note { margin-top: 6px; font-size: 11.5px; color: var(--mut); }

/* the entrance: rise, then hold a soft glow */
.rankup-play { animation: rankupIn .52s cubic-bezier(.2,.9,.25,1) both; }
.rankup-play .rankup-card { animation: rankupGlow 2.6s ease-in-out .5s infinite; }
.rankup-still { animation: none; }
.rankup-out { opacity: 0; transition: opacity .5s ease; }
.rankup-still.rankup-out { transition: none; }

@keyframes rankupIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(.94); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes rankupGlow {
  0%, 100% { box-shadow: 0 18px 48px rgba(0,0,0,.6), 0 0 14px rgba(217,164,65,.18); }
  50%      { box-shadow: 0 18px 48px rgba(0,0,0,.6), 0 0 30px rgba(217,164,65,.42); }
}

/* the standing badge — a topbar / strip chip, not a flourish */
.rank-badge {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; background: rgba(255,255,255,.03);
  color: var(--ink); font-size: 12px; text-decoration: none; white-space: nowrap;
}
.rank-badge b { color: var(--gold-bright); font-weight: 700; letter-spacing: .06em; }
.rank-badge i { color: var(--mut); font-style: normal; margin-left: 7px; font-size: 11px; }
.rank-badge[data-rank] { cursor: pointer; }
.rank-badge[data-rank]:hover { border-color: var(--gold); }

/* the rank-up as a row of whatever movement list the surface already shows */
.rankup-row { display: inline-flex; align-items: baseline; gap: 7px; }
.rankup-row b { color: var(--gold-bright); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .rankup-play, .rankup-play .rankup-card { animation: none; }
  .rankup-out { transition: none; }
}

/* ---------------- the table look picker (2D · 3D · Auto) ----------------
   A segmented control in the topbar next to fullscreen. The active segment is
   gold and the others stay quiet; picking one rebuilds the felt, so the page
   reloads rather than swapping a renderer mid-hand. */
.renderPick {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; background: rgba(255,255,255,.03);
}
.renderOpt {
  appearance: none; border: 0; background: transparent; color: var(--mut);
  font: inherit; font-size: 11px; letter-spacing: .08em; padding: 5px 11px;
  cursor: pointer;
}
.renderOpt:hover { color: var(--ink); }
.renderOpt.on { background: var(--gold); color: var(--ink); font-weight: 700; }

/* ============================================================
   Salon Night Ops — the lobby wears ONE tile language.

   Lifted from the blackjack app's Night Ops salon (its salonNightOps source, the
   `.salon.night-ops` / `.salon-ops` block in its index.css): a flat
   #121212 ground, hairline gold at partial alpha instead of glass, gold
   ink, uppercase micro-labels, tabular numerals, and exactly ONE filled
   gold action per tile. No backdrop blur, no radial gradients, no glow
   shadows — the depth comes from the hairline, not from the blur.

   Why scoped to body.lobby-page: the table page keeps the hub's own
   glass-and-gradient look. This is the lobby's skin, not the hub's.

   THE POINT. A cash table and a tournament used to be two designs in one
   grid: .tcard ended in a quiet text link with a green seat dot, .scard
   ended in a stacked gold button AND a second text link, plus a record row
   nothing else had. Now both (and the baccarat salons beside them) emit the
   identical skeleton — .op-top · .op-meta · .op-body · .op-foot — so two
   tiles in this grid differ only in words and numbers, never in chrome.
   ============================================================ */
body.lobby-page {
  --ops-bg: #121212;
  --ops-panel: rgba(18, 18, 18, .92);
  --ops-line: rgba(196, 163, 90, .55);
  --ops-hair: rgba(196, 163, 90, .25);
  --ops-gold: #c4a35a;
  --ops-gold-rgb: 196, 163, 90;
  --ops-label: #9a9a9a;
  --ops-dim: #8a8a8a;
  --ops-faint: #7a7a7a;
  background: var(--ops-bg);
}

/* the ground goes quiet: Night Ops is flat charcoal, and the drifting
   glyphs + glass panels were the loudest thing competing with the grid */
body.lobby-page #bgfx { opacity: .14; }
body.lobby-page .chipfloat { opacity: .35; }
body.lobby-page #hdr,
body.lobby-page .cash-strip,
body.lobby-page .lane-panel { background: transparent; backdrop-filter: none; border-color: var(--ops-hair); }

/* group heads read as Ops micro-labels, not as display type */
body.lobby-page .lane-panel h2 {
  font: 650 12px/1.2 system-ui, 'Segoe UI', sans-serif;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ops-gold);
  margin: 22px 0 12px;
}
body.lobby-page .lane-panel h2 .rule { background: linear-gradient(90deg, transparent, var(--ops-hair), transparent); }
body.lobby-page .lane-panel h2 .lane-note { color: var(--ops-dim); font-size: 11px; letter-spacing: .04em; text-transform: none; }

/* ---- the tile: one shell, both kinds ---- */
body.lobby-page .lob-item.opcard {
  display: flex; flex-direction: column;
  background: var(--ops-panel);
  backdrop-filter: none;
  border: 1px solid rgba(var(--ops-gold-rgb), .45);
  border-radius: 10px;
  padding: 12px 12px 10px;
  box-shadow: none;
}
body.lobby-page .lob-item.opcard:hover {
  transform: translateY(-2px);
  border-color: var(--ops-gold);
  box-shadow: 0 6px 20px rgba(var(--ops-gold-rgb), .18);
}

/* header — the name plate owns its own line, so no room name is ever
   truncated, however long the tier label or the headcount gets */
body.lobby-page .op-top { display: flex; align-items: center; gap: 8px; }
body.lobby-page .op-badge {
  flex: 0 1 auto; min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 650 11px/1.2 system-ui, 'Segoe UI', sans-serif;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ops-gold);
  background: transparent;
  border: 1px solid var(--ops-hair);
  border-radius: 7px;
  padding: 5px 9px;
}
/* second row: the room's own skin on the left, its state pushed right —
   the same strip in every tile, so the grid scans as one column */
body.lobby-page .op-strip { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-height: 20px; }
body.lobby-page .op-strip .felt-chip { flex: 0 0 auto; }
body.lobby-page .op-badge .mtt {
  font-size: .82em; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ops-gold); background: transparent;
  border: 1px solid var(--ops-hair); border-radius: 999px;
  padding: 1px 6px; margin-left: 6px; vertical-align: 2px;
}
/* every stake/tier variant collapses into the ONE treatment — micro,
   nosebleed, sng and the bare badge all read the same gold hairline */
body.lobby-page .op-badge.micro,
body.lobby-page .op-badge.nosebleed,
body.lobby-page .op-badge.sng,
body.lobby-page .limit-badge {
  color: var(--ops-gold); background: transparent; border-color: var(--ops-hair);
  font-family: system-ui, 'Segoe UI', sans-serif;
}
body.lobby-page .op-state {
  flex: 0 0 auto; margin-left: auto; white-space: nowrap;
  font: 600 10px/1.2 system-ui, 'Segoe UI', sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ops-label);
  font-variant-numeric: tabular-nums;
}
body.lobby-page .op-state.live { color: #ff8d7a; }

/* body — the meta line and a reserved record slot, so a tile is the same
   height whether or not it has history to show */
body.lobby-page .op-meta {
  color: var(--ops-dim); font-size: 12px; line-height: 1.4;
  margin: 10px 0 0; min-height: 34px;
  font-variant-numeric: tabular-nums;
}
body.lobby-page .op-body { min-height: 22px; display: flex; align-items: center; }
body.lobby-page .record-row { margin: 0; gap: 6px; }
body.lobby-page .rec-badge {
  font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 7px;
  background: transparent; border: 1px solid var(--ops-hair); color: var(--ops-faint);
  font-variant-numeric: tabular-nums;
}
body.lobby-page .rec-badge.roi.up { color: #9fe6bd; border-color: rgba(159, 230, 189, .35); background: transparent; }
body.lobby-page .rec-badge.roi.down { color: #ff8d7a; border-color: rgba(255, 141, 122, .32); background: transparent; }
body.lobby-page .rec-badge.cash { color: var(--ops-gold); border-color: var(--ops-hair); background: transparent; }

/* ---- footer: ONE filled gold action, full width, in every tile ----
   margin-top:auto keeps it pinned to the bottom edge so tiles that differ
   in meta length still line their actions up across the row. */
body.lobby-page .op-foot { margin-top: auto; padding-top: 4px; }
body.lobby-page .op-act {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 40px; margin: 0; padding: 0 12px;
  border: 1px solid #dfc07a; border-radius: 10px;
  background: linear-gradient(180deg, #d4b56a, #c4a35a);
  color: #1a1408;
  font: 650 13.5px/1 system-ui, 'Segoe UI', sans-serif;
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 20px rgba(var(--ops-gold-rgb), .22);
  text-align: left; cursor: pointer; text-decoration: none;
  transition: filter .1s ease, transform .1s ease;
}
body.lobby-page .op-act-chev { flex: 0 0 auto; font-size: 15px; line-height: 1; }
body.lobby-page .op-act:hover { filter: brightness(1.06); }
/* already registered — the one state where the action is not a gold fill */
body.lobby-page .op-act.unregister {
  background: transparent; color: #9fe6bd;
  border-color: rgba(39, 174, 96, .5); box-shadow: none;
}
/* a locked skin or a lane you have not graduated into dims the ACTION,
   never the whole tile — the tile still has to be readable to be worth
   looking at */
body.lobby-page a[data-locked] .op-act,
body.lobby-page [data-lane-locked] .op-act { opacity: .45; }
/* the only tile that reads as spent is a finished tournament */
body.lobby-page .scard.ph-finished { opacity: .55; }
body.lobby-page .opcard.ph-playing,
body.lobby-page .opcard.ph-playing:hover { border-color: rgba(224, 82, 82, .4); }

/* the career band was the last glass panel left on the page — it sits
   directly above the grid, so it has to wear the same hairline */
body.lobby-page .career-band {
  border: 1px solid var(--ops-hair); background: transparent;
  border-radius: 10px; padding: 2px 14px 14px;
}
body.lobby-page .career-card {
  background: var(--ops-panel);
  border: 1px solid rgba(var(--ops-gold-rgb), .45);
  border-radius: 10px;
}
body.lobby-page .career-card:hover { border-color: var(--ops-gold); }
body.lobby-page .career-card small { color: var(--ops-dim); }
body.lobby-page .career-card .go {
  color: var(--ops-gold);
  font: 650 12px/1 system-ui, 'Segoe UI', sans-serif;
  letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- inside the blackjack shell ----------

   The shell's menu is THE menu for the whole product: it owns the upper
   bar, the user database and the wallet, and the games hang off it. A page shown
   inside that shell must therefore not draw a second upper bar — this page's own
   header is the duplicate, so it goes.

   The class is set by embed-link.js, which is also what hands the session over,
   so this rule can only ever match a real shell embed and never the same page
   served standalone (where this header is the only navigation there is).

   #hdr is `position: relative`, so removing it shifts the content up instead of
   leaving a hole where it used to be. */
html.embedded #hdr { display: none; }

