:root {
  color-scheme: dark;
  --bg: #09090d;
  --panel: #17120e;
  --parchment: #2a2118;
  --parchment-hi: #3a2d20;
  --brass: #b88a44;
  --gold: #ffd166;
  --cyan: #35e8df;
  --text: #f1e4c8;
  --muted: #b9a98d;
  --danger: #ff5a5f;
  --edge: #76511f;
  --ink: #050506;
  --font-ui: "Pixelify Sans", monospace;
  --font-title: "Pixelify Sans", monospace;
  --line: 1px solid color-mix(in srgb, var(--brass), transparent 48%);
  --pad: clamp(1rem, 2vw, 1.6rem);
}

@font-face { font-family: "Pixelify Sans"; src: url("assets/ui/PixelifySansV2-Regular.ttf") format("truetype"); font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  font: 500 clamp(16px, .92vw + 12px, 18px) / 1.65 var(--font-ui);
  background:
    radial-gradient(circle at 50% 120%, rgb(255 90 95 / .12), transparent 30rem),
    linear-gradient(180deg, var(--ink) 0%, var(--bg) 42%, #0c0706 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background: linear-gradient(to bottom, rgb(255 255 255 / .12) 1px, transparent 1px);
  background-size: 100% 3px;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 5%, rgb(53 232 223 / .12), transparent 26rem),
    radial-gradient(circle at 92% 7%, rgb(255 209 102 / .09), transparent 24rem);
}
::selection { background: var(--cyan); color: var(--ink); }
img, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor, transparent 45%); text-underline-offset: .18em; }
a:hover { color: var(--cyan); }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.text-accent, h1, h2, h3 { color: var(--gold); }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.12; text-shadow: 0 2px 0 var(--ink); }
h1 { font-size: clamp(2.45rem, 5.5vw, 4.9rem); letter-spacing: .02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.75rem); text-align: center; margin: 0 0 2rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h2::after {
  content: "";
  display: block;
  width: min(9rem, 45%);
  height: 2px;
  margin: .75rem auto 0;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
p { color: var(--muted); }
strong { color: var(--text) !important; }

header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--edge);
  background: rgb(10 9 9 / .94);
  box-shadow: 0 7px 0 rgb(0 0 0 / .22), 0 16px 34px rgb(0 0 0 / .3);
}
header::after { content: ""; position: absolute; inset: auto 0 4px; border-bottom: 1px solid rgb(255 209 102 / .19); }
.nav-container { min-height: 72px; display: flex; align-items: center; gap: 1.2rem; }
.logo img { display: block; width: clamp(130px, 15vw, 186px); filter: drop-shadow(0 3px 0 var(--ink)); }
.nav-links { display: flex; align-items: center; gap: .25rem; padding: 0; margin: 0 0 0 auto; list-style: none; }
.nav-links a {
  display: block;
  padding: .65rem .78rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .04em;
}
.nav-links li:not(.nav-cta) a:hover { color: var(--cyan); background: rgb(53 232 223 / .07); }
.nav-cta .btn { padding: .62rem .82rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .68rem 1.1rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--cyan);
  box-shadow: 0 0 0 1px rgb(53 232 223 / .6), 0 5px 0 rgb(0 0 0 / .45);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
}
.btn:hover { color: var(--ink); background: #7cf6ef; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 1px rgb(53 232 223 / .6), 0 2px 0 rgb(0 0 0 / .45); }
.btn-outline { color: var(--gold); background: rgb(23 18 14 / .88); border-color: var(--brass); box-shadow: 0 0 0 1px rgb(0 0 0 / .7), 0 5px 0 rgb(0 0 0 / .42); }
.btn-outline:hover { color: var(--cyan); border-color: var(--cyan); background: rgb(53 232 223 / .1); }

.hero {
  position: relative;
  min-height: min(820px, calc(100svh - 72px));
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--edge);
  text-align: center;
}
.hero::before { content: ""; position: absolute; inset: .55rem; z-index: 1; border: 1px solid rgb(255 209 102 / .18); pointer-events: none; }
.hero-bg, .hero-overlay { position: absolute; inset: 0; }
.hero-bg { z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.66) contrast(1.08) brightness(.65); }
.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(5 5 6 / .72), transparent 48%, rgb(5 5 6 / .58)),
    linear-gradient(180deg, rgb(5 5 6 / .22), rgb(5 5 6 / .18) 44%, var(--bg));
}
.hero-content { max-width: 820px; padding: 7rem 1.4rem 5rem; }
.hero-logo { width: min(720px, 96%); margin: 0 auto 1.5rem; filter: drop-shadow(0 3px 0 var(--ink)) drop-shadow(0 0 26px rgb(255 209 102 / .16)); }
.hero-tagline { max-width: 600px; margin: 0 auto 2rem; color: var(--text); font-size: clamp(1.1rem, 2vw, 1.45rem); text-shadow: 0 2px 0 var(--ink); }
.hero-tagline::before { content: "◆"; margin-right: .55rem; color: var(--gold); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }
.scroll-indicator { position: absolute; bottom: 1.25rem; left: 50%; display: grid; gap: .25rem; color: var(--gold); font-size: .8rem; letter-spacing: .12em; transform: translateX(-50%); text-transform: uppercase; }
.scroll-indicator svg { width: 20px; margin: auto; }

