/* HeadCrack — dark lounge, black felt, red neon, gold. */

:root {
  --bg: #08080a;
  --panel: rgba(18, 18, 21, 0.88);
  --panel-solid: #121215;
  --panel-hi: #1a1a1e;
  --line: #2a2a30;
  --line-2: #3b3b43;
  --text: #f3efe6;
  --muted: #a39e94;
  --dim: #6d6961;
  --gold: #e8b64a;
  --gold-2: #f8d983;
  --gold-deep: #9c6d17;
  --red: #d42a3c;
  --red-deep: #6e0f1a;
  --neon: #ff2d42;
  --green: #36d27f;
  --blue: #2f7df6;
  --felt: #1d1d20;
  --radius: 10px;
  --f-brush: 'Permanent Marker', 'Segoe Print', cursive;
  --f-cond: 'Oswald', 'Arial Narrow', sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ds: 64px; /* die size */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.k { display: block; font: 500 11px/1.2 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.v { display: block; font: 600 20px/1.2 var(--f-cond); color: var(--gold); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.h-cond { font: 600 26px/1.1 var(--f-cond); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.muted { color: var(--muted); }
.fine { font-size: 12px; color: var(--dim); margin: 0; }
.center { text-align: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }
.linkish:disabled { opacity: .45; cursor: default; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(6px);
}

/* ───────── backdrop: night-city lounge ───────── */
.backdrop {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(212, 42, 60, .22), transparent 70%),
    radial-gradient(3px 3px at 12% 18%, rgba(255, 200, 120, .5), transparent),
    radial-gradient(2px 2px at 22% 12%, rgba(255, 90, 90, .5), transparent),
    radial-gradient(3px 3px at 64% 9%, rgba(255, 210, 140, .45), transparent),
    radial-gradient(2px 2px at 71% 16%, rgba(255, 255, 255, .35), transparent),
    radial-gradient(2px 2px at 83% 7%, rgba(255, 80, 80, .45), transparent),
    radial-gradient(2px 2px at 41% 14%, rgba(255, 220, 160, .4), transparent),
    radial-gradient(120% 90% at 50% 40%, #16131a 0%, #0b0a0d 55%, #050506 100%);
}
.backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(100% 80% at 50% 50%, transparent 55%, rgba(0, 0, 0, .75));
}
.tag {
  position: absolute; font: 32px/0.95 var(--f-brush); color: rgba(255, 255, 255, .07);
  text-transform: uppercase; transform: rotate(-8deg); white-space: nowrap;
}
.tag-1 { right: 3%; top: 9%; }
.tag-2 { left: 16%; top: 11%; transform: rotate(-4deg); }
.tag-3 { left: 1.5%; bottom: 14%; transform: rotate(-12deg); }

/* ───────── logo ───────── */
.logo { position: relative; display: grid; place-items: center; text-decoration: none; padding: 4px 0 0; }
/* The logo art sits on black; screen blending drops the black onto our dark background. */
.logo-img { display: block; width: 100%; height: auto; mix-blend-mode: screen; }
.logo-icon { display: none; width: 50px; height: 50px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(232, 182, 74, .55), 0 0 18px rgba(255, 45, 66, .35); }
.logo-lg { margin: -6px 0 2px; }
.logo-lg .logo-img { width: min(360px, 100%); margin: 0 auto; }
.crown, .crown-sm {
  display: inline-block; width: 26px; height: 18px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  clip-path: polygon(0 100%, 0 25%, 25% 60%, 50% 0, 75% 60%, 100% 25%, 100% 100%);
}
.crown-sm { width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* ───────── app shell ───────── */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100dvh; }
.signed-out .app { grid-template-columns: minmax(0, 1fr); }
.signed-out .sidenav, .signed-out .bottom-nav { display: none; }
/* Admin site (ADMIN_HOST): only the Admin page — no game menu, sound or player extras. */
.admin-site .nav a:not(.admin-only), .admin-site .bottom-nav a:not(.admin-only),
.admin-site [data-sound-toggle], .admin-site .install-btn { display: none; }
/* Top-bar Sign out (Character and Admin pages) for when the sidebar's link is hidden (≤1280px). */
.topbar .topbar-signout { display: none; align-self: center; }
.admin-site .topbar .topbar-signout { display: inline-flex; }

.sidenav {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 18px;
  padding: 10px 12px 18px; background: linear-gradient(90deg, rgba(8, 8, 10, .92), rgba(8, 8, 10, .6));
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.nav { display: grid; gap: 4px; margin-top: 10px; }
.nav a {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font: 500 15px var(--f-cond); letter-spacing: .1em; text-transform: uppercase;
  border-left: 3px solid transparent;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.nav a.is-active { color: var(--text); background: linear-gradient(90deg, rgba(232, 182, 74, .14), transparent); border-left-color: var(--gold); }
.sidenav-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 14px; }

.bottom-nav { display: none; }

.main { min-width: 0; }
.view { min-height: 100dvh; }

/* ───────── buttons ───────── */
a.btn { text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; border: 1px solid var(--line-2); padding: 10px 18px;
  font: 600 15px var(--f-cond); letter-spacing: .1em; text-transform: uppercase;
  background: var(--panel-hi); transition: transform .08s, filter .15s, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; }
.btn-lg { padding: 14px 20px; font-size: 18px; }
.btn-xs { padding: 3px 10px; font-size: 11px; }
.btn-gold {
  color: #1b1204; border-color: var(--gold-2);
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, #c48d24);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 6px 20px rgba(232, 182, 74, .25);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.08); }
.btn-red {
  color: #ffe9ea; border-color: #ff5a68;
  background: linear-gradient(180deg, #b61f30, #7c1220);
  box-shadow: 0 0 14px rgba(255, 45, 66, .25), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-red:hover:not(:disabled) { filter: brightness(1.12); }
.btn-dark { background: linear-gradient(180deg, #25252a, #151518); }
.btn-dark:hover:not(:disabled) { border-color: #55555f; }
.btn-ghost { background: transparent; border-color: rgba(232, 182, 74, .5); color: var(--gold); }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent;
  color: var(--text); border-radius: 8px; position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, .06); }
.icon-btn.panel { border: 1px solid var(--line); }
.badge {
  position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

/* ───────── tabs & forms ───────── */
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 8px;
  color: var(--muted); font: 500 14px var(--f-cond); letter-spacing: .1em; text-transform: uppercase;
}
.tab.is-active { color: var(--text); border-bottom-color: var(--gold); }

.auth-form { display: grid; gap: 14px; padding: 20px 4px 4px; }
.auth-form label { display: grid; gap: 6px; font: 500 12px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
input:not([type=range]) {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: #0c0c0f; color: var(--text); font: 16px var(--f-body); letter-spacing: 0; text-transform: none;
}
input:not([type=range]):focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 182, 74, .15); }
.form-error { min-height: 1.2em; margin: 0; color: #ff7482; font-size: 13px; }

/* ───────── auth ───────── */
.view-auth { display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); padding: 18px 26px 26px; }

/* ───────── top bar ───────── */
.topbar { display: flex; align-items: stretch; gap: 10px; padding: 12px 16px; flex-wrap: nowrap; }
.topbar-spacer { flex: 1; }
.player-card { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 8px; min-width: 0; }
.player-card .who { min-width: 0; }
.player-card .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-card .v { font-size: 19px; }
.topup {
  width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--gold-deep);
  background: rgba(232, 182, 74, .08); color: var(--gold); font-size: 22px; line-height: 1; margin-left: 6px;
}
.topup:disabled { border-color: var(--line); color: var(--dim); background: transparent; }
.stakes { display: flex; }
.stakes > div { padding: 7px 18px; border-left: 1px solid var(--line); text-align: center; }
.stakes > div:first-child { border-left: 0; }
.live { display: flex; align-items: center; gap: 10px; padding: 0 14px; font: 500 13px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; }
.live b { display: block; color: var(--green); font-weight: 600; }
.live small { color: var(--muted); }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.live.is-down b { color: var(--neon); }
.live.is-down .dot { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.icon-group { display: flex; align-items: center; padding: 0 4px; }
.show-sm { display: none !important; }

/* ───────── avatars & chips ───────── */
.avatar {
  --hue: 0; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font: 600 18px var(--f-cond); color: #fff; text-transform: uppercase;
  background: radial-gradient(circle at 35% 30%, hsl(var(--hue) 55% 42%), hsl(var(--hue) 60% 16%));
  border: 2px solid hsl(var(--hue) 40% 55% / .6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .6);
}
.avatar.is-house { --hue: 42; background: radial-gradient(circle at 35% 30%, #3b2d10, #0d0a04); border-color: var(--gold); color: var(--gold); }

/* Chips: the owner's photo-real chip art (public/img/chips, from the UI kit — value is printed on
   the art; the button text is for screen readers only). Each state has its own image. */
.chip-1 { --img: url(/img/chips/1.webp); --img-h: url(/img/chips/1-hover.webp); --img-p: url(/img/chips/1-pressed.webp); --img-d: url(/img/chips/1-disabled.webp); --img-s: url(/img/chips/1-selected.webp); }
.chip-5 { --img: url(/img/chips/5.webp); --img-h: url(/img/chips/5-hover.webp); --img-p: url(/img/chips/5-pressed.webp); --img-d: url(/img/chips/5-disabled.webp); --img-s: url(/img/chips/5-selected.webp); }
.chip-10 { --img: url(/img/chips/10.webp); --img-h: url(/img/chips/10-hover.webp); --img-p: url(/img/chips/10-pressed.webp); --img-d: url(/img/chips/10-disabled.webp); --img-s: url(/img/chips/10-selected.webp); }
.chip-25 { --img: url(/img/chips/25.webp); --img-h: url(/img/chips/25-hover.webp); --img-p: url(/img/chips/25-pressed.webp); --img-d: url(/img/chips/25-disabled.webp); --img-s: url(/img/chips/25-selected.webp); }
.chip-50 { --img: url(/img/chips/50.webp); --img-h: url(/img/chips/50-hover.webp); --img-p: url(/img/chips/50-pressed.webp); --img-d: url(/img/chips/50-disabled.webp); --img-s: url(/img/chips/50-selected.webp); }
.chip-100 { --img: url(/img/chips/100.webp); --img-h: url(/img/chips/100-hover.webp); --img-p: url(/img/chips/100-pressed.webp); --img-d: url(/img/chips/100-disabled.webp); --img-s: url(/img/chips/100-selected.webp); }
.chip-250 { --img: url(/img/chips/250.webp); --img-h: url(/img/chips/250-hover.webp); --img-p: url(/img/chips/250-pressed.webp); --img-d: url(/img/chips/250-disabled.webp); --img-s: url(/img/chips/250-selected.webp); }
.chip-500 { --img: url(/img/chips/500.webp); --img-h: url(/img/chips/500-hover.webp); --img-p: url(/img/chips/500-pressed.webp); --img-d: url(/img/chips/500-disabled.webp); --img-s: url(/img/chips/500-selected.webp); }
.chip-1000 { --img: url(/img/chips/1000.webp); --img-h: url(/img/chips/1000-hover.webp); --img-p: url(/img/chips/1000-pressed.webp); --img-d: url(/img/chips/1000-disabled.webp); --img-s: url(/img/chips/1000-selected.webp); }
.chip-2000 { --img: url(/img/chips/2000.webp); --img-h: url(/img/chips/2000-hover.webp); --img-p: url(/img/chips/2000-pressed.webp); --img-d: url(/img/chips/2000-disabled.webp); --img-s: url(/img/chips/2000-selected.webp); }
.chip-max { --img: url(/img/chips/max.webp); --img-h: url(/img/chips/max-hover.webp); --img-p: url(/img/chips/max-pressed.webp); --img-d: url(/img/chips/max-disabled.webp); --img-s: url(/img/chips/max-selected.webp); }
.chip {
  width: 66px; height: 66px; border: 0; padding: 0; position: relative;
  background: var(--img) center / contain no-repeat;
  font-size: 0; color: transparent; /* label lives in aria-label */
  transition: transform .12s;
}
.chip:hover:not(:disabled) { background-image: var(--img-h); transform: translateY(-3px); }
.chip:active:not(:disabled) { background-image: var(--img-p); transform: translateY(0); }
.chip:focus-visible, .chip.is-hot { background-image: var(--img-s); outline: none; }
.chip:disabled { background-image: var(--img-d); cursor: default; }

/* Stacks on the felt: the same art, piled with a small rise per chip. */
.chip-stack { position: relative; width: 30px; height: 30px; }
.chip-stack i {
  position: absolute; left: 0; width: 30px; height: 30px;
  background: var(--img) center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .55));
}

/* ───────── lobby ───────── */
.lobby-body { padding: 8px 16px 40px; max-width: 1180px; }
.section-head { margin: 10px 0 18px; }
.section-head p { margin: 6px 0 0; }
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.table-card { padding: 0; overflow: hidden; display: grid; }
.table-card .mini {
  position: relative; height: 140px; display: grid; place-items: center;
  background: radial-gradient(60% 70% at 50% 60%, #26262a, #121214 70%);
  border-bottom: 1px solid var(--line);
}
.table-card .mini::before {
  content: ''; position: absolute; inset: 22px 34px 14px; border-radius: 50%;
  border: 6px solid #1a0f10; box-shadow: 0 0 0 2px var(--red-deep), 0 0 22px rgba(255, 45, 66, .45), inset 0 0 30px #000;
}
.table-card .mini .seats-dots { position: absolute; bottom: 8px; display: flex; gap: 6px; }
.table-card .mini .seats-dots i { width: 8px; height: 8px; border-radius: 50%; background: #34343b; }
.table-card .mini .seats-dots i.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.table-card .mini.has-scene { height: 170px; background-size: cover; background-position: center 55%; }
.table-card .mini.has-scene::before { content: none; }
.table-card .mini.has-scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 10, .1) 30%, rgba(8, 8, 10, .75)); }
.table-card .mini.has-scene .name, .table-card .mini.has-scene .rake-tag, .table-card .mini.has-scene .seats-dots { z-index: 1; }
.table-card .mini .rake-tag {
  position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 5px;
  font: 600 11px var(--f-cond); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-2); background: rgba(232, 182, 74, .1); border: 1px solid rgba(232, 182, 74, .35);
}
.table-card .mini .name { position: relative; font: 26px var(--f-brush); color: #f4f1ea; text-shadow: 2px 2px 0 var(--red-deep); }
.table-card .body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px; }
.table-card .body .banker { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.table-card .body .banker .v { font-size: 16px; }
.table-card .foot { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 16px; }
.phase-pill { font: 500 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.phase-pill.is-live { color: var(--green); }

.leaderboard { list-style: none; margin: 0; padding: 6px; max-width: 560px; counter-reset: rank; }
.leaderboard li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); counter-increment: rank; }
.leaderboard li:last-child { border-bottom: 0; }
.leaderboard li::before { content: counter(rank); width: 26px; font: 600 18px var(--f-cond); color: var(--dim); text-align: center; }
.leaderboard li:nth-child(1)::before { color: var(--gold); }
.leaderboard li:nth-child(2)::before { color: #cfd3da; }
.leaderboard li:nth-child(3)::before { color: #cd7f32; }
.leaderboard .avatar { width: 36px; height: 36px; font-size: 15px; }
.leaderboard .nm { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.leaderboard .v { font-size: 18px; }
.leaderboard li.is-me { background: rgba(232, 182, 74, .07); border-radius: 8px; }

.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.rule-card { padding: 18px 20px; }
.rule-card h2 { font-size: 18px; color: var(--gold); margin-bottom: 10px; }
.rule-card ol, .rule-card ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: #d8d3c8; }
.rank-list { list-style: none; padding: 0 !important; }
.rank-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.rank-list b { font-family: var(--f-cond); letter-spacing: .06em; color: var(--text); }
.rank-list span { color: var(--muted); text-align: right; font-size: 14px; }

/* ───────── table view ───────── */
.view-table { display: flex; flex-direction: column; height: 100dvh; min-height: 560px; overflow-x: clip; }
.table-layout {
  flex: 1; min-height: 0; display: grid; gap: 12px; padding: 0 16px 14px;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "stage side" "controls side";
}
.stage { grid-area: stage; position: relative; min-height: 360px; }
.controls { grid-area: controls; display: grid; grid-template-columns: 250px minmax(0, 1fr) 150px; gap: 14px; align-items: end; }
.side-panel { grid-area: side; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; min-height: 0; }

/* the room behind the table: penthouse window onto the skyline */
.lounge {
  position: absolute; inset: -10px -4px 34% -4px; z-index: 0; border-radius: 14px; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
}
.skyline { position: absolute; inset: 0; background: url(/img/skyline.svg) center bottom / cover no-repeat; opacity: .85; }
.window-frame {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent calc(25% - 3px), #050407 calc(25% - 3px) calc(25% + 3px), transparent calc(25% + 3px) calc(75% - 3px), #050407 calc(75% - 3px) calc(75% + 3px), transparent 0),
    radial-gradient(70% 90% at 50% 110%, rgba(255, 45, 66, .22), transparent 70%),
    linear-gradient(180deg, rgba(5, 4, 7, .1), rgba(5, 4, 7, .55));
}

/* the table */
.felt { position: absolute; inset: 27% 5% 3% 5%; z-index: 2; }
.felt::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(55% 55% at 50% 45%, rgba(255, 255, 255, .06), transparent 70%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .012) 0 2px, transparent 2px 4px),
    radial-gradient(100% 100% at 50% 50%, #26262a 0%, #19191c 60%, #0e0e10 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .9), inset 0 0 0 2px rgba(255, 45, 66, .55), inset 0 0 20px rgba(255, 45, 66, .25);
}
.rail {
  position: absolute; inset: -18px; border-radius: 50%; z-index: -1;
  background: linear-gradient(180deg, #2c1b17, #120b0a 60%, #1d1210);
  box-shadow: 0 0 0 2px #050505, 0 0 40px 8px rgba(255, 45, 66, .38), 0 30px 60px rgba(0, 0, 0, .85), inset 0 2px 0 rgba(255, 255, 255, .07);
}
.felt-text {
  position: absolute; top: 50%; font: 24px/0.95 var(--f-brush); color: rgba(255, 255, 255, .07);
  text-transform: uppercase; transform: translateY(-50%) rotate(-12deg); pointer-events: none; text-align: center;
}
.felt-text-l { left: 13%; }
.felt-text-r { right: 11%; transform: translateY(-50%) rotate(10deg); }
.is-practice .felt::before {
  background:
    radial-gradient(55% 55% at 50% 45%, rgba(255, 255, 255, .07), transparent 70%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .015) 0 2px, transparent 2px 4px),
    radial-gradient(100% 100% at 50% 50%, #1f4a33 0%, #153626 60%, #0c2218 100%);
}

/* the bank's character sits behind the plaque, half hidden by the rail */
.bank-char { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); z-index: 3; width: 170px; height: 170px; pointer-events: none; }
.bank-char > * { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); transform-origin: 50% 100%; }
.bank-char.is-turn > * { animation: lean .35s ease-in-out infinite alternate; }
.bank-char.react-win > * { animation: hop .7s cubic-bezier(.3, 1.6, .5, 1); }
.bank-char.react-lose > * { animation: slump .8s ease-out; }
.bank-plaque {
  position: absolute; left: 50%; top: 102px; transform: translateX(-50%); z-index: 4;
  display: grid; justify-items: center; gap: 1px; min-width: 190px; padding: 12px 22px 9px;
  background: linear-gradient(180deg, #221a0c, #0e0b06);
  border: 1px solid var(--gold); border-radius: 10px;
  box-shadow: 0 0 0 1px #000, 0 0 24px rgba(232, 182, 74, .28), inset 0 0 18px rgba(232, 182, 74, .12);
}
.bank-plaque .crown { position: absolute; top: -11px; }
.bank-label { font: 600 20px/1 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.bank-name { font-size: 13px; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-amt { font: 600 20px var(--f-cond); color: var(--text); font-variant-numeric: tabular-nums; }
.bank-plaque.is-turn { animation: glow-gold 1.2s ease-in-out infinite alternate; }
.bank-plaque.is-player { border-color: var(--gold-2); }
.bank-plaque .btn { margin-top: 4px; }
@keyframes glow-gold { to { box-shadow: 0 0 0 1px #000, 0 0 44px rgba(248, 217, 131, .6), inset 0 0 24px rgba(232, 182, 74, .2); } }

.table-center {
  position: absolute; left: 50%; top: max(49%, 200px); transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 4px; width: min(420px, 50%); z-index: 4; pointer-events: none;
}
.pot { text-align: center; padding: 3px 26px; border-top: 1px solid rgba(232, 182, 74, .25); border-bottom: 1px solid rgba(232, 182, 74, .25); background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .5), transparent); }
.pot .v { font-size: 32px; color: var(--gold); text-shadow: 0 0 20px rgba(232, 182, 74, .3); }
.pot .v.is-bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); color: var(--gold-2); } }
.status { font: 500 15px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--text); text-align: center; min-height: 1.4em; text-shadow: 0 2px 6px #000; }
.status.is-you { color: var(--gold-2); }
.clock { position: absolute; right: -54px; top: 40px; width: 42px; height: 42px; display: grid; place-items: center; }
.clock svg { position: absolute; inset: 0; width: 42px; height: 42px; transform: rotate(-90deg); }
.clock .track { stroke: rgba(255, 255, 255, .1); stroke-width: 3; }
.clock .arc { stroke: var(--gold); stroke-width: 3; stroke-dasharray: 100.5; transition: stroke-dashoffset .25s linear, stroke .3s; }
.clock.is-low .arc { stroke: var(--neon); }
.clock.is-low { animation: tick-pulse 1s ease-in-out infinite; }
@keyframes tick-pulse { 50% { transform: scale(1.12); } }
.clock span { font: 600 14px var(--f-cond); font-variant-numeric: tabular-nums; }

/* 3D dice — thrown within the felt's middle */
.dice-zone { position: absolute; left: 24%; right: 24%; top: 60%; bottom: 10%; z-index: 3; pointer-events: none; perspective: 800px; }
.die-wrap, .die-shadow { position: absolute; left: 0; top: 0; will-change: transform; }
.die-wrap { width: var(--ds); height: var(--ds); margin: calc(var(--ds) / -2) 0 0 calc(var(--ds) / -2); z-index: 2; }
.die-wrap.in-hand { transition: transform .22s ease-out; z-index: 8; }
.die-shadow {
  width: var(--ds); height: calc(var(--ds) * .34); margin: calc(var(--ds) * -.17) 0 0 calc(var(--ds) / -2); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .75), transparent); z-index: 1;
}
.die { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.05s cubic-bezier(.12, .7, .25, 1); }
.die-wrap.is-shaking .die { animation: shake .09s linear infinite; transition: none; }
.face {
  position: absolute; inset: 0; border-radius: 17%;
  background: radial-gradient(120% 120% at 30% 25%, #ffffff, #ebe7df 60%, #cfcac0);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 -4px 10px rgba(0, 0, 0, .14);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 13%;
  backface-visibility: hidden; transition: background .4s, box-shadow .4s;
}
.face i { width: 72%; height: 72%; margin: auto; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #444, #050505 70%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .2); }
.face.f1 i { background: radial-gradient(circle at 40% 35%, #ff5a5a, #9b0d18 70%); width: 90%; height: 90%; }
.f1 { transform: translateZ(calc(var(--ds) / 2)); }
.f6 { transform: rotateY(180deg) translateZ(calc(var(--ds) / 2)); }
.f3 { transform: rotateY(90deg) translateZ(calc(var(--ds) / 2)); }
.f4 { transform: rotateY(-90deg) translateZ(calc(var(--ds) / 2)); }
.f2 { transform: rotateX(90deg) translateZ(calc(var(--ds) / 2)); }
.f5 { transform: rotateX(-90deg) translateZ(calc(var(--ds) / 2)); }
.die-wrap::before {
  content: ''; position: absolute; inset: -55%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, var(--halo, rgba(248, 217, 131, .8)), transparent);
  transition: opacity .3s;
}
.die-wrap.glow-gold::before { opacity: 1; --halo: rgba(248, 217, 131, .85); animation: halo .7s ease-in-out infinite alternate; }
.die-wrap.glow-silver::before { opacity: .8; --halo: rgba(220, 230, 255, .7); animation: halo .7s ease-in-out infinite alternate; }
.die-wrap.glow-red::before { opacity: .9; --halo: rgba(255, 45, 66, .75); }
.die-wrap.glow-gold .face { background: radial-gradient(120% 120% at 30% 25%, #fffaf0, #f7e3a6 60%, #d9b057); box-shadow: inset 0 0 0 2px #f8d983, inset 0 -4px 10px rgba(120, 80, 0, .25); }
.die-wrap.glow-red .face { background: radial-gradient(120% 120% at 30% 25%, #fff, #f1c9cd 60%, #c98c93); }
@keyframes halo { to { transform: scale(1.15); } }
@keyframes shake {
  0% { transform: rotateX(25deg) rotateY(-30deg) rotateZ(8deg) translate3d(-3px, 2px, 0); }
  50% { transform: rotateX(-20deg) rotateY(35deg) rotateZ(-6deg) translate3d(3px, -3px, 0); }
  100% { transform: rotateX(25deg) rotateY(-30deg) rotateZ(8deg) translate3d(-3px, 2px, 0); }
}
.mini-dice { display: inline-flex; gap: 3px; }
.mini-dice b {
  width: 17px; height: 17px; border-radius: 4px; background: #f1ede5; color: #111; display: grid; place-items: center;
  font: 700 11px var(--f-cond);
}

/* what the roll was, popped over the dice */
.roll-callout {
  position: absolute; left: 50%; top: 74%; z-index: 7; pointer-events: none; white-space: nowrap;
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  font: 34px/1 var(--f-brush); text-transform: uppercase; color: #fff; text-shadow: 3px 3px 0 #000, 0 0 18px rgba(0, 0, 0, .8);
}
.roll-callout.is-on { animation: callout 1.6s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.roll-callout.is-gold { color: var(--gold-2); text-shadow: 3px 3px 0 #000, 0 0 26px rgba(248, 217, 131, .7); }
.roll-callout.is-red { color: #ff5566; text-shadow: 3px 3px 0 #000, 0 0 26px rgba(255, 45, 66, .6); }
.roll-callout.is-silver { color: #e7ecf7; text-shadow: 3px 3px 0 #000, 0 0 22px rgba(200, 215, 255, .6); }
.roll-callout.is-dim { font-size: 22px; color: var(--muted); }
@keyframes callout {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.5) rotate(-6deg); }
  18% { opacity: 1; transform: translate(-50%, -60%) scale(1.12) rotate(-4deg); }
  30% { transform: translate(-50%, -60%) scale(1) rotate(-4deg); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -85%) scale(1) rotate(-4deg); }
}

/* seats — characters sit around the rail; positions go clockwise from bottom-left */
.seats { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.seat {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -62%);
  display: grid; justify-items: center; width: 150px; pointer-events: auto;
}
.seat[data-seat="0"] { --x: 20%; --y: 86%; --bx: 84px; --by: -40px; }
.seat[data-seat="1"] { --x: 8%;  --y: 58%; --bx: 96px; --by: 0px; }
.seat[data-seat="2"] { --x: 23%; --y: 30%; --bx: 70px; --by: 50px; }
.seat[data-seat="3"] { --x: 77%; --y: 30%; --bx: -70px; --by: 50px; }
.seat[data-seat="4"] { --x: 92%; --y: 58%; --bx: -96px; --by: 0px; }
.seat[data-seat="5"] { --x: 80%; --y: 86%; --bx: -84px; --by: -40px; }
.seat-char { width: 116px; height: 116px; margin-bottom: -30px; position: relative; z-index: 0; }
.seat-char > * { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .7)); transform-origin: 50% 100%; }
.seat.is-turn::before {
  content: ''; position: absolute; left: 50%; top: -20px; width: 200px; height: 200px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(248, 217, 131, .28), transparent); pointer-events: none;
  animation: halo 1s ease-in-out infinite alternate;
}
.slot { display: contents; }
.seat-char.is-rolling > *, .bank-char.is-rolling > * { animation: lean .16s ease-in-out infinite alternate; }
.seat-char.react-win > * { animation: hop .7s cubic-bezier(.3, 1.6, .5, 1); }
.seat-char.react-lose > * { animation: slump .9s ease-out; }
.seat-char.react-shock > *, .bank-char.react-shock > * { animation: shock .6s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes lean { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-3px); } }
@keyframes hop { 30% { transform: translateY(-18px) scale(1.04); } 55% { transform: translateY(0) scale(1, .96); } 75% { transform: translateY(-6px); } }
@keyframes slump { 30% { transform: translateY(8px) rotate(-4deg) scale(1, .95); } 60% { transform: translateY(6px) rotate(3deg); } }
@keyframes shock { 30% { transform: translateY(-10px) scale(1.08); } 60% { transform: translateY(0) scale(.98); } }
.plate {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center;
  min-width: 132px; padding: 6px 14px 6px 12px; text-align: left;
}
.plate .dot { grid-row: 1; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.plate .dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.plate .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.plate .v { grid-column: 2; font-size: 17px; }
.seat.is-me .plate { border-color: rgba(232, 182, 74, .6); }
.seat.is-turn .plate { border-color: var(--gold-2); animation: glow-gold 1s ease-in-out infinite alternate; }
.seat.is-away { opacity: .55; }
.seat .sit-btn {
  width: 122px; padding: 12px 0; margin-top: 60px; border-radius: 10px; border: 1px dashed #4a4a52; background: rgba(0, 0, 0, .45);
  color: var(--muted); font: 500 13px var(--f-cond); letter-spacing: .14em; text-transform: uppercase;
}
.seat .sit-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.seat .sit-btn:disabled { opacity: .35; }
.seat-bet {
  position: absolute; left: calc(50% + var(--bx)); top: calc(62% + var(--by)); transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 2px; pointer-events: none; z-index: 2;
}
.seat-bet .amt { font: 600 13px var(--f-cond); color: var(--text); background: rgba(0, 0, 0, .7); padding: 0 6px; border-radius: 4px; }
.seat-roll { display: flex; align-items: center; gap: 6px; min-height: 22px; margin-top: 3px; position: relative; z-index: 1; }
.result {
  font: 600 11px/1 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px;
  background: #2a2a30; color: var(--muted);
}
.result.win { background: rgba(54, 210, 127, .16); color: var(--green); }
.result.lose { background: rgba(255, 45, 66, .16); color: #ff7482; }
.result.push { background: rgba(255, 255, 255, .08); color: var(--text); }

/* photo characters: transparent cut-outs sitting behind the rail. A gold rim traces the
   silhouette, red neon catches one side, and the bottom fades out behind the nameplate. */
/* cut-outs already fade out where the body leaves the frame (scripts/clean-cutouts.ps1) */
.portrait { object-fit: contain; object-position: 50% 100%; }
/* character-screen photos: the portrait with its lounge background, as a card */
.portrait.is-photo-card {
  object-fit: cover; object-position: 50% 28%; border-radius: 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}
.seat-char.is-photo { width: 140px; height: 115px; margin-bottom: -14px; }
.seat-char.is-photo > *, .bank-char.is-photo > *, .char-preview.is-photo > * {
  filter: drop-shadow(0 0 1px rgba(248, 217, 131, .85)) drop-shadow(4px 0 6px rgba(255, 45, 66, .35)) drop-shadow(0 14px 18px rgba(0, 0, 0, .8));
}
.bank-char.is-photo { width: 214px; height: 175px; top: -6px; }
.bank-char.is-photo ~ .bank-plaque { top: 132px; }
.bank-char.is-photo ~ .table-center { top: max(50%, 238px); }
.seat.is-turn .seat-char.is-photo > * { filter: drop-shadow(0 0 2px #f8d983) drop-shadow(0 0 14px rgba(248, 217, 131, .6)) drop-shadow(0 14px 18px rgba(0, 0, 0, .8)); }
.mini-char .portrait { width: 100%; height: 100%; -webkit-mask-image: none; mask-image: none; object-fit: cover; object-position: 50% 12%; transform: scale(1.45); transform-origin: 50% 18%; }
.char-preview.is-photo { width: 320px; height: 262px; margin-bottom: -44px; }
.char-preview.is-photo > * { filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .7)); }
/* Character page: the whole figure on its lounge background */
.char-preview.is-full { width: 300px; height: 400px; margin-bottom: -28px; }
.portrait.is-full {
  object-fit: cover; border-radius: 16px; box-shadow: 0 0 0 1px var(--kit-gold, #c49340);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
}

/* live cameras: a framed video tile takes the character's place */
.seat-char.is-cam { width: 136px; height: 102px; margin-bottom: -10px; }
.seat-cam {
  position: relative; width: 100%; height: 100%; border-radius: 12px; overflow: hidden; background: #0b0a0d;
  box-shadow: 0 0 0 1px #000, 0 0 0 2px rgba(232, 182, 74, .75), 0 0 18px rgba(255, 45, 66, .3), 0 12px 22px rgba(0, 0, 0, .7);
}
.seat-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.seat-cam.is-local video { transform: scaleX(-1); } /* your own preview is mirrored, like a mirror */
.live-badge {
  position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 4px; background: #d42a3c; color: #fff;
  font: 600 9px/1.2 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 0 8px rgba(255, 45, 66, .7);
}
.cam-hide {
  position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 15px; line-height: 22px; opacity: 0; transition: opacity .15s;
}
.seat-cam:hover .cam-hide, .cam-hide:focus-visible { opacity: 1; }
@media (hover: none) { .cam-hide { opacity: .85; } }
.cam-show {
  grid-column: 1 / -1; justify-self: start; margin-top: 3px; border: 1px solid #d42a3c; background: rgba(212, 42, 60, .15);
  color: #ff8a95; border-radius: 4px; padding: 1px 6px; font: 600 9px var(--f-cond); letter-spacing: .12em; text-transform: uppercase;
}
.plate-chips { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 3px; }
.plate-chips .cam-show { margin-top: 0; }
.plaque-chips { justify-content: center; margin-top: 4px; }
.voice-chip {
  border: 1px solid rgba(54, 210, 127, .6); background: rgba(54, 210, 127, .12); color: #7ff0b0;
  border-radius: 4px; padding: 1px 6px; font: 600 9px var(--f-cond); letter-spacing: .12em; text-transform: uppercase;
}
.voice-chip.is-muted { border-color: #6d6961; background: rgba(255, 255, 255, .05); color: var(--muted); text-decoration: line-through; }
.voice-chip.is-self { cursor: default; }
.voice-chip.report-chip { border-color: rgba(255, 90, 104, .55); color: #ff9aa4; }
.voice-chip.report-chip:hover { background: rgba(182, 31, 48, .25); color: #fff; }
#cam-report .radio { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; text-align: left; font-size: 15px; }
#cam-report .radio input { width: 18px; height: 18px; flex: none; margin: 0; padding: 0; }
/* green glow on whoever is talking */
.seat.is-speaking .plate { border-color: #36d27f; box-shadow: 0 0 0 1px #000, 0 0 0 2px #36d27f, 0 0 18px rgba(54, 210, 127, .55); }
.seat.is-speaking .seat-char > *, .bank-char.is-speaking > * { filter: drop-shadow(0 0 3px #36d27f) drop-shadow(0 0 14px rgba(54, 210, 127, .6)) drop-shadow(0 12px 18px rgba(0, 0, 0, .8)); }
.seat.is-speaking .seat-cam { box-shadow: 0 0 0 1px #000, 0 0 0 3px #36d27f, 0 0 22px rgba(54, 210, 127, .6), 0 12px 22px rgba(0, 0, 0, .7); }
.bank-char.is-cam { width: 210px; height: 158px; top: -6px; }
.bank-char.is-cam ~ .bank-plaque { top: 124px; }
.bank-char.is-cam ~ .table-center { top: max(50%, 232px); }
.cam-btn.is-on { color: #fff; background: #b61f30; box-shadow: 0 0 12px rgba(255, 45, 66, .6); }

/* 18+ verification */
.view-verify { display: grid; place-items: center; padding: 24px 16px; }
.verify-card { width: min(440px, 100%); padding: 16px 26px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.verify-card .logo-lg .logo-img { width: min(260px, 100%); }
.age-badge {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin-top: -4px;
  font: 700 22px var(--f-cond); color: #fff; background: radial-gradient(circle at 35% 30%, #d42a3c, #6e0f1a);
  box-shadow: 0 0 0 2px var(--gold), 0 0 20px rgba(255, 45, 66, .45);
}
.verify-card p { margin: 0; }
.verify-points { text-align: left; margin: 4px 0; padding-left: 20px; display: grid; gap: 6px; color: #d8d3c8; font-size: 14px; }
.verify-card .btn-lg { width: 100%; }
.verify-card.is-waiting .age-badge { animation: tick-pulse 1.2s ease-in-out infinite; }
.verify-signout { margin-top: 2px; }
.signed-out .view-verify { display: grid; }
.phone-badge svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
#view-contact .auth-form { width: 100%; text-align: left; }
.step-no { font: 600 11px var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* sign-up application */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-form .check-row { display: flex; align-items: flex-start; gap: 10px; text-transform: none; letter-spacing: 0; font: 400 13px/1.4 var(--f-body, inherit); color: #d8d3c8; }
.check-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gold); flex: none; }
.view-auth { overflow-y: auto; }

.label-note { text-transform: none; letter-spacing: 0; color: var(--dim); margin-left: 4px; }
.auth-sent { margin: 0; color: #d8d3c8; font-size: 14px; text-align: center; }
/* Character page: display name */
.name-card { margin-top: 16px; padding: 16px 20px; display: grid; grid-template-columns: 1fr minmax(160px, 240px) auto; gap: 8px 16px; align-items: center; }
.name-card h2 { margin: 0 0 4px; font-size: 20px; }
.name-card p { margin: 0; }
.name-card input { padding: 9px 12px; }
.name-card .form-error { grid-column: 1 / -1; min-height: 0; }
.name-card .member-id { grid-column: 1 / -1; font-size: 13px; color: #d8d3c8; }
.member-id b { font-family: var(--f-cond); letter-spacing: .08em; color: var(--gold-2); }
.member-list .who .mid { color: var(--gold); font: 500 11px var(--f-cond); letter-spacing: .08em; margin-left: 6px; }
@media (max-width: 860px) { .name-card { grid-template-columns: 1fr auto; } .name-card > div { grid-column: 1 / -1; } }
/* Character page: invite friends */
.referral-card { margin-top: 16px; padding: 16px 20px; display: grid; grid-template-columns: 1fr auto auto auto; gap: 18px; align-items: center; }
.referral-points { display: grid; justify-items: center; gap: 2px; padding: 0 18px; border-left: 1px solid rgba(196, 147, 64, .25); border-right: 1px solid rgba(196, 147, 64, .25); }
.referral-points .k { font: 500 11px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.referral-points b { font: 700 26px var(--f-cond); color: var(--gold-2); }
.referral-progress { font-size: 12px; color: var(--muted); white-space: nowrap; }
.referral-points .btn { margin-top: 6px; }
.referral-card h2 { margin: 0 0 4px; font-size: 20px; }
.referral-card p { margin: 0; }
.referral-code { display: grid; justify-items: center; gap: 2px; }
.referral-code .k { font: 500 11px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.referral-code b { font: 700 26px var(--f-cond); letter-spacing: .14em; color: var(--gold-2); }
.referral-actions { display: grid; gap: 8px; }
@media (max-width: 860px) { .referral-card { grid-template-columns: 1fr; justify-items: start; } .referral-actions { grid-auto-flow: column; } .referral-points { justify-items: start; padding: 12px 0; border: 0; border-top: 1px solid rgba(196, 147, 64, .25); border-bottom: 1px solid rgba(196, 147, 64, .25); width: 100%; } }

/* Admin: page tabs + dashboard */
.admin-tabs { display: none; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; } /* phones only: the sidebar is the menu elsewhere */
@media (max-width: 860px) { .admin-tabs { display: flex; } }
/* a page's own sections (Members, Referrals) */
.sub-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 14px; overflow-x: auto; }
.sub-tabs button { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 500 14px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.sub-tabs button:hover { color: var(--text); }
.sub-tabs button.is-on { color: var(--gold-2); border-bottom-color: var(--gold); }
.sub-tabs b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #b61f30; color: #fff; font: 600 11px var(--f-body); letter-spacing: 0; }
.sub-tabs b:empty { display: none; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: #b61f30; color: #fff; font: 600 12px var(--f-body); vertical-align: middle; }
.count-badge:empty { display: none; }
/* something needs an admin: the menu button pulses (Members when ID checks wait) */
@keyframes admin-alert { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 45, 66, 0); border-color: rgba(196, 147, 64, .35); } 50% { box-shadow: 0 0 16px 2px rgba(255, 45, 66, .6); border-color: #ff5a68; color: #fff; } }
.nav a.is-alert, .admin-tab.is-alert, .bottom-nav a.is-alert { animation: admin-alert 1.2s ease-in-out infinite; }
.nav a.is-alert::after { content: attr(data-alert); margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #b61f30; color: #fff; font: 600 11px/20px var(--f-body); text-align: center; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .nav a.is-alert, .admin-tab.is-alert, .bottom-nav a.is-alert { animation: none; outline: 2px solid #ff5a68; } }
.admin-tab {
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(196, 147, 64, .35); background: #16140f; color: var(--muted);
  font: 500 13px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
.admin-tab:hover { color: var(--text); border-color: var(--kit-gold, #c49340); }
.admin-tab.is-on { color: #1b1204; background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: var(--gold-2); }
.dash-attention { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dash-attention:empty { display: none; }
.dash-alert { padding: 9px 14px; border-radius: 10px; border: 1px solid rgba(232, 182, 74, .5); background: rgba(232, 182, 74, .12); color: var(--gold-2); font-weight: 600; text-decoration: none; }
.dash-alert.is-bad { border-color: rgba(255, 90, 104, .5); background: rgba(182, 31, 48, .15); color: #ff9aa4; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.dash-card { padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.dash-card .k { margin: 0; font: 500 12px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dash-big { font: 700 32px/1.1 var(--f-cond); color: var(--text); font-variant-numeric: tabular-nums; }
.dash-big:empty { display: none; }
.dash-big.is-gold { color: var(--gold-2); }
.dash-big.is-good { color: #6ee7a8; }
.dash-big.is-bad { color: #ff9aa4; }
.dash-rows { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin: 2px 0 0; font-size: 13px; }
.dash-rows dt { color: var(--muted); white-space: pre; }
.dash-rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dash-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.dash-board li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
.dash-board .rank { font: 600 12px var(--f-cond); color: var(--gold); text-align: center; }
.dash-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-board .v { color: var(--gold-2); font-variant-numeric: tabular-nums; font-size: 13px; }

/* Admin: page-by-page lists */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.pager button { min-width: 34px; }
.pager .of { font-variant-numeric: tabular-nums; }

/* Admin: banking */
.bank-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.bank-form { padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.bank-form h3 { margin: 0; font-size: 18px; }
.bank-form p { margin: 0; }
.bank-form label { display: grid; gap: 4px; font: 500 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bank-form input, .bank-form select { padding: 9px 12px; }
.bank-form select { background: #0c0c0f; color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; font: 15px var(--f-body); }
.bank-picks { list-style: none; margin: -4px 0 0; padding: 4px; display: grid; gap: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: #0c0c0f; max-height: 200px; overflow: auto; }
.bank-picks button { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border: 0; border-radius: 6px; background: none; color: var(--text); text-align: left; font-size: 14px; }
.bank-picks button:hover, .bank-picks button:focus-visible { background: #1d1a12; outline: none; }
.bank-picks small { color: var(--muted); }
.bank-picked { padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(196, 147, 64, .5); background: #16140f; font-size: 14px; }
.bank-picked b { color: var(--gold-2); }
.bank-history { list-style: none; margin: 0; padding: 8px 12px; display: grid; }
.bank-history li { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.bank-history li:last-child { border-bottom: 0; }
.bank-history time { color: var(--muted); }
.bank-history .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.bank-history .amt.in { color: #6ee7a8; }
.bank-history .amt.out { color: #f8d983; }
.bank-history small { color: var(--muted); }
@media (max-width: 860px) { .bank-history li { grid-template-columns: 1fr auto; } .bank-history time { grid-column: 1 / -1; } }

/* Admin: members */
.admin-members { padding: 14px 18px; display: grid; gap: 10px; }
.members-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.members-bar .pill b { margin-left: 4px; color: var(--gold-2); font-weight: 600; }
#member-search { width: 220px; padding: 8px 12px; }
.member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.member-list li { display: grid; grid-template-columns: minmax(150px, 1.3fr) 150px 1.2fr 110px 90px; gap: 4px 14px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.member-list .who b { font-family: var(--f-cond); letter-spacing: .05em; font-size: 15px; }
.member-list .who small, .member-list .contact, .member-list .dates { color: var(--muted); }
.member-list .who small { display: block; }
.member-list .bal { text-align: right; font-variant-numeric: tabular-nums; color: var(--gold-2); }
.m-status { justify-self: start; padding: 3px 9px; border-radius: 999px; font: 600 11px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; border: 1px solid; }
.m-status.is-active { color: #6ee7a8; border-color: rgba(110, 231, 168, .45); background: rgba(24, 138, 74, .12); }
.m-status.is-pending { color: #f8d983; border-color: rgba(232, 182, 74, .45); background: rgba(232, 182, 74, .1); }
.m-status.is-bad { color: #ff9aa4; border-color: rgba(255, 90, 104, .45); background: rgba(182, 31, 48, .12); }
.m-admin { margin-left: 6px; font: 600 10px var(--f-cond); letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }
@media (max-width: 860px) {
  #member-search { width: 100%; }
  .member-list li { grid-template-columns: 1fr auto; }
  .member-list .contact, .member-list .dates { grid-column: 1 / -1; }
}

/* Admin: ID checks to review */
.admin-reviews { padding: 14px 18px; display: grid; gap: 10px; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.review-list li { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.review-who b { font-family: var(--f-cond); letter-spacing: .06em; }
.review-who small { color: var(--muted); margin-left: 8px; }
.review-cmp { grid-column: 1; display: grid; grid-template-columns: auto 1fr 1fr; gap: 2px 14px; font-size: 13px; }
.review-cmp .k { font: 500 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.review-cmp .bad { color: #ff9aa4; font-weight: 600; }
.review-actions { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 8px; }
.request-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.request-body .k, .request-give .k { font: 500 11px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.request-ask { font: 700 18px var(--f-cond); color: var(--gold-2); }
.request-note { flex-basis: 100%; margin: 0; color: var(--text); font-style: italic; overflow-wrap: anywhere; }
.request-give { display: flex; align-items: center; gap: 8px; }
.request-give input.request-amount { width: 96px; flex: none; }
.chip-request { width: min(420px, calc(100% - 24px)); }
@media (max-width: 860px) { .review-list li { grid-template-columns: 1fr; } .review-actions { grid-column: 1; grid-row: auto; grid-auto-flow: column; } }

/* Admin: promo codes & referrals */
.admin-promo { padding: 16px 18px; display: grid; gap: 10px; }
.promo-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.promo-form label { display: grid; gap: 4px; font: 500 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.promo-form input { width: 200px; padding: 8px 10px; }
.promo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promo-cols .k { margin: 0 0 6px; font: 500 12px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.promo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.promo-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.promo-list li b { font-family: var(--f-cond); letter-spacing: .08em; color: var(--gold-2); }
.promo-list li .grow { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-list li.is-off { opacity: .5; }
@media (max-width: 860px) { .promo-cols { grid-template-columns: 1fr; } .promo-form input { width: 100%; } .promo-form label { flex: 1 1 100%; } }
.phone-links { text-align: center; font-size: 13px; color: var(--muted); }

/* ───────── table scenes ─────────
   A table with a scene uses the photo itself as the table. The scene box keeps the photo's shape
   (1600×900) and fits inside the stage; every position below is a % of that photo, measured from
   the chairs and felt in the pictures, and sizes use cqw so the whole table scales together.
   Narrow portrait stages can't fit the photo, so they keep the drawn table over a dim backdrop. */
.stage { container-type: size; }
.scene-box { position: absolute; inset: 0; }
.scene-img { display: none; position: absolute; inset: 0; background: #0b0a0d center / cover no-repeat; pointer-events: none; }

.stage.scene-backdrop .scene-img { display: block; inset: -12px; filter: brightness(.42) saturate(1.1) blur(1.5px); z-index: 0; }
.stage.scene-backdrop .lounge { display: none; }

.stage.scene-mode .scene-box {
  inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; container-type: size;
  --ds: clamp(24px, 3.4cqw, 64px);
}
.stage.scene-mode .scene-img {
  display: block; z-index: 0; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 24px 60px rgba(0, 0, 0, .75);
}
.stage.scene-mode .lounge, .stage.scene-mode .felt { display: none; }

/* the bank sits in the far chair; its plaque rests on the rail */
.stage.scene-mode .bank-char { top: 16.5%; width: 14cqw; height: 11.5cqw; }
.stage.scene-mode .bank-char.is-photo { top: 16.5%; width: 14.5cqw; height: 11.9cqw; }
.stage.scene-mode .bank-char.is-cam { top: 17%; width: 14cqw; height: 10.5cqw; }
.stage.scene-mode .bank-plaque,
.stage.scene-mode .bank-char.is-photo ~ .bank-plaque,
.stage.scene-mode .bank-char.is-cam ~ .bank-plaque { top: 33%; min-width: 13cqw; padding: .8cqw 1.6cqw .55cqw; gap: 0; }
.stage.scene-mode .bank-plaque .crown { width: 1.7cqw; height: 1.15cqw; top: -.75cqw; }
.stage.scene-mode .bank-label { font-size: clamp(10px, 1.25cqw, 20px); }
.stage.scene-mode .bank-name { font-size: clamp(8px, .8cqw, 13px); max-width: 12cqw; }
.stage.scene-mode .bank-amt { font-size: clamp(10px, 1.2cqw, 20px); }

/* the felt: pot and status up top, dice in the middle */
.stage.scene-mode .table-center,
.stage.scene-mode .bank-char.is-photo ~ .table-center,
.stage.scene-mode .bank-char.is-cam ~ .table-center { top: 49%; width: 34%; gap: .3cqw; }
.stage.scene-mode .pot { padding: .15cqw 1.6cqw; }
.stage.scene-mode .pot .k { font-size: clamp(8px, .7cqw, 11px); }
.stage.scene-mode .pot .v { font-size: clamp(15px, 2.1cqw, 34px); }
.stage.scene-mode .status { font-size: clamp(9px, .95cqw, 15px); }
.stage.scene-mode .clock { right: -4.5cqw; top: 2.2cqw; transform: scale(.9); }
.stage.scene-mode .dice-zone { left: 35%; right: 35%; top: 55%; bottom: 29%; }
.stage.scene-mode .roll-callout { top: 70%; font-size: clamp(16px, 2.2cqw, 34px); }

/* players sit in the photo's chairs: --y is where the character meets the rail */
.stage.scene-mode .seat { width: 13cqw; --ch: 9cqw; transform: translate(-50%, calc(-1 * var(--ch))); }
.stage.scene-mode .seat[data-seat="0"] { --x: 14%; --y: 83%; --bx: 9cqw; --by: -5cqw; }
.stage.scene-mode .seat[data-seat="1"] { --x: 8.8%; --y: 56%; --bx: 9cqw; --by: 0cqw; }
.stage.scene-mode .seat[data-seat="2"] { --x: 25.2%; --y: 40%; --bx: 6cqw; --by: 4.5cqw; }
.stage.scene-mode .seat[data-seat="3"] { --x: 74.8%; --y: 40%; --bx: -6cqw; --by: 4.5cqw; }
.stage.scene-mode .seat[data-seat="4"] { --x: 91.2%; --y: 56%; --bx: -9cqw; --by: 0cqw; }
.stage.scene-mode .seat[data-seat="5"] { --x: 86%; --y: 83%; --bx: -9cqw; --by: -5cqw; }
.stage.scene-mode .seat-char { width: 9cqw; height: 9cqw; margin-bottom: -1.6cqw; }
.stage.scene-mode .seat-char.is-photo { width: 11cqw; height: 9cqw; margin-bottom: -1.2cqw; }
.stage.scene-mode .seat-char.is-cam { width: 11cqw; height: 8.25cqw; margin-bottom: -.8cqw; }
.stage.scene-mode .seat.is-turn::before { width: 16cqw; height: 16cqw; top: -2cqw; }
.stage.scene-mode .plate { min-width: 10cqw; padding: .45cqw .9cqw .45cqw .75cqw; column-gap: .5cqw; }
.stage.scene-mode .plate .nm { font-size: clamp(9px, .95cqw, 14px); max-width: 8cqw; }
.stage.scene-mode .plate .v { font-size: clamp(10px, 1.15cqw, 17px); }
.stage.scene-mode .plate .dot { width: clamp(6px, .55cqw, 9px); height: clamp(6px, .55cqw, 9px); }
.stage.scene-mode .seat .sit-btn { width: 9cqw; padding: .75cqw 0; margin-top: var(--ch); font-size: clamp(8px, .8cqw, 13px); background: rgba(0, 0, 0, .55); }
.stage.scene-mode .seat-bet { top: calc(var(--ch) + 1cqw + var(--by)); }
.stage.scene-mode .chip-stack, .stage.scene-mode .chip-stack i { width: clamp(22px, 2.6cqw, 36px); height: clamp(22px, 2.6cqw, 36px); }
.stage.scene-mode .seat-bet .amt { font-size: clamp(9px, .8cqw, 13px); }
.stage.scene-mode .mini-dice b { width: clamp(11px, 1.05cqw, 17px); height: clamp(11px, 1.05cqw, 17px); font-size: clamp(7px, .7cqw, 11px); }
.stage.scene-mode .result { font-size: clamp(7px, .7cqw, 11px); padding: .25cqw .45cqw; }
.stage.scene-mode .seat-crown { width: 2cqw; height: 1.4cqw; }

/* sound panel */
.sound-pop { position: fixed; z-index: 70; width: 240px; padding: 14px 16px 12px; display: grid; gap: 12px; background: var(--panel-solid); }
.slider-row { display: grid; gap: 6px; }
.slider-row input { width: 100%; accent-color: var(--gold); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #d8d3c8; }
.check-row input { accent-color: var(--gold); width: 16px; height: 16px; }
.sound-pop .fine { font-size: 11px; }

/* admin */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.admin-card { overflow: hidden; display: grid; padding: 0; }
.admin-card.is-closed { opacity: .7; }
.admin-card-img { height: 120px; background: center 55% / cover no-repeat; position: relative; display: flex; gap: 6px; padding: 10px; align-items: flex-start; }
.admin-card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8, 8, 10, .7)); }
.status-pill { position: relative; z-index: 1; padding: 3px 8px; border-radius: 5px; font: 600 11px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; }
.status-pill.is-open { background: rgba(54, 210, 127, .18); color: #7ff0b0; border: 1px solid rgba(54, 210, 127, .5); }
.status-pill.is-closed { background: rgba(255, 45, 66, .18); color: #ff8a95; border: 1px solid rgba(255, 45, 66, .5); }
.status-pill.is-practice { background: rgba(185, 227, 176, .15); color: #b9e3b0; border: 1px solid rgba(185, 227, 176, .4); }
.admin-card-body { padding: 12px 16px 14px; display: grid; gap: 8px; }
.admin-card-body h3 { font-size: 18px; margin: 0; }
.admin-facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 14px; }
.admin-facts dt { color: var(--muted); font: 500 12px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; align-self: center; }
.admin-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.admin-actions { display: flex; gap: 8px; margin-top: 4px; }
.admin-sub { font-size: 18px; margin: 28px 0 10px; }
.admin-log { list-style: none; margin: 0; padding: 6px 14px; max-width: 720px; }
.admin-log li { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-log li:last-child { border-bottom: 0; }
.admin-log time { color: var(--dim); white-space: nowrap; font-size: 13px; }
.table-editor { width: min(560px, calc(100% - 24px)); text-align: left; max-height: calc(100dvh - 24px); overflow-y: auto; }
.table-editor h2 { margin-bottom: 10px; }
.table-editor .field { display: grid; gap: 6px; margin: 0 0 12px; border: 0; padding: 0; min-width: 0; }
.table-editor fieldset.field { display: block; }
.table-editor legend { padding: 0; margin-bottom: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 14px; }
.radio input { accent-color: var(--gold); }
.scene-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.scene-opt {
  position: relative; aspect-ratio: 16 / 9; border-radius: 8px; border: 2px solid transparent; padding: 0; overflow: hidden;
  background: center / cover no-repeat; box-shadow: 0 0 0 1px var(--line-2);
}
.scene-opt span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px; font: 600 10px var(--f-cond); letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .85));
}
.scene-opt.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px #000, 0 0 16px rgba(232, 182, 74, .45); }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* installable app */
.install-btn { margin-top: 12px; }
.install-btn svg { width: 18px; height: 18px; }
.install-icon { border-radius: 16px; box-shadow: 0 0 0 1px rgba(232, 182, 74, .5), 0 0 20px rgba(255, 45, 66, .3); margin-bottom: 8px; }
.install-steps { text-align: left; display: grid; gap: 10px; padding-left: 20px; margin: 14px 0 4px; color: #d8d3c8; }
.install-steps svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--gold); }
/* launched from the home screen: keep the top bar clear of the phone's status bar / notch */
@media (display-mode: standalone) {
  .topbar { padding-top: max(8px, env(safe-area-inset-top)); }
  .view-auth { padding-top: max(24px, env(safe-area-inset-top)); }
}

/* celebrations */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 65; pointer-events: none; }
.shockwave {
  position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; z-index: 6; pointer-events: none;
  border: 3px solid var(--ring); box-shadow: 0 0 20px var(--ring), inset 0 0 12px var(--ring);
  animation: ring .9s cubic-bezier(.1, .7, .3, 1) forwards;
}
@keyframes ring { from { transform: scale(1, .42); opacity: 1; } to { transform: scale(22, 9.2); opacity: 0; border-width: 1px; } }
/* gold pool of light on the felt under the dice after a roll */
.felt-glow {
  position: absolute; left: 50%; top: 50%; width: 70%; height: 90%; transform: translate(-50%, -50%) scale(.6); opacity: 0;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(255, 236, 180, .38), rgba(232, 182, 74, .16) 55%, transparent);
  transition: opacity .5s, transform .6s cubic-bezier(.2, .9, .3, 1);
}
.felt-glow.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.felt-glow.is-big { background: radial-gradient(closest-side, rgba(255, 244, 200, .7), rgba(232, 182, 74, .32) 50%, transparent); transform: translate(-50%, -50%) scale(1.35); }
.felt-glow.is-red { background: radial-gradient(closest-side, rgba(255, 90, 100, .35), rgba(180, 20, 40, .15) 55%, transparent); }
/* winner's nameplate stays lit in gold through the payout */
.seat.is-winner .plate {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold), 0 0 26px rgba(248, 217, 131, .65), inset 0 0 14px rgba(248, 217, 131, .2);
  background: linear-gradient(180deg, rgba(60, 44, 12, .92), rgba(20, 16, 8, .92));
}
.seat.is-winner .plate .v { color: var(--gold-2); }
.seat .seat-crown { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 30px; height: 21px; z-index: 3; animation: crown-bob 1s ease-in-out infinite alternate; filter: drop-shadow(0 0 8px rgba(248, 217, 131, .8)); }
@keyframes crown-bob { to { transform: translateX(-50%) translateY(-5px); } }
.flying-crown {
  position: fixed; left: 0; top: 0; z-index: 66; width: 44px; height: 30px; pointer-events: none;
  background: linear-gradient(180deg, #fff4c8, var(--gold-2) 30%, var(--gold) 60%, var(--gold-deep));
  clip-path: polygon(0 100%, 0 25%, 25% 60%, 50% 0, 75% 60%, 100% 25%, 100% 100%);
  filter: drop-shadow(0 0 12px rgba(248, 217, 131, .9));
}
.flying-crown.is-landed { animation: crown-land .9s ease-out forwards; }
@keyframes crown-land { 30% { opacity: 1; } 100% { opacity: 0; } }
.bank-plaque.is-dim { filter: brightness(.55) saturate(.6); transition: filter .4s; }
.bank-plaque.is-crowned { animation: crowned 1.2s ease-out; }
@keyframes crowned { 0% { box-shadow: 0 0 0 1px #000, 0 0 90px rgba(248, 217, 131, 1); transform: translateX(-50%) scale(1.1); } 100% { transform: translateX(-50%) scale(1); } }
.ghost-char { position: fixed; z-index: 66; pointer-events: none; transition: transform .9s cubic-bezier(.5, 0, .2, 1), opacity .9s; }
.screen-flash { position: fixed; inset: 0; z-index: 64; pointer-events: none; animation: flash .7s ease-out forwards; }
.screen-flash.is-gold { background: radial-gradient(circle at 50% 55%, rgba(255, 241, 194, .75), rgba(232, 182, 74, .25) 45%, transparent 75%); }
.screen-flash.is-red { background: radial-gradient(circle at 50% 55%, rgba(255, 45, 66, .45), rgba(110, 15, 26, .25) 45%, transparent 75%); }
.screen-flash.is-silver { background: radial-gradient(circle at 50% 55%, rgba(230, 238, 255, .5), transparent 70%); }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.stage.is-shaking-hard { animation: tshake .6s cubic-bezier(.36, .07, .19, .97); }
.stage.is-shaking-soft { animation: tshake-soft .4s ease-out; }
@keyframes tshake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 3px) rotate(-.4deg); } 40%, 60% { transform: translate(7px, -3px) rotate(.4deg); } }
@keyframes tshake-soft { 25% { transform: translateY(3px); } 50% { transform: translateY(-2px); } 75% { transform: translateY(1px); } }
.crack {
  position: absolute; z-index: 6; pointer-events: none; width: 220px; height: 140px; transform: translate(-50%, -50%);
  animation: crack 1.4s ease-out forwards;
}
.crack path { fill: none; stroke: #ff2d42; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px #ff2d42); stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw .25s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes crack { 70% { opacity: 1; } 100% { opacity: 0; } }

/* controls */
.bank-meter { padding: 12px 16px; display: grid; gap: 8px; }
.bm-head { display: flex; justify-content: space-between; align-items: baseline; }
.bm-head .v { font-size: 17px; }
.bm-bar { height: 8px; border-radius: 5px; background: #0a0a0c; border: 1px solid var(--line-2); overflow: hidden; }
.bm-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); transition: width .4s; }
.bet-area { display: grid; justify-items: center; gap: 10px; }
.bet-stepper { display: flex; align-items: center; gap: 14px; padding: 6px 8px; text-align: center; }
.bet-stepper .v { font-size: 26px; min-width: 110px; }
.step {
  width: 36px; height: 36px; border-radius: 7px; border: 1px solid var(--line-2); background: #0d0d10;
  font-size: 22px; line-height: 1;
}
.step:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.chip-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.action-row { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 12px; width: min(620px, 100%); align-items: center; }
.btn-side { height: 58px; flex-direction: column; gap: 0; }
.btn-side small { font: 500 12px var(--f-cond); color: var(--muted); letter-spacing: .06em; }
.btn-roll {
  height: 76px; flex-direction: column; gap: 0; border-radius: 12px; color: #1b1204;
  border: 2px solid var(--gold-2);
  background: linear-gradient(180deg, #ffe49c, var(--gold) 45%, #b57f1e);
  box-shadow: 0 0 0 2px #000, 0 0 30px rgba(232, 182, 74, .35), inset 0 2px 0 rgba(255, 255, 255, .5);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.btn-roll { min-width: 0; padding: 6px 10px; }
.btn-roll .big, .btn-roll .small { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-roll .big { font: 700 28px/1 var(--f-cond); letter-spacing: .06em; }
.btn-roll .small { font: 600 12px var(--f-cond); letter-spacing: .14em; opacity: .8; margin-top: 3px; }
.btn-roll.is-go { animation: pulse 1.1s ease-in-out infinite; }
.btn-roll:disabled { filter: grayscale(.6) brightness(.55); box-shadow: 0 0 0 2px #000; }
@keyframes pulse { 50% { box-shadow: 0 0 0 2px #000, 0 0 50px rgba(248, 217, 131, .7), inset 0 2px 0 rgba(255, 255, 255, .5); transform: scale(1.02); } }
.rule-mini { display: grid; justify-items: center; padding: 14px 10px; text-align: center; gap: 2px; }
.rule-mini span, .rule-mini small { font: 500 12px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rule-mini b { font: 600 16px var(--f-cond); letter-spacing: .08em; text-transform: uppercase; }

/* side panel */
.side-box { display: flex; flex-direction: column; min-height: 0; }
.chat-box { overflow: hidden; }
.side-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-list, .history-list { list-style: none; margin: 0; padding: 10px 14px; overflow-y: auto; flex: 1; min-height: 120px; display: grid; align-content: start; gap: 10px; }
.chat-list li { font-size: 14px; overflow-wrap: anywhere; }
.chat-list .who { font-weight: 600; margin-right: 6px; }
.chat-list time { font-size: 11px; color: var(--dim); }
.chat-list .txt { display: block; color: #e6e1d6; }
.chat-list li.notice { font: 500 12px var(--f-cond); letter-spacing: .06em; color: var(--gold); text-transform: uppercase; }
.emote-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 6px 10px; border-top: 1px solid var(--line); }
.emote-row button { border: 0; background: #1b1b1f; border-radius: 6px; padding: 5px 0; font-size: 17px; line-height: 1; }
.emote-row button:hover { background: #26262c; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { padding: 9px 12px; font-size: 14px; }
.chat-form button { border: 0; background: transparent; color: var(--muted); padding: 0 6px; }
.chat-form button:hover { color: var(--gold); }
.rounds-box { padding: 12px 14px; overflow-y: auto; }
.rounds-box h3 { margin: 0 0 8px; }
.rounds { width: 100%; border-collapse: collapse; font-size: 13px; }
.rounds th { text-align: left; font: 500 10px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 4px 0; border-bottom: 1px solid var(--line); }
.rounds td { padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); white-space: nowrap; }
.rounds td:first-child { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.rounds .num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: #ff7482; }
.history-list li { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.history-list .row { display: flex; justify-content: space-between; gap: 8px; }
.history-list .res { color: var(--muted); }
.history-list button { justify-self: start; }
.drawer-close { position: absolute; right: 10px; top: 8px; z-index: 2; background: none; border: 0; font-size: 28px; color: var(--muted); }

/* effects */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: visible; }
.fly-chip { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; transition: transform .75s cubic-bezier(.3, .7, .2, 1), opacity .3s .6s; }
.fly-chip i { width: 26px; height: 26px; position: static; display: block; }
.emote-pop {
  position: absolute; font-size: 34px; transform: translate(-50%, -50%);
  animation: emote 1.8s ease-out forwards; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6));
}
@keyframes emote { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }

.banner {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.6); z-index: 50; pointer-events: none;
  font: 44px/1 var(--f-brush); text-transform: uppercase; color: var(--gold-2); text-align: center; white-space: nowrap;
  text-shadow: 3px 3px 0 #000, 0 0 30px rgba(232, 182, 74, .6); opacity: 0;
}
.banner small { display: block; font: 600 20px var(--f-cond); letter-spacing: .12em; color: var(--text); margin-top: 8px; }
.banner.is-red { color: #ff5566; text-shadow: 3px 3px 0 #000, 0 0 30px rgba(255, 45, 66, .6); }
.banner.is-on { animation: banner 2.2s cubic-bezier(.2, .9, .3, 1.2) forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-8deg); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(-4deg); } 25% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1) rotate(-4deg); } }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(420px, calc(100% - 32px)); }
.toast { padding: 12px 16px; border-radius: 8px; background: #1d1d22; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); font-size: 14px; animation: toast-in .2s ease-out; }
.toast.is-error { border-color: #7a1f2a; background: #2a1116; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.modal { width: min(420px, calc(100% - 32px)); padding: 26px 24px 20px; color: var(--text); text-align: center; background: var(--panel-solid); }
.modal::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.modal .crown-lg { width: 44px; height: 30px; margin-bottom: 6px; }
.modal h2 { color: var(--gold-2); }
.modal p { margin: 8px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.stake { display: grid; gap: 8px; margin: 18px 0 6px; }
.stake input { accent-color: var(--gold); width: 100%; }
.stake output { font: 600 30px var(--f-cond); color: var(--gold); }
#fair-body { text-align: left; font-size: 13px; display: grid; gap: 10px; margin-top: 12px; }
#fair-body code { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; background: #0b0b0d; padding: 6px 8px; border-radius: 6px; }
#fair-body .ok { color: var(--green); font-weight: 600; }
#fair-body .bad { color: #ff7482; font-weight: 600; }

/* hold-to-throw power bar on the roll button */
.btn-roll { position: relative; overflow: hidden; }
.power { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(0, 0, 0, .28); opacity: 0; transition: opacity .15s; }
.power i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #fff1c2, #f8d983 40%, #ff7a3d 75%, #ff2d42); box-shadow: 0 0 10px rgba(255, 90, 60, .8); }
.btn-roll.is-charging .power { opacity: 1; }
.btn-roll.is-charging { transform: scale(.98); }
.btn-roll.is-charging.is-full { animation: overcharge .12s linear infinite; }
@keyframes overcharge { 50% { transform: translateX(1px) scale(.98); } }

/* the 4-5-6 banner */
.banner.is-mega {
  font-size: 110px; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff6d6 10%, #f8d983 40%, #c8962f 70%, #fff1c2 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(4px 4px 0 #000) drop-shadow(0 0 30px rgba(248, 217, 131, .7));
}
.banner.is-mega small { font: 54px/1 var(--f-brush); color: #ff2d42; -webkit-text-fill-color: #ff2d42; filter: drop-shadow(0 0 16px rgba(255, 45, 66, .8)); letter-spacing: .04em; margin-top: 4px; }
.banner.is-mega.is-on { animation: mega 3.2s cubic-bezier(.2, 1.3, .3, 1) forwards; }
@keyframes mega {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(3) rotate(-14deg); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(.92) rotate(-5deg); }
  18% { transform: translate(-50%, -50%) scale(1.06) rotate(-5deg); }
  24%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-5deg); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.04) rotate(-5deg); }
}

/* practice money: board-game style bills instead of chips */
.bill {
  --c: #f4f1ea; --ink: #2d4a2b;
  width: 70px; height: 38px; border-radius: 3px; border: 0; position: relative;
  background: var(--c); color: var(--ink); font: 700 15px var(--f-cond); letter-spacing: .02em;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 5px 12px rgba(0, 0, 0, .5);
  transition: transform .12s, box-shadow .15s;
}
.bill::before { content: ''; position: absolute; inset: 4px; border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent); border-radius: 2px; }
.bill::after { content: attr(data-corner); position: absolute; left: 6px; top: 4px; font-size: 8px; opacity: .7; }
.bill:hover:not(:disabled) { transform: translateY(-3px) rotate(-2deg); }
.bill.is-hot { box-shadow: 0 0 0 2px var(--gold-2), 0 0 18px rgba(248, 217, 131, .6), 0 5px 12px rgba(0, 0, 0, .5); }
.bill:disabled { filter: grayscale(.7) brightness(.55); transform: none; }
.bill-10 { --c: #f6e27a; --ink: #5b4a0a; }
.bill-20 { --c: #b9e3b0; --ink: #1f4a22; }
.bill-50 { --c: #a9cdf0; --ink: #173d63; }
.bill-100 { --c: #f3d9a4; --ink: #5a3d0e; }
.bill-500 { --c: #f6b27a; --ink: #6a2f06; }
.bill-max { --c: #f7c6d0; --ink: #6b1a2c; font-size: 13px; }
.bill-stack { position: relative; width: 38px; height: 26px; }
.bill-stack i { position: absolute; left: 0; width: 38px; height: 20px; border-radius: 2px; background: var(--c, #b9e3b0); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 4px rgba(0, 0, 0, .45); }
.bill-stack i::after { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(0, 0, 0, .25); }
.practice-note { font: 600 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: #9fe0b0; }
.practice-note.wallet-note { color: var(--muted); }

.table-card.is-practice .mini { background: radial-gradient(60% 70% at 50% 60%, #1f4a33, #0f2419 70%); }
.table-card.is-practice .mini::before { border-color: #0e1f16; }
.table-card.is-practice .rake-tag { color: #b9e3b0; background: rgba(54, 210, 127, .1); border-color: rgba(54, 210, 127, .35); }

/* character creator */
.char-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.char-stage { position: sticky; top: 12px; display: grid; justify-items: center; padding: 20px 18px 18px; overflow: hidden; }
.char-spot {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 45% at 50% 38%, rgba(255, 45, 66, .22), transparent 70%), url(/img/skyline.svg) center 30% / cover no-repeat;
  opacity: .55; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 75%); mask-image: linear-gradient(180deg, #000 30%, transparent 75%);
}
.char-preview { position: relative; width: 260px; height: 260px; margin-bottom: -46px; }
.char-preview > * { width: 100%; height: 100%; display: block; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .7)); }
.char-preview.is-pop > * { animation: hop .6s cubic-bezier(.3, 1.6, .5, 1); }
.char-plate { position: relative; min-width: 190px; margin-bottom: 16px; }
.char-actions { position: relative; display: flex; gap: 10px; }
.char-parts { display: grid; gap: 12px; }
.part { padding: 12px 14px; }
.part h3 { margin: 0 0 10px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  border: 1px solid var(--line-2); background: #0d0d10; border-radius: 10px; padding: 3px; display: grid; justify-items: center; gap: 2px;
  font: 500 10px var(--f-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transition: border-color .15s, transform .1s;
}
.opt svg { width: 58px; height: 58px; display: block; }
.opt span { padding: 0 4px 3px; }
.opt:hover { border-color: #6a6a74; }
.opt.is-on { border-color: var(--gold); color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(232, 182, 74, .25); }
.char-modes { margin-bottom: 2px; }
.filter-row { display: flex; gap: 6px; margin-bottom: 12px; }
.pill {
  border: 1px solid var(--line-2); background: #0d0d10; border-radius: 999px; padding: 6px 14px;
  font: 500 12px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.pill.is-on { border-color: var(--gold); color: var(--gold-2); }
.portrait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.pick {
  position: relative; padding: 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #0d0d10;
  aspect-ratio: 360 / 295; transition: transform .12s, border-color .15s, box-shadow .15s;
}
.pick { background: radial-gradient(120% 90% at 50% 20%, #3a1419, #140d10 70%); }
.pick img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; display: block; filter: saturate(.9) brightness(.85); transition: filter .15s; }
.pick:hover img { filter: none; }
.pick:hover { transform: translateY(-2px); border-color: #6a6a74; }
.pick.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(232, 182, 74, .35); }
.pick.is-on img { filter: none; }
.pick.is-on::after {
  content: ''; position: absolute; right: 7px; top: 7px; width: 22px; height: 15px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  clip-path: polygon(0 100%, 0 25%, 25% 60%, 50% 0, 75% 60%, 100% 25%, 100% 100%);
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, .8));
}
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line-2); padding: 0; }
/* Build your own: base faces and text choices */
.base-opt { padding: 0; border-radius: 50%; overflow: hidden; width: 64px; height: 64px; }
.base-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip-opt {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #121216; color: var(--text);
  font: 500 13px var(--f-cond); letter-spacing: .06em; text-transform: uppercase;
}
.chip-opt:hover { border-color: #6a6a74; }
.chip-opt.is-on { border-color: var(--gold); color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold), 0 0 12px rgba(232, 182, 74, .25); }
.portrait.is-built:not([src]) { visibility: hidden; } /* until its layers are composed */
.swatch.is-on { border-color: var(--gold-2); box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--gold); }
.player-card .mini-char { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 30%, #2a1a1d, #0c0a0d); border: 1.5px solid var(--line-2); flex: none; }
.player-card .mini-char svg { width: 100%; height: 100%; display: block; transform: translateY(6%) scale(1.25); }
.leaderboard .mini-char { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: #140f12; border: 1px solid var(--line-2); flex: none; }
.leaderboard .mini-char svg { width: 100%; height: 100%; transform: translateY(6%) scale(1.25); }

/* ───────── laptop ───────── */
@media (max-width: 1280px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .sidenav { padding: 10px 8px; }
  .sidenav .logo-img { display: none; }
  .sidenav .logo-icon { display: block; }
  .sidenav .logo { padding: 14px 0 0; }
  .nav a { justify-content: center; padding: 12px 0; font-size: 0; gap: 0; }
  .sidenav-foot { display: none; }
  .topbar .topbar-signout { display: inline-flex; }
  .table-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .controls { grid-template-columns: minmax(0, 1fr); }
  .controls .bank-meter, .controls .rule-mini { display: none; }
  .seat { width: 136px; }
}

/* ───────── mid-size desktops: give the bet controls the full width ───────── */
@media (max-width: 1500px) and (min-width: 861px) {
  .controls { grid-template-columns: minmax(0, 1fr); }
  .controls .bank-meter, .controls .rule-mini { display: none; }
}

/* ───────── small desktops / landscape tablets: chat becomes a slide-out drawer ───────── */
@media (max-width: 1100px) and (min-width: 861px) {
  .table-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "controls"; }
  .side-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 90vw); z-index: 40; padding: 12px;
    background: rgba(8, 8, 10, .97); border-left: 1px solid var(--line-2);
    transform: translateX(105%); transition: transform .25s ease; grid-template-rows: minmax(0, 1fr) 210px;
  }
  .side-panel.is-open { transform: none; box-shadow: -20px 0 60px rgba(0, 0, 0, .8); }
  .side-panel .chat-box { padding-top: 26px; }
  #panel-btn, .drawer-close { display: grid !important; }
}

/* ───────── short screens (laptops at 720–800px tall) ───────── */
@media (max-height: 820px) and (min-width: 861px) {
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .bet-area { gap: 6px; }
  .bet-stepper { padding: 3px 6px; }
  .bet-stepper .v { font-size: 22px; }
  .chip { width: 58px; height: 58px; }
  .bill { width: 60px; height: 34px; }
  .btn-roll { height: 64px; }
  .btn-roll .big { font-size: 24px; }
  .btn-side { height: 52px; }
  .seat-char { width: 96px; height: 96px; margin-bottom: -24px; }
  .seat-char.is-photo { width: 120px; height: 98px; margin-bottom: -12px; }
  .seat-char.is-cam { width: 116px; height: 87px; margin-bottom: -8px; }
  .bank-char.is-cam { width: 176px; height: 132px; }
  .bank-char.is-cam ~ .bank-plaque { top: 100px; }
  .bank-char.is-photo { width: 180px; height: 148px; top: -6px; }
  .bank-char.is-photo ~ .bank-plaque { top: 108px; }
  .bank-char.is-photo ~ .table-center { top: max(50%, 212px); }
  .bank-char { width: 150px; height: 150px; top: -34px; }
  .bank-plaque { top: 84px; }
  .pot .v { font-size: 26px; }
}

/* ───────── tablet & phone ───────── */
@media (max-width: 860px) {
  :root { --ds: 44px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidenav { display: none; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(10, 10, 12, .96); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a { flex: 1; text-align: center; padding: 14px 0; color: var(--muted); text-decoration: none; font: 500 13px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; }
  .bottom-nav a.is-active { color: var(--gold); box-shadow: inset 0 2px 0 var(--gold); }
  .in-table .bottom-nav { display: none; }
  .view-lobby, .view-leaderboard, .view-rules { padding-bottom: 70px; }
  .hide-sm { display: none !important; }
  .show-sm { display: grid !important; }
  span.show-sm { display: inline !important; }

  .topbar { padding: 8px 10px; gap: 6px; }
  .player-card { padding: 4px 6px; gap: 8px; }
  .player-card { flex: 1 1 auto; }
  .view-table .player-card .avatar, .view-table .player-card .mini-char { display: none; }
  .view-table .player-card { min-width: 92px; }
  .view-table .practice-note { display: none; }
  .player-card .avatar { width: 34px; height: 34px; font-size: 14px; }
  .player-card .who { flex: 1; min-width: 0; }
  .player-card .name { font-size: 12px; max-width: 90px; }
  .stakes, .icon-group, #leave-btn { flex: none; }
  .player-card .v { font-size: 16px; }
  .topup { width: 30px; height: 30px; font-size: 18px; margin-left: 0; }
  .stakes > div { padding: 4px 10px; }
  .stakes .v { font-size: 15px; white-space: nowrap; }
  .stakes .k { font-size: 9px; white-space: nowrap; }

  .icon-btn { width: 38px; height: 38px; }
  #leave-btn { padding: 8px 12px; font-size: 13px; }

  .view-table { min-height: 0; }
  .table-layout {
    padding: 0 10px calc(10px + env(safe-area-inset-bottom)); gap: 8px;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage" "controls";
  }
  .stage { min-height: 420px; }
  .lounge { bottom: 55%; }
  .felt { inset: 19% 13% 2% 13%; }
  .rail { inset: -10px; }
  .felt-text { display: none; }
  /* Phones (owner): no drawn table — the scene photo's own table is the table. Shown clearer than the
     blurred desktop backdrop, with a soft vignette so seats and text stay readable. */
  .stage.scene-backdrop .felt { display: none; }
  /* enlarged and pinned to the top so the photo's table top sits under the dice */
  .stage.scene-backdrop .scene-img { inset: 0; filter: brightness(.68) saturate(1.1); background-size: auto 136%; background-position: center top; border-radius: 14px; }
  .stage.scene-backdrop::after {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 14px;
    background: radial-gradient(120% 75% at 50% 55%, transparent 40%, rgba(0, 0, 0, .55));
  }
  .bank-char { width: 112px; height: 112px; top: -4px; }
  .bank-plaque { top: 80px; min-width: 150px; padding: 9px 16px 6px; }
  .bank-label { font-size: 15px; }
  .bank-amt { font-size: 16px; }
  .table-center { width: 64%; top: max(36%, 178px); gap: 3px; }
  .pot { padding: 2px 16px; }
  .pot .v { font-size: 24px; }
  .status { font-size: 12px; }
  .clock { right: auto; left: 50%; top: auto; bottom: -40px; transform: translateX(-50%) scale(.85); }
  .dice-zone { left: 27%; right: 27%; top: 50%; bottom: 12%; }
  .roll-callout { top: 70%; font-size: 24px; }

  .seat { width: 98px; transform: translate(-50%, -60%); }
  .seat-char { width: 66px; height: 66px; margin-bottom: -16px; }
  .seat-char.is-photo { width: 88px; height: 72px; margin-bottom: -8px; }
  .seat-char.is-cam { width: 86px; height: 64px; margin-bottom: -6px; }
  .bank-char.is-cam { width: 128px; height: 96px; top: -2px; }
  .bank-char.is-cam ~ .bank-plaque { top: 78px; }
  .bank-char.is-photo { width: 132px; height: 108px; top: -4px; }
  .bank-char.is-photo ~ .bank-plaque { top: 78px; }
  .bank-char.is-photo ~ .table-center { top: max(37%, 190px); }
  .char-preview.is-photo { width: 250px; height: 205px; margin-bottom: -32px; }
  .char-preview.is-full { width: 240px; height: 320px; margin-bottom: -24px; }
  .seat.is-turn::before { width: 120px; height: 120px; top: -10px; }
  .plate { min-width: 0; width: 96px; padding: 4px 8px; column-gap: 5px; }
  .plate .nm { font-size: 12px; max-width: 66px; }
  .plate .v { font-size: 14px; }
  .plate .dot { width: 7px; height: 7px; }
  .seat .sit-btn { width: 84px; padding: 9px 0; margin-top: 30px; font-size: 11px; }
  .seat[data-seat="0"] { --x: 12%; --y: 84%; --bx: 56px; --by: -10px; }
  .seat[data-seat="1"] { --x: 12%; --y: 60%; --bx: 58px; --by: 0px; }
  .seat[data-seat="2"] { --x: 12%; --y: 36%; --bx: 58px; --by: 10px; }
  .seat[data-seat="3"] { --x: 88%; --y: 36%; --bx: -58px; --by: 10px; }
  .seat[data-seat="4"] { --x: 88%; --y: 60%; --bx: -58px; --by: 0px; }
  .seat[data-seat="5"] { --x: 88%; --y: 84%; --bx: -56px; --by: -10px; }
  .chip-stack, .chip-stack i { width: 22px; height: 22px; }
  .bill-stack, .bill-stack i { width: 30px; }
  .seat-bet .amt { font-size: 11px; }
  .mini-dice b { width: 14px; height: 14px; font-size: 9px; }
  .result { font-size: 9px; padding: 3px 5px; }
  .bill { width: 52px; height: 32px; font-size: 12px; }
  .banner.is-mega { font-size: 64px; }
  .banner.is-mega small { font-size: 32px; }

  .char-layout { grid-template-columns: minmax(0, 1fr); }
  .char-stage { position: relative; top: 0; }
  .char-preview { width: 200px; height: 200px; margin-bottom: -36px; }
  .opt svg { width: 50px; height: 50px; }
  .view-character { padding-bottom: 70px; }

  .controls { gap: 8px; }
  .bet-area { gap: 8px; }
  .bet-stepper { gap: 8px; padding: 4px 6px; }
  .bet-stepper .v { font-size: 20px; min-width: 80px; }
  .chip-row { gap: 8px; flex-wrap: nowrap; }
  .chip { width: 54px; height: 54px; }
  .action-row { gap: 8px; }
  .btn-side { height: 52px; padding: 6px; font-size: 13px; }
  .btn-roll { height: 62px; }
  .btn-roll .big { font-size: 22px; }
  .btn-roll .small { font-size: 10px; }

  .side-panel {
    position: fixed; inset: auto 0 0 0; height: 78dvh; z-index: 40; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(8, 8, 10, .97); border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0;
    transform: translateY(105%); transition: transform .25s ease; grid-template-rows: minmax(0, 1fr) 190px;
  }
  .side-panel.is-open { transform: none; box-shadow: 0 -20px 60px rgba(0, 0, 0, .8); }
  .side-panel .chat-box { padding-top: 26px; }

  .banner { font-size: 32px; }
  .banner small { font-size: 15px; }
  .tag { font-size: 22px; }
}

@media (max-width: 400px) {
  .chip { width: 50px; height: 50px; }
  .chip-row { gap: 6px; }
}

/* phones: keep stakes + rake, drop min bank from the top bar; very narrow phones drop rake too */
@media (max-width: 860px) {
  .stakes > div:nth-child(2) { display: none; }
}
@media (max-width: 430px) {
  .stakes > div:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ═════════════════════════ UI kit skin ═════════════════════════
   The owner's HeadCrack UI kit (buttons, utility controls, frames). Kept as one block at the end
   so it wins over the base styles above; it changes looks only, never sizes or layout.
   Plates: public/img/ui/btn-{gold,red,dark}-{normal,hover,pressed,disabled}.webp, 9-sliced so the
   bevelled corners never stretch (slice 64 of the 768×256 art; half of that is transparent margin,
   hence the outset). Frames are the kit's frame recreated in CSS so text stays live. */

:root { --kit-gold: #c49340; --kit-fill: rgba(16, 17, 20, .94); --kit-inner: #35302a; }

/* frames */
.panel {
  background: var(--kit-fill); border: 1px solid var(--kit-gold); border-radius: 12px;
  box-shadow: inset 0 0 0 1px #101114, inset 0 0 0 2px var(--kit-inner), 0 10px 30px rgba(0, 0, 0, .45);
}

/* button plates */
.btn-gold, .btn-red, .btn-dark, .btn-roll {
  border: 0 solid transparent; border-radius: 0; box-shadow: none; background: none;
  border-image: var(--plate) 64 fill / 18px / 9px stretch;
}
.btn-xs.btn-gold, .btn-xs.btn-red, .btn-xs.btn-dark { border-image-width: 10px; border-image-outset: 5px; }
.btn-gold, .btn-roll { --plate: url(/img/ui/btn-gold-normal.webp); color: #1b1204; }
.btn-red { --plate: url(/img/ui/btn-red-normal.webp); color: #fff3f0; }
.btn-dark { --plate: url(/img/ui/btn-dark-normal.webp); color: #fff7e6; }
.btn-gold:hover:not(:disabled), .btn-roll:hover:not(:disabled) { --plate: url(/img/ui/btn-gold-hover.webp); filter: none; }
.btn-red:hover:not(:disabled) { --plate: url(/img/ui/btn-red-hover.webp); filter: none; }
.btn-dark:hover:not(:disabled) { --plate: url(/img/ui/btn-dark-hover.webp); }
.btn-gold:active:not(:disabled), .btn-roll:active:not(:disabled), .btn-roll.is-charging { --plate: url(/img/ui/btn-gold-pressed.webp); }
.btn-red:active:not(:disabled) { --plate: url(/img/ui/btn-red-pressed.webp); }
.btn-dark:active:not(:disabled) { --plate: url(/img/ui/btn-dark-pressed.webp); }
/* the kit's disabled plates are all the same dark grey, so disabled text is a light, muted tone */
.btn-gold:disabled, .btn-roll:disabled { --plate: url(/img/ui/btn-gold-disabled.webp); opacity: 1; filter: none; box-shadow: none; color: rgba(232, 196, 120, .6); }
.btn-red:disabled { --plate: url(/img/ui/btn-red-disabled.webp); opacity: 1; color: rgba(255, 247, 230, .5); }
.btn-dark:disabled { --plate: url(/img/ui/btn-dark-disabled.webp); opacity: 1; color: rgba(255, 247, 230, .5); }
.btn-dark small, .btn-side small { color: inherit; opacity: .75; }
.btn-roll.is-go { animation: kit-go 1.1s ease-in-out infinite; }
@keyframes kit-go { 50% { filter: drop-shadow(0 0 16px rgba(248, 217, 131, .75)); transform: scale(1.02); } }

/* utility controls: the kit's square buttons, one image per state (icon is baked in) */
[data-sound-toggle], #mic-btn, #cam-btn, #fullscreen-btn, #bet-minus, #bet-plus,
.topup-add, .chat-form button {
  border: 0; border-radius: 0; box-shadow: none; color: transparent; font-size: 0;
  background: var(--u) center / 133% no-repeat;
}
:is([data-sound-toggle], #mic-btn, #cam-btn, #fullscreen-btn, #bet-minus, #bet-plus, .topup-add, .chat-form button) > svg { display: none; }
[data-sound-toggle] { --u: url(/img/ui/u-audio-on-normal.webp); --uh: url(/img/ui/u-audio-on-hover.webp); --up: url(/img/ui/u-audio-on-pressed.webp); }
[data-sound-toggle].is-quiet { --u: url(/img/ui/u-audio-muted-normal.webp); --uh: url(/img/ui/u-audio-muted-hover.webp); --up: url(/img/ui/u-audio-muted-pressed.webp); }
#mic-btn { --u: url(/img/ui/u-mic-off-normal.webp); --uh: url(/img/ui/u-mic-off-hover.webp); --up: url(/img/ui/u-mic-off-pressed.webp); }
#mic-btn.is-on { --u: url(/img/ui/u-mic-on-normal.webp); --uh: url(/img/ui/u-mic-on-hover.webp); --up: url(/img/ui/u-mic-on-pressed.webp); box-shadow: none; }
#cam-btn { --u: url(/img/ui/u-camera-off-normal.webp); --uh: url(/img/ui/u-camera-off-hover.webp); --up: url(/img/ui/u-camera-off-pressed.webp); }
#cam-btn.is-on { --u: url(/img/ui/u-camera-on-normal.webp); --uh: url(/img/ui/u-camera-on-hover.webp); --up: url(/img/ui/u-camera-on-pressed.webp); box-shadow: none; }
#fullscreen-btn { --u: url(/img/ui/u-fullscreen-normal.webp); --uh: url(/img/ui/u-fullscreen-hover.webp); --up: url(/img/ui/u-fullscreen-pressed.webp); }
#bet-minus { --u: url(/img/ui/u-bet-minus-normal.webp); --uh: url(/img/ui/u-bet-minus-hover.webp); --up: url(/img/ui/u-bet-minus-pressed.webp); }
#bet-plus { --u: url(/img/ui/u-bet-plus-normal.webp); --uh: url(/img/ui/u-bet-plus-hover.webp); --up: url(/img/ui/u-bet-plus-pressed.webp); }
.topup-add { --u: url(/img/ui/u-add-funds-normal.webp); --uh: url(/img/ui/u-add-funds-hover.webp); --up: url(/img/ui/u-add-funds-pressed.webp); }
/* the kit art's "+" is a hairline that vanishes at 30–34 px, so draw a bold one on the frame */
.topup-add { display: inline-grid; place-items: center; }
.topup-add::after { content: '+'; font: 700 22px/1 var(--f-body); color: var(--gold-2); text-shadow: 0 0 6px rgba(232, 182, 74, .55); transform: translateY(-1px); pointer-events: none; }
.topup-add.is-waiting::after { opacity: .75; } /* a request is waiting: still visible, a tap says so */
@media (max-width: 860px) { .topup-add::after { font-size: 20px; } }
.chat-form button { --u: url(/img/ui/u-chat-send-normal.webp); --uh: url(/img/ui/u-chat-send-hover.webp); --up: url(/img/ui/u-chat-send-pressed.webp); width: 38px; padding: 0; }
:is([data-sound-toggle], #mic-btn, #cam-btn, #fullscreen-btn, #bet-minus, #bet-plus, .topup-add, .chat-form button):hover:not(:disabled) { background-color: transparent; background-image: var(--uh); }
:is([data-sound-toggle], #mic-btn, #cam-btn, #fullscreen-btn, #bet-minus, #bet-plus, .topup-add, .chat-form button):active:not(:disabled) { background-image: var(--up); }
:is(#bet-minus, #bet-plus):disabled { filter: grayscale(.7) brightness(.6); }
.icon-group { gap: 4px; }
.icon-group.panel { background: none; border: 0; box-shadow: none; } /* the kit buttons carry their own frames */

/* sidebar menu: the kit's nav bars */
.nav a { border: 1px solid rgba(196, 147, 64, .35); border-left: 3px solid rgba(196, 147, 64, .6); background: #16140f; }
.nav a:hover { background: #1d1a12; color: var(--text); }
.nav a.is-active { border-color: var(--kit-gold); border-left-color: var(--gold); background: linear-gradient(90deg, rgba(196, 147, 64, .22), #16140f 70%); }

/* bank plaque: the kit's dark plate with a gold rim */
.bank-plaque {
  background: var(--kit-fill); border: 1px solid var(--kit-gold); border-radius: 12px;
  box-shadow: inset 0 0 0 1px #101114, inset 0 0 0 2px var(--kit-inner), 0 0 24px rgba(196, 147, 64, .22), 0 8px 20px rgba(0, 0, 0, .6);
}
.bank-label { color: var(--gold-2); }

/* live camera tiles: the kit's camera frame (gold rim, dark bezel) and LIVE badge */
.seat-cam { box-shadow: 0 0 0 2px #101114, 0 0 0 3px var(--kit-gold), 0 12px 22px rgba(0, 0, 0, .7); }
.live-badge {
  width: 42px; height: 15px; padding: 0; border-radius: 0; box-shadow: none; font-size: 0; color: transparent;
  background: url(/img/ui/badge-live.webp) center / contain no-repeat;
}

/* ───────── support chat (bottom right) ───────── */
.support { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; justify-items: end; gap: 12px; pointer-events: none; }
.support > * { pointer-events: auto; }
.support-fab {
  position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(248, 217, 131, .6); background: radial-gradient(circle at 35% 30%, #3a2a10, #120d06 70%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6), 0 0 0 1px #000, inset 0 0 12px rgba(232, 182, 74, .25); color: var(--gold-2);
}
.support-fab:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .6), 0 0 16px rgba(232, 182, 74, .45); }
.support-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.support-fab.has-unread { animation: admin-alert 1.2s ease-in-out infinite; }
.support-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #b61f30; color: #fff; font: 600 11px/20px var(--f-body); text-align: center; }
.support-panel { width: min(360px, calc(100vw - 32px)); height: min(480px, calc(100dvh - 120px)); display: grid; grid-template-rows: auto 1fr auto auto; padding: 0; overflow: hidden; background: var(--panel-solid); box-shadow: 0 18px 50px rgba(0, 0, 0, .7); }
.support-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.support-head h2 { margin: 0; font-size: 20px; color: var(--gold-2); }
.support-head p { margin: 2px 0 0; }
.support-x { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.support-x:hover { color: var(--text); }
.support-thread { list-style: none; margin: 0; padding: 12px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.support-thread li { max-width: 85%; display: grid; gap: 2px; }
.support-thread li p { margin: 0; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.support-thread .from-me { align-self: flex-end; justify-items: end; }
.support-thread .from-me p { background: rgba(232, 182, 74, .16); border: 1px solid rgba(232, 182, 74, .35); }
.support-thread .from-staff p { background: #1d1d22; border: 1px solid var(--line-2); }
.support-thread .who { font: 500 10px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.support-thread time { font-size: 11px; color: var(--dim); }
.support-thread .support-empty { max-width: none; align-self: stretch; color: var(--muted); font-size: 14px; text-align: center; padding: 30px 10px; }
.support-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; padding: 10px 12px; border-top: 1px solid var(--line); }
.support-form textarea { resize: none; min-height: 42px; max-height: 120px; font: inherit; }
.support-panel .form-error { margin: 0 12px 8px; }
.support-panel .form-error:empty { display: none; }
@media (max-width: 860px) {
  .support { right: 12px; bottom: calc(64px + env(safe-area-inset-bottom)); }
  .signed-out .support { bottom: 16px; }
  .support-fab { width: 50px; height: 50px; }
  .support-panel { height: min(460px, calc(100dvh - 150px)); }
}

/* ───────── admin: camera reports (owner's evidence log) ───────── */
.report-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.report-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; }
.report-item.is-sensitive { border-color: rgba(255, 90, 104, .5); }
.report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.report-head b { font: 600 16px var(--f-cond); letter-spacing: .04em; }
.report-head time { margin-left: auto; color: var(--dim); font-size: 13px; }
.report-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.report-facts dt { font: 500 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.report-facts dd { margin: 0; overflow-wrap: anywhere; }
.report-frames { display: flex; flex-wrap: wrap; gap: 10px; }
.report-frame { margin: 0; display: grid; gap: 4px; width: 240px; max-width: 100%; position: relative; }
.report-frame img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #000; display: block; }
.report-frame figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--dim); }
.report-frame figcaption a { color: var(--gold-2); }
.report-frame .sha { font-family: ui-monospace, Consolas, monospace; }
.report-frame.is-sensitive img { display: none; }
.report-frame.is-sensitive.is-revealed img { display: block; }
.frame-shield { aspect-ratio: 4 / 3; border-radius: 6px; display: grid; place-content: center; justify-items: center; gap: 8px; background: repeating-linear-gradient(45deg, #1a0c0f, #1a0c0f 10px, #220f13 10px, #220f13 20px); color: #ff9aa4; font-size: 13px; text-align: center; padding: 8px; }
.ncmec { border: 1px solid rgba(255, 90, 104, .35); background: rgba(182, 31, 48, .08); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; }
.ncmec p { margin: 0; }
.ncmec-form { display: flex; gap: 8px; flex-wrap: wrap; }
.ncmec-form input { flex: 1 1 180px; }
.ncmec-done { color: #6ee7a8; font-weight: 600; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .report-frame { width: 100%; } .report-head time { margin-left: 0; width: 100%; } }

/* ───────── admin: one member in full ───────── */
.member-list li.is-link { cursor: pointer; }
.member-list li.is-link:hover, .member-list li.is-link:focus-visible { border-color: rgba(232, 182, 74, .55); background: rgba(232, 182, 74, .05); outline: none; }
.member-detail { width: min(860px, calc(100% - 24px)); position: relative; padding: 22px 22px 18px; text-align: left; }
.md-close { position: absolute; top: 10px; right: 12px; }
.md-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-right: 30px; }
.md-head h2 { margin: 0; font-size: 26px; }
.md-head .mid { color: var(--gold); font: 500 13px var(--f-cond); letter-spacing: .08em; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.md-section { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.md-section + .md-section { margin-top: 0; }
.member-detail > div > .md-section { margin-top: 12px; }
.md-section h3 { margin: 0 0 8px; font-size: 15px; color: var(--gold-2); letter-spacing: .08em; }
.md-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.md-facts dt { font: 500 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.md-facts dd { margin: 0; overflow-wrap: anywhere; }
.md-facts dd a { color: var(--text); }
.md-facts .m-status { margin-left: 4px; }
.md-facts .gold { color: var(--gold-2); }
.md-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; max-height: 240px; overflow-y: auto; }
.md-history li { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.md-history time { color: var(--dim); }
.md-history .amt.in { color: #6ee7a8; }
.md-history .amt.out { color: #ff9aa4; }
.md-section textarea { width: 100%; resize: vertical; font: inherit; }
.md-note-actions { display: flex; justify-content: flex-end; margin: 6px 0 10px; }
.md-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.md-notes li { padding: 8px 10px; border-radius: 8px; background: #17171b; border: 1px solid var(--line); }
.md-notes li p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.md-notes li small { color: var(--dim); }
@media (max-width: 520px) { .member-detail { padding: 18px 14px 14px; } .md-history li { grid-template-columns: 1fr auto; } .md-history time { grid-column: 1 / -1; } }


.md-override { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.md-override .field { display: grid; gap: 4px; margin: 0; }
.md-override .md-sure { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; text-align: left; }
.md-override .md-sure input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; }
.md-override .btn { justify-self: start; }
.md-override-undo { margin-top: 8px; color: #ff9aa4; }
.md-section > div > .btn { margin-top: 10px; }

/* volley: everyone's single die over their seat; the highest glows gold */
.volley-die {
  position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%); z-index: 6;
  width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center;
  font: 800 22px/1 var(--f-body); color: #15110b; background: linear-gradient(#fff, #e6e1d6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .55), inset 0 -3px 0 rgba(0, 0, 0, .12); animation: volley-pop .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
.volley-die.is-top { box-shadow: 0 0 0 3px var(--gold-2), 0 0 22px rgba(232, 182, 74, .8), 0 6px 16px rgba(0, 0, 0, .55); }
@keyframes volley-pop { from { transform: translate(-50%, -60%) scale(.3) rotate(-90deg); opacity: 0; } to { transform: translate(-50%, -100%) scale(1) rotate(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .volley-die { animation: none; } }
.bank-plaque.is-open .bank-amt { font-size: 13px; letter-spacing: .04em; color: #f8d983; }

.cashout-actions { flex-wrap: wrap; }

/* tidy line breaks everywhere: balanced headings and short blurbs, no lonely last words */
h1, h2, h3, .h-cond, .roll-callout, .modal h2, .status, .mega-banner { text-wrap: balance; }
p, li, .muted, .fine, .toast { text-wrap: pretty; }

.report-frame figcaption { flex-wrap: wrap; }
.report-frame .frame-when { color: var(--gold-2); font-weight: 600; }

/* member details: camera moderation */
.md-cam-status { margin: 0 0 8px; color: var(--muted); }
.md-cam-status.is-live { color: #ff9aa4; font-weight: 600; }
.md-cam-ban { margin: 8px 0; color: #ff9aa4; }
.md-cam-ban-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.md-cam-ban-form input { flex: 1 1 200px; }

/* camera & mic rules (How to play card + the accept dialog) */
.rule-card-wide { grid-column: 1 / -1; }
.cam-rules-list { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.cam-rules-list li { line-height: 1.45; }
#cam-rules h3, .cam-rules-dialog h3 { margin: 14px 0 4px; font-size: 16px; color: var(--gold-2); letter-spacing: .06em; }
.cam-rules-dialog { width: min(620px, calc(100% - 24px)); text-align: left; max-height: calc(100dvh - 24px); overflow-y: auto; }
.cam-rules-dialog p, .cam-rules-dialog li { font-size: 14px; }
.cam-rules-agree { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; font-size: 14px; }
.cam-rules-agree input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; }

.m-tester { color: #9fd2f7; }

/* VIP */
.m-vip { color: var(--gold-2); }
.vip-tag { margin-left: 6px; padding: 1px 6px; border-radius: 999px; font: 700 9px/1.4 var(--f-cond); letter-spacing: .12em; color: #1a1205; background: linear-gradient(#f8d983, #c99a3c); vertical-align: middle; }
.md-vip-on { color: var(--gold-2); margin: 0 0 8px; }
.icon-btn.is-locked { opacity: .55; }

/* chips at the table: wallet line + Reload (player card) */
.stack-line { display: flex; align-items: center; gap: 8px; margin-top: 3px; white-space: nowrap; }
.stack-line .stack-off { font: 600 11px var(--f-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stack-btn {
  padding: 2px 9px; border: 1px solid var(--gold-deep); border-radius: 999px; background: rgba(232, 182, 74, .1); cursor: pointer;
  font: 600 11px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.stack-btn:hover, .stack-btn:focus-visible { background: rgba(232, 182, 74, .22); color: var(--gold-2); }
.tc-quick { display: flex; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.tc-quick .btn { min-width: 56px; }
#tc-off { text-align: center; margin: 2px 0 6px; }
@media (max-width: 1279px) { .stack-line .stack-off { display: none; } } /* the table's top bar is crowded: Reload only */
@media (max-width: 860px) {
  .stack-btn { padding: 1px 7px; font-size: 10px; letter-spacing: .08em; }
}

/* banker alone at the table: countdown to "cash out & leave" */
.alone-pop {
  position: absolute; z-index: 30; left: 50%; top: 12px; transform: translateX(-50%);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 14px;
  width: min(460px, calc(100% - 24px)); padding: 12px 16px; border: 1px solid var(--gold-deep);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(232, 182, 74, .15);
}
.alone-pop[hidden] { display: none; }
.alone-body { display: grid; gap: 2px; font-size: 13px; color: var(--muted); text-wrap: pretty; }
.alone-body b { color: var(--text); font: 600 14px var(--f-cond); letter-spacing: .08em; text-transform: uppercase; }
.alone-clock { font: 600 30px var(--f-cond); color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.alone-clock.is-ready { color: var(--green); }
.alone-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 860px) {
  .alone-pop { top: 6px; padding: 10px 12px; gap: 4px 10px; }
  .alone-pop .crown { display: none; }
  .alone-pop { grid-template-columns: 1fr auto; }
  .alone-clock { font-size: 24px; }
}

/* admin: rake by session */
.session-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.session-tile { padding: 12px 16px; display: grid; gap: 2px; }
.session-tile .k { font: 600 11px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.session-tile .v { font: 600 24px var(--f-cond); color: var(--gold); font-variant-numeric: tabular-nums; }
.session-scroll { overflow-x: auto; }
.session-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.session-table th { text-align: left; padding: 10px 12px; font: 600 11px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.session-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.session-table tr:last-child td { border-bottom: 0; }
.session-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.session-table td.rake { color: var(--gold); font-weight: 600; }
.session-table td .fine { display: block; margin: 2px 0 0; white-space: normal; }
.session-live { color: var(--green); font: 600 12px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; }
#session-csv { align-self: center; }
.session-table tr.is-open td:first-child b::after { content: ' ●'; color: var(--green); font-size: 10px; vertical-align: middle; }
@media (max-width: 860px) {
  .session-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .session-tile .v { font-size: 20px; }
  .session-table { font-size: 12.5px; }
  .session-table th, .session-table td { padding: 9px 5px; }
  .session-table th { letter-spacing: .06em; }
  /* phones: table, started, length, rounds, rake (ended / players / wagered are in the CSV and on desktop) */
  .session-table :is(th, td):nth-child(3), .session-table :is(th, td):nth-child(6), .session-table :is(th, td):nth-child(7) { display: none; }
  .session-table td { white-space: normal; }
}
