/* ═══════════════════════════════════════════════════════════════════════════════
   Liar's Cards — Game CSS — Warm Earthy Premium Palette
   Palette: #8D7B68 · #A4907C · #C8B6A6 · #F1DEC9
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Viewport Shell ────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  background: #1a130e;
  color: #F1DEC9;
}

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

.game-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: radial-gradient(circle at 50% 12%, #281d14 0%, #1a130e 100%);
}

/* ─── Compact Top Navbar (48px) ─────────────────────────────────────────────── */
.game-nav {
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(20, 14, 9, 0.94);
  border-bottom: 1px solid rgba(200, 182, 166, 0.12);
  backdrop-filter: blur(18px);
  z-index: 30;
  flex-shrink: 0;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: #c9a96e;
  text-shadow: 0 0 14px rgba(201, 169, 110, 0.35);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(241, 222, 201, 0.04);
  border: 1px solid rgba(200, 182, 166, 0.14);
  color: #A4907C;
  padding: 4px 10px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-icon-btn:hover {
  background: rgba(241, 222, 201, 0.09);
  border-color: rgba(200, 182, 166, 0.28);
  color: #F1DEC9;
}

.nav-exit-btn {
  color: #e07a74;
  border-color: rgba(192, 80, 74, 0.28);
}

.nav-exit-btn:hover {
  background: rgba(192, 80, 74, 0.14);
  border-color: #c0504a;
  color: #F1DEC9;
}

.nav-room-code {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 16px;
  background: rgba(201, 169, 110, 0.07);
  border: 1px solid rgba(201, 169, 110, 0.22);
}

.nav-label {
  font-size: 0.68rem;
  color: #A4907C;
  letter-spacing: 0.08em;
}

.nav-code {
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #c9a96e;
  font-size: 0.88rem;
}

.nav-copy {
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.65;
  font-size: 0.82rem;
  color: #F1DEC9;
  padding: 0 2px;
  transition: all 0.15s;
}

.nav-copy:hover {
  opacity: 1;
  transform: scale(1.15);
}

.nav-pile-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(141, 123, 104, 0.1);
  border: 1px solid rgba(141, 123, 104, 0.22);
  font-size: 0.76rem;
  white-space: nowrap;
}

.vault-icon { font-size: 0.82rem; }
.vault-label { color: #A4907C; }

.pile-count {
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(201, 169, 110, 0.18);
  color: #c9a96e;
  font-weight: 700;
  font-size: 0.76rem;
}

.log-toggle-btn {
  display: none;
}

/* ─── Main Game Arena ───────────────────────────────────────────────────────── */
.game-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 280px;
  overflow: hidden;
  position: relative;
}

/* ─── Table Arena Column ────────────────────────────────────────────────────── */
.table-area {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 8px 14px;
  gap: 8px;
  overflow: hidden;
  justify-content: flex-start;
}

/* ─── Opponents Row ─────────────────────────────────────────────────────────── */
.opponents-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  min-height: 56px;
  max-height: 64px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  z-index: 10;
  padding: 2px 4px;
  scrollbar-width: none;
}

.opponents-row::-webkit-scrollbar { display: none; }

.opponent-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(26, 19, 14, 0.92);
  border: 1px solid rgba(200, 182, 166, 0.11);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 120px;
  max-width: 160px;
  flex-shrink: 0;
  position: relative;
  backdrop-filter: blur(10px);
}

.opponent-panel.is-turn {
  border-color: #c9a96e;
  background: rgba(201, 169, 110, 0.1);
  box-shadow: 0 0 18px rgba(201, 169, 110, 0.32);
  transform: translateY(-2px);
}

.opponent-panel.dare-target {
  border-color: #c0504a;
  box-shadow: 0 0 16px rgba(192, 80, 74, 0.35);
}

.opponent-panel.finished {
  opacity: 0.4;
  filter: grayscale(0.6);
}

.opponent-panel.passed {
  opacity: 0.5;
  border-color: rgba(200, 182, 166, 0.06);
}

