:root {
  --bg: #0a1a0f;
  --panel: rgba(8, 22, 13, 0.92);
  --panel-soft: rgba(230, 255, 240, 0.06);
  --line: rgba(120, 220, 160, 0.28);
  --text: #edfaf2;
  --muted: rgba(200, 245, 220, 0.72);
  --accent: #ffd166;
  --accent-2: #4ade80;
  --danger: #fb7185;
  --shadow: 0 32px 84px rgba(0, 0, 0, 0.56);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-body: "Segoe UI", "Trebuchet MS", sans-serif;
}

.center-trick {
  z-index: 4;
}

.table-status-pod {
  position: absolute;
  left: 50%;
  top: 14%;
  z-index: 7;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: min(78vw, 320px);
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 230, 181, 0.18);
  background: rgba(8, 22, 12, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
  transform: translateX(-50%);
  pointer-events: none;
}

.seat-bid-callout {
  position: absolute;
  left: 50%;
  top: -18px;
  z-index: 18;
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 98px;
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 226, 172, 0.24);
  background: rgba(18, 32, 10, 0.9);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.seat-bid-callout-label {
  color: rgba(255, 229, 182, 0.74);
  font-family: var(--font-label);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.seat-bid-callout-value {
  color: #fff0d1;
  font-family: var(--font-title);
  font-size: 0.94rem;
  font-weight: 800;
  white-space: nowrap;
}

.seat-slot[data-slot="bottom"] .seat-bid-callout,
.seat-slot[data-slot="bottom-left"] .seat-bid-callout,
.seat-slot[data-slot="bottom-right"] .seat-bid-callout {
  top: -28px;
}

.seat-slot[data-slot="left"] .seat-bid-callout,
.seat-slot[data-slot="right"] .seat-bid-callout {
  top: -12px;
}

.trick-sweep-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: visible;
}

.trick-sweep-card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 6px;
  transform: translate(calc(-50% + var(--hold-x)), calc(-50% + var(--hold-y))) rotate(var(--hold-r));
  animation: trick-sweep-capture 1800ms cubic-bezier(.14,.86,.22,1) both;
  animation-delay: var(--delay, 0ms);
}

.trick-sweep-card .game-card.table {
  width: var(--sweep-card-width, 116px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.trick-sweep-card.winner .game-card.table {
  box-shadow:
    0 0 0 2px rgba(255, 228, 156, 0.28),
    0 18px 38px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(255, 194, 75, 0.18);
}

.trick-sweep-label {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 10, 8, 0.78);
  border: 1px solid rgba(255, 228, 177, 0.26);
  color: rgba(255, 247, 232, 0.98);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trick-sweep-copy {
  position: absolute;
  left: 50%;
  top: 8%;
  z-index: 140;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(18, 12, 10, 0.68);
  border: 1px solid rgba(255, 228, 177, 0.18);
  backdrop-filter: blur(10px);
  animation: trick-sweep-copy 1800ms ease both;
}

.trick-sweep-title {
  color: #fff0ce;
  font-family: var(--font-title);
  font-size: 1.08rem;
  font-weight: 900;
}

.trick-sweep-sub {
  color: rgba(255, 240, 216, 0.88);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.deal-animation-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}

.deal-animation-overlay::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(38vw, 280px);
  height: min(38vw, 280px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 221, 168, 0.18), rgba(255, 171, 52, 0.05) 42%, rgba(255, 171, 52, 0) 70%);
  animation: deal-pulse 1.55s ease-out both;
}

.deal-animation-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  transform: translate(-50%, calc(-50% - 118px));
  color: #fff5dc;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  animation: deal-copy-in 1.5s ease-out both;
}

.deal-animation-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 226, 170, 0.74);
}

.deal-animation-title {
  font-size: 1.48rem;
  font-weight: 900;
}

.deal-animation-sub {
  font-size: 0.9rem;
  color: rgba(255, 245, 226, 0.84);
}

.deal-animation-deck {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  aspect-ratio: 1324 / 2188;
  transform: translate(-50%, -50%);
  animation: deal-deck-shuffle 980ms cubic-bezier(.2,.88,.18,1) both;
}

.deal-deck-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 238, 206, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.06)),
    url("/assets/cards/back.jpg") center/cover no-repeat;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.26);
  backface-visibility: hidden;
}

.deal-deck-card.back-1 {
  transform: rotate(-10deg) translate(-8px, 4px);
}

.deal-deck-card.back-2 {
  transform: rotate(7deg) translate(8px, -4px);
}

.deal-deck-card.back-3 {
  transform: rotate(-2deg);
}

.deal-burst-layer {
  position: absolute;
  inset: 0;
}

.deal-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  aspect-ratio: 1324 / 2188;
  margin: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 238, 206, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.05)),
    url("/assets/cards/back.jpg") center/cover no-repeat;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.24) rotate(0deg);
  animation: deal-burst-flight 760ms cubic-bezier(.16,.96,.19,1) both;
  animation-delay: var(--deal-delay, 0ms);
}

@keyframes trick-sweep-capture {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--from-x)), calc(-50% + var(--from-y))) scale(0.82) rotate(var(--from-r));
  }

  13% {
    opacity: 1;
    transform: translate(calc(-50% + var(--hold-x)), calc(-50% + var(--hold-y))) scale(1.03) rotate(var(--hold-r));
  }

  22%,
  74% {
    opacity: 1;
    transform: translate(calc(-50% + var(--hold-x)), calc(-50% + var(--hold-y))) scale(1.0) rotate(var(--hold-r));
  }

  100% {
    opacity: 0.14;
    transform: translate(calc(-50% + var(--win-x)), calc(-50% + var(--win-y))) scale(0.48) rotate(var(--win-r));
  }
}

@keyframes trick-sweep-copy {
  0%,
  10% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }

  18%,
  78% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes deal-copy-in {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 100px)) scale(0.96);
  }

  20%,
  70% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 118px)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 126px)) scale(1.02);
  }
}

@keyframes deal-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }

  28% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

@keyframes deal-deck-shuffle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74) rotate(-10deg);
  }

  24% {
    opacity: 1;
    transform: translate(calc(-50% - 10px), calc(-50% + 4px)) scale(1) rotate(-7deg);
  }

  50% {
    transform: translate(calc(-50% + 12px), calc(-50% - 5px)) scale(1.02) rotate(8deg);
  }

  78% {
    opacity: 1;
    transform: translate(calc(-50% - 5px), calc(-50% + 2px)) scale(0.98) rotate(-5deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84) rotate(0deg);
  }
}

@keyframes deal-burst-flight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.24) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  84% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--deal-x, 0px)), calc(-50% + var(--deal-y, 0px))) scale(0.68) rotate(var(--deal-r, 0deg));
  }
}

@media (max-width: 760px) {
  .trick-sweep-label {
    font-size: 0.62rem;
    padding: 5px 9px;
  }

  .trick-sweep-copy {
    top: 18%;
    padding: 8px 12px;
  }

  .trick-sweep-title {
    font-size: 0.9rem;
  }

  .trick-sweep-sub {
    font-size: 0.68rem;
  }

  .deal-animation-copy {
    transform: translate(-50%, calc(-50% - 82px));
  }

  .deal-animation-kicker {
    font-size: 0.5rem;
  }

  .deal-animation-title {
    font-size: 1.05rem;
  }

  .deal-animation-sub {
    font-size: 0.7rem;
  }

  .deal-animation-deck {
    width: 58px;
  }

  .deal-burst {
    width: 48px;
    border-radius: 12px;
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(circle at 50% 0%, rgba(80, 220, 130, 0.18), transparent 22%),
    radial-gradient(circle at 16% 12%, rgba(60, 180, 100, 0.12), transparent 14%),
    radial-gradient(circle at 84% 12%, rgba(60, 180, 100, 0.10), transparent 14%),
    linear-gradient(180deg, #0e2a18 0%, #081510 26%, #050d09 58%, #030806 100%);
  color: var(--text);
  font-family: var(--font-body);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  opacity: 0.22;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 229, 162, 0.72), transparent 3.8%),
    radial-gradient(circle at 30% 10%, rgba(255, 223, 145, 0.66), transparent 3.2%),
    radial-gradient(circle at 42% 15%, rgba(255, 223, 145, 0.62), transparent 3%),
    radial-gradient(circle at 58% 12%, rgba(255, 223, 145, 0.66), transparent 3.2%),
    radial-gradient(circle at 70% 10%, rgba(255, 223, 145, 0.66), transparent 3.2%),
    radial-gradient(circle at 82% 16%, rgba(255, 229, 162, 0.72), transparent 3.8%);
}

body::after {
  background:
    radial-gradient(circle at top right, rgba(255, 209, 100, 0.14), transparent 24%),
    radial-gradient(circle at bottom left, rgba(40, 160, 90, 0.12), transparent 28%),
    linear-gradient(180deg, transparent 0%, transparent 62%, rgba(8, 48, 24, 0.28) 100%);
}

button,
input {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

a {
  color: inherit;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.stack {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  min-width: 0;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 238, 194, 0.08);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 0;
}

.panel-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 900;
}

.panel-body {
  padding: 22px 24px 24px;
}

.hero {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.hero-grid {
  display: grid;
  gap: 16px;
}

.hero-brand {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(255, 205, 120, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 197, 84, 0.26), rgba(224, 58, 28, 0.22), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 231, 174, 0.08),
    0 22px 44px rgba(0, 0, 0, 0.3);
}

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: rgba(255, 242, 198, 0.72);
}

.hero-title {
  margin: 12px 0 0;
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 4vw, 4.2rem);
  font-weight: 900;
  line-height: 0.95;
}

.hero-copy {
  max-width: 70ch;
  margin: 16px 0 0;
  color: var(--muted);
}

.hero-chips,
.chip-row,
.status-list,
.card-list,
.player-grid,
.form-grid,
.stats-grid,
.two-col,
.three-col {
  display: grid;
  gap: 14px;
}

.hero-chips {
  margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
  align-items: center;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.chip.online {
  color: #dbffe6;
  background: rgba(62, 224, 161, 0.20);
  border-color: rgba(62, 224, 161, 0.36);
}

.chip.syncing {
  color: #fff5d9;
  background: rgba(244, 192, 73, 0.22);
  border-color: rgba(244, 192, 73, 0.38);
}

.chip.offline,
.notice.error {
  color: #ffe0e8;
  background: rgba(251, 113, 133, 0.20);
  border-color: rgba(251, 113, 133, 0.36);
}

.hero-stats {
  display: grid;
  gap: 16px;
}

.stat-tile {
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}

.stat-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 10px;
  font-size: 1.7rem;
  font-weight: 900;
  word-break: break-word;
}

.notice {
  position: relative;
  z-index: 10;
  padding: 14px 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(62, 224, 161, 0.20);
  color: #eafff5;
}

.notice.warn {
  color: #fff4d1;
  background: rgba(244, 192, 73, 0.22);
  border-color: rgba(244, 192, 73, 0.38);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.button,
.ghost-button,
.copy-button,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  font-size: 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover,
  .ghost-button:hover,
  .copy-button:hover,
  .nav-button:hover {
    transform: translateY(-1px);
  }
}

.button:active,
.ghost-button:active,
.copy-button:active,
.nav-button:active {
  transform: scale(0.97) translateY(0);
  transition-duration: 0.08s;
}

.button:disabled,
.ghost-button:disabled,
.copy-button:disabled,
.nav-button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.button {
  background: linear-gradient(180deg, #ffe295, #f9ba35 58%, #cf7e10 100%);
  color: #2a1400;
  font-weight: 900;
  border-color: rgba(255, 244, 206, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 230, 0.5),
    0 12px 22px rgba(0, 0, 0, 0.24);
}

.button.alt {
  background: linear-gradient(180deg, #ff9f76, #d83e1f 62%, #8f1809 100%);
  color: #fff7ef;
}

.ghost-button,
.copy-button,
.nav-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.08)),
    rgba(31, 8, 11, 0.92);
  color: var(--text);
  border-color: rgba(255, 206, 119, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 241, 206, 0.07);
}

.nav-button.active {
  border-color: rgba(255, 208, 120, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 210, 122, 0.22), rgba(121, 36, 15, 0.14)),
    rgba(48, 10, 10, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 231, 184, 0.08);
}

.ghost-button.active {
  border-color: rgba(255, 208, 120, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 210, 122, 0.2), rgba(121, 36, 15, 0.12)),
    rgba(48, 10, 10, 0.96);
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  font-size: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.field input.input-error {
  border-color: rgba(251, 113, 133, 0.7) !important;
  background: rgba(251, 113, 133, 0.07) !important;
  color: #fca5a5;
}

.field input.input-error::placeholder {
  color: rgba(251, 113, 133, 0.5);
}

.form-help,
.muted {
  color: var(--muted);
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.three-col {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.player-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  min-width: 0;
}

.arena {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: 22px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at center, #1e6552 0%, #11322a 66%, #091814 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.3);
}

.arena::before,
.arena::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.arena::before {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

.arena::after {
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.arena-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.table-cards {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 360px;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  place-items: center;
}

.table-card-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.table-card-wrap.intro {
  animation: table-card-in 380ms cubic-bezier(.16,.86,.3,1);
}

@keyframes table-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

.name-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.34);
  font-size: 0.84rem;
}

.player-card {
  padding: 18px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.player-card.active {
  border-color: rgba(244, 192, 73, 0.4);
  background: rgba(244, 192, 73, 0.1);
  box-shadow: 0 0 24px rgba(244, 192, 73, 0.12);
}

.player-card.dead {
  opacity: 0.4;
}

.player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.player-name {
  font-size: 1.1rem;
  font-weight: 900;
}

.player-id {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 800;
}

.badge.turn {
  background: #f3c34e;
  color: #2a1d00;
}

.badge.you {
  background: #3ee0a1;
  color: #04130d;
}

.stats-grid {
  margin-top: 16px;
}

.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.82);
}

.stat-line strong {
  color: var(--text);
}

.stat-line-accent {
  background: linear-gradient(180deg, rgba(255, 214, 117, 0.16), rgba(255, 140, 90, 0.1));
  border: 1px solid rgba(255, 205, 107, 0.22);
}

.stat-line-accent strong {
  color: #fff3d2;
  font-size: 1.05rem;
}

.log-list {
  display: grid;
  gap: 10px;
}

.log-item {
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
}

.hand-wrap {
  overflow-x: auto;
  padding: 22px 6px 6px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.hand-wrap::-webkit-scrollbar {
  display: none;
}

.hand-fan {
  display: flex;
  min-height: 260px;
  align-items: flex-end;
  justify-content: center;
}

.hand-card {
  position: relative;
  margin-left: -36px;
  transform: rotate(var(--angle, 0deg));
  transition: transform 240ms cubic-bezier(0.34, 1.18, 0.64, 1);
  will-change: transform;
  transform-origin: center 92%;
}

.hand-card.intro {
  animation: deal-in 360ms cubic-bezier(.2,.84,.28,1.05) both;
  animation-delay: calc(var(--z, 0) * 28ms);
}

.hand-card:first-child {
  margin-left: 0;
}

.hand-card.selected {
  transform: rotate(var(--angle, 0deg)) translateY(-16px);
}

.hand-card.flat {
  transform: none;
  transform-origin: center center;
}

.hand-card.flat.selected {
  transform: translateY(-12px);
}

@keyframes deal-in {
  from {
    opacity: 0;
    transform: rotate(0deg) translateY(40px) scale(0.86);
  }
  to {
    opacity: 1;
    transform: rotate(var(--angle, 0deg)) translateY(0) scale(1);
  }
}

.hand-card button,
.table-card-wrap .game-card {
  border: 0;
  background: none;
  padding: 0;
}

.game-card {
  position: relative;
  width: 144px;
  aspect-ratio: 1324 / 2188;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(233, 216, 183, 0.95);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.18),
    0 18px 54px rgba(0,0,0,0.32),
    0 32px 80px rgba(0,0,0,0.18);
  color: #101418;
  background: #efe4ce;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.game-card.compact {
  width: 110px;
}

.game-card.table {
  width: 178px;
}

@media (hover: hover) and (pointer: fine) {
  .game-card.selectable:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 68px rgba(0, 0, 0, 0.34);
  }
}

.game-card.selected {
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.9),
    0 0 28px rgba(251, 191, 36, 0.50),
    0 0 60px rgba(251, 191, 36, 0.22),
    0 22px 52px rgba(0,0,0,0.36);
  filter: saturate(1.12) brightness(1.03);
}

.card-frame {
  position: absolute;
  inset: 7px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  z-index: 3;
}

body[data-deck="siciliane"] .game-card {
  border: 0;
  background: #f3ead6;
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.30),
    inset 0 0 0 1px rgba(255, 248, 235, 0.42);
}

body[data-deck="siciliane"] .card-frame {
  inset: 9px;
  border: 1px solid rgba(255, 238, 216, 0.16);
  border-radius: 20px;
  opacity: 0.78;
}

body[data-deck="siciliane"] .card-shadow-layer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.06));
}

body[data-deck="siciliane"] .card-overlay {
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.38));
}

.card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #f7f2e8;
  backface-visibility: hidden;
  user-select: none;
  will-change: transform;
}

.card-shadow-layer,
.card-gloss,
.card-overlay,
.asso-pill {
  position: absolute;
  z-index: 2;
}

.card-shadow-layer {
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(0,0,0,0.08));
}

.card-gloss {
  inset: -20%;
  transform: rotate(22deg) translateX(0);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
  opacity: 0.18;
}

.card-overlay {
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.46));
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
}

.card-label {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-label-sub {
  font-size: 0.68rem;
  opacity: 0.86;
}

.card-overlay.table-overlay {
  left: 50%;
  right: auto;
  bottom: 10px;
  justify-content: center;
  gap: 0;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  transform: translateX(-50%);
}

.card-label-suit {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.95;
  text-transform: uppercase;
}

.card-overlay.back-mark {
  display: inline-flex;
  width: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: 14px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.10);
}

.asso-pill {
  position: absolute;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffe5a8;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.choice-box,
.info-box,
.seat-card {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.choice-box {
  background: rgba(244, 192, 73, 0.20);
  border-color: rgba(244, 192, 73, 0.38);
}

.link-box {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.86);
  word-break: break-all;
}

.seat-card {
  display: grid;
  gap: 14px;
}

.seat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.seat-name {
  font-size: 1.1rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.seat-id {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.55);
}

.split-head {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.turn-box {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.turn-box-title {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.84rem;
}

.turn-box-value {
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 900;
}

.blind-opponents {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.blind-card {
  display: grid;
  gap: 12px;
  justify-items: center;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: 1.45fr 1fr 1fr 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .two-col.main {
    grid-template-columns: 1.18fr 0.82fr;
  }

  .two-col.player-main {
    grid-template-columns: 1.04fr 0.96fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .panel-header,
  .panel-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .panel-header {
    padding-top: 18px;
  }

  .panel-body {
    padding-bottom: 18px;
  }

  .game-card {
    width: 122px;
  }

  .game-card.table {
    width: 152px;
  }

  .hand-card {
    margin-left: -46px;
  }
}

.hero-brand {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  min-height: 220px;
  overflow: visible;
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 209, 120, 0.3), transparent 26%),
    linear-gradient(135deg, rgba(255, 195, 76, 0.18), rgba(185, 26, 16, 0.16), rgba(255, 255, 255, 0.04));
}

.hero-brand-copy {
  display: grid;
  gap: 14px;
}

.hero-simple {
  padding: 16px;
}

.hero-brand-simple {
  grid-template-columns: 180px auto;
  min-height: 180px;
  justify-content: flex-start;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 180px;
  aspect-ratio: 1;
  border-radius: 42px;
  border: 1px solid rgba(255, 214, 133, 0.28);
  background:
    radial-gradient(circle at top, rgba(255, 208, 112, 0.34), transparent 44%),
    radial-gradient(circle at bottom, rgba(193, 27, 20, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(57, 8, 10, 0.96), rgba(23, 5, 7, 0.98));
  box-shadow:
    inset 0 0 42px rgba(255, 231, 174, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.24);
}

.eagle-logo {
  width: 118px;
  height: auto;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.34));
}

.hero-title {
  margin: 0;
  font-size: clamp(3.2rem, 6.6vw, 6rem);
  letter-spacing: 0.06em;
  line-height: 0.84;
}

.hero-brand-simple .hero-title {
  font-size: clamp(4rem, 10vw, 7rem);
  letter-spacing: 0.08em;
}

.hero-copy {
  margin: 0;
}

.nav-strip .panel-body {
  padding-top: 14px;
  padding-bottom: 14px;
}

.player-mobile-tabs {
  display: none;
}

.bid-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 10px;
}

.bid-chip {
  min-height: 54px;
  padding: 0;
  border-radius: 18px;
  font-size: 1.05rem;
  font-weight: 900;
}

.bid-chip.forbidden {
  opacity: 0.50;
}

.bid-manual-field input {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.scene-caption {
  color: var(--muted);
}

.round-table-panel .panel-body {
  display: grid;
  gap: 16px;
}

.table-bid-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.table-bid-chip {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.06)),
    rgba(39, 8, 10, 0.88);
  border: 1px solid rgba(255, 214, 138, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 238, 192, 0.04);
}

