/* ============================================================================
   Cribbage — design system + base layout (P6.T1)
   Green/gold theme, landscape-oriented game.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg:      #1B5E3B;
  --color-bg-deep: #123f28;
  --color-gold:    #F5A623;
  --color-gold-dk: #c9861a;
  --color-panel:   #1A3A2A;
  --color-panel-2: #214934;
  --color-text:    #FFFFFF;
  --color-muted:   #A9C4B4;
  --color-danger:  #E5534B;
  --color-line:    rgba(245, 166, 35, 0.45);

  --radius:   12px;
  --radius-sm: 8px;
  --gap:      16px;
  --shadow:   0 8px 24px rgba(0, 0, 0, 0.35);
  --font:     'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: radial-gradient(circle at 50% 20%, var(--color-bg) 0%, var(--color-bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
  user-select: none;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--color-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 700; letter-spacing: 0.02em; }
.text-muted { color: var(--color-muted); }
.text-gold  { color: var(--color-gold); }
.text-center { text-align: center; }

/* ── Screen scaffolding (router toggles .active) ───────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.screen.active { display: flex; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-panel);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius);
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover  { background: var(--color-panel-2); box-shadow: 0 0 0 3px var(--color-line); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.btn-primary {
  color: var(--color-bg-deep);
  background: var(--color-gold);
  border-color: var(--color-gold);
}
.btn-primary:hover { background: #ffb738; box-shadow: 0 0 0 3px var(--color-line); }

.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.1rem; }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--gap); text-align: left; }
.field label { font-size: .82rem; color: var(--color-muted); font-weight: 500; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  font-size: 1rem;
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid rgba(245, 166, 35, 0.55);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.input { resize: vertical; min-height: 88px; font-family: inherit; line-height: 1.4; }
.input::placeholder { color: rgba(255, 255, 255, 0.4); }
.input:focus { border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-line); }

/* Password field with a show/hide eye toggle (mockup parity). */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-eye {
  position: absolute; top: 0; right: 0; height: 100%; width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--color-muted); font-size: 1.1rem;
}
.pw-eye:hover { color: var(--color-gold); }

/* ── Panels / modals ───────────────────────────────────────────────────── */
.panel {
  width: min(420px, 100%);
  padding: 28px;
  background: linear-gradient(180deg, var(--color-panel-2), var(--color-panel));
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel h1, .panel h2 { text-align: center; margin-bottom: 6px; }
.panel .subtitle { text-align: center; color: var(--color-muted); margin-bottom: 22px; font-size: .9rem; }

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 50;
  padding: 24px;
}
.overlay.active { display: flex; }

/* ── Inline messages ───────────────────────────────────────────────────── */
.form-error {
  min-height: 20px;
  margin: 4px 0 12px;
  color: var(--color-danger);
  font-size: .85rem;
  text-align: center;
}
.form-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: .85rem; }

/* ── Utility ───────────────────────────────────────────────────────────── */
.stack   { display: flex; flex-direction: column; gap: var(--gap); width: min(420px, 100%); }
.row     { display: flex; gap: var(--gap); align-items: center; }
.spacer  { flex: 1; }
.hidden  { display: none !important; }

/* ── Top bar: hamburger + dropdown ─────────────────────────────────────── */
.hamburger {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 30;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--color-text);
  background: var(--color-panel);
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.hamburger:hover { background: var(--color-panel-2); }

/* Circular gold-ring back button (mockup parity) — sits top-left of a screen/panel. */
.btn-round {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; line-height: 1; color: var(--color-gold);
  background: var(--color-panel); border: 2px solid var(--color-gold); border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer;
}
.btn-round:hover { background: var(--color-panel-2); box-shadow: 0 0 0 3px var(--color-line); }

/* Global version badge, top-right on every screen except the game board. */
#version-badge { position: fixed; top: 12px; right: 70px; z-index: 28; font-size: .72rem;
  color: var(--color-muted); pointer-events: none; letter-spacing: .02em; }
