/* ═══════════════════════════════════════════════
   Ta'Lido-Ra — Shared Stylesheet
   Dark Rainbow Theme
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cinzel:wght@400;600&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

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

/* ── VARIABLES ── */
:root {
  --rainbow:       linear-gradient(90deg, #ff6b6b, #ffa94d, #ffe066, #69db7c, #4fc9e8, #748ffc, #da77f2, #ff6b6b);
  --rainbow-diag:  linear-gradient(135deg, #ff6b6b, #ffa94d, #ffe066, #69db7c, #4fc9e8, #748ffc, #da77f2, #ff6b6b);
  --rainbow-vert:  linear-gradient(180deg, #ff6b6b, #ffa94d, #ffe066, #69db7c, #4fc9e8, #748ffc, #da77f2);

  --r-red:    #ff6b6b;
  --r-orange: #ffa94d;
  --r-yellow: #ffe066;
  --r-green:  #69db7c;
  --r-cyan:   #4fc9e8;
  --r-blue:   #748ffc;
  --r-violet: #da77f2;

  --bg-deep:  #07070f;
  --bg-dark:  #0d0d1a;
  --bg-mid:   #121224;
  --bg-card:  #14142a;
  --bg-hover: #1a1a36;

  --text-main:  #e8e4f8;
  --text-muted: #8a82b0;
  --text-dim:   #3e3a62;

  --border:        rgba(116,143,252,0.15);
  --border-bright: rgba(116,143,252,0.4);

  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body:    'Crimson Pro', Georgia, serif;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── ANIMATIONS ── */
@keyframes rainbow-shift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes orbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.4; }
  50%     { opacity: 1; }
}

.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── RAINBOW HELPERS ── */
.rb-text {
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow-shift 6s linear infinite;
}

/* ── GLOBAL DIVIDER ── */
.divider {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 2rem; max-width: 900px; margin: 0 auto;
}
.divider-line {
  flex: 1; height: 1px;
  background: var(--rainbow); background-size: 200% auto;
  animation: rainbow-shift 6s linear infinite;
  opacity: 0.35;
}
.divider-glyph {
  font-family: var(--font-display); font-size: 1.2rem;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow-shift 6s linear infinite;
}

/* ═══════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════ */

.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 6rem 2rem 4rem; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(116,143,252,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 75%, rgba(218,119,242,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(79,201,232,0.08) 0%, transparent 60%),
    linear-gradient(180deg, #07070f 0%, #0d0d1a 60%, #07070f 100%);
}
.hero-bg::after {
    content: '⬡';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 70vw;
    color: rgba(201,168,76,0.015);
    line-height: 1;
    pointer-events: none;
    user-select: none;
  }

.rune-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-deep), var(--bg-deep)) padding-box,
    var(--rainbow) border-box;
  background-size: auto, 200% auto;
  animation: orbit 60s linear infinite, rainbow-shift 6s linear infinite;
  opacity: 0.22;
}
.rune-ring::before {
  content: '✦'; position: absolute; top: -9px; left: 50%;
  transform: translateX(-50%); font-size: 14px; color: var(--r-violet);
}
.rune-ring-2 {
  width: 340px; height: 340px; opacity: 0.16;
  animation: orbit 40s linear infinite reverse, rainbow-shift 6s linear infinite;
}
.rune-ring-2::before { content: '◆'; font-size: 10px; color: var(--r-cyan); }

.hero-inner { position: relative; z-index: 1; max-width: 780px; }

.server-tag {
  display: inline-block;
  font-family: var(--font-heading); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 20px; margin-bottom: 2.5rem;
  animation: fadeUp 1s ease both;
  position: relative; border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-deep), var(--bg-deep)) padding-box,
    var(--rainbow) border-box;
  background-size: auto, 200% auto;
  animation: fadeUp 1s ease both, rainbow-shift 6s linear infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 7rem);
  font-weight: 700; line-height: 0.95; letter-spacing: 0.02em;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 1s ease 0.15s both, rainbow-shift 6s linear infinite;
  margin-bottom: 1.2rem;
}
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-muted);
  animation: fadeUp 1s ease 0.3s both; margin-bottom: 2.5rem;
}
.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted); font-style: italic;
  max-width: 560px; margin: 0 auto 3.5rem;
  animation: fadeUp 1s ease 0.45s both;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-heading); font-size: 1rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--rainbow); background-size: 200% auto;
  padding: 16px 44px; border: none; text-decoration: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 30px rgba(116,143,252,0.3);
  animation: fadeUp 1s ease 0.6s both, rainbow-shift 6s linear infinite;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(116,143,252,0.5);
}
.hero-cta svg { width: 20px; height: 20px; }

