/* ==========================================================================
   BALLS TOGETHER — FESTIVE KINETIC HERITAGE DESIGN SYSTEM
   Art Direction: AAA-Indie Fall Guys-Level Tactile Arcade UI
   Heritage Arenas: Hampi Gauntlet • Ellora Sky Scramble • Chola Crown Royale
   ========================================================================== */

:root {
  /* ── Eye-Friendly Alabaster & Mineral Light Palette Tokens ── */
  --ink: #2A2118;
  --ink-soft: #5A4A3B;
  --ink-glass: rgba(250, 246, 238, 0.85);
  
  --gold-primary: #E7B85B;
  --gold-glow: #F9DF9F;
  --gold-dark: #9A641A;
  
  --sandstone-light: #FAF6EE;
  --sandstone-base: #F4EDE0;
  --sandstone-dark: #D6C4AA;
  
  --tangerine: #D67B2C;
  --tangerine-hover: #E28B3E;
  --tangerine-dark: #9D5214;
  
  --cobalt: #2B72AD;
  --cobalt-hover: #3B83BF;
  --cobalt-dark: #1F5B8E;
  
  --magenta: #C45850;
  --magenta-hover: #D46B63;
  --magenta-dark: #963B34;
  
  --acid-lime: #BCE8D2;
  --acid-lime-dark: #24825B;
  
  --emerald: #27845D;
  --emerald-dark: #1D6B4A;
  
  --royal-purple: #6F5FA6;
  --royal-purple-dark: #4C3F7A;

  /* ── Soft Tactile Elevation & Sandstone Outlines ── */
  --border-thick: 2px solid var(--sandstone-dark);
  --border-ultra: 2.5px solid var(--sandstone-dark);
  --shadow-chunky: 0 4px 0 #C8B59B, 0 8px 20px rgba(42, 33, 24, 0.1);
  --shadow-chunky-lg: 0 5px 0 #C8B59B, 0 12px 28px rgba(42, 33, 24, 0.14);
  --shadow-chunky-sm: 0 3px 0 #C8B59B, 0 4px 10px rgba(42, 33, 24, 0.08);
  --shadow-pressed: 0 1px 0 #C8B59B;
  
  --specular-gloss: inset 0 1.5px 0 rgba(255, 255, 255, 0.7);
  --specular-gloss-subtle: inset 0 1px 0 rgba(255, 255, 255, 0.55);

  /* ── Typography ── */
  --font-game: 'Bungee', 'Titan One', 'Fredoka', cursive, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Outfit', 'Nunito', system-ui, sans-serif;
  --font-cinzel: 'Cinzel', serif;

  /* ── Spring Animations ── */
  --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-snappy: cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* ==========================================================================
   1. LIVE ANIMATED FESTIVE HERITAGE STAGE (CANVAS CONTAINER & BACKGROUND)
   ========================================================================== */

#home-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: opacity 0.4s ease, transform 0.4s var(--spring-bounce);
}

#home-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

/* Dedicated Live 3D / 2.5D Festive Stage Canvas */
#festive-stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  cursor: default;
}

/* Ambient Lighting Tint Overlay (Shifts with Selected Map) */
#stage-ambient-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: background 0.8s ease, opacity 0.8s ease;
  mix-blend-mode: overlay;
  opacity: 0.35;
}

.tint-hampi {
  background: radial-gradient(circle at 50% 40%, rgba(250, 224, 180, 0.38) 0%, rgba(235, 198, 145, 0.48) 100%);
}
.tint-ellora {
  background: radial-gradient(circle at 50% 40%, rgba(190, 236, 218, 0.38) 0%, rgba(154, 214, 192, 0.48) 100%);
}
.tint-chola {
  background: radial-gradient(circle at 50% 40%, rgba(220, 208, 244, 0.38) 0%, rgba(194, 178, 228, 0.48) 100%);
}
.tint-christmas {
  background: radial-gradient(circle at 50% 40%, rgba(226, 244, 252, 0.4) 0%, rgba(194, 226, 246, 0.5) 100%);
}

/* Atmospheric Sun Rays / Shimmer */
.stage-sun-rays {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 140vw;
  height: 80vh;
  background: radial-gradient(circle at 50% 0%, rgba(255, 230, 150, 0.28) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  animation: sunPulse 6s ease-in-out infinite alternate;
}
@keyframes sunPulse {
  0% { opacity: 0.7; transform: translateX(-50%) scale(0.98); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.02); }
}

/* Drifting Marigolds & Festive Confetti Overlay */
#festive-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   2. TOP NAVIGATION BAR (FLOATING GLASS PILLS & INTERACTIVE SHOP COINS)
   ========================================================================== */

.map-header {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.94) 0%, rgba(244, 237, 224, 0.90) 100%);
  border-bottom: 1.5px solid #D6C4AA;
  box-shadow: 0 4px 16px rgba(42, 33, 24, 0.08);
}

/* Center Floating Pill Navigation */
.header-center-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #D6C4AA;
  border-radius: 9999px;
  padding: 4px 6px;
  box-shadow: 0 4px 14px rgba(42, 33, 24, 0.08);
}

.nav-pill-btn {
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 9999px;
  padding: 7px 16px;
  font-family: var(--font-game);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: #5A4A3B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s var(--spring-bounce);
}
.nav-pill-btn:hover {
  color: #2A2118;
  background: rgba(214, 196, 170, 0.25);
  transform: translateY(-1px);
}
.nav-pill-btn.active {
  background: linear-gradient(180deg, #FBE2A4 0%, #EEC26B 100%);
  color: #2A2118;
  border: 1.5px solid #C99D50;
  box-shadow: 0 2px 0 #B68838;
  transform: translateY(-1px);
}

/* Top-Right Currency & Controls */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Gleaming Animated ORBS Coin Capsule */
.orbs-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 13px 0 9px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #EDE5D7 0%, #E0D5C2 100%);
  color: #2A2118;
  border: 1.5px solid #B8A488;
  box-shadow: 0 3px 0 #C8B59B, 0 4px 10px rgba(42, 33, 24, 0.08);
  font-family: var(--font-game);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s var(--spring-bounce), box-shadow 0.12s ease;
}
.orbs-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #C8B59B;
}
.orbs-btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressed);
}

.orbs-coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF2BF 0%, #F2C45A 55%, #C98E28 100%);
  border: 1.5px solid #9A641A;
  box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: coinGleam 4s infinite ease-in-out;
}
@keyframes coinGleam {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(12deg); }
}

.orbs-val {
  font-family: var(--font-game);
  font-size: 13.5px;
  color: #8A4E0F;
  text-shadow: none;
}

.orbs-plus-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FBE2A4 0%, #EAB557 100%);
  border: 1.5px solid #B67D24;
  color: #2A2118;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 #9E6A1A;
  line-height: 1;
}

/* Header Tactile Icon Buttons */
.duo-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #EDE5D7;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1.5px solid #B8A488;
  box-shadow: 0 3px 0 #BBA88D, 0 4px 10px rgba(42, 33, 24, 0.1);
  color: #2A2118;
  text-shadow: none;
}
.map-header .duo-icon-btn {
  background: #EDE5D7 !important;
  border: 1.5px solid #B8A488 !important;
  color: #2A2118 !important;
  box-shadow: 0 3px 0 #BBA88D, 0 4px 10px rgba(42, 33, 24, 0.1) !important;
  text-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s var(--spring-bounce), box-shadow 0.12s ease;
}
.duo-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #C8B59B;
  background: #FAF6EE;
  color: #1F5B8E;
}
.duo-icon-btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressed);
}

/* ==========================================================================
   3. MAIN LOBBY STAGE VIEWPORT (HERO LEFT + STAGE CENTER + CONTROL DECK RIGHT)
   ========================================================================== */

.menu-scroll-wrap {
  position: relative;
  z-index: 10;
  flex: 1 1 auto;
  display: flex;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 32px 32px 32px;
}

.menu-main-content {
  display: grid;
  grid-template-columns: 340px 1fr 400px;
  gap: 24px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  align-items: start;
}

/* ──────────────────────────────────────────────────────────────────────────
   LEFT COLUMN: HERO LOGO + MINI ORB CUSTOMIZER + CHUNKY ARCADE MODES
   ────────────────────────────────────────────────────────────────────────── */

.menu-nav-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 15;
}

/* Giant 3D Extruded Comic Logo */
.menu-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-logo-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transform: rotate(-2deg);
  transition: transform 0.2s var(--spring-bounce);
}
.hero-logo-wrap:hover {
  transform: rotate(0deg) scale(1.04);
}

.hero-logo-text {
  font-family: var(--font-game);
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: #FFC200;
  display: block;
  -webkit-text-stroke: 3px var(--ink);
  text-shadow:
    0 4px 0 #FF6600,
    0 8px 0 #B84500,
    0 12px 0 var(--ink),
    0 16px 24px rgba(18, 16, 36, 0.6);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* Animated Shimmer / Sheen Sweep */
.hero-logo-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%);
  transform: skewX(-20deg);
  animation: shineSweep 3.6s infinite ease-in-out;
  pointer-events: none;
}
@keyframes shineSweep {
  0% { left: -120%; }
  35%, 100% { left: 160%; }
}

/* Heritage Tagline Ribbon */
.hero-tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #E6007A 0%, #FF1A94 50%, #E6007A 100%);
  border: var(--border-thick);
  border-radius: 9999px;
  padding: 6px 16px;
  box-shadow: var(--shadow-chunky-sm);
  margin-top: 10px;
  transform: rotate(1deg);
}

.hero-tagline {
  font-family: var(--font-game);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.tagline-star {
  color: var(--gold-primary);
  font-size: 11px;
}

/* Mini Orb Preview Pedestal & Swatches */
.mini-customizer-box {
  background: rgba(28, 25, 54, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--border-thick);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow-chunky);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.mini-customizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-game);
  font-size: 11px;
  color: var(--sandstone-light);
  letter-spacing: 0.08em;
}

.mini-orb-stage {
  position: relative;
  width: 110px;
  height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
}

.mini-orb-preview {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  border: var(--border-thick);
  box-shadow:
    inset 0 4px 6px rgba(255, 255, 255, 0.6),
    inset 0 -6px 8px rgba(0, 0, 0, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s var(--spring-bounce);
  animation: miniOrbIdle 3s ease-in-out infinite alternate;
}
@keyframes miniOrbIdle {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-6px) rotate(8deg); }
}
.mini-orb-stage:active .mini-orb-preview {
  transform: translateY(4px) scale(1.15, 0.85);
}

.mini-pedestal-base {
  width: 84px;
  height: 18px;
  background: linear-gradient(180deg, #F0DFCC 0%, #C4A882 100%);
  border: var(--border-thick);
  border-radius: 10px;
  box-shadow: 0 4px 0 var(--ink);
  margin-top: -6px;
  position: relative;
  z-index: 1;
}

/* Quick Skin Swatch Dots */
.skin-swatches-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.skin-swatch-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.15s var(--spring-bounce), box-shadow 0.15s ease;
  position: relative;
}
.skin-swatch-dot:hover {
  transform: translateY(-2px) scale(1.15);
  box-shadow: 0 4px 0 var(--ink);
}
.skin-swatch-dot.active {
  transform: scale(1.22);
  border-color: #FFFFFF;
  box-shadow: 0 0 0 2px var(--ink), 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Mode Switcher: Soft Mineral Cards */
.menu-mode-row {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
}

.mode-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border-radius: 18px;
  border: 2px solid #D6C4AA;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 0 #C8B59B, 0 8px 18px rgba(42, 33, 24, 0.08);
  transition: transform 0.12s var(--spring-bounce), box-shadow 0.12s ease, border-color 0.15s ease;
  outline: none;
}
.mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #C8B59B, 0 10px 22px rgba(42, 33, 24, 0.12);
}
.mode-card:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #C8B59B;
}

/* Soft Mineral Sky-Blue Party Mode Card */
.mode-card-multi {
  background: linear-gradient(180deg, #F3F8FD 0%, #E3EFFA 100%);
  color: #2A2118;
  border-color: #9FC4E2;
  box-shadow: 0 4px 0 #89B2D4, 0 8px 18px rgba(42, 33, 24, 0.08);
}
.mode-card-multi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}
.mode-card-multi.active {
  border-color: #2B72AD;
  box-shadow: 0 4px 0 #235D8F, 0 0 0 3px rgba(43, 114, 173, 0.2);
}

/* Soft Warm Apricot Training Campaign Card */
.mode-card-training {
  background: linear-gradient(180deg, #FFF7EC 0%, #F9E6CB 100%);
  color: #2A2118;
  border-color: #DFB989;
  box-shadow: 0 4px 0 #C9A16E, 0 8px 18px rgba(42, 33, 24, 0.08);
}
.mode-card-training::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}
.mode-card-training.active {
  border-color: #BD7223;
  box-shadow: 0 4px 0 #9D5D19, 0 0 0 3px rgba(189, 114, 35, 0.2);
}

.mode-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #2B72AD;
  border: 1.5px solid #1E588A;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mode-card-training .mode-card-icon {
  background: #BD7223;
  border-color: #9A5A17;
  color: #FFFFFF;
}

.mode-card-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.mode-card-label {
  font-family: var(--font-game);
  font-size: 14px;
  letter-spacing: 0.03em;
  color: #2A2118;
  text-shadow: none;
}
.mode-card-training .mode-card-label { color: #2A2118 !important; text-shadow: none !important; }

.mode-card-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  color: #5A4A3B;
  letter-spacing: 0.01em;
}
.mode-card-training .mode-card-sub { color: #5A4A3B !important; }

.mode-card-pip {
  position: absolute;
  top: 9px;
  right: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #27845D;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 0 1.5px #27845D;
  display: none;
}
.mode-card.active .mode-card-pip {
  display: block;
}

/* ──────────────────────────────────────────────────────────────────────────
   CENTER COLUMN: OPEN STAGE VIEW FOR 3D CARVED PODIUM & INTERACTIVE BALL
   ────────────────────────────────────────────────────────────────────────── */

.menu-stage-center-spacer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 460px;
  position: relative;
  pointer-events: none;
}