body:has(#screen-game.active) #version-badge { display: none; }
/* On screens with no hamburger, tuck it fully into the corner. */
body:has(#screen-main.active) #version-badge,
body:has(#screen-login.active) #version-badge,
body:has(#screen-register.active) #version-badge,
body:has(#screen-forgot.active) #version-badge,
body:has(#screen-reset.active) #version-badge,
body:has(#screen-leaderboard.active) #version-badge,
body:has(#screen-profile.active) #version-badge,
body:has(#screen-themes.active) #version-badge,
body:has(#screen-game-mode.active) #version-badge { right: 16px; }

.dropdown {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 30;
  min-width: 180px;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
}
.dropdown.open { display: block; }
.dropdown button {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: .95rem;
}
.dropdown button:hover { background: var(--color-panel-2); }

/* ── Game-mode cards ───────────────────────────────────────────────────── */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 680px) { .mode-grid { grid-template-columns: 1fr; } }

.mode-card {
  position: relative;
  padding: 22px 16px;
  text-align: center;
  background: rgba(0, 0, 0, 0.20);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.mode-card:hover { background: rgba(0, 0, 0, 0.32); }
.mode-card.selected { border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-line); }
.mode-card.card-disabled { opacity: .5; cursor: not-allowed; }
.mode-card.card-disabled:hover { background: rgba(0, 0, 0, 0.20); }

.mode-icon  { font-size: 2.2rem; margin-bottom: 8px; }
.mode-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.mode-desc  { color: var(--color-muted); font-size: .82rem; line-height: 1.3; }

/* Player-count cards (P16.A8 — mockup parity, was a segmented control) */
.count-select { margin-top: 22px; text-align: center; }
.count-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-muted); margin-bottom: 10px;
}
.count-grid { margin-top: 0; }
.count-card {
  padding: 16px 14px; text-align: center; font: inherit; color: var(--color-text);
  background: rgba(0, 0, 0, 0.20); border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.count-card:hover { background: rgba(0, 0, 0, 0.32); }
.count-card.selected { border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-line); }
.count-card .mode-title { font-size: 1rem; }
.seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--color-line);
  border-radius: 999px;
}
.seg-btn {
  border: 0; cursor: pointer; color: var(--color-text);
  background: transparent; border-radius: 999px;
  padding: 8px 18px; font: inherit; font-weight: 600; font-size: .9rem;
  transition: background .15s ease, color .15s ease;
}
.seg-btn:hover { background: rgba(255, 255, 255, 0.06); }
.seg-btn.selected { background: var(--color-gold); color: #1b2b1f; }
.opt-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  margin-top: 14px; color: var(--color-text); font-size: .88rem;
}
.opt-toggle input { width: 16px; height: 16px; accent-color: var(--color-gold); cursor: pointer; }
.opt-toggle .opt-note { color: var(--color-muted); font-size: .78rem; }

.badge {
  position: absolute;
  top: 8px; right: 8px;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  background: var(--color-gold);
  color: var(--color-bg-deep);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── Profile avatar grid ───────────────────────────────────────────────── */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 12px 0 18px;
}
@media (max-width: 560px) { .avatar-grid { grid-template-columns: repeat(4, 1fr); } }
.avatar-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--color-panel);
  object-fit: cover;
  cursor: pointer;
  transition: border-color .12s ease, transform .08s ease;
}
.avatar-grid img:hover { transform: scale(1.05); }
.avatar-grid img.selected { border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-line); }

/* ── Leaderboard ───────────────────────────────────────────────────────── */
.lb-scroll { flex: 1; overflow-y: auto; margin-top: 8px; }
/* Pill rows (mockup parity): rounded outlined rows with spacing between them. */
.lb-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: .92rem; }
.lb-table th {
  position: sticky; top: 0;
  background: var(--color-panel);
  color: var(--color-muted);
  font-weight: 600; text-align: left;
  padding: 6px 12px 10px;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
}
.lb-table tbody td {
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}
.lb-table tbody td:first-child { border-left: 1px solid var(--color-line); border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.lb-table tbody td:last-child  { border-right: 1px solid var(--color-line); border-top-right-radius: 12px; border-bottom-right-radius: 12px; text-align: right; }
.lb-rank { width: 40px; font-weight: 800; color: var(--color-muted); font-size: 1.05rem; }
.lb-player-inner { display: flex; align-items: center; gap: 10px; }
.lb-avatar { width: 30px; height: 30px; }
.lb-elo { font-weight: 800; color: var(--color-gold); white-space: nowrap; }
.lb-table tr.lb-first td { background: rgba(245, 166, 35, 0.12); border-color: var(--color-gold); }
.lb-table tr.lb-first .lb-rank { color: var(--color-gold); }
.lb-table tr.lb-me td { background: rgba(255, 255, 255, 0.08); }
.lb-table tr.lb-me td:first-child { box-shadow: inset 3px 0 0 var(--color-gold); }

/* ── Avatar + user card ────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-gold);
  background: var(--color-panel);
}
.avatar-lg { width: 88px; height: 88px; }
.user-card { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 18px; }
.user-card .name  { font-size: 1.3rem; font-weight: 700; }
.user-card .stats { color: var(--color-muted); font-size: .85rem; }

/* ── Game screen (PixiJS canvas + HUD) ─────────────────────────────────── */
#screen-game { padding: 0; }
#game-canvas canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.score-hud {
  position: fixed;
  z-index: 10;
  text-align: center;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  min-width: 92px;
}
.score-hud .lbl { font-size: .68rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .05em; }
.score-hud .val { font-size: 1.6rem; font-weight: 700; color: var(--color-gold); line-height: 1.1; }
.score-hud .val { line-height: 1.05; }
.score-opp { top: 12px; right: 74px; padding: 4px 12px; }
.score-opp .val { font-size: 1.2rem; }
.score-you { bottom: 20px; right: 20px; }

/* ── Settings (P14.T4 / P15.T5) ────────────────────────────────────────── */
.set-section { border: 1px solid var(--color-line); border-radius: var(--radius-sm); padding: 12px; margin-top: 8px; }
.set-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); }
.set-about { color: var(--color-muted); font-size: .74rem; margin-top: 16px; }
.set-vol { display: flex; align-items: center; gap: 12px; justify-content: center; }
.set-vol span { color: var(--color-muted); font-size: .85rem; min-width: 56px; text-align: right; }
.set-vol input[type="range"] { flex: 1 1 auto; max-width: 200px; accent-color: var(--color-gold); cursor: pointer; }

