/* ========================================
   OCCULTO - Unified Inner Pages Stylesheet
   Consolidates all inline CSS from inner pages
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* =============================================
   1. BASE RESET & BODY
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #020008;
  color: #d8cef0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   2. AMBIENT BACKGROUND (changelog, etc.)
   ============================================= */
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(123,255,90,0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(192,111,255,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255,94,170,0.015) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: ambientDrift 25s ease-in-out infinite alternate;
}
@keyframes ambientDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, 2%) scale(1.05); }
}

/* =============================================
   3. SHARED NAV (includes.js generated)
   ============================================= */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0 32px;
  transition: all 0.4s ease;
}
.top-nav.scrolled,
.top-nav.nav-open,
body:not(.page-home) .top-nav {
  background: rgba(2, 0, 8, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(100, 60, 160, 0.15);
}
.top-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo img {
  height: 62px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(123,255,90,0.2));
  transition: opacity 0.3s ease;
}
.page-home .nav-logo img {
  opacity: 0;
}
.page-home .top-nav.scrolled .nav-logo img,
.page-home .top-nav.nav-open .nav-logo img {
  opacity: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: rgba(200, 190, 220, 0.6);
  text-decoration: none;
  font-size: 0.75em;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 30px;
  transition: all 0.3s ease;
}
.nav-links a:hover { color: #e0d8f0; background: rgba(180, 126, 255, 0.1); }
.nav-links a.active {
  color: #020008;
  background: #7bff5a;
  font-weight: 600;
  box-shadow: 0 2px 16px rgba(123,255,90,0.3);
}
.nav-links .nav-sep {
  width: 1px; height: 16px;
  background: rgba(100, 60, 160, 0.2);
  margin: 0 4px;
}
.nav-links a.discord-link {
  display: flex; align-items: center;
  padding: 6px 8px;
}
.nav-links a.discord-link:hover { color: #5865F2; background: rgba(88, 101, 242, 0.1); }
.nav-links a.discord-link svg { width: 18px; height: 18px; }

/* Hamburger button - hidden on desktop */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
  flex-direction: column;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #e0d8f0;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.top-nav.nav-open .nav-burger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.top-nav.nav-open .nav-burger span:nth-child(2) {
  opacity: 0;
}
.top-nav.nav-open .nav-burger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   4. SHARED FOOTER
   ============================================= */
.site-footer {
  text-align: center;
  padding: 60px 32px 40px;
  border-top: 1px solid rgba(100,60,160,0.1);
  position: relative;
  z-index: 1;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, #b47eff, transparent);
}
.footer-logo img {
  width: 40px;
  opacity: 0.35;
  transition: all 0.4s ease;
  filter: grayscale(0.5);
}
.footer-logo:hover img {
  opacity: 0.8;
  filter: grayscale(0) drop-shadow(0 0 10px rgba(180,126,255,0.3));
}
.footer-v { color: rgba(80,60,110,0.25); font-size: 0.6em; margin-top: 10px; letter-spacing: 2px; }

/* =============================================
   5. PAGE HERO (unified for all inner pages)
   ============================================= */
.page-hero {
  position: relative;
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 32px 60px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #020008;
  background-size: cover !important;
  background-position: center !important;
}
.page-hero-bg::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(123,255,90,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 70% 50%, rgba(192,111,255,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(255,94,170,0.04) 0%, transparent 70%);
  animation: heroDrift 20s ease-in-out infinite alternate;
}
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 20%, rgba(2,0,8,0.7) 70%),
    linear-gradient(180deg, rgba(2,0,8,0.3) 0%, transparent 30%, transparent 60%, rgba(2,0,8,0.95) 100%);
}

.page-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100,60,160,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,60,160,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  animation: gridPulse 8s ease-in-out infinite alternate;
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-logo {
  width: min(240px, 50vw);
  image-rendering: pixelated;
  filter: drop-shadow(0 0 30px rgba(123,255,90,0.2));
  margin-bottom: 20px;
  animation: logoFadeIn 1.2s ease both;
}

.page-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2em, 5vw, 3.5em);
  font-weight: 800;
  color: #ede6f5;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 12px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.page-hero-tagline {
  font-size: clamp(0.85em, 2vw, 1.1em);
  color: rgba(200, 190, 220, 0.55);
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease 0.5s both;
}

/* =============================================
   6. SHARED SECTION STYLES
   ============================================= */
.section {
  position: relative;
  padding: 100px 32px;
  overflow: hidden;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(123,255,90,0.6);
  margin-bottom: 12px;
  text-align: center;
}
.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8em, 4vw, 2.8em);
  font-weight: 800;
  color: #ede6f5;
  letter-spacing: 3px;
  margin-bottom: 16px;
  line-height: 1.2;
  text-align: center;
}
.section-heading {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4em, 3vw, 2em);
  font-weight: 700;
  color: #ede6f5;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.section-desc {
  font-size: 1.05em;
  color: rgba(200, 190, 220, 0.55);
  max-width: 650px;
  line-height: 1.8;
  margin: 0 auto 56px;
  text-align: center;
}
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100,60,160,0.15), transparent);
}

/* =============================================
   7. SHARED ANIMATIONS
   ============================================= */
@keyframes heroDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-4%, 3%) rotate(2deg); }
}
@keyframes gridPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}
@keyframes logoFadeIn {
  from { opacity: 0; transform: scale(0.85) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dashFlow {
  0% { background-position: 0 0; }
  100% { background-position: 24px 0; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(7) { transition-delay: 0.48s; }
.stagger-children .reveal:nth-child(8) { transition-delay: 0.56s; }
.stagger-children .reveal:nth-child(9) { transition-delay: 0.64s; }
.stagger-children .reveal:nth-child(10) { transition-delay: 0.72s; }
.stagger-children .reveal:nth-child(11) { transition-delay: 0.8s; }

/* =============================================
   8. SHARED BADGES
   ============================================= */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Cinzel', serif;
}
.badge-passed {
  background: rgba(123,255,90,0.12);
  color: #7bff5a;
  border: 1px solid rgba(123,255,90,0.2);
  text-shadow: 0 0 8px rgba(123,255,90,0.3);
}
.badge-failed {
  background: rgba(255,68,102,0.1);
  color: #ff6680;
  border: 1px solid rgba(255,68,102,0.15);
}
.badge-king {
  background: rgba(192,111,255,0.12);
  color: #c06fff;
  border: 1px solid rgba(192,111,255,0.2);
  text-shadow: 0 0 8px rgba(192,111,255,0.3);
}
.badge-greater {
  background: rgba(180,126,255,0.1);
  color: #b47eff;
  border: 1px solid rgba(180,126,255,0.18);
}
.badge-lesser {
  background: rgba(138,122,170,0.1);
  color: #8a7aaa;
  border: 1px solid rgba(138,122,170,0.15);
}

/* =============================================
   9. SHARED GLASS CARD (RunViewer pattern)
   ============================================= */
.glass-card {
  border-radius: 20px;
  border: 1px solid rgba(100, 60, 160, 0.12);
  background: rgba(10, 4, 26, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(100, 60, 160, 0.22);
}
.glass-card::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,126,255,0.15), transparent);
}

.glass-card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(100, 60, 160, 0.08);
}
.glass-card-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200,190,220,0.5);
}
.glass-card-header h3 span {
  color: #c06fff;
  margin-left: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9em;
  letter-spacing: 0;
}

.glass-card-body {
  padding: 8px;
  max-height: 380px;
  overflow-y: auto;
}
.glass-card-body::-webkit-scrollbar { width: 4px; }
.glass-card-body::-webkit-scrollbar-track { background: transparent; }
.glass-card-body::-webkit-scrollbar-thumb { background: rgba(180,126,255,0.15); border-radius: 4px; }

/* =============================================
   10. SHARED TABLES
   ============================================= */
.table-wrap, .scoring-table-wrap, .lb-table-wrap, .rv-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  margin: 4px 0;
}
.table-wrap table, .rv-table-wrap table { min-width: 420px; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 16px;
  border: 1px solid rgba(100, 60, 160, 0.12);
  border-radius: 14px;
  overflow: hidden;
}
th {
  background: rgba(14, 6, 32, 0.9);
  color: #b47eff;
  text-align: left;
  padding: 14px 18px;
  font-size: 0.7em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(100, 60, 160, 0.2);
}
td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(100, 60, 160, 0.06);
  vertical-align: top;
  font-size: 0.9em;
  line-height: 1.65;
  color: rgba(200, 190, 220, 0.7);
  transition: background 0.15s ease;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(180, 126, 255, 0.03); }