/* 3D Turntable Podium & Interactive Player Orb Stage */
.lobby-3d-stage-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 480px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  cursor: default;
}

/* Interactive Hint Pill below Turntable */
.podium-drag-hint {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(250, 246, 238, 0.92);
  border: 1.5px solid #D6C4AA;
  border-radius: 9999px;
  padding: 7px 16px;
  box-shadow: 0 3px 0 #C8B59B;
  font-family: var(--font-game);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #2A2118;
  margin-top: -10px;
  margin-bottom: 8px;
  cursor: grab;
  transition: transform 0.15s var(--spring-bounce);
  user-select: none;
  z-index: 5;
}
.podium-drag-hint:hover {
  transform: translateY(-2px);
  color: #1F5B8E;
}

/* ──────────────────────────────────────────────────────────────────────────
   RIGHT COLUMN: THE MATCH SETUP PANEL ("ARENA TICKET / CONTROL DECK")
   ────────────────────────────────────────────────────────────────────────── */

.menu-stage-column {
  z-index: 15;
}

/* Soft Warm Alabaster Parchment Control Panel */
.stone-panel {
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.96) 0%, rgba(244, 237, 224, 0.98) 100%);
  border: 2px solid #D6C4AA;
  border-radius: 24px;
  padding: 20px 18px 18px 18px;
  box-shadow:
    0 14px 36px rgba(42, 33, 24, 0.14),
    0 3px 0 #D6C4AA,
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #2A2118;
  position: relative;
  margin-top: 6px;
}

.stone-panel::after {
  display: none !important;
}

/* Training Mode Tablet Panel Frame (Scrollable, Winding Temple Map) */
#panel-training {
  width: 100%;
  max-width: 440px;
  max-height: min(82dvh, 600px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px 30px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.96) 0%, rgba(244, 237, 224, 0.98) 100%);
  border: 2px solid #D6C4AA;
  color: #2A2118;
  box-shadow:
    0 14px 36px rgba(42, 33, 24, 0.14),
    0 3px 0 #D6C4AA,
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  scrollbar-width: thin;
  scrollbar-color: #C7B296 rgba(244, 237, 224, 0.5);
  margin-top: 6px;
}
#panel-training.hidden {
  display: none !important;
}

.stone-panel::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 19px;
  pointer-events: none;
}

.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-game);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #5A4A3B;
  margin-bottom: 6px;
}

.arena-slide-counter {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 900;
  color: #8A4E0F;
  background: #FDF1DC;
  border: 1.5px solid #DEC089;
  border-radius: 9999px;
  padding: 2px 9px;
}

.waiting-arena-name {
  color: #2A2118;
  font-weight: 900;
}

.waiting-random-hint {
  background: #EAF4FC;
  border: 1.5px solid #96C4E6;
  color: #1A4E7A;
  border-radius: 12px;
  padding: 7px 11px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  text-align: left;
}
.waiting-random-hint.hidden {
  display: none !important;
}

/* Dynamic Pulsing Status Pill (Soft Pastel Light Theme) */
.net-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #FDF1DC;
  border: 1.5px solid #DEC089;
  box-shadow: 0 2px 0 rgba(42, 33, 24, 0.08);
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #7D490C;
  white-space: nowrap;
}

.net-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D98A2B;
  box-shadow: 0 0 6px rgba(217, 138, 43, 0.45);
  flex-shrink: 0;
  animation: netPulseConnecting 1.5s ease-in-out infinite alternate;
}
@keyframes netPulseConnecting {
  0% { transform: scale(0.85); opacity: 0.65; }
  100% { transform: scale(1.15); opacity: 1; }
}

.net-badge.online {
  background: #E4F4EC;
  border-color: #72B99B;
  color: #134A33;
}

.net-badge.online .net-dot {
  background: #24825B;
  box-shadow: 0 0 6px rgba(36, 130, 91, 0.45);
  animation: netPulseOnline 2s ease-in-out infinite alternate;
}
.net-badge.online .net-dot::after {
  border-color: #24825B;
}
@keyframes netPulseOnline {
  0% { transform: scale(0.9); opacity: 0.85; }
  100% { transform: scale(1.1); opacity: 1; }
}

.net-badge.waking {
  background: #FDF1DC;
  border-color: #DFB56A;
  color: #7A460A;
}
.net-badge.waking .net-dot {
  background: #C97D22;
  box-shadow: 0 0 6px rgba(201, 125, 34, 0.45);
  animation: netPulseConnecting 0.8s ease-in-out infinite alternate;
}

.net-badge.local {
  background: #EFEBFB;
  border-color: #B4A3DF;
  color: #443574;
}
.net-badge.local .net-dot {
  background: #6F5FA6;
  box-shadow: 0 0 6px rgba(111, 95, 166, 0.45);
  animation: none;
}

/* Waiting Room Autofill Toggle Button */
.waiting-racers-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.waiting-header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-toggle-autofill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4EDE0 100%);
  border: 1.5px solid #D6C4AA;
  border-radius: 10px;
  color: #2A2118;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 0 #C7B398;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
  user-select: none;
}

.btn-toggle-autofill:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #C7B398;
}

.btn-toggle-autofill:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #C7B398;
}

.btn-toggle-autofill.off {
  background: linear-gradient(180deg, #E4F4EC 0%, #CBEAD9 100%);
  border-color: #72B99B;
  color: #134A33;
  box-shadow: 0 2px 0 #5EA487;
}

.btn-toggle-autofill.off:hover {
  filter: brightness(1.03);
}

.btn-toggle-autofill .autofill-icon {
  flex-shrink: 0;
}

/* Waiting room slots override inline colors so light mode contrast is always crisp */
.player-slot {
  background: #F4EDE0 !important;
  border: 1.5px solid #D6C4AA !important;
}
.player-slot.filled {
  background: #FFFFFF !important;
  border-color: #72B99B !important;
  box-shadow: 0 2px 6px rgba(42, 33, 24, 0.06) !important;
}
.player-slot.filled .slot-name {
  color: #2A2118 !important;
}
.player-slot.filled .slot-role {
  color: #175E42 !important;
}
.player-slot:not(.filled) .slot-name {
  color: #5A4A3B !important;
  font-style: italic;
}
.player-slot:not(.filled) .slot-role {
  color: #5A4A3B !important;
}
.player-slot:not(.filled) .slot-role.bot {
  color: #1D5A8A !important;
}
.player-slot:not(.filled) .slot-orb-dot {
  background: #E6DBC8 !important;
  border: 1.5px dashed #A8947A !important;
  box-shadow: none !important;
}

.player-slot.empty-nobot {
  border: 1.5px dashed #C7B398 !important;
  background: #F4EDE0 !important;
}

.stone-input {
  width: 100%;
  height: 40px;
  background: #EFE9DC;
  border: 1.5px solid #B8A488;
  border-radius: 12px;
  padding: 0 13px;
  color: #2A2118;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 1px 3px rgba(42, 33, 24, 0.06);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stone-input::placeholder {
  color: #7A6958;
  font-weight: 600;
}
.stone-input:focus {
  border-color: #2B72AD;
  box-shadow: 0 0 0 3px rgba(43, 114, 173, 0.18);
}

/* ──────────────────────────────────────────────────────────────────────────
   CINEMATIC ARENA SCREENSHOT SLIDESHOW / CAROUSEL
   ────────────────────────────────────────────────────────────────────────── */

.arena-slideshow-card {
  width: 100%;
  margin-top: 4px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arena-slideshow-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 2px solid #D6C4AA;
  overflow: hidden;
  background: #EDE4D4;
  box-shadow: 0 6px 18px rgba(42, 33, 24, 0.12);
}

.arena-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.25s ease;
}

.arena-slide-img:hover {
  transform: scale(1.03);
}

.arena-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(42, 33, 24, 0.04) 0%, rgba(42, 33, 24, 0.22) 48%, rgba(32, 24, 17, 0.88) 100%);
  pointer-events: none;
}

.arena-slide-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.arena-badge-pill {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 6px rgba(42, 33, 24, 0.18);
  text-transform: uppercase;
}

.badge-royale {
  background: #2B72AD;
  color: #FFFFFF;
}

.badge-scale {
  background: rgba(250, 246, 238, 0.94);
  color: #2A2118;
  border-color: #D6C4AA;
}

.arena-nav-btn {
  position: absolute;
  top: calc(50% - 20px);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #D6C4AA;
  background: rgba(250, 246, 238, 0.94);
  color: #2A2118;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 3px 8px rgba(42, 33, 24, 0.18);
  transition: transform 0.12s var(--spring-bounce), background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.arena-nav-btn:hover {
  transform: translateY(-1px) scale(1.06);
  background: #F9DF9F;
  color: #2A2118;
}

.arena-nav-btn:active {
  transform: translateY(1px) scale(0.96);
}

.arena-nav-prev {
  left: 8px;
}

.arena-nav-next {
  right: 8px;
}

.arena-slide-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px 9px;
  background: linear-gradient(180deg, rgba(32, 24, 17, 0.72) 0%, rgba(28, 20, 14, 0.92) 45%, rgba(24, 17, 12, 0.96) 100%);
  z-index: 2;
  pointer-events: none;
}

.arena-slide-kicker {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.11em;
  color: #FBE2A4;
  text-transform: uppercase;
}

.arena-slide-title {
  font-family: var(--font-game);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  margin-top: 1px;
}

.arena-slide-desc {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: #F4EDE0;
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-slide-hazards {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.hazard-chip {
  font-family: var(--font-body);
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 1.5px 6px;
  border-radius: 9999px;
  background: rgba(250, 246, 238, 0.9);
  border: 1px solid #D6C4AA;
  color: #2A2118;
  text-transform: uppercase;
}

.arena-slideshow-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.arena-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #BFA98B;
  background: #EDE3D3;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s var(--spring-bounce);
}

.arena-dot.active {
  width: 24px;
  border-radius: 6px;
  background: linear-gradient(90deg, #2B72AD 0%, #27845D 100%);
  border-color: #1F5B8E;
  box-shadow: 0 2px 6px rgba(43, 114, 173, 0.28);
}

/* ──────────────────────────────────────────────────────────────────────────
   PRIMARY CTA HIERARCHY: RANDOM PLAY + CREATE ROOM + JOIN
   ────────────────────────────────────────────────────────────────────────── */

.lobby-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 6px;
}

/* ▶ RANDOM PLAY (ONLINE / BOTS) — SAGE-EMERALD HERO CTA */
#btn-quick-play {
  width: 100%;
  min-height: 48px;
  border-radius: 15px;
  border: 1.5px solid #18573C;
  background: linear-gradient(180deg, #27845D 0%, #1D6B4A 100%);
  color: #FFFFFF;
  font-family: var(--font-game);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 0 #165138, 0 8px 18px rgba(29, 107, 74, 0.22);
  position: relative;
  overflow: hidden;
  text-shadow: none;
  transition: transform 0.12s var(--spring-bounce), box-shadow 0.12s ease;
  padding: 8px 12px;
  line-height: 1.15;
}
#btn-quick-play .btn-qp-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
#btn-quick-play .btn-qp-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  opacity: 0.94;
  letter-spacing: 0.03em;
}
#btn-quick-play::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, transparent 100%);
  border-radius: 13px 13px 0 0;
  pointer-events: none;
}
#btn-quick-play::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
  animation: shineSweep 4s infinite ease-in-out 1s;
  pointer-events: none;
}
#btn-quick-play:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #165138, 0 10px 22px rgba(29, 107, 74, 0.28);
}
#btn-quick-play:active {
  transform: translateY(2px) scale(0.99);
  box-shadow: 0 1px 0 #165138;
}

/* + CREATE 4P ROOM — SKY-BLUE SECONDARY CTA */
#btn-create-room {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border: 1.5px solid #194A74;
  background: linear-gradient(180deg, #2B72AD 0%, #1F5B8E 100%);
  color: #FFFFFF;
  font-family: var(--font-game);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 4px 0 #18476F, 0 6px 14px rgba(31, 91, 142, 0.18);
  position: relative;
  overflow: hidden;
  text-shadow: none;
  transition: transform 0.12s var(--spring-bounce), box-shadow 0.12s ease;
  padding: 8px 12px;
}
#btn-create-room::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}
#btn-create-room:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #18476F;
}
#btn-create-room:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #18476F;
}

/* CODE + JOIN ROOM ROW */
.join-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 9px;
}

.code-input {
  text-align: center;
  font-family: var(--font-game);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1F5B8E;
}

#btn-join-room {
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid #D6C4AA;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4EDE0 100%);
  color: #2A2118;
  font-family: var(--font-game);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 3px 0 #C7B398;
  transition: transform 0.12s var(--spring-bounce), box-shadow 0.12s ease;
}
#btn-join-room:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #C7B398;
  background: #FFFFFF;
}
#btn-join-room:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #C7B398;
}

/* ==========================================================================
   4. DYNAMIC GAME-FLOW SCREENS (LOADING, ARENA INTRO, HUD, VICTORY PODIUM)
   ========================================================================== */

