* { box-sizing: border-box; }

:root {
  --felt: #1fa855;
  --felt-dark: #0f7a3d;
  --panel-bg: #1b1f24;
  --panel-bg-2: #22272e;
  --text: #e8eaed;
  --text-dim: #9aa4af;
  --accent: #d4af37;
  --good: #3fb950;
  --bad: #f85149;
  --ok: #d29922;
  --red-suit: #e5484d;
  --black-suit: #1a1a1a;
  --border: #333a42;
  --info-blue: #7ec8f2;

  /* Table/seat scale — overridden bigger in Play mode (see #app.mode-play)
     so the table fills the screen and portraits read well; Training mode
     keeps this compact default so the side panel stays the focus. */
  --table-max-width: 820px;
  --seat-width: 150px;
  --portrait-size: 52px;
  --portrait-size-hero: 76px;
  --card-w: 28px;
  --card-h: 40px;
  --card-hero-w: 40px;
  --card-hero-h: 56px;
  --card-rank-font: 0.7rem;
  --card-suit-font: 0.75rem;
  --card-hero-rank-font: 1rem;
  --card-hero-suit-font: 1.1rem;
  --seat-name-font: 0.82rem;
  --pos-badge-font: 0.6rem;
  --seat-status-font: 0.68rem;
  --placeholder-font: 1.6rem;
  --seat-box-padding: 7px 8px 8px;
  --community-card-w: 40px;
  --community-card-h: 56px;
  --community-rank-font: 1rem;
  --community-suit-font: 1.1rem;
}

#app.mode-play {
  --table-max-width: 1500px;
  --seat-width: 220px;
  --portrait-size: 92px;
  --portrait-size-hero: 122px;
  --card-w: 42px;
  --card-h: 60px;
  --card-hero-w: 58px;
  --card-hero-h: 82px;
  --card-rank-font: 0.95rem;
  --card-suit-font: 1rem;
  --card-hero-rank-font: 1.3rem;
  --card-hero-suit-font: 1.4rem;
  --seat-name-font: 1.05rem;
  --pos-badge-font: 0.75rem;
  --seat-status-font: 0.82rem;
  --placeholder-font: 2.6rem;
  --seat-box-padding: 10px 12px 12px;
  --community-card-w: 68px;
  --community-card-h: 96px;
  --community-rank-font: 1.5rem;
  --community-suit-font: 1.65rem;
}

/* "Big Screen Mode" — for viewing from a couch on a large TV, where the
   browser reports a normal desktop-ish viewport regardless of the screen's
   physical size, so nothing here can be auto-detected from a media query.
   User opts in via the settings panel; this layers on top of whichever
   mode (Play/Training) is active.
   Learned the hard way (twice) that growing --table-max-width and
   --seat-width much beyond Play mode's own numbers is risky without being
   able to test on the real device: seats are positioned by percentage of
   the table, but each seat box has a FIXED px width — if the table ends
   up narrower than the assumed target (because the TV's real viewport is
   smaller than guessed), the fixed-width boxes don't shrink to match and
   bleed off both the table and the screen edges. So this tier now stays
   close to Play mode's already-proven-safe table/seat sizing (~1.05-1.1x)
   and leans on the separate root font-size bump below for the bulk of the
   "bigger for the couch" effect, since that scales text without any
   layout-overflow risk.
   Font sizes here are deliberately px, not rem — html.big-screen (below)
   separately bumps the root font-size so every other plain-rem rule in
   this file (buttons, side panel, hand log, banners) scales too; if these
   were also rem they'd compound with that root bump and end up too big. */
html.big-screen #app {
  --table-max-width: 1600px;
  --seat-width: clamp(160px, 15vw, 230px);
  --portrait-size: 100px;
  --portrait-size-hero: 130px;
  --card-w: 46px;
  --card-h: 66px;
  --card-hero-w: 62px;
  --card-hero-h: 88px;
  --card-rank-font: 15px;
  --card-suit-font: 16px;
  --card-hero-rank-font: 21px;
  --card-hero-suit-font: 22px;
  --seat-name-font: 18px;
  --pos-badge-font: 13px;
  --seat-status-font: 14px;
  --placeholder-font: 44px;
  --seat-box-padding: 11px 13px 13px;
  --community-card-w: 74px;
  --community-card-h: 104px;
  --community-rank-font: 25px;
  --community-suit-font: 27px;
}
html.big-screen { font-size: 22px; }
html.big-screen #bust-portrait { width: 552px; height: 534px; }
html.big-screen #bust-portrait .bust-placeholder { width: 460px; height: 460px; }
html.big-screen #decision-hand .card { width: 37px; height: 53px; }

