@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Crimson+Pro:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@500;600;700&display=swap");

:root {
  --night-950: #070817;
  --night-900: #0c1026;
  --night-850: #111735;
  --night-800: #171d40;
  --violet: #6f5ca8;
  --violet-soft: #9886c8;
  --moon: #f8edc9;
  --paper: #f3e4b9;
  --paper-deep: #dfc78f;
  --ink: #2c211c;
  --ink-soft: #5f4a3a;
  --paper-accent: #71451f;
  --paper-accent-strong: #4a2d18;
  --paper-focus: #60380f;
  --gold: #d9b45b;
  --gold-light: #f1d98d;
  --amber: #e6a84e;
  --green: #334f3d;
  --line: rgba(230, 201, 126, 0.26);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  --serif-display: "Cormorant Garamond", Georgia, serif;
  --serif-body: "Crimson Pro", Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--moon);
  background:
    radial-gradient(circle at 16% 8%, rgba(103, 83, 168, 0.23), transparent 32rem),
    radial-gradient(circle at 85% 28%, rgba(49, 82, 72, 0.2), transparent 34rem),
    var(--night-950);
  font-family: var(--serif-body);
  font-size: clamp(1.08rem, 0.98rem + 0.3vw, 1.28rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: var(--gold-light);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 5, 15, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(calc(100% - 2rem), 1380px);
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: block;
  flex: 0 0 auto;
  text-decoration: none;
}

.wordmark-crop {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 1905 / 344;
}

.wordmark-crop img {
  position: absolute;
  z-index: 1;
  top: -69%;
  left: -2.21%;
  width: 104.1%;
  max-width: none;
  height: auto;
}

.wordmark-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1;
}

.wordmark-crop.image-missing .wordmark-fallback {
  display: flex;
}

.wordmark-crop.image-missing img {
  display: none;
}

.brand-wordmark {
  width: clamp(220px, 18vw, 246px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.2rem, 0.55vw, 0.55rem);
}

.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.header-search-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
}

.header-search-icon img {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.58));
  transition: filter 150ms ease, transform 150ms ease;
}

.header-search-icon:hover img,
.header-search-icon[aria-current="page"] img {
  filter:
    brightness(1.12)
    drop-shadow(0 0 7px rgba(241, 217, 141, 0.55))
    drop-shadow(0 3px 5px rgba(0, 0, 0, 0.58));
  transform: rotate(-4deg) scale(1.06);
}

.nav-sign {
  position: relative;
  width: clamp(137px, 12.8vw, 176px);
  height: clamp(39px, 3.65vw, 49px);
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(248, 237, 201, 0.94);
  background: url("notice-action-plaque.webp") center / 100% 100% no-repeat;
  font: 700 clamp(0.58rem, 0.58vw, 0.69rem) / 1.05 var(--sans);
  letter-spacing: 0.045em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 3px #02030a;
  text-transform: uppercase;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.55));
  transition: filter 150ms ease, transform 150ms ease;
}

.nav-sign img {
  display: none;
}

.nav-sign span {
  position: static;
  width: auto;
  height: auto;
  padding: 0 1rem;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.nav-sign:hover {
  filter: brightness(1.13) drop-shadow(0 7px 9px rgba(0, 0, 0, 0.62));
  transform: translateY(-2px);
}

.nav-sign[aria-current="page"] {
  filter: drop-shadow(0 0 8px rgba(229, 175, 67, 0.72)) drop-shadow(0 5px 7px rgba(0, 0, 0, 0.55));
  transform: translateY(-1px);
}

.nav-sign[aria-current="page"]::after {
  content: none;
}

.nav-sign.image-missing {
  color: var(--moon);
  background: #101933;
  border: 1px solid rgba(241, 217, 141, 0.65);
  font: 800 0.72rem/1 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-sign.image-missing img {
  display: none;
}

.nav-sign.image-missing span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.mobile-utility-group {
  display: none;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid rgba(241, 217, 141, 0.5);
  border-radius: 50%;
  background: #080918;
  box-shadow: 0 0 18px rgba(230, 168, 78, 0.2);
}

.nav-toggle img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-toggle-bars {
  position: absolute;
  right: 2px;
  bottom: 5px;
  width: 15px;
  height: 11px;
  border-top: 2px solid var(--gold-light);
  border-bottom: 2px solid var(--gold-light);
  background: linear-gradient(var(--gold-light), var(--gold-light)) center / 100% 2px no-repeat;
  filter: drop-shadow(0 1px 2px #02030a);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: inherit;
  font-family: var(--serif-display);
  line-height: 0.98;
  text-wrap: balance;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3.6rem, 9vw, 8.8rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 5vw, 5rem);
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.65rem, 2.4vw, 2.45rem);
}

p {
  margin: 0 0 1.15em;
}

.button {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  min-width: 218px;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.75rem 2rem;
  border: 0;
  border-radius: 8px;
  color: #fff0b5;
  background: url("notice-action-plaque.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.58));
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 3px #02030a;
  text-wrap: balance;
  text-transform: uppercase;
  transition: filter 150ms ease, transform 150ms ease;
  white-space: normal;
}

.button:hover {
  filter: brightness(1.13) drop-shadow(0 9px 11px rgba(0, 0, 0, 0.64));
  transform: translateY(-2px);
}

.button-ghost {
  color: rgba(248, 237, 201, 0.9);
  background-image: linear-gradient(rgba(4, 5, 14, 0.35), rgba(4, 5, 14, 0.35)), url("notice-action-plaque.webp");
}

.nav-sign,
.button,
.footer-nav a,
.gallery-section-nav a,
.notice-action {
  overflow-wrap: anywhere;
  text-align: center;
  text-wrap: balance;
  white-space: normal;
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  overflow: clip;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: -3;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(4, 6, 20, 0.52) 0%, rgba(6, 8, 25, 0.12) 54%, rgba(4, 6, 20, 0.06) 100%),
    linear-gradient(0deg, var(--night-950) 0%, transparent 34%),
    url("threshold-environment-v2.webp") center / cover;
  filter: saturate(0.92) brightness(0.82);
  transform: scale(1.035);
}

.hero::after {
  position: absolute;
  z-index: -2;
  inset: -20% 38% 8% -12%;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 118, 213, 0.3), transparent 60%);
  filter: blur(18px);
}

.hero-inner {
  width: min(calc(100% - 2rem), var(--content));
  padding: clamp(4rem, 8vw, 8rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.hero-home .hero-inner {
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.04fr);
}

.hero-home .hero-lede {
  max-width: 34rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
  animation: story-rise 850ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy h1 {
  color: var(--gold-light);
  text-shadow: 0 4px 34px rgba(0, 0, 0, 0.52);
}

.hero-lede {
  max-width: 39rem;
  color: rgba(248, 237, 201, 0.88);
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.75rem);
  line-height: 1.45;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.threshold-side {
  min-height: min(68svh, 650px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
}

.threshold-side span {
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  color: rgba(248, 237, 201, 0.8);
  border: 1px solid rgba(241, 217, 141, 0.3);
  border-radius: 999px;
  background: rgba(7, 8, 23, 0.55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.threshold-frame {
  position: relative;
  width: min(100%, 450px);
  justify-self: center;
  padding: 13px;
  border: 1px solid rgba(240, 213, 142, 0.55);
  border-radius: 48% 48% 16px 16px / 23% 23% 16px 16px;
  background: linear-gradient(135deg, rgba(241, 217, 141, 0.25), rgba(75, 54, 102, 0.2));
  box-shadow:
    0 0 0 9px rgba(10, 11, 32, 0.58),
    0 0 0 10px rgba(217, 180, 91, 0.24),
    0 30px 80px rgba(0, 0, 0, 0.65),
    0 0 90px rgba(123, 104, 187, 0.22);
}

.threshold-frame img {
  width: 100%;
  height: min(70svh, 680px);
  border-radius: 48% 48% 8px 8px / 22% 22% 8px 8px;
  object-fit: cover;
  object-position: center;
}

.threshold-frame::before,
.threshold-frame::after {
  position: absolute;
  top: 16%;
  bottom: 5%;
  width: 35%;
  content: "";
  pointer-events: none;
}

.threshold-frame::before {
  left: -25%;
  background: linear-gradient(90deg, transparent, rgba(5, 7, 22, 0.85));
  transform: perspective(600px) rotateY(-42deg);
  transform-origin: right;
}

.threshold-frame::after {
  right: -25%;
  background: linear-gradient(-90deg, transparent, rgba(5, 7, 22, 0.85));
  transform: perspective(600px) rotateY(42deg);
  transform-origin: left;
}

.section {
  padding: clamp(4.5rem, 8vw, 8.5rem) 1rem;
}

.section-inner {
  width: min(100%, var(--content));
  margin: 0 auto;
}

.section-heading {
  max-width: 48rem;
  margin: 0 auto clamp(2rem, 5vw, 4.5rem);
  text-align: center;
}

.section-heading p:last-child {
  color: rgba(248, 237, 201, 0.74);
}

.toc-section {
  position: relative;
  margin-top: -1px;
  padding-top: clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(circle at 50% 0, rgba(115, 91, 165, 0.28), transparent 36rem),
    linear-gradient(180deg, var(--night-950), #11142d 40%, #080a1a);
}

.toc-section .section-heading {
  margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

.book-spread {
  position: relative;
  width: min(100%, 1080px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: var(--ink);
  border: 12px solid #4b3022;
  border-radius: 20px 24px 24px 20px;
  background: #4b3022;
  box-shadow: var(--shadow);
}

.book-spread::after {
  position: absolute;
  z-index: 3;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 3px;
  content: "";
  background: linear-gradient(90deg, rgba(67, 42, 25, 0.2), rgba(67, 42, 25, 0.72), rgba(255, 255, 255, 0.12));
  box-shadow: 0 0 22px rgba(65, 41, 26, 0.46);
}

.book-page {
  min-height: 550px;
  padding: clamp(2rem, 5vw, 4.5rem);
  background:
    linear-gradient(90deg, rgba(122, 82, 40, 0.1), transparent 12%, transparent 88%, rgba(122, 82, 40, 0.08)),
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.35), transparent 30rem),
    var(--paper);
}

.book-page:first-child {
  border-radius: 10px 2px 2px 10px;
}

.book-page:last-child {
  border-radius: 2px 10px 10px 2px;
}

.home-volume .book-page:last-child {
  position: relative;
  padding-bottom: 3rem;
}

.book-cover-inset {
  width: 112px;
  margin: 2rem auto 0;
  padding: 4px;
  border: 1px solid rgba(90, 55, 31, 0.28);
  border-radius: 46% 46% 5px 5px / 18% 18% 5px 5px;
  background: #5d3c2b;
  box-shadow: 0 12px 24px rgba(74, 45, 27, 0.25);
}

.book-cover-inset img {
  border-radius: inherit;
}

.book-page h2,
.book-page h3 {
  color: #3f2c22;
}

.book-page .eyebrow {
  color: var(--paper-accent);
}

.book-page :focus-visible,
.parchment-section :focus-visible,
.story-reader :focus-visible {
  outline-color: var(--paper-focus);
}

.chapter-link {
  position: relative;
  display: block;
  margin: 0 -0.35rem;
  padding: 1rem 2.6rem 1rem 0.35rem;
  border-bottom: 1px solid rgba(90, 61, 38, 0.2);
  color: var(--ink);
  text-decoration: none;
}

.chapter-link::after {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  content: "→";
  color: #8d5b35;
  font-family: var(--sans);
  transform: translateY(-50%);
}

.chapter-link strong,
.chapter-link span {
  display: block;
}

.chapter-link strong {
  font-family: var(--serif-display);
  font-size: 1.65rem;
  line-height: 1.1;
}

.chapter-link span {
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.35;
}

.chapter-link:hover {
  padding-left: 0.7rem;
  background: rgba(156, 106, 56, 0.07);
}

.world-preview {
  position: relative;
  overflow: hidden;
  color: var(--moon);
  background: #0c1225;
}

.world-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.map-window {
  position: relative;
  padding: 9px;
  border: 1px solid rgba(241, 217, 141, 0.5);
  border-radius: 58% 58% 16px 16px / 16% 16% 16px 16px;
  background: rgba(217, 180, 91, 0.12);
  box-shadow: var(--shadow);
}

.map-window img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.ink-link {
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.site-footer {
  padding: 3.5rem 1rem 2rem;
  border-top: 1px solid var(--line);
  background: #060713;
}

.footer-inner {
  width: min(100%, var(--content));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
}

.footer-inner p {
  margin: 0;
}

.footer-copy {
  max-width: 620px;
}

.footer-wordmark {
  width: min(278px, 82vw);
  margin-bottom: 0.9rem;
}

.footer-title {
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: 1.8rem;
  font-weight: 700;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
}

.footer-nav a {
  position: relative;
  min-width: 122px;
  min-height: 38px;
  padding: 0.4rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 237, 201, 0.9);
  background: url("notice-action-plaque.webp") center / 100% 100% no-repeat;
  filter: brightness(0.82) saturate(0.85) drop-shadow(0 4px 5px rgba(0, 0, 0, 0.48));
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 3px #02030a;
  text-transform: uppercase;
  transition: filter 150ms ease, transform 150ms ease;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  filter: brightness(1.08) drop-shadow(0 5px 7px rgba(0, 0, 0, 0.58));
  transform: translateY(-1px);
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(230, 201, 126, 0.14);
  color: rgba(248, 237, 201, 0.52);
  font-family: var(--sans);
  font-size: 0.72rem;
}

/* Interior pages */
.page-hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  display: grid;
  place-items: end start;
  isolation: isolate;
}

.page-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background:
    linear-gradient(0deg, var(--night-950) 0%, rgba(7, 8, 23, 0.36) 58%, rgba(7, 8, 23, 0.2)),
    var(--hero-image, url("moonlit-vale-map.webp")) var(--hero-position, center) / cover;
  filter: saturate(0.85) brightness(0.72);
}

.page-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  box-shadow: inset 0 -120px 120px -60px var(--night-950);
}

.page-hero-inner {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 6rem 0 3rem;
  animation: story-rise 760ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.page-hero h1 {
  max-width: 920px;
  margin-bottom: 0.7rem;
  font-size: clamp(4rem, 9vw, 8.2rem);
  color: var(--gold-light);
  text-shadow: 0 5px 40px rgba(0, 0, 0, 0.65);
}

/* Approved responsive mockup fallback: baked visual copy with semantic plaque hitmaps. */
.quiet-crossroads {
  min-height: 910px;
  padding: 0;
  display: grid;
  place-items: start center;
  background: #050815;
}

.quiet-crossroads-stage {
  position: relative;
  width: min(100%, 1072px);
  aspect-ratio: 1072 / 910;
  background: url("404-quiet-crossroads-desktop.webp") top center / 100% 100% no-repeat;
  box-shadow: 0 0 42px rgba(1, 3, 10, 0.72);
}

.quiet-crossroads-hitmap {
  position: absolute;
  left: 21.5%;
  width: 39.5%;
  border-radius: 10px;
  cursor: pointer;
}

.quiet-crossroads-hitmap-enter {
  top: 56.7%;
  height: 9.3%;
}

.quiet-crossroads-hitmap-library {
  top: 66.7%;
  height: 9.1%;
}

.quiet-crossroads-hitmap-explore {
  top: 76.3%;
  height: 8.8%;
}

.quiet-crossroads-hitmap:hover {
  background: rgba(241, 217, 141, 0.08);
  box-shadow: inset 0 0 22px rgba(255, 240, 180, 0.3), 0 0 16px rgba(230, 168, 78, 0.5);
}

.quiet-crossroads-hitmap:focus-visible {
  outline: 4px solid var(--gold-light);
  outline-offset: -4px;
  background: rgba(241, 217, 141, 0.11);
  box-shadow: 0 0 18px rgba(241, 217, 141, 0.84);
}

@media (max-width: 720px) {
  .quiet-crossroads {
    min-height: 895px;
  }

  .quiet-crossroads-stage {
    width: min(100%, 338px);
    aspect-ratio: 338 / 895;
    background-image: url("404-quiet-crossroads-mobile.webp");
  }

  .quiet-crossroads-hitmap {
    left: 0;
    width: 96%;
    border-radius: 8px;
  }

  .quiet-crossroads-hitmap-enter {
    top: 56.3%;
    height: 9%;
  }

  .quiet-crossroads-hitmap-library {
    top: 65.4%;
    height: 8.8%;
  }

  .quiet-crossroads-hitmap-explore {
    top: 74.3%;
    height: 8.8%;
  }
}

@media (forced-colors: active) {
  .quiet-crossroads-hitmap {
    border: 2px solid LinkText;
  }
}

.page-intro {
  max-width: 44rem;
  color: rgba(248, 237, 201, 0.85);
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.6rem);
}

.parchment-section {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(129, 82, 43, 0.06), transparent 12rem),
    #e9d6a9;
}

.parchment-section .eyebrow {
  color: #7f532c;
}

.parchment-section .section-heading p:last-child {
  color: var(--ink-soft);
}

.parchment-section h2,
.parchment-section h3 {
  color: #3a281f;
}

.library-hero {
  min-height: 620px;
}

.library-hero::before {
  filter: saturate(0.9) brightness(0.72);
}

.story-reader-shell {
  padding: clamp(3rem, 7vw, 7rem) 1rem;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(7, 8, 23, 0.74), rgba(7, 8, 23, 0.95) 48rem, #070817 72rem),
    url("library-environment-v2.webp") center top / 100% auto no-repeat,
    #070817;
  background-attachment: fixed;
}

.story-reader {
  position: relative;
  width: min(100%, 940px);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 6.4rem);
  border: 1px solid rgba(188, 139, 67, 0.62);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.64), transparent 30rem),
    repeating-linear-gradient(0deg, rgba(111, 73, 37, 0.018) 0, rgba(111, 73, 37, 0.018) 1px, transparent 1px, transparent 5px),
    linear-gradient(90deg, rgba(102, 62, 31, 0.075), transparent 9%, transparent 91%, rgba(102, 62, 31, 0.075)),
    #f4e7c3;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.58),
    0 0 0 7px rgba(216, 180, 91, 0.09);
}

