/* SFWeb — site stylesheet.
   Rules for editing are in docs/STYLE.md.

   The colours, fonts, corner radius and logo height below are only the
   fallback. The live values come from /theme.css, which the site generates
   from Staff > Theme and loads after this file. Every rule here reads a custom
   property, never a literal colour, so a theme change reaches every component.

   No web fonts (the CSP declares no font-src), no inline styles (style-src has
   no 'unsafe-inline'), no icon fonts. Icons are inline SVG coloured by
   currentColor. */

:root {
  --bg: #efe9da; --bg-2: #f8f4ea; --bg-3: #e2d8c0; --rule: #cdbf9c;
  --ink: #221d10; --text: #3e3724; --muted: #6c634d; --link: #7a5a14;
  --accent: #c9a45c; --accent-hover: #d6b46e; --on-accent: #1b1609;
  --header: #1a1b13; --header-ink: #f2ecdc; --footer: #1a1b13;
  --good: #2f6b3a; --bad: #9b2d20; --warn: #8a6414;
  --accent-soft: rgba(201, 164, 92, .22);
  --shade: rgba(20, 18, 10, .16);
  --display: Bahnschrift, "DIN Alternate", "Roboto Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 8px;
  --radius-btn: 6px;
  --logo-h: 40px;
  --hero-h: 78vh;
  --wrap: 76rem;
  --discord: #5865f2;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f100c; --bg-2: #181a13; --bg-3: #23261c; --rule: #33372a;
    --ink: #f2ecdc; --text: #cfc8b4; --muted: #928c79; --link: #d8b872;
    --accent: #c9a45c; --accent-hover: #d8b46c; --on-accent: #17140a;
    --header: #0a0b07; --header-ink: #f2ecdc; --footer: #0a0b07;
    --good: #6fbe7c; --bad: #e0705f; --warn: #d9a441;
    --accent-soft: rgba(201, 164, 92, .16);
    --shade: rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

/* Written twice on purpose: a media query and a plain selector cannot share a rule. */
:root[data-theme="dark"] {
  --bg: #0f100c; --bg-2: #181a13; --bg-3: #23261c; --rule: #33372a;
  --ink: #f2ecdc; --text: #cfc8b4; --muted: #928c79; --link: #d8b872;
  --accent: #c9a45c; --accent-hover: #d8b46c; --on-accent: #17140a;
  --header: #0a0b07; --header-ink: #f2ecdc; --footer: #0a0b07;
  --good: #6fbe7c; --bad: #e0705f; --warn: #d9a441;
  --accent-soft: rgba(201, 164, 92, .16);
  --shade: rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.65 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#main-wrap { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--bg); color: var(--ink); padding: .4rem .7rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(1rem, 3vw, 1.5rem); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .6rem; }
h1, h2, .display, .eyebrow, .btn, .nav-main, .brand-name, .aside-title, .tabs, th, legend, .step-n {
  font-family: var(--display);
}
h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 700; letter-spacing: .01em; text-transform: uppercase; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 700; letter-spacing: .01em; margin-top: 2rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; }
h4 { font-size: .98rem; font-weight: 600; }
main > h2:first-child, .panel > h2:first-child { margin-top: 0; }
.display { text-transform: uppercase; letter-spacing: .02em; }

p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
li { margin: .3rem 0; }
strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.6rem 0; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--bg-3); color: var(--ink); padding: .08em .35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--bg-3); border: 1px solid var(--rule); border-radius: var(--radius); padding: .9rem 1rem; overflow-x: auto; }
pre code { background: none; padding: 0; }