/* ── Screen A: Dynamic Loading & Matchmaking Screen (Heritage Basalt Slate) ── */
#screen-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 50% 35%, #1F172B 0%, #0D0A14 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  transition: opacity 0.4s ease;
}
#screen-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Celestial Relic Gyroscope / Astrolabe Emblem */
.loading-relic-emblem {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.relic-astrolabe-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.relic-astrolabe-ring.ring-outer {
  inset: 0;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-top-color: #F59E0B;
  border-bottom-color: #FCD34D;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
  animation: spinAstrolabe 12s linear infinite;
}
.relic-astrolabe-ring.ring-inner {
  inset: 12px;
  border: 1px dashed rgba(16, 185, 129, 0.45);
  border-right-color: #10B981;
  animation: spinAstrolabeReverse 8s linear infinite;
}

@keyframes spinAstrolabe {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes spinAstrolabeReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* Interactive Click-to-Bounce Loading Relic Ball */
.loading-interactive-ball {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE580 0%, #D97706 50%, #78350F 100%);
  border: 2px solid rgba(255, 240, 200, 0.85);
  box-shadow:
    inset 0 4px 8px rgba(255, 255, 255, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s var(--spring-bounce);
  animation: loadingBallBob 1.8s ease-in-out infinite alternate;
}
.relic-ball-core {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: radial-gradient(circle, #FFF0C2 0%, #F59E0B 80%);
  box-shadow: 0 0 8px #F59E0B;
}
@keyframes loadingBallBob {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-10px) scale(1.03); }
}
.loading-interactive-ball:active {
  transform: translateY(8px) scale(1.2, 0.8);
}

.loading-kicker {
  font-family: var(--font-game);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #F59E0B;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.loading-title {
  font-family: var(--font-cinzel, 'Cinzel', serif);
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 800;
  color: #FFF7ED;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  margin-bottom: 14px;
}

/* Liquid Gold Progress Bar Trough */
.loading-bar-wrap {
  width: 100%;
  max-width: 440px;
  height: 10px;
  background: rgba(10, 8, 15, 0.95);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 9999px;
  padding: 2px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 15%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #D97706 0%, #F59E0B 50%, #10B981 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  transition: width 0.25s ease;
}

.loading-tip-card {
  margin-top: 16px;
  background: rgba(16, 12, 22, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  max-width: 460px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.loading-tip-card .tip-glyph {
  font-family: var(--font-cinzel, 'Cinzel', serif);
  font-size: 18px;
  color: #F59E0B;
  line-height: 1;
}

/* ── Screen B: Pre-Round Element Briefing Slideshow (Light Frosted Alabaster) ── */
#screen-arena-intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(42, 33, 24, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.25s ease;
}
#screen-arena-intro.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.96) 0%, rgba(244, 237, 224, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid #D6C4AA;
  border-radius: 26px;
  padding: 24px 22px 20px;
  color: #2A2118;
  box-shadow:
    0 22px 54px rgba(42, 33, 24, 0.18),
    0 4px 0 #D6C4AA,
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
  position: relative;
  animation: introPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes introPop {
  0% { transform: scale(0.94) translateY(18px); opacity: 0; }
  100% { transform: scale(1) translateY(0px); opacity: 1; }
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FDF1DC;
  color: #7D490C;
  border: 1.5px solid #DEC089;
  border-radius: 9999px;
  padding: 4px 13px;
  font-family: var(--font-game);
  font-size: 10px;
  letter-spacing: 0.12em;
  box-shadow: 0 2px 6px rgba(42, 33, 24, 0.06);
  margin-bottom: 8px;
}
.intro-badge svg {
  color: #A66213;
}

.intro-arena-title {
  font-family: var(--font-cinzel, 'Cinzel', serif);
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  color: #2A2118;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
  letter-spacing: 0.05em;
  margin: 2px 0 4px;
}

.intro-arena-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: #5A4A3B;
  font-weight: 600;
  line-height: 1.45;
  max-width: 440px;
  margin: 0 auto 14px auto;
}

.intro-hazard-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 18px;
}

.intro-hazard-item {
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(42, 33, 24, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.intro-hazard-item:hover {
  transform: translateY(-2px);
  border-color: #BFA889;
}

.intro-hazard-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #FAF6EE;
  border: 1.5px solid #D6C4AA;
  box-shadow: 0 2px 6px rgba(42, 33, 24, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-hazard-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.intro-hazard-kicker {
  font-family: var(--font-game);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: #5A4A3B;
  text-transform: uppercase;
}

.intro-hazard-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  color: #2A2118;
  white-space: nowrap;
}

/* ── Round Element & Obstacle Slideshow ── */
.intro-slideshow-card {
  max-width: 540px;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 13px 18px 14px;
  background: #EBE3D5 !important;
  border-color: #B9A88E !important;
}

.intro-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.intro-top-bar .intro-badge {
  margin-bottom: 0;
}

.intro-slide-counter {
  font-family: var(--font-game);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #231C15;
  background: #F4EFE5;
  border: 1.5px solid #C7B69B;
  border-radius: 9999px;
  padding: 3px 11px;
  box-shadow: 0 2px 0 #D8CBB6;
}

.intro-slide-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px;
}

.intro-nav-arrow {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #F4EFE5;
  border: 1.5px solid #C7B69B;
  color: #231C15;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(35, 28, 21, 0.08);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.intro-nav-arrow:hover {
  background: #E5DCCB;
  border-color: #A89477;
  transform: scale(1.06);
}
.intro-nav-arrow:active {
  transform: scale(0.95);
}

.intro-slide-viewport {
  flex: 1;
  min-width: 0;
  background: #F4EFE5;
  border: 1.5px solid #C7B69B;
  border-radius: 18px;
  padding: 10px 14px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 6px 18px rgba(35, 28, 21, 0.08);
  animation: slideFadeIn 0.24s ease;
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.intro-slide-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.intro-slide-category {
  font-family: var(--font-game);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 9999px;
  color: #231C15;
  background: #E8DFCE;
  border: 1.5px solid var(--slide-accent, #C99D50);
  box-shadow: 0 1px 3px rgba(35, 28, 21, 0.06);
}

.intro-slide-new-pill {
  font-family: var(--font-game);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 9999px;
  color: #134A33;
  background: #D3ECE0;
  border: 1.5px solid #5FB38C;
  box-shadow: 0 2px 6px rgba(39, 132, 93, 0.16);
  animation: newPulse 1.8s ease-in-out infinite;
}
.intro-slide-new-pill.hidden {
  display: none;
}

@keyframes newPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.intro-slide-media {
  position: relative;
  width: 100%;
  max-width: 280px;
  height: clamp(108px, 21vh, 158px);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #C7B69B;
  box-shadow:
    0 8px 18px rgba(35, 28, 21, 0.14),
    0 0 0 2px #EAE2D3;
  margin-bottom: 8px;
  background: #1B3252;
}

.intro-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-slide-icon-badge {
  position: absolute;
  bottom: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(35, 28, 21, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--slide-accent, #E5A952);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(35, 28, 21, 0.28);
}

.intro-slide-icon-wrap svg {
  width: 17px;
  height: 17px;
  display: block;
}

.intro-slide-title {
  font-family: var(--font-cinzel, 'Cinzel', serif);
  font-size: 16.5px;
  font-weight: 900;
  color: #231C15;
  letter-spacing: 0.03em;
  margin: 0 0 4px;
}

.intro-slide-desc {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.38;
  color: #4E4033;
  margin: 0 0 8px;
  max-width: 380px;
}

.intro-slide-tip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: #E8DFCE;
  border: 1.5px solid #D1C2AA;
  border-left: 4px solid var(--slide-accent, #2B72AD);
  border-radius: 9px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: #231C15;
  text-align: left;
}

.intro-tip-tag {
  font-family: var(--font-game);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #2A2118;
  background: #F4EDE0;
  border: 1px solid #D6C4AA;
  border-radius: 6px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.intro-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 9px;
}

.intro-dot-btn {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  border: 1px solid #C7B398;
  padding: 0;
  background: #E8DEC9;
  cursor: pointer;
  transition: all 0.2s ease;
}
.intro-dot-btn.is-new {
  box-shadow: 0 0 0 2px rgba(39, 132, 93, 0.35);
}
.intro-dot-btn.active {
  width: 24px;
  background: #2B72AD;
  border-color: #1F5B8E;
  box-shadow: 0 2px 6px rgba(43, 114, 173, 0.25);
}

.intro-progress-track {
  width: 100%;
  height: 5px;
  background: #E6DBC8;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 13px;
}

.intro-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2B72AD, #27845D);
  border-radius: 9999px;
}

@media (max-width: 600px), (max-height: 560px) {
  #screen-arena-intro {
    padding: 8px 10px;
  }
  .intro-slideshow-card {
    padding: 11px 12px 11px;
    border-radius: 20px;
    max-height: calc(100dvh - 16px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .intro-top-bar {
    margin-bottom: 4px;
  }
  .intro-arena-title {
    font-size: 17px;
    margin: 0 0 2px;
  }
  .intro-arena-desc {
    margin-bottom: 5px;
    font-size: 11px;
    line-height: 1.28;
  }
  .intro-slide-stage {
    gap: 6px;
    margin: 5px 0;
  }
  .intro-slide-viewport {
    padding: 9px 10px 8px;
    border-radius: 15px;
  }
  .intro-slide-chips {
    margin-bottom: 5px;
  }
  .intro-slide-media {
    max-width: 230px;
    max-height: 22dvh;
    margin-bottom: 5px;
  }
  .intro-slide-icon-badge {
    width: 26px;
    height: 26px;
    bottom: 5px;
    right: 5px;
  }
  .intro-slide-icon-wrap svg {
    width: 15px;
    height: 15px;
  }
  .intro-slide-title {
    font-size: 14px;
    margin-bottom: 2px;
  }
  .intro-slide-desc {
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 5px;
  }
  .intro-slide-tip {
    padding: 5px 8px;
    font-size: 10.5px;
  }
  .intro-dots-row {
    margin-bottom: 5px;
  }
  .intro-progress-track {
    margin-bottom: 7px;
  }
  #btn-skip-intro,
  .intro-cta-btn {
    padding: 9px 20px;
    font-size: 11.5px;
    width: 100%;
  }
  .intro-nav-arrow {
    width: 30px;
    height: 30px;
  }
}

@media (max-height: 440px) {
  .intro-arena-desc {
    display: none;
  }
  .intro-slide-media {
    max-width: 180px;
    max-height: 20dvh;
  }
}

.intro-actions-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Primary Briefing Progression CTA (No Skip Styling) */
#btn-skip-intro,
.intro-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 230px;
  background: linear-gradient(180deg, #2B72AD 0%, #1F5B8E 100%);
  color: #FFFFFF;
  font-family: var(--font-game);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 12px 26px;
  border-radius: 14px;
  border: 1.5px solid #194A74;
  box-shadow: 0 4px 0 #18476F, 0 8px 18px rgba(31, 91, 142, 0.22);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.15s ease, background 0.2s ease;
}
#btn-skip-intro:hover,
.intro-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #18476F, 0 10px 22px rgba(31, 91, 142, 0.28);
}
#btn-skip-intro:active,
.intro-cta-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #18476F;
}
#btn-skip-intro.is-ready,
.intro-cta-btn.is-ready {
  background: linear-gradient(180deg, #27845D 0%, #1D6B4A 100%);
  border-color: #18573C;
  box-shadow: 0 4px 0 #165138, 0 10px 24px rgba(29, 107, 74, 0.28);
}
#btn-skip-intro.is-ready:hover,
.intro-cta-btn.is-ready:hover {
  box-shadow: 0 5px 0 #165138, 0 12px 26px rgba(29, 107, 74, 0.34);
}

/* ── Screen C: Minimal In-Game HUD (Soft Alabaster Glass Pills) ── */
.hud-center-pill,
#hud-multi-pill,
#hud-training-pill {
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.92) 0%, rgba(244, 237, 224, 0.88) 100%) !important;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1.5px solid #D6C4AA !important;
  border-radius: 9999px;
  box-shadow:
    0 6px 20px rgba(42, 33, 24, 0.14),
    0 2px 0 #D6C4AA,
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  padding: 7px 20px;
  gap: 14px;
  color: #2A2118 !important;
  text-shadow: none !important;
  position: relative;
  overflow: hidden;
}

.hud-center-pill::before,
#hud-multi-pill::before,
#hud-training-pill::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 14px;
  right: 14px;
  height: 45%;
  border-radius: 9999px 9999px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

#game-hud .duo-icon-btn {
  background: rgba(250, 246, 238, 0.92) !important;
  border: 1.5px solid #D6C4AA !important;
  color: #2A2118 !important;
  text-shadow: none !important;
  box-shadow: 0 3px 0 #C8B59B, 0 6px 14px rgba(42, 33, 24, 0.12) !important;
}

#hud-multi-pill #hud-rank,
#hud-progress,
#hud-multi-cp,
#hud-rings {
  color: #2A2118 !important;
  text-shadow: none !important;
}
#hud-multi-pill #hud-rank sup {
  color: #8A4E0F !important;
  text-shadow: none !important;
}
.hud-divider {
  background: rgba(168, 144, 114, 0.5) !important;
  box-shadow: none !important;
}


/* ==========================================================================
   5. RESPONSIVE DESIGN & MOBILE POLISH (NO-SCROLL ALL-BUTTONS VISIBILITY)
   ========================================================================== */

@media (max-width: 1100px) {
  .menu-main-content {
    grid-template-columns: 270px 1fr 340px;
    gap: 16px;
  }
}

