/* ==========================================================================
   ESCAPE THE LAVA — Dual-Face Volcanic Showcase Stylesheet
   Ember Face (molten amber) <-> Aqua Face (crystalline ice)
   ========================================================================== */

:root {
  /* Obsidian & Basalt palette */
  --bg-void: #07090f;
  --bg-basalt: rgba(14, 17, 27, 0.86);
  --bg-basalt-solid: #111521;
  --bg-card: rgba(18, 22, 35, 0.88);
  --bg-card-hover: rgba(24, 30, 48, 0.94);
  --border-subtle: rgba(255, 255, 255, 0.09);

  /* Game palette tokens */
  --ember: #ff6b1a;
  --ember-bright: #ffae2b;
  --aqua: #1ee6ff;
  --aqua-bright: #90f7ff;
  --gold: #f6c445;
  --gold-deep: #c97d10;
  --violet: #b65cff;
  --danger: #ff3b30;

  /* Typography */
  --text-main: #f3f5fa;
  --text-muted: #a6b0c8;
  --text-dim: #76819c;
  --font-display: 'Cinzel', Georgia, serif;
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Active Face Tokens (Default: EMBER) */
  --accent: var(--ember);
  --accent-bright: var(--ember-bright);
  --accent-rgb: 255, 107, 26;
  --accent-glow: rgba(255, 107, 26, 0.35);
  --accent-soft: rgba(255, 107, 26, 0.14);
  --accent-border: rgba(255, 154, 46, 0.45);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition-face: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* AQUA FACE OVERRIDE */
html[data-face="aqua"] {
  --accent: var(--aqua);
  --accent-bright: var(--aqua-bright);
  --accent-rgb: 30, 230, 255;
  --accent-glow: rgba(30, 230, 255, 0.38);
  --accent-soft: rgba(30, 230, 255, 0.14);
  --accent-border: rgba(30, 230, 255, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom-width: 2px;
  border-radius: 5px;
  line-height: 1.3;
}

.mono {
  font-family: var(--font-mono);
}

.text-gold { color: var(--gold); }
.text-ember { color: var(--ember-bright); }
.text-aqua { color: var(--aqua); }

/* ==================== BACKGROUND LAVA CANVAS ==================== */
#lava-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(7, 9, 15, 0.42) 0%, rgba(7, 9, 15, 0.84) 75%),
    linear-gradient(180deg, rgba(7, 9, 15, 0.65) 0%, rgba(7, 9, 15, 0.52) 45%, rgba(7, 9, 15, 0.88) 100%);
  transition: background var(--transition-face);
}

html[data-face="aqua"] .vignette-overlay {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(4, 24, 38, 0.45) 0%, rgba(5, 13, 24, 0.86) 75%),
    linear-gradient(180deg, rgba(5, 14, 24, 0.68) 0%, rgba(6, 22, 34, 0.5) 45%, rgba(5, 12, 22, 0.88) 100%);
}

.slam-flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(160, 248, 255, 0.55) 0%, rgba(30, 230, 255, 0.18) 45%, transparent 75%);
  transition: opacity 0.55s ease-out;
}
.slam-flash.is-flashing {
  opacity: 1;
  transition: opacity 0.06s ease-in;
}

/* ==================== HUD TOAST ==================== */
.hud-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: rgba(13, 18, 30, 0.94);
  border: 1px solid var(--accent-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 24px var(--accent-glow);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.hud-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ==================== STICKY HUD NAVBAR ==================== */
.hud-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 12, 20, 0.82);
  border-bottom: 1px solid var(--accent-border);
  transition: border-color var(--transition-face);
}

.hud-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--accent-border);
  padding: 3px;
  box-shadow: 0 0 16px var(--accent-glow);
  transition: border-color var(--transition-face), box-shadow var(--transition-face);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff1b8 0%, #f6c445 55%, #c97d10 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  transition: color var(--transition-face);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.22s ease, background var(--transition-face);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

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

.hud-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: rgba(20, 26, 42, 0.9);
  border: 1px solid var(--accent-border);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.25s ease, border-color var(--transition-face);
}

.hud-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px var(--accent-glow);
}

.hud-pill--trident {
  border-color: rgba(30, 230, 255, 0.5);
}

.hud-pill--trident:hover {
  box-shadow: 0 0 22px rgba(30, 230, 255, 0.45);
}

.hud-pill.is-cooling {
  opacity: 0.65;
  pointer-events: none;
}

.pill-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.cooldown-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0%;
  background: var(--aqua);
  transition: width 0.1s linear;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
}

