/* =====================================================================
   Euchre — "Midnight" theme (chosen by Bryan, 2026-11-21)
   Navy felt inside a charcoal leather rail, champagne-gold accents.
   Sibling of the Sheepshead look (felt, gold, cream cards) but with a
   rounded-rectangle leather-rail table, fixed N/E/S/W cross and a new back.
   System fonts only. No external requests. Images: ../img/*.svg
   ===================================================================== */

:root {
  /* table */
  --felt: #24407a;
  --felt-mid: #16295a;
  --felt-dark: #0b1630;
  --rail: #1d2029;
  --rail-light: #2a2e38;
  --rail-dark: #0e1015;
  --room: #070a12;

  /* surfaces + ink (ink on panel ≈ 14:1, muted on panel ≈ 7.5:1) */
  --panel: #111a2e;
  --panel-2: #1a2642;
  --line: rgba(238, 241, 247, 0.14);
  --ink: #eef1f7;
  --muted: #aab6cc;

  /* accent */
  --gold: #e8c56d;
  --gold-light: #f3dc9c;
  --gold-dark: #a88a3e;
  --on-gold: #1a1405;

  /* teams (both ≥ 7:1 on --panel) */
  --us: #e8c56d;
  --them: #9fb4d9;

  /* states */
  --danger: #e2735f;
  --danger-bg: #8c2a1d;
  --good: #8fd19e;

  /* cards */
  --card-face: #fffdf6;
  --card-face-2: #f1e9d6;
  --card-edge: #cbb88a;
  --card-black: #1c1d24;
  --card-red: #b3202c;

  --card-w: 76px;
  --card-h: 108px;
  --small-w: 34px;
  --small-h: 48px;
  --trick-w: 62px;
  --trick-h: 88px;

  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --suit-font: "Apple Symbols", "Segoe UI Symbol", "DejaVu Sans", Georgia, serif;

  color-scheme: dark;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

.hidden, [hidden] { display: none !important; }

body.euchre {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 35%, #121a2c 0%, var(--room) 70%) fixed,
    var(--room);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* suits must render as text glyphs, never emoji */
.idx-suit, .suit-mid, .trump-suit {
  font-family: var(--suit-font);
  font-variant-emoji: text;
}

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------------
   Top bar
   --------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(180deg, #18233b, var(--panel));
  border-bottom: 2px solid var(--gold-dark);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 5;
}
.topbar h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.topbar-actions { display: flex; gap: 8px; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 36px;
  padding: 8px 14px;
  font: 600 0.9rem/1.1 var(--font);
  cursor: pointer;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--on-gold);
  box-shadow: 0 2px 0 var(--gold-dark), 0 3px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.1s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--gold-dark); }
.btn:disabled { opacity: 0.4; cursor: default; filter: none; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(238, 241, 247, 0.35);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(238, 241, 247, 0.08); border-color: var(--gold); }
.btn-primary { /* gold default */ }
.btn-large { width: 100%; min-height: 48px; padding: 12px 20px; font-size: 1.05rem; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------------
   Settings screen
   --------------------------------------------------------------------- */
#screenSettings { padding: 24px 16px 40px; }

.panel {
  max-width: 560px;
  margin: 12px auto;
  padding: 28px 28px 24px;
  background:
    linear-gradient(180deg, rgba(232, 197, 109, 0.06), transparent 120px),
    var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold-light);
}

.field { margin-bottom: 22px; }
.field > label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field > label.checkbox {
  display: flex;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.hint { color: var(--muted); font-size: 0.82rem; line-height: 1.45; margin: 8px 0 0; }

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.segmented button {
  flex: 1 1 0;
  min-width: 84px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: 500 0.9rem var(--font);
  cursor: pointer;
}
.segmented button:hover { background: rgba(238, 241, 247, 0.07); }
.segmented button.active {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--on-gold);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}
.checkbox input, .alone-toggle input { width: 18px; height: 18px; accent-color: var(--gold); }

.panel input[type="text"], input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(238, 241, 247, 0.3);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font: 1rem var(--font);
}
input[type="text"]:focus-visible { border-color: var(--gold); }

#btnStartGame { margin-top: 6px; }
.tagline { margin: -8px 0 22px; color: var(--muted); line-height: 1.5; font-size: 0.95rem; }
.footer-note { text-align: center; color: var(--muted); font-size: 0.78rem; margin: 18px 0 0; }

/* ---------------------------------------------------------------------
   Table screen layout
   --------------------------------------------------------------------- */
#screenTable {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- score bar ---------------------------------------------------- */
.score-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
}

