﻿:root {
  --bg: #07140e;
  --bg-2: #0c1f16;
  --felt: #14532d;
  --felt-deep: #0a3d24;
  --neon: #22c55e;
  --neon-2: #16a34a;
  --neon-glow: rgba(34, 197, 94, 0.45);
  --gold: #e0b34a;
  --gold-deep: #b8860b;
  --ink: #04140c;
  --text: #f3faf5;
  --muted: #9fbfab;
  --line: rgba(243, 250, 245, 0.12);
  --panel: rgba(10, 28, 18, 0.82);
  --danger: #ef4444;
  --red: #c41e3a;
  --black: #141414;
  --radius: 16px;
  --nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --card-w: clamp(34px, 12vw, 48px);
  --card-h: clamp(48px, 17vw, 68px);
  --trick-w: clamp(38px, 11vw, 48px);
  --trick-h: clamp(54px, 15vw, 68px);
  font-family: Manrope, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body {
  min-height: 100dvh;
  background:
    radial-gradient(900px 480px at 50% -10%, #1a6b3c 0%, transparent 55%),
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255,255,255,0.015) 12px, rgba(255,255,255,0.015) 24px),
    linear-gradient(180deg, #0b2416 0%, #07140e 50%, #03100a 100%);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
input { outline: none; font-size: 16px; } /* prevents iOS zoom on focus */

#app {
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.app-shell {
  min-height: 100dvh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.app-shell--nonav { grid-template-rows: 1fr; }

.screen {
  padding: calc(12px + var(--safe-top)) 14px calc(var(--nav-h) + 12px + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.app-shell--nonav .screen { padding-bottom: calc(20px + var(--safe-bottom)); }
.screen-splash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 50% 35%, #1a6b3c 0%, transparent 50%),
    #07140e;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(5, 16, 11, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  z-index: 20;
}
.nav-item {
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 8px 4px;
  color: var(--muted);
  border-radius: 12px;
}
.nav-item.is-active { color: var(--neon); background: rgba(34, 197, 94, 0.1); }
.nav-item__icon { font-size: 18px; line-height: 1; }
.nav-item__label { font-size: 11px; font-weight: 600; }

.logo-block { text-align: center; }
.logo-crown { color: var(--gold); font-size: 28px; line-height: 1; margin-bottom: 4px; }
.logo-cards { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.logo-mini {
  width: 36px; height: 50px; border-radius: 6px;
  background: linear-gradient(180deg, #fff, #f3e6c8);
  color: var(--black); font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.35);
  transform: rotate(var(--r, 0deg));
}
.logo-mini:nth-child(1) { --r: -10deg; color: var(--red); }
.logo-mini:nth-child(2) { --r: -3deg; color: var(--red); }
.logo-mini:nth-child(3) { --r: 3deg; }
.logo-mini:nth-child(4) { --r: 10deg; }
.logo-title {
  margin: 0;
  font-family: Cinzel, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-size: 28px;
}
.logo-block--lg .logo-title { font-size: clamp(36px, 10vw, 48px); }
.logo-block--lg .logo-mini { width: 48px; height: 68px; font-size: 14px; }
.logo-block--md .logo-title { font-size: 26px; }
.logo-tag { margin: 8px 0 0; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; }

.splash-bar {
  width: min(220px, 60vw);
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.splash-bar__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon), #4ade80);
  animation: load 1.5s ease forwards;
}
@keyframes load { to { width: 100%; } }

.home-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.home-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  text-align: left;
  min-width: 0;
}
.home-user__meta { display: grid; gap: 2px; min-width: 0; }
.home-user__meta strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-user__meta span { color: var(--muted); font-size: 12px; }

.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(145deg, #1f7a45, #0d3b24);
  border: 2px solid rgba(34, 197, 94, 0.35);
  display: grid; place-items: center;
  font-weight: 800; flex: 0 0 auto;
}
.avatar--sm { width: 36px; height: 36px; font-size: 13px; }
.avatar--md { width: 48px; height: 48px; }
.avatar--xl { width: 84px; height: 84px; font-size: 32px; border-width: 3px; }
.avatar--table {
  width: 48px; height: 48px;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.2s ease;
}
.avatar--table.is-turn,
.player-slot.is-turn .avatar--table {
  box-shadow: 0 0 0 3px var(--neon), 0 0 18px var(--neon-glow);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--neon), 0 0 12px var(--neon-glow); }
  50% { box-shadow: 0 0 0 4px var(--neon), 0 0 22px var(--neon-glow); }
}

.coin-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(224, 179, 74, 0.12);
  border: 1px solid rgba(224, 179, 74, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--gold);
  font-size: 14px;
}
.coin-pill__icon { color: var(--gold); }
.coin-pill--sm { font-size: 12px; padding: 4px 10px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 16px;
}
.icon-btn--ghost { visibility: hidden; }
.icon-btn.is-live {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

.home-hero { margin: 8px 0 20px; }
.name-row { margin-bottom: 12px; }
.name-input, .text-input, .code-input {
  width: 100%;
  background: #06140e;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.name-input:focus, .text-input:focus, .code-input:focus { border-color: var(--neon); }
.code-input { text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; }

.btn {
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-neon {
  background: linear-gradient(180deg, #34d399, var(--neon-2));
  color: #04210f;
  box-shadow: 0 8px 24px var(--neon-glow);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
}
.btn-xl { width: 100%; padding: 16px; font-size: 16px; border-radius: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 999px; }
.btn:disabled, .btn.is-disabled { opacity: 0.4; cursor: not-allowed; }
.sticky-cta { margin-top: 24px; }

.action-list { display: grid; gap: 10px; margin: 14px 0; }
.action-row, .menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.action-row__left { display: grid; gap: 2px; }
.action-row__left span, .menu-row .muted { color: var(--muted); font-size: 12px; }
.action-row__chev { color: var(--neon); font-size: 22px; font-weight: 700; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.quick-tile {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 14px 8px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.quick-tile__icon { font-size: 22px; }

.page-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 18px;
}
.page-head__title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0,0,0,0.25);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.tab {
  padding: 10px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.tab.is-active {
  background: rgba(34, 197, 94, 0.18);
  color: var(--neon);
}

.room-list, .friend-list, .lb-list, .hist-list, .menu-list, .settings-list, .result-board {
  display: grid;
  gap: 10px;
}
.room-item, .friend-row, .lb-row, .hist-row, .result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.room-item__mid, .friend-row__mid { flex: 1; display: grid; gap: 2px; min-width: 0; }
.room-item__mid strong, .friend-row__mid strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 12px; color: var(--muted); }
.status.is-online { color: var(--neon); }
.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.join-code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }

.form-stack { display: grid; gap: 10px; }
.field-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.seg__btn {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #06140e;
  font-weight: 700;
  color: var(--muted);
}
.seg__btn.is-active {
  border-color: var(--neon);
  color: var(--ink);
  background: linear-gradient(180deg, #34d399, var(--neon-2));
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bet-chip {
  min-width: 56px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #06140e;
  font-weight: 700;
  color: var(--muted);
}
.bet-chip.is-active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(224, 179, 74, 0.12);
}

.room-code-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--gold);
  background: rgba(224, 179, 74, 0.08);
  margin-bottom: 16px;
}
.room-code-card__value {
  flex: 1;
  font-size: 24px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.seat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.seat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #0a1c13;
  display: grid;
  gap: 6px;
  place-items: center;
  text-align: center;
  min-height: 120px;
}
.seat-card.is-filled { background: #123526; border-color: rgba(34, 197, 94, 0.3); }

.feature-card {
  background: linear-gradient(160deg, #1a6b3c, #0a3d24);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
}
.feature-card__icon { font-size: 36px; }
.feature-card h3 { margin: 8px 0 4px; }
.feature-card p { margin: 0 0 14px; color: #c4e0cc; }
.section-title { margin: 0 0 10px; font-size: 15px; color: var(--muted); }

.lb-row__rank {
  width: 22px;
  text-align: center;
  color: var(--gold);
  font-weight: 800;
}
.lb-row__score { margin-left: auto; color: var(--neon); font-weight: 700; }

.profile-hero { text-align: center; display: grid; gap: 6px; place-items: center; margin-bottom: 18px; }
.profile-hero h3 { margin: 4px 0 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-cell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  display: grid;
  gap: 4px;
}
.stat-cell strong { font-size: 16px; color: var(--neon); }
.stat-cell span { font-size: 10px; color: var(--muted); line-height: 1.2; }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  width: 100%;
  text-align: left;
}
.toggle {
  width: 48px; height: 28px; border-radius: 999px;
  background: #1a2e24; position: relative;
  border: 1px solid var(--line);
  transition: background 0.2s;
}
.toggle.is-on { background: var(--neon); border-color: var(--neon); }
.toggle__knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.toggle.is-on .toggle__knob { transform: translateX(20px); }

.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.center { text-align: center; }
.error-banner {
  background: #3f1212;
  color: #ffd0d0;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 12px;
}
.score-pos { color: var(--neon); font-weight: 700; }
.score-neg { color: #f87171; font-weight: 700; }

/* Lock zoom / pan while in game */
html.is-game, body.is-game {
  overflow: hidden;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  position: fixed;
  inset: 0;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
body.is-game {
  background: #c9a87e;
}
body.is-game #app {
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: hidden;
}

.table-wrap--land {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  display: block;
  overflow: hidden;
  background: #c9a87e;
  touch-action: none;
}

.rotate-gate {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  background: #07140e;
  color: #f3faf5;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.rotate-gate__icon {
  font-size: 48px;
  color: #22c55e;
  animation: spin-hint 1.6s ease-in-out infinite;
}
@keyframes spin-hint {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(25deg); }
}
.rotate-gate strong { font-size: 22px; }
.rotate-gate p { margin: 0; color: #9fbfab; font-size: 14px; }

@media (orientation: portrait) and (max-width: 900px) {
  .table-wrap--land .felt,
  .table-wrap--land .game-chrome { visibility: hidden; pointer-events: none; }
  .table-wrap--land .rotate-gate { display: flex; }
}

.game-chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0;
  pointer-events: none;
}
.game-chrome > * { pointer-events: auto; }
.game-chrome__right { display: flex; gap: 6px; }

.game-close {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
.game-icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 18px;
  display: grid;
  place-items: center;
}
.game-icon-btn.is-on {
  border-color: rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.2);
}
.game-hud-pill {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.felt--wood {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      180deg,
      #d7b896 0px,
      #d7b896 18px,
      #c9a87e 18px,
      #c9a87e 20px,
      #b8956a 20px,
      #b8956a 22px,
      #d2b08c 22px,
      #d2b08c 40px
    );
}

.table-wrap--land .player-slot {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: none;
  color: #1a1208;
}
.table-wrap--land .player-slot--top {
  left: 50%; top: 8px; transform: translateX(-50%);
}
.table-wrap--land .player-slot--left {
  left: 10px; top: 42%; transform: translateY(-50%);
}
.table-wrap--land .player-slot--right {
  right: 10px; top: 42%; transform: translateY(-50%);
}
.table-wrap--land .player-slot--bottom {
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 8;
}
.table-wrap--land .player-slot.is-turn .player-name {
  color: #14532d;
  text-shadow: 0 0 8px rgba(34,197,94,0.5);
}
.table-wrap--land .player-meta { display: grid; gap: 3px; place-items: center; }
.table-wrap--land .player-name {
  font-size: 13px;
  font-weight: 800;
  color: #1f160c;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

.score-badge {
  display: flex;
  gap: 2px;
  background: rgba(20, 20, 20, 0.82);
  border-radius: 4px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.score-badge__bid {
  background: #16a34a;
  color: #fff;
  padding: 3px 6px;
}
.score-badge__won {
  color: #e5e5e5;
  padding: 3px 6px;
}
.turn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.opp-fan {
  position: relative;
  width: 70px;
  height: 54px;
}
.opp-fan--top { width: 90px; height: 48px; }
.opp-fan--left, .opp-fan--right { width: 58px; height: 70px; }
.opp-fan__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 48px;
  margin: -24px 0 0 -17px;
  border-radius: 4px;
  border: 1px solid #fff;
  background: repeating-linear-gradient(45deg, #b91c1c, #b91c1c 4px, #fecaca 4px, #fecaca 8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transform: rotate(var(--rot, 0deg));
}
.opp-fan--left .opp-fan__card { transform: rotate(calc(-55deg + var(--rot, 0deg))); }
.opp-fan--right .opp-fan__card { transform: rotate(calc(55deg + var(--rot, 0deg))); }

.table-wrap--land .trick-center {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(280px, 42vw);
  height: min(220px, 48vh);
  transform: translate(-50%, -50%);
  inset: auto;
  z-index: 6;
}
.table-wrap--land .trick-note {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 1;
}
.table-wrap--land .trick-play {
  position: absolute;
  z-index: 2;
  animation: land-card-in 0.2s ease;
}
@keyframes land-card-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.table-wrap--land .trick-play--top { left: 50%; top: 0; transform: translateX(-50%); }
.table-wrap--land .trick-play--bottom { left: 50%; bottom: 0; transform: translateX(-50%); }
.table-wrap--land .trick-play--left { left: 0; top: 50%; transform: translateY(-50%); }
.table-wrap--land .trick-play--right { right: 0; top: 50%; transform: translateY(-50%); }
.table-wrap--land .trick-play.is-winning .trick-card {
  outline: 2px solid #e0b34a;
  box-shadow: 0 0 12px rgba(224,179,74,0.55);
}
.table-wrap--land .trick-play.is-faded { opacity: 0.92; }

.hand-dock {
  position: absolute;
  left: 50%;
  bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: min(96vw, 720px);
  pointer-events: none;
}
.hand-dock > * { pointer-events: auto; }

.land-cta {
  background: rgba(22, 163, 74, 0.95);
  color: #04210f;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
}
.land-cta--wait {
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.land-bid {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.table-wrap--land .bid-row {
  display: flex;
  gap: 4px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.table-wrap--land .bid-row::-webkit-scrollbar { display: none; }
.table-wrap--land .bid-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: #1a2e24;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.table-wrap--land .bid-chip.is-suggest {
  background: #e0b34a;
  color: #2a1c00;
  border-color: #e0b34a;
}

.table-wrap--land .my-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding: 0;
  width: 100%;
}

:root {
  --land-card-w: clamp(42px, 7.2vw, 64px);
  --land-card-h: clamp(60px, 10.5vw, 90px);
  --land-trick-w: clamp(40px, 6.5vw, 58px);
  --land-trick-h: clamp(56px, 9.5vw, 82px);
}

.table-wrap--land .cb-card {
  position: relative;
  width: var(--land-card-w);
  height: var(--land-card-h);
  border-radius: 6px;
  border: 1px solid #cfcfcf;
  background: linear-gradient(180deg, #ffffff, #f3f0ea);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  color: #141414;
  flex: 0 0 auto;
  -webkit-user-select: none;
  user-select: none;
}
.table-wrap--land .cb-card__rank {
  position: absolute;
  top: 4px; left: 5px;
  font-weight: 800;
  font-size: clamp(11px, 1.8vw, 15px);
  line-height: 1;
}
.table-wrap--land .cb-card__suit {
  position: absolute;
  top: 18px; left: 6px;
  font-size: clamp(10px, 1.5vw, 13px);
  line-height: 1;
}
.table-wrap--land .cb-card__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(18px, 3vw, 28px);
}
.table-wrap--land .cb-card--hearts,
.table-wrap--land .cb-card--diamonds { color: #c41e3a; }
.table-wrap--land .cb-card--spades,
.table-wrap--land .cb-card--clubs { color: #141414; }
.table-wrap--land .cb-card--back {
  background: repeating-linear-gradient(45deg, #b91c1c, #b91c1c 4px, #fecaca 4px, #fecaca 8px);
  border-color: #fff;
}
.table-wrap--land .my-cards .cb-card {
  margin-left: calc(var(--land-card-w) * -0.38);
}
.table-wrap--land .my-cards .cb-card:first-child { margin-left: 0; }
.table-wrap--land .my-cards .cb-card.is-playable {
  transform: translateY(-14px);
  z-index: 3;
  outline: 2px solid #22c55e;
}
.table-wrap--land .cb-card--compact {
  width: var(--land-trick-w);
  height: var(--land-trick-h);
}
.table-wrap--land .cb-card.is-dim { opacity: 0.35; }
.table-wrap--land .cb-card:disabled { cursor: default; }

.table-wrap--land .player-slot--bottom .player-meta {
  position: absolute;
  left: 50%;
  bottom: calc(var(--land-card-h) + 8px);
  transform: translateX(-50%);
}

@media (min-width: 900px) and (min-height: 500px) {
  :root {
    --land-card-w: 62px;
    --land-card-h: 88px;
    --land-trick-w: 56px;
    --land-trick-h: 80px;
  }
  .opp-fan__card { width: 40px; height: 56px; margin: -28px 0 0 -20px; }
}

@media (max-height: 400px) {
  :root {
    --land-card-w: 36px;
    --land-card-h: 50px;
    --land-trick-w: 34px;
    --land-trick-h: 48px;
  }
  .opp-fan { transform: scale(0.85); }
  .game-close, .game-icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .table-wrap--land .player-name { font-size: 11px; }
}

.screen-results {
  text-align: center;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  max-width: 480px;
  margin: 0 auto;
}
.win-crown { font-size: clamp(40px, 12vw, 56px); color: var(--gold); line-height: 1; }
.win-title {
  font-family: Cinzel, Georgia, serif;
  color: var(--gold);
  margin: 8px 0 4px;
  font-size: clamp(24px, 8vw, 32px);
}
.win-score { font-size: clamp(22px, 7vw, 28px); font-weight: 800; color: var(--neon); margin: 0 0 20px; }
.result-row.is-you { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.1); }
.result-row__rank { width: 22px; color: var(--gold); font-weight: 800; }
.result-actions { display: grid; gap: 10px; margin-top: 18px; }