/* ── Themes selection (P13.T2) ─────────────────────────────────────────── */
.theme-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px;
  border-bottom: 1px solid var(--color-line);
}
.theme-tab {
  flex: 0 0 auto; border: 1px solid var(--color-line); background: rgba(0, 0, 0, 0.24);
  color: var(--color-text); cursor: pointer; font: inherit; font-size: .84rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.theme-tab:hover { background: rgba(255, 255, 255, 0.06); }
.theme-tab.active { background: var(--color-gold); color: #1b2b1f; border-color: var(--color-gold); }
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px; overflow-y: auto; padding: 4px; flex: 1 1 auto; min-height: 120px;
}
.theme-item {
  border: 2px solid var(--color-line); background: rgba(0, 0, 0, 0.24); cursor: pointer;
  border-radius: var(--radius-sm); padding: 6px; aspect-ratio: 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center; transition: transform .12s ease, border-color .12s ease;
}
.theme-item img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.theme-item:hover { transform: translateY(-2px); }
.theme-item.selected { border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-line); }
/* Avatars read best as circles; card backs/fronts fill more of the tile. */
.theme-item.cat-avatar img { border-radius: 50%; }
.theme-item.cat-card_back img, .theme-item.cat-card_front img { max-height: 100%; }
.theme-empty { color: var(--color-muted); font-size: .88rem; padding: 20px; text-align: center; }