.team-score {
  display: grid;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
  padding: 8px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.team-score.team-us { border-left: 4px solid var(--us); }
.team-score.team-them {
  border-right: 4px solid var(--them);
  text-align: right;
  align-items: flex-end;
}
.team-points-wrap { display: flex; align-items: baseline; gap: 6px; }
.team-them .team-points-wrap { flex-direction: row-reverse; }
.team-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.team-us .team-name { color: var(--us); }
.team-them .team-name { color: var(--them); }
.team-points {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.team-goal { font-size: 0.85rem; color: var(--muted); }
.team-tricks {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}
.team-them .team-tricks { justify-content: flex-end; }
.trick-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(238, 241, 247, 0.4);
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.team-us .trick-pip.won { background: var(--us); border-color: var(--us); box-shadow: 0 0 6px rgba(232, 197, 109, 0.6); }
.team-them .trick-pip.won { background: var(--them); border-color: var(--them); box-shadow: 0 0 6px rgba(159, 180, 217, 0.6); }

/* ---- trump indicator --------------------------------------------- */
.trump-indicator {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "suit label"
    "suit maker";
  align-items: center;
  column-gap: 12px;
  min-width: 190px;
  padding: 8px 16px 8px 10px;
  background: var(--panel);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  box-shadow: 0 0 0 3px rgba(232, 197, 109, 0.12), 0 4px 14px rgba(0, 0, 0, 0.3);
  position: relative;
}
.trump-suit {
  grid-area: suit;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--card-face), var(--card-face-2));
  border: 2px solid var(--gold);
  color: var(--card-black);
  font-size: 2rem;
  line-height: 1;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}
.trump-indicator.red .trump-suit { color: var(--card-red); }
.trump-label {
  grid-area: label;
  align-self: end;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.trump-maker { grid-area: maker; align-self: start; font-size: 0.85rem; color: var(--ink); }
.trump-maker .badge.alone { margin-left: 6px; vertical-align: 1px; }
.trump-indicator.empty { border-style: dashed; border-color: rgba(238, 241, 247, 0.3); box-shadow: none; }
.trump-indicator.empty .trump-suit {
  background: transparent;
  border: 2px dashed rgba(238, 241, 247, 0.3);
  color: var(--muted);
  font-size: 1.4rem;
}
.trump-indicator.empty .trump-label { color: var(--muted); }
.trump-indicator.empty .trump-maker { color: var(--muted); }

/* ---- hand status banner ----------------------------------------- */
.hand-status-banner {
  align-self: center;
  padding: 6px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-align: center;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  animation: banner-in 0.35s ease-out;
}
.hand-status-banner:empty { display: none; }
.hand-status-banner.alone { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--on-gold); border-color: var(--gold-dark); }
.hand-status-banner.euchred { background: var(--danger-bg); color: #fff4ef; border-color: var(--danger); }
.hand-status-banner.march { background: #1d3a73; color: #f3f6fc; border-color: var(--us); }
@keyframes banner-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   The table: charcoal leather rail + navy felt, fixed compass cross
   --------------------------------------------------------------------- */
.table {
  position: relative;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(300px, 2.2fr) minmax(130px, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    ".     north  ."
    "west  center east";
  align-items: center;
  justify-items: center;
  gap: 10px;
  padding: 16px 20px 18px;
  border-radius: 56px;
  /* felt */
  background:
    url("../img/felt-texture.svg") 0 0 / 160px 160px repeat,
    radial-gradient(ellipse 75% 70% at 50% 45%, var(--felt) 0%, var(--felt-mid) 55%, var(--felt-dark) 100%);
  /* leather rail */
  border: 16px solid var(--rail);
  border-image: none;
  box-shadow:
    inset 0 0 0 2px rgba(232, 197, 109, 0.55),      /* brass inlay */
    inset 0 0 0 6px rgba(0, 0, 0, 0.25),
    inset 0 10px 40px rgba(0, 0, 0, 0.45),         /* felt depth */
    0 0 0 2px var(--rail-dark),
    0 0 0 3px rgba(243, 220, 156, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.6);
}
/* leather grain on the rail */
.table::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 56px;
  padding: 16px;
  background:
    url("../img/leather-rail.svg") 0 0 / 400px 200px repeat,
    linear-gradient(160deg, var(--rail-light) 0%, var(--rail) 35%, #16181f 70%, var(--rail-dark) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 0;
}
/* faint felt watermark */
.table::after {
  content: "EUCHRE";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: rgba(0, 0, 0, 0.13);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 0;
}
.table > * { position: relative; z-index: 1; }

.table-wrap { display: flex; flex-direction: column; gap: 6px; }

/* ---- seats -------------------------------------------------------- */
.seat-north { grid-area: north; }
.seat-west  { grid-area: west; }
.seat-east  { grid-area: east; }
.seat-south { grid-area: south; }
.table-center { grid-area: center; }

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 128px;
  padding: 8px 12px 8px;
  background: rgba(6, 10, 22, 0.55);
  border: 2px solid transparent;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}
.seat.team-us   { border-bottom-color: rgba(232, 197, 109, 0.55); }
.seat.team-them { border-bottom-color: rgba(159, 180, 217, 0.55); }

.seat.turn {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 197, 109, 0.25), 0 0 22px rgba(232, 197, 109, 0.45);
  animation: turn-glow 1.6s ease-in-out infinite;
}
@keyframes turn-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(232, 197, 109, 0.2), 0 0 14px rgba(232, 197, 109, 0.3); }
  50%      { box-shadow: 0 0 0 4px rgba(232, 197, 109, 0.35), 0 0 26px rgba(232, 197, 109, 0.6); }
}
.seat.maker .avatar { box-shadow: 0 0 0 3px var(--gold), 0 2px 6px rgba(0, 0, 0, 0.5); }
.seat.sitting-out { opacity: 0.42; filter: grayscale(0.7); }
.seat.sitting-out .seat-tricks::after { content: " · sitting out"; }

