/* ==========================================================================
   PERSPECTIVE™ — Visual Curiosity & Extreme Scale Discovery Engine
   Vivid Pop & Hyper-Colorful Modern Design System
   ========================================================================== */

:root {
  /* Neo-Futuristic Typography Stack (Outfit + Plus Jakarta Sans + Space Mono) */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, "SF Mono", monospace;
  --font-heading: var(--font-display);

  /* Luminous, Joyful & Full-Color Foundation */
  --bg-deep: #f8fafc;
  --bg-base: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5fd;
  --bg-glass: rgba(255, 255, 255, 0.95);
  
  --border-subtle: #e2e8f0;
  --border-strong: #c7d2fe;
  --border-glow: #38bdf8;
  --border-glow-magenta: #ec4899;

  --text-primary: #0f172a;    /* High-contrast crisp midnight */
  --text-secondary: #334155;  /* Deep readable charcoal */
  --text-muted: #64748b;      /* Slate neutral */
  --text-accent: #0284c7;

  --accent-cyan: #0284c7;       /* Electric Blue */
  --accent-magenta: #ec4899;    /* Hot Fuchsia Pink */
  --accent-violet: #8b5cf6;     /* Vivid Purple */
  --accent-purple: #8b5cf6;     /* Standardized purple token */
  --accent-emerald: #10b981;    /* Lush Mint Emerald */
  --accent-amber: #f59e0b;      /* Solar Gold / Tangerine */
  --accent-blue: #3b82f6;       /* Azure Glow */
  --accent-rose: #f43f5e;       /* Laser Coral */

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-pill: 9999px;

  --header-h: 68px;

  /* Standardized z-index hierarchy token scale */
  --z-base: 0;
  --z-raised: 10;
  --z-header: 100;
  --z-dock: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;

  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-elevation: 0 20px 48px -10px rgba(99, 102, 241, 0.14), 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 28px rgba(14, 165, 233, 0.25);
  --shadow-glow-pink: 0 0 28px rgba(236, 72, 153, 0.25);
  --shadow-glow-violet: 0 0 28px rgba(139, 92, 246, 0.25);
  --shadow-glow-mint: 0 0 28px rgba(16, 185, 129, 0.25);
  --shadow-glow-gold: 0 0 28px rgba(245, 158, 11, 0.25);
  --specular-inner: inset 0 1px 0 rgba(255, 255, 255, 0.95);

  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;
  --spring-bounce: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 68px) + 24px);
}

.engine-section,
.arena-section,
#scale-arena,
#wealth-arena,
#abyss-arena,
#what-it-buys-arena,
#quiz-arena,
#arcade-arena,
.feed-section {
  scroll-margin-top: calc(var(--header-h, 68px) + 24px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Accessibility Focus Rings (Dr. Maya Lin) */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.stage-title,
.feed-heading,
.modal-title,
.blitz-balance-huge {
  font-family: var(--font-display);
}

/* Tabular numbers for measurements (Camille Dupont) */
.tabular-numbers, 
.metric-value, 
.card-scale-badge, 
.modal-spec-val,
.quiz-streak-badge,
.hud-metric-val {
  font-variant-numeric: tabular-nums;
}

/* Radiant Multi-Color Aurora Watercolor Sky */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1600px;
  height: 950px;
  background: 
    radial-gradient(ellipse 75% 55% at 50% -5%, rgba(56, 189, 248, 0.38), transparent 70%),
    radial-gradient(ellipse 60% 50% at 90% 12%, rgba(192, 132, 252, 0.4), transparent 70%),
    radial-gradient(ellipse 55% 50% at 10% 18%, rgba(251, 113, 133, 0.38), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 65%, rgba(52, 211, 153, 0.32), transparent 70%),
    radial-gradient(ellipse 40% 35% at 85% 55%, rgba(251, 191, 36, 0.3), transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(55px);
}

/* ==================== VIBRANT NAV HEADER ==================== */
.nav-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header, 100);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: var(--spring-bounce);
  position: relative;
  overflow: hidden;
}

.brand-wrapper:hover .brand-mark {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  border-color: #38bdf8;
}

.brand-emblem-svg {
  width: 28px;
  height: 28px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-wrapper:hover .brand-emblem-svg {
  transform: rotate(-10deg) scale(1.1);
}

.brand-identity {
  display: flex;
  flex-direction: column;
}

.brand-wordmark {
  font-family: "Outfit", var(--font-display), sans-serif;
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: -0.035em;
  color: #0f172a;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  transition: var(--transition-smooth);
}

.brand-trademark {
  font-size: 0.62rem;
  font-weight: 800;
  color: #94a3b8;
  margin-left: 3px;
  letter-spacing: 0;
}

.brand-wrapper:hover .brand-wordmark {
  transform: translateY(-1px);
}

/* Laser-etched Anodized Equipment Sub-Decal Plate */
.brand-sub-decal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  padding: 2px 7px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.decal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  animation: pulseDecalDot 2.2s infinite ease-in-out;
}

@keyframes pulseDecalDot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px rgba(16, 185, 129, 0.9); }
  50% { opacity: 0.5; transform: scale(0.85); box-shadow: 0 0 3px rgba(16, 185, 129, 0.4); }
}

.decal-txt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #475569;
}

.decal-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #38bdf8;
  border: 1px solid #334155;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.08em;
}

/* Responsive Navigation Actions (Kenji Sato) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}

.nav-actions::-webkit-scrollbar {
  display: none;
}

/* Metric / Imperial Unit Switcher */
.unit-switcher-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  display: flex;
  padding: 3px;
  box-shadow: var(--specular-inner);
}

.unit-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.unit-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

/* Sound FX Toggle */
.btn-sound-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
}

.btn-sound-toggle:hover {
  background: #f0f9ff;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.btn-sound-toggle.active {
  background: #f0fdf4;
  border-color: #10b981;
  color: #059669;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.btn-roulette {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  border: none;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35);
  transition: var(--spring-bounce);
}

.btn-roulette:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.5);
}

.btn-roulette:active {
  transform: scale(0.96);
}

.btn-game-jump {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  border: none;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  transition: var(--spring-bounce);
}

.btn-game-jump:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
}

.nav-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  width: 190px;
  box-shadow: var(--specular-inner);
  transition: var(--transition-smooth);
}

.nav-search-bar:focus-within {
  border-color: var(--border-glow);
  width: 240px;
  background: var(--bg-surface-elevated);
}

.nav-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
}