.hero-scroll {
  position: absolute; bottom: 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: fadeUp 1s ease 1s both;
}
.hero-scroll span {
  font-family: var(--font-heading); font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-dim);
}
.scroll-line {
  width: 1px; height: 50px;
  background: var(--rainbow-vert); background-size: auto 200%;
  animation: scrollPulse 2s ease-in-out infinite;
}

/* Sections */
.section {
  position: relative; z-index: 1;
  padding: 6rem 2rem; max-width: 1100px; margin: 0 auto;
}
.section-label {
  font-family: var(--font-heading); font-size: 11px;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow-shift 6s linear infinite;
  line-height: 1.2; margin-bottom: 1.2rem;
}
.section-body { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; line-height: 1.8; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5px; margin-top: 4rem;
  background: var(--border); border: 1px solid var(--border);
}
.feature-card {
  background: var(--bg-card); padding: 2.5rem 2rem;
  position: relative; overflow: hidden; transition: background 0.3s;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--rainbow-vert); background-size: auto 200%;
  transition: height 0.4s;
}
.feature-card:hover { background: var(--bg-hover); }
.feature-card:hover::before { height: 100%; }
.feature-icon { font-size: 2rem; margin-bottom: 1.2rem; display: block; }
.feature-title {
  font-family: var(--font-heading); font-size: 1rem;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.8rem;
}
.feature-card:nth-child(1) .feature-title { color: var(--r-cyan); }
.feature-card:nth-child(2) .feature-title { color: var(--r-violet); }
.feature-card:nth-child(3) .feature-title { color: var(--r-green); }
.feature-card:nth-child(4) .feature-title { color: var(--r-blue); }
.feature-card:nth-child(5) .feature-title { color: var(--r-orange); }
.feature-card:nth-child(6) .feature-title { color: var(--r-red); }
.feature-text { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }

/* Stats band */
.stats-band {
  position: relative; z-index: 1;
  background: var(--bg-mid);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 4rem 2rem;
}
.stats-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 3rem; text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  display: block; line-height: 1;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite;
}
.stat-label {
  font-family: var(--font-heading); font-size: 0.85rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 0.6rem; display: block;
}

/* Lore quote */
.lore-section {
  position: relative; z-index: 1;
  padding: 7rem 2rem; text-align: center; overflow: hidden;
}
.lore-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(116,143,252,0.07) 0%, transparent 70%);
}
.lore-quote {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic; color: var(--text-main);
  max-width: 700px; margin: 0 auto 2rem; line-height: 1.6;
  position: relative; z-index: 1;
}
.lore-quote::before, .lore-quote::after {
  content: '"'; font-family: var(--font-display); font-size: 4rem;
  line-height: 0; vertical-align: -0.4em; margin: 0 8px;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite;
}
.lore-attr {
  font-family: var(--font-heading); font-size: 0.85rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-muted); position: relative; z-index: 1;
}

/* Steps */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem; margin-top: 4rem;
}
.step { display: flex; flex-direction: column; align-items: flex-start; }
.step-num {
  font-family: var(--font-display); font-size: 3rem; font-weight: 700;
  line-height: 1; margin-bottom: 1rem;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite; opacity: 0.4;
}
.step-title {
  font-family: var(--font-heading); font-size: 0.95rem;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem;
}
.step:nth-child(1) .step-title { color: var(--r-cyan); }
.step:nth-child(2) .step-title { color: var(--r-violet); }
.step:nth-child(3) .step-title { color: var(--r-green); }
.step:nth-child(4) .step-title { color: var(--r-blue); }
.step-text { font-size: 0.95rem; color: var(--text-muted); }

/* Final CTA */
.final-cta {
  position: relative; z-index: 1;
  padding: 8rem 2rem 6rem; text-align: center; overflow: hidden;
}
.final-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(116,143,252,0.06) 0%, transparent 70%);
}

/* Footer */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex; justify-content: center; align-items: center;
  gap: 2rem; flex-wrap: wrap;
}
footer p {
  font-family: var(--font-heading); font-size: 0.8rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-dim);
}

/* ═══════════════════════════════════════════════
   WIKI
   ═══════════════════════════════════════════════ */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(7,7,15,0.93); backdrop-filter: blur(14px);
  display: flex; align-items: center;
  height: 58px; padding: 0 2rem; gap: 2rem;
}
.topbar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--rainbow); background-size: 200% auto;
  animation: rainbow-shift 6s linear infinite; opacity: 0.5;
}

.topbar-logo {
  font-family: var(--font-display); font-size: 1.1rem;
  text-decoration: none; white-space: nowrap; letter-spacing: 0.04em; flex-shrink: 0;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite;
}
.topbar-logo span {
  font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
  display: block; font-family: var(--font-heading); margin-top: -2px;
  -webkit-text-fill-color: var(--text-muted); color: var(--text-muted);
}

.topbar-divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }

.topbar-nav {
  display: flex; align-items: center; flex: 1; scrollbar-width: none;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.nav-item { position: relative; flex-shrink: 0; }
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 58px;
  font-family: var(--font-heading); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; transition: color 0.2s; white-space: nowrap;
}
.nav-btn:hover { color: var(--r-cyan); }
.nav-btn.active { color: var(--r-violet); }
.nav-btn .arrow { font-size: 0.55rem; opacity: 0.6; transition: transform 0.2s; }
.nav-item:hover .arrow { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--bg-dark);
  border: 1px solid var(--border); border-top: none;
  min-width: 200px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.nav-item:hover .dropdown {
  opacity: 1; visibility: visible; pointer-events: all; transform: translateY(0);
}
.dropdown a {
  display: block; padding: 10px 18px;
  font-family: var(--font-heading); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--bg-hover); color: var(--r-cyan); }

.topbar-search {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-mid); border: 1px solid var(--border); padding: 6px 14px;
}
.topbar-search input {
  background: none; border: none; outline: none;
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--text-main); width: 160px;
}
.topbar-search input::placeholder { color: var(--text-dim); }
.topbar-search svg { width: 14px; height: 14px; color: var(--text-dim); flex-shrink: 0; }

.layout { display: flex; margin-top: 58px; min-height: calc(100vh - 58px); }

.sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-dark);
  border-right: 1px solid var(--border); padding: 2rem 0;
  position: sticky; top: 58px; height: calc(100vh - 58px);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sidebar-section { margin-bottom: 0.5rem; }
.sidebar-heading {
  font-family: var(--font-heading); font-size: 0.65rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-dim); padding: 0.8rem 1.5rem 0.4rem;
  border-bottom: 1px solid var(--border); margin-bottom: 0.3rem;
}
.sidebar a {
  display: block; padding: 7px 1.5rem;
  font-family: var(--font-heading); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
}
.sidebar a:hover { color: var(--r-cyan); background: var(--bg-hover); }
.sidebar a.current {
  color: var(--r-violet); border-left-color: var(--r-violet);
  background: rgba(218,119,242,0.05);
}

.main { flex: 1; min-width: 0; padding: 3rem 3.5rem 5rem; max-width: 860px; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 2.5rem;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--r-cyan); }
.breadcrumb .sep { color: var(--text-dim); }

.page-header { margin-bottom: 2.5rem; }

.page-tag {
  display: inline-block; font-family: var(--font-heading); font-size: 0.65rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-muted);
  padding: 4px 14px; margin-bottom: 1rem;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-deep), var(--bg-deep)) padding-box,
    var(--rainbow) border-box;
  background-size: auto, 200% auto;
  animation: rainbow-shift 6s linear infinite;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin-bottom: 0.8rem;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite;
}

.page-lead {
  font-size: 1.15rem; font-style: italic; color: var(--text-muted);
  max-width: 640px; margin-bottom: 2rem;
  border-left: 2px solid var(--r-violet); padding-left: 1.2rem;
}

.wiki-divider {
  display: flex; align-items: center; gap: 1rem; margin: 2.5rem 0;
}
.wiki-divider-line {
  flex: 1; height: 1px;
  background: var(--rainbow); background-size: 200% auto;
  animation: rainbow-shift 6s linear infinite; opacity: 0.3;
}
.wiki-divider-glyph {
  font-family: var(--font-display); font-size: 0.9rem;
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite;
}

.wiki-content h2 {
  font-family: var(--font-heading); font-size: 1.15rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin: 2.5rem 0 1rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite;
}
.wiki-content h3 {
  font-family: var(--font-heading); font-size: 0.9rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--r-cyan); margin: 1.8rem 0 0.7rem;
}
.wiki-content p { color: var(--text-muted); margin-bottom: 1rem; }
.wiki-content strong { color: var(--text-main); font-weight: 600; }
.wiki-content em { color: var(--text-main); }

.infobox {
  float: right; clear: right; width: 260px; margin: 0 0 1.5rem 2rem;
  background: var(--bg-card); border: 1px solid var(--border);
}
.infobox-title {
  background: var(--bg-mid); font-family: var(--font-heading);
  font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 10px 14px; text-align: center; border-bottom: 1px solid var(--border);
  background: var(--rainbow); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbow-shift 6s linear infinite;
}
.infobox-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.infobox-row:last-child { border-bottom: none; }
.infobox-label {
  padding: 8px 14px; font-family: var(--font-heading);
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); border-right: 1px solid var(--border);
}
.infobox-val { padding: 8px 14px; color: var(--text-muted); font-style: italic; }

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 1.5rem 0;
}
.wiki-card {
  background: var(--bg-card); padding: 1.4rem;
  text-decoration: none; display: block; transition: background 0.2s; cursor: pointer;
}
.wiki-card:hover { background: var(--bg-hover); }
.wiki-card-icon { font-size: 1.6rem; margin-bottom: 0.8rem; display: block; }
.wiki-card-title {
  font-family: var(--font-heading); font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem;
}
.wiki-card:nth-child(1) .wiki-card-title { color: var(--r-cyan); }
.wiki-card:nth-child(2) .wiki-card-title { color: var(--r-violet); }
.wiki-card:nth-child(3) .wiki-card-title { color: var(--r-green); }
.wiki-card:nth-child(4) .wiki-card-title { color: var(--r-orange); }
.wiki-card:nth-child(5) .wiki-card-title { color: var(--r-blue); }
.wiki-card:nth-child(6) .wiki-card-title { color: var(--r-red); }
.wiki-card-text { font-size: 0.88rem; color: var(--text-muted); }