html, body {
  margin: 0;
  height: 100%;
  background: #10141a;
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#top-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 20px;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
}
#top-bar h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  margin: 0;
  white-space: nowrap;
}
#session-info { display: none; }

#top-bar-right { grid-column: 3; justify-self: end; position: relative; display: flex; align-items: center; gap: 8px; }
#btn-settings, #btn-fullscreen {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#btn-settings:hover, #btn-fullscreen:hover { border-color: var(--accent); color: var(--text); }

#btn-close-game {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  background: rgba(10, 14, 10, 0.75);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
#btn-close-game:hover { border-color: var(--accent); color: var(--text); }
#btn-close-game[hidden] { display: none; }

#settings-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 220px;
  padding: 14px 16px;
  background: var(--panel-bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 50;
}
#settings-panel[hidden] { display: none; }
.settings-row { display: flex; flex-direction: column; gap: 6px; }
.settings-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
#settings-panel #volume-slider { width: 100%; accent-color: var(--accent); }
.settings-row-checkbox .settings-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
#big-screen-toggle { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

#mode-nav { display: flex; gap: 6px; }
.nav-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-link:hover { border-color: var(--accent); color: var(--text); }
.nav-link.active { background: var(--accent); border-color: var(--accent); color: #1a1200; }

#main-area {
  flex: 1;
  display: flex;
  min-height: 0;
}

#table-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-width: 0;
  background:
    linear-gradient(rgba(8,10,14,0.25), rgba(8,10,14,0.25)),
    url('../assets/bg.png?v=2') center / cover no-repeat;
}

#table {
  position: relative;
  width: 100%;
  max-width: var(--table-max-width);
  max-height: 84%;
  aspect-ratio: 16 / 10;
  background: radial-gradient(ellipse at center, var(--felt) 0%, var(--felt-dark) 100%);
  border: 12px solid #3a2415;
  border-radius: 50% / 45%;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.25), 0 10px 30px rgba(0,0,0,0.6);
}

#community {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 6px;
}
#community .card { width: var(--community-card-w); height: var(--community-card-h); }
#community .card .rank { font-size: var(--community-rank-font); }
#community .card .suit { font-size: var(--community-suit-font); }

#bust-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  animation: bust-pop 0.25s ease-out;
}
#bust-overlay[hidden] { display: none; }
@keyframes bust-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
#bust-portrait {
  width: 480px;
  height: 464px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.7));
}
#bust-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#bust-portrait .bust-placeholder {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: var(--panel-bg-2);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9rem;
  font-weight: 700;
  color: var(--text-dim);
}
#bust-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 0 2px rgba(0,0,0,0.9);
}
#btn-bust-continue {
  width: auto;
  padding: 6px 22px;
  font-size: 0.8rem;
  margin-top: 0;
}

#pot-display {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.4);
  padding: 4px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

#table-winner-banner {
  position: absolute;
  top: 63%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  color: #29c5ff;
  -webkit-text-stroke: 2px #ff36b3;
  paint-order: stroke fill;
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  max-width: 90%;
  animation: winner-pulse 1.3s ease-in-out infinite;
}
@keyframes winner-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    text-shadow: 0 0 10px rgba(255,54,179,0.6), 0 0 3px rgba(255,54,179,0.9);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.07);
    text-shadow: 0 0 26px rgba(255,54,179,1), 0 0 10px rgba(255,54,179,1);
  }
}

.card {
  width: 40px;
  height: 56px;
  background: #f5f5f0;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  color: var(--black-suit);
  border: 1px solid rgba(0,0,0,0.15);
}
.card.red { color: var(--red-suit); }
.card .rank { font-size: 1rem; }
.card .suit { font-size: 1.1rem; }
.card.back {
  background: repeating-linear-gradient(45deg, #2b4a8a, #2b4a8a 4px, #23407a 4px, #23407a 8px);
  border: 1px solid rgba(255,255,255,0.15);
}
.card.placeholder {
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.15);
  box-shadow: none;
}

.seat {
  position: absolute;
  width: var(--seat-width);
  transform: translate(-50%, -50%);
  text-align: center;
}
.seat[data-seat="0"] { left: 50%; top: 90%; }
.seat[data-seat="1"] { left: 12%; top: 68%; }
.seat[data-seat="2"] { left: 8%; top: 30%; }
.seat[data-seat="3"] { left: 50%; top: 11%; }
.seat[data-seat="4"] { left: 92%; top: 30%; }
.seat[data-seat="5"] { left: 88%; top: 68%; }