.story-reader::before {
  position: absolute;
  inset: 1.15rem;
  content: "";
  border: 1px solid rgba(132, 87, 43, 0.26);
  box-shadow: inset 0 0 42px rgba(92, 55, 28, 0.055);
  pointer-events: none;
}

.story-reader-header {
  position: relative;
  z-index: 1;
  margin-bottom: 3rem;
  padding-bottom: 2.35rem;
  text-align: center;
}

.story-reader-header::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  content: "";
  background: #a87534;
  box-shadow:
    -82px 3px 0 -3px #a87534,
    82px 3px 0 -3px #a87534;
  transform: translateX(-50%) rotate(45deg);
}

.story-reader-header h1 {
  max-width: 780px;
  margin-right: auto;
  margin-left: auto;
  color: #39271f;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  text-shadow: 0 1px rgba(255, 255, 255, 0.5);
  text-wrap: balance;
}

.story-reader-header p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0;
  color: #785333;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-reader-header p::before,
.story-reader-header p::after {
  width: 2.6rem;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(128, 82, 39, 0.52));
}

.story-reader-header p::after {
  transform: scaleX(-1);
}

.story-illustration {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  margin: 0 auto 3rem;
  padding: 10px;
  border: 1px solid rgba(198, 151, 77, 0.72);
  background: linear-gradient(145deg, #3b2a22, #6a492d 45%, #2a211e);
  box-shadow:
    0 20px 48px rgba(48, 27, 17, 0.28),
    inset 0 0 0 1px rgba(248, 220, 151, 0.25);
}

.story-illustration img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.story-prose {
  position: relative;
  z-index: 1;
  max-width: 690px;
  margin: 0 auto;
  font-size: clamp(1.18rem, 1.08rem + 0.38vw, 1.42rem);
  line-height: 1.72;
}

.story-prose p {
  margin: 0 0 1.25em;
  text-wrap: pretty;
}

.story-prose p:first-child::first-letter {
  float: left;
  margin: 0.04em 0.09em 0 0;
  color: #7c4e2a;
  font-family: var(--serif-display);
  font-size: 4.5em;
  font-weight: 700;
  line-height: 0.72;
}

.story-prose blockquote {
  margin: 2rem 0;
  padding: 1.4rem 1.7rem;
  border-left: 3px solid #a36d35;
  color: #583d2b;
  background: rgba(160, 106, 51, 0.08);
  font-style: italic;
}

.reader-nav {
  width: min(100%, 940px);
  margin: 2rem auto 0;
  padding: 1.15rem 1.35rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(217, 180, 91, 0.34);
  background: rgba(9, 12, 30, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
}

.reader-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--gold-light);
  text-decoration: none;
  text-underline-offset: 0.25em;
}

.reader-nav a:nth-child(2) {
  justify-self: center;
  color: var(--moon);
  text-align: center;
}

.reader-nav a:last-child {
  justify-self: end;
  text-align: right;
}

.reader-nav a:hover,
.reader-nav a:focus-visible {
  text-decoration: underline;
}

.story-reader-end {
  position: relative;
  z-index: 1;
  max-width: 690px;
  margin: 3.5rem auto 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #785333;
  font: 700 0.72rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.story-reader-end::before,
.story-reader-end::after {
  height: 1px;
  flex: 1;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(128, 82, 39, 0.42));
}

.story-reader-end::after {
  transform: scaleX(-1);
}

.explore-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.map-room-hero {
  min-height: 610px;
}

.map-room-hero::before {
  filter: saturate(0.94) brightness(0.9);
}

.map-room-section {
  position: relative;
  background:
    linear-gradient(180deg, rgba(7, 8, 23, 0.68), rgba(7, 8, 23, 0.94)),
    url("map-room-environment-v2.webp") center / cover;
}

.map-room-section .map-frame {
  position: relative;
  top: auto;
  width: 100%;
  border: 8px solid #5a3825;
  background: #5a3825;
  transform: none;
}

.map-room-section .explore-layout {
  grid-template-columns: minmax(0, 1fr);
}

.map-room-section .place-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.map-frame {
  position: sticky;
  top: 96px;
  padding: 9px;
  border: 1px solid rgba(216, 180, 91, 0.42);
  background: #4a3023;
  box-shadow: var(--shadow);
}

.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.map-canvas img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.map-marker {
  position: absolute;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #24180f;
  border: 2px solid #fff1bb;
  border-radius: 50% 50% 50% 10%;
  background: var(--gold-light);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  font: 800 0.8rem/1 var(--sans);
  text-decoration: none;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.map-marker span {
  transform: rotate(45deg);
}

.map-marker:hover {
  z-index: 2;
  background: #fff1bb;
  scale: 1.08;
}

.marker-tree {
  top: 46%;
  left: 74.5%;
}

.marker-peak {
  top: 12%;
  left: 80%;
}

.marker-mill {
  top: 64%;
  left: 63%;
}

.place-list {
  display: grid;
  gap: 1rem;
}

.map-destinations {
  width: 100%;
}

.place-link {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--line);
  color: var(--moon);
  background: rgba(21, 27, 58, 0.74);
  text-decoration: none;
}

.place-link:hover {
  border-color: rgba(241, 217, 141, 0.65);
  background: rgba(31, 38, 78, 0.9);
}

.place-link h2,
.place-link h3 {
  margin-bottom: 0.3rem;
  font-size: 2rem;
}

.place-link p {
  margin: 0;
  color: rgba(248, 237, 201, 0.68);
  font-size: 1rem;
  line-height: 1.4;
}

.selected-place {
  margin-top: 1rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  color: var(--moon);
  border: 1px solid rgba(241, 217, 141, 0.34);
  background: rgba(8, 10, 28, 0.84);
  text-decoration: none;
}

.selected-place img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.selected-place span {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.selected-place small,
.selected-place em {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.selected-place small {
  color: var(--gold-light);
}

.selected-place strong {
  margin: 0.2rem 0;
  font-family: var(--serif-display);
  font-size: 1.85rem;
  line-height: 1;
}

.selected-place em {
  color: rgba(248, 237, 201, 0.7);
}

.selected-place:hover {
  border-color: rgba(241, 217, 141, 0.7);
  transform: translateY(-2px);
}

.place-layout,
.families-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
}

.place-art {
  position: sticky;
  top: 96px;
  padding: 8px;
  border: 1px solid rgba(86, 55, 31, 0.3);
  background: rgba(90, 56, 30, 0.1);
  box-shadow: 0 20px 50px rgba(70, 43, 28, 0.22);
}

.place-art img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.place-copy {
  max-width: 43rem;
}

.place-facts {
  margin-top: 2rem;
  display: grid;
  gap: 0.8rem;
}

.place-fact {
  padding: 1rem 1.2rem;
  border-left: 3px solid #9d6935;
  background: rgba(112, 72, 38, 0.07);
}

.place-fact strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #71461f;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.family-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(85, 54, 31, 0.24);
  background: rgba(255, 248, 222, 0.48);
}

.family-card p:last-child {
  margin-bottom: 0;
}

.family-paths {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.family-path {
  min-height: 180px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--moon);
  border: 1px solid rgba(241, 217, 141, 0.35);
  background:
    linear-gradient(0deg, rgba(6, 8, 23, 0.94), rgba(6, 8, 23, 0.2)),
    var(--path-image) center / cover;
  text-decoration: none;
}

.family-path strong {
  font-family: var(--serif-display);
  font-size: 2rem;
  line-height: 1;
}

.family-path span {
  margin-top: 0.3rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
}

.family-tools-link {
  margin: 1.2rem 0 0;
  text-align: right;
}

.family-tools-link a {
  color: var(--paper-accent-strong);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-underline-offset: 0.22em;
}

/* Tools collection */
.tools-threshold {
  position: relative;
  overflow: clip;
  padding: clamp(5.5rem, 12vw, 9rem) 1rem clamp(4rem, 9vw, 7rem);
  background:
    radial-gradient(circle at 78% 28%, rgba(217, 180, 91, 0.15), transparent 22rem),
    linear-gradient(135deg, var(--night-950), var(--night-800));
  isolation: isolate;
}

.tools-threshold::after {
  position: absolute;
  right: clamp(-3rem, 4vw, 2rem);
  bottom: clamp(-7rem, -7vw, -4rem);
  width: min(36vw, 28rem);
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(241, 217, 141, 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.4rem rgba(241, 217, 141, 0.025),
    0 0 0 5.2rem rgba(241, 217, 141, 0.018);
}

.tools-threshold-inner {
  position: relative;
  z-index: 1;
}

.tools-threshold h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: clamp(4rem, 9vw, 8rem);
}

.tools-threshold-inner > p:last-child {
  max-width: 42rem;
  margin: 0;
  color: rgba(248, 237, 201, 0.84);
  font-size: clamp(1.2rem, 1rem + 0.55vw, 1.58rem);
}

.tools-collection {
  padding-top: clamp(3rem, 7vw, 6rem);
}

.tool-listing {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(18rem, 0.88fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(1rem, 2.2vw, 1.6rem);
  color: var(--ink);
  border: 1px solid rgba(74, 45, 24, 0.26);
  background: rgba(255, 248, 222, 0.58);
  box-shadow: 0 24px 60px rgba(70, 43, 28, 0.18);
}

.tool-listing-art {
  overflow: hidden;
  border: 1px solid rgba(74, 45, 24, 0.3);
  background: var(--night-900);
  box-shadow: 0 18px 36px rgba(70, 43, 28, 0.24);
}

.tool-listing-art img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.tool-listing-copy {
  padding: clamp(0.6rem, 2vw, 1.5rem) clamp(0.5rem, 2vw, 1.4rem);
}

.tool-listing-copy .eyebrow {
  color: var(--paper-accent-strong);
}

.tool-listing-copy h2 {
  max-width: 9ch;
  color: var(--night-800);
}

.tool-listing-features {
  display: grid;
  gap: 0.45rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 700;
  list-style: none;
}

.tool-listing-features li {
  position: relative;
  padding-left: 1.35rem;
}

.tool-listing-features li::before {
  position: absolute;
  left: 0;
  color: var(--paper-focus);
  content: "✓";
}

.tools-world-path {
  max-width: 48rem;
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  color: var(--ink-soft);
  text-align: center;
}

.tools-world-path p {
  margin: 0;
}

.tools-world-path a {
  color: var(--paper-accent-strong);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

/* Gallery: approved final art in storybook frames with one shared Hybrid viewer. */
.gallery-page {
  color: var(--moon);
  background: #080a19;
}

.gallery-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(5, 7, 20, 0.96) 0 34%, rgba(5, 7, 20, 0.5) 68%, rgba(5, 7, 20, 0.75)),
    linear-gradient(0deg, #080a19, transparent 58%),
    url("gallery-world-primary-map.webp") center 42% / cover no-repeat;
}

.gallery-hero-inner,
.gallery-section-inner {
  width: min(calc(100% - 2.5rem), var(--content));
  margin: 0 auto;
}

.gallery-hero-inner {
  padding: 6rem 0 5.5rem;
}

.gallery-hero-inner > p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(248, 237, 201, 0.84);
  font-family: var(--sans);
  line-height: 1.7;
}

.gallery-hero h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(4rem, 9vw, 8.2rem);
  line-height: 0.84;
}

.gallery-section-nav {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.gallery-section-nav a {
  min-height: 44px;
  padding: 0.75rem 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--moon);
  background: url("notice-action-plaque.webp") center / 100% 100% no-repeat;
  font: 800 0.76rem/1 var(--sans);
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 2px 3px #02030a;
  filter: drop-shadow(0 8px 11px rgba(0, 0, 0, 0.52));
  transition: filter 150ms ease, transform 150ms ease;
}

.gallery-section-nav a:hover {
  filter: brightness(1.1) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.62));
  transform: translateY(-2px);
}

.gallery-tour-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
}

.gallery-tour-actions span {
  color: rgba(248, 237, 201, 0.7);
  font: 0.74rem/1.4 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-tour-launch {
  min-height: 46px;
  padding: 0.78rem 1.45rem;
  color: var(--moon);
  border: 0;
  background: transparent url("notice-action-plaque.webp") center / 100% 100% no-repeat;
  font: 800 0.75rem/1.2 var(--sans);
  letter-spacing: 0.065em;
  text-transform: uppercase;
  text-shadow: 0 2px 3px #02030a;
  filter: drop-shadow(0 8px 11px rgba(0, 0, 0, 0.52));
  transition: filter 150ms ease, transform 150ms ease;
}

.gallery-tour-launch:hover {
  filter: brightness(1.1) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.62));
  transform: translateY(-2px);
}

.gallery-tour-launch-section {
  margin-top: 1rem;
}

.gallery-section {
  scroll-margin-top: 92px;
  padding: clamp(4.5rem, 8vw, 7rem) 1.25rem;
  background:
    radial-gradient(circle at 12% 0, rgba(111, 92, 168, 0.24), transparent 34rem),
    linear-gradient(180deg, #0c1026, #080a19);
}

.gallery-section:nth-of-type(odd) {
  background:
    radial-gradient(circle at 88% 0, rgba(230, 168, 78, 0.1), transparent 30rem),
    linear-gradient(180deg, #10142e, #080a19);
}

.gallery-section-heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.gallery-section-heading h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
}

.gallery-section-heading > p:last-child {
  color: rgba(248, 237, 201, 0.72);
  font-family: var(--sans);
  line-height: 1.65;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1.2rem, 2.4vw, 2rem);
}

.gallery-piece {
  margin: 0;
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(241, 217, 141, 0.48);
  background:
    linear-gradient(135deg, rgba(107, 72, 43, 0.96), rgba(42, 27, 23, 0.98)),
    #2f211c;
  box-shadow:
    inset 0 0 0 3px rgba(180, 132, 66, 0.52),
    inset 0 0 0 8px rgba(34, 20, 17, 0.52),
    0 22px 45px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--gallery-tilt, 0deg));
}

.gallery-piece:nth-child(3n + 1) {
  --gallery-tilt: -0.35deg;
}

.gallery-piece:nth-child(3n + 2) {
  --gallery-tilt: 0.28deg;
}

.gallery-frame::after {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(255, 240, 181, 0.28);
  box-shadow: inset 0 0 24px rgba(3, 4, 12, 0.2);
  pointer-events: none;
}

.gallery-frame img {
  width: 100%;
  height: auto;
  display: block;
  background: #050611;
}

.gallery-piece figcaption {
  width: calc(100% - 1.2rem);
  margin: -0.35rem auto 0;
  padding: 1.15rem 1.2rem 1.25rem;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 246, 214, 0.97), rgba(223, 199, 143, 0.96)),
    var(--paper);
  clip-path: polygon(1% 0, 99% 1%, 100% 95%, 97% 100%, 2% 99%, 0 5%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.gallery-piece figcaption strong,
.gallery-piece figcaption span {
  display: block;
}

.gallery-piece figcaption strong {
  font: 700 1.35rem/1.1 var(--serif-display);
}

.gallery-piece figcaption span {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font: 0.88rem/1.5 var(--sans);
}

.gallery-viewer {
  width: min(calc(100vw - 1rem), 1600px);
  height: min(calc(100dvh - 1rem), 1100px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--moon);
  border: 1px solid rgba(241, 217, 141, 0.3);
  background: #02030a;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.82);
}

html:has(.gallery-viewer[open]) {
  overflow: hidden;
}

.gallery-viewer::backdrop {
  background: rgba(2, 3, 10, 0.94);
  backdrop-filter: blur(4px);
}

.gallery-viewer-shell {
  position: relative;
  height: 100%;
  min-height: 0;
}

.gallery-viewer [hidden] {
  display: none !important;
}

.gallery-viewer-header {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  min-width: 0;
  padding: 0.7rem 0.75rem 3.5rem;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(2, 3, 10, 0.9), rgba(2, 3, 10, 0.55) 45%, transparent);
}

.gallery-viewer[data-gallery-info-hidden] .gallery-viewer-header {
  background: none;
}

.gallery-viewer-header .eyebrow {
  margin-bottom: 0.08rem;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  opacity: 0.76;
}

.gallery-viewer-header h2 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.55rem);
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.92);
}

.gallery-viewer-close,
.gallery-viewer-step,
.gallery-viewer-controls button {
  min-height: 40px;
  color: var(--moon);
  border: 1px solid rgba(241, 217, 141, 0.38);
  background: rgba(8, 10, 24, 0.68);
  font: 800 0.65rem/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
}

.gallery-viewer-close:hover,
.gallery-viewer-step:hover:not(:disabled),
.gallery-viewer-controls button:hover:not(:disabled) {
  color: #fff6ce;
  border-color: rgba(255, 236, 169, 0.78);
  background: rgba(25, 29, 60, 0.88);
}

