/* Friendlies -- felt green, brass and mahogany. Built to read at a glance on a
   phone held at arm's length: whose turn it is should be obvious from across a
   room, and a bet should be legible as chips before you read the number. */

:root {
  --felt: #0f2a1d;
  --felt-mid: #14382a;
  --felt-dark: #0a1c13;
  --wood: #3b2418;
  --wood-hi: #6b4630;
  --ink: #f2efe6;
  --muted: #9db0a4;
  --brass: #d9b26a;
  --brass-dim: #8e743f;
  --good: #6ee7a0;
  --bad: #f28b82;
  --card-face: #f7f5ef;
  --card-red: #c0392b;
  --card-ink: #1a1a1a;
  --panel: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --radius: 14px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(120% 90% at 50% 0%, #143a27 0%, var(--felt) 45%, var(--felt-dark) 100%);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }

#app { max-width: 940px; margin: 0 auto; padding: 20px 16px 90px; }

h1 { font-size: 1.35rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--brass); margin: 0 0 10px; }
p { margin: 0; }

.grow { flex: 1; min-width: 0; }
.sub { color: var(--muted); font-size: 0.85rem; }
.sub.you strong { color: var(--brass); }
.sub.ready { color: var(--good); }
.sub.dealing { color: var(--brass); }
.note { color: var(--muted); font-size: 0.78rem; line-height: 1.5; margin-top: 8px; }
.note.warn { color: var(--brass); }
.note.center { text-align: center; margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; color: var(--brass); }

.logo {
  font-size: 2rem;
  text-align: center;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #f6e3b8, var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

/* --- layout ------------------------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(6px);
}
.panel.narrow { max-width: 420px; margin: 8vh auto; }
.panel.narrow .sub { text-align: center; margin-bottom: 18px; line-height: 1.5; }
.panel.dev { border-style: dashed; opacity: 0.85; }

.stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.back {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 1.3rem; line-height: 1;
  cursor: pointer; flex: none;
}
.back:hover { border-color: var(--brass-dim); }

.bank-chip {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 6px 12px;
  border: 1px solid var(--brass-dim);
  border-radius: 999px;
  background: rgba(217, 178, 106, 0.08);
  flex: none;
}
.bank-chip .label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brass); }
.bank-chip strong { font-size: 0.95rem; }

/* --- form controls ------------------------------------------------------- */

label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }

input[type="text"], input[type="number"] {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
  width: 100%;
  min-width: 0;
}
input:focus { outline: none; border-color: var(--brass-dim); }
.code-input { text-transform: uppercase; letter-spacing: 0.2em; text-align: center; }

.money-input { position: relative; display: flex; align-items: center; flex: 1 1 110px; max-width: 140px; }
.money-input .currency { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.money-input input { padding-left: 24px; }

.btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit; font-weight: 600;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer; flex: none;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); border-color: var(--brass-dim); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #e8c98a, var(--brass)); border-color: transparent; color: #2a1e08; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #f2d79c, #e0bb75); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(242, 139, 130, 0.4); color: var(--bad); background: transparent; }
.btn.wide { width: 100%; margin-top: 14px; }

.list-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink); font: inherit;
  padding: 13px 14px; cursor: pointer;
}
.list-item:hover { border-color: var(--brass-dim); }