.note { color: var(--muted); font-size: .93rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.empty { padding: 2rem 0; color: var(--muted); text-align: center; }

/* ── Announcement strip ───────────────────────────────────────────────────── */

.announce { background: var(--accent); color: var(--on-accent); font-size: .92rem; font-weight: 600; text-align: center; }
.announce .wrap { padding-block: .45rem; }
.announce a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.announce a:hover { text-decoration: underline; }
.announce .ico { width: 16px; height: 16px; fill: currentColor; }
.announce-bad { background: var(--bad); color: #fff; }
.announce-good { background: var(--good); color: #fff; }

/* ── Utility strip ────────────────────────────────────────────────────────── */

.util {
  background: var(--header);
  background: color-mix(in srgb, var(--header) 80%, #000);
  color: var(--header-ink);
  font-size: .84rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.util-bar { display: flex; align-items: center; gap: 1rem; min-height: 2.35rem; }
.util a, .util button { color: inherit; }
.util-status { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; opacity: .85; white-space: nowrap; }
.util-status:hover { opacity: 1; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.is-up .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 30%, transparent); }
.is-down .dot { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 30%, transparent); }
.util-social { display: flex; gap: .15rem; margin-left: .25rem; }
.util-social a { display: inline-flex; padding: .3rem; border-radius: 4px; opacity: .75; }
.util-social a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.util-social .ico { width: 16px; height: 16px; fill: currentColor; }
.util-account { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.util-account form { margin: 0; display: inline; }
.util-link, .util-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .6rem;
  background: none; border: 0; border-radius: 4px;
  font: 600 .84rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer; opacity: .85;
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.util-link:hover, .util-btn:hover, .util-link.is-current { opacity: 1; background: rgba(255, 255, 255, .08); }
.util-link .ico { width: 15px; height: 15px; fill: currentColor; flex: none; }
.util-link-strong { background: var(--accent); color: var(--on-accent) !important; opacity: 1; }
.util-link-strong:hover { background: var(--accent-hover); }

.theme-toggle svg { fill: currentColor; }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme-locked] .theme-toggle { display: none; }

/* ── Main header ──────────────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--header-ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M-3 3L3 -3M0 14L14 0M11 17L17 11' stroke='%23ffffff' stroke-opacity='.035' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 14px 14px,
    var(--header);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
}
.head-bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; flex: none; }
.brand-logo { height: var(--logo-h); width: auto; max-width: 16rem; object-fit: contain; display: block; }
.brand-mark {
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.brand-mark .ico { width: 20px; height: 20px; fill: currentColor; }
.brand-mark-img { height: var(--logo-h); width: auto; display: block; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45)); }
.head-bar .brand-mark-img { margin-block: -.35rem; height: calc(var(--logo-h) * 1.25); }
.brand-name { font-size: 1.2rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }

.nav-main { display: flex; align-items: stretch; gap: .15rem; flex: 1; min-width: 0; align-self: stretch; }
.nav-main a {
  display: flex; align-items: center;
  padding: 0 .85rem;
  color: inherit; opacity: .8;
  font-size: 1rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.nav-main a:hover { opacity: 1; }
.nav-main a[aria-current] { opacity: 1; border-bottom-color: var(--accent); color: var(--accent); }
.nav-cta-mobile { display: none !important; }

.btn-cta { flex: none; }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius-btn);
  color: inherit; padding: .45rem; cursor: pointer;
}
.nav-toggle .ico { width: 22px; height: 22px; fill: currentColor; display: block; }
.nav-toggle .i-close { display: none; }
.site-head.is-open .nav-toggle .i-open { display: none; }
.site-head.is-open .nav-toggle .i-close { display: block; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.15rem;
  border: 1px solid transparent; border-radius: var(--radius-btn);
  font-size: .98rem; font-weight: 700; letter-spacing: .06em; line-height: 1.1;
  text-transform: uppercase; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn .ico, .btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn small { font-family: var(--sans); font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .8; }

.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-dark { background: var(--bg-2); color: var(--ink); border-color: var(--rule); }
.btn-dark:hover { border-color: var(--accent); color: var(--ink); }
.btn-ghost { background: rgba(0, 0, 0, .25); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); color: #fff; }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { filter: brightness(1.1); color: #fff; }
.btn-small { padding: .32rem .7rem; font-size: .8rem; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-accent.btn-lg, .btn-cta { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }

.buttons { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.3rem 0 1.5rem; align-items: center; }
.buttons-tight { margin: .7rem 0; }
.buttons form { margin: 0; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: clamp(26rem, var(--hero-h), 52rem);
  color: #fff;
  background: #000;
  overflow: hidden;
  isolation: isolate;
}
.hero-track { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.hero-static { display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% center; z-index: -2; }
.hero-slide.is-active .hero-bg { animation: hero-drift 14s ease-out both; }
@keyframes hero-drift { from { transform: scale(1.08); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide.is-active { transition: none; }
  .hero-slide.is-active .hero-bg { animation: none; }
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .6) 40%, rgba(0, 0, 0, .12) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 28%);
}
.hero-copy { position: relative; padding-block: 5rem 7rem; }
.hero-copy h1, .hero-copy h2 {
  color: #fff;
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  max-width: 14ch;
  margin: 0 0 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .45);
}
.hero-copy .eyebrow { color: var(--accent); }
.hero-sub { max-width: 38rem; font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: rgba(255, 255, 255, .86); margin-bottom: .5rem; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 5.25rem; display: flex; gap: .5rem; }
.hero-dot {
  width: 2.4rem; height: .3rem; padding: 0; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .35);
}
.hero-dot:hover { background: rgba(255, 255, 255, .7); }
.hero-dot.is-active { background: var(--accent); }

/* ── Quick links ──────────────────────────────────────────────────────────── */

.quick {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem;
  margin-top: -3.5rem;
}
.quick-card {
  display: flex; align-items: center; gap: .85rem;
  padding: 1.1rem 1.15rem;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shade);
  color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.quick-card:hover { border-top-color: var(--accent); transform: translateY(-2px); }
.quick-card strong { display: block; font-family: var(--display); font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; }
.quick-card small { display: block; color: var(--muted); font-size: .85rem; }
.quick-ico { width: 30px; height: 30px; fill: var(--accent); flex: none; }
.quick-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.quick-primary strong, .quick-primary small { color: var(--on-accent); }
.quick-primary .quick-ico { fill: var(--on-accent); }
.quick-primary:hover { background: var(--accent-hover); border-top-color: var(--on-accent); }
.status-line { display: inline-flex !important; align-items: center; gap: .4rem; }
.flash-wrap { padding-top: 1rem; }

/* ── Sections ─────────────────────────────────────────────────────────────── */

.section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-tight { padding-block: 1.25rem 1.75rem; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--rule); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); text-transform: uppercase; }
.section-head .eyebrow { margin-bottom: .3rem; }
.more {
  display: inline-flex; align-items: center; gap: .4rem; flex: none;
  font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem;
  color: var(--ink); text-decoration: none;
}
.more:hover { color: var(--accent); }
.more .ico { width: 16px; height: 16px; fill: currentColor; transition: transform .15s; }
.more:hover .ico { transform: translateX(3px); }

/* ── News cards ───────────────────────────────────────────────────────────── */

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.news-grid .news-card-lead { grid-column: span 2; grid-row: span 2; }
.news-grid-index { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.news-card {
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.news-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 14px 30px var(--shade); }
.news-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-3); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; display: block; transition: transform .4s; }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-body { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.1rem 1.2rem; flex: 1; }
.news-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); }
.news-card-title { font-family: var(--display); font-size: 1.2rem; line-height: 1.2; color: var(--ink); letter-spacing: .01em; }
.news-card-sum { color: var(--muted); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-lead .news-card-img { aspect-ratio: 16 / 8.2; flex: 1; }
.news-card-lead .news-card-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.news-card-lead .news-card-body { flex: 0; }

/* ── About ────────────────────────────────────────────────────────────────── */

.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.about-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-top: 0; padding-top: 0; border-top: 0; }
.about-art { margin: 0; position: relative; }
.about-art img { display: block; width: 100%; border-radius: var(--radius); box-shadow: 0 20px 50px var(--shade); }
.about-art::before {
  content: ""; position: absolute; inset: -12px 12px 12px -12px; z-index: -1;
  border: 2px solid var(--accent); border-radius: var(--radius); opacity: .6;
}

