/* Warhammer: The Old World site — shared design system, copied from the Necromunda site's site.css
   (same dark/neon reference-page look reused across this whole painting-guide-site). Keep both files
   in sync manually if a shared layout/typography/table/tooltip fix is needed in both places.

   Each page still keeps a small local <style> block (loaded after this file) for one kind of thing
   this file deliberately does NOT own: army/faction theming — one --accent-rgb override (R,G,B
   triplet) per army page, used here for glow-blob-2, .stat-card-head's gradient, .lore-quote/
   .quote-block's border, and .lore-sidebar's accent bits. Default below is the generic blood-dim red. */

:root {
  /* Warhammer: The Old World retint — swapped from the Necromunda cyberpunk neon-green/black palette
     to a warmer aged-parchment/leather base with antique brass and heraldic crimson accents, to fit a
     fantasy rulebook instead of a hive-city terminal. The --neon/--blood variable *names* are kept as-is
     (still referenced everywhere below and in every page's local <style>) — only their values changed,
     plus every hardcoded rgba(...) that used to reference the old neon-green rgb(200,240,32) was swapped
     to the new brass rgb(201,162,39). */
  --ink: #14100b;
  --ink-mid: #1c1610;
  --ink-light: #251d13;
  --ink-panel: #241c13;
  --neon: #c9a227;
  --neon-dim: #8a7220;
  --neon-glow: rgba(201,162,39,0.14);
  --blood: #9a1f1f;
  --blood-dim: #591212;
  --flesh: #c8906a;
  --silver: #ab9a78;
  --cream: #ecdcb4;
  --text: #bcae8c;
  --text-dim: #8f8163;
  --gold: #d9b23c;
  /* Default house/army accent = heraldic crimson. Army pages override this one variable locally. */
  --accent-rgb: 154,31,31;
}

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

html, body {
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: 'EB Garamond', serif;
  overflow-x: hidden;
}

.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(201,162,39,0.012) 3px, rgba(201,162,39,0.012) 4px);
  pointer-events: none;
}
.bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(201,162,39,0.02) 60px, rgba(201,162,39,0.02) 61px);
  pointer-events: none;
}

.glow-blob { position: fixed; border-radius: 50%; filter: blur(90px); z-index: 0; pointer-events: none; }
.glow-blob-1 { width: 480px; height: 480px; top: -160px; left: -140px; background: rgba(201,162,39,0.06); }
.glow-blob-2 { width: 420px; height: 420px; bottom: -140px; right: -120px; background: rgba(var(--accent-rgb),0.08); }

.page { position: relative; z-index: 1; width: min(980px, 94vw); margin: 0 auto; padding: 48px 0 80px; }

.breadcrumb {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--silver); text-decoration: none; }
.breadcrumb a:hover { color: var(--neon); }
.breadcrumb span { margin: 0 8px; }

header { margin-bottom: 30px; }
.header-eyebrow {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-dim);
  margin-bottom: 10px;
}
h1 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  color: var(--cream);
  letter-spacing: 0.02em;
}
.header-sub {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 680px;
  line-height: 1.5;
}
.header-rule {
  margin-top: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-dim), transparent 70%);
  position: relative;
  max-width: 600px;
}
.rule-pip { position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); }

