/* The Abbedorp Almanac — the player-facing game wiki.
   Its own surface: night-teal ground, rice-paper panels, vermilion and gold.
   The game client's stylesheet is deliberately not loaded here, so the almanac
   stays readable as a standalone document. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("/static/PixelifySans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/static/PixelifySans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/static/PixelifySans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("/static/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("/static/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --font-display: "Pixelify Sans", "Trebuchet MS", sans-serif;
  --font-pixel: "Silkscreen", "Courier New", monospace;
  --font-body: "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "Courier New", monospace;

  --night: #0c1415;
  --night-soft: #111d1e;
  --night-panel: #162423;
  --ink: #262019;
  --ink-soft: #534737;
  --paper: #f2e3c2;
  --paper-light: #fbf2d9;
  --paper-deep: #ddc691;
  --cream: #f7ecd3;
  --cream-soft: #d9c9aa;
  --muted: #9f927a;
  --teal: #2f7a73;
  --teal-dark: #164246;
  --vermilion: #d05a3d;
  --vermilion-dark: #8e2b20;
  --gold: #e8b94f;
  --gold-dark: #a97b24;
  --moss: #8a9a5b;
  --line: rgba(232, 185, 79, .22);
  --line-soft: rgba(242, 227, 194, .12);
  --panel: rgba(24, 38, 37, .82);
  --panel-light: rgba(242, 227, 194, .055);
  --shadow: 0 18px 48px rgba(0, 0, 0, .38);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body.wiki-page {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(1100px 620px at 76% -10%, rgba(47, 122, 115, .3), transparent 62%),
    radial-gradient(900px 580px at 6% 8%, rgba(208, 90, 61, .12), transparent 60%),
    linear-gradient(180deg, #0d1718 0%, #0b1314 46%, #080f10 100%);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(232, 185, 79, .28); color: #fff8e8; }

a { color: var(--gold); text-decoration-color: rgba(232, 185, 79, .42); text-underline-offset: 3px; }
a:hover { color: #ffe19a; }

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 16px;
  color: var(--night);
  background: var(--gold);
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
  border-radius: 6px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- atmosphere */

.wiki-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.wiki-stars {
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(247, 236, 211, .85) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 32% 9%, rgba(247, 236, 211, .55) 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 22%, rgba(247, 236, 211, .7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 7%, rgba(247, 236, 211, .5) 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 25%, rgba(247, 236, 211, .8) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 12%, rgba(247, 236, 211, .45) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 33%, rgba(247, 236, 211, .4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 38%, rgba(247, 236, 211, .32) 50%, transparent 51%);
}

.wiki-ridge {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 0;
  height: 42vh;
  min-height: 320px;
}
.wiki-ridge-far {
  background: linear-gradient(180deg, rgba(24, 48, 46, .5), rgba(10, 18, 19, .9));
  clip-path: polygon(0 100%, 0 62%, 6% 55%, 12% 63%, 19% 48%, 26% 58%, 33% 44%, 41% 57%, 48% 40%, 56% 55%, 63% 46%, 71% 60%, 78% 48%, 86% 58%, 93% 50%, 100% 60%, 100% 100%);
  opacity: .55;
}
.wiki-ridge-near {
  height: 28vh;
  min-height: 220px;
  background: linear-gradient(180deg, rgba(18, 38, 36, .75), rgba(7, 13, 14, .96));
  clip-path: polygon(0 100%, 0 74%, 8% 66%, 15% 76%, 23% 58%, 31% 72%, 39% 60%, 47% 74%, 55% 63%, 64% 76%, 72% 62%, 81% 74%, 89% 66%, 96% 75%, 100% 70%, 100% 100%);
}

/* ---------------------------------------------------------------- top bar */

.wiki-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px clamp(16px, 3vw, 34px);
  background: rgba(9, 16, 17, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.15);
  transition: box-shadow .18s ease, background .18s ease;
}
.wiki-top.is-stuck {
  background: rgba(8, 14, 15, .94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .36);
}