.gallery-viewer-step:disabled,
.gallery-viewer-controls button:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.gallery-viewer-close {
  width: 40px;
  min-width: 40px;
  padding: 0;
  pointer-events: auto;
  font-size: 1.35rem;
  font-weight: 400;
}

.gallery-viewer-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.gallery-viewer-figure {
  position: absolute;
  z-index: 1;
  inset: 0;
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.gallery-viewer-art {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #02030a;
}

.gallery-viewer-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.gallery-viewer-figure figcaption {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  min-width: 0;
  padding: 3.5rem 0.85rem 0.75rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.25rem 0.7rem;
  pointer-events: none;
  background: linear-gradient(to top, rgba(2, 3, 10, 0.94), rgba(2, 3, 10, 0.58) 50%, transparent);
}

.gallery-viewer-figure figcaption p {
  margin: 0;
}

.gallery-viewer-section,
.gallery-viewer-position {
  color: #f7e3a6;
  font: 800 0.62rem/1.3 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.92);
}

.gallery-viewer-summary {
  overflow: hidden;
  color: rgba(255, 247, 218, 0.88);
  font: 0.75rem/1.3 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.92);
}

.gallery-viewer-position {
  white-space: nowrap;
}

.gallery-viewer-step {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 42px;
  min-width: 42px;
  height: 64px;
  padding: 0;
  transform: translateY(-50%);
  font: 300 2.1rem/1 var(--serif);
  text-transform: none;
}

.gallery-viewer-previous {
  left: 0.55rem;
}

.gallery-viewer-next {
  right: 0.55rem;
}

.gallery-viewer-controls {
  position: absolute;
  z-index: 7;
  top: 0.7rem;
  right: 3.55rem;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.gallery-viewer-controls button {
  min-width: 50px;
  padding: 0.45rem 0.65rem;
}

.gallery-viewer-controls span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.gallery-viewer :focus-visible,
.gallery-tour-launch:focus-visible {
  outline: 2px solid var(--paper-focus);
  outline-offset: 2px;
}

@media (min-width: 701px) {
  .gallery-viewer-header {
    padding-bottom: 7.5rem;
  }

  .gallery-viewer-figure figcaption {
    z-index: 6;
    inset: 3.65rem auto auto 0;
    width: min(34rem, calc(100% - 9rem));
    padding: 0.3rem 0.75rem 1rem;
    grid-template-columns: auto auto;
    align-items: start;
    justify-content: start;
    gap: 0.15rem 0.65rem;
    background: linear-gradient(to right, rgba(2, 3, 10, 0.58), transparent 92%);
  }

  .gallery-viewer-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .gallery-viewer {
    width: calc(100vw - 0.3rem);
    height: calc(100dvh - 0.3rem);
  }

  .gallery-viewer-header {
    padding: 0.55rem 0.55rem 3rem;
  }

  .gallery-viewer-header .eyebrow {
    font-size: 0.5rem;
  }

  .gallery-viewer-header h2 {
    max-width: calc(100vw - 12.5rem);
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gallery-viewer-close {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .gallery-viewer-step {
    width: 38px;
    min-width: 38px;
    height: 58px;
    font-size: 1.8rem;
  }

  .gallery-viewer-previous {
    left: 0.3rem;
  }

  .gallery-viewer-next {
    right: 0.3rem;
  }

  .gallery-viewer-figure figcaption {
    grid-template-columns: 1fr auto;
    padding: 3rem 0.55rem 0.5rem;
    gap: 0.15rem 0.45rem;
  }

  .gallery-viewer-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.68rem;
  }

  .gallery-viewer-controls {
    top: 0.55rem;
    right: 3.25rem;
  }

  .gallery-viewer-controls button {
    min-width: 42px;
    min-height: 38px;
    padding: 0.4rem 0.45rem;
    font-size: 0.58rem;
  }

  .gallery-viewer-section,
  .gallery-viewer-position {
    font-size: 0.56rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-tour-launch {
    transition: none;
  }

  .gallery-viewer::backdrop {
    backdrop-filter: none;
  }

  .gallery-viewer-controls span {
    position: absolute;
    z-index: 7;
    top: calc(100% + 0.3rem);
    right: 0;
    bottom: auto;
    width: min(10rem, calc(100vw - 6rem));
    height: auto;
    max-width: none;
    padding: 0.3rem 0.45rem;
    overflow: visible;
    clip: auto;
    clip-path: none;
    color: rgba(248, 237, 201, 0.78);
    background: rgba(2, 3, 10, 0.72);
    font: 0.62rem/1.3 var(--sans);
    text-align: right;
    white-space: normal;
  }
}

.compatibility-redirect {
  min-height: 70vh;
  display: grid;
  place-items: center;
  color: var(--moon);
  background:
    linear-gradient(rgba(5, 7, 19, 0.66), rgba(5, 7, 19, 0.93)),
    url("noticeboard-environment.webp") center / cover no-repeat;
}

.compatibility-redirect-panel {
  width: 100%;
}

.compatibility-redirect-panel .section-inner {
  max-width: 820px;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(241, 217, 141, 0.48);
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 246, 214, 0.97), rgba(223, 199, 143, 0.96));
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.54);
}

.compatibility-redirect-panel .eyebrow {
  color: var(--paper-accent-strong);
}

/* Vale Noticeboard */
.noticeboard-page {
  position: relative;
  overflow: clip;
  background: #050713;
  isolation: isolate;
}

.noticeboard-section {
  padding: 0;
}

.noticeboard-frame {
  position: relative;
  width: min(100%, 1440px);
  min-height: 1360px;
  margin: 0 auto;
  padding: 286px clamp(1rem, 10vw, 9rem) 90px;
  background:
    linear-gradient(180deg, transparent 72%, rgba(5, 7, 19, 0.88) 96%, #050713 100%),
    url("noticeboard-environment.webp") center top / auto 100% no-repeat;
}

.noticeboard-frame::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse at 50% 52%, transparent 24%, rgba(2, 4, 13, 0.14) 67%, rgba(2, 4, 13, 0.58) 100%);
  pointer-events: none;
}

.noticeboard-heading {
  position: relative;
  z-index: 2;
  max-width: 810px;
  margin: 0 auto 1.35rem;
}

.noticeboard-heading > .eyebrow {
  margin-bottom: 0.55rem;
  color: var(--gold-light);
  text-align: center;
}

.noticeboard-heading img {
  width: 100%;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.72));
}

.home-noticeboard {
  scroll-margin-top: 82px;
  background: #050713;
}

.notice-history {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 2.4rem auto 0;
  padding: 1.6rem;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 246, 214, 0.96), rgba(223, 199, 143, 0.94));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.4);
}

.notice-history ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notice-history li {
  padding: 0.8rem 0;
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) auto;
  gap: 1rem;
  border-top: 1px solid rgba(95, 74, 58, 0.28);
  align-items: baseline;
}

.notice-history a {
  color: var(--ink);
  font-weight: 700;
}

.notice-history time,
.notice-history span {
  color: var(--ink-soft);
  font: 0.75rem/1.4 var(--sans);
}

.notice-list {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0;
  margin-inline: auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  list-style: none;
}

.notice-list > li {
  min-width: 0;
  display: flex;
}

.notice-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  border: 1px solid #78552d;
  clip-path: polygon(1.2% 0, 98.4% 0.5%, 100% 5%, 99% 96%, 96% 100%, 2% 99%, 0 94%, 0.6% 4%);
  background:
    radial-gradient(ellipse at 48% 0, rgba(255, 250, 216, 0.76), transparent 56%),
    linear-gradient(90deg, rgba(105, 68, 33, 0.18), transparent 6% 93%, rgba(105, 68, 33, 0.22)),
    #e7d39c;
  box-shadow:
    inset 0 0 0 4px rgba(89, 54, 24, 0.09),
    inset 0 0 28px rgba(100, 62, 28, 0.22),
    0 18px 30px rgba(0, 0, 0, 0.58);
  transform: rotate(-0.35deg);
}

.notice-list > li:nth-child(2) .notice-card {
  transform: translateY(5px) rotate(0.45deg);
}

.notice-list > li:nth-child(3) .notice-card {
  transform: rotate(-0.2deg);
}

.notice-card::before,
.notice-card::after {
  position: absolute;
  z-index: 2;
  top: 0.65rem;
  width: 11px;
  height: 11px;
  content: "";
  border: 1px solid #4b2e18;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #f4d88f, #a66e28 54%, #513315 100%);
  box-shadow: 0 2px 4px rgba(55, 31, 13, 0.42), inset 0 1px 2px rgba(255, 255, 255, 0.45);
}

.notice-card::before {
  left: 0.65rem;
}

.notice-card::after {
  right: 0.65rem;
}

.notice-image {
  aspect-ratio: 5 / 3;
  margin: 1rem 1rem 0;
  overflow: hidden;
  border: 5px solid rgba(99, 60, 29, 0.28);
  outline: 1px solid rgba(72, 41, 19, 0.42);
  background: var(--night-850);
  box-shadow: 0 5px 11px rgba(54, 32, 16, 0.24);
}

.notice-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notice-image-tree img {
  transform: scale(1.58);
  transform-origin: 8% 6%;
}

.notice-body {
  padding: 0.88rem 1.05rem 1.05rem;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.notice-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem 0.8rem;
  color: var(--paper-accent-strong);
  font-family: var(--sans);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-state {
  padding: 0.1rem 0.38rem;
  border: 1px solid rgba(74, 45, 24, 0.35);
  clip-path: polygon(5% 0, 96% 3%, 100% 50%, 95% 100%, 4% 97%, 0 50%);
  background: rgba(117, 79, 39, 0.08);
}

.notice-card time {
  margin: 0.45rem 0 0.55rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
}

.notice-card h2 {
  margin-bottom: 0.52rem;
  color: #3c291f;
  font-size: clamp(1.62rem, 2.25vw, 2.15rem);
  line-height: 0.98;
}

.notice-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.32;
}

.notice-action {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding: 0.66rem clamp(1.5rem, 10%, 2.4rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--gold-light);
  border: 0;
  background: transparent url("notice-action-plaque.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 7px rgba(56, 34, 21, 0.38));
  font-family: var(--sans);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  white-space: normal;
}

.notice-action:hover {
  color: #fff2b2;
  filter: drop-shadow(0 9px 9px rgba(56, 34, 21, 0.44)) brightness(1.07);
  transform: translateY(-1px);
}

.notice-card :focus-visible {
  outline-color: var(--paper-focus);
}

.noticeboard-return {
  position: relative;
  z-index: 2;
  margin-top: 2.2rem;
  text-align: center;
}

.noticeboard-return-link {
  width: min(100%, 330px);
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.noticeboard-return-link img {
  width: 100%;
  filter: drop-shadow(0 12px 15px rgba(0, 0, 0, 0.62));
  transition: filter 160ms ease, transform 160ms ease;
}

.noticeboard-return-link:hover img {
  filter: drop-shadow(0 15px 19px rgba(0, 0, 0, 0.7)) brightness(1.07);
  transform: translateY(-2px);
}

/* Brand Book: a public-facing identity showcase built from accepted Vale artwork. */
.brand-book-page::before {
  display: none;
}

.brand-book {
  background: var(--night-950);
}

.brand-hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.brand-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: url("brand-book-hero.webp") center / cover no-repeat;
  filter: saturate(0.92) brightness(0.74);
  transform: scale(1.035);
}

.brand-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(4, 5, 16, 0.94) 0 31%, rgba(4, 5, 16, 0.43) 59%, rgba(4, 5, 16, 0.18)),
    linear-gradient(0deg, var(--night-950), transparent 48%);
}

.brand-hero-inner,
.brand-section-inner {
  width: min(calc(100% - 2.5rem), var(--content));
  margin: 0 auto;
}

.brand-hero-inner {
  padding: 5rem 0 6.5rem;
}

.brand-hero-copy {
  max-width: 580px;
}

.brand-stacked-mark {
  width: min(410px, 90%);
  margin-bottom: 1rem;
}

.brand-hero h1 {
  margin-bottom: 1.15rem;
  font-size: clamp(3.4rem, 7vw, 6.9rem);
  line-height: 0.86;
}

.brand-hero-copy > p:last-child {
  max-width: 570px;
  margin-bottom: 0;
  color: rgba(248, 237, 201, 0.84);
  font-family: var(--sans);
  font-size: 1.05rem;
}

.brand-section {
  padding: clamp(4.5rem, 8vw, 6.5rem) 1.25rem;
}

.brand-section-heading {
  max-width: 790px;
  margin-bottom: 2.5rem;
}

.brand-section-heading h2 {
  margin-bottom: 0.8rem;
}

.brand-section-heading > p:last-child {
  margin-bottom: 0;
  color: rgba(248, 237, 201, 0.72);
  font-family: var(--sans);
  font-size: 0.96rem;
  line-height: 1.65;
}

.brand-identity {
  background:
    radial-gradient(circle at 85% 0, rgba(111, 92, 168, 0.25), transparent 35rem),
    #0b0e22;
}

.brand-mark-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.4rem;
}

.brand-specimen {
  min-height: 340px;
  padding: 2.3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 12px solid #2f211c;
  outline: 1px solid rgba(241, 217, 141, 0.5);
  box-shadow: inset 0 0 0 3px #98753c, 0 22px 55px rgba(0, 0, 0, 0.45);
}

.brand-specimen-dark {
  background: radial-gradient(circle at 50% 20%, #171d40, #060713 70%);
}

.brand-specimen-paper {
  color: var(--ink);
  background: radial-gradient(circle at 50% 20%, #fff6d8, var(--paper-deep));
}

.brand-specimen-horizontal img {
  width: 90%;
  margin: auto;
}

.brand-specimen-stacked img {
  width: min(360px, 88%);
  margin: auto;
}

.brand-specimen figcaption {
  margin-top: 1.5rem;
  color: inherit;
  opacity: 0.78;
  font: 0.82rem/1.5 var(--sans);
}

.brand-downloads {
  margin-top: 1.6rem;
}

.brand-palette {
  color: var(--ink);
  background:
    linear-gradient(rgba(243, 228, 185, 0.93), rgba(223, 199, 143, 0.96)),
    url("moonlit-vale-storybook-map.webp") center / cover;
}

.brand-palette .eyebrow,
.brand-use .eyebrow {
  color: var(--paper-accent-strong);
}

.brand-palette .brand-section-heading > p:last-child,
.brand-use .brand-section-heading > p:last-child {
  color: var(--ink-soft);
}

.brand-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.1rem;
}

.brand-swatch {
  min-height: 190px;
  padding: 0.85rem;
  border: 1px solid rgba(65, 43, 28, 0.35);
  background: rgba(255, 247, 217, 0.62);
  box-shadow: 0 10px 24px rgba(66, 43, 24, 0.16);
  transform: rotate(var(--tilt));
}

.brand-swatch-color {
  height: 108px;
  display: block;
  border: 7px solid rgba(255, 248, 222, 0.78);
  border-radius: 48% 52% 44% 56% / 52% 45% 55% 48%;
  background: var(--swatch);
  box-shadow: inset 0 9px 18px rgba(255, 255, 255, 0.12), inset 0 -8px 18px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(50, 30, 20, 0.16);
}

.brand-swatch strong,
.brand-swatch code {
  display: block;
}

.brand-swatch strong {
  margin-top: 0.75rem;
  font-size: 1rem;
}

.brand-swatch code {
  margin-top: 0.15rem;
  color: var(--ink-soft);
  font: 0.68rem/1 var(--sans);
  letter-spacing: 0.05em;
}

.brand-principles {
  position: relative;
  overflow: hidden;
  background: #080a19;
  isolation: isolate;
}

.brand-principles::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: url("map-room-environment-v2.webp") center / cover no-repeat;
  filter: brightness(0.38) saturate(0.78);
}

.brand-principles::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(4, 5, 14, 0.9), rgba(4, 5, 14, 0.45));
}

.brand-principle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.brand-principle {
  min-height: 220px;
  padding: 2rem;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 246, 214, 0.97), rgba(223, 199, 143, 0.94));
  clip-path: polygon(1% 0, 99% 1%, 100% 96%, 97% 100%, 2% 99%, 0 4%);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.38);
}