.tag {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.tag.house { border-color: var(--brass-dim); color: var(--brass); }
.you-tag {
  font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #2a1e08; background: var(--brass);
  padding: 1px 6px; border-radius: 999px; margin-left: 6px;
}

.local-banner {
  border: 1px dashed var(--brass-dim);
  background: rgba(217, 178, 106, 0.08);
  color: var(--brass);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  line-height: 1.5;
}
.local-banner span { color: var(--muted); }

/* --- stats and tables --------------------------------------------------- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: rgba(0, 0, 0, 0.2); border-radius: 10px; }
.stat .label { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat strong { font-size: 1.05rem; }
.stat .sub { font-size: 0.68rem; }

table.grid { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.grid th {
  text-align: left; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 600; padding: 0 8px 8px 0;
}
table.grid td { padding: 9px 8px 9px 0; border-top: 1px solid var(--line); }
table.grid tr.me td { color: var(--brass); }

ul.history { list-style: none; margin: 0; padding: 0; font-size: 0.83rem; }
ul.history li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
ul.history li:first-child { border-top: none; }
ul.history .amount { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ======================================================================== */
/* The table                                                                */
/* ======================================================================== */

.table-wrap { margin-bottom: 14px; transition: filter 0.3s ease; }

/* The rail: mahogany with a brass inlay. */
.rail {
  border-radius: 26px;
  padding: 10px;
  background:
    linear-gradient(180deg, var(--wood-hi) 0%, var(--wood) 40%, #291710 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 30px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s ease;
}
.table-wrap.my-turn .rail {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 2px var(--brass),
    0 0 26px rgba(217, 178, 106, 0.35),
    0 10px 30px rgba(0, 0, 0, 0.45);
}

.felt-surface {
  border-radius: 18px;
  padding: 14px 14px 18px;
  position: relative;
  background:
    radial-gradient(80% 60% at 50% -10%, rgba(255, 255, 255, 0.09), transparent 70%),
    radial-gradient(120% 100% at 50% 120%, var(--felt-dark), transparent 60%),
    linear-gradient(180deg, var(--felt-mid), var(--felt));
  box-shadow: inset 0 0 0 1px rgba(217, 178, 106, 0.25), inset 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* --- house strip -------------------------------------------------------- */

.house-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--brass-dim);
  background: rgba(217, 178, 106, 0.1);
  margin-bottom: 12px;
}
.house-strip.open { border-style: dashed; border-color: rgba(255, 255, 255, 0.14); color: var(--muted); }
.house-tag {
  font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--brass); margin-right: 7px;
}

/* --- dealer ------------------------------------------------------------- */

.dealer-zone { position: relative; text-align: center; padding: 2px 0 6px; min-height: 96px; }
.dealer-label { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 7px; }
.dealer-label .label {
  font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--brass);
}
.dealer-hand { justify-content: center; min-height: 62px; }

.hand-total {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  padding: 1px 8px;
  border-radius: 999px;
}
.hand-total.bust { color: var(--bad); border-color: rgba(242, 139, 130, 0.45); }