/* ── Tablet & Mobile Portrait / Narrow Layout (<= 960px) ── */
@media (max-width: 960px) and (orientation: portrait), (max-width: 600px) {
  .map-header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: max(8px, env(safe-area-inset-top, 8px)) 10px 8px;
  }
  .header-left {
    order: 1;
    flex: 0 1 auto;
    min-width: 0;
  }
  .header-right {
    order: 2;
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 5px;
  }
  .header-center-nav {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 3px 4px;
  }
  .nav-pill-btn {
    flex: 1 1 0;
    justify-content: center;
    font-size: 10px;
    padding: 5px 6px;
    white-space: nowrap;
  }
  .account-nav-btn {
    padding: 3px 9px 3px 4px !important;
    gap: 6px !important;
  }
  .account-nav-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
  }
  .account-nav-name {
    font-size: 10px !important;
    max-width: 68px !important;
  }
  .account-nav-sub {
    font-size: 8px !important;
  }
  .orbs-btn {
    height: 32px;
    padding: 0 8px 0 5px;
    font-size: 10.5px;
    gap: 4px;
  }
  .orbs-coin-icon {
    width: 18px;
    height: 18px;
  }
  .orbs-val {
    font-size: 11px;
  }
  .orbs-plus-btn {
    width: 26px !important;
    height: 26px !important;
    font-size: 14px !important;
  }
  .duo-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .menu-scroll-wrap {
    padding: 6px 10px 10px 10px;
  }
  .menu-main-content {
    grid-template-columns: 1fr;
    gap: 7px;
    max-width: 480px;
  }
  .menu-nav-column {
    gap: 6px;
  }
  .menu-mode-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .mode-card {
    padding: 7px 9px;
    gap: 7px;
    border-radius: 14px;
  }
  .mode-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .mode-card-icon svg {
    width: 16px;
    height: 16px;
  }
  .mode-card-label {
    font-size: 11px;
    line-height: 1.1;
  }
  .mode-card-sub {
    font-size: 9px;
    line-height: 1.15;
  }
  .daily-reward-card {
    margin-top: 0 !important;
    padding: 6px 10px !important;
    border-radius: 12px !important;
  }
  .daily-reward-title {
    font-size: 10px !important;
  }
  .daily-reward-desc {
    font-size: 8.5px !important;
  }
  .daily-claim-btn {
    padding: 4px 10px !important;
    font-size: 9.5px !important;
  }
  .menu-stage-center-spacer {
    display: none;
  }
  .stone-panel {
    padding: 11px 11px 11px;
    border-radius: 18px;
    margin-top: 0;
  }
  .stone-panel .panel-label {
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    font-size: 9.5px;
  }
  .stone-panel > .panel-label:first-child {
    margin-top: 0 !important;
  }
  #panel-training {
    max-height: calc(100dvh - 195px);
    padding: 12px 10px 24px;
    border-radius: 18px;
    margin-top: 0;
  }
  .stone-input {
    height: 35px;
    font-size: 13px;
    padding: 0 10px;
    border-radius: 10px;
  }
  .arena-slideshow-card {
    margin-top: 2px;
    margin-bottom: 7px;
    gap: 5px;
  }
  .arena-slideshow-viewport {
    height: clamp(114px, 21dvh, 152px);
    aspect-ratio: auto;
    border-radius: 13px;
  }
  .arena-slide-footer {
    padding: 6px 9px 7px;
  }
  .arena-slide-title {
    font-size: 12px;
  }
  .arena-slide-desc {
    font-size: 9.5px;
  }
  .lobby-actions-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 4px;
  }
  #btn-quick-play {
    min-height: 40px;
    height: 40px;
    font-size: 10.5px;
    padding: 4px 8px;
    border-radius: 12px;
    gap: 5px;
  }
  #btn-quick-play .btn-qp-text {
    flex-direction: column;
    gap: 1px;
    line-height: 1.05;
  }
  #btn-quick-play .btn-qp-sub {
    font-size: 8px;
  }
  #btn-create-room {
    min-height: 40px;
    height: 40px;
    font-size: 10.5px;
    padding: 4px 8px;
    border-radius: 12px;
    gap: 5px;
  }
  .join-row {
    margin-top: 7px;
    gap: 7px;
  }
  #btn-join-room {
    height: 36px;
    font-size: 11px;
    padding: 0 14px;
  }
  .code-input {
    height: 36px !important;
    font-size: 13px !important;
  }
  /* Waiting room compact mobile fit */
  .room-code-banner {
    padding: 7px 10px;
    margin-bottom: 7px;
    border-radius: 12px;
  }
  .room-code-val {
    font-size: 19px;
  }
  .waiting-random-hint {
    padding: 5px 9px;
    font-size: 10px;
    margin-bottom: 6px;
  }
  .slots-grid {
    gap: 6px;
    margin: 6px 0 8px 0;
  }
  .player-slot {
    padding: 6px 8px;
    border-radius: 11px;
  }
  .slot-orb-dot {
    width: 24px;
    height: 24px;
  }
  .slot-name {
    font-size: 11px;
  }
  .slot-role {
    font-size: 8.5px;
  }
  #lobby-waiting-view .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  #lobby-waiting-view .modal-actions .duo-btn {
    height: 38px;
    padding: 6px 8px;
    font-size: 11px;
  }
}

/* ── Mobile 16:9 Landscape Optimized Console Layout (<= 560px height) ── */
@media screen and (orientation: landscape) and (max-height: 560px), screen and (max-width: 960px) and (max-height: 560px) {
  .map-header {
    padding: 4px 12px;
    height: 42px;
    min-height: 42px;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .header-left {
    order: 0;
    flex: 0 0 auto;
  }
  .header-center-nav {
    position: static;
    transform: none;
    order: 0;
    width: auto;
    display: flex;
    gap: 4px;
    padding: 3px 5px;
  }
  .nav-pill-btn {
    flex: 0 0 auto;
    padding: 4px 10px;
    font-size: 9.5px;
    white-space: nowrap;
  }
  .header-right {
    order: 0;
    width: auto;
    gap: 5px;
  }
  .account-nav-btn {
    padding: 2px 8px 2px 4px !important;
    gap: 5px !important;
  }
  .account-nav-avatar {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
  }
  .account-nav-name {
    font-size: 9.5px !important;
    max-width: 66px !important;
  }
  .account-nav-sub {
    font-size: 7.5px !important;
  }
  .orbs-btn {
    height: 30px;
    padding: 0 8px 0 5px;
    font-size: 10.5px;
    gap: 5px;
  }
  .orbs-coin-icon {
    width: 17px;
    height: 17px;
  }
  .orbs-val {
    font-size: 11px;
  }
  .orbs-plus-btn {
    width: 25px !important;
    height: 25px !important;
    font-size: 14px !important;
  }
  .duo-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .menu-scroll-wrap {
    padding: 5px 10px 6px 10px;
  }
  .menu-main-content {
    grid-template-columns: 185px 1fr minmax(268px, 320px);
    gap: 10px;
    max-width: 100%;
    align-items: start;
  }
  .menu-nav-column {
    gap: 6px;
  }
  .menu-mode-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .menu-stage-center-spacer {
    display: flex;
    min-height: 210px;
  }
  .lobby-3d-stage-wrap {
    height: 220px;
    min-height: 190px;
  }
  .podium-drag-hint {
    padding: 4px 10px;
    font-size: 8.5px;
    margin-bottom: 2px;
  }
  .mode-card {
    padding: 7px 9px;
    gap: 8px;
    border-radius: 13px;
  }
  .mode-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .mode-card-icon svg {
    width: 15px;
    height: 15px;
  }
  .mode-card-label {
    font-size: 10.5px;
  }
  .mode-card-sub {
    font-size: 8.5px;
  }
  .daily-reward-card {
    padding: 6px 8px !important;
    border-radius: 12px !important;
    margin-top: 0 !important;
  }
  .daily-reward-title {
    font-size: 9.5px !important;
  }
  .daily-reward-desc {
    font-size: 8px !important;
  }
  .daily-claim-btn {
    padding: 4px 8px !important;
    font-size: 8.5px !important;
  }
  .stone-panel {
    padding: 8px 10px 8px;
    border-radius: 16px;
    margin-top: 0;
    max-height: calc(100dvh - 52px);
    overflow: hidden;
  }
  .stone-panel::after {
    display: none;
  }
  #panel-training {
    max-height: calc(100dvh - 52px);
    padding: 10px 8px 16px;
    border-radius: 16px;
    margin-top: 0;
  }
  .panel-label {
    font-size: 9px;
    margin-bottom: 3px !important;
    margin-top: 4px !important;
  }
  .stone-panel > .panel-label:first-child {
    margin-top: 0 !important;
  }
  .stone-input {
    padding: 3px 9px;
    font-size: 11px;
    height: 28px;
    border-radius: 9px;
  }
  .arena-slideshow-card {
    margin-top: 2px;
    margin-bottom: 5px;
    gap: 3px;
  }
  .arena-slideshow-viewport {
    height: 68px;
    aspect-ratio: auto;
    border-radius: 10px;
  }
  .arena-nav-btn {
    width: 24px;
    height: 24px;
    top: calc(50% - 18px);
  }
  .arena-slide-footer {
    padding: 3px 7px 2px;
  }
  .arena-slide-kicker {
    font-size: 7px;
  }
  .arena-slide-title {
    font-size: 10px;
  }
  .arena-slide-desc,
  .arena-slide-hazards {
    display: none;
  }
  .arena-dot {
    width: 6px;
    height: 6px;
  }
  .arena-dot.active {
    width: 15px;
  }
  .lobby-actions-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 3px;
  }
  #btn-quick-play {
    min-height: 34px;
    height: 34px;
    font-size: 9.5px;
    padding: 2px 6px;
    border-radius: 10px;
    gap: 4px;
  }
  #btn-quick-play .btn-qp-text {
    flex-direction: column;
    gap: 0;
    line-height: 1.05;
  }
  #btn-quick-play .btn-qp-sub {
    font-size: 7.5px;
  }
  #btn-create-room {
    min-height: 34px;
    height: 34px;
    font-size: 9.5px;
    padding: 2px 6px;
    border-radius: 10px;
    gap: 4px;
  }
  .join-row {
    margin-top: 5px;
    gap: 5px;
  }
  .code-input {
    height: 29px !important;
    font-size: 11px !important;
  }
  #btn-join-room {
    height: 29px;
    font-size: 10px;
    padding: 0 10px;
    border-radius: 9px;
  }
  /* Waiting room zero-scroll landscape fit */
  .room-code-banner {
    padding: 5px 9px;
    margin-bottom: 5px;
    border-radius: 10px;
  }
  .room-code-val {
    font-size: 16px;
  }
  #btn-copy-code {
    padding: 4px 8px !important;
    font-size: 9.5px !important;
  }
  .waiting-random-hint {
    padding: 4px 8px;
    font-size: 9.5px;
    margin-bottom: 4px;
  }
  .slots-grid {
    gap: 5px;
    margin: 4px 0 6px 0;
  }
  .player-slot {
    padding: 4px 7px;
    border-radius: 9px;
  }
  .slot-orb-dot {
    width: 20px;
    height: 20px;
  }
  .slot-name {
    font-size: 10px;
  }
  .slot-role {
    font-size: 8px;
  }
  .btn-toggle-autofill {
    padding: 3px 7px;
    font-size: 8.5px;
  }
  #lobby-waiting-view .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  #lobby-waiting-view .modal-actions .duo-btn {
    height: 32px;
    padding: 4px 6px;
    font-size: 10px;
  }
}

/* ==========================================================================
   6. CRAZYGAMES MONETIZATION, ORBS VAULT & MATCHMAKING FLOW
   ========================================================================== */

/* Header Orbs Group & Shiny Pulsing + Button */
.header-orbs-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.orbs-plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #FBE2A4 0%, #EBB758 100%);
  border: 1.5px solid #B67D24;
  color: #2A2118;
  font-family: var(--font-game);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 #9E6A1A;
  transition: transform 0.15s var(--spring-bounce), box-shadow 0.15s ease;
  user-select: none;
}
.orbs-plus-btn:hover {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 4px 0 #9E6A1A;
}
.orbs-plus-btn:active {
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 1px 0 #9E6A1A;
}
.pulse-glow {
  animation: cgPulseGlow 2.4s infinite;
}
@keyframes cgPulseGlow {
  0%, 100% {
    box-shadow: 0 3px 0 #9E6A1A, 0 0 0 0 rgba(231, 184, 91, 0.45);
  }
  50% {
    box-shadow: 0 3px 0 #9E6A1A, 0 0 10px 3px rgba(231, 184, 91, 0.55);
  }
}

/* Daily Reward Card under Campaign */
.daily-reward-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 9px 12px;
  background: linear-gradient(135deg, #FFF9EE 0%, #F7E8CC 100%);
  border: 1.5px solid #DEC089;
  border-radius: 15px;
  box-shadow: 0 3px 0 #C9A970, 0 6px 14px rgba(42, 33, 24, 0.08);
  overflow: hidden;
  transition: transform 0.18s var(--spring-bounce), border-color 0.18s ease;
}
.daily-reward-card:hover {
  transform: translateY(-1px);
  border-color: #C49B54;
}
.daily-reward-badge {
  position: absolute;
  top: 0;
  left: 12px;
  transform: translateY(-50%);
  background: #F4CA7A;
  color: #2A2118;
  font-family: var(--font-game);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1.5px solid #B67D24;
}
.daily-reward-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.daily-reward-title {
  font-family: var(--font-game);
  font-size: 11.5px;
  color: #7D490C;
  letter-spacing: 0.4px;
  text-shadow: none;
}
.daily-reward-desc {
  font-family: var(--font-body);
  font-size: 10px;
  color: #5A4A3B;
  font-weight: 700;
}
.daily-claim-btn {
  background: linear-gradient(180deg, #27845D 0%, #1D6B4A 100%);
  border: 1.5px solid #18573C;
  border-radius: 9999px;
  padding: 6px 13px;
  font-family: var(--font-game);
  font-size: 10.5px;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 0 #165138;
  transition: transform 0.12s var(--spring-bounce);
}
.daily-claim-btn:hover {
  transform: translateY(-1px) scale(1.03);
}
.daily-claim-btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 1px 0 #165138;
}
.daily-claim-btn.claimed {
  background: #E8DFD0;
  border-color: #C7B398;
  color: #5A4A3B;
  box-shadow: none;
  cursor: default;
}

/* Matchmaking Queue & Interactive Controls in Loading Screen (Basalt & Gold Roster Slate) */
.loading-queue-box {
  width: 92%;
  max-width: 480px;
  margin: 10px auto 14px auto;
  background: linear-gradient(180deg, rgba(26, 20, 36, 0.96) 0%, rgba(14, 11, 20, 0.98) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.38);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.queue-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  color: #FCD34D;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.queue-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  animation: queuePulse 1s infinite alternate;
}
@keyframes queuePulse {
  0% { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.2); opacity: 1; }
}
.queue-racers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.queue-racer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.queue-racer-card.ready {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}
.qcard-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}
.queue-racer-card.ready .qcard-icon {
  color: #FCD34D;
}
.qcard-name {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  color: #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.qcard-tag {
  font-family: var(--font-game);
  font-size: 8px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
  transition: all 0.25s ease;
}
.qcard-tag.ready {
  background: #10B981;
  color: #042F2E;
  border-color: #059669;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.loading-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto;
  max-width: 500px;
}
.ctrl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(22, 17, 30, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: #E2E8F0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.ctrl-chip kbd {
  background: #2D233B;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 5px;
  padding: 2px 6px;
  font-family: var(--font-game);
  font-size: 9.5px;
  color: #FCD34D;
  box-shadow: 0 2px 0 #130E1B;
}
.ctrl-chip svg {
  color: #F59E0B;
}