.brand-principle > span {
  color: #9a6b2f;
  font: 800 0.7rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-principle h3 {
  margin: 0.65rem 0 0.55rem;
  font-size: 2rem;
}

.brand-principle p {
  margin: 0;
  color: var(--ink-soft);
  font: 0.96rem/1.55 var(--sans);
}

.brand-gallery {
  background:
    radial-gradient(circle at 20% 0, rgba(111, 92, 168, 0.27), transparent 34rem),
    #0c1026;
}

.brand-art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.brand-art-grid figure {
  overflow: hidden;
  border: 10px solid #34241d;
  outline: 1px solid rgba(241, 217, 141, 0.45);
  background: #050611;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

.brand-art-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.brand-art-grid figcaption {
  padding: 1.1rem;
  color: rgba(248, 237, 201, 0.76);
  font: 0.84rem/1.5 var(--sans);
}

.brand-use {
  color: var(--ink);
  background: linear-gradient(rgba(243, 228, 185, 0.96), rgba(223, 199, 143, 0.97));
}

.brand-use-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.brand-use-grid article,
.brand-media-kit {
  padding: 2rem;
  border: 1px solid rgba(95, 74, 58, 0.28);
  background: rgba(255, 248, 220, 0.5);
  box-shadow: 0 10px 24px rgba(66, 43, 24, 0.12);
}

.brand-use-grid h3,
.brand-media-kit h3 {
  margin-bottom: 0.75rem;
  font-size: 2rem;
}

.brand-use-grid ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  font: 0.96rem/1.7 var(--sans);
}

.brand-media-kit {
  margin-top: 1.4rem;
}

.brand-media-kit p {
  max-width: 760px;
  color: var(--ink-soft);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes story-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .header-inner {
    min-height: 70px;
    flex-wrap: wrap;
  }

  .nav-toggle[data-enhanced="true"] {
    display: inline-flex;
  }

  .site-nav {
    position: static;
    width: 100%;
    order: 3;
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    background: rgba(7, 8, 23, 0.97);
    box-shadow: var(--shadow);
  }

  .header-actions {
    margin-left: auto;
  }

  .site-nav[data-enhanced="true"] {
    position: absolute;
    top: 70px;
    right: 1rem;
    left: auto;
    width: min(calc(100% - 2rem), 460px);
    display: none;
  }

  .site-nav[data-enhanced="true"][data-open="true"] {
    display: flex;
  }

  .nav-sign {
    width: min(78vw, 340px);
    height: auto;
    aspect-ratio: 176 / 49;
    margin: 0 auto;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
  }

  .mobile-utility-group {
    width: min(78vw, 340px);
    margin: 0.35rem auto 0;
    padding: 0.85rem 0.5rem 0.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem 0.8rem;
    border-top: 1px solid rgba(241, 217, 141, 0.22);
  }

  .mobile-utility-group > span {
    flex-basis: 100%;
    color: rgba(248, 237, 201, 0.62);
    font: 700 0.68rem/1 var(--sans);
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
  }

  .mobile-utility-group a {
    color: var(--gold-light);
    font: 700 0.85rem/1.2 var(--sans);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner,
  .world-preview-grid,
  .explore-layout,
  .place-layout,
  .families-grid {
    grid-template-columns: 1fr;
  }

  .hero-home .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding-top: 4rem;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-lede {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .threshold-frame {
    width: min(72vw, 410px);
  }

  .hero::before {
    background-position: 68% center;
  }

  .threshold-side {
    min-height: 310px;
  }

  .threshold-frame img {
    height: min(64svh, 620px);
  }

  .map-frame,
  .place-art {
    position: relative;
    top: auto;
  }

  .notice-list {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
  }

  .noticeboard-frame {
    min-height: 0;
    padding: 250px clamp(1rem, 9vw, 4rem) 5rem;
    background:
      linear-gradient(180deg, transparent 14rem, rgba(5, 7, 19, 0.2) 31rem, #070918 70rem),
      url("noticeboard-environment.webp") center top / auto 800px no-repeat,
      #070918;
  }

  .noticeboard-frame::after {
    background: linear-gradient(180deg, transparent 24rem, rgba(3, 5, 16, 0.74) 52rem, #070918 72rem);
  }

  .notice-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    transform: none;
  }

  .notice-list > li:nth-child(2) .notice-card,
  .notice-list > li:nth-child(3) .notice-card {
    transform: none;
  }

  .notice-image {
    margin: 1.25rem 0 1.25rem 1.25rem;
    align-self: start;
  }

  .brand-hero::before {
    background-position: 62% center;
  }

  .brand-hero::after {
    background: linear-gradient(0deg, var(--night-950), rgba(4, 5, 16, 0.3) 65%, rgba(4, 5, 16, 0.5));
  }

  .brand-hero-inner {
    padding-top: 20rem;
  }

  .brand-mark-grid,
  .brand-principle-grid,
  .brand-art-grid,
  .brand-use-grid {
    grid-template-columns: 1fr;
  }

  .brand-specimen {
    min-height: 270px;
  }

  .brand-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Site-wide search preview */

.search-stage {
  min-height: 70vh;
}

.search-threshold {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: clamp(3.2rem, 7vw, 6.4rem) 0 clamp(2.6rem, 5vw, 4.6rem);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.search-threshold-copy {
  max-width: 560px;
}

.search-threshold h1 {
  margin: 0;
  color: var(--gold-light);
  font: 700 clamp(3.2rem, 6.4vw, 6.2rem) / 0.9 var(--serif-display);
  letter-spacing: -0.035em;
}

.search-threshold-copy > p:last-child {
  margin: 1.35rem 0 0;
  max-width: 48ch;
  color: rgba(248, 237, 201, 0.8);
  font-size: clamp(1.15rem, 1rem + 0.42vw, 1.5rem);
}

.search-form {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.28), transparent 45%),
    var(--paper);
  border: 1px solid rgba(241, 217, 141, 0.72);
  border-radius: 24px 7px 24px 7px;
  box-shadow:
    inset 0 0 0 5px rgba(96, 56, 15, 0.08),
    0 26px 65px rgba(0, 0, 0, 0.42);
}

.search-form::before {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(96, 56, 15, 0.18);
  border-radius: 17px 3px 17px 3px;
  pointer-events: none;
}

.search-field,
.search-options,
.search-privacy {
  position: relative;
}

.search-field > label,
.search-options > label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--paper-accent-strong);
  font: 700 0.75rem/1.2 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.search-input-row input,
.search-options select {
  width: 100%;
  min-height: 50px;
  color: var(--ink);
  background: rgba(255, 252, 239, 0.86);
  border: 1px solid rgba(74, 45, 24, 0.42);
  border-radius: 8px;
  font: 600 1rem/1.2 var(--sans);
}

.search-input-row input {
  padding: 0.75rem 0.9rem;
}

.search-input-row input::placeholder {
  color: #765f4e;
  font-weight: 500;
}

.search-input-row button,
.search-clear {
  min-height: 50px;
  padding: 0.7rem 1.15rem;
  color: var(--moon);
  background: var(--paper-accent-strong);
  border: 1px solid #2d1c11;
  border-radius: 8px;
  font: 700 0.82rem/1 var(--sans);
  letter-spacing: 0.055em;
  text-transform: uppercase;
  cursor: pointer;
}

.search-options {
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 0.65rem;
}

.search-options label {
  grid-column: 1 / -1;
}

.search-options select {
  padding: 0.68rem 2.5rem 0.68rem 0.8rem;
}

.search-clear {
  color: var(--paper-accent-strong);
  background: transparent;
  border-color: rgba(74, 45, 24, 0.45);
}

.search-input-row button:hover,
.search-clear:hover {
  filter: brightness(1.12);
}

.search-privacy {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font: 600 0.8rem/1.45 var(--sans);
}

.search-results-shell {
  padding: clamp(3rem, 6vw, 5.5rem) max(1rem, calc((100% - var(--content)) / 2));
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), transparent 11rem),
    var(--paper);
  border-top: 1px solid rgba(241, 217, 141, 0.46);
}

.search-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.search-results-heading h2 {
  margin: 0;
  color: var(--paper-accent-strong);
  font: 700 clamp(2.5rem, 4.5vw, 4.3rem) / 0.95 var(--serif-display);
}

.search-results-heading .eyebrow {
  color: var(--paper-accent);
}

.search-results-count {
  margin: 0;
  color: var(--ink-soft);
  font: 700 0.9rem/1.35 var(--sans);
  text-align: right;
}

.search-starting-paths,
.search-empty,
.search-noscript {
  margin-top: 2rem;
  padding: clamp(1.3rem, 2.5vw, 2rem);
  background: rgba(255, 252, 239, 0.6);
  border: 1px solid rgba(74, 45, 24, 0.23);
  border-radius: 16px 4px 16px 4px;
}

.search-starting-paths > p,
.search-empty > p,
.search-noscript > p {
  margin: 0;
}

.search-starting-paths nav {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.search-starting-paths a,
.search-empty a,
.search-noscript a,
.tome-search-path a {
  color: var(--paper-accent-strong);
  font-family: var(--sans);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.search-starting-paths a {
  padding: 0.58rem 0.78rem;
  background: rgba(255, 252, 239, 0.72);
  border: 1px solid rgba(74, 45, 24, 0.24);
  border-radius: 999px;
  font-size: 0.86rem;
  text-decoration: none;
}

.search-results {
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
}

.search-result-link {
  min-height: 100%;
  padding: 1.15rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0.75rem;
  color: var(--ink);
  background: rgba(255, 252, 239, 0.76);
  border: 1px solid rgba(74, 45, 24, 0.24);
  border-radius: 16px 4px 16px 4px;
  box-shadow: 0 10px 22px rgba(74, 45, 24, 0.08);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.search-result-link.has-image {
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
}

.search-result-link:hover {
  border-color: rgba(74, 45, 24, 0.54);
  box-shadow: 0 14px 28px rgba(74, 45, 24, 0.14);
  transform: translateY(-2px);
}

.search-result-image {
  width: 124px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid rgba(74, 45, 24, 0.24);
  border-radius: 10px 3px 10px 3px;
}

.search-result-copy {
  min-width: 0;
}

.search-result-meta {
  margin: 0 0 0.35rem;
  color: var(--paper-accent);
  font: 700 0.68rem/1.2 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-result-title {
  margin: 0;
  color: var(--paper-accent-strong);
  font: 700 clamp(1.45rem, 1.2rem + 0.5vw, 1.85rem) / 1 var(--serif-display);
}

.search-result-summary {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.45;
}

.search-empty h3,
.search-noscript h3 {
  margin: 0 0 0.45rem;
  color: var(--paper-accent-strong);
  font: 700 1.8rem/1 var(--serif-display);
}

.search-empty p + p {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
}

.tome-search-path {
  margin: 0.8rem 0 0;
}

.tome-search-path a {
  color: var(--gold-light);
}

@media (max-width: 800px) {
  .search-threshold {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .search-threshold h1 {
    font-size: clamp(3.15rem, 15vw, 5rem);
  }

  .search-results-heading {
    display: block;
  }

  .search-results-count {
    margin-top: 0.75rem;
    text-align: left;
  }

  .search-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .search-threshold {
    width: min(calc(100% - 1.25rem), var(--content));
    padding-top: 2.5rem;
  }

  .search-form {
    padding: 1.2rem;
  }

  .search-input-row,
  .search-options {
    grid-template-columns: 1fr;
  }

  .search-input-row button,
  .search-clear {
    width: 100%;
    margin-top: 0.6rem;
  }

  .search-options label {
    grid-column: auto;
  }

  .search-result-link.has-image {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .search-result-image {
    width: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-search-icon img,
  .search-result-link {
    transition: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.08rem;
  }

  .brand-wordmark {
    width: min(48vw, 188px);
  }

  .nav-toggle {
    width: 48px;
    height: 48px;
  }

  .nav-toggle img {
    width: 32px;
    height: 32px;
  }

  .site-nav[data-enhanced="true"] {
    right: 0.65rem;
    left: 0.65rem;
  }

  .nav-sign {
    height: 62px;
    font-size: 0.82rem;
  }

  .button {
    width: 100%;
    min-width: 0;
  }

  .brand-hero {
    min-height: 700px;
  }

  .brand-hero-inner,
  .brand-section-inner {
    width: min(calc(100% - 2rem), var(--content));
  }

  .brand-hero-inner {
    padding: 18rem 0 4.75rem;
  }

  .brand-stacked-mark {
    width: min(280px, 84vw);
  }

  .brand-hero h1 {
    font-size: clamp(3.45rem, 17vw, 5rem);
  }

  .brand-section {
    padding: 4.25rem 1rem;
  }

  .brand-specimen {
    min-height: 230px;
    padding: 1.35rem;
    border-width: 8px;
  }

  .brand-swatch {
    min-height: 170px;
  }

  .brand-swatch-color {
    height: 88px;
  }

  .brand-principle,
  .brand-use-grid article,
  .brand-media-kit {
    padding: 1.4rem;
  }

  .brand-art-grid img {
    aspect-ratio: 16 / 10;
  }

  .gallery-hero {
    min-height: 620px;
    background-position: 58% center;
  }

  .gallery-hero-inner,
  .gallery-section-inner {
    width: min(calc(100% - 2rem), var(--content));
  }

  .gallery-hero-inner {
    padding: 15rem 0 4rem;
  }

  .gallery-section {
    padding: 4rem 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .notice-history li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .hero-inner {
    padding: 3.4rem 0 5rem;
  }

  .hero-actions {
    width: min(100%, 290px);
    margin-right: auto;
    margin-left: auto;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(4rem, 20vw, 6rem);
  }

  .threshold-frame {
    width: min(82vw, 380px);
  }

  .threshold-side {
    min-height: 230px;
  }

  .threshold-side span {
    margin-bottom: 0;
  }

  .threshold-frame img {
    height: min(56svh, 540px);
  }

  .book-spread {
    grid-template-columns: 1fr;
    border-width: 8px;
  }

  .book-spread::after {
    display: none;
  }

  .book-page {
    min-height: 0;
    padding: 2rem 1.35rem;
  }

  .book-page:first-child {
    border-radius: 7px 7px 2px 2px;
  }

  .book-page:last-child {
    border-top: 1px solid rgba(78, 48, 30, 0.2);
    border-radius: 2px 2px 7px 7px;
  }

  .library-hero,
  .map-room-hero {
    min-height: 540px;
  }

  .map-room-section .map-frame {
    transform: none;
  }

  .map-room-section .place-list {
    grid-template-columns: 1fr;
  }

  .selected-place {
    grid-template-columns: 92px 1fr;
  }

  .story-reader-shell {
    padding: 1rem 0 3rem;
    background: linear-gradient(#111735, #070817);
    background-attachment: scroll;
  }

  .story-reader {
    padding: 3rem 1.35rem 3.5rem;
    border-right: 0;
    border-left: 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  }

  .story-reader::before {
    inset: 0.7rem;
  }

  .story-illustration {
    margin-bottom: 2.2rem;
    padding: 7px;
  }

  .story-prose {
    font-size: 1.18rem;
    line-height: 1.7;
  }

  .reader-nav,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .reader-nav {
    margin-top: 0;
    padding: 1.25rem 1.15rem;
    text-align: center;
  }

  .reader-nav a,
  .reader-nav a:nth-child(2),
  .reader-nav a:last-child {
    justify-content: center;
    justify-self: stretch;
    text-align: center;
  }

  .story-reader-header p {
    gap: 0.55rem;
  }

  .story-reader-header p::before,
  .story-reader-header p::after {
    width: 1.4rem;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .family-paths {
    grid-template-columns: 1fr;
  }

  .family-tools-link {
    text-align: left;
  }

  .tool-listing {
    grid-template-columns: 1fr;
  }

  .tool-listing-copy h2 {
    max-width: none;
  }

  .map-marker {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
  }

  .noticeboard-section {
    padding: 0;
  }

  .noticeboard-frame {
    padding: 2.1rem 0.8rem 3.4rem;
    background:
      linear-gradient(180deg, rgba(5, 7, 19, 0.26), #070918 25rem),
      url("noticeboard-environment.webp") 50% -3.2rem / auto 430px no-repeat,
      #070918;
  }

  .noticeboard-frame::after {
    background:
      linear-gradient(180deg, rgba(3, 5, 15, 0.08), #070918 24rem),
      radial-gradient(ellipse at 50% 7rem, transparent, rgba(3, 5, 15, 0.66) 19rem);
  }

  .noticeboard-heading {
    max-width: 370px;
    margin-bottom: 1.2rem;
  }

  .notice-card {
    display: flex;
    clip-path: polygon(1.4% 0, 98% 0.8%, 100% 4%, 99% 97%, 96% 100%, 2% 99%, 0 95%, 0.8% 3%);
  }

  .notice-image {
    aspect-ratio: 16 / 9;
    margin: 1rem 1rem 0;
  }

  .notice-body {
    padding: 0.9rem 1.05rem 1.1rem;
  }

  .notice-card h2 {
    font-size: clamp(1.85rem, 8.4vw, 2.35rem);
  }

  .notice-card p {
    font-size: 1rem;
    line-height: 1.38;
  }

  .notice-action {
    font-size: 0.74rem;
  }

  .noticeboard-return {
    margin-top: 2.4rem;
  }

  .noticeboard-return-link {
    width: min(88vw, 310px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .reader-nav,
  .button-row {
    display: none !important;
  }

  body,
  .story-reader-shell {
    color: #111;
    background: #fff;
  }

  .story-reader {
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}

/* Homepage doorway and open-volume system, accepted 2026-07-13. */
.hero-home {
  min-height: 760px;
}

.hero-home .hero-inner {
  min-height: 760px;
  grid-template-columns: minmax(0, 550px) 1fr;
}

.home-title-lockup {
  width: min(480px, 90%);
  margin: -1.9rem 0 -1.55rem;
}

.home-title-art {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.52));
}

.home-title-fallback {
  display: none;
  margin: 2.5rem 0;
  color: var(--gold-light);
  font: 700 clamp(4rem, 8vw, 7rem) / 0.88 var(--serif-display);
  text-shadow: 0 4px 34px rgba(0, 0, 0, 0.52);
}

.home-title-lockup.image-missing .home-title-art {
  display: none;
}

.home-title-lockup.image-missing .home-title-fallback {
  display: block;
}

.home-volume-desktop {
  position: relative;
  width: min(100%, 1180px);
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.62));
}

.home-volume-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-spread-content {
  position: absolute;
  inset: 15% 14% 15%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8.5%;
  color: var(--ink);
}

.home-page-copy {
  position: relative;
  min-width: 0;
  padding: 2% 1.5%;
}

.home-page-copy .eyebrow,
.home-mobile-page .eyebrow {
  color: #71451f;
}

.home-page-copy .eyebrow {
  font-size: 0.64rem;
}

.home-page-copy h3 {
  margin: 0 0 0.25rem;
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 0.95;
}

.home-page-copy > p {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.home-page-copy .chapter-link {
  margin: 0;
  padding: 0.8rem 1.75rem 0.8rem 0.125rem;
}

.home-page-copy .chapter-link strong {
  font-size: 1.25rem;
  line-height: 1.05;
}

.home-page-copy .chapter-link span {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  line-height: 1.26;
}

.home-volume-note {
  max-width: 70%;
  margin: 0.9rem 0 0 !important;
  color: var(--ink-soft);
  font-size: 0.86rem !important;
  font-style: italic;
}

.home-mobile-volumes {
  display: none;
}

.home-volume-desktop.image-missing {
  aspect-ratio: auto;
  padding: clamp(2rem, 5vw, 4rem);
  border: 12px solid #26315b;
  border-radius: 18px;
  background: var(--paper);
}

.home-volume-desktop.image-missing .home-volume-art,
.home-mobile-volume.image-missing > img {
  display: none;
}

.home-volume-desktop.image-missing .home-spread-content {
  position: relative;
  inset: auto;
  min-height: 32rem;
}

.home-world-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.72fr);
  gap: clamp(2.8rem, 6vw, 5.6rem);
}

.home-map-object {
  position: relative;
  aspect-ratio: 3 / 2;
  filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.56));
}

.home-map-window {
  position: absolute;
  inset: 15.5% 12.2% 12.8%;
  overflow: hidden;
  background: #0b1025;
}

.home-map-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.13);
}

.home-map-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-map-object.image-missing .home-map-window {
  inset: 0;
  border: 8px solid #26315b;
  border-radius: 1rem;
}

.home-map-object.image-missing .home-map-frame {
  display: none;
}

.home-world-copy p {
  color: rgba(248, 237, 201, 0.8);
}

@media (max-width: 1180px) {
  .hero-home .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hero-home,
  .hero-home .hero-inner {
    min-height: 810px;
  }

  .hero-home::before {
    background-position: 67% center;
  }

  .hero-home::after {
    inset: 0;
    border-radius: 0;
    background: linear-gradient(0deg, var(--night-950) 0, rgba(4, 6, 20, 0.18) 60%, rgba(4, 6, 20, 0.42));
    filter: none;
  }

  .hero-home .hero-inner {
    align-items: start;
    padding: 4.4rem 0 5.6rem;
  }

  .home-title-lockup {
    width: min(330px, 94%);
    margin: -1.35rem auto -0.75rem;
  }

  .hero-home .hero-lede {
    margin-right: auto;
    margin-left: auto;
    font-size: 1.15rem;
    line-height: 1.48;
  }

  .home-volume-desktop {
    display: none;
  }

  .home-mobile-volumes {
    display: grid;
    gap: 1.4rem;
  }

  .home-mobile-volume {
    position: relative;
    width: min(430px, 100%);
    aspect-ratio: 2 / 3;
    margin: 0 auto;
    filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.58));
  }

  .home-mobile-volume > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .home-mobile-volume--left > img {
    transform: scaleX(-1);
  }

  .home-mobile-page {
    position: absolute;
    inset: 14% 14.5% 13% 20.5%;
    color: var(--ink);
  }

  .home-mobile-volume--left .home-mobile-page {
    inset: 14% 20.5% 13% 14.5%;
  }

  .home-mobile-page .eyebrow {
    font-size: 0.58rem;
  }

  .home-mobile-page h3 {
    margin: 0 0 0.2rem;
    color: var(--ink);
    font-size: 2rem;
    line-height: 0.96;
  }

  .home-mobile-page > p {
    margin: 0 0 0.6rem;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .home-mobile-page .chapter-link {
    margin: 0;
    padding: 0.62rem 1.45rem 0.62rem 0;
  }

  .home-mobile-page .chapter-link strong {
    font-size: 1.08rem;
  }

  .home-mobile-page .chapter-link span {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .home-mobile-page .home-volume-note {
    max-width: 100%;
    margin-top: 0.6rem !important;
    font-size: 0.72rem !important;
  }

  .home-mobile-volume.image-missing {
    aspect-ratio: auto;
    padding: 2rem 1.35rem;
    border: 8px solid #26315b;
    border-radius: 14px;
    background: var(--paper);
  }

  .home-mobile-volume.image-missing .home-mobile-page {
    position: relative;
    inset: auto;
  }

  .home-world-grid {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }

  .home-world-copy {
    text-align: center;
  }

  .home-world-copy .button {
    margin-top: 0.4rem;
  }
}

@media (max-width: 640px) {
  .hero-home,
  .hero-home .hero-inner {
    min-height: 740px;
  }
}

/* Library catalog and story folios */
.library-hero {
  min-height: 720px;
}

.library-hero .page-hero-inner {
  padding: 7.5rem 0 6.6rem;
}

.reading-room-hero {
  min-height: 520px;
}

.reading-room-hero::before {
  filter: saturate(0.82) brightness(0.58);
}

.reading-room-hero .page-hero-inner {
  padding: 8rem 0 4.5rem;
}

.reading-room-hero h1 {
  max-width: 1050px;
  font-size: clamp(3.8rem, 8vw, 7rem);
}

.reading-room-list {
  padding-top: 4.4rem;
}

.library-catalog-section {
  padding: 5.6rem 1.25rem 4.7rem;
  background:
    radial-gradient(circle at 50% 0, rgba(111, 92, 168, 0.2), transparent 38rem),
    #070918;
}

.library-catalog-object {
  position: relative;
  width: min(1180px, 100%);
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  filter: drop-shadow(0 30px 48px rgba(0, 0, 0, 0.66));
}

.library-catalog-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.library-catalog-copy {
  position: absolute;
  inset: 13% 13.1% 23%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  color: var(--ink);
}

.library-catalog-page {
  min-width: 0;
}

.library-catalog-page:last-child {
  padding: 7% 12% 4% 4%;
}

.library-catalog-page:first-child {
  padding: 7% 4% 4% 15%;
}

.library-catalog-page .eyebrow,
.library-catalog-mobile-copy .eyebrow,
.folio-copy .eyebrow {
  color: #71451f;
}

.library-catalog-page .eyebrow {
  font-size: 0.66rem;
}

.library-catalog-page h2 {
  margin: 0.35rem 0 1rem;
  color: var(--ink);
  font-size: clamp(1.9rem, 2.65vw, 3rem);
  line-height: 1;
}

.library-catalog-page p,
.library-catalog-mobile-copy p {
  color: var(--ink-soft);
}

.library-catalog-page p {
  margin: 0 0 0.85rem;
  font-size: clamp(0.78rem, 1.05vw, 1rem);
  line-height: 1.42;
}

.library-tome-invocation {
  color: #603b1b !important;
  font-family: var(--display);
  font-size: clamp(1.08rem, 1.35vw, 1.35rem) !important;
  font-style: italic;
  line-height: 1.32 !important;
}

.library-tome-closing {
  margin-top: 1.35rem !important;
  color: #5c3718 !important;
  font-style: italic;
}

.library-catalog-mobile-stack,
.library-catalog-mobile {
  display: none;
}

.library-folio-section {
  position: relative;
  padding: 4.7rem 1.25rem 7.5rem;
  background:
    linear-gradient(rgba(5, 7, 18, 0.5), #070918 22rem),
    url("library-environment-v2.webp") center top / cover fixed;
}

.library-shelf-heading {
  width: min(760px, 100%);
  margin: 0 auto 3.4rem;
  text-align: center;
}

.library-shelf-heading h2 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(3rem, 5vw, 5rem);
}

.library-shelf-heading p:last-child {
  color: rgba(248, 237, 201, 0.75);
}

.story-folio-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2.1rem;
  align-items: start;
}

.story-folio {
  position: relative;
  display: block;
  color: var(--ink);
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.62));
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.story-folio:hover {
  filter: brightness(1.07) drop-shadow(0 30px 34px rgba(0, 0, 0, 0.72));
  transform: translateY(-4px);
}

.story-folio:focus,
.story-folio:focus-visible {
  outline: 4px solid var(--gold-light);
  outline-offset: 6px;
  border-radius: 18px;
}

.story-folio.landscape {
  grid-column: span 6;
  aspect-ratio: 1448 / 1086;
}

.story-folio.portrait {
  grid-column: span 4;
  aspect-ratio: 1122 / 1402;
}

@media (min-width: 901px) {
  .story-folio.portrait {
    grid-column: span 6;
    width: min(460px, 100%);
    justify-self: center;
  }

  .story-folio.portrait:last-child {
    grid-column: 4 / span 6;
  }
}

.folio-story-image {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  background: #11142d;
}

.landscape .folio-story-image {
  inset: 12% 13% 44%;
}

.portrait .folio-story-image {
  inset: 10.5% 18.5% 41%;
}

.folio-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.folio-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.folio-copy {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

.landscape .folio-copy {
  inset: 58.5% 15% 16.7%;
}

.portrait .folio-copy {
  inset: 61.8% 20.5% 13.5%;
}

.folio-copy .eyebrow {
  margin-bottom: 0.35rem;
  font-size: 0.56rem;
}

.folio-copy h3 {
  margin: 0 0 0.25rem;
  color: var(--ink);
  font-size: clamp(1.45rem, 1.8vw, 1.82rem);
  line-height: 0.94;
  text-wrap: balance;
}

.story-folio.long-title .folio-copy h3 {
  font-size: clamp(1.2rem, 1.55vw, 1.55rem);
  line-height: 0.98;
}

.portrait .folio-copy h3 {
  font-size: clamp(1.25rem, 1.55vw, 1.55rem);
}

@media (min-width: 801px) {
  .portrait .folio-copy {
    inset: 61.8% 20.5% 15.5%;
  }

  .portrait .folio-copy .eyebrow {
    margin-bottom: 0.2rem;
    line-height: 1;
  }

  .portrait .folio-copy h3 {
    margin-bottom: 0.15rem;
    line-height: 0.9;
  }

  .portrait .folio-copy p {
    line-height: 1.15;
  }
}

.folio-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.7rem, 0.82vw, 0.82rem);
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.folio-read {
  align-self: center;
  width: 100%;
  margin-top: auto;
  color: #754c25;
  font: 800 0.58rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.library-featured-grid {
  margin-bottom: clamp(4.5rem, 8vw, 7rem);
}

.library-browse {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid rgba(224, 190, 112, 0.26);
}

.library-browse-heading {
  width: min(760px, 100%);
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.library-browse-heading h2 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(2.7rem, 4.5vw, 4.5rem);
}

.library-browse-heading p:last-child {
  color: rgba(248, 237, 201, 0.75);
}

.library-catalog-tools {
  display: none;
}

.library-browse.is-enhanced .library-catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
  gap: 1rem;
  margin: 0 auto 1.25rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(211, 169, 82, 0.42);
  border-radius: 16px;
  background: linear-gradient(rgba(248, 234, 195, 0.97), rgba(225, 203, 151, 0.98));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
}

.library-catalog-field {
  display: grid;
  gap: 0.45rem;
  color: #5f3d22;
  font: 800 0.68rem/1.2 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.library-catalog-field input,
.library-catalog-field select {
  min-height: 48px;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(91, 57, 29, 0.38);
  border-radius: 8px;
  background: rgba(255, 250, 230, 0.82);
  color: var(--ink);
  font: 600 1rem/1.3 var(--sans);
  letter-spacing: normal;
  text-transform: none;
}

.library-catalog-field input:focus-visible,
.library-catalog-field select:focus-visible {
  outline: 3px solid #825c27;
  outline-offset: 3px;
}

.library-catalog-field small {
  color: rgba(78, 48, 30, 0.78);
  font: 600 0.72rem/1.3 var(--sans);
  letter-spacing: normal;
  text-transform: none;
}

.library-results-status {
  min-height: 1.5rem;
  margin: 0 0 1.25rem;
  color: rgba(248, 237, 201, 0.78);
  font: 700 0.75rem/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.library-story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
  align-items: stretch;
}

.library-story-card {
  overflow: hidden;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid rgba(224, 190, 112, 0.48);
  border-radius: 14px;
  background: linear-gradient(rgba(247, 233, 191, 0.97), rgba(221, 195, 137, 0.98));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.46);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.library-story-card[hidden] {
  display: none;
}

.library-story-card:hover {
  border-color: rgba(248, 214, 128, 0.92);
  box-shadow: 0 24px 38px rgba(0, 0, 0, 0.58);
  transform: translateY(-4px);
}

.library-story-card:focus-visible {
  outline: 4px solid var(--gold-light);
  outline-offset: 5px;
}

.library-story-image {
  overflow: hidden;
  display: block;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid rgba(105, 66, 31, 0.32);
  background: #11142d;
}

.library-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.library-story-card:hover .library-story-image img {
  transform: scale(1.025);
}

.library-story-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.1rem 1.05rem 1rem;
}

.library-story-copy .eyebrow {
  margin-bottom: 0.45rem;
  color: #71451f;
  font-size: 0.56rem;
}

.library-story-copy h3 {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.65vw, 1.65rem);
  line-height: 1;
  text-wrap: balance;
}

.library-story-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.library-story-read {
  margin-top: auto;
  padding-top: 1rem;
  color: #754c25;
  font: 800 0.62rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-empty-state {
  margin: 2rem auto 0;
  padding: 1.4rem;
  border: 1px solid rgba(224, 190, 112, 0.32);
  border-radius: 12px;
  color: rgba(248, 237, 201, 0.82);
  text-align: center;
}

.library-load-more {
  display: block;
  min-height: 48px;
  margin: 2.2rem auto 0;
  padding: 0.85rem 1.4rem;
  border: 1px solid rgba(230, 194, 111, 0.66);
  border-radius: 999px;
  background: rgba(17, 20, 45, 0.9);
  color: var(--gold-light);
  cursor: pointer;
  font: 800 0.7rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.library-load-more:hover,
.library-load-more:focus-visible {
  border-color: var(--gold-light);
  background: rgba(42, 38, 62, 0.98);
}

.library-load-more:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 4px;
}

.library-load-more[hidden] {
  display: none;
}

.reading-room-secret {
  width: min(34rem, calc(100% - 2rem));
  margin: 3.5rem auto 0;
  text-align: center;
}

.reading-room-secret a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: rgba(231, 196, 118, 0.72);
  font: 700 0.74rem/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.reading-room-secret a:hover,
.reading-room-secret a:focus-visible {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.library-catalog-object.image-missing,
.library-catalog-mobile.image-missing {
  aspect-ratio: auto;
  padding: clamp(2rem, 6vw, 5rem);
  border: 10px solid #26315b;
  border-radius: 18px;
  background: var(--paper);
  filter: none;
}

.library-catalog-object.image-missing .library-catalog-art,
.library-catalog-mobile.image-missing .library-catalog-art,
.story-folio.image-missing .folio-frame {
  display: none;
}

.library-catalog-object.image-missing .library-catalog-copy,
.library-catalog-mobile.image-missing .library-catalog-mobile-copy {
  position: relative;
  inset: auto;
}

.story-folio.image-missing {
  aspect-ratio: auto;
  overflow: hidden;
  border: 8px solid #26315b;
  border-radius: 18px;
  background: var(--paper);
  filter: none;
}

.story-folio.image-missing .folio-story-image,
.story-folio.image-missing .folio-copy {
  position: relative;
  inset: auto;
}

.story-folio.image-missing .folio-story-image {
  height: 260px;
}

.story-folio.image-missing .folio-copy {
  min-height: 210px;
  padding: 1.4rem;
}

@media (max-width: 1000px) {
  .library-story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .library-catalog-object {
    display: none;
  }

  .library-catalog-mobile-stack {
    display: grid;
    width: min(520px, 100%);
    margin: 0 auto;
    gap: 2rem;
  }

  .library-catalog-mobile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.64));
  }

  .library-catalog-mobile-copy {
    position: absolute;
    inset: 11% 13% 18% 19%;
    color: var(--ink);
    text-align: center;
  }

  .library-catalog-mobile-copy .eyebrow {
    font-size: 0.62rem;
  }

  .library-catalog-mobile-copy h2 {
    margin: 0.35rem 0 0.8rem;
    color: var(--ink);
    font-size: clamp(2rem, 7vw, 3.2rem);
    line-height: 1;
  }

  .library-catalog-mobile-copy p {
    margin: 0 0 0.8rem;
    font-size: clamp(0.82rem, 2.35vw, 1rem);
    line-height: 1.42;
  }

  .library-catalog-mobile-copy .library-tome-invocation {
    font-size: clamp(1.12rem, 3.5vw, 1.45rem) !important;
  }

  .library-tome-mobile-charge .library-catalog-mobile-copy {
    inset: 13% 13% 17% 19%;
  }

  .library-browse.is-enhanced .library-catalog-tools {
    grid-template-columns: 1fr;
  }

  .story-folio.landscape {
    grid-column: span 12;
  }

  .story-folio.portrait {
    grid-column: span 6;
  }
}

@media (max-width: 800px) {
  .library-hero {
    min-height: 700px;
  }

  .library-hero::before {
    background-position: 61% center;
  }

  .library-hero .page-hero-inner {
    padding: 15.6rem 0 4.4rem;
  }

  .library-hero h1 {
    font-size: clamp(4.2rem, 19vw, 6rem);
  }

  .library-hero .page-intro {
    font-size: 1.12rem;
  }

  .reading-room-hero {
    min-height: 320px;
  }

  .reading-room-hero::before {
    background-position: 52% center;
  }

  .reading-room-hero .page-hero-inner {
    padding: 5.5rem 0 2.25rem;
  }

  .reading-room-hero h1 {
    font-size: clamp(3rem, 13vw, 4.5rem);
    line-height: 0.95;
  }

  .reading-room-hero .page-intro {
    max-width: 31rem;
    font-size: 1.08rem;
  }

  .reading-room-list {
    padding-top: 2.35rem;
  }

  .library-catalog-section {
    padding: 4rem 0.65rem 3.4rem;
  }

  .library-catalog-mobile-copy {
    inset: 10.5% 14% 18% 20%;
  }

  .library-folio-section {
    padding: 4rem 0.75rem 5.6rem;
    background-attachment: scroll;
  }

  .library-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-folio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .story-folio.landscape,
  .story-folio.portrait {
    grid-column: 1;
    width: min(100%, 430px);
    margin-right: auto;
    margin-left: auto;
    aspect-ratio: 2 / 3;
  }

  .story-folio.landscape .folio-frame,
  .story-folio.portrait .folio-frame {
    content: url("story-card-mobile.webp");
  }

  .story-folio.landscape .folio-story-image,
  .story-folio.portrait .folio-story-image {
    inset: 8.5% 13.5% 50.5%;
  }

  .story-folio.landscape .folio-story-image img {
    object-fit: contain;
  }

  .landscape .folio-copy,
  .portrait .folio-copy {
    inset: 53.5% 18.5% 15.5%;
  }

  .folio-copy h3,
  .portrait .folio-copy h3 {
    font-size: clamp(1.5rem, 7vw, 1.85rem);
  }

  .story-folio.long-title .folio-copy h3,
  .story-folio.long-title.portrait .folio-copy h3 {
    font-size: clamp(1.14rem, 5.2vw, 1.42rem);
    line-height: 1;
  }

  .folio-copy p {
    font-size: clamp(0.78rem, 3.6vw, 0.92rem);
    line-height: 1.25;
  }

  .folio-copy .folio-read {
    margin-top: 0.5rem;
  }

  .folio-read {
    font-size: 0.62rem;
  }

  .story-folio.image-missing {
    aspect-ratio: auto;
  }
}

@media (max-width: 360px) {
  .library-tome-mobile-declaration .library-catalog-mobile-copy {
    inset: 9.5% 13.5% 22% 19.5%;
  }

  .library-catalog-mobile-copy .eyebrow {
    font-size: 0.54rem;
  }

  .library-catalog-mobile-copy h2 {
    margin: 0.25rem 0 0.6rem;
    font-size: 1.72rem;
    line-height: 0.98;
  }

  .library-catalog-mobile-copy p {
    margin-bottom: 0.55rem;
    font-size: 0.74rem;
    line-height: 1.32;
  }

  .library-catalog-mobile-copy .library-tome-invocation {
    font-size: 0.98rem !important;
  }

  .library-catalog-mobile-copy .library-tome-closing {
    margin-top: 0.85rem !important;
  }
}

@media (max-width: 520px) {
  .library-story-grid {
    grid-template-columns: 1fr;
  }

  .library-story-copy {
    padding: 1.15rem 1.1rem 1.05rem;
  }

  .library-story-copy h3 {
    font-size: 1.5rem;
  }
}

/* The Game Room: a central Vale gathering place with modular game stations. */
.game-room-site-page {
  background:
    radial-gradient(circle at 50% 14%, rgba(91, 68, 145, 0.28), transparent 38rem),
    #050713;
}

.game-room-threshold {
  position: relative;
  min-height: clamp(520px, 68vw, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(229, 197, 119, 0.24);
  background:
    linear-gradient(180deg, rgba(3, 5, 14, 0.28), rgba(3, 5, 14, 0.36) 34%, rgba(3, 5, 14, 0.97) 100%),
    url("game-room-background-desktop.webp") center 42% / cover no-repeat;
}

.game-room-threshold::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 36%, transparent 10%, rgba(4, 5, 15, 0.28) 72%),
    linear-gradient(90deg, rgba(4, 5, 15, 0.52), transparent 30%, transparent 70%, rgba(4, 5, 15, 0.52));
  pointer-events: none;
}

.game-room-threshold-copy {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), 850px);
  margin: 0 auto;
  padding: 5rem 0 clamp(3.2rem, 8vw, 6rem);
  text-align: center;
  text-shadow: 0 3px 18px #02030a;
}