.opp-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.opp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: #F1DEC9;
  background: linear-gradient(135deg, #6b5d4e, #8D7B68);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.opp-avatar.ai       { background: linear-gradient(135deg, #2c3a2c, #7aaa82); }
.opp-avatar.me       { background: linear-gradient(135deg, #9a7a45, #c9a96e); }
.opp-avatar.finished { background: linear-gradient(135deg, #2c3a2c, #7aaa82); }
.opp-avatar.loser    { background: linear-gradient(135deg, #5a2020, #c0504a); }

.turn-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #c9a96e;
  animation: turn-ring-pulse 1.3s ease-in-out infinite;
}

@keyframes turn-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.12); opacity: 1; }
}

.badge-you-tag {
  position: absolute;
  top: -5px;
  right: -6px;
  background: #c9a96e;
  color: #1a130e;
  font-size: 0.52rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 5px;
  letter-spacing: 0.05em;
}

.opp-info-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.opp-name {
  font-size: 0.76rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #F1DEC9;
}

.opp-status-badge {
  font-size: 0.64rem;
  color: #A4907C;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opp-status-badge.status-turn       { color: #c9a96e; font-weight: 700; }
.opp-status-badge.status-passed     { color: #e07a74; }
.opp-status-badge.status-empty      { color: #e07a74; font-weight: 800; animation: pulse-warn 1s infinite; }
.opp-status-badge.status-finished   { color: #7aaa82; }

@keyframes pulse-warn {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.opp-status-badge.status-disconnected {
  color: #d4845a;
  font-weight: 700;
  animation: pulse-warn 1.2s infinite;
}

.opp-avatar.disconnected {
  opacity: 0.55;
  filter: grayscale(0.5);
  box-shadow: 0 0 0 2px #d4845a, 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ─── Reconnection Top Banner ──────────────────────────────────────────────── */
.reconnect-banner {
  position: fixed;
  top: 54px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  padding: 8px 20px;
  max-width: calc(100vw - 24px);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: center;
  overflow-wrap: anywhere;
  z-index: 99999;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.reconnect-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reconnect-banner.warning {
  background: rgba(155, 90, 35, 0.95);
  border: 1px solid rgba(201, 169, 110, 0.55);
  color: #F1DEC9;
  animation: banner-pulse 1.8s infinite;
}

.reconnect-banner.connected {
  background: rgba(50, 110, 60, 0.95);
  border: 1px solid rgba(122, 170, 130, 0.55);
  color: #F1DEC9;
}

@keyframes banner-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(201, 169, 110, 0.4); }
  50%       { box-shadow: 0 0 24px rgba(201, 169, 110, 0.8); }
}

.opp-card-chip {
  font-size: 0.72rem;
  font-weight: 800;
  color: #C8B6A6;
  background: rgba(141, 123, 104, 0.18);
  padding: 2px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Floating emote over opponent */
.floating-emote {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  animation: float-up-fade 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  pointer-events: none;
  z-index: 40;
}

@keyframes float-up-fade {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(0.6); }
  20%  { opacity: 1; transform: translate(-50%, -10px) scale(1.2); }
  80%  { opacity: 1; transform: translate(-50%, -20px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(0.8); }
}

/* ─── Casino Poker Table Center — Warm Leather Table ────────────────────────── */
.game-table-center {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  /* Rich dark leather/mahogany felt */
  background: radial-gradient(ellipse 85% 75% at 50% 50%,
    #2a1c11 0%,
    #1e1410 45%,
    #120d09 100%);
  border-radius: 24px;
  border: 3px solid #3d2a1a;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.8),
    inset 0 0 60px rgba(0, 0, 0, 0.7),
    inset 0 2px 0 rgba(200, 182, 166, 0.04);
  padding: 10px 16px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.table-rail {
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  border: 2px solid rgba(201, 169, 110, 0.16);
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.felt-texture {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  /* subtle leather grain */
  background-image:
    radial-gradient(rgba(200, 182, 166, 0.018) 1px, transparent 1px),
    repeating-linear-gradient(45deg,
      rgba(200, 182, 166, 0.006) 0px,
      rgba(200, 182, 166, 0.006) 1px,
      transparent 1px,
      transparent 10px);
  background-size: 16px 16px, 100% 100%;
  pointer-events: none;
}

.table-spotlight {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 55%;
  background: radial-gradient(ellipse at top center,
    rgba(201, 169, 110, 0.06) 0%,
    transparent 70%);
  pointer-events: none;
}

/* ─── Table Top Bar ─────────────────────────────────────────────────────────── */
.table-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 640px;
  z-index: 5;
  flex-shrink: 0;
  gap: 10px;
}

.turn-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.turn-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #A4907C;
}

.turn-banner.my-turn {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.22), rgba(154, 122, 69, 0.32));
  color: #F1DEC9;
  border: 1px solid rgba(201, 169, 110, 0.45);
  box-shadow: 0 0 20px rgba(201, 169, 110, 0.28);
  animation: turn-banner-pulse 1.8s ease-in-out infinite;
}

.turn-banner.my-turn .turn-banner-dot {
  background: #c9a96e;
  box-shadow: 0 0 8px #c9a96e;
  animation: dot-blink 0.9s infinite alternate;
}

.turn-banner.other-turn {
  background: rgba(20, 14, 9, 0.72);
  color: #A4907C;
  border: 1px solid rgba(200, 182, 166, 0.1);
}

@keyframes turn-banner-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.02); }
}

@keyframes dot-blink {
  from { opacity: 0.3; }
  to   { opacity: 1; }
}

/* Declared Claim Billboard */
.declared-rank-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 14px;
  background: rgba(18, 13, 9, 0.88);
  border: 1.5px solid rgba(201, 169, 110, 0.32);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.declared-crown {
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px rgba(201, 169, 110, 0.55));
}

.declared-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.declared-label {
  font-size: 0.6rem;
  color: #A4907C;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
}

.declared-rank-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #c9a96e;
  text-shadow: 0 0 14px rgba(201, 169, 110, 0.45);
  line-height: 1;
}

/* ─── Discard Table Pile ────────────────────────────────────────────────────── */
.discard-pile-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 480px;
  z-index: 5;
  flex: 1;
  min-height: 0;
}

.discard-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discard-pile-label {
  font-size: 0.68rem;
  color: #A4907C;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.discard-total-badge {
  font-size: 0.68rem;
  color: #c9a96e;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.22);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.discard-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 90px;
  overflow-y: auto;
  padding: 4px 8px;
  width: 100%;
  scrollbar-width: none;
}

.discard-stack::-webkit-scrollbar { display: none; }

.discard-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(200, 182, 166, 0.3);
  font-size: 0.8rem;
}

.empty-icon { font-size: 1.4rem; opacity: 0.35; }

.discard-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(26, 16, 10, 0.88);
  border: 1px solid rgba(200, 182, 166, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.25s;
}

.discard-entry.is-last-play {
  border-color: rgba(201, 169, 110, 0.42);
  background: rgba(36, 24, 14, 0.96);
  box-shadow: 0 0 16px rgba(201, 169, 110, 0.22);
}

.discard-entry-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: #A4907C;
}

