:root {
  --bg0: #05070b;
  --bg1: #070b12;
  --bg2: #0c1220;

  --txt: #e9eef7;
  --muted: #aab4c3; /* rgba(170, 180, 195, 0.24) */

  --mana: #085e97;
  --ember: #d08a4a;

  --r-lg: 20px;
  --r-md: 14px;

  --shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.35);

  --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --max: 1120px;
  --pad: 20px;
}


/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--txt);
  font-family: var(--sans);

  background:
    /* radial-gradient(900px 500px at 10% 0%, rgba(63,224,207,.10), transparent 65%),
    radial-gradient(900px 520px at 85% 10%, rgba(208,138,74,.08), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 45%, var(--bg0)), */
	url("img/bg-global.png");

  background-repeat: repeat;
  background-position: center top;
  background-size: 55%;
  background-attachment: fixed;

  min-height: 100vh;
}

body::before{
  content:"";
  position: fixed;
  inset: -10%;
  pointer-events: none;

  /* BLUE-ONLY glow */
  background:
    radial-gradient(900px 600px at 58% 42%, rgba(8,94,151,.22), transparent 60%),
    radial-gradient(1200px 800px at 72% 55%, rgba(8,94,151,.14), transparent 65%);

  mix-blend-mode: screen;   /* glow, not tint */
  opacity: .28;
  filter: blur(16px);
  transform: scale(1);
  animation: codexDriftPulse 10.6s ease-in-out infinite;
  z-index: 0;
}

header, main, footer, .ribbon{
  position: relative;
  z-index: 1;
}
@keyframes codexPulse{
  /* heartbeat style: small beat, then bigger beat, then rest */
  0%   { opacity:.22; transform: scale(1);    filter: blur(10px); }
  18%  { opacity:.40; transform: scale(1.02); filter: blur(8px);  } /* beat 1 */
  32%  { opacity:.26; transform: scale(1.00); filter: blur(10px); }
  48%  { opacity:.50; transform: scale(1.04); filter: blur(7px);  } /* beat 2 */
  62%  { opacity:.28; transform: scale(1.01); filter: blur(10px); }
  100% { opacity:.22; transform: scale(1);    filter: blur(10px); }
}

@keyframes codexDriftPulse{
  /* resting */
  0%	{ opacity:.20; transform: translate3d(4%,0,0) scale(1); }
  /* pulse 1 + slight drift */
  20%	{ opacity:.34; transform: translate3d(4%, -2%, 0) scale(1.02); }
  /* settle */
  35%	{ opacity:.24; transform: translate3d(3%, 0%, 0) scale(1); }
  /* pulse 2 (stronger) + drift other way */
  55%	{ opacity:.44; transform: translate3d(6%, 2%, 0) scale(1.06); }
  /* settle */
  70%	{ opacity:.26; transform: translate3d(4%, 0%, 0) scale(1.01); }
  /* return */
  100%	{ opacity:.20; transform: translate3d(3%,0,0) scale(1); }
}


@media (prefers-reduced-motion: reduce){
  body::before{ animation: none; opacity: .22; transform: translate3d(3%,0,0);}
}
body::after{
  content:"";
  position: fixed;
  inset:-10%;
  pointer-events:none;
  background:
    radial-gradient(700px 420px at 40% 60%, rgba(255,255,255,.06), transparent 60%);
  opacity:.10;
  filter: blur(16px);
  animation: slowDrift 21.2s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes slowDrift{
  from { transform: translate3d(-2%, -2%, 0); }
  to   { transform: translate3d( 2%,  2%, 0); }
}



/* body {
  margin: 0;
  color: var(--txt);
  font-family: var(--sans);

  background:
    url("img/bg-global.png") center top / cover no-repeat fixed;

  min-height: 100vh;
} */
body {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  background:
/*     radial-gradient(900px 500px at 10% 0%, rgba(63, 224, 207, 0.12), transparent 65%),
    radial-gradient(900px 520px at 85% 10%, rgba(208, 138, 74, 0.10), transparent 60%),
    radial-gradient(1200px 800px at 40% 110%, rgba(63, 224, 207, 0.06), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 45%, var(--bg0)), */
    url("img/bg-global.png");

  background-repeat: repeat;
  background-position: center top;
  background-size: 50%;
  background-attachment: fixed; /* optional cinematic feel */

  overflow-x: hidden;
} */

/* Optional dark wash for readability */
/* body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.45); /* tune 0.35–0.60 
  z-index: -1;
} */

/* Links */
a { 
  color: var(--muted);
  text-decoration: none; 
  border-bottom-color: var(--mana);
  border-color: var(--mana);
  }

/* Layout container */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  text-decoration: none; 
}

