/* ============================================================
   HOOD RPG — $HRPG · Fantasy game portal stylesheet
   ============================================================ */

:root {
  --green: #c6ff00;
  --green-bright: #d8ff3c;
  --green-soft: #e6ff8a;
  --emerald: #a8d916;
  --forest: #1a2210;
  --forest-deep: #0e1108;
  --bg: #0a0c06;
  --bg-2: #10130a;
  --charcoal: #14160f;
  --gold: #c9a44a;
  --gold-bright: #ffd76a;
  --red: #ff3b3b;
  --red-deep: #7a0f14;
  --ink: #eef2e4;
  --ink-dim: #aab89a;
  --ink-faint: #6f7a60;
  --frame: rgba(198, 255, 0, 0.22);
  --frame-gold: rgba(201, 164, 74, 0.35);
  --panel: rgba(10, 22, 15, 0.82);
  --panel-solid: #12160a;
  --font-display: 'Cinzel', serif;
  --font-ui: 'Rajdhani', sans-serif;
  --font-lore: 'IM Fell English', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}
::selection { background: var(--green); color: #151a04; }

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 15% -5%, rgba(198, 255, 0, 0.07), transparent 60%),
    radial-gradient(1000px 600px at 90% 30%, rgba(168, 217, 22, 0.05), transparent 60%),
    radial-gradient(900px 700px at 40% 110%, rgba(201, 164, 74, 0.04), transparent 60%);
}

/* ---------- ambient layers ---------- */
#particles { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(2, 6, 4, 0.55) 100%);
}
/* ---------- shared UI ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  border-radius: 6px; position: relative; transition: all 0.22s ease;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-green {
  background: linear-gradient(180deg, #d0ff2e, #9fce00);
  color: #151a04; border-color: #e4ff70;
  box-shadow: 0 0 24px rgba(198, 255, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(198, 255, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-gold {
  background: linear-gradient(180deg, #2a2415, #1a160c);
  color: var(--gold-bright); border-color: var(--frame-gold);
  box-shadow: 0 0 16px rgba(201, 164, 74, 0.15);
}
.btn-gold:hover { border-color: var(--gold-bright); box-shadow: 0 0 28px rgba(255, 215, 106, 0.3); transform: translateY(-2px); }
.btn-ghost {
  background: rgba(10, 25, 16, 0.6); color: var(--green-soft); border-color: var(--frame);
}
.btn-ghost:hover { border-color: var(--green); background: rgba(198, 255, 0, 0.12); transform: translateY(-2px); }
.btn-red {
  background: linear-gradient(180deg, #b3121b, #6d090f);
  color: #ffe6e6; border-color: #ff5a5a;
  box-shadow: 0 0 24px rgba(255, 59, 59, 0.3);
}
.btn-red:hover { box-shadow: 0 0 44px rgba(255, 59, 59, 0.55); transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

.floaty { animation: floaty 5.5s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ============================================================
   GAME NAV
   ============================================================ */
.game-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 22px;
  background: linear-gradient(180deg, rgba(5, 12, 8, 0.94), rgba(5, 12, 8, 0.78));
  border-bottom: 1px solid var(--frame);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s;
}
.game-nav.scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(198, 255, 0, 0.25); }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.logo-text { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--ink); letter-spacing: 0.06em; }
.logo-text b { color: var(--green-bright); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-weight: 600; font-size: 14.5px;
  letter-spacing: 0.05em; padding: 7px 11px; border-radius: 5px; border: 1px solid transparent;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--green-soft); background: rgba(198, 255, 0, 0.08); }
.nav-links a.active { color: var(--green-bright); border-color: var(--frame); background: rgba(198, 255, 0, 0.1); }
.nav-links a.nav-danger:hover, .nav-links a.nav-danger.active { color: #ff8080; border-color: rgba(255, 59, 59, 0.35); background: rgba(255, 59, 59, 0.08); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; background: none; border: 1px solid var(--frame); border-radius: 6px; padding: 9px 8px; cursor: pointer; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--green-soft); margin: 4px 0; }

/* ============================================================
   PLAYER HUD
   ============================================================ */
.player-hud {
  position: fixed; left: 18px; bottom: 18px; z-index: 90;
  display: flex; gap: 12px; align-items: center;
  padding: 10px 16px 10px 10px; min-width: 250px;
  background: var(--panel); border: 1px solid var(--frame); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(230, 255, 138, 0.08);
  backdrop-filter: blur(8px);
}
.hud-portrait {
  width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center;
  font-size: 18px; color: var(--green-soft); overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #2c3a12, #10140a);
  border: 1px solid var(--frame); box-shadow: inset 0 0 14px rgba(216, 255, 60, 0.15);
}
.hud-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hud-body { flex: 1; }
.hud-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hud-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--green-soft); }
.hud-lvl { font-size: 12px; color: var(--gold-bright); letter-spacing: 0.1em; }
.hud-lvl b { font-size: 14px; }
.hud-xpbar { height: 7px; margin: 5px 0 4px; border-radius: 4px; background: #12170a; border: 1px solid rgba(198, 255, 0, 0.25); overflow: hidden; }
.hud-xpbar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--green), var(--green-bright));
  box-shadow: 0 0 10px rgba(216, 255, 60, 0.7); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.hud-sub { font-size: 11.5px; color: var(--ink-faint); letter-spacing: 0.04em; }