td strong { color: #7bff5a; text-shadow: 0 0 8px rgba(123,255,90,0.2); font-family: 'Cinzel', serif; }

.name {
  color: #7bff5a;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(123,255,90,0.25);
  font-family: 'Cinzel', serif;
  font-size: 0.95em;
}
.passive { color: #80d0a8; }
.active { color: #d88898; }

/* =============================================
   11. SHARED CONTENT TYPOGRAPHY
   ============================================= */
.content h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.4em;
  font-weight: 700;
  color: #b47eff;
  letter-spacing: 2px;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(100, 60, 160, 0.12);
  text-shadow: 0 0 20px rgba(180,126,255,0.2);
  position: relative;
}
.content h2::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 50px; height: 2px;
  background: linear-gradient(90deg, #7bff5a, transparent);
}
.content h2:first-child { margin-top: 0; }

.content h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.05em;
  font-weight: 600;
  color: #7bff5a;
  letter-spacing: 1.5px;
  margin-top: 28px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(123,255,90,0.2);
}

.content p {
  line-height: 1.85;
  color: rgba(200, 190, 220, 0.7);
  margin-bottom: 14px;
}
.content p:last-child { margin-bottom: 0; }
.content p strong, .content li strong { color: #b47eff; font-weight: 600; }
.content em { color: rgba(200, 190, 220, 0.6); }
.content code {
  background: rgba(123,255,90,0.06);
  border: 1px solid rgba(123,255,90,0.12);
  padding: 2px 8px;
  border-radius: 6px;
  color: #7bff5a;
  font-size: 0.86em;
}
.content ul { padding-left: 22px; margin-bottom: 14px; }
.content li { padding: 5px 0; line-height: 1.8; color: rgba(200,190,220,0.7); }

/* =============================================
   12. SHARED CALLOUTS
   ============================================= */
.info-note {
  font-size: 0.9em;
  margin: 16px 0;
  padding: 16px 20px;
  border-left: 3px solid #7bff5a;
  border-radius: 0 10px 10px 0;
  background: rgba(123,255,90,0.03);
  color: #7bff5a;
  line-height: 1.8;
}
.info-note.purple { border-left-color: #b47eff; background: rgba(180,126,255,0.03); color: rgba(200,190,220,0.8); }
.info-note.gold { border-left-color: #e8c45a; background: rgba(232,196,90,0.03); color: rgba(200,190,220,0.8); }

.table-note {
  font-size: 0.9em;
  margin-top: 12px;
  padding: 14px 18px;
  border-left: 3px solid #7bff5a;
  border-radius: 0 10px 10px 0;
  background: rgba(123,255,90,0.03);
  color: #7bff5a;
}

/* =============================================
   13. SHARED COLLAPSIBLE SECTIONS
   ============================================= */
.comp-section, .version-block {
  margin: 20px 0;
  border: 1px solid rgba(100, 60, 160, 0.1);
  border-radius: 20px;
  background: rgba(10, 4, 26, 0.4);
  backdrop-filter: blur(6px);
  scroll-margin-top: 80px;
  transition: all 0.3s ease;
  overflow: hidden;
}
.comp-section:hover, .version-block:hover {
  border-color: rgba(100, 60, 160, 0.2);
}

.comp-section summary, .version-block summary {
  padding: 24px 32px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: background 0.3s ease;
}
.comp-section summary::-webkit-details-marker,
.version-block summary::-webkit-details-marker { display: none; }

.comp-section summary::after, .version-block summary::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 2px solid rgba(120,100,150,0.4);
  border-bottom: 2px solid rgba(120,100,150,0.4);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.comp-section[open] summary::after, .version-block[open] summary::after {
  transform: rotate(-135deg);
}
.comp-section summary:hover, .version-block summary:hover {
  background: rgba(180,126,255,0.02);
}

.comp-section summary h2, .version-block summary h2 {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: 1.25em;
  font-weight: 700;
  color: #b47eff;
  letter-spacing: 2px;
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
  text-shadow: 0 0 15px rgba(180,126,255,0.2);
}
.comp-section summary h2::after, .version-block summary h2::after { display: none; }

.comp-section .section-body { padding: 0 32px 32px; }
.version-block .version-body { padding: 0 32px 32px; }

/* Boss variant */
.comp-section.boss-section { border-color: rgba(232,196,90,0.15); background: rgba(232,196,90,0.02); }
.comp-section.boss-section:hover { border-color: rgba(232,196,90,0.3); }
.comp-section.boss-section summary h2 { color: #e8c45a; text-shadow: 0 0 15px rgba(232,196,90,0.25); }

/* =============================================
   14. SHARED MISC STYLES
   ============================================= */
.formula {
  background: rgba(2,0,8,0.5);
  border: 1px solid rgba(100,60,160,0.12);
  border-radius: 14px;
  padding: 18px 24px;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
  color: #7bff5a;
  font-size: 0.88em;
  line-height: 2.2;
}

.rarity-bar { display: flex; gap: 2px; border-radius: 30px; overflow: hidden; margin: 16px 0; height: 4px; }
.rarity-bar span { flex: 1; }

.empty { color: rgba(200,190,220,0.3); font-size: 0.85em; font-style: italic; padding: 12px 0; }
.note { font-size: 0.75em; color: rgba(200,190,220,0.25); margin-top: 24px; }
.err-msg { color: #e07090; font-style: italic; padding: 20px 0; }

@keyframes grimoire-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0,230,200,0.2)) drop-shadow(0 3px 8px rgba(0,0,0,0.5)); }
  50% { filter: drop-shadow(0 0 20px rgba(0,230,200,0.5)) drop-shadow(0 3px 8px rgba(0,0,0,0.5)); }
}
.grimoire-glow { animation: grimoire-pulse 3s ease-in-out infinite; }

/* Subnav (changelog page) */
.subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.subnav a {
  font-size: 0.72em;
  font-weight: 500;
  color: rgba(200,190,220,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 16px;
  border: 1px solid rgba(100,60,160,0.12);
  border-radius: 30px;
  transition: all 0.3s ease;
}
.subnav a:hover {
  color: #c06fff;
  border-color: rgba(192,111,255,0.3);
  background: rgba(192,111,255,0.06);
  box-shadow: 0 0 16px rgba(192,111,255,0.1);
}

.expand-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}
.expand-controls button {
  padding: 8px 20px;
  border: 1px solid rgba(100, 60, 160, 0.2);
  border-radius: 30px;
  background: rgba(10, 4, 26, 0.4);
  color: rgba(200, 190, 220, 0.6);
  font-family: 'Inter', sans-serif;
  font-size: 0.75em;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}
.expand-controls button:hover {
  border-color: rgba(180, 126, 255, 0.4);
  color: #e0d8f0;
  background: rgba(180, 126, 255, 0.08);
}

/* Page header (old styles.css pattern) */
.page-header {
  position: relative;
  text-align: center;
  padding: 120px 32px 60px;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(192,111,255,0.06), transparent 70%);
  pointer-events: none;
}
.page-header-logo {
  display: inline-block;
  margin-bottom: 8px;
}
.page-header-logo img {
  height: 48px;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 20px rgba(123,255,90,0.25));
}
.page-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8em, 4vw, 2.8em);
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ede6f5;
  margin-bottom: 8px;
  position: relative;
}
.page-subtitle {
  font-size: 1em;
  color: rgba(200, 190, 220, 0.5);
  letter-spacing: 2px;
  font-style: italic;
}

/* =============================================
   15. HOW-TO-PLAY SPECIFIC
   ============================================= */

/* Core Loop - Horizontal Flow */
.core-loop-section {
  background: linear-gradient(180deg, #020008, #06021a, #020008);
}
.core-loop-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,126,255,0.15), transparent);
}

.flow-track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding: 20px 0 40px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.flow-track::-webkit-scrollbar { display: none; }

.flow-node {
  position: relative;
  flex: 0 0 auto;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.flow-connector {
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  padding-bottom: 40px;
}
.flow-connector-line {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(180,126,255,0.3) 0px,
    rgba(180,126,255,0.3) 6px,
    transparent 6px,
    transparent 12px
  );
  position: relative;
  animation: dashFlow 2s linear infinite;
}
.flow-connector-line::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid rgba(180,126,255,0.4);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.flow-number {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  margin-bottom: 16px;
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.flow-card {
  flex: 1;
  padding: 24px 16px 20px;
  border-radius: 20px;
  border: 1px solid rgba(100, 60, 160, 0.1);
  background: rgba(10, 4, 26, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.flow-card:hover {
  border-color: rgba(123,255,90,0.2);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 30px rgba(123,255,90,0.06);
}
.flow-card:hover ~ .flow-number,
.flow-node:hover .flow-number {
  border-color: rgba(123,255,90,0.5);
  box-shadow: 0 0 32px rgba(123,255,90,0.25), inset 0 0 20px rgba(123,255,90,0.1);
}

.flow-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  image-rendering: pixelated;
}

.flow-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #e0d8f0;
  margin-bottom: 10px;
}

.flow-card p {
  font-size: 0.82em;
  line-height: 1.7;
  color: rgba(200, 190, 220, 0.5);
}

/* Scoring Reference */
.scoring-section {
  background: linear-gradient(180deg, #020008, #04001a 50%, #020008);
}
.scoring-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123,255,90,0.12), transparent);
}

.scoring-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.scoring-panel {
  border-radius: 24px;
  border: 1px solid rgba(100, 60, 160, 0.12);
  background: rgba(10, 4, 26, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  position: relative;
  transition: all 0.4s ease;
}
.scoring-panel:hover {
  border-color: rgba(100, 60, 160, 0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.scoring-panel--green::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7bff5a, transparent);
}
.scoring-panel--green .scoring-panel-header {
  border-bottom-color: rgba(123,255,90,0.1);
}

.scoring-panel--purple::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c06fff, transparent);
}
.scoring-panel--purple .scoring-panel-header {
  border-bottom-color: rgba(192,111,255,0.1);
}