/* ---------- Fog Overlay ---------- */
/* .fog {
  position: fixed;
  inset: -40px;
  pointer-events: none;
  background:
    radial-gradient(700px 260px at 20% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(520px 220px at 70% 40%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(680px 280px at 55% 75%, rgba(255, 255, 255, 0.04), transparent 60%);
  filter: blur(10px);
  opacity: 0.6;
  animation: drift 18s ease-in-out infinite alternate;
  mix-blend-mode: screen;
} */

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1.04); }
  to   { transform: translate3d( 2%,  1%, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .fog { animation: none; }
  .hoverLift { transition: none !important; }
}

/* ---------- Ribbon ---------- */
.ribbon {
  position: sticky;
  top: 0;
  z-index: 60;
  /* background: linear-gradient(90deg, rgba(63, 224, 207, 0.14), rgba(208, 138, 74, 0.10)); */
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(3px);
}

.ribbon .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--pad);
  max-width: var(--max);
  margin: 0 auto;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none; 
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--txt);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none; 
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mana);
  box-shadow: 0 0 0 4px rgba(63, 224, 207, 0.12);
  text-decoration: none; 
}

/* ---------- Header / Nav ---------- */
header {
  position: sticky;
  top: 40px;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(5, 7, 11, 0.58);
  backdrop-filter: blur(3px);
  color: var(--txt);
  text-decoration: none; 
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  color: var(--muted);
  text-decoration: none; 
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.sigil {
  width: 58px;              /* adjust size here */
  height: 58px;
  flex: 0 0 auto;
  background: url("img/DarkCodexSymbol_Glyph_v3.png") center center no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 6px var(--mana));
  animation: sigilBreath 10.6s ease-in-out infinite;
  text-decoration: none; 
}
@keyframes sigilBreath{
  0%   { filter: drop-shadow(0 0 4px rgba(8,94,151,.25)); }
  50%  { filter: drop-shadow(0 0 8px rgba(8,94,151,.45)); }
  100% { filter: drop-shadow(0 0 4px rgba(8,94,151,.25)); }
}
.brand:hover .sigil{
  transform: scale(1.05);
}

.brand h1 {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-decoration: none; 
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none; 
}

.navLinks {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  text-decoration: none; 
}

.navItem { position: relative; display: inline-flex; }

.navBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none; 
  font-size: 14px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  user-select: none;
  border-bottom-color: var(--mana);
  border-color: var(--mana);
}

.navBtn:hover {
  border-color: var(--mana);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none; 
}

.navBtn.active {
  border-color: var(--mana) /*rgba(63, 224, 207, 0.34);*/
  /* background: linear-gradient(180deg, rgba(63, 224, 207, 0.10), rgba(63, 224, 207, 0.03)); */
  text-decoration: none; 
}

.chev {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-right: 2px solid rgba(233, 238, 247, 0.7);
  border-bottom: 2px solid rgba(233, 238, 247, 0.7);
  transform: rotate(45deg);
  margin-top: -2px;
  opacity: 0.8;
  text-decoration: none; 
}

.muted {
	color: var(--muted);
	text-decoration: none; 
}

/* ---------- Dropdown ---------- */
.menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  min-width: 200px;
  padding: 10px;
  border-radius: var(--r-md);
  background: rgba(12, 18, 32, 0.86);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  display: none;
  text-decoration: none; 
}

.navItem:focus-within .menu,
.navItem:hover .menu { display: block; }

.menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none; 
  transition: background 0.15s ease, border-color 0.15s ease;
}

.menu a:hover {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  text-decoration: none; 
}

.menu small { 
  color: var(--muted); 
  font-size: 12px;
  text-decoration: none;
}

/* ---------- Dropdown 2---------- */
.menu2 {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  min-width: 140px;
  padding: 10px;
  border-radius: var(--r-md);
  background: rgba(12, 18, 32, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  display: none;
  text-decoration: none; 
}

.navItem:focus-within .menu2,
.navItem:hover .menu2 { display: block;text-decoration: none; }

.menu2 a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--muted);
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none; 
}

.menu2 a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  text-decoration: none; 
}

.menu2 small { 
  color: var(--muted);
  font-size: 12px;
  text-decoration: none; 
}

/* ---------- Mega Menu ---------- */
.mega {
  min-width: min(260px, 92vw);
  left: 50%;
  transform: translateX(-25%);
  padding: 14px;
  text-decoration: none; 
}

.megaGrid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 12px;
}

.mega .col {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.16);
}

.mega h3 {
  margin: 0 0 8px 0;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none; 
}

.searchMini {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  text-decoration: none; 
}