.seat-box {
  background: rgba(10,14,18,0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--seat-box-padding);
  position: relative;
}
.seat.acting .seat-box {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(212,175,55,0.6);
}
.seat.folded .seat-face { opacity: 0.35; }
.seat.folded .seat-cards .card { opacity: 0.35; }
.seat.busted .seat-box { opacity: 0.3; filter: grayscale(1); }
.seat.busted .seat-status { color: var(--bad); font-weight: 700; }
.seat.winner .seat-box {
  border-color: var(--good);
  box-shadow: 0 0 14px rgba(63,185,80,0.6);
}

.seat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
}
.seat-header .seat-name { color: var(--accent); font-weight: 700; font-size: var(--seat-name-font); }
.seat-header .seat-stack { color: var(--accent); font-weight: 700; font-size: var(--seat-name-font); }

.seat-portrait-wrap {
  position: relative;
  width: var(--portrait-size);
  height: var(--portrait-size);
  margin: 0 auto 5px;
}
.seat-face {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--panel-bg-2);
}
.seat-face-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--placeholder-font);
  color: var(--text-dim);
}
.seat.acting .seat-face { border-color: var(--accent); }
.seat.busted .seat-face { opacity: 0.3; filter: grayscale(1); }

.seat-pos-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: var(--pos-badge-font);
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 6px;
  white-space: nowrap;
}

.seat-cards { display: flex; gap: 3px; justify-content: center; margin: 4px 0 2px; }
.seat-cards .card { width: var(--card-w); height: var(--card-h); font-size: var(--card-rank-font); }
.seat-cards .card .rank { font-size: var(--card-rank-font); }
.seat-cards .card .suit { font-size: var(--card-suit-font); }
.seat-status { font-size: var(--seat-status-font); color: var(--text-dim); min-height: 12px; text-align: center; }
.seat-bet {
  font-size: 0.7rem;
  background: rgba(212,175,55,0.15);
  color: var(--accent);
  border-radius: 8px;
  padding: 1px 6px;
  display: inline-block;
  margin-top: 2px;
}
.dealer-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #eee;
  color: #111;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.seat[data-seat="0"] .seat-box { border-color: var(--accent); }
.seat[data-seat="0"] .seat-portrait-wrap { width: var(--portrait-size-hero); height: var(--portrait-size-hero); }
.seat[data-seat="0"] .seat-face { border-color: var(--accent); object-position: 50% 10%; }
.seat[data-seat="0"] .seat-cards .card { width: var(--card-hero-w); height: var(--card-hero-h); }
.seat[data-seat="0"] .seat-cards .card .rank { font-size: var(--card-hero-rank-font); }
.seat[data-seat="0"] .seat-cards .card .suit { font-size: var(--card-hero-suit-font); }

#side-panel {
  width: 360px;
  flex-shrink: 0;
  background: var(--panel-bg);
  border-left: 1px solid var(--border);
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.panel-view h2 { font-size: 1.05rem; margin: 0 0 12px; }

/* Play mode: instead of hiding the action panel while other players act,
   keep it visible but dimmed and unclickable, then re-activate it the
   instant it's the hero's turn again. */
#panel-decision.inactive {
  opacity: 0.4;
  pointer-events: none;
}
.panel-view p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.4; }

.primary-btn {
  background: var(--accent);
  color: #1a1200;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.secondary-btn {
  background: var(--panel-bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}
.secondary-btn:hover { border-color: var(--accent); }

#decision-info {
  background: var(--panel-bg-2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}
#decision-info b { color: var(--text); }

#decision-hand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
#decision-hand .card { width: 32px; height: 46px; }

/* Play mode: the log lives at the top of the side panel, outside the
   panel-view swap, so it's visible the instant the session starts (not
   just during the hero's own decision) and grows to fill whatever space
   the current panel-view doesn't need. */
#play-log-wrap {
  display: none;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 16px;
}
#play-log-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-align: center;
  flex-shrink: 0;
}
#play-log-entries {
  background: #000;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  flex: 1;
  min-height: 140px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}
#play-log-entries .log-street { color: var(--accent); font-weight: 700; margin-top: 4px; display: block; }
#play-log-entries .log-prompt { color: var(--info-blue); font-weight: 700; margin-top: 4px; display: block; }

#app.mode-play #decision-title,
#app.mode-play #decision-info,
#app.mode-play #decision-hand {
  display: none;
}
#app.mode-play #play-log-wrap { display: flex; flex: 1; }
#app.mode-play #log-panel { display: none; }

.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel-bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}
.choice-btn:hover { border-color: var(--accent); }
.choice-btn.selected { border-color: var(--accent); background: rgba(212,175,55,0.12); }