.mobile-drawer {
  display: none;
  flex-direction: column;
  padding: 12px 24px 20px;
  gap: 12px;
  background: rgba(9, 12, 20, 0.96);
  border-top: 1px solid var(--border-subtle);
}
.mobile-drawer.is-open {
  display: flex;
}
.mobile-drawer a {
  padding: 8px 0;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==================== LAYOUT UTILITIES ==================== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
  position: relative;
}

.section--elevated {
  background: linear-gradient(180deg, rgba(10, 14, 24, 0.78) 0%, rgba(12, 16, 28, 0.88) 50%, rgba(10, 14, 24, 0.78) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-header--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  margin-bottom: 10px;
  transition: color var(--transition-face);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 9px 15px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.btn-icon {
  width: 22px;
  height: 22px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 100%);
  color: #070a12;
  box-shadow: 0 8px 26px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 10px 34px var(--accent-glow);
}

.btn-secondary {
  background: rgba(24, 30, 48, 0.88);
  border: 1px solid var(--accent-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(34, 42, 66, 0.96);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-aqua {
  background: linear-gradient(135deg, #00b4d8 0%, #5df7ff 100%);
  color: #05121d;
  box-shadow: 0 6px 20px rgba(30, 230, 255, 0.3);
}

.btn-ember-aqua {
  background: linear-gradient(135deg, var(--ember) 0%, var(--aqua) 100%);
  color: #070a12;
}

/* ==================== HERO SECTION ==================== */
.hero {
  padding: 56px 0 64px;
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  align-items: center;
  gap: 44px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin-bottom: 20px;
  transition: all var(--transition-face);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}

.hero-title {
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.92;
  margin-bottom: 22px;
}

.title-gold {
  font-size: clamp(3rem, 5.5vw, 4.7rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff6cb 0%, #f8c84a 45%, #d68514 85%, #8c4706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.75));
}

.title-sub-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 240px;
  margin: 4px 0;
}

.title-rule {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.title-the {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: #ffe294;
}

.hero-lead {
  font-size: 1.08rem;
  color: #d0d7e8;
  margin-bottom: 28px;
  max-width: 560px;
}

.hero-lead strong {
  color: #ffffff;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(13, 17, 28, 0.8);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.meta-stat {
  display: flex;
  flex-direction: column;
}

.meta-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
}

.meta-label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.meta-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.12);
}

/* Hero Artwork Frame */
.hero-art-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--accent-border);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.72),
    0 0 42px var(--accent-glow);
  background: #0c0f18;
  transition: border-color var(--transition-face), box-shadow var(--transition-face);
}

.hero-art-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.6s ease;
}

.hero-art-frame:hover .hero-art-img {
  transform: scale(1.04);
}

.art-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid var(--gold);
  pointer-events: none;
}
.art-corner--tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.art-corner--tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.art-corner--bl { bottom: 48px; left: 10px; border-right: none; border-top: none; }
.art-corner--br { bottom: 48px; right: 10px; border-left: none; border-top: none; }

.art-live-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(9, 12, 20, 0.92);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.art-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.dot-ember, .dot-aqua {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot-ember { background: var(--ember-bright); box-shadow: 0 0 8px var(--ember); }
.dot-aqua { background: var(--aqua); box-shadow: 0 0 8px var(--aqua); }

/* ==================== DUAL-FACE BRIDGE DIVIDER ==================== */
.bridge-divider {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.bridge-block {
  height: 10px;
  border-radius: 4px;
  transition: all var(--transition-face);
}

.bridge-block--basalt {
  background: #232a3c;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bridge-block--ember {
  background: linear-gradient(90deg, var(--ember), var(--ember-bright));
  box-shadow: 0 0 16px rgba(255, 130, 30, 0.65);
}

.bridge-block--aqua {
  background: rgba(30, 230, 255, 0.15);
  border: 1px dashed rgba(30, 230, 255, 0.35);
  opacity: 0.4;
}

html[data-face="aqua"] .bridge-block--ember {
  background: rgba(255, 107, 26, 0.15);
  border: 1px dashed rgba(255, 107, 26, 0.35);
  box-shadow: none;
  opacity: 0.35;
}

html[data-face="aqua"] .bridge-block--aqua {
  background: linear-gradient(90deg, #00b4d8, var(--aqua-bright));
  border: none;
  box-shadow: 0 0 18px rgba(30, 230, 255, 0.75);
  opacity: 1;
}

/* ==================== QUEEN TALLULAH SPOTLIGHT ==================== */
.queen-spotlight {
  display: grid;
  grid-template-columns: 0.96fr 1.14fr;
  gap: 38px;
  align-items: center;
}

.queen-stage-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.queen-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(30, 230, 255, 0.14), rgba(8, 11, 19, 0.96) 72%);
  border: 2px solid var(--accent-border);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.68),
    0 0 38px var(--accent-glow);
  transition: border-color var(--transition-face), box-shadow var(--transition-face);
}

