/* Hoppy's Hold'em Poker Table — HoppyOnSOL Telegram Mini App Full-Screen Design System
   Theme palette sourced from HoppyOnSOL (hoppyonsol.com): pond greens, hoppy green
   #3ddc84, hoppy gold #ffd700 on dark pond backgrounds. */

:root {
  /* Poker felt — HoppyOnSOL pond greens */
  --felt-center: #2d8f47;
  --felt-border: #0f2b18;
  /* HoppyOnSOL brand palette */
  --hoppy-green: #3ddc84;
  --hoppy-green-dark: #1a8a4a;
  --hoppy-green-light: #7ef0a8;
  --hoppy-gold: #ffd700;
  --hoppy-gold-dark: #cc9900;
  --hoppy-bg: #151a10;
  --hoppy-surface: #1c2315;
  --hoppy-surface-light: #242d1b;
  --hoppy-border: #2a3820;
  --hoppy-text: #e8f5e0;
  --hoppy-muted: #7a9b85;
  --hoppy-pond: #2d8f47;
  --hoppy-red: #ff5555;
  --hoppy-teal: #20b2aa;
  --hoppy-purple: #b07cd8;
  /* Derived component tokens */
  --gold-primary: var(--hoppy-gold);
  --gold-dark: var(--hoppy-gold-dark);
  --card-bg: #fefeff;
  --dark-bg: var(--hoppy-bg);
  --red-accent: var(--hoppy-red);
  --blue-accent: var(--hoppy-teal);
  --green-accent: var(--hoppy-green);
  --text-light: var(--hoppy-text);
  --sol-purple: #9945FF;
  --sol-green: #14F195;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 0. SPLASH LOADING SCREEN (splash1.png — shown ~5s on /play launch)          */
/* ═══════════════════════════════════════════════════════════════════════════ */

.splash-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: var(--hoppy-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
}

.splash-brand {
  font-size: 18px;
  font-weight: 900;
  color: var(--hoppy-gold);
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.splash-loading {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hoppy-green-light);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  animation: splashPulse 1.2s ease-in-out infinite;
}

@keyframes splashPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.splash-hidden {
  opacity: 0;
  visibility: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button, input, select { user-select: none; }

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  background-color: var(--dark-bg);
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
}

.poker-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  height: var(--tg-vh, 100dvh);
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at center, var(--felt-center) 0%, var(--felt-border) 100%);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
  position: relative;
  perspective: 1000px;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 1. LOBBY & LANDING SCREEN STYLES                                            */
/* ═══════════════════════════════════════════════════════════════════════════ */

.lobby-container {
  width: 100%;
  height: 100%;
  height: var(--tg-vh, 100dvh);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: radial-gradient(circle at center, #242d1b 0%, #1c2315 100%);
  overflow-y: auto;
}

.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.lobby-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
}

/* Profile Card */
.profile-card {
  background: rgba(36, 45, 27, 0.7);
  border: 1px solid var(--gold-dark);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.user-avatar {
  font-size: 24px;
  background: #1c2315;
  border: 1px solid var(--gold-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tg-user {
  font-size: 13px;
  font-weight: bold;
  color: #e8f5e0;
}

.tg-id {
  font-size: 10px;
  color: #7a9b85;
}

.wallet-status {
  text-align: right;
}

.sol-badge {
  font-size: 10px;
  font-weight: bold;
  color: var(--sol-green);
  background: rgba(20, 241, 149, 0.15);
  border: 1px solid var(--sol-green);
  padding: 3px 8px;
  border-radius: 10px;
}

/* Mode Selection Cards */
.section-title {
  font-size: 10px;
  font-weight: 800;
  color: #7a9b85;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.mode-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-card {
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
  background: rgba(28, 35, 21, 0.8);
  border: 1.5px solid #2a3820;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--sol-green);
  outline-offset: 2px;
}

.mode-card.selected {
  border-color: var(--gold-primary);
  background: rgba(255, 215, 0, 0.1);
}

.mode-icon {
  font-size: 20px;
}

.mode-info {
  flex: 1;
}

.mode-name {
  font-size: 12px;
  font-weight: bold;
  color: #e8f5e0;
}

.mode-sub {
  font-size: 10px;
  color: #7a9b85;
}

.radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #5a7561;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--gold-primary);
  font-weight: bold;
}

.mode-card.selected .radio-indicator {
  border-color: var(--gold-primary);
  background: rgba(255, 215, 0, 0.2);
}

/* Persona Dropdown */
.lobby-select {
  width: 100%;
  background: #1c2315;
  color: var(--gold-primary);
  border: 1px solid var(--gold-dark);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  outline: none;
}

/* Take Seat Button */
.launch-container {
  padding-top: 4px;
}

.btn-launch {
  width: 100%;
  padding: 12px 0;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #3ddc84 0%, #1a8a4a 100%);
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(61, 220, 132, 0.4);
  transition: transform 0.1s;
}

.btn-launch:active {
  transform: scale(0.97);
}

.btn-launch-gold {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
  color: #151a10;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

/* ─── Cash Game Setup Panel ─────────────────────────────────────────────────── */

#cash-game-panel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top, #1c2315 0%, #151a10 100%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  gap: 10px;
}

.cgp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.cgp-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
  margin: 0;
}

.cgp-notice {
  background: rgba(255, 85, 85, 0.15);
  border: 1px solid #ff5555;
  border-radius: 10px;
  color: #ffb3b3;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 12px;
  text-align: center;
}

.cgp-section {
  background: rgba(28, 35, 21, 0.8);
  border: 1px solid #242d1b;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fee-display-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cgp-fee-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--gold-primary);
  letter-spacing: -0.5px;
}

.cgp-pot-preview {
  font-size: 11px;
  color: var(--sol-green);
  font-weight: 600;
}

.fee-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--gold-primary) 0%, var(--gold-primary) 10%, #2a3820 10%, #2a3820 100%);
  outline: none;
  cursor: pointer;
}