.wiki-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  color: var(--cream);
  text-decoration: none;
}
.wiki-brand:hover { color: #fff6df; }

.wiki-crest {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(160deg, #1f4a46, #12302f);
  border: 2px solid var(--gold-dark);
  box-shadow: inset 0 0 0 2px rgba(232, 185, 79, .18), 0 3px 0 rgba(0, 0, 0, .3);
  transform: rotate(45deg);
}
.wiki-crest > span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(232, 185, 79, .14);
}

.wiki-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.wiki-brand-kicker {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--vermilion);
}
.wiki-brand-text strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .01em;
}

.wiki-search-wrap {
  position: relative;
  flex: 1 1 320px;
  max-width: 520px;
  margin-left: auto;
}
.wiki-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: rgba(242, 227, 194, .06);
  border: 1px solid rgba(232, 185, 79, .3);
  border-radius: 999px;
  transition: border-color .16s ease, background .16s ease;
}
.wiki-search:focus-within {
  border-color: var(--gold);
  background: rgba(242, 227, 194, .1);
}
.wiki-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  color: var(--cream);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font-body);
  font-size: 14px;
}
.wiki-search input::placeholder { color: #8d8069; }
.wiki-search-key {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #a2947a;
  font-family: var(--font-pixel);
  font-size: 10px;
  border: 1px solid rgba(242, 227, 194, .22);
  border-radius: 5px;
}

.wiki-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: min(62vh, 460px);
  overflow-y: auto;
  padding: 6px;
  background: #14211f;
  border: 1px solid rgba(232, 185, 79, .32);
  border-radius: 12px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .55);
}
.wiki-results a {
  display: block;
  padding: 9px 11px;
  color: var(--cream-soft);
  text-decoration: none;
  border-radius: 8px;
}
.wiki-results a .result-title {
  display: block;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.25;
}
.wiki-results a .result-context {
  display: block;
  margin-top: 2px;
  color: #9c8f76;
  font-size: 12px;
}
.wiki-results a:hover,
.wiki-results a.is-active {
  background: rgba(232, 185, 79, .12);
  color: var(--cream);
}
.wiki-results .result-empty {
  padding: 14px 12px;
  color: #a2947a;
  font-size: 13px;
}

.wiki-top-actions { display: flex; gap: 10px; flex: 0 0 auto; }