section { position: relative; padding: clamp(3.5rem, 7vw, 6rem) 0; }
section:nth-of-type(even):not(.hero) { background: rgb(0 0 0 / .13); border-block: 1px solid rgb(184 138 68 / .18); }
.video-container {
  position: relative;
  padding: .5rem !important;
  border: 2px solid var(--edge) !important;
  background: var(--ink) !important;
  box-shadow: 0 14px 34px rgb(0 0 0 / .42);
}
.video-container::after, .glass-card::after, .character-card::after, .lore-image::after {
  content: "";
  position: absolute;
  inset: .45rem;
  pointer-events: none;
  border: 1px solid rgb(255 209 102 / .14);
}
.video-container iframe { width: 100%; min-height: min(56vw, 600px); border: 0; }
.video-deferred { position: relative; display: grid; place-items: center; min-height: 220px; overflow: hidden; color: var(--gold); text-decoration: none; }
.video-deferred img { width: 100%; min-height: 220px; object-fit: cover; filter: brightness(.58); }
.video-deferred span { position: absolute; padding: .5rem .75rem; border: 1px solid var(--brass); background: rgb(5 5 6 / .85); }

.glass-card, .character-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .045), transparent 5rem),
    linear-gradient(145deg, var(--parchment-hi), var(--panel));
  border: 2px solid var(--edge);
  box-shadow: 0 12px 28px rgb(0 0 0 / .33);
}
.glass-card { padding: clamp(1.35rem, 3vw, 2.4rem) !important; }
.glass-card:hover, .character-card:hover { border-color: var(--cyan); }
.systems-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1rem !important; margin-top: 1rem !important; }
.systems-grid .glass-card { min-height: 100%; }
.systems-grid h3, .glass-card h3 { padding-bottom: .65rem !important; border-bottom: 1px solid rgb(184 138 68 / .4) !important; }
.glass-card ul { color: var(--muted) !important; }
.glass-card li::marker { color: var(--gold); }

.lore-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.25rem, 4vw, 3rem); align-items: center; }
.lore-image { position: relative; overflow: hidden; border: 2px solid var(--edge); background: var(--ink); box-shadow: 0 12px 28px rgb(0 0 0 / .35); }
.lore-image img { width: 100%; }
.characters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1rem; margin-top: 1rem; }
.character-card { min-height: 100%; padding: 1.35rem !important; }
.character-name { display: flex; align-items: center; gap: .75rem; margin-top: 0; color: var(--gold); }
.character-icon-img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 0 var(--ink)); }
.portrait-img { width: 80px; height: 80px; object-fit: cover; border: 1px solid var(--brass); background: var(--ink); image-rendering: pixelated; }
.character-desc { color: var(--muted); }

.dragon-showcase { position: relative; overflow: hidden; padding: clamp(1rem, 4vw, 3rem); border: 2px solid var(--edge); background: linear-gradient(180deg, rgb(255 255 255 / .03), transparent), var(--panel); text-align: center; }
.dragon-showcase::after { content: ""; position: absolute; inset: .45rem; border: 1px solid rgb(255 209 102 / .14); pointer-events: none; }
.dragon-img { position: relative; z-index: 1; width: min(900px, 100%); margin: auto; filter: drop-shadow(0 20px 32px rgb(0 0 0 / .7)); }
.dragon-glow { position: absolute; inset: 20% 15%; background: radial-gradient(ellipse, rgb(255 90 95 / .22), transparent 66%); pointer-events: none; }

