/* GTA 6 Field Guide: dark neon "game menu" theme. No external fonts or libraries.
 *
 * Mobile-first: the base rules are the phone layout, where navigation lives in
 * a fixed bottom tab bar and the header scrolls away. min-width queries add
 * room at 560px (large phones), 720px (tablets) and 900px (desktop: sticky
 * header with the full nav row, no tab bar). Hover-only effects sit behind
 * (hover: hover) so they don't stick on touch screens.
 */

:root {
  --bg: #0b0912;
  --bg-raised: #120f1b;
  --surface: #191524;
  --surface-2: #231d33;
  --border: #2d2640;
  --border-strong: #463c63;
  --text: #f6f1fd;
  --text-soft: #d6cde8;
  --muted: #a297bd;
  --pink: #ff4fa3;
  --orange: #ffa94d;
  --teal: #2fe3c8;
  --violet: #a67cff;
  --yellow: #ffd45c;
  --red: #ff6b6b;
  --warn: #ffcf5c;
  --acc: var(--pink);          /* per-chapter accent, set by .acc-N */
  --tone: var(--border-strong); /* per-card-type accent */
  --grad: linear-gradient(100deg, var(--pink) 0%, #ff7a6b 50%, var(--orange) 100%);
  --glass: rgb(11 9 18 / 90%);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --gutter: 16px;
  --tap: 44px;          /* minimum touch target */
  --sticky-top: 0px;    /* height of whatever is stuck to the top: nothing on phones */
  --toc-h: 59px;        /* sticky "On this page" bar */
  --tabbar-h: 62px;     /* fixed bottom tab bar on phones */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Condensed system faces for headings and UI labels: iOS/macOS, Android, Windows. */
  --display: "Avenir Next Condensed", "Roboto Condensed", sans-serif-condensed, "Bahnschrift", "Arial Narrow", var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }
@media (min-width: 900px) { :root { --sticky-top: 96px; --tabbar-h: 0px; --safe-b: 0px; } }

.acc-0 { --acc: var(--teal); }
.acc-1 { --acc: var(--orange); }
.acc-2 { --acc: var(--pink); }
.acc-3 { --acc: var(--violet); }
.acc-4 { --acc: var(--yellow); }
.acc-5 { --acc: var(--red); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html:not(.js) .js-only { display: none !important; }

/* Anchor jumps land below whatever is stuck to the top. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-top) + 16px); -webkit-text-size-adjust: 100%; }
html:has(.toc) { scroll-padding-top: calc(var(--sticky-top) + var(--toc-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgb(255 79 163 / 18%);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: .1em .35em; border-radius: 5px; }
h1, h2, h3 { font-family: var(--display); font-stretch: condensed; line-height: 1.1; margin: 0; overflow-wrap: break-word; }
h1, h2 { text-transform: uppercase; font-style: italic; letter-spacing: .005em; }
@media (hover: hover) { a:hover { color: #7ff3e1; } }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 12px; }

/* ---------------------------------------------------------------- header */
/* Phones: just the brand, and it scrolls away (the tab bar does the navigating). */
.site-header { position: relative; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: center; min-height: 52px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--text); text-decoration: none; font-family: var(--display); font-stretch: condensed; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .04em; font-size: 1.15rem; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--grad); box-shadow: 0 0 18px rgb(255 79 163 / 45%); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 6px 4px 4px; border-radius: 50% 50% 2px 2px; background: var(--bg); clip-path: inset(0 0 45% 0); }

.site-nav, .header-search { display: none; }
.site-nav a { color: var(--text-soft); text-decoration: none; font-family: var(--display); font-stretch: condensed; font-size: .98rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 5px 12px; border-radius: 8px; }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--pink); }
@media (hover: hover) { .site-nav a:hover { color: var(--text); background: var(--surface); } }

/* Desktop: sticky, brand above a centered row of links, search on the right. */
@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; background: var(--glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
  .header-inner { flex-direction: column; gap: 6px; min-height: var(--sticky-top); padding-top: 10px; padding-bottom: 10px; }
  .brand { min-height: 0; font-size: 1.3rem; }
  .site-nav { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
  .header-search { display: grid; place-items: center; position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); width: var(--tap); height: var(--tap); border-radius: 12px; color: var(--text-soft); border: 1px solid var(--border-strong); background: var(--surface); }
}
@media (hover: hover) { .header-search:hover { color: var(--text); border-color: var(--pink); } }