.game-room-threshold-copy h1 {
  margin: 0.15rem 0 0.65rem;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: clamp(4.3rem, 10vw, 8.2rem);
  font-weight: 600;
  line-height: 0.84;
}

.game-room-threshold-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  font-size: clamp(1.15rem, 1rem + 0.42vw, 1.5rem);
}

.game-room-collection {
  padding: clamp(4rem, 8vw, 7rem) 0 0;
}

.game-room-collection-heading {
  width: min(calc(100% - 2rem), 840px);
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
  text-align: center;
}

.game-room-collection-heading h2,
.game-room-featured-copy h2,
.game-room-world-note h2 {
  margin: 0.15rem 0 0.7rem;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: clamp(3.3rem, 7vw, 6rem);
  font-weight: 600;
  line-height: 0.92;
}

.game-room-collection-heading > p:last-child {
  max-width: 720px;
  margin: 0 auto;
  color: rgba(248, 237, 201, 0.86);
}

.game-room-desktop {
  display: block;
}

.game-room-desktop-scene {
  position: relative;
  width: min(calc(100% - 2rem), 1520px);
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 1672 / 941;
  border: 1px solid rgba(229, 197, 119, 0.38);
  border-radius: 1.2rem;
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.7);
  isolation: isolate;
}

.game-room-background {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-room-station {
  position: absolute;
  z-index: 1;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.6));
  transition: filter 180ms ease, transform 180ms ease;
}