.queen-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.queen-stage-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.88);
  border: 1px solid var(--accent-border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
}

.queen-view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.queen-tab {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.queen-tab:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.24);
}

.queen-tab.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-bright);
  box-shadow: 0 0 18px var(--accent-glow);
}

.queen-name {
  background: linear-gradient(180deg, #ffffff 0%, #90f7ff 52%, #f6c445 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.queen-subtitle {
  font-size: 1.06rem;
  font-weight: 600;
  color: #e6eeff;
  margin-bottom: 12px;
}

.queen-abilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}

.queen-ability {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.queen-ability img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
}

.queen-ability strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.queen-ability span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.queen-footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==================== GAMEPLAY GIF THEATER ==================== */
.theater-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.theater-stage {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  transition: border-color var(--transition-face);
}

.theater-frame {
  position: relative;
  background: #06080d;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.theater-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theater-overlay-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.85);
  border: 1px solid var(--accent-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
}

.theater-caption-bar {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 1;
}

.theater-caption-bar h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.theater-caption-bar p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.theater-playlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playlist-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-align: left;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.22s ease;
}

.playlist-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(3px);
}

.playlist-card.is-active {
  background: rgba(24, 31, 50, 0.96);
  border-color: var(--accent-border);
  box-shadow: 0 0 24px var(--accent-glow);
}

.playlist-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
}

.playlist-card.is-active .playlist-num {
  color: var(--accent-bright);
}

.playlist-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.playlist-info strong {
  font-size: 0.96rem;
  margin-bottom: 2px;
}

.playlist-info span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.playlist-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.tag-gold { background: rgba(246, 196, 69, 0.16); color: var(--gold); border: 1px solid rgba(246, 196, 69, 0.35); }
.tag-ember { background: rgba(255, 107, 26, 0.16); color: var(--ember-bright); border: 1px solid rgba(255, 107, 26, 0.35); }
.tag-aqua { background: rgba(30, 230, 255, 0.16); color: var(--aqua); border: 1px solid rgba(30, 230, 255, 0.35); }
.tag-violet { background: rgba(182, 92, 255, 0.16); color: #d59bff; border: 1px solid rgba(182, 92, 255, 0.35); }

/* ==================== PLAYABLE CALDERA MICRO-TRIAL ==================== */
.trial-shell {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(12, 16, 26, 0.92);
  border: 1px solid var(--accent-border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  transition: border-color var(--transition-face);
}

.trial-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(8, 11, 18, 0.95);
  border-bottom: 1px solid var(--border-subtle);
}

.trial-hud-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.trial-stat {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.trial-stat-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.trial-stat strong {
  font-size: 0.98rem;
}

.trial-hud-objective {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e6ecff;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.trial-body {
  display: grid;
  grid-template-columns: 1fr 310px;
}

.trial-canvas-wrap {
  position: relative;
  background: #07090f;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
}

#caldera-game {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  outline: none;
}

#caldera-game:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.mg-banner {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid var(--accent-border);
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

.mg-banner.is-visible {
  opacity: 1;
}

.trial-sidebar {
  padding: 18px;
  background: rgba(15, 19, 31, 0.95);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trial-panel h4 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.trial-key-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.trial-key-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}

.trial-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

/* D-Pad */
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 40px);
  gap: 6px;
  justify-content: center;
}

.dpad-btn {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}

.dpad-btn:hover { background: rgba(255, 255, 255, 0.16); }
.dpad-btn:active { transform: scale(0.94); }
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-center { grid-column: 2; grid-row: 2; background: rgba(30, 230, 255, 0.16); border-color: rgba(30, 230, 255, 0.45); color: var(--aqua); }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-grid span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.sw-ember { background: var(--ember-bright); }
.sw-aqua { background: var(--aqua); }
.sw-vent { background: #ff4526; }
.sw-portal { background: var(--violet); }
.sw-ice { background: #b8f6ff; }
.sw-arch { background: var(--gold); }

/* ==================== 6-LANDMARK JOURNEY ==================== */
.journey-stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: all 0.22s ease;
}

.step-node:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.step-node.is-active {
  background: rgba(24, 31, 52, 0.96);
  border-color: var(--accent-border);
  box-shadow: 0 0 24px var(--accent-glow);
}

.step-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.step-name {
  font-weight: 700;
  font-size: 0.94rem;
}

.journey-detail-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  align-items: center;
}