.table-bid-chip.self {
  border-color: rgba(255, 214, 138, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 206, 110, 0.18), rgba(166, 46, 19, 0.1)),
    rgba(39, 8, 10, 0.92);
}

.table-bid-chip.active {
  border-color: rgba(255, 214, 138, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 214, 128, 0.24), rgba(196, 61, 26, 0.12)),
    rgba(48, 10, 10, 0.94);
}

.table-bid-chip.turn {
  border-color: rgba(255, 223, 156, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 220, 142, 0.24), rgba(173, 46, 17, 0.14)),
    rgba(48, 10, 10, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 188, 0.16),
    0 0 18px rgba(255, 197, 91, 0.16);
}

.table-bid-chip.dead {
  opacity: 0.52;
  filter: saturate(0.5);
}

.table-bid-chip-name {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.table-bid-chip-value {
  font-size: 1.15rem;
  font-weight: 900;
}

.table-bid-chip-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-bid-chip-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.table-bid-chip-stat-label {
  color: rgba(255, 239, 214, 0.72);
  font-family: var(--font-label);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.round-table-scene {
  position: relative;
  min-height: 780px;
  overflow: visible;
  border-radius: 40px;
  background:
    radial-gradient(circle at 50% 0%, rgba(80, 220, 130, 0.08), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(10, 60, 28, 0.32), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
}

.round-table-wood,
.round-table-felt {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.round-table-wood {
  width: min(100%, 880px);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 42%, #5a3010 0%, #2e1608 36%, #180d06 64%, #0a0704 100%);
  box-shadow:
    inset 0 0 0 4px rgba(255, 203, 92, 0.7),
    inset 0 0 0 12px rgba(6, 6, 4, 0.72),
    inset 0 0 0 20px rgba(80, 44, 12, 0.32),
    inset 0 0 64px rgba(0, 0, 0, 0.46),
    0 30px 62px rgba(0, 0, 0, 0.52);
}

.round-table-felt {
  width: min(86%, 740px);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 32%, #28a857 0%, #1e8c45 34%, #145e2e 58%, #0a3019 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 221, 151, 0.22),
    inset 0 0 0 10px rgba(6, 22, 10, 0.38),
    inset 0 0 98px rgba(0, 0, 0, 0.36),
    0 18px 40px rgba(0, 0, 0, 0.3);
}

.round-table-felt::before,
.round-table-felt::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  pointer-events: none;
}

.round-table-felt::before {
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.round-table-felt::after {
  inset: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 32px 32px;
}

.felt-crest {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-title);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 900;
  color: rgba(255, 225, 157, 0.14);
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px rgba(255, 240, 196, 0.08);
}

.seat-slot {
  position: absolute;
  z-index: 2;
  left: var(--seat-x, 50%);
  top: var(--seat-y, 50%);
  transform: translate(-50%, -50%) scale(var(--seat-scale, 1));
  transform-origin: center center;
}

.seat-slot-bottom {
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
}

.seat-slot-bottom-left {
  left: 16%;
  bottom: 10%;
}

.seat-slot-left {
  left: 2%;
  top: 50%;
  transform: translateY(-50%);
}

.seat-slot-top-left {
  left: 16%;
  top: 10%;
}

.seat-slot-top {
  left: 50%;
  top: 3%;
  transform: translateX(-50%);
}

.seat-slot-top-right {
  right: 16%;
  top: 10%;
}

.seat-slot-right {
  right: 2%;
  top: 50%;
  transform: translateY(-50%);
}

.seat-slot-bottom-right {
  right: 16%;
  bottom: 10%;
}

.seat-node {
  width: min(220px, calc(100vw - 72px));
  padding: 14px;
  border-radius: 28px;
  border: 1px solid rgba(255, 214, 138, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.14)),
    rgba(7, 22, 12, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(60, 180, 100, 0.06);
}

.seat-slot.compact .seat-node {
  width: 192px;
  padding: 12px;
  border-radius: 24px;
}

.seat-slot.compact .seat-node-name {
  font-size: 0.92rem;
}

.seat-slot.compact .seat-node-contract {
  margin-top: 8px;
  padding: 8px 10px;
}

.seat-slot.compact .seat-node-contract-label,
.seat-slot.compact .seat-stat-label {
  letter-spacing: 0.12em;
}

.seat-slot.compact .seat-node-contract-value {
  font-size: 1.08rem;
}

.seat-slot.compact .seat-node-stats {
  gap: 6px;
  margin-top: 8px;
}

.seat-slot.compact .seat-stat {
  padding: 6px 8px;
  border-radius: 12px;
}

.seat-slot.compact .seat-back-stack {
  width: 92px;
  height: 70px;
  margin-top: 9px;
}

.seat-slot.compact .seat-back-card {
  width: 42px;
  border-radius: 11px;
}

.seat-slot.compact .seat-hand-count {
  min-width: 24px;
  height: 24px;
  font-size: 0.68rem;
}

.seat-slot.ultra .seat-node {
  width: 164px;
  padding: 10px;
  border-radius: 20px;
}

.seat-slot.ultra .seat-node-header {
  gap: 6px;
}

.seat-slot.ultra .seat-node-name {
  font-size: 0.8rem;
}

.seat-slot.ultra .seat-node-id {
  margin-top: 2px;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.seat-slot.ultra .seat-node-pills {
  gap: 4px;
}

.seat-slot.ultra .seat-node-pill {
  padding: 4px 7px;
  font-size: 0.52rem;
}

.seat-slot.ultra .seat-node-contract {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 10px;
}

.seat-slot.ultra .seat-node-contract-label {
  font-size: 0.48rem;
  letter-spacing: 0.08em;
}

.seat-slot.ultra .seat-node-contract-value {
  font-size: 0.9rem;
}

.seat-slot.ultra .seat-node-stats {
  gap: 4px;
  margin-top: 6px;
}

.seat-slot.ultra .seat-stat {
  padding: 5px 6px;
  border-radius: 10px;
}

.seat-slot.ultra .seat-stat-label {
  font-size: 0.46rem;
  letter-spacing: 0.04em;
}

.seat-slot.ultra .seat-stat-value {
  font-size: 0.82rem;
}

.seat-slot.ultra .seat-back-stack {
  width: 70px;
  height: 56px;
  margin-top: 6px;
}

.seat-slot.ultra .seat-back-card {
  width: 31px;
  border-radius: 9px;
  transform: translateX(calc(-50% + (var(--i) - 2) * 8px)) rotate(calc((var(--i) - 2) * 5deg));
}

.seat-slot.ultra .seat-hand-count {
  min-width: 20px;
  height: 20px;
  font-size: 0.58rem;
}

.seat-slot.active .seat-node {
  border-color: rgba(255, 214, 138, 0.42);
  box-shadow:
    0 0 28px rgba(255, 206, 110, 0.18),
    0 18px 32px rgba(0, 0, 0, 0.24);
}

.seat-slot.turn-live {
  z-index: 6;
}

.seat-slot.turn-live .seat-node {
  position: relative;
  border-color: rgba(255, 224, 166, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 226, 160, 0.14), rgba(0, 0, 0, 0.08)),
    rgba(7, 24, 12, 0.95);
  box-shadow:
    0 0 0 1px rgba(255, 233, 182, 0.26),
    0 0 36px rgba(255, 193, 89, 0.30),
    0 20px 36px rgba(0, 0, 0, 0.32);
}

.seat-slot.turn-live .seat-node::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 2px solid rgba(255, 209, 98, 0.42);
  box-shadow:
    0 0 22px rgba(255, 188, 75, 0.24),
    inset 0 0 18px rgba(255, 215, 130, 0.08);
  animation: turn-seat-glow 1.35s ease-in-out infinite;
  pointer-events: none;
}

.seat-slot.bid-live:not(.turn-live) .seat-node {
  border-color: rgba(255, 214, 138, 0.42);
  box-shadow:
    0 0 24px rgba(255, 206, 110, 0.16),
    0 18px 32px rgba(0, 0, 0, 0.24);
}

.seat-slot.self .seat-node {
  border-color: rgba(255, 206, 110, 0.28);
}

.seat-slot.dead .seat-node {
  opacity: 0.52;
  filter: saturate(0.4);
}

.seat-node-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.seat-node-name {
  font-size: 1rem;
  font-weight: 900;
}

.seat-node-id {
  margin-top: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.44);
}

.seat-node-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.seat-node-pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seat-node-pill.turn {
  background: rgba(244, 192, 73, 0.92);
  color: #251901;
}

.seat-node-pill.you {
  background: rgba(255, 206, 110, 0.94);
  color: #2a1701;
}

.seat-node-pill.dead {
  background: rgba(251, 113, 133, 0.88);
  color: #21030b;
}

.seat-node-contract {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
}

.seat-node-contract.pending {
  opacity: 0.8;
}

.seat-node-contract.locked {
  border-color: rgba(255, 214, 138, 0.28);
  background: linear-gradient(180deg, rgba(255, 206, 110, 0.18), rgba(186, 48, 20, 0.06));
}

.seat-node-contract-label {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.seat-node-contract-value {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff7da;
}

.seat-node-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.seat-stat {
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.seat-stat-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.seat-stat-value {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 900;
}

.seat-self-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 206, 110, 0.08);
  color: rgba(255, 244, 222, 0.92);
}

.seat-back-stack {
  position: relative;
  width: 122px;
  height: 92px;
  margin: 14px auto 0;
}

.seat-back-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 56px;
  aspect-ratio: 1324 / 2188;
  transform: translateX(calc(-50% + (var(--i) - 2) * 12px)) rotate(calc((var(--i) - 2) * 6deg));
  border-radius: 14px;
  border: 1px solid rgba(255, 244, 221, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.04)),
    url("/assets/cards/back.jpg") center/cover no-repeat;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.26);
  backface-visibility: hidden;
}

.seat-hand-count {
  position: absolute;
  right: 0;
  bottom: -4px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f5c75c;
  color: #231a02;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

.seat-empty-mini,
.scene-caption {
  text-align: center;
}

.seat-visible-card {
  display: grid;
  justify-items: center;
  margin-top: 14px;
}

.center-trick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(62%, 410px);
  height: min(52%, 340px);
  transform: translate(-50%, -50%);
  z-index: 3;
}

.round-table-player .seat-slot.self {
  display: none;
}

.round-table-stage {
  display: grid;
  gap: 18px;
}

.round-table-stage.with-rail {
  align-items: start;
  gap: 26px;
  padding-bottom: 0;
}

.round-table-scene.regular {
  min-height: 660px;
}

.round-table-scene.regular .round-table-wood {
  width: min(86%, 780px);
}

.round-table-scene.regular .round-table-felt {
  width: min(69%, 620px);
}

.round-table-scene.regular .center-trick {
  width: min(56%, 370px);
  height: min(46%, 300px);
}

.round-table-scene.crowded {
  min-height: 820px;
}

.round-table-scene.crowded .round-table-wood {
  width: min(78%, 760px);
}

.round-table-scene.crowded .round-table-felt {
  width: min(61%, 590px);
}

.round-table-scene.crowded .center-trick {
  width: min(42%, 280px);
  height: min(34%, 240px);
}

.round-table-scene.dense {
  min-height: 900px;
}

.round-table-scene.dense .round-table-wood {
  width: min(72%, 700px);
}

.round-table-scene.dense .round-table-felt {
  width: min(56%, 540px);
}

.round-table-scene.dense .center-trick {
  width: min(34%, 220px);
  height: min(28%, 200px);
}

.round-table-scene.dense .center-card .game-card.table {
  width: 126px;
}

.round-table-player .center-trick {
  top: 50%;
}

.player-hand-rail {
  position: relative;
  width: min(100%, 1120px);
  margin: 0 auto;
  z-index: 2;
  display: grid;
  gap: 12px;
  padding: 14px 18px 12px;
  border-radius: 32px;
  border: 1px solid rgba(255, 214, 138, 0.18);
  background:
    linear-gradient(180deg, rgba(6, 24, 12, 0.97), rgba(4, 14, 8, 0.97)),
    radial-gradient(circle at top, rgba(255, 206, 110, 0.14), transparent 32%);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(60, 180, 100, 0.08);
  backdrop-filter: blur(12px);
}

.player-hand-rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.player-hand-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
}

.player-hand-metric {
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.player-hand-metric.emphasis {
  border-color: rgba(255, 206, 110, 0.24);
  background: rgba(255, 206, 110, 0.08);
}

.player-hand-metric-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}

.player-hand-metric-value {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 900;
}

.player-rail-copy {
  color: rgba(255, 255, 255, 0.78);
}

.player-rail-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.player-rail-button {
  min-width: 260px;
}

.table-hand-wrap {
  padding: 10px 8px 2px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.12)),
    rgba(0, 0, 0, 0.24);
}

.bidding-hand-fan,
.table-hand-fan {
  width: max-content;
  min-width: 100%;
  min-height: 136px;
  justify-content: flex-start;
  gap: 14px;
  padding-right: 10px;
}

.bidding-hand-fan .hand-card,
.table-hand-fan .hand-card {
  margin-left: 0;
}

.bidding-hand-fan .game-card,
.table-hand-fan .game-card {
  width: 88px;
}

.table-hand-fan .hand-card.selected {
  transform: translateY(-18px);
}

.player-table-focus,
.player-table-experience,
.player-main-bidding,
.player-support-grid {
  min-width: 0;
}

.player-table-focus .round-table-panel .panel-body {
  gap: 18px;
}

.player-table-focus .round-table-panel .panel-header {
  padding-bottom: 0;
}

.player-table-focus .round-table-scene {
  min-height: clamp(560px, 66vh, 760px);
}

.player-table-focus .center-trick {
  width: min(58%, 640px);
  height: min(24%, 220px);
}

.player-table-focus .player-hand-rail {
  width: min(100%, 1120px);
}

.player-table-focus .round-table-player .round-table-scene {
  min-height: clamp(580px, 68vh, 800px);
}

.player-table-focus .round-table-player .round-table-wood,
.player-table-focus .round-table-player .round-table-felt {
  border-radius: 50% / 44%;
}

.player-table-focus .round-table-player .round-table-wood {
  width: min(98%, 1320px);
  aspect-ratio: 1.92 / 1;
}

.player-table-focus .round-table-player .round-table-felt {
  width: min(84%, 1120px);
  aspect-ratio: 1.92 / 1;
}

.player-table-focus .round-table-player .felt-crest {
  font-size: clamp(5rem, 9vw, 8rem);
}

.player-table-focus .round-table-player .center-trick {
  top: 52%;
  width: min(52%, 700px);
  height: min(18%, 200px);
}

.player-table-focus .round-table-player .seat-node {
  width: 172px;
  padding: 10px 11px;
  border-radius: 22px;
}

.player-table-focus .round-table-player .seat-slot.compact .seat-node {
  width: 154px;
}

.player-table-focus .round-table-player .seat-slot.ultra .seat-node {
  width: 136px;
}

.player-table-focus .round-table-player .seat-node-name {
  font-size: 0.92rem;
}

.player-table-focus .round-table-player .seat-node-id {
  font-size: 0.6rem;
}

.player-table-focus .round-table-player .seat-node-pills {
  gap: 4px;
}

.player-table-focus .round-table-player .seat-node-pill {
  padding: 4px 7px;
  font-size: 0.54rem;
}

.player-table-focus .round-table-player .seat-node-contract {
  margin-top: 6px;
  padding: 7px 8px;
  border-radius: 12px;
}

.player-table-focus .round-table-player .seat-node-contract-label {
  font-size: 0.5rem;
}

.player-table-focus .round-table-player .seat-node-contract-value {
  font-size: 1rem;
}

.player-table-focus .round-table-player .seat-node-stats {
  gap: 5px;
  margin-top: 6px;
}

.player-table-focus .round-table-player .seat-stat {
  padding: 6px 7px;
  border-radius: 12px;
}

.player-table-focus .round-table-player .seat-stat-label {
  font-size: 0.48rem;
}

.player-table-focus .round-table-player .seat-stat-value {
  font-size: 0.84rem;
}

.player-table-focus .round-table-player .seat-back-stack {
  width: 80px;
  height: 56px;
  margin-top: 8px;
}

.player-table-focus .round-table-player .seat-back-card {
  width: 34px;
  border-radius: 10px;
  transform: translateX(calc(-50% + (var(--i) - 2) * 9px)) rotate(calc((var(--i) - 2) * 4deg));
}

.player-table-focus .round-table-player .seat-hand-count {
  min-width: 22px;
  height: 22px;
  font-size: 0.6rem;
}