.wiki-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
}
.wiki-button:hover { transform: translateY(-1px); }
.wiki-button-ghost {
  color: var(--cream-soft);
  border-color: rgba(232, 185, 79, .3);
  background: rgba(242, 227, 194, .04);
}
.wiki-button-ghost:hover { color: var(--cream); border-color: var(--gold); }
.wiki-button-primary {
  color: #21170c;
  background: linear-gradient(180deg, #f0c765, #d39c32);
  box-shadow: 0 3px 0 #8a6118;
}
.wiki-button-primary:hover { color: #1a1208; background: linear-gradient(180deg, #f7d47c, #dda83d); }

/* ---------------------------------------------------------------- layout */

.wiki-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 62px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px clamp(18px, 3vw, 34px) 90px;
}

.wiki-nav {
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  padding: 4px 16px 20px 0;
  border-right: 1px solid var(--line-soft);
  scrollbar-width: thin;
}
.wiki-nav-title {
  margin: 0 0 16px;
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--vermilion);
}
.wiki-nav-group { margin-bottom: 20px; }
.wiki-nav-label {
  margin: 0 0 7px;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8b7f68;
}
.wiki-nav a {
  position: relative;
  display: block;
  padding: 5px 8px 5px 11px;
  color: #bfb197;
  font-size: 13.5px;
  line-height: 1.35;
  text-decoration: none;
  border-radius: 5px;
  transition: color .13s ease, background .13s ease;
}
.wiki-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: transparent;
  border-radius: 2px;
}
.wiki-nav a:hover { color: var(--cream); background: rgba(242, 227, 194, .05); }
.wiki-nav a.is-active {
  color: #ffe7a9;
  background: rgba(232, 185, 79, .1);
}
.wiki-nav a.is-active::before { background: var(--gold); }
.wiki-nav a.wiki-nav-home {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 8px 10px;
  color: #ead9b3;
  background: rgba(232, 185, 79, .07);
  border: 1px solid rgba(232, 185, 79, .22);
  border-radius: 6px;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.wiki-nav a.wiki-nav-home::before { display: none; }
.wiki-nav a.wiki-nav-home:hover,
.wiki-nav a.wiki-nav-home.is-active {
  color: #ffe7a9;
  background: rgba(232, 185, 79, .14);
  border-color: rgba(232, 185, 79, .5);
}
.wiki-nav-foot {
  margin: 22px 0 0;
  padding-top: 14px;
  color: #7f7461;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-top: 1px dashed var(--line-soft);
}

/* ---------------------------------------------------------------- article */

.wiki-article { min-width: 0; max-width: 900px; }

.wiki-hero {
  position: relative;
  padding: clamp(8px, 2vw, 20px) 0 clamp(30px, 5vw, 58px);
  border-bottom: 1px solid var(--line);
}
.wiki-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.wiki-kicker {
  margin: 0 0 10px;
  color: var(--vermilion);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.5;
}
.wiki-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.015em;
  color: #fff3d6;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .32), 0 0 42px rgba(232, 185, 79, .13);
}
.wiki-lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--cream-soft);
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.7;
}
.wiki-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 26px 0 0;
  color: #b9aa8e;
  font-size: 13px;
}
.wiki-hero-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.wiki-hero-stats strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}
.wiki-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  color: #8f9b7c;
  font-size: 12.5px;
}
.wiki-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #97b36a;
  box-shadow: 0 0 0 4px rgba(151, 179, 106, .14);
  animation: wiki-pulse 2.6s ease-in-out infinite;
}
@keyframes wiki-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* ---------------------------------------------------------------- home page */

.wiki-home[hidden],
.wiki-section[hidden] { display: none !important; }

.wiki-home-block {
  margin-top: clamp(44px, 6vw, 70px);
  padding-top: clamp(30px, 4vw, 44px);
  border-top: 1px dashed var(--line-soft);
}
.wiki-home-head { max-width: 720px; margin-bottom: 24px; }
.wiki-hero + .wiki-home-block { border-top: 0; padding-top: 0; }
.wiki-home-head h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.01em;
  color: #fff2d2;
}
.wiki-home-head > p:last-child {
  margin: 0;
  color: #cfc1a6;
  font-size: 15.5px;
  line-height: 1.65;
}