/* ── Game guide tiles ─────────────────────────────────────────────────────── */

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10.5rem, 1fr); gap: .9rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.strip > * { scroll-snap-align: start; }
.grid-portrait { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.char-card, .tile {
  position: relative; display: block;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-3);
  color: #fff; text-decoration: none;
  border: 1px solid var(--rule);
  isolation: isolate;
}
.char-card { aspect-ratio: 290 / 433; }
.tile { aspect-ratio: 16 / 9; }
.char-card img, .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .45s; }
.tile img { object-position: 72% center; }
.char-card::after, .tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .1) 55%, transparent 100%);
  transition: opacity .2s;
}
.char-card:hover img, .tile:hover img { transform: scale(1.06); }
.char-card:hover, .tile:hover { border-color: var(--accent); }
.tile-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: .8rem .9rem; display: block; }
.tile-copy strong { display: block; color: #fff; font-family: var(--display); font-size: 1.1rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; }
.tile-copy small { display: block; color: rgba(255, 255, 255, .75); font-size: .8rem; }
.char-card:hover .tile-copy strong, .tile:hover .tile-copy strong { color: var(--accent); }
.map-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
/* The first map is drawn large only when the count fills the grid exactly
   (5, 9, 13 …); any other count gets an even grid rather than a hole. */
.map-grid .tile:first-child:nth-last-child(4n+1):not(:only-child) { grid-column: span 2; grid-row: span 2; }
.map-grid .tile:first-child:nth-last-child(4n+1):not(:only-child) .tile-copy strong { font-size: 1.5rem; }
.map-grid-all { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.map-grid-all .tile:first-child { grid-column: auto; grid-row: auto; }
.map-grid-all .tile:first-child .tile-copy strong { font-size: 1.1rem; }

.game-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.game-item-art { margin: 0; }
.game-item-art img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--rule); }
.game-item-portrait { grid-template-columns: minmax(12rem, 20rem) minmax(0, 1fr); align-items: start; }
.game-item:not(.game-item-portrait) .game-item-art { display: none; }
.prev-next { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }

/* ── Steps ────────────────────────────────────────────────────────────────── */

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; counter-reset: none; }
.step {
  margin: 0; padding: 1.3rem 1.2rem;
  background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.step-n { display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--accent); opacity: .9; margin-bottom: .5rem; }
.step strong { display: block; font-family: var(--display); font-size: 1.12rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.step p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ── Community band ───────────────────────────────────────────────────────── */

.band { position: relative; isolation: isolate; color: #fff; overflow: hidden; background: #000; }
.band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.band-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .45)); }
.band-copy { padding-block: clamp(3rem, 7vw, 5.5rem); max-width: var(--wrap); }
.band-copy h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 .6rem; }
.band-copy p { max-width: 36rem; color: rgba(255, 255, 255, .85); font-size: 1.08rem; }

/* ── Inner page banner ────────────────────────────────────────────────────── */

.page-banner {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--header);
  color: #fff;
  border-bottom: 1px solid var(--rule);
}
.page-banner-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; z-index: -2; opacity: .55; }
.page-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .45) 60%, rgba(0, 0, 0, .25) 100%);
}
.page-banner-copy { padding-block: clamp(2.4rem, 6vw, 4rem) clamp(2rem, 5vw, 3.2rem); }
.page-banner h1 { color: #fff; margin: 0; max-width: 24ch; }
.page-banner .lead { color: rgba(255, 255, 255, .82); margin: .7rem 0 0; max-width: 44rem; }
.page-banner .eyebrow { color: var(--accent); }

.search-hero {
  display: flex; align-items: center; gap: .5rem;
  max-width: 40rem; margin-top: 1.4rem;
  background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius-btn);
  padding: .3rem .3rem .3rem .8rem;
}
.search-hero .ico { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.search-hero input[type="search"] { border: 0; background: none; padding: .55rem .2rem; flex: 1; min-width: 0; }
.search-hero input:focus { outline: none; }

/* ── Page layout ──────────────────────────────────────────────────────────── */

.page-body { padding-block: 2rem 1rem; }
main.solo, .page-body > main.solo { max-width: 48rem; }
.layout-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.2rem; align-items: start; }
.layout-split-right { grid-template-columns: minmax(0, 1fr) 19rem; }

/* The control panel and staff area keep their older wrapper classes. */
.page { max-width: var(--wrap); margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 1.5rem) 1rem; width: 100%; }
.page main { min-width: 0; }
.page.solo main { max-width: 48rem; margin: 0 auto; }
.page.split { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.page.split-right { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 2rem; align-items: start; }
.page h1 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }

aside { min-width: 0; }
.layout-split aside, .page.split aside, .page.split-right aside { position: sticky; top: 5.5rem; }
.staff-aside { max-height: calc(100vh - 6.5rem); overflow-y: auto; scrollbar-width: thin; }
.aside-box {
  background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.1rem; margin-bottom: 1rem;
}
.aside-box h3, .aside-title { margin: 0 0 .7rem; font-size: .95rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.aside-cta .btn { display: flex; width: 100%; margin-bottom: .55rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin: 0; padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.link-list li:last-child { border-bottom: 0; }
.link-list small { display: block; color: var(--muted); font-size: .8rem; }

.prose { max-width: 48rem; }
.prose h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.prose > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.prose li::marker { color: var(--accent); }
.prose-small { font-size: .93rem; margin-top: .8rem; }
.prose-small ul { padding-left: 1rem; }
.callout {
  margin: 1.2rem 0; padding: .9rem 1.1rem;
  background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p { margin: 0; }
.callout-block { background: var(--bg-2); border: 1px solid var(--rule); border-left: 3px solid var(--warn); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1.5rem; }
.callout-block h2 { margin-top: 0; border: 0; padding: 0; font-size: 1.15rem; }
.body-figure { margin: 1.5rem 0; }
.body-figure img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--rule); }
.body-figure figcaption { color: var(--muted); font-size: .88rem; margin-top: .4rem; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.updated { margin-top: 2rem; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1.4rem; border-bottom: 1px solid var(--rule); }
.tabs a {
  padding: .55rem .9rem; margin-bottom: -1px;
  color: var(--muted); text-decoration: none;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

/* ── Support ──────────────────────────────────────────────────────────────── */

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .8rem; }
.topic {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1.1rem; background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s;
}
.topic:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic strong { font-family: var(--display); font-size: 1.1rem; letter-spacing: .03em; }
.topic span { color: var(--muted); font-size: .9rem; }
.topic small { color: var(--muted); font-size: .8rem; margin-top: auto; padding-top: .4rem; }
.topic-ico { width: 2.4rem; height: 2.4rem; display: grid !important; place-items: center; background: var(--accent-soft); border-radius: var(--radius); margin-bottom: .4rem; }
.topic-ico .ico { width: 20px; height: 20px; fill: var(--accent); }

.article-list { list-style: none; padding: 0; margin: 0 0 1.2rem; border-top: 1px solid var(--rule); }
.article-list li { margin: 0; border-bottom: 1px solid var(--rule); }
.article-list a { display: block; padding: .85rem .3rem; color: var(--text); text-decoration: none; }
.article-list a:hover { background: var(--bg-2); }
.article-list strong { display: block; color: var(--ink); }
.article-list a:hover strong { color: var(--link); }
.article-list span { display: block; color: var(--muted); font-size: .93rem; }
.article-list small { display: inline-block; margin-top: .2rem; color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.feedback { margin: 2rem 0 1rem; padding: 1rem 1.1rem; background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius); }
.feedback-form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; }
.feedback-form span { font-weight: 600; color: var(--ink); margin-right: .4rem; }

.choice-group { border: 0; padding: 0; margin: 0 0 1.1rem; }
.choice-group legend { padding: 0; margin-bottom: .45rem; font-size: .92rem; font-weight: 600; color: var(--ink); font-family: var(--sans); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem; }
.choice {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg);
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: .3rem; accent-color: var(--accent); }
.choice strong { display: block; font-size: .95rem; }
.choice small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.req { color: var(--bad); }
.form-panel { padding: 1.4rem; }

.download-list { display: grid; gap: .8rem; margin-bottom: 2rem; }
.download {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  padding: 1.1rem 1.2rem; background: var(--bg-2); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius);
}
.download-ico { width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--accent-soft); border-radius: var(--radius); }
.download-ico .ico { width: 24px; height: 24px; fill: var(--accent); }
.download h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.download p { margin: 0; }
.hash code { font-size: .78rem; }

.status-card {
  display: flex; gap: 1.2rem; align-items: center;
  padding: 1.4rem; margin-bottom: 1.4rem;
  background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius);
}
.status-card h2 { margin: 0 0 .4rem; font-size: 1.8rem; }
.status-card.is-up { border-left: 4px solid var(--good); }
.status-card.is-down { border-left: 4px solid var(--bad); }
.status-light .dot { width: 1.4rem; height: 1.4rem; }
.status-copy .facts { margin: 0; }

/* ── Sign-in screen ───────────────────────────────────────────────────────── */