/* ── Profile: recent games (P7.T2) ─────────────────────────────────────── */
.pf-history-wrap { margin-top: 22px; border-top: 1px solid var(--color-line); padding-top: 16px; }
.pf-history-title { font-size: 1rem; color: var(--color-text); margin-bottom: 10px; }
.pf-history { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.pf-hist-empty { color: var(--color-muted); font-size: .88rem; text-align: center; padding: 12px 0; }
.pf-hist-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, 0.24); border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); padding: 8px 12px;
}
.pf-hist-badge {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .82rem; color: #14231a;
}
.pf-hist-badge.win { background: #5fd18f; }
.pf-hist-badge.loss { background: #ff6b5a; }
.pf-hist-badge.other { background: var(--color-muted); }
.pf-hist-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.pf-hist-opp { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-hist-meta { font-size: .74rem; color: var(--color-muted); }
.pf-hist-score { font-weight: 700; color: var(--color-gold); font-variant-numeric: tabular-nums; }

/* ── Manual count / Muggins (P10.T3/T4) ────────────────────────────────── */
.count-claim { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 18px 0 8px; }
.count-value {
  min-width: 84px; text-align: center;
  font-size: 3rem; font-weight: 800; color: var(--color-gold); line-height: 1;
}
.count-step {
  width: 56px; height: 56px; border-radius: 50%; padding: 0;
  font-size: 1.8rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.count-hint { color: var(--color-muted); font-size: .82rem; text-align: center; margin: 6px 0 14px; line-height: 1.35; }

#game-toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  z-index: 30; max-width: 90vw;
  background: rgba(0, 0, 0, 0.82); border: 1px solid var(--color-line);
  color: var(--color-text); font-weight: 600; font-size: .95rem;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s ease; pointer-events: none; text-align: center;
}
#game-toast.show { opacity: 1; }
#game-toast.muggins { border-color: var(--color-gold); color: var(--color-gold); }

/* ── Multi-seat player chips (P12.T2) ──────────────────────────────────── */
#seat-chips { position: absolute; inset: 0; pointer-events: none; z-index: 11; }
.seat-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.seat-chip .sc-av {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--color-line); flex: 0 0 auto; background: var(--color-panel-2);
}
.seat-chip .sc-av-txt { display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--color-gold); }
.seat-chip .sc-name { font-size: .78rem; font-weight: 600; color: var(--color-text); line-height: 1.1; }
.seat-chip .sc-score { font-size: 1.15rem; font-weight: 700; color: var(--color-gold); line-height: 1.05; }
.seat-chip .sc-dealer {
  display: none; margin-left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-gold); color: #1b2b1f; font-size: .72rem; font-weight: 800;
  text-align: center; line-height: 20px; flex: 0 0 auto;
}
.seat-chip.active { border-color: var(--color-gold); animation: chip-turn 1.4s ease-in-out infinite; }
.seat-chip.active .sc-av { border-color: var(--color-gold); }
@keyframes chip-turn {
  0%, 100% { box-shadow: 0 0 0 2px var(--color-gold), var(--shadow); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 166, 35, 0.32), var(--shadow); }
}
.seat-chip.disconnected { opacity: .5; }
/* Team colours (4P), relative to you: your team red (matches your mat), theirs blue. */
.seat-chip.team-mine .sc-av { border-color: #ff6b5a; }
.seat-chip.team-theirs .sc-av { border-color: #4f9dff; }
.seat-chip.team-mine .sc-score { color: #ff9184; }
.seat-chip.team-theirs .sc-score { color: #7fbcff; }
@media (max-width: 560px) {
  .seat-chip { padding: 3px 9px 3px 3px; gap: 6px; }
  .seat-chip .sc-av { width: 26px; height: 26px; }
  .seat-chip .sc-name { font-size: .68rem; }
  .seat-chip .sc-score { font-size: .95rem; }
  /* Your own chip shrinks to avatar+score so it fits beside the fan. */
  .seat-chip[data-role="you"] .sc-name { display: none; }
}

/* Sits just above the player's hand (reviewer 2026-07-29): bottom-anchored so
   longer text grows upward, never over the cards. */
.game-prompt {
  position: fixed;
  bottom: 22vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 86vw;
  padding: 10px 18px;
  background: rgba(18, 63, 40, 0.92);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--color-text);
  font-size: .95rem;
  text-align: center;
}
.game-prompt #prompt-text { white-space: normal; }
.game-prompt .btn { min-height: 38px; padding: 0 18px; }
.game-prompt.my-turn {
  border-color: var(--color-gold);
  background: rgba(38, 78, 40, 0.95);
  animation: prompt-turn 1.4s ease-in-out infinite;
}
@keyframes prompt-turn {
  0%, 100% { box-shadow: 0 0 0 2px var(--color-gold), var(--shadow); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 166, 35, 0.32), var(--shadow); }
}
@media (orientation: portrait) { .game-prompt { bottom: 20vh; max-width: 80vw; } }
@media (max-width: 560px) { .game-prompt { font-size: .82rem; padding: 8px 14px; } }

/* ── Spinner (matchmaking) ─────────────────────────────────────────────── */
.spinner {
  width: 44px; height: 44px; margin: 6px auto;
  border: 4px solid rgba(245, 166, 35, 0.25);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── The Show / Game Over overlays ─────────────────────────────────────── */
.show-cards { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 14px 0 10px; }
.show-cards img { height: 64px; border-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.show-cards img.starter { outline: 3px solid var(--color-gold); }
.show-combos { list-style: none; padding: 0; margin: 6px 0; max-height: 32vh; overflow-y: auto; }
.show-combos li { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .92rem; }
.show-combos li .pts { color: var(--color-gold); font-weight: 700; }
.show-combos li.none { justify-content: center; color: var(--color-muted); }
.show-points { font-size: 1.35rem; font-weight: 700; color: var(--color-gold); margin: 8px 0 16px; }

.go-scores { color: var(--color-muted); margin: 8px 0 4px; font-size: 1.05rem; }
.go-elo { color: var(--color-gold); font-weight: 600; margin-bottom: 18px; min-height: 1.2em; }

/* ── Responsive tweaks ─────────────────────────────────────────────────── */
/* The game supports BOTH orientations — no landscape lock. Panels below stay
   comfortable on small portrait screens. */
@media (max-width: 480px) {
  .panel { padding: 20px; }
  .btn { min-height: 46px; }
  .input { min-height: 46px; }
}

/* ─── Main / entry screen (P16.A1) ─────────────────────────────────────── */
.main-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 100%;
  padding: 24px;
}
.main-logo {
  width: min(340px, 62vw);
  max-height: 38vh;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45));
}
/* Logo image inside auth/menu panels (mockup parity — replaces the text wordmark). */
.auth-logo {
  display: block; margin: 2px auto 12px;
  width: min(200px, 60%); height: auto; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .4));
}
.menu-logo { width: min(240px, 74%); margin-bottom: 16px; }
.version-tag {
  color: var(--color-text);
  opacity: .55;
  font-size: .8rem;
  letter-spacing: .06em;
}