/* TABS (in-page Rules/Source tabs) */
.tabs { display: flex; gap: 4px; margin: 26px 0 24px; border-bottom: 1px solid rgba(201,162,39,0.08); flex-wrap: wrap; }
.tab-btn {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -1px;
}
.tab-btn:hover { color: var(--neon); background: rgba(201,162,39,0.03); }
.tab-btn.active {
  color: var(--neon);
  background: rgba(37,29,19,0.9);
  border-color: rgba(201,162,39,0.15);
  border-bottom-color: var(--ink);
  text-shadow: 0 0 10px rgba(201,162,39,0.3);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.25s ease forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* SITE-LEVEL NAV (Core Rulebook / Gangs of the Underhive / Start a Game / Trading Post & Equipment) —
   separate from the in-page .tabs above so showTab() doesn't clear its active state */
.site-tabs { display: flex; gap: 4px; margin: 26px 0 0; border-bottom: 1px solid rgba(201,162,39,0.08); flex-wrap: wrap; }
.site-tab-btn {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -1px;
  display: inline-block;
  text-decoration: none;
}
.site-tab-btn:hover { color: var(--neon); background: rgba(201,162,39,0.03); }
.site-tab-btn.active {
  color: var(--neon);
  background: rgba(37,29,19,0.9);
  border-color: rgba(201,162,39,0.15);
  border-bottom-color: var(--ink);
  text-shadow: 0 0 10px rgba(201,162,39,0.3);
}

/* TOC */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.toc a {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 999px;
  padding: 7px 15px;
  background: rgba(201,162,39,0.03);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.toc a:hover { border-color: var(--neon); color: var(--neon); }

.module-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 46px 0 6px;
  scroll-margin-top: 20px;
}
.module-header:first-of-type { margin-top: 0; }
.module-header h2 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--cream);
}
.module-note {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  color: var(--neon-dim);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.module-rule {
  height: 1px;
  background: rgba(201,162,39,0.14);
  margin-bottom: 22px;
}

.chapter-h2 { font-family:'Cinzel',serif; font-size:1.5rem; color:var(--cream); margin:44px 0 4px; letter-spacing:0.03em; }
.chapter-h2:first-of-type { margin-top: 0; }
.chapter-note { font-family: 'Special Elite', monospace; font-size: 0.75rem; color: var(--text-dim); letter-spacing: 0.1em; margin: 0 0 18px; }

/* SECTION (rules-section h2 = pages without a module-header wrapper e.g. trading-post/core-rulebook/
   gang pages; h3 = subsections nested inside a module-header, e.g. unsorted) */
.rules-section {
  background: rgba(37,29,19,0.7);
  border: 1px solid rgba(201,162,39,0.07);
  border-left: 3px solid var(--neon-dim);
  border-radius: 2px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.rules-section h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--cream);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.rules-section h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--cream);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.rules-section .section-note {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201,162,39,0.05);
}
.rules-section p { font-size: 1rem; line-height: 1.6; margin-bottom: 10px; }
.rules-section p:last-child { margin-bottom: 0; }
.rules-section strong { color: var(--cream); }
.rules-section ol, .rules-section ul { padding-left: 22px; margin: 6px 0 12px; }
.rules-section li { font-size: 1rem; line-height: 1.6; margin-bottom: 8px; }
.rules-section li:last-child { margin-bottom: 0; }
.rules-section ul ul, .rules-section ol ul { margin: 6px 0; }

/* LORE (gang-page fluff quotes + collapsible background text) */
.lore-quote {
  font-family: 'Cinzel', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--flesh);
  border-left: 2px solid rgb(var(--accent-rgb));
  padding: 4px 0 4px 18px;
  margin-bottom: 8px;
}
.lore-quote-attrib {
  font-family: 'Special Elite', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding-left: 18px;
  margin-bottom: 22px;
}
details.lore-toggle { margin-bottom: 28px; }
details.lore-toggle summary {
  cursor: pointer;
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--neon-dim);
  padding: 6px 0;
}
details.lore-toggle summary:hover { color: var(--neon); }
.lore-body { font-size: 0.95rem; line-height: 1.65; color: var(--text); padding: 10px 0 4px; }
.lore-body p { margin-bottom: 12px; }

.lore-sidebar {
  background: rgba(var(--accent-rgb),0.05);
  border: 1px solid rgba(var(--accent-rgb),0.2);
  border-radius: 2px;
  padding: 14px 18px;
  margin: 16px 0;
}
.lore-sidebar h4 {
  font-family: 'Special Elite', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--accent-rgb));
  margin-bottom: 8px;
}

/* Alternate quote block used on pages with no single house (unsorted, core-rulebook, index) */
.quote-block {
  font-family: 'Cinzel', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--flesh);
  border-left: 2px solid rgb(var(--accent-rgb));
  padding: 4px 0 4px 16px;
  margin-bottom: 16px;
}
.quote-attrib {
  font-family: 'Special Elite', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding-left: 16px;
  margin-top: -10px;
  margin-bottom: 20px;
}