/* ---------------------------------------------------------------- tab bar (phones) */
/* The blur sits on ::before: a backdrop-filter on the bar itself would trap the
   fixed-position "More" sheet inside it. */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 4px var(--safe-b);
  border-top: 1px solid var(--border-strong);
}
.tabbar::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--tabbar-h); color: var(--muted); text-decoration: none; cursor: pointer;
  font-family: var(--display); font-stretch: condensed; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  list-style: none; user-select: none;
}
.tab::-webkit-details-marker { display: none; }
.tab .icon { width: 23px; height: 23px; }
.tab:active { color: var(--text); }
.tab[aria-current="page"], .menu[open] > .tab { color: var(--text); }
.tab[aria-current="page"]::after, .menu[open] > .tab::after { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); box-shadow: 0 0 14px rgb(255 79 163 / 80%); }
.tab[aria-current="page"] .icon { color: var(--pink); }
/* Search is the centre button. */
.tab[href="/search/"] .icon { width: 38px; height: 38px; padding: 9px; margin-top: -2px; border-radius: 12px; background: var(--grad); color: #1a0b14; stroke-width: 2.6; box-shadow: 0 6px 20px -6px rgb(255 79 163 / 80%); }
.tab[href="/search/"] { gap: 1px; }
.tab[href="/search/"][aria-current="page"] .icon { color: #1a0b14; }
.tab[href="/search/"]::after { display: none; }
@media (min-width: 900px) { .tabbar { display: none; } }

/* "More": a native <details> that opens a sheet above the bar. The dimmer is
   part of the summary, so tapping it closes the sheet even without JavaScript. */
.menu { min-width: 0; }
.menu[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgb(5 4 9 / 72%); }
.menu-nav {
  position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px;
  max-height: calc(100vh - var(--tabbar-h) - 40px); max-height: calc(100dvh - var(--tabbar-h) - var(--safe-b) - 40px); overflow-y: auto;
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: 20px;
  box-shadow: 0 -20px 60px -10px rgb(0 0 0 / 80%);
}
.menu-nav a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-family: var(--display); font-stretch: condensed; font-weight: 700; font-size: 1.02rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.menu-nav a .icon { color: var(--pink); }
.menu-nav a:active { background: var(--surface-2); }
.menu-nav a[aria-current="page"] { border-color: var(--pink); background: rgb(255 79 163 / 12%); }

/* ---------------------------------------------------------------- hero */
.hero, .page-hero, .chapter-hero {
  position: relative; isolation: isolate; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 90% at 85% -10%, rgb(255 122 107 / 26%), transparent 60%),
    radial-gradient(50% 80% at 0% 110%, rgb(47 227 200 / 14%), transparent 60%),
    linear-gradient(180deg, #171126 0%, var(--bg) 100%);
}
.page-hero::before, .chapter-hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%; z-index: -1;
  background: repeating-linear-gradient(180deg, transparent 0 22px, rgb(255 79 163 / 9%) 22px 23px);
  mask-image: linear-gradient(180deg, transparent, #000 70%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%);
}
/* Chapter pages glow in their own accent colour. */
.chapter-hero { background:
    radial-gradient(70% 100% at 50% -20%, color-mix(in srgb, var(--acc) 30%, transparent), transparent 62%),
    linear-gradient(180deg, #171126 0%, var(--bg) 100%); }
.chapter-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--acc), transparent); }
.hero-num { position: absolute; z-index: -1; left: 50%; top: 34px; transform: translateX(-50%); font-family: var(--display); font-stretch: condensed; font-weight: 900; font-style: italic; font-size: 13rem; line-height: 1; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--acc) 26%, transparent); letter-spacing: -.02em; pointer-events: none; user-select: none; }