/* ==================== HERO ARENA: THE SCALE LAB ==================== */
.hero-stage-section {
  position: relative;
  z-index: 10;
  max-width: 1440px;
  margin: 24px auto;
  padding: 0 24px;
}

.stage-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-elevation), var(--specular-inner);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.stage-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.7), rgba(168, 85, 247, 0.7), transparent);
}

.stage-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stage-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   PERSPECTIVE™ MODERN DESIGN SYSTEM (Apple / Linear / Stripe Standard)
   Hyper-Refined Luminous Pill Badges
   ========================================================================== */
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body, "Plus Jakarta Sans", sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.tech-pill:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(2, 132, 199, 0.08);
}

/* Luminous Jewel Dot (Stripe / Linear Status Pattern) */
.tech-pill-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.tech-pill-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  opacity: 0.45;
  animation: pillDotBreathe 2.4s infinite ease-in-out;
}

@keyframes pillDotBreathe {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.6); opacity: 0.1; }
}

/* Color Accent Variations */
.pill-blue .tech-pill-dot { background: #0284c7; }
.pill-blue .tech-pill-dot::after { background: #0284c7; }
.pill-blue { border-color: rgba(2, 132, 199, 0.3); color: #0369a1; background: #f0f9ff; }

.pill-emerald .tech-pill-dot { background: #10b981; }
.pill-emerald .tech-pill-dot::after { background: #10b981; }
.pill-emerald { border-color: rgba(16, 185, 129, 0.3); color: #047857; background: #f0fdf4; }

.pill-cyan .tech-pill-dot { background: #06b6d4; }
.pill-cyan .tech-pill-dot::after { background: #06b6d4; }
.pill-cyan { border-color: rgba(6, 182, 212, 0.3); color: #0e7490; background: #ecfeff; }

.pill-amber .tech-pill-dot { background: #f59e0b; }
.pill-amber .tech-pill-dot::after { background: #f59e0b; }
.pill-amber { border-color: rgba(245, 158, 11, 0.3); color: #b45309; background: #fffbeb; }

.pill-purple .tech-pill-dot { background: #8b5cf6; }
.pill-purple .tech-pill-dot::after { background: #8b5cf6; }
.pill-purple { border-color: rgba(139, 92, 246, 0.3); color: #6d28d9; background: #f5f3ff; }

.pill-meta {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  padding-left: 6px;
  border-left: 1px solid rgba(203, 213, 225, 0.7);
  margin-left: 2px;
}

/* Holographic Micro Spec Stamp */
.holo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.88));
  border: 1.5px solid #93c5fd;
  color: #1e3a8a;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

.holo-badge::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.2), rgba(56, 189, 248, 0.25), transparent);
  transition: 0.5s;
}

.holo-badge:hover::after {
  left: 100%;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0284c7;
  background: #e0f2fe;
  border: 1.5px solid #38bdf8;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.verified-stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #059669;
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.stage-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.15rem);
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.stage-subtitle {
  color: var(--text-secondary);
  font-size: 0.94rem;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.5;
  max-width: 720px;
}

/* Scale Stacker Props Bar */
.scale-stacker-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.stacker-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stacker-btn {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--specular-inner);
  transition: var(--spring-bounce);
}

.stacker-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--accent-blue);
  transform: scale(1.05);
}

.stacker-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

/* Comparison selectors */
.comparison-selectors {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

@media (max-width: 768px) {
  .comparison-selectors {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.selector-side {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.side-label {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.label-a { 
  background: #e0f2fe; 
  color: #0284c7; 
  border: 1.5px solid #38bdf8;
}

.label-b { 
  background: #ffe4e6; 
  color: #e11d48; 
  border: 1.5px solid #f43f5e;
}

.object-select {
  background: var(--bg-surface);
  border: 1.5px solid #cbd5e1;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
}

.object-select:focus {
  border-color: var(--accent-cyan);
}

.clash-control-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.swap-btn {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border: none;
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  transition: var(--spring-bounce);
  margin: 0;
}

.swap-btn:hover {
  transform: rotate(180deg) scale(1.12);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.stage-vs-badge {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  background: #ffe600;
  color: #0f172a;
  border: 2px solid #0f172a;
  padding: 4px 10px;
  border-radius: 6px;
  transform: rotate(-6deg) skewX(-4deg);
  box-shadow: 2.5px 2.5px 0px #0f172a;
  text-shadow: 1px 1px 0px #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: var(--spring-bounce);
}

.stage-vs-badge:hover {
  transform: rotate(4deg) scale(1.18);
  box-shadow: 3.5px 3.5px 0px #ff0055;
  background: #ffea2e;
}

/* Scale Arena SVG — Luminous Horizon Stage */
.scale-arena {
  background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 30%, #ede9fe 65%, #fce7f3 90%, #fef3c7 100%);
  border: 2px solid #a5b4fc;
  border-radius: var(--radius-md);
  padding: 20px 24px 0;
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.12), inset 0 2px 6px rgba(255, 255, 255, 0.8);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(99, 102, 241, 0.1) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.scale-canvas-svg {
  width: 100%;
  height: 380px;
  display: block;
  position: relative;
  z-index: 2;
  transform: translateZ(0); /* GPU acceleration */
}

/* Perspective Intel Cards */
.perspective-intel-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
}

.intel-metric-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: var(--spring-bounce);
}

.intel-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.intel-metric-card:nth-child(1) {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.intel-metric-card:nth-child(2) {
  border-color: #f43f5e;
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.intel-metric-card:nth-child(3) {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fefce8 0%, #ffffff 100%);
}

.intel-metric-card:nth-child(4) {
  border-color: #10b981;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.metric-subtitle {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 800;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.3rem;
  font-weight: 950;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.metric-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.45;
}

/* ==================== QUIZ ARENA (Sophia #9) ==================== */
.quiz-section {
  max-width: 1440px;
  margin: 40px auto 0;
  padding: 0 24px;
}

.quiz-container {
  background: linear-gradient(135deg, #fdf4ff 0%, #eff6ff 50%, #f0fdf4 100%);
  border: 2px solid #c084fc;
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  box-shadow: 0 12px 36px rgba(192, 132, 252, 0.15);
}

.quiz-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.quiz-title {
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-streak-badge {
  background: #fff1f2;
  border: 2px solid #f43f5e;
  color: #e11d48;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.2);
}

.quiz-cards-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .quiz-cards-grid {
    grid-template-columns: 1fr;
  }
}

.quiz-choice-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: var(--spring-bounce);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.quiz-choice-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2);
}

.quiz-choice-card:active {
  transform: scale(0.97);
}

.quiz-choice-img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 2px solid var(--border-strong);
}

.quiz-choice-name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.quiz-choice-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.quiz-vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  user-select: none;
}

.vs-arcade-stamp {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  border: 3px solid #0f172a;
  padding: 6px 18px;
  border-radius: 8px;
  transform: rotate(-6deg) skewX(-6deg);
  box-shadow: 4px 4px 0px #0f172a, 0 8px 20px rgba(239, 68, 68, 0.4);
  text-shadow: 2px 2px 0px #7f1d1d;
  transition: var(--spring-bounce);
  animation: rumbleIdle 3s infinite ease-in-out;
}

@keyframes rumbleIdle {
  0%, 100% { transform: rotate(-6deg) skewX(-6deg) scale(1); }
  50% { transform: rotate(-4deg) skewX(-4deg) scale(1.05); }
}

.quiz-vs-divider:hover .vs-arcade-stamp {
  transform: rotate(6deg) scale(1.2) skewX(2deg);
  box-shadow: 6px 6px 0px #0f172a, 0 12px 28px rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, #ff0055, #f43f5e);
}

.vs-sub-strike {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #0f172a;
  background: #ffe600;
  border: 1.5px solid #0f172a;
  padding: 1px 6px;
  border-radius: 3px;
  transform: rotate(3deg);
  margin-top: 4px;
}

.quiz-feedback-bar {
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
  display: none;
}

.quiz-feedback-bar.correct {
  display: block;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--accent-emerald);
}

.quiz-feedback-bar.wrong {
  display: block;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: var(--accent-rose);
}

/* ==========================================================================
   THE ARCADE SUITE: MULTI-GAME & SANDBOX LIBERTY (Item 3)
   ========================================================================== */
.arcade-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.arcade-tab-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--spring-bounce);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.arcade-tab-btn:hover {
  color: #0f172a;
  border-color: #818cf8;
  transform: translateY(-2px);
}

.arcade-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 50%, #ec4899 100%);
  border-color: transparent;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}

.arcade-panel {
  display: none;
  animation: fadeInEngine 0.25s ease-out;
}

.arcade-panel.active-game {
  display: block;
}

/* STACKER GUESSER GAME */
.stacker-guesser-box {
  background: #ffffff;
  border: 2px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.08);
}

.stacker-guess-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.stacker-guess-slider {
  flex: 1;
  min-width: 220px;
  accent-color: var(--accent-amber);
  cursor: pointer;
}

.stacker-drop-arena {
  background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 50%, #fed7aa 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-sm);
  min-height: 220px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
}

.stacker-icons-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 90%;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.stacker-icon-item {
  animation: dropIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-40px) scale(0.6); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.btn-test-guess {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 900;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  transition: var(--spring-bounce);
}

.btn-test-guess:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* BILLIONAIRE 60S BLITZ */
.blitz-header-strip {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #eff6ff 100%);
  border: 2px solid #10b981;
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.12);
}

.blitz-balance-huge {
  font-size: 2.2rem;
  font-weight: 950;
  color: #059669;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.blitz-timer-pill {
  background: #fdf2f8;
  border: 2px solid #ec4899;
  color: #be185d;
  font-size: 1.1rem;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.2);
}

.blitz-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.blitz-item-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: var(--spring-bounce);
}

.blitz-item-card:hover {
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.blitz-buy-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--spring-bounce);
  flex: 1;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.blitz-buy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.blitz-sell-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.blitz-sell-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* SANDBOX MATCHUP ARENA */
.sandbox-controls-strip {
  background: #ffffff;
  border: 2px solid #c7d2fe;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.06);
}

.sandbox-zoom-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid #cbd5e1;
}

/* ==================== DISCOVERY FEED & ENDLESS STREAM ==================== */
.feed-section {
  max-width: 1440px;
  margin: 52px auto;
  padding: 0 24px;
}

.feed-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.feed-heading {
  font-size: 1.6rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.category-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-filter-pills::-webkit-scrollbar {
  display: none;
}

.cat-filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--specular-inner);
  transition: var(--spring-bounce);
}

.cat-filter-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.cat-filter-btn.active {
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #ffffff;
  font-weight: 900;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* MASONRY / CARD STREAM (Tariq Hassan 60fps Optimization) */
.cards-stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.stream-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: var(--spring-bounce);
  cursor: pointer;
  position: relative;
  content-visibility: auto; /* 60fps rendering */
  contain-intrinsic-size: 0 420px;
}

.stream-card:hover {
  transform: translateY(-6px);
  border-color: #818cf8;
  box-shadow: 0 16px 36px rgba(99, 102, 241, 0.16);
}

/* Fixed 16:10 aspect ratio on card media (Camille Dupont) */
.card-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 50%, #fce7f3 100%);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  decoding: async;
}