.game-room-station img {
  width: 100%;
}

.game-room-station:hover,
.game-room-station:focus-visible {
  z-index: 3;
  filter:
    drop-shadow(0 0 9px rgba(241, 217, 141, 0.75))
    drop-shadow(0 22px 28px rgba(0, 0, 0, 0.68));
  transform: translateY(-1.2%);
}

.game-room-station-gemfall {
  top: 19%;
  left: -6%;
  width: 42%;
}

.game-room-station-sudoku {
  top: 10%;
  left: 25.5%;
  width: 49%;
}

.game-room-station-moonweb {
  top: 18%;
  right: -5.5%;
  width: 42%;
}

.game-room-ledger {
  width: min(calc(100% - 2rem), 1220px);
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  padding: clamp(1.2rem, 3vw, 2.5rem) clamp(1.2rem, 4vw, 3rem);
  color: var(--ink);
  border: 1px solid rgba(88, 54, 28, 0.5);
  background:
    linear-gradient(rgba(255, 249, 222, 0.82), rgba(238, 218, 169, 0.9)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(112, 69, 31, 0.05) 31px);
  box-shadow: var(--shadow);
  list-style: none;
}

.game-room-ledger > li + li {
  border-top: 1px solid rgba(92, 56, 27, 0.28);
}

.game-room-ledger article {
  padding: clamp(1.35rem, 3vw, 2.25rem) 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.game-room-ledger h3,
.game-room-mobile-copy h3 {
  margin: 0.1rem 0 0.45rem;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: clamp(2.5rem, 4vw, 3.9rem);
  line-height: 0.95;
}

.game-room-ledger p {
  margin: 0 0 0.7rem;
}

.game-room-ledger .eyebrow,
.game-room-mobile-copy .eyebrow,
.place-game-callout .eyebrow {
  color: var(--paper-accent);
}

.game-room-number {
  color: rgba(92, 56, 27, 0.5);
  font-family: var(--serif-display);
  font-size: 3.2rem;
  text-align: center;
}

.game-room-ledger ul,
.game-room-mobile-copy ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  list-style: none;
}

.game-room-ledger li li::before,
.game-room-mobile-copy li::before {
  margin-right: 0.35rem;
  color: var(--paper-accent);
  content: "✦";
}

.game-room-ledger .button {
  min-width: 168px;
}

.game-room-mobile {
  display: none;
}

.game-room-featured-table {
  width: min(calc(100% - 2rem), 1280px);
  margin: clamp(5rem, 10vw, 8rem) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  overflow: hidden;
  border: 1px solid rgba(229, 197, 119, 0.45);
  border-radius: 1.2rem;
  background: #0a0c20;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.65);
}

.game-room-featured-art {
  min-width: 0;
  margin: 0;
  background: #070916;
}

.game-room-featured-art picture,
.game-room-featured-art img {
  display: block;
  width: 100%;
  height: 100%;
}

.game-room-featured-art img {
  object-fit: cover;
}

.game-room-featured-copy {
  padding: clamp(2rem, 4vw, 3.5rem);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(rgba(255, 249, 222, 0.96), rgba(232, 208, 154, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(112, 69, 31, 0.05) 30px);
}

.game-room-featured-copy > .eyebrow,
.game-room-featured-listing .eyebrow {
  color: var(--paper-accent);
}

.game-room-featured-copy h2 {
  margin: 0.2rem 0 0.8rem;
  color: var(--ink);
  font-size: clamp(3rem, 5vw, 5rem);
}

.game-room-featured-copy > p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.game-room-featured-listing {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-top: clamp(1.3rem, 3vw, 2rem);
  border-top: 1px solid rgba(92, 56, 27, 0.28);
}

.game-room-featured-listing h3 {
  margin: 0.15rem 0 0.55rem;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  line-height: 0.95;
}

.game-room-featured-listing > p:not(.eyebrow) {
  margin: 0 0 0.9rem;
  color: var(--ink);
}

.game-room-featured-listing ul {
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.38rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  list-style: none;
}

.game-room-featured-listing li::before {
  margin-right: 0.45rem;
  color: var(--paper-accent);
  content: "✦";
}

.game-room-featured-listing .button {
  width: 100%;
}

.game-room-world-note {
  width: min(calc(100% - 2rem), 900px);
  margin: clamp(4.5rem, 9vw, 8rem) auto 0;
  padding: 0 0 clamp(5rem, 10vw, 8rem);
  text-align: center;
}

.game-room-world-note h2 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
}

.game-room-world-note p:not(.eyebrow) {
  max-width: 760px;
  margin: 0.8rem auto 1.8rem;
  color: rgba(248, 237, 201, 0.82);
}

.game-room-world-note .button-row {
  justify-content: center;
}

.place-game-callout {
  margin-top: 2rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid rgba(96, 56, 15, 0.35);
  background:
    linear-gradient(90deg, rgba(121, 76, 31, 0.1), rgba(255, 249, 222, 0.36)),
    url("game-room-background-desktop.webp") center 42% / cover no-repeat;
  box-shadow: inset 0 0 0 999px rgba(247, 232, 191, 0.82);
}

.place-game-callout h3 {
  margin: 0.2rem 0 0.5rem;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1;
}

.place-game-callout p {
  color: var(--ink);
}

@media (max-width: 800px) {
  .game-room-threshold {
    min-height: 600px;
    background:
      linear-gradient(180deg, rgba(3, 5, 14, 0.25), rgba(3, 5, 14, 0.48) 46%, rgba(3, 5, 14, 0.98) 100%),
      url("game-room-background-mobile.webp") center 42% / cover no-repeat;
  }

  .game-room-threshold-copy {
    padding-bottom: 3.2rem;
  }

  .game-room-threshold-copy h1 {
    font-size: clamp(4rem, 19vw, 6.5rem);
  }

  .game-room-collection {
    padding-top: 4rem;
  }

  .game-room-desktop {
    display: none;
  }

  .game-room-mobile {
    display: block;
  }

  .game-room-featured-table {
    width: min(100%, 560px);
    margin-top: 1rem;
    grid-template-columns: 1fr;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .game-room-featured-art {
    aspect-ratio: 2 / 3;
  }

  .game-room-featured-copy {
    padding: 1.7rem 1.25rem 1.6rem;
  }

  .game-room-featured-copy h2 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .game-room-mobile-chapter {
    width: min(100%, 560px);
    margin: 0 auto clamp(4rem, 14vw, 6rem);
  }

  .game-room-mobile-bay {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 941 / 1672;
    border-top: 1px solid rgba(229, 197, 119, 0.3);
    border-bottom: 1px solid rgba(229, 197, 119, 0.3);
    isolation: isolate;
  }

  .game-room-mobile-background,
  .game-room-mobile-station {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .game-room-mobile-background {
    z-index: 0;
    object-fit: cover;
  }

  .game-room-mobile-station {
    z-index: 1;
    object-fit: contain;
    filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.58));
  }

  .game-room-mobile-copy {
    position: relative;
    z-index: 2;
    width: calc(100% - 1.5rem);
    margin: -2.2rem auto 0;
    padding: 1.5rem 1.25rem 1.4rem;
    color: var(--ink);
    border: 1px solid rgba(89, 54, 28, 0.52);
    background:
      linear-gradient(rgba(255, 249, 222, 0.96), rgba(235, 212, 158, 0.97)),
      repeating-linear-gradient(0deg, transparent 0 27px, rgba(112, 69, 31, 0.05) 28px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  }

  .game-room-mobile-copy p {
    margin: 0 0 0.75rem;
  }

  .game-room-mobile-copy ul {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 1.2rem;
  }

  .game-room-mobile-copy .button {
    width: 100%;
  }

  .game-room-world-note {
    margin-top: 1rem;
  }

  .game-room-world-note .button-row {
    align-items: stretch;
  }

  .family-paths {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .game-room-threshold {
    min-height: 560px;
  }

  .game-room-collection-heading {
    width: calc(100% - 1.5rem);
  }

  .game-room-collection-heading h2 {
    font-size: 3.25rem;
  }

  .game-room-mobile-copy {
    width: calc(100% - 1rem);
    padding: 1.3rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-room-station {
    transition: none;
  }
}

/* The Tome B2 and Character A: approved artifact-and-index and illustrated folio directions. */
.tome-page,
.tome-record-page {
  background:
    radial-gradient(circle at 50% 10%, rgba(95, 73, 151, 0.28), transparent 40rem),
    #070817;
}

.tome-threshold {
  position: relative;
  min-height: clamp(720px, 72vw, 930px);
  padding: clamp(3rem, 6vw, 5.5rem) 1rem clamp(7rem, 13vw, 10rem);
  overflow: hidden;
  display: grid;
  align-content: start;
  isolation: isolate;
  background:
    radial-gradient(ellipse 45% 38% at 50% 62%, rgba(3, 4, 13, 0.98) 0 34%, rgba(7, 8, 23, 0.76) 62%, transparent 82%),
    radial-gradient(circle at 50% 28%, rgba(82, 64, 139, 0.48), transparent 34rem),
    linear-gradient(180deg, #121536, #070817);
}

.tome-threshold::after {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 48%;
  content: "";
  background:
    radial-gradient(ellipse at 50% 36%, rgba(229, 197, 119, 0.14), transparent 45%),
    linear-gradient(transparent, #070817 92%);
  pointer-events: none;
}

.tome-threshold-copy {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), 800px);
  margin: 0 auto;
  text-align: center;
  text-shadow: 0 3px 22px #02030a;
}

.tome-threshold-copy h1 {
  margin: 0.1rem 0 0.7rem;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: clamp(4.6rem, 11vw, 9rem);
  font-weight: 600;
  line-height: 0.82;
}

.tome-threshold-copy > p:last-child {
  max-width: 720px;
  margin: 0 auto;
  color: rgba(248, 237, 201, 0.9);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.38rem);
}

.tome-object {
  position: relative;
  z-index: 1;
  width: min(820px, 82vw);
  margin: -0.3rem auto 0;
  filter:
    drop-shadow(0 34px 28px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 30px rgba(217, 180, 91, 0.13));
}

.tome-object img {
  display: block;
  width: 100%;
  height: auto;
}

.tome-index-shell {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), 1220px);
  margin: clamp(-8.5rem, -10vw, -5rem) auto 0;
  padding: clamp(1rem, 3vw, 2.3rem);
  border: 1px solid rgba(229, 197, 119, 0.38);
  border-radius: 6px 30px 6px 30px;
  background: linear-gradient(180deg, rgba(18, 22, 51, 0.97), rgba(7, 8, 23, 0.99));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58);
}

.storyteller-guidance {
  display: grid;
  grid-template-columns: minmax(170px, 0.38fr) minmax(0, 1.62fr);
  gap: 1.3rem;
  align-items: center;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
  padding: 1rem 1.2rem;
  border: 1px solid rgba(229, 197, 119, 0.45);
  border-radius: 4px 18px 4px 18px;
  background: linear-gradient(90deg, rgba(62, 43, 34, 0.82), rgba(16, 20, 46, 0.92));
}