.fee-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 2px 8px rgba(255,215,0,0.5);
  cursor: pointer;
}

.fee-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #5a7561;
  letter-spacing: 0.5px;
}

.cgp-size-pills {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.cgp-size-pill {
  background: #1c2315;
  border: 1.5px solid #2a3820;
  color: #7a9b85;
  border-radius: 12px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  line-height: 1.4;
}

.cgp-size-pill small {
  font-size: 9px;
  display: block;
  font-weight: 400;
  color: #5a7561;
}

.cgp-size-pill.active {
  background: rgba(153, 69, 255, 0.2);
  border-color: var(--sol-purple);
  color: #e6cdf5;
}

.cgp-size-pill.active small {
  color: #d2b2ea;
}

.cgp-info {
  background: rgba(20, 241, 149, 0.05);
  border: 1px solid rgba(20, 241, 149, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cgp-info-row {
  font-size: 10px;
  color: #7a9b85;
}

/* Active Tables Lobby Section */
.active-tables-section {
  background: rgba(28, 35, 21, 0.8);
  border: 1px solid #242d1b;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.icon-btn-small {
  background: #242d1b;
  border: 1px solid #2a3820;
  border-radius: 6px;
  color: white;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
}

.active-table-tabs {
  display: flex;
  gap: 6px;
}

.tab-btn {
  flex: 1;
  background: #1c2315;
  border: 1px solid #2a3820;
  color: #7a9b85;
  padding: 6px 0;
  font-size: 11px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--blue-accent);
  border-color: #5dd6d0;
  color: white;
}

.active-tables-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.empty-tables-notice {
  text-align: center;
  font-size: 11px;
  color: #5a7561;
  padding: 12px 0;
}

.active-table-card {
  background: rgba(36, 45, 27, 0.9);
  border: 1px solid #2a3820;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.atc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.atc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 54%;
}

.atc-title {
  font-size: 11px;
  font-weight: bold;
  color: #e8f5e0;
}

.atc-sub {
  font-size: 9px;
  color: #7a9b85;
}

.atc-join-btn {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
  color: #151a10;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
}

.atc-spectate-btn {
  background: #2a3820;
  color: #e8f5e0;
  border: 1px solid #4a614f;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
}

/* Spectator Banner Styling */
.spectator-banner {
  background: rgba(176, 124, 216, 0.25);
  border-bottom: 2px solid #b07cd8;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spectator-icon {
  font-size: 18px;
}

.spectator-text {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #f3e9fa;
}

.spectator-text small {
  font-size: 9px;
  color: #e6cdf5;
}

.cgp-info-row strong {
  color: var(--sol-green);
}

.cgp-info-row code {
  color: var(--gold-primary);
  background: rgba(255,215,0,0.1);
  padding: 0 4px;
  border-radius: 4px;
}

/* Rebuy Settings in Setup Panel */
.cgp-rebuy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cgp-rebuy-label {
  font-size: 12px;
  font-weight: 700;
  color: #e8f5e0;
}

.cgp-toggle-group {
  display: flex;
  background: #1c2315;
  border-radius: 8px;
  padding: 2px;
  border: 1px solid #2a3820;
}

.cgp-toggle-btn {
  background: transparent;
  border: none;
  color: #7a9b85;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.cgp-toggle-btn.active {
  background: var(--green-accent);
  color: white;
}

.cgp-sublabel {
  font-size: 10px;
  color: #7a9b85;
  margin-top: 4px;
}

.cgp-rebuy-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.cgp-rebuy-pill {
  background: #1c2315;
  border: 1.5px solid #2a3820;
  color: #7a9b85;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.cgp-rebuy-pill.active {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

/* Rebuy Modal Styling */
.rebuy-card {
  text-align: center;
  padding: 24px 20px;
  border: 2px solid var(--gold-dark);
  background: radial-gradient(circle at top, #242d1b 0%, #1c2315 100%);
}

.rebuy-icon {
  font-size: 44px;
  margin-bottom: 8px;
}

.rebuy-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
}

.rebuy-desc {
  font-size: 12px;
  color: #7a9b85;
  margin-top: 6px;
}

.rebuy-badge {
  display: inline-block;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  margin-top: 10px;
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* 2. POKER TABLE FELT VIEW                                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

.poker-table-view {
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Table Header */
.table-header {
  height: 44px;
  min-height: 44px;
  background: rgba(15, 43, 24, 0.95);
  border-bottom: 2px solid var(--gold-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-badge {
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.wallet-btn {
  background: rgba(153, 69, 255, 0.2);
  border: 1px solid var(--sol-purple);
  color: #dcbef0;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.wallet-btn:hover {
  background: rgba(153, 69, 255, 0.4);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gto-meter {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--gold-primary);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 10px;
}

.gto-title {
  color: #7a9b85;
  margin-right: 2px;
}

.gto-value {
  color: #7ef0a8;
  font-weight: bold;
}

.icon-btn {
  background: rgba(0,0,0,0.4);
  border: 1px solid #2a3820;
  color: white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
}
.icon-btn.danger-btn {
  border-color: #ff6b6b;
  color: #ffb4b4;
  background: rgba(120, 20, 20, 0.45);
}
.icon-btn.danger-btn:hover {
  background: #a12626;
  color: #fff;
  border-color: #ff8a8a;
}

/* Main Poker Felt */
.poker-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  position: relative;
  overflow: hidden;
}

/* Player Areas */
.opponents-area, .hero-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.live-opponents {
  width: 100%;
  min-height: 96px;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.live-opponent-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 46%;
}

.live-opponent-seat.away { opacity: 0.72; }
.live-opponent-seat.eliminated { opacity: 0.45; filter: grayscale(1); }
.live-opponent-seat .avatar-badge { padding: 3px 8px; max-width: 150px; }
.live-opponent-seat .player-name,
.live-opponent-seat .player-stack { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 116px; }
.live-opponent-seat .card { width: 64px; height: 90px; font-size: 16px; }
.live-opponent-seat .card-suit-center { font-size: 26px; }

/* Badges */
.avatar-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(28, 35, 21, 0.85);
  border: 1.5px solid var(--gold-primary);
  border-radius: 18px;
  padding: 3px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.avatar-icon {
  font-size: 16px;
}

.player-info {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-size: 11px;
  font-weight: 600;
  color: #d9e8d0;
}

.player-stack {
  font-size: 10px;
  color: var(--gold-primary);
  font-weight: bold;
}

/* Cards & 3D Animations */
.card-row {
  display: flex;
  gap: 8px;
}

.card {
  width: 96px;
  height: 136px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 2px solid #2a3820;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.55);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: dealCard 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes dealCard {
  0% {
    opacity: 0;
    transform: translateY(-140px) scale(0.3) rotate(-12deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

.card.flip {
  animation: flipCard 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flipCard {
  0% {
    transform: rotateY(180deg) scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: rotateY(90deg) scale(1.08);
  }
  100% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
}

.card-back {
  background-color: #1c2315;
  background-image: image-set(
    url('images/hoppyhead1b.webp') 1x,
    url('images/hoppyhead1b.png') 1x
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid var(--gold-primary);
}

.card-back::after {
  content: "";
}

.card.slot {
  background: rgba(15, 43, 24, 0.6);
  border: 2px dashed #2a3820;
  color: #5a7561;
  font-size: 34px;
  justify-content: center;
  align-items: center;
  animation: none;
}

.card-rank {
  font-size: 22px;
  font-weight: bold;
}

.card-suit-center {
  font-size: 34px;
  align-self: center;
}

/* The five-card board shares the table width: cards fill the row, up to full size. */
.board-cards .card {
  flex: 1 1 0;
  min-width: 76px;
  max-width: 96px;
}

.red { color: var(--red-accent); }
.black { color: #1c2315; }

/* Pot Area */
.board-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pot-container {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--gold-primary);
  border-radius: 14px;
  padding: 3px 14px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.pot-label {
  font-size: 10px;
  color: #7a9b85;
  letter-spacing: 1px;
}

.pot-value {
  font-size: 14px;
  color: var(--gold-primary);
  font-weight: bold;
}

/* Action Controls Footer */
.action-controls {
  background: rgba(28, 35, 21, 0.96);
  border-top: 2px solid var(--gold-dark);
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-status {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-primary);
  background: rgba(28, 35, 21, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  padding: 5px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slider-val {
  font-size: 11px;
  color: var(--gold-primary);
  font-weight: bold;
  text-align: right;
}

input[type=range] {
  width: 100%;
  height: 6px;
  accent-color: var(--gold-primary);
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
}

.btn {
  padding: 8px 0;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  font-size: 11px;
  color: white;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.96);
}

.btn-fold { background: #ff5555; }
.btn-call { background: #20b2aa; }
.btn-raise { background: #cc9900; }
.btn-allin { background: linear-gradient(135deg, #d43d3d 0%, #e07b39 100%); }


/* ═══════════════════════════════════════════════════════════════════════════ */
/* 3. REDESIGNED SOLANA WALLET HUB STYLES                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
  /* Keep overlays independent from the poker layout and Telegram viewport resize. */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  max-height: 100%;
  overflow-y: auto;
  background: radial-gradient(circle at top left, #33244a 0%, #1c2315 100%);
  border: 1.5px solid var(--sol-purple);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(153, 69, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: modalSlideUp 0.25s ease-out forwards;
}

@keyframes modalSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(153, 69, 255, 0.25);
  padding-bottom: 10px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sol-logo-icon {
  font-size: 16px;
  background: linear-gradient(135deg, var(--sol-purple) 0%, var(--sol-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: white;
}

.modal-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid #2a3820;
  color: #7a9b85;
  font-size: 14px;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Account Card View */
.wallet-account-card {
  background: rgba(28, 35, 21, 0.9);
  border: 1px solid rgba(20, 241, 149, 0.3);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.status-indicator {
  font-size: 11px;
  font-weight: bold;
  color: var(--sol-green);
}

.account-tg-badge {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  color: #dcbef0;
  background: rgba(153, 69, 255, 0.15);
  padding: 2px 6px;
  border-radius: 8px;
}

.pubkey-box {
  background: #1c2315;
  border: 1px solid #2a3820;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pubkey-text {
  font-family: monospace;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #e8f5e0;
  word-break: break-all;
}

.btn-icon-action {
  background: rgba(255,255,255,0.08);
  border: 1px solid #4a614f;
  color: #cfe3c2;
  flex-shrink: 0;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.balance-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}

.balance-label {
  font-size: 10px;
  color: #7a9b85;
  letter-spacing: 0.5px;
}

.balance-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--sol-green);
}

/* Action Buttons Grid */
.account-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Wallet Activity (Alchemy transfer history) */
.wallet-activity {
  background: rgba(28, 35, 21, 0.7);
  border: 1px solid #2a3820;
  border-radius: 12px;
  padding: 10px 12px;
}

.wallet-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 43, 24, 0.4);
}

.activity-dir {
  font-size: 13px;
  flex-shrink: 0;
}

.activity-main {
  flex: 1;
  min-width: 0;
}

.activity-peer {
  font-size: 9px;
  color: #7a9b85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-amount {
  font-weight: 800;
  flex-shrink: 0;
}

.activity-amount.in {
  color: var(--sol-green);
}

.activity-amount.out {
  color: var(--red-accent);
}

/* Live-table turn countdown */
.turn-timer {
  font-size: 11px;
  font-weight: 700;
  color: var(--hoppy-green);
  background: rgba(61, 220, 132, 0.12);
  border: 1px solid rgba(61, 220, 132, 0.4);
  padding: 3px 8px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.turn-timer.low {
  color: var(--hoppy-red);
  border-color: rgba(255, 85, 85, 0.6);
  background: rgba(255, 85, 85, 0.12);
  animation: splashPulse 1s ease-in-out infinite;
}

/* Leaderboard & $HOPPY prizes */
.leaderboard-card {
  max-height: 86dvh;
}

.leaderboard-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leaderboard-list,
.prizes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row,
.prize-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(28, 35, 21, 0.7);
  border: 1px solid #2a3820;
  font-size: 12px;
}

.lb-row.top {
  border-color: var(--gold-primary);
  background: rgba(255, 215, 0, 0.08);
}

.lb-rank {
  font-size: 16px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.lb-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-wins {
  font-size: 10px;
  color: var(--hoppy-muted);
  flex-shrink: 0;
}

.lb-hop {
  font-size: 11px;
  font-weight: 800;
  color: var(--hoppy-green);
  flex-shrink: 0;
}

.prize-row {
  border-left: 3px solid var(--gold-primary);
}

.prize-row.mine {
  border-left-color: var(--hoppy-green);
  background: rgba(61, 220, 132, 0.08);
}

.prize-info {
  flex: 1;
  min-width: 0;
}

.prize-rank {
  font-weight: 800;
  font-size: 12px;
}

.prize-winner {
  font-size: 10px;
  color: var(--hoppy-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prize-amount {
  font-weight: 900;
  font-size: 13px;
  color: var(--hoppy-green);
  flex-shrink: 0;
}

.prize-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  flex-shrink: 0;
}

.prize-status.due { background: rgba(255, 215, 0, 0.15); color: var(--gold-primary); }
.prize-status.submitted { background: rgba(153, 69, 255, 0.2); color: var(--sol-purple); }
.prize-status.confirmed { background: rgba(61, 220, 132, 0.15); color: var(--hoppy-green); }

.btn-pay-prize {
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--hoppy-green) 0%, var(--hoppy-green-dark) 100%);
  color: #0b0f19;
  flex-shrink: 0;
}

.btn-pay-prize:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Admin console */
.admin-card {
  max-height: 90dvh;
}

.admin-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-stat {
  background: rgba(28, 35, 21, 0.7);
  border: 1px solid #2a3820;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-stat-label {
  font-size: 9px;
  color: #7a9b85;
  letter-spacing: 0.5px;
}

.admin-stat-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--hoppy-green);
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 43, 24, 0.4);
}

.admin-user-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-wallet {
  font-size: 9px;
  color: #7a9b85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

.admin-user-wins {
  font-size: 10px;
  color: var(--gold-primary);
  font-weight: 800;
  flex-shrink: 0;
}

.admin-settings-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-settings-status {
  margin-top: 2px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid;
}
.admin-settings-status.ok {
  background: rgba(46, 125, 50, 0.18);
  border-color: #4caf50;
  color: #b8f5bb;
}
.admin-settings-status.err {
  background: rgba(198, 40, 40, 0.2);
  border-color: #e57373;
  color: #ffc9c9;
}

.settings-group {
  background: rgba(28, 35, 21, 0.7);
  border: 1px solid #2a3820;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-group-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-primary);
}

.admin-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-light);
}

.admin-field input[type="number"] {
  width: 110px;
  background: #1c2315;
  color: var(--text-light);
  border: 1px solid #2a3820;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  outline: none;
}

.admin-field input[type="text"] {
  width: 150px;
  background: #1c2315;
  color: var(--text-light);
  border: 1px solid #2a3820;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 10px;
  outline: none;
  font-family: monospace;
}

.admin-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--hoppy-green);
}

.admin-check {
  justify-content: space-between;
}

.btn-sol-primary {
  background: linear-gradient(135deg, var(--sol-purple) 0%, #8f54b8 100%);
  color: white;
  border: 1px solid #dcbef0;
  border-radius: 10px;
  padding: 10px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.btn-sol-secondary {
  background: rgba(36, 45, 27, 0.8);
  color: #cfe3c2;
  border: 1px solid #4a614f;
  border-radius: 10px;
  padding: 10px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.btn-sol-danger {
  background: rgba(255, 85, 85, 0.15);
  color: #ff8a8a;
  border: 1px solid #ff5555;
  border-radius: 10px;
  padding: 9px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

/* Unconnected Wallet Provider Stack */
.unconnected-view-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-provider-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.provider-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.provider-item[hidden] {
  display: none !important;
}

.provider-item-label {
  font-size: 9px;
  font-weight: 800;
  color: #7a9b85;
  letter-spacing: 0.8px;
  text-align: center;
}

.provider-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid #2a3820;
  background: rgba(28, 35, 21, 0.9);
  color: white;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}

.phantom-mobile-btn {
  background: linear-gradient(135deg, #3ddc84 0%, #1a8a4a 100%);
  border-color: var(--sol-green);
  color: white;
  box-shadow: 0 4px 12px rgba(61, 220, 132, 0.3);
}

.phantom-mobile-btn:active {
  transform: scale(0.97);
}

.desktop-wallet-btn {
  background: linear-gradient(135deg, #9c63c9 0%, #b07cd8 100%);
  border-color: #d2b2ea;
  color: white;
  box-shadow: 0 4px 12px rgba(176, 124, 216, 0.3);
}

.desktop-wallet-btn:active {
  transform: scale(0.97);
}

.phantom-btn {
  background: linear-gradient(135deg, #b07cd8 0%, #6d3f96 100%);
  border-color: #c9a2e8;
  color: white;
}

.phantom-btn:active {
  transform: scale(0.97);
}

.provider-icon {
  font-size: 16px;
}

.provider-note {
  color: #7a9b85;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  max-width: 34ch;
}

.modal-desc {
  font-size: 11px;
  color: #7a9b85;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 4px;
}

.address-input-group {
  width: 100%;
  display: flex;
  gap: 6px;
}

.address-input-group input {
  flex: 1;
  background: #1c2315;
  border: 1px solid #2a3820;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: white;
  outline: none;
}

.btn-submit-addr {
  background: var(--blue-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.payout-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payout-card {
  border: 1px solid rgba(20, 241, 149, 0.3);
  border-radius: 12px;
  background: rgba(28, 35, 21, 0.9);
  padding: 10px;
}

.payout-card-title {
  color: #e8f5e0;
  font-size: 11px;
  font-weight: 800;
}

.payout-card-detail {
  margin-top: 4px;
  color: #7a9b85;
  font-family: monospace;
  font-size: 10px;
}

.payout-card button {
  width: 100%;
  margin-top: 8px;
}

/* 2026 product polish: readable mobile controls and consistent interaction states */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

.brand-title {
  margin: 0;
  font-size: 18px;
}

.section-title {
  display: block;
  margin: 0 0 7px;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.wallet-btn {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

.profile-card { min-height: 64px; }
.tg-user { font-size: 15px; }
.tg-id { font-size: 12px; line-height: 1.35; }
.sol-badge { font-size: 11px; }
.sol-badge.disconnected { color: #cfe3c2; border-color: #5a7561; background: rgba(90, 117, 97, 0.14); }

.mode-card {
  min-height: 62px;
  padding: 11px 13px;
}
.mode-name { font-size: 14px; }
.mode-sub { margin-top: 2px; font-size: 12px; line-height: 1.3; }

.lobby-select {
  min-height: 42px;
  font-size: 13px;
}

.cpu-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.cpu-setting {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #cfe3c2;
  font-size: 12px;
}

.cpu-setting > span,
.cpu-setting > legend {
  display: block;
  margin-bottom: 5px;
  color: #7a9b85;
  font-size: 11px;
  font-weight: 700;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.segmented-control button,
.bet-presets button {
  min-height: 42px;
  border: 1px solid #4a614f;
  border-radius: 9px;
  background: #1c2315;
  color: #cfe3c2;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control button.active,
.segmented-control button[aria-pressed="true"] {
  border-color: var(--gold-primary);
  background: rgba(255, 215, 0, 0.14);
  color: var(--gold-primary);
}

.active-tables-section {
  padding: 0;
  overflow: hidden;
}

.active-tables-summary {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e8f5e0;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.active-tables-summary::-webkit-details-marker { display: none; }
.active-tables-summary::before { content: "▸"; margin-right: 8px; color: var(--gold-primary); }
.active-tables-section[open] .active-tables-summary::before { content: "▾"; }
.active-tables-summary > span:first-child { margin-right: auto; }
.live-count { color: var(--sol-green); font-size: 11px; }
.active-tables-section[open] .active-tables-header,
.active-tables-section[open] .active-table-tabs,
.active-tables-section[open] .active-tables-grid { margin-left: 10px; margin-right: 10px; }
.active-tables-section[open] .active-tables-grid { margin-bottom: 10px; }

.icon-btn-small,
.icon-btn {
  min-width: 36px;
  min-height: 36px;
  font-size: 14px;
}

.tab-btn { min-height: 40px; font-size: 12px; }
.btn-launch { min-height: 48px; font-size: 15px; text-transform: none; }

.active-table-card { align-items: flex-start; gap: 8px; padding: 11px; }
.atc-title { font-size: 13px; }
.atc-sub { margin-top: 3px; font-size: 12px; }
.atc-meta { margin-top: 4px; color: #5a7561; font-size: 10px; }
.atc-actions { flex-wrap: wrap; justify-content: flex-end; }
.atc-actions button { min-height: 36px; padding: 7px 9px; }

.cgp-title { font-size: 17px; }
.cgp-size-pill { min-height: 58px; font-size: 13px; }
.cgp-info-row { font-size: 12px; line-height: 1.45; }

.table-header { min-height: 48px; padding: 6px 9px; }
.header-badge { font-size: 13px; }
.header-left, .header-right { gap: 6px; }
.connection-state {
  padding: 4px 7px;
  border-radius: 999px;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.12);
  font-size: 10px;
  font-weight: 800;
}
.connection-state[data-state="live"] { color: var(--sol-green); background: rgba(20, 241, 149, 0.12); }
.connection-state[data-state="offline"] { color: #ffb3b3; background: rgba(255, 138, 138, 0.12); }
.insights-toggle {
  min-height: 36px;
  border: 1px solid #4a614f;
  border-radius: 999px;
  background: #1c2315;
  color: #cfe3c2;
  font-size: 11px;
  cursor: pointer;
}

.game-status { min-height: 38px; font-size: 13px; line-height: 1.35; }
.hand-history {
  min-height: 18px;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  overflow: hidden;
  list-style: none;
  color: #7a9b85;
  font-size: 10px;
  white-space: nowrap;
}
.hand-history li { overflow: hidden; text-overflow: ellipsis; }
.hand-history li::after { content: " ·"; }

.slider-container { gap: 5px; }
.slider-val { font-size: 12px; }
.bet-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.35fr;
  gap: 5px;
}
.bet-presets button { min-height: 36px; font-size: 11px; }
.bet-amount-label {
  min-height: 36px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #4a614f;
  border-radius: 9px;
  color: #7a9b85;
  font-size: 9px;
}
.bet-amount-label input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  outline: 0;
}
.button-group { gap: 6px; }
.btn { min-height: 44px; font-size: 12px; }

.modal-card { font-size: 14px; }
.modal-desc { font-size: 13px; }
.provider-btn, .btn-sol-primary, .btn-sol-secondary, .btn-sol-danger { min-height: 46px; font-size: 13px; }
.payout-summary { color: #d9e8d0; font-size: 13px; font-weight: 800; }
.payout-group-title { margin: 6px 0 0; color: var(--gold-primary); font-size: 12px; text-transform: uppercase; }
.payout-card-title { font-size: 13px; }
.payout-card-detail { font-size: 11px; line-height: 1.4; }

.toast-region {
  /* z-index above EVERYTHING (splash 99999, modals 9999) so toasts never
     hide behind an open modal or overlay. */
  position: fixed;
  z-index: 100000;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 28px));
  padding: 14px 18px;
  border: 2px solid #5dd6d0;
  border-radius: 14px;
  background: #16201a;
  color: #f2ffe8;
  box-shadow: 0 14px 44px rgba(0,0,0,.65), 0 0 0 4px rgba(93,214,208,.18);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  transform: translate(-50%, 16px) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast-region.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast-region[data-tone="success"] { border-color: #7fe08a; box-shadow: 0 14px 44px rgba(0,0,0,.65), 0 0 0 4px rgba(127,224,138,.18); }
.toast-region[data-tone="error"] { border-color: #ff8a8a; box-shadow: 0 14px 44px rgba(0,0,0,.65), 0 0 0 4px rgba(255,138,138,.2); }

@media (max-width: 420px) {
  .lobby-container { padding: 10px; }
  .brand-title { font-size: 16px; }
  .header-badge { display: none; }
  .cpu-settings-grid { grid-template-columns: 1fr; }
  .button-group { display: grid; grid-template-columns: repeat(2, 1fr); }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