.stream-card:hover .card-img {
  transform: scale(1.06);
}

.card-tag-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid #818cf8;
  color: #4338ca;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-scale-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid #0284c7;
  color: #0284c7;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

/* Heart Button */
.card-heart-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #64748b;
  cursor: pointer;
  transition: var(--spring-bounce);
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-heart-btn:hover {
  transform: scale(1.18);
  color: #ec4899;
  border-color: #ec4899;
}

.card-heart-btn.liked {
  background: #fdf2f8;
  border-color: #ec4899;
  color: #ec4899;
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

.card-factoid {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Mind-Blown Reaction Counter */
.card-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.mind-blown-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--spring-bounce);
}

.mind-blown-btn:hover {
  background: #fefce8;
  border-color: #f59e0b;
  color: #b45309;
  transform: scale(1.05);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  gap: 8px;
}

.card-scale-metric {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
}

.card-button-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-intel-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: var(--spring-bounce);
}

.card-intel-btn:hover {
  color: #0f172a;
  border-color: #818cf8;
  background: #e2e8f0;
}

.card-compare-btn {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: none;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: var(--spring-bounce);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.card-compare-btn:hover {
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
  transform: scale(1.05);
}

/* SPONSORED EDITORIAL AD CARD */
.stream-card.sponsored-card {
  border: 2px dashed #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, var(--bg-surface) 100%);
}

.sponsored-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* ==================== DEEP DIVE INTEL MODAL & MOBILE BOTTOM SHEET (Kenji Sato) ==================== */
.intel-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.intel-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.intel-modal-window {
  background: #ffffff;
  border: 2px solid #818cf8;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(99, 102, 241, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Mobile Bottom Sheet Transform (Kenji Sato) */
@media (max-width: 768px) {
  .intel-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .intel-modal-window {
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    border-bottom: none;
  }

  .modal-drag-handle {
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 999px;
    margin: 10px auto 0;
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: var(--spring-bounce);
}

.modal-close-btn:hover {
  transform: scale(1.1);
  background: #fff1f2;
  color: #e11d48;
  border-color: #f43f5e;
}

.modal-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.modal-body {
  padding: 26px;
  background: #ffffff;
}

.modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.modal-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.modal-spec-cell {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.modal-spec-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-spec-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0284c7;
  margin-top: 2px;
}

.modal-trivia-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.55;
  margin: 16px 0;
}

.modal-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.modal-actions-bar {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.modal-btn-stage {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
  transition: var(--spring-bounce);
}

.modal-btn-stage:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.modal-btn-share {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--spring-bounce);
}

.modal-btn-share:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #e2e8f0;
}


/* ==========================================================================
   CEO ADOPS TELEMETRY HUD (TM-2 & TM-4)
   ========================================================================== */
/* ==========================================================================
   CEO ADOPS TELEMETRY HUD (TM-2 & TM-4)
   ========================================================================== */
.ceo-adops-hud {
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdf4 50%, #fdf4ff 100%);
  border-bottom: 2px solid #818cf8;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
  padding: 10px 24px;
  font-size: 0.8rem;
  color: #334155;
  position: relative;
  z-index: 99;
  display: none; /* Toggled via CEO HUD button */
  animation: slideDownHud 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ceo-adops-hud.open {
  display: block;
}

@keyframes slideDownHud {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hud-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.hud-badge-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 900;
  color: #4338ca;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  background: #e0e7ff;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #a5b4fc;
}

.hud-telemetry-grid {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hud-metric-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #cbd5e1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hud-metric-val {
  color: #0f172a;
  font-weight: 800;
}

.hud-metric-refresh {
  color: #d97706;
  font-weight: 800;
}

.hud-toggle-btn {
  background: linear-gradient(135deg, #0284c7 0%, #10b981 100%);
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--spring-bounce);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.hud-toggle-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   MASTER MODE SWITCHER BAR
   ========================================================================== */
.master-mode-bar-section {
  max-width: 1440px;
  margin: 16px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.master-mode-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-pill);
  border: 2px solid #e0e7ff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}

.master-mode-nav::-webkit-scrollbar {
  display: none;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--spring-bounce);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mode-tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.mode-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 50%, #ec4899 100%);
  color: #ffffff;
  border: none;
  font-weight: 900;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.mode-badge-hot {
  font-size: 0.65rem;
  font-weight: 900;
  background: var(--accent-rose);
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   INTERACTIVE SECTIONS: WEALTH, ABYSS, WHAT IT BUYS
   ========================================================================== */
.engine-section {
  display: none;
  max-width: 1440px;
  margin: 32px auto 0;
  padding: 0 24px;
  animation: fadeInEngine 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.engine-section.active-mode {
  display: block;
}

@keyframes fadeInEngine {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* WEALTH REALITY STAGE */
.wealth-card-panel {
  background: #ffffff;
  border: 2px solid #a7f3d0;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.1);
  position: relative;
  overflow: hidden;
}

.wealth-card-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #06b6d4, #8b5cf6);
}

.wealth-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.cash-volume-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.cash-pill-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--spring-bounce);
}

.cash-pill-btn:hover {
  color: #0f172a;
  border-color: #10b981;
}

.cash-pill-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: transparent;
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.wealth-visual-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 960px) {
  .wealth-visual-grid {
    grid-template-columns: 1fr;
  }
}

.wealth-isometric-canvas {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  border: 2px solid #10b981;
  border-radius: var(--radius-md);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
}

.wealth-calculator-box {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wage-input-row {
  margin-top: 14px;
}

.wage-slider {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--accent-emerald);
  cursor: pointer;
}

.wage-presets-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.wage-preset-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wage-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.salary-result-card {
  background: #f0fdf4;
  border: 2px solid #10b981;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 18px;
}

.salary-big-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: #059669;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* ==========================================================================
   DEEP OCEAN ABYSS ENGINE (TM-1 & Sophia #8)
   ========================================================================== */
.abyss-card-panel {
  background: #ffffff;
  border: 2px solid #93c5fd;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.1);
  position: relative;
  overflow: hidden;
}

.abyss-card-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #3b82f6, #6366f1);
}

.abyss-depth-controller {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  border: 2px solid #e2e8f0;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.abyss-depth-slider {
  flex: 1;
  min-width: 200px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.abyss-depth-readout {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-cyan);
  font-variant-numeric: tabular-nums;
}

.abyss-viewport-box {
  border-radius: var(--radius-md);
  height: 480px;
  border: 2px solid #38bdf8;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 36px rgba(14, 165, 233, 0.15);
}

.abyss-zone-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #0284c7;
  color: #0369a1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.abyss-creature-showcase {
  text-align: center;
  z-index: 2;
}

.abyss-creature-illustration {
  font-size: 4rem;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  animation: floatSea 4s ease-in-out infinite;
}

@keyframes floatSea {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.abyss-pressure-strip {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  border: 2px solid #818cf8;
  font-size: 0.84rem;
  color: #1e293b;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   WHAT IT BUYS & BREAK-EVEN ENGINE (TM-1 & TM-9)
   ========================================================================== */
.what-buys-panel {
  background: #ffffff;
  border: 2px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.1);
  position: relative;
  overflow: hidden;
}

.what-buys-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6);
}