.storyteller-guidance strong {
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.storyteller-guidance p {
  margin: 0;
  color: #e3d5b0;
  line-height: 1.55;
}

.tome-index-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.tome-index-heading h2,
.tome-latest h2 {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 0.92;
}

.tome-index-heading > p {
  max-width: 38rem;
  margin: 0;
  color: #d8caa4;
}

.tome-shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tome-shelf-card {
  position: relative;
  min-height: 150px;
  padding: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
  border: 1px solid rgba(229, 197, 119, 0.4);
  border-radius: 4px 18px 4px 18px;
  background:
    linear-gradient(110deg, rgba(31, 14, 8, 0.78), rgba(35, 18, 11, 0.58)),
    url("tome-shelf-card-walnut.webp") center / cover no-repeat;
  box-shadow:
    inset 0 0 0 5px rgba(24, 11, 7, 0.28),
    inset 0 -30px 50px rgba(17, 8, 5, 0.2);
  text-decoration: none;
}

.tome-shelf-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 82% 18%, rgba(229, 197, 119, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 238, 199, 0.02), transparent 45%);
}

.tome-shelf-card > * {
  position: relative;
}

.tome-shelf-card > span,
.tome-shelf-card > small {
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tome-shelf-card > strong {
  color: var(--paper);
  font-family: var(--serif-display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
}

.tome-shelf-card > p {
  margin: 0.7rem 0 1rem;
  color: #d8caa4;
  font-size: 0.86rem;
  line-height: 1.45;
}

.tome-shelf-card:hover,
.tome-shelf-card:focus-visible {
  color: var(--paper);
  border-color: rgba(248, 222, 143, 0.82);
  box-shadow:
    inset 0 0 0 5px rgba(12, 10, 19, 0.25),
    0 0 0 3px rgba(229, 197, 119, 0.18);
  transform: translateY(-2px);
}

.tome-latest {
  margin-top: clamp(3.5rem, 8vw, 6rem);
}

.tome-latest > header {
  max-width: 850px;
  margin-bottom: 1.5rem;
}

.tome-latest > header > p:last-child {
  margin: 0.7rem 0 0;
  color: #d8caa4;
}

.tome-latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
}

.collector-cards-page {
  background:
    radial-gradient(circle at 50% 8%, rgba(95, 73, 151, 0.3), transparent 42rem),
    #070817;
}

.collector-cards-stage {
  min-height: 100vh;
  padding: clamp(4rem, 8vw, 7rem) 1rem clamp(5rem, 9vw, 8rem);
}

.collector-cards-intro {
  width: min(100%, 880px);
  margin: 0 auto;
  text-align: center;
}

.collector-cards-intro h1 {
  margin: 0.15rem 0 1rem;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: clamp(4.2rem, 11vw, 8.5rem);
  font-weight: 600;
  line-height: 0.84;
}

.collector-cards-intro > p:not(.eyebrow):not(.collector-cards-count) {
  max-width: 720px;
  margin: 0 auto;
  color: rgba(248, 237, 201, 0.9);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.38rem);
}

.collector-cards-count {
  width: fit-content;
  margin: 2rem auto 0;
  padding: 0.75rem 1.1rem;
  color: #d8caa4;
  border: 1px solid rgba(229, 197, 119, 0.4);
  border-radius: 999px;
  background: rgba(12, 15, 35, 0.78);
}

.collector-cards-count strong {
  margin-right: 0.35rem;
  color: var(--gold-light);
}

.collector-cards-collection {
  width: min(100%, 1220px);
  margin: clamp(3.5rem, 8vw, 6rem) auto 0;
  padding: clamp(1rem, 3vw, 2.3rem);
  border: 1px solid rgba(229, 197, 119, 0.38);
  border-radius: 6px 30px 6px 30px;
  background: linear-gradient(180deg, rgba(18, 22, 51, 0.97), rgba(7, 8, 23, 0.99));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58);
}

.collector-cards-collection > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.collector-cards-collection h2 {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 0.92;
}

.collector-cards-collection > header > p {
  max-width: 38rem;
  margin: 0;
  color: #d8caa4;
}

.collector-cards-reveal-all {
  min-width: 8.5rem;
  padding: 0.75rem 1rem;
  color: #111529;
  border: 1px solid #f3d781;
  background: #f3d781;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  cursor: pointer;
}

.collector-cards-reveal-all:hover,
.collector-cards-reveal-all:focus-visible {
  color: #fff0be;
  background: transparent;
}

.collector-cards-path {
  margin: 2rem 0 0;
  text-align: center;
}

.collector-cards-path a {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--gold-light);
  border: 1px solid rgba(229, 197, 119, 0.5);
  border-radius: 999px;
  background: rgba(22, 26, 56, 0.86);
  text-decoration: none;
}

.collector-cards-path a:hover,
.collector-cards-path a:focus-visible {
  color: #fff3c9;
  border-color: rgba(248, 222, 143, 0.9);
  box-shadow: 0 0 0 3px rgba(229, 197, 119, 0.14);
}

.vale-card-item {
  min-width: 0;
}

.vale-card-stack {
  position: relative;
  aspect-ratio: 5 / 7;
  perspective: 1100px;
}

.vale-card-turner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(0.2, 0.72, 0.25, 1);
}

.vale-card-stack.is-flipped .vale-card-turner {
  transform: rotateY(180deg);
}

.vale-card {
  position: relative;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: 14px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(248, 237, 201, 0.12);
}

.vale-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.vale-card-front {
  background: #090c1d;
}

.vale-card-front-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vale-card-back {
  display: grid;
  place-items: stretch;
  transform: rotateY(180deg);
  border: 2px solid rgba(217, 180, 91, 0.82);
  background: #090c1d;
}

.vale-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vale-card-folio {
  padding: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(241, 217, 141, 0.98), rgba(120, 82, 35, 0.92) 25%, rgba(31, 25, 48, 0.98) 45%, rgba(217, 180, 91, 0.98));
}

.vale-card-folio-inner {
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: 32px 41% 1fr;
  border: 1px solid rgba(50, 34, 29, 0.72);
  border-radius: 8px;
  background: var(--paper);
}

.vale-card-kicker,
.vale-card-window-kind {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: clamp(0.52rem, 0.66vw, 0.66rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vale-card-kicker {
  padding: 0 0.65rem;
  color: #f7e8bd;
  background: linear-gradient(90deg, #222844, #111529);
}

.vale-card-kind-mark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.58rem;
  line-height: 1;
}

.vale-card-art {
  margin: 0;
  overflow: hidden;
  border-bottom: 2px solid #aa803b;
  background: #111529;
}

.vale-card-art img,
.vale-card-window-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vale-card-kind-character .vale-card-art img,
.vale-card-kind-character .vale-card-window-art {
  object-position: center 30%;
}

.vale-card-kind-artifact .vale-card-art img,
.vale-card-kind-artifact .vale-card-window-art {
  object-position: center;
}

.vale-card-copy {
  min-height: 0;
  padding: 0.7rem 0.72rem 0.62rem;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), transparent),
    var(--paper);
}

.vale-card-copy h3,
.vale-card-window-copy h3 {
  margin: 0;
  font-family: var(--serif-display);
  font-size: clamp(1rem, 1.5vw, 1.38rem);
  line-height: 0.98;
}

.vale-card-copy.is-long-title h3,
.vale-card-window-copy.is-long-title h3 {
  font-size: clamp(0.82rem, 1.12vw, 1.02rem);
}

.vale-card-subtitle {
  margin: 0.35rem 0 0;
  font-size: clamp(0.58rem, 0.7vw, 0.7rem);
  font-weight: 700;
  line-height: 1.2;
}

.vale-card-lore {
  margin: 0.42rem 0 0.48rem;
  overflow: hidden;
  display: -webkit-box;
  font-size: clamp(0.61rem, 0.76vw, 0.76rem);
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.vale-card-facets {
  margin: auto 0 0.42rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
}

.vale-card-facets li {
  padding: 3px 6px;
  border: 1px solid rgba(90, 62, 37, 0.28);
  border-radius: 999px;
  font-size: clamp(0.45rem, 0.56vw, 0.56rem);
  font-weight: 700;
  line-height: 1.1;
}

.vale-card-copy footer,
.vale-card-window-copy footer {
  padding-top: 0.38rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(90, 62, 37, 0.24);
  font-size: clamp(0.43rem, 0.53vw, 0.53rem);
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.15;
  text-transform: uppercase;
}

.vale-card-number {
  letter-spacing: 0.08em;
}

.vale-card-year {
  opacity: 0.78;
}

.vale-card-window {
  color: var(--paper);
  border: 2px solid rgba(217, 180, 91, 0.82);
  background: #0d1127;
}

.vale-card-window::after {
  position: absolute;
  inset: 7px;
  z-index: 3;
  content: "";
  border: 1px solid rgba(241, 217, 141, 0.44);
  border-radius: 8px;
  pointer-events: none;
}

.vale-card-window-art {
  position: absolute;
  inset: 0;
}

.vale-card-window-kind {
  position: absolute;
  z-index: 4;
  top: 17px;
  right: 17px;
  left: 17px;
  color: #fff3c9;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.92);
}

.vale-card-window-copy {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  left: 8px;
  min-height: 50%;
  padding: 2.1rem 0.82rem 0.78rem;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, transparent, rgba(7, 8, 23, 0.91) 20%, rgba(7, 8, 23, 0.99) 45%);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.74);
}

.vale-card-window-copy .vale-card-facets li {
  border-color: rgba(241, 217, 141, 0.38);
  background: rgba(14, 18, 39, 0.72);
}

.vale-card-window-copy footer {
  border-color: rgba(241, 217, 141, 0.28);
  color: #e8d9ad;
}

.vale-card-action {
  margin-top: 0.7rem;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.vale-card-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.vale-card-controls.is-catalog-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vale-card-catalog-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: #f1d98d;
  font-size: 0.78rem;
  letter-spacing: 0.065em;
}

.vale-card-catalog-meta time,
.vale-card-catalog-meta .is-unrevealed {
  color: #cbbd98;
  font-size: 0.7rem;
  text-align: right;
}

.vale-card-action time {
  color: #cbbd98;
}

.vale-card-action a,
.vale-card-action button {
  padding: 0.55rem 0.68rem;
  color: #fff0be;
  border: 1px solid rgba(229, 197, 119, 0.42);
  border-radius: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-align: center;
  text-decoration: none;
  text-transform: inherit;
  cursor: pointer;
}

.vale-card-action a:hover,
.vale-card-action a:focus-visible,
.vale-card-action button:hover,
.vale-card-action button:focus-visible,
.vale-card-action button[aria-pressed="true"] {
  color: #111529;
  background: #f3d781;
}

.collector-card-modal {
  width: min(760px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  padding: 0;
  color: var(--paper);
  border: 1px solid rgba(229, 197, 119, 0.72);
  background: #0b0e22;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.collector-card-modal::backdrop {
  background: rgba(3, 4, 13, 0.88);
  backdrop-filter: blur(5px);
}

.collector-card-modal-shell {
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

.collector-card-modal-heading {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.collector-card-modal-heading h2 {
  margin: 0;
  color: #f1d98d;
  font-family: var(--serif-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.collector-card-modal-heading button {
  padding: 0.5rem 0.75rem;
  color: #fff0be;
  border: 1px solid rgba(229, 197, 119, 0.52);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.collector-card-modal-heading button:hover,
.collector-card-modal-heading button:focus-visible {
  color: #111529;
  background: #f3d781;
}

.collector-card-modal img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 7.5rem);
  margin: 0 auto;
  display: block;
  aspect-ratio: 5 / 7;
  object-fit: contain;
}

@media (max-width: 420px) {
  .vale-card-controls.is-catalog-controls {
    grid-template-columns: 1fr;
  }

  .vale-card-catalog-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .vale-card-catalog-meta time,
  .vale-card-catalog-meta .is-unrevealed {
    text-align: left;
  }
}

.tome-shelf-stage {
  min-height: 70vh;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(0.75rem, 4vw, 4rem) clamp(4rem, 8vw, 7rem);
  color: var(--paper);
  background:
    radial-gradient(circle at 12% 5%, rgba(111, 92, 168, 0.26), transparent 34rem),
    linear-gradient(180deg, #0b0d21, #070817);
}

.tome-shelf-breadcrumb {
  margin-bottom: 1rem;
}

.tome-shelf-folio {
  width: min(1220px, 100%);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(101, 67, 31, 0.75);
  border-radius: 3px 24px 5px 20px;
  background: #f4e6bd;
  box-shadow:
    0 44px 100px rgba(0, 0, 0, 0.62),
    0 0 0 5px rgba(75, 44, 32, 0.28);
}

.tome-shelf-folio::after {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(242, 213, 150, 0.38);
  box-shadow: inset 0 0 38px rgba(67, 37, 19, 0.22);
}

.tome-folio-clasp {
  width: 14px;
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 9;
  background:
    linear-gradient(90deg, #291711, #69402d 38%, #2a1710 72%, #120a07);
  box-shadow: 6px 0 16px rgba(39, 20, 10, 0.35);
}

.tome-shelf-heading {
  --tome-shelf-illustration: url("tome-shelf-archive-illustration.webp");
  min-height: 450px;
  padding: 4rem 51% 3.6rem 4.6rem;
  position: relative;
  color: var(--ink);
  border-bottom: 5px solid #2d1911;
  background:
    linear-gradient(90deg, rgba(244, 229, 188, 0.18), transparent 54%),
    var(--tome-shelf-illustration) center center / cover no-repeat;
}

.tome-shelf-heading::after {
  display: none;
}

.tome-shelf-heading-characters {
  --tome-shelf-illustration: url("tome-characters-folio-illustration.webp");
}

.tome-shelf-heading-places {
  --tome-shelf-illustration: url("tome-places-folio-illustration.webp");
}

.tome-shelf-heading-artifacts {
  --tome-shelf-illustration: url("tome-artifacts-folio-illustration.webp");
}

.tome-shelf-heading-games-tools {
  --tome-shelf-illustration: url("tome-games-activities-folio-illustration.webp");
}

.tome-shelf-heading-copy {
  position: relative;
  z-index: 2;
}

.tome-shelf-heading .eyebrow {
  color: #65431f;
}

.tome-shelf-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: clamp(3.8rem, 8vw, 7rem);
  font-weight: 600;
  line-height: 0.82;
}

.tome-shelf-heading > div > p:last-child {
  max-width: 610px;
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.6;
}

.tome-shelf-count {
  width: 130px;
  min-height: 130px;
  margin-top: 1.4rem;
  padding: 1rem;
  display: grid;
  place-content: center;
  position: relative;
  z-index: 2;
  color: #533226;
  border: 2px solid rgba(83, 50, 38, 0.76);
  border-radius: 50%;
  background: rgba(238, 218, 166, 0.58);
  box-shadow:
    inset 0 0 0 5px rgba(83, 50, 38, 0.08),
    inset 0 0 0 8px rgba(83, 50, 38, 0.42);
  text-align: center;
  transform: rotate(-4deg);
}

.tome-shelf-count::before,
.tome-shelf-count::after {
  position: absolute;
  inset: 17px;
  content: "";
  border-top: 1px solid rgba(83, 50, 38, 0.38);
  border-bottom: 1px solid rgba(83, 50, 38, 0.38);
  border-radius: 50%;
}

.tome-shelf-count strong,
.tome-shelf-count span,
.tome-shelf-count small {
  display: block;
}

.tome-shelf-count strong {
  color: #3e251d;
  font-family: var(--serif-display);
  font-size: 2.65rem;
  font-weight: 500;
  line-height: 0.9;
}

.tome-shelf-count span,
.tome-shelf-count small {
  margin-top: 0.2rem;
  font-family: var(--sans);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.tome-shelf-count small {
  color: #67483b;
  font-size: 0.46rem;
}

.tome-shelf-mobile-vignette {
  display: none;
}

.tome-shelf-switcher {
  padding: 0.8rem clamp(1rem, 3vw, 2rem) 0.4rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(113, 77, 45, 0.22), transparent 38%),
    #321d16;
}

.tome-shelf-switcher a {
  min-height: 4.45rem;
  padding: 0.68rem 0.62rem 1.08rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff0b6;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: var(--tome-tab-art);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: drop-shadow(0 4px 3px rgba(18, 9, 8, 0.42));
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-shadow:
    0 1px 2px #180d0b,
    0 0 5px rgba(12, 7, 8, 0.8);
  text-transform: uppercase;
  transition: transform 150ms ease, filter 150ms ease;
}

.tome-shelf-switcher a:nth-child(1) {
  --tome-tab-art: url("tome-tab-characters-plum-ornate.webp");
}

.tome-shelf-switcher a:nth-child(2) {
  --tome-tab-art: url("tome-tab-places-green-ornate.webp");
}

.tome-shelf-switcher a:nth-child(3) {
  --tome-tab-art: url("tome-tab-stories-indigo-ornate.webp");
}

.tome-shelf-switcher a:nth-child(4) {
  --tome-tab-art: url("tome-tab-artifacts-umber-ornate.webp");
}

.tome-shelf-switcher a:nth-child(5) {
  --tome-tab-art: url("tome-tab-games-teal-ornate.webp");
}

.tome-shelf-switcher a:nth-child(6) {
  --tome-tab-art: url("tome-tab-visitor-wine-ornate.webp");
}

.tome-shelf-switcher a span {
  margin-left: 0.28rem;
  color: #ffe9a0;
}

.tome-shelf-switcher a[aria-current="page"],
.tome-shelf-switcher a:hover,
.tome-shelf-switcher a:focus-visible {
  color: #fff8d5;
  filter:
    brightness(1.12)
    saturate(1.08)
    drop-shadow(0 6px 5px rgba(18, 9, 8, 0.55));
  transform: translateY(-2px);
}

.tome-shelf-switcher a:focus-visible {
  outline: 2px solid #fff0b6;
  outline-offset: -8px;
}

.tome-shelf-switcher a[aria-current="page"] span,
.tome-shelf-switcher a:hover span,
.tome-shelf-switcher a:focus-visible span {
  color: #fff4c7;
}

.tome-row-index {
  padding: 2.5rem 3.8rem 2rem;
  position: relative;
  background:
    radial-gradient(circle at 10% 15%, rgba(137, 91, 43, 0.08), transparent 18rem),
    radial-gradient(circle at 82% 76%, rgba(93, 52, 79, 0.06), transparent 20rem),
    linear-gradient(90deg, rgba(126, 87, 46, 0.06), transparent 3%, transparent 97%, rgba(126, 87, 46, 0.08)),
    #f8ecc9;
}

.tome-row-index::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.24;
  background-image:
    radial-gradient(circle, rgba(74, 46, 27, 0.2) 0 0.6px, transparent 0.8px);
  background-size: 17px 19px;
}

.tome-row-index-heading,
.tome-index-columns,
.tome-row-index-footer {
  position: relative;
  z-index: 1;
}

.tome-row-index-heading {
  padding-bottom: 1.5rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid rgba(86, 52, 35, 0.36);
}

.tome-index-ornament {
  display: block;
  margin-bottom: -0.2rem;
  color: #875638;
  font-size: 1.1rem;
}

.tome-row-index-heading h2 {
  margin: 0;
  color: #3a241d;
  font-family: var(--serif-display);
  font-size: 2.3rem;
  font-weight: 500;
}

.tome-row-index-heading > div > p {
  margin: 0.45rem 0 0;
  color: #76584a;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tome-folio-mark {
  margin: 0;
  color: #815d46;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tome-index-columns {
  padding: 1.2rem 0 0.4rem;
  columns: 2;
  column-gap: 3.5rem;
  column-rule: 1px solid rgba(86, 52, 35, 0.16);
}

.tome-row-group {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 1rem;
  break-inside: avoid;
  padding: 0.8rem 0 1rem;
}

.tome-row-group + .tome-row-group {
  margin-top: 0.35rem;
}

.tome-row-group h2 {
  width: 3.35rem;
  height: 4rem;
  display: grid;
  place-items: center;
  align-self: start;
  margin: 0;
  color: #f5e4b4;
  border: 1px solid rgba(78, 44, 30, 0.72);
  outline: 4px double rgba(184, 137, 69, 0.62);
  outline-offset: -7px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.14), transparent 28%),
    #5e344f;
  font-family: var(--serif-display);
  font-size: 2.35rem;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px #2d1814;
}

.tome-shelf-stage[data-tome-shelf="places"] .tome-row-group h2 {
  background-color: #35452f;
}

.tome-shelf-stage[data-tome-shelf="stories"] .tome-row-group h2 {
  background-color: #403754;
}

.tome-shelf-stage[data-tome-shelf="artifacts"] .tome-row-group h2 {
  background-color: #65442b;
}

.tome-shelf-stage[data-tome-shelf="games-tools"] .tome-row-group h2 {
  background-color: #315358;
}

.tome-row-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tome-row-list li {
  border-bottom: 1px solid rgba(86, 52, 35, 0.2);
}

.tome-row-list a {
  min-height: 70px;
  padding: 0.7rem 0 0.8rem;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr) auto;
  align-items: center;
  gap: 1rem;
  color: var(--ink);
  text-decoration: none;
}

.tome-row-list a:hover,
.tome-row-list a:focus-visible {
  background: rgba(152, 109, 54, 0.09);
}

.tome-row-identity strong,
.tome-row-identity small {
  display: block;
}

.tome-row-identity strong {
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: 1.15rem;
  line-height: 1.1;
}

.tome-row-identity small {
  margin-top: 0.2rem;
  color: #7a4e25;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tome-row-summary {
  overflow: hidden;
  display: -webkit-box;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tome-row-arrow {
  color: #8f5b37;
  font-size: 1.25rem;
}

.tome-row-index-footer {
  padding-top: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #7c5337;
  border-top: 1px solid rgba(86, 52, 35, 0.22);
}

.tome-row-index-footer p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tome-pagination {
  padding: 1rem clamp(1rem, 3vw, 2.2rem) 1.4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(86, 52, 35, 0.22);
  background: #f8ecc9;
}

.tome-pagination ol {
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tome-pagination ol a,
.tome-pagination ol span,
.tome-page-direction {
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  display: inline-grid;
  place-items: center;
  color: #65431f;
  border: 1px solid rgba(101, 67, 31, 0.32);
  background: rgba(255, 255, 255, 0.38);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.tome-pagination ol span[aria-current="page"] {
  color: var(--paper);
  background: #60452e;
}

.tome-page-direction:last-child {
  justify-self: end;
}

.tome-page-direction.is-disabled {
  opacity: 0.45;
}

.library-tome-link {
  margin: 1.8rem auto 0;
  text-align: center;
}

.character-stage,
.artifact-stage {
  padding: clamp(1.4rem, 4vw, 3.5rem) clamp(0.75rem, 4vw, 4rem) clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(circle at 12% 12%, rgba(111, 92, 168, 0.28), transparent 32rem),
    linear-gradient(180deg, #0b0d21, #070817);
}

.record-breadcrumb {
  width: min(1180px, 100%);
  margin: 0 auto 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: #d8caa4;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
}

.record-breadcrumb a {
  color: var(--gold-light);
}

.character-folio,
.artifact-folio {
  width: min(1180px, 100%);
  margin: 0 auto;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58);
}

.character-opening {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.2fr);
}

.portrait-panel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #10162e;
}

.portrait-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--portrait-position, 50% 36%);
}