.searchMini input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none; 
}

.kbd {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none; 
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- Tools ---------- */
.navTools {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 220px;
  text-decoration: none; 
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none; 
}

.switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.knob {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mana);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(63, 224, 207, 0.12);
  transition: left 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

body.spoilersOff .knob {
  left: 22px;
  background: var(--ember);
  box-shadow: 0 0 0 4px rgba(208, 138, 74, 0.12);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  text-decoration: none; 
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  border-bottom-color: var(--mana);
  border-color: var(--mana);
}

.btn:hover {
  transform: translateY(0px);
  border-color: var(--mana);
  background: rgba(255, 255, 255, 0.06);
}

.btn.primary {
  border-color: var(--mana);
  /* background: linear-gradient(180deg, rgba(63, 224, 207, 0.12), rgba(63, 224, 207, 0.04)); */
  box-shadow: 0 0 0 1px rgba(63, 224, 207, 0.10), 0 16px 44px rgba(0, 0, 0, 0.35);
}

.btn.secondary {
  border-color: var(--mana);
  /* background: linear-gradient(180deg, rgba(208, 138, 74, 0.10), rgba(208, 138, 74, 0.04)); */
}

/* ---------- Page ---------- */
main { padding-bottom: 24px; }

.pageHero { padding: 56px 0 18px 0; }

.pageHero h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.08;
  margin: 0 0 10px 0;
  color: var(--muted);
  text-decoration: none; 
}

.pageHero p {
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 78ch;
  text-decoration: none; 
}

.sectionTitle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 12px 0;
}

.sectionTitle h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none; 
}

.sectionTitle .hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 60ch;
  line-height: 1.5;
  text-decoration: none; 
}

/* ---------- Cards / Grids ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.card {
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 18, 32, 0.38);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.card h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none; 
}

.card p {
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-decoration: none; 
}

.hoverLift {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.hoverLift:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.label {
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  text-decoration: none; 
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none; 
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.20);
  color: rgba(233, 238, 247, 0.88);
}

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  outline: none;
}

.textarea {
  border-radius: 16px;
  min-height: 120px;
  padding: 12px;
}

/* ---------- Explore Layout ---------- */
.exploreLayout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
  align-items: start;
}

.filterGroup { display: grid; gap: 10px; }
.filterRow { display: grid; gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.20);
  color: rgba(233, 238, 247, 0.88);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  text-decoration: none; 
}

.chip.active {
  border-color: var(--mana);
  box-shadow: 0 0 0 1px rgba(63, 224, 207, 0.10);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(0px);
}

.footGrid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 22px 0;
}

footer h5 {
  margin: 0 0 10px 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none; 
}

footer a {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  opacity: 0.9;
  color: var(--muted);
  text-decoration: none; 
}

footer a:hover {
  opacity: 1;
  text-decoration: none;
}

.legal {
  padding: 12px 0 18px 0;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  text-decoration: none; 
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  header { top: 40px; }
  .nav { flex-wrap: wrap; }
  .brand { min-width: unset; }
  .navTools { min-width: unset; width: 100%; justify-content: space-between; }

  .mega { left: 0; transform: none; }
  .megaGrid { grid-template-columns: 1fr; }

  .grid3 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .footGrid { grid-template-columns: 1fr 1fr; }

  .exploreLayout { grid-template-columns: 1fr; }
}

/* ================================
   Dark Codex — About the Author
   ================================ */

/* ================================
   Dark Codex — About the Author (Revised)
   ================================ */

/* ===== Dark Codex: Author card image layout inside grid2 ===== */

.dc-author-row{
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr; /* restrained image column */
  gap: 18px;
  align-items: start;
  margin: 14px 0 16px;
}

/* Keep image modest */
.dc-author-image{
  width: 100%;
  max-width: auto; /* prevents overpowering */
}

.dc-author-image-frame{
  width: 100%;
  aspect-ratio: 5 / 7;   /* FORCE SQUARE */
  overflow: hidden;
  border-radius: 10px;   /* adjust to match your card style */
  border: 1px solid rgba(255,255,255,.14); /* tune if your cards are light */
  background: rgba(255,255,255,.04);
}

/* Portrait-safe: crops into square */
.dc-author-image-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text beside the image */
.dc-author-intro p{
  line-height: 1.75;
}

/* Full width continuation under the row */
.dc-author-body{
  margin-top: 6px;
}

/* Mobile stacking */
@media (max-width: 900px){
  .dc-author-row{
    grid-template-columns: 1fr;
  }
  .dc-author-image{
    max-width: 220px;
  }
}


/* ===== Fan Kit grid ===== */