.tier-category-pills {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.tier-cat-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--spring-bounce);
}

.tier-cat-btn:hover {
  color: #0f172a;
  border-color: #f59e0b;
}

.tier-cat-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-color: transparent;
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.budget-tier-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .budget-tier-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .budget-tier-cards-grid {
    grid-template-columns: 1fr;
  }
}

.tier-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: var(--spring-bounce);
}

.tier-card:hover {
  transform: translateY(-3px);
  border-color: #818cf8;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.tier-card.sweet-spot {
  border: 2px solid #10b981;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.18);
}

.sweet-spot-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.break-even-strip {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 50%, #fed7aa 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  color: #78350f;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
}

.break-even-btn-group {
  display: flex;
  gap: 8px;
}

.freq-btn {
  background: #ffffff;
  border: 1px solid #f59e0b;
  color: #78350f;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--spring-bounce);
}

.freq-btn.active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   MONETIZATION AD UNITS: STICKY RAIL & BOTTOM ADHESION (TM-2 & TM-4)
   ========================================================================== */
.ad-slot-wrapper {
  background: #ffffff;
  border: 2px dashed #93c5fd;
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.08);
}

.ad-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #4338ca;
  text-transform: uppercase;
  padding: 4px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  display: block;
}

/* Sticky Right Rail & Mobile Bottom Adhesion Layout Rules */
.desktop-sticky-rail {
  width: 300px;
}