footer { position: relative; padding: 4rem 0 2rem; border-top: 2px solid var(--edge); background: var(--ink); text-align: center; }
footer::before { content: ""; position: absolute; inset: .5rem .5rem auto; border-top: 1px solid rgb(255 209 102 / .2); }
.footer-content { display: grid; justify-items: center; gap: 1.5rem; }
.footer-logo { width: min(230px, 70vw); filter: drop-shadow(0 3px 0 var(--ink)); }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.social-icon { display: inline-grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--brass); background: var(--panel); color: var(--gold); }
.social-icon:hover { color: var(--cyan); border-color: var(--cyan); background: rgb(53 232 223 / .08); }
.social-icon svg { width: 21px; height: 21px; fill: currentColor; }
.copyright { color: var(--muted); font-size: .9rem; }

.reveal { opacity: 1; filter: none; transform: none; }
.modal { position: fixed; inset: 0; z-index: 999; display: none; place-items: center; padding: 2rem; background: rgb(5 5 6 / .94); }
.modal-content { max-width: min(1100px, 92vw); max-height: 86vh; border: 2px solid var(--edge); box-shadow: 0 22px 60px rgb(0 0 0 / .65); }
.modal-close { position: fixed; top: 1rem; right: 1.2rem; color: var(--gold); font-size: 2.2rem; cursor: pointer; }

@media (max-width: 900px) {
  .nav-links { gap: 0; }
  .nav-links li:not(.nav-cta) { display: none; }
  .systems-grid, .lore-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
  .nav-container { min-height: 62px; }
  .logo img { width: 126px; }
  .nav-cta .btn { min-height: 38px; padding: .48rem .58rem; font-size: .72rem; }
  .hero { min-height: 640px; }
  .hero-cta { display: grid; grid-template-columns: 1fr; width: min(290px, 100%); margin: auto; }
  .hero-cta .btn { width: 100%; }
  .video-container iframe { min-height: 52vw; }
  section { padding: 3.5rem 0; }
  .glass-card { padding: 1.1rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Tumblr devblog composition: one compact HUD page above the game map. */
body {
  background:
    linear-gradient(rgb(5 5 6 / .88), rgb(5 5 6 / .9)),
    url("assets/screenshots/Main.png") center top / cover fixed,
    var(--ink);
}
body::before { opacity: .28; }
body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 12% 95%, rgb(53 232 223 / .10), transparent 21rem),
    radial-gradient(circle at 88% 7%, rgb(255 209 102 / .08), transparent 20rem);
}
.container { width: min(700px, calc(100% - 2rem)); }
header {
  position: relative;
  width: min(700px, calc(100% - 2rem));
  margin: 0 auto;
  border-inline: 1px solid rgb(184 138 68 / .35);
  box-shadow: none;
}
header::after { inset: auto .45rem 4px; }
.nav-container { min-height: 66px; }
.logo img { width: 174px; }
.nav-links a { padding: .5rem .62rem; font-size: .8rem; }
.nav-cta { margin-left: .45rem; }
.nav-cta .btn { min-height: 36px; padding: .42rem .65rem; font-size: .72rem; }