/* Dynamic Qualification Badge in Multiplayer HUD (Soft Pastel Pills) */
.hud-qualify-badge {
  font-family: var(--font-display, var(--font-game, sans-serif));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 3.5px 10px;
  border-radius: 9999px;
  background: #FDF1DC;
  color: #7D490C;
  border: 1.5px solid #DEC089;
  box-shadow: none;
  text-shadow: none;
  animation: qualifyPulse 1.6s infinite alternate;
  position: relative;
  z-index: 1;
}
.hud-qualify-badge.qualified {
  background: #DCF3E8;
  color: #134A33;
  border: 1.5px solid #68BC96;
  box-shadow: none;
  text-shadow: none;
  animation: none;
}
.hud-qualify-badge.danger {
  background: #FDECEC;
  color: #8B1E1E;
  border: 1.5px solid #E08B8B;
  box-shadow: none;
  text-shadow: none;
}
@keyframes qualifyPulse {
  0% { opacity: 0.9; }
  100% { opacity: 1; }
}

/* Rewarded Ad Double Buttons (Warm Apricot Pastel) */
.reward-double-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
  padding: 9px 12px;
  background: #FDF3E2;
  border: 1.5px dashed #D8B178;
  border-radius: 14px;
}
.reward-double-tag {
  font-family: var(--font-game);
  font-size: 10.5px;
  color: #7D490C;
  letter-spacing: 0.4px;
}
.duo-btn-reward {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(180deg, #FBE2A4 0%, #EEC26B 100%) !important;
  color: #2A2118 !important;
  border: 1.5px solid #C69238 !important;
  font-size: 12.5px !important;
  box-shadow: 0 3px 0 #B5812B !important;
  text-shadow: none !important;
  animation: none;
}
.duo-btn-reward:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #B5812B !important;
}
.duo-btn-reward:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #B5812B !important;
}

/* CrazyGames Free Orbs Vault Modal */
.vault-card {
  max-width: 440px;
  width: 92%;
  padding: 20px;
  text-align: center;
}
.vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.vault-desc {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: #5A4A3B;
  margin-bottom: 14px;
  line-height: 1.4;
}
.vault-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.vault-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 12px;
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 16px;
  box-shadow: 0 3px 0 #DFD1BC;
  gap: 7px;
}
.vault-badge-pill {
  position: absolute;
  top: -10px;
  background: #FBE2A4;
  color: #2A2118;
  font-family: var(--font-game);
  font-size: 8px;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1.5px solid #C69238;
}
.vault-badge-pill.lime {
  background: #DCF3E8;
  border-color: #68BC96;
  color: #134A33;
}
.vault-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FDF1DC;
  border: 1.5px solid #DEC089;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vault-icon-circle.lime {
  background: #E4F4EC;
  border-color: #72B99B;
}
.vault-card-title {
  font-family: var(--font-game);
  font-size: 14.5px;
  color: #2A2118;
}
.vault-card-sub {
  font-family: var(--font-body);
  font-size: 10.5px;
  color: #5A4A3B;
  font-weight: 700;
  min-height: 26px;
}
.duo-btn-vault-action {
  width: 100%;
  padding: 8px 9px;
  font-size: 11px;
}

/* CrazyGames Ad Playing Screen Overlay */
.cg-ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(250, 246, 238, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cg-ad-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.cg-ad-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cg-ad-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E3D6C3;
  border-top-color: #2B72AD;
  border-radius: 50%;
  animation: cgSpin 0.8s linear infinite;
}
@keyframes cgSpin {
  to { transform: rotate(360deg); }
}
.cg-ad-title {
  font-family: var(--font-game);
  font-size: 18px;
  color: #2A2118;
  letter-spacing: 0.8px;
}
.cg-ad-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  color: #5A4A3B;
}

/* 16:9 Aspect Ratio Protection & UI Safe-Zones */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #FAF6EE;
}
.map-header {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-top: max(12px, env(safe-area-inset-top));
}
#game-hud {
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}


/* ── Pause / Settings Alabaster Card Modal ── */
.pause-card.stone-panel-card {
  width: min(92vw, 420px) !important;
  max-width: 420px !important;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.96) 0%, rgba(244, 237, 224, 0.98) 100%) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 2px solid #D6C4AA !important;
  border-radius: 24px !important;
  padding: 20px 18px !important;
  box-shadow: 0 18px 46px rgba(42, 33, 24, 0.16), 0 4px 0 #D6C4AA !important;
  color: #2A2118 !important;
}

.pause-card .card-kicker {
  color: #7D490C !important;
  background: #FDF1DC !important;
  border: 1.5px solid #DEC089 !important;
  font-family: var(--font-body) !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  margin-bottom: 6px !important;
  text-shadow: none !important;
}

.pause-card .card-heading {
  font-family: var(--font-game) !important;
  font-size: 24px !important;
  color: #2A2118 !important;
  text-shadow: none !important;
  margin-bottom: 14px !important;
}

.pause-card .pause-toggles {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}

.pause-card .pause-toggles .toggle-chip {
  background: #FFFFFF !important;
  border: 1.5px solid #D6C4AA !important;
  border-radius: 12px !important;
  color: #2A2118 !important;
  font-family: var(--font-game) !important;
  font-size: 11px !important;
  padding: 8px 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  box-shadow: 0 2px 0 #DFD1BC !important;
  transition: transform 0.1s ease, border-color 0.15s ease !important;
}

.pause-card .pause-toggles .toggle-chip span {
  color: #1F5B8E !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
}

.pause-card .pause-toggles .toggle-chip.is-high span {
  color: #8A4E0F !important;
}

.pause-card .pause-toggles .toggle-chip.is-med span {
  color: #1F5B8E !important;
}

.pause-card .pause-toggles .toggle-chip.is-low span {
  color: #16553A !important;
}

.pause-card .pause-toggles .toggle-chip:hover {
  border-color: #B6A184 !important;
  transform: translateY(-1px) !important;
}

.pause-card .modal-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
}

.pause-card .modal-actions #btn-resume {
  grid-column: 1 / -1 !important;
}

.pause-card .modal-actions .duo-btn {
  width: 100% !important;
  height: 42px !important;
  font-size: 12.5px !important;
  letter-spacing: 0.04em !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pause-card .modal-actions .duo-btn.hidden,
#modal-pause[data-from-menu="true"] #btn-pause-restart,
#modal-pause[data-from-menu="true"] #btn-pause-map {
  display: none !important;
}
.daily-reward-card {
  width: 100%;
  background: linear-gradient(135deg, #FFF9EE 0%, #F7E8CC 100%);
  border: 1.5px solid #DEC089;
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 3px 0 #C9A970;
  margin-top: 2px;
}
.daily-reward-badge { display: none !important; }
.daily-reward-title {
  font-family: var(--font-game);
  font-size: 11px;
  color: #7D490C;
}
.daily-reward-desc {
  font-family: var(--font-body);
  font-size: 9.5px;
  color: #5A4A3B;
}
.daily-claim-btn {
  font-family: var(--font-game);
  font-size: 10px;
  padding: 5px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #27845D 0%, #1D6B4A 100%);
  border: 1.5px solid #18573C;
  color: #FFFFFF;
  box-shadow: 0 2px 0 #165138;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s var(--spring-bounce);
}
.daily-claim-btn:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   CONSOLE-GRADE 16:9 MOBILE TOUCH CONTROLS & LANDSCAPE ORIENTATION
   ========================================================================== */

#mobile-touch-controls {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 35;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  transition: opacity 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}

#mobile-touch-controls.hidden,
#mobile-touch-controls.hidden * {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  display: none !important;
}

.touch-ctrl-zone {
  position: absolute;
  pointer-events: none;
}

/* ── 1. Left Virtual Analog Joystick ── */
#touch-joystick-zone {
  bottom: max(18px, env(safe-area-inset-bottom, 18px));
  left: max(22px, env(safe-area-inset-left, 22px));
  width: 148px;
  height: 148px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

#touch-joystick-base {
  position: relative;
  width: 134px;
  height: 134px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 200, 0, 0.16) 0%, rgba(18, 16, 36, 0.72) 65%, rgba(10, 8, 20, 0.88) 100%);
  border: 3.5px solid rgba(255, 200, 0, 0.65);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.55),
    inset 0 0 18px rgba(255, 200, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

#touch-joystick-zone.active #touch-joystick-base {
  border-color: #FFC800;
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.65),
    0 0 20px rgba(255, 200, 0, 0.4),
    inset 0 0 22px rgba(255, 200, 0, 0.35);
}

/* Cardinal markings (Ancient Temple Sun Chariot motif) */
.joystick-cardinal-mark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFC800;
  box-shadow: 0 0 6px #FFC800;
  pointer-events: none;
}
.mark-n { top: 7px; left: calc(50% - 3px); }
.mark-s { bottom: 7px; left: calc(50% - 3px); }
.mark-w { left: 7px; top: calc(50% - 3px); }
.mark-e { right: 7px; top: calc(50% - 3px); }

#touch-joystick-glow {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(255, 184, 0, 0.4) 0%, transparent 68%);
  transition: opacity 0.18s ease;
}
#touch-joystick-zone.active #touch-joystick-glow {
  opacity: 1;
}

#touch-joystick-knob {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE580 0%, #FF9900 52%, #C44600 100%);
  border: 3.2px solid var(--ink);
  box-shadow: 
    0 5px 0 var(--ink),
    0 8px 18px rgba(0, 0, 0, 0.45),
    inset 0 2.5px 4px rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  pointer-events: none;
  z-index: 2;
}

.knob-jewel-highlight {
  position: absolute;
  top: 5px;
  left: 10px;
  width: 14px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transform: rotate(-25deg);
  pointer-events: none;
}

.knob-center-gem {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #80FFDB 0%, #00D68F 60%, #007A50 100%);
  border: 1.8px solid var(--ink);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9), 0 0 8px rgba(0, 214, 143, 0.7);
}

.joystick-hint-label {
  position: absolute;
  bottom: -18px;
  font-family: var(--font-game);
  font-size: 10px;
  font-weight: 900;
  color: #FFE580;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 6px rgba(255, 200, 0, 0.4);
  pointer-events: none;
}

/* ── 2. Center/Upper Free-Look Camera Swipe Zone ── */
#touch-camera-zone {
  top: 60px;
  bottom: 120px;
  left: 170px;
  right: 220px;
  pointer-events: auto;
  touch-action: none;
}

.camera-swipe-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-game);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 248, 231, 0.45);
  background: rgba(14, 19, 43, 0.6);
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 200, 0, 0.25);
  white-space: nowrap;
  pointer-events: none;
  animation: hintFadeOut 4.5s forwards 2.5s;
}
@keyframes hintFadeOut {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-6px); pointer-events: none; }
}

/* ── 3. Right Hand Action Cluster (Ergonomic Arc) ── */
#touch-action-cluster {
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  right: max(20px, env(safe-area-inset-right, 20px));
  width: 210px;
  height: 210px;
  pointer-events: none;
}

.touch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  will-change: transform;
}

/* Primary JUMP Button */
#touch-btn-jump {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE580 0%, #FFB800 48%, #FF6600 100%);
  border: 4px solid var(--ink);
  box-shadow: 
    0 6px 0 var(--ink),
    0 12px 24px rgba(255, 184, 0, 0.45),
    inset 0 3px 4px rgba(255, 255, 255, 0.7);
  color: var(--ink);
  z-index: 6;
}
#touch-btn-jump::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
}

#touch-btn-jump:active,
#touch-btn-jump.pressed {
  transform: scale(0.92) translateY(5px);
  box-shadow: 
    0 1px 0 var(--ink),
    0 4px 10px rgba(255, 184, 0, 0.35),
    inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.jump-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.jump-text {
  font-family: var(--font-game);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
  margin-top: 1px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Secondary BRAKE / STOP Button */
#touch-btn-brake {
  position: absolute;
  bottom: 12px;
  right: 92px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FF7B7B 0%, #E63946 50%, #A3121E 100%);
  border: 3.2px solid var(--ink);
  box-shadow: 
    0 5px 0 var(--ink),
    0 8px 18px rgba(230, 57, 70, 0.4),
    inset 0 2.5px 3.5px rgba(255, 255, 255, 0.65);
  color: #FFFFFF;
  z-index: 4;
}

#touch-btn-brake:active,
#touch-btn-brake.pressed {
  transform: scale(0.92) translateY(4px);
  box-shadow: 
    0 1px 0 var(--ink),
    0 3px 8px rgba(230, 57, 70, 0.3);
}

.touch-btn-text {
  font-family: var(--font-game);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* Camera Recenter Button */
#touch-btn-recenter {
  position: absolute;
  bottom: 94px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #6EE7B7 0%, #00D68F 55%, #007A50 100%);
  border: 2.8px solid var(--ink);
  box-shadow: 
    0 4px 0 var(--ink),
    0 6px 14px rgba(0, 214, 143, 0.35),
    inset 0 2px 3px rgba(255, 255, 255, 0.65);
  color: var(--ink);
  z-index: 4;
}

#touch-btn-recenter:active,
#touch-btn-recenter.pressed {
  transform: scale(0.92) translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

/* Auto-Roll Forward & Checkpoint Respawn Buttons */
#touch-btn-autoroll {
  position: absolute;
  bottom: 148px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8E7 65%, #F0E5CC 100%);
  border: 2.8px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink), inset 0 2px 3px rgba(255, 255, 255, 0.75);
  color: var(--ink);
  z-index: 4;
}

#touch-btn-autoroll.active {
  background: linear-gradient(180deg, #FFE066 0%, #FFC800 60%, #E09F00 100%);
  box-shadow: 0 4px 0 var(--ink), 0 0 14px rgba(255, 200, 0, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.75);
}

#touch-btn-respawn {
  position: absolute;
  bottom: 102px;
  right: 72px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #60A5FA 0%, #2563EB 60%, #1D4ED8 100%);
  border: 2.8px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink), inset 0 2px 3px rgba(255, 255, 255, 0.55);
  color: #FFFFFF;
  z-index: 4;
}

#touch-btn-autoroll:active,
#touch-btn-autoroll.pressed,
#touch-btn-respawn:active,
#touch-btn-respawn.pressed {
  transform: scale(0.92) translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