.mobile-bottom-adhesion {
  width: 100%;
}

.ad-close-cross {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* EDITORIAL FOOTER */
.editorial-footer {
  max-width: 1440px;
  margin: 80px auto 40px;
  padding: 40px 24px 0;
  border-top: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   ARTHUR 'ARTIE' STERLING — VINTAGE RETRO & ANALOG TACTILITY SYSTEM
   Unifying Soren Kjaer's Typography & Dr. Vance's Silhouettes
   Ex-Criterion Collection / Teenage Engineering / Moog Analog Console Aesthetic
   ========================================================================== */

/* ==========================================================================
   CYBER HOLOGRAPHIC X-RAY CAD MODE (Press 'X')
   ========================================================================== */
.btn-holo-toggle {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border: 1.5px solid #0284c7;
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  box-shadow: 
    0 2px 10px rgba(2, 132, 199, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: var(--spring-bounce);
  user-select: none;
}

.btn-holo-toggle:hover {
  border-color: #22d3ee;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.45);
}

.btn-holo-toggle.active {
  background: linear-gradient(180deg, #083344 0%, #0c4a6e 100%);
  border-color: #06b6d4;
  color: #a5f3fc;
  box-shadow: 
    0 0 20px rgba(6, 182, 212, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.holo-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
}

.btn-holo-toggle.active .holo-led {
  background: #06b6d4;
  box-shadow: 0 0 8px #06b6d4, 0 0 16px rgba(6, 182, 212, 0.8), inset 0 1px 1px #cffafe;
}

/* Hologram CAD Matrix Screen Overlay */
.hologram-screen-overlay {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
}

body.hologram-mode .hologram-screen-overlay,
body.holo-active .hologram-screen-overlay {
  display: block;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  box-shadow: inset 0 0 100px rgba(6, 182, 212, 0.12);
}

body.hologram-mode .scale-canvas-svg,
body.holo-active .scale-canvas-svg {
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.5));
}

body.hologram-mode .stage-wrapper {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.28), inset 0 0 24px rgba(6, 182, 212, 0.1) !important;
}

body.hologram-mode .brand-wordmark {
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.65);
}

/* --------------------------------------------------------------------------
   NEXT RIVAL: 1-CLICK SHOWDOWN QUICK-CARDS (Bounce Killer)
   -------------------------------------------------------------------------- */
.quick-rival-section {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.quick-rival-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-rival-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.1em;
}

.quick-rival-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.quick-rival-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.quick-rival-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid #334155;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: var(--spring-bounce);
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  user-select: none;
}

.quick-rival-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.quick-rival-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}