@media (min-width: 900px) {
  .player-table-focus .round-table-stage.with-rail {
    position: relative;
    padding-bottom: 8px;
  }

  .player-table-focus .round-table-stage.with-rail .player-hand-rail {
    position: absolute;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(58%, 760px);
    z-index: 6;
    padding: 10px 12px 8px;
    gap: 6px;
    border-radius: 22px;
    background:
      linear-gradient(180deg, rgba(6, 28, 14, 0.88), rgba(3, 14, 8, 0.88)),
      radial-gradient(circle at top, rgba(255, 206, 110, 0.10), transparent 36%);
    box-shadow:
      0 10px 22px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 0 0 1px rgba(60, 180, 100, 0.10);
  }

  .player-table-focus .round-table-stage.with-rail .player-hand-rail-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
  }

  .player-table-focus .round-table-stage.with-rail .player-hand-metrics {
    gap: 8px;
  }

  .player-table-focus .round-table-stage.with-rail .player-hand-metric {
    padding: 7px 10px;
    border-radius: 14px;
  }

  .player-table-focus .round-table-stage.with-rail .player-hand-metric-value {
    font-size: 1rem;
  }

  .player-table-focus .round-table-stage.with-rail .player-rail-copy {
    display: none;
  }

  .player-table-focus .round-table-stage.with-rail .player-rail-button {
    min-width: 184px;
    min-height: 44px;
  }

  .player-table-focus .round-table-stage.with-rail .table-hand-wrap {
    padding: 8px 6px 2px;
    border-radius: 18px;
  }

  .player-table-focus .round-table-stage.with-rail .table-hand-fan {
    min-height: 108px;
    gap: 8px;
    padding-right: 2px;
  }

  .player-table-focus .round-table-stage.with-rail .table-hand-fan .game-card {
    width: 70px;
  }

  .player-table-focus .round-table-stage.with-rail .table-hand-fan .card-overlay {
    left: 5px;
    right: 5px;
    bottom: 5px;
  }

  .player-table-focus .round-table-stage.with-rail .table-hand-fan .card-label {
    font-size: 0.56rem;
  }

  .player-table-focus .round-table-stage.with-rail .table-hand-fan .card-label-sub {
    font-size: 0.44rem;
  }

  .player-table-focus .round-table-stage.with-rail .center-trick {
    top: 47%;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-hand-rail,
  .player-table-focus .round-table-stage.count-8.with-rail .player-hand-rail {
    bottom: 4px;
    padding: 8px 10px 6px;
    gap: 4px;
    border-radius: 18px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-hand-rail {
    width: min(48%, 640px);
    grid-template-columns: 128px minmax(0, 1fr) 138px;
  }

  .player-table-focus .round-table-stage.count-8.with-rail .player-hand-rail {
    width: min(44%, 580px);
    grid-template-columns: 114px minmax(0, 1fr) 126px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-identity-card,
  .player-table-focus .round-table-stage.count-8.with-rail .player-identity-card {
    min-height: 0;
    padding: 8px 9px;
    border-radius: 14px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-life-label,
  .player-table-focus .round-table-stage.count-8.with-rail .player-life-label {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-life-value,
  .player-table-focus .round-table-stage.count-8.with-rail .player-life-value {
    font-size: 1.16rem;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-life-hearts .seat-heart,
  .player-table-focus .round-table-stage.count-8.with-rail .player-life-hearts .seat-heart {
    font-size: 0.68rem;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-identity-meta,
  .player-table-focus .round-table-stage.count-8.with-rail .player-identity-meta {
    max-width: none;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-rail-tap-hint,
  .player-table-focus .round-table-stage.count-8.with-rail .player-rail-tap-hint {
    margin-bottom: 4px;
    font-size: 0.5rem;
    letter-spacing: 0.06em;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-hand-stage,
  .player-table-focus .round-table-stage.count-8.with-rail .player-hand-stage {
    padding-top: 4px;
    padding-bottom: 2px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan,
  .player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan {
    min-height: 74px;
    gap: 4px;
    padding: 0 2px 2px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan .game-card {
    width: 54px;
  }

  .player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan .game-card {
    width: 50px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan .hand-card,
  .player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan .hand-card {
    margin-left: -12px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-rail-actions,
  .player-table-focus .round-table-stage.count-8.with-rail .player-rail-actions {
    gap: 6px;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .player-rail-button,
  .player-table-focus .round-table-stage.count-8.with-rail .player-rail-button {
    min-width: 118px;
    min-height: 38px;
    font-size: 0.94rem;
  }

  .player-table-focus .round-table-stage.count-7.with-rail .center-trick,
  .player-table-focus .round-table-stage.count-8.with-rail .center-trick {
    top: 44%;
  }
}

body[data-view="player"][data-phase="playing"] .hero-simple {
  padding: 8px;
}

body[data-view="player"][data-phase="playing"] .hero-brand-simple {
  min-height: 118px;
  grid-template-columns: 94px 1fr;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 24px;
}

body[data-view="player"][data-phase="playing"] .brand-mark {
  width: 94px;
  border-radius: 24px;
}

body[data-view="player"][data-phase="playing"] .eagle-logo {
  width: 58px;
}

body[data-view="player"][data-phase="playing"] .hero-brand-simple .hero-title {
  font-size: clamp(3.1rem, 5vw, 4.4rem);
  line-height: 0.9;
}

.player-main-bidding .player-hand-panel .panel-body.stack {
  gap: 14px;
}

.player-bid-head {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bidding-hand-wrap {
  padding: 12px 8px 6px;
  border-radius: 24px;
  border-color: rgba(255, 214, 138, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 206, 110, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(33, 7, 8, 0.72);
}

.bidding-hand-fan {
  min-height: 136px;
  padding: 0 6px;
}

.bidding-hand-fan .game-card {
  width: 92px;
  border-radius: 22px;
}

.bid-declare-panel {
  border-color: rgba(255, 214, 138, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 206, 110, 0.14), rgba(176, 35, 16, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.bid-declare-panel .field label {
  color: rgba(255, 255, 255, 0.88);
}

.bid-declare-panel .button-row {
  display: grid;
  grid-template-columns: 1fr;
}

.player-support-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.table-main-dense {
  min-width: 0;
}

.table-side-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.player-main-bidding .player-cards-first .hand-wrap {
  padding: 10px 6px 4px;
}

.player-main-bidding .player-cards-first .hand-fan {
  min-height: 156px;
}

.player-main-bidding .player-cards-first .game-card {
  width: 92px;
}

.center-empty {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
}

.center-empty-title {
  font-size: 1.1rem;
  font-weight: 900;
}

.center-empty.center-empty-silent {
  padding: 0;
  border: 0;
  background: transparent;
}

.center-trick-cards {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.center-card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 0;
  transform: translate(calc(-50% + var(--to-x)), calc(-50% + var(--to-y))) rotate(var(--to-r));
  will-change: transform;
}

.center-card.ordered {
  z-index: var(--card-order, 1);
}

.center-card.intro {
  animation: center-card-in 480ms cubic-bezier(.16,.86,.3,1) both;
  animation-delay: var(--delay, 0ms);
}

.center-card .game-card.table {
  width: var(--center-card-width, 152px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

.center-card-label {
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.38);
  font-size: 0.68rem;
  font-weight: 800;
}

.center-card-mode {
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(12, 28, 14, 0.86);
  border: 1px solid rgba(255, 234, 184, 0.2);
  color: #ffe5a8;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.center-bid-announcement {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 72;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: min(72vw, 240px);
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 228, 170, 0.18);
  background: rgba(19, 32, 11, 0.9);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.center-bid-announcement-label {
  color: rgba(255, 229, 182, 0.7);
  font-family: var(--font-label);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.center-bid-announcement-value {
  color: #fff0d1;
  font-family: var(--font-title);
  font-size: 0.96rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
}

@keyframes center-card-in {
  from {
    opacity: 0;
    transform: translate(calc(-50% + var(--from-x)), calc(-50% + var(--from-y))) scale(0.82) rotate(var(--from-r));
  }
  to {
    opacity: 1;
    transform: translate(calc(-50% + var(--to-x)), calc(-50% + var(--to-y))) scale(1) rotate(var(--to-r));
  }
}

@keyframes turn-seat-glow {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.995);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.hand-wrap {
  padding: 24px 14px 10px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(244, 192, 73, 0.12), transparent 28%),
    rgba(4, 12, 10, 0.46);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 2.7fr) repeat(3, minmax(120px, 0.75fr));
  }

  .table-main-dense .round-table-panel .round-table-scene.dense {
    min-height: 940px;
  }
}

@media (max-width: 1080px) {
  .round-table-scene {
    min-height: 720px;
  }

  .seat-node {
    width: 188px;
  }
}

@media (max-width: 760px) {
  .panel {
    backdrop-filter: blur(6px);
  }

  html,
  body {
    font-size: 16px;
  }

  .hero-brand {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-brand-simple {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brand-mark {
    justify-self: center;
    width: 122px;
  }

  .round-table-scene {
    min-height: 470px;
    border-radius: 28px;
  }

  .round-table-scene.regular {
    min-height: 400px;
  }

  .round-table-scene.regular .round-table-wood {
    width: min(78%, 370px);
  }

  .round-table-scene.regular .round-table-felt {
    width: min(62%, 288px);
  }

  .round-table-scene.regular .center-trick {
    width: min(42%, 170px);
    height: min(30%, 114px);
  }

  .round-table-scene.crowded {
    min-height: 520px;
  }

  .round-table-scene.crowded .round-table-wood {
    width: min(74%, 360px);
  }

  .round-table-scene.crowded .round-table-felt {
    width: min(57%, 270px);
  }

  .round-table-scene.crowded .center-trick {
    width: min(34%, 138px);
    height: min(22%, 96px);
  }

  .round-table-scene.dense {
    min-height: 560px;
  }

  .round-table-scene.dense .round-table-wood {
    width: min(70%, 332px);
  }

  .round-table-scene.dense .round-table-felt {
    width: min(52%, 236px);
  }

  .round-table-scene.dense .center-trick {
    width: min(28%, 112px);
    height: min(18%, 80px);
  }

  .round-table-wood {
    width: min(100%, 470px);
  }

  .round-table-felt {
    width: min(84%, 384px);
  }

  .seat-node {
    width: 116px;
    padding: 8px;
    border-radius: 18px;
    backdrop-filter: none;
  }

  .seat-slot.compact .seat-node {
    width: 148px;
    padding: 8px;
  }

  .seat-slot.ultra .seat-node {
    width: 142px;
    padding: 8px;
  }

  .seat-node-pills {
    justify-content: flex-start;
  }

  .seat-node-name {
    font-size: 0.8rem;
  }

  .seat-node-id,
  .seat-stat-label {
    letter-spacing: 0.08em;
  }

  .seat-node-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .seat-stat {
    padding: 5px 6px;
    border-radius: 10px;
  }

  .seat-stat-value {
    font-size: 0.88rem;
  }

  .seat-back-stack {
    width: 74px;
    height: 58px;
    margin-top: 8px;
  }

  .seat-back-card {
    width: 33px;
  }

  .seat-slot-bottom-left,
  .seat-slot-top-left {
    left: 4%;
  }

  .seat-slot-bottom-right,
  .seat-slot-top-right {
    right: 4%;
  }

  .seat-slot-left {
    left: -3%;
  }

  .seat-slot-right {
    right: -3%;
  }

  .center-trick {
    width: min(58%, 210px);
    height: min(30%, 132px);
  }

  .center-card .game-card.table {
    width: 74px;
  }

  .center-card-label {
    padding: 5px 8px;
    font-size: 0.62rem;
  }

  .center-empty {
    padding: 14px;
    border-radius: 20px;
    gap: 6px;
    font-size: 0.84rem;
  }

  .center-empty-title {
    font-size: 0.92rem;
  }

  .two-col.player-main {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .player-primary-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .player-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .player-main-bidding {
    gap: 16px;
  }

  .player-support-grid {
    grid-template-columns: 1fr;
  }

  .player-main .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .player-main .button,
  .player-main .ghost-button,
  .player-main .copy-button {
    width: 100%;
    min-height: 58px;
  }

  .player-main .split-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .player-main .player-bid-head {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-main .turn-box {
    padding: 12px;
    border-radius: 18px;
  }

  .player-main .split-head .turn-box:last-child {
    grid-column: 1 / -1;
  }

  .player-main .player-bid-head .turn-box:last-child {
    grid-column: auto;
  }

  .player-main .turn-box-title {
    font-size: 0.74rem;
  }

  .player-main .turn-box-value {
    font-size: 1.35rem;
  }

  .player-main .panel-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .player-main .panel-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .player-main .round-table-panel .panel-body {
    gap: 12px;
  }

  .player-main .hand-wrap {
    padding: 16px 10px calc(12px + env(safe-area-inset-bottom));
    border-radius: 24px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  }

  .player-main .hand-fan {
    min-height: 196px;
    justify-content: flex-start;
    padding: 0 12px 4px;
  }

  .player-main .hand-card {
    margin-left: -58px;
    scroll-snap-align: center;
  }

  .player-main .hand-card:first-child {
    margin-left: 0;
  }

  .player-main .hand-card.selected {
    transform: rotate(var(--angle, 0deg)) translateY(-20px);
  }

  .player-main .game-card {
    width: 114px;
    border-radius: 24px;
  }

  .player-main .scene-caption {
    font-size: 0.92rem;
    text-align: left;
  }

  .table-bid-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .table-bid-chip {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .table-bid-chip-name {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .table-bid-chip-value {
    font-size: 1rem;
  }

  .round-table-player .center-trick {
    top: 47%;
  }

  .player-hand-rail {
    width: 100%;
    padding: 12px;
    gap: 10px;
    border-radius: 22px;
  }

  .player-hand-rail-top {
    display: grid;
    gap: 10px;
  }

  .player-hand-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .player-hand-metric {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .player-hand-metric-value {
    font-size: 1.02rem;
  }

  .player-rail-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-rail-button {
    min-width: 0;
    width: 100%;
  }

  .table-hand-wrap {
    padding: 10px 6px 2px;
    border-radius: 18px;
  }

  .bidding-hand-wrap,
  .table-hand-wrap {
    overflow-x: hidden;
  }

  .bidding-hand-fan,
  .table-hand-fan {
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: end;
    justify-content: flex-start;
    padding: 0 4px 2px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
  }

  .bidding-hand-fan .hand-card,
  .table-hand-fan .hand-card {
    min-width: auto;
    width: auto;
    flex: 0 0 auto;
    display: block;
    scroll-snap-align: center;
  }

  .bidding-hand-fan .game-card,
  .table-hand-fan .game-card {
    width: clamp(68px, 17vw, 92px);
    min-width: 68px;
    max-width: 92px;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  }

  .bidding-hand-fan .card-overlay,
  .table-hand-fan .card-overlay {
    left: 6px;
    right: 6px;
    bottom: 6px;
    gap: 4px;
    padding: 4px 5px;
    min-width: 0;
  }

  .bidding-hand-fan .card-label,
  .table-hand-fan .card-label {
    font-size: 0.54rem;
  }

  .bidding-hand-fan .card-label-sub,
  .table-hand-fan .card-label-sub {
    font-size: 0.42rem;
  }

  .seat-node-contract {
    margin-top: 8px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .seat-node-contract-label {
    font-size: 0.52rem;
    letter-spacing: 0.12em;
  }

  .seat-node-contract-value {
    font-size: 0.96rem;
  }

  body[data-view="player"] .hero-simple,
  body[data-view="table"] .hero-simple {
    padding: 8px;
  }

  body[data-view="player"] .hero-brand-simple,
  body[data-view="table"] .hero-brand-simple {
    min-height: 0;
    grid-template-columns: 72px 1fr;
    justify-items: stretch;
    gap: 12px;
    padding: 12px 14px;
    text-align: left;
    align-items: center;
    border-radius: 22px;
  }

  body[data-view="player"] .hero-simple {
    padding: 6px;
  }

  body[data-view="player"] .hero-brand-simple {
    grid-template-columns: 58px 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  body[data-view="player"] .brand-mark,
  body[data-view="table"] .brand-mark {
    width: 72px;
    border-radius: 20px;
  }

  body[data-view="player"] .brand-mark {
    width: 58px;
    border-radius: 16px;
  }

  body[data-view="player"] .eagle-logo,
  body[data-view="table"] .eagle-logo {
    width: 46px;
  }

  body[data-view="player"] .eagle-logo {
    width: 36px;
  }

  body[data-view="player"] .hero-brand-simple .hero-title,
  body[data-view="table"] .hero-brand-simple .hero-title {
    font-size: clamp(2.3rem, 11vw, 3.1rem);
    line-height: 0.92;
    letter-spacing: 0.03em;
  }

  body[data-view="player"] .hero-brand-simple .hero-title {
    font-size: clamp(1.95rem, 9vw, 2.5rem);
  }

  body[data-view="player"] .nav-strip .panel-body,
  body[data-view="table"] .nav-strip .panel-body {
    padding: 10px 12px;
  }

  .toolbar,
  body[data-view="player"] .toolbar,
  body[data-view="table"] .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
  }

  .nav-button,
  body[data-view="player"] .nav-button,
  body[data-view="table"] .nav-button {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 16px;
  }

  body[data-view="player"] .toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body[data-view="player"] .toolbar::-webkit-scrollbar {
    display: none;
  }

  body[data-view="player"] .nav-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 108px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
  }

  body[data-view="player"] .round-table-scene {
    min-height: 392px;
  }

  body[data-view="player"] .round-table-scene.regular {
    min-height: 330px;
  }

  body[data-view="player"] .round-table-scene.crowded {
    min-height: 488px;
  }

  body[data-view="player"] .round-table-scene.dense {
    min-height: 430px;
  }

  body[data-view="player"] .round-table-wood {
    width: min(100%, 410px);
  }

  body[data-view="player"] .round-table-felt {
    width: min(82%, 332px);
  }

  body[data-view="player"] .round-table-panel.dense .panel-header {
    padding-bottom: 0;
  }

  body[data-view="player"] .round-table-panel.dense .table-bid-ribbon {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  body[data-view="player"] .round-table-panel.dense .table-bid-chip {
    padding: 6px 7px;
    border-radius: 10px;
  }

  body[data-view="player"] .round-table-panel.dense .table-bid-chip-name {
    font-size: 0.52rem;
    letter-spacing: 0.02em;
  }

  body[data-view="player"] .round-table-panel.dense .table-bid-chip-value {
    font-size: 0.84rem;
  }

  body[data-view="player"] .round-table-scene.dense .round-table-wood {
    width: min(74%, 292px);
  }

  body[data-view="player"] .round-table-scene.dense .round-table-felt {
    width: min(54%, 210px);
  }

  body[data-view="player"] .round-table-scene.dense .center-trick {
    width: min(22%, 84px);
    height: min(16%, 64px);
  }

  body[data-view="player"] .seat-slot.self {
    display: none;
  }

  body[data-view="player"] .seat-slot-top {
    top: 6%;
  }

  body[data-view="player"] .seat-slot-left,
  body[data-view="player"] .seat-slot-right {
    top: 43%;
  }

  body[data-view="player"] .seat-slot-bottom-left,
  body[data-view="player"] .seat-slot-bottom-right {
    bottom: 12%;
  }

  body[data-view="player"] .seat-node {
    width: 106px;
  }

  body[data-view="player"] .seat-slot.compact .seat-node {
    width: 136px;
  }

  body[data-view="player"] .seat-slot.ultra .seat-node {
    width: 124px;
  }

  body[data-view="player"] .seat-node-stats {
    gap: 3px;
  }

  body[data-view="player"] .seat-self-note,
  body[data-view="player"] .scene-caption {
    display: none;
  }

  body[data-view="player"] .center-empty {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.24);
  }

  body[data-view="player"] .bid-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-view="player"] .player-main-bidding .player-cards-first .hand-fan {
    min-height: 110px;
  }

  body[data-view="player"] .player-main-bidding .player-cards-first .game-card {
    width: 76px;
  }

  body[data-view="player"] .player-main-bidding .player-hand-panel .panel-title {
    font-size: 1.16rem;
  }

  body[data-view="player"] .player-main-bidding .player-hand-panel .panel-body.stack {
    gap: 12px;
  }

  body[data-view="player"] .player-main-bidding .turn-box {
    padding: 10px;
    border-radius: 16px;
  }

  body[data-view="player"] .player-main-bidding .turn-box-title {
    font-size: 0.68rem;
  }

  body[data-view="player"] .player-main-bidding .turn-box-value {
    margin-top: 5px;
    font-size: 1.02rem;
  }

  body[data-view="player"] .player-main-bidding .player-cards-first,
  body[data-view="player"] .player-main-bidding .bid-declare-panel,
  body[data-view="player"] .player-main-bidding .choice-box {
    padding: 12px;
    border-radius: 18px;
  }

  body[data-view="player"] .player-main-bidding .player-cards-first {
    padding-left: 8px;
    padding-right: 8px;
  }

  body[data-view="player"] .player-main-bidding .player-cards-first .muted,
  body[data-view="player"] .player-main-bidding .bid-declare-panel .field label,
  body[data-view="player"] .player-main-bidding .choice-box .muted {
    font-size: 0.9rem;
  }

  body[data-view="player"] .player-main-bidding .bidding-hand-wrap {
    padding: 6px 0 2px;
  }

  body[data-view="player"] .player-main-bidding .bidding-hand-fan {
    gap: 8px;
  }

  body[data-view="player"] .player-main-bidding .bidding-hand-fan.count-5 {
    gap: 8px;
  }

  body[data-view="player"] .player-main-bidding .bidding-hand-fan.count-5 .hand-card {
    display: block;
  }

  body[data-view="player"] .player-main-bidding .bidding-hand-fan.count-5 .game-card {
    width: clamp(68px, 17vw, 92px);
  }

  body[data-view="player"] .bidding-hand-fan .hand-card,
  body[data-view="player"] .table-hand-fan .hand-card {
    margin-left: 0;
    width: auto;
  }

  body[data-view="player"] .player-main-bidding .bid-selector {
    gap: 8px;
  }

  body[data-view="player"] .table-hand-fan {
    gap: 8px;
  }

  body[data-view="player"] .table-hand-fan .game-card {
    width: clamp(68px, 17vw, 92px);
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .panel-header,
  .panel-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nav-button {
    padding: 0 10px;
    font-size: 16px;
  }

  .player-mobile-tabs {
    gap: 8px;
  }

  .player-mobile-tabs .nav-button {
    min-height: 44px;
    font-size: 16px;
  }

  .turn-box {
    min-width: 0;
  }

  .turn-box-value {
    font-size: 1.15rem;
    line-height: 1.05;
    word-break: break-word;
  }

  body[data-view="player"] .player-main-bidding .player-bid-head {
    gap: 8px;
  }

  body[data-view="player"] .player-main-bidding .player-cards-first .game-card {
    width: 72px;
  }

}

@media (hover: none) and (pointer: coarse) {
  .button,
  .ghost-button,
  .copy-button,
  .nav-button,
  .game-card {
    transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  }
}

.platform-android .hand-card,
.platform-android .seat-back-card {
  will-change: auto;
  backface-visibility: visible;
  transform-style: flat;
}

.platform-android .hand-card {
  transition: none !important;
}

.platform-android .hand-card.intro,
.platform-android .table-card-wrap.intro,
.platform-android .center-card.intro {
  animation: none !important;
}

.platform-android .game-card {
  transition: opacity 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease !important;
  transform: none;
  backface-visibility: visible;
}

.platform-android .card-gloss {
  display: none;
}

body[data-deck="siciliane"] .card-gloss {
  opacity: 0.08;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Stitch / Neapolitan Noir layout override */
:root {
  --bg: #181210;
  --panel: rgba(32, 26, 24, 0.86);
  --panel-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(67, 72, 67, 0.2);
  --text: #ede0dc;
  --muted: #c3c8c1;
  --accent: #e9c349;
  --accent-2: #8e0f28;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  --font-title: "Space Grotesk", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-label: "Plus Jakarta Sans", sans-serif;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 190, 98, 0.2), transparent 18%),
    radial-gradient(circle at 12% 22%, rgba(84, 45, 24, 0.28), transparent 16%),
    radial-gradient(circle at 88% 20%, rgba(84, 45, 24, 0.28), transparent 16%),
    linear-gradient(180deg, #2a1816 0%, #1a1311 18%, #140f0d 100%);
  color: #ede0dc;
  font-family: var(--font-body);
}

body::before {
  opacity: 0.18;
  background:
    radial-gradient(circle at 22% 15%, rgba(255, 228, 163, 0.7), transparent 3.2%),
    radial-gradient(circle at 37% 11%, rgba(255, 228, 163, 0.7), transparent 3.2%),
    radial-gradient(circle at 50% 9%, rgba(255, 228, 163, 0.7), transparent 3.2%),
    radial-gradient(circle at 63% 11%, rgba(255, 228, 163, 0.7), transparent 3.2%),
    radial-gradient(circle at 78% 15%, rgba(255, 228, 163, 0.7), transparent 3.2%);
}

body::after {
  background:
    radial-gradient(circle at 50% 75%, rgba(11, 50, 10, 0.42), transparent 26%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.22) 100%);
}

.app-shell {
  max-width: 100%;
  padding: calc(48px + max(4px, env(safe-area-inset-top))) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  gap: 18px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: max(4px, env(safe-area-inset-top)) 14px 4px;
  background: rgba(6, 18, 10, 0.94);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.48), 0 1px 0 rgba(60, 160, 90, 0.12);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-brand {
  color: #e9c349;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.15s;
}
.topbar-brand:hover { opacity: 0.8; }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar .nav-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 206, 119, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(237, 224, 220, 0.72);
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: none;
}

.topbar .nav-button.active,
.topbar .nav-button:hover {
  color: #a1d494;
  background: rgba(255, 255, 255, 0.04);
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(12, 36, 20, 0.82);
  color: #e9c349;
  font-family: var(--font-label);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-user {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.topbar-user-label {
  color: rgba(237, 224, 220, 0.65);
  font-family: var(--font-label);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.topbar-user-name {
  color: #ede0dc;
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.topbar-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(233, 195, 73, 0.9);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 52%), linear-gradient(145deg, var(--avatar-a, #73593d), var(--avatar-b, #22110d));
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.topbar-avatar span {
  color: #fff6df;
  font-family: var(--font-title);
  font-size: 0.6rem;
  font-weight: 800;
}

.topbar-hub-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 194, 75, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 240, 216, 0.72);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
  flex-shrink: 0;
}

.topbar-search-btn:hover {
  background: rgba(255, 194, 75, 0.12);
  border-color: rgba(255, 194, 75, 0.38);
  color: #ffc24b;
  transform: scale(1.06);
}

.topbar-search-btn:active {
  transform: scale(0.94);
  transition-duration: 0.07s;
}

.topbar-search-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e84040;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--bg, #1a0a08);
  line-height: 1;
}

.topbar-avatar-btn {
  cursor: pointer;
  border: 1.5px solid rgba(255, 194, 75, 0.18);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
}

.topbar-avatar-btn:hover {
  border-color: rgba(255, 194, 75, 0.5);
  box-shadow: 0 0 16px rgba(255, 180, 50, 0.22), 0 10px 18px rgba(0,0,0,0.24);
  transform: scale(1.06);
}

.topbar-avatar-btn:active {
  transform: scale(0.94);
  transition-duration: 0.07s;
}

.topbar-auth-login {
  font-size: 0.84rem;
  padding: 8px 16px;
  border-radius: 12px;
}

.round-table-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.round-table-panel::before,
.round-table-panel .panel-header,
.round-table-panel .panel-body,
.round-table-panel .scene-caption,
.round-table-panel .felt-crest {
  display: none;
}

.round-table-shell {
  display: grid;
  gap: 16px;
}

.round-table-panel .table-bid-ribbon {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 8px;
}

.round-table-panel .table-bid-chip {
  background: rgba(59, 51, 49, 0.7);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.round-table-stage.with-rail,
.round-table-stage {
  gap: 18px;
}

body[data-view="player"] .player-table-focus,
body[data-view="player"] .round-table-panel {
  min-height: calc(100dvh - 104px);
}

body[data-view="player"] .round-table-stage.with-rail {
  min-height: calc(100dvh - 126px);
  align-content: space-between;
}

.round-table-scene {
  min-height: min(76vh, 760px);
  border-radius: 48px;
  background: transparent;
  overflow: visible;
}

.round-table-wood,
.round-table-felt {
  border-radius: 48% / 34%;
}

.round-table-wood {
  width: min(100%, 1360px);
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 216, 136, 0.14), transparent 18%),
    linear-gradient(180deg, #261d1a, #15100e);
  box-shadow:
    inset 0 0 0 10px rgba(17, 13, 11, 0.92),
    inset 0 0 0 18px rgba(120, 94, 59, 0.72),
    0 40px 100px rgba(0, 0, 0, 0.75);
}

.round-table-felt {
  width: min(92%, 1260px);
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 50% 38%, #0a540a 0%, #074307 58%, #043405 100%);
  box-shadow:
    inset 0 0 0 2px rgba(161, 212, 148, 0.16),
    inset 0 0 0 18px rgba(0, 0, 0, 0.16);
}

.seat-slot {
  z-index: 4;
}

.seat-node {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.seat-slot.active .seat-node,
.seat-slot.turn-live .seat-node,
.seat-slot.bid-live .seat-node,
.seat-slot.self .seat-node {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.seat-slot.turn-live .seat-node::after {
  display: none;
}

.seat-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 94px;
  aspect-ratio: 1;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.22));
}

.seat-avatar-wrap.clickable {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.seat-avatar-wrap.clickable:hover {
  transform: translateY(-1px) scale(1.03);
}

.seat-avatar-wrap.clickable:focus-visible {
  outline: 2px solid rgba(255, 215, 129, 0.92);
  outline-offset: 4px;
  border-radius: 999px;
}

.seat-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 221, 162, 0.46);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 244, 216, 0.34), transparent 42%),
    conic-gradient(from 180deg, rgba(255, 221, 162, 0.08), rgba(255, 185, 104, 0.34), rgba(255, 221, 162, 0.08), rgba(255, 150, 103, 0.22), rgba(255, 221, 162, 0.08));
  box-shadow:
    0 0 0 1px rgba(255, 241, 206, 0.08),
    0 0 24px rgba(255, 176, 94, 0.14),
    inset 0 0 0 8px rgba(8, 20, 12, 0.44);
}

.seat-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.38), transparent 20%),
    radial-gradient(circle at 68% 78%, rgba(0, 0, 0, 0.22), transparent 34%),
    linear-gradient(160deg, var(--avatar-a, #73593d), var(--avatar-b, #22110d));
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.26),
    0 0 0 2px rgba(255, 228, 176, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -10px 18px rgba(0, 0, 0, 0.18);
}

.seat-avatar span,
.seat-avatar-fallback {
  color: #fff6df;
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.seat-avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.seat-avatar-wrap.live {
  filter: drop-shadow(0 0 20px rgba(255, 209, 118, 0.38)) drop-shadow(0 14px 22px rgba(0, 0, 0, 0.24));
}

.seat-slot.turn-live .seat-avatar-ring {
  border-color: rgba(255, 232, 179, 0.96);
  box-shadow:
    0 0 0 4px rgba(255, 214, 107, 0.16),
    0 0 30px rgba(255, 141, 97, 0.32),
    inset 0 0 0 8px rgba(10, 26, 14, 0.36);
}

.seat-slot.turn-live .seat-avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 214, 107, 0.42);
  animation: turn-seat-glow 1.5s ease-in-out infinite;
}

.seat-hearts {
  position: absolute;
  right: -6px;
  bottom: 2px;
  z-index: 2;
  display: flex;
  gap: 2px;
}

.seat-heart {
  color: rgba(255, 179, 181, 0.50);
  font-size: 0.76rem;
  line-height: 1;
}

.seat-heart.alive {
  color: #ffb3b5;
}

.seat-turn-tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(59, 51, 49, 0.92);
  color: rgba(237, 224, 220, 0.72);
  font-family: var(--font-label);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.seat-turn-tag.live {
  color: #e9c349;
  box-shadow: 0 0 0 1px rgba(233, 195, 73, 0.18);
}

.seat-turn-tag.self {
  color: #a1d494;
}

.seat-meta-pill {
  min-width: 134px;
  padding: 7px 10px 10px;
  border-radius: 16px;
  background: rgba(6, 22, 12, 0.86);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(60, 180, 100, 0.08);
  text-align: center;
}

.seat-meta-line,
.seat-meta-self {
  color: rgba(220, 232, 220, 0.88);
  font-family: var(--font-label);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.seat-meta-name {
  margin-top: 4px;
  color: #ede0dc;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
}

.seat-meta-self {
  margin-top: 4px;
}

.score-pill {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 14px;
  background: rgba(255, 248, 231, 0.08);
  border: 1px solid rgba(255, 211, 124, 0.18);
}

.score-pill.emphasis {
  background: linear-gradient(180deg, rgba(255, 216, 124, 0.17), rgba(255, 154, 88, 0.14));
  border-color: rgba(255, 207, 112, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 244, 211, 0.14);
}

.score-pill.muted {
  opacity: 0.72;
}

.score-pill-metric {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.score-pill-label {
  color: rgba(255, 239, 214, 0.74);
  font-family: var(--font-label);
  font-size: 0.44rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.score-pill-value {
  color: #fff7ea;
  font-family: var(--font-title);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1;
}

.score-pill-divider {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(255, 218, 138, 0.55), transparent);
}

.score-pill.mobile-seat-score {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 12, 10, 0.86);
  border-color: rgba(255, 233, 184, 0.18);
}

.mobile-seat-score-item {
  color: #f7f1df;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.seat-blind-preview {
  margin-top: -2px;
}

.seat-blind-preview .game-card {
  width: 60px;
}

.seat-self-note,
.seat-node-header,
.seat-node-pills,
.seat-node-contract,
.seat-node-stats,
.seat-empty-mini,
.seat-back-stack,
.seat-visible-card {
  display: none;
}

.seat-slot.dead {
  opacity: 0.52;
  filter: saturate(0.4);
}

.center-trick {
  width: min(82%, 760px);
  height: min(58%, 420px);
  top: 51%;
  left: 50%;
  z-index: 5;
}

.center-empty,
.center-empty-silent {
  display: none;
}

.center-trick-cards {
  position: absolute;
  inset: 0;
}

.center-card .game-card.table {
  width: clamp(76px, 8vw, 96px);
}

.center-card.ordered {
  transform: translate(calc(-50% + var(--to-x)), calc(-50% + var(--to-y))) rotate(var(--to-r));
}

.round-table-panel.count-7 .seat-slot,
.round-table-panel.count-8 .seat-slot {
  z-index: 11;
}

.round-table-panel.count-7 .center-trick,
.round-table-panel.count-8 .center-trick {
  z-index: 4;
}

.round-table-panel.count-7 .center-card-label,
.round-table-panel.count-8 .center-card-label {
  display: none;
}

.player-table-focus .round-table-player.count-7 .seat-avatar-wrap,
.player-table-focus .round-table-player.count-8 .seat-avatar-wrap {
  width: 78px;
}

.player-table-focus .round-table-player.count-7 .seat-avatar,
.player-table-focus .round-table-player.count-8 .seat-avatar {
  width: 68px;
}

.player-table-focus .round-table-player.count-7 .seat-meta-pill,
.player-table-focus .round-table-player.count-8 .seat-meta-pill {
  min-width: 112px;
  padding: 6px 8px 8px;
  border-radius: 14px;
}

.player-table-focus .round-table-player.count-7 .seat-meta-line,
.player-table-focus .round-table-player.count-7 .seat-meta-self,
.player-table-focus .round-table-player.count-8 .seat-meta-line,
.player-table-focus .round-table-player.count-8 .seat-meta-self {
  font-size: 0.42rem;
  letter-spacing: 0.08em;
}

.player-table-focus .round-table-player.count-7 .seat-meta-name,
.player-table-focus .round-table-player.count-8 .seat-meta-name {
  margin-top: 2px;
  font-size: 0.82rem;
}

.player-table-focus .round-table-player.count-7 .score-pill,
.player-table-focus .round-table-player.count-8 .score-pill {
  margin-top: 5px;
  gap: 4px;
  padding: 6px;
}

.player-table-focus .round-table-player.count-7 .score-pill-label,
.player-table-focus .round-table-player.count-8 .score-pill-label {
  font-size: 0.36rem;
  letter-spacing: 0.08em;
}

.player-table-focus .round-table-player.count-7 .score-pill-value,
.player-table-focus .round-table-player.count-8 .score-pill-value {
  font-size: 0.78rem;
}

.player-table-focus .round-table-player.count-7 .seat-turn-tag,
.player-table-focus .round-table-player.count-8 .seat-turn-tag {
  padding: 4px 9px;
  font-size: 0.46rem;
  letter-spacing: 0.14em;
}

.table-status-col {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.table-status-label {
  color: rgba(195, 200, 193, 0.56);
  font-family: var(--font-label);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.table-status-value {
  color: #ede0dc;
  font-family: var(--font-title);
  font-size: 0.96rem;
  font-weight: 700;
}

.bid-status-pod .table-status-label {
  color: rgba(255, 224, 178, 0.72);
  letter-spacing: 0.22em;
}

.bid-status-pod .table-status-value {
  font-size: 1.1rem;
  font-weight: 800;
}

.hand-empty-wait {
  min-height: 180px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.table-status-divider {
  width: 1px;
  height: 34px;
  background: rgba(141, 146, 140, 0.22);
}

.bid-glass-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  display: grid;
  gap: 12px;
  min-width: min(88vw, 360px);
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(8, 26, 14, 0.82);
  border: 1px solid rgba(255, 233, 187, 0.16);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(60, 180, 100, 0.08);
  transform: translate(-50%, -50%);
}

.bid-glass-title {
  color: #ede0dc;
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.42rem;
  font-weight: 700;
}

.bid-glass-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.bid-glass-chip {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(10, 32, 18, 0.82);
  color: #e8f8ee;
  font-family: var(--font-title);
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
}

.bid-glass-chip.active {
  background: #a1d494;
  color: #0a3909;
  transform: scale(1.06);
}

.bid-glass-chip.forbidden,
.bid-glass-chip:disabled {
  opacity: 0.50;
  cursor: not-allowed;
}

.bid-glass-footer,
.gameover-copy {
  color: rgba(237, 224, 220, 0.7);
  text-align: center;
  font-size: 0.95rem;
}

.gameover-restart-status {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.gameover-restart-count {
  color: #fff0ce;
  font-family: var(--font-title);
  font-size: 1.06rem;
  font-weight: 800;
}

.gameover-restart-copy {
  color: rgba(255, 237, 206, 0.74);
  font-size: 0.84rem;
  line-height: 1.35;
}

.bid-glass-actions {
  display: flex;
  justify-content: center;
}

.bid-confirm-button {
  min-width: 180px;
}

.player-hand-rail {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  width: 100%;
  padding: 0 10px 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.player-identity-card {
  display: grid;
  gap: 4px;
  align-self: end;
  min-height: 82px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(6, 22, 12, 0.88);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}

.player-identity-meta {
  width: 100%;
  max-width: 210px;
}

.player-life-block {
  display: grid;
  gap: 4px;
}

.player-life-label {
  color: rgba(255, 236, 198, 0.72);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.player-life-value {
  color: #fff4df;
  font-family: var(--font-title);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 0.92;
}

.player-life-hearts {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-life-hearts .seat-heart {
  font-size: 0.86rem;
}

.player-rail-tap-hint {
  margin-bottom: 8px;
  color: rgba(255, 237, 206, 0.78);
  font-family: var(--font-label);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.player-hand-stage {
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding-top: 8px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.player-hand-stage::-webkit-scrollbar {
  display: none;
}

.table-hand-wrap,
.table-hand-wrap.count-1,
.table-hand-wrap.count-2,
.table-hand-wrap.count-3,
.table-hand-wrap.count-4,
.table-hand-wrap.count-5 {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.table-hand-fan {
  min-height: 146px;
  justify-content: center;
  align-items: end;
  padding: 0 8px 2px;
  overflow: visible;
}

.table-hand-fan .hand-card {
  margin-left: -28px;
}

.table-hand-fan .hand-card:first-child {
  margin-left: 0;
}

.table-hand-fan .hand-card:hover,
.table-hand-fan .hand-card.selected {
  transform: translateY(-12px) !important;
}

.table-hand-wrap .game-card {
  width: 108px;
}

.player-rail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.player-rail-button {
  min-width: 154px;
  min-height: 56px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d8b15a, #9f6820);
  color: #2c1801;
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.player-rail-button-danger {
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.82rem;
  background: transparent;
  color: rgba(255, 120, 110, 0.9);
  border: 1px solid rgba(255, 120, 110, 0.42);
  box-shadow: none;
}

.player-rail-choice {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.player-rail-choice .ghost-button {
  min-height: 44px;
  border-radius: 999px;
  background: rgba(32, 26, 24, 0.92);
}

body[data-view="player"] .round-table-panel,
body[data-view="table"] .round-table-panel {
  margin-top: 4px;
}

body[data-view="player"] .round-table-scene {
  min-height: min(68vh, 700px);
}

body[data-view="player"] .round-table-player .seat-slot.self {
  display: none;
}

body[data-view="player"] .round-table-player .seat-slot-top {
  top: 5%;
}

body[data-view="player"] .round-table-player .seat-slot-left,
body[data-view="player"] .round-table-player .seat-slot-right {
  top: 46%;
}

body[data-view="player"] .round-table-player .seat-slot-bottom-left,
body[data-view="player"] .round-table-player .seat-slot-bottom-right {
  bottom: 8%;
}

body[data-view="player"] .table-bid-ribbon {
  display: none;
}

body[data-view="player"] .round-table-stage.with-rail {
  gap: 12px;
}

@media (max-width: 1080px) {
  .round-table-scene {
    min-height: 640px;
  }

  .seat-avatar-wrap {
    width: 84px;
  }

  .seat-avatar {
    width: 72px;
  }

  .seat-meta-pill {
    min-width: 132px;
    padding: 8px 10px;
  }

  .player-hand-rail {
    grid-template-columns: 188px minmax(0, 1fr) auto;
  }

  .table-hand-wrap .game-card {
    width: 110px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding-top: calc(76px + env(safe-area-inset-top));
    gap: 12px;
  }

  /* Hub: topbar è 1 riga, meno padding-top necessario */
  body[data-view="hub"] .app-shell {
    padding-top: calc(70px + env(safe-area-inset-top));
  }

  /* Table/Player: topbar è 2 righe, serve più padding */
  body[data-view="table"] .app-shell,
  body[data-view="player"] .app-shell {
    padding-top: calc(102px + env(safe-area-inset-top));
  }

  /* Game view (table/player): 2 righe per dare spazio alla nav */
  body[data-view="table"] .topbar,
  body[data-view="player"] .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    padding-left: 14px;
    padding-right: 14px;
  }

  body[data-view="table"] .topbar-left,
  body[data-view="table"] .topbar-right,
  body[data-view="player"] .topbar-left,
  body[data-view="player"] .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  /* Hub view: 1 riga, brand + auth in orizzontale */
  body[data-view="hub"] .topbar {
    flex-wrap: nowrap;
    align-items: center;
    padding-left: 14px;
    padding-right: 14px;
  }

  body[data-view="hub"] .topbar-left,
  body[data-view="hub"] .topbar-right {
    width: auto;
    flex-shrink: 0;
  }

  .topbar-brand {
    font-size: 1.5rem;
  }

  .topbar-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar .nav-button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .topbar-user {
    display: none;
  }

  .round-table-scene {
    min-height: 430px;
  }

  .round-table-wood {
    width: min(100%, 460px);
  }

  .round-table-felt {
    width: min(90%, 408px);
  }

  .seat-avatar-wrap {
    width: 64px;
  }

  .seat-avatar {
    width: 56px;
  }

  .seat-avatar span {
    font-size: 0.92rem;
  }

  .seat-hearts {
    right: -2px;
    bottom: -1px;
  }

  .seat-heart {
    font-size: 0.58rem;
  }

  .seat-turn-tag {
    padding: 4px 8px;
    font-size: 0.44rem;
    letter-spacing: 0.16em;
  }

  .seat-meta-pill {
    min-width: 118px;
    padding: 6px 8px;
    border-radius: 14px;
  }

  .seat-meta-line,
  .seat-meta-self {
    font-size: 0.4rem;
    letter-spacing: 0.08em;
  }

  .seat-meta-name {
    font-size: 0.78rem;
  }

  .score-pill {
    gap: 6px;
    padding: 7px 8px;
  }

  .score-pill-label {
    font-size: 0.38rem;
    letter-spacing: 0.1em;
  }

  .score-pill-value {
    font-size: 0.92rem;
  }

  .center-trick {
    width: min(52%, 204px);
    height: min(26%, 112px);
    top: 49%;
  }

  .center-card .game-card.table {
    width: 68px;
  }

  .table-status-value {
    font-size: 0.68rem;
  }

  .bid-glass-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: calc(104px + env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    max-width: none;
    gap: 10px;
    padding: 14px;
    border-radius: 22px;
    transform: none;
  }

  body[data-phase="bidding"] .table-status-pod {
    top: 11%;
    min-width: min(84vw, 300px);
    padding: 8px 12px;
    gap: 4px;
  }

  body[data-phase="bidding"] .center-trick {
    top: 45%;
    height: min(24%, 102px);
  }

  body[data-phase="bidding"] .center-card-label {
    font-size: 0.54rem;
    padding: 4px 7px;
  }

  body[data-phase="bidding"] .bid-glass-panel {
    background: rgba(46, 40, 34, 0.84);
    border-color: rgba(255, 233, 187, 0.18);
  }

  body[data-phase="bidding"] .bid-glass-panel.intro {
    animation: bid-glass-mobile-intro 140ms cubic-bezier(.2,.84,.24,1) both;
  }

  .bid-glass-title {
    font-size: 1.18rem;
    line-height: 1.15;
  }

  .bid-glass-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bid-glass-chip {
    min-height: 46px;
    font-size: 0.96rem;
  }

  .player-hand-rail {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 0 6px;
  }

  body[data-view="player"] .round-table-stage.with-rail {
    position: relative;
    min-height: calc(100svh - 96px);
    padding-bottom: calc(146px + max(0px, env(safe-area-inset-bottom)));
    align-content: start;
  }

  body[data-view="player"] .round-table-scene {
    min-height: calc(100svh - 300px);
  }

  body[data-view="player"] .player-hand-rail {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(0px, env(safe-area-inset-bottom));
  }

  @media (max-height: 760px) {
    body[data-view="player"] .round-table-stage.with-rail {
      min-height: auto;
      padding-bottom: 0;
    }

    body[data-view="player"] .player-hand-rail {
      position: static;
      margin-top: 6px;
    }

    body[data-view="player"] .round-table-scene {
      min-height: 320px;
    }

    body[data-phase="bidding"] .bid-glass-panel {
      bottom: calc(92px + env(safe-area-inset-bottom));
    }
  }

  body[data-view="player"] .player-table-focus,
  body[data-view="player"] .round-table-panel,
  body[data-view="player"] .round-table-stage.with-rail {
    min-height: calc(100svh - 96px);
  }

  .player-identity-card {
    min-height: 0;
    padding: 12px 14px;
    border-radius: 20px;
  }

  .player-identity-name {
    font-size: 1.08rem;
  }

  .player-identity-badge {
    font-size: 0.52rem;
  }

  .player-identity-meta {
    max-width: 190px;
  }

  .player-hand-stage {
    overflow-x: auto;
  }

  .table-hand-fan {
    min-height: 126px;
    justify-content: flex-start;
    padding: 0 10px;
  }

  .table-hand-wrap .game-card {
    width: 84px;
  }

  .table-hand-fan .hand-card {
    margin-left: -18px;
  }

  .table-hand-fan .hand-card:hover,
  .table-hand-fan .hand-card.selected {
    transform: translateY(-8px) !important;
  }

  .player-rail-actions {
    justify-content: stretch;
  }

  .player-rail-button {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  body[data-view="player"] .round-table-player .seat-slot-left {
    left: 4%;
  }

  body[data-view="player"] .round-table-player .seat-slot-right {
    right: 4%;
  }

  body[data-view="player"] .round-table-player .seat-slot-bottom-left,
  body[data-view="player"] .round-table-player .seat-slot-bottom-right {
    bottom: 10%;
  }

  body[data-view="hub"] .hub-hero {
    min-height: calc(100svh - 92px);
    padding-top: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    align-items: center;
  }

  .hub-hero-inner {
    gap: 10px;
  }

  .hub-hero-title {
    font-size: clamp(1.9rem, 8.4vw, 2.45rem);
    line-height: 1.04;
  }

  .hub-hero-copy {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .hub-mode-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hub-mode-card {
    padding: 16px 8px 14px;
    gap: 8px;
    border-radius: 18px;
  }

  .hub-mode-icon-wrap {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .hub-mode-label {
    font-size: 0.88rem;
  }

  .hub-mode-desc {
    font-size: 0.66rem;
    line-height: 1.3;
  }

  .hub-mode-guest-note {
    font-size: 0.62rem;
  }

  .mm-screen {
    gap: 12px;
  }

  .mm-ring,
  .mm-ring-svg {
    width: 118px;
    height: 118px;
  }

  .mm-ring-time {
    font-size: 1.55rem;
  }

  .mm-title {
    font-size: clamp(1.08rem, 4.6vw, 1.34rem);
  }

  .mm-sub {
    max-width: 30ch;
    font-size: 0.82rem;
  }

  .mm-player-label {
    font-size: 0.74rem;
  }

  .mm-screen .hub-history-link {
    margin-top: 2px;
    padding: 8px 10px;
  }

  .social-page-header {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .social-page-title {
    font-size: 1.34rem;
  }

  .social-page-chips {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 380px) {
  .hub-hero-title {
    font-size: clamp(1.72rem, 9.2vw, 2.1rem);
  }

  .hub-mode-label {
    font-size: 0.82rem;
  }

  .hub-mode-desc {
    font-size: 0.62rem;
  }

  .bid-glass-grid {
    gap: 6px;
  }

  .bid-glass-chip {
    min-height: 44px;
    font-size: 0.9rem;
  }
}

/* ── Hub tabs ──────────────────────────────────────────────── */
.hub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

/* ── Auth panel ────────────────────────────────────────────── */
.auth-panel {
  border-color: rgba(245, 158, 11, 0.2);
}

.auth-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(245,158,11,0.08));
  border: 1.5px solid rgba(245,158,11,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f59e0b;
  flex-shrink: 0;
}

.auth-user-info {
  flex: 1;
  min-width: 0;
}

.auth-username {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}

/* ── History ───────────────────────────────────────────────── */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.history-win { border-color: rgba(52,211,153,0.25); background: rgba(52,211,153,0.05); }
.history-loss { border-color: rgba(248,113,113,0.2); background: rgba(248,113,113,0.04); }

.history-result {
  font-size: 1.35rem;
  line-height: 1;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.history-win .history-result { color: inherit; }
.history-loss .history-result { color: inherit; }

.history-players {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}

.history-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.42);
  margin-top: 2px;
}

/* ── Splash screen ─────────────────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #163d35, #0a1815 56%, #050908);
  transition: opacity 0.5s ease;
}

#splash.splash-hiding {
  opacity: 0;
  pointer-events: none;
}

#splash.splash-hidden {
  display: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.splash-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(255,255,255,0.04));
  border: 1.5px solid rgba(245,158,11,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: bold;
  color: #f59e0b;
  box-shadow: 0 0 40px rgba(245,158,11,0.15);
  animation: z-card-drop 5s linear both;
}

@keyframes z-card-drop {
  0% {
    opacity: 0;
    transform: translateY(-130px) rotate(-22deg) scale(0.38);
    filter: blur(8px);
    box-shadow: none;
  }
  20% {
    opacity: 0.35;
    transform: translateY(-90px) rotate(-16deg) scale(0.52);
    filter: blur(5px);
  }
  42% {
    opacity: 0.75;
    transform: translateY(-38px) rotate(-8deg) scale(0.75);
    filter: blur(2px);
  }
  62% {
    opacity: 1;
    transform: translateY(10px) rotate(5deg) scale(1.1);
    filter: blur(0);
    box-shadow: 0 22px 44px rgba(0,0,0,0.55), 0 0 32px rgba(245,158,11,0.22);
  }
  72% {
    transform: translateY(-5px) rotate(-2deg) scale(0.96);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3), 0 0 20px rgba(245,158,11,0.12);
  }
  80% {
    transform: translateY(3px) rotate(1deg) scale(1.02);
    box-shadow: 0 14px 32px rgba(0,0,0,0.4), 0 0 50px rgba(245,158,11,0.28);
  }
  90% {
    transform: translateY(0) rotate(0deg) scale(1);
    box-shadow: 0 0 60px rgba(245,158,11,0.35);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    box-shadow: 0 0 40px rgba(245,158,11,0.18);
    filter: blur(0);
  }
}

.splash-title {
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.3em;
  color: #fff;
}

.splash-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  min-height: 1.2em;
  text-align: center;
  padding: 0 24px;
}

.splash-dots {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.splash-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(245,158,11,0.6);
  animation: splash-bounce 1.2s ease-in-out infinite;
}

.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes splash-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1.1); opacity: 1; }
}

/* ── Auth modal ────────────────────────────────────────────── */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 9, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.18s ease both;
}

.auth-modal {
  background: linear-gradient(145deg, #1c0e0a, #0e1a13);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 28px;
  padding: 36px 28px 28px;
  width: min(380px, 100%);
  position: relative;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(245, 158, 11, 0.07);
  animation: modal-slide-in 0.32s cubic-bezier(.34,1.4,.64,1) both;
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.auth-modal-close:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.06); }

.auth-modal-logo {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(245,158,11,0.22), rgba(255,255,255,0.04));
  border: 1.5px solid rgba(245,158,11,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: bold;
  color: #f59e0b;
  margin: 0 auto 14px;
  box-shadow: 0 0 24px rgba(245,158,11,0.12);
}

.auth-modal-title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 22px;
  letter-spacing: 0.01em;
}

.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-modal-error {
  background: rgba(251, 113, 133, 0.20);
  border: 1px solid rgba(251, 113, 133, 0.42);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 0.84rem;
  padding: 10px 14px;
  margin-top: 4px;
}

.auth-modal-guest {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 8px;
  transition: color 0.15s;
}
.auth-modal-guest:hover { color: rgba(255,255,255,0.6); }

/* ── Topbar auth ───────────────────────────────────────────── */
.topbar-auth-login {
  font-size: 0.82rem !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(245,158,11,0.4) !important;
  color: #f59e0b !important;
  border-radius: 999px !important;
  letter-spacing: 0.02em;
}

.one-time-hint {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 219, 154, 0.22);
  background: linear-gradient(180deg, rgba(255, 213, 128, 0.14), rgba(255, 255, 255, 0.05));
  color: rgba(255, 245, 225, 0.92);
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar-auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-auth-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-avatar-btn {
  cursor: pointer;
  border: 1.5px solid rgba(255, 194, 75, 0.18);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
}
.topbar-avatar-btn:hover {
  border-color: rgba(255, 194, 75, 0.5);
  box-shadow: 0 0 16px rgba(255, 180, 50, 0.22), 0 10px 18px rgba(0,0,0,0.24);
  transform: scale(1.06);
}

.topbar-avatar-btn:active {
  transform: scale(0.94);
  transition-duration: 0.07s;
}

.topbar-hub-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 194, 75, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 240, 216, 0.72);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
  flex-shrink: 0;
}

.topbar-search-btn:hover {
  background: rgba(255, 194, 75, 0.12);
  border-color: rgba(255, 194, 75, 0.38);
  color: #ffc24b;
  transform: scale(1.06);
}

.topbar-search-btn:active {
  transform: scale(0.94);
  transition-duration: 0.07s;
}

.topbar-search-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ff9f76, #d83e1f 62%, #8f1809 100%);
  color: #fff9f1;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.social-shell {
  gap: 16px;
}

.social-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}

.social-page-title {
  flex: 1;
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff6da;
}

.social-page-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.social-refresh-btn {
  min-height: 44px;
  min-width: 52px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
}

.social-refresh-btn.icon-only {
  min-width: 46px;
  width: 46px;
  padding: 0;
  justify-content: center;
}

.social-urgent-panel {
  border-color: rgba(255, 130, 100, 0.38);
  background:
    linear-gradient(135deg, rgba(120, 30, 20, 0.82), rgba(50, 10, 14, 0.94)),
    rgba(26, 9, 11, 0.92);
}

.social-urgent-panel .panel-header {
  border-bottom-color: rgba(255, 130, 100, 0.22);
}

.social-invite-btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.9rem;
  border-radius: 999px;
}

.social-waiting-hero {
  align-items: center;
  gap: 14px;
}

.social-waiting-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: min(100%, 380px);
}

.social-hero-panel {
  overflow: hidden;
  border-color: rgba(255, 209, 118, 0.26);
  background:
    linear-gradient(135deg, rgba(86, 24, 22, 0.92), rgba(35, 10, 14, 0.94)),
    rgba(26, 9, 11, 0.92);
}

.social-hero-panel-compact {
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 236, 194, 0.08);
}

.social-search-hero {
  gap: 0;
}

.social-search-panel-body {
  padding-top: 0;
}

.social-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 22px;
  align-items: center;
}

.social-hero-title {
  margin: 6px 0 10px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.08;
  color: #fff6da;
}

.social-hero-sub {
  color: rgba(255, 250, 236, 0.68);
  max-width: 62ch;
}

.social-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.social-stat-card {
  padding: 16px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 213, 133, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 247, 226, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(72, 24, 20, 0.38);
  text-align: center;
}

.social-stat-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffe6a3;
}

.social-stat-label {
  margin-top: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.48);
}

.social-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.social-search-field {
  margin-bottom: 0;
}

.social-search-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.social-main-panel .panel-body,
.social-side-column {
  gap: 16px;
}

.social-side-column {
  display: grid;
}

.social-list {
  display: grid;
  gap: 12px;
}

.social-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 213, 133, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(42, 14, 16, 0.54);
}

.social-card-head {
  align-items: center;
}

.social-select-card {
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.social-select-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 209, 118, 0.38);
  box-shadow: 0 14px 30px rgba(0,0,0,0.2);
}

.social-select-card.active {
  border-color: rgba(255, 209, 118, 0.52);
  box-shadow: inset 0 0 0 1px rgba(255, 219, 156, 0.2), 0 16px 34px rgba(0,0,0,0.22);
  background:
    linear-gradient(180deg, rgba(255, 209, 118, 0.16), rgba(255,255,255,0.02)),
    rgba(76, 28, 20, 0.5);
}

.social-friend-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.social-button-row {
  flex-wrap: wrap;
}

.social-members-line {
  line-height: 1.5;
}

.social-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255, 219, 156, 0.08);
}

.social-members-line {
  line-height: 1.55;
}

.social-empty {
  border-radius: 22px;
}

@media (max-width: 980px) {
  .social-hero-body,
  .social-layout,
  .social-search-row {
    grid-template-columns: 1fr;
  }

  .social-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-search-actions {
    width: 100%;
  }

  .social-search-actions .button,
  .social-search-actions .ghost-button {
    flex: 1 1 180px;
  }

  .social-search-actions .social-refresh-btn.icon-only {
    flex: 0 0 46px;
  }
}

@media (max-width: 640px) {
  .social-stats-grid {
    grid-template-columns: 1fr;
  }

  .social-friend-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Profile modal ─────────────────────────────────────────── */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 9, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.18s ease both;
}

.profile-modal {
  background: linear-gradient(145deg, #1c0e0a, #0e1a13);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 28px;
  padding: 36px 28px 28px;
  width: min(400px, 100%);
  max-height: min(88svh, 720px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.65), 0 0 60px rgba(245,158,11,0.07);
  animation: modal-slide-in 0.32s cubic-bezier(.34,1.4,.64,1) both;
}

@media (max-width: 760px) {
  .profile-modal-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .profile-modal {
    width: 100%;
    border-radius: 22px;
    padding: 24px 18px 18px;
    max-height: min(86svh, 640px);
  }
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.profile-row:last-child { border-bottom: none; }

.profile-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 80px;
  flex-shrink: 0;
}

.profile-value {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.profile-edit-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.profile-edit-btn:hover { border-color: rgba(245,158,11,0.5); color: #f59e0b; }

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-action-btn {
  width: 100% !important;
  text-align: center !important;
  justify-content: center !important;
}

.profile-action-btn.danger {
  color: rgba(251,113,133,0.7) !important;
  border-color: rgba(251,113,133,0.2) !important;
}
.profile-action-btn.danger:hover {
  color: #fb7185 !important;
  border-color: rgba(251,113,133,0.5) !important;
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.profile-success {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: 10px;
  color: #6ee7b7;
  font-size: 0.84rem;
  padding: 10px 14px;
}

@keyframes modal-slide-in {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bid-glass-mobile-intro {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ── Hub hero landing ──────────────────────────────────────── */
.hub-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 64px);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

/* Ambient gold glow pulse */
.hub-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 100vw);
  height: min(700px, 100vw);
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255,180,50,0.09) 0%,
    rgba(140,40,10,0.06) 45%,
    transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: hub-glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes hub-glow-pulse {
  from { opacity: 0.6; transform: translate(-50%,-50%) scale(0.95); }
  to   { opacity: 1;   transform: translate(-50%,-50%) scale(1.05); }
}

/* Tavolo feltro rimosso dall'hub — visibile solo nella partita */

/* Decorative bg cards */
.hub-bg-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 0.72;
  filter: saturate(0.92);
}

.hub-bg-card {
  position: absolute;
  width: clamp(54px, 8vw, 90px);
  height: clamp(80px, 12vw, 135px);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(58, 10, 8, 0.92), rgba(24, 4, 6, 0.98)),
    rgba(24, 4, 6, 0.98);
  border: 1px solid rgba(255,194,75,0.12);
  box-shadow:
    0 14px 34px rgba(0,0,0,0.46),
    inset 0 1px 0 rgba(255,194,75,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  opacity: 0.26;
}

.hub-bg-card:nth-child(1) { top: 8%;  left: 5%;  transform: rotate(-22deg); color: rgba(255,194,75,0.5); }
.hub-bg-card:nth-child(2) { top: 6%;  right: 6%; transform: rotate(18deg);  color: rgba(220,60,60,0.5); }
.hub-bg-card:nth-child(3) { bottom: 10%; left: 8%;  transform: rotate(14deg);  color: rgba(255,194,75,0.5); }
.hub-bg-card:nth-child(4) { bottom: 8%;  right: 5%; transform: rotate(-16deg); color: rgba(220,60,60,0.5); }
.hub-bg-card:nth-child(5) { top: 40%; left: 2%;  transform: rotate(-8deg);  color: rgba(255,194,75,0.3); }
.hub-bg-card:nth-child(6) { top: 38%; right: 2%; transform: rotate(10deg);  color: rgba(220,60,60,0.3); }

.hub-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.hub-hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 20px rgba(0,0,0,0.7),
    0 0 40px rgba(255,180,50,0.2);
}

.hub-hero-copy {
  max-width: 36rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(255,240,216,0.76);
}

.hub-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.hub-cta {
  width: 100%;
  min-height: 48px;
  font-size: 1.05rem !important;
  padding: 16px 24px !important;
  border-radius: 999px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hub-cta-secondary {
  width: 100%;
  min-height: 44px;
  font-size: 0.95rem !important;
  padding: 12px 24px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}

.hub-history-link {
  margin-top: 6px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.42);
  font-size: 0.86rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
}
.hub-history-link:hover {
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.06);
}

/* Mode selection cards (Bot / Con amici / Online) */
.hub-mode-cards {
  display: flex;
  gap: 10px;
  width: 100%;
}

.hub-mode-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 10px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,194,75,0.18);
  background: linear-gradient(170deg, rgba(62,10,7,0.92) 0%, rgba(22,4,5,0.97) 100%);
  cursor: pointer;
  transition: border-color 0.22s, transform 0.15s, box-shadow 0.18s, background 0.18s;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,200,100,0.06);
}

.hub-mode-card:hover {
  border-color: rgba(255,194,75,0.65);
  background: linear-gradient(170deg, rgba(88,15,10,0.96) 0%, rgba(35,6,8,0.99) 100%);
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.52), 0 0 24px rgba(255,180,50,0.14);
}

.hub-mode-card:active {
  transform: translateY(-1px) scale(0.97);
  transition-duration: 0.08s;
}

.hub-mode-card:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* Cerchio icona */
.hub-mode-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: rgba(255,180,50,0.12);
  border: 1px solid rgba(255,180,50,0.2);
  box-shadow: 0 0 18px rgba(255,180,50,0.12);
  transition: background 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.hub-mode-card:hover .hub-mode-icon-wrap {
  background: rgba(255,180,50,0.2);
  box-shadow: 0 0 28px rgba(255,180,50,0.22);
}

/* Colorazione per slot: bot=oro, friends=viola, online=verde */
.hub-mode-card:nth-child(2) .hub-mode-icon-wrap {
  background: rgba(139,92,246,0.14);
  border-color: rgba(139,92,246,0.28);
  box-shadow: 0 0 18px rgba(139,92,246,0.12);
}
.hub-mode-card:nth-child(2):hover .hub-mode-icon-wrap {
  background: rgba(139,92,246,0.24);
  box-shadow: 0 0 28px rgba(139,92,246,0.22);
}
.hub-mode-card:nth-child(3) .hub-mode-icon-wrap {
  background: rgba(96,165,250,0.12);
  border-color: rgba(96,165,250,0.24);
  box-shadow: 0 0 18px rgba(96,165,250,0.1);
}
.hub-mode-card:nth-child(3):hover .hub-mode-icon-wrap {
  background: rgba(96,165,250,0.22);
  box-shadow: 0 0 28px rgba(96,165,250,0.2);
}

.hub-mode-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.1;
}

/* Colore label per card friends/online */
.hub-mode-card:nth-child(2) .hub-mode-label { color: #c4b5fd; }
.hub-mode-card:nth-child(3) .hub-mode-label { color: #93c5fd; }

.hub-mode-desc {
  font-size: 0.76rem;
  color: rgba(255,240,216,0.48);
  line-height: 1.4;
}

.hub-mode-guest-note {
  font-size: 0.7rem;
  color: rgba(255,240,216,0.38);
  margin-top: 2px;
}

/* ── Bot count selector (legacy) ────────────────────────── */
.bot-count-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: min(100%, 480px);
  margin: 12px auto 6px;
}
.bot-count-btn:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

/* ── Bot carousel ─────────────────────────────────────────── */
.bot-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 8px 0 4px;
  user-select: none;
}

.bot-carousel-track {
  flex: 1;
  position: relative;
  height: 360px;
  overflow: hidden;
  touch-action: pan-y;
}

.bot-carousel-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(236px, 54vw);
  aspect-ratio: 0.68;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  background: linear-gradient(160deg, rgba(60,14,14,0.92), rgba(18,4,4,0.97));
  border: 1px solid rgba(255,194,75,0.18);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.32s cubic-bezier(0.34,1.1,0.64,1), opacity 0.28s ease, box-shadow 0.28s ease;
  touch-action: manipulation;
}

.bot-carousel-card.is-center {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  z-index: 3;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,194,75,0.30);
}

.bot-carousel-card.is-prev {
  transform: translate(calc(-50% - min(160px, 40vw)), -50%) scale(0.80);
  opacity: 0.50;
  z-index: 2;
}

.bot-carousel-card.is-next {
  transform: translate(calc(-50% + min(160px, 40vw)), -50%) scale(0.80);
  opacity: 0.50;
  z-index: 2;
}

.bot-carousel-card.is-far-left {
  transform: translate(calc(-50% - min(300px, 76vw)), -50%) scale(0.65);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.bot-carousel-card.is-far-right {
  transform: translate(calc(-50% + min(300px, 76vw)), -50%) scale(0.65);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.bot-card-emoji {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.bot-card-num {
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  font-family: var(--font-title);
  text-shadow: 0 0 28px rgba(255,194,75,0.45);
}

.bot-card-label {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,240,216,0.88);
}

.bot-card-desc {
  font-size: 0.74rem;
  color: rgba(255,240,216,0.42);
  text-align: center;
  line-height: 1.3;
}

.bot-card-note {
  font-size: 0.64rem;
  color: rgba(255,240,216,0.36);
  margin-top: 2px;
}

/* Play-mode carousel color variants */
.bot-carousel-card.mode-bot {
  background: linear-gradient(160deg, rgba(60,22,0,0.94), rgba(18,6,0,0.97));
  border-color: rgba(255,130,50,0.22);
}
.bot-carousel-card.mode-bot.is-center {
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,130,50,0.35);
}
.bot-carousel-card.mode-bot .bot-card-emoji { color: #ff8232; }

.bot-carousel-card.mode-friends {
  background: linear-gradient(160deg, rgba(30,10,50,0.94), rgba(10,4,18,0.97));
  border-color: rgba(160,90,255,0.22);
}
.bot-carousel-card.mode-friends.is-center {
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(160,90,255,0.35);
}
.bot-carousel-card.mode-friends .bot-card-emoji { color: #b36fff; }

.bot-carousel-card.mode-online {
  background: linear-gradient(160deg, rgba(0,30,20,0.94), rgba(0,12,8,0.97));
  border-color: rgba(52,211,153,0.22);
}
.bot-carousel-card.mode-online.is-center {
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(52,211,153,0.35);
}
.bot-carousel-card.mode-online .bot-card-emoji { color: #34d399; }

/* Card su mobile */
@media (max-width: 480px) {
  .bot-carousel-track {
    height: 316px;
  }
  .bot-carousel-card {
    width: min(206px, 50vw);
  }
}
@media (max-width: 380px) {
  .bot-carousel-track {
    height: 280px;
  }
  .bot-carousel-card {
    width: min(182px, 48vw);
  }
  .bot-carousel-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }
}

.bot-carousel-arrow {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,194,75,0.22);
  background: rgba(28,6,6,0.90);
  color: rgba(255,240,216,0.82);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s, background 0.18s;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .bot-carousel-arrow:not(:disabled):hover {
    background: rgba(60,14,14,0.95);
    transform: scale(1.08);
  }
}

.bot-carousel-arrow:disabled {
  opacity: 0.18;
  cursor: default;
}

.bot-carousel-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 4px 0 2px;
}

.bot-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  touch-action: manipulation;
}

.bot-carousel-dot.active {
  background: var(--accent);
  transform: scale(1.5);
}

.bot-start-btn {
  width: min(100%, 300px);
  min-height: 56px;
  margin-top: 8px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

/* ── Hub play-mode: card verticali ───────────────────────── */
.hub-mode-cards-v2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 440px);
  margin: 4px 0;
}

.hub-mode-card-v2 {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,194,75,0.14);
  background: rgba(28,6,6,0.82);
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s, box-shadow 0.16s;
  touch-action: manipulation;
}

.hub-mode-card-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hub-mode-card-v2:active {
  transform: scale(0.97);
}

.hub-mode-card-v2.mode-bot    { border-color: rgba(255,130,50,0.28); }
.hub-mode-card-v2.mode-bot::before    { background: linear-gradient(120deg, rgba(255,110,30,0.10), transparent 55%); }
.hub-mode-card-v2.mode-friends { border-color: rgba(160,90,255,0.28); }
.hub-mode-card-v2.mode-friends::before { background: linear-gradient(120deg, rgba(140,70,240,0.10), transparent 55%); }
.hub-mode-card-v2.mode-online  { border-color: rgba(52,211,153,0.28); }
.hub-mode-card-v2.mode-online::before  { background: linear-gradient(120deg, rgba(32,190,120,0.10), transparent 55%); }

.hub-mode-icon-v2 {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  position: relative;
  z-index: 1;
}

.mode-bot    .hub-mode-icon-v2 { background: rgba(255,110,30,0.16); }
.mode-friends .hub-mode-icon-v2 { background: rgba(140,70,240,0.16); }
.mode-online  .hub-mode-icon-v2 { background: rgba(32,190,120,0.16); }

.hub-mode-text-v2 {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hub-mode-label-v2 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.hub-mode-desc-v2 {
  font-size: 0.78rem;
  color: rgba(255,240,216,0.50);
  margin-top: 3px;
  line-height: 1.3;
}

.hub-mode-guest-note-v2 {
  font-size: 0.68rem;
  color: rgba(255,240,216,0.30);
  margin-top: 3px;
}

.hub-mode-arrow-v2 {
  color: rgba(255,194,75,0.45);
  font-size: 1.3rem;
  font-weight: 900;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.bot-count-btn {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px 12px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 214, 133, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(38, 12, 12, 0.84);
  border: 1px solid rgba(255,194,75,0.20);
  color: var(--text-primary, #fff);
  cursor: pointer;
  box-shadow:
    0 14px 32px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  transition: background 0.18s, border-color 0.18s, transform 0.15s, box-shadow 0.18s;
}

.bot-count-btn:hover {
  background:
    linear-gradient(180deg, rgba(255, 214, 133, 0.20), rgba(255, 255, 255, 0.08)),
    rgba(38, 12, 12, 0.88);
  border-color: rgba(255,194,75,0.48);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.38),
    0 0 28px rgba(255,180,50,0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.bot-count-btn:active {
  transform: scale(0.96);
  transition-duration: 0.07s;
}

.bot-count-icon {
  font-size: 1.85rem;
  line-height: 1;
}

.bot-count-num {
  font-size: 2.15rem;
  font-weight: 900;
  color: var(--accent, #ffc24b);
  line-height: 1;
}

.bot-count-sub {
  font-size: 0.66rem;
  color: rgba(255,240,216,0.58);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.bot-count-back {
  margin-top: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
}

.bot-count-back:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Matchmaking count selector */
.hub-count-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hub-count-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hub-count-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.hub-count-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0a00;
}

/* Matchmaking waiting screen */
.mm-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* SVG ring */
.mm-ring {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.mm-ring-svg {
  width: 140px;
  height: 140px;
}

.mm-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.1);
  stroke-width: 8;
}

.mm-ring-arc {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear, stroke 0.4s ease;
}

.mm-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.mm-ring-time {
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff1cf;
  letter-spacing: -0.03em;
  line-height: 1;
}

.mm-ring-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Title */
.mm-title {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 800;
  color: #fff1cf;
  text-align: center;
  letter-spacing: -0.02em;
}

/* Player slot dots */
.mm-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.mm-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.mm-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(255, 194, 95, 0.5);
}

.mm-dot.needed {
  border-color: rgba(255,255,255,0.45);
  animation: mm-dot-pulse 1.1s ease-in-out infinite;
}

@keyframes mm-dot-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.25); }
}

/* Status text */
.mm-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.62);
  text-align: center;
  line-height: 1.4;
}

.mm-player-label {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
}

.hub-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Deck selector ───────────────────────────────────────────── */
.deck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 4px;
}

.deck-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  color: #fff;
  text-align: center;
}

.deck-option:hover:not(:disabled) {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,194,75,0.35);
  transform: translateY(-1px);
}

.deck-option.active {
  border-color: var(--accent);
  background: rgba(255,194,75,0.1);
}

.deck-option.unavailable {
  opacity: 0.45;
  cursor: default;
}

.deck-preview {
  width: 52px;
  height: 78px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deck-preview-fallback {
  font-size: 1.8rem;
  align-items: center;
  justify-content: center;
}

.deck-option-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.deck-option-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.3;
}

.deck-coming-soon {
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 2px 7px;
}

.deck-active-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
}

.deck-grid-live {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deck-picker-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.deck-picker-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 5, 5, 0.18);
  pointer-events: auto;
}

.deck-picker-popover {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 74px);
  right: max(18px, env(safe-area-inset-right, 0px) + 18px);
  width: min(440px, calc(100vw - 28px));
  padding: 18px;
  border-radius: 24px;
  background: rgba(27, 11, 12, 0.94);
  border: 1px solid rgba(255, 210, 122, 0.22);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.deck-picker-kicker {
  color: rgba(255, 232, 190, 0.72);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.deck-picker-title {
  margin-top: 6px;
  color: #fff4e0;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
}

.deck-picker-copy {
  margin-top: 6px;
  margin-bottom: 14px;
  color: rgba(255, 240, 216, 0.78);
  font-size: 0.95rem;
  line-height: 1.4;
}

.deck-picker-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 760px) {
  .deck-picker-popover {
    top: auto;
    right: 14px;
    left: 14px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    width: auto;
    padding: 16px;
    border-radius: 20px;
  }

  .deck-grid-live {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .deck-picker-title {
    font-size: 1.28rem;
  }

  .deck-picker-copy {
    font-size: 0.88rem;
  }
}

/* ── Regole modal ────────────────────────────────────────────── */
.rules-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 0.18s ease both;
}

.rules-modal {
  position: relative;
  background: linear-gradient(160deg, rgba(28,4,6,0.98), rgba(18,3,4,0.99));
  border: 1px solid rgba(255,194,75,0.2);
  border-radius: 24px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 520px;
  max-height: 85svh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.rules-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 0 20px;
  text-align: center;
}

.rules-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rules-section {
  border-left: 2px solid rgba(255,194,75,0.25);
  padding-left: 14px;
}

.rules-section-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.rules-section p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255,240,216,0.7);
  line-height: 1.5;
}