/* ── 4. Fullscreen Button (in HUD Header) ── */
#btn-fullscreen-toggle {
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 5. Portrait Orientation Prompt Modal ── */
.orientation-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 19, 43, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  transition: opacity 0.25s ease;
}

@media screen and (orientation: portrait) and (max-width: 900px) {
  .orientation-modal:not(.dismissed) {
    display: flex !important;
  }
}

@media screen and (orientation: landscape) {
  .orientation-modal {
    display: none !important;
  }
}

.orientation-modal.dismissed {
  display: none !important;
}

.orientation-card {
  width: min(90vw, 360px);
  background: #FAF6EE;
  border: 2px solid #D6C4AA;
  border-radius: 24px;
  padding: 24px 18px 20px 18px;
  box-shadow: 0 18px 46px rgba(42, 33, 24, 0.18), 0 4px 0 #D6C4AA;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #2A2118;
}

.phone-rotate-anim {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-icon-wrap {
  animation: rotatePhonePrompt 2.6s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes rotatePhonePrompt {
  0% { transform: rotate(0deg); }
  35% { transform: rotate(-90deg); }
  70% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

.rotate-arrow-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #D67B2C;
  border: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(42, 33, 24, 0.2);
  animation: arrowPulse 1.3s ease-in-out infinite alternate;
}
@keyframes arrowPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

.orientation-title {
  font-family: var(--font-game);
  font-size: 19px;
  color: #2A2118;
  letter-spacing: 0.04em;
  margin: 0 0 8px 0;
  text-shadow: none;
}

.orientation-subtitle {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: #5A4A3B;
  line-height: 1.45;
  margin: 0 0 12px 0;
}

.orientation-tag {
  font-family: var(--font-game);
  font-size: 10px;
  color: #7D490C;
  background: #FDF1DC;
  border: 1.5px solid #DEC089;
  border-radius: 9999px;
  padding: 4px 13px;
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}

.orientation-dismiss-btn {
  font-size: 11px !important;
  padding: 8px 18px !important;
  opacity: 0.85;
}
.orientation-dismiss-btn:hover {
  opacity: 1;
}

/* ── 6. Small Screen / Narrow Height Responsive Scaling (16:9 Landscape on Phones) ── */
@media screen and (max-height: 440px) {
  #touch-joystick-zone {
    width: 116px;
    height: 116px;
    bottom: max(18px, env(safe-area-inset-bottom, 18px));
    left: max(14px, env(safe-area-inset-left, 14px));
  }
  #touch-joystick-base {
    width: 106px;
    height: 106px;
  }
  #touch-joystick-knob {
    width: 46px;
    height: 46px;
  }
  .joystick-hint-label {
    font-size: 8.5px;
    bottom: -14px;
    line-height: 1;
  }
  #touch-action-cluster {
    width: 185px;
    height: 185px;
    bottom: max(10px, env(safe-area-inset-bottom, 10px));
    right: max(14px, env(safe-area-inset-right, 14px));
  }
  #touch-btn-jump {
    width: 90px;
    height: 90px;
  }
  .jump-text {
    font-size: 12px;
  }
  #touch-btn-brake {
    width: 52px;
    height: 52px;
    bottom: 10px;
    right: 102px;
  }
  #touch-btn-recenter {
    width: 44px;
    height: 44px;
    bottom: 102px;
    right: 14px;
  }
  #touch-camera-zone {
    left: 135px;
    right: 195px;
  }
}

@media screen and (max-height: 360px) {
  #touch-joystick-zone {
    width: 104px;
    height: 104px;
  }
  #touch-joystick-base {
    width: 96px;
    height: 96px;
  }
  #touch-joystick-knob {
    width: 42px;
    height: 42px;
  }
  #touch-btn-jump {
    width: 76px;
    height: 76px;
  }
  #touch-btn-brake {
    width: 46px;
    height: 46px;
    right: 86px;
  }
  #touch-btn-recenter {
    width: 38px;
    height: 38px;
    bottom: 84px;
  }
}

/* ── Online Podium Next-Round Vote Panel ── */
.podium-next-round-panel {
  margin: 8px 0 12px;
  padding: 9px 11px;
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 14px;
  text-align: left;
}
.podium-next-round-panel.hidden {
  display: none;
}
.podium-next-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.podium-next-round-title {
  font-family: var(--font-game);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #7D490C;
}
.podium-next-round-count {
  font-family: var(--font-game);
  font-size: 10px;
  font-weight: 800;
  color: #2A2118;
  background: #F4EDE0;
  border: 1px solid #D6C4AA;
  padding: 2px 8px;
  border-radius: 9999px;
}
.podium-ready-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.podium-ready-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  background: #FAF6EE;
  border: 1px solid #D6C4AA;
  color: #5A4A3B;
}
.podium-ready-chip.is-ready {
  background: #DCF3E8;
  border-color: #68BC96;
  color: #134A33;
}
.podium-ready-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D98A2B;
}
.podium-ready-chip.is-ready .podium-ready-chip-dot {
  background: #24825B;
  box-shadow: 0 0 6px rgba(36, 130, 91, 0.45);
}

/* ==========================================================================
   PREMIUM CLICK GLOW FEEDBACK STYLES
   ========================================================================== */

/* Universal tactile button glow when pressed/active */
.duo-btn:active,
.arena-card:active,
.arena-nav-btn:active,
.forge-slot:active,
.forge-close-btn:active,
.vault-item-card:active,
.daily-claim-btn:active {
  filter: brightness(1.14) drop-shadow(0 0 12px rgba(255, 200, 0, 0.8)) !important;
}

#premium-click-glow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999999;
  mix-blend-mode: screen;
}

/* ==========================================================================
   AUTHENTIC INDIAN HERITAGE RELIC FORGE & ORB LOCKER MODAL (LIGHT ALABASTER)
   ========================================================================== */

.forge-card.stone-panel-card {
  width: min(94vw, 760px) !important;
  max-width: 760px !important;
  max-height: min(92dvh, 580px) !important;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.97) 0%, rgba(244, 237, 224, 0.99) 100%) !important;
  border: 2px solid #D6C4AA !important;
  border-radius: 24px !important;
  padding: 20px 22px 18px 22px !important;
  box-shadow: 0 20px 50px rgba(42, 33, 24, 0.16), 0 4px 0 #D6C4AA !important;
  color: #2A2118 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  position: relative !important;
  overflow: hidden !important;
}

.forge-card.stone-panel-card::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 19px;
  pointer-events: none;
}

.forge-card.stone-panel-card::after {
  display: none !important;
}

.forge-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding-bottom: 6px !important;
  border-bottom: 1.5px solid #E3D6C3 !important;
  z-index: 2;
  flex-shrink: 0;
}

.forge-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forge-header-left .card-kicker {
  color: #8A4E0F !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-family: var(--font-body) !important;
  font-size: 9.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  margin: 0 !important;
  text-align: left !important;
  text-shadow: none !important;
}

.forge-title {
  font-family: var(--font-game) !important;
  font-size: 21px !important;
  color: #2A2118 !important;
  text-shadow: none !important;
  margin: 0 !important;
}

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

.forge-stars-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #D6C4AA !important;
  border-radius: 9999px !important;
  padding: 5px 11px !important;
  color: #8A4E0F !important;
  font-family: var(--font-game) !important;
  font-size: 13px !important;
  box-shadow: 0 2px 0 #DFD1BC !important;
}

.forge-close-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  border: 1.5px solid #D6C4AA !important;
  background: #FFFFFF !important;
  color: #2A2118 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 2px 0 #DFD1BC !important;
  transition: transform 0.1s var(--spring-bounce), background 0.15s ease !important;
}

.forge-close-btn:hover {
  transform: translateY(-1px) scale(1.04) !important;
  background: #F4EDE0 !important;
  color: #2A2118 !important;
}

/* 2-Column Responsive Body Layout */
.forge-body-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
  width: 100%;
  flex: 1;
  min-height: 0;
  z-index: 2;
}

/* Left Column: 3D Turntable Preview Stage */
.forge-left-showcase {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.forge-preview-wrap {
  position: relative !important;
  width: 100% !important;
  height: 196px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: radial-gradient(circle at 50% 45%, #FFFFFF 0%, #ECE2D2 92%) !important;
  border: 1.5px solid #D6C4AA !important;
  box-shadow: inset 0 2px 10px rgba(42, 33, 24, 0.08), 0 3px 0 #DFD1BC !important;
  touch-action: none !important;
}

#forge-preview-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  cursor: grab;
}

#forge-preview-canvas:active {
  cursor: grabbing;
}

.forge-preview-hint {
  position: absolute !important;
  bottom: 8px !important;
  right: 10px !important;
  font-family: var(--font-game) !important;
  font-size: 9px !important;
  letter-spacing: 0.07em !important;
  background: rgba(250, 246, 238, 0.94) !important;
  border: 1px solid #D6C4AA !important;
  color: #5A4A3B !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 6px rgba(42, 33, 24, 0.1) !important;
  pointer-events: none !important;
}

/* Left Column Skin Metadata & Stacked Action Buttons */
.forge-selected-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #D6C4AA !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  box-shadow: 0 3px 0 #DFD1BC !important;
}

.forge-selected-meta {
  width: 100% !important;
}

.forge-skin-name {
  font-family: var(--font-game) !important;
  font-size: 14px !important;
  color: #2A2118 !important;
  letter-spacing: 0.03em !important;
  text-shadow: none !important;
}

.forge-skin-sub {
  font-family: var(--font-body) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #5A4A3B !important;
  margin-top: 2px !important;
  line-height: 1.3 !important;
}

.forge-actions-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.forge-actions-stack .duo-btn {
  width: 100% !important;
  height: 40px !important;
  font-size: 11.5px !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  white-space: nowrap !important;
}

.forge-actions-stack .duo-btn.hidden,
.forge-actions-stack .hidden,
#modal-forge .hidden,
#btn-forge-ad-trial.hidden {
  display: none !important;
}

/* Right Column: 3-column scrollable grid of skins */
.forge-right-roster {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.forge-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 9px !important;
  width: 100% !important;
  overflow-y: auto !important;
  max-height: 380px !important;
  padding: 3px 4px 8px 2px !important;
}

/* Custom Scrollbar for skin list */
.forge-grid::-webkit-scrollbar {
  width: 6px;
}
.forge-grid::-webkit-scrollbar-track {
  background: rgba(214, 196, 170, 0.25);
  border-radius: 4px;
}
.forge-grid::-webkit-scrollbar-thumb {
  background: #C7B296;
  border-radius: 4px;
}

/* Individual Relic Tile */
.skin-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  padding: 10px 6px 8px 6px !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #D6C4AA !important;
  box-shadow: 0 3px 0 #DFD1BC !important;
  cursor: pointer !important;
  min-width: 0 !important;
  text-align: center !important;
  transition: transform 0.12s var(--spring-bounce), box-shadow 0.12s ease, border-color 0.15s ease !important;
}

.skin-tile:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 0 #C7B398 !important;
  border-color: #B6A184 !important;
}

.skin-tile:active {
  transform: translateY(1px) !important;
  box-shadow: 0 1px 0 #C7B398 !important;
}

.skin-tile.selected {
  border-color: #2B72AD !important;
  background: #EDF5FC !important;
  box-shadow: 0 3px 0 #235D8F, 0 0 0 2px rgba(43, 114, 173, 0.2) !important;
  transform: scale(1.02) !important;
}

.skin-tile.locked {
  opacity: 0.88 !important;
}

.skin-tile-title {
  font-family: var(--font-game) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #2A2118 !important;
  letter-spacing: 0.02em !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.skin-tile-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  font-family: var(--font-body) !important;
  font-size: 8.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.05em !important;
  border-radius: 9999px !important;
  padding: 2px 7px !important;
  border: 1px solid #D6C4AA !important;
  box-shadow: none !important;
  text-transform: uppercase !important;
}

.skin-tile-badge.equipped {
  background: #DCF3E8 !important;
  border-color: #68BC96 !important;
  color: #134A33 !important;
}

.skin-tile-badge.unlocked {
  background: #FDF1DC !important;
  border-color: #DEC089 !important;
  color: #7D490C !important;
}

.skin-tile-badge.locked {
  background: #F4EDE0 !important;
  color: #5A4A3B !important;
  border-color: #D6C4AA !important;
}

/* Mobile & Portrait view for Relic Forge Modal (Zero outer scroll, action button always visible) */
@media screen and (max-width: 960px) and (orientation: portrait), screen and (max-width: 600px) {
  .forge-card.stone-panel-card {
    width: 95vw !important;
    max-height: 92dvh !important;
    padding: 12px 12px 12px !important;
    gap: 8px !important;
    overflow: hidden !important;
  }
  .forge-title {
    font-size: 17px !important;
  }
  .forge-body-layout {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }
  .forge-left-showcase {
    gap: 7px !important;
  }
  .forge-preview-wrap {
    height: 112px !important;
  }
  .forge-selected-row {
    padding: 7px 10px !important;
    gap: 6px !important;
  }
  .forge-actions-stack .duo-btn {
    height: 36px !important;
    font-size: 11px !important;
  }
  .forge-right-roster {
    min-height: 0 !important;
  }
  .forge-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    max-height: calc(100dvh - 370px) !important;
    min-height: 120px !important;
    gap: 6px !important;
  }
  .skin-tile {
    padding: 7px 4px !important;
    gap: 3px !important;
  }
}