#amount-controls { margin-top: 8px; margin-bottom: 6px; }
#amount-controls label { font-size: 0.78rem; color: var(--text-dim); display: block; margin-bottom: 4px; }
#amount-input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-bg-2);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 6px;
}
#amount-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.preset-btn {
  flex: 1;
  min-width: 60px;
  background: var(--panel-bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 4px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
}
.preset-btn:hover { color: var(--text); border-color: var(--accent); }

#verdict-banner {
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
#verdict-banner.good { background: rgba(63,185,80,0.15); color: var(--good); border: 1px solid rgba(63,185,80,0.4); }
#verdict-banner.bad { background: rgba(248,81,73,0.15); color: var(--bad); border: 1px solid rgba(248,81,73,0.4); }
#verdict-banner.ok { background: rgba(210,153,34,0.15); color: var(--ok); border: 1px solid rgba(210,153,34,0.4); }

#feedback-reasoning { font-size: 0.86rem; color: var(--text); line-height: 1.5; }
#feedback-stats {
  font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--panel-bg-2);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 10px 0;
  display: none;
}
#feedback-stats.show { display: block; }

#result-body { font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 8px; }
#result-body .win-line { color: var(--good); font-weight: 600; }
#session-over-body { font-size: 0.85rem; color: var(--text-dim); line-height: 1.6; }

#log-panel {
  height: 130px;
  background: var(--panel-bg);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  overflow-y: auto;
  flex-shrink: 0;
}
#log-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 4px; }
#log-entries { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; }
#log-entries .log-street { color: var(--accent); font-weight: 700; margin-top: 4px; display: block; }
#log-entries .log-prompt { color: var(--info-blue); font-weight: 700; margin-top: 4px; display: block; }
#log-entries .log-win { color: var(--good); }

/* Mobile / narrow viewports: stack the table above the side panel instead
   of squeezing a fixed-width panel beside it, and let the page scroll. */
@media (max-width: 880px) {
  html, body { height: auto; min-height: 100%; }
  #app { height: auto; min-height: 100vh; }

  #top-bar { padding: 10px 14px; }
  #top-bar h1 { font-size: 1.05rem; }
  #settings-panel { min-width: 180px; }

  #main-area { flex-direction: column; }

  #table-wrap { flex: none; padding: 12px 8px 4px; }
  #table { max-width: 480px; }

  #community { gap: 4px; }
  #community .card { width: 26px; height: 37px; }
  #community .card .rank { font-size: 0.62rem; }
  #community .card .suit { font-size: 0.68rem; }
  #pot-display { top: 60%; font-size: 0.78rem; padding: 3px 10px; }
  #table-winner-banner { top: 72%; font-size: 0.95rem; }

  #bust-portrait { width: 140px; height: 136px; }
  #bust-portrait .bust-placeholder { width: 120px; height: 120px; font-size: 2.8rem; }
  #bust-text { font-size: 0.9rem; }
  #btn-bust-continue { padding: 5px 16px; font-size: 0.72rem; }

  .seat { width: 100px; }
  .seat-box { padding: 5px 5px 6px; }
  .seat-header .seat-name, .seat-header .seat-stack { font-size: 0.66rem; }
  .seat-status { font-size: 0.6rem; }
  .seat-pos-badge { font-size: 0.52rem; padding: 0 4px; }
  .seat-cards .card { width: 22px; height: 32px; font-size: 0.6rem; }
  .seat-cards .card .rank { font-size: 0.6rem; }
  .seat-cards .card .suit { font-size: 0.65rem; }
  .seat[data-seat="0"] .seat-cards .card { width: 32px; height: 46px; }
  .seat[data-seat="0"] .seat-cards .card .rank { font-size: 0.85rem; }
  .seat[data-seat="0"] .seat-cards .card .suit { font-size: 0.9rem; }
  .seat-portrait-wrap { width: 42px; height: 42px; margin-bottom: 3px; }
  .seat-face-placeholder { font-size: 1.1rem; }
  .seat[data-seat="0"] .seat-portrait-wrap { width: 52px; height: 52px; }

  #side-panel {
    width: 100%;
    flex-shrink: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 14px;
    overflow-y: visible;
    display: block; /* no bounded height here for flex:1 to grow into */
  }

  #app.mode-play #play-log-wrap { display: flex; flex: none; }
  #play-log-entries { flex: none; min-height: 0; height: 220px; }

  #log-panel { height: 110px; padding: 6px 14px; }
}

@media (max-width: 420px) {
  #table { max-width: 100%; }
  .seat { width: 100px; }
  .seat-cards .card { width: 19px; height: 28px; }
}