.portrait-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset -24px 0 34px rgba(10, 8, 17, 0.35);
  pointer-events: none;
}

.identity-panel {
  padding: clamp(2rem, 5vw, 4.8rem);
  background:
    linear-gradient(90deg, rgba(135, 95, 48, 0.09) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
}

.identity-panel .eyebrow,
.folio-section .eyebrow,
.artifact-copy .eyebrow {
  color: #7a4e25;
}

.identity-panel h1,
.artifact-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  font-weight: 600;
  line-height: 0.84;
}

.identity-line {
  margin: 1rem 0 1.35rem;
  color: #7a4e25;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.identity-lead,
.artifact-lead {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.12rem, 2vw, 1.48rem);
  line-height: 1.55;
}

.identity-copy {
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
  font-size: 1.03rem;
  line-height: 1.62;
}

.strength-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: var(--paper);
  border-top: 6px solid #60452e;
  border-bottom: 6px solid #60452e;
  background: #263127;
}

.strength {
  padding: 1.35rem 1.5rem 1.55rem;
}

.strength + .strength {
  border-left: 1px solid rgba(243, 228, 185, 0.23);
}

.strength strong {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.strength p {
  margin: 0;
  line-height: 1.48;
}

.folio-body {
  padding: clamp(1.2rem, 3vw, 2.2rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
}

.folio-section {
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 250, 232, 0.38);
}

.folio-section h2,
.artifact-copy h2 {
  margin: 0 0 0.65rem;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: 1.65rem;
}

.folio-section > p:not(.eyebrow),
.artifact-copy section > p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.record-path-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-path-list li {
  border-left: 4px solid #8d6534;
  background: rgba(152, 109, 54, 0.1);
}

.record-path-list li > a,
.record-path-static {
  padding: 0.72rem 0.8rem;
  display: block;
}

.record-path-list a {
  color: var(--ink);
  text-decoration: none;
}

.record-path-list a:hover strong,
.record-path-list a:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.record-path-list strong,
.record-path-list span {
  display: block;
}

.record-path-list span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.folio-wide {
  grid-column: 1 / -1;
}

.record-next-paths a {
  color: #70491f;
  font-weight: 800;
}

.artifact-folio {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(0, 1fr);
}

.artifact-visual {
  min-height: 720px;
  background: #10162e;
}

.artifact-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artifact-copy {
  padding: clamp(1.7rem, 5vw, 4.6rem);
  background:
    linear-gradient(90deg, rgba(135, 95, 48, 0.08) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
}

.artifact-copy > section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 1200px) {
  .tome-latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vale-card-item {
    width: min(100%, 380px);
    margin-inline: auto;
  }
}

@media (min-width: 761px) and (max-width: 1200px) {
  .vale-card-folio-inner {
    grid-template-rows: 32px 56% 1fr;
  }

  .vale-card-kicker,
  .vale-card-window-kind {
    font-size: 0.64rem;
  }

  .vale-card-copy {
    padding: 0.85rem;
  }

  .vale-card-copy h3,
  .vale-card-window-copy h3 {
    font-size: 1.25rem;
    line-height: 1;
  }

  .vale-card-copy.is-long-title h3,
  .vale-card-window-copy.is-long-title h3 {
    font-size: 1.05rem;
  }

  .vale-card-subtitle {
    font-size: 0.7rem;
  }

  .vale-card-lore {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .vale-card-facets {
    gap: 5px;
  }

  .vale-card-facets li {
    padding: 4px 7px;
    font-size: 0.58rem;
  }

  .vale-card-copy footer,
  .vale-card-window-copy footer {
    font-size: 0.54rem;
  }

  .vale-card-window-copy {
    min-height: 46%;
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (max-width: 980px) {
  .tome-shelf-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .collector-cards-stage {
    padding-top: 3rem;
  }

  .collector-cards-intro h1 {
    font-size: clamp(3.8rem, 19vw, 6rem);
  }

  .collector-cards-collection {
    width: calc(100% - 0.25rem);
    padding: 1rem;
  }

  .collector-cards-collection > header {
    display: block;
  }

  .collector-cards-collection > header > p {
    margin-top: 0.75rem;
  }

  .collector-cards-reveal-all {
    width: 100%;
    margin-top: 1rem;
  }

  .tome-threshold {
    min-height: 690px;
    padding: 2.6rem 0.75rem 6rem;
  }

  .tome-threshold-copy h1 {
    font-size: clamp(4rem, 19vw, 6.5rem);
  }

  .tome-object {
    width: 108vw;
    max-width: 520px;
    margin-top: 0;
  }

  .tome-index-shell {
    width: calc(100% - 1.25rem);
    margin-top: -4.5rem;
    padding: 1rem;
  }

  .storyteller-guidance,
  .tome-index-heading {
    display: block;
  }

  .storyteller-guidance strong {
    display: block;
    margin-bottom: 0.45rem;
  }

  .tome-index-heading > p {
    margin-top: 0.7rem;
  }

  .tome-shelf-grid {
    grid-template-columns: 1fr;
  }

  .tome-latest-grid {
    grid-template-columns: 1fr;
  }

  .vale-card-item {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .vale-card-folio-inner {
    grid-template-rows: 32px 56% 1fr;
  }

  .vale-card-kicker,
  .vale-card-window-kind {
    font-size: clamp(0.54rem, 2.2vw, 0.68rem);
  }

  .vale-card-copy {
    padding: clamp(0.68rem, 3vw, 0.95rem);
  }

  .vale-card-copy h3,
  .vale-card-window-copy h3 {
    font-size: clamp(1.05rem, 4.4vw, 1.32rem);
    line-height: 1;
  }

  .vale-card-copy.is-long-title h3,
  .vale-card-window-copy.is-long-title h3 {
    font-size: clamp(0.88rem, 3.7vw, 1.08rem);
  }

  .vale-card-subtitle {
    margin-top: 0.38rem;
    font-size: clamp(0.63rem, 2.6vw, 0.76rem);
  }

  .vale-card-lore {
    margin: 0.5rem 0 0.58rem;
    font-size: clamp(0.68rem, 2.8vw, 0.82rem);
    line-height: 1.3;
  }

  .vale-card-facets {
    gap: 5px;
  }

  .vale-card-facets li {
    padding: 4px 7px;
    font-size: clamp(0.52rem, 2.2vw, 0.64rem);
  }

  .vale-card-copy footer,
  .vale-card-window-copy footer {
    font-size: clamp(0.48rem, 2vw, 0.58rem);
  }

  .vale-card-window-copy {
    min-height: 46%;
    padding-right: clamp(0.78rem, 3vw, 1rem);
    padding-left: clamp(0.78rem, 3vw, 1rem);
  }

  .vale-card-action {
    align-items: stretch;
    flex-direction: column;
  }

  .vale-card-action a,
  .vale-card-action button {
    text-align: center;
  }

  .character-stage,
  .artifact-stage {
    padding: 1.2rem 0.65rem 3rem;
  }

  .character-opening,
  .artifact-folio {
    grid-template-columns: 1fr;
  }

  .portrait-panel {
    min-height: 470px;
  }

  .portrait-panel::after {
    box-shadow: inset 0 -24px 34px rgba(10, 8, 17, 0.35);
  }

  .identity-panel,
  .artifact-copy {
    padding: 1.6rem 1.2rem 2rem;
  }

  .identity-panel h1,
  .artifact-copy h1 {
    font-size: clamp(3.5rem, 17vw, 5rem);
  }

  .strength-band,
  .folio-body {
    grid-template-columns: 1fr;
  }

  .strength + .strength {
    border-top: 1px solid rgba(243, 228, 185, 0.23);
    border-left: 0;
  }

  .folio-wide {
    grid-column: auto;
  }

  .artifact-visual {
    min-height: 390px;
  }

  .tome-shelf-stage {
    padding: 1.2rem 0.65rem 3rem;
  }

  .tome-shelf-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tome-shelf-heading {
    min-height: 0;
    padding: 2rem 1.5rem 0 1.8rem;
    background:
      radial-gradient(circle at 72% 115%, rgba(111, 75, 48, 0.11), transparent 18rem),
      #f7ebc8;
  }

  .tome-shelf-heading::after {
    display: none;
  }

  .tome-shelf-count {
    width: 106px;
    min-height: 106px;
    display: grid;
    text-align: center;
  }

  .tome-shelf-count strong {
    font-size: 2.2rem;
  }

  .tome-shelf-mobile-vignette {
    height: 230px;
    margin: -5.6rem -1.5rem 0 -1.8rem;
    display: block;
    position: relative;
    z-index: 1;
    background:
      linear-gradient(180deg, #f7ebc8 0%, transparent 28%, transparent 76%, rgba(43, 24, 17, 0.18) 100%),
      var(--tome-shelf-illustration) 76% center / auto 132% no-repeat;
    mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 100%);
  }

  .tome-row-index {
    padding: 1.8rem 1.35rem 1.5rem 1.55rem;
  }

  .tome-row-index-heading {
    align-items: start;
  }

  .tome-row-index-heading h2 {
    font-size: 1.75rem;
  }

  .tome-folio-mark {
    padding-top: 0.35rem;
    white-space: nowrap;
  }

  .tome-index-columns {
    columns: 1;
  }

  .tome-row-group {
    grid-template-columns: 3.2rem minmax(0, 1fr);
    gap: 0.8rem;
  }

  .tome-row-group h2 {
    width: 3.1rem;
    height: 3.75rem;
    font-size: 2.15rem;
  }

  .tome-row-list a {
    min-height: 98px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.42rem 0.75rem;
  }

  .tome-row-summary {
    grid-column: 1 / -1;
    font-size: 0.8rem;
  }

  .tome-row-arrow {
    grid-column: 2;
    grid-row: 1;
  }

  .tome-pagination {
    grid-template-columns: 1fr 1fr;
  }

  .tome-pagination ol {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
  }
}

@media (max-width: 390px) {
  .tome-index-shell {
    width: calc(100% - 0.75rem);
  }

  .tome-shelf-card {
    min-height: 135px;
  }

  .portrait-panel {
    min-height: 420px;
  }

  .identity-line {
    letter-spacing: 0.07em;
  }

  .tome-shelf-heading h1 {
    font-size: clamp(3.2rem, 17vw, 4.5rem);
  }

  .tome-shelf-switcher {
    gap: 0.35rem;
  }

  .tome-shelf-switcher a {
    min-height: 4.15rem;
    padding: 0.62rem 0.5rem 1rem;
    font-size: 0.64rem;
  }

  .tome-row-index {
    padding: 1.5rem 1rem 1.35rem 1.15rem;
  }

  .tome-row-index-heading {
    display: block;
  }

  .tome-folio-mark {
    margin-top: 0.75rem;
  }

  .tome-row-group {
    grid-template-columns: 2.8rem minmax(0, 1fr);
    gap: 0.65rem;
  }

  .tome-row-group h2 {
    width: 2.7rem;
    height: 3.35rem;
    font-size: 1.9rem;
  }
}

@media (max-width: 340px) {
  .vale-card-folio-inner {
    grid-template-rows: 32px 49% 1fr;
  }

  .vale-card-copy {
    padding: 0.62rem;
  }

  .vale-card-copy h3 {
    font-size: 1rem;
  }

  .vale-card-copy.is-long-title h3 {
    font-size: 0.84rem;
  }

  .vale-card-subtitle {
    font-size: 0.58rem;
  }

  .vale-card-lore {
    margin: 0.38rem 0 0.42rem;
    font-size: 0.62rem;
    line-height: 1.24;
  }

  .vale-card-facets li {
    padding: 3px 6px;
    font-size: 0.48rem;
  }

  .tome-shelf-switcher {
    grid-template-columns: 1fr;
  }

  .tome-shelf-switcher a {
    min-height: 4.6rem;
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tome-shelf-switcher a,
  .tome-shelf-card,
  .vale-card-turner,
  .vale-card-action a,
  .vale-card-action button {
    transition: none;
  }
}