/* SIMPLE DATA TABLE */
.data-table-wrap { overflow-x: auto; margin: 10px 0 14px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 380px; }
table.data-table th {
  font-family: 'Special Elite', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(201,162,39,0.1);
}
table.data-table td { padding: 7px 10px; border-bottom: 1px solid rgba(201,162,39,0.04); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table td:first-child { color: var(--cream); font-weight: 600; white-space: nowrap; }

/* SKILL ACCESS TABLE */
.skill-table-wrap { overflow-x: auto; }
table.skill-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
table.skill-table th {
  font-family: 'Special Elite', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(201,162,39,0.1);
}
table.skill-table td { padding: 8px 10px; border-bottom: 1px solid rgba(201,162,39,0.04); }
table.skill-table tr:last-child td { border-bottom: none; }
table.skill-table td:first-child { color: var(--cream); font-weight: 600; }
table.skill-table .primary { color: var(--neon); font-weight: 600; }
table.skill-table .secondary { color: var(--silver); }
table.skill-table .dash { color: var(--text-dim); }
.skill-th-btn { background: none; border: none; padding: 0; margin: 0; cursor: pointer; font: inherit; color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.skill-th-btn:hover { color: var(--neon); }

/* SKILL MODAL */
.skill-modal { position: fixed; inset: 0; z-index: 60; background: rgba(4,4,3,0.85); display: none; align-items: flex-start; justify-content: center; padding: 6vh 20px; overflow-y: auto; }
.skill-modal.open { display: flex; }
.skill-modal-box { background: var(--ink-light); border: 1px solid rgba(201,162,39,0.2); border-radius: 4px; width: min(640px, 100%); max-height: 88vh; overflow-y: auto; padding: 26px 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.skill-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.skill-modal-head h3 { font-family: 'Cinzel', serif; font-size: 1.3rem; color: var(--cream); letter-spacing: 0.03em; }
.skill-modal-close { background: none; border: 1px solid rgba(201,162,39,0.3); color: var(--cream); width: 32px; height: 32px; flex: none; border-radius: 6px; cursor: pointer; font-family: 'Special Elite', monospace; font-size: 1rem; }
.skill-modal-close:hover { border-color: var(--neon); color: var(--neon); }
.skill-modal-note { font-family: 'Special Elite', monospace; font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.1em; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(201,162,39,0.08); }
.skill-entry { margin-bottom: 16px; }
.skill-entry:last-child { margin-bottom: 0; }
.skill-entry h4 { font-family: 'Cinzel', serif; font-size: 0.95rem; color: var(--cream); margin-bottom: 2px; }
.skill-entry .tag { font-family: 'Special Elite', monospace; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--neon-dim); display: block; margin-bottom: 6px; }
.skill-entry p { font-size: 0.95rem; line-height: 1.55; color: var(--text); }

/* GENERIC WEAPON/RULES TABLE (trading-post, core-rulebook) */
.tbl-wrap { overflow-x: auto; margin-bottom: 8px; }
table.rtable { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 480px; }
table.rtable th {
  font-family: 'Special Elite', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(201,162,39,0.12);
}
table.rtable td { padding: 8px 10px; border-bottom: 1px solid rgba(201,162,39,0.04); vertical-align: top; font-size: 0.95rem; line-height: 1.5; }
table.rtable tr:last-child td { border-bottom: none; }
table.rtable td:first-child { color: var(--cream); font-weight: 600; white-space: nowrap; }
table.rtable td strong { color: var(--cream); }

/* HOVER/CLICK TOOLTIPS — equipment mentions + weapon Traits column + inline trait mentions in prose */
.eq-link, .eq-mention { cursor: help; border-bottom: 1px dotted var(--neon-dim); }
.eq-link:hover, .eq-link:focus, .eq-mention:hover, .eq-mention:focus { color: var(--neon); border-bottom-color: var(--neon); outline: none; }
.eq-tooltip {
  position: fixed; z-index: 70; max-width: 320px;
  background: var(--ink-light); border: 1px solid rgba(201,162,39,0.25); border-radius: 4px;
  padding: 12px 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  font-size: 0.9rem; line-height: 1.55; color: var(--text);
  display: none;
}
.eq-tooltip.open { display: block; }
.eq-tooltip .eq-tt-name { font-family: 'Cinzel', serif; color: var(--cream); font-size: 1rem; margin-bottom: 6px; display: block; }
.eq-tooltip .eq-tt-stats { font-family: 'Special Elite', monospace; font-size: 0.72rem; color: var(--gold); letter-spacing: 0.03em; margin-bottom: 6px; display: block; }
.eq-tooltip .eq-tt-traits { color: var(--silver); margin-bottom: 6px; display: block; }
.eq-tooltip .eq-tt-cost { font-family: 'Special Elite', monospace; font-size: 0.7rem; color: var(--text-dim); display: block; }

.trait-link { cursor: help; color: var(--flesh); border-bottom: 1px dotted var(--flesh); }
.trait-link:hover, .trait-link:focus { color: var(--neon); border-bottom-color: var(--neon); outline: none; }
.trait-tooltip { z-index: 71; max-width: 280px; }
.trait-tooltip .eq-tt-name { color: var(--flesh); font-size: 0.9rem; }

/* FIGHTER STAT CARDS */
.stat-card {
  background: rgba(37,29,19,0.7);
  border: 1px solid rgba(201,162,39,0.08);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}
.stat-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb),0.32), rgba(37,29,19,0.2));
  border-bottom: 1px solid rgba(201,162,39,0.1);
  padding: 12px 18px;
}
.stat-card-head h3, .stat-card-head h4 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--cream);
  letter-spacing: 0.04em;
}
.stat-cost {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  white-space: nowrap;
}
.stat-table-wrap { overflow-x: auto; padding: 14px 18px 4px; }
table.stat-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 460px; margin-bottom: 10px; }
table.stat-table th {
  font-family: 'Special Elite', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-align: center;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(201,162,39,0.08);
}
table.stat-table td {
  text-align: center;
  padding: 6px 4px;
  color: var(--text);
  font-weight: 600;
}
table.stat-table td.type-cell { color: var(--cream); font-weight: 500; white-space: nowrap; }
.stat-body { padding: 4px 18px 18px; font-size: 0.95rem; line-height: 1.6; }
.stat-body p { margin-bottom: 8px; }
.stat-body p:last-child { margin-bottom: 0; }
.stat-body ul { padding-left: 20px; margin: 6px 0; }
.stat-body li { margin-bottom: 4px; }
.stat-body .rule-name { color: var(--cream); font-weight: 600; }