/* Guest → create-account nudge on the menu (P16.A2) */
.guest-nudge {
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--color-gold);
  font-size: .85rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Cut for Deal overlay (P16.A5) ─────────────────────────────────────── */
.cut-slots {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.cut-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cut-slot img { height: 96px; border-radius: 6px; }
.cut-slot .nm { font-size: .8rem; color: var(--color-text); opacity: .85; }
.cut-slot.dealer img {
  outline: 3px solid var(--color-gold);
  box-shadow: 0 0 14px rgba(245, 166, 35, .6);
}
.cut-slot.dealer .nm { color: var(--color-gold); font-weight: 700; opacity: 1; }
.cut-deck {
  display: block;
  margin: 0 auto;
  height: 110px;
  cursor: pointer;
  border-radius: 6px;
  /* Stacked deck-of-cards look (mockup parity). */
  box-shadow:
    2px 2px 0 rgba(255,255,255,.10), 3px 3px 0 rgba(0,0,0,.28),
    5px 5px 0 rgba(255,255,255,.08), 6px 6px 0 rgba(0,0,0,.20),
    8px 8px 0 rgba(255,255,255,.06), 9px 9px 0 rgba(0,0,0,.14);
  transition: transform .15s;
}
.cut-deck:hover { transform: translateY(-3px); }