.rules-section strong {
  color: var(--accent);
}

.rules-section + .rules-section {
  margin-top: 4px;
}

.rules-example {
  margin-top: 8px !important;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,194,75,0.08);
  border-left: 2px solid rgba(255,194,75,0.32);
  font-size: 0.82rem !important;
  color: rgba(255,240,216,0.78) !important;
}

.rules-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: rgba(255,240,216,0.7);
  line-height: 1.6;
}

.rules-list li {
  margin-bottom: 4px;
}

/* Manche pills */
.rules-rounds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}

.rules-round-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,194,75,0.20);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,240,216,0.82);
  white-space: nowrap;
}

.rules-round-pill-last {
  background: rgba(255,194,75,0.14);
  border-color: rgba(255,194,75,0.40);
  color: var(--accent);
}

/* Gerarchia semi */
.rules-hierarchy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}

.rules-hier-item {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rules-hier-1 { background: rgba(245,158,11,0.22); border: 1px solid rgba(245,158,11,0.40); color: #fbbf24; }
.rules-hier-2 { background: rgba(244,63,94,0.18);  border: 1px solid rgba(244,63,94,0.36);  color: #fb7185; }
.rules-hier-3 { background: rgba(96,165,250,0.18); border: 1px solid rgba(96,165,250,0.36); color: #93c5fd; }
.rules-hier-4 { background: rgba(52,211,153,0.18); border: 1px solid rgba(52,211,153,0.36); color: #6ee7b7; }

.rules-hier-arrow {
  color: rgba(255,255,255,0.35);
  font-size: 0.9rem;
  font-weight: 900;
}

/* Rank chips */
.rules-ranks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 4px;
}

.rules-rank-chip {
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,240,216,0.86);
}

.rules-rank-weak {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,240,216,0.45);
}

/* ── Topbar small screens ──────────────────────────────────── */
@media (max-width: 480px) {
  .topbar-auth-name {
    display: none;
  }
  .topbar-auth-storico {
    display: none;
  }
}

@media (max-width: 760px) {
  body[data-view="player"] .player-mobile-layout {
    gap: 10px;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-view="player"] .player-mobile-layout .round-table-panel.mobile-pane-table,
  body[data-view="player"] .player-mobile-layout .round-table-panel.mobile-pane-table .round-table-shell,
  body[data-view="player"] .player-mobile-layout .round-table-panel.mobile-pane-table .round-table-stage {
    min-height: 0;
  }

  body[data-view="player"] .player-mobile-layout .round-table-shell {
    gap: 0;
  }

  body[data-view="player"] .player-mobile-layout .round-table-stage,
  body[data-view="player"] .player-mobile-layout .round-table-stage.with-rail {
    min-height: 0;
    padding-bottom: 0;
    align-content: start;
    gap: 0;
  }

  body[data-view="player"] .player-mobile-layout .round-table-scene {
    min-height: clamp(320px, 48svh, 430px);
  }

  body[data-view="player"] .player-mobile-layout .round-table-scene.crowded,
  body[data-view="player"] .player-mobile-layout .round-table-scene.dense {
    min-height: clamp(336px, 52svh, 456px);
  }

  body[data-view="player"] .player-mobile-layout .round-table-wood,
  body[data-view="player"] .player-mobile-layout .round-table-scene.crowded .round-table-wood,
  body[data-view="player"] .player-mobile-layout .round-table-scene.dense .round-table-wood {
    width: min(100%, 440px);
  }

  body[data-view="player"] .player-mobile-layout .round-table-felt,
  body[data-view="player"] .player-mobile-layout .round-table-scene.crowded .round-table-felt,
  body[data-view="player"] .player-mobile-layout .round-table-scene.dense .round-table-felt {
    width: min(90%, 388px);
  }

  body[data-view="player"] .player-mobile-layout .center-trick,
  body[data-view="player"] .player-mobile-layout .round-table-scene.crowded .center-trick,
  body[data-view="player"] .player-mobile-layout .round-table-scene.dense .center-trick {
    top: 48%;
    width: min(40%, 144px);
    height: min(24%, 102px);
  }

  body[data-view="player"] .player-mobile-layout .center-card .game-card.table,
  body[data-view="player"] .player-mobile-layout .round-table-scene.dense .center-card .game-card.table {
    width: clamp(46px, 15vw, 58px);
  }

  body[data-view="player"] .player-mobile-layout .seat-avatar-wrap {
    width: 48px;
  }

  body[data-view="player"] .player-mobile-layout .seat-avatar {
    width: 40px;
  }

  body[data-view="player"] .player-mobile-layout .seat-avatar span {
    font-size: 0.72rem;
  }

  body[data-view="player"] .player-mobile-layout .seat-hearts {
    right: -1px;
    bottom: -1px;
  }

  body[data-view="player"] .player-mobile-layout .seat-heart {
    font-size: 0.44rem;
  }

  body[data-view="player"] .player-mobile-layout .seat-turn-tag {
    padding: 3px 6px;
    font-size: 0.34rem;
    letter-spacing: 0.12em;
  }

  body[data-view="player"] .player-mobile-layout .seat-meta-pill {
    min-width: 90px;
    padding: 4px 6px 5px;
    border-radius: 12px;
  }

  body[data-view="player"] .player-mobile-layout .seat-meta-line,
  body[data-view="player"] .player-mobile-layout .seat-meta-self {
    font-size: 0.32rem;
    letter-spacing: 0.06em;
  }

  body[data-view="player"] .player-mobile-layout .seat-meta-name {
    margin-top: 1px;
    font-size: 0.62rem;
  }

  body[data-view="player"] .player-mobile-layout .score-pill {
    margin-top: 4px;
    gap: 3px;
    padding: 4px 5px;
  }

  body[data-view="player"] .player-mobile-layout .score-pill-label {
    font-size: 0.3rem;
    letter-spacing: 0.06em;
  }

  body[data-view="player"] .player-mobile-layout .score-pill-value {
    font-size: 0.68rem;
  }

  body[data-view="player"] .player-mobile-layout .seat-bid-callout {
    min-width: 76px;
    padding: 5px 7px;
    border-radius: 10px;
  }

  body[data-view="player"] .player-mobile-layout .seat-bid-callout-label {
    font-size: 0.32rem;
    letter-spacing: 0.12em;
  }

  body[data-view="player"] .player-mobile-layout .seat-bid-callout-value {
    font-size: 0.62rem;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane {
    display: grid;
    gap: 10px;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .player-hand-rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .player-identity-card {
    min-height: 0;
    padding: 12px 14px;
    border-radius: 20px;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .player-identity-meta {
    max-width: none;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .player-hand-stage {
    overflow-x: auto;
    padding: 0 0 4px;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .table-hand-fan {
    min-height: 118px;
    justify-content: flex-start;
    padding: 0 6px;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .table-hand-wrap .game-card {
    width: 76px;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .table-hand-fan .hand-card {
    margin-left: -14px;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .player-rail-actions {
    justify-content: stretch;
  }

  body[data-view="player"] .player-mobile-layout .player-mobile-hand-pane .player-rail-button {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }
/* ═══════════════════════════════════════════════════════════════
   MOBILE POLISH — aggiunto per migliorare la vista da telefono
   ═══════════════════════════════════════════════════════════════ */

/* Previeni doppio-tap zoom su carte e bottoni touch */
.game-card,
.hand-card button,
.hub-mode-card,
.bid-chip,
.bid-glass-chip,
.bot-count-btn,
.deck-option,
[data-action] {
  touch-action: manipulation;
}

/* Blocca l'overscroll del browser durante la partita (evita "swipe back") */
body[data-view="player"],
body[data-view="table"] {
  overscroll-behavior: none;
}

/* Scroll touch più fluido su iOS per le zone carta */
.hand-wrap,
.table-hand-wrap,
.bidding-hand-wrap,
.player-hand-stage,
.topbar-nav {
  -webkit-overflow-scrolling: touch;
}

/* ── iOS: impedisce lo zoom automatico sugli input ─────────────
   iOS esegue lo zoom se font-size < 16px su un campo focus     */
@media (max-width: 760px) {
  input,
  select,
  textarea {
    font-size: max(16px, 1em) !important;
  }
}

/* ── Topbar compatta su schermi <= 480px ───────────────────── */
@media (max-width: 480px) {
  .topbar {
    min-height: 54px;
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;
  }

  .topbar-brand {
    font-size: 1.55rem;
    letter-spacing: -0.05em;
  }

  .topbar-chip {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .topbar-avatar,
  .topbar-search-btn {
    width: 36px;
    height: 36px;
  }

  .topbar-avatar span {
    font-size: 0.82rem;
  }

  /* Hub: topbar 1 riga → meno padding-top */
  body[data-view="hub"] .app-shell {
    padding-top: calc(60px + env(safe-area-inset-top));
  }

  /* Game views: topbar 2 righe → più spazio, ma meno del precedente */
  body[data-view="table"] .app-shell,
  body[data-view="player"] .app-shell {
    padding-top: calc(52px + env(safe-area-inset-top));
  }
}

/* ── Breakpoint 390px: iPhone 14/15 e simili ──────────────── */
@media (max-width: 390px) {
  /* App shell ancora più stretto */
  .app-shell {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  /* Tavolo rotondo: ridotto per stare nella viewport */
  .round-table-scene {
    min-height: 360px;
    border-radius: 20px;
  }

  .round-table-wood {
    width: min(98%, 370px);
  }

  .round-table-felt {
    width: min(80%, 295px);
  }

  .center-trick {
    width: min(48%, 170px);
    height: min(22%, 84px);
  }

  .center-card .game-card.table {
    width: 58px;
  }

  /* Pedine giocatori più piccole */
  .seat-node {
    width: 96px;
    padding: 5px 6px;
    border-radius: 14px;
  }

  .seat-node-name {
    font-size: 0.7rem;
  }

  .seat-node-stats {
    gap: 3px;
  }

  .seat-stat-value {
    font-size: 0.8rem;
  }

  .seat-back-stack {
    width: 60px;
    height: 46px;
  }

  /* Carte nella mano del giocatore */
  .player-main .game-card {
    width: 96px;
    border-radius: 20px;
  }

  .player-main .hand-card {
    margin-left: -50px;
  }

  /* Griglia dichiarazioni */
  .bid-glass-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .bid-glass-chip {
    min-height: 40px;
    font-size: 0.88rem;
  }

  .bid-glass-title {
    font-size: 1rem;
  }

  /* Round table nella player view */
  body[data-view="player"] .round-table-scene {
    min-height: calc(100svh - 340px);
  }
}

/* ── Landscape phone: schermo basso (< 500px di altezza) ─── */
@media (max-height: 500px) and (orientation: landscape) {
  /* Topbar minimale */
  .topbar {
    min-height: 48px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  /* Tavolo compresso */
  .round-table-scene {
    min-height: 260px;
  }

  /* In landscape, la mano è statica (non absolute) per evitare overlap */
  body[data-view="player"] .round-table-stage.with-rail {
    min-height: auto;
    padding-bottom: 0;
  }

  body[data-view="player"] .player-hand-rail {
    position: static;
    margin-top: 4px;
  }

  body[data-view="player"] .round-table-scene {
    min-height: 240px;
  }

  /* Hub hero più compatto */
  .hub-hero {
    min-height: auto;
    padding: 12px 16px;
  }

  body[data-view="hub"] .hub-hero {
    min-height: auto;
  }

  /* Padding-top app-shell ridotto */
  body[data-view="hub"] .app-shell {
    padding-top: calc(52px + env(safe-area-inset-top));
  }

  body[data-view="table"] .app-shell,
  body[data-view="player"] .app-shell {
    padding-top: calc(52px + env(safe-area-inset-top));
  }
}

/* ── Auth modal: bottom sheet su mobile ────────────────────── */
@media (max-width: 760px) {
  .auth-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .auth-modal {
    width: 100%;
    border-radius: 28px 28px 0 0;
    padding: 28px 22px max(24px, env(safe-area-inset-bottom));
    max-height: 92svh;
    overflow-y: auto;
    animation: mobile-sheet-in 0.3s cubic-bezier(.34,1.1,.64,1) both;
  }

  @keyframes mobile-sheet-in {
    from { transform: translateY(100%); opacity: 0.6; }
    to   { transform: translateY(0);   opacity: 1; }
  }
}

/* ── Hub hero: padding bottom per notch/home-indicator ────── */
@media (max-width: 760px) {
  .hub-hero {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* ── Bottoni gioca / hub-cta più toccabili su mobile ───────── */
@media (max-width: 760px) {
  .hub-cta {
    min-height: 52px;
  }

  .hub-mode-card {
    min-height: 100px;
  }
}

/* ── Notch laterale in landscape (iPhone X/11/12/...) ─────── */
@media (max-width: 926px) and (orientation: landscape) {
  .app-shell {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }

  .topbar {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
}

/* ── Griglia matchmaking su schermi stretti ─────────────────── */
@media (max-width: 390px) {
  .mm-dots {
    gap: 5px;
  }

  .mm-dot {
    width: 10px;
    height: 10px;
  }

  .hub-mode-label {
    font-size: 0.78rem;
  }

  .hub-mode-desc {
    font-size: 0.6rem;
  }
}

/* ── Deck picker: griglia 2 colonne su mobile ───────────────── */
@media (max-width: 760px) {
  .deck-grid:not(.deck-grid-live) {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Regole: padding bottom per home indicator ──────────────── */
@media (max-width: 760px) {
  .rules-modal {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* ── Visibilità seat callout su schermi molto stretti ───────── */
@media (max-width: 360px) {
  .seat-bid-callout {
    min-width: 80px;
    padding: 5px 7px;
  }

  .seat-bid-callout-value {
    font-size: 0.82rem;
  }

  .round-table-scene {
    min-height: 320px;
  }

  .seat-node {
    width: 84px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PROPORZIONI TAVOLO — fix mobile per legno/panno/carte
   ═══════════════════════════════════════════════════════════════ */

/*
  Problema: su mobile il legno era 100% scena e il panno 90%.
  L'occhio non vede né lo sfondo né l'anello di legno.
  Fix: riduco entrambi per rendere visibili i tre strati.
*/

@media (max-width: 760px) {
  /* Mostra il bordo scuro della scena (sfondo) attorno al legno */
  .round-table-wood {
    width: min(88%, 400px);
  }

  /* Mostra un anello di legno visibile tra legno e panno */
  .round-table-felt {
    width: min(72%, 300px);
  }

  /* Riduce leggermente l'area centrale delle carte sul tavolo */
  .center-trick {
    width: min(46%, 180px);
    height: min(26%, 108px);
  }

  /* ── Carte nella mano del giocatore ─────────────────────── */
  /* 114px era troppo grande: si riducono a 90px su mobile     */
  .player-main .game-card {
    width: 90px;
    border-radius: 20px;
  }

  /* Overlap più compatto per mostrare più carte contemporaneamente */
  .player-main .hand-card {
    margin-left: -56px;
  }

  /* Altezza minima mano proporzionata alle carte da 90px */
  .player-main .hand-fan {
    min-height: 158px;
  }

  /* Carte sul tavolo (centro, al turno) */
  .center-card .game-card.table {
    width: 62px;
  }
}

/* ── Versione "crowded/dense" (7-8 giocatori) su mobile ────── */
@media (max-width: 760px) {
  .round-table-scene.crowded .round-table-wood {
    width: min(72%, 330px);
  }

  .round-table-scene.crowded .round-table-felt {
    width: min(55%, 235px);
  }

  .round-table-scene.dense .round-table-wood {
    width: min(66%, 300px);
  }

  .round-table-scene.dense .round-table-felt {
    width: min(48%, 205px);
  }
}

/* ── Schermi ≤ 480px: ulteriore riduzione ───────────────────── */
@media (max-width: 480px) {
  .round-table-wood {
    width: min(86%, 360px);
  }

  .round-table-felt {
    width: min(68%, 270px);
  }

  .player-main .game-card {
    width: 84px;
  }

  .player-main .hand-card {
    margin-left: -54px;
  }

  .player-main .hand-fan {
    min-height: 148px;
  }

  /* Pedine giocatori più compatte per non coprire il panno */
  .seat-node {
    width: 108px;
    padding: 7px;
  }
}

/* ── Schermi ≤ 390px: scala minima per leggibilità ─────────── */
@media (max-width: 390px) {
  .round-table-wood {
    width: min(84%, 320px);
  }

  .round-table-felt {
    width: min(64%, 240px);
  }

  .player-main .game-card {
    width: 78px;
    border-radius: 16px;
  }

  .player-main .hand-card {
    margin-left: -50px;
  }

  .player-main .hand-fan {
    min-height: 136px;
  }

  .seat-node {
    width: 96px;
    padding: 5px 6px;
  }

  .center-trick {
    width: min(44%, 150px);
    height: min(22%, 80px);
  }

  .center-card .game-card.table {
    width: 54px;
  }
}

/* ── Carte in bidding/table-hand fan (vista spettatore) ─────── */
@media (max-width: 760px) {
  .bidding-hand-fan .game-card,
  .table-hand-fan .game-card {
    width: clamp(62px, 15vw, 80px);
    min-width: 62px;
    max-width: 80px;
  }
}

/* Player view layout refresh */
.topbar-leave-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 120, 110, 0.34);
  background: rgba(52, 18, 18, 0.82);
  color: rgba(255, 186, 176, 0.94);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.center-card .asso-pill,
.trick-sweep-card .asso-pill {
  bottom: 58px;
  padding: 6px 10px;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  background: rgba(8, 18, 10, 0.86);
  color: #ffe8a8;
}

.topbar-leave-btn:hover {
  background: rgba(78, 26, 26, 0.9);
  color: #ffd5cf;
}

.topbar-leave-btn:disabled {
  opacity: 0.55;
}

body[data-view="player"] .player-table-focus .round-table-player .seat-slot {
  z-index: 9;
}

body[data-view="player"] .player-table-focus .center-trick {
  z-index: 5;
}

.player-table-focus .round-table-stage.with-rail {
  position: relative;
  padding-bottom: 0;
}

.player-table-focus .round-table-stage.with-rail .player-hand-rail,
.player-table-focus .round-table-stage.count-7.with-rail .player-hand-rail,
.player-table-focus .round-table-stage.count-8.with-rail .player-hand-rail {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: none;
  width: auto;
  z-index: 12;
  padding: 0;
  gap: 14px;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: end;
  background: transparent;
  box-shadow: none;
}

.player-table-focus .round-table-stage.with-rail .player-identity-card,
.player-table-focus .round-table-stage.count-7.with-rail .player-identity-card,
.player-table-focus .round-table-stage.count-8.with-rail .player-identity-card {
  width: 118px;
  max-width: 118px;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 18px;
}

.player-table-focus .round-table-stage.with-rail .player-hand-stage {
  padding: 0 0 4px;
  overflow-x: auto;
  overflow-y: visible;
}

.player-table-focus .round-table-stage.with-rail .table-hand-wrap {
  padding: 0;
}

.player-table-focus .round-table-stage.with-rail .table-hand-fan,
.player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan,
.player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan {
  min-height: 108px;
  justify-content: center;
  padding: 0 8px 2px;
}

.player-table-focus .round-table-stage.with-rail .table-hand-wrap .game-card,
.player-table-focus .round-table-stage.count-7.with-rail .table-hand-wrap .game-card,
.player-table-focus .round-table-stage.count-8.with-rail .table-hand-wrap .game-card {
  width: 92px;
}

.player-table-focus .round-table-stage.with-rail .table-hand-fan .hand-card,
.player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan .hand-card,
.player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan .hand-card {
  margin-left: -22px;
}

.player-table-focus .round-table-stage.with-rail .player-rail-actions {
  align-self: center;
  justify-content: flex-end;
}

.player-table-focus .round-table-stage.with-rail .player-rail-button {
  min-width: 180px;
  min-height: 48px;
  font-size: 1.02rem;
}

body[data-view="player"] .bid-glass-panel.player-bid-panel {
  top: auto;
  bottom: 136px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  min-width: min(68vw, 320px);
  max-width: 360px;
}

@media (max-width: 760px) and (orientation: portrait) {
  body[data-view="player"] .app-shell {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  body[data-view="player"] .topbar-user {
    display: none;
  }

  body[data-view="player"] .topbar-right {
    gap: 8px;
  }

  body[data-view="player"] .topbar-chip {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  body[data-view="player"] .topbar-avatar {
    width: 40px;
  }

  body[data-view="player"] .topbar-avatar span {
    font-size: 0.82rem;
  }

  .topbar-leave-btn {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  body[data-view="player"] .round-table-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-view="player"] .round-table-shell {
    gap: 10px;
  }

  body[data-view="player"] .player-table-focus,
  body[data-view="player"] .round-table-panel,
  body[data-view="player"] .round-table-stage.with-rail,
  body[data-view="player"] .round-table-stage.count-7.with-rail,
  body[data-view="player"] .round-table-stage.count-8.with-rail {
    min-height: auto !important;
  }

  body[data-view="player"] .round-table-stage.with-rail,
  body[data-view="player"] .round-table-stage.count-7.with-rail,
  body[data-view="player"] .round-table-stage.count-8.with-rail {
    padding-bottom: 0 !important;
    align-content: start;
  }

  body[data-view="player"] .round-table-scene,
  body[data-view="player"] .round-table-scene.crowded,
  body[data-view="player"] .round-table-scene.dense {
    min-height: calc(100svh - 232px);
    border-radius: 34px;
  }

  body[data-view="player"] .round-table-scene.regular {
    min-height: clamp(260px, 40svh, 360px);
  }

  body[data-view="player"] .round-table-wood,
  body[data-view="player"] .round-table-scene.crowded .round-table-wood,
  body[data-view="player"] .round-table-scene.dense .round-table-wood {
    width: min(96vw, 430px);
    aspect-ratio: 0.78;
    top: 47%;
    border-radius: 47% / 34%;
  }

  body[data-view="player"] .round-table-felt,
  body[data-view="player"] .round-table-scene.crowded .round-table-felt,
  body[data-view="player"] .round-table-scene.dense .round-table-felt {
    width: min(82vw, 350px);
    aspect-ratio: 0.68;
    top: 47%;
    border-radius: 45% / 32%;
  }

  body[data-view="player"] .center-trick,
  body[data-view="player"] .round-table-scene.crowded .center-trick,
  body[data-view="player"] .round-table-scene.dense .center-trick {
    top: 47%;
    width: min(48vw, 180px);
    height: min(32vh, 196px);
  }

  body[data-view="player"] .seat-node,
  body[data-view="player"] .seat-slot.compact .seat-node,
  body[data-view="player"] .seat-slot.ultra .seat-node {
    width: min(96px, calc(100vw - 24px));
    padding: 6px 6px 7px;
  }

  body[data-view="player"] .seat-avatar-wrap {
    width: 40px;
  }

  body[data-view="player"] .seat-avatar {
    width: 34px;
  }

  body[data-view="player"] .seat-avatar span {
    font-size: 0.66rem;
  }

  body[data-view="player"] .seat-heart {
    font-size: 0.38rem;
  }

  body[data-view="player"] .seat-turn-tag {
    padding: 2px 5px;
    font-size: 0.3rem;
    letter-spacing: 0.12em;
  }

  body[data-view="player"] .seat-meta-pill {
    min-width: 76px;
    padding: 4px 5px;
    border-radius: 11px;
  }

  body[data-view="player"] .seat-meta-line,
  body[data-view="player"] .seat-meta-self {
    font-size: 0.28rem;
    letter-spacing: 0.05em;
  }

  body[data-view="player"] .seat-meta-name {
    font-size: 0.58rem;
  }

  body[data-view="player"] .score-pill {
    margin-top: 3px;
    gap: 3px;
    padding: 4px 5px;
  }

  body[data-view="player"] .score-pill-label {
    font-size: 0.28rem;
  }

  body[data-view="player"] .score-pill-value {
    font-size: 0.62rem;
  }

  body[data-view="player"] .seat-bid-callout {
    min-width: 72px;
    top: -8px;
    padding: 4px 6px;
    border-radius: 10px;
  }

  body[data-view="player"] .seat-bid-callout-label {
    font-size: 0.28rem;
  }

  body[data-view="player"] .seat-bid-callout-value {
    font-size: 0.58rem;
  }

  body[data-view="player"] .player-hand-rail,
  body[data-view="player"] .round-table-stage.count-7.with-rail .player-hand-rail,
  body[data-view="player"] .round-table-stage.count-8.with-rail .player-hand-rail {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 0 10px;
    gap: 8px;
    grid-template-columns: 1fr;
    margin-top: 6px;
  }

  body[data-view="player"] .player-identity-card,
  body[data-view="player"] .round-table-stage.count-7.with-rail .player-identity-card,
  body[data-view="player"] .round-table-stage.count-8.with-rail .player-identity-card {
    width: 100%;
    max-width: none;
    padding: 8px 14px;
    border-radius: 14px;
  }

  body[data-view="player"] .player-life-value {
    font-size: 1.3rem;
  }

  body[data-view="player"] .player-life-hearts .seat-heart {
    font-size: 0.72rem;
  }

  body[data-view="player"] .player-hand-stage {
    padding: 0 0 2px;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-fan,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-fan,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-fan {
    min-height: 92px;
    justify-content: flex-start;
    padding: 0 0 2px;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-wrap .game-card {
    width: 70px;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-fan .hand-card,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-fan .hand-card,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-fan .hand-card {
    margin-left: -16px;
  }

  body[data-view="player"] .player-rail-actions {
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 6px;
  }

  body[data-view="player"] .player-rail-button {
    width: 100%;
    max-width: 220px;
    min-height: 44px;
    font-size: 0.94rem;
  }

  body[data-view="player"] .bid-glass-panel.player-bid-panel {
    left: 12px;
    right: 12px;
    bottom: calc(118px + env(safe-area-inset-bottom));
    top: auto;
    transform: none;
    min-width: 0;
    max-width: none;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
  }

  body[data-view="player"] .bid-glass-title {
    font-size: 1rem;
  }

  body[data-view="player"] .bid-glass-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body[data-view="player"] .bid-glass-chip {
    min-height: 42px;
    font-size: 0.92rem;
  }

  body[data-view="player"] .bid-glass-footer {
    font-size: 0.72rem;
    text-align: center;
  }

  body[data-view="player"] .table-status-pod {
    top: 7%;
    min-width: min(72vw, 220px);
    padding: 8px 10px;
    gap: 4px;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  body[data-view="player"] .round-table-stage.with-rail,
  body[data-view="player"] .round-table-stage.count-7.with-rail,
  body[data-view="player"] .round-table-stage.count-8.with-rail {
    padding-bottom: 0 !important;
  }

  body[data-view="player"] .round-table-scene,
  body[data-view="player"] .round-table-scene.crowded,
  body[data-view="player"] .round-table-scene.dense {
    min-height: clamp(390px, 58svh, 540px);
  }

  body[data-view="player"] .round-table-scene.regular {
    min-height: clamp(260px, 40svh, 360px);
  }

  body[data-view="player"] .round-table-wood,
  body[data-view="player"] .round-table-scene.crowded .round-table-wood,
  body[data-view="player"] .round-table-scene.dense .round-table-wood {
    width: min(98vw, 446px);
  }

  body[data-view="player"] .round-table-felt,
  body[data-view="player"] .round-table-scene.crowded .round-table-felt,
  body[data-view="player"] .round-table-scene.dense .round-table-felt {
    width: min(84vw, 368px);
  }

  body[data-view="player"] .seat-node,
  body[data-view="player"] .seat-slot.compact .seat-node,
  body[data-view="player"] .seat-slot.ultra .seat-node {
    width: 108px;
    padding: 7px 7px 8px;
  }

  body[data-view="player"] .seat-avatar-wrap {
    width: 44px;
  }

  body[data-view="player"] .seat-avatar {
    width: 38px;
  }

  body[data-view="player"] .seat-avatar span {
    font-size: 0.72rem;
  }

  body[data-view="player"] .seat-meta-line,
  body[data-view="player"] .seat-meta-self {
    font-size: 0.31rem;
  }

  body[data-view="player"] .seat-meta-name {
    font-size: 0.64rem;
  }

  body[data-view="player"] .score-pill-label {
    font-size: 0.3rem;
  }

  body[data-view="player"] .score-pill-value {
    font-size: 0.68rem;
  }

  body[data-view="player"] .player-hand-rail,
  body[data-view="player"] .round-table-stage.count-7.with-rail .player-hand-rail,
  body[data-view="player"] .round-table-stage.count-8.with-rail .player-hand-rail {
    position: static !important;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    margin-top: 8px;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 10px;
  }

  /* info bar full-width orizzontale sopra le carte — vale per tutti i player count */
  body[data-view="player"] .player-identity-card {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 14px;
    min-height: 0;
  }

  body[data-view="player"] .player-life-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  body[data-view="player"] .player-life-label {
    display: none; /* "Vite" label ridondante nella barra orizzontale */
  }

  body[data-view="player"] .player-life-value {
    font-size: 1.2rem;
  }

  body[data-view="player"] .player-life-hearts {
    gap: 2px;
  }

  body[data-view="player"] .player-life-hearts .seat-heart {
    font-size: 0.7rem;
  }

  body[data-view="player"] .player-identity-meta {
    flex: 1;
    max-width: none;
    min-width: 0;
  }

  body[data-view="player"] .player-hand-stage {
    width: 100%;
    padding: 0;
    overflow-x: auto;
    overflow-y: visible;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-wrap,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-wrap,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-wrap {
    width: 100%;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-fan,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-fan,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-fan {
    width: max-content;
    min-width: 100%;
    min-height: 100px;
    gap: 8px;
    padding: 0 2px 2px;
    justify-content: flex-start;
    overflow: visible;
    scroll-snap-type: x proximity;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-fan .hand-card,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-fan .hand-card,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-fan .hand-card {
    margin-left: 0;
    flex: 0 0 auto;
    scroll-snap-align: center;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-wrap .game-card {
    width: 72px;
  }

  body[data-view="player"] .player-rail-tap-hint {
    margin-bottom: 6px;
    font-size: 0.58rem;
  }

  body[data-view="player"] .mobile-bid-inline {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(43, 38, 31, 0.92);
    border: 1px solid rgba(255, 228, 170, 0.16);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  }

  body[data-view="player"] .mobile-bid-inline-title {
    color: #ede0dc;
    text-align: center;
    font-family: var(--font-title);
    font-size: 0.96rem;
    font-weight: 700;
  }

  body[data-view="player"] .mobile-bid-inline-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body[data-view="player"] .mobile-bid-chip {
    min-height: 40px;
    font-size: 0.9rem;
  }

  body[data-view="player"] .mobile-bid-inline-actions {
    display: flex;
    justify-content: center;
  }

  body[data-view="player"] .mobile-bid-confirm {
    width: 100%;
    max-width: 220px;
    min-height: 42px;
  }

  body[data-view="player"] .bid-glass-panel.player-bid-panel {
    display: none;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .player-hand-rail,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .player-hand-rail,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .player-hand-rail {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    margin-top: 8px;
    z-index: auto;
  }

  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .player-identity-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .player-identity-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .player-identity-card {
    width: 100%;
    max-width: none;
  }

  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .table-hand-fan,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan {
    width: max-content;
    min-width: 100%;
    gap: 8px;
    justify-content: flex-start;
  }

  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .table-hand-fan .hand-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan .hand-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan .hand-card {
    margin-left: 0;
    flex: 0 0 auto;
  }

  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .table-hand-wrap .game-card {
    width: 72px;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  body[data-view="player"] .app-shell {
    padding-bottom: calc(126px + env(safe-area-inset-bottom)) !important;
  }

  body[data-view="player"] .round-table-scene,
  body[data-view="player"] .round-table-scene.crowded,
  body[data-view="player"] .round-table-scene.dense {
    min-height: clamp(404px, 57svh, 548px);
  }

  body[data-view="player"] .round-table-scene.regular {
    min-height: clamp(260px, 40svh, 360px);
  }

  body[data-view="player"] .round-table-wood,
  body[data-view="player"] .round-table-scene.crowded .round-table-wood,
  body[data-view="player"] .round-table-scene.dense .round-table-wood,
  body[data-view="player"] .round-table-felt,
  body[data-view="player"] .round-table-scene.crowded .round-table-felt,
  body[data-view="player"] .round-table-scene.dense .round-table-felt {
    top: 51%;
  }

  body[data-view="player"] .seat-node,
  body[data-view="player"] .seat-slot.compact .seat-node,
  body[data-view="player"] .seat-slot.ultra .seat-node {
    width: 116px;
  }

  body[data-view="player"] .seat-avatar-wrap {
    width: 54px;
  }

  body[data-view="player"] .seat-avatar {
    width: 48px;
  }

  body[data-view="player"] .seat-avatar span {
    font-size: 0.86rem;
  }

  body[data-view="player"] .player-hand-rail,
  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .player-hand-rail,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .player-hand-rail,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .player-hand-rail {
    margin-top: 12px;
    padding: 0 12px 8px;
  }

  body[data-view="player"] .player-hand-stage {
    padding-bottom: 18px;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-wrap,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-wrap,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-wrap,
  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .table-hand-wrap,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .table-hand-wrap,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .table-hand-wrap {
    width: 100%;
    padding-right: 22px;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-fan,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-fan,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-fan,
  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .table-hand-fan,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .table-hand-fan,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .table-hand-fan {
    gap: 6px;
    padding: 0 18px 8px 2px;
    scroll-padding-inline: 18px;
  }

  body[data-view="player"] .round-table-stage.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .round-table-stage.count-7.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .round-table-stage.count-8.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .player-table-focus .round-table-stage.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-7.with-rail .table-hand-wrap .game-card,
  body[data-view="player"] .player-table-focus .round-table-stage.count-8.with-rail .table-hand-wrap .game-card {
    width: 60px;
  }

  body[data-view="player"] .center-bid-announcement {
    min-width: min(74vw, 244px);
    padding: 9px 12px;
  }

  body[data-view="player"] .center-bid-announcement-value {
    font-size: 0.9rem;
  }

  body[data-view="player"] .center-card .asso-pill,
  body[data-view="player"] .trick-sweep-card .asso-pill {
    bottom: 52px;
    font-size: 0.54rem;
  }

  body[data-view="player"] .center-card-mode {
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }
}

/* ═══════════════════════════════════════════════════════════════
   FEATURE PACK — animazioni, effetti, pattern sfondo
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Animazione ingresso hub-hero-inner ──────────────────── */
@keyframes hero-inner-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hub-hero-inner {
  animation: hero-inner-in 0.38s cubic-bezier(0.34, 1.1, 0.64, 1) both;
}

/* ── 2. Pattern semi sfondo hub ─────────────────────────────── */
body[data-view="hub"] .app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ctext x='8' y='36' font-size='22' fill='rgba(255%2C255%2C255%2C0.032)' font-family='serif'%3E%E2%99%A0%3C/text%3E%3Ctext x='44' y='72' font-size='22' fill='rgba(255%2C255%2C255%2C0.028)' font-family='serif'%3E%E2%99%A5%3C/text%3E%3Ctext x='50' y='30' font-size='16' fill='rgba(255%2C255%2C255%2C0.024)' font-family='serif'%3E%E2%99%A3%3C/text%3E%3Ctext x='6' y='70' font-size='16' fill='rgba(255%2C255%2C255%2C0.026)' font-family='serif'%3E%E2%99%A6%3C/text%3E%3C/svg%3E");
  background-size: 80px 80px;
}
body[data-view="hub"] .app-shell { position: relative; z-index: 1; }

/* ── 3. Zanzo splash countdown ──────────────────────────────── */
@keyframes zanzo-bg-in {
  from { opacity: 0; } 40% { opacity: 1; } 75% { opacity: 1; } to { opacity: 0; }
}
@keyframes zanzo-text-in {
  0%   { transform: scale(0.4) rotate(-4deg); opacity: 0; }
  35%  { transform: scale(1.08) rotate(1deg);  opacity: 1; }
  65%  { transform: scale(1)    rotate(0deg);  opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.zanzo-splash {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
  animation: zanzo-bg-in 1.6s ease both;
}
.zanzo-splash-text {
  font-family: var(--font-title);
  font-size: clamp(3.5rem, 18vw, 7.5rem);
  font-weight: 900;
  color: #e9c349;
  letter-spacing: -0.04em;
  text-shadow:
    0 0 40px rgba(233, 195, 73, 0.7),
    0 4px 32px rgba(0, 0, 0, 0.6);
  animation: zanzo-text-in 1.6s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

/* ── 4. Stat bump animation ─────────────────────────────────── */
@keyframes stat-bump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.45); color: #f59e0b; }
  100% { transform: scale(1); }
}
.stat-bump {
  animation: stat-bump 0.38s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

/* ── 5. Gameover quick rematch ──────────────────────────────── */
.gameover-result-emoji {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 4px;
  animation: hero-inner-in 0.4s ease both;
}
.gameover-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gameover-rematch-btn {
  flex: 1;
  min-width: 140px;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #1a0e00 !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em;
}
.gameover-menu-btn {
  min-width: 80px;
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  color: rgba(255,240,216,0.8) !important;
  font-size: 0.88rem !important;
}

/* ── 6. Rules accordion (details/summary) ───────────────────── */
.rules-details {
  border-bottom: 1px solid rgba(255, 194, 75, 0.10);
}
.rules-details:last-child { border-bottom: none; }

.rules-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 240, 216, 0.92);
  list-style: none;
  user-select: none;
  transition: color 0.18s;
}
.rules-summary::-webkit-details-marker { display: none; }
.rules-summary:hover { color: #e9c349; }

.rules-summary-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.rules-summary-chevron {
  margin-left: auto;
  font-size: 1.2rem;
  color: rgba(255, 194, 75, 0.5);
  transition: transform 0.22s ease;
}
details[open] .rules-summary-chevron {
  transform: rotate(90deg);
}

.rules-details-body {
  padding: 0 4px 16px 32px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 240, 216, 0.76);
  animation: hero-inner-in 0.22s ease both;
}
.rules-details-body p { margin: 0 0 8px; }
.rules-details-body p:last-child { margin-bottom: 0; }

.rules-rank-hint {
  margin-top: 8px;
  font-size: 0.78rem;
  color: rgba(255,240,216,0.45);
}

/* ── SF: Social Friends redesign ───────────────────────────── */

/* Shell & layout */
.sf-shell {
  gap: 14px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Page header */
.sf-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.sf-title {
  flex: 1;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 900;
  color: #b36fff;
  margin: 0;
}

/* Generic glass card */
.sf-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(40,16,64,0.82), rgba(14,4,24,0.92));
  border: 1px solid rgba(160, 90, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Urgent card (invites) */
.sf-urgent-card {
  border-color: rgba(160, 90, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(160,90,255,0.18), 0 18px 46px rgba(0,0,0,0.32);
  background: linear-gradient(160deg, rgba(60,18,90,0.86), rgba(18,4,30,0.94));
}

/* Section title inside a card */
.sf-section-title {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(179, 111, 255, 0.88);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sf-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Badge pill */
.sf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(160,90,255,0.22);
  color: #c48fff;
  border: 1px solid rgba(160,90,255,0.28);
}

.sf-badge-urgent {
  background: rgba(160,90,255,0.36);
  color: #d4aaff;
  border-color: rgba(160,90,255,0.54);
}

/* Pulsing dot */
.sf-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c48fff;
  box-shadow: 0 0 0 0 rgba(179,111,255,0.5);
  animation: sf-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes sf-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179,111,255,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(179,111,255,0); }
}

/* Online green dot */
.sf-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52,211,153,0.6);
  flex-shrink: 0;
}

/* Search card layout */
.sf-search-inner {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.sf-search-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-search-label {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(179,111,255,0.72);
}

.sf-search-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(160,90,255,0.28);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 0.92rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.sf-search-input:focus {
  border-color: rgba(160,90,255,0.56);
  box-shadow: 0 0 0 3px rgba(160,90,255,0.12);
}

.sf-search-input::placeholder {
  color: rgba(255,255,255,0.24);
}

/* Avatar circle */
.sf-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(120,50,200,0.5), rgba(60,10,100,0.8));
  border: 1px solid rgba(160,90,255,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  color: #d4aaff;
  flex-shrink: 0;
  font-family: var(--font-label);
}

.sf-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 1.1rem;
}

/* Friend chip (selection grid) */
.sf-friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.sf-friend-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 18px;
  border: 1px solid rgba(160,90,255,0.14);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s, background 0.16s;
  text-align: center;
}

.sf-friend-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(160,90,255,0.38);
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

.sf-friend-chip.selected {
  border-color: rgba(160,90,255,0.62);
  box-shadow: 0 0 0 1px rgba(160,90,255,0.24), 0 12px 28px rgba(80,20,130,0.28);
  background: linear-gradient(160deg, rgba(100,40,180,0.22), rgba(50,10,80,0.2));
}

.sf-friend-chip.selected .sf-avatar {
  background: linear-gradient(135deg, rgba(150,80,240,0.7), rgba(90,20,160,0.9));
  border-color: rgba(179,111,255,0.54);
  box-shadow: 0 0 12px rgba(160,90,255,0.3);
}

.sf-chip-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
  line-height: 1.2;
}

.sf-chip-status {
  font-size: 0.68rem;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.04em;
}

.sf-chip-status.selected-label {
  color: #c48fff;
}

/* Action card (invite / friend request) */
.sf-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(160,90,255,0.12);
}

.sf-action-info {
  flex: 1;
  min-width: 0;
}

.sf-action-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-action-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.42);
  margin-top: 2px;
}

.sf-action-buttons {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

/* Compact outgoing request chip */
.sf-outgoing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(160,90,255,0.10);
}

.sf-outgoing-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255,255,255,0.78);
}

.sf-outgoing-status {
  font-size: 0.68rem;
  color: rgba(179,111,255,0.64);
}

/* Lobby card */
.sf-lobby-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(160,90,255,0.12);
  flex-direction: column;
}

.sf-lobby-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sf-lobby-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.sf-lobby-members {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.5;
  width: 100%;
}

/* Waiting hero */
.sf-waiting-card {
  align-items: center;
  text-align: center;
  padding: 28px 18px;
}

.sf-waiting-icon {
  font-size: 2.8rem;
  line-height: 1;
  animation: sf-waiting-bob 2.4s ease-in-out infinite;
}

@keyframes sf-waiting-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.sf-waiting-title {
  margin: 12px 0 6px;
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
}

.sf-waiting-sub {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.sf-waiting-stats {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 8px;
}

.sf-waiting-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.sf-stat-num {
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 900;
  color: #b36fff;
  line-height: 1;
}

.sf-stat-label-sm {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.38);
}

/* Members grid in waiting lobby */
.sf-members-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(160,90,255,0.10);
}

.sf-member-info {
  flex: 1;
  min-width: 0;
}

.sf-member-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.sf-member-role {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.38);
  margin-top: 1px;
}

.sf-member-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.08);
}

.sf-member-status.ready {
  background: rgba(52,211,153,0.14);
  color: #34d399;
  border-color: rgba(52,211,153,0.28);
}

.sf-waiting-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.sf-waiting-actions .button,
.sf-waiting-actions .ghost-button {
  flex: 1;
}

/* Empty state */
.sf-empty {
  text-align: center;
  padding: 16px 0 4px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.28);
}

/* Not-logged-in state */
.sf-login-prompt {
  text-align: center;
  padding: 32px 18px;
  color: rgba(255,255,255,0.4);
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  .sf-friend-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .sf-card {
    padding: 14px;
    gap: 12px;
  }
  .sf-waiting-title {
    font-size: 1.3rem;
  }
}

/* ── 7. Carousel entrance stagger ──────────────────────────── */
@keyframes card-slide-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 28px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
/* Center card animates on mode enter */
.bot-carousel-card.is-center {
  animation: card-slide-in 0.42s cubic-bezier(0.34, 1.15, 0.64, 1) both;
}
/* Override the combined transform from is-center for animation end state */
.bot-carousel-card.is-center {
  transform: translate(-50%, -50%) scale(1);
}

/* ── Invite Popup ─────────────────────────────────────────────── */
@keyframes invite-popup-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.invite-popup-wrap {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 8500;
  width: min(calc(100vw - 32px), 480px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 214, 138, 0.28);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.09), rgba(0,0,0,0.18)),
    rgba(10, 28, 16, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(80,200,120,0.1);
  animation: invite-popup-in 0.28s cubic-bezier(0.34, 1.15, 0.64, 1) both;
}

.invite-popup-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  font-family: var(--font-title);
}

.invite-popup-body {
  flex: 1;
  min-width: 0;
}

.invite-popup-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff0d1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-title);
}

.invite-popup-sub {
  font-size: 0.72rem;
  color: rgba(255, 229, 182, 0.62);
  margin-top: 2px;
  font-family: var(--font-label);
  letter-spacing: 0.04em;
}

.invite-popup-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.invite-popup-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
  border-radius: 12px;
}

.invite-popup-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.invite-popup-close:hover {
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.9);
}

@media (max-width: 480px) {
  .invite-popup-wrap {
    flex-wrap: wrap;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
  }

  .invite-popup-body {
    flex: 1 1 auto;
  }

  .invite-popup-close {
    order: -1;
    margin-left: auto;
  }

  .invite-popup-actions {
    width: 100%;
    padding-top: 4px;
  }

  .invite-popup-btn {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  body[data-view="player"] .round-table-panel.mobile-showcase-layout {
    padding: 0 0 8px;
  }

  body[data-view="player"] .round-table-panel.mobile-showcase-layout .round-table-shell {
    gap: 12px;
  }

  body[data-view="player"] .round-table-stage.mobile-showcase-layout.with-rail {
    min-height: auto;
    gap: 14px;
    align-content: start;
  }

  body[data-view="player"] .round-table-scene.mobile-showcase-layout {
    min-height: clamp(620px, 68svh, 760px);
    border-radius: 28px;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .round-table-wood,
  body[data-view="player"] .round-table-player.mobile-showcase-layout .round-table-felt {
    border-radius: 48% / 50%;
    top: 49%;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .round-table-wood {
    width: min(92vw, 520px);
    aspect-ratio: 0.72 / 1;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .round-table-felt {
    width: min(82vw, 452px);
    aspect-ratio: 0.72 / 1;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .round-table-felt::before {
    inset: 14px;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .round-table-felt::after {
    inset: 36px;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .center-trick {
    inset: 0;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    transform: none;
    z-index: 4;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .center-card-label {
    display: none;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .center-card .game-card.table {
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-slot.self {
    display: block;
    z-index: 7;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-slot {
    z-index: 6;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-node,
  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-slot.compact .seat-node,
  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-slot.ultra .seat-node {
    width: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    gap: 6px;
    justify-items: center;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-slot.turn-live .seat-node,
  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-slot.bid-live .seat-node {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-slot.turn-live .seat-node::after {
    display: none;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-avatar-wrap {
    width: 70px;
    filter: none;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-avatar-ring {
    inset: -4px;
    border-width: 3px;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-avatar {
    width: 64px;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.26),
      0 0 0 2px rgba(255, 228, 176, 0.12);
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-avatar-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-hearts {
    position: static;
    margin-top: 6px;
    justify-content: center;
    gap: 4px;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-heart {
    font-size: 1rem;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-meta-pill {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-meta-line,
  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-meta-name,
  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-meta-self {
    display: none;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .score-pill.mobile-seat-score {
    margin-top: 0;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-turn-tag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    font-size: 0.44rem;
    letter-spacing: 0.12em;
    z-index: 9;
    white-space: nowrap;
  }

  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-blind-preview,
  body[data-view="player"] .round-table-player.mobile-showcase-layout .seat-visible-card {
    margin-top: 6px;
  }

  body[data-view="player"] .player-hand-rail.mobile-showcase-rail {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 14px 10px;
    gap: 12px;
  }

  body[data-view="player"] .mobile-showcase-hand-stage {
    display: grid;
    gap: 12px;
    overflow: visible;
    padding: 0;
  }

  body[data-view="player"] .mobile-showcase-bid {
    gap: 12px;
    padding: 16px 16px 18px;
    border-radius: 28px;
    background: rgba(20, 16, 15, 0.96);
    border: 1px solid rgba(255, 230, 181, 0.12);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  }

  body[data-view="player"] .mobile-bid-inline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  body[data-view="player"] .mobile-showcase-bid .mobile-bid-inline-title {
    text-align: left;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body[data-view="player"] .mobile-bid-round {
    color: #b9e29f;
    font-family: var(--font-title);
    font-size: 0.94rem;
    font-weight: 800;
    white-space: nowrap;
  }

  body[data-view="player"] .mobile-showcase-bid .mobile-bid-inline-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-view="player"] .mobile-showcase-bid .mobile-bid-chip {
    min-height: 54px;
    border-radius: 999px;
    font-size: 1.08rem;
  }

  body[data-view="player"] .mobile-showcase-bid .mobile-bid-confirm {
    width: 100%;
    max-width: none;
    min-height: 50px;
    border-radius: 20px;
  }

  body[data-view="player"] .mobile-showcase-hand-wrap {
    padding: 0;
    background: transparent;
    overflow: visible;
  }

  body[data-view="player"] .mobile-showcase-hand-fan {
    width: 100%;
    min-width: 0;
    min-height: 190px;
    justify-content: center;
    gap: 0;
    padding: 18px 24px 8px;
    overflow: visible;
  }

  body[data-view="player"] .mobile-showcase-hand-fan .hand-card {
    margin-left: -26px;
    transform-origin: center bottom;
    transition: transform 160ms ease, filter 160ms ease;
  }

  body[data-view="player"] .mobile-showcase-hand-fan .hand-card:first-child {
    margin-left: 0;
  }

  body[data-view="player"] .mobile-showcase-hand-fan .game-card {
    width: min(24vw, 92px);
  }

  body[data-view="player"] .mobile-showcase-hand-fan .hand-card.showcase-center,
  body[data-view="player"] .mobile-showcase-hand-fan .hand-card.selected {
    transform: translateY(-22px) scale(1.1);
    z-index: 120 !important;
  }

  body[data-view="player"] .mobile-showcase-hand-fan .hand-card:not(.showcase-center):not(.selected) {
    filter: saturate(0.92);
  }

  body[data-view="player"] .mobile-showcase-hand-stage .player-rail-tap-hint {
    margin: 0;
    text-align: center;
  }

  body[data-view="player"] .mobile-showcase-hand-stage .player-rail-choice,
  body[data-view="player"] .mobile-showcase-rail .player-rail-actions {
    justify-content: center;
  }
}

/* ── Waiting lobby ─────────────────────────────────────────── */

.lobby-waiting-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 20px 32px;
}

.lobby-waiting-header {
  text-align: center;
}

.lobby-waiting-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.lobby-waiting-sub {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Progress bar */
.lobby-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lobby-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.lobby-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.4s ease;
}

.lobby-progress-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

/* Members list */
.lobby-members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lobby-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.3s;
}

.lobby-member-row.lobby-member-accepted {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.06);
}

.lobby-member-row.lobby-member-declined {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.06);
  opacity: 0.7;
}

.lobby-member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.lobby-member-info {
  flex: 1;
  min-width: 0;
}

.lobby-member-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-member-you {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

.lobby-member-role {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

.lobby-member-status-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lobby-member-status-text {
  font-size: 0.78rem;
  color: var(--muted);
}

.lobby-member-accepted .lobby-member-status-text {
  color: var(--accent-2);
}

.lobby-member-declined .lobby-member-status-text {
  color: var(--danger);
}

/* Pulsing dot for pending */
@keyframes lobby-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.7); }
}

.lobby-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: lobby-pulse 1.4s ease-in-out infinite;
}

/* Status icons */
.lobby-status-icon {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.lobby-status-ok {
  color: var(--accent-2);
}

.lobby-status-no {
  color: var(--danger);
}

/* Actions row */
.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.lobby-enter-btn {
  width: 100%;
}

.lobby-cancel-btn {
  width: 100%;
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.3);
  font-size: 0.82rem;
}

.lobby-cancel-btn:hover:not(:disabled) {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.55);
}

/* Empty state */
.lobby-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 20px;
  text-align: center;
}

.lobby-empty-icon {
  font-size: 2.5rem;
}

.lobby-empty-text {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.5;
}