.journey-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.journey-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.journey-chip {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.88);
  border: 1px solid var(--accent-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.journey-content h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.journey-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.journey-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.spec-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spec-box span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.spec-box strong {
  font-size: 0.9rem;
}

.journey-later-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(246, 196, 69, 0.07);
  border-radius: 0 8px 8px 0;
}

/* ==================== CORE MECHANICS CARDS ==================== */
.mechanics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.mech-card {
  padding: 24px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.22s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.mech-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 22px var(--accent-glow);
}

.mech-card--aqua {
  border-color: rgba(30, 230, 255, 0.3);
}

.mech-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--accent-border);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mech-badge-row {
  display: flex;
  gap: 6px;
}

.phase-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  opacity: 0.35;
  transition: all var(--transition-face);
}

.phase-ember { background: rgba(255, 107, 26, 0.2); color: var(--ember-bright); border: 1px solid var(--ember); }
.phase-aqua { background: rgba(30, 230, 255, 0.2); color: var(--aqua); border: 1px solid var(--aqua); }

html[data-face="ember"] .phase-ember { opacity: 1; box-shadow: 0 0 10px rgba(255, 107, 26, 0.5); }
html[data-face="aqua"] .phase-aqua { opacity: 1; box-shadow: 0 0 10px rgba(30, 230, 255, 0.5); }

.mech-card h3 {
  font-size: 1.1rem;
}

.mech-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.mech-live-state {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-bright);
}

html[data-face="ember"] .only-aqua { display: none; }
html[data-face="aqua"] .only-ember { display: none; }

.mech-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.blocks-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.block-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(14, 18, 30, 0.85);
  border: 1px solid var(--border-subtle);
}

.block-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.block-chip strong {
  display: block;
  font-size: 0.88rem;
}

.block-chip span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==================== SCREENSHOT GALLERY ==================== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-bright);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0a0d16;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px var(--accent-glow);
}

.gallery-item img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 16px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 9, 16, 0.94) 65%);
  display: flex;
  flex-direction: column;
}

.gallery-item figcaption strong {
  font-size: 0.94rem;
}

.gallery-item figcaption span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==================== CONTROLS & DEMO SECTION ==================== */
.demo-layout {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 24px;
  align-items: start;
}

.controls-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.controls-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.controls-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.controls-table th {
  text-align: left;
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.controls-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.controls-table td:first-child {
  color: var(--text-main);
  font-weight: 600;
}

.pad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.pad-a { background: #1e9e4a; }
.pad-x { background: #1d6fe2; }
.pad-y { background: #d49b1a; color: #0b0d14; }

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-pills span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.platforms-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.capsule-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--accent-border);
}

.capsule-banner img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.capsule-banner-overlay {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(7, 9, 15, 0.1) 0%, rgba(7, 9, 15, 0.9) 100%);
}

.capsule-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.capsule-banner-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.platform-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.platform-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-dot {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(30, 230, 255, 0.14);
  color: var(--aqua);
  border: 1px solid rgba(30, 230, 255, 0.35);
}

.platform-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
}

.build-path {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 8px;
  border-radius: 6px;
  word-break: break-all;
}

/* ==================== FOOTER ==================== */
.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 9, 15, 0.92);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-icon {
  width: 34px;
  height: 34px;
}

.footer-brand strong {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  color: var(--gold);
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-bright);
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 6, 12, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  max-width: 1120px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lightbox-content img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
}

.lightbox-caption span {
  color: var(--text-muted);
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(20, 26, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--accent);
  color: #070a12;
}

.lightbox-close { top: 20px; right: 24px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1080px) {
  .hero-container,
  .queen-spotlight,
  .theater-grid,
  .journey-detail-card,
  .demo-layout {
    grid-template-columns: 1fr;
  }

  .mechanics-grid,
  .blocks-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .trial-body {
    grid-template-columns: 1fr;
  }

  .trial-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item--wide {
    grid-column: span 1;
  }

  .mechanics-grid,
  .blocks-strip,
  .platform-cards,
  .queen-abilities {
    grid-template-columns: 1fr;
  }

  .journey-stepper {
    grid-template-columns: repeat(2, 1fr);
  }

  .theater-caption-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