.scoring-panel-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(100, 60, 160, 0.08);
}
.scoring-panel-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.scoring-panel--green .scoring-panel-header h3 {
  color: #7bff5a;
  text-shadow: 0 0 15px rgba(123,255,90,0.2);
}
.scoring-panel--purple .scoring-panel-header h3 {
  color: #c06fff;
  text-shadow: 0 0 15px rgba(192,111,255,0.2);
}
.scoring-panel-header p {
  font-size: 0.88em;
  color: rgba(200, 190, 220, 0.45);
}

.scoring-panel-body {
  padding: 0 28px 28px;
}

.scoring-panel table {
  width: 100%;
  border-collapse: collapse;
}
.scoring-panel th {
  font-family: 'Inter', sans-serif;
  font-size: 0.65em;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200, 190, 220, 0.35);
  text-align: left;
  padding: 16px 0 10px;
  border-bottom: 1px solid rgba(100, 60, 160, 0.08);
}
.scoring-panel td {
  font-size: 0.88em;
  color: rgba(200, 190, 220, 0.7);
  padding: 12px 8px 12px 0;
  border-bottom: 1px solid rgba(100, 60, 160, 0.04);
  vertical-align: top;
}
.scoring-panel tr:last-child td {
  border-bottom: none;
}
.scoring-panel td:first-child {
  color: #e0d8f0;
  font-weight: 500;
  white-space: nowrap;
}

.scoring-bonus {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(123,255,90,0.04);
  border: 1px solid rgba(123,255,90,0.12);
  display: flex;
  align-items: center;
  gap: 12px;
}
.scoring-bonus-icon {
  font-size: 1.6em;
  flex-shrink: 0;
}
.scoring-bonus p {
  font-size: 0.85em;
  line-height: 1.6;
  color: rgba(123,255,90,0.8);
}
.scoring-bonus strong {
  color: #7bff5a;
}

/* Pro Tips */
.tips-section {
  background: linear-gradient(180deg, #020008, #0a0320 50%, #020008);
}
.tips-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,111,255,0.15), transparent);
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.tip-block {
  position: relative;
  padding: 40px 48px 36px 80px;
  border-radius: 24px;
  border: 1px solid rgba(100, 60, 160, 0.08);
  background: rgba(10, 4, 26, 0.3);
  transition: all 0.4s ease;
}
.tip-block:hover {
  border-color: rgba(100, 60, 160, 0.2);
  background: rgba(10, 4, 26, 0.5);
  transform: translateX(6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.tip-block::before {
  content: '\201C';
  position: absolute;
  top: 12px;
  left: 24px;
  font-family: 'Cinzel', serif;
  font-size: 5em;
  font-weight: 900;
  line-height: 1;
  color: rgba(180, 126, 255, 0.1);
  pointer-events: none;
}

.tip-block:nth-child(odd)::before {
  color: rgba(123,255,90,0.08);
}

.tip-block p {
  font-size: 1.1em;
  line-height: 1.9;
  color: rgba(200, 190, 220, 0.7);
  position: relative;
  z-index: 1;
}

.tip-block .tip-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.tip-block:nth-child(1) .tip-label { color: #7bff5a; background: rgba(123,255,90,0.08); border: 1px solid rgba(123,255,90,0.15); }
.tip-block:nth-child(2) .tip-label { color: #c06fff; background: rgba(192,111,255,0.08); border: 1px solid rgba(192,111,255,0.15); }
.tip-block:nth-child(3) .tip-label { color: #ff5eaa; background: rgba(255,94,170,0.08); border: 1px solid rgba(255,94,170,0.15); }
.tip-block:nth-child(4) .tip-label { color: #b47eff; background: rgba(180,126,255,0.08); border: 1px solid rgba(180,126,255,0.15); }

/* =============================================
   16. LEADERBOARD SPECIFIC
   ============================================= */
.lb-main {
  position: relative;
  padding: 60px 32px 100px;
  overflow: hidden;
}
.lb-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,126,255,0.15), transparent);
}
.lb-main-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Loading State */
.lb-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 24px;
}
.lb-loading-orbs {
  display: flex;
  gap: 12px;
}
.lb-loading-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b47eff;
  animation: orbPulse 1.4s ease-in-out infinite;
}
.lb-loading-orb:nth-child(2) { animation-delay: 0.2s; background: #c06fff; }
.lb-loading-orb:nth-child(3) { animation-delay: 0.4s; background: #7bff5a; }
@keyframes orbPulse {
  0%, 100% { transform: scale(0.6); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 20px currentColor; }
}
.lb-loading-text {
  font-family: 'Cinzel', serif;
  font-size: 1em;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(200, 190, 220, 0.4);
  animation: loadTextPulse 2s ease-in-out infinite;
}
@keyframes loadTextPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Stats Row */
.lb-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.lb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.lb-stat-value {
  font-family: 'Cinzel', serif;
  font-size: 2em;
  font-weight: 700;
  color: #ede6f5;
}
.lb-stat-label {
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200, 190, 220, 0.4);
}
.lb-stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(180,126,255,0.2), transparent);
}
.lb-compete-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: 'Cinzel', serif;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: #020008;
  background: linear-gradient(135deg, #7bff5a, #50e840);
  border-radius: 60px;
  box-shadow: 0 4px 24px rgba(123,255,90,0.25);
  transition: all 0.3s ease;
}
.lb-compete-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(123,255,90,0.4);
}

/* Podium */
.lb-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
  padding: 0 20px;
}

.lb-podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 28px 32px;
  border-radius: 24px;
  border: 1px solid rgba(100, 60, 160, 0.12);
  background: rgba(10, 4, 26, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  width: 220px;
  animation: podiumRise 0.6s ease both;
}
.lb-podium-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.lb-podium-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
}
.lb-podium-card:hover {
  transform: translateY(-6px);
}

/* Gold - 1st place */
.lb-podium-card.gold {
  min-height: 260px;
  border-color: rgba(255, 215, 0, 0.2);
  animation-delay: 0.2s;
  order: 2;
}
.lb-podium-card.gold::before {
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
}
.lb-podium-card.gold::after {
  box-shadow: inset 0 0 60px rgba(255, 215, 0, 0.05);
  background: radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.06), transparent 60%);
}
.lb-podium-card.gold:hover {
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.15), 0 0 40px rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.35);
}

/* Silver - 2nd place */
.lb-podium-card.silver {
  min-height: 220px;
  border-color: rgba(192, 192, 210, 0.15);
  animation-delay: 0.35s;
  order: 1;
}
.lb-podium-card.silver::before {
  background: linear-gradient(90deg, transparent, rgba(192, 192, 210, 0.6), transparent);
}
.lb-podium-card.silver::after {
  box-shadow: inset 0 0 60px rgba(192, 192, 210, 0.03);
  background: radial-gradient(circle at 50% 0%, rgba(192, 192, 210, 0.04), transparent 60%);
}
.lb-podium-card.silver:hover {
  box-shadow: 0 20px 60px rgba(192, 192, 210, 0.1), 0 0 40px rgba(192, 192, 210, 0.06);
  border-color: rgba(192, 192, 210, 0.3);
}

/* Bronze - 3rd place */
.lb-podium-card.bronze {
  min-height: 200px;
  border-color: rgba(205, 127, 50, 0.15);
  animation-delay: 0.5s;
  order: 3;
}
.lb-podium-card.bronze::before {
  background: linear-gradient(90deg, transparent, rgba(205, 127, 50, 0.6), transparent);
}
.lb-podium-card.bronze::after {
  box-shadow: inset 0 0 60px rgba(205, 127, 50, 0.03);
  background: radial-gradient(circle at 50% 0%, rgba(205, 127, 50, 0.04), transparent 60%);
}
.lb-podium-card.bronze:hover {
  box-shadow: 0 20px 60px rgba(205, 127, 50, 0.1), 0 0 40px rgba(205, 127, 50, 0.06);
  border-color: rgba(205, 127, 50, 0.3);
}

@keyframes podiumRise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.lb-podium-rank {
  font-family: 'Cinzel', serif;
  font-size: 2.2em;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}
.gold .lb-podium-rank { color: #ffd700; text-shadow: 0 0 25px rgba(255, 215, 0, 0.4); }
.silver .lb-podium-rank { color: #c0c0d2; text-shadow: 0 0 20px rgba(192, 192, 210, 0.3); }
.bronze .lb-podium-rank { color: #cd7f32; text-shadow: 0 0 20px rgba(205, 127, 50, 0.3); }

.lb-podium-crown {
  font-size: 1.6em;
  margin-bottom: 4px;
  display: block;
}

.lb-podium-name {
  font-family: 'Cinzel', serif;
  font-size: 1.05em;
  font-weight: 600;
  color: #ede6f5;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-align: center;
  word-break: break-word;
}

.lb-podium-souls-label {
  font-size: 0.65em;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200, 190, 220, 0.35);
  margin-bottom: 2px;
}
.lb-podium-souls {
  font-family: 'Cinzel', serif;
  font-size: 1.5em;
  font-weight: 700;
  color: #7bff5a;
  text-shadow: 0 0 15px rgba(123,255,90,0.25);
}

.lb-podium-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78em;
  color: rgba(200, 190, 220, 0.4);
}
.lb-podium-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Table */
.lb-table-section {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(100, 60, 160, 0.1);
  background: rgba(10, 4, 26, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.6s both;
}
.lb-table-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,126,255,0.2), transparent);
}

