/* Beets Poker Club — back-room card table: black, green felt, brass, oxblood */
:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --bg-3: #1a1a1d;
  --line: #2b2b30;
  --line-2: #3a3a40;
  --text: #ece7df;
  --muted: #8f8a84;
  --brass: #c9a24a;
  --brass-hi: #e3c47a;
  --blood: #7a1424;
  --blood-hi: #a61e32;
  --felt: #0f4a34;
  --felt-d: #06261a;
  --red-suit: #b0182c;
  --card: #f3eee4;
  --display: 'Big Shoulders Display', Impact, 'Arial Narrow', sans-serif;
  --body: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --rail: clamp(12px, 1.8vw, 22px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font: 400 1rem/1.5 var(--body);
  background-image: radial-gradient(900px 520px at 50% -8%, rgba(201, 162, 74, .10), transparent 65%);
}
a { color: var(--brass-hi); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
[hidden] { display: none !important; }
button { font-family: inherit; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font: 800 1rem/1 var(--body); letter-spacing: .02em; padding: 0 1.3em; min-height: 50px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; color: var(--text);
  transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn svg { width: 22px; height: 22px; }
.btn--blood { background: linear-gradient(#a61e32, #7a1424); border-color: #4a0b15; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 3px 0 #3d0710; color: #fff; }
.btn--felt { background: linear-gradient(#1d6b4a, #0f4a34); border-color: #06261a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 0 #04170f; color: #fff; }
.btn--discord { background: #5865f2; border-color: #3c45a5; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 3px 0 #2f3790; color: #fff; }
.btn--ghost { background: var(--bg-3); border-color: var(--line-2); }
.btn--sm { min-height: 40px; font-size: .9rem; padding: 0 1em; }
.btn--wide { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brass-hi); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

input, select {
  font: 500 1rem var(--body); color: var(--text); background: #0c0c0e; border: 1px solid var(--line-2);
  border-radius: 10px; padding: 0 14px; min-height: 50px; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201, 162, 74, .18); }
input::placeholder { color: #6c6863; }
.err { color: #ff8f9d; font-weight: 600; font-size: .9rem; margin: 10px 0 0; }
.err:empty { display: none; }

/* ---------- lobby ---------- */
.lobby { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; position: relative; overflow: hidden; padding: 28px 16px; }
.lobby__felt {
  position: absolute; left: 50%; top: 50%; width: min(1500px, 190vw); aspect-ratio: 2 / 1; transform: translate(-50%, -50%);
  border-radius: 50%; opacity: .6;
  background: var(--noise), radial-gradient(ellipse at 50% 40%, #135a40, var(--felt-d) 70%);
  box-shadow: 0 0 0 26px #120a07, 0 0 0 29px #2c1d10;
}
.lobby__felt::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse at center, transparent 25%, rgba(10, 10, 11, .9) 75%); }
.lobby__in { position: relative; width: 100%; max-width: 420px; display: grid; gap: 14px; }
.logo { margin: 0 0 8px; display: grid; justify-items: center; line-height: 1; }
.logo__mark { width: 116px; height: 116px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .7)); margin-bottom: 10px; }
.logo__word { font: 900 clamp(3.4rem, 15vw, 4.4rem)/.85 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--text); text-shadow: 0 3px 0 #000; }
.logo__sub { font: 800 .95rem/1 var(--display); letter-spacing: .5em; text-transform: uppercase; color: var(--brass); margin-top: 8px; padding-left: .5em; }
.card-panel { background: rgba(18, 18, 20, .92); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .78rem; margin: 12px 0; text-transform: uppercase; letter-spacing: .12em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.who { display: flex; align-items: center; gap: 12px; }
.who__av { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--brass); object-fit: cover; background: var(--bg-3); }
.who__txt { display: flex; flex-direction: column; min-width: 0; }
.who__txt b { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__txt span { color: var(--muted); font-size: .86rem; display: inline-flex; align-items: center; gap: 6px; }
.dc { width: 16px; height: 16px; color: #8c95ff; }
.joinrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.code-in { font: 800 1.35rem/1 var(--body); letter-spacing: .32em; text-transform: uppercase; text-align: center; }
.opts { margin-top: 10px; }
.opts summary { cursor: pointer; color: var(--muted); font-size: .88rem; font-weight: 600; padding: 6px 0; list-style: none; }
.opts summary::before { content: '▸ '; } .opts[open] summary::before { content: '▾ '; }
.opts summary::-webkit-details-marker { display: none; }
.opts__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.opts__grid label { display: grid; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.opts__grid select, .opts__grid input { min-height: 44px; }
.opts__grid .opts__check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 44px; color: var(--text); text-transform: none; letter-spacing: 0; font-size: .95rem; }
.opts__check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--blood-hi); }
.resume { margin: 10px 0 0; font-size: .88rem; color: var(--muted); }
.lobby__foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.lobby__foot a { color: var(--muted); }

/* ---------- cards ---------- */
.card {
  --w: var(--cw, 44px);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .1);
  background: linear-gradient(#fbf8f2, var(--card)); color: #16161a; line-height: 1; position: relative; user-select: none;
  box-shadow: 0 1px 0 #c8bfae, 0 6px 14px rgba(0, 0, 0, .45);
}
.card b { font: 700 calc(var(--w) * .5) / 1 var(--body); letter-spacing: -.05em; }
.card i { font-style: normal; font-size: calc(var(--w) * .44); margin-top: calc(var(--w) * .02); }
.card.c-red { color: var(--red-suit); }
.card--back {
  background:
    repeating-linear-gradient(45deg, rgba(201, 162, 74, .28) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, rgba(201, 162, 74, .28) 0 1px, transparent 1px 6px),
    linear-gradient(#8a1a2b, #5a0d19);
  box-shadow: inset 0 0 0 calc(var(--w) * .06) #f3eee4, inset 0 0 0 calc(var(--w) * .09) #5a0d19, 0 4px 10px rgba(0, 0, 0, .5);
}
.card--slot { background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(236, 231, 223, .12); }
.card--best { box-shadow: 0 0 0 3px var(--brass-hi), 0 0 18px rgba(227, 196, 122, .55); }
.card--dim { filter: brightness(.45); }
.card--flip { animation: flip .5s cubic-bezier(.3, .7, .3, 1) both; }
.card--flip:nth-child(2) { animation-delay: .09s; } .card--flip:nth-child(3) { animation-delay: .18s; }
@keyframes flip { from { transform: perspective(400px) rotateY(90deg) translateY(-10px); filter: brightness(.6); } to { transform: none; } }

/* ---------- room ---------- */
.room { height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: radial-gradient(1100px 600px at 50% 30%, #17140f, var(--bg) 70%); }
.bar { display: flex; align-items: center; gap: 10px; padding: 8px clamp(10px, 2vw, 20px); padding-top: calc(8px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: rgba(10, 10, 11, .9); z-index: 5; }
.bar__code { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px 4px 4px; color: var(--text); cursor: pointer; }
.bar__code:hover { border-color: var(--brass); }
.bar__code svg { width: 34px; height: 34px; }
.bar__code span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.bar__code small { font-size: .62rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
.bar__code b { font: 900 1.25rem/1 var(--display); letter-spacing: .14em; color: var(--brass-hi); }
.bar__info { flex: 1; min-width: 0; color: var(--muted); font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__info b { color: var(--text); }
.bar__tools { display: flex; gap: 6px; }
.ibtn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); cursor: pointer; position: relative; }
.ibtn:hover { border-color: var(--brass); }
.ibtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ibtn.has-new::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--blood-hi); box-shadow: 0 0 0 2px var(--bg-3); }

.stage { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; position: relative; }
@media (min-width: 1100px) { .stage { grid-template-columns: minmax(0, 1fr) 300px; } #talk-btn { display: none; } }
.felt-wrap { display: grid; place-items: center; min-height: 0; padding: 56px 74px 50px; container-type: size; }
.felt {
  position: relative; aspect-ratio: 2 / 1; width: min(100cqw, 200cqh, 1040px);
  border-radius: 50%;
  background:
    var(--noise),
    radial-gradient(ellipse 60% 55% at 50% 38%, rgba(255, 240, 200, .13), transparent 70%),
    radial-gradient(ellipse at 50% 50%, #145c41 0%, var(--felt) 45%, var(--felt-d) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, .5),
    inset 0 0 70px rgba(0, 0, 0, .7),
    0 0 0 var(--rail) #1c110b,
    0 0 0 calc(var(--rail) + 1px) #4a3018,
    0 0 0 calc(var(--rail) + 3px) #0a0604,
    0 30px 80px rgba(0, 0, 0, .8);
}
.felt::before { /* light on the padded rail */
  content: ''; position: absolute; inset: calc(-1 * var(--rail)); border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 230, 190, .12), transparent 70%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - var(--rail)), #000 calc(100% - var(--rail) + 1px));
          mask: radial-gradient(closest-side, transparent calc(100% - var(--rail)), #000 calc(100% - var(--rail) + 1px));
}
.felt__line { position: absolute; inset: 7%; border-radius: 50%; border: 1px dashed rgba(201, 162, 74, .22); pointer-events: none; }
.felt__crest { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); color: rgba(0, 0, 0, .2); pointer-events: none; }
.felt__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 18%; text-align: center; z-index: 1; }
.board { display: flex; gap: clamp(4px, .7vw, 8px); --cw: clamp(38px, 5.2vw, 64px); }
.pot { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: clamp(.92rem, 1.5vw, 1.08rem); background: rgba(0, 0, 0, .45); border: 1px solid rgba(201, 162, 74, .3); padding: 4px 14px 4px 6px; border-radius: 999px; min-height: 32px; font-variant-numeric: tabular-nums; }
.pot:empty { visibility: hidden; }
.pot svg { width: 22px; height: 22px; }
.pot small { font-weight: 600; color: var(--muted); }
.banner { font-weight: 600; font-size: clamp(.86rem, 1.5vw, 1rem); min-height: 1.5em; display: flex; flex-direction: column; gap: 4px; align-items: center; color: #d9e6dc; }
.banner small { display: block; color: rgba(217, 230, 220, .6); font-weight: 500; font-size: .85em; }
.banner__win { color: #fff; font-weight: 700; }
.banner__win small { color: var(--brass-hi); display: inline; font-weight: 700; font-size: .9em; }
.banner__lost { color: var(--brass-hi); animation: blink 1.2s ease-in-out infinite; }
.banner .btn { margin-top: 4px; }
@keyframes blink { 50% { opacity: .4; } }

/* seats */
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; z-index: 2; --av: 58px; --cw: 30px; }
.seat__av {
  width: var(--av); height: var(--av); border-radius: 50%; position: relative; z-index: 1;
  background: conic-gradient(var(--ring, #4a4a52) calc(var(--t, 1) * 360deg), rgba(255, 255, 255, .08) 0);
  padding: 3px; box-shadow: 0 6px 16px rgba(0, 0, 0, .6);
}
.seat__av img, .seat__av span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--c, #2a2a30); font: 900 calc(var(--av) * .42)/1 var(--display); color: #fff; border: 2px solid #0a0a0b; text-transform: uppercase; }
.seat__plate {
  margin-top: -8px; position: relative; z-index: 2; min-width: 96px; max-width: 132px; text-align: center;
  background: linear-gradient(#1d1d22, #0e0e10); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 10px 5px; box-shadow: 0 6px 14px rgba(0, 0, 0, .55);
}
.seat__name { display: block; font-weight: 600; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #cfcac2; }
.seat__name .dc { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
.seat__chips { display: block; font-weight: 800; color: var(--brass-hi); font-size: .95rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.seat__tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap;
  font: 800 .68rem/1 var(--body); text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border-radius: 6px;
  background: #24242a; color: #fff; border: 1px solid var(--line-2); box-shadow: 0 3px 8px rgba(0, 0, 0, .5);
}
.seat__tag--raise, .seat__tag--allin, .seat__tag--blind { background: var(--blood); border-color: var(--blood-hi); }
.seat__tag--call, .seat__tag--check { background: #1f5e3d; border-color: #2c7a4b; }
.seat__tag--fold { background: #2a2a2e; color: var(--muted); }
.seat__tag--win { background: var(--brass); color: #141416; border-color: var(--brass-hi); }
.seat__tag--hand { background: rgba(0, 0, 0, .8); color: var(--brass-hi); text-transform: none; letter-spacing: 0; font-size: .7rem; }
.seat__cards { position: absolute; top: 0; left: calc(50% + var(--av) * .22); display: flex; z-index: 0; }
.seat__cards .card:first-child { transform: rotate(-6deg); }
.seat__cards .card + .card { margin-left: calc(var(--cw) * -.5); transform: rotate(10deg) translateY(2px); }
.seat--show .seat__cards { top: auto; bottom: calc(100% - var(--av) + 12px); left: 50%; transform: translateX(-50%); gap: 3px; z-index: 3; }
.seat--show .seat__cards .card + .card, .seat--show .seat__cards .card:first-child { margin-left: 0; transform: none; }
.seat--show { --cw: 34px; }
.seat--show .seat__av { visibility: hidden; }
.seat--show .seat__tag { top: auto; bottom: calc(100% - var(--av) + 14px + var(--cw) * 1.4); }
.seat__dealer { position: absolute; width: 26px; height: 26px; z-index: 4; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); transform: translate(-50%, -50%); }
.seat--turn { --ring: var(--brass-hi); }
.seat--turn .seat__av { box-shadow: 0 0 0 4px rgba(227, 196, 122, .16), 0 0 30px rgba(227, 196, 122, .45); }
.seat--turn .seat__plate { border-color: var(--brass); }
.seat--folded .seat__av, .seat--out .seat__av { filter: grayscale(1) brightness(.5); }
.seat--folded .seat__plate, .seat--out .seat__plate { opacity: .6; }
.seat--away .seat__name::after { content: ' · away'; color: #ff8f9d; }
.seat--win { --ring: #57c27f; }
.seat--win .seat__av { box-shadow: 0 0 0 4px rgba(87, 194, 127, .25), 0 0 34px rgba(87, 194, 127, .55); }
.seat--win .seat__plate { border-color: #57c27f; }
.bet { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: .84rem; background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 2px 9px 2px 2px; z-index: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bet svg { width: 20px; height: 20px; }

/* fx: flying chips & cards */
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.fly { position: absolute; transform: translate(-50%, -50%); transition: left .5s cubic-bezier(.4, .1, .2, 1), top .5s cubic-bezier(.4, .1, .2, 1), opacity .2s .45s; }
.fly svg { width: 22px; height: 22px; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.fly.card { --cw: 26px; transition: left .42s cubic-bezier(.3, .1, .2, 1), top .42s cubic-bezier(.3, .1, .2, 1), opacity .15s .4s; }

#seats.dealing .seat__cards { opacity: 0; }
.seat__cards { transition: opacity .2s; }
.me__cards .card { transition: opacity .25s, transform .25s; }
.me__cards.is-dealing .card { opacity: 0; transform: translateY(-14px); }

/* phones: tall table */
@media (max-width: 699px) {
  .felt-wrap { padding: 46px 30px 40px; }
  .felt { aspect-ratio: 3 / 4.1; width: min(100cqw, calc(100cqh * 3 / 4.1), 460px); border-radius: 48% / 38%; }
  .felt::before { border-radius: 48% / 38%; }
  .felt__line { border-radius: 48% / 38%; }
  .felt__center { padding: 0 9%; }
  .felt__crest { width: 40%; }
  .board { --cw: clamp(32px, 10vw, 46px); gap: 4px; }
  .seat { --av: 42px; --cw: 22px; }
  .seat--show { --cw: 24px; }
  .seat__plate { min-width: 70px; max-width: 88px; padding: 3px 6px 4px; margin-top: -6px; }
  .seat__name { font-size: .68rem; }
  .seat__chips { font-size: .8rem; }
  .seat__tag { font-size: .58rem; padding: 3px 6px; top: -10px; }
  .seat__dealer { width: 22px; height: 22px; }
  .bet { font-size: .74rem; padding: 2px 7px 2px 2px; }
  .bet svg { width: 16px; height: 16px; }
  .seat--me .seat__cards { display: none; }
  .bar__info { font-size: .76rem; }
  .bar__code svg { width: 30px; height: 30px; }
  .ibtn { width: 40px; height: 40px; }
}
@media (max-width: 359px) {
  .felt-wrap { padding: 42px 22px 36px; }
  .board { --cw: 30px; gap: 3px; }
  .seat__plate { min-width: 62px; max-width: 76px; }
  .bar__info { display: none; }
}

/* side panel */
.side { background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side__tabs { display: flex; border-bottom: 1px solid var(--line); }
.side__tabs button[role="tab"] { flex: 1; background: none; border: 0; color: var(--muted); font: 700 .84rem var(--body); padding: 12px; cursor: pointer; border-bottom: 2px solid transparent; text-transform: uppercase; letter-spacing: .08em; }
.side__tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brass); }
.side__close { display: none; background: none; border: 0; color: var(--text); font-size: 1.1rem; padding: 0 16px; cursor: pointer; }
.side__pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat, .log { list-style: none; margin: 0; padding: 12px 14px; overflow-y: auto; flex: 1; min-height: 100px; font-size: .9rem; display: flex; flex-direction: column; gap: 6px; }
.chat b { color: var(--brass-hi); font-weight: 700; }
.chat__empty { color: var(--muted); }
.chat__form { display: flex; gap: 8px; padding: 10px; }
.chat__form input { min-height: 42px; }
.quick { display: flex; gap: 6px; padding: 10px 10px 0; flex-wrap: wrap; border-top: 1px solid var(--line); }
.quick button { background: var(--bg-3); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font: 600 .82rem var(--body); cursor: pointer; min-height: 34px; }
.log { font-size: .82rem; color: #bdb7ae; gap: 3px; }
.log__hand { color: var(--brass); font-weight: 700; margin-top: 8px; }
.lr { color: #ff6b80; font-weight: 700; } .lb { color: #fff; font-weight: 700; }
@media (max-width: 1099px) {
  .side { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); z-index: 40; transform: translateX(105%); transition: transform .25s ease; box-shadow: -20px 0 50px rgba(0, 0, 0, .7); }
  .room.side-open .side { transform: none; }
  .side__close { display: block; }
}

/* dock */
.dock { background: linear-gradient(#111113, #0a0a0b); border-top: 1px solid var(--line); padding: 10px clamp(10px, 2vw, 20px) calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 10px; z-index: 5; }
.dock:has(.me:empty) { display: none; }
.me { display: flex; align-items: center; gap: 14px; min-width: 0; }
.me__cards { display: flex; --cw: 50px; padding: 4px 0 2px 4px; }
.me__cards .card:first-child { transform: rotate(-5deg); }
.me__cards .card + .card { margin-left: -12px; transform: rotate(5deg) translateY(2px); }
.me__none { color: var(--muted); font-weight: 600; font-size: .9rem; }
.me__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me__chips { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.2rem; color: var(--brass-hi); font-variant-numeric: tabular-nums; }
.me__chips svg { width: 20px; height: 20px; }
.me__hand { font-size: .84rem; font-weight: 600; color: #d9e6dc; }
.me__timer { font-size: .8rem; font-weight: 800; color: var(--brass-hi); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.acts:empty { display: none; }
.act {
  flex: 1 1 0; min-width: 0; min-height: 54px; border-radius: 10px; font: 800 1rem/1.1 var(--body); cursor: pointer; color: #fff; padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, .5); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 3px 0 rgba(0, 0, 0, .6);
}
.act:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 0 rgba(0, 0, 0, .6); }
.act kbd { font: 600 .64rem var(--body); opacity: .55; border: 1px solid currentColor; border-radius: 4px; padding: 1px 4px; margin-left: 6px; vertical-align: middle; }
.act--fold { background: linear-gradient(#3a3a40, #26262b); }
.act--check, .act--call { background: linear-gradient(#2f8a55, #1f6640); }
.act--raise { background: linear-gradient(#a61e32, #7a1424); }
.act--deal { background: linear-gradient(#d3b062, #a8842f); color: #141416; }
.act--soft { background: var(--bg-3); color: var(--muted); font-size: .82rem; min-height: 44px; flex: 0 1 auto; box-shadow: none; border-color: var(--line); }
.acts__wait { margin: 0; color: var(--muted); font-weight: 600; align-self: center; flex: 1; font-size: .92rem; }
@media (hover: none) { .act kbd { display: none; } }
.raise { display: grid; gap: 8px; grid-column: 1 / -1; }
.raise__quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.raise__quick button, .raise__step { background: var(--bg-3); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; font: 700 .86rem var(--body); min-height: 40px; cursor: pointer; }
.raise__quick button:hover, .raise__step:hover { border-color: var(--brass); }
.raise__row { display: grid; grid-template-columns: 40px 1fr 40px 96px; gap: 8px; align-items: center; }
.raise__row input[type="number"] { min-height: 42px; padding: 0 8px; font-weight: 800; text-align: center; }
input[type="range"] { accent-color: var(--blood-hi); padding: 0; border: 0; background: none; min-height: 36px; box-shadow: none; }
@media (min-width: 900px) {
  .dock { grid-template-columns: auto 1fr; align-items: center; }
  .acts { justify-content: flex-end; }
  .act { flex: 0 1 180px; }
  .me__cards { --cw: 58px; }
  .raise { grid-column: 2; justify-self: end; width: min(560px, 100%); }
}
.room.is-lost .acts { opacity: .4; pointer-events: none; }

/* dialogs */
.dlg { background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 20px; width: min(440px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .8); }
.dlg::backdrop { background: rgba(0, 0, 0, .72); }
.dlg h2 { font: 900 1.7rem/1 var(--display); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 14px; }
.dlg h2 span { color: var(--brass-hi); letter-spacing: .14em; }
.dlg__link { display: flex; gap: 8px; }
.dlg__link input { min-height: 42px; font-size: .88rem; }
.dlg__row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.dlg__credit { color: var(--muted); font-size: .82rem; margin: 14px 0 0; }
.dlg__credit a { color: var(--muted); }
.menu { display: grid; gap: 6px; margin-bottom: 10px; }
.menu__item { text-align: left; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); border-radius: 10px; min-height: 48px; padding: 0 14px; font: 600 .98rem var(--body); cursor: pointer; }
.menu__item:hover { border-color: var(--brass); }
.menu__item--out { color: #ff8f9d; }
.seatlist { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }
.seatlist__row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .9rem; }
.seatlist__row em { color: var(--muted); }
.dlg--ranks { width: min(520px, calc(100vw - 24px)); }
.ranks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; counter-reset: r; max-height: 65vh; overflow-y: auto; }
.ranks li { counter-increment: r; display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; background: var(--bg-3); }
.ranks__cards { display: flex; gap: 3px; --cw: 28px; flex: none; }
.ranks__name { font-weight: 700; font-size: .95rem; }
.ranks__name::before { content: counter(r) '. '; color: var(--brass); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--text); color: #0a0a0b; font-weight: 700; padding: 12px 18px; border-radius: 10px; z-index: 60; transition: transform .25s; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); max-width: calc(100vw - 24px); text-align: center; visibility: hidden; }
.toast.on { transform: translate(-50%, 0); visibility: visible; }
body.at-table .toast { bottom: 160px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