/* Compact Landscape Phone Mode (height <= 560px) */
@media screen and (max-height: 560px) {
  .forge-card.stone-panel-card {
    width: min(96vw, 780px) !important;
    max-height: 94dvh !important;
    padding: 9px 12px 10px !important;
    gap: 6px !important;
    overflow: hidden !important;
  }
  .forge-card.stone-panel-card::after {
    display: none !important;
  }
  .forge-header {
    padding-bottom: 4px !important;
  }
  .forge-title {
    font-size: 16px !important;
  }
  .forge-body-layout {
    grid-template-columns: 210px 1fr !important;
    gap: 10px !important;
  }
  .forge-left-showcase {
    gap: 6px !important;
  }
  .forge-preview-wrap {
    height: 98px !important;
  }
  .forge-selected-row {
    padding: 6px 8px !important;
    gap: 5px !important;
  }
  .forge-skin-name {
    font-size: 11.5px !important;
  }
  .forge-skin-sub {
    font-size: 9px !important;
    line-height: 1.15 !important;
  }
  .forge-actions-stack {
    gap: 4px !important;
  }
  .forge-actions-stack .duo-btn {
    height: 32px !important;
    font-size: 10px !important;
  }
  .forge-grid {
    max-height: calc(100dvh - 120px) !important;
    align-content: start !important;
    gap: 6px !important;
  }
  .skin-tile {
    padding: 6px 4px !important;
    min-height: 74px !important;
    height: auto !important;
    justify-content: center !important;
    gap: 3px !important;
  }
  .skin-tile svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    flex-shrink: 0 !important;
  }
  .skin-tile-title {
    font-size: 9.5px !important;
    line-height: 1.15 !important;
    flex-shrink: 0 !important;
  }
  .skin-tile-badge {
    font-size: 7.5px !important;
    padding: 1.5px 6px !important;
    flex-shrink: 0 !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   VICTORY / STAGE CLEAR METRICS (3-COLUMN TRIAD: TIME, LIVES, ORBS)
   ────────────────────────────────────────────────────────────────────────── */
#modal-end .metrics-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

#modal-end .metric-box {
  background: #FFFFFF !important;
  border: 1.5px solid #D6C4AA !important;
  box-shadow: 0 3px 0 #DFD1BC !important;
  border-radius: 14px !important;
  padding: 8px 4px !important;
  text-align: center !important;
  min-width: 0 !important;
}

#modal-end .metric-val {
  font-family: var(--font-display) !important;
  font-size: clamp(13px, 3.2vw, 17px) !important;
  font-weight: 900 !important;
  color: #1F5B8E !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 22px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#modal-end .metric-lbl {
  font-family: var(--font-body) !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #5A4A3B !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   7. STRICT PAGE ISOLATION & UNIFIED SOFT ALABASTER POPUP SURFACES
   ========================================================================== */

/* Prevent any hidden page, tab, HUD, or play buttons from leaking or intercepting clicks */
#home-screen.hidden,
#home-screen.hidden *,
#game-hud.hidden,
#game-hud.hidden *,
#screen-arena-intro.hidden,
#screen-arena-intro.hidden *,
#panel-multi.hidden,
#panel-multi.hidden *,
#panel-training.hidden,
#panel-training.hidden *,
.tab-panel.hidden,
.tab-panel.hidden *,
.modal-backdrop.hidden,
.modal-backdrop.hidden * {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Soft Warm Translucent Scrim across all Popups & Modals */
.modal-backdrop,
#screen-arena-intro,
.orientation-modal {
  background: rgba(42, 33, 24, 0.34) !important;
  backdrop-filter: blur(12px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(125%) !important;
}

/* Unified Matte Warm Linen Surface for ALL Popups & Panels */
.duo-card,
.pause-card.stone-panel-card,
.forge-card.stone-panel-card,
.vault-card,
.intro-card,
.orientation-card,
.stone-panel,
#panel-training {
  background: linear-gradient(180deg, rgba(235, 227, 213, 0.96) 0%, rgba(223, 214, 197, 0.98) 100%) !important;
  backdrop-filter: blur(20px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(130%) !important;
  border: 2px solid #B8A78D !important;
  color: #2A2118 !important;
  box-shadow:
    0 20px 48px rgba(42, 33, 24, 0.22),
    0 4px 0 #B8A78D,
    inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.duo-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
  height: 1.5px !important;
}

.duo-card .card-heading {
  color: #2A2118 !important;
  text-shadow: none !important;
}

/* Inner Cards inside Modals */
#modal-end .metric-box,
.vault-item-card,
.pause-card .pause-toggles .toggle-chip,
.forge-selected-row,
.intro-hazard-item,
.podium-row {
  background: #EFE9DC !important;
  border: 1.5px solid #B8A78D !important;
  box-shadow: 0 3px 0 #C8B79E !important;
  color: #2A2118 !important;
}

.podium-row.is-me {
  background: linear-gradient(90deg, #FDF2DC 0%, #FFFFFF 100%) !important;
  border-color: #D5A357 !important;
  box-shadow: 0 3px 0 #D5A357 !important;
}

.podium-name {
  color: #2A2118 !important;
}

.podium-time {
  color: #1F5B8E !important;
}

#modal-end .metric-val {
  color: #1F5B8E !important;
}

#modal-end .metric-lbl {
  color: #5A4A3B !important;
}

.skin-tile {
  background: #FFFFFF !important;
  border-color: #D6C4AA !important;
}

.skin-tile.selected {
  background: #EDF5FC !important;
  border-color: #2B72AD !important;
}

/* Floating Toast & Spectate Bar */
#game-toast {
  background: rgba(250, 246, 238, 0.96) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid #D6C4AA !important;
  box-shadow: 0 8px 24px rgba(42, 33, 24, 0.16), 0 3px 0 #D6C4AA !important;
  color: #2A2118 !important;
}

#hud-spectate-bar {
  background: rgba(250, 246, 238, 0.94) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid #D6C4AA !important;
  color: #2A2118 !important;
}

/* ── Mobile Popups, Modals & Buttons Optimization (Zero-Scroll Buttons) ── */
#modal-podium .modal-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}

@media screen and (max-width: 960px), screen and (max-width: 600px) {
  .modal-backdrop {
    padding: 8px !important;
  }
  .duo-card,
  .pause-card.stone-panel-card,
  .vault-card,
  .intro-card,
  .orientation-card {
    width: min(94vw, 440px) !important;
    max-height: 94dvh !important;
    overflow-y: auto !important;
    padding: 14px 13px !important;
    border-radius: 20px !important;
  }
  .duo-card .card-heading,
  .pause-card .card-heading {
    font-size: 19px !important;
    margin-bottom: 8px !important;
  }
  .duo-btn {
    padding: 9px 10px !important;
    font-size: 11.5px !important;
    border-radius: 12px !important;
  }
  .vault-desc {
    margin-bottom: 10px !important;
    font-size: 11.5px !important;
  }
  .vault-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
  }
  .vault-item-card {
    padding: 12px 8px 10px !important;
    gap: 5px !important;
  }
  .vault-icon-circle {
    width: 36px !important;
    height: 36px !important;
  }
  .vault-card-title {
    font-size: 12.5px !important;
  }
  .vault-card-sub {
    min-height: 0 !important;
    font-size: 9.5px !important;
  }
  .duo-btn-vault-action {
    font-size: 10px !important;
    padding: 7px 6px !important;
  }
  .intro-hazard-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 10px 0 12px !important;
  }
  .intro-hazard-item {
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 9px 11px !important;
  }
  .intro-hazard-meta {
    align-items: flex-start !important;
    text-align: left !important;
  }
  #modal-podium .modal-row {
    grid-template-columns: 1fr 1fr !important;
  }
  #btn-podium-again {
    grid-column: 1 / -1 !important;
  }
  #game-hud {
    top: max(8px, env(safe-area-inset-top, 8px)) !important;
    left: 10px !important;
    right: 10px !important;
    padding: 0 !important;
  }
  .hud-center-pill,
  #hud-multi-pill,
  #hud-training-pill {
    padding: 5px 13px !important;
    gap: 8px !important;
    font-size: 12.5px !important;
  }
  #game-toast {
    max-width: 90vw;
    white-space: normal;
    text-align: center;
    font-size: 11px;
    padding: 6px 14px;
  }
}

@media screen and (max-height: 560px) {
  .modal-backdrop {
    padding: 6px !important;
  }
  .duo-card,
  .pause-card.stone-panel-card,
  .vault-card,
  .intro-card {
    width: min(94vw, 540px) !important;
    max-height: 94dvh !important;
    overflow-y: auto !important;
    padding: 10px 14px !important;
    border-radius: 18px !important;
  }
  .duo-card .card-heading,
  .pause-card .card-heading {
    font-size: 17px !important;
    margin-bottom: 6px !important;
  }
  .stars-showcase {
    margin: 2px 0 7px 0 !important;
    gap: 8px !important;
  }
  .stars-showcase .star-big {
    width: 30px !important;
    height: 30px !important;
  }
  #modal-end .metrics-grid {
    margin-bottom: 7px !important;
  }
  #modal-end .metric-box {
    padding: 5px 4px !important;
  }
  .reward-double-box {
    margin: 4px 0 7px !important;
    padding: 5px 8px !important;
    gap: 4px !important;
  }
  .duo-btn-reward {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
  .pause-card .pause-toggles {
    margin-bottom: 8px !important;
    gap: 6px !important;
  }
  .pause-card .pause-toggles .toggle-chip {
    padding: 6px 8px !important;
    font-size: 10px !important;
  }
  .pause-card .modal-actions {
    gap: 6px !important;
  }
  .pause-card .modal-actions .duo-btn {
    height: 34px !important;
    font-size: 11px !important;
  }
  .duo-btn {
    padding: 7px 10px !important;
    font-size: 11px !important;
  }
  .vault-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
  }
  .vault-item-card {
    padding: 9px 8px !important;
    gap: 4px !important;
  }
  .vault-icon-circle {
    width: 32px !important;
    height: 32px !important;
  }
  .vault-card-sub {
    min-height: 0 !important;
    font-size: 9.5px !important;
  }
  .podium-list {
    gap: 4px !important;
    margin: 3px 0 8px !important;
  }
  .podium-row {
    padding: 5px 9px !important;
  }
  #modal-podium .modal-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  #btn-podium-again {
    grid-column: auto !important;
  }
  #game-hud {
    top: max(6px, env(safe-area-inset-top, 6px)) !important;
    left: 10px !important;
    right: 10px !important;
    padding: 0 !important;
  }
  .hud-center-pill,
  #hud-multi-pill,
  #hud-training-pill {
    padding: 4px 13px !important;
    gap: 9px !important;
    font-size: 12px !important;
  }
  #game-hud .duo-icon-btn {
    width: 34px !important;
    height: 34px !important;
  }
}

/* =========================================================================
   FULL-3D TEMPLE STARTUP LOADING PAGE (#startup-loader)
   ========================================================================= */
#startup-loader {
  overflow: hidden;
  user-select: none;
  font-family: var(--font-body, 'Fredoka', 'Nunito', sans-serif);
}

#sl-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.sl-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: min(92vw, 480px);
  height: min(90vh, 640px);
  padding: 24px 16px 20px;
  text-align: center;
  pointer-events: none;
}

.sl-header-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sl-brand-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid #A78BFA;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.22);
  color: #4338CA;
  font-family: var(--font-game, 'Bungee', sans-serif);
  font-size: 10px;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.sl-title {
  margin: 0;
  font-family: var(--font-display, 'Bungee', sans-serif);
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.04;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  -webkit-text-stroke: 2px #3730A3;
  text-shadow:
    0 4px 0 #6D28D9,
    0 8px 18px rgba(49, 46, 129, 0.35);
}

.sl-progress-wrap {
  width: 100%;
  max-width: 370px;
  padding: 10px 14px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(67, 56, 202, 0.16);
}

.sl-progress-frame {
  width: 100%;
  height: 22px;
  padding: 3px;
  background: #EDE9FE;
  border: 2px solid #C4B5FD;
  border-radius: 9999px;
  box-shadow: inset 0 2px 4px rgba(67, 56, 202, 0.14);
  overflow: hidden;
}

.sl-progress-fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #38BDF8 0%, #8B5CF6 38%, #EC4899 72%, #FBBF24 100%);
  box-shadow: inset 0 -2px 0 rgba(67, 56, 202, 0.22);
  transition: width 0.14s linear;
  overflow: hidden;
}

.sl-progress-shine {
  position: absolute;
  top: 2px;
  left: 6px;
  right: 6px;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.62);
}

.sl-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 800;
  color: #312E81;
  text-shadow: none;
}

.sl-status-pct {
  font-family: var(--font-game, 'Bungee', sans-serif);
  font-size: 13px;
  color: #6D28D9;
  font-variant-numeric: tabular-nums;
}

@media (max-height: 460px) {
  .sl-overlay {
    height: 94vh;
    padding: 10px 14px;
  }
  .sl-title {
    font-size: 24px;
  }
}

/* ── Supabase Live Leaderboard Alabaster Tablet ── */
.leaderboard-stone-card {
  width: min(92vw, 540px) !important;
  max-width: 540px !important;
  max-height: min(92dvh, 580px) !important;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.98) 0%, rgba(244, 237, 224, 0.99) 100%) !important;
  border: 2px solid #D6C4AA !important;
  border-radius: 22px !important;
  padding: 18px !important;
  box-shadow: 0 20px 50px rgba(42, 33, 24, 0.16), 0 4px 0 #D6C4AA !important;
  color: #2A2118 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.supabase-badge-pill {
  font-family: var(--font-game);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  background: #DCF3E8;
  border: 1px solid #68BC96;
  color: #134A33 !important;
  border-radius: 9999px;
}

.leaderboard-arena-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.lb-tab {
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 11px;
  color: #5A4A3B;
  font-family: var(--font-game);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  padding: 7px 6px;
  cursor: pointer;
  box-shadow: 0 2px 0 #DFD1BC;
  transition: all 0.15s ease;
}

.lb-tab:hover {
  border-color: #B6A184;
  color: #2A2118;
  transform: translateY(-1px);
}

.lb-tab.active {
  background: linear-gradient(180deg, #FBE2A4 0%, #EEC26B 100%);
  border-color: #C69238;
  color: #2A2118;
  font-weight: 800;
  box-shadow: 0 2px 0 #B5812B;
}

.leaderboard-scroll-wrap {
  flex: 1 1 auto;
  min-height: 110px;
  max-height: calc(100dvh - 240px);
  overflow-y: auto;
  border-radius: 14px;
  background: #F4EDE0;
  border: 1.5px solid #D6C4AA;
  padding: 6px;
}

#leaderboard-table-rows > div:not(.lb-row) {
  color: #5A4A3B !important;
}