.lb-table-header {
  padding: 24px 32px 16px;
  font-family: 'Cinzel', serif;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200, 190, 220, 0.4);
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
}
.lb-table th {
  padding: 12px 20px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200, 190, 220, 0.3);
  border-bottom: 1px solid rgba(100, 60, 160, 0.08);
}
.lb-table td {
  padding: 16px 20px;
  font-size: 0.95em;
  border-bottom: 1px solid rgba(100, 60, 160, 0.05);
  transition: background 0.2s ease;
}
.lb-table tr:last-child td {
  border-bottom: none;
}
.lb-table tr:hover td {
  background: rgba(180, 126, 255, 0.03);
}

.lb-table .rank-cell {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1em;
  color: rgba(200, 190, 220, 0.5);
  width: 60px;
}
.lb-table .name-cell {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  color: #e0d8f0;
  letter-spacing: 0.5px;
}
.lb-table .souls-cell {
  color: #7bff5a;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-shadow: 0 0 10px rgba(123,255,90,0.15);
}
.lb-table .level-cell {
  color: #b47eff;
}
.lb-table .trial-cell {
  color: #60dd80;
}
.lb-table .ver-cell {
  color: rgba(200,190,220,0.3);
  font-size: 0.85em;
}

/* Error State */
.lb-error-state {
  text-align: center;
  padding: 80px 20px;
}
.lb-error-state p {
  font-family: 'Cinzel', serif;
  font-size: 1.1em;
  color: rgba(200, 190, 220, 0.4);
  letter-spacing: 2px;
}

/* Empty State */
.lb-empty-state {
  text-align: center;
  padding: 80px 20px;
}
.lb-empty-state p {
  font-family: 'Cinzel', serif;
  font-size: 1.1em;
  color: rgba(200, 190, 220, 0.4);
  letter-spacing: 2px;
}

/* =============================================
   17. RUN VIEWER SPECIFIC
   ============================================= */

/* Status Pill */
.status-pill {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 40px;
  background: rgba(10, 4, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(100, 60, 160, 0.15);
  font-size: 0.75em;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: rgba(200,190,220,0.6);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-pill .dot.loading {
  background: #f0c040;
  box-shadow: 0 0 8px rgba(240,192,64,0.5);
  animation: pulse 1.5s ease-in-out infinite;
}
.status-pill .dot.ok {
  background: #7bff5a;
  box-shadow: 0 0 8px rgba(123,255,90,0.5);
}
.status-pill .dot.err {
  background: #ff4466;
  box-shadow: 0 0 8px rgba(255,68,102,0.5);
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Two-Panel Layout */
.rv-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  gap: 28px;
  min-height: calc(100vh - 35vh);
}

.rv-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* Player List */
.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 2px 0;
}
.player-row:hover {
  background: rgba(180,126,255,0.06);
}
.player-row.selected {
  background: rgba(123,255,90,0.06);
  border: 1px solid rgba(123,255,90,0.12);
}
.player-name {
  font-weight: 600;
  font-size: 0.9em;
  color: #e0d8f0;
}
.player-id {
  font-size: 0.7em;
  font-family: monospace;
  color: rgba(200,190,220,0.3);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Run List */
.run-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 2px 0;
  flex-wrap: wrap;
}
.run-row:hover {
  background: rgba(180,126,255,0.06);
}
.run-row.selected {
  background: rgba(192,111,255,0.08);
  border: 1px solid rgba(192,111,255,0.15);
}
.run-row .souls-text {
  color: #7bff5a;
  font-size: 0.8em;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(123,255,90,0.25);
}
.run-row .trial-text {
  color: rgba(200,190,220,0.4);
  font-size: 0.75em;
}
.run-row .date-text {
  color: rgba(200,190,220,0.3);
  font-size: 0.7em;
  margin-left: auto;
}

/* Run Detail */
.run-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: rgba(200,190,220,0.3);
  font-size: 0.9em;
  font-style: italic;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 30px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(10,4,26,0.6), rgba(20,10,40,0.4));
  border: 1px solid rgba(100,60,160,0.12);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.detail-header::before {
  content: '';
  position: absolute;
}
.detail-result {
  padding: 8px 24px;
  border-radius: 30px;
  font-family: 'Cinzel', serif;
  font-size: 1em;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.detail-result.victory {
  background: linear-gradient(135deg, rgba(123,255,90,0.15), rgba(123,255,90,0.05));
  color: #7bff5a;
  border: 1px solid rgba(123,255,90,0.25);
  text-shadow: 0 0 15px rgba(123,255,90,0.3);
  box-shadow: 0 0 30px rgba(123,255,90,0.08);
}
.detail-result.defeat {
  background: linear-gradient(135deg, rgba(255,68,102,0.12), rgba(255,68,102,0.04));
  color: #ff6680;
  border: 1px solid rgba(255,68,102,0.2);
  text-shadow: 0 0 12px rgba(255,68,102,0.2);
}
.detail-header-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-left: auto;
}
.detail-header-stat {
  text-align: center;
}
.detail-header-stat .val {
  font-family: 'Cinzel', serif;
  font-size: 1.6em;
  font-weight: 700;
  color: #ede6f5;
  line-height: 1;
}
.detail-header-stat .lbl {
  font-size: 0.65em;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,190,220,0.4);
  margin-top: 4px;
}