.hud-levelup { animation: levelup 0.7s ease; }
@keyframes levelup {
  0% { box-shadow: 0 0 0 0 rgba(216, 255, 60, 0.7); }
  60% { box-shadow: 0 0 0 18px rgba(216, 255, 60, 0); }
  100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
}

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 130px 20px 80px; overflow: hidden;
}
.hero-scene { position: absolute; inset: 0; z-index: -1; }
.hero-sky {
  position: absolute; inset: -5%;
  background:
    radial-gradient(900px 500px at 50% 20%, rgba(198, 255, 0, 0.12), transparent 65%),
    linear-gradient(180deg, #070903 0%, #0e1108 45%, #1a2210 100%);
}
.hero-moon {
  position: absolute; top: 9%; right: 16%; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f4ffd0, #cdf24a 60%, #91b800);
  box-shadow: 0 0 80px 24px rgba(216, 255, 60, 0.25), 0 0 200px 80px rgba(198, 255, 0, 0.12);
  opacity: 0.9;
}
.hero-stars { position: absolute; inset: 0; }
.hero-stars::before, .hero-stars::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #eaffc2 60%, transparent),
    radial-gradient(1px 1px at 28% 12%, #eef2e4 60%, transparent),
    radial-gradient(1.5px 1.5px at 44% 28%, #eaffc2 60%, transparent),
    radial-gradient(1px 1px at 61% 9%, #eef2e4 60%, transparent),
    radial-gradient(2px 2px at 73% 24%, #dcff9a 60%, transparent),
    radial-gradient(1px 1px at 86% 15%, #eef2e4 60%, transparent),
    radial-gradient(1.5px 1.5px at 93% 34%, #eaffc2 60%, transparent),
    radial-gradient(1px 1px at 8% 44%, #eef2e4 60%, transparent),
    radial-gradient(1.5px 1.5px at 52% 18%, #f0ffc8 60%, transparent);
  animation: twinkle 4s ease-in-out infinite;
}
.hero-stars::after { animation-delay: -2s; opacity: 0.6; transform: translate(3%, 6%); }
@keyframes twinkle { 0%,100% { opacity: 0.9; } 50% { opacity: 0.35; } }
.hero-mountains-far, .hero-mountains-near { position: absolute; left: -5%; right: -5%; bottom: 0; height: 46%; }
.hero-mountains-far {
  background: #131a0a;
  clip-path: polygon(0 78%, 7% 52%, 15% 68%, 24% 38%, 33% 62%, 42% 30%, 52% 58%, 63% 26%, 72% 56%, 82% 36%, 91% 60%, 100% 44%, 100% 100%, 0 100%);
  opacity: 0.85;
}
.hero-mountains-near {
  height: 32%; background: #0b0e06;
  clip-path: polygon(0 62%, 9% 40%, 18% 58%, 30% 26%, 41% 54%, 55% 20%, 66% 50%, 78% 30%, 89% 56%, 100% 38%, 100% 100%, 0 100%);
}
.hero-castle { position: absolute; bottom: 24%; left: 50%; width: 420px; transform: translateX(-50%); opacity: 0.95; }
.hero-castle svg { width: 100%; }
.hero-trees { position: absolute; left: 0; right: 0; bottom: -2px; height: 20%; }
.hero-trees::before {
  content: ''; position: absolute; inset: 0; background: #060803;
  clip-path: polygon(0 100%, 0 55%, 3% 75%, 5% 35%, 8% 72%, 11% 48%, 13% 78%, 16% 30%, 19% 70%, 22% 52%, 25% 80%, 28% 40%, 31% 74%, 35% 55%, 38% 82%, 42% 34%, 45% 72%, 49% 50%, 52% 80%, 56% 28%, 59% 68%, 62% 48%, 66% 78%, 69% 38%, 72% 72%, 76% 55%, 79% 82%, 83% 32%, 86% 70%, 89% 50%, 92% 78%, 95% 42%, 98% 70%, 100% 55%, 100% 100%);
}
.hero-figure { position: absolute; bottom: 8%; left: 18%; width: 150px; }
.hero-figure svg { width: 100%; filter: drop-shadow(0 0 18px rgba(216, 255, 60, 0.18)); }
.figure-sway { transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-0.7deg); } 50% { transform: rotate(0.7deg); } }
.figure-eye { animation: blink 5s infinite; }
@keyframes blink { 0%,92%,100% { opacity: 1; } 95% { opacity: 0.1; } }
.figure-glow {
  position: absolute; bottom: -8px; left: 50%; width: 130px; height: 26px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(216, 255, 60, 0.3), transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100% { opacity: 0.9; } 50% { opacity: 0.4; } }

.hero-content { position: relative; text-align: center; max-width: 900px; }
.hero-badge {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.35em;
  color: var(--gold-bright); border: 1px solid var(--frame-gold); border-radius: 20px;
  padding: 7px 20px; background: rgba(10, 20, 14, 0.65); margin-bottom: 26px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(56px, 10vw, 124px);
  line-height: 0.95; letter-spacing: 0.04em;
  text-shadow: 0 0 60px rgba(198, 255, 0, 0.35), 0 4px 0 rgba(0, 0, 0, 0.6);
}
.hero-title span {
  background: linear-gradient(180deg, var(--green-bright), var(--green) 55%, #7a9e00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(216, 255, 60, 0.45));
}
.hero-ticker {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 3vw, 30px);
  color: var(--gold-bright); letter-spacing: 0.5em; margin: 14px 0 18px;
  text-shadow: 0 0 24px rgba(255, 215, 106, 0.4);
}
.hero-sub { font-size: clamp(17px, 2vw, 21px); color: var(--ink-dim); margin-bottom: 34px; }
.hero-sub em { color: var(--green-soft); font-style: normal; font-weight: 600; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-scroll-panel {
  margin-top: 54px; padding: 22px 34px 26px; position: relative;
  background:
    linear-gradient(180deg, rgba(20, 34, 24, 0.9), rgba(9, 18, 12, 0.92));
  border: 1px solid var(--frame-gold); border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(201, 164, 74, 0.05);
}
.hero-scroll-panel::before, .hero-scroll-panel::after {
  content: ''; position: absolute; left: -6px; right: -6px; height: 14px;
  background: linear-gradient(180deg, #241d0e, #14100a);
  border: 1px solid var(--frame-gold); border-radius: 8px;
}
.hero-scroll-panel::before { top: -8px; }
.hero-scroll-panel::after { bottom: -8px; }
.scroll-cap {
  text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.4em;
  color: var(--gold); margin-bottom: 14px;
}
.hero-scroll-panel ul { list-style: none; display: flex; gap: 8px 34px; flex-wrap: wrap; justify-content: center; }
.hero-scroll-panel li { display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.hero-scroll-panel li span { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.hero-scroll-panel li b { font-size: 16.5px; color: var(--green-soft); font-weight: 700; }

.scroll-hint {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; letter-spacing: 0.4em; color: var(--ink-faint);
}
.scroll-hint i { font-style: normal; color: var(--green); animation: hintBob 1.6s ease-in-out infinite; }
@keyframes hintBob { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(7px); opacity: 0.4; } }

/* ============================================================
   SECTIONS SHARED
   ============================================================ */
.section { position: relative; z-index: 3; max-width: 1240px; margin: 0 auto; padding: 110px 24px 60px; }
#lore { padding-bottom: 140px; }
.section-wide { max-width: 1420px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-kicker {
  font-size: 13px; font-weight: 700; letter-spacing: 0.4em; color: var(--gold);
  margin-bottom: 14px;
}
.section-kicker.danger { color: var(--red); text-shadow: 0 0 14px rgba(255, 59, 59, 0.5); }
.section-title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 5vw, 54px);
  letter-spacing: 0.03em; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
}
.section-title span {
  background: linear-gradient(180deg, var(--green-bright), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title span.red {
  background: linear-gradient(180deg, #ff7b7b, var(--red));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 59, 59, 0.4));
}
.section-sub { color: var(--ink-dim); margin-top: 12px; font-size: 18px; }

/* ============================================================
   2. CHARACTERS
   ============================================================ */
.char-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px;
}
.char-card {
  position: relative; padding: 20px 18px 18px; cursor: pointer; overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 32, 22, 0.9), rgba(8, 16, 11, 0.94));
  border: 1px solid var(--frame); border-radius: 12px;
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}
.char-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(320px 200px at 50% 0%, rgba(216, 255, 60, 0.12), transparent 70%);
}
.char-card:hover { transform: translateY(-8px); border-color: var(--green); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5), 0 0 30px rgba(198, 255, 0, 0.18); }
.char-card:hover::before { opacity: 1; }
.char-card.selected {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 2px rgba(216, 255, 60, 0.5), 0 0 44px rgba(216, 255, 60, 0.28), 0 18px 40px rgba(0,0,0,0.5);
}
.char-card.selected::after {
  content: '✔ SELECTED'; position: absolute; top: 12px; right: -32px;
  transform: rotate(38deg); background: var(--green); color: #151a04;
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em; padding: 4px 36px;
}
.char-rarity {
  position: absolute; top: 12px; left: 12px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.16em; padding: 3px 9px; border-radius: 4px;
}
.rar-legendary { color: var(--gold-bright); border: 1px solid var(--frame-gold); background: rgba(201,164,74,0.1); }
.rar-epic { color: #d9a6ff; border: 1px solid rgba(190,120,255,0.4); background: rgba(160,80,255,0.1); }
.rar-rare { color: #7fd4ff; border: 1px solid rgba(90,190,255,0.4); background: rgba(60,160,255,0.1); }
.char-portrait {
  width: 100%; height: 210px; margin: 22px auto 14px; border-radius: 10px;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #202a0c, #0c0f06 75%);
  border: 1px solid var(--frame);
  box-shadow: inset 0 0 30px rgba(216, 255, 60, 0.08), 0 8px 22px rgba(0,0,0,0.4);
}
.char-portrait img {
  height: 100%; width: 100%; object-fit: contain; padding: 8px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.6));
  transition: transform 0.3s;
}
.char-card:hover .char-portrait img { transform: scale(1.06); }
.char-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; text-align: center; color: var(--ink); }
.char-role { text-align: center; font-size: 12.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--green-soft); margin: 3px 0 14px; }
.char-stats { display: grid; gap: 7px; margin-bottom: 14px; }
.char-stat { display: grid; grid-template-columns: 44px 1fr 26px; gap: 8px; align-items: center; font-size: 11.5px; letter-spacing: 0.1em; color: var(--ink-faint); }
.char-stat .bar { height: 6px; border-radius: 3px; background: #12170a; border: 1px solid rgba(198, 255, 0,0.18); overflow: hidden; }
.char-stat .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--emerald), var(--green-bright)); box-shadow: 0 0 8px rgba(216, 255, 60,0.5); transition: width 0.9s cubic-bezier(0.2,0.8,0.3,1); }
.char-stat b { color: var(--green-soft); text-align: right; }
.char-item { font-size: 13px; color: var(--ink-dim); text-align: center; margin-bottom: 14px; }
.char-item b { color: var(--gold-bright); }
.char-actions { display: flex; gap: 8px; justify-content: center; }

.char-detail {
  margin-top: 26px; padding: 26px 30px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 30, 20, 0.95), rgba(7, 14, 10, 0.97));
  border: 1px solid var(--frame-gold);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 0 60px rgba(198, 255, 0, 0.04);
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: center;
  animation: detailIn 0.4s ease;
}
@keyframes detailIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.char-detail .cd-portrait {
  width: 130px; height: 150px; border-radius: 12px; display: grid; place-items: center;
  overflow: hidden; background: radial-gradient(circle at 50% 30%, #202a0c, #0c0f06 75%);
  border: 1px solid var(--frame-gold);
}
.char-detail .cd-portrait img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.char-detail h3 { font-family: var(--font-display); font-size: 26px; color: var(--green-soft); }
.char-detail .cd-role { font-size: 13px; letter-spacing: 0.24em; color: var(--gold-bright); text-transform: uppercase; margin-bottom: 8px; }
.char-detail p { color: var(--ink-dim); font-size: 16px; max-width: 640px; }
.char-detail .cd-lorequote { font-family: var(--font-lore); font-style: italic; color: var(--gold); margin-top: 8px; font-size: 15.5px; }

/* ============================================================
   3. WORLD MAP
   ============================================================ */
.map-frame {
  position: relative; border-radius: 16px; padding: 20px;
  background:
    radial-gradient(1000px 500px at 50% 0%, rgba(198, 255, 0, 0.05), transparent),
    linear-gradient(180deg, #151a0c, #0e1208);
  border: 2px solid var(--frame-gold);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 80px rgba(0, 0, 0, 0.5);
}
.map-corner { position: absolute; width: 34px; height: 34px; border: 3px solid var(--gold); z-index: 5; }
.map-corner.tl { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.map-corner.tr { top: -3px; right: -3px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.map-corner.bl { bottom: -3px; left: -3px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.map-corner.br { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.map-legend {
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px;
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim);
}
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-open { background: var(--green-bright); box-shadow: 0 0 8px var(--green-bright); }
.dot-locked { background: #55606030; border: 1px solid #8a9a90; }
.dot-soon { background: var(--gold-bright); box-shadow: 0 0 8px rgba(255,215,106,0.7); }
.dot-boss { background: var(--red); box-shadow: 0 0 8px var(--red); }
.map-scroll { overflow-x: auto; border-radius: 10px; }
.map-canvas { position: relative; min-width: 900px; }
#mapSvg { width: 100%; display: block; border-radius: 10px; }

.map-node { cursor: pointer; }
.map-node .node-ring { transition: r 0.25s, opacity 0.25s; }
.map-node:hover .node-halo { opacity: 0.9; }
.map-node text { pointer-events: none; }
.map-node.visited .node-core { stroke: var(--gold-bright); }

.map-tooltip {
  position: absolute; z-index: 6; pointer-events: none; min-width: 190px; max-width: 250px;
  padding: 12px 14px; border-radius: 9px;
  background: rgba(6, 14, 9, 0.96); border: 1px solid var(--frame-gold);
  box-shadow: 0 14px 34px rgba(0,0,0,0.6); font-size: 13.5px;
  transform: translate(-50%, calc(-100% - 16px));
}
.map-tooltip b { display: block; font-family: var(--font-display); color: var(--green-soft); font-size: 15px; margin-bottom: 3px; }
.map-tooltip .tt-status { font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; }
.map-tooltip .tt-desc { color: var(--ink-dim); margin-top: 5px; }
.map-counter { text-align: center; margin-top: 14px; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.map-counter b { color: var(--green-bright); font-size: 15px; }

/* ============================================================
   4. QUESTS
   ============================================================ */
.quest-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.qtab {
  padding: 10px 20px; font-family: var(--font-ui); font-weight: 700; font-size: 14px;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; border-radius: 6px;
  background: rgba(10, 22, 15, 0.7); color: var(--ink-dim); border: 1px solid var(--frame);
  transition: all 0.2s;
}
.qtab:hover { color: var(--green-soft); border-color: var(--green); }
.qtab.active { background: linear-gradient(180deg, rgba(198, 255, 0,0.22), rgba(198, 255, 0,0.08)); color: var(--green-bright); border-color: var(--green); box-shadow: 0 0 18px rgba(198, 255, 0,0.2); }

.quest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.quest-card {
  position: relative; padding: 20px; border-radius: 11px; overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 30, 21, 0.92), rgba(8, 15, 10, 0.95));
  border: 1px solid var(--frame);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  animation: qIn 0.4s ease both;
}
@keyframes qIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.quest-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 18px 40px rgba(0,0,0,0.5); }
.quest-card.done { border-color: rgba(216, 255, 60, 0.5); }
.quest-card.done::after {
  content: '✔ ACCEPTED'; position: absolute; inset: auto 0 0 0; text-align: center;
  background: rgba(198, 255, 0, 0.15); color: var(--green-bright); font-size: 11px;
  font-weight: 800; letter-spacing: 0.24em; padding: 5px;
}
.quest-top { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 12px; }
.quest-title { font-family: var(--font-display); font-weight: 700; font-size: 17.5px; color: var(--ink); }
.quest-tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.qtag { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; padding: 2.5px 8px; border-radius: 4px; text-transform: uppercase; }
.qtag-type { color: var(--green-soft); border: 1px solid var(--frame); background: rgba(198, 255, 0,0.07); }
.qtag-reward { color: var(--gold-bright); border: 1px solid var(--frame-gold); background: rgba(201,164,74,0.08); }
.quest-desc { font-size: 14.5px; color: var(--ink-dim); margin-bottom: 14px; min-height: 42px; }
.quest-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; letter-spacing: 0.12em; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 7px; }
.quest-diff b { color: var(--gold-bright); letter-spacing: 2px; }
.quest-bar { height: 8px; border-radius: 4px; background: #12170a; border: 1px solid rgba(198, 255, 0,0.2); overflow: hidden; margin-bottom: 15px; }
.quest-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald), var(--green-bright)); box-shadow: 0 0 8px rgba(216, 255, 60,0.5); transition: width 0.7s ease; }
.quest-actions { display: flex; gap: 9px; }

/* ============================================================
   5. INVENTORY
   ============================================================ */
.inv-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 13px; }
.inv-slot {
  position: relative; aspect-ratio: 1; border-radius: 11px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(160deg, rgba(17, 32, 22, 0.9), rgba(7, 14, 10, 0.95));
  border: 1px solid var(--frame);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.inv-slot::before {
  content: ''; position: absolute; inset: 4px; border-radius: 8px;
  border: 1px dashed rgba(230, 255, 138, 0.12); pointer-events: none;
}
.inv-slot:hover { transform: translateY(-5px) scale(1.04); z-index: 2; }
.inv-slot .inv-ico { width: 42px; height: 42px; color: #dde8c0; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.55)); transition: transform 0.25s, color 0.25s; }
.inv-slot .inv-ico svg { width: 100%; height: 100%; display: block; }
.inv-slot:hover .inv-ico { transform: scale(1.15); color: var(--green-bright); }
.inv-slot .inv-name { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-align: center; color: var(--ink-dim); padding: 0 6px; }
.inv-slot .inv-rar { position: absolute; top: 9px; right: 10px; }
.inv-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.inv-dot.dot-common { background: #aebfb6; }
.inv-dot.dot-rare { background: #7fd4ff; box-shadow: 0 0 7px rgba(127, 212, 255, 0.7); }
.inv-dot.dot-epic { background: #d9a6ff; box-shadow: 0 0 7px rgba(217, 166, 255, 0.7); }
.inv-dot.dot-legendary { background: var(--gold-bright); box-shadow: 0 0 7px rgba(255, 215, 106, 0.7); }
.inv-dot.dot-mythic { background: var(--green-bright); box-shadow: 0 0 7px rgba(216, 255, 60, 0.7); }
.inv-slot.r-common { border-color: rgba(140, 160, 150, 0.3); }
.inv-slot.r-rare { border-color: rgba(90, 190, 255, 0.45); box-shadow: 0 0 14px rgba(60, 160, 255, 0.1); }
.inv-slot.r-epic { border-color: rgba(190, 120, 255, 0.5); box-shadow: 0 0 14px rgba(160, 80, 255, 0.12); }
.inv-slot.r-legendary { border-color: rgba(255, 215, 106, 0.55); box-shadow: 0 0 18px rgba(255, 215, 106, 0.14); }
.inv-slot.r-mythic { border-color: rgba(216, 255, 60, 0.6); box-shadow: 0 0 20px rgba(216, 255, 60, 0.18); }
.inv-slot.active { outline: 2px solid var(--green-bright); outline-offset: 2px; }

.inv-detail {
  position: sticky; top: 90px; min-height: 380px; border-radius: 13px; padding: 22px;
  background: linear-gradient(180deg, rgba(15, 28, 19, 0.95), rgba(7, 13, 9, 0.97));
  border: 1px solid var(--frame-gold);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 50px rgba(201, 164, 74, 0.04);
}
.inv-detail-empty { height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink-faint); text-align: center; letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; }
.inv-empty-ico { font-size: 46px; opacity: 0.5; }
.inv-d-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.inv-d-ico {
  width: 68px; height: 68px; border-radius: 11px; display: grid; place-items: center;
  padding: 13px; color: var(--green-soft);
  background: radial-gradient(circle at 30% 25%, #344414, #10160a); border: 1px solid var(--frame-gold);
}
.inv-d-ico svg { width: 100%; height: 100%; display: block; }
.inv-d-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.inv-d-rar { font-size: 11px; font-weight: 800; letter-spacing: 0.2em; }
.inv-d-cat { display: inline-block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); border: 1px solid var(--frame); border-radius: 4px; padding: 3px 9px; margin-bottom: 13px; }
.inv-d-desc { color: var(--ink-dim); font-size: 15px; margin-bottom: 14px; }
.inv-d-lore { font-family: var(--font-lore); font-style: italic; color: var(--gold); font-size: 15px; border-top: 1px solid rgba(201,164,74,0.2); padding-top: 13px; }
.rc-common { color: #aebfb6; } .rc-rare { color: #7fd4ff; } .rc-epic { color: #d9a6ff; }
.rc-legendary { color: var(--gold-bright); } .rc-mythic { color: var(--green-bright); }

/* ============================================================
   6. FACTIONS
   ============================================================ */
.faction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.faction-card {
  position: relative; padding: 24px 22px; border-radius: 13px; overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 27, 19, 0.93), rgba(7, 13, 9, 0.96));
  border: 1px solid var(--frame);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.faction-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--fc, var(--green));
  box-shadow: 0 0 16px var(--fc, var(--green));
}
.faction-card:hover { transform: translateY(-7px); border-color: var(--fc, var(--green)); box-shadow: 0 20px 46px rgba(0,0,0,0.55); }
.faction-card.joined { border-color: var(--fc); box-shadow: 0 0 0 2px var(--fc), 0 18px 40px rgba(0,0,0,0.5); }
.faction-head { display: flex; align-items: center; gap: 15px; margin-bottom: 13px; }
.faction-emblem {
  width: 62px; height: 62px; flex: none; display: grid; place-items: center;
  padding: 12px; color: var(--fc, var(--green-soft));
  background: radial-gradient(circle at 32% 26%, #14351f, #07110b);
  border: 2px solid var(--fc, var(--frame));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.faction-emblem svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 6px currentColor); }
.faction-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.faction-ideology { font-size: 13px; color: var(--ink-dim); font-style: italic; }
.faction-rows { display: grid; gap: 7px; font-size: 13.5px; margin-bottom: 15px; }
.faction-rows div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(230, 255, 138,0.1); padding-bottom: 6px; }
.faction-rows span { color: var(--ink-faint); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11.5px; }
.faction-rows b { color: var(--ink); text-align: right; }
.faction-actions { display: flex; gap: 9px; }

/* ============================================================
   7. SYSTEMS
   ============================================================ */
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.sys-panel {
  border-radius: 11px; overflow: hidden; border: 1px solid var(--frame);
  background: linear-gradient(180deg, rgba(13, 26, 18, 0.92), rgba(7, 13, 9, 0.95));
  transition: border-color 0.25s, box-shadow 0.25s;
}
.sys-panel:hover { border-color: var(--green); box-shadow: 0 12px 34px rgba(0,0,0,0.45); }
.sys-head {
  width: 100%; display: flex; align-items: center; gap: 13px; padding: 17px 18px;
  background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink);
  font-family: var(--font-ui);
}
.sys-ico {
  width: 44px; height: 44px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-size: 22px; background: radial-gradient(circle at 30% 25%, #2c3812, #10140a);
  border: 1px solid var(--frame);
}
.sys-title { font-weight: 700; font-size: 16.5px; letter-spacing: 0.04em; }
.sys-tag { display: block; font-size: 11px; letter-spacing: 0.18em; color: var(--green-soft); text-transform: uppercase; margin-top: 2px; }
.sys-chevron { margin-left: auto; color: var(--green); transition: transform 0.3s; font-size: 13px; }
.sys-panel.open .sys-chevron { transform: rotate(180deg); }
.sys-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.sys-body-inner { padding: 0 18px 18px 75px; color: var(--ink-dim); font-size: 14.5px; }
.sys-body-inner .sys-status { display: inline-block; margin-top: 10px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.2em; padding: 3px 10px; border-radius: 4px; color: var(--gold-bright); border: 1px solid var(--frame-gold); }

/* ============================================================
   8. BOSS (dedicated page: boss.html)
   ============================================================ */
.bosspage-body {
  background:
    radial-gradient(1100px 600px at 50% 0%, rgba(255, 59, 59, 0.14), transparent 65%),
    linear-gradient(180deg, #0c0304 0%, #170507 45%, #0c0304 100%);
  min-height: 100vh;
}
.bosspage-body::before { display: none; }
.bosspage {
  position: relative; z-index: 3; min-height: 100vh; overflow: hidden;
  max-width: 1500px; margin: 0 auto; padding: 130px 30px 70px;
}
.bosspage-glow {
  position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 42, 30, 0.16), transparent 70%);
  animation: auraPulse 4s ease-in-out infinite;
}
.bosspage-head { position: relative; text-align: center; margin-bottom: 40px; }
.bosspage-title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(44px, 7vw, 92px);
  letter-spacing: 0.03em; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.6);
}
.bosspage-title span.red {
  background: linear-gradient(180deg, #ff7b7b, var(--red) 60%, #8a1218);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 34px rgba(255, 59, 59, 0.5));
}
.bosspage-arena {
  position: relative; display: grid; grid-template-columns: minmax(340px, 1.2fr) minmax(340px, 1fr);
  gap: 50px; align-items: center;
}
.bosspage-monster { position: relative; text-align: center; }
.bosspage-monster img {
  width: 100%; max-width: 660px;
  filter: drop-shadow(0 0 70px rgba(255, 42, 30, 0.4)) drop-shadow(0 30px 40px rgba(0,0,0,0.7));
  animation: bossLoom 7s ease-in-out infinite;
}
@keyframes bossLoom { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.012); } }
.bosspage-shadow {
  position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
  width: 70%; height: 44px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.75), transparent 70%);
}
.bosspage-panel { max-width: 560px; }
.bosspage-strike { width: 100%; justify-content: center; font-size: 17px; padding: 18px 26px; }
.bosspage-strike.cooling {
  cursor: not-allowed; opacity: 0.7;
  background: linear-gradient(180deg, #3a1215, #240a0c);
  border-color: rgba(255, 90, 90, 0.4); box-shadow: none;
  color: #d99a9a; letter-spacing: 0.12em;
}
.bosspage-strike:disabled { transform: none; }
@media (max-width: 1060px) {
  .bosspage-arena { grid-template-columns: 1fr; gap: 30px; }
  .bosspage-monster img { max-width: 440px; }
  .bosspage-panel { max-width: none; }
}
.boss-embers { position: absolute; inset: 0; pointer-events: none; }
.boss-embers::before, .boss-embers::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 15% 80%, #ff6b4a 60%, transparent),
    radial-gradient(1.5px 1.5px at 35% 90%, #ffb14a 60%, transparent),
    radial-gradient(2px 2px at 55% 85%, #ff4a4a 60%, transparent),
    radial-gradient(1.5px 1.5px at 75% 92%, #ff8a4a 60%, transparent),
    radial-gradient(2px 2px at 90% 82%, #ff5a3a 60%, transparent);
  animation: embers 7s linear infinite;
}
.boss-embers::after { animation-delay: -3.5s; opacity: 0.7; }
@keyframes embers {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-72vh); opacity: 0; }
}
@keyframes auraPulse { 0%,100% { opacity: 0.85; } 50% { opacity: 0.4; } }

.boss-panel {
  padding: 26px 28px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 8, 10, 0.93), rgba(12, 4, 5, 0.96));
  border: 1px solid rgba(255, 59, 59, 0.4);
  box-shadow: 0 26px 60px rgba(0,0,0,0.6), inset 0 0 60px rgba(255, 59, 59, 0.05);
}
.boss-panel-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.boss-skull { font-size: 38px; filter: drop-shadow(0 0 12px rgba(255,59,59,0.7)); }
.boss-panel-head h3 { font-family: var(--font-display); font-size: 23px; color: #ffb3b3; letter-spacing: 0.05em; }
.boss-tier { font-size: 11.5px; letter-spacing: 0.24em; color: var(--gold-bright); }
.boss-lvl { margin-left: auto; text-align: center; font-size: 10px; letter-spacing: 0.2em; color: #ff8080; }
.boss-lvl b { font-size: 27px; font-family: var(--font-display); color: var(--red); }
.boss-hp { margin-bottom: 20px; }
.boss-hp-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: 0.24em; color: #ff9d9d; margin-bottom: 7px; }
.boss-hp-bar { height: 18px; border-radius: 9px; background: #170406; border: 1px solid rgba(255, 59, 59, 0.5); overflow: hidden; }
.boss-hp-bar i {
  display: block; height: 100%; width: 100%;
  background: repeating-linear-gradient(-45deg, #ff4b4b 0 12px, #d92626 12px 24px);
  box-shadow: 0 0 18px rgba(255, 59, 59, 0.7);
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.boss-stats { list-style: none; display: grid; gap: 9px; margin-bottom: 20px; }
.boss-stats li { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; border-bottom: 1px dashed rgba(255, 59, 59, 0.16); padding-bottom: 8px; }
.boss-stats span { color: #b78585; letter-spacing: 0.06em; }
.boss-stats b { color: #ffd9d9; text-align: right; }
.boss-hint { margin-top: 12px; font-size: 13px; color: #b78585; font-style: italic; }
.boss-shake { animation: bossShake 0.35s ease; }
@keyframes bossShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-9px) rotate(-1deg); }
  75% { transform: translateX(9px) rotate(1deg); }
}

/* ============================================================
   9. LORE
   ============================================================ */
.lore-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.lore-tabs { display: grid; gap: 9px; position: sticky; top: 90px; }
.lore-tab {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  background: rgba(11, 22, 15, 0.8); border: 1px solid var(--frame); border-radius: 9px;
  color: var(--ink-dim); font-family: var(--font-ui); font-weight: 600; font-size: 15px;
  text-align: left; transition: all 0.22s;
}
.lore-tab:hover { color: var(--green-soft); border-color: var(--green); transform: translateX(5px); }
.lore-tab.active {
  color: var(--gold-bright); border-color: var(--frame-gold);
  background: linear-gradient(90deg, rgba(201, 164, 74, 0.12), rgba(11, 22, 15, 0.8));
  transform: translateX(8px);
}
.lore-tab .lt-num { font-family: var(--font-display); font-size: 13px; color: var(--gold); }
.lore-scroll {
  position: relative; padding: 38px 42px; min-height: 420px; border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(28, 24, 14, 0.55), rgba(14, 13, 8, 0.6)),
    linear-gradient(180deg, #1e240e, #10140a);
  border: 1px solid var(--frame-gold);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), inset 0 0 70px rgba(201, 164, 74, 0.06);
}
.lore-scroll::before, .lore-scroll::after {
  content: ''; position: absolute; left: -8px; right: -8px; height: 17px;
  background: linear-gradient(180deg, #241d0e, #14100a);
  border: 1px solid var(--frame-gold); border-radius: 9px;
}
.lore-scroll::before { top: -9px; } .lore-scroll::after { bottom: -9px; }
.lore-chapter { animation: loreIn 0.5s ease; }
@keyframes loreIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.lore-chapter h3 { font-family: var(--font-display); font-size: 27px; color: var(--gold-bright); margin-bottom: 6px; }
.lore-chapter .lore-epigraph { font-family: var(--font-lore); font-style: italic; color: var(--gold); margin-bottom: 20px; font-size: 16px; }
.lore-chapter p { font-family: var(--font-lore); font-size: 18.5px; line-height: 1.75; color: #d7cfae; margin-bottom: 16px; }
.lore-chapter p::first-letter { font-size: 200%; color: var(--green-bright); font-family: var(--font-display); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(2, 6, 4, 0.8); backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: min(560px, 94vw); max-height: 86vh; overflow-y: auto;
  padding: 30px 30px 26px; border-radius: 15px;
  background: linear-gradient(170deg, #1b240e, #0e1207);
  border: 1px solid var(--frame-gold);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 60px rgba(198, 255, 0, 0.12);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; cursor: pointer;
  border-radius: 7px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--frame);
  color: var(--ink-dim); font-size: 15px; transition: all 0.2s;
}
.modal-close:hover { color: var(--red); border-color: var(--red); transform: rotate(90deg); }
.modal-content .m-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.3em; color: var(--gold); margin-bottom: 9px; }
.modal-content h3 { font-family: var(--font-display); font-size: 25px; margin-bottom: 4px; color: var(--green-soft); }
.modal-content .m-status { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.2em; padding: 3px 10px; border-radius: 4px; margin: 7px 0 14px; }
.m-status.open { color: var(--green-bright); border: 1px solid var(--frame); background: rgba(198, 255, 0,0.08); }
.m-status.locked { color: #aebfb6; border: 1px solid rgba(140,160,150,0.35); background: rgba(140,160,150,0.07); }
.m-status.soon { color: var(--gold-bright); border: 1px solid var(--frame-gold); background: rgba(201,164,74,0.08); }
.m-status.danger { color: #ff8080; border: 1px solid rgba(255,59,59,0.4); background: rgba(255,59,59,0.08); }
.modal-content p { color: var(--ink-dim); font-size: 15.5px; margin-bottom: 13px; }
.modal-content .m-lore { font-family: var(--font-lore); font-style: italic; color: var(--gold); border-left: 2px solid var(--frame-gold); padding-left: 14px; }
.modal-content .m-big-ico { font-size: 52px; text-align: center; margin-bottom: 10px; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5)); }
.modal-content .m-emblem { width: 72px; height: 72px; margin: 0 auto 12px; filter: drop-shadow(0 0 10px currentColor); }
.modal-content .m-emblem svg { width: 100%; height: 100%; display: block; }
.modal-content .m-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.modal-content .m-rows { display: grid; gap: 8px; margin: 14px 0; }
.modal-content .m-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed rgba(230, 255, 138,0.12); padding-bottom: 7px; }
.modal-content .m-rows span { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11.5px; }
.modal-content .m-rows b { color: var(--ink); }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-zone { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: grid; gap: 10px; justify-items: end; }
.toast {
  display: flex; align-items: center; gap: 11px; padding: 13px 19px; max-width: 360px;
  background: linear-gradient(180deg, #1b250e, #101408);
  border: 1px solid var(--frame); border-left: 3px solid var(--green); border-radius: 9px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55); font-size: 14.5px; font-weight: 600;
  animation: toastIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.toast.gold { border-left-color: var(--gold-bright); }
.toast.red { border-left-color: var(--red); }
.toast .t-ico { font-size: 21px; }
.toast .t-sub { display: block; font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(60px); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1060px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 14px; background: rgba(4, 10, 7, 0.98); border-bottom: 1px solid var(--frame); }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .inv-wrap { grid-template-columns: 1fr; }
  .inv-detail { position: static; min-height: 0; }
  .lore-wrap { grid-template-columns: 1fr; }
  .lore-tabs { position: static; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .char-detail { grid-template-columns: 1fr; text-align: center; }
  .char-detail .cd-portrait { margin: 0 auto; }
}
@media (max-width: 640px) {
  .player-hud { display: none; }
  .hero { padding-top: 110px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .section { padding: 80px 16px 40px; }
  .hero-figure { left: 4%; width: 110px; }
  .hero-castle { width: 300px; }
  .map-legend { gap: 12px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   WALLET / RPC SWITCH / BUY STATE / FOOTER  (chain.js UI)
   ============================================================ */
/* disabled Buy (pre-launch) */
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; filter: grayscale(0.35);
  box-shadow: none;
}
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { transform: none; }

/* wallet button connected state */
.wallet-btn.connected {
  border-color: var(--frame-gold); color: var(--gold-bright);
  background: rgba(201, 164, 74, 0.12); font-variant-numeric: tabular-nums;
}
.wallet-btn.connected::before {
  content: "◆"; font-size: 10px; color: var(--green-bright); margin-right: 2px;
}

/* RPC switcher */
.rpc-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border: 1px solid var(--frame); border-radius: 6px;
  background: rgba(10, 25, 16, 0.5); cursor: pointer;
}
.rpc-switch .rpc-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green); flex: none;
}
.rpc-switch select {
  appearance: none; -webkit-appearance: none; border: 0; outline: none;
  background: transparent; color: var(--green-soft);
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  letter-spacing: 0.06em; cursor: pointer; max-width: 190px;
}
.rpc-switch select option { background: var(--panel-solid); color: var(--ink); }

/* footer */
.site-foot {
  position: relative; z-index: 2; margin-top: 40px;
  border-top: 1px solid var(--frame); background: rgba(6, 12, 8, 0.85);
}
.foot-inner {
  max-width: 1180px; margin: 0 auto; padding: 26px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.foot-logo { font-family: var(--font-display); font-weight: 900; letter-spacing: 0.08em; color: var(--ink); }
.foot-logo b { color: var(--green); }
.foot-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.foot-links a, .foot-buy {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-weight: 700; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: var(--green-soft); border: 1px solid var(--frame); border-radius: 6px;
  padding: 8px 14px; background: rgba(10, 25, 16, 0.6);
  cursor: pointer; transition: all 0.2s ease;
}
.foot-links a:hover, .foot-buy:hover {
  border-color: var(--green); background: rgba(198, 255, 0, 0.12); transform: translateY(-2px);
}
.foot-buy:disabled, .foot-buy[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; transform: none;
}
.foot-note { color: var(--ink-faint); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }

@media (max-width: 720px) {
  .rpc-switch { display: none; }  /* keep the nav tidy on phones; still switchable on desktop */
  .foot-inner { flex-direction: column; text-align: center; }
}