.leaderboard-scroll-wrap::-webkit-scrollbar {
  width: 6px;
}
.leaderboard-scroll-wrap::-webkit-scrollbar-track {
  background: rgba(214, 196, 170, 0.25);
}
.leaderboard-scroll-wrap::-webkit-scrollbar-thumb {
  background: #C7B296;
  border-radius: 4px;
}

.leaderboard-table {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.lb-row {
  display: grid;
  grid-template-columns: 34px 1fr 76px 64px;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid #E3D5C1;
  border-radius: 10px;
  padding: 7px 9px;
  font-family: var(--font-game);
  font-size: 11.5px;
  transition: transform 0.1s ease;
}

.lb-row:hover {
  border-color: #C7B398;
  background: #FAF6EE;
}

.lb-row.me {
  border-color: #68BC96;
  background: #E4F4EC;
  box-shadow: 0 2px 6px rgba(39, 132, 93, 0.12);
}

.lb-rank {
  font-size: 12.5px;
  font-weight: 900;
  color: #5A4A3B;
}
.lb-rank.gold { color: #9A5F0A; text-shadow: none; }
.lb-rank.silver { color: #475569; }
.lb-rank.bronze { color: #9A4A12; }

.lb-player {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #2A2118;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-skin-chip {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  background: #F4EDE0;
  border: 1px solid #D6C4AA;
  color: #5A4A3B;
  padding: 1.5px 6px;
  border-radius: 6px;
  text-align: center;
}

.lb-time {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #1F5B8E;
  font-size: 11.5px;
}

.leaderboard-stone-card .modal-actions {
  flex-shrink: 0;
  margin-top: 10px !important;
}

/* ── Left Header Account Pill ── */
.header-left {
  display: flex;
  align-items: center;
  z-index: 10;
}

.account-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 9999px;
  padding: 4px 12px 4px 5px;
  cursor: pointer;
  box-shadow: 0 3px 0 #C8B59B, 0 4px 10px rgba(42, 33, 24, 0.08);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
  color: #2A2118;
}

.account-nav-btn:hover {
  transform: translateY(-1px);
  border-color: #B6A184;
  background: #FAF6EE;
}

.account-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FBE2A4 0%, #EAB557 100%);
  border: 1.5px solid #B67D24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-game);
  font-size: 12px;
  font-weight: 900;
  color: #2A2118;
  flex-shrink: 0;
}

.account-nav-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.account-nav-name {
  font-family: var(--font-game);
  font-size: 11px;
  color: #2A2118;
  letter-spacing: 0.02em;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-nav-sub {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 800;
  color: #5A4A3B;
  letter-spacing: 0.02em;
}

/* ── Cloud Auth & Account Modal (Warm Alabaster Light Theme) ── */
.account-stone-card {
  width: min(94vw, 450px) !important;
  max-width: 450px !important;
  max-height: min(94dvh, 760px) !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #C7B296 rgba(244, 237, 224, 0.5);
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.98) 0%, rgba(244, 237, 224, 0.99) 100%) !important;
  border: 2px solid #D6C4AA !important;
  border-radius: 22px !important;
  padding: 18px 20px 18px !important;
  box-shadow: 0 20px 50px rgba(42, 33, 24, 0.16), 0 4px 0 #D6C4AA !important;
  color: #2A2118 !important;
  display: flex !important;
  flex-direction: column !important;
}

.account-stone-card::-webkit-scrollbar,
.account-achievements-list::-webkit-scrollbar {
  width: 6px;
}

.account-stone-card::-webkit-scrollbar-track,
.account-achievements-list::-webkit-scrollbar-track {
  background: rgba(214, 196, 170, 0.25);
  border-radius: 999px;
}

.account-stone-card::-webkit-scrollbar-thumb,
.account-achievements-list::-webkit-scrollbar-thumb {
  background: #C7B296;
  border-radius: 999px;
}

.account-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.account-stone-card .card-kicker {
  background: #FDF1DC !important;
  border: 1.5px solid #DEC089 !important;
  color: #7D490C !important;
  box-shadow: none !important;
  text-shadow: none !important;
  margin: 0 !important;
}

.auth-modal-heading {
  font-size: 21px !important;
  margin-bottom: 3px !important;
  letter-spacing: 0.03em;
  color: #2A2118 !important;
}

.auth-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #5A4A3B;
  line-height: 1.4;
  margin: 0 0 11px;
}

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

.auth-pw-pair-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #5A4A3B;
}

.auth-inline-link {
  border: none;
  background: transparent;
  padding: 2px 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  color: #1F5B8E;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  text-decoration: underline;
  text-decoration-color: rgba(31, 91, 142, 0.35);
  text-underline-offset: 3px;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible {
  color: #143E63;
  text-decoration-color: #143E63;
  outline: none;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-form .stone-input {
  width: 100%;
  height: 40px;
  background: #EFE9DC;
  border: 1.5px solid #B8A488;
  border-radius: 11px;
  padding: 0 13px;
  color: #2A2118;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: inset 0 1px 3px rgba(42, 33, 24, 0.06);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-form .stone-input::placeholder {
  color: #7A6958;
  font-weight: 600;
}

.auth-form .stone-input.auth-password-input {
  padding-right: 42px;
}

.auth-form .stone-input:focus {
  border-color: #2B72AD;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(43, 114, 173, 0.18);
}

/* Preserve light alabaster input appearance when browser autofills saved credentials */
.auth-form .stone-input:-webkit-autofill,
.auth-form .stone-input:-webkit-autofill:hover,
.auth-form .stone-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #2A2118 !important;
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  border-color: #B6A184 !important;
  caret-color: #2A2118 !important;
  transition: background-color 9999s ease-in-out 0s;
}

.auth-eye-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #5A4A3B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-eye-btn:hover,
.auth-eye-btn:focus-visible {
  color: #2A2118;
  background: rgba(214, 196, 170, 0.3);
  outline: none;
}

.auth-msg {
  padding: 8px 10px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.38;
  text-align: left;
}
.auth-msg.error {
  background: #FDECEC;
  border: 1.5px solid #E08B8B;
  color: #8B1E1E;
}
.auth-msg.success {
  background: #E4F4EC;
  border: 1.5px solid #68BC96;
  color: #134A33;
}

.auth-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.auth-btn-row .duo-btn {
  height: 40px;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-back-link {
  border: none;
  background: transparent;
  color: #5A4A3B;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 4px 2px;
  cursor: pointer;
  align-self: center;
  transition: color 0.15s ease;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
  color: #2A2118;
  outline: none;
}

.auth-recovery-code-box {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  box-shadow: 0 2px 8px rgba(42, 33, 24, 0.05);
}

/* Logged In State Profile Card */
.account-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 15px;
  padding: 11px 13px;
  margin-bottom: 10px;
}

.account-large-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #27845D 0%, #1D6B4A 100%);
  border: 2px solid #E7B85B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-game);
  font-size: 18px;
  font-weight: 900;
  color: #FFFFFF;
  flex-shrink: 0;
}

.account-profile-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  min-width: 0;
}

.account-user-name {
  font-family: var(--font-game);
  font-size: 14.5px;
  color: #2A2118;
}

.account-user-email {
  font-family: var(--font-body);
  font-size: 11px;
  color: #5A4A3B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sync-tag {
  font-family: var(--font-game);
  font-size: 9px;
  color: #134A33;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 6px;
}

.account-stat-box {
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
}

.account-stat-box .stat-num {
  font-family: var(--font-game);
  font-size: 16px;
  color: #8A4E0F;
}

.account-stat-box .stat-lbl {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #5A4A3B;
  margin-top: 2px;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  background: #EAE1D2;
  border: 1.5px solid #D6C4AA;
  border-radius: 13px;
  padding: 4px;
  margin-bottom: 11px;
}

.auth-mode-tab {
  border: none;
  background: transparent;
  color: #5A4A3B;
  font-family: var(--font-game);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 8px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-mode-tab:hover:not(.active) {
  color: #2A2118;
  background: rgba(255, 255, 255, 0.5);
}

.auth-mode-tab.active {
  background: #FFFFFF;
  color: #2A2118;
  box-shadow: 0 2px 6px rgba(42, 33, 24, 0.1);
}

.auth-verify-banner {
  background: #EAF4FC;
  border: 1.5px solid #96C4E6;
  border-radius: 12px;
  padding: 9px 11px;
  text-align: left;
}

.auth-verify-title {
  font-family: var(--font-game);
  font-size: 11.5px;
  color: #1A4E7A;
  margin-bottom: 3px;
}

.auth-verify-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.38;
  color: #2A2118;
}

.auth-otp-input {
  text-align: center;
  font-family: var(--font-game) !important;
  font-size: 17px !important;
  letter-spacing: 0.25em;
}

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

.account-section-card {
  background: #FFFFFF;
  border: 1.5px solid #D6C4AA;
  border-radius: 14px;
  padding: 9px 11px;
  margin-top: 7px;
  text-align: left;
}

.account-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-game);
  font-size: 10px;
  color: #5A4A3B;
  margin-bottom: 7px;
}

.account-active-pill {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 800;
  color: #134A33;
  background: #DCF3E8;
  border: 1px solid #68BC96;
  border-radius: 999px;
  padding: 2px 8px;
}

.account-balls-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-ball-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FAF6EE;
  border: 1.5px solid #D6C4AA;
  border-radius: 999px;
  padding: 3px 9px 3px 5px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  color: #2A2118;
}

.account-ball-chip.is-equipped {
  border-color: #68BC96;
  background: #E4F4EC;
  color: #134A33;
}

.account-ball-chip svg {
  width: 18px;
  height: 18px;
}

.account-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 130px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #C7B296 rgba(244, 237, 224, 0.5);
  padding-right: 4px;
}

.account-user-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.account-user-actions .duo-btn {
  height: 38px;
  font-size: 11px;
}

.account-user-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.duo-btn-tangerine {
  background: linear-gradient(180deg, #FBE2A4 0%, #EEC26B 100%);
  color: #2A2118;
  border: 1.5px solid #C69238;
  box-shadow: 0 3px 0 #B5812B;
}

.duo-btn-tangerine:hover {
  filter: brightness(1.03);
}

#btn-auth-signout {
  background: linear-gradient(180deg, #FDECEC 0%, #F9D8D8 100%);
  color: #8B1E1E;
  border: 1.5px solid #DFA3A3;
  box-shadow: 0 3px 0 #CE8B8B;
}

.account-ach-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #FAF6EE;
  border: 1px solid #E3D6C3;
  border-radius: 10px;
  padding: 6px 8px;
  opacity: 0.78;
}

.account-ach-row.unlocked {
  opacity: 1;
  border-color: #DEC089;
  background: #FDF4E3;
}

.account-ach-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #E3D6C3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.account-ach-meta {
  flex: 1;
  min-width: 0;
}

.account-ach-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  color: #2A2118;
}

.account-ach-desc {
  font-family: var(--font-body);
  font-size: 9.5px;
  color: #5A4A3B;
}

.account-ach-state {
  font-family: var(--font-game);
  font-size: 8.5px;
  color: #8A4E0F;
  flex-shrink: 0;
}

.account-ach-row:not(.unlocked) .account-ach-state {
  color: #695747;
}

/* ── Mobile Account & Leaderboard Modal Fit (No Scrolling Needed for Buttons) ── */
@media (max-width: 960px), (max-width: 600px) {
  .leaderboard-stone-card {
    padding: 12px 12px !important;
    max-height: 92dvh !important;
  }
  .leaderboard-arena-tabs {
    gap: 5px;
    margin-bottom: 8px;
  }
  .lb-tab {
    font-size: 9.5px;
    padding: 6px 4px;
  }
  .leaderboard-scroll-wrap {
    max-height: calc(100dvh - 210px);
  }
  .lb-row {
    grid-template-columns: 30px 1fr 64px 56px;
    padding: 6px 7px;
    font-size: 10.5px;
  }
  .account-stone-card {
    padding: 13px 13px 14px !important;
    border-radius: 18px !important;
    max-height: 94dvh !important;
  }
  .auth-modal-heading {
    font-size: 17px !important;
  }
  .auth-subtitle {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .auth-mode-tabs {
    margin-bottom: 8px;
  }
  .auth-mode-tab {
    font-size: 9.5px;
    padding: 7px 5px;
  }
  .auth-form {
    gap: 8px;
  }
  .auth-form .stone-input {
    height: 36px;
    font-size: 12.5px;
  }
  .auth-recovery-code-box {
    padding: 9px;
    gap: 7px;
  }
  .auth-btn-row .duo-btn {
    height: 36px;
    font-size: 10.5px;
  }
  .account-achievements-list {
    max-height: 82px;
  }
  .account-profile-card {
    padding: 8px 10px;
    margin-bottom: 7px;
  }
  .account-stat-box {
    padding: 6px 4px;
  }
  .account-user-actions {
    margin-top: 8px;
    gap: 6px;
  }
  .account-user-actions .duo-btn {
    height: 34px;
    font-size: 10.5px;
  }
}

@media (max-height: 560px) {
  .leaderboard-stone-card {
    width: min(94vw, 560px) !important;
    max-height: 94dvh !important;
    padding: 10px 13px !important;
  }
  .leaderboard-scroll-wrap {
    min-height: 80px;
    max-height: calc(100dvh - 175px);
  }
  .account-stone-card {
    width: min(94vw, 560px) !important;
    max-width: 560px !important;
    max-height: 94dvh !important;
    padding: 10px 14px 12px !important;
  }
  .auth-pw-pair-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
  }
  .auth-verify-banner {
    padding: 6px 9px;
  }
  .auth-verify-sub {
    font-size: 10px;
  }
  .auth-form {
    gap: 6px;
  }
  .auth-form .stone-input {
    height: 33px;
    font-size: 12px;
  }
  .auth-recovery-code-box {
    padding: 8px;
    gap: 6px;
  }
  .auth-btn-row .duo-btn {
    height: 34px;
    font-size: 10px;
  }
  .account-achievements-list {
    max-height: 62px;
  }
  .account-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-top: 7px;
  }
  .account-user-actions-row {
    display: contents;
  }
  .account-user-actions .duo-btn {
    height: 32px;
    font-size: 9.5px;
  }
}