/* Home: a striped sun sinking into a perspective grid. */
.hero { background: linear-gradient(180deg, #1a1030 0%, #1c0f2a 45%, var(--bg) 100%); }
.hero-sun {
  position: absolute; z-index: -2; left: 50%; top: 26px; width: 270px; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; opacity: .45;
  background: linear-gradient(180deg, #ffe07a 0%, #ff8a5c 45%, var(--pink) 80%);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 19px), linear-gradient(180deg, #000 52%, transparent 52%);
  mask-image: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 19px), linear-gradient(180deg, #000 52%, transparent 52%);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; left: -60%; right: -60%; bottom: 0; height: 46%;
  background:
    linear-gradient(180deg, transparent calc(100% - 1.5px), rgb(255 79 163 / 55%) 100%) 0 0 / 100% 30px,
    linear-gradient(90deg, transparent calc(100% - 1.5px), rgb(255 79 163 / 55%) 100%) 50% 0 / 46px 100%;
  transform: perspective(240px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 85%); mask-image: linear-gradient(180deg, transparent 0, #000 85%);
  opacity: .5;
}
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(75% 60% at 50% 42%, rgb(11 9 18 / 70%), transparent 75%); }
@media (min-width: 720px) { .hero-sun { width: 420px; top: 20px; } .hero-num { font-size: 19rem; top: 30px; } }

.hero-inner { padding-top: 44px; padding-bottom: 40px; text-align: center; }
.hero-inner > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.page-hero .wrap, .chapter-hero .wrap { padding-top: 22px; padding-bottom: 28px; text-align: center; }
@media (min-width: 720px) {
  .hero-inner { padding-top: 84px; padding-bottom: 72px; }
  .page-hero .wrap, .chapter-hero .wrap { padding-top: 40px; padding-bottom: 44px; }
}

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--display); font-stretch: condensed; font-size: .92rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }
.eyebrow::before, .eyebrow::after { content: ""; width: 18px; height: 2px; background: currentColor; opacity: .7; }
.chapter-hero .eyebrow { color: var(--acc); }
.hero-title {
  font-size: clamp(3.3rem, 15vw, 6.6rem); font-weight: 900; letter-spacing: -.01em; line-height: .9;
  background: linear-gradient(180deg, #fff 30%, #ffc8e2 70%, var(--pink) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgb(255 79 163 / 45%));
  padding: 0 .08em .06em;
}
.page-hero h1, .chapter-hero h1 { font-size: clamp(2.5rem, 9vw, 4.2rem); font-weight: 900; text-shadow: 0 4px 30px rgb(0 0 0 / 60%); }
.lede { font-size: clamp(1.02rem, 2.2vw, 1.25rem); color: var(--text-soft); max-width: 600px; margin: 14px auto 0; }
.hero-note { margin: 22px auto 0; font-size: .86rem; color: var(--muted); max-width: 560px; }
.not-found h1 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(3.4rem, 14vw, 6.5rem); padding: 0 .08em; }
.not-found .wrap { text-align: center; }

.hero-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; max-width: 420px; margin-left: auto; margin-right: auto; }
@media (min-width: 560px) { .hero-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 860px; } }

/* Counters under the hero */
.stats { list-style: none; padding: 0; margin: 24px auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 520px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: rgb(11 9 18 / 62%); overflow: hidden; }
.stats li { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; }
.stats li + li { border-left: 1px solid var(--border); }
.stats b { font-family: var(--display); font-stretch: condensed; font-size: 1.7rem; font-weight: 900; font-style: italic; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stats span { margin-top: 3px; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.stats li:nth-child(1) b { color: var(--pink); } .stats li:nth-child(2) b { color: var(--teal); }
.stats li:nth-child(3) b { color: var(--violet); } .stats li:nth-child(4) b { color: var(--orange); }

/* ---------------------------------------------------------------- search box & filters */
.searchbox { display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 22px auto 0; padding: 6px 6px 6px 14px; border-radius: var(--radius); background: rgb(11 9 18 / 80%); border: 1px solid var(--border-strong); color: var(--muted); }
.searchbox:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgb(255 79 163 / 22%); }
.searchbox input, .filter input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 1rem; -webkit-appearance: none; appearance: none; }
.searchbox input::placeholder, .filter input::placeholder { color: var(--muted); }.searchbox .btn { min-height: 44px; }

.filter { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; background: var(--bg-raised); border: 1px solid var(--border-strong); }
.filter:focus-within { border-color: var(--pink); }
.filter-count { font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.filter-page { max-width: 560px; margin: 0 auto 28px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 1.05rem; line-height: 1.1; letter-spacing: .07em; text-transform: uppercase;
  border-radius: 12px; cursor: pointer;
  color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border-strong);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); border-color: transparent; color: #1a0b14; box-shadow: 0 8px 28px -8px rgb(255 79 163 / 65%); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: .9rem; }
@media (hover: hover) {
  .btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--muted); transform: translateY(-1px); }
  .btn-primary:hover { background: var(--grad); color: #1a0b14; border-color: transparent; filter: brightness(1.08); }
}

/* ---------------------------------------------------------------- sections */
.section { padding-top: 32px; padding-bottom: 44px; }
.section-title { font-size: 1.7rem; font-weight: 900; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.section-title::before, .section-title::after { content: ""; flex: 1; max-width: 220px; height: 2px; background: linear-gradient(90deg, transparent, var(--pink)); }
.section-title::after { background: linear-gradient(90deg, var(--pink), transparent); }
@media (min-width: 720px) {
  .section { padding-top: 52px; padding-bottom: 68px; }
  .section-title { font-size: 2.1rem; margin-bottom: 22px; gap: 16px; }
}

.badge { display: inline-block; font-family: var(--font); font-style: normal; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--warn); padding: 3px 7px; border-radius: 5px; vertical-align: middle; margin-left: 6px; }