.wiki-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 1.5rem 0; }
.wiki-table th {
  font-family: var(--font-heading); font-size: 0.68rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 10px 14px; text-align: left; background: var(--bg-mid);
  border-bottom: 1px solid var(--border); color: var(--r-cyan);
}
.wiki-table td { padding: 9px 14px; color: var(--text-muted); border-bottom: 1px solid rgba(116,143,252,0.07); }
.wiki-table tr:hover td { background: var(--bg-hover); }

.callout {
  border-left: 3px solid var(--r-blue); background: rgba(116,143,252,0.06);
  padding: 1rem 1.4rem; margin: 1.5rem 0;
  font-style: italic; color: var(--text-muted); font-size: 0.95rem;
}
.callout.danger { border-left-color: var(--r-red); background: rgba(255,107,107,0.06); }

.toc {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 1.2rem 1.5rem; margin-bottom: 2.5rem;
  display: inline-block; min-width: 220px;
}
.toc-title {
  font-family: var(--font-heading); font-size: 0.72rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--r-violet); margin-bottom: 0.8rem;
}
.toc ol { padding-left: 1.2rem; }
.toc li { font-size: 0.9rem; margin-bottom: 0.3rem; }
.toc a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.toc a:hover { color: var(--r-cyan); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.5rem 0; }
.tag {
  font-family: var(--font-heading); font-size: 0.65rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--border);
  padding: 4px 12px; cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--r-cyan); color: var(--r-cyan); }

.home-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5px; background: var(--border); border: 1px solid var(--border); margin-top: 2.5rem;
}
.home-cat {
  background: var(--bg-card); padding: 2rem 1.8rem;
  cursor: pointer; transition: background 0.2s; position: relative; overflow: hidden;
}
.home-cat::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--rainbow); background-size: 200% auto;
  animation: rainbow-shift 6s linear infinite; transition: width 0.35s;
}
.home-cat:hover { background: var(--bg-hover); }
.home-cat:hover::after { width: 100%; }
.home-cat-icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.home-cat-title {
  font-family: var(--font-heading); font-size: 0.9rem;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.6rem;
}
.home-cat:nth-child(1) .home-cat-title { color: var(--r-cyan); }
.home-cat:nth-child(2) .home-cat-title { color: var(--r-orange); }
.home-cat:nth-child(3) .home-cat-title { color: var(--r-violet); }
.home-cat:nth-child(4) .home-cat-title { color: var(--r-green); }
.home-cat:nth-child(5) .home-cat-title { color: var(--r-blue); }
.home-cat:nth-child(6) .home-cat-title { color: var(--r-red); }
.home-cat-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.home-cat-count {
  margin-top: 1rem; font-family: var(--font-heading); font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim);
}

.right-panel {
  width: 220px; flex-shrink: 0; padding: 2.5rem 1.5rem;
  border-left: 1px solid var(--border);
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}
.right-heading {
  font-family: var(--font-heading); font-size: 0.65rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--r-violet); margin-bottom: 0.8rem;
}
.right-link {
  display: block; padding: 5px 0;
  font-size: 0.85rem; color: var(--text-muted); text-decoration: none;
  transition: color 0.15s; border-bottom: 1px solid var(--border);
}
.right-link:hover { color: var(--r-cyan); }

.wiki-footer {
  border-top: 1px solid var(--border); padding: 1.5rem 3.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.wiki-footer p {
  font-family: var(--font-heading); font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-dim);
}

.page { display: none; }
.page.active { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar, .right-panel { display: none; }
  .main { padding: 2rem 1.5rem 4rem; }
}
@media (max-width: 600px) {
  .features-grid, .home-grid { grid-template-columns: 1fr; }
  .hero-cta { width: 100%; justify-content: center; }
  .rune-ring { width: 300px; height: 300px; }
  .rune-ring-2 { width: 200px; height: 200px; }
  .infobox { float: none; width: 100%; margin: 0 0 1.5rem 0; }
}