.auth-screen { position: relative; isolation: isolate; min-height: 72vh; display: grid; place-items: center; padding: 3rem 1rem; overflow: hidden; background: var(--header); }
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .5; }
.auth-scrim { position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at center, rgba(0, 0, 0, .35), rgba(0, 0, 0, .85)); }
.auth-card {
  width: 100%; max-width: 26rem;
  background: var(--bg-2); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.auth-card h1 { font-size: 1.8rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-foot { margin-top: 3rem; background: var(--footer); color: rgba(255, 255, 255, .7); border-top: 2px solid var(--accent); font-size: .92rem; }
.site-foot a { color: rgba(255, 255, 255, .8); }
.site-foot a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) auto; gap: 2rem; padding-block: 2.5rem 1.5rem; align-items: start; }
.foot-brand .brand { color: #fff; margin-bottom: .6rem; }
.foot-tagline { margin: 0 0 .8rem; }
.foot-social { display: flex; gap: .3rem; }
.foot-social a { display: inline-flex; padding: .45rem; border: 1px solid rgba(255, 255, 255, .15); border-radius: var(--radius-btn); }
.foot-social a:hover { border-color: var(--accent); }
.foot-social .ico { width: 17px; height: 17px; fill: currentColor; }
.foot-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .45rem 1.2rem; }
.foot-links a { text-decoration: none; font-weight: 600; }
.foot-links a:hover { text-decoration: underline; }
.foot-cta { display: flex; flex-direction: column; gap: .6rem; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 1rem 1.6rem; font-size: .82rem; color: rgba(255, 255, 255, .5); }
.foot-legal p { margin: .25rem 0; }

/* ── Panels, stats, facts ─────────────────────────────────────────────────── */