.seat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.seat-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.seat-badges { display: inline-flex; gap: 4px; align-items: center; }
.seat-badges:empty { display: none; }
.seat-tricks { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font: 700 0.95rem var(--serif);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.avatar.c0 { background: linear-gradient(160deg, #d9a93a, #8f6a14); }
.avatar.c1 { background: linear-gradient(160deg, #5f86c9, #2f4f86); }
.avatar.c2 { background: linear-gradient(160deg, #3fa1a6, #1f5f63); }
.avatar.c3 { background: linear-gradient(160deg, #c46a4f, #7d3626); }

/* badges */
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  background: var(--gold);
  color: var(--on-gold);
  white-space: nowrap;
}
.badge.dealer {
  /* the dealer button: a cream poker-style chip */
  width: 22px;
  height: 22px;
  padding: 0;
  background: radial-gradient(circle, var(--card-face) 55%, var(--card-face-2) 56%);
  color: var(--card-black);
  border: 2px dashed var(--gold-dark);
  font-family: var(--serif);
  font-size: 0.72rem;
}
.badge.maker { background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.badge.alone { background: var(--danger-bg); color: #fff4ef; box-shadow: 0 0 0 1px var(--danger); }

/* opponent / partner face-down fan */
.seat-hand {
  display: flex;
  justify-content: center;
  min-height: var(--small-h);
}
.seat-hand .card.back.small + .card.back.small { margin-left: calc(var(--small-w) * -0.55); }
.seat-west .seat-hand .card:nth-child(odd),
.seat-east .seat-hand .card:nth-child(odd) { transform: translateY(2px); }

/* ---- center: kitty / trick / message ----------------------------- */
.table-center {
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.table-center > .kitty,
.table-center > .trick-area { grid-row: 1; grid-column: 1; }
.table-center > .center-message { grid-row: 2; grid-column: 1; }
.table-center > .action-panel { grid-row: 3; grid-column: 1; }

.kitty {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px dashed rgba(243, 220, 156, 0.35);
}
.kitty-stack {
  position: relative;
  width: calc(var(--small-w) + 8px);
  height: calc(var(--small-h) + 8px);
}
.kitty-stack .card.back.small { position: absolute; }
.kitty-stack .card:nth-child(1) { left: 0; top: 0; }
.kitty-stack .card:nth-child(2) { left: 4px; top: 4px; }
.kitty-stack .card:nth-child(3) { left: 8px; top: 8px; }

.card.upcard {
  transform: rotate(4deg);
  box-shadow: 0 0 0 2px var(--gold), 0 8px 18px rgba(0, 0, 0, 0.5);
}
.card.upcard.turned-down {
  transform: rotate(-2deg) scale(0.92);
  background: #0f1d3b url("../img/card-back.svg") center / cover no-repeat;
  border-color: #070e1f;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  filter: brightness(0.8);
}
.card.upcard.turned-down > * { visibility: hidden; }
.card.upcard.turned-down::before { display: none; }

/* trick: four slots in a compass cross */
.trick-area {
  position: relative;
  width: calc(var(--trick-w) * 3 + 8px);
  height: calc(var(--trick-h) * 2 + 16px);
}
.trick-slot { position: absolute; width: var(--trick-w); height: var(--trick-h); }
.trick-slot.slot-north { left: 50%; top: 0;    transform: translateX(-50%); }
.trick-slot.slot-south { left: 50%; bottom: 0; transform: translateX(-50%); }
.trick-slot.slot-west  { left: 0;   top: 50%;  transform: translateY(-50%) rotate(-6deg); }
.trick-slot.slot-east  { right: 0;  top: 50%;  transform: translateY(-50%) rotate(6deg); }
.trick-slot .card {
  width: var(--trick-w);
  height: var(--trick-h);
  animation: card-in 0.22s ease-out;
}
.trick-slot.slot-south .card { z-index: 2; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px) scale(0.9); } to { opacity: 1; transform: none; } }

.trick-slot .card.winner, .card.winner {
  z-index: 3;
  transform: scale(1.08);
  box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(243, 220, 156, 0.75), 0 8px 18px rgba(0, 0, 0, 0.5);
  animation: winner-pop 0.4s ease-out;
}
@keyframes winner-pop { 0% { transform: scale(1); } 60% { transform: scale(1.14); } 100% { transform: scale(1.08); } }

.center-message {
  min-height: 1.5em;
  max-width: 100%;
  padding: 0 8px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.center-message:not(:empty) {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(6, 10, 22, 0.6);
}

/* ---- action panel ------------------------------------------------- */
.action-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.action-panel:empty { min-height: 0; }
.action-prompt {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.action-row { display: contents; }  /* buttons + "Go alone" share one wrapping line */
.suit-inline { font-family: var(--suit-font); font-variant-emoji: text; color: var(--ink); }
.suit-inline.red { color: #ff8e9e; } /* red suit on dark: 6.6:1 on panel */
.modal .suit-inline { font-size: 1.05em; }

.btn-bid { min-width: 120px; min-height: 42px; font-size: 0.95rem; }
.btn-bid:only-of-type { min-width: 160px; }

.btn-suit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 14px 6px 10px;
  background: linear-gradient(180deg, var(--card-face), var(--card-face-2));
  color: var(--card-black);
  border: 1px solid var(--card-edge);
  box-shadow: 0 2px 0 #9f8c5c, 0 3px 8px rgba(0, 0, 0, 0.35);
  font-family: var(--font);
  font-variant-emoji: text;
  font-size: 0.95rem;
}
.btn-suit.red { color: var(--card-red); }
.btn-suit:hover { box-shadow: 0 0 0 2px var(--gold), 0 2px 0 #9f8c5c; filter: none; }

.alone-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(238, 241, 247, 0.35);
  background: rgba(6, 10, 22, 0.5);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.alone-toggle:has(input:checked) { border-color: var(--danger); background: rgba(140, 42, 29, 0.55); }

/* ---------------------------------------------------------------------
   Human seat + hand
   --------------------------------------------------------------------- */
.seat.seat-south.human-seat {
  width: 100%;
  min-width: 0;
  padding: 6px 8px 10px;
  background: transparent;
  box-shadow: none;
  border: 0;
  backdrop-filter: none;
  flex-direction: column-reverse;   /* hand above, name tag below */
  align-self: center;
  gap: 8px;
}
.seat.seat-south.human-seat .seat-head {
  width: max-content;
  max-width: 100%;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: rgba(6, 10, 22, 0.6);
  border: 2px solid transparent;
}
.seat.seat-south.human-seat.turn { animation: none; box-shadow: none; }
.seat.seat-south.human-seat.turn .seat-head {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(232, 197, 109, 0.5);
}
.seat.seat-south.human-seat .seat-tricks { margin-left: 4px; }
.seat.seat-south.human-seat .seat-head > * { flex-shrink: 0; }

.hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  min-height: calc(var(--card-h) + 14px);
  padding-top: 14px;   /* room for the hover lift */
}
.hand .card { flex-shrink: 0; }
.hand .card.playable { cursor: pointer; }
.hand .card.playable:hover,
.hand .card.playable:focus-visible {
  transform: translateY(-12px);
  box-shadow: 0 0 0 2px var(--gold), 0 12px 20px rgba(0, 0, 0, 0.5);
}
.hand .card.disabled { filter: brightness(0.55) saturate(0.6); cursor: not-allowed; }
.hand .card.selected {
  transform: translateY(-14px);
  box-shadow: 0 0 0 3px var(--gold-light), 0 0 18px rgba(243, 220, 156, 0.7), 0 12px 20px rgba(0, 0, 0, 0.5);
}


/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.card {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(165deg, var(--card-face) 0%, var(--card-face-2) 100%);
  color: var(--card-black);
  border: 1px solid var(--card-edge);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-size: 1rem;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}
/* inner frame line */
.card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(15, 29, 59, 0.16);
  border-radius: 5px;
  pointer-events: none;
}
.card.red { color: var(--card-red); }

.card .rank-top {
  position: absolute;
  top: 5px;
  left: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.card .idx-rank { font-family: var(--serif); font-size: 1.15em; letter-spacing: -0.04em; }
.card .idx-suit { font-size: 0.95em; margin-top: 1px; }
.card .suit-mid {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 8px;
  font-size: 2.5rem;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

/* court cards: framed panel with the rank letter over the suit */
.card[data-id^="J"] .suit-mid,
.card[data-id^="Q"] .suit-mid,
.card[data-id^="K"] .suit-mid {
  inset: 18% 14% 10% 32%;
  padding-top: 0;
  align-content: center;
  gap: 0;
  font-size: 1.35rem;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  background:
    repeating-linear-gradient(45deg, rgba(232, 197, 109, 0.14) 0 3px, transparent 3px 6px),
    rgba(232, 197, 109, 0.1);
  box-shadow: inset 0 0 0 2px rgba(255, 253, 246, 0.9), inset 0 0 0 3px rgba(168, 138, 62, 0.6);
}
.card[data-id^="J"] .suit-mid::before,
.card[data-id^="Q"] .suit-mid::before,
.card[data-id^="K"] .suit-mid::before {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 0.95;
}
.card[data-id^="J"] .suit-mid::before { content: "J"; }
.card[data-id^="Q"] .suit-mid::before { content: "Q"; }
.card[data-id^="K"] .suit-mid::before { content: "K"; }
/* ace: one big pip */
.card[data-id^="A"] .suit-mid { font-size: 3.1rem; }

/* ---- trump + bowers ---------------------------------------------- */
.card.trump {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(232, 197, 109, 0.45), 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(165deg, rgba(243, 220, 156, 0.28), transparent 45%),
    linear-gradient(165deg, var(--card-face) 0%, var(--card-face-2) 100%);
}
/* small gold corner fold on every trump card */
.card.trump::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  border-top-right-radius: 7px;
  background: linear-gradient(225deg, var(--gold) 50%, transparent 50%);
  pointer-events: none;
}
/* bowers: a labelled ribbon instead of the fold */
.card.bower-right::after,
.card.bower-left::after {
  width: auto;
  height: auto;
  top: auto;
  right: auto;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 5px;
  white-space: nowrap;
  border-radius: 3px;
  font: 800 0.55rem/1 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-gold);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.card.bower-right::after {
  content: "★ Right";
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}
.card.bower-left::after {
  content: "☆ Left";
  background: linear-gradient(180deg, #f4ead0, #d8c79c);
  box-shadow: 0 0 0 1px var(--gold-dark), 0 1px 2px rgba(0, 0, 0, 0.35);
}
.card.bower-right { box-shadow: 0 0 0 3px var(--gold), 0 0 14px rgba(243, 220, 156, 0.55), 0 3px 6px rgba(0, 0, 0, 0.4); }
.card.bower-left  { box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px rgba(243, 220, 156, 0.35), 0 3px 6px rgba(0, 0, 0, 0.4); }
/* combined states keep their state ring on top of the trump ring */
.hand .card.trump.playable:hover,
.hand .card.trump.playable:focus-visible { box-shadow: 0 0 0 3px var(--gold-light), 0 0 16px rgba(243, 220, 156, 0.6), 0 12px 20px rgba(0, 0, 0, 0.5); }

/* ---- back --------------------------------------------------------- */
.card.back {
  background: #0f1d3b url("../img/card-back.svg") center / 100% 100% no-repeat;
  border: 1px solid #070e1f;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}
.card.back::before, .card.back::after { display: none; }

/* ---- small -------------------------------------------------------- */
.card.small {
  width: var(--small-w);
  height: var(--small-h);
  border-radius: 4px;
  font-size: 0.62rem;
}
.card.small .rank-top { top: 3px; left: 3px; }
.card.small .suit-mid { font-size: 1.1rem; padding-top: 6px; }
.card.small::before { inset: 2px; border-radius: 3px; }
.card.small.bower-right::after, .card.small.bower-left::after { content: ""; width: 8px; height: 8px; padding: 0; bottom: 2px; border-radius: 50%; }

/* ---------------------------------------------------------------------
   Modals
   --------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 5, 10, 0.7);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s ease-out;
}
.modal {
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  max-height: 86dvh;
  overflow-y: auto;
  padding: 26px 26px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.25s ease-out;
}
.modal-wide { max-width: 700px; }
.modal h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--gold-light);
}
.modal h3 { margin: 18px 0 6px; font-size: 1rem; color: var(--gold-light); }
.modal p, .modal li { line-height: 1.55; font-size: 0.93rem; color: var(--ink); }
.modal ul, .modal ol { padding-left: 20px; }
.modal > .btn { margin-top: 14px; min-width: 140px; }
.modal table {
  width: 100%;
  margin: 10px 0;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.modal th {
  padding: 8px 10px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(232, 197, 109, 0.4);
}
.modal td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.modal tr.tr-win td { background: rgba(232, 197, 109, 0.12); color: var(--gold-light); font-weight: 700; }
.modal tr.tr-win td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.modal-wide table { display: block; overflow-x: auto; }
@media (min-width: 560px) { .modal-wide table { display: table; } }

.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.modal-head h2 { margin: 0; }
.modal-head .btn { flex-shrink: 0; }
.modal-body { font-size: 0.93rem; }
.modal > .btn-large { width: 100%; }
.score-table td:last-child, .score-table th:last-child { text-align: right; }
.trump-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 12px; }
.trump-chip {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 30px;
  padding: 0 6px;
  border-radius: 6px;
  background: linear-gradient(165deg, var(--card-face), var(--card-face-2));
  border: 1px solid var(--card-edge);
  color: var(--card-black);
  font: 700 0.9rem var(--serif);
  font-variant-emoji: text;
}
.trump-chip.red { color: var(--card-red); }
.trump-chip[title="Right bower"] { box-shadow: 0 0 0 2px var(--gold), 0 0 10px rgba(243, 220, 156, 0.5); }
.trump-chip[title="Left bower"]  { box-shadow: 0 0 0 2px var(--gold); }
.trump-arrow { color: var(--muted); font-size: 0.9rem; }

#modalGameOver h2 { font-size: 1.8rem; text-align: center; }

.result-win { color: var(--good); font-weight: 700; }
.result-loss { color: var(--danger); font-weight: 700; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   Tablet
   --------------------------------------------------------------------- */
@media (max-width: 820px) {
  .table { grid-template-columns: minmax(100px, 1fr) minmax(240px, 2fr) minmax(100px, 1fr); border-radius: 44px; padding: 20px 14px 18px; }
  .table::before { border-radius: 44px; }
  .table::after { font-size: 3rem; }
  .seat { min-width: 100px; }
}

/* short desktop windows (e.g. 1280 × 720): shrink so the hand stays on screen */
@media (min-width: 601px) and (max-height: 800px) {
  :root { --card-w: 66px; --card-h: 94px; --small-w: 28px; --small-h: 40px; --trick-w: 54px; --trick-h: 76px; }
  .topbar { padding: 6px 20px; }
  #screenTable { padding-top: 8px; gap: 8px; }
  .team-score { padding: 6px 14px; }
  .team-points { font-size: 1.5rem; }
  .trump-suit { width: 40px; height: 40px; font-size: 1.6rem; }
  .table { padding: 10px 20px 12px; gap: 6px; }
  .seat { padding: 6px 10px; gap: 4px; }
  .avatar { width: 30px; height: 30px; }
  .card .suit-mid { font-size: 2.1rem; }
  .trick-slot .card { font-size: 0.85rem; }
  .trick-slot .card .suit-mid { font-size: 1.8rem; }
  .hand { padding-top: 10px; min-height: calc(var(--card-h) + 10px); }
}

/* ---------------------------------------------------------------------
   Phone (target 390 × 667 portrait)
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
  :root {
    --card-w: 62px;
    --card-h: 88px;
    --small-w: 14px;
    --small-h: 20px;
    --trick-w: 46px;
    --trick-h: 64px;
    font-size: 15px;
  }

  .topbar { padding: 8px 10px; gap: 6px; }
  .topbar h1 { font-size: 1.05rem; letter-spacing: 0.08em; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .btn { min-height: 34px; padding: 6px 9px; font-size: 0.78rem; }

  .panel { padding: 20px 16px; }
  #screenSettings { padding: 12px 10px 28px; }

  #screenTable { padding: 6px 6px 8px; gap: 6px; }

  /* score bar: compact strip */
  .score-bar { gap: 6px; }
  .team-score { padding: 5px 10px; }
  .team-name { font-size: 0.66rem; }
  .team-points { font-size: 1.45rem; }
  .team-goal { font-size: 0.72rem; }
  .team-tricks { gap: 3px; margin-top: 3px; }
  .trick-pip { width: 9px; height: 9px; border-width: 1.5px; }
  .trump-indicator {
    min-width: 0;
    grid-template-columns: auto;
    grid-template-areas: "suit" "label" "maker";
    justify-items: center;
    row-gap: 1px;
    padding: 5px 8px;
  }
  .trump-suit { width: 34px; height: 34px; font-size: 1.3rem; }
  .trump-label { font-size: 0.58rem; letter-spacing: 0.1em; align-self: center; }
  .trump-maker { font-size: 0.66rem; max-width: 84px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .hand-status-banner { font-size: 0.8rem; padding: 4px 14px; }

  /* table */
  /* phone: W · N · E chips across the top, the felt centre full width */
  .table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    grid-template-areas:
      "west   north  east"
      "center center center";
    gap: 6px 6px;
    align-items: start;
    min-height: 0;
    padding: 8px 4px 6px;
    border-width: 10px;
    border-radius: 30px;
  }
  .table::before { inset: -10px; padding: 10px; border-radius: 30px; }
  .table::after { top: 58%; font-size: 1.8rem; letter-spacing: 0.22em; }

  /* N/E/W become compact chips */
  .seat {
    min-width: 0;
    width: 100%;
    max-width: 150px;
    padding: 4px 4px 5px;
    gap: 2px;
    border-radius: 10px;
  }
  .seat-west, .seat-east { margin-top: 10px; }  /* hint at the cross: N sits a touch higher */
  .seat-head { gap: 4px; flex-wrap: wrap; justify-content: center; }
  .avatar { width: 26px; height: 26px; font-size: 0.78rem; }
  .seat-name { font-size: 0.78rem; max-width: 64px; }
  .seat-badges { gap: 2px; }
  .badge { height: 16px; min-width: 16px; padding: 0 5px; font-size: 0.56rem; }
  .badge.dealer { width: 18px; height: 18px; font-size: 0.6rem; }
  .seat-hand .card.back.small + .card.back.small { margin-left: -8px; }
  .seat-west .seat-hand .card:nth-child(odd),
  .seat-east .seat-hand .card:nth-child(odd) { transform: none; }
  .seat-tricks { font-size: 0.66rem; }
  .seat.sitting-out .seat-tricks::after { content: " · out"; }

  /* center */
  .table-center { min-height: 0; gap: 6px; }
  .action-prompt { font-size: 0.82rem; }
  .action-row { gap: 6px; width: 100%; }
  .kitty { gap: 10px; padding: 6px 10px; }
  .kitty .kitty-stack { --small-w: 30px; --small-h: 42px; }
  .kitty .kitty-stack .card.back.small { width: 30px; height: 42px; }
  .kitty .card.upcard { width: 54px; height: 76px; font-size: 0.82rem; }
  .kitty .card.upcard .suit-mid { font-size: 1.8rem; }
  .trick-area { width: calc(var(--trick-w) * 2.7); height: calc(var(--trick-h) * 2 + 8px); }
  .trick-slot .card { font-size: 0.72rem; }
  .trick-slot .card .suit-mid { font-size: 1.6rem; }
  .trick-slot .card[data-id^="J"] .suit-mid,
  .trick-slot .card[data-id^="Q"] .suit-mid,
  .trick-slot .card[data-id^="K"] .suit-mid { font-size: 0.85rem; inset: 22% 14% 10% 26%; }
  .trick-slot .card[data-id^="J"] .suit-mid::before,
  .trick-slot .card[data-id^="Q"] .suit-mid::before,
  .trick-slot .card[data-id^="K"] .suit-mid::before { font-size: 1rem; }
  .trick-slot .card.bower-right::after { content: "R"; }
  .trick-slot .card.bower-left::after { content: "L"; }
  .trick-slot .card.bower-right::after, .trick-slot .card.bower-left::after { padding: 1px 4px; bottom: 3px; font-size: 0.5rem; }
  .center-message { font-size: 0.82rem; }
  .center-message:not(:empty) { padding: 3px 10px; }

  /* human hand: 5 × 62px + 4 × 6px = 334px, fits in 390 */
  .hand { gap: 6px; padding-top: 10px; min-height: calc(var(--card-h) + 10px); }
  .hand .card { font-size: 0.9rem; }
  .hand .card .suit-mid { font-size: 2rem; }
  .hand .card[data-id^="J"] .suit-mid,
  .hand .card[data-id^="Q"] .suit-mid,
  .hand .card[data-id^="K"] .suit-mid { font-size: 1.05rem; }
  .hand .card[data-id^="J"] .suit-mid::before,
  .hand .card[data-id^="Q"] .suit-mid::before,
  .hand .card[data-id^="K"] .suit-mid::before { font-size: 1.3rem; }
  .hand .card[data-id^="A"] .suit-mid { font-size: 2.5rem; }
  .hand .card.playable:hover { transform: translateY(-8px); }
  .hand .card.selected { transform: translateY(-10px); }
  .card.bower-right::after, .card.bower-left::after { font-size: 0.5rem; padding: 2px 3px; bottom: 3px; }
  .seat.seat-south.human-seat { max-width: none; padding: 0 0 4px; gap: 4px; }
  .seat.seat-south.human-seat .seat-head { padding: 2px 10px 2px 2px; flex-wrap: nowrap; }
  .seat.seat-south.human-seat .seat-badges { flex-wrap: nowrap; }
  .seat-badges { flex-wrap: wrap; justify-content: center; max-width: 100%; }
  .table-wrap { gap: 4px; }
  .seat.seat-south.human-seat .seat-name { max-width: 120px; flex-shrink: 0; }

  /* actions */
  .action-panel { gap: 6px; }
  .btn-bid { min-width: 0; flex: 1 1 auto; min-height: 40px; padding: 6px 10px; font-size: 0.86rem; white-space: normal; }
  .btn-suit { flex: 1 1 28%; justify-content: center; padding: 6px 6px; font-size: 0.82rem; }
  .alone-toggle { flex: 0 0 auto; min-height: 40px; padding: 4px 10px; font-size: 0.82rem; }

  .modal { padding: 20px 16px 18px; }
  .modal h2 { font-size: 1.25rem; }
  .modal td, .modal th { padding: 6px 6px; }
}

/* very narrow (≤ 360px) */
@media (max-width: 360px) {
  :root { --card-w: 58px; --card-h: 82px; }
  .hand { gap: 4px; }
  .topbar-actions .btn { padding: 6px 7px; font-size: 0.74rem; }
  .seat-name { max-width: 52px; }
}

/* ---------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hand .card.playable:hover, .hand .card.selected { transform: none; }
  .trick-slot .card.winner, .card.winner { transform: none; }
}

/* forced colours / high contrast: keep cards and focus legible */
@media (forced-colors: active) {
  .card { border: 1px solid CanvasText; }
  .card.trump, .card.selected, .seat.turn { outline: 2px solid Highlight; }
}

/* ---- Bid/discard/continue controls float over the bottom rail so the
   table never changes size when they appear (Bryan, 2026-11-21). The bar is
   centred on the rail line; the space it needs is reserved permanently. ---- */
.table > .table-center { position: static; padding-bottom: 26px; }
.table-center > .action-panel {
  position: absolute;
  left: 50%;
  bottom: -8px;                       /* middle of the 16px rail */
  transform: translate(-50%, 50%);
  z-index: 20;
  flex-wrap: nowrap;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 24px);
  min-height: 0;
  padding: 7px 12px;
  border-radius: 14px;
  background: rgba(10, 16, 32, 0.95);
  border: 1px solid rgba(214, 186, 120, 0.6);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}
.table-center > .action-panel .action-prompt { flex-basis: auto; white-space: nowrap; padding: 0 4px; }
.table-center > .action-panel .btn-bid { min-width: 96px; }
.table-center > .action-panel:empty { display: none; }
.table-wrap > .table { margin-bottom: 26px; }
@media (max-width: 600px) {
  /* phone: prompt on one line, every control on a second line */
  .table-center > .action-panel { flex-wrap: wrap; gap: 4px 6px; padding: 5px 8px; max-width: calc(100% - 12px); }
  .table-center > .action-panel .action-row { display: contents; }
  .table-center > .action-panel .btn-bid,
  .table-center > .action-panel .btn-suit,
  .table-center > .action-panel .alone-toggle { flex: 0 1 auto; min-height: 38px; white-space: nowrap; }
  .table-center > .action-panel .btn-suit { min-width: 44px; font-size: 1.15rem; padding: 4px 8px; }
  .table-center > .action-panel .opt-long,
  .table-center > .action-panel .suit-name { display: none; }
  .table-center > .action-panel .action-prompt { flex-basis: 100%; }
  .table-center > .action-panel .btn-bid { min-width: 0; }
  .table > .table-center { padding-bottom: 32px; }
  .table-wrap > .table { margin-bottom: 34px; }
}
@media (min-width: 601px) and (max-height: 800px) {
  .table-center { gap: 4px; }
  .table > .table-center { padding-bottom: 16px; }
  .table-wrap > .table { margin-bottom: 18px; }
  .table-center > .action-panel { padding: 5px 10px; }
  .table-center > .action-panel .btn-bid,
  .table-center > .action-panel .btn-suit,
  .table-center > .action-panel .alone-toggle { min-height: 36px; }
  .table-center > .action-panel .btn-primary:not(.btn-bid) { min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
  .seat-tricks { line-height: 1.1; }
  .hand { padding-top: 4px; min-height: calc(var(--card-h) + 4px); }
}
