:root {
  color-scheme: dark;
  --page: #100d1b;
  --panel: #130f1d;
  --text: #f3e8d0;
  --muted: #d2c3ad;
  --gold: #f0cf83;
  --line: #c6a057;
  --purple: #e0a9f5;
  --font-display: 'Forum', Georgia, 'Times New Roman', serif;
  --font-reading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --gutter: clamp(1rem, 4.15vw, 3.75rem);
  font: 1rem/1.48 system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: #ffdfa2; }
:focus-visible { outline: 2px solid #ffe2a3; outline-offset: 4px; }
[id] { scroll-margin-block-start: 1.25rem; }
[hidden] { display: none !important; }

.wrap, .wide { width: min(calc(100% - 2 * var(--gutter)), 78.75rem); margin-inline: auto; }
.wide { max-width: 82.5rem; }
h1, h2, h3, .brand, strong { font-family: var(--font-display); font-weight: 400; }
nav, .lead, .pill, .world-details, .arc > p:last-child {
  font-family: var(--font-reading);
  font-weight: 500;
}
h2 { color: var(--gold); font-size: clamp(1.5rem, 2.47vw, 2.25rem); line-height: 1.08; text-transform: uppercase; }
h3 { line-height: 1.2; }
.lead { margin-block-start: .25em; font-size: clamp(1.1rem, 1.9vw, 1.65rem); font-style: italic; line-height: 1.2; }

.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; z-index: 10; inset: .75rem auto auto .75rem; padding: .75rem 1rem; background: var(--panel); }

.site-header { position: relative; z-index: 2; border-block-end: 1px solid #8d713f; background: #0c0912; }
.site-header::after { position: absolute; bottom: -1px; left: 50%; width: 15px; height: 8px; background: var(--line); clip-path: polygon(50% 0, 100% 100%, 0 100%); content: ''; }
.header-inner { display: flex; min-height: 75px; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem 2rem; padding-block: .45rem; }
.brand { color: var(--gold); font-size: clamp(1rem, 1.7vw, 1.48rem); font-weight: 700; text-transform: uppercase; line-height: 1; }
.brand img { width: clamp(7rem, 11vw, 10.5rem); }
.brand small { display: block; margin-block-start: .25rem; color: var(--muted); font: .66rem system-ui, sans-serif; }
.header-inner nav, .dossier nav { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem clamp(.55rem, 1.85vw, 1.9rem); }
.header-inner nav a { display: grid; min-height: 44px; align-items: center; color: var(--muted); }
.header-inner nav a:hover { color: var(--gold); text-decoration: underline; }

.frame {
  --frame-color: var(--line);
  position: relative;
  border: 1px solid var(--frame-color);
  border-radius: .65rem;
  background: var(--panel);
  box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 4px color-mix(in srgb, var(--frame-color) 52%, transparent);
}
.frame::after {
  position: absolute;
  inset: -7px;
  background:
    conic-gradient(from 45deg, var(--frame-color) 0 90deg, transparent 0) top left,
    conic-gradient(from 135deg, var(--frame-color) 0 90deg, transparent 0) top right,
    conic-gradient(from 315deg, var(--frame-color) 0 90deg, transparent 0) bottom left,
    conic-gradient(from 225deg, var(--frame-color) 0 90deg, transparent 0) bottom right;
  background-repeat: no-repeat;
  background-size: 13px 13px;
  content: '';
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  border: 1px solid var(--frame-color, var(--line));
  border-radius: 2rem;
  padding: .25em 1em;
  color: var(--text);
  background: #171121;
  font-weight: 700;
  line-height: 1.15;
}
a.pill:hover { background: #3c2c1c; }
.pill-gold { background: #d1ab62; color: #1c1011; }
a.pill-gold:hover { background: #e8c580; color: #1c1011; }

.hero { position: relative; }
.hero-art {
  --art-ratio: 2.366;
  --smoke-left: .065;
  --smoke-right: .288;
  position: absolute;
  inset: 0;
  container-type: size;
  overflow: hidden;
  background:
    linear-gradient(0deg, var(--page), transparent 20%),
    linear-gradient(90deg, #100c17c9, #100c1755 41%, transparent 64%),
    url('assets/illustrations/hero-library-hd.webp') center 44% / cover no-repeat;
}
.box-smoke {
  position: absolute;
  left: calc(50% + max(100cqw, 100cqh * var(--art-ratio)) * var(--emitter-x));
  top: calc(44% + max(100cqh, 100cqw / var(--art-ratio)) * .15);
  width: clamp(3.5rem, calc(max(100cqw, 100cqh * var(--art-ratio)) * .073), 13rem);
  aspect-ratio: 147 / 250;
  transform: translate(-50%, -100%);
  pointer-events: none;
}
.box-smoke-left {
  --emitter-x: var(--smoke-left);
  --direction: -1;
  --smoke-texture: url('assets/illustrations/box-smoke-left.webp');
}
.box-smoke-right {
  --emitter-x: var(--smoke-right);
  --direction: 1;
  --smoke-texture: url('assets/illustrations/box-smoke-right.webp');
}
.box-smoke i {
  --drift: calc(var(--direction) * 26%);
  --delay: 0s;
  position: absolute;
  inset: 0;
  transform-origin: center bottom;
  background: var(--smoke-texture) center / 100% 100% no-repeat;
  opacity: 0;
}
.box-smoke i:nth-child(2) { --drift: calc(var(--direction) * 42%); --delay: -1.6s; }
.box-smoke i:nth-child(3) { --drift: calc(var(--direction) * 32%); --delay: -3.3s; }
.box-smoke-right i:nth-child(2) { --delay: -2.4s; }
.box-smoke-right i:nth-child(3) { --delay: -4.2s; }
@media (prefers-reduced-motion: no-preference) {
  .box-smoke i { animation: box-smoke-rise 5s var(--delay) infinite ease-out; }
  .box-smoke i:first-child { animation: box-smoke-sway 2.7s ease-in-out infinite alternate; }
  .box-smoke-right i:first-child { animation-delay: -1.25s; }
}
@keyframes box-smoke-rise {
  0% { opacity: 0; transform: translate(0, 1%) scale(.7, .48); }
  27% { opacity: .88; }
  68% { opacity: .45; }
  100% { opacity: 0; transform: translate(var(--drift), -64%) scale(1.5, 1.25); }
}
@keyframes box-smoke-sway {
  from { opacity: .4; transform: skewX(-5deg) scale(.91, .89); }
  to { opacity: .94; transform: skewX(9deg) scale(1.12, 1.16); }
}
.hero-inner {
  position: relative;
  display: flex;
  min-height: calc(100vh - var(--opening-header-height, 76px));
  min-height: calc(100svh - var(--opening-header-height, 76px));
  flex-direction: column;
  padding-block: clamp(1rem, 4svh, 3.5rem) clamp(.75rem, 2.5svh, 2rem);
}
.hero-copy { width: min(46%, 34.5rem); margin-block: auto; text-align: center; }
#title { margin-block-end: clamp(.65rem, 2vw, 1.5rem); }
#title img {
  width: min(100%, 66svh);
  margin-inline: auto;
  filter: drop-shadow(0 4px 10px #11091e) drop-shadow(0 0 14px #9e4a915c);
}
.book-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.45rem, 1.4vw, 1rem);
  width: min(100%, 29rem);
  margin: clamp(.9rem, 3svh, 2rem) auto 0;
}
.menu-book {
  display: grid;
  min-width: 0;
  grid-template: 'cover' auto / minmax(0, 1fr);
  place-items: center;
  border-radius: .4rem;
  color: #ffe1a7;
  font: 400 clamp(.9rem, 1.85vw, 1.6rem)/1 var(--font-display);
  text-shadow: 0 2px 5px #07040c, 0 0 .6em #0e0916;
  filter: drop-shadow(0 .35rem .45rem #080610bd);
}
.menu-book img, .menu-book span { grid-area: cover; }
.menu-book img { width: 100%; }
.menu-book span { position: relative; padding-inline-start: 7%; }
.menu-book:hover, .menu-book:focus-visible {
  color: #fff1ce;
  filter: brightness(1.13) drop-shadow(0 0 .7rem #ad58dbab);
}
@media (prefers-reduced-motion: no-preference) {
  .menu-book { transition: transform 200ms ease, filter 200ms ease; }
  .menu-book:hover, .menu-book:focus-visible { transform: translateY(-.3rem) rotate(-2deg); }
}
@media (max-width: 48rem) {
  .book-menu { width: min(100%, 24rem); }
}
@media (max-height: 34rem) {
  .book-menu { width: min(100%, 21rem); }
}
.ribbon {
  position: absolute;
  inset: 0 .9rem auto auto;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .12rem;
  width: clamp(5rem, 9.5vw, 8.7rem);
  aspect-ratio: .72;
  padding: clamp(.45rem, 1.55vw, 1.4rem) .22rem 1rem;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  color: #e9cb91;
  background: #795d39;
  text-align: center;
  isolation: isolate;
}
.ribbon::before, .ribbon::after { position: absolute; clip-path: inherit; content: ''; }
.ribbon::before { z-index: -2; inset: 2px; background: #2a2017; }
.ribbon::after {
  z-index: -1;
  inset: 4px;
  background: radial-gradient(ellipse at 50% 38%, #4a3821, #241b13 72%);
  box-shadow: inset 0 0 0 1px #9e7a4a;
}
.ribbon img { width: 58%; height: auto; }
.ribbon strong { font-size: clamp(1.35rem, 2.8vw, 2.6rem); font-weight: 400; line-height: .98; }
.ribbon span { font: 700 clamp(.49rem, .93vw, .8rem)/1.12 Georgia, serif; text-transform: uppercase; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block-start: clamp(.75rem, 3svh, 2rem); padding: .75rem; }
.stats li { padding-inline: .5rem; text-align: center; color: var(--muted); }
.stats li + li { border-inline-start: 1px solid #6d5638; }
.stats svg {
  display: block;
  width: clamp(1.5rem, 3.2vw, 2.65rem);
  margin: 0 auto .2rem;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 .35rem #ad6cdf78);
}
.stats strong { display: block; color: var(--gold); font-size: clamp(1.5rem, 2.5vw, 2.25rem); line-height: 1.15; }

.dossier { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: 1.4rem clamp(1.4rem, 4vw, 4rem); padding: clamp(2rem, 4vw, 3.6rem) clamp(0rem, 1.8vw, 2rem) 1.2rem; }
.dossier .lead { font-style: normal; }
.campaign { margin-block: .8rem 1rem; font-size: .9rem; color: var(--muted); }
.dossier nav { gap: .45rem .7rem; }
.dossier nav a { min-height: 38px; }
.poll { padding: 1rem clamp(.8rem, 1.5vw, 1.4rem); }
.poll h3, .arc-type { color: var(--gold); font: 700 .8rem system-ui, sans-serif; letter-spacing: .025em; text-transform: uppercase; }
.poll > p { margin-block: .4rem .75rem; font: 700 clamp(1rem, 1.4vw, 1.2rem)/1.12 Georgia, serif; }
.poll dl div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-block-start: .3rem;
  padding: .23rem .55rem;
  border: 1px solid #655038;
  border-radius: .2rem;
  background: linear-gradient(90deg, var(--bar) var(--result), #20172b var(--result));
  color: #fff6ec;
  font-size: .82rem;
  font-weight: 650;
}

.hero-showcase {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  align-items: start;
  isolation: isolate;
  text-align: center;
}
.hero-showcase-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  container-type: size;
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 13%, #000 77%, transparent);
}
.showcase-image {
  position: absolute;
  inset: 50% auto auto 50%;
  width: max(100%, calc(100cqh * 1575 / 999));
  aspect-ratio: 1575 / 999;
  transform: translate(-50%, -50%);
}
.showcase-image img { width: 100%; }
.showcase-image::after {
  position: absolute;
  inset: 0;
  background: #09060fc9;
  opacity: 0;
  pointer-events: none;
  content: '';
}
.hero-showcase.has-spotlight .showcase-image::after { opacity: 1; }
.hero-outline {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 2px #f5c9ff) drop-shadow(0 0 9px #b751fb);
}
.hero-outline img { clip-path: var(--active-hero-contour, inset(50%)); }
.hero-showcase.has-spotlight .hero-outline { opacity: 1; }
.showcase-hotspots { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.hero-magic { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-magic i {
    position: absolute;
    width: var(--spark-size);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #edcdff;
    box-shadow: 0 0 5px 1px #ce76ff, 0 0 12px 2px #8a36efb3;
    animation: hero-magic-drift 720ms ease-out both;
  }
}
@keyframes hero-magic-drift {
  0% { opacity: .95; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(var(--spark-drift), var(--spark-rise)) scale(.2); }
}
.hero-hotspot {
  position: absolute;
  inset: 0;
  clip-path: var(--hero-contour);
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.hero-hotspot[aria-label="Cyrus"] {
  --hero-contour: polygon(
    2% 12%, 8% 18%, 12% 23%, 17% 32%, 20% 38%, 23% 43%, 26% 47%, 27% 50%,
    24% 54%, 21% 55%, 19% 58%, 21% 58%, 24% 61%, 27% 65%, 30% 65%, 31% 68%,
    29% 72%, 27% 75%, 24% 76%, 29% 82%, 27% 85%, 23% 87%, 21% 91%, 19% 91%,
    17% 86%, 14% 85%, 12% 86%, 11% 82%, 9% 83%, 10% 79%, 13% 75%, 14% 72%,
    12% 69%, 12% 64%, 13% 59%, 14% 57%, 13.6% 54%, 15% 52.5%, 17% 52%,
    19% 54%, 22% 51.5%, 20% 47%, 17% 43%, 16% 40%, 14% 39%, 12% 35%, 8% 30%, 5% 22%);
}
.hero-hotspot[aria-label="Kimiko"] {
  --hero-contour: polygon(
    18% 28%, 23% 26%, 27% 26%, 26% 22%, 25% 20%, 26% 16%, 27% 12%, 30% 9%,
    34% 7%, 37% 4%, 36% 1%, 38% 2%, 39% 4%, 38% 7%, 35% 9%, 37% 13%, 39% 17%,
    40% 15%, 42% 19%, 43% 20.5%, 46% 20%, 44% 17%, 42% 15%, 42% 12%, 43% 10%,
    43% 13%, 45% 14%, 49% 15%, 52% 10%, 56% 6%, 60% 4%, 65% 4%, 67% 6%,
    63% 5%, 58% 7%, 54% 11%, 51% 16%, 53% 20%, 53% 24%, 51.5% 27%, 49% 29%,
    53% 32%, 58% 31%, 61% 28%, 60% 24%, 58% 21%, 58% 23%, 57% 23%, 57% 20%,
    59% 17%, 62% 17%, 65% 20%, 67% 24%, 68% 22%, 69% 26%, 69% 32%, 67% 36%,
    64% 39%, 61% 38%, 59% 40%, 55% 40%, 53% 36%, 49% 36%, 46% 38%, 43% 42%,
    39% 49%, 34% 51%, 31% 49%, 27% 47%, 24% 44%, 26% 42%, 30% 43%, 31% 39%,
    28% 35%, 27% 30%, 23% 29%);
}
.hero-hotspot[aria-label="Ferron"] {
  --hero-contour: polygon(
    23% 55%, 29% 53%, 35% 50%, 36% 50%, 34% 54%, 39% 56%, 43% 58%, 44% 57%,
    46% 59%, 47% 55%, 48% 50%, 49% 47%, 48% 44%, 46% 46%, 43% 48%, 40% 48%,
    38% 46%, 38% 43%, 39% 44%, 41% 44%, 43% 42%, 45% 39%, 48% 36.5%, 51% 36%,
    54% 37%, 55% 40%, 55% 42%, 57% 41%, 59% 40%, 62% 38%, 62% 41%, 64% 45%,
    65.5% 43%, 66% 46%, 67% 49%, 69% 57%, 68% 59%, 70% 65%, 72% 72%, 71% 74%,
    69% 73%, 68% 78%, 67% 81%, 66% 86%, 65% 89%, 63% 94%, 60% 93%, 58% 91%,
    54% 92%, 52% 90%, 48% 88%, 46% 84%, 43% 84%, 40% 82%, 40% 73%, 43% 72%,
    40% 68%, 37% 67%, 34% 65%, 31% 62%, 27% 60%);
}
.hero-hotspot[aria-label="Rien"] {
  --hero-contour: polygon(
    67% 46%, 70% 47%, 71% 49%, 70% 45%, 70% 42%, 72% 40%, 74% 39.5%, 75% 40%,
    73% 41%, 72% 43%, 73% 46%, 75% 48%, 76% 48%, 76% 45%, 78% 46%, 79% 47%,
    80% 46%, 79.8% 43%, 80% 39%, 81% 42%, 83% 44%, 85% 44%, 84% 46%, 85% 48%,
    86% 50%, 85% 53%, 84% 55%, 85% 58%, 88% 61%, 91% 62%, 92% 64%, 91% 66%,
    87% 65%, 84% 64%, 84% 67%, 86% 70%, 85% 72%, 83% 70%, 82% 76%, 79% 76%,
    77% 79%, 74% 82%, 70% 83%, 67% 82%, 69% 77%, 71% 75%, 71% 72%, 72% 69%,
    73% 66%, 71% 65%, 73% 63%, 74% 61%, 74% 58%, 75% 55%, 72% 54%, 70% 52%);
}
.hero-showcase-content {
  position: relative;
  z-index: 3;
  padding-block: clamp(2.25rem, 5vw, 5rem);
  pointer-events: none;
}
.hero-description {
  position: absolute;
  z-index: 2;
  inset: 50% var(--gutter) auto auto;
  width: min(35vw, 37rem);
  max-height: 82svh;
  overflow: auto;
  padding: clamp(1rem, 2.3vw, 2.1rem);
  transform: translateY(-50%);
  border-inline-start: 2px solid var(--line);
  background: linear-gradient(90deg, #100b18ed, #100b18ab 76%, transparent);
  opacity: 0;
  pointer-events: none;
  text-align: start;
  text-shadow: 0 2px 8px #000;
}
.hero-showcase[data-description-side="left"] .hero-description {
  inset-inline: var(--gutter) auto;
}
.hero-showcase.has-spotlight .hero-description { opacity: 1; }
.hero-showcase.has-selected-hero .hero-description { pointer-events: auto; }
.hero-description h3 {
  margin-bottom: .3em;
  color: var(--gold);
  font-size: clamp(2.25rem, 4.5vw, 4.5rem);
  line-height: 1;
}
.hero-description p { max-width: 36ch; font: 500 clamp(1.18rem, 2vw, 1.8rem)/1.3 var(--font-reading); }
.hero-specialties {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
  margin-block: .7rem 1rem;
}
.hero-specialties:empty { display: none; }
.hero-specialties li {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .3rem;
  color: var(--text);
  font-size: clamp(.73rem, 1.1vw, .95rem);
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}
.hero-specialties img { width: clamp(1.8rem, 3.1vw, 2.8rem); }
.hero-showcase-content h2 {
  font-size: clamp(2.25rem, 6.25vw, 6rem);
  line-height: 1;
  text-shadow: 0 2px 8px #000, 0 0 24px #0e0819;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .showcase-image {
    transform: translate3d(-50%, calc(-50% + var(--scroll-offset, 0px)), 0) scale(1.075);
  }
  .showcase-image::after, .hero-outline, .hero-description { transition: opacity 240ms ease; }
  .hero-showcase.has-reveal .hero-showcase-art { transition: opacity 900ms ease-out; }
  .hero-showcase.has-reveal:not(.is-revealed) .hero-showcase-art { opacity: .32; }
}
.bestiary {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100svh;
  background:
    linear-gradient(var(--page), #100d1b20 25%, #100d1b0d 75%, var(--page)),
    url('assets/illustrations/bestiary/archive-hall.webp') center / cover no-repeat;
  text-align: center;
}
.bestiary-heading {
  padding-block: clamp(1.7rem, 5svh, 3.25rem) .5rem;
  text-shadow: 0 3px 14px #06040a;
}
.bestiary h2 { font-size: clamp(2rem, 5.4vw, 5rem); }
.monster-stage {
  position: relative;
  align-self: end;
  min-height: clamp(25rem, 75svh, 56rem);
  margin-block-end: clamp(1rem, 4svh, 3rem);
}
.monster {
  position: absolute;
  z-index: var(--depth, 0);
  inset: auto auto var(--floor) var(--x);
  width: var(--width);
  transform: translateX(-50%);
}
.monster-fiend { --x: 12%; --floor: 35%; --width: 18%; --glow: #a245cc; }
.monster-ushabti { --x: 35%; --floor: 38%; --width: 20%; --glow: #4acdbd; }
.monster-nightmare { --x: 63%; --floor: 38%; --width: 20%; --glow: #be68ff; }
.monster-necrosphinx { --x: 88%; --floor: 34%; --width: 22%; --glow: #c99a56; }
.monster-devourer { --x: 19%; --floor: 4%; --width: 28%; --depth: 1; --glow: #f66cd1; }
.monster-mimic { --x: 41%; --floor: 1%; --width: 17%; --depth: 1; --glow: #f79ae9; }
.monster-archivist { --x: 57%; --floor: 6%; --width: 21%; --depth: 1; --glow: #e1a753; }
.monster-marid { --x: 79%; --floor: 3%; --width: 23%; --depth: 1; --glow: #a69bff; }
.monster-trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.monster-trigger img {
  width: 100%;
  height: clamp(6rem, 32svh, 21rem);
  object-fit: contain;
  object-position: center bottom;
  filter: brightness(.88) drop-shadow(0 .6rem .7rem #08050ee0);
}
.monster-mimic img { height: clamp(5rem, 25svh, 16rem); }
.monster-trigger span {
  position: absolute;
  z-index: 1;
  inset: 84% auto auto 50%;
  width: max-content;
  max-width: min(11rem, 145%);
  padding: .28rem .6rem;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: #12091bee;
  color: var(--gold);
  opacity: 0;
  pointer-events: none;
  font: clamp(.8rem, 1.4vw, 1.2rem)/1.04 var(--font-display);
}
.monster:focus-within, .monster:has([aria-pressed="true"]) { z-index: 3; }
.monster-trigger:is(:focus-visible, [aria-pressed="true"]) img {
  filter: brightness(1.08) drop-shadow(0 .4rem .65rem #08050ee0) drop-shadow(0 0 .38rem var(--glow));
}
.monster-trigger:is(:focus-visible, [aria-pressed="true"]) span { opacity: 1; }
@media (hover: hover) {
  .monster:hover { z-index: 3; }
  .monster-trigger:hover img { filter: brightness(1.08) drop-shadow(0 .4rem .65rem #08050ee0) drop-shadow(0 0 .38rem var(--glow)); }
  .monster-trigger:hover span { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .monster-trigger img { transition: filter 260ms ease; }
  .monster-trigger span { transition: opacity 180ms ease; }
}
@media (max-width: 48rem) {
  .bestiary {
    background-image:
      linear-gradient(var(--page), #100d1b1a 25%, #100d1b1a 76%, var(--page)),
      url('assets/illustrations/bestiary/archive-hall-small.webp');
  }
  .monster-stage {
    display: grid;
    align-self: center;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1.5rem, 6svh, 3rem) .15rem;
    min-height: 0;
    width: calc(100% - 1.25rem);
  }
  .monster { position: relative; inset: auto; width: 100%; transform: none; }
  .monster-trigger img, .monster-mimic img { height: clamp(5.5rem, 20vw, 10rem); }
  .monster-trigger { padding-inline: 0; }
}

.divider { position: relative; border-block-start: 1px solid var(--line); }
.divider::before { position: absolute; top: -5px; left: calc(50% - 4px); width: 9px; height: 9px; border: 2px solid var(--line); background: var(--page); box-shadow: 0 0 0 5px var(--page); transform: rotate(45deg); content: ''; }
.stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 5vw, 4rem); padding-block: clamp(1.7rem, 3vw, 2.5rem) 2rem; }
.stories h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
.stories h2 span { margin-inline-end: .25em; }
.stories .lead { font-size: clamp(1.1rem, 1.65vw, 1.45rem); }
.world-details { display: grid; grid-template-columns: minmax(0, 1fr) min(30%, 9rem); align-items: center; gap: 1.2rem; margin-block-start: 1rem; color: var(--muted); }
.world-details p + p { margin-block-start: .25rem; }
.medallion { display: grid; place-content: center; justify-items: center; width: 100%; aspect-ratio: 1; border: 4px solid #eccc85; border-radius: 50%; background: #86612b; box-shadow: inset 0 0 0 5px #bd914c, inset 0 0 0 7px #e4bd6f; color: #ffe4a4; text-align: center; }
.medallion strong { font-size: clamp(1.15rem, 2.55vw, 2.3rem); line-height: 1; }
.medallion span { font-size: clamp(.5rem, .9vw, .76rem); font-weight: 600; text-transform: uppercase; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-block-start: 1.45rem; text-align: center; color: var(--text); font-weight: 600; }
.steps li > span { display: grid; width: clamp(2.6rem, 6.2vw, 5.1rem); aspect-ratio: 1; place-items: center; margin: .8rem auto 1.35rem; border: 3px double #e5ba68; background: #76501d; box-shadow: 0 0 18px #aa60215c; transform: rotate(45deg); color: #ffe7b5; }
.steps b { transform: rotate(-45deg); font: 700 clamp(1.25rem, 3vw, 2.5rem) Georgia, serif; }

.arcs, .guide-content { padding-block: 1.4rem 1.55rem; text-align: center; }
.arcs .lead { color: var(--purple); font-size: clamp(1.1rem, 1.8vw, 1.45rem); }
.arc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.85rem, 1.5vw, 1.5rem); margin-block-start: 1.2rem; }
.arc { padding: .7rem .65rem 1.4rem; color: var(--muted); }
.arc-banner {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem;
  min-height: 6.8rem;
  padding: .45rem;
  border: 1px solid #816069;
  background:
    radial-gradient(ellipse at 12% 85%, #a13fcb69, transparent 46%),
    linear-gradient(#1e10284d, #100e19),
    url('assets/illustrations/library.webp') center / auto 180% repeat-x;
}
.arc-banner > span:first-child { display: grid; min-width: 2rem; min-height: 2rem; place-items: center; border: 1px solid var(--frame-color); color: var(--gold); background: #1b1224; font: 700 1rem Georgia, serif; }
.arc-banner .pill { font-size: .85rem; }
.arc-type { margin-block: .75rem .45rem; color: var(--purple); }
.arc h3 { margin-block-end: .5rem; color: #f8e0a5; font-size: 1rem; text-transform: uppercase; }
.arc > p:last-child { font-size: .9rem; }
.arc-fire { --frame-color: #e47356; --panel: #211016; }
.arc-fire .arc-banner { background: radial-gradient(ellipse at 20% 95%, #bc4f24, transparent 58%), linear-gradient(165deg, #3a1a17, #170f19); }
.arc-fire .arc-type { color: #ff9e82; }

.guide { position: relative; isolation: isolate; }
.guide::after { position: absolute; z-index: -1; inset: 30% 0 0; background: linear-gradient(var(--page), #100d1b28 65%, #100d1b), url('assets/illustrations/archive-monster.webp') center bottom / auto 95% no-repeat; content: ''; }
.guide-layout { width: min(100%, 42rem); margin: .875rem auto 1.5rem; }
.components img { width: 100%; max-height: 245px; object-fit: contain; }
.guide-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(.55rem, 4vw, 4.5rem); margin-block-start: clamp(1.8rem, 5vw, 4.5rem); }
.guide-stats li { display: grid; align-content: center; justify-items: center; width: clamp(4rem, 6.5vw, 6rem); aspect-ratio: 1; border: 3px solid #e4b6fb; border-radius: 50%; background: radial-gradient(circle at 50% 25%, #66317d, #39154d 70%); box-shadow: 0 0 18px #a23ee0a0; }
.guide-stats strong { line-height: 1.15; font-size: clamp(1rem, 1.9vw, 1.55rem); }
.guide-stats span { font-size: .67rem; text-transform: uppercase; }

.site-footer { border-block-start: 1px solid #856841; background: #0c0912; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) auto; align-items: center; gap: .8rem 1.5rem; padding-block: .75rem; }
.footer-copy { font-size: .85rem; color: var(--muted); }
.footer-copy p { font-size: .75rem; }
.footer-copy nav { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.footer-copy nav a:hover { text-decoration: underline; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; color: var(--gold); font: 700 .9rem Georgia, serif; }
.footer-links a:first-child { text-transform: uppercase; }
.footer-links a + a { padding-inline-start: .75rem; border-inline-start: 1px solid #745a37; }
.archive-search { position: relative; }
.search-field { display: flex; width: 100%; padding: 0 .35rem 0 .8rem; }
.search-field input, .search-field button { min-height: 2.15rem; border: 0; background: transparent; color: var(--text); font: inherit; }
.search-field input { flex: 1; width: 100%; min-width: 0; }
.search-field button { padding-inline: .5rem; cursor: pointer; }
.search-results { position: absolute; z-index: 3; inset: auto 0 calc(100% + .5rem); max-height: 17rem; overflow: auto; padding: .8rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--panel); }
.search-results a { display: block; padding-block: .4rem; color: var(--gold); text-decoration: underline; }

@media (min-width: 64rem) {
  .hero-showcase-art {
    mask-image: linear-gradient(transparent, #000 19%, #000 75%, transparent);
  }
  .guide::after {
    inset-block-start: 0;
    background:
      linear-gradient(var(--page), #100d1b2e 30%, #100d1b25 72%, var(--page)),
      url('assets/illustrations/archive-monster-wide.webp') center 32% / cover no-repeat;
  }
}

@media (min-width: 90rem) {
  .hero-art {
    --art-ratio: 3;
    --smoke-left: .082;
    --smoke-right: .291;
    background-image:
      linear-gradient(0deg, var(--page), transparent 20%),
      linear-gradient(90deg, #100c17c9, #100c1755 41%, transparent 64%),
      url('assets/illustrations/hero-library-wide.webp');
  }
}

@media (max-width: 68rem) {
  .header-inner { justify-content: center; text-align: center; }
  .header-inner nav { justify-content: center; }
  .arc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1.25fr 1fr; }
  .footer-links { grid-column: 1 / -1; }
}

@media (max-width: 48rem), (max-aspect-ratio: 5/4) {
  .showcase-image { width: 100%; }
  .hero-showcase-art { mask-image: none; }
  .showcase-image img { mask-image: linear-gradient(transparent, #000 13%, #000 82%, transparent); }
  .showcase-image::after { mask-image: linear-gradient(transparent, #000 13%, #000 82%, transparent); }
}

@media (max-width: 48rem) {
  .hero-description, .hero-showcase[data-description-side="left"] .hero-description {
    inset: auto var(--gutter) clamp(.75rem, 4svh, 2rem);
    width: auto;
    max-height: 46svh;
    transform: none;
    background: linear-gradient(90deg, #100b18f5, #100b18de);
  }
  .hero-description h3 { font-size: clamp(1.9rem, 7vw, 3rem); }
  .hero-description p { max-width: 45ch; font-size: clamp(1.15rem, 3.6vw, 1.35rem); }
  .hero-art {
    background:
      linear-gradient(0deg, var(--page), transparent 19%, transparent 35%, #100c16 65%),
      url('assets/illustrations/hero-library-mobile-hd.webp') center bottom / min(100%, 40rem) auto no-repeat,
      linear-gradient(#100c17a0, #100c17a0),
      url('assets/illustrations/hero-library.webp') left center / cover no-repeat;
  }
  .box-smoke {
    left: calc(50% + min(100vw, 40rem) * var(--mobile-emitter-x));
    top: auto;
    bottom: min(41.5vw, 16.6rem);
    width: clamp(2.5rem, 17vw, 6.8rem);
    transform: translateX(-50%);
  }
  .box-smoke-left { --mobile-emitter-x: -.25; }
  .box-smoke-right { --mobile-emitter-x: .262; }
  .hero-inner {
    min-height: calc(100svh - var(--opening-header-height, 8rem));
    padding-block: .85rem .75rem;
  }
  .hero-copy { width: min(100%, 34.5rem); margin: 0 auto; padding-block-end: clamp(.75rem, 3svh, 2rem); }
  #title img { width: min(100%, 39svh, 23rem); }
  .ribbon { inset: auto 0 8rem auto; }
  .hero .stats { margin-block-start: auto; }
  .dossier, .stories, .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .dossier nav a { min-height: 44px; }
  .footer-inner { padding-block: 1rem; }
}

@media (max-width: 31rem) {
  .header-inner { padding-block: .7rem; }
  .header-inner nav a { padding-inline: .25rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .7rem; font-size: .88rem; }
  .stats li:nth-child(3) { border-inline-start: 0; }
  .world-details { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .medallion { width: 6rem; margin-inline: auto; }
  .steps { font-size: .82rem; gap: .2rem; }
  .arc-grid { grid-template-columns: minmax(0, 1fr); }
}