.wiki-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
}
.wiki-chapter-card {
  display: flex;
  gap: 13px;
  padding: 15px 16px;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(150deg, rgba(242, 227, 194, .055), rgba(242, 227, 194, .018)),
    rgba(13, 24, 24, .55);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.wiki-chapter-card:hover {
  color: inherit;
  background:
    linear-gradient(150deg, rgba(232, 185, 79, .1), rgba(232, 185, 79, .03)),
    rgba(13, 24, 24, .7);
  border-color: rgba(232, 185, 79, .46);
  transform: translateY(-2px);
}
.wiki-chapter-card:focus-visible,
.wiki-gallery-card:focus-visible,
.wiki-pager-link:focus-visible,
.wiki-pager-all:focus-visible,
.wiki-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.wiki-chapter-index {
  padding-top: 3px;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .04em;
  opacity: .72;
}
.wiki-chapter-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wiki-chapter-group {
  color: var(--vermilion);
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.wiki-chapter-body strong {
  color: #fff2d2;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.16;
}
.wiki-chapter-blurb { color: #a99b80; font-size: 12.5px; line-height: 1.45; }

.wiki-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.wiki-gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: #0a1212;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.wiki-gallery-card:hover { color: inherit; border-color: rgba(232, 185, 79, .48); }
.wiki-gallery-card img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  transition: transform .3s ease;
}
.wiki-gallery-card:hover img { transform: scale(1.035); }
.wiki-gallery-caption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 38px 13px 11px;
  background: linear-gradient(180deg, transparent, rgba(6, 12, 12, .92) 58%);
}
.wiki-gallery-caption strong {
  color: #fff2d2;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}
.wiki-gallery-caption span { color: #c3b393; font-size: 11.5px; line-height: 1.4; }

/* ---------------------------------------------------------------- screenshots */

.wiki-shot {
  margin: 28px 0 32px;
  padding: 10px;
  background: rgba(9, 17, 17, .58);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
}
.wiki-shot-frame {
  display: block;
  overflow: hidden;
  line-height: 0;
  background: #080f0f;
  border-radius: 7px;
}
.wiki-shot-frame:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wiki-shot img { display: block; width: 100%; height: auto; }
.wiki-shot figcaption {
  padding: 10px 5px 1px;
  color: #b5a68a;
  font-size: 12.5px;
  line-height: 1.55;
}
.wiki-shot-label {
  display: inline-block;
  margin-right: 7px;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.wiki-shot.is-hero { margin-top: 24px; margin-bottom: 18px; }
.wiki-shot.is-portrait { max-width: 380px; margin-right: auto; margin-left: auto; }
.wiki-shot.is-tall .wiki-shot-frame { max-height: 540px; }
.wiki-shot.is-tall img { height: 540px; object-fit: cover; object-position: top center; }

.wiki-shot-row {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
  margin: 28px 0 32px;
}
.wiki-shot-row .wiki-shot { margin: 0; }
.wiki-shot-row .wiki-shot.is-portrait { max-width: none; }

/* ---------------------------------------------------------------- chapter pager */

.wiki-chapter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line-soft);
}
.wiki-chapter-home,
.wiki-chapter-count {
  color: #7f7461;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
}
.wiki-chapter-home { color: #c4b495; }
.wiki-chapter-home:hover { color: var(--gold); }
.wiki-chapter-home span { margin-right: 3px; }

.wiki-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-top: clamp(44px, 6vw, 64px);
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}
.wiki-pager-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  background: rgba(9, 17, 17, .5);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: border-color .14s ease, background .14s ease;
}
.wiki-pager-link:hover {
  color: inherit;
  background: rgba(232, 185, 79, .06);
  border-color: rgba(232, 185, 79, .44);
}
.wiki-pager-link.is-next { align-items: flex-end; text-align: right; }
.wiki-pager-kicker {
  color: var(--vermilion);
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.wiki-pager-link strong {
  color: #f4e7c8;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}
.wiki-pager-all {
  align-self: center;
  padding: 8px 14px;
  color: #c4b495;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  white-space: nowrap;
}
.wiki-pager-all:hover { color: var(--gold); border-color: rgba(232, 185, 79, .48); }

.wiki-section {
  padding-top: clamp(44px, 6vw, 74px);
  scroll-margin-top: 90px;
}
/* Once JavaScript turns the almanac into chapters, only one section is in the
   document flow at a time, so the old between-section spacing and rules go. */
body.wiki-routed .wiki-section {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
body.wiki-routed .wiki-chapter-bar { margin-top: 2px; }
/* Deep links can land on a heading, a catalogue card, a table row or a road
   card; keep all of them clear of the sticky top bar. */
.wiki-article [id] { scroll-margin-top: 100px; }
.wiki-section + .wiki-section {
  margin-top: clamp(46px, 6vw, 80px);
  border-top: 1px dashed var(--line-soft);
}
.wiki-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.01em;
  color: #fff2d2;
}
.wiki-section h3 {
  position: relative;
  margin: 38px 0 12px;
  padding-left: 14px;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.6vw, 26px);
  font-weight: 600;
  color: #f6e6c4;
}
.wiki-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18em;
  bottom: .12em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), var(--vermilion));
}
.wiki-section h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: #f4e4c2;
}
.heading-link {
  margin-left: 10px;
  color: rgba(232, 185, 79, .34);
  font-family: var(--font-pixel);
  font-size: .55em;
  text-decoration: none;
  vertical-align: middle;
  opacity: 0;
  transition: opacity .13s ease, color .13s ease;
}
h3:hover .heading-link,
.heading-link:focus-visible { opacity: 1; }
.heading-link:hover { color: var(--gold); }
.wiki-lede {
  max-width: 760px;
  margin: 0 0 18px;
  color: #d3c3a4;
  font-size: 17px;
  line-height: 1.7;
}
.wiki-section p { margin: 0 0 15px; color: #cfc1a6; }
.wiki-section p strong, .wiki-section li strong { color: #f4e7c8; font-weight: 650; }
.wiki-section ul, .wiki-section ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: #cfc1a6;
}
.wiki-section li { margin: 0 0 8px; }
.wiki-section li::marker { color: var(--gold-dark); }
.wiki-section em { color: #e6d4ae; }
.wiki-section code {
  padding: 1px 6px;
  color: #f2d58d;
  background: rgba(232, 185, 79, .09);
  border: 1px solid rgba(232, 185, 79, .14);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: .9em;
}
.wiki-section abbr { text-decoration-color: var(--gold-dark); }

/* ---------------------------------------------------------------- cards, notes, grids */

.wiki-grid {
  display: grid;
  gap: 16px;
  margin: 20px 0 24px;
}
.wiki-grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.wiki-grid-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.wiki-card {
  padding: 18px 18px 16px;
  background:
    linear-gradient(180deg, rgba(242, 227, 194, .065), rgba(242, 227, 194, .025));
  border: 1px solid var(--line-soft);
  border-top: 2px solid rgba(232, 185, 79, .42);
  border-radius: 10px;
}
.wiki-card h4 { margin-top: 2px; }
.wiki-card p:last-child { margin-bottom: 0; }
.wiki-card p { font-size: 14.5px; line-height: 1.62; }
.wiki-card-kicker {
  margin: 0 0 6px !important;
  color: var(--vermilion) !important;
  font-family: var(--font-pixel);
  font-size: 9px !important;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.wiki-note {
  position: relative;
  margin: 24px 0;
  padding: 16px 18px 16px 20px;
  background: rgba(242, 227, 194, .045);
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
}
.wiki-note p { margin: 0; font-size: 14.5px; }
.wiki-note p + p { margin-top: 10px; }
.wiki-note.is-tip { border-left-color: var(--moss); background: rgba(138, 154, 91, .07); }
.wiki-note.is-warn { border-left-color: var(--vermilion); background: rgba(208, 90, 61, .08); }

.wiki-formula {
  margin: 14px 0 18px;
  padding: 15px 18px;
  overflow-x: auto;
  color: #ffe4a2;
  background: #0a1213;
  border: 1px solid rgba(232, 185, 79, .26);
  border-left: 4px solid var(--gold-dark);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ---------------------------------------------------------------- tables */

.wiki-table-wrap {
  margin: 20px 0 26px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(9, 17, 17, .5);
  scrollbar-width: thin;
}
.wiki-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.45;
}
.wiki-table caption {
  padding: 12px 14px;
  color: #a99b80;
  text-align: left;
  font-size: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.wiki-table th {
  padding: 10px 13px;
  color: #e3c98e;
  background: rgba(232, 185, 79, .08);
  font-family: var(--font-pixel);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(232, 185, 79, .22);
}
.wiki-table td {
  padding: 9px 13px;
  color: #cabca1;
  vertical-align: top;
  border-bottom: 1px solid rgba(242, 227, 194, .07);
}
.wiki-table tbody tr:last-child td { border-bottom: 0; }
.wiki-table tbody tr:hover td { background: rgba(242, 227, 194, .035); }
.wiki-table td strong { color: #f0e1c2; }
.wiki-table .num {
  font-family: var(--font-pixel);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  color: #ddc48f;
}
.wiki-table .nowrap { white-space: nowrap; }
.wiki-table-compact { font-size: 13px; }
.wiki-table-compact td { padding: 7px 12px; }

/* Table cell decorations filled by wiki.js */
.wiki-muted { color: #94886f; }
.wiki-tag {
  display: inline-block;
  padding: 1px 7px;
  margin: 0 3px 3px 0;
  color: #c8b48a;
  background: rgba(242, 227, 194, .06);
  border: 1px solid rgba(242, 227, 194, .13);
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 8.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wiki-tag.is-gold { color: #f0d28c; background: rgba(232, 185, 79, .1); border-color: rgba(232, 185, 79, .3); }
.wiki-tag.is-red { color: #efb09d; background: rgba(208, 90, 61, .12); border-color: rgba(208, 90, 61, .32); }
.wiki-tag.is-green { color: #c4d69a; background: rgba(138, 154, 91, .13); border-color: rgba(138, 154, 91, .34); }

.wiki-cost {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 0 8px 2px 0;
  white-space: nowrap;
}
.wiki-cost b {
  color: #ecd7a8;
  font-family: var(--font-pixel);
  font-size: 11.5px;
  font-weight: 700;
}
.wiki-cost span { color: #a5967b; font-size: 11.5px; }
.wiki-free { color: #b4c98f; font-family: var(--font-pixel); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------------------------------------------------------------- loading and errors */

.wiki-load {
  margin: 20px 0 26px;
  padding: 18px;
  color: #9d9079;
  background: rgba(242, 227, 194, .03);
  border: 1px dashed rgba(242, 227, 194, .16);
  border-radius: 10px;
  font-size: 13.5px;
}
.wiki-load p { margin: 0; color: inherit; }
.wiki-load.is-error {
  color: #e5b6a5;
  border-color: rgba(208, 90, 61, .4);
  background: rgba(208, 90, 61, .07);
}
.wiki-load.is-error a { color: #ffd28f; }

/* ---------------------------------------------------------------- generated catalogue */

.catalogue-group { margin: 26px 0 30px; }
.catalogue-group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-soft);
}
.catalogue-group-head h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  color: #f6e8c9;
}
.catalogue-group-head span {
  color: #8e826c;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.catalogue-card {
  padding: 14px 15px;
  background: rgba(242, 227, 194, .035);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}
.catalogue-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.catalogue-card-head strong {
  color: #f3e4c6;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}
.catalogue-tier {
  flex: 0 0 auto;
  color: #c9ac6c;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .04em;
}
.catalogue-effect {
  margin: 0 0 8px !important;
  color: #cbbda2 !important;
  font-size: 13px !important;
  line-height: 1.5;
}
.catalogue-desc {
  margin: 0 0 10px !important;
  color: #9f9380 !important;
  font-size: 12.5px !important;
  line-height: 1.55;
}
.catalogue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(242, 227, 194, .1);
  color: #8f846e;
  font-size: 11.5px;
}
.catalogue-meta span { white-space: nowrap; }
.catalogue-card details { margin-top: 9px; }
.catalogue-card summary {
  cursor: pointer;
  color: #c5a86a;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.catalogue-card summary:hover { color: #ffd88a; }
.catalogue-card details table { margin-top: 8px; }
.catalogue-card .wiki-table-wrap { margin: 8px 0 0; }

/* ---------------------------------------------------------------- adventure roads */

.road-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}
.road-card {
  padding: 16px 17px;
  background: linear-gradient(180deg, rgba(242, 227, 194, .055), rgba(242, 227, 194, .022));
  border: 1px solid var(--line-soft);
  border-top: 2px solid rgba(208, 90, 61, .55);
  border-radius: 10px;
}
.road-card h4 {
  margin: 0 0 3px;
  font-size: 20px;
}
.road-card .road-tier {
  margin: 0 0 8px;
  color: var(--vermilion);
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.road-card p { font-size: 13px; line-height: 1.55; margin-bottom: 10px; }
.road-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
  padding: 9px 0;
  border-top: 1px dashed rgba(242, 227, 194, .1);
  border-bottom: 1px dashed rgba(242, 227, 194, .1);
}
.road-facts div { color: #a99b80; font-size: 12px; }
.road-facts b { display: block; color: #e8d6ae; font-family: var(--font-pixel); font-size: 11px; }
.road-card h5 {
  margin: 10px 0 5px;
  color: #cbb078;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.road-list { margin: 0; padding: 0; list-style: none; }
.road-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 3px 0;
  color: #b7a98e;
  font-size: 12px;
  line-height: 1.4;
}
.road-list li b { color: #ead9b3; font-weight: 500; }
.road-list li span { color: #9a8d76; white-space: nowrap; font-family: var(--font-pixel); font-size: 10px; }

/* ---------------------------------------------------------------- FAQ / glossary */

.wiki-faq {
  margin: 0 0 10px;
  padding: 12px 16px;
  background: rgba(242, 227, 194, .035);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}
.wiki-faq summary {
  cursor: pointer;
  color: #f0e1c2;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.35;
}
.wiki-faq summary:hover { color: #ffe3a0; }
.wiki-faq[open] summary { margin-bottom: 8px; }
.wiki-faq p { margin: 0; font-size: 14.5px; }

.wiki-glossary {
  display: grid;
  grid-template-columns: minmax(130px, 210px) minmax(0, 1fr);
  gap: 0;
  margin: 20px 0 0;
  border-top: 1px solid var(--line-soft);
}
.wiki-glossary dt {
  padding: 11px 16px 11px 0;
  color: #efdcb4;
  font-family: var(--font-display);
  font-size: 17px;
  border-bottom: 1px solid rgba(242, 227, 194, .07);
}
.wiki-glossary dd {
  margin: 0;
  padding: 11px 0;
  color: #b9ab91;
  font-size: 13.5px;
  line-height: 1.55;
  border-bottom: 1px solid rgba(242, 227, 194, .07);
}

/* ---------------------------------------------------------------- footer */

.wiki-foot {
  margin-top: 82px;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.wiki-foot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.wiki-foot-brand p { margin: 0; color: #9b8e76; font-size: 13px; }
.wiki-foot-brand .wiki-kicker { margin-bottom: 3px; }
.wiki-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 18px;
}
.wiki-foot-links a {
  color: #c4b495;
  font-size: 13px;
  text-decoration: none;
}
.wiki-foot-links a:hover { color: var(--gold); }
.wiki-foot-note {
  max-width: 680px;
  margin: 0;
  color: #7f7461;
  font-size: 12px;
  line-height: 1.6;
}

.wiki-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  max-width: min(92vw, 440px);
  padding: 12px 18px;
  color: #21170c;
  background: var(--gold);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1020px) {
  .wiki-body { grid-template-columns: 200px minmax(0, 1fr); gap: 26px; }
  .wiki-brand-text strong { font-size: 19px; }
}

@media (max-width: 820px) {
  .wiki-top {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 10px 14px;
  }
  .wiki-brand { flex: 1 1 auto; }
  .wiki-crest { width: 36px; height: 36px; }
  .wiki-crest > span { width: 13px; height: 13px; }
  .wiki-brand-kicker { font-size: 8px; }
  .wiki-brand-text strong { font-size: 17px; }
  .wiki-search-wrap { order: 3; flex: 1 1 100%; max-width: none; }
  .wiki-search { height: 38px; }
  .wiki-top-actions { gap: 7px; }
  .wiki-button { min-height: 34px; padding: 0 11px; font-size: 9px; }
  .wiki-button-ghost { display: none; }

  .wiki-body { display: block; padding: 20px 16px 70px; }
  .wiki-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
    max-height: none;
    margin: 0 0 18px;
    padding: 0 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .wiki-nav-title,
  .wiki-nav-label,
  .wiki-nav-foot { display: none; }
  .wiki-nav-group { display: contents; }
  .wiki-nav a,
  .wiki-nav a.wiki-nav-home {
    flex: 0 0 auto;
    display: block;
    margin: 0;
    padding: 6px 11px;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    border: 1px solid rgba(242, 227, 194, .12);
    border-radius: 999px;
  }
  .wiki-nav a.wiki-nav-home {
    color: #f0d28c;
    background: rgba(232, 185, 79, .1);
    border-color: rgba(232, 185, 79, .32);
  }
  .wiki-nav a::before { display: none; }
  .wiki-nav a.is-active { border-color: rgba(232, 185, 79, .5); }

  .wiki-chapter-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .wiki-gallery-card img { height: 170px; }
  .wiki-shot-row { grid-template-columns: 1fr; gap: 12px; }
  .wiki-shot.is-tall img { height: 400px; }
  .wiki-pager { grid-template-columns: 1fr; gap: 10px; }
  .wiki-pager-all { justify-self: center; }
  .wiki-pager-link.is-next { align-items: flex-start; text-align: left; }

  .wiki-hero h1 { font-size: clamp(38px, 12vw, 54px); }
  .wiki-section { scroll-margin-top: 128px; }
  .wiki-article [id] { scroll-margin-top: 128px; }
  .wiki-glossary { grid-template-columns: 1fr; gap: 0; }
  .wiki-glossary dt { padding-bottom: 0; border-bottom: 0; }
  .wiki-glossary dd { padding-top: 2px; padding-bottom: 12px; }
}

@media (max-width: 520px) {
  body.wiki-page { font-size: 15px; }
  .wiki-hero-stats { gap: 8px 18px; }
  .wiki-hero-stats strong { font-size: 20px; }
  .wiki-top-actions .wiki-button-primary { padding: 0 10px; }
  .wiki-grid-2, .wiki-grid-3 { grid-template-columns: 1fr; }
  .road-grid { grid-template-columns: 1fr; }
  .catalogue-grid { grid-template-columns: 1fr; }
  .wiki-chapter-grid, .wiki-gallery-grid { grid-template-columns: 1fr; }
  .wiki-gallery-card img { height: 190px; }
  .wiki-shot { padding: 6px; }
  .wiki-shot.is-portrait { max-width: 100%; }
  .wiki-shot figcaption { padding-left: 3px; padding-right: 3px; }
  .wiki-chapter-bar { align-items: flex-start; flex-direction: column; gap: 4px; }
  .wiki-section h3 { margin-top: 30px; }
  .wiki-table { font-size: 12.5px; }
  .wiki-table th { font-size: 8.5px; }
  .wiki-table td, .wiki-table th { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  body.wiki-page {
    color: #111;
    background: #fff;
    font-size: 11pt;
  }
  .wiki-atmosphere, .wiki-top, .wiki-nav, .wiki-toast, .wiki-results { display: none !important; }
  .wiki-body { display: block; max-width: none; padding: 0; }
  .wiki-article { max-width: none; }
  .wiki-hero h1, .wiki-section h2, .wiki-section h3, .wiki-section h4 { color: #111; text-shadow: none; }
  .wiki-kicker { color: #a33a25; }
  .wiki-lead, .wiki-lede, .wiki-section p, .wiki-section li { color: #222; }
  .wiki-table th { color: #111; background: #eee; }
  .wiki-table td { color: #222; }
  .wiki-card, .wiki-note, .wiki-faq, .wiki-table-wrap { background: #f5f2ea; border-color: #ccc; }
  .wiki-section { page-break-inside: auto; }
  .wiki-section h2, .wiki-section h3 { page-break-after: avoid; }
  .wiki-home[hidden], .wiki-section[hidden] { display: block !important; }
  .wiki-chapter-bar, .wiki-pager, .wiki-search-key { display: none !important; }
  .wiki-chapter-card, .wiki-gallery-card, .wiki-shot { page-break-inside: avoid; }
  a { color: #7a3a12; }
}