.badge-predator { background: rgba(239, 68, 68, 0.15); border: 1px solid #ef4444; color: #fca5a5; }
.badge-space { background: rgba(14, 165, 233, 0.15); border: 1px solid #0ea5e9; color: #7dd3fc; }
.badge-ocean { background: rgba(20, 184, 166, 0.15); border: 1px solid #14b8a6; color: #5eead4; }
.badge-cash { background: rgba(16, 185, 129, 0.15); border: 1px solid #10b981; color: #6ee7b7; }

.quick-rival-names {
  font-family: var(--font-display, sans-serif);
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}

.quick-rival-meta {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   FLOATING MOBILE ACTION DOCK (Bottom 40% Thumb-Zone Ergonomics)
   -------------------------------------------------------------------------- */
.mobile-bottom-dock {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-dock {
    display: flex;
    position: fixed;
    bottom: 50px; /* Lifted above the 50px mobile adhesion banner */
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1.5px solid #334155;
    border-bottom: 2px solid #0f172a;
    z-index: var(--z-dock, 200);
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.5);
  }

  body {
    padding-bottom: 124px !important;
  }

  .mob-dock-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
  }

  .mob-dock-btn:active {
    transform: scale(0.92);
    color: #38bdf8;
  }

  .mob-dock-icon {
    font-size: 1.25rem;
  }

  .mob-dock-label {
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }
}

/* --------------------------------------------------------------------------
   ANODIZED SCI-FI SPONSOR FRAMING (SPONSOR // 01)
   -------------------------------------------------------------------------- */
.sponsor-frame-chassis {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid #334155;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.sponsor-header-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #090d16;
  border-bottom: 1px solid #1e293b;
}

.sponsor-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDecalDot 2s infinite;
}

.sponsor-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 0.12em;
}

.sponsor-body-box {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.sponsor-tag-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.sponsor-headline {
  font-family: var(--font-display, sans-serif);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
}

.sponsor-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.sponsor-action-btn {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #041226;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display, sans-serif);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: var(--spring-bounce);
}

.sponsor-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

/* --------------------------------------------------------------------------
   DYNAMIC FOCUS HIGHLIGHTING & LIVE TICKER PULSE
   -------------------------------------------------------------------------- */
.selector-col {
  transition: var(--transition-smooth);
}

.selector-col:hover {
  transform: translateY(-2px);
}

.selector-col:hover select {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.btn-mindblown {
  position: relative;
  overflow: hidden;
  transition: var(--spring-bounce);
}

.btn-mindblown:hover {
  animation: liveHeartbeat 1.8s infinite;
}

@keyframes liveHeartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   SPONSOR SHOWCASE METADATA
   -------------------------------------------------------------------------- */
.sponsor-curated-badge {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e2e8f0;
}

.sponsor-ftc-label {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.halftone-grain {
  background-image: radial-gradient(rgba(15, 23, 42, 0.04) 1.2px, transparent 1.2px);
  background-size: 8px 8px;
}/* ==========================================================================
   2-COLUMN DESKTOP GRID AD CHASSIS & STAGE PIP ZOOM LENS (AD-02, STG-22)
   ========================================================================== */
.stage-pip-lens-frame {
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid #0284c7;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 4px 16px rgba(2, 132, 199, 0.3));
}

@media (min-width: 1200px) {
  .hero-stage-layout-2col {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 24px !important;
    align-items: start !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
  }

  .desktop-sticky-rail {
    display: flex !important;
    flex-direction: column !important;
    position: sticky !important;
    top: 88px !important;
    width: 300px !important;
    min-height: 600px !important;
    z-index: var(--z-raised, 10) !important;
  }
}

@media (max-width: 1199px) {
  .hero-stage-layout-2col {
    display: block !important;
  }
  .desktop-sticky-rail {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-adhesion {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 50px !important;
    background: rgba(11, 15, 25, 0.98) !important;
    border-top: 1px solid #334155 !important;
    z-index: calc(var(--z-dock, 200) + 5) !important;
    align-items: center !important;
    justify-content: center !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-adhesion {
    display: none !important;
  }
}
/* ==========================================================================
   HAMBURGER BUTTON & SLIDE-OUT MENU DRAWER
   ========================================================================== */
.btn-hamburger {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: var(--shadow-subtle);
  transition: var(--spring-bounce);
  user-select: none;
}

.btn-hamburger:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-hamburger .hamburger-icon {
  font-size: 1.15rem;
  line-height: 1;
  color: #0284c7;
}

/* Drawer Backdrop */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Slide-Out Drawer Panel */
.slide-menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: #ffffff;
  z-index: 10001;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.22);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.slide-menu-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}

.drawer-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.drawer-close-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.drawer-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.drawer-content {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Drawer First-Time Guide */
.drawer-guide-card {
  background: linear-gradient(135deg, #f0fdf4, #ecfeff);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.drawer-guide-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 8px;
}

.drawer-guide-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: #1e293b;
  line-height: 1.6;
}

.drawer-guide-steps li {
  margin-bottom: 4px;
}

/* Drawer Section */
.drawer-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.drawer-mode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-mode-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: var(--spring-bounce);
}

.drawer-mode-btn:hover {
  border-color: #0284c7;
  background: #f0f9ff;
  transform: translateX(3px);
}

.drawer-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.drawer-mode-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.drawer-mode-info strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
}

.drawer-mode-info span {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.drawer-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
}

.drawer-badge.hot {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #ffffff;
}

/* Drawer Tools Grid */
.drawer-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.drawer-tool-btn:hover {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

.drawer-tool-icon {
  font-size: 1.4rem;
}

.drawer-tool-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.drawer-tool-val {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Drawer Links */
.drawer-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav-link {
  background: none;
  border: none;
  text-align: left;
  padding: 8px 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.drawer-nav-link:hover {
  color: #0284c7;
}

/* ==========================================================================
   FIRST-TIME USER ONBOARDING BANNER
   ========================================================================== */
.first-time-guide-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1.5px solid #6ee7b7;
  border-left: 5px solid #10b981;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

.first-time-guide-banner.dismissed {
  display: none !important;
}

.guide-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guide-banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.guide-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  color: #1e293b;
}

.guide-banner-text strong {
  font-weight: 800;
  color: #065f46;
}

.btn-guide-dismiss {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--spring-bounce);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-guide-dismiss:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

/* ==========================================================================
   PRECISION HEIGHT RULER & STAGE BUTTONS
   ========================================================================== */
.btn-ruler-toggle {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: var(--spring-bounce);
  user-select: none;
}

.btn-ruler-toggle:hover {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
}

.btn-ruler-toggle.active {
  background: #ecfeff;
  border-color: #06b6d4;
  color: #0891b2;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.btn-ruler-toggle .holo-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  transition: all 0.2s ease;
}

.btn-ruler-toggle.active .holo-led {
  background: #06b6d4;
  box-shadow: 0 0 8px #06b6d4;
}

/* Footer Link Buttons */
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
}

.footer-link-btn:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* ==========================================================================
   MOBILE COMPACT 56px HEADER & ERGONOMICS (V75, V78, T20)
   ========================================================================== */
@media (max-width: 600px) {
  :root {
    --header-h: 56px;
  }

  .nav-header {
    padding: 6px 12px;
    height: 56px;
  }

  .nav-container {
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: space-between;
    height: 100%;
  }

  .brand-wrapper {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .brand-sub-decal,
  .btn-surprise-me,
  .btn-roulette,
  .unit-switcher-pill {
    display: none !important;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-wordmark {
    font-size: 1.15rem;
  }

  .nav-search-bar,
  .search-bar-wrapper {
    max-width: 140px;
    width: 130px;
    min-width: 0;
  }

  .selector-side {
    min-width: 0 !important;
  }

  .nav-search-input {
    font-size: 0.78rem;
    padding-left: 28px;
  }

  /* Eliminate heavy blocks on mobile so stage appears right in first viewport */
  #first-time-guide-banner,
  .first-time-guide-banner,
  .welcome-banner-wrap,
  .scale-stacker-bar,
  .stage-subtitle {
    display: none !important;
  }

  .hero-stage-section {
    margin: 8px auto 16px !important;
    padding: 0 10px !important;
  }

  .stage-wrapper {
    padding: 10px !important;
  }

  .stage-header-row {
    margin-bottom: 8px !important;
  }

  .stage-badge-group {
    margin-bottom: 4px !important;
    gap: 6px !important;
  }

  .stage-title {
    font-size: 1.2rem !important;
    margin: 4px 0 !important;
    line-height: 1.25 !important;
  }

  .comparison-selectors {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    gap: 6px !important;
    align-items: center !important;
    margin-bottom: 8px !important;
  }

  .selector-group {
    min-width: 0 !important;
  }

  .object-select {
    padding: 8px 6px !important;
    font-size: 0.75rem !important;
  }

  .swap-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 1.1rem !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .scale-arena {
    min-height: 240px !important;
  }

  /* Universal WCAG 44px touch targets on mobile */
  button, 
  a,
  select, 
  .cat-filter-btn, 
  .mode-tab-btn, 
  .mob-dock-btn, 
  .card-compare-btn, 
  .card-intel-btn,
  .btn-hamburger,
  .btn-roulette,
  .btn-ruler-toggle,
  .btn-guide-dismiss,
  .ad-close-cross,
  .unit-btn,
  .drawer-nav-link,
  .footer-link,
  .footer-link-btn {
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
  }

  .footer-link,
  .footer-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
  }

  .drawer-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
  }
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION (A9)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   NON-BLOCKING TOAST NOTIFICATIONS (Replaces browser alert)
   ========================================================================== */
.perspective-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: var(--z-toast, 500);
  opacity: 0;
  pointer-events: none;
  transition: var(--spring-bounce);
  display: flex;
  align-items: center;
  gap: 8px;
}

.perspective-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   COMMUNITY LAUNCH CLEAN MODE (?clean=true or LAUNCH_CLEAN_MODE = true)
   ========================================================================== */
body.launch-clean-mode #desktop-sticky-rail,
body.launch-clean-mode #mobile-bottom-adhesion,
body.launch-clean-mode .sponsored-card {
  display: none !important;
}

body.launch-clean-mode .hero-stage-layout-2col {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.launch-clean-mode .mobile-bottom-dock {
  bottom: 0 !important;
}

/* ==========================================================================
   DEEP SPACE DARK & HOLOGRAM MODE (body.hologram-mode / body.dark-mode — Key 'C')
   ========================================================================== */
body.hologram-mode,
body.dark-mode {
  --bg-deep: #060911;
  --bg-base: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-card: #0f172a;
  --bg-glass: rgba(15, 23, 42, 0.92);
  --border-subtle: rgba(148, 163, 184, 0.2);
  --border-strong: rgba(56, 189, 248, 0.42);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-accent: #38bdf8;
  background-color: var(--bg-deep) !important;
  color: var(--text-primary) !important;
}

body.hologram-mode .nav-header,
body.dark-mode .nav-header {
  background: rgba(9, 13, 22, 0.92) !important;
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

body.hologram-mode .brand-wordmark,
body.dark-mode .brand-wordmark {
  background: linear-gradient(135deg, #f8fafc 0%, #93c5fd 60%, #a5b4fc 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: #f8fafc !important;
}

body.hologram-mode .brand-subtitle,
body.dark-mode .brand-subtitle {
  color: #94a3b8 !important;
}

body.hologram-mode .nav-search-bar,
body.dark-mode .nav-search-bar,
body.hologram-mode .unit-toggle-group,
body.dark-mode .unit-toggle-group,
body.hologram-mode .btn-hamburger,
body.dark-mode .btn-hamburger {
  background: #1e293b !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #f8fafc !important;
}

body.hologram-mode .nav-search-input,
body.dark-mode .nav-search-input {
  color: #f8fafc !important;
}

body.hologram-mode .unit-btn,
body.dark-mode .unit-btn {
  color: #cbd5e1 !important;
}

body.hologram-mode .unit-btn.active,
body.dark-mode .unit-btn.active {
  background: #0f172a !important;
  color: #38bdf8 !important;
}

body.hologram-mode .master-mode-nav,
body.dark-mode .master-mode-nav,
body.hologram-mode .slide-menu-drawer,
body.dark-mode .slide-menu-drawer,
body.hologram-mode .stage-wrapper,
body.dark-mode .stage-wrapper,
body.hologram-mode .wealth-card-panel,
body.dark-mode .wealth-card-panel,
body.hologram-mode .abyss-card-panel,
body.dark-mode .abyss-card-panel,
body.hologram-mode .what-buys-panel,
body.dark-mode .what-buys-panel,
body.hologram-mode .quiz-container,
body.dark-mode .quiz-container,
body.hologram-mode .bento-card,
body.dark-mode .bento-card,
body.hologram-mode .stream-card,
body.dark-mode .stream-card,
body.hologram-mode .tier-card,
body.dark-mode .tier-card,
body.hologram-mode .intel-metric-card,
body.dark-mode .intel-metric-card,
body.hologram-mode .salary-result-card,
body.dark-mode .salary-result-card,
body.hologram-mode .wealth-calculator-box,
body.dark-mode .wealth-calculator-box,
body.hologram-mode .quiz-choice-card,
body.dark-mode .quiz-choice-card,
body.hologram-mode .stacker-guesser-box,
body.dark-mode .stacker-guesser-box,
body.hologram-mode .blitz-item-card,
body.dark-mode .blitz-item-card,
body.hologram-mode .intel-modal-window,
body.dark-mode .intel-modal-window,
body.hologram-mode .modal-body,
body.dark-mode .modal-body,
body.hologram-mode .modal-spec-cell,
body.dark-mode .modal-spec-cell,
body.hologram-mode .mobile-bottom-dock,
body.dark-mode .mobile-bottom-dock,
body.hologram-mode .mobile-bottom-adhesion,
body.dark-mode .mobile-bottom-adhesion {
  background: var(--bg-surface) !important;
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
}

body.hologram-mode .comparison-selectors,
body.dark-mode .comparison-selectors,
body.hologram-mode .object-select,
body.dark-mode .object-select,
body.hologram-mode .first-time-guide-banner,
body.dark-mode .first-time-guide-banner,
body.hologram-mode .btn-ruler-toggle,
body.dark-mode .btn-ruler-toggle,
body.hologram-mode .stacker-btn,
body.dark-mode .stacker-btn,
body.hologram-mode .tech-pill,
body.dark-mode .tech-pill,
body.hologram-mode .cat-filter-btn,
body.dark-mode .cat-filter-btn,
body.hologram-mode .cash-pill-btn,
body.dark-mode .cash-pill-btn,
body.hologram-mode .tier-cat-btn,
body.dark-mode .tier-cat-btn,
body.hologram-mode .arcade-tab-btn,
body.dark-mode .arcade-tab-btn,
body.hologram-mode .card-intel-btn,
body.dark-mode .card-intel-btn,
body.hologram-mode .modal-fact-callout,
body.dark-mode .modal-fact-callout {
  background: var(--bg-surface-elevated) !important;
  color: var(--text-primary) !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
}

body.hologram-mode .mode-tab-btn:not(.active),
body.dark-mode .mode-tab-btn:not(.active) {
  color: #cbd5e1 !important;
}

body.hologram-mode .scale-arena,
body.dark-mode .scale-arena,
body.hologram-mode .wealth-isometric-canvas,
body.dark-mode .wealth-isometric-canvas {
  background: radial-gradient(circle at 50% 25%, #172554 0%, #090d16 100%) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
}

body.hologram-mode .stage-title,
body.dark-mode .stage-title,
body.hologram-mode .section-heading,
body.dark-mode .section-heading,
body.hologram-mode .modal-title,
body.dark-mode .modal-title,
body.hologram-mode .card-title,
body.dark-mode .card-title,
body.hologram-mode .intel-metric-val,
body.dark-mode .intel-metric-val,
body.hologram-mode .spec-val,
body.dark-mode .spec-val,
body.hologram-mode .quiz-question-title,
body.dark-mode .quiz-question-title {
  color: #f8fafc !important;
}

body.hologram-mode .stage-subtitle,
body.dark-mode .stage-subtitle,
body.hologram-mode .section-subtext,
body.dark-mode .section-subtext,
body.hologram-mode .card-factoid,
body.dark-mode .card-factoid,
body.hologram-mode .guide-banner-text,
body.dark-mode .guide-banner-text,
body.hologram-mode .modal-extended-bio,
body.dark-mode .modal-extended-bio {
  color: #cbd5e1 !important;
}

/* ==========================================================================
   DESKTOP ABOVE-THE-FOLD RHYTHM, MODAL FIT & AD RAIL COLLAPSE
   ========================================================================== */
.hero-stage-layout-2col.rail-closed {
  grid-template-columns: minmax(0, 1fr) !important;
}

.hero-stage-layout-2col.rail-closed .desktop-sticky-rail {
  display: none !important;
}

.hero-stage-layout-2col:not(:has(#hero-scale-stage.active-mode)) {
  display: none !important;
}

.mobile-bottom-adhesion.ad-closed {
  display: none !important;
}

.master-mode-bar-section {
  margin: 10px auto 0;
}

.hero-stage-section {
  margin: 12px auto;
}

.stage-wrapper {
  padding: 18px 24px;
}

.first-time-guide-banner {
  padding: 8px 14px;
  margin-bottom: 12px;
}

.stage-header-row {
  margin-bottom: 10px;
}

.comparison-selectors {
  padding: 8px 14px;
  margin-bottom: 12px;
}

.modal-hero-img {
  max-height: 210px;
  object-fit: cover;
}

.intel-modal-window {
  max-height: 92vh;
  overflow-y: auto;
}

/* Mode 3 Deep Sea Abyss Guaranteed High-Contrast White Typography */
.abyss-viewport-box,
#abyss-milestone-title {
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

#abyss-milestone-desc,
#abyss-temp-meter {
  color: rgba(248, 250, 252, 0.92) !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* Mode 5 Game 3 ($100B Blitz) Responsive Balance Readout */
.blitz-balance-huge {
  font-size: clamp(1.35rem, 6.2vw, 2.2rem) !important;
  word-break: break-word;
  max-width: 100%;
}

/* ==========================================================================
   PERSPECTIVE MOBILE TRIAGE & FLEX SHRINK REPAIR (320px to 768px)
   ========================================================================== */

/* 1. Hide Sticky Bottom Bars When Virtual Keyboard is Open (Focus state) */
body:has(input:focus) .mobile-bottom-adhesion,
body:has(input:focus) .mobile-bottom-dock {
  display: none !important;
}

/* 2. Stop Flexbox from crushing horizontal pill bars */
.mode-tab-btn,
.cat-filter-btn,
.stacker-btn,
.cash-pill-btn,
.tier-cat-btn,
.arcade-tab-btn {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
}

@media (max-width: 768px) {
  .perspective-toast {
    bottom: 122px !important;
  }
}

@media (max-width: 600px) {
  /* 3. Prevent Flex header children from blowing out 390px viewport width */
  .stage-header-row > div,
  .wealth-stage-header > div,
  .quiz-top-bar > div {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .stage-title,
  .section-heading {
    font-size: 1.22rem !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .stage-subtitle,
  .section-subtext {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    word-break: break-word !important;
  }

  /* 4. Tighter mobile container padding so 390px screens have full breathing room */
  .engine-section,
  .quiz-section,
  .feed-section,
  .master-mode-bar-section {
    padding: 0 10px !important;
    margin-top: 10px !important;
  }

  .stage-wrapper,
  .wealth-card-panel,
  .abyss-card-panel,
  .what-buys-panel,
  .quiz-container {
    padding: 14px 12px !important;
    border-radius: 18px !important;
  }

  /* 5. Fit Full Scale Stage & Wealth 3D Cube inside 390px viewport (Zero Cut-Off Contenders) */
  .scale-arena,
  .wealth-isometric-canvas {
    min-height: 220px !important;
    padding: 8px 6px 0 !important;
    overflow: hidden !important;
  }

  .scale-canvas-svg,
  #wealth-canvas-svg {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 220px !important;
  }

  /* 6. Fix Mobile Search Bar & Hamburger fit */
  .nav-search-bar {
    width: 158px !important;
    max-width: 168px !important;
    padding: 4px 10px !important;
  }

  .nav-search-input {
    padding-left: 2px !important;
    font-size: 0.76rem !important;
  }

  /* 7. Reserve right-side lane for the Swap button so it never covers dropdown text */
  .comparison-selectors {
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 56px 10px 12px !important;
    gap: 8px !important;
    position: relative;
  }

  .selector-side {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .object-select {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 100% !important;
    padding-right: 24px !important;
    font-size: 0.8rem !important;
  }

  .clash-control-center {
    position: absolute;
    top: 50%;
    right: 10px !important;
    transform: translateY(-50%) rotate(90deg);
    z-index: 10;
  }

  .stage-vs-badge {
    display: none !important;
  }

  /* 8. Restore Stacker Tool as a Compact Swipeable Row on Mobile */
  .scale-stacker-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 4px;
    margin-top: 8px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .scale-stacker-bar::-webkit-scrollbar {
    display: none;
  }

  /* 9. Fix Cash Pills, Sweet Spot Category Pills, and Arcade 2x2 Grid on Mobile */
  .cash-pill-btn {
    min-width: 0 !important;
    width: 100% !important;
    white-space: normal !important;
    text-align: left !important;
    font-size: 0.8rem !important;
    padding: 8px 12px !important;
  }

  .arcade-tab-nav,
  .tier-category-pills {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-bottom: 12px !important;
  }

  .arcade-tab-btn,
  .tier-cat-btn {
    min-width: 0 !important;
    width: 100% !important;
    padding: 6px 8px !important;
    font-size: 0.74rem !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 10. Fix Stacker Range Slider & Arcade "VS" Badge Layout on Mobile */
  .stacker-guess-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px;
  }

  .stacker-guess-slider,
  .btn-test-guess {
    width: 100% !important;
    min-width: 100% !important;
  }

  .quiz-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .quiz-choice-card {
    padding: 14px;
    flex-direction: row;
    gap: 14px;
    text-align: left;
    justify-content: flex-start;
  }

  .quiz-choice-img {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
  }

  .quiz-vs-divider {
    transform: rotate(90deg) scale(0.85);
    margin: -14px 0;
    z-index: 5;
  }

  .modal-hero-img {
    max-height: 165px !important;
  }
}

@media (max-width: 480px) {
  .btn-hamburger .hamburger-text {
    display: none !important;
  }
  .btn-hamburger {
    padding: 8px 10px !important;
    min-width: 44px !important;
    justify-content: center !important;
  }
  .nav-search-bar {
    width: 166px !important;
    max-width: 175px !important;
  }
}