.hero {
  width: min(1080px, calc(100% - 2rem));
  min-height: 360px;
  margin: .5rem auto 0;
  border: 2px solid var(--edge);
  background: radial-gradient(circle at 0 0, rgb(184 138 68 / .16), transparent 22rem), radial-gradient(circle at 100% 0, rgb(53 232 223 / .13), transparent 24rem), linear-gradient(120deg, rgb(28 20 12 / .95), rgb(15 19 17 / .94));
  display: block;
}
.hero::before { inset: .38rem; }
.hero-bg, .hero-overlay { display: none; }
.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 1.5rem;
  max-width: none;
  padding: 1.5rem 2rem;
  text-align: left;
}
.hero-copy { min-width: 0; }
.hud-label {
  margin: 0 0 .45rem;
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.hud-label::before { content: "◆"; color: var(--gold); margin-right: .42rem; }
.hero-logo { width: min(600px, 100%); margin: -2.6rem 0 -2rem; filter: drop-shadow(0 3px 0 var(--ink)); }
.hero-tagline { margin: 0 0 1.1rem; max-width: 560px; color: var(--text); font-size: 1.12rem; text-shadow: none; }
.hero-tagline::before { content: none; }
.hero-cta { justify-content: flex-start; gap: .65rem; }
.hero-cta .btn { min-height: 30px; padding: .36rem .55rem; font-size: .72rem; }
.hero-cta .btn-primary { color: var(--gold); background: rgb(18 13 9 / .92); border: 1px solid var(--brass); box-shadow: none; }
.hero-cta .btn-primary:hover { color: var(--cyan); border-color: var(--cyan); background: rgb(53 232 223 / .08); }
.hero-cta .steam-mark { width: 14px; height: 14px; image-rendering: pixelated; }
.hero-status { display: grid; gap: .65rem; align-self: end; }
.hud-box { padding: .8rem; border: 1px solid #785521; background: rgb(8 7 6 / .8); }
.hud-box-title { display: flex; justify-content: space-between; gap: .25rem; margin-bottom: .55rem; color: var(--gold); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hud-box-title span:last-child { color: var(--muted); text-align: right; }
.hud-track { display: block; width: 100%; height: 10px; margin-top: 6px; padding: 1px; background: rgb(4 4 4 / .85); border: 1px solid rgb(184 138 68 / .24); }
.hud-meter, .status-meter { display: block; height: 100%; margin: 0; background-color: var(--cyan); }
.hud-meter.health, .status-meter.health { width: 80%; background-color: #9f3638; }
.hud-meter.shield, .status-meter.shield { width: 68%; background-color: #5caee6; }
.hud-meter.energy, .status-meter.energy { width: 52%; background-color: #d7b44f; }
.hud-links { display: grid; grid-template-columns: 1fr; gap: .45rem; }
.hud-links a { padding: .45rem .55rem; border: 1px solid rgb(184 138 68 / .6); color: var(--cyan); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }
.hud-links a:hover { border-color: var(--cyan); background: rgb(53 232 223 / .08); }
.scroll-indicator { display: none; }

section { padding: 1rem 0 1.8rem; }
section:nth-of-type(even):not(.hero) { background: transparent; border: 0; }
section > .container { position: relative; }
#gameplay .container::before, #world .container::before, #wardens .container::before, #dark-forces .container::before, #dragon .container::before {
  content: "";
  position: absolute;
  inset: -.18rem;
  z-index: -1;
  border: 1px solid rgb(184 138 68 / .44);
  background: rgb(18 13 9 / .92);
  box-shadow: 0 14px 34px rgb(0 0 0 / .32);
}
h2, .section-title { margin: 0; padding: .7rem .85rem; border-bottom: 1px solid rgb(184 138 68 / .5); color: var(--gold); font: 700 .78rem/1 var(--font-ui); letter-spacing: .1em; text-align: left; text-transform: uppercase; }
h2::after { display: none; }
.video-container { margin: .85rem !important; }
.video-container iframe { min-height: min(50vw, 390px); }
.glass-card { margin: .85rem; padding: 1rem !important; border-width: 1px; box-shadow: none; }
.systems-grid { grid-template-columns: 1fr !important; gap: 0 !important; margin: 0 !important; }
.systems-grid .glass-card { margin-top: 0; }
.lore-grid { grid-template-columns: 1fr; gap: .85rem; }
.characters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .85rem; }
.character-card { padding: .9rem !important; border-width: 1px; box-shadow: none; }
.character-name { font-size: .95rem; }
.character-desc { font-size: .82rem; }
.dragon-showcase { margin: .85rem; padding: 1rem; border-width: 1px; box-shadow: none; }
header { width: min(1080px, calc(100% - 2rem)); }
header .container, .hero-content { width: 100%; }
header nav { margin-left: auto; }
header { min-height: 92px; background: transparent; }
header { border: 0; box-shadow: none; }
header::after { display: none; }
.nav-container { min-height: 92px; padding-inline: .45rem; }
.site-identity { display: flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; }
.site-sigil { width: 46px; height: 46px; padding: 3px; border: 1px solid var(--brass); background: var(--ink); image-rendering: pixelated; object-fit: contain; }
.site-identity span { display: grid; gap: .08rem; }
.site-identity b { color: var(--text); font: 700 1.25rem/1 var(--font-title); letter-spacing: .035em; text-transform: uppercase; }
.site-identity small { color: var(--muted); font: 700 .66rem/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; }
.nav-links { gap: .5rem; }
.nav-links a { border: 1px solid var(--brass); background: rgb(18 13 9 / .74); color: var(--gold); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-links li:not(.nav-cta) a:hover { color: var(--cyan); border-color: var(--cyan); background: rgb(53 232 223 / .08); }
footer { width: min(1080px, calc(100% - 2rem)); margin: .6rem auto 0; padding: 1rem .85rem; border: 1px solid rgb(184 138 68 / .4); }
.footer-content { gap: .65rem; }
.footer-logo { width: min(180px, 58vw); }
.social-links { gap: .45rem; }
.social-icon { width: 36px; height: 36px; }
.copyright { margin: 0; font-size: .72rem; }

.site-shell {
  display: grid;
  grid-template-areas: "main rail";
  grid-template-columns: minmax(0, 740px) 320px;
  gap: 1rem;
  width: min(1080px, calc(100% - 2rem));
  margin: 1rem auto 0;
  align-items: start;
}
.site-main { grid-area: main; min-width: 0; }
.site-main > section:first-child { padding-top: 3px; }
.site-main .container { width: 100%; }
.right-rail { grid-area: rail; display: grid; gap: 1rem; align-self: start; }
aside.right-rail > section.rail-panel { margin: 0; padding: .7rem; border: 1px solid rgb(184 138 68 / .55); background: rgb(18 13 9 / .94); box-shadow: 0 10px 22px rgb(0 0 0 / .28); }
aside.right-rail > section.status-panel { border: 1px solid rgb(184 138 68 / .7); background: rgb(18 13 9 / .96); }
.rail-panel h2 { padding: .5rem .35rem .75rem; font-size: .9rem; }
.rail-links { display: grid; gap: .35rem; }
.rail-links a { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: .5rem .7rem; border: 1px solid rgb(184 138 68 / .35); color: var(--text); background: rgb(5 5 6 / .56); font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.rail-links a span { color: var(--gold); font-size: 1rem; }
.rail-links a:hover { border-color: var(--cyan); color: var(--cyan); background: rgb(53 232 223 / .08); }
.codex-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; padding: .35rem; }
.codex-search input, .codex-search button { min-width: 0; border: 1px solid var(--brass); background: var(--ink); color: var(--text); font: 700 .78rem var(--font-ui); }
.codex-search input { padding: .55rem .6rem; }
.codex-search button { padding: .55rem .65rem; color: var(--gold); cursor: pointer; text-transform: uppercase; }
.codex-search button:hover { border-color: var(--cyan); color: var(--cyan); }
.search-result { min-height: 1.1em; margin: .15rem .35rem .3rem; color: var(--muted); font-size: .66rem; }
.status-panel { display: grid; gap: .6rem; }
.status-line { display: grid; grid-template-columns: 1fr auto; gap: .3rem; color: var(--muted); font-size: .69rem; letter-spacing: .07em; text-transform: uppercase; }
.status-line b { color: var(--text); font-weight: 700; text-align: right; }
.status-track { grid-column: 1 / -1; display: block; height: 10px; padding: 1px; background: rgb(4 4 4 / .85); border: 1px solid rgb(184 138 68 / .24); }
.status-meter { margin: 0; }
.status-meter.health { width: 82%; background-color: #a33b41; }
.status-meter.shield { width: 74%; background-color: #5caee6; }
.status-meter.energy { width: 52%; background-color: #d7b44f; }
@media (min-width: 931px) {
  .hero { width: min(1079px, calc(100% - 2rem)); transform: translateX(-5px); }
  .right-rail { position: sticky; top: 12px; max-height: calc(100svh - 24px); overflow-y: auto; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 930px) {
  .site-shell { grid-template-areas: "rail" "main"; grid-template-columns: 1fr; width: min(760px, calc(100% - 2rem)); }
  .right-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .right-rail .rail-panel:last-child { grid-column: span 2; }
}
@media (max-width: 560px) {
  header, .hero, footer { width: calc(100% - 1rem); }
  .container { width: calc(100% - 1rem); }
  .site-shell { width: calc(100% - 1rem); }
  .logo img { width: 138px; }
  .hero-content { grid-template-columns: 1fr; padding: 1.15rem .9rem; }
  .hero-status { grid-template-columns: 1fr 1fr; }
  .characters-grid { grid-template-columns: 1fr; }
  .right-rail { grid-template-columns: 1fr; }
  .right-rail .rail-panel:last-child { grid-column: auto; }
}

/* Companion site: game materials, no browser-side secrets. */
@media (pointer: fine) { body, .hero { cursor: url("assets/pointer.png") 0 0, default; } a, button, input { cursor: auto; } }
.hero-fog { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle 13rem at var(--fog-x, 52%) var(--fog-y, 48%), transparent 0 36%, rgb(7 9 12 / .28) 53%, rgb(5 6 8 / .84) 100%); transition: background 120ms linear; }
.hero-content, .scroll-indicator { position: relative; z-index: 2; }
.audio-panel { display: grid; gap: .55rem; }
.audio-panel button, .map-controls button { min-height: 36px; border: 1px solid var(--brass); color: var(--gold); background: var(--ink); font: 700 .72rem var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.audio-panel label { color: var(--muted); font-size: .75rem; }
.audio-panel input { accent-color: var(--cyan); }
.companion-section { padding: 1rem 0 1.8rem; }
.companion-wrap { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem; border: 1px solid rgb(184 138 68 / .55); background: rgb(18 13 9 / .94); }
.companion-wrap > h2 { margin: -.15rem -.15rem .8rem; }
.map-controls { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0; }
.map-controls button { padding: .45rem .65rem; }
.map-frame { position: relative; min-height: 260px; height: min(580px, 70vw); border: 1px solid var(--edge); background: #000; overflow: hidden; }
#wen-map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; image-rendering: pixelated; background: #000; }
.map-status { position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; margin: 0; padding: .4rem; color: var(--muted); background: #000; font-size: .8rem; pointer-events: none; }
.source-note { margin: .65rem 0 0; color: var(--muted); font-size: .8rem; }
.ledger-shell { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 1rem; }
.ledger-portrait { width: 88px; border: 1px solid var(--brass); image-rendering: pixelated; }
.ledger-entries, .forge-entries { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); margin: 0; border-top: 1px solid rgb(184 138 68 / .4); }
.ledger-entries dt, .ledger-entries dd, .forge-entries dt, .forge-entries dd { margin: 0; padding: .45rem .25rem; border-bottom: 1px solid rgb(184 138 68 / .22); }
.ledger-entries dt, .forge-entries dt { color: var(--muted); }
.ledger-entries dd, .forge-entries dd { color: var(--text); text-align: right; }
.forge-board { border-color: var(--brass); background: linear-gradient(90deg, rgb(78 31 12 / .28), transparent 40%), rgb(10 8 6 / .96); }
.dispatch-list, .patchnotes, .review-letters { display: grid; gap: .7rem; }
.dispatch, .letter, .patchnotes article { padding: .85rem; border: 1px solid rgb(184 138 68 / .4); background: rgb(5 5 6 / .5); }
.dispatch h3, .patchnotes h3 { margin: 0 0 .35rem; font-size: 1rem; }
.dispatch time { color: var(--muted); font-size: .78rem; }
.letter { min-height: 130px; color: var(--text); font-family: var(--font-title); }
.letter p { color: var(--text); }
.letter footer { width: auto; margin: .5rem 0 0; padding: 0; border: 0; background: transparent; color: var(--muted); font: .75rem var(--font-ui); text-align: left; }
.comparison { position: relative; isolation: isolate; max-width: 900px; margin: .8rem auto 0; overflow: hidden; border: 1px solid var(--brass); background: var(--ink); }
.comparison > img, .comparison-before img { display: block; width: 100%; }
.comparison-before { position: absolute; inset: 0 auto 0 0; z-index: 1; width: 50%; overflow: hidden; border-right: 2px solid var(--cyan); }
.comparison-before img { width: var(--comparison-width); max-width: none; }
.comparison input { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.comparison-label { position: absolute; top: .6rem; z-index: 2; padding: .25rem .4rem; color: var(--gold); background: rgb(5 5 6 / .8); font-size: .72rem; }
.before-label { left: .6rem; }.after-label { right: .6rem; }
.not-found { display: grid; min-height: 100vh; place-items: center; padding: 1rem; }
.not-found-card { width: min(520px, 100%); padding: 1.5rem; border: 1px solid var(--brass); background: var(--panel); text-align: center; }
.not-found-card img { width: 96px; margin: auto; image-rendering: pixelated; }.not-found-card nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
@media (prefers-reduced-motion: reduce), (pointer: coarse) { .hero-fog { background: radial-gradient(circle 18rem at 50% 48%, transparent 0 34%, rgb(11 15 17 / .38) 56%, rgb(5 6 8 / .78) 100%); } #wen-map { transition: none; } }
@media (max-width: 560px) { .companion-wrap { width: calc(100% - 1rem); }.ledger-shell { grid-template-columns: 1fr; }.ledger-portrait { width: 64px; } }