.discard-entry.is-last-play .discard-entry-name { color: #e8c99a; }

.discard-entry-cards { display: flex; gap: 4px; }

.discard-mini-card {
  width: 22px;
  height: 32px;
  border-radius: 4px;
  background: linear-gradient(135deg, #4a3020, #2e1e12);
  border: 1px solid rgba(200, 182, 166, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.discard-entry-meta {
  font-size: 0.64rem;
  color: #C8B6A6;
  font-weight: 600;
}

/* ─── Table Bottom Bar ──────────────────────────────────────────────────────── */
.table-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 600px;
  z-index: 5;
  flex-shrink: 0;
}

/* Emote Reactions Pill */
.table-emotes-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20, 14, 9, 0.78);
  border: 1px solid rgba(200, 182, 166, 0.1);
  padding: 3px 8px;
  border-radius: 16px;
  flex-shrink: 0;
}

.emote-btn {
  background: transparent;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 2px 3px;
  border-radius: 6px;
  transition: transform 0.15s;
}
.emote-btn:hover { transform: scale(1.3); }

/* Action Buttons Bar */
.action-buttons {
  display: flex;
  gap: 8px;
  flex: 1;
}

.action-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.action-btn-icon  { font-size: 1.15rem; }

.action-btn-main {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.action-btn-label {
  font-size: 0.62rem;
  opacity: 0.85;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.kbd-hint {
  display: inline-block;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(241, 222, 201, 0.18);
  border-radius: 3px;
  padding: 0 3px;
  font-size: 0.58rem;
  font-family: monospace;
}

.btn-pass-action {
  background: rgba(241, 222, 201, 0.06);
  color: #A4907C;
  border: 1px solid rgba(200, 182, 166, 0.12);
}

.btn-pass-action:not(:disabled):hover {
  background: rgba(241, 222, 201, 0.11);
  color: #F1DEC9;
  border-color: rgba(200, 182, 166, 0.28);
  transform: translateY(-2px);
}

.btn-dare-action {
  background: linear-gradient(135deg, #b03030, #7a1c1c);
  color: #F1DEC9;
  box-shadow: 0 4px 18px rgba(176, 48, 48, 0.4);
}

.btn-dare-action:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176, 48, 48, 0.6);
  background: linear-gradient(135deg, #c0504a, #8b2020);
}

.btn-play-action {
  background: linear-gradient(135deg, #8D7B68, #6b5d4e);
  color: #F1DEC9;
  box-shadow: 0 4px 20px rgba(141, 123, 104, 0.5);
  border: 1px solid rgba(200, 182, 166, 0.18);
}

.btn-play-action:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(141, 123, 104, 0.7);
  background: linear-gradient(135deg, #A4907C, #8D7B68);
}

.action-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Game Feed Log Side Panel (280px) ──────────────────────────────────────── */
.game-log-panel {
  border-left: 1px solid rgba(200, 182, 166, 0.1);
  display: flex;
  flex-direction: column;
  background: rgba(18, 13, 9, 0.92);
  backdrop-filter: blur(16px);
  overflow: hidden;
  height: 100%;
}

.log-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(200, 182, 166, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
  color: #A4907C;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.log-badge {
  font-size: 0.64rem;
  background: rgba(122, 170, 130, 0.14);
  color: #7aaa82;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(122, 170, 130, 0.28);
}

.log-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: #F1DEC9;
  font-size: 1.2rem;
  cursor: pointer;
}

.log-entries {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.45;
  background: rgba(241, 222, 201, 0.03);
  border-left: 3px solid rgba(200, 182, 166, 0.12);
  animation: log-in 0.2s ease;
  color: #C8B6A6;
}

@keyframes log-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.log-entry.type-dare    { border-left-color: #c0504a; background: rgba(192, 80, 74, 0.07); }
.log-entry.type-pass    { border-left-color: #A4907C; color: #A4907C; }
.log-entry.type-play    { border-left-color: #C8B6A6; }
.log-entry.type-finish  { border-left-color: #7aaa82; background: rgba(122, 170, 130, 0.07); }
.log-entry.type-allpass { border-left-color: #c9a96e; background: rgba(201, 169, 110, 0.07); }

.log-empty-msg {
  color: #A4907C;
  font-size: 0.75rem;
  padding: 8px;
  text-align: center;
}

/* ─── Player Tactical Hand Section ──────────────────────────────────────────── */
.my-hand-area {
  border-top: 1px solid rgba(200, 182, 166, 0.1);
  background: rgba(15, 10, 7, 0.96);
  backdrop-filter: blur(18px);
  padding: 6px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  z-index: 20;
}

/* ─── Rank Selector ─────────────────────────────────────────────────────────── */
.rank-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(141, 123, 104, 0.1);
  border: 1px solid rgba(141, 123, 104, 0.28);
  overflow-x: auto;
  flex-shrink: 0;
}

.rank-selector.hidden { display: none; }

.rank-selector-header {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.rank-selector-title {
  font-size: 0.74rem;
  color: #c9a96e;
  font-weight: 700;
  text-transform: uppercase;
}

.rank-selector-sub {
  font-size: 0.68rem;
  color: #A4907C;
}

.rank-selector-buttons {
  display: flex;
  gap: 4px;
}

.rank-btn {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(141, 123, 104, 0.28);
  background: rgba(26, 16, 10, 0.65);
  color: #A4907C;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.rank-btn:hover {
  border-color: #C8B6A6;
  color: #F1DEC9;
  background: rgba(141, 123, 104, 0.22);
}

.rank-btn.selected {
  border-color: #c9a96e;
  color: #c9a96e;
  background: rgba(201, 169, 110, 0.18);
  box-shadow: 0 0 10px rgba(201, 169, 110, 0.28);
}

/* ─── Tactical Staging Tray ─────────────────────────────────────────────────── */
.staging-tray {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(30, 20, 12, 0.88);
  border: 1px solid rgba(141, 123, 104, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.staging-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.staging-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.staging-pulse-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: #c9a96e;
  color: #1a130e;
}

.staging-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #C8B6A6;
  letter-spacing: 0.06em;
}

.staging-help-hint {
  font-size: 0.66rem;
  color: #A4907C;
}

.staging-actions {
  display: flex;
  gap: 5px;
}

.staging-btn {
  background: rgba(241, 222, 201, 0.06);
  border: 1px solid rgba(200, 182, 166, 0.14);
  color: #F1DEC9;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.staging-btn:hover { background: rgba(241, 222, 201, 0.12); }

.staging-btn-danger:hover {
  background: rgba(192, 80, 74, 0.18);
  border-color: rgba(192, 80, 74, 0.38);
  color: #e07a74;
}

.staging-cards-row {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.staging-cards-row::-webkit-scrollbar { display: none; }

/* Individual Staged Slot */
.staged-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(18, 12, 8, 0.94);
  border: 1.5px solid rgba(201, 169, 110, 0.28);
  position: relative;
  flex-shrink: 0;
  min-width: 76px;
}

.staged-slot-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #c9a96e;
}

.staged-slot-card {
  width: 44px;
  height: 60px;
  border-radius: 6px;
  background: #fdfdfb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  position: relative;
}

.staged-slot-card.red   { color: #c0504a; }
.staged-slot-card.black { color: #1a130e; }

.staged-slot-card .card-rank     { font-size: 0.76rem; font-weight: 800; }
.staged-slot-card .card-suit-sm  { font-size: 0.64rem; }
.staged-slot-card .card-suit-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  pointer-events: none;
}

.staged-truth-tag {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.staged-truth-tag.truth {
  background: rgba(122, 170, 130, 0.14);
  color: #7aaa82;
  border: 1px solid rgba(122, 170, 130, 0.28);
}

.staged-truth-tag.bluff {
  background: rgba(192, 80, 74, 0.14);
  color: #e07a74;
  border: 1px solid rgba(192, 80, 74, 0.28);
}

.staged-controls {
  display: flex;
  gap: 3px;
}

.staged-move-btn {
  background: rgba(241, 222, 201, 0.07);
  border: 1px solid rgba(200, 182, 166, 0.14);
  color: #F1DEC9;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
}

.staged-move-btn:hover:not(:disabled) { background: rgba(241, 222, 201, 0.18); }
.staged-move-btn:disabled { opacity: 0.2; cursor: not-allowed; }

.staged-remove-btn {
  background: rgba(192, 80, 74, 0.14);
  border: 1px solid rgba(192, 80, 74, 0.28);
  color: #e07a74;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
}

.staged-remove-btn:hover { background: rgba(192, 80, 74, 0.28); }

/* ─── Hand Header & Controls ────────────────────────────────────────────────── */
.hand-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  flex-shrink: 0;
}

.hand-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hand-label {
  font-size: 0.72rem;
  color: #A4907C;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.hand-counter-badge {
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(141, 123, 104, 0.2);
  color: #C8B6A6;
  font-weight: 700;
  font-size: 0.74rem;
}

.hand-selected-info {
  font-size: 0.74rem;
  color: #c9a96e;
  font-weight: 700;
}

.hand-sort-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sort-label {
  font-size: 0.66rem;
  color: #A4907C;
}

.sort-btn {
  background: rgba(241, 222, 201, 0.04);
  border: 1px solid rgba(200, 182, 166, 0.1);
  color: #A4907C;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
}

.sort-btn.active {
  background: rgba(201, 169, 110, 0.14);
  border-color: #c9a96e;
  color: #c9a96e;
}

/* ─── Overlapping Fanned Card Hand Layout ────────────────────────────────────── */
.my-hand-cards {
  display: flex;
  align-items: flex-end;
  padding: 16px 12px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  height: 114px;
  min-height: 114px;
  max-height: 114px;
  box-sizing: border-box;
}

.my-hand-cards::-webkit-scrollbar { height: 4px; }
.my-hand-cards::-webkit-scrollbar-thumb {
  background: rgba(141, 123, 104, 0.32);
  border-radius: 4px;
}

/* Overlapping Playing Card */
.play-card {
  width: 66px;
  height: 92px;
  border-radius: 8px;
  background: #fdfdfb;
  border: 1.5px solid transparent;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  margin-right: -24px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 5px;
  z-index: 1;
}

.play-card:last-child {
  margin-right: 16px !important;
}

@media (hover: hover) and (pointer: fine) {
  .play-card:hover {
    transform: translateY(-14px) scale(1.06);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.88);
    z-index: 60 !important;
  }
}

.play-card.selected {
  transform: translateY(-16px);
  border-color: #c9a96e;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.9),
    0 0 0 2px #c9a96e,
    0 0 18px rgba(201, 169, 110, 0.5);
  z-index: 50 !important;
}

.play-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.card-order-badge {
  position: absolute;
  top: -7px;
  left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a96e, #9a7a45);
  color: #1a130e;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 8px rgba(201, 169, 110, 0.55);
  border: 1.5px solid white;
  z-index: 10;
  animation: badge-pop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  line-height: 1;
  width: auto;
  align-self: flex-start;
  z-index: 2;
  pointer-events: none;
}

.card-corner.bottom {
  align-self: flex-end;
  align-items: flex-start;
  transform: rotate(180deg);
}

.card-rank {
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
  line-height: 1;
  letter-spacing: -0.5px;
}

.card-suit-sm {
  font-size: 0.72rem;
  text-align: left;
  line-height: 1;
  margin-top: 1px;
}

.card-suit-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  pointer-events: none;
}

.play-card.red   { color: #c0504a; }
.play-card.black { color: #1a1410; }

/* ─── Modals ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 7, 5, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #1e1510;
  border: 1px solid rgba(200, 182, 166, 0.15);
  border-radius: 22px;
  padding: 26px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(241, 222, 201, 0.05);
  box-sizing: border-box;
}

/* Dare Modal */
.dare-modal-box { text-align: center; position: relative; }

.dare-modal-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 120px;
  background: radial-gradient(circle, rgba(192, 80, 74, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.dare-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #e07a74;
  margin-bottom: 4px;
  font-family: 'Playfair Display', serif;
}

.dare-modal-sub { color: #F1DEC9; margin-bottom: 4px; font-size: 0.9rem; }
.dare-hint { font-size: 0.76rem; color: #A4907C; margin-bottom: 18px; }

.dare-cards-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.mobile-landscape-prompt { display: none; }

.dare-card {
  width: 82px;
  height: 118px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3d2510, #221409);
  border: 2px solid rgba(200, 182, 166, 0.16);
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
  flex-shrink: 0;
}

.dare-card-slot-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(241, 222, 201, 0.55);
  margin-bottom: 6px;
}

.dare-card-symbol { font-size: 2.2rem; opacity: 0.55; }

.dare-card:hover {
  transform: translateY(-6px);
  border-color: rgba(192, 80, 74, 0.55);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85);
}

.dare-card.selected {
  border-color: #c0504a;
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.9), 0 0 20px rgba(192, 80, 74, 0.45);
}

.dare-card.selected .dare-card-slot-label { color: #e07a74; }

.dare-card.revealed {
  cursor: default;
  background: #fdfdfb;
  border-color: transparent;
  transform: none;
  animation: card-flip-reveal 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes card-flip-reveal {
  0%   { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

.dare-result-banner {
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 700;
}

.dare-result-banner.truth {
  background: rgba(122, 170, 130, 0.1);
  border: 1.5px solid rgba(122, 170, 130, 0.38);
  color: #7aaa82;
}

.dare-result-banner.lie {
  background: rgba(192, 80, 74, 0.1);
  border: 1.5px solid rgba(192, 80, 74, 0.38);
  color: #e07a74;
}

.dare-result-cards {
  font-size: 0.82rem;
  color: #A4907C;
  margin-top: 4px;
}

.dare-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Rules Modal */
.rules-modal-box { max-width: 600px; }

.rules-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200, 182, 166, 0.1);
}

.rules-title { font-size: 1.15rem; font-weight: 700; color: #c9a96e; }

.modal-close-x {
  background: transparent;
  border: none;
  color: #A4907C;
  font-size: 1.4rem;
  cursor: pointer;
}

.rules-modal-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
}

.rule-block {
  display: flex;
  gap: 12px;
  background: rgba(241, 222, 201, 0.03);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(200, 182, 166, 0.07);
}

.rule-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #8D7B68;
  color: #F1DEC9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.rule-body h4 { font-size: 0.88rem; color: #F1DEC9; margin-bottom: 4px; }
.rule-body p  { font-size: 0.78rem; color: #A4907C; line-height: 1.48; margin-bottom: 4px; }
.rule-body ul { padding-left: 16px; font-size: 0.76rem; color: #A4907C; line-height: 1.48; }

/* End Modal */
.end-modal-box { text-align: center; max-width: 440px; }
.end-trophy   { font-size: 4.5rem; margin-bottom: 10px; display: block; }
.end-title    { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; font-family: 'Playfair Display', serif; }
.end-title.win  { color: #c9a96e; }
.end-title.lose { color: #c0504a; }
.end-message  { color: #F1DEC9; margin-bottom: 20px; font-size: 0.95rem; }
.end-buttons  { display: flex; gap: 10px; justify-content: center; }

/* ─── Responsive Media Queries ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .game-main {
    grid-template-columns: 1fr;
  }
  .game-log-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 290px;
    z-index: 25;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.75);
  }
  .game-log-panel.open {
    transform: translateX(0);
  }
  .log-toggle-btn {
    display: inline-flex;
  }
  .log-close-btn {
    display: block;
  }
}

@media (max-width: 768px) {
  .table-area {
    padding: 6px 8px;
    gap: 6px;
  }
  .game-table-center {
    padding: 8px 10px;
  }
  .table-top-bar {
    flex-direction: row;
    gap: 6px;
  }
  .turn-banner {
    padding: 4px 10px;
    font-size: 0.74rem;
  }
  .declared-rank-display {
    padding: 3px 10px;
  }
  .declared-crown { font-size: 1rem; }
  .declared-rank-val { font-size: 1rem; }

  .table-bottom-bar {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }
  .action-buttons {
    width: 100%;
    gap: 6px;
  }
  .action-btn {
    padding: 7px 6px;
  }
  .action-btn-main  { font-size: 0.84rem; }
  .action-btn-label { font-size: 0.58rem; }
  .kbd-hint { display: none; }

  .my-hand-cards {
    height: 100px;
    min-height: 100px;
    padding: 12px 10px 4px;
  }
  .play-card {
    width: 54px;
    height: 80px;
    padding: 3px 4px;
  }
  .play-card.selected { transform: translateY(-12px); }
  .card-rank     { font-size: 0.76rem; }
  .card-suit-sm  { font-size: 0.62rem; }
  .card-suit-center { font-size: 1.3rem; }
}

@media (max-width: 768px) and (orientation: portrait) {
  .mobile-landscape-prompt {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    background: radial-gradient(circle at 50% 15%, #281d14 0%, #1a130e 100%);
    text-align: center;
  }

  .mobile-landscape-card {
    width: min(100%, 360px);
  }

  .mobile-landscape-icon {
    margin-bottom: 12px;
    font-size: 3rem;
  }

  .mobile-landscape-card h1 {
    margin-bottom: 8px;
    color: #c9a96e;
    font-size: 1.5rem;
  }

  .mobile-landscape-card p {
    margin-bottom: 18px;
    color: #A4907C;
    font-size: 0.95rem;
  }

  .mobile-landscape-card .btn {
    width: 100%;
    min-height: 46px;
  }

  .mobile-landscape-card .mobile-landscape-hint {
    margin: 14px 0 0;
    font-size: 0.78rem;
  }
}

@media (max-width: 900px) and (orientation: landscape), (max-height: 500px) and (orientation: landscape) {
  .game-nav {
    height: 40px;
    min-height: 40px;
    padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  }

  .game-nav-logo { font-size: 0.86rem; }
  .nav-left, .nav-right { gap: 5px; }
  .nav-icon-btn { padding: 3px 7px; }
  .nav-btn-text { display: none; }
  .nav-room-code { padding: 3px 8px; }
  .nav-room-code .nav-label, .nav-pile-info .vault-label { display: none; }
  .mobile-fullscreen-btn { display: inline-flex; }

  .table-area {
    padding: 3px max(8px, env(safe-area-inset-right)) 3px max(8px, env(safe-area-inset-left));
    gap: 3px;
  }

  .opponents-row {
    min-height: 36px;
    max-height: 40px;
    gap: 5px;
    padding: 1px 2px;
  }

  .opponent-panel {
    min-width: 86px;
    padding: 3px 6px;
    gap: 5px;
  }

  .opp-avatar       { width: 24px; height: 24px; font-size: 0.72rem; }
  .opp-name         { font-size: 0.64rem; }
  .opp-status-badge, .opp-card-chip { font-size: 0.58rem; }

  .game-table-center {
    padding: 4px 8px;
    border-radius: 14px;
    border-width: 2px;
  }

  .table-top-bar { gap: 5px; }
  .turn-banner   { padding: 3px 8px; font-size: 0.66rem; }
  .turn-banner-dot { width: 6px; height: 6px; }
  .declared-rank-display { padding: 2px 7px; gap: 4px; }
  .declared-label    { font-size: 0.5rem; }
  .declared-rank-val { font-size: 0.88rem; }
  .declared-crown    { font-size: 0.82rem; }
  .discard-pile-area { gap: 2px; }
  .discard-header    { gap: 5px; }
  .discard-pile-label, .discard-total-badge { font-size: 0.58rem; }
  .discard-stack     { max-height: 48px; gap: 4px; padding: 2px 4px; }
  .discard-entry     { padding: 2px 5px; gap: 1px; }
  .discard-entry-name, .discard-entry-meta { font-size: 0.52rem; }
  .discard-mini-card { width: 16px; height: 22px; }

  .table-bottom-bar { flex-direction: row; gap: 5px; }
  .table-emotes-bar { gap: 1px; padding: 2px 4px; }
  .emote-btn        { padding: 1px 2px; font-size: 0.8rem; }
  .action-buttons   { gap: 4px; }
  .action-btn       { padding: 4px 5px; border-radius: 8px; gap: 0; }
  .action-btn-icon  { font-size: 0.82rem; }
  .action-btn-main  { font-size: 0.7rem; }
  .action-btn-label { font-size: 0.5rem; }

  .my-hand-area {
    gap: 2px;
    padding: 3px max(8px, env(safe-area-inset-right)) max(3px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .rank-selector { gap: 5px; padding: 2px 6px; }
  .rank-selector-title { font-size: 0.58rem; }
  .rank-selector-sub   { display: none; }
  .rank-btn            { padding: 2px 5px; font-size: 0.62rem; }
  .staging-tray        { gap: 2px; padding: 3px 6px; }
  .staging-title       { font-size: 0.58rem; }
  .staging-help-hint   { display: none; }
  .staging-btn         { padding: 1px 5px; font-size: 0.58rem; }
  .staged-slot         { min-width: 54px; padding: 2px 4px; }
  .staged-slot-card    { width: 32px; height: 42px; }
  .staged-truth-tag    { display: none; }
  .hand-info-row       { min-height: 18px; }
  .hand-info-left      { gap: 5px; }
  .hand-label, .hand-counter-badge, .hand-selected-info,
  .sort-label, .sort-btn { font-size: 0.58rem; }
  .my-hand-cards {
    height: clamp(66px, 20dvh, 84px);
    min-height: clamp(66px, 20dvh, 84px);
    max-height: clamp(66px, 20dvh, 84px);
    padding: 8px 8px 2px;
  }
  .play-card {
    width: 46px;
    height: clamp(52px, 16dvh, 66px);
    border-radius: 6px;
    padding: 2px 3px;
  }
  .play-card.selected  { transform: translateY(-8px); }
  .card-rank           { font-size: 0.68rem; }
  .card-suit-sm        { font-size: 0.56rem; }
  .card-suit-center    { font-size: 1.1rem; }
  .card-corner.bottom  { display: none; }
}

@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {
  .dare-modal-overlay {
    overflow-y: auto;
    align-items: center;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .dare-modal-box {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 16px);
    min-height: 0;
    overflow: hidden;
    padding: 14px;
    border-radius: 14px;
  }

  .dare-modal-title { font-size: 1.1rem; }
  .dare-modal-sub   { font-size: 0.78rem; }
  .dare-hint        { margin-bottom: 8px; font-size: 0.68rem; }

  .dare-cards-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
    max-width: 100%;
    max-height: 42dvh;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 4px 0 12px;
    padding: 10px 4px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .dare-card {
    width: 68px;
    height: clamp(86px, 28dvh, 110px);
    scroll-snap-align: start;
  }

  .dare-card-slot-label { font-size: 0.58rem; }
  .dare-card-symbol     { font-size: 1.8rem; }
  .dare-modal-actions   { flex-shrink: 0; }
  .dare-result-banner   { padding: 8px 10px; margin-bottom: 10px; font-size: 0.84rem; }
}

@media (max-width: 480px) {
  .game-nav-logo { font-size: 0.92rem; }
  .nav-right     { gap: 5px; }
  .nav-icon-btn  { padding: 4px 7px; }
  .nav-btn-text  { display: none; }
  .nav-pile-info .vault-label  { display: none; }
  .nav-room-code .nav-label    { display: none; }

  .opponents-row   { min-height: 48px; max-height: 52px; }
  .opponent-panel  { min-width: 90px; padding: 4px 8px; gap: 5px; }
  .opp-avatar      { width: 26px; height: 26px; font-size: 0.8rem; }
  .opp-name        { font-size: 0.68rem; }
  .opp-card-chip   { font-size: 0.64rem; padding: 1px 4px; }

  .my-hand-cards  { height: 94px; min-height: 94px; padding: 10px 8px 4px; }
  .play-card      { width: 50px; height: 74px; padding: 3px 4px; }
  .play-card.selected { transform: translateY(-10px); }
}

@media (max-width: 380px) {
  .nav-pile-info { display: none; }
}

@media (orientation: landscape) and (max-height: 650px) {
  .game-nav {
    height: 34px;
    min-height: 34px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .game-main, .table-area { min-height: 0; }

  .table-area {
    padding: 3px 5px;
    gap: 3px;
  }

  .opponents-row { min-height: 28px; max-height: 30px; }

  .opponent-panel { min-width: 0; padding: 2px 5px; gap: 4px; }

  .opp-avatar { width: 20px; height: 20px; font-size: 0.62rem; }
  .opp-name, .opp-card-chip { font-size: 0.56rem; }

  .game-table-center {
    min-height: 0;
    padding: 3px 6px;
    border-width: 2px;
    border-radius: 12px;
  }

  .table-top-bar  { gap: 4px; }
  .turn-banner    { gap: 4px; padding: 2px 7px; font-size: 0.58rem; }
  .turn-banner-dot { width: 5px; height: 5px; }
  .table-bottom-bar { gap: 4px; }
  .table-emotes-bar { gap: 1px; padding: 1px 3px; }
  .emote-btn        { font-size: 0.72rem; padding: 1px; }
  .action-buttons   { gap: 4px; }
  .action-btn {
    flex-direction: row;
    justify-content: center;
    gap: 3px;
    min-height: 25px;
    padding: 3px 5px;
    border-radius: 6px;
  }
  .action-btn-icon  { font-size: 0.72rem; }
  .action-btn-main  { font-size: 0.58rem; }
  .action-btn-label { display: none; }

  .my-hand-area {
    min-height: 0;
    max-height: 60dvh;
    padding: 3px 6px;
    gap: 2px;
    overflow: hidden;
  }

  .rank-selector { min-height: 22px; gap: 4px; padding: 2px 5px; }
  .rank-selector-title { font-size: 0.56rem; }
  .rank-selector-buttons { min-width: 0; gap: 2px; overflow-x: auto; }
  .rank-btn { padding: 1px 4px; font-size: 0.58rem; }

  .staging-tray {
    min-height: 0;
    max-height: 22dvh;
    gap: 1px;
    padding: 2px 4px;
    overflow: hidden;
  }

  .staging-header { min-height: 14px; }
  .staging-title, .staging-help-hint { font-size: 0.54rem; }
  .staging-actions { gap: 2px; }
  .staging-btn     { padding: 1px 3px; font-size: 0.52rem; }

  .staging-cards-row {
    min-height: 0;
    max-height: calc(22dvh - 16px);
    gap: 3px;
    padding: 1px 2px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .staged-slot  { min-width: 42px; gap: 1px; padding: 1px 2px; }
  .staged-slot-badge { font-size: 0.48rem; }
  .staged-slot-card  { width: 24px; height: 32px; }
  .staged-slot-card .card-rank        { font-size: 0.58rem; }
  .staged-slot-card .card-suit-sm     { font-size: 0.5rem; }
  .staged-slot-card .card-suit-center { font-size: 0.9rem; }
  .staged-truth-tag  { display: none; }
  .staged-controls   { gap: 1px; }
  .staged-move-btn, .staged-remove-btn { padding: 1px 3px; font-size: 0.52rem; }

  .hand-info-row { min-height: 14px; flex-shrink: 0; }
  .hand-label, .hand-counter-badge, .hand-selected-info,
  .sort-label, .sort-btn { font-size: 0.52rem; }

  .my-hand-cards {
    height: clamp(58px, 18dvh, 76px);
    min-height: 56px;
    max-height: 78px;
    padding: 8px 6px 2px;
    flex: 1 1 auto;
  }

  .play-card {
    width: 44px;
    height: clamp(48px, 14dvh, 62px);
    padding: 2px 3px;
    border-radius: 6px;
  }

  .play-card.selected { transform: translateY(-7px); }
  .card-rank          { font-size: 0.64rem; }
  .card-suit-sm       { font-size: 0.54rem; }
  .card-suit-center   { font-size: 1rem; }
  .card-corner.bottom { display: none; }
}

@media (orientation: landscape) and (max-height: 360px) {
  .opponents-row, .table-emotes-bar { display: none; }
}