/* PRICE LIST */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.price-group { margin-bottom: 16px; }
.price-group h4 {
  font-family: 'Special Elite', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(201,162,39,0.08);
}
.price-list { list-style: none; }
.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.95rem;
  padding: 3px 0;
  color: var(--text);
}
.price-list li span:last-child { font-family: 'Special Elite', monospace; color: var(--silver); white-space: nowrap; }
@media (max-width: 700px) { .price-grid { grid-template-columns: 1fr; } }

/* EQUIPMENT REFERENCE TABLE */
.eq-table-wrap { overflow-x: auto; margin-bottom: 18px; }
table.eq-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 620px; }
table.eq-table th {
  font-family: 'Special Elite', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(201,162,39,0.08);
}
table.eq-table td { padding: 7px 8px; border-bottom: 1px solid rgba(201,162,39,0.04); color: var(--text); vertical-align: top; }
table.eq-table td:first-child { color: var(--cream); font-weight: 600; }
table.eq-table tr:last-child td { border-bottom: none; }
.eq-table-caption {
  font-family: 'Special Elite', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--neon-dim);
  text-transform: uppercase;
  margin: 18px 0 8px;
}
.eq-table-caption:first-child { margin-top: 0; }

/* WYRD POWERS grid (Delaque/Enforcer psyker sections) */
.power-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.power-card {
  background: rgba(20,16,11,0.5);
  border: 1px solid rgba(201,162,39,0.06);
  border-radius: 2px;
  padding: 14px 16px;
}
.power-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  color: var(--cream);
  margin-bottom: 6px;
}
.power-card p { font-size: 0.9rem; line-height: 1.55; margin: 0; }
@media (max-width: 700px) { .power-grid { grid-template-columns: 1fr; } }

.footnote {
  font-family: 'Special Elite', monospace;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 20px;
  line-height: 1.6;
}

/* SOURCE TAB (scanned rulebook page gallery) */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumb {
  position: relative; display: block;
  border: 1px solid rgba(201,162,39,0.14);
  border-radius: 6px; overflow: hidden;
  background: var(--ink-light);
  cursor: zoom-in; aspect-ratio: 3 / 4;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.thumb:hover { border-color: var(--neon); }
.thumb:hover img { transform: scale(1.04); }
.thumb .page-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 7px;
  font-family: 'Special Elite', monospace;
  font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--cream);
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
}

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4,4,3,0.92);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(94vw, 1100px); max-height: 88vh; border: 1px solid rgba(201,162,39,0.25); border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: rgba(20,18,16,0.7);
  border: 1px solid rgba(201,162,39,0.3); color: var(--cream);
  font-family: 'Special Elite', monospace; cursor: pointer; border-radius: 6px; z-index: 51;
}
.lb-close { top: 20px; right: 20px; width: 40px; height: 40px; font-size: 1.1rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 46px; height: 64px; font-size: 1.4rem; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--neon); color: var(--neon); }
.lb-caption {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-family: 'Special Elite', monospace; font-size: 0.76rem; letter-spacing: 0.06em;
  color: var(--text); background: rgba(20,18,16,0.7);
  border: 1px solid rgba(201,162,39,0.2); border-radius: 999px; padding: 6px 16px;
}

footer { margin-top: 60px; text-align: center; }
footer p { font-family: 'Special Elite', monospace; font-size: 0.68rem; letter-spacing: 0.2em; color: var(--text-dim); text-transform: uppercase; }
.footer-rule { width: 48px; height: 1px; background: var(--neon-dim); margin: 12px auto; opacity: 0.3; box-shadow: 0 0 8px rgba(201,162,39,0.2); }