.empty { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 32px 20px; text-align: center; color: var(--muted); background: var(--bg-raised); }
.empty-title { color: var(--text); font-weight: 800; font-size: 1.15rem; margin: 0 0 6px; }
.empty p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- quick-access tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; height: 100%; padding: 16px 10px 14px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-raised)); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.tile:active { transform: scale(.97); border-color: var(--pink); }
.tile-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.tile-icon .icon { width: 24px; height: 24px; }
.tile-title { font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 1.2rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.tile-sub { font-size: .8rem; line-height: 1.35; color: var(--muted); }
.tile-count { font-size: .74rem; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 1px 9px; border-radius: 6px; font-variant-numeric: tabular-nums; }
@media (min-width: 720px) { .tiles-cats { max-width: 780px; margin: 0 auto; } }
.tiles li:nth-child(6n+1) { --tone: var(--teal); } .tiles li:nth-child(6n+2) { --tone: var(--orange); }
.tiles li:nth-child(6n+3) { --tone: var(--violet); } .tiles li:nth-child(6n+4) { --tone: var(--pink); }
.tiles li:nth-child(6n+5) { --tone: var(--yellow); } .tiles li:nth-child(6n+6) { --tone: var(--red); }
@media (min-width: 720px) { .tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; } .tiles li, .tiles li:last-child:nth-child(odd) { flex: 0 1 240px; } .tile { padding: 20px 14px 18px; } }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); border-color: var(--tone); color: var(--text); box-shadow: 0 14px 36px -20px var(--tone); } }

/* ---------------------------------------------------------------- chapter select */
/* Phones: one full-width column. Wider: flex rows (not grid) so a short last
   row centers instead of hugging the left. */
.chapter-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.chapter-card a {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; height: 100%;
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 10%, var(--surface)), var(--bg-raised) 70%);
  border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.chapter-card a::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--acc); box-shadow: 0 0 18px var(--acc); }
.chapter-card a:active { transform: scale(.985); border-color: var(--acc); }
.card-num { position: absolute; z-index: -1; top: -14px; right: 2px; font-family: var(--display); font-stretch: condensed; font-weight: 900; font-style: italic; font-size: 7.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--acc) 30%, transparent); pointer-events: none; }
.chapter-card h3 { font-size: 1.75rem; font-weight: 900; text-transform: uppercase; font-style: italic; }
.chapter-card p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chapter-num { display: inline-flex; align-items: center; font-family: var(--display); font-stretch: condensed; font-size: .9rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--acc); }
.card-region { font-size: .8rem; font-weight: 700; color: var(--text-soft); }
.chips { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; padding-top: 8px; }
.chips li { font-size: .72rem; font-weight: 700; color: var(--text-soft); background: rgb(255 255 255 / 5%); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; }
.chapter-card .progress { align-self: stretch; margin-top: 8px; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.card-cta .icon { width: 1.1em; height: 1.1em; transition: transform .18s ease; }
@media (min-width: 720px) {
  .chapter-grid { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 16px; }
  .chapter-grid > li { flex: 0 1 340px; min-width: 0; }
  .chapter-card a { padding: 24px 22px 20px; }
  .chapter-card p { -webkit-line-clamp: 3; }
}
@media (hover: hover) {
  .chapter-card a:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: 0 16px 44px -22px var(--acc); color: var(--text); }
  .chapter-card a:hover .card-cta .icon { transform: translateX(4px); }
}