/* The shoe, tucked into the corner of the felt. */
.shoe { position: absolute; top: 0; right: 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.shoe-body {
  width: 22px; height: 42px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.shoe-fill {
  width: 100%;
  background: repeating-linear-gradient(0deg, #7b1f1f 0 3px, #5e1717 3px 6px);
  transition: height 0.5s ease;
}
.shoe-label { font-size: 0.52rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* --- rules printed on the felt ------------------------------------------ */

.felt-legend {
  text-align: center;
  padding: 8px 0 14px;
  display: flex; flex-direction: column; gap: 2px;
  color: rgba(217, 178, 106, 0.55);
}
.legend-main {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.28em;
}
.legend-sub {
  font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.25);
}

/* --- seats -------------------------------------------------------------- */

.seats { display: flex; gap: 8px; justify-content: center; align-items: flex-start; }
.seat {
  flex: 1 1 0; min-width: 0; max-width: 176px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 8px 6px 10px;
  border-radius: 14px;
  position: relative;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Seats sit around the bottom curve of the table. */
.seats-5 .seat:nth-child(2), .seats-5 .seat:nth-child(4) { transform: translateY(12px); }
.seats-5 .seat:nth-child(3) { transform: translateY(20px); }
.seats-4 .seat:nth-child(2), .seats-4 .seat:nth-child(3) { transform: translateY(16px); }
.seats-3 .seat:nth-child(2) { transform: translateY(16px); }

.seat.mine { background: rgba(217, 178, 106, 0.07); box-shadow: inset 0 0 0 1px var(--brass-dim); }
.seat.empty { opacity: 0.75; }

/* Whose turn it is: the acting seat lifts and glows, everyone else recedes. */
.seat.acting {
  background: rgba(217, 178, 106, 0.13);
  box-shadow: 0 0 0 2px var(--brass), 0 0 22px rgba(217, 178, 106, 0.4);
  z-index: 3;
}
.seats-5 .seat.acting:nth-child(2), .seats-5 .seat.acting:nth-child(4) { transform: translateY(8px) scale(1.03); }
.seats-5 .seat.acting:nth-child(3) { transform: translateY(16px) scale(1.03); }
.seat.acting:nth-child(1), .seat.acting:nth-child(5) { transform: translateY(-4px) scale(1.03); }
.seat.waiting { opacity: 0.5; }

.to-act {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 0.55rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em;
  background: var(--brass); color: #2a1e08;
  padding: 2px 9px; border-radius: 999px;
  white-space: nowrap;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 178, 106, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(217, 178, 106, 0); }
}

.seat-cards { display: flex; flex-direction: column; gap: 6px; align-items: center; min-height: 64px; justify-content: flex-end; }
.seat-hand { display: flex; flex-direction: column; gap: 3px; align-items: center; padding: 3px; border-radius: 8px; }
.seat-hand.bust { opacity: 0.45; }
.seat-hand.done { opacity: 0.62; }
.seat-hand.focus { background: rgba(217, 178, 106, 0.14); box-shadow: inset 0 0 0 1px var(--brass-dim); }
.hand-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.hand-bet { font-size: 0.6rem; color: var(--brass); font-variant-numeric: tabular-nums; }

.nameplate {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 0.78rem; text-align: center; width: 100%;
}
.nameplate.empty { gap: 6px; }
.nameplate.empty .money-input { max-width: 100%; flex: none; width: 100%; }
.nameplate.empty .btn { width: 100%; padding: 8px 10px; font-size: 0.78rem; }
.seat-no { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.seat-name { display: flex; align-items: center; justify-content: center; min-width: 0; }
.seat-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-stack { display: flex; align-items: center; gap: 5px; }
.stack-amount { font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bet-state { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.bet-state.ready { color: var(--good); }

/* --- betting circle ----------------------------------------------------- */

.bet-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.16);
  display: grid; place-items: center;
  position: relative;
  flex: none;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}
.bet-circle.has-bet {
  border-style: solid;
  border-color: var(--brass-dim);
  background: radial-gradient(circle, rgba(217, 178, 106, 0.14), transparent 72%);
  margin-bottom: 12px;
}
.bet-circle.dim { opacity: 0.6; }
.bet-amount {
  position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
  font-size: 0.62rem; color: var(--brass);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* --- chips -------------------------------------------------------------- */

.chip-stack { display: flex; gap: 3px; align-items: flex-end; }
.chip-col { position: relative; width: 26px; height: 30px; flex: none; }
.chip-stack.small .chip-col { width: 18px; height: 22px; }

.chip {
  position: absolute; left: 0; bottom: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: repeating-conic-gradient(var(--chip-edge) 0 14deg, var(--chip-body) 14deg 28deg);
  box-shadow: inset 0 0 0 3px var(--chip-body), 0 1px 2px rgba(0, 0, 0, 0.55);
}
.chip.small, .chip-stack.small .chip { width: 18px; height: 18px; box-shadow: inset 0 0 0 2px var(--chip-body), 0 1px 2px rgba(0, 0, 0, 0.5); }

.chip-face {
  width: 62%; height: 62%;
  border-radius: 50%;
  background: var(--chip-face);
  color: var(--chip-text);
  display: grid; place-items: center;
  font-size: 0.5rem; font-weight: 800; letter-spacing: -0.02em;
}
.chip-stack.small .chip-face, .chip.small .chip-face { font-size: 0.36rem; }

.chip.white  { --chip-body: #e8e6df; --chip-edge: #b9b6ab; --chip-face: #fbfaf6; --chip-text: #4a4a44; }
.chip.red    { --chip-body: #b8332a; --chip-edge: #8d241d; --chip-face: #f6e9e7; --chip-text: #a12a22; }
.chip.green  { --chip-body: #1c7a45; --chip-edge: #135631; --chip-face: #e7f4ec; --chip-text: #146336; }
.chip.black  { --chip-body: #24282d; --chip-edge: #0e1013; --chip-face: #e9ecef; --chip-text: #24282d; }
.chip.purple { --chip-body: #6b3585; --chip-edge: #4b2260; --chip-face: #f0e8f5; --chip-text: #5c2c72; }

.chip-count {
  position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%);
  font-size: 0.52rem; color: var(--muted); white-space: nowrap;
}

/* --- cards -------------------------------------------------------------- */

.hand { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }

.card {
  width: 42px; height: 60px;
  border-radius: 5px;
  background: linear-gradient(160deg, #fff, var(--card-face));
  color: var(--card-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  flex: none;
  animation: deal 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.card.small { width: 32px; height: 46px; }
.card.red { color: var(--card-red); }
.card-rank { font-size: 0.92rem; line-height: 1; }
.card.small .card-rank { font-size: 0.72rem; }
.card-suit { font-size: 0.84rem; line-height: 1; }
.card.small .card-suit { font-size: 0.66rem; }

.card.facedown {
  background:
    repeating-linear-gradient(45deg, #7b1f1f 0 4px, #5e1717 4px 8px);
  border: 2px solid var(--card-face);
}

@keyframes deal {
  from { opacity: 0; transform: translate(14px, -26px) rotate(-8deg) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* --- turn banner and action bar ----------------------------------------- */

.turn-banner {
  text-align: center;
  font-weight: 800; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: #2a1e08;
  background: linear-gradient(180deg, #f2d79c, var(--brass));
  padding: 9px;
  border-radius: 10px;
  margin-bottom: 10px;
  animation: banner 1.8s ease-in-out infinite;
}
@keyframes banner {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.13); }
}

.controls {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 14px;
}
.controls .actions .btn { flex: 1 1 90px; font-size: 1rem; padding: 14px 16px; }

.bet-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bet-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.chip-tray { display: flex; gap: 6px; }

.chip-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none; padding: 0;
  cursor: pointer;
  display: grid; place-items: center;
  background: repeating-conic-gradient(var(--chip-edge) 0 14deg, var(--chip-body) 14deg 28deg);
  box-shadow: inset 0 0 0 4px var(--chip-body), 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
}
.chip-btn:hover { transform: translateY(-3px); }
.chip-btn:active { transform: translateY(0); }
.chip-btn .chip-face { width: 64%; height: 64%; font-size: 0.66rem; }
.chip-btn.white  { --chip-body: #e8e6df; --chip-edge: #b9b6ab; --chip-face: #fbfaf6; --chip-text: #4a4a44; }
.chip-btn.red    { --chip-body: #b8332a; --chip-edge: #8d241d; --chip-face: #f6e9e7; --chip-text: #a12a22; }
.chip-btn.green  { --chip-body: #1c7a45; --chip-edge: #135631; --chip-face: #e7f4ec; --chip-text: #146336; }
.chip-btn.black  { --chip-body: #24282d; --chip-edge: #0e1013; --chip-face: #e9ecef; --chip-text: #24282d; }
.chip-btn.purple { --chip-body: #6b3585; --chip-edge: #4b2260; --chip-face: #f0e8f5; --chip-text: #5c2c72; }

.waiting-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brass);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.panel.results .history .amount { font-weight: 600; }

/* --- toasts ------------------------------------------------------------- */

#toasts {
  position: fixed; left: 50%; bottom: 20px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 50; pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  background: #14261c;
  border: 1px solid var(--brass-dim);
  color: var(--ink);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast.error { border-color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* --- narrow screens ----------------------------------------------------- */

/* Five seats across stops working well before this: around 700px each seat is
   ~104px wide, which is 4px too narrow for two cards side by side, so hands
   wrap into a vertical stack and stop reading as a hand. Switch to the two
   column layout while the seats are still comfortable. */
@media (max-width: 760px) {
  #app { padding: 14px 10px 24px; }
  .felt-surface { padding: 12px 8px 14px; }
  .seats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .seats .seat, .seats-5 .seat:nth-child(n) { transform: none; max-width: none; }
  .seats .seat.acting { transform: scale(1.02); }
  .legend-main { letter-spacing: 0.16em; font-size: 0.64rem; }
  .card { width: 36px; height: 52px; }
  .card.small { width: 28px; height: 40px; }

  /* Tighten the vertical budget so more of the table fits on one screen. */
  .seat { padding: 6px 4px 8px; gap: 6px; }
  .seat-cards { min-height: 54px; }
  .bet-circle { width: 50px; height: 50px; }
  .dealer-zone { min-height: 84px; }
  .felt-legend { padding: 6px 0 10px; }
  .nameplate.empty .money-input input { padding: 8px 8px 8px 20px; font-size: 0.8rem; }
  .nameplate.empty .btn { padding: 8px; font-size: 0.76rem; }

  /* Your turn and the buttons that answer it stay reachable. */
  .action-dock {
    position: sticky;
    bottom: 0;
    z-index: 20;
    padding-top: 10px;
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    background: linear-gradient(180deg, rgba(10, 28, 19, 0) 0%, var(--felt-dark) 34%);
  }
  .action-dock .controls { margin-bottom: 10px; }
  .controls .actions .btn { padding: 15px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .to-act, .turn-banner, .waiting-dot { animation: none; }
}