.panel { background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem 1.35rem; margin: 0 0 1.2rem; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.panel-head h1, .panel-head h2, .panel-head h3 { margin: 0; }
.page-head { margin-bottom: 1rem; }
.panel-note { border-left: 3px solid var(--warn); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 0 0 1.2rem; }
.tiles .panel { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .9rem 1.4rem; margin: 0 0 1.2rem; }
.stat dt { color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.stat dd { margin: 0; color: var(--ink); font-family: var(--display); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0 0 1.2rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
dl.facts-stack { grid-template-columns: 1fr; gap: 0; }
dl.facts-stack dt { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-top: .6rem; }
dl.facts-stack dt:first-child { margin-top: 0; }

/* ── Forms ────────────────────────────────────────────────────────────────── */

.field { margin: 0 0 1.05rem; }
.field label, .field .label { display: block; margin-bottom: .3rem; color: var(--ink); font-weight: 600; font-size: .92rem; }
.field .hint { display: block; margin-top: .3rem; color: var(--muted); font-size: .84rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  padding: .58rem .75rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: var(--radius-btn);
  font: 1rem/1.4 var(--sans);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
input:disabled { opacity: .7; }
textarea { min-height: 7rem; resize: vertical; }
input[type="file"] { color: var(--text); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1rem; }
.check { display: flex; align-items: flex-start; gap: .55rem; margin: 0 0 .8rem; }
.check input { margin-top: .3rem; }
.check label { font-weight: 400; color: var(--text); }
fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 1.2rem; min-width: 0; }
legend { padding: 0 .4rem; color: var(--ink); font-weight: 700; font-size: 1rem; letter-spacing: .05em; text-transform: uppercase; }
.form-narrow { max-width: 27rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; }
.form-cell-wide { grid-column: 1 / -1; }
.color-field { display: flex; gap: .5rem; align-items: center; }
.color-field input[type="color"], .colour-row input[type="color"] { width: 2.6rem; height: 2.4rem; padding: .15rem; border: 1px solid var(--rule); border-radius: var(--radius-btn); background: var(--bg); cursor: pointer; flex: none; }
.color-field input[type="text"] { max-width: 8rem; font-family: var(--mono); }
.image-preview { display: block; max-height: 7rem; max-width: 100%; margin-top: .5rem; border-radius: var(--radius-btn); border: 1px solid var(--rule); }
.sticky-save { position: sticky; bottom: 0; z-index: 5; margin: 0 -.5rem; padding: .75rem .5rem; background: var(--bg); border-top: 1px solid var(--rule); }
.settings-group legend { font-size: .95rem; }
.inline-form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.inline-form select { width: auto; padding-block: .3rem; }
.aside-form { margin: .9rem 0 0; padding-top: .9rem; border-top: 1px solid var(--rule); }
.aside-form .field { margin-bottom: .5rem; }
.danger-zone { margin: -.4rem 0 1.2rem; text-align: right; }

/* ── Messages and badges ──────────────────────────────────────────────────── */

.msg { margin: 0 0 1.1rem; padding: .75rem .95rem; border: 1px solid var(--rule); border-left-width: 3px; border-radius: var(--radius-btn); background: var(--bg-2); font-size: .95rem; }
.msg-good { border-left-color: var(--good); }
.msg-bad { border-left-color: var(--bad); }
.msg-note { border-left-color: var(--warn); }

.badge {
  display: inline-block; padding: .1rem .5rem;
  border: 1px solid var(--rule); border-radius: 4px;
  background: var(--bg-3); color: var(--muted);
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.5;
  white-space: nowrap; vertical-align: middle;
}
.badge-on, .badge-open { color: var(--good); border-color: var(--good); }
.badge-waiting { color: var(--warn); border-color: var(--warn); }
.badge-high { color: var(--bad); border-color: var(--bad); }
.badge-staff { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.tone { --tone: var(--muted); color: var(--tone); border-color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }

/* ── Tables ───────────────────────────────────────────────────────────────── */

.scroll { overflow-x: auto; margin: 0 0 1.2rem; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .8rem .6rem 0; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; border-bottom-width: 2px; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:hover { background: var(--bg-3); }
tr.is-selected { background: var(--accent-soft); }
.nowrap { white-space: nowrap; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
a.plain { color: var(--ink); text-decoration: none; }
a.plain:hover { color: var(--link); text-decoration: underline; }
.list-thumb { width: 5rem; height: 2.8rem; object-fit: cover; border-radius: 4px; display: block; }
.role-matrix td:not(:first-child), .role-matrix th:not(:first-child) { text-align: center; }

/* ── Staff and control panel navigation ───────────────────────────────────── */

.sidenav { list-style: none; margin: 0; padding: 0; font-size: .94rem; }
.sidenav li { margin: 0; }
.sidenav a { display: block; padding: .42rem .7rem; border-radius: var(--radius-btn); color: var(--text); text-decoration: none; border-left: 2px solid transparent; }
.sidenav a:hover { background: var(--bg-3); color: var(--ink); }
.sidenav a[aria-current] { background: var(--bg-3); color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.group { margin: 1rem 0 .3rem; padding: 0 .7rem; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.searchbar { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.2rem; }
.searchbar input, .searchbar select { width: auto; flex: 1 1 11rem; min-width: 0; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .8rem; margin: 0 0 1.2rem; }
.hub-card { display: flex; flex-direction: column; gap: .2rem; padding: 1rem; background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.hub-card:hover { border-color: var(--accent); }
.hub-card strong { font-family: var(--display); letter-spacing: .03em; font-size: 1.05rem; }
.hub-card span { color: var(--muted); font-size: .88rem; }
.hub-card small { color: var(--accent); font-weight: 700; font-size: .78rem; margin-top: .3rem; }
.hub-ico { width: 22px; height: 22px; fill: var(--accent); margin-bottom: .3rem; }
.cap-list { columns: 2 16rem; }

details.manage summary { list-style: none; display: inline-flex; }
details.manage summary::-webkit-details-marker { display: none; }
.manage-body { margin-top: .6rem; padding: .8rem; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); min-width: 16rem; }

/* ── Tickets ──────────────────────────────────────────────────────────────── */

.ticket-head h1 { text-transform: none; font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .4rem; }
.ticket-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.thread { margin: 0 0 1.4rem; }
.reply { padding: .9rem 1.1rem; margin: 0 0 .8rem; background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius); }
.reply-staff { border-left: 3px solid var(--accent); }
.reply-internal { border-left: 3px solid var(--warn); background: var(--bg-3); }
.reply-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; margin-bottom: .45rem; font-size: .86rem; color: var(--muted); }
.reply-head .who { color: var(--ink); font-weight: 600; }
.reply-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.canned-pick select { width: auto; max-width: 18rem; padding-block: .35rem; font-size: .9rem; }

/* ── Theme editor ─────────────────────────────────────────────────────────── */

.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .8rem; }
.preset { display: flex; flex-direction: column; gap: .3rem; padding: .9rem; margin: 0; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); }
.preset.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.preset small { color: var(--muted); font-size: .84rem; flex: 1; }
.preset .btn { align-self: flex-start; margin-top: .4rem; }
.preset-swatches { display: flex; height: 1.8rem; border-radius: 4px; overflow: hidden; border: 1px solid var(--rule); }
.preset-swatches i { flex: 1; }
.colour-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.colour-mode { margin: 0; }
.colour-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 6.2rem; gap: .6rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--rule); }
.colour-row:last-child { border-bottom: 0; }
.colour-row label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.colour-row label small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.colour-row input[type="text"] { font-family: var(--mono); font-size: .85rem; padding: .35rem .45rem; }
.theme-sample { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0; padding: 1rem; background: var(--bg); border: 1px dashed var(--rule); border-radius: var(--radius); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .9rem; }
.media-grid-small { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.media-item { margin: 0; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.media-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-3); }
.media-item figcaption { padding: .55rem; display: flex; flex-direction: column; gap: .3rem; }
.media-item form { margin: 0; }
.media-path { font-size: .72rem; display: block; }

/* ── Rank insignia ────────────────────────────────────────────────────────── */

.rank { display: inline-flex; align-items: center; gap: .45rem; }
.rank img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.rank-small img { width: 16px; height: 16px; }

/* ── Pagination ───────────────────────────────────────────────────────────── */

.pager { display: flex; align-items: center; gap: .8rem; margin: 1.6rem 0; }
.pager-at { color: var(--muted); font-size: .9rem; }

/* ── Installer ────────────────────────────────────────────────────────────── */

.setup-steps { display: flex; flex-wrap: wrap; gap: .4rem .5rem; list-style: none; margin: 0 0 1.6rem; padding: 0; font-size: .84rem; }
.setup-steps li { margin: 0; padding: .2rem .7rem; border: 1px solid var(--rule); border-radius: 4px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.setup-steps .step-now { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.setup-steps .step-done { color: var(--ink); border-color: var(--muted); }
.setup-shell { max-width: 46rem; margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 1.5rem) 3rem; }

/* ── Breakpoints ──────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .nav-main a { padding: 0 .55rem; font-size: .92rem; }
  .head-bar { gap: 1rem; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .head-bar { flex-wrap: wrap; gap: .75rem; min-height: 3.75rem; }
  .head-bar > .btn-cta { display: none; }
  .nav-main {
    display: none; order: 3; flex-basis: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding-bottom: .8rem;
  }
  .site-head.is-open .nav-main { display: flex; }
  .nav-main a { padding: .75rem .2rem; border-bottom: 1px solid rgba(255, 255, 255, .08); margin: 0; }
  .nav-main a[aria-current] { border-bottom-color: rgba(255, 255, 255, .08); border-left: 3px solid var(--accent); padding-left: .6rem; }
  .nav-cta-mobile { display: flex !important; margin-top: .8rem; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid .news-card-lead { grid-column: 1 / -1; grid-row: auto; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-split-right, .page.split, .page.split-right { grid-template-columns: minmax(0, 1fr); }
  .layout-split aside, .page.split aside, .page.split-right aside { position: static; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-cta { flex-direction: row; flex-wrap: wrap; }
  .colour-modes { grid-template-columns: minmax(0, 1fr); }
  .game-item-portrait { grid-template-columns: minmax(0, 1fr); }
  .game-item-portrait .game-item-art { max-width: 18rem; }
}

@media (max-width: 640px) {
  .util-status { font-size: 0; gap: 0; }
  .util-social { display: none; }
  .util-link { max-width: 9rem; }
  .brand-name { font-size: 1rem; }
  .hero-copy { padding-block: 3.5rem 6rem; }
  .hero-scrim { background: linear-gradient(0deg, var(--bg) 0%, rgba(0, 0, 0, .55) 35%, rgba(0, 0, 0, .75) 100%); }
  .quick { grid-template-columns: minmax(0, 1fr); margin-top: -2.5rem; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .map-grid { grid-template-columns: minmax(0, 1fr); }
  .map-grid .tile:first-child:nth-last-child(4n+1):not(:only-child) { grid-column: auto; grid-row: auto; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .download { grid-template-columns: minmax(0, 1fr); }
  .download-ico { display: none; }
  dl.facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dl.facts dd { margin-bottom: .6rem; }
  .colour-row { grid-template-columns: auto minmax(0, 1fr); }
  .colour-row input[type="text"] { grid-column: 2; }
  .status-card { flex-direction: column; align-items: flex-start; }
}