/* ---------------------------------------------------------------- progress */
.progress { display: flex; align-items: center; gap: 12px; }
.progress-track { flex: 1; height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border-strong); overflow: hidden; min-width: 80px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), #9dfbe9); border-radius: inherit; box-shadow: 0 0 12px rgb(47 227 200 / 70%); transition: width .3s ease; }
.progress-label { font-family: var(--display); font-stretch: condensed; font-size: .92rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- chapter page */
/* Level-select row: jump straight to any chapter (or guide). */
.switcher { display: flex; justify-content: center; gap: 6px; margin: 0 0 18px; }
.switcher a { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border-radius: 11px; background: rgb(11 9 18 / 70%); border: 1px solid var(--border-strong); color: var(--text-soft); text-decoration: none; font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.switcher a:active { border-color: var(--acc); }
.switcher a[aria-current="page"] { background: var(--acc); border-color: var(--acc); color: #14091a; box-shadow: 0 0 20px -2px var(--acc); }
.switcher-wide { flex-wrap: wrap; }
.switcher-wide a { padding: 0 13px; font-size: .95rem; }
@media (hover: hover) { .switcher a:hover { color: var(--text); border-color: var(--acc); } .switcher a[aria-current="page"]:hover { color: #14091a; } }

.meta { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.meta li { font-size: .8rem; font-weight: 700; color: var(--text-soft); background: rgb(11 9 18 / 60%); border: 1px solid var(--border-strong); padding: 3px 10px; border-radius: 7px; }
.summary { max-width: 720px; margin: 16px auto 0; font-size: 1rem; color: var(--text-soft); }
@media (min-width: 720px) { .switcher { margin-bottom: 24px; } .summary { margin-top: 20px; font-size: 1.08rem; } }

/* One centered reading column. minmax(0, 1fr) stops the TOC strip's full
   chip width from stretching the column past the screen. */
.chapter-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 0; padding-bottom: 56px; max-width: 920px; }
.chapter-body { min-width: 0; }

/* On this page: a sticky, swipeable bar of chips. site.js keeps the active
   section's chip in view. It bleeds to the screen edges on phones. */
.toc {
  position: sticky; top: var(--sticky-top); z-index: 40;
  margin: 0 calc(-1 * var(--gutter));
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.toc-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toc ul {
  list-style: none; margin: 0; padding: 8px var(--gutter);
  display: flex; gap: 6px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.toc ul::-webkit-scrollbar { display: none; }
.toc li { flex: none; }
.toc li:first-child { margin-left: auto; }   /* centers the row when it fits, */
.toc li:last-child { margin-right: auto; }   /* scrolls from the left edge when it doesn't */
.toc li:nth-child(1 of :not([hidden])) { margin-left: auto; }
.toc li:nth-last-child(1 of :not([hidden])) { margin-right: auto; }
.toc a { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 13px; white-space: nowrap; color: var(--text-soft); text-decoration: none; font-family: var(--display); font-stretch: condensed; font-size: .95rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-raised); }
.toc .n { font-family: var(--font); font-size: .68rem; font-weight: 800; letter-spacing: 0; color: var(--muted); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.toc a.is-active { color: var(--text); border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, var(--bg-raised)); }
.toc a.is-active .n { color: #14091a; background: var(--acc); }
@media (min-width: 720px) { .chapter-layout { gap: 30px; padding-bottom: 80px; } }
@media (min-width: 1180px) { .toc { margin: 0; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); } }
@media (hover: hover) { .toc a:hover { color: var(--text); border-color: var(--acc); } }

.chapter-section { padding-top: 4px; margin-bottom: 42px; }
.chapter-section > h2 { font-size: 1.7rem; font-weight: 900; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.sec-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.sec-icon .icon { width: 20px; height: 20px; }
@media (min-width: 720px) {
  .chapter-section { padding-top: 8px; margin-bottom: 56px; }
  .chapter-section > h2 { font-size: 2rem; margin-bottom: 18px; gap: 12px; }
}
/* Each kind of section has its own colour, used by its icon and its cards. */
.chapter-section { --tone: var(--pink); }
.sec-bulb, .sec-bolt { --tone: var(--teal); }
.sec-clock, .sec-egg { --tone: var(--violet); }
.sec-star, .sec-trophy, .sec-gamepad { --tone: var(--orange); }
.sec-gem, .sec-list { --tone: var(--yellow); }
.sec-flag { --tone: var(--red); }

.callout { border: 1px solid rgb(255 207 92 / 40%); background: rgb(255 207 92 / 7%); border-radius: var(--radius); padding: 16px; margin-bottom: 32px; text-align: center; }
.callout-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 8px; font-family: var(--display); font-stretch: condensed; font-weight: 800; color: var(--warn); text-transform: uppercase; letter-spacing: .14em; font-size: 1rem; }
.callout ul { display: inline-block; margin: 0; padding-left: 20px; color: var(--text-soft); text-align: left; }
.callout li + li { margin-top: 6px; }
@media (min-width: 720px) { .callout { padding: 18px 20px; margin-bottom: 40px; } }

/* Cards: one column on phones, centered flex rows from 720px. */
.card-grid { display: flex; flex-direction: column; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; text-align: center; }
.card::before { content: ""; display: block; width: 34px; height: 3px; margin: 0 auto 12px; border-radius: 3px; background: var(--tone); box-shadow: 0 0 12px var(--tone); }
.card h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: .01em; margin-bottom: 8px; }
@media (min-width: 720px) {
  .card-grid { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px; }
  .card-grid > * { flex: 1 1 300px; max-width: 430px; }
  .stack { gap: 14px; }
  .card { padding: 20px; }
  .card h3 { font-size: 1.35rem; }
}
/* Where a search result or link lands. */
.card:target, .mission:target, .callout:target, .table-wrap tr:target { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink), 0 0 36px -6px var(--pink); }
.prose { color: var(--text-soft); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 .8em; }
/* Lists sit centered as a block but read left-to-right inside. */
.prose ul, .prose ol { display: inline-block; padding-left: 1.25em; text-align: left; }
.prose li + li { margin-top: .3em; }
.prose strong { color: var(--text); }

.where { margin: 0 0 12px; font-size: .9rem; color: var(--text-soft); display: flex; justify-content: center; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.where-label { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); border: 1px solid rgb(47 227 200 / 40%); padding: 2px 7px; border-radius: 5px; }
.when { margin: -2px 0 10px; font-size: .85rem; font-weight: 700; color: var(--orange); }

/* ---------------------------------------------------------------- missions */
.tracker { display: grid; gap: 10px; margin-bottom: 14px; padding: 14px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--border-strong); }
.tracker-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tracker-actions:has(> :only-child) { grid-template-columns: 1fr; }
@media (min-width: 560px) { .tracker { grid-template-columns: 1fr auto; align-items: center; } .tracker-actions { display: flex; } .tracker .filter { grid-column: 1 / -1; } }

.mission-list { list-style: none; counter-reset: mission; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mission { position: relative; counter-increment: mission; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.mission::before { content: counter(mission, decimal-leading-zero); display: block; width: max-content; margin: 0 auto 8px; padding: 1px 10px; border-radius: 7px; font-family: var(--display); font-stretch: condensed; font-weight: 900; font-style: italic; font-size: 1.05rem; letter-spacing: .08em; color: #14091a; background: var(--acc); font-variant-numeric: tabular-nums; }
.mission h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; }
.mission .card-head { padding: 0 34px; }
.mission ul { display: inline-block; margin: 0; padding-left: 1.15em; color: var(--text-soft); text-align: left; }
.mission li + li { margin-top: 6px; }
@media (min-width: 720px) { .mission-list { gap: 12px; } .mission { padding: 18px 20px; } }

/* Tick a mission off: a 44px target in the card's corner. */
.mission-check { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: var(--tap); height: var(--tap); cursor: pointer; }
.mission-check input, .checklist input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border-radius: 7px; border: 2px solid var(--border-strong); background: var(--bg); display: grid; place-content: center; cursor: pointer; }
.mission-check input::after, .checklist input::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid var(--bg); border-bottom: 2.5px solid var(--bg); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.mission-check input:checked, .checklist input:checked { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 12px rgb(47 227 200 / 60%); }
.mission-check input:checked::after, .checklist input:checked::after { opacity: 1; }
.mission:has(.mission-check input:checked) { border-color: rgb(47 227 200 / 35%); background: var(--bg-raised); }
.mission:has(.mission-check input:checked)::before { content: "Done"; background: var(--teal); }
.mission:has(.mission-check input:checked) > :not(.mission-check) { opacity: .5; }

/* Spoiler reveal: native <details>, works without JS */
.spoiler { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-raised); }
.spoiler > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; min-height: 48px; padding: 10px 14px; font-weight: 750; font-size: .94rem; color: var(--text); user-select: none; }
.spoiler > summary::-webkit-details-marker { display: none; }
.spoiler > summary::before { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--pink); border-bottom: 2px solid var(--pink); transform: rotate(-45deg); transition: transform .2s ease; flex: none; }
.spoiler[open] > summary::before { transform: rotate(45deg); }
.spoiler-hint { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.spoiler[open] .spoiler-hint { visibility: hidden; }
.spoiler-body { padding: 2px 14px 14px; }
@media (min-width: 720px) { .spoiler-body { padding: 2px 16px 16px; } }

/* "Jump to…": a collapsed list of every card in a long section, each linking
   straight to it. A centered box; titles read left-aligned inside. */
.jump { margin: 0 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-raised); }
.jump > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 8px 14px; font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); user-select: none; }
.jump > summary::-webkit-details-marker { display: none; }
.jump > summary .icon { width: 18px; height: 18px; color: var(--tone, var(--acc)); }
.jump > summary .n { font-family: var(--font); font-size: .7rem; font-weight: 800; letter-spacing: 0; color: var(--muted); background: var(--surface-2); padding: 1px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.jump > summary::after { content: ""; width: 8px; height: 8px; margin-left: 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; flex: none; }
.jump[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.jump-body { padding: 4px 8px 10px; border-top: 1px solid var(--border); }
.jump-head { margin: 12px 0 4px; text-align: center; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.jump-list { list-style: none; margin: 4px auto 0; padding: 0; max-width: 640px; text-align: left; counter-reset: jump; }
.jump-list li { break-inside: avoid; }
.jump-list a { display: flex; align-items: baseline; gap: 9px; min-height: 40px; padding: 9px 10px; border-radius: 8px; color: var(--text-soft); text-decoration: none; font-size: .94rem; line-height: 1.3; }
ol.jump-list a::before { counter-increment: jump; content: counter(jump, decimal-leading-zero); flex: none; font-family: var(--display); font-stretch: condensed; font-weight: 900; font-style: italic; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.jump-list a:active { background: var(--surface-2); color: var(--text); }
.jump-list a.is-done { color: var(--muted); }
.jump-list a.is-done::after { content: "\2713"; margin-left: auto; padding-left: 6px; color: var(--teal); font-weight: 900; }
@media (min-width: 720px) { .jump-body { padding: 4px 12px 12px; } .jump-list { columns: 2; column-gap: 10px; max-width: none; } }
@media (hover: hover) { .jump > summary:hover { color: var(--tone, var(--acc)); } .jump-list a:hover { color: var(--text); background: var(--surface-2); } }

/* Back to top: appears once the reader is a couple of screens down. */
.to-top { position: fixed; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); z-index: 55; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--text); background: var(--glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgb(0 0 0 / 45%); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top .icon { width: 22px; height: 22px; }
@media (min-width: 900px) { .to-top { right: 24px; bottom: 24px; } }
@media (hover: hover) { .to-top:hover { color: var(--pink); border-color: var(--pink); } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

.media { margin: 14px 0 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: #000; }
.video { position: relative; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Collectibles checklist: each row is a full-width tap target. */
.checklist-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.checklist-head { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.checklist-head .progress { flex: 1 1 100%; }
.checklist { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 6px; max-width: 640px; text-align: left; }
.checklist label { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; min-height: 48px; padding: 12px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; background: var(--bg-raised); }
.checklist label:active { border-color: var(--border-strong); }
.checklist input { grid-row: span 2; }
.check-name { font-weight: 700; color: var(--text); }
.check-where { font-size: .86rem; color: var(--muted); grid-column: 2; }
.checklist input:checked ~ .check-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.fine-print { text-align: center; margin: 12px 0 0; font-size: .78rem; color: var(--muted); }
@media (min-width: 560px) { .checklist-wrap { padding: 18px; } .checklist-head { gap: 14px; } .checklist-head .progress { flex: 1 1 200px; } }
@media (hover: hover) { .checklist label:hover { border-color: var(--border-strong); } }

/* Prev / next. Phones: stacked, with Next first since that's the usual tap. */
.pager { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--border); }
.pager > span:empty { display: none; }
.pager a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-height: 68px; justify-content: center; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; }
.pager a:active { border-color: var(--pink); }
.pager span { font-family: var(--font); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--pink); }
.pager-next { order: -1; background: linear-gradient(180deg, rgb(255 79 163 / 14%), var(--surface)) !important; }
@media (min-width: 560px) {
  .pager { grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 28px; }
  .pager > span:empty { display: block; }
  .pager-next { order: 0; grid-column: 2; }
}
@media (hover: hover) { .pager a:hover { border-color: var(--pink); color: var(--text); } }

/* Roll-up pages */
.rollup { max-width: 920px; }
.rollup > .toc:first-child { margin-top: -32px; margin-bottom: 28px; }
.rollup-group + .rollup-group { margin-top: 40px; }
.rollup-group > h2 { margin-bottom: 14px; font-size: 1.8rem; font-weight: 900; text-align: center; }
.rollup-group > h2 a { color: var(--text); text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.rollup-group > h2 .group-static { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.rollup-group > h2 .chapter-num { font-style: normal; }
.rollup-group .callout { margin-bottom: 14px; }
.rollup .egg { --tone: var(--violet); } .rollup .best { --tone: var(--orange); }
@media (min-width: 720px) { .rollup-group + .rollup-group { margin-top: 52px; } .rollup-group > h2 { margin-bottom: 16px; font-size: 2.1rem; } }
@media (hover: hover) { .rollup-group > h2 a:hover { color: var(--teal); } }

/* ---------------------------------------------------------------- loot */
.loot { position: relative; --tone: var(--yellow); }
.loot.is-only { --tone: var(--violet); border-color: rgb(166 124 255 / 45%); background: linear-gradient(180deg, rgb(166 124 255 / 9%), var(--surface) 60%); }
.loot .card-head { padding: 0 30px; }
.loot-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.loot-kind, .loot-only { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; text-decoration: none; }
.loot-kind { color: var(--yellow); background: rgb(255 212 92 / 10%); border: 1px solid rgb(255 212 92 / 35%); }
.loot-kind .icon { width: 14px; height: 14px; }
.loot-only { color: #14091a; background: var(--violet); }
a.loot-kind:active { background: rgb(255 212 92 / 22%); } a.loot-only:active { filter: brightness(1.15); }
@media (hover: hover) { a.loot-kind:hover { color: #14091a; background: var(--yellow); } a.loot-only:hover { filter: brightness(1.15); } }
.loot-facts { display: grid; gap: 6px; margin: 0 auto 12px; max-width: 560px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--border); text-align: left; font-size: .9rem; }
.loot-facts div { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: baseline; }
.loot-facts dt { font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.loot-facts dd { margin: 0; color: var(--text-soft); }
.loot:has(.mission-check input:checked) { border-color: rgb(47 227 200 / 35%); background: var(--bg-raised); }
.loot:has(.mission-check input:checked) > :not(.mission-check) { opacity: .5; }
.loot:has(.mission-check input:checked) .loot-tags::after { content: "Got it"; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: #14091a; background: var(--teal); }
.loot:target { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink), 0 0 36px -6px var(--pink); }

/* Chip rows (search result types): swipeable on phones, wrapped and centered wider. */
.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip:first-child { margin-left: auto; } .chip-row .chip:last-child { margin-right: auto; }
.chip { flex: none; min-height: 38px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-raised); color: var(--text-soft); cursor: pointer; font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.chip[aria-pressed="true"] { color: #14091a; background: var(--yellow); border-color: var(--yellow); }
.search-types { margin-top: 14px; }
@media (min-width: 720px) { .chip-row { flex-wrap: wrap; justify-content: center; } }
@media (hover: hover) { .chip:hover { color: var(--text); border-color: var(--yellow); } .chip[aria-pressed="true"]:hover { color: #14091a; } }
.sec-chest { --tone: var(--yellow); }

/* ---------------------------------------------------------------- search page */
.suggest { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.suggest a { display: flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: rgb(11 9 18 / 60%); color: var(--text-soft); text-decoration: none; font-size: .86rem; font-weight: 700; }
.search-status { min-height: 1.4em; margin: 14px 0 0; font-size: .86rem; font-weight: 700; color: var(--muted); }
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.result:active { border-color: var(--pink); }
.result-kind { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.result-title { font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 1.3rem; line-height: 1.15; }
.result-text { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) { .result:hover, .suggest a:hover { border-color: var(--pink); color: var(--text); } }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-raised); padding: 28px 0 36px; font-size: .84rem; color: var(--muted); text-align: center; }
.site-footer p { margin: 0 auto 6px; max-width: 760px; }
.footer-brand { font-family: var(--display); font-stretch: condensed; font-weight: 800; font-style: italic; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
@media (min-width: 720px) { .site-footer { padding: 36px 0 48px; } }

/* ---------------------------------------------------------------- shared bits */
.section-tight { padding-bottom: 4px; }
.section-intro { text-align: center; margin: -4px 0 14px; color: var(--muted); font-size: .95rem; }
.card-head { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.card-head h3, .card-head h2 { margin-bottom: 0; }
.flag { flex: none; display: inline-block; margin-left: 8px; font-family: var(--font); font-style: normal; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); border: 1px dashed rgb(255 207 92 / 55%); padding: 2px 6px; border-radius: 5px; vertical-align: middle; white-space: nowrap; cursor: help; }
.card-head .flag { margin-left: 0; }
.exclusive { --tone: var(--violet); border-color: rgb(166 124 255 / 45%); background: linear-gradient(180deg, rgb(166 124 255 / 9%), var(--surface) 60%); }
.window { margin: 0 0 12px; font-size: .9rem; color: var(--text-soft); display: flex; justify-content: center; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.window-label { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); border: 1px solid rgb(166 124 255 / 50%); padding: 2px 7px; border-radius: 5px; }
.preview-banner { background: var(--warn); color: #1d1500; text-align: center; font-size: .82rem; font-weight: 800; padding: 6px 16px; }

/* ---------------------------------------------------------------- tables (cheat lists etc.) */
/* Phones: every row is a card. The first cell is the title and the rest are
   labelled from data-label (set by build.py). From 720px: a normal table. */
.table-wrap thead { display: none; }
.table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
.table-wrap tbody { display: flex; flex-direction: column; gap: 10px; }
.table-wrap tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-align: center; }
.table-wrap td { padding: 5px 0; color: var(--text-soft); font-size: .93rem; }
.table-wrap td:first-child { padding-top: 0; color: var(--text); font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 1.4rem; line-height: 1.15; }
.table-wrap td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.table-wrap code { display: inline-block; font-size: 1.15rem; letter-spacing: .08em; padding: .25em .6em; color: var(--yellow); background: var(--bg); border-color: var(--border-strong); border-radius: 8px; }
.section-intro + .table-wrap, .card-grid + .table-wrap, .stack + .table-wrap { margin-top: 14px; }
@media (min-width: 720px) {
  .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .table-wrap table { display: table; width: 100%; border-collapse: collapse; font-size: .9rem; }
  .table-wrap thead { display: table-header-group; }
  .table-wrap tbody { display: table-row-group; }
  .table-wrap tr { display: table-row; background: none; border: 0; border-radius: 0; padding: 0; }
  .table-wrap th, .table-wrap td { display: table-cell; padding: 11px 14px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--border); font-size: .9rem; }
  .table-wrap th { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg-raised); white-space: nowrap; }
  .table-wrap td:first-child { padding-top: 11px; font-size: 1.15rem; }
  .table-wrap td[data-label]::before { content: none; }
  .table-wrap tbody tr:last-child td { border-bottom: 0; }
  .table-wrap code { white-space: nowrap; font-size: 1.05rem; padding: .15em .5em; }
  .table-wrap tr:target td { background: rgb(255 79 163 / 12%); }
}
@media (hover: hover) and (min-width: 720px) { .table-wrap tbody tr:hover td { background: rgb(255 255 255 / 3%); } }