/* Section Heading */
.detail-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200,190,220,0.45);
  margin: 32px 0 14px;
  padding-left: 4px;
  position: relative;
}
.detail-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #b47eff, transparent);
  border-radius: 2px;
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.stat-card {
  padding: 18px 16px;
  border-radius: 14px;
  background: rgba(10, 4, 26, 0.5);
  border: 1px solid rgba(100, 60, 160, 0.1);
  text-align: center;
  transition: all 0.25s ease;
}
.stat-card:hover {
  border-color: rgba(100, 60, 160, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.stat-card .label {
  font-size: 0.65em;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,190,220,0.4);
  margin-bottom: 6px;
}
.stat-card .value {
  font-family: 'Cinzel', serif;
  font-size: 1.1em;
  font-weight: 700;
  color: #ede6f5;
}
.stat-card .value.victory { color: #7bff5a; text-shadow: 0 0 10px rgba(123,255,90,0.3); }
.stat-card .value.defeat { color: #ff6680; text-shadow: 0 0 10px rgba(255,68,102,0.2); }

/* Trials Table */
.rv-table-wrap {
  border-radius: 14px;
  border: 1px solid rgba(100, 60, 160, 0.1);
  background: rgba(10, 4, 26, 0.35);
  overflow: hidden;
  margin-bottom: 8px;
}
.rv-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.rv-table-wrap th {
  padding: 12px 14px;
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,190,220,0.35);
  text-align: left;
  border-bottom: 1px solid rgba(100,60,160,0.08);
  background: rgba(10,4,26,0.4);
}
.rv-table-wrap td {
  padding: 10px 14px;
  font-size: 0.85em;
  color: rgba(200,190,220,0.7);
  border-bottom: 1px solid rgba(100,60,160,0.04);
}
.rv-table-wrap tr:last-child td { border-bottom: none; }
.rv-table-wrap tr:hover td { background: rgba(180,126,255,0.03); }

.trial-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(100,60,160,0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.trial-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.trial-progress-fill.passed {
  background: linear-gradient(90deg, #7bff5a, #50e840);
  box-shadow: 0 0 6px rgba(123,255,90,0.3);
}
.trial-progress-fill.failed {
  background: linear-gradient(90deg, #ff6680, #ff4466);
  box-shadow: 0 0 6px rgba(255,68,102,0.2);
}

/* Demon Cards (RunViewer version - top gradient bar via rank-*) */
.demons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.demon-card {
  padding: 20px;
  border-radius: 16px;
  background: rgba(10, 4, 26, 0.45);
  border: 1px solid rgba(100, 60, 160, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.demon-card:hover {
  border-color: rgba(100, 60, 160, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* RunViewer demon-card ::before = top gradient bar */
.demon-card.rank-king::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0.6;
  background: linear-gradient(90deg, transparent, #c06fff, transparent);
}
.demon-card.rank-greater::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0.6;
  background: linear-gradient(90deg, transparent, #b47eff, transparent);
}
.demon-card.rank-lesser::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0.6;
  background: linear-gradient(90deg, transparent, #8a7aaa, transparent);
}

.demon-card-name {
  font-family: 'Cinzel', serif;
  font-size: 1em;
  font-weight: 700;
  color: #ede6f5;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demon-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.78em;
  color: rgba(200,190,220,0.5);
}
.demon-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.demon-card-meta .meta-label {
  color: rgba(200,190,220,0.3);
}

/* Scorecard by Trial */
.scorecard-trial-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(180,126,255,0.5);
  margin: 18px 0 8px;
  padding-left: 2px;
}

/* =============================================
   18. COMPENDIUM SPECIFIC
   ============================================= */

/* Sticky Subnav */
.comp-subnav {
  position: sticky;
  top: 64px;
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  background: rgba(2, 0, 8, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.comp-subnav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 50px;
  border: 1px solid rgba(100, 60, 160, 0.15);
  background: rgba(10, 4, 26, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  flex-wrap: wrap;
  justify-content: center;
}

.comp-subnav-inner a {
  color: rgba(200, 190, 220, 0.55);
  text-decoration: none;
  font-size: 0.68em;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 30px;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.comp-subnav-inner a:hover {
  color: #e0d8f0;
  background: rgba(180, 126, 255, 0.12);
}

/* Main Content Area */
.comp-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* Rank Section Headers */
.rank-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 28px 32px;
  border-radius: 20px;
  border: 1px solid rgba(100, 60, 160, 0.1);
  background: rgba(10, 4, 26, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rank-intro-icon {
  font-size: 2.8em;
  flex-shrink: 0;
}

.rank-intro-text h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.rank-intro-text h2.king-title { color: #c06fff; text-shadow: 0 0 20px rgba(192,111,255,0.3); }
.rank-intro-text h2.greater-title { color: #b47eff; text-shadow: 0 0 15px rgba(180,126,255,0.2); }
.rank-intro-text h2.lesser-title { color: #8a7aaa; }

.rank-intro-count {
  font-family: 'Cinzel', serif;
  font-size: 0.85em;
  font-weight: 600;
  color: rgba(200, 190, 220, 0.5);
  letter-spacing: 2px;
}

.rank-intro-flavor {
  font-size: 0.9em;
  color: rgba(200, 190, 220, 0.45);
  line-height: 1.6;
  margin-top: 4px;
}

/* Demon Card Grid */
.demon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 60px;
}

/* Compendium demon-card overrides - left vertical bar via card-* */
.comp-main .demon-card {
  padding: 24px 24px 24px 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.comp-main .demon-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 30px rgba(180,126,255,0.06);
}

.demon-card.card-king::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #c06fff, #9a4fdf);
}
.demon-card.card-greater::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #b47eff, #8a5ed0);
}
.demon-card.card-lesser::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #5a3a8a, #3d2660);
}

.comp-main .demon-card-name {
  font-size: 1.1em;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.reworked-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #020008;
  background: linear-gradient(135deg, #7bff5a, #50e840);
  padding: 2px 8px;
  border-radius: 20px;
  box-shadow: 0 0 12px rgba(123,255,90,0.25);
  vertical-align: middle;
}

/* Reworked demon card layout with portrait */
.demon-card-reworked {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.demon-portrait {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  border: 2px solid rgba(123, 255, 90, 0.2);
  object-fit: cover;
  box-shadow: 0 0 16px rgba(123, 255, 90, 0.08);
}
.demon-card-info {
  flex: 1;
  min-width: 0;
}
.demon-talent-link {
  display: inline-block;
  margin-top: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75em;
  font-weight: 500;
  color: #b388ff;
  text-decoration: none;
  border: 1px solid rgba(179, 136, 255, 0.3);
  padding: 3px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.demon-talent-link:hover {
  background: rgba(179, 136, 255, 0.1);
  border-color: #b388ff;
}

.demon-ability {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.88em;
  line-height: 1.6;
  color: rgba(200, 190, 220, 0.7);
}
.demon-ability:last-child { margin-bottom: 0; }

.ability-label {
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 2px;
}
.ability-label.passive-label {
  color: #7bff5a;
  background: rgba(123, 255, 90, 0.1);
  border: 1px solid rgba(123, 255, 90, 0.15);
}
.ability-label.active-label {
  color: #ff6b9d;
  background: rgba(255, 107, 157, 0.1);
  border: 1px solid rgba(255, 107, 157, 0.15);
}

/* Mechanics Details Sections */
.mech-section {
  margin-bottom: 20px;
  border-radius: 16px;
  border: 1px solid rgba(100, 60, 160, 0.1);
  background: rgba(10, 4, 26, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.mech-section[open] {
  border-color: rgba(100, 60, 160, 0.2);
}
.mech-section summary {
  padding: 20px 28px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}
.mech-section summary::-webkit-details-marker { display: none; }
.mech-section summary::after {
  content: '+';
  font-family: 'Cinzel', serif;
  font-size: 1.2em;
  color: rgba(180, 126, 255, 0.5);
  transition: transform 0.3s ease;
}
.mech-section[open] summary::after {
  content: '\2212';
}
.mech-section summary:hover {
  background: rgba(180, 126, 255, 0.04);
}
.mech-section summary h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.15em;
  font-weight: 700;
  color: #ede6f5;
  letter-spacing: 2px;
}

.mech-body {
  padding: 0 28px 28px;
}
.mech-body p {
  font-size: 0.92em;
  line-height: 1.8;
  color: rgba(200, 190, 220, 0.65);
  margin-bottom: 16px;
}
.mech-body p strong {
  color: #d8cef0;
}
.mech-body ul {
  margin: 0 0 16px 20px;
  font-size: 0.92em;
  line-height: 1.8;
  color: rgba(200, 190, 220, 0.65);
}
.mech-body ul li { margin-bottom: 6px; }
.mech-body ul strong { color: #d8cef0; }

.mech-body h3 {
  font-family: 'Cinzel', serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
  margin-top: 20px;
}

/* Mech-body table styles */
.mech-body .table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(100, 60, 160, 0.1);
}
.mech-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
}
.mech-body table th {
  padding: 12px 16px;
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(180, 126, 255, 0.7);
  background: rgba(10, 4, 26, 0.6);
  border-bottom: 1px solid rgba(100, 60, 160, 0.15);
}
.mech-body table td {
  padding: 10px 16px;
  color: rgba(200, 190, 220, 0.7);
  border-bottom: 1px solid rgba(100, 60, 160, 0.06);
}
.mech-body table tr:last-child td { border-bottom: none; }
.mech-body table tr:hover td {
  background: rgba(180, 126, 255, 0.03);
}
.mech-body table td.name-cell {
  color: #ede6f5;
  font-weight: 600;
  font-family: 'Cinzel', serif;
  font-size: 0.95em;
  letter-spacing: 0.5px;
}

/* Boss table angel name */
.mech-body table td.angel-name {
  color: #e8c45a;
  font-weight: 600;
  font-family: 'Cinzel', serif;
  text-shadow: 0 0 8px rgba(232,196,90,0.3);
}

/* Compendium info-note overrides */
.comp-main .info-note {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.88em;
  line-height: 1.7;
  margin-bottom: 16px;
  border-left: none;
}
.comp-main .info-note.purple {
  background: rgba(180, 126, 255, 0.06);
  border: 1px solid rgba(180, 126, 255, 0.12);
  color: rgba(200, 190, 220, 0.7);
}
.comp-main .info-note.gold {
  background: rgba(232, 196, 90, 0.06);
  border: 1px solid rgba(232, 196, 90, 0.12);
  color: rgba(232, 196, 90, 0.8);
}

/* Compendium rarity bar override */
.comp-main .rarity-bar {
  height: 6px;
  margin: 16px 0 10px;
}
.comp-main .rarity-bar span {
  border-radius: 3px;
}

/* Compendium formula override */
.comp-main .formula {
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid rgba(180, 126, 255, 0.15);
  background: rgba(10, 4, 26, 0.6);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  line-height: 2;
  color: rgba(200, 190, 220, 0.8);
  margin-bottom: 16px;
}

/* =============================================
   19. CHANGELOG SPECIFIC
   ============================================= */

/* Changelog hero uses hero-header/hero-bg etc. (kept for backward compat) */
.hero-header {
  position: relative;
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(123,255,90,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 70% 50%, rgba(192,111,255,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(255,94,170,0.04) 0%, transparent 70%);
  animation: heroDrift 20s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(2,0,8,0.9) 0%, transparent 60%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100,60,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,60,160,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-header .hero-logo {
  display: inline-block;
  margin-bottom: 12px;
}
.hero-header .hero-logo img {
  height: 56px;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 30px rgba(123,255,90,0.3));
  animation: logoFadeIn 1.2s ease both;
}
.hero-header .hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8em, 4vw, 2.8em);
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ede6f5;
  margin-bottom: 8px;
  animation: fadeInUp 0.8s ease 0.3s both;
}
.hero-header .hero-subtitle {
  font-size: 1em;
  color: rgba(200, 190, 220, 0.5);
  letter-spacing: 2px;
  font-style: italic;
  animation: fadeInUp 0.8s ease 0.5s both;
}

/* =============================================
   CHANGELOG HERO (animated intro)
   ============================================= */
.cl-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 32px 60px;
  overflow: hidden;
}
.cl-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(123,255,90,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 70% 50%, rgba(192,111,255,0.07) 0%, transparent 70%);
  animation: heroDrift 20s ease-in-out infinite alternate;
}
.cl-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100,60,160,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,60,160,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  animation: gridPulse 8s ease-in-out infinite alternate;
}
.cl-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Vertical timeline line */
.cl-timeline-line {
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, rgba(192,111,255,0.6), rgba(123,255,90,0.4));
  margin-bottom: 16px;
  animation: clLineGrow 1.2s ease-out 0.2s forwards;
  box-shadow: 0 0 12px rgba(192,111,255,0.3);
}
@keyframes clLineGrow {
  from { height: 0; opacity: 0; }
  to { height: 80px; opacity: 1; }
}

/* Cascading version numbers */
.cl-versions-cascade {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  height: 28px;
}
.cl-ver {
  font-family: 'Cinzel', serif;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(192,111,255,0.3);
  opacity: 0;
  transform: translateY(10px);
  animation: clVerFade 0.5s ease forwards;
}
.cl-ver-5 {
  color: rgba(123,255,90,0.7);
  font-size: 0.9em;
  text-shadow: 0 0 20px rgba(123,255,90,0.3);
}
.cl-ver-1 { animation-delay: 0.6s; }
.cl-ver-2 { animation-delay: 0.8s; }
.cl-ver-3 { animation-delay: 1.0s; }
.cl-ver-4 { animation-delay: 1.2s; }
.cl-ver-5 { animation-delay: 1.4s; }
@keyframes clVerFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pulsing dot at the end of the timeline */
.cl-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7bff5a;
  box-shadow: 0 0 16px rgba(123,255,90,0.5), 0 0 40px rgba(123,255,90,0.2);
  margin-bottom: 24px;
  opacity: 0;
  animation: clDotAppear 0.4s ease 1.0s forwards, clDotPulse 2s ease-in-out 1.4s infinite;
}
@keyframes clDotAppear {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes clDotPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(123,255,90,0.5), 0 0 40px rgba(123,255,90,0.2); }
  50% { box-shadow: 0 0 24px rgba(123,255,90,0.8), 0 0 60px rgba(123,255,90,0.35); }
}

.cl-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2em, 5vw, 3.5em);
  font-weight: 800;
  color: #ede6f5;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.2s forwards;
}
.cl-hero-tagline {
  font-size: clamp(0.85em, 2vw, 1.1em);
  color: rgba(200, 190, 220, 0.55);
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.5s forwards;
}

/* Version block specific */
.version-date { color: rgba(200,190,220,0.4); font-style: italic; font-size: 0.88em; margin-bottom: 24px; }
.changelog-list { list-style: none; padding: 0; }
.changelog-list li {
  padding: 12px 0 12px 32px;
  border-bottom: 1px solid rgba(100,60,160,0.06);
  position: relative;
  line-height: 1.8;
  color: rgba(200,190,220,0.7);
}
.changelog-list li:last-child { border-bottom: none; }
.changelog-list li::before { content: '\26A1'; position: absolute; left: 0; }
.changelog-flavor { color: rgba(200,190,220,0.55); font-size: 0.95em; margin-top: 8px; margin-bottom: 24px; line-height: 1.9; }

/* Changelog table row rank styles (colored left borders) */
.rank-king { border-left: 3px solid #c06fff; background: rgba(192,111,255,0.03); }
.rank-king:hover td { background: rgba(192,111,255,0.07) !important; }
.rank-greater { border-left: 3px solid #5a3a8a; background: rgba(90,58,138,0.02); }
.rank-greater:hover td { background: rgba(90,58,138,0.07) !important; }
.rank-lesser { border-left: 3px solid #2a1a45; }
.rank-lesser:hover td { background: rgba(42,21,69,0.15) !important; }

.reworked {
  display: inline-block;
  font-size: 0.55em;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 30px;
  background: linear-gradient(90deg, #c06fff, #7bff5a);
  color: #020008;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  vertical-align: middle;
}
.rank-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.55em;
  color: rgba(120,100,150,0.5);
  font-weight: 400;
  margin-left: 10px;
}

.upgrade-table td:first-child { color: #c06fff; font-weight: 600; white-space: nowrap; }

/* Timeline (old how-to-play, changelog) */
.timeline { position: relative; margin: 40px 0; padding-left: 72px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 30px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(180,126,255,0.3), rgba(100,60,160,0.1), transparent);
}

.step { position: relative; margin-bottom: 28px; }
.step-number {
  position: absolute;
  left: -72px; top: 4px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(14,6,32,0.8);
  border: 2px solid rgba(180,126,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1.1em;
  color: #b47eff;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(180,126,255,0.15);
  z-index: 1;
}
.step-card {
  padding: 26px 30px;
  border: 1px solid rgba(100,60,160,0.1);
  border-radius: 20px;
  background: rgba(10,4,26,0.4);
  backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}
.step-card:hover {
  border-color: rgba(100,60,160,0.2);
  transform: translateX(4px);
}
.step-header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.step-icon { font-size: 1.8em; flex-shrink: 0; }
.step-title {
  font-family: 'Cinzel', serif;
  color: #c06fff;
  font-size: 1.08em;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin: 0;
  text-shadow: 0 0 12px rgba(192,111,255,0.2);
}
.step-desc { font-size: 0.92em; color: rgba(200,190,220,0.6); line-height: 1.8; margin: 0; }

/* Scoring section (old styles.css) */
.scoring-section-legacy { margin: 40px 0; }

/* Tips grid (old styles.css) */
.tips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 28px 0 40px;
}
.tip {
  text-align: center;
  padding: 28px 24px;
  border: 1px solid rgba(100,60,160,0.1);
  border-radius: 20px;
  background: rgba(10,4,26,0.4);
  backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}
.tip:hover { border-color: rgba(100,60,160,0.2); transform: translateY(-3px); }
.tip-icon { font-size: 1.6em; margin-bottom: 12px; }
.tip p { font-size: 0.9em; color: rgba(200,190,220,0.6); line-height: 1.7; margin: 0; }

/* Old leaderboard styles from styles.css */
.leaderboard {
  padding: 40px;
  border: 1px solid rgba(100,60,160,0.12);
  border-radius: 24px;
  background: rgba(10,4,26,0.5);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.leaderboard::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7bff5a, transparent);
}
.leaderboard h2 { margin-top: 0; }
.leaderboard h2::after { display: none; }
.leaderboard table { margin-bottom: 0; }
.leaderboard td, .leaderboard th { text-align: center; }
.leaderboard td:first-child, .leaderboard th:first-child { text-align: center; width: 60px; }
.leaderboard td:nth-child(2), .leaderboard th:nth-child(2) { text-align: left; }
.leaderboard td:last-child, .leaderboard th:last-child { text-align: right; }

.lb-rank { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15em; }
.lb-gold { color: #ffd700; text-shadow: 0 0 12px rgba(255,215,0,0.5); }
.lb-silver { color: #c8c8c8; text-shadow: 0 0 8px rgba(200,200,200,0.3); }
.lb-bronze { color: #cd7f32; text-shadow: 0 0 8px rgba(205,127,50,0.3); }
.lb-name { color: #ede6f5; font-weight: 600; }
.lb-souls { color: #7bff5a; font-weight: 700; font-family: 'Cinzel', serif; text-shadow: 0 0 10px rgba(123,255,90,0.25); }
.lb-loading { text-align: center; color: rgba(200,190,220,0.4); font-style: italic; padding: 28px; letter-spacing: 2px; }
.lb-error { text-align: center; color: #c06070; font-style: italic; padding: 28px; }

/* Old RV status styles */
#status-msg { text-align: center; font-size: 0.85em; color: rgba(200,190,220,0.4); margin-bottom: 24px; letter-spacing: 1px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.status-dot.ok { background: #7bff5a; box-shadow: 0 0 10px rgba(123,255,90,0.35); }
.status-dot.err { background: #e07090; box-shadow: 0 0 10px rgba(224,112,144,0.4); }
.status-dot.loading { background: #b47eff; box-shadow: 0 0 10px rgba(180,126,255,0.3); animation: pulseDot 1.5s ease-in-out infinite; }
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

#run-detail {
  margin-top: 14px;
  padding: 32px;
  border: 1px solid rgba(100,60,160,0.1);
  border-radius: 20px;
  background: rgba(10,4,26,0.5);
  backdrop-filter: blur(8px);
}
#run-detail:empty { display: none; }

/* =============================================
   HOMEPAGE SPECIFIC
   ============================================= */

/* ---- Homepage Hero ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(123,255,90,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 70% 50%, rgba(192,111,255,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(255,94,170,0.04) 0%, transparent 70%);
  animation: heroDrift 20s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(2,0,8,0.9) 0%, transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100,60,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,60,160,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-logo {
  width: min(500px, 80vw);
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 50px rgba(123,255,90,0.3));
  margin-bottom: 24px;
  animation: logoFadeIn 1.2s ease both;
}

.hero-tagline {
  font-family: 'Cinzel', serif;
  font-size: clamp(1em, 2.5vw, 1.5em);
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(123,255,90,0.9);
  text-shadow: 0 0 30px rgba(123,255,90,0.3);
  margin-bottom: 28px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-desc {
  font-size: 1.1em;
  line-height: 1.9;
  color: rgba(200, 190, 220, 0.7);
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  font-family: 'Cinzel', serif;
  font-size: 0.95em;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: #020008;
  background: linear-gradient(135deg, #7bff5a, #50e840);
  border-radius: 60px;
  box-shadow: 0 4px 30px rgba(123,255,90,0.3), 0 0 60px rgba(123,255,90,0.1);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease 0.8s both;
}
.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(123,255,90,0.4), 0 0 80px rgba(123,255,90,0.15);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(200, 190, 220, 0.25);
  font-size: 0.7em;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: fadeIn 1s ease 1.5s both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(180,126,255,0.3), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.7; transform: scaleY(1.3); }
}

/* ---- Homepage Section Subtitle ---- */
.section-subtitle {
  font-size: 1.1em;
  color: rgba(200, 190, 220, 0.6);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 48px;
}

/* ---- Features Section ---- */
.features-section {
  background: linear-gradient(180deg, #020008, #06021a, #020008);
}
.features-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,126,255,0.15), transparent);
}

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

.f-card {
  position: relative;
  padding: 48px 32px 40px;
  border-radius: 24px;
  border: 1px solid rgba(100, 60, 160, 0.12);
  background: rgba(10, 4, 26, 0.5);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.f-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, #b47eff), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.f-card:hover {
  border-color: rgba(100, 60, 160, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(180,126,255,0.08);
}
.f-card:hover::before { opacity: 1; }

.f-card:nth-child(1) { --card-accent: #7bff5a; }
.f-card:nth-child(2) { --card-accent: #c06fff; }
.f-card:nth-child(3) { --card-accent: #ff5eaa; }

.f-icon {
  font-size: 3.5em;
  margin-bottom: 20px;
  display: block;
}

.f-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.15em;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #e0d8f0;
  margin-bottom: 14px;
}

.f-card p {
  font-size: 0.95em;
  line-height: 1.8;
  color: rgba(200, 190, 220, 0.6);
}

/* ---- How It Works Section (homepage) ---- */
.how-section {
  background: linear-gradient(180deg, #020008, #04001a 50%, #020008);
}
.how-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123,255,90,0.12), transparent);
}

.how-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.how-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 32px 28px;
  border-radius: 20px;
  border: 1px solid rgba(100, 60, 160, 0.08);
  background: rgba(10, 4, 26, 0.3);
  transition: all 0.3s ease;
}
.how-step:hover {
  border-color: rgba(100, 60, 160, 0.2);
  background: rgba(10, 4, 26, 0.5);
  transform: translateX(4px);
}

.how-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(180, 126, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1em;
  font-weight: 700;
  color: #b47eff;
  background: rgba(18, 8, 40, 0.5);
  box-shadow: 0 0 20px rgba(180,126,255,0.15);
}

.how-text h4 {
  font-family: 'Cinzel', serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e0d8f0;
  margin-bottom: 6px;
}

.how-text p {
  font-size: 0.9em;
  line-height: 1.7;
  color: rgba(200, 190, 220, 0.55);
}

/* ---- Demons Showcase ---- */
.demons-section {
  background: linear-gradient(180deg, #020008, #080220 50%, #020008);
  text-align: center;
}
.demons-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,111,255,0.15), transparent);
}

.demon-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}

.demon-tier {
  padding: 40px 24px;
  border-radius: 24px;
  border: 1px solid rgba(100, 60, 160, 0.1);
  background: rgba(10, 4, 26, 0.4);
  transition: all 0.3s ease;
}
.demon-tier:hover {
  border-color: rgba(100, 60, 160, 0.25);
  transform: translateY(-4px);
}

.tier-icon {
  font-size: 3em;
  margin-bottom: 16px;
  display: block;
}
.tier-rank {
  font-family: 'Cinzel', serif;
  font-size: 1.3em;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tier-rank.king { color: #c06fff; text-shadow: 0 0 20px rgba(192,111,255,0.3); }
.tier-rank.greater { color: #b47eff; text-shadow: 0 0 15px rgba(180,126,255,0.2); }
.tier-rank.lesser { color: #8a7aaa; }

.tier-count {
  font-size: 2em;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  color: #ede6f5;
  margin: 12px 0 8px;
}
.tier-desc {
  font-size: 0.88em;
  color: rgba(200, 190, 220, 0.5);
  line-height: 1.6;
}

.demons-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  font-family: 'Cinzel', serif;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: #c06fff;
  border: 1px solid rgba(192, 111, 255, 0.3);
  border-radius: 60px;
  transition: all 0.3s ease;
}
.demons-cta:hover {
  color: #e0d8f0;
  border-color: rgba(192, 111, 255, 0.6);
  background: rgba(192, 111, 255, 0.08);
  box-shadow: 0 0 30px rgba(192,111,255,0.15);
  transform: translateY(-2px);
}

/* ---- Signup Section ---- */
.signup-section {
  background: linear-gradient(180deg, #020008, #040118 50%, #020008);
  display: flex;
  justify-content: center;
}
.signup-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123,255,90,0.1), transparent);
}

.signup-box {
  max-width: 500px;
  width: 100%;
  padding: 52px 44px;
  border-radius: 28px;
  border: 1px solid rgba(100, 60, 160, 0.15);
  background: rgba(10, 4, 26, 0.6);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 0 60px rgba(123,255,90,0.05);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.signup-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7bff5a, transparent);
}
.signup-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(123,255,90,0.04), transparent 60%);
  pointer-events: none;
}

.signup-box h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.6em;
  font-weight: 700;
  color: #ede6f5;
  text-align: center;
  letter-spacing: 3px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.signup-box .signup-desc {
  text-align: center;
  font-size: 0.95em;
  color: rgba(200, 190, 220, 0.55);
  line-height: 1.8;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.signup-box label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.7em;
  font-weight: 600;
  color: #b47eff;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.signup-box input[type="text"],
.signup-box input[type="email"] {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(100, 60, 160, 0.15);
  border-radius: 10px;
  background: rgba(2, 0, 8, 0.5);
  color: #ede6f5;
  font-family: 'Inter', sans-serif;
  font-size: 0.95em;
  outline: none;
  transition: all 0.3s ease;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}
.signup-box input:focus {
  border-color: #b47eff;
  box-shadow: 0 0 0 3px rgba(180,126,255,0.12), 0 0 20px rgba(180,126,255,0.15);
}
.signup-box input::placeholder { color: rgba(120, 100, 150, 0.5); }

.signup-box button {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.95em;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #7bff5a, #50e840);
  color: #020008;
  box-shadow: 0 4px 24px rgba(123,255,90,0.25);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}
.signup-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(123,255,90,0.4);
}

/* =============================================
   20. RESPONSIVE BREAKPOINTS
   ============================================= */

/* 1100px - Flow track */
@media (max-width: 1100px) {
  .flow-track {
    justify-content: flex-start;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* 900px - Scoring panels, flow direction, grids */
@media (max-width: 900px) {
  .scoring-panels {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }
  .flow-track {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .flow-node {
    width: 100%;
    max-width: 360px;
  }
  .flow-connector {
    width: auto;
    height: 40px;
    padding-bottom: 0;
  }
  .flow-connector-line {
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
      180deg,
      rgba(180,126,255,0.3) 0px,
      rgba(180,126,255,0.3) 6px,
      transparent 6px,
      transparent 12px
    );
  }
  .flow-connector-line::after {
    right: auto;
    bottom: -4px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid rgba(180,126,255,0.4);
    border-bottom: none;
  }
  .features-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
  .how-steps { grid-template-columns: 1fr; }
  .demon-tiers { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 40px; }
  .signup-box { padding: 40px 28px; }
}

/* 768px - Hamburger nav + general responsive */
@media (max-width: 768px) {
  /* Nav - hamburger menu */
  .top-nav { padding: 0 16px; }
  .top-nav-inner { height: 56px; }
  .nav-logo img { height: 28px; }
  .nav-burger { display: flex; }
  .top-nav-inner {
    position: static;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    height: calc(100vh - 56px);
    background: #020008;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    z-index: 200;
    overflow-y: auto;
  }
  .top-nav.nav-open .nav-links { display: flex; }
  .nav-links a {
    font-size: 1em;
    padding: 12px 24px;
    letter-spacing: 2px;
    width: 100%;
    max-width: 280px;
    text-align: center;
    border-radius: 12px;
  }
  .nav-links a:hover { background: rgba(180, 126, 255, 0.12); }
  .nav-links a.active {
    font-size: 1em;
    padding: 12px 24px;
  }
  .nav-links .nav-sep { display: none; }
  .nav-links a.discord-link {
    justify-content: center;
    padding: 12px 24px;
    margin-top: 8px;
  }
  .nav-links a.discord-link svg { width: 24px; height: 24px; }

  /* Page hero */
  .page-hero { padding: 80px 20px 50px; min-height: 35vh; }
  .cl-hero { padding: 80px 20px 50px; min-height: 35vh; }
  .cl-versions-cascade { gap: 10px; }

  /* Page header (changelog) */
  .page-header { padding: 90px 20px 40px; }
  .page-title { letter-spacing: 2px; }
  .hero-header { padding: 90px 20px 40px; min-height: 30vh; }
  .hero-header .hero-title { letter-spacing: 2px; }

  /* Sections */
  .section { padding: 60px 20px; }

  /* How-to-play */
  .flow-node { max-width: 320px; }
  .tip-block { padding: 32px 24px 28px 60px; }
  .tip-block::before { font-size: 3.5em; left: 14px; top: 8px; }
  .tip-block p { font-size: 1em; }
  .scoring-panel-header { padding: 20px 20px 16px; }
  .scoring-panel-body { padding: 0 20px 20px; }
  .scoring-panel td { font-size: 0.82em; }
  .scoring-bonus { flex-direction: column; text-align: center; gap: 8px; }

  /* Leaderboard */
  .lb-main { padding: 40px 16px 80px; }
  .lb-podium {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .lb-podium-card {
    width: 100%;
    max-width: 340px;
    min-height: auto !important;
    padding: 28px 24px;
  }
  .lb-podium-card.gold { order: 1; }
  .lb-podium-card.silver { order: 2; }
  .lb-podium-card.bronze { order: 3; }
  .lb-stats-row { gap: 20px; flex-wrap: wrap; }
  .lb-stat-value { font-size: 1.5em; }
  .lb-table th, .lb-table td { padding: 12px 12px; font-size: 0.85em; }
  .lb-table-header { padding: 20px 20px 12px; }

  /* RunViewer */
  .rv-layout {
    flex-direction: column;
    padding: 20px 16px 60px;
  }
  .rv-sidebar {
    width: 100%;
  }
  .glass-card-body {
    max-height: 260px;
  }
  .detail-header {
    padding: 20px;
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-header-stats {
    margin-left: 0;
    gap: 18px;
    flex-wrap: wrap;
  }
  .detail-result {
    font-size: 0.85em;
    padding: 6px 18px;
  }
  .demons-grid {
    grid-template-columns: 1fr;
  }
  .status-pill {
    top: 70px;
    right: 12px;
    font-size: 0.68em;
    padding: 6px 12px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Changelog v11 mobile fixes */
  .version-block .version-body { padding: 0 16px 24px; }
  .version-block .version-body p { font-size: 0.9em !important; }
  .version-block .version-body [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .version-block .version-body [style*="display: flex; gap: 16px; align-items: flex-start"] {
    flex-direction: column !important;
  }
  .version-block .version-body [style*="display: flex; gap: 16px; align-items: flex-start"] img {
    width: 56px !important;
    height: 56px !important;
  }
  .version-block .version-body [style*="display: flex; gap: 12px; justify-content: center"] {
    gap: 8px !important;
  }
  .version-block .version-body .portrait-wrap img {
    width: 56px !important;
    height: 56px !important;
  }
  .version-block .version-body [style*="font-size: 2em"] {
    font-size: 1.3em !important;
    letter-spacing: 2px !important;
  }
  .version-block .version-body [style*="font-size: 1.6em"] {
    font-size: 1.1em !important;
    letter-spacing: 2px !important;
  }
  .version-block .version-body [style*="font-size: 1.5em"] {
    font-size: 1.1em !important;
    letter-spacing: 2px !important;
  }

  /* Compendium */
  .comp-subnav { top: 56px; padding: 8px 12px; }
  .comp-subnav-inner { gap: 2px; padding: 4px 6px; border-radius: 16px; }
  .comp-subnav-inner a { font-size: 0.6em; padding: 4px 8px; letter-spacing: 0.5px; }
  .comp-main { padding: 28px 16px 60px; }
  .demon-grid { grid-template-columns: 1fr; }
  .rank-intro { flex-direction: column; text-align: center; gap: 12px; padding: 20px; }
  .rank-intro-icon { font-size: 2.2em; }
  .mech-section summary { padding: 16px 20px; }
  .mech-body { padding: 0 20px 20px; }
  .mech-body table { font-size: 0.8em; }
  .mech-body table th, .mech-body table td { padding: 8px 10px; }

  /* Tables */
  th, td { padding: 10px 14px; font-size: 0.85em; }
  .table-wrap table, .rv-table-wrap table { min-width: 360px; }
  .comp-section summary, .version-block summary { padding: 18px 20px; }
  .comp-section .section-body, .version-block .version-body { padding: 0 20px 20px; }
  .leaderboard { padding: 24px; }

  /* Old RV/player styles */
  .player-row { padding: 10px 14px; }
  .run-row { flex-wrap: wrap; padding: 10px 14px; gap: 8px 12px; }
  #run-detail { padding: 20px; }

  /* Tips grid */
  .tips { grid-template-columns: 1fr; }
  .timeline { padding-left: 56px; }
  .step-number { left: -56px; width: 46px; height: 46px; font-size: 0.95em; }
  .timeline::before { left: 22px; }
  .step-card { padding: 18px 20px; }

  /* Homepage */
  .hero-section { padding: 90px 20px 60px; min-height: 85vh; }
  .hero-desc { font-size: 1em; max-width: 100%; }
  .hero-cta { padding: 14px 32px; font-size: 0.85em; }
  .hero-scroll-hint { display: none; }
  .f-card { padding: 36px 24px 32px; }
  .f-icon { font-size: 2.8em; }
  .how-step { padding: 24px 20px; }
  .tier-icon { font-size: 2.4em; }
}

/* 480px - Small phone fine tuning */
@media (max-width: 480px) {
  /* Page hero */
  .page-hero { padding: 72px 16px 36px; }
  .page-hero-title { letter-spacing: 3px; }
  .page-hero-tagline { letter-spacing: 2px; font-size: 0.8em; }
  .cl-hero { padding: 72px 16px 36px; }
  .cl-hero-title { letter-spacing: 3px; }
  .cl-hero-tagline { letter-spacing: 2px; font-size: 0.8em; }
  .cl-versions-cascade { gap: 6px; }
  .cl-ver { font-size: 0.6em; }

  /* Page header / hero header */
  .page-header { padding: 72px 16px 32px; }
  .hero-header { padding: 72px 16px 32px; }

  /* Sections */
  .section { padding: 48px 16px; }

  /* How-to-play */
  .flow-node { max-width: 280px; }
  .tip-block { padding: 24px 16px 20px 44px; }
  .tip-block::before { font-size: 2.5em; left: 8px; top: 6px; }
  .scoring-panel-header { padding: 16px 16px 12px; }
  .scoring-panel-body { padding: 0 16px 16px; }

  /* Leaderboard */
  .lb-podium-card { padding: 24px 20px; }
  .lb-podium-rank { font-size: 1.8em; }
  .lb-podium-souls { font-size: 1.2em; }
  .lb-table th, .lb-table td { padding: 10px 8px; font-size: 0.8em; }
  .lb-main { padding: 32px 12px 60px; }

  /* RunViewer */
  .detail-header { padding: 16px; }
  .detail-header-stats { gap: 12px; }
  .detail-header-stat .val { font-size: 1.2em; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Compendium */
  .comp-subnav-inner { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; -webkit-overflow-scrolling: touch; }
  .comp-subnav-inner a { font-size: 0.55em; padding: 3px 6px; flex-shrink: 0; }
  .demon-card { padding: 16px 16px 16px 20px; }
  .comp-main .demon-card-name { font-size: 1em; }

  /* Tables */
  th, td { padding: 8px 10px; font-size: 0.8em; }
  .table-wrap table, .rv-table-wrap table { min-width: 320px; }
  .comp-section summary, .version-block summary { padding: 14px 16px; }
  .comp-section .section-body, .version-block .version-body { padding: 0 16px 16px; }
  .reworked { font-size: 0.5em; padding: 2px 6px; }
  .leaderboard { padding: 16px; }

  /* Timeline */
  .timeline { padding-left: 48px; }
  .step-number { left: -48px; width: 38px; height: 38px; font-size: 0.85em; }
  .timeline::before { left: 18px; }

  /* RunViewer misc */
  #run-detail { padding: 16px; }

  /* Homepage */
  .hero-section { padding: 72px 16px 44px; }
  .hero-logo { margin-bottom: 16px; }
  .hero-tagline { letter-spacing: 3px; }
  .f-card { padding: 28px 20px 24px; }
  .f-icon { font-size: 2.4em; }
  .how-num { width: 36px; height: 36px; font-size: 1em; }
  .tier-icon { font-size: 2em; }
  .signup-box { padding: 32px 20px; border-radius: 20px; }
}

/* 375px - Small phone edge cases */
@media (max-width: 375px) {
  .top-nav { padding: 0 12px; }
  .section { padding: 40px 12px; }
  .page-hero, .cl-hero { padding: 68px 12px 32px; }
  .page-hero-logo { width: min(90px, 22vw); }
  .flow-node { max-width: 260px; }
  .lb-podium-card { max-width: 100%; }
  .summary-grid { grid-template-columns: 1fr; }
  .detail-header-stats { gap: 10px; }
  .comp-main { padding: 20px 12px 40px; }
  .version-block .version-body { padding: 0 12px 12px; }
  .signup-box { padding: 24px 16px; }
}