.fankitGrid{
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.fankitItem{
  width: 100%;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;

  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);

  cursor: pointer;
  text-align: left;
  color: var(--muted)
}

.fankitItem:hover{
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.05);
}

.fankitThumb{
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.2);
  display: block;
}

.fankitThumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fankitTitle{
  display: block;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 2px;
  color: var(--muted)
}

.fankitDesc{
  display: block;
  opacity: .85;
  line-height: 1.55;
  font-size: 14px;
  color: var(--muted)
}

/* ===== Modal ===== */

.fkModal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.fkModal.isOpen{
  display: block;
}

.fkModalBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.fkModalPanel{
  position: relative;
  max-width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  border-radius: 16px;

  border: 1px solid rgba(255,255,255,.18);
  background: rgba(16,16,22,.96);
  overflow: hidden;

  display: grid;
  grid-template-rows: auto 1fr auto;
}

.fkModalHeader{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.fkModalTitle{
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted)
}

.fkModalClose{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.fkModalClose:hover{
  background: rgba(255,255,255,.10);
}

.fkModalBody{
  padding: 14px 16px;
  display: grid;
  place-items: center;
  overflow: auto;
}

.fkModalBody img{
  max-width: 100%;
  max-height: 72vh;
  height: auto;
  width: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
}

.fkModalFooter{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.10);
}

@media (max-width: 640px){
  .fankitItem{
    grid-template-columns: 56px 1fr;
  }
  .fankitThumb{
    width: 56px;
    height: 56px;
  }
  .fkModalFooter{
    flex-direction: column;
    align-items: stretch;
  }
}

/* Ensure button text inside Fan Kit stays white */
#fankit .btn{
  color: var(--muted);
}

/* ==========================
   Lore Page: Full Map + 2x2 Grid
   ========================== */

.dc-map{
  margin-top: 28px;
}

.dc-map-title{
  margin: 8px 0 6px;
}

.dc-map-sub{
  margin: 0 0 16px;
  max-width: 78ch;
  opacity: .85;
  line-height: 1.7;
}

/* Map panel wrapper */
.dc-map-panel{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  padding: 16px;
}

/* Toggle controls */
.dc-map-controls{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dc-map-actions{
  display: flex;
  gap: 10px;
  margin-left: auto;
}

/* Toggle button style (reuses your aesthetic) */
.dc-toggle{
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.9);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: .02em;
}

.dc-toggle:hover{
  background: rgba(255,255,255,.07);
}

.dc-toggle.isOn{
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.10);
}

.dc-toggle.secondary{
  opacity: .85;
}

/* Map stage: full width, layered images */
.dc-map-stage{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;           /* adjust to your map */
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
}

.dc-layer{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;            /* preserve full map */
  display: block;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.dc-layer.isVisible{
  opacity: 1;
}

.dc-map-foot{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 2x2 grid below map */
.dc-loregrid{
  margin-top: 28px;
}

.grid2x2{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 900px){
  .grid2x2{
    grid-template-columns: 1fr;
  }
  .dc-map-stage{
    aspect-ratio: 4 / 3;
  }
}

/* PDF links row */
.dc-pdfLinks{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.dc-pdfLink{
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.9);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}

.dc-pdfLink:hover{
  background: rgba(255,255,255,.08);
}

.dc-download{
  color: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(255,255,255,.25);
  text-decoration: none;
}

.dc-download:hover{
  color: rgba(255,255,255,.95);
  border-bottom-color: rgba(255,255,255,.55);
}

/* ==========================
   PDF Modal
   ========================== */

.dcPdfModal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.dcPdfModal.isOpen{
  display: block;
}

.dcPdfBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.dcPdfPanel{
  position: relative;
  max-width: min(1100px, calc(100vw - 40px));
  height: calc(100vh - 40px);
  margin: 20px auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(16,16,22,.96);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.dcPdfHeader{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.dcPdfTitle{
  font-weight: 700;
  letter-spacing: .02em;
}

.dcPdfClose{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.dcPdfClose:hover{
  background: rgba(255,255,255,.10);
}

.dcPdfBody{
  padding: 0;
  overflow: hidden;
}

.dcPdfBody iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: rgba(0,0,0,.35);
}

.dcPdfFooter{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.10);
}

@media (max-width: 640px){
  .dcPdfFooter{
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== PDF list (titles + PDF button) ===== */

.dc-pdfList{
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.dc-pdfItem{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
}

.dc-pdfTitle{
  color: rgba(255,255,255,.90);
  line-height: 1.4;
  font-size: 14px;
}

/* Small, consistent PDF button */
.dc-pdfBtn{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dc-pdfBtn:hover{
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.35);
}



