.archive-page {
  --archive-manuscript-font: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;
  --archive-handwritten-font: "Caveat", "Cormorant Garamond", Georgia, serif;

  align-self: start;
  width: 100%;
  overflow-x: hidden;
  gap: clamp(26px, 4vw, 44px);
  }

body.noctis-room-page,
body.entry-desk-page,
body.shelves-page,
body.gallery-page,
body.memory-vault-page,
body.inner-chamber-page,
body.restricted-wing-page {
  --archive-manuscript-font: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;
  --archive-handwritten-font: "Caveat", "Cormorant Garamond", Georgia, serif;
  --noctis-font-display: var(--archive-manuscript-font, "Cormorant Garamond", Georgia, serif);
  --noctis-font-body: var(--font-body-serif);
  --noctis-font-ui: var(--body-font);
}

body.noctis-room-page h1,
body.noctis-room-page h2,
body.noctis-room-page h3,
body.noctis-room-page h4,
body.noctis-room-page .noctis-room-title,
body.noctis-room-page .entry-desk-hero-title,
body.noctis-room-page .shelves-hero-title,
body.noctis-room-page .gallery-hero-title,
body.noctis-room-page .restricted-wing-title,
body.entry-desk-page h1,
body.entry-desk-page h2,
body.entry-desk-page h3,
body.entry-desk-page h4,
body.entry-desk-page .noctis-room-title,
body.entry-desk-page .entry-desk-hero-title,
body.entry-desk-page .shelves-hero-title,
body.entry-desk-page .gallery-hero-title,
body.entry-desk-page .restricted-wing-title,
body.shelves-page h1,
body.shelves-page h2,
body.shelves-page h3,
body.shelves-page h4,
body.shelves-page .noctis-room-title,
body.shelves-page .entry-desk-hero-title,
body.shelves-page .shelves-hero-title,
body.shelves-page .gallery-hero-title,
body.shelves-page .restricted-wing-title,
body.gallery-page h1,
body.gallery-page h2,
body.gallery-page h3,
body.gallery-page h4,
body.gallery-page .noctis-room-title,
body.gallery-page .entry-desk-hero-title,
body.gallery-page .shelves-hero-title,
body.gallery-page .gallery-hero-title,
body.gallery-page .restricted-wing-title,
body.memory-vault-page h1,
body.memory-vault-page h2,
body.memory-vault-page h3,
body.memory-vault-page h4,
body.memory-vault-page .noctis-room-title,
body.memory-vault-page .entry-desk-hero-title,
body.memory-vault-page .shelves-hero-title,
body.memory-vault-page .gallery-hero-title,
body.memory-vault-page .restricted-wing-title,
body.inner-chamber-page h1,
body.inner-chamber-page h2,
body.inner-chamber-page h3,
body.inner-chamber-page h4,
body.inner-chamber-page .noctis-room-title,
body.inner-chamber-page .entry-desk-hero-title,
body.inner-chamber-page .shelves-hero-title,
body.inner-chamber-page .gallery-hero-title,
body.inner-chamber-page .restricted-wing-title,
body.restricted-wing-page h1,
body.restricted-wing-page h2,
body.restricted-wing-page h3,
body.restricted-wing-page h4,
body.restricted-wing-page .noctis-room-title,
body.restricted-wing-page .entry-desk-hero-title,
body.restricted-wing-page .shelves-hero-title,
body.restricted-wing-page .gallery-hero-title,
body.restricted-wing-page .restricted-wing-title {
  font-family: var(--noctis-font-display);
  color: #fff1d6;
  line-height: 0.92;
  letter-spacing: 0.01em;
}

body.noctis-room-page p,
body.noctis-room-page li,
body.noctis-room-page blockquote,
body.entry-desk-page p,
body.entry-desk-page li,
body.entry-desk-page blockquote,
body.shelves-page p,
body.shelves-page li,
body.shelves-page blockquote,
body.gallery-page p,
body.gallery-page li,
body.gallery-page blockquote,
body.memory-vault-page p,
body.memory-vault-page li,
body.memory-vault-page blockquote,
body.inner-chamber-page p,
body.inner-chamber-page li,
body.inner-chamber-page blockquote,
body.restricted-wing-page p,
body.restricted-wing-page li,
body.restricted-wing-page blockquote {
  font-family: var(--noctis-font-body);
  line-height: 1.55;
}

body.noctis-room-page button,
body.noctis-room-page a,
body.noctis-room-page .noctis-room-link,
body.noctis-room-page .noctis-room-return,
body.noctis-room-page .entry-desk-kicker,
body.noctis-room-page .shelves-section-kicker,
body.noctis-room-page .shelves-card-kicker,
body.noctis-room-page .archive-entry__stamp,
body.noctis-room-page .archive-chamber-counter,
body.noctis-room-page .archive-room-card__status,
body.noctis-room-page .archive-room-card__requirement,
body.noctis-room-page .archive-chamber-info-card h3,
body.noctis-room-page .archive-gallery-viewer__nav,
body.noctis-room-page .shelves-filter-chip,
body.noctis-room-page .status-pill,
body.noctis-room-page .bloodmoon-pill,
body.entry-desk-page button,
body.entry-desk-page a,
body.entry-desk-page .noctis-room-link,
body.entry-desk-page .noctis-room-return,
body.entry-desk-page .entry-desk-kicker,
body.entry-desk-page .shelves-section-kicker,
body.entry-desk-page .shelves-card-kicker,
body.entry-desk-page .archive-entry__stamp,
body.entry-desk-page .archive-chamber-counter,
body.entry-desk-page .archive-room-card__status,
body.entry-desk-page .archive-room-card__requirement,
body.entry-desk-page .archive-chamber-info-card h3,
body.entry-desk-page .archive-gallery-viewer__nav,
body.entry-desk-page .shelves-filter-chip,
body.entry-desk-page .status-pill,
body.entry-desk-page .bloodmoon-pill,
body.shelves-page button,
body.shelves-page a,
body.shelves-page .noctis-room-link,
body.shelves-page .noctis-room-return,
body.shelves-page .entry-desk-kicker,
body.shelves-page .shelves-section-kicker,
body.shelves-page .shelves-card-kicker,
body.shelves-page .archive-entry__stamp,
body.shelves-page .archive-chamber-counter,
body.shelves-page .archive-room-card__status,
body.shelves-page .archive-room-card__requirement,
body.shelves-page .archive-chamber-info-card h3,
body.shelves-page .archive-gallery-viewer__nav,
body.shelves-page .shelves-filter-chip,
body.shelves-page .status-pill,
body.shelves-page .bloodmoon-pill,
body.gallery-page button,
body.gallery-page a,
body.gallery-page .noctis-room-link,
body.gallery-page .noctis-room-return,
body.gallery-page .entry-desk-kicker,
body.gallery-page .shelves-section-kicker,
body.gallery-page .shelves-card-kicker,
body.gallery-page .archive-entry__stamp,
body.gallery-page .archive-chamber-counter,
body.gallery-page .archive-room-card__status,
body.gallery-page .archive-room-card__requirement,
body.gallery-page .archive-chamber-info-card h3,
body.gallery-page .archive-gallery-viewer__nav,
body.gallery-page .shelves-filter-chip,
body.gallery-page .status-pill,
body.gallery-page .bloodmoon-pill,
body.memory-vault-page button,
body.memory-vault-page a,
body.memory-vault-page .noctis-room-link,
body.memory-vault-page .noctis-room-return,
body.memory-vault-page .entry-desk-kicker,
body.memory-vault-page .shelves-section-kicker,
body.memory-vault-page .shelves-card-kicker,
body.memory-vault-page .archive-entry__stamp,
body.memory-vault-page .archive-chamber-counter,
body.memory-vault-page .archive-room-card__status,
body.memory-vault-page .archive-room-card__requirement,
body.memory-vault-page .archive-chamber-info-card h3,
body.memory-vault-page .archive-gallery-viewer__nav,
body.memory-vault-page .shelves-filter-chip,
body.memory-vault-page .status-pill,
body.memory-vault-page .bloodmoon-pill,
body.inner-chamber-page button,
body.inner-chamber-page a,
body.inner-chamber-page .noctis-room-link,
body.inner-chamber-page .noctis-room-return,
body.inner-chamber-page .entry-desk-kicker,
body.inner-chamber-page .shelves-section-kicker,
body.inner-chamber-page .shelves-card-kicker,
body.inner-chamber-page .archive-entry__stamp,
body.inner-chamber-page .archive-chamber-counter,
body.inner-chamber-page .archive-room-card__status,
body.inner-chamber-page .archive-room-card__requirement,
body.inner-chamber-page .archive-chamber-info-card h3,
body.inner-chamber-page .archive-gallery-viewer__nav,
body.inner-chamber-page .shelves-filter-chip,
body.inner-chamber-page .status-pill,
body.inner-chamber-page .bloodmoon-pill,
body.restricted-wing-page button,
body.restricted-wing-page a,
body.restricted-wing-page .noctis-room-link,
body.restricted-wing-page .noctis-room-return,
body.restricted-wing-page .entry-desk-kicker,
body.restricted-wing-page .shelves-section-kicker,
body.restricted-wing-page .shelves-card-kicker,
body.restricted-wing-page .archive-entry__stamp,
body.restricted-wing-page .archive-chamber-counter,
body.restricted-wing-page .archive-room-card__status,
body.restricted-wing-page .archive-room-card__requirement,
body.restricted-wing-page .archive-chamber-info-card h3,
body.restricted-wing-page .archive-gallery-viewer__nav,
body.restricted-wing-page .shelves-filter-chip,
body.restricted-wing-page .status-pill,
body.restricted-wing-page .bloodmoon-pill {
  font-family: var(--noctis-font-ui);
}

/* ================================
   Noctis Archive Cinematic Rework
================================ */

body.blood-moon-mode .archive-page {
  --noctis-bg: rgba(7, 0, 3, 0.86);
  --noctis-panel: rgba(22, 3, 8, 0.74);
  --noctis-panel-soft: rgba(36, 5, 12, 0.54);
  --noctis-border: rgba(190, 35, 48, 0.42);
  --noctis-border-soft: rgba(255, 116, 126, 0.2);
  --noctis-red: #ff354d;
  --noctis-rose: #ffd8d2;
  --noctis-cream: #fff0d4;
  --noctis-muted: rgba(255, 211, 201, 0.72);
  --noctis-gold: rgba(231, 195, 106, 0.86);

  max-width: min(100%, 1280px);
}

body.blood-moon-mode .archive-room-shell {
  position: relative;
  isolation: isolate;
  max-width: 1220px;
  gap: clamp(28px, 5vw, 58px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.blood-moon-mode .archive-room-shell::before {
  content: none;
}

body.blood-moon-mode .archive-invitation {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  max-width: none;
  min-height: clamp(440px, 54vw, 560px);
  margin: 0;
  border: 1px solid rgba(190, 35, 48, 0.36);
  border-radius: 28px;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(7, 0, 3, 0.97) 0%, rgba(10, 0, 4, 0.86) 35%, rgba(12, 0, 5, 0.32) 58%, rgba(8, 0, 3, 0.08) 100%),
    radial-gradient(circle at 14% 74%, rgba(255, 35, 65, 0.18), transparent 34%),
    url("../assets/images/noctis-header.webp") center right / cover no-repeat;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.34),
    0 0 32px rgba(255, 35, 65, 0.1),
    inset 0 0 0 1px rgba(255, 116, 126, 0.035);
  overflow: hidden;
  text-align: left;
}

body.blood-moon-mode .archive-invitation__content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  width: min(100%, 610px);
  padding: clamp(34px, 6vw, 58px);
  background:
    linear-gradient(90deg, rgba(8, 0, 3, 0.34), rgba(8, 0, 3, 0));
}

body.blood-moon-mode .archive-invitation__art {
  display: none;
}

body.blood-moon-mode .archive-invitation__art::after {
  display: none;
}

body.blood-moon-mode .archive-invitation__art img {
  display: none;
}

body.blood-moon-mode .archive-invitation__kicker {
  color: var(--noctis-gold);
  letter-spacing: 0.26em;
}

body.blood-moon-mode .archive-invitation h1 {
  max-width: 8.8em;
  color: var(--noctis-cream);
  font-size: clamp(4rem, 8vw, 7.2rem);
  text-shadow:
    0 0 24px rgba(255, 35, 65, 0.16),
    0 3px 0 rgba(0, 0, 0, 0.42);
}

body.blood-moon-mode .archive-invitation__copy {
  max-width: 58ch;
  gap: 0;
}

body.blood-moon-mode .archive-invitation__copy p,
body.blood-moon-mode .archive-invitation__status-note {
  margin: 0;
  color: rgba(255, 226, 218, 0.84);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.7;
}

.archive-blood-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 34px;
  border: 1px solid rgba(255, 35, 65, 0.48);
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(255, 200, 190, 0.96);
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 35, 65, 0.28), transparent 58%),
    rgba(60, 4, 13, 0.66);
  box-shadow:
    0 0 18px rgba(255, 35, 65, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-blood-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--noctis-red);
  box-shadow: 0 0 14px rgba(255, 35, 65, 0.85);
}

body.blood-moon-mode .archive-room-hub {
  gap: clamp(22px, 3vw, 34px);
  padding: 0;
  background: transparent;
}

body.blood-moon-mode .archive-room-hub__heading {
  position: relative;
  max-width: 760px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.blood-moon-mode .archive-room-hub__heading::before,
body.blood-moon-mode .archive-room-hub__heading::after {
  display: none;
}

body.blood-moon-mode .archive-room-hub__heading::before {
  content: none;
}

body.blood-moon-mode .archive-room-hub__heading::after {
  content: none;
}

body.blood-moon-mode .archive-room-hub__heading h2 {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: var(--noctis-cream);
  font-size: clamp(2.4rem, 4.6vw, 3.4rem);
  letter-spacing: 0.06em;
}

body.blood-moon-mode .archive-room-hub__heading p:not(.reading-section__eyebrow) {
  color: rgba(255, 226, 218, 0.76);
}

body.blood-moon-mode .archive-chamber-viewer {
  width: 100%;
  gap: clamp(26px, 4vw, 40px);
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.blood-moon-mode .archive-chamber-thumbnail-rail {
  display: flex;
  gap: clamp(14px, 1.8vw, 20px);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px clamp(16px, 2.5vw, 24px) 22px;
  scroll-padding-inline: clamp(16px, 2.5vw, 24px);
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(255, 70, 100, 0.48) rgba(16, 0, 6, 0.5);
  -webkit-overflow-scrolling: touch;
}

body.blood-moon-mode .archive-chamber-thumbnail-rail::-webkit-scrollbar {
  height: 8px;
}

body.blood-moon-mode .archive-chamber-thumbnail-rail::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(16, 0, 6, 0.5);
}

body.blood-moon-mode .archive-chamber-thumbnail-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 70, 100, 0.48);
}

.archive-chamber-card {
  position: relative;
  display: flex;
  flex: 0 0 clamp(206px, 17vw, 232px);
  flex-direction: column;
  gap: 11px;
  width: clamp(206px, 17vw, 232px);
  min-width: 206px;
  min-height: 400px;
  border: 1px solid rgba(120, 30, 32, 0.58);
  border-radius: 14px;
  padding: 10px;
  color: var(--noctis-muted);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 35, 65, 0.12), transparent 42%),
    rgba(8, 1, 4, 0.78);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease,
    transform 220ms ease;
}

.archive-chamber-card__sigil {
  display: none;
}

.archive-chamber-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 116, 126, 0.22);
  border-radius: 10px;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 35, 65, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(20, 0, 8, 0.4), rgba(5, 0, 4, 0.5));
}

.archive-chamber-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: brightness(1.08) contrast(1.08) saturate(1.1);
  transition:
    filter 220ms ease;
}

.archive-chamber-card__body {
  display: grid;
  flex: 1 1 auto;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-width: 0;
  padding: 0 4px 4px;
}

.archive-chamber-card__body strong {
  min-height: 2.1em;
  color: rgba(255, 226, 205, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: 1.12rem;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.archive-chamber-card__body em {
  color: rgba(255, 218, 210, 0.64);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.archive-chamber-card__status {
  display: inline-flex;
  justify-self: center;
  align-self: end;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  max-width: 100%;
  border-radius: 999px;
  padding: 0 12px;
  color: rgba(255, 236, 224, 0.9);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
}

.archive-chamber-card__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--archive-status-dot, #ff3b58);
  box-shadow:
    0 0 8px var(--archive-status-glow, rgba(255, 59, 88, 0.6)),
    0 0 16px color-mix(in srgb, var(--archive-status-glow, rgba(255, 59, 88, 0.6)) 48%, transparent);
}

.archive-chamber-card__status--open,
.archive-status-row--open {
  --archive-status-dot: #52ff9a;
  --archive-status-glow: rgba(82, 255, 154, 0.6);
}

.archive-chamber-card__status--locked,
.archive-status-row--locked {
  --archive-status-dot: #ff3b58;
  --archive-status-glow: rgba(255, 59, 88, 0.6);
}

.archive-chamber-card__status--restricted,
.archive-status-row--restricted {
  --archive-status-dot: #b46cff;
  --archive-status-glow: rgba(180, 108, 255, 0.6);
}

.archive-chamber-card__status--sealed,
.archive-status-row--sealed {
  --archive-status-dot: #ffb347;
  --archive-status-glow: rgba(255, 179, 71, 0.62);
}

.archive-chamber-card__status--disturbed,
.archive-status-row--disturbed {
  --archive-status-dot: #ff8a3d;
  --archive-status-glow: rgba(255, 138, 61, 0.62);
}

.archive-chamber-card.is-locked,
.archive-chamber-card--sealed {
  filter: none;
}

.archive-chamber-card.is-locked .archive-chamber-card__image img,
.archive-chamber-card--sealed .archive-chamber-card__image img {
  filter: brightness(0.92) contrast(1.06) saturate(0.92);
}

.archive-chamber-card.is-active,
.archive-chamber-card:hover,
.archive-chamber-card:focus-visible {
  border-color: rgba(255, 116, 126, 0.82);
  outline: none;
  box-shadow:
    0 0 0 1px rgba(255, 218, 200, 0.16),
    0 0 30px rgba(255, 35, 65, 0.28),
    0 18px 46px rgba(0, 0, 0, 0.34);
  filter: none;
  transform: translateY(-2px);
}

.archive-chamber-card.is-active .archive-chamber-card__image img,
.archive-chamber-card:hover .archive-chamber-card__image img,
.archive-chamber-card:focus-visible .archive-chamber-card__image img {
  filter: brightness(1.16) contrast(1.1) saturate(1.14);
}

body.blood-moon-mode .archive-chamber-stage,
body.blood-moon-mode .archive-recovered-objects,
body.blood-moon-mode .archive-code-panel,
body.blood-moon-mode .archive-selected-chamber,
body.blood-moon-mode .archive-remembers-panel {
  border: 1px solid var(--noctis-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 35, 65, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(90, 8, 20, 0.28), rgba(5, 0, 3, 0.62) 54%),
    var(--noctis-panel);
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(255, 35, 65, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.blood-moon-mode .archive-chamber-stage {
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 380px);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
  overflow: visible;
  padding: clamp(24px, 3.5vw, 34px);
}

body.blood-moon-mode .archive-chamber-feature-art {
  order: 2;
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  max-width: 360px;
  max-height: min(620px, 74vh);
  margin: 0;
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 116, 126, 0.2);
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 35, 65, 0.08), transparent 56%),
    rgba(0, 0, 0, 0.28);
}

body.blood-moon-mode .archive-chamber-feature-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 0, 4, 0.08), transparent 36%, rgba(10, 0, 4, 0.1)),
    radial-gradient(circle at 56% 24%, rgba(255, 35, 65, 0.08), transparent 38%);
  pointer-events: none;
}

body.blood-moon-mode .archive-chamber-feature-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  filter: brightness(1.04) contrast(1.08) saturate(1.1);
}

body.blood-moon-mode .archive-chamber-feature-art figcaption {
  display: none;
}

body.blood-moon-mode .archive-chamber-content {
  order: 1;
  align-content: center;
  gap: 13px;
  width: 100%;
  min-width: 0;
}

body.blood-moon-mode .archive-chamber-counter {
  color: rgba(255, 160, 150, 0.86);
}

body.blood-moon-mode .archive-chamber-content h2 {
  color: var(--noctis-cream);
  font-size: clamp(3rem, 6.4vw, 5.1rem);
}

.archive-chamber-subtitle {
  margin: 0;
  color: rgba(255, 222, 218, 0.9);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

body.blood-moon-mode .archive-chamber-description {
  color: rgba(255, 226, 218, 0.82);
}

body.blood-moon-mode .archive-chamber-tags li {
  border-color: rgba(255, 116, 126, 0.28);
  color: rgba(255, 236, 224, 0.9);
  background: rgba(116, 18, 30, 0.34);
}

body.blood-moon-mode .archive-chamber-info-card {
  border-color: rgba(255, 116, 126, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 116, 126, 0.08), transparent 48%),
    rgba(44, 5, 13, 0.62);
}

body.blood-moon-mode .archive-chamber-info-card h3 {
  color: rgba(255, 232, 205, 0.9);
}

body.blood-moon-mode .archive-chamber-info-card p {
  color: rgba(255, 218, 210, 0.76);
}

body.blood-moon-mode .archive-chamber-info-card--status {
  border-color: rgba(255, 70, 100, 0.32);
  background:
    linear-gradient(135deg, rgba(28, 0, 8, 0.82), rgba(80, 8, 24, 0.4)),
    rgba(8, 0, 4, 0.78);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(255, 35, 65, 0.08);
}

.archive-status-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.archive-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--archive-status-dot, #ff3b58);
  box-shadow:
    0 0 8px var(--archive-status-glow, rgba(255, 59, 88, 0.6)),
    0 0 16px color-mix(in srgb, var(--archive-status-glow, rgba(255, 59, 88, 0.6)) 48%, transparent);
}

body.blood-moon-mode .archive-chamber-actions {
  grid-column: 1 / -1;
  order: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
  width: 100%;
  max-width: none;
  margin: clamp(10px, 2vw, 18px) auto 0;
  padding-top: clamp(16px, 2.5vw, 22px);
  border-top: 1px solid rgba(255, 116, 126, 0.16);
}

body.blood-moon-mode .archive-chamber-actions button,
body.blood-moon-mode .archive-chamber-enter {
  min-height: 46px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 999px;
  color: rgba(255, 226, 218, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 116, 126, 0.06), transparent 52%),
    rgba(8, 0, 4, 0.64);
  box-shadow: 0 0 16px rgba(255, 35, 65, 0.1);
  cursor: pointer;
  flex: 0 1 180px;
  font-family: var(--body-font);
  font-weight: 900;
}

body.blood-moon-mode .archive-chamber-enter {
  flex-basis: 220px;
  border-color: rgba(255, 35, 65, 0.58);
  color: #fff2ec;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 116, 126, 0.22), transparent 58%),
    rgba(118, 14, 27, 0.62);
  box-shadow:
    0 0 22px rgba(255, 35, 65, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.blood-moon-mode .archive-chamber-actions button:hover,
body.blood-moon-mode .archive-chamber-actions button:focus-visible {
  border-color: rgba(255, 224, 214, 0.74);
  outline: none;
  box-shadow: 0 0 28px rgba(255, 35, 65, 0.24);
  transform: translateY(-1px);
}

body.blood-moon-mode .archive-selected-chamber,
body.blood-moon-mode .archive-recovery-stack {
  display: grid;
  gap: 16px;
}

.archive-landing-cards {
  display: grid;
  gap: clamp(16px, 2.5vw, 24px);
  width: 100%;
  min-width: 0;
}

.archive-landing-cards .archive-recovered-objects,
.archive-landing-cards .archive-remembers-panel {
  border: 1px solid var(--noctis-border, rgba(255, 116, 126, 0.2));
  border-radius: 18px;
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(255, 35, 65, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.archive-landing-recovered-objects {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: clamp(260px, 28vw, 360px);
  background:
    linear-gradient(90deg, rgba(8, 0, 5, 0.96) 0%, rgba(12, 0, 7, 0.9) 42%, rgba(18, 0, 8, 0.5) 70%, rgba(18, 0, 8, 0.25) 100%),
    radial-gradient(circle at 18% 28%, rgba(255, 35, 65, 0.16), transparent 38%),
    url("../assets/images/recovered-objects-section.webp") center right / cover no-repeat;
}

.archive-landing-recovered-objects__empty {
  color: rgba(255, 226, 218, 0.78);
  font-weight: 800;
}

.archive-landing-recovered-objects__inventory {
  width: min(100%, 680px);
  max-width: 680px;
}

body.blood-moon-mode .archive-selected-chamber {
  padding: clamp(18px, 3vw, 30px);
}

body.blood-moon-mode .archive-selected-chamber:focus {
  outline: none;
}

body.blood-moon-mode .archive-selected-chamber:focus-visible {
  outline: 2px solid rgba(255, 213, 217, 0.46);
  outline-offset: 6px;
}

body.blood-moon-mode .archive-room-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

body.blood-moon-mode .archive-recovered-objects,
body.blood-moon-mode .archive-code-panel {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: clamp(24px, 3.5vw, 32px);
}

body.blood-moon-mode .archive-recovered-objects {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-content: stretch;
  min-height: clamp(260px, 28vw, 360px);
  background:
    linear-gradient(90deg, rgba(8, 0, 5, 0.96) 0%, rgba(12, 0, 7, 0.9) 42%, rgba(18, 0, 8, 0.5) 70%, rgba(18, 0, 8, 0.25) 100%),
    radial-gradient(circle at 18% 28%, rgba(255, 35, 65, 0.16), transparent 38%),
    url("../assets/images/recovered-objects-section.webp") center right / cover no-repeat;
}

body.blood-moon-mode .archive-recovered-objects .archive-section-copy {
  max-width: 560px;
}

.archive-section-copy {
  display: grid;
  gap: 6px;
  align-content: start;
}

.archive-section-copy > span {
  color: rgba(255, 218, 205, 0.88);
  font-size: 1.2rem;
  line-height: 1;
}

body.blood-moon-mode .archive-recovered-objects h3,
body.blood-moon-mode .archive-code-panel h3 {
  color: var(--noctis-cream);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

body.blood-moon-mode .archive-recovered-objects p,
body.blood-moon-mode .archive-code-panel p {
  color: rgba(255, 226, 218, 0.78);
}

.archive-empty-state {
  margin-top: 12px;
  max-width: 34rem;
}

.archive-recovered-inventory {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  width: min(100%, 720px);
  min-width: 0;
}

.archive-recovered-object-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 148px));
  gap: 12px;
  align-items: start;
  justify-content: start;
  min-width: 0;
  padding: 2px;
}

.archive-recovered-object-card {
  --artifact-accent: rgba(255, 116, 126, 0.72);
  --artifact-accent-soft: rgba(255, 116, 126, 0.16);
  display: grid;
  grid-template-rows: 72px auto;
  align-items: stretch;
  gap: 9px;
  min-height: 142px;
  border: 1px solid color-mix(in srgb, var(--artifact-accent) 34%, rgba(255, 116, 126, 0.18));
  border-radius: 14px;
  padding: 10px;
  color: rgba(255, 226, 218, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 52%),
    rgba(8, 0, 4, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.archive-recovered-object-card.element-air {
  --artifact-accent: rgba(186, 225, 255, 0.86);
  --artifact-accent-soft: rgba(128, 202, 255, 0.18);
}

.archive-recovered-object-card.element-water {
  --artifact-accent: rgba(56, 178, 255, 0.86);
  --artifact-accent-soft: rgba(30, 144, 255, 0.2);
}

.archive-recovered-object-card.element-fire {
  --artifact-accent: rgba(255, 102, 34, 0.88);
  --artifact-accent-soft: rgba(255, 80, 20, 0.22);
}

.archive-recovered-object-card.element-earth {
  --artifact-accent: rgba(150, 204, 80, 0.86);
  --artifact-accent-soft: rgba(130, 190, 70, 0.2);
}

.archive-recovered-object-card.is-active,
.archive-recovered-object-card:hover,
.archive-recovered-object-card:focus-visible {
  border-color: color-mix(in srgb, var(--artifact-accent) 82%, white 6%);
  outline: none;
  box-shadow:
    0 0 0 1px rgba(255, 226, 205, 0.12),
    0 0 28px color-mix(in srgb, var(--artifact-accent) 34%, transparent),
    0 20px 42px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}

.archive-recovered-object-card:hover .archive-recovered-object-card__icon img,
.archive-recovered-object-card:focus-visible .archive-recovered-object-card__icon img,
.archive-recovered-object-card.is-active .archive-recovered-object-card__icon img {
  transform: scale(1.05);
}

.archive-recovered-object-card__icon {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: rgba(255, 236, 224, 0.92);
  background: transparent;
  font-family: var(--archive-manuscript-font);
  font-size: 1.6rem;
  line-height: 1;
}

.archive-recovered-object-card__icon img {
  display: block;
  width: min(100%, 76px);
  height: min(100%, 76px);
  object-fit: contain;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--artifact-accent) 34%, transparent));
  transition: transform 180ms ease;
}

.archive-recovered-object-card__copy {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.archive-recovered-object-card__copy strong {
  display: -webkit-box;
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 0.98;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.archive-recovered-object-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(145, 18, 38, 0.28), transparent 42%),
    rgba(4, 0, 3, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.archive-recovered-object-modal__close {
  position: absolute;
  top: clamp(12px, 2vw, 20px);
  right: clamp(12px, 2vw, 20px);
  z-index: 2;
  min-height: 38px;
  border: 1px solid rgba(255, 116, 126, 0.38);
  border-radius: 999px;
  padding: 0 16px;
  color: rgba(255, 236, 224, 0.92);
  background: rgba(20, 0, 7, 0.82);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.16);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-recovered-object-detail {
  --artifact-accent: rgba(255, 116, 126, 0.72);
  --artifact-accent-soft: rgba(255, 116, 126, 0.14);
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 36px);
  align-items: start;
  width: min(100%, 980px);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--artifact-accent) 32%, rgba(255, 116, 126, 0.18));
  border-radius: 22px;
  padding: clamp(22px, 4vw, 40px);
  background:
    radial-gradient(circle at 14% 22%, var(--artifact-accent-soft), transparent 34%),
    linear-gradient(135deg, rgba(35, 4, 12, 0.96), rgba(7, 0, 4, 0.94) 58%),
    rgba(8, 0, 4, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 28px color-mix(in srgb, var(--artifact-accent) 16%, transparent);
}

.archive-recovered-object-detail.element-air {
  --artifact-accent: rgba(186, 225, 255, 0.88);
  --artifact-accent-soft: rgba(128, 202, 255, 0.18);
}

.archive-recovered-object-detail.element-water {
  --artifact-accent: rgba(56, 178, 255, 0.88);
  --artifact-accent-soft: rgba(30, 144, 255, 0.2);
}

.archive-recovered-object-detail.element-fire {
  --artifact-accent: rgba(255, 102, 34, 0.88);
  --artifact-accent-soft: rgba(255, 80, 20, 0.22);
}

.archive-recovered-object-detail.element-earth {
  --artifact-accent: rgba(150, 204, 80, 0.88);
  --artifact-accent-soft: rgba(130, 190, 70, 0.2);
}

.archive-artifact-modal-figure {
  display: grid;
  place-items: center;
  margin: 0;
  min-width: 0;
}

.archive-artifact-preview-image {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 210px);
  max-height: 260px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px color-mix(in srgb, var(--artifact-accent) 36%, transparent))
    drop-shadow(0 16px 22px rgba(0, 0, 0, 0.34));
}

.archive-artifact-lore-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.archive-recovered-object-detail__header {
  display: grid;
  gap: 8px;
}

.archive-recovered-object-detail__header p {
  color: rgba(255, 160, 150, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archive-recovered-object-detail h4 {
  margin: 0;
  color: var(--noctis-cream);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.98;
}

.archive-recovered-object-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.archive-recovered-object-detail__chips span {
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 999px;
  padding: 5px 9px;
  color: rgba(255, 236, 224, 0.9);
  background: rgba(116, 18, 30, 0.34);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-recovered-object-detail__section {
  display: grid;
  gap: 5px;
  border-top: 1px solid rgba(255, 116, 126, 0.14);
  padding-top: 12px;
}

.archive-recovered-object-detail__section h5 {
  margin: 0;
  color: rgba(255, 226, 205, 0.88);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.archive-recovered-object-detail__section p {
  max-width: 58ch;
}

.archive-recovered-objects__art {
  display: none;
}

body.blood-moon-mode .archive-code-panel {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 0;
  background:
    linear-gradient(90deg, rgba(8, 0, 4, 0.9) 0%, rgba(18, 0, 8, 0.8) 38%, rgba(18, 0, 8, 0.48) 70%, rgba(18, 0, 8, 0.3) 100%),
    radial-gradient(circle at 16% 22%, rgba(255, 35, 65, 0.16), transparent 40%),
    url("../assets/images/recovered-code-section.webp") center right / cover no-repeat;
}

.archive-code-entry {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  gap: 12px;
  width: min(100%, 940px);
  min-width: 0;
  margin-top: 8px;
}

.archive-code-entry .archive-code-panel__field {
  flex: 1 1 auto;
}

.archive-code-entry button {
  flex: 0 0 auto;
  min-width: 176px;
}

body.blood-moon-mode .archive-code-panel__field input {
  width: 100%;
  min-height: 46px;
  border-color: rgba(255, 116, 126, 0.24);
  color: rgba(255, 238, 230, 0.94);
  background: rgba(5, 0, 3, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 116, 126, 0.04),
    0 0 18px rgba(255, 35, 65, 0.08);
}

.archive-code-whispers {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 132px);
  align-items: center;
  gap: 14px;
  min-height: 104px;
  border: 1px solid rgba(255, 116, 126, 0.22);
  border-radius: 14px;
  padding: clamp(14px, 2vw, 18px) clamp(16px, 2.5vw, 22px);
  background:
    linear-gradient(90deg, rgba(8, 0, 4, 0.78), rgba(28, 0, 10, 0.54) 52%, rgba(12, 0, 5, 0.3)),
    rgba(8, 0, 4, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 22px rgba(255, 35, 65, 0.08);
}

.archive-code-whispers__copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.archive-code-whispers h4 {
  margin: 0;
  color: rgba(255, 226, 205, 0.88);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.archive-code-panel__feedback {
  grid-column: auto;
  min-height: 0;
}

.archive-code-whispers__emblem {
  justify-self: end;
  width: clamp(82px, 11vw, 122px);
  aspect-ratio: 1;
  background: url("../assets/images/code-whisper-lock-clean.webp") center / contain no-repeat;
  opacity: 0.82;
  filter:
    brightness(1.34)
    contrast(1.08)
    saturate(1.35)
    drop-shadow(0 0 10px rgba(255, 45, 75, 0.55))
    drop-shadow(0 0 22px rgba(255, 0, 60, 0.28));
  mix-blend-mode: normal;
}

.archive-remembers-panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
  min-height: 172px;
  padding: clamp(22px, 3vw, 30px);
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(7, 0, 4, 0.82), rgba(7, 0, 4, 0.34) 48%, rgba(7, 0, 4, 0.82)),
    linear-gradient(180deg, rgba(7, 0, 4, 0.2), rgba(7, 0, 4, 0.74)),
    url("../assets/images/noctis/noctis-archive-footer-background.png") center / cover no-repeat;
}

body.blood-moon-mode .archive-remembers-panel {
  background:
    linear-gradient(90deg, rgba(7, 0, 4, 0.84), rgba(7, 0, 4, 0.34) 48%, rgba(7, 0, 4, 0.84)),
    linear-gradient(180deg, rgba(7, 0, 4, 0.18), rgba(7, 0, 4, 0.76)),
    url("../assets/images/noctis/noctis-archive-footer-background.png") center / cover no-repeat;
}

.archive-remembers-panel > * {
  position: relative;
  z-index: 1;
}

.archive-remembers-panel p {
  margin: 0 0 10px;
  color: var(--noctis-red);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.archive-remembers-panel span {
  display: block;
  color: rgba(255, 226, 218, 0.78);
  line-height: 1.7;
}

@media (max-width: 1040px) {
  body.blood-moon-mode .archive-invitation {
    grid-template-columns: 1fr;
    min-height: clamp(520px, 78vw, 680px);
    background:
      linear-gradient(180deg, rgba(7, 0, 3, 0.96) 0%, rgba(10, 0, 4, 0.88) 48%, rgba(8, 0, 3, 0.36) 100%),
      radial-gradient(circle at 20% 28%, rgba(255, 35, 65, 0.18), transparent 38%),
      url("../assets/images/noctis-header.webp") 70% center / cover no-repeat;
  }

  body.blood-moon-mode .archive-invitation__content {
    width: min(100%, 620px);
    background: transparent;
  }

  body.blood-moon-mode .archive-chamber-thumbnail-rail {
    padding: 8px 16px 22px;
    scroll-padding-inline: 16px;
  }

  .archive-chamber-card {
    flex-basis: 196px;
    width: 196px;
    min-width: 196px;
    scroll-snap-align: start;
  }

  body.blood-moon-mode .archive-chamber-stage {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.blood-moon-mode .archive-chamber-feature-art {
    order: 1;
    width: min(100%, 360px);
    max-width: 360px;
  }

  body.blood-moon-mode .archive-chamber-content {
    order: 2;
  }

  body.blood-moon-mode .archive-recovered-objects,
  body.blood-moon-mode .archive-code-panel {
    grid-template-columns: 1fr;
  }

  body.blood-moon-mode .archive-code-panel {
    min-height: 0;
    background:
      linear-gradient(90deg, rgba(8, 0, 4, 0.94) 0%, rgba(18, 0, 8, 0.84) 52%, rgba(18, 0, 8, 0.4) 100%),
      radial-gradient(circle at 16% 22%, rgba(255, 35, 65, 0.14), transparent 40%),
      url("../assets/images/recovered-code-section.webp") 62% center / cover no-repeat;
  }

  body.blood-moon-mode .archive-recovered-objects {
    min-height: 320px;
    background:
      linear-gradient(90deg, rgba(8, 0, 5, 0.96) 0%, rgba(12, 0, 7, 0.86) 52%, rgba(18, 0, 8, 0.36) 100%),
      radial-gradient(circle at 18% 28%, rgba(255, 35, 65, 0.16), transparent 38%),
      url("../assets/images/recovered-objects-section.webp") 62% center / cover no-repeat;
  }

  .archive-recovered-object-strip {
    grid-template-columns: repeat(auto-fit, minmax(112px, 140px));
  }
}

@media (max-width: 640px) {
  body.blood-moon-mode .archive-room-shell {
    width: 100%;
    border-radius: 0;
  }

  body.blood-moon-mode .archive-invitation {
    width: auto;
    max-width: none;
    min-height: 620px;
    background:
      linear-gradient(180deg, rgba(7, 0, 3, 0.98) 0%, rgba(10, 0, 4, 0.9) 48%, rgba(8, 0, 3, 0.42) 100%),
      radial-gradient(circle at 24% 22%, rgba(255, 35, 65, 0.16), transparent 42%),
      url("../assets/images/noctis-header.webp") 78% center / cover no-repeat;
  }

  body.blood-moon-mode .archive-invitation__content {
    padding: 28px 18px;
  }

  body.blood-moon-mode .archive-invitation h1 {
    width: auto;
    max-width: 100%;
    font-size: clamp(3rem, 15vw, 4.4rem);
  }

  body.blood-moon-mode .archive-invitation__copy,
  body.blood-moon-mode .archive-invitation__copy p {
    width: auto;
    max-width: 100%;
  }

  body.blood-moon-mode .archive-room-hub {
    padding: 28px 12px 34px;
  }

  .archive-chamber-card {
    flex-basis: 184px;
    width: 184px;
    min-width: 184px;
  }

  body.blood-moon-mode .archive-room-hub__heading {
    width: auto;
    max-width: 100%;
  }

  body.blood-moon-mode .archive-room-hub__heading::before,
  body.blood-moon-mode .archive-room-hub__heading::after {
    display: none;
  }

  body.blood-moon-mode .archive-chamber-stage,
  body.blood-moon-mode .archive-recovered-objects,
  body.blood-moon-mode .archive-code-panel,
  body.blood-moon-mode .archive-remembers-panel {
    border-radius: 16px;
    padding: 18px;
  }

  body.blood-moon-mode .archive-chamber-feature-art img {
    max-height: none;
  }

  body.blood-moon-mode .archive-chamber-content {
    width: 100%;
    max-width: 100%;
    justify-items: start;
    text-align: left;
  }

  body.blood-moon-mode .archive-chamber-description,
  body.blood-moon-mode .archive-chamber-info-grid,
  body.blood-moon-mode .archive-chamber-info-card,
  body.blood-moon-mode .archive-chamber-actions {
    max-width: 100%;
    box-sizing: border-box;
  }

  body.blood-moon-mode .archive-chamber-content h2 {
    font-size: clamp(2.55rem, 13vw, 3.5rem);
  }

  body.blood-moon-mode .archive-chamber-tags {
    justify-content: flex-start;
  }

  body.blood-moon-mode .archive-chamber-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 72px;
  }

  body.blood-moon-mode .archive-chamber-actions button,
  body.blood-moon-mode .archive-chamber-enter {
    width: 100%;
    flex-basis: auto;
  }

  .archive-recovered-objects__art {
    min-height: 120px;
  }

  body.blood-moon-mode .archive-recovered-objects {
    min-height: 360px;
    background:
      linear-gradient(90deg, rgba(8, 0, 5, 0.98) 0%, rgba(12, 0, 7, 0.9) 62%, rgba(18, 0, 8, 0.46) 100%),
      radial-gradient(circle at 18% 24%, rgba(255, 35, 65, 0.14), transparent 42%),
      url("../assets/images/recovered-objects-section.webp") 64% center / cover no-repeat;
  }

  .archive-recovered-inventory {
    gap: 16px;
  }

  .archive-recovered-object-strip {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-recovered-object-card {
    grid-template-rows: 64px auto;
    min-height: 134px;
    padding: 10px;
  }

  .archive-recovered-object-card__icon img {
    width: min(100%, 68px);
    height: min(100%, 68px);
  }

  .archive-recovered-object-card__copy strong {
    font-size: clamp(0.98rem, 6vw, 1.14rem);
  }

  .archive-recovered-object-modal {
    padding: 12px;
  }

  .archive-recovered-object-detail {
    grid-template-columns: 1fr;
    gap: 16px;
    max-height: calc(100vh - 24px);
    padding: 22px 16px 18px;
  }

  .archive-artifact-modal-figure {
    padding-top: 18px;
  }

  .archive-artifact-preview-image {
    width: min(72vw, 170px);
    max-height: 190px;
  }

  body.blood-moon-mode .archive-code-panel {
    min-height: 0;
    background:
      linear-gradient(90deg, rgba(8, 0, 4, 0.96) 0%, rgba(18, 0, 8, 0.88) 64%, rgba(18, 0, 8, 0.5) 100%),
      radial-gradient(circle at 18% 24%, rgba(255, 35, 65, 0.13), transparent 42%),
      url("../assets/images/recovered-code-section.webp") 64% center / cover no-repeat;
  }

  .archive-code-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-code-entry button {
    width: 100%;
  }

  .archive-code-whispers {
    grid-template-columns: minmax(0, 1fr) 66px;
    min-height: 92px;
  }

  .archive-code-whispers__emblem {
    width: 64px;
    opacity: 0.72;
  }

  .archive-remembers-panel {
    grid-template-columns: 1fr;
  }

  .archive-shelf-entry-list {
    grid-template-columns: 1fr;
  }

  .archive-shelf-entry-card {
    min-height: 220px;
  }

  .archive-room-rail--shelf-categories {
    grid-template-columns: 1fr;
  }

  .archive-room-rail--shelf-categories .archive-room-rail__slot {
    min-height: 138px;
  }
}

/* ================================
   Legacy Archive Index and Viewer Panels
================================ */

.archive-hero {
  border-color: color-mix(in srgb, var(--navbar-border) 70%, rgba(255, 35, 65, 0.42));
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 35, 65, 0.14), transparent 38%),
    radial-gradient(circle at 86% 82%, rgba(168, 85, 247, 0.14), transparent 44%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 48%),
    var(--navbar-bg);
}

.archive-codex {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
  width: min(100%, 1180px);
  margin: 0 auto;
  align-items: start;
}

.archive-index,
.archive-locked {
  border: 1px solid color-mix(in srgb, var(--navbar-border) 68%, rgba(255, 35, 65, 0.34));
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 35, 65, 0.1), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 48%, transparent),
    var(--navbar-bg);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(255, 35, 65, 0.16),
    0 0 18px color-mix(in srgb, var(--navbar-glow) 48%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.archive-index {
  display: grid;
  gap: 10px;
  align-content: start;
  border-radius: 24px;
  padding: 18px;
}

.archive-index__label,
.archive-entry__stamp,
.archive-margin-note,
.archive-entry__tag {
  margin: 0;
  color: #ffd5d9;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.archive-tab {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 12px;
  color: var(--navbar-muted);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

.archive-tab span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 213, 217, 0.9);
  background: rgba(255, 35, 65, 0.1);
  font-family: var(--logo-font);
}

.archive-tab:hover,
.archive-tab:focus-visible,
.archive-tab.is-active {
  border-color: color-mix(in srgb, var(--navbar-border) 72%, rgba(255, 35, 65, 0.42));
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 16% 50%, rgba(255, 35, 65, 0.12), transparent 58%),
    rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.14);
  transform: translateX(2px);
}

.archive-tab:focus-visible,
.archive-locked__link:focus-visible {
  outline: 2px solid var(--navbar-hover-text);
  outline-offset: 3px;
}

.archive-index__note {
  margin: 14px 2px 0;
  color: rgba(255, 213, 217, 0.72);
  font-size: 0.88rem;
  line-height: 1.6;
}

.archive-book {
  position: relative;
  display: grid;
  gap: clamp(18px, 3vw, 30px);
  min-height: 560px;
}

.archive-spread {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.8vw, 30px);
  min-height: 510px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 68%, rgba(255, 35, 65, 0.34));
  border-radius: 28px;
  padding: clamp(16px, 3vw, 26px);
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 35, 65, 0.1), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 48%, transparent),
    var(--navbar-bg);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(255, 35, 65, 0.16),
    0 0 18px color-mix(in srgb, var(--navbar-glow) 48%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  scroll-margin-top: 128px;
  animation: archivePageIn 260ms ease both;
}

.archive-spread::before {
  display: none;
}

.archive-spread--visual-records {
  grid-template-columns: 1fr;
}

.archive-spread--visual-records::before {
  display: none;
}

.archive-page-leaf {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: clamp(22px, 4vw, 36px);
  background:
    linear-gradient(90deg, rgba(255, 244, 216, 0.06), transparent 18% 82%, rgba(0, 0, 0, 0.12)),
    radial-gradient(circle at 24% 18%, rgba(231, 195, 106, 0.08), transparent 38%),
    rgba(8, 5, 16, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(231, 195, 106, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.archive-page-leaf::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(231, 195, 106, 0.08);
  border-radius: 16px;
  pointer-events: none;
}

.archive-page-leaf--margin {
  background:
    linear-gradient(135deg, rgba(255, 35, 65, 0.08), transparent 42%),
    rgba(4, 3, 10, 0.46);
}

.archive-page-leaf h2 {
  margin: 12px 0 0;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.archive-entry__lede,
.archive-page-leaf p,
.archive-research-list {
  color: var(--navbar-muted);
  line-height: 1.72;
}

.archive-entry__lede {
  margin: 14px 0 0;
  max-width: 620px;
  font-size: 1rem;
}

.archive-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.archive-entry__meta span {
  min-height: 30px;
  border: 1px solid rgba(231, 195, 106, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(255, 213, 217, 0.86);
  background: rgba(255, 35, 65, 0.07);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.archive-entry__body {
  display: grid;
  gap: 14px;
  margin-top: clamp(24px, 4vw, 42px);
}

.archive-entry__body--journal {
  gap: 16px;
  max-width: 680px;
  color: rgba(255, 244, 216, 0.86);
  font-family: var(--heading-font);
  font-size: clamp(1.16rem, 2.3vw, 1.34rem);
  line-height: 1.78;
}

.archive-selected-item--journal .archive-entry__body--journal {
  max-height: min(54vh, 560px);
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-color: rgba(180, 24, 44, 0.62) rgba(18, 0, 4, 0.54);
}

.archive-selected-item--journal .archive-entry__body--journal::-webkit-scrollbar {
  width: 9px;
}

.archive-selected-item--journal .archive-entry__body--journal::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(18, 0, 4, 0.54);
}

.archive-selected-item--journal .archive-entry__body--journal::-webkit-scrollbar-thumb {
  border: 2px solid rgba(18, 0, 4, 0.54);
  border-radius: 999px;
  background: rgba(180, 24, 44, 0.62);
}

.archive-entry__body--journal p:first-child {
  color: #ffd5d9;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: 0.02em;
  line-height: 1.18;
  text-shadow: 0 0 14px rgba(255, 35, 65, 0.18);
}

.archive-entry__body p,
.archive-page-leaf p {
  margin: 0;
}

.archive-annotation {
  margin-top: 18px;
  border-left: 1px solid rgba(255, 35, 65, 0.34);
  padding-left: 14px;
  color: rgba(255, 244, 216, 0.8);
  font-size: 0.95rem;
}

.journal-entry-preview {
  margin-top: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(231, 195, 106, 0.14);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 24px);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 35, 65, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.journal-entry-preview h3 {
  margin: 10px 0 0;
  font-family: var(--heading-font);
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1;
}

.journal-entry-preview p:not(.archive-entry__stamp) {
  margin-top: 14px;
  color: var(--navbar-muted);
  line-height: 1.7;
}

.journal-entry-preview__button,
.journal-modal__controls button {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 70%, rgba(255, 35, 65, 0.34));
  border-radius: 999px;
  padding: 0 16px;
  color: var(--navbar-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(255, 35, 65, 0.08);
  box-shadow: 0 0 16px rgba(255, 35, 65, 0.14);
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 700;
  transition:
    box-shadow 220ms ease,
    opacity 220ms ease,
    transform 220ms ease;
}

.journal-entry-preview__button {
  margin-top: 20px;
}

.journal-entry-preview__button:hover,
.journal-entry-preview__button:focus-visible,
.journal-modal__controls button:hover:not(:disabled),
.journal-modal__controls button:focus-visible:not(:disabled) {
  box-shadow: 0 0 24px rgba(255, 35, 65, 0.22);
  transform: translateY(-1px);
}

body.is-journal-modal-open,
body.is-visual-record-modal-open,
body.is-gallery-record-modal-open,
body.is-restricted-wing-ritual-open {
  overflow: hidden;
}

.journal-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.journal-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.journal-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 35, 65, 0.16), transparent 42%),
    rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.journal-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 900px);
  max-height: min(88vh, 920px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 72%, rgba(255, 35, 65, 0.34));
  border-radius: 26px;
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 35, 65, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025) 48%, transparent),
    rgba(8, 5, 16, 0.94);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.52),
    0 0 38px rgba(255, 35, 65, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.journal-modal__page {
  max-height: min(88vh, 920px);
  overflow-y: auto;
  padding: clamp(24px, 5vw, 46px);
  background:
    linear-gradient(90deg, rgba(255, 244, 216, 0.055), transparent 18% 82%, rgba(0, 0, 0, 0.12)),
    radial-gradient(circle at 24% 18%, rgba(231, 195, 106, 0.08), transparent 38%);
}

.journal-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--navbar-border);
  border-radius: 50%;
  color: var(--navbar-text);
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
}

.journal-modal__page h2 {
  margin: 12px 0 0;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  letter-spacing: 0.02em;
  line-height: 0.98;
}

.journal-modal__annotation {
  margin-top: clamp(28px, 5vw, 44px);
  border-left: 1px solid rgba(255, 35, 65, 0.34);
  padding-left: 14px;
}

.journal-modal__annotation p:last-child {
  margin-top: 8px;
  color: rgba(255, 244, 216, 0.8);
  font-family: var(--archive-handwritten-font);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.28;
}

.journal-modal__controls {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr minmax(110px, auto);
  align-items: center;
  gap: 12px;
  margin-top: clamp(26px, 5vw, 42px);
}

.journal-modal__controls span {
  color: var(--navbar-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.journal-modal__controls button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.visual-record-modal {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(14px, 4vw, 42px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.visual-record-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.visual-record-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 35, 65, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.visual-record-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: auto;
  max-width: 96vw;
  max-height: 94vh;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--navbar-text);
  background: transparent;
  box-shadow: none;
}

.visual-record-modal__image-frame {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: visible;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.visual-record-modal__image-frame img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
}

.visual-record-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--navbar-border);
  border-radius: 50%;
  color: var(--navbar-text);
  background: rgba(0, 0, 0, 0.54);
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
}

.restricted-wing-ritual {
  position: fixed;
  inset: 0;
  z-index: 1220;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 46px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.restricted-wing-ritual.is-open {
  opacity: 1;
  pointer-events: auto;
}

.restricted-wing-ritual__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 35, 65, 0.22), transparent 34%),
    radial-gradient(circle at 50% 78%, rgba(92, 4, 18, 0.3), transparent 46%),
    linear-gradient(180deg, rgba(5, 0, 3, 0.94), rgba(0, 0, 0, 0.9));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.restricted-wing-ritual__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  width: min(100%, 760px);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  border: 1px solid rgba(255, 70, 92, 0.42);
  border-radius: 26px;
  padding: clamp(28px, 5vw, 54px);
  color: rgba(255, 238, 230, 0.94);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 35, 65, 0.26), transparent 34%),
    radial-gradient(circle at 18% 78%, rgba(120, 12, 32, 0.22), transparent 38%),
    linear-gradient(145deg, rgba(44, 3, 12, 0.98), rgba(5, 0, 3, 0.96) 60%, rgba(14, 0, 6, 0.98));
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.64),
    0 0 48px rgba(255, 35, 65, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 36px rgba(255, 35, 65, 0.06);
  text-align: center;
}

.restricted-wing-ritual__dialog::before,
.restricted-wing-ritual__dialog::after {
  content: "";
  justify-self: center;
  width: min(100%, 420px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 70, 92, 0.58), transparent);
  box-shadow: 0 0 16px rgba(255, 35, 65, 0.28);
}

.restricted-wing-ritual__eyebrow {
  margin: 0;
  color: rgba(231, 195, 106, 0.86);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.restricted-wing-ritual h2 {
  margin: 0;
  color: var(--noctis-cream, #fff0d4);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2.45rem, 7vw, 5rem);
  line-height: 0.96;
  text-shadow:
    0 0 24px rgba(255, 35, 65, 0.24),
    0 2px 0 rgba(0, 0, 0, 0.42);
}

.restricted-wing-ritual__body {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.restricted-wing-ritual__body p,
.restricted-wing-ritual__note {
  max-width: 54ch;
  margin: 0;
  color: rgba(255, 226, 218, 0.82);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.72;
}

.restricted-wing-ritual__note {
  justify-self: center;
  color: rgba(255, 176, 166, 0.74);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.restricted-wing-ritual__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.restricted-wing-ritual__button {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(255, 70, 92, 0.44);
  border-radius: 999px;
  padding: 0 24px;
  color: rgba(255, 238, 230, 0.96);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 70, 92, 0.24), transparent 62%),
    rgba(58, 4, 15, 0.82);
  box-shadow:
    0 0 22px rgba(255, 35, 65, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.restricted-wing-ritual__button--secondary {
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 195, 106, 0.18), transparent 62%),
    rgba(34, 3, 12, 0.82);
}

.restricted-wing-ritual__button--ghost {
  color: rgba(255, 208, 199, 0.86);
  background: rgba(7, 0, 4, 0.52);
  box-shadow:
    0 0 16px rgba(255, 35, 65, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.restricted-wing-ritual__button:hover,
.restricted-wing-ritual__button:focus-visible {
  border-color: rgba(255, 116, 126, 0.72);
  box-shadow:
    0 0 30px rgba(255, 35, 65, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  outline: none;
  transform: translateY(-1px);
}

@keyframes visualRecordPageTurn {
  from {
    opacity: 0.58;
    box-shadow:
      -18px 24px 54px rgba(0, 0, 0, 0.38),
      0 0 12px rgba(255, 35, 65, 0.08);
    transform: translateX(10px) rotateY(-3deg);
  }

  to {
    opacity: 1;
    box-shadow:
      0 20px 48px rgba(0, 0, 0, 0.32),
      0 0 24px rgba(255, 35, 65, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateX(0) rotateY(0);
  }
}

.archive-handwritten {
  margin-top: 22px;
  color: rgba(255, 213, 217, 0.86);
  font-family: var(--archive-handwritten-font);
  font-size: clamp(1.55rem, 3.4vw, 2.3rem);
  font-weight: 600;
  line-height: 1.05;
  text-shadow: 0 0 14px rgba(255, 35, 65, 0.2);
}

.archive-page-leaf--margin p:not(.archive-margin-note):not(.archive-entry__tag):not(.archive-handwritten):not(.partial-recovery-note__text):not(.partial-recovery-note__footer):not(.theory-withheld-note__status) {
  font-family: var(--archive-handwritten-font);
  font-size: clamp(1.28rem, 2.6vw, 1.65rem);
  line-height: 1.22;
}

.archive-page-leaf--theory-withheld {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(28px, 4vw, 42px);
}

.theory-withheld-note {
  position: relative;
  display: grid;
  gap: 18px;
  margin-top: 2px;
  border: 1px solid rgba(255, 35, 65, 0.22);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 30px);
  background:
    linear-gradient(rgba(255, 116, 126, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 35, 65, 0.16), transparent 5px),
    radial-gradient(circle at 18% 16%, rgba(255, 35, 65, 0.1), transparent 38%),
    linear-gradient(135deg, rgba(80, 5, 16, 0.42), rgba(6, 2, 5, 0.74) 62%),
    rgba(10, 1, 4, 0.84);
  background-size:
    100% 18px,
    auto,
    auto,
    auto,
    auto;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 116, 126, 0.08),
    0 0 24px rgba(255, 35, 65, 0.12);
  overflow: hidden;
}

.theory-withheld-note::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 116, 126, 0.075);
  border-radius: 12px;
  pointer-events: none;
}

.theory-withheld-note__status {
  margin: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255, 35, 65, 0.28);
  padding: 0 0 9px;
  color: rgba(255, 213, 217, 0.76);
  background: transparent;
  font-family: var(--body-font);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.theory-withheld-note .archive-redacted-text {
  margin-top: 0;
}

.theory-withheld-note .archive-handwritten {
  margin-top: 2px;
  max-width: 22ch;
  font-size: clamp(1.32rem, 2.7vw, 1.8rem);
  line-height: 1.18;
}

.archive-page-leaf--margin .theory-file-lines p {
  margin: 0;
  color: rgba(255, 222, 226, 0.82);
  font-family: var(--font-body-serif);
  font-size: clamp(0.96rem, 1.9vw, 1.08rem);
  line-height: 1.75;
}

.theory-file-lines {
  display: grid;
  gap: 10px;
}

.theory-file-lines__visible {
  margin-top: 6px;
  border-left: 1px solid rgba(255, 35, 65, 0.56);
  padding-left: 12px;
  color: rgba(255, 231, 233, 0.96);
  font-family: var(--font-body-serif);
  font-size: clamp(1.08rem, 2.1vw, 1.18rem);
  font-weight: 700;
  line-height: 1.55;
  text-shadow: 0 0 14px rgba(255, 35, 65, 0.22);
}

.redaction-mark {
  display: inline-block;
  height: 0.84em;
  max-width: 100%;
  border-radius: 1px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.98), rgba(18, 0, 3, 0.98)),
    #000;
  box-shadow:
    0 0 0 1px rgba(255, 35, 65, 0.04),
    0 0 8px rgba(255, 35, 65, 0.1);
  vertical-align: -0.08em;
}

.redaction-mark--long {
  width: min(100%, 172px);
}

.redaction-mark--short {
  width: 82px;
}

.archive-page-leaf--visual-note {
  display: grid;
  align-content: start;
  gap: 18px;
}

.visual-annotation-note {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 2px;
  border: 1px solid rgba(255, 35, 65, 0.2);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 28px);
  background:
    linear-gradient(rgba(255, 116, 126, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 35, 65, 0.12), transparent 5px),
    radial-gradient(circle at 14% 16%, rgba(255, 35, 65, 0.09), transparent 38%),
    linear-gradient(135deg, rgba(64, 4, 15, 0.34), rgba(6, 2, 5, 0.72) 62%),
    rgba(8, 1, 4, 0.78);
  background-size:
    100% 18px,
    auto,
    auto,
    auto,
    auto;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 116, 126, 0.08),
    0 0 20px rgba(255, 35, 65, 0.1);
}

.visual-annotation-note::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-top: 1px solid rgba(255, 35, 65, 0.28);
  border-right: 1px solid rgba(255, 35, 65, 0.28);
  opacity: 0.7;
}

.archive-page-leaf--margin .visual-annotation-note p {
  margin: 0;
  color: rgba(255, 222, 226, 0.82);
  font-family: var(--font-body-serif);
  font-size: 1.06rem;
  line-height: 1.7;
}

.archive-page-leaf--margin .visual-annotation-note__label {
  width: 100%;
  border-bottom: 1px solid rgba(255, 35, 65, 0.26);
  padding: 0 0 9px;
  color: rgba(255, 213, 217, 0.76);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-page-leaf--partial-recovery {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(28px, 4vw, 42px);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 35, 65, 0.11), transparent 54%),
    linear-gradient(135deg, rgba(255, 35, 65, 0.07), transparent 46%),
    rgba(4, 3, 10, 0.52);
}

.partial-recovery-note {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 18px;
  margin-top: 2px;
  border: 1px solid rgba(231, 195, 106, 0.1);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 30px);
  background:
    linear-gradient(135deg, rgba(255, 244, 216, 0.045), transparent 58%),
    rgba(0, 0, 0, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 22px rgba(255, 35, 65, 0.08);
  overflow: hidden;
}

.partial-recovery-note__seal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 35, 65, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    inset 0 0 0 22px rgba(231, 195, 106, 0.025),
    inset 0 0 0 40px rgba(255, 35, 65, 0.025),
    0 0 34px rgba(255, 35, 65, 0.05);
}

.partial-recovery-note__text {
  margin: 0;
  max-width: 25ch;
  color: rgba(255, 230, 222, 0.9);
  font-family: var(--archive-handwritten-font);
  font-size: clamp(1.18rem, 2.4vw, 1.45rem);
  font-weight: 600;
  line-height: 1.36;
  text-shadow: 0 0 10px rgba(255, 35, 65, 0.12);
}

.partial-recovery-note__redactions {
  display: grid;
  gap: 8px;
  width: min(100%, 190px);
  margin-top: 2px;
}

.partial-recovery-note__redactions span {
  display: block;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(8, 4, 8, 0.78), rgba(255, 35, 65, 0.18), rgba(8, 4, 8, 0.76));
  box-shadow: 0 0 8px rgba(255, 35, 65, 0.08);
  opacity: 0.8;
}

.partial-recovery-note__redactions span:last-child {
  width: 58%;
}

.partial-recovery-note__footer {
  margin: 0;
  color: rgba(255, 213, 217, 0.64);
  font-family: var(--body-font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.archive-redaction-line {
  width: min(100%, 280px);
  height: 13px;
  margin: 34px 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(255, 35, 65, 0.28), rgba(0, 0, 0, 0.88));
  box-shadow: 0 0 12px rgba(255, 35, 65, 0.16);
}

.archive-research-list {
  display: grid;
  gap: 13px;
  margin: clamp(22px, 4vw, 34px) 0 0;
  padding-left: 18px;
}

.archive-research-list--preview {
  margin-top: 0;
}

.archive-redacted-text {
  display: block;
  width: fit-content;
  margin-top: 24px;
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 244, 216, 0.74);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76) 34%, rgba(255, 35, 65, 0.2) 34% 48%, rgba(0, 0, 0, 0.78) 48%),
    rgba(0, 0, 0, 0.38);
}

.archive-visual-strip {
  display: flex;
  gap: clamp(14px, 2.4vw, 22px);
  margin-top: clamp(22px, 4vw, 34px);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 14px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.archive-visual-strip::-webkit-scrollbar {
  height: 9px;
}

.archive-visual-strip::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(18, 0, 4, 0.64);
}

.archive-visual-strip::-webkit-scrollbar-thumb {
  border: 2px solid rgba(18, 0, 4, 0.64);
  border-radius: 999px;
  background: rgba(180, 24, 44, 0.58);
}

.archive-visual-strip::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 70, 90, 0.68);
}

.archive-visual-strip figure {
  margin: 0;
}

.archive-visual-record {
  flex: 0 0 calc((100% - (clamp(14px, 2.4vw, 22px) * 2)) / 3);
  display: grid;
  min-width: 220px;
  gap: 10px;
  align-content: start;
  border: 1px solid rgba(255, 35, 65, 0.14);
  border-radius: 18px;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 35, 65, 0.08), transparent 46%),
    rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  scroll-snap-align: start;
}

.archive-visual-note {
  margin: 18px 0 0;
  max-width: 780px;
  border-left: 1px solid rgba(255, 35, 65, 0.36);
  padding-left: 12px;
  color: rgba(255, 213, 217, 0.72);
  font-size: 0.88rem;
  line-height: 1.65;
}

.archive-visual-note span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 213, 217, 0.82);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-visual-record__preview {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(231, 195, 106, 0.16);
  border-radius: 14px;
  padding: 0;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 35, 65, 0.12), transparent 52%),
    rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.archive-visual-record__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 52%, rgba(8, 0, 4, 0.34)),
    radial-gradient(circle at 50% 38%, transparent 48%, rgba(90, 0, 16, 0.18));
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.archive-visual-record__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.archive-visual-record__preview:hover img,
.archive-visual-record__preview:focus-visible img {
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.035);
}

.archive-visual-record__preview:hover,
.archive-visual-record__preview:focus-visible {
  border-color: rgba(255, 116, 126, 0.42);
  box-shadow: 0 0 20px rgba(255, 35, 65, 0.14);
}

.archive-visual-record__preview:hover::after,
.archive-visual-record__preview:focus-visible::after {
  opacity: 0.48;
}

.archive-visual-record__preview:focus-visible {
  outline: 2px solid var(--navbar-hover-text);
  outline-offset: 3px;
}

.archive-visual-record__missing {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  padding: 16px;
  color: rgba(255, 213, 217, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
}

.archive-visual-record.is-image-missing .archive-visual-record__missing {
  display: grid;
}

.archive-sketch {
  display: grid;
  aspect-ratio: 3 / 4;
  place-items: center;
  border: 1px solid rgba(231, 195, 106, 0.16);
  border-radius: 14px;
  color: rgba(255, 213, 217, 0.72);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 35, 65, 0.12), transparent 52%),
    rgba(255, 255, 255, 0.035);
  font-family: var(--heading-font);
  font-size: 2rem;
}

.archive-visual-strip figcaption {
  min-width: 0;
  margin-top: 0;
  color: var(--navbar-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.archive-visual-strip figcaption strong {
  display: block;
  color: rgba(255, 232, 235, 0.9);
  font-weight: 700;
}

.archive-visual-strip figcaption span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 213, 217, 0.76);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-visual-strip figcaption em {
  display: block;
  margin-top: 3px;
  color: rgba(255, 213, 217, 0.62);
  font-style: normal;
}

.archive-fragment-lock {
  margin-top: clamp(26px, 5vw, 46px);
  border: 1px solid rgba(255, 35, 65, 0.22);
  border-radius: 18px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.archive-fragment-lock p {
  color: #ffd5d9;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-fragment-lock span {
  display: block;
  margin-top: 8px;
  color: var(--navbar-muted);
  line-height: 1.6;
}

[data-archive-viewer] {
  grid-column: 1 / -1;
  min-width: 0;
}

.archive-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.archive-viewer__main {
  display: grid;
  gap: clamp(14px, 2.4vw, 22px);
}

.archive-viewer__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.archive-viewer__counter,
.archive-viewer__controls span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(231, 195, 106, 0.14);
  border-radius: 999px;
  padding: 6px 11px;
  color: rgba(255, 213, 217, 0.82);
  background: rgba(255, 35, 65, 0.07);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.archive-selected-item {
  display: grid;
  gap: clamp(18px, 3vw, 26px);
  min-height: 0;
  max-height: min(56vh, 560px);
  overflow: auto;
  border: 1px solid rgba(255, 35, 65, 0.16);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 24px);
  background:
    linear-gradient(rgba(255, 116, 126, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(255, 35, 65, 0.11), transparent 42%),
    rgba(0, 0, 0, 0.2);
  background-size: 100% 19px, auto, auto;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.archive-viewer--visual .archive-selected-item {
  grid-template-columns: minmax(220px, 0.52fr) minmax(0, 1fr);
  align-items: start;
}

.archive-selected-item__copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.archive-selected-item__copy h3 {
  margin: 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  letter-spacing: 0.02em;
  line-height: 0.98;
}

.archive-selected-item__copy p {
  max-width: 68ch;
  color: var(--navbar-muted);
  line-height: 1.72;
}

.archive-featured-image {
  order: -1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(231, 195, 106, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 35, 65, 0.14), transparent 54%),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.archive-featured-image img {
  display: block;
  width: 100%;
  max-height: min(46vh, 430px);
  object-fit: contain;
}

.archive-featured-image.is-image-missing {
  min-height: 260px;
}

.archive-featured-image.is-image-missing::before {
  content: "Signal missing.";
  display: grid;
  min-height: 260px;
  place-items: center;
  color: rgba(255, 213, 217, 0.76);
  font-family: var(--archive-handwritten-font);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.archive-item-lock {
  display: grid;
  min-height: 180px;
  place-items: center;
  gap: 16px;
  border: 1px dashed rgba(255, 116, 126, 0.28);
  border-radius: 18px;
  padding: clamp(18px, 4vw, 34px);
  color: rgba(255, 213, 217, 0.82);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 35, 65, 0.13), transparent 52%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.22), rgba(255, 35, 65, 0.035));
  text-align: center;
}

.archive-item-lock span {
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(231, 195, 106, 0.18);
  border-radius: 50%;
  color: rgba(255, 213, 217, 0.76);
  background: rgba(255, 35, 65, 0.08);
  font-family: var(--archive-manuscript-font);
  font-size: 2rem;
}

.archive-item-lock p {
  max-width: 28ch;
  color: rgba(255, 232, 235, 0.82);
  font-family: var(--archive-handwritten-font);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.14;
}

.archive-preview-card {
  display: grid;
  gap: 16px;
  align-content: start;
  border: 1px solid rgba(231, 195, 106, 0.12);
  border-radius: 16px;
  padding: clamp(14px, 2.4vw, 20px);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 35, 65, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.16);
}

.archive-preview-card p {
  margin: 0;
  color: rgba(255, 244, 216, 0.82);
  line-height: 1.65;
}

.archive-detail-button {
  width: fit-content;
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 70%, rgba(255, 35, 65, 0.34));
  border-radius: 999px;
  padding: 0 15px;
  color: var(--navbar-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(255, 35, 65, 0.08);
  box-shadow: 0 0 16px rgba(255, 35, 65, 0.14);
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 700;
  transition:
    box-shadow 220ms ease,
    transform 220ms ease;
}

.archive-detail-button:hover,
.archive-detail-button:focus-visible {
  box-shadow: 0 0 24px rgba(255, 35, 65, 0.22);
  transform: translateY(-1px);
}

.archive-detail-button:focus-visible {
  outline: 2px solid var(--navbar-hover-text);
  outline-offset: 3px;
}

.archive-cipher-file,
.archive-audio-file,
.archive-mixed-file {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 35, 65, 0.18);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 26px);
  background:
    linear-gradient(rgba(255, 116, 126, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(255, 35, 65, 0.1), transparent 42%),
    rgba(0, 0, 0, 0.22);
  background-size: 100% 18px, auto, auto;
}

.archive-cipher-file code {
  color: rgba(255, 232, 235, 0.88);
  font-family: "DM Mono", "Courier New", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.archive-audio-file {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
}

.archive-audio-file span {
  display: block;
  width: 54px;
  aspect-ratio: 1;
  border: 1px solid rgba(231, 195, 106, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 213, 217, 0.78) 0 5px, transparent 6px),
    repeating-radial-gradient(circle, rgba(255, 35, 65, 0.22) 0 2px, transparent 3px 8px),
    rgba(255, 255, 255, 0.035);
}

.archive-viewer__controls {
  display: grid;
  grid-template-columns: minmax(104px, auto) 1fr minmax(104px, auto);
  gap: 12px;
  align-items: center;
}

.archive-viewer__controls button {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 70%, rgba(255, 35, 65, 0.34));
  border-radius: 999px;
  padding: 0 16px;
  color: var(--navbar-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(255, 35, 65, 0.08);
  box-shadow: 0 0 16px rgba(255, 35, 65, 0.14);
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 700;
  transition:
    box-shadow 220ms ease,
    transform 220ms ease;
}

.archive-viewer__controls button:hover,
.archive-viewer__controls button:focus-visible,
.archive-rail-card:hover,
.archive-rail-card:focus-visible {
  box-shadow: 0 0 24px rgba(255, 35, 65, 0.22);
  transform: translateY(-1px);
}

.archive-viewer__controls button:focus-visible,
.archive-rail-card:focus-visible {
  outline: 2px solid var(--navbar-hover-text);
  outline-offset: 3px;
}

.archive-rail {
  display: flex;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 14px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.archive-rail::-webkit-scrollbar {
  height: 9px;
}

.archive-rail::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(18, 0, 4, 0.64);
}

.archive-rail::-webkit-scrollbar-thumb {
  border: 2px solid rgba(18, 0, 4, 0.64);
  border-radius: 999px;
  background: rgba(180, 24, 44, 0.58);
}

.archive-rail-card {
  flex: 0 0 210px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 86px;
  border: 1px solid rgba(255, 35, 65, 0.14);
  border-radius: 16px;
  padding: 10px;
  color: var(--navbar-muted);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 35, 65, 0.08), transparent 46%),
    rgba(0, 0, 0, 0.16);
  cursor: pointer;
  font-family: var(--body-font);
  text-align: left;
  scroll-snap-align: start;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.archive-rail--fragments .archive-rail-card {
  flex-basis: 176px;
}

.archive-rail-card.is-active {
  border-color: rgba(255, 116, 126, 0.5);
  box-shadow:
    0 0 20px rgba(255, 35, 65, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.archive-rail-card.is-locked {
  border-style: dashed;
}

.archive-rail-card__thumb {
  display: grid;
  width: 58px;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(231, 195, 106, 0.16);
  border-radius: 11px;
  color: rgba(255, 213, 217, 0.72);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 35, 65, 0.12), transparent 52%),
    rgba(255, 255, 255, 0.035);
  font-family: var(--archive-manuscript-font);
  font-size: 1.15rem;
}

.archive-rail-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-rail-card__meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.archive-rail-card__meta span,
.archive-rail-card__meta em {
  overflow: hidden;
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.archive-rail-card__meta strong {
  overflow: hidden;
  color: rgba(255, 232, 235, 0.9);
  font-size: 0.86rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-viewer__note {
  display: none;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: clamp(22px, 3vw, 30px);
  color: var(--navbar-muted);
  background:
    linear-gradient(135deg, rgba(255, 35, 65, 0.08), transparent 42%),
    rgba(4, 3, 10, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(231, 195, 106, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.archive-viewer__note::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(231, 195, 106, 0.08);
  border-radius: 16px;
  pointer-events: none;
}

.archive-viewer__note p:not(.archive-margin-note):not(.archive-entry__tag) {
  margin-top: 18px;
  color: rgba(255, 244, 216, 0.8);
  font-family: var(--archive-handwritten-font);
  font-size: clamp(1.25rem, 2.3vw, 1.62rem);
  line-height: 1.22;
}

body.is-archive-detail-open {
  overflow: hidden;
}

.archive-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1220;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(14px, 4vw, 42px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.archive-detail-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.archive-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 35, 65, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.archive-detail-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  max-height: min(88vh, 860px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 72%, rgba(255, 35, 65, 0.34));
  border-radius: 24px;
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 35, 65, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025) 48%, transparent),
    rgba(8, 5, 16, 0.96);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.52),
    0 0 38px rgba(255, 35, 65, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.archive-detail-modal__page {
  max-height: min(88vh, 860px);
  overflow-y: auto;
  padding: clamp(24px, 5vw, 44px);
}

.archive-detail-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--navbar-border);
  border-radius: 50%;
  color: var(--navbar-text);
  background: rgba(0, 0, 0, 0.54);
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
}

.archive-detail-modal__page h2 {
  margin: 12px 0 0;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.98;
}

.archive-locked {
  width: min(100%, 760px);
  margin: 0 auto;
  border-radius: 24px;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
}

.archive-locked h1 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1;
}

.archive-locked p {
  margin: 12px 0 0;
  color: var(--navbar-muted);
  line-height: 1.7;
}

.archive-locked__link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  border: 1px solid var(--navbar-border);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--navbar-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 16px rgba(255, 35, 65, 0.16);
  font-weight: 700;
  text-decoration: none;
}

@keyframes archivePageIn {
  from {
    opacity: 0;
    transform: translateX(10px) rotateY(-2deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) rotateY(0);
  }
}

@media (min-width: 921px) {
  .archive-index {
    position: sticky;
    top: 128px;
    max-height: calc(100vh - 176px);
    overflow-y: auto;
  }
}

@media (max-width: 920px) {
  .archive-codex {
    grid-template-columns: 1fr;
  }

  .archive-index {
    position: sticky;
    top: 82px;
    z-index: 10;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px;
    border-radius: 18px;
    scroll-padding-inline: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .archive-index__label,
  .archive-index__note {
    display: none;
  }

  .archive-tab {
    flex: 0 0 auto;
    grid-template-columns: 28px auto;
    min-height: 44px;
    padding: 0 12px 0 8px;
    white-space: nowrap;
  }

  .archive-tab span {
    width: 28px;
    height: 28px;
  }

  .archive-tab:hover,
  .archive-tab:focus-visible,
  .archive-tab.is-active {
    transform: translateY(-1px);
  }

  .archive-viewer {
    grid-template-columns: 1fr;
  }

  .archive-viewer__note {
    display: none;
  }

  .visual-record-modal__dialog {
    max-height: 94vh;
  }

  .archive-visual-strip {
    display: flex;
  }

  .archive-visual-record {
    flex-basis: calc((100% - clamp(14px, 2.4vw, 22px)) / 2);
  }
}

@media (max-width: 760px) {
  .archive-spread::before {
    display: none;
  }

  .archive-spread {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px;
  }

  .archive-page-leaf {
    padding: clamp(18px, 6vw, 24px);
  }

  .archive-viewer__header,
  .archive-viewer--visual .archive-selected-item,
  .archive-selected-item {
    grid-template-columns: 1fr;
  }

  .archive-viewer__counter {
    width: fit-content;
  }

  .archive-selected-item {
    min-height: 0;
  }

  .archive-featured-image {
    order: 0;
  }

  .archive-viewer__controls {
    grid-template-columns: 1fr;
  }

  .archive-viewer__controls span {
    order: -1;
  }

  .archive-rail-card {
    flex-basis: min(82vw, 240px);
  }

  .archive-rail--fragments .archive-rail-card {
    flex-basis: 164px;
  }

  .archive-visual-record {
    flex-basis: 85%;
    min-width: min(85%, 320px);
  }

  .journal-modal {
    padding: 10px;
  }

  .restricted-wing-ritual {
    padding: 10px;
  }

  .restricted-wing-ritual__dialog {
    max-height: calc(100vh - 20px);
    border-radius: 20px;
    padding: clamp(22px, 8vw, 34px) clamp(18px, 6vw, 24px);
  }

  .restricted-wing-ritual__button {
    width: min(100%, 280px);
    padding-inline: 16px;
  }

  .restricted-wing-ritual__actions {
    display: grid;
    justify-items: center;
  }

  .journal-modal__dialog,
  .journal-modal__page,
  .visual-record-modal__dialog {
    max-height: calc(100vh - 20px);
  }

  .visual-record-modal__image-frame img {
    max-height: 92vh;
  }

  .journal-modal__controls {
    grid-template-columns: 1fr;
  }

  .archive-spread,
  .archive-card,
  .archive-visual-record,
  .journal-modal__dialog,
  .visual-record-modal__dialog,
  .restricted-wing-ritual__dialog {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .archive-spread,
  .archive-card,
  .archive-visual-record {
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-gallery-record,
  .visual-record-modal__image-frame {
    animation: none;
  }
}

/* ================================
   Noctis Archive Chamber Entrance
================================ */

.archive-room-shell {
  display: grid;
  gap: clamp(14px, 2.4vw, 22px);
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  margin: 0 auto;
}

.archive-invitation {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  max-width: 850px;
  min-width: 0;
  margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 70%, rgba(255, 35, 65, 0.24));
  border-radius: 24px;
  padding: clamp(18px, 3vw, 28px);
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 35, 65, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(28, 4, 12, 0.56), rgba(6, 2, 10, 0.72));
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(255, 35, 65, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.archive-invitation__kicker {
  margin: 0 0 2px;
  color: rgba(231, 195, 106, 0.78);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.25;
  text-transform: uppercase;
}

.archive-invitation h1 {
  max-width: 100%;
  margin: 0;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2.25rem, 5.6vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  color: rgba(255, 244, 216, 0.96);
  overflow-wrap: break-word;
  text-shadow: 0 0 18px rgba(255, 35, 65, 0.14);
  text-wrap: balance;
}

.archive-invitation__copy {
  display: grid;
  gap: 1px;
  margin-top: 2px;
}

.archive-invitation__copy p {
  max-width: 100%;
  margin: 0;
  color: rgba(255, 213, 217, 0.74);
  line-height: 1.5;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.archive-room-hub {
  display: grid;
  gap: clamp(12px, 2.1vw, 20px);
  min-width: 0;
}

.archive-room-hub__heading {
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 68%, rgba(231, 195, 106, 0.16));
  border-radius: 20px;
  padding: clamp(14px, 2.2vw, 22px);
  color: var(--navbar-text);
  background:
    linear-gradient(180deg, rgba(24, 3, 10, 0.46), rgba(7, 2, 9, 0.68)),
    radial-gradient(circle at 50% 0%, rgba(231, 195, 106, 0.08), transparent 62%);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(255, 35, 65, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
}

.archive-room-hub__heading h2 {
  max-width: 100%;
  margin: 0;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.7rem, 3.8vw, 2.75rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(255, 244, 216, 0.92);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.archive-room-hub__heading p:not(.reading-section__eyebrow) {
  max-width: 100%;
  margin: 6px 0 0;
  color: rgba(255, 213, 217, 0.7);
  line-height: 1.6;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* ================================
   Chamber Viewer
================================ */

.archive-chamber-rail {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: clamp(6px, 1.4vw, 12px);
  overflow: hidden;
}

.archive-chamber-viewer {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  width: min(100%, 1120px);
  margin: 0 auto;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 66%, rgba(255, 35, 65, 0.36));
  border-radius: 26px;
  padding: clamp(16px, 3vw, 28px);
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 35, 65, 0.18), transparent 40%),
    radial-gradient(circle at 88% 88%, rgba(80, 0, 12, 0.3), transparent 48%),
    linear-gradient(135deg, rgba(255, 64, 88, 0.1), rgba(20, 0, 5, 0.18) 52%, rgba(0, 0, 0, 0.24)),
    var(--navbar-bg);
  box-shadow:
    0 26px 78px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(255, 35, 65, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.archive-chamber-enter,
.archive-chamber-nav button {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 74%, rgba(255, 35, 65, 0.24));
  border-radius: 999px;
  padding: 0 18px;
  color: var(--navbar-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    color-mix(in srgb, var(--navbar-hover-bg) 76%, rgba(255, 255, 255, 0.035));
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.16);
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 800;
  letter-spacing: 0.02em;
  transition:
    box-shadow 220ms ease,
    transform 220ms ease,
    border-color 220ms ease;
}

.archive-chamber-enter:hover,
.archive-chamber-enter:focus-visible,
.archive-chamber-nav button:hover,
.archive-chamber-nav button:focus-visible {
  border-color: color-mix(in srgb, var(--navbar-border) 70%, white);
  outline: none;
  box-shadow: 0 0 28px rgba(255, 35, 65, 0.26);
  transform: translateY(-1px);
}

.archive-chamber-enter.is-locked {
  border-color: rgba(255, 116, 126, 0.28);
  color: rgba(255, 213, 217, 0.76);
  background:
    linear-gradient(135deg, rgba(255, 64, 88, 0.08), transparent 48%),
    rgba(20, 0, 6, 0.42);
}

.archive-chamber-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.archive-chamber-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-chamber-nav button {
  min-width: 110px;
}

.archive-chamber-stage {
  display: grid;
  grid-template-columns: minmax(240px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
  min-width: 0;
}

.archive-room-card--featured {
  width: min(100%, 390px);
  margin: 0 auto;
}

.archive-room-card--featured .archive-room-card__button {
  aspect-ratio: 4 / 5.35;
  border-radius: 24px;
}

.archive-room-card--featured .archive-room-card__media {
  padding: 8px;
}

.archive-room-card--featured .archive-room-card__media img {
  opacity: 0.98;
  filter: brightness(1.16) contrast(1.08) saturate(1.08);
}

.archive-room-card--featured.is-locked .archive-room-card__button {
  filter: saturate(0.9) brightness(0.92);
}

.archive-room-card--featured.is-locked .archive-room-card__media img {
  opacity: 0.94;
  filter: brightness(1.08) contrast(1.06) saturate(0.96);
}

.archive-room-card--featured .archive-room-card__overlay,
.archive-room-card--featured.is-locked .archive-room-card__button::before {
  display: none;
}

.archive-chamber-content {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: clamp(10px, 1.6vw, 16px);
  min-width: 0;
}

.archive-chamber-counter {
  margin: 0;
  color: var(--navbar-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-chamber-content h2 {
  margin: 0;
  color: var(--navbar-text);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.archive-chamber-description {
  max-width: 58ch;
  margin: 0;
  color: var(--navbar-muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.7;
}

.archive-chamber-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-chamber-tags li {
  border: 1px solid rgba(231, 195, 106, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(255, 244, 216, 0.92);
  background: rgba(255, 35, 65, 0.1);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.archive-chamber-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 680px;
}

.archive-chamber-info-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(255, 116, 126, 0.2);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 52%),
    rgba(255, 255, 255, 0.032);
}

.archive-chamber-info-card h3 {
  margin: 0;
  color: var(--navbar-hover-text);
  font-family: var(--body-font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-chamber-info-card p {
  margin: 0;
  color: var(--navbar-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.archive-chamber-thumbnail-rail {
  display: flex;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 16px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(180, 24, 44, 0.62) rgba(18, 0, 4, 0.54);
  -webkit-overflow-scrolling: touch;
}

.archive-chamber-thumbnail-rail::-webkit-scrollbar {
  height: 8px;
}

.archive-chamber-thumbnail-rail::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(18, 0, 4, 0.54);
}

.archive-chamber-thumbnail-rail::-webkit-scrollbar-thumb {
  border: 2px solid rgba(18, 0, 4, 0.54);
  border-radius: 999px;
  background: rgba(180, 24, 44, 0.62);
}

.archive-chamber-thumbnail {
  position: relative;
  flex: 0 0 clamp(64px, 8vw, 92px);
  display: grid;
  gap: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 116, 126, 0.24);
  border-radius: 12px;
  padding: 4px;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 35, 65, 0.12), transparent 62%),
    rgba(0, 0, 0, 0.3);
  cursor: pointer;
  opacity: 0.72;
  filter: saturate(0.86) brightness(0.82);
  scroll-snap-align: center;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    opacity 220ms ease,
    transform 220ms ease,
    filter 220ms ease;
}

.archive-chamber-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  opacity: 0.82;
  transition:
    filter 220ms ease,
    opacity 220ms ease;
}

.archive-chamber-thumbnail span {
  display: inline-grid;
  justify-self: center;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: var(--navbar-text);
  background: rgba(0, 0, 0, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
}

.archive-chamber-thumbnail.is-locked {
  filter: saturate(0.68) brightness(0.68);
}

.archive-chamber-thumbnail:hover,
.archive-chamber-thumbnail:focus-visible {
  border-color: rgba(255, 213, 217, 0.64);
  outline: none;
  box-shadow: 0 0 20px rgba(255, 35, 65, 0.22);
  opacity: 1;
  filter: saturate(1) brightness(1);
  transform: translateY(-2px);
}

.archive-chamber-thumbnail:hover img,
.archive-chamber-thumbnail:focus-visible img {
  opacity: 0.96;
}

.archive-chamber-thumbnail.is-active {
  border-color: rgba(255, 232, 235, 0.88);
  outline: none;
  box-shadow:
    0 0 0 1px rgba(231, 195, 106, 0.34),
    0 0 26px rgba(255, 35, 65, 0.34),
    0 12px 28px rgba(0, 0, 0, 0.28);
  opacity: 1;
  filter: saturate(1.08) brightness(1.08);
  transform: translateY(-2px);
}

.archive-chamber-thumbnail.is-active img {
  opacity: 1;
  filter: brightness(1.12) contrast(1.06);
}

.archive-room-card {
  flex: 0 0 clamp(270px, 34vw, 390px);
  min-width: 0;
  scroll-snap-align: start;
}

.archive-room-card__button {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 56%, rgba(255, 35, 65, 0.4));
  border-radius: 22px;
  padding: 0;
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 35, 65, 0.14), transparent 48%),
    rgba(8, 5, 16, 0.74);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.32),
    0 0 22px rgba(255, 35, 65, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-family: var(--body-font);
  text-align: left;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    filter 220ms ease;
}

.archive-room-card__button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 0, 4, 0.08), rgba(5, 0, 4, 0.38) 48%, rgba(4, 0, 3, 0.86)),
    radial-gradient(circle at 22% 16%, rgba(255, 35, 65, 0.16), transparent 42%);
  pointer-events: none;
}

.archive-room-card.is-open .archive-room-card__button:hover,
.archive-room-card.is-open .archive-room-card__button:focus-visible {
  border-color: rgba(255, 116, 126, 0.54);
  box-shadow:
    0 28px 76px rgba(0, 0, 0, 0.38),
    0 0 30px rgba(255, 35, 65, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.archive-room-card.is-open .archive-room-card__button {
  border-color: rgba(255, 116, 126, 0.34);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(255, 35, 65, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.archive-room-card__button:focus-visible {
  outline: 2px solid var(--navbar-hover-text);
  outline-offset: 4px;
}

.archive-room-card.is-locked .archive-room-card__button {
  border-color: rgba(255, 35, 65, 0.22);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.28),
    0 0 14px rgba(255, 35, 65, 0.08),
    inset 0 0 0 1px rgba(8, 0, 3, 0.42);
  cursor: pointer;
  filter: saturate(0.72) brightness(0.74);
}

.archive-room-card--featured.archive-room-card.is-locked .archive-room-card__button {
  filter: saturate(0.9) brightness(0.92);
}

.archive-room-card.is-locked .archive-room-card__button::before {
  content: attr(data-lock-label);
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  border: 1px solid rgba(255, 116, 126, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(255, 232, 235, 0.92);
  background: rgba(32, 0, 7, 0.74);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-room-card__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 35, 65, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(28, 4, 12, 0.94), rgba(3, 1, 7, 0.98));
}

.archive-room-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  opacity: 0.84;
  transition: transform 320ms ease, opacity 220ms ease;
}

.archive-room-card.is-open .archive-room-card__button:hover .archive-room-card__media img,
.archive-room-card.is-open .archive-room-card__button:focus-visible .archive-room-card__media img {
  opacity: 0.96;
}

.archive-room-card__fallback {
  display: none;
  width: 86px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(231, 195, 106, 0.14);
  border-radius: 50%;
  color: rgba(255, 213, 217, 0.76);
  background: rgba(255, 35, 65, 0.08);
  font-family: var(--archive-manuscript-font);
  font-size: 2.7rem;
}

.archive-room-card__media.is-missing .archive-room-card__fallback {
  display: grid;
}

.archive-room-card__overlay {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  align-self: end;
  padding: clamp(18px, 3vw, 24px);
}

.archive-room-card__status,
.archive-room-card__requirement {
  width: fit-content;
  border: 1px solid rgba(231, 195, 106, 0.14);
  border-radius: 999px;
  padding: 6px 9px;
  color: rgba(255, 213, 217, 0.86);
  background: rgba(255, 35, 65, 0.1);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-room-card__title {
  color: rgba(255, 244, 216, 0.98);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 0.96;
}

.archive-room-card__description {
  color: rgba(255, 232, 235, 0.78);
  line-height: 1.55;
}

.archive-room-card__requirement {
  margin-top: 2px;
  border-color: rgba(255, 116, 126, 0.24);
  color: rgba(255, 213, 217, 0.72);
  background: rgba(0, 0, 0, 0.22);
}

.archive-room-view {
  min-width: 0;
}

.archive-selected-chamber {
  min-width: 0;
}

/* ================================
   Open Chamber Interior Placeholders
================================ */

.archive-room-interior {
  display: grid;
  gap: clamp(18px, 3vw, 26px);
  border: 1px solid color-mix(in srgb, var(--navbar-border) 68%, rgba(255, 35, 65, 0.34));
  border-radius: 26px;
  padding: clamp(18px, 3vw, 28px);
  color: var(--navbar-text);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 35, 65, 0.1), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 48%, transparent),
    var(--navbar-bg);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(255, 35, 65, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.archive-room-back {
  width: fit-content;
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 70%, rgba(255, 35, 65, 0.34));
  border-radius: 999px;
  padding: 0 15px;
  color: var(--navbar-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(255, 35, 65, 0.08);
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 700;
}

.archive-room-back:hover,
.archive-room-back:focus-visible {
  box-shadow: 0 0 24px rgba(255, 35, 65, 0.22);
  transform: translateY(-1px);
}

.archive-room-back:focus-visible {
  outline: 2px solid var(--navbar-hover-text);
  outline-offset: 3px;
}

.archive-room-interior__header h2 {
  margin: 8px 0 0;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 0.92;
}

.archive-room-interior__header p:not(.reading-section__eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--navbar-muted);
  line-height: 1.7;
}

.archive-room-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 35, 65, 0.16);
  border-radius: 20px;
  padding: clamp(16px, 3vw, 24px);
  background:
    linear-gradient(rgba(255, 116, 126, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(255, 35, 65, 0.11), transparent 42%),
    rgba(0, 0, 0, 0.2);
  background-size: 100% 19px, auto, auto;
}

.archive-room-panel--desk {
  grid-template-columns: 1fr;
}

.archive-room-panel--entry-desk {
  gap: clamp(12px, 2vw, 18px);
  padding-top: clamp(12px, 2vw, 18px);
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 35, 65, 0.13), transparent 36%),
    radial-gradient(circle at 92% 18%, rgba(231, 195, 106, 0.07), transparent 30%),
    linear-gradient(135deg, rgba(34, 2, 10, 0.78), rgba(6, 0, 4, 0.86));
  background-size: auto;
}

.archive-room-panel--entry-desk .archive-code-panel {
  margin-top: 0;
}

.entry-desk-page {
  display: grid;
  gap: clamp(18px, 3vw, 30px);
  border-color: rgba(255, 35, 65, 0.28);
  border-radius: 28px;
  padding: clamp(14px, 2.4vw, 24px);
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 35, 65, 0.16), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(231, 195, 106, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(16, 0, 6, 0.9), rgba(3, 0, 2, 0.96));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.entry-desk-hero {
  position: relative;
  min-height: clamp(390px, 48vw, 560px);
  overflow: hidden;
  border: 1px solid rgba(255, 35, 65, 0.34);
  border-radius: 24px;
  background: #070003;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(255, 35, 65, 0.12),
    inset 0 0 0 1px rgba(255, 116, 126, 0.04);
}

.entry-desk-hero__image,
.entry-desk-hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.entry-desk-hero__image {
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

.entry-desk-hero__overlay {
  background:
    linear-gradient(90deg, rgba(5, 0, 3, 0.96) 0%, rgba(16, 0, 7, 0.86) 42%, rgba(20, 0, 8, 0.46) 70%, rgba(8, 0, 3, 0.18) 100%),
    radial-gradient(circle at 18% 76%, rgba(255, 35, 65, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.32));
}

.entry-desk-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.9rem;
  width: min(100%, 620px);
  min-height: inherit;
  padding: clamp(1.5rem, 5vw, 3.8rem);
}

.entry-desk-return {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 38px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 12px;
  padding: 0.5rem 0.85rem;
  color: rgba(255, 230, 218, 0.9);
  background: rgba(8, 0, 4, 0.62);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.entry-desk-return img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter:
    brightness(0)
    saturate(100%)
    invert(37%)
    sepia(86%)
    saturate(3048%)
    hue-rotate(330deg)
    brightness(103%)
    contrast(105%)
    drop-shadow(0 0 8px rgba(255, 35, 77, 0.32));
}

.entry-desk-return:hover,
.entry-desk-return:focus-visible {
  border-color: rgba(255, 116, 126, 0.62);
  outline: none;
  box-shadow: 0 0 22px rgba(255, 35, 65, 0.22);
}

.entry-desk-kicker,
.entry-desk-section-heading > span,
.entry-desk-section-heading > .entry-desk-kicker {
  margin: 0;
  color: rgba(255, 116, 126, 0.86);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.entry-desk-hero h2,
.entry-desk-section-heading h3,
.entry-desk-activity-card h3 {
  margin: 0;
  color: rgba(255, 241, 220, 0.96);
  font-family: var(--archive-manuscript-font);
  font-weight: 700;
  line-height: 0.95;
}

.entry-desk-hero h2 {
  font-size: clamp(3rem, 8vw, 6rem);
  text-shadow: 0 0 26px rgba(255, 35, 65, 0.18);
}

.entry-desk-subtitle {
  margin: 0;
  color: rgba(255, 214, 190, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.28rem, 2.3vw, 1.8rem);
}

.entry-desk-hero p:not(.entry-desk-kicker, .entry-desk-subtitle) {
  max-width: 58ch;
  margin: 0;
  color: rgba(255, 221, 211, 0.78);
  line-height: 1.75;
}

.entry-desk-page .archive-code-panel,
.entry-desk-page .archive-recovered-objects,
.entry-desk-reveal-section,
.entry-desk-activity-card {
  border: 1px solid rgba(255, 35, 65, 0.22);
  border-radius: 20px;
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
  background:
    linear-gradient(145deg, rgba(255, 116, 126, 0.055), transparent 42%),
    rgba(10, 0, 5, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 52px rgba(0, 0, 0, 0.28);
}

.entry-desk-page .archive-code-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  background:
    linear-gradient(90deg, rgba(8, 0, 4, 0.92), rgba(20, 0, 8, 0.68)),
    radial-gradient(circle at 88% 24%, rgba(255, 35, 65, 0.13), transparent 34%);
}

.entry-desk-section-heading {
  display: grid;
  gap: 0.55rem;
  max-width: 840px;
}

.entry-desk-section-heading h3 {
  font-size: clamp(1.8rem, 3.8vw, 3rem);
}

.entry-desk-section-heading p {
  margin: 0;
  color: rgba(255, 221, 211, 0.74);
  line-height: 1.7;
}

.entry-desk-page .archive-code-entry {
  margin-top: 0.25rem;
}

.entry-desk-page .archive-code-entry button,
.entry-desk-page .archive-code-panel__actions a,
.entry-desk-page .archive-code-panel__actions button {
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(122, 11, 28, 0.88), rgba(37, 1, 10, 0.92));
}

.entry-desk-reveal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.entry-desk-reveal-card {
  display: grid;
  gap: 0.45rem;
  min-height: 150px;
  border: 1px solid rgba(255, 116, 126, 0.16);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(4, 0, 3, 0.5);
}

.entry-desk-reveal-card > span {
  color: rgba(255, 116, 126, 0.86);
  font-size: 1.35rem;
}

.entry-desk-reveal-card h4 {
  margin: 0;
  color: rgba(255, 240, 216, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: 1.25rem;
}

.entry-desk-reveal-card p {
  margin: 0;
  color: rgba(255, 221, 211, 0.68);
  font-size: 0.92rem;
  line-height: 1.55;
}

.entry-desk-page .archive-recovered-object-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}

.entry-desk-page .archive-recovered-object-card {
  grid-template-rows: 82px auto;
  min-height: 180px;
}

.entry-desk-page .archive-recovered-object-card.is-locked {
  cursor: default;
  opacity: 0.48;
  filter: grayscale(0.38);
}

.entry-desk-page .archive-recovered-object-card.is-locked:hover {
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.entry-desk-page .archive-recovered-object-card__copy span,
.entry-desk-page .archive-recovered-object-card__copy em {
  color: rgba(255, 221, 211, 0.62);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-desk-page .archive-recovered-object-card.is-recovered {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 26px color-mix(in srgb, var(--artifact-accent) 22%, transparent),
    0 18px 38px rgba(0, 0, 0, 0.28);
}

.entry-desk-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.2rem);
}

.entry-desk-activity-card {
  align-content: start;
}

.entry-desk-activity-card h3 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.entry-desk-activity-card ul {
  display: grid;
  gap: 0.7rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.entry-desk-activity-card li {
  border-left: 1px solid rgba(255, 116, 126, 0.26);
  padding-left: 0.8rem;
  color: rgba(255, 221, 211, 0.74);
  line-height: 1.55;
}

.entry-desk-omen {
  display: grid;
  grid-template-columns: minmax(20px, 1fr) auto minmax(20px, 1fr);
  align-items: center;
  gap: 1rem;
  margin: 0;
  color: rgba(255, 116, 126, 0.72);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-align: center;
  text-shadow: 0 0 18px rgba(255, 35, 65, 0.22);
}

.entry-desk-omen span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 35, 65, 0.46), transparent);
}

@media (max-width: 900px) {
  .entry-desk-activity-grid {
    grid-template-columns: 1fr;
  }

  .entry-desk-page .archive-code-entry {
    display: grid;
  }

  .entry-desk-page .archive-code-entry button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .entry-desk-page {
    padding: 0.85rem;
  }

  .entry-desk-hero {
    min-height: 430px;
  }

  .entry-desk-hero__overlay {
    background:
      linear-gradient(180deg, rgba(5, 0, 3, 0.82), rgba(8, 0, 4, 0.96)),
      radial-gradient(circle at 50% 20%, rgba(255, 35, 65, 0.16), transparent 34%);
  }

  .entry-desk-hero__content {
    align-content: end;
    padding: 1.25rem;
  }

  .entry-desk-omen {
    grid-template-columns: 1fr;
  }
}

.archive-room-panel--shelves {
  gap: clamp(18px, 3vw, 26px);
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 35, 65, 0.14), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(231, 195, 106, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(42, 2, 12, 0.74), rgba(6, 0, 4, 0.82));
  background-size: auto;
}

body.noctis-room-page .tarot-stage.archive-room-placeholder-page {
  padding-top: clamp(1.5rem, 3vw, 2rem);
}

body.noctis-room-page .archive-room-placeholder__card {
  transform: none;
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.shelves-page.noctis-room-page .archive-room-placeholder-page {
  min-height: calc(100vh - 120px);
}

body.shelves-page.noctis-room-page .archive-room-placeholder__stage,
body.shelves-page.noctis-room-page .archive-room-placeholder__card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

body.shelves-page.noctis-room-page .archive-room-placeholder__kicker,
body.shelves-page.noctis-room-page .archive-room-placeholder__title,
body.shelves-page.noctis-room-page .archive-room-placeholder__meta,
body.shelves-page.noctis-room-page .archive-room-placeholder__keyline,
body.shelves-page.noctis-room-page .archive-room-placeholder__copy,
body.shelves-page.noctis-room-page .archive-room-placeholder__back {
  display: none;
}

body.gallery-page.noctis-room-page .archive-room-placeholder-page {
  place-items: start center;
  max-width: none;
  min-height: calc(100vh - 120px);
  padding-inline: 0;
}

body.gallery-page.noctis-room-page .archive-room-placeholder__stage,
body.gallery-page.noctis-room-page .archive-room-placeholder__card,
body.gallery-page .archive-selected-chamber[data-chamber-interior="gallery"] {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.gallery-page.noctis-room-page .archive-room-placeholder__kicker,
body.gallery-page.noctis-room-page .archive-room-placeholder__title,
body.gallery-page.noctis-room-page .archive-room-placeholder__meta,
body.gallery-page.noctis-room-page .archive-room-placeholder__keyline,
body.gallery-page.noctis-room-page .archive-room-placeholder__copy,
body.gallery-page.noctis-room-page .archive-room-placeholder__back {
  display: none;
}

body.restricted-wing-page.noctis-room-page .archive-room-placeholder-page {
  min-height: calc(100vh - 68px);
  padding-inline: 0;
}

body.restricted-wing-page.noctis-room-page .archive-room-placeholder__stage,
body.restricted-wing-page.noctis-room-page .archive-room-placeholder__card {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 68px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

body.restricted-wing-page.noctis-room-page .archive-room-placeholder__kicker,
body.restricted-wing-page.noctis-room-page .archive-room-placeholder__title,
body.restricted-wing-page.noctis-room-page .archive-room-placeholder__meta,
body.restricted-wing-page.noctis-room-page .archive-room-placeholder__keyline,
body.restricted-wing-page.noctis-room-page .archive-room-placeholder__copy,
body.restricted-wing-page.noctis-room-page .archive-room-placeholder__back {
  display: none;
}

.shelves-page-shell {
  width: min(1320px, calc(100% - clamp(1.5rem, 5vw, 5rem)));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(4rem, 8vh, 6rem);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.shelves-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.8rem, 1.8vw, 1.2rem);
  background: transparent;
  border: 0;
  box-shadow: none;
}

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

.shelves-hero,
.shelves-search-panel,
.shelves-reading-desk,
.shelves-category-card,
.shelves-bottom-panel {
  border: 1px solid rgba(255, 70, 95, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(26, 1, 8, 0.84), rgba(8, 0, 4, 0.91));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.shelves-category-card,
.shelves-bottom-panel {
  border-color: rgba(255, 75, 95, 0.18);
  border-radius: 22px;
  padding: clamp(1rem, 1.8vw, 1.45rem);
}

.shelves-hero,
.shelves-reading-desk,
.shelves-search-panel {
  border-radius: 28px;
}

.shelves-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(320px, 36vh, 420px);
  height: clamp(320px, 36vh, 420px);
  max-height: 420px;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: none;
}

body.shelves-page .shelves-hero {
  background:
    url("../assets/images/noctis/shelves-hero.png") center right / cover no-repeat;
  background-position: center right;
  border-color: transparent;
}

.shelves-hero,
.shelves-hero * {
  box-shadow: none !important;
  text-shadow: none !important;
}

.shelves-hero::before {
  content: "";
  background: none;
  pointer-events: none;
}

body.shelves-page .shelves-hero::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 0, 4, 0.78) 0%,
    rgba(8, 0, 4, 0.48) 34%,
    rgba(8, 0, 4, 0.18) 62%,
    rgba(8, 0, 4, 0.26) 100%
  );
  z-index: 0;
}

body.shelves-page .shelves-hero::after {
  display: none;
}

.shelves-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  width: min(620px, 100%);
  margin-left: 0;
  text-align: left;
  align-items: flex-start;
}

.shelves-hero-content h2,
.shelves-reading-desk h3,
.shelves-category-card span {
  margin: 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  line-height: 1;
}

.shelves-hero-content h2 {
  font-size: clamp(3.2rem, 6vw, 6rem);
}

body.shelves-page .shelves-hero h1,
body.shelves-page .shelves-hero-title {
  font-size: clamp(3.2rem, 6vw, 6rem);
  line-height: 0.92;
  max-width: 620px;
}

.shelves-hero-content p:not(.archive-entry__stamp),
.shelves-category-card p,
.shelves-search-panel h3,
.shelves-reading-desk p,
.shelves-bottom-panel p {
  max-width: 580px;
  margin: 0;
  color: rgba(255, 213, 217, 0.78);
  line-height: 1.45;
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  body.shelves-page .shelves-hero {
    background-position: center right;
  }

  body.shelves-page .shelves-hero::before {
    background:
      linear-gradient(
        180deg,
        rgba(8, 0, 4, 0.42),
        rgba(8, 0, 4, 0.78)
      );
  }

  body.shelves-page .shelves-hero h1,
  body.shelves-page .shelves-hero-title {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
  }
}

body.shelves-page .shelves-category-card h3,
body.shelves-page .shelves-bottom-panel h3,
body.shelves-page .shelves-document-card p,
body.shelves-page .shelves-section-kicker,
body.shelves-page .shelves-card-kicker {
  font-size: clamp(1.25rem, 1.7vw, 1.7rem);
  line-height: 1.05;
  letter-spacing: normal;
}

body.shelves-page .shelves-section-kicker,
body.shelves-page .shelves-card-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

body.shelves-page .shelves-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.58rem;
  text-align: left;
  position: relative;
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  border: 0;
  border-radius: 0;
  padding: 0.65rem 0.25rem 0.85rem;
  color: rgba(255, 238, 220, 0.78);
  background: transparent;
  box-shadow: none;
  text-shadow: none;
  --shelves-filter-icon-color: rgba(255, 102, 128, 0.96);
  --shelves-filter-icon: none;
}

body.shelves-page .shelves-filter-chip::before {
  content: "";
  width: 0.95rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  -webkit-mask-image: var(--shelves-filter-icon);
  mask-image: var(--shelves-filter-icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  background-color: var(--shelves-filter-icon-color);
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="all"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/all-star.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="featured"]::before {
  display: none;
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="journals"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/feather.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="manuscripts"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/tied-scroll.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="letters"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/letter.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="cryptic-codes"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/cryptic.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="fragments"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/fragments.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="blood-moon"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/bloodmoon.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="the-veil"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/veil.svg");
}

body.shelves-page .shelves-filter-chip[data-shelves-filter="unstable-texts"] {
  --shelves-filter-icon: url("../assets/icons/noctis_icons/unstable-text.svg");
}

body.shelves-page .shelves-filter-chip.is-active::before,
body.shelves-page .shelves-filter-chip[aria-pressed="true"]::before,
body.shelves-page .shelves-filter-chip:hover::before {
  background-color: rgba(255, 149, 168, 0.98);
}

body.shelves-page .shelves-filter-active-line,
body.shelves-page .shelves-filter-indicator,
body.shelves-page .shelves-filter-list::after,
body.shelves-page .shelves-filter-scroll::after,
body.shelves-page .shelves-filter-track::after {
  display: none !important;
}

.shelves-back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  border: 1px solid rgba(255, 116, 126, 0.24);
  border-radius: 14px;
  padding: 0.52rem 0.9rem;
  color: rgba(255, 244, 216, 0.92);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%),
    rgba(8, 0, 4, 0.46);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.12);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.shelves-back-link:hover,
.shelves-back-link:focus-visible {
  border-color: rgba(255, 213, 217, 0.46);
  outline: none;
  box-shadow: 0 0 26px rgba(255, 35, 65, 0.22);
  transform: translateY(-1px);
}

.shelves-search-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.62fr) minmax(260px, 1fr);
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
}

body.shelves-page .shelves-search-panel,
body.shelves-page .shelves-search-input,
body.shelves-page .shelves-search-field input {
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

body.shelves-page .shelves-search-panel {
  background:
    linear-gradient(
      180deg,
      rgba(28, 4, 10, 0.92) 0%,
      rgba(18, 2, 7, 0.96) 100%
    );
  border: 1px solid rgba(255, 70, 100, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 120, 140, 0.04);
}

body.shelves-page .shelves-search-panel input,
body.shelves-page .shelves-search-input {
  background: rgba(7, 0, 4, 0.72);
  border-color: rgba(255, 90, 115, 0.24);
}

body.shelves-page .shelves-search-panel input,
body.shelves-page .shelves-search-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.shelves-search-panel__heading {
  display: grid;
  gap: 0.35rem;
}

.shelves-search-panel h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.shelves-search-field {
  display: grid;
  min-width: 0;
}

.shelves-search-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 116, 126, 0.26);
  border-radius: 14px;
  padding: 0 1.1rem;
  color: rgba(255, 244, 216, 0.94);
  background: rgba(6, 0, 4, 0.58);
  font: inherit;
  outline: none;
}

.shelves-search-field input:focus {
  border-color: rgba(255, 88, 112, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 35, 65, 0.16);
}

.shelves-search-field input::placeholder {
  color: rgba(255, 213, 217, 0.5);
}

.shelves-filter-chip,
.shelves-reading-desk button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  padding: 0;
  min-height: auto;
  cursor: pointer;
  color: rgba(255, 244, 216, 0.94);
  background: none;
  box-shadow: none;
  font: 700 0.72rem/1 "DM Sans", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: none;
  overflow: visible;
  position: relative;
  text-decoration: none;
  padding-bottom: 0.14rem;
}

body.shelves-page .shelves-filter-chip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.18rem;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #ff3f62;
  box-shadow:
    0 0 14px rgba(255, 35, 77, 0.72),
    0 0 28px rgba(255, 35, 77, 0.26);
  transition: width 180ms ease;
  pointer-events: none;
}

.shelves-filter-chip:hover::after,
.shelves-filter-chip:focus-visible::after,
.shelves-filter-chip.is-active::after,
.shelves-filter-chip[aria-pressed="true"]::after,
.shelves-filter-chip.active::after {
  width: min(100%, 3rem);
}

.shelves-filter-chip.is-active::after,
.shelves-filter-chip.active::after,
.shelves-filter-chip[aria-pressed="true"]::after {
  width: min(100%, 3rem);
  background: #ff3f62;
  box-shadow:
    0 0 14px rgba(255, 35, 77, 0.72),
    0 0 28px rgba(255, 35, 77, 0.26);
}

body.shelves-page .shelves-filter-hint {
  display: none;
  grid-column: 1 / -1;
}

.shelves-filter-chip,
.shelves-filter-list,
.shelves-filter-scroll {
  min-height: auto;
}

.shelves-details-btn::before {
  display: none;
}

body.shelves-page .shelves-details-btn,
body.shelves-page .shelves-details-btn:hover,
body.shelves-page .shelves-details-btn:focus-visible {
  text-decoration: underline;
  text-decoration-color: #ff3f62;
  text-decoration-thickness: 1.8px;
  text-underline-offset: 0.26em;
  text-shadow: none;
}

.shelves-filter-row {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-start;
  width: max-content;
  min-width: 100%;
  scroll-padding-inline: 2.35rem;
  overflow: visible;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.shelves-filter-scroll {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.shelves-filter-scroll::-webkit-scrollbar {
  display: none;
}

.shelves-filter-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  width: max-content;
  min-width: 100%;
}

.shelves-filter-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.shelves-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

body.shelves-page .shelves-filter-wrap {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

body.shelves-page .shelves-filter-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(22, 0, 8, 0), rgba(22, 0, 8, 0.9));
  display: none;
  z-index: 2;
}

.shelves-filter-nav {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #ff2341;
  background: transparent;
  line-height: 1;
  cursor: pointer;
  text-shadow: none;
  --shelves-filter-arrow-icon: none;
}

.shelves-filter-nav::before {
  content: "";
  width: 1.5rem;
  aspect-ratio: 1;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  background: currentColor;
  -webkit-mask-image: var(--shelves-filter-arrow-icon);
  mask-image: var(--shelves-filter-arrow-icon);
}

.shelves-filter-nav--prev {
  --shelves-filter-arrow-icon: url("../assets/icons/symbols/arrow-short-left.svg");
}

.shelves-filter-nav--next {
  --shelves-filter-arrow-icon: url("../assets/icons/symbols/arrow-short-right.svg");
}

.shelves-filter-nav:hover,
.shelves-filter-nav:focus-visible {
  color: #ff8c9c;
  outline: none;
  box-shadow: none;
}

.shelves-filter-nav[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.shelves-filter-chip {
  min-height: 38px;
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  padding: 0.65rem 0.25rem 0.85rem;
  border-radius: 0;
  font-size: 0.82rem;
  line-height: 1;
}

.shelves-filter-chip.is-active {
  color: #fff6e6;
  background: transparent;
  text-shadow: 0 0 14px rgba(255, 35, 77, 0.5);
}

.shelves-filter-chip.active,
.shelves-filter-chip[aria-pressed="true"] {
  background: transparent;
}

.shelves-filter-chip:hover,
.shelves-filter-chip:focus-visible,
.shelves-filter-chip[aria-pressed="true"] {
  outline: none;
  color: #fff6e6;
  text-shadow: 0 0 14px rgba(255, 35, 77, 0.5);
}

body.shelves-page .shelves-search-panel .shelves-filter-chip {
  position: relative;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0.62rem 0.25rem 1rem;
  color: rgba(255, 238, 220, 0.78);
  background: transparent;
  box-shadow: none !important;
  text-shadow: none !important;
  overflow: visible;
}

body.shelves-page .shelves-search-panel .shelves-filter-chip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.24rem;
  display: block;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #ff3f62;
  box-shadow:
    0 0 14px rgba(255, 35, 77, 0.72),
    0 0 28px rgba(255, 35, 77, 0.26);
  opacity: 1;
  transition: width 180ms ease;
  pointer-events: none;
}

body.shelves-page .shelves-search-panel .shelves-filter-chip:hover,
body.shelves-page .shelves-search-panel .shelves-filter-chip:focus-visible,
body.shelves-page .shelves-search-panel .shelves-filter-chip.is-active,
body.shelves-page .shelves-search-panel .shelves-filter-chip.active,
body.shelves-page .shelves-search-panel .shelves-filter-chip[aria-pressed="true"] {
  color: #fff6e6;
  background: transparent;
  outline: none;
}

body.shelves-page .shelves-search-panel .shelves-filter-chip:hover::after,
body.shelves-page .shelves-search-panel .shelves-filter-chip:focus-visible::after,
body.shelves-page .shelves-search-panel .shelves-filter-chip.is-active::after,
body.shelves-page .shelves-search-panel .shelves-filter-chip.active::after,
body.shelves-page .shelves-search-panel .shelves-filter-chip[aria-pressed="true"]::after {
  width: min(100%, 3rem);
}

.shelves-load-state {
  grid-column: 1 / -1;
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.9rem;
}

.shelves-filter-chip:hover,
.shelves-filter-chip:focus-visible,
.shelves-reading-desk button:hover,
.shelves-reading-desk button:focus-visible {
  outline: none;
  box-shadow: none;
}

.shelves-reading-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  overflow: hidden;
  min-height: unset;
}

body.shelves-page .shelves-reading-desk {
  position: relative;
  background-color: transparent;
  background-image: url("../assets/images/noctis/reading-desk-bg.png");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  overflow: hidden;
  min-height: clamp(300px, 34vw, 390px);
}

body.shelves-page .shelves-reading-desk.is-empty {
  background-color: transparent;
  background-image: url("../assets/images/noctis/reading-desk-bg.png");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  overflow: hidden;
  min-height: clamp(300px, 34vw, 390px);
}

body.shelves-page .shelves-reading-desk:not(.is-empty)::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(8, 0, 4, 0.96) 0%,
      rgba(8, 0, 4, 0.88) 34%,
      rgba(8, 0, 4, 0.48) 58%,
      rgba(8, 0, 4, 0.08) 100%
    );
  pointer-events: none;
  z-index: 0;
}

.shelves-reading-desk.is-empty {
  min-height: 260px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 55, 85, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(24, 1, 8, 0.88), rgba(8, 0, 4, 0.94));
}

.shelves-reading-empty {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.shelves-reading-empty .shelves-section-kicker {
  margin: 0 0 0.65rem;
  color: #ff7188;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.shelves-reading-empty h2 {
  margin: 0 0 0.75rem;
  color: #fff1d6;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

.shelves-reading-empty p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 232, 218, 0.82);
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 1.5;
}

.shelves-empty-note {
  margin-top: 0.85rem;
  color: rgba(255, 120, 145, 0.82);
  font-style: italic;
}

.shelves-reading-desk.is-empty .shelves-reading-desk__art,
.shelves-reading-desk.is-empty .shelves-reading-meta {
  display: none;
}

body.shelves-page .shelves-reading-desk__copy,
body.shelves-page .shelves-reading-content {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-width: 540px;
  display: grid;
  align-content: center;
  gap: 0.55rem;
  padding: clamp(1.4rem, 3vw, 2.1rem);
  text-align: left;
}

.shelves-reading-desk__label,
.shelves-reading-desk__author {
  color: rgba(255, 226, 218, 0.76);
  font-size: 0.92rem;
}

body.shelves-page .shelves-reading-title,
body.shelves-page .shelves-reading-desk h2,
body.shelves-page .shelves-reading-desk h3 {
  max-width: 540px;
  font-size: clamp(2.3rem, 4.2vw, 4.35rem);
  line-height: 0.92;
  margin-bottom: 0.65rem;
}

.shelves-reading-desk button {
  color: rgba(255, 238, 220, 0.78);
  background: transparent;
}

body.shelves-page .shelves-reading-desk__actions,
body.shelves-page .shelves-reading-actions,
.shelves-reading-desk__actions,
.shelves-reading-actions,
body.shelves-page .shelves-reading-desk__controls,
body.shelves-page .shelves-reading-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.shelves-reading-desk__actions button:first-child {
  text-transform: uppercase;
}

.shelves-reading-desk__actions button:first-child:hover,
.shelves-reading-desk__actions button:first-child:focus-visible,
.shelves-reading-desk__actions button:hover,
.shelves-reading-desk__actions button:focus-visible,
.shelves-reading-desk__controls button:hover,
.shelves-reading-desk__controls button:focus-visible,
.shelves-reading-desk button:hover,
.shelves-reading-desk button:focus-visible {
  color: #fff6e6;
  text-shadow: 0 0 14px rgba(255, 35, 77, 0.5);
  box-shadow: none;
  transform: none;
}

body.shelves-page .shelves-reading-desk__controls,
body.shelves-page .shelves-reading-controls {
  position: absolute;
  right: clamp(1rem, 2.4vw, 2rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  z-index: 2;
  color: rgba(255, 226, 218, 0.72);
  font-size: 0.86rem;
}

body.shelves-page .shelves-reading-controls button,
body.shelves-page .shelves-reading-controls span {
  color: rgba(255, 241, 214, 0.88);
}

.shelves-reading-desk__controls button {
  min-height: 34px;
  padding-inline: 0.85rem;
  font-size: 0.82rem;
}

.shelves-reading-desk__controls button[data-shelves-nav="previous"] {
  gap: 0.38rem;
  color: rgba(255, 238, 220, 0.78);
}

.shelves-reading-desk__controls button[data-shelves-nav="previous"]::before {
  content: "←";
  color: #ff3f62;
  font-size: 0.88rem;
  line-height: 1;
}

.shelves-reading-desk__controls button[data-shelves-nav="next"] {
  gap: 0.38rem;
  color: rgba(255, 238, 220, 0.78);
}

body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="previous"],
body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="next"] {
  color: #ffffff;
}

body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="previous"]:hover,
body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="previous"]:focus-visible,
body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="next"]:hover,
body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="next"]:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.shelves-reading-desk__controls button[data-shelves-nav="next"]::after {
  content: "→";
  color: #ff3f62;
  font-size: 0.88rem;
  line-height: 1;
}

body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="previous"]::before,
body.shelves-page .shelves-reading-desk__controls button[data-shelves-nav="next"]::after {
  color: inherit;
}

.shelves-reading-desk__controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.shelves-page .shelves-reading-excerpt,
body.shelves-page .shelves-reading-desk p,
body.shelves-page .shelves-reading-content p {
  max-width: 500px;
  font-size: clamp(0.92rem, 1vw, 1rem);
  line-height: 1.5;
}

.shelves-reading-desk__art {
  display: none;
}

.shelves-reading-desk__art::before {
  content: none;
}

.shelves-reading-desk__art img {
  display: none;
}

.shelves-browse-section,
.shelves-finding-aids {
  display: grid;
  gap: 0.8rem;
}

body.shelves-page .shelves-browse-section > .archive-entry__stamp,
body.shelves-page .shelves-section-title,
body.shelves-page .shelves-browse-heading {
  color: #f5dca3;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

body.shelves-page .shelves-category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-width: 0;
  gap: clamp(0.75rem, 1.2vw, 1rem);
}

body.shelves-page .shelves-category-card,
body.shelves-page .shelves-browse-card {
  --shelves-category-icon-color: #ff3f62;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  min-height: 190px;
  padding: 1.15rem 0.95rem 0.9rem;
  text-align: center;
  cursor: pointer;
  font: inherit;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(39, 4, 11, 0.78), rgba(12, 0, 4, 0.9));
  box-shadow: none;
  text-shadow: none;
}

body.shelves-page .shelves-category-card,
body.shelves-page .shelves-category-card .shelves-category-icon,
body.shelves-page .shelves-category-card::before {
  color: #f4e7d3;
}

body.shelves-page .shelves-category-card span,
body.shelves-page .shelves-category-card h3,
body.shelves-page .shelves-category-title,
body.shelves-page .shelves-category-card .shelves-category-title {
  color: #f4e7d3;
  font-family: var(--archive-manuscript-font);
  margin: 0 0 0.45rem;
  font-size: clamp(1.05rem, 1.25vw, 1.28rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: 0;
}

.shelves-category-card:hover,
.shelves-category-card:focus-visible {
  background: linear-gradient(180deg, rgba(48, 5, 14, 0.82), rgba(14, 0, 5, 0.92));
  box-shadow: none;
  text-shadow: none;
  transform: translateY(-1px);
  outline: none;
}

.shelves-aids-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
  align-items: start;
}

.shelves-aid-tile,
.shelves-aid-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 0.55rem;
}

.shelves-aid-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shelves-aid-image-card {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.shelves-aid-image-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.shelves-aid-cta {
  align-self: center;
  border: 0;
  background: transparent;
  color: #ff3f62;
  padding: 0.15rem 0.1rem;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
}

.shelves-aid-arrow {
  width: 0.96rem;
  height: 0.96rem;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-image: url("../assets/icons/symbols/arrow-short-right.svg");
  mask-image: url("../assets/icons/symbols/arrow-short-right.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.shelves-aid-cta:hover {
  color: #ff6c82;
}

@media (max-width: 900px) {
  body.shelves-page .shelves-aids-grid {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  body.shelves-page .shelves-aids-grid::-webkit-scrollbar {
    display: none;
  }

  body.shelves-page .shelves-aid-tile {
    flex: 0 0 260px;
  }
}

.shelves-bottom-panel h3,
.shelves-document-row strong,
.shelves-research-trails strong {
  margin: 0;
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: 1.1rem;
  line-height: 1.05;
}

.shelves-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.shelves-bottom-panel {
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

body.shelves-page .shelves-recently-read-panel {
  gap: 0.9rem;
  border-color: rgba(255, 70, 95, 0.18);
  background:
    linear-gradient(180deg, rgba(28, 4, 10, 0.78), rgba(8, 0, 5, 0.92));
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 150, 165, 0.04),
    0 18px 38px rgba(0, 0, 0, 0.22);
}

body.shelves-page .shelves-notable-documents-panel {
  gap: 0.9rem;
  border-color: rgba(255, 70, 95, 0.18);
  background:
    linear-gradient(180deg, rgba(30, 5, 12, 0.82), rgba(8, 0, 5, 0.94));
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 150, 165, 0.045),
    0 18px 38px rgba(0, 0, 0, 0.24);
}

.shelves-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 70, 95, 0.16);
  padding-bottom: 0.55rem;
}

body.shelves-page .shelves-notable-documents-panel .shelves-panel-heading,
body.shelves-page .shelves-notable-header {
  gap: 0.75rem;
  border-bottom-color: rgba(255, 70, 95, 0.34);
  padding-bottom: 0.65rem;
}

body.shelves-page .shelves-recently-read-header {
  gap: 0.75rem;
  border-bottom-color: rgba(255, 70, 95, 0.34);
  padding-bottom: 0.65rem;
}

body.shelves-page .shelves-notable-header h3 {
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  letter-spacing: 0.01em;
}

body.shelves-page .shelves-recently-read-header h3 {
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  letter-spacing: 0.01em;
}

body.shelves-page .shelves-recent-view-all,
body.shelves-page .shelves-notable-view-all {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 100, 120, 0.18);
  border-radius: 999px;
  padding: 0.34rem 0.58rem;
  color: rgba(255, 134, 152, 0.76);
  background: rgba(8, 0, 4, 0.36);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

body.shelves-page .shelves-recent-view-all:hover,
body.shelves-page .shelves-recent-view-all:focus-visible,
body.shelves-page .shelves-notable-view-all:hover,
body.shelves-page .shelves-notable-view-all:focus-visible {
  outline: none;
  border-color: rgba(255, 130, 150, 0.4);
  color: rgba(255, 241, 214, 0.92);
  background: rgba(82, 5, 18, 0.5);
  box-shadow: 0 0 14px rgba(255, 35, 65, 0.1);
}

.shelves-document-row {
  display: grid;
  gap: 0.18rem;
  border-bottom: 1px solid rgba(255, 70, 95, 0.12);
  padding-bottom: 0.7rem;
}

.shelves-document-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.shelves-document-row span {
  color: rgba(255, 213, 217, 0.65);
  font-size: 0.88rem;
}

body.shelves-page .shelves-recent-list,
body.shelves-page .shelves-notable-list {
  display: grid;
  gap: 0.55rem;
}

body.shelves-page .shelves-recent-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  border: 1px solid rgba(255, 70, 95, 0.1);
  border-radius: 14px;
  padding: 0.68rem 0.75rem;
  color: inherit;
  background: rgba(7, 0, 4, 0.32);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

body.shelves-page .shelves-recent-row:hover,
body.shelves-page .shelves-recent-row:focus-visible {
  outline: none;
  border-color: rgba(255, 70, 95, 0.26);
  background: rgba(36, 3, 12, 0.48);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.1);
}

body.shelves-page .shelves-recent-row__marker {
  width: 8px;
  height: 8px;
  margin-top: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 70, 95, 0.78);
  box-shadow:
    0 0 10px rgba(255, 35, 65, 0.26),
    0 0 0 3px rgba(255, 70, 95, 0.08);
}

body.shelves-page .shelves-recent-row__copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

body.shelves-page .shelves-recent-row__copy strong {
  overflow: hidden;
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: 1rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.shelves-page .shelves-recent-row__copy span,
body.shelves-page .shelves-recent-row__copy em {
  overflow: hidden;
  color: rgba(255, 213, 217, 0.66);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.shelves-page .shelves-recent-row__copy em {
  color: rgba(255, 130, 150, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.shelves-page .shelves-notable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 70, 95, 0.1);
  border-radius: 14px;
  padding: 0.35rem;
  background: rgba(7, 0, 4, 0.34);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

body.shelves-page .shelves-notable-row:hover,
body.shelves-page .shelves-notable-row:focus-within {
  border-color: rgba(255, 70, 95, 0.22);
  background: rgba(36, 3, 12, 0.48);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.1);
}

body.shelves-page .shelves-notable-row:last-child {
  border-bottom: 1px solid rgba(255, 70, 95, 0.1);
}

body.shelves-page .shelves-notable-row__main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.68rem;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0.42rem;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

body.shelves-page .shelves-notable-row__main:hover,
body.shelves-page .shelves-notable-row__main:focus-visible {
  outline: none;
  border-color: rgba(255, 100, 120, 0.18);
  background: rgba(255, 70, 95, 0.045);
}

body.shelves-page .shelves-notable-row__thumb,
body.shelves-page .shelves-notable-row__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 116, 126, 0.16);
  border-radius: 8px;
  color: rgba(255, 158, 166, 0.86);
  background:
    linear-gradient(135deg, rgba(87, 8, 20, 0.42), rgba(6, 0, 4, 0.74));
  font-family: var(--archive-manuscript-font);
  font-size: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.shelves-page .shelves-notable-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.shelves-page .shelves-notable-row__copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

body.shelves-page .shelves-notable-row__copy strong {
  overflow: hidden;
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: 0.98rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.shelves-page .shelves-notable-row__copy span,
body.shelves-page .shelves-notable-row__copy em {
  overflow: hidden;
  color: rgba(255, 213, 217, 0.65);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.shelves-page .shelves-notable-row__copy em {
  color: rgba(255, 130, 150, 0.72);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.shelves-page .shelves-notable-row__remove,
body.shelves-page .shelves-save-document-btn {
  border: 1px solid rgba(255, 100, 120, 0.28);
  border-radius: 999px;
  color: rgba(255, 241, 214, 0.9);
  background: rgba(80, 4, 16, 0.56);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

body.shelves-page .shelves-notable-row__remove {
  min-height: 32px;
  border-radius: 10px;
  padding: 0.35rem 0.62rem;
  color: rgba(255, 213, 217, 0.72);
  background: rgba(11, 0, 5, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

body.shelves-page .shelves-save-document-btn {
  min-height: 40px;
  padding: 0.55rem 0.9rem;
}

body.shelves-page .shelves-save-document-btn.is-saved {
  background: rgba(44, 2, 10, 0.74);
}

body.shelves-page .shelves-notable-row__remove:hover,
body.shelves-page .shelves-notable-row__remove:focus-visible,
body.shelves-page .shelves-save-document-btn:hover,
body.shelves-page .shelves-save-document-btn:focus-visible {
  outline: none;
  border-color: rgba(255, 130, 150, 0.5);
  color: rgba(255, 241, 214, 0.92);
  background: rgba(82, 5, 18, 0.68);
  box-shadow: 0 0 14px rgba(255, 35, 65, 0.12);
}

body.shelves-page .shelves-notable-row__remove:disabled,
body.shelves-page .shelves-save-document-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

body.shelves-page .shelves-notable-empty {
  display: grid;
  gap: 0.25rem;
  border: 1px dashed rgba(255, 70, 95, 0.18);
  border-radius: 14px;
  padding: 0.95rem;
  background:
    linear-gradient(180deg, rgba(25, 2, 9, 0.44), rgba(7, 0, 4, 0.5));
}

body.shelves-page .shelves-recent-empty {
  display: grid;
  gap: 0.25rem;
  border: 1px dashed rgba(255, 70, 95, 0.18);
  border-radius: 14px;
  padding: 0.95rem;
  background:
    linear-gradient(180deg, rgba(25, 2, 9, 0.44), rgba(7, 0, 4, 0.5));
}

body.shelves-page .shelves-recent-empty strong {
  color: rgba(255, 244, 216, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: 1rem;
}

body.shelves-page .shelves-recent-empty span {
  color: rgba(255, 213, 217, 0.66);
  font-size: 0.86rem;
  line-height: 1.4;
}

body.shelves-page .shelves-notable-empty strong {
  color: rgba(255, 244, 216, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: 1rem;
}

body.shelves-page .shelves-notable-empty span {
  color: rgba(255, 213, 217, 0.66);
  font-size: 0.86rem;
  line-height: 1.4;
}

body.shelves-page .shelves-saved-documents-notice,
body.shelves-page .shelves-saved-documents-error {
  margin: 0;
  border-radius: 12px;
  padding: 0.58rem 0.7rem;
  color: rgba(255, 226, 218, 0.84);
  background: rgba(7, 0, 4, 0.48);
  font-size: 0.82rem;
  line-height: 1.35;
}

body.shelves-page .shelves-saved-documents-notice--success {
  color: rgba(255, 241, 214, 0.92);
  background: rgba(65, 7, 16, 0.5);
}

body.shelves-page .shelves-saved-documents-notice--error,
body.shelves-page .shelves-saved-documents-error {
  color: rgba(255, 196, 204, 0.94);
  background: rgba(80, 2, 12, 0.46);
}

.shelves-research-trails section {
  display: grid;
  gap: 0.2rem;
}

body.shelves-page .shelves-research-trails {
  gap: 0.9rem;
  border-color: rgba(255, 70, 95, 0.18);
  background:
    linear-gradient(180deg, rgba(24, 4, 11, 0.78), rgba(7, 0, 5, 0.9));
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 150, 165, 0.04),
    0 18px 38px rgba(0, 0, 0, 0.22);
}

body.shelves-page .shelves-research-trails__header {
  gap: 0.75rem;
  border-bottom-color: rgba(255, 70, 95, 0.34);
  padding-bottom: 0.65rem;
}

body.shelves-page .shelves-research-trails__header h3 {
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  letter-spacing: 0.01em;
}

body.shelves-page .shelves-research-trails__action {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 100, 120, 0.18);
  border-radius: 999px;
  padding: 0.34rem 0.58rem;
  color: rgba(255, 134, 152, 0.76);
  background: rgba(8, 0, 4, 0.36);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

body.shelves-page .shelves-research-trails__action:hover,
body.shelves-page .shelves-research-trails__action:focus-visible {
  outline: none;
  border-color: rgba(255, 130, 150, 0.4);
  color: rgba(255, 241, 214, 0.92);
  background: rgba(82, 5, 18, 0.5);
  box-shadow: 0 0 14px rgba(255, 35, 65, 0.1);
}

body.shelves-page .shelves-research-trails__list,
body.shelves-page .shelves-research-dialog__list {
  display: grid;
  gap: 0.55rem;
}

body.shelves-page .shelves-research-trail-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  border: 1px solid rgba(255, 70, 95, 0.1);
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
  color: inherit;
  background: rgba(7, 0, 4, 0.32);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

body.shelves-page .shelves-research-trail-row:hover,
body.shelves-page .shelves-research-trail-row:focus-visible,
body.shelves-page .shelves-research-trail-row.is-active {
  outline: none;
  border-color: rgba(255, 70, 95, 0.28);
  background: rgba(36, 3, 12, 0.5);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.12);
}

body.shelves-page .shelves-research-trail-row.is-active {
  border-color: rgba(231, 195, 106, 0.28);
}

body.shelves-page .shelves-research-trail-row__dot {
  width: 8px;
  height: 8px;
  margin-top: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 70, 95, 0.78);
  box-shadow:
    0 0 10px rgba(255, 35, 65, 0.28),
    0 0 0 3px rgba(255, 70, 95, 0.08);
}

body.shelves-page .shelves-research-trail-row.is-active .shelves-research-trail-row__dot {
  background: rgba(231, 195, 106, 0.88);
  box-shadow:
    0 0 12px rgba(231, 195, 106, 0.24),
    0 0 0 3px rgba(231, 195, 106, 0.08);
}

body.shelves-page .shelves-research-trail-row__copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

body.shelves-page .shelves-research-trail-row__copy strong {
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: 1rem;
  line-height: 1.08;
}

body.shelves-page .shelves-research-trail-row__copy span {
  color: rgba(255, 213, 217, 0.66);
  font-size: 0.82rem;
  line-height: 1.4;
}

.shelves-closing-quote {
  margin: clamp(1.2rem, 2vw, 2rem) 0 0;
  color: rgba(255, 213, 217, 0.7);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(0.96rem, 1.45vw, 1.15rem);
  line-height: 1.45;
  font-style: italic;
  text-align: center;
}

.shelves-document-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(12px, 4vw, 42px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 35, 65, 0.16), transparent 36%),
    rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
}

.shelves-document-dialog {
  position: relative;
  width: min(820px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border: 1px solid rgba(255, 116, 126, 0.24);
  border-radius: 26px 22px 28px 20px;
  padding: clamp(28px, 5vw, 50px) clamp(20px, 5vw, 54px) clamp(72px, 8vw, 88px);
  color: rgba(255, 232, 222, 0.92);
  background:
    linear-gradient(rgba(255, 116, 126, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(255, 35, 65, 0.12), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(231, 195, 106, 0.08), transparent 26%),
    linear-gradient(135deg, #2b1814, #1a0b0b 54%, #0d0607);
  background-size: 100% 21px, auto, auto, auto;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.62),
    0 0 40px rgba(255, 35, 65, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 52px rgba(0, 0, 0, 0.34);
  outline: none;
  scrollbar-color: rgba(255, 116, 126, 0.42) rgba(0, 0, 0, 0.24);
}

.shelves-document-dialog::before,
.shelves-document-dialog::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 22px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(255, 116, 126, 0.18), rgba(0, 0, 0, 0.24)),
    rgba(70, 22, 18, 0.5);
  filter: blur(0.1px);
  pointer-events: none;
}

.shelves-document-dialog::before {
  top: -10px;
}

.shelves-document-dialog::after {
  bottom: -10px;
}

.shelves-document-dialog__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  min-height: 38px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(255, 232, 222, 0.94);
  background: rgba(0, 0, 0, 0.26);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.shelves-document-dialog__close:hover,
.shelves-document-dialog__close:focus-visible {
  outline: none;
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.2);
}

.shelves-document-dialog > .archive-entry__stamp {
  margin: 0;
  padding-right: 96px;
  color: rgba(255, 182, 175, 0.68);
  font-family: var(--logo-font);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.shelves-document-dialog h3 {
  margin: 0.45rem 0 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--heading-font);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  text-shadow: 0 0 18px rgba(255, 35, 65, 0.18);
}

.shelves-document-dialog__subtitle {
  max-width: 64ch;
  margin: 0.65rem 0 0;
  color: rgba(255, 232, 222, 0.74);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.shelves-document-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.3rem 0 1rem;
}

.shelves-document-meta div {
  border: 1px solid rgba(255, 116, 126, 0.16);
  border-radius: 16px 14px 18px 13px;
  padding: 0.68rem 0.78rem;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.shelves-document-meta dt {
  color: rgba(255, 182, 175, 0.68);
  font-family: var(--logo-font);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shelves-document-meta dd {
  margin: 0.25rem 0 0;
  color: rgba(255, 232, 222, 0.88);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.02rem;
}

.shelves-document-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
}

.shelves-document-chips span {
  border: 1px solid rgba(255, 116, 126, 0.2);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  color: rgba(255, 232, 222, 0.78);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.84rem;
}

.shelves-document-body {
  display: grid;
  gap: 1rem;
  max-width: 68ch;
  margin-top: 1.35rem;
  color: rgba(255, 232, 222, 0.86);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  line-height: 1.75;
}

.shelves-document-body p {
  margin: 0;
}

body.shelves-page .shelves-read-modal,
body.shelves-page .shelves-details-modal,
body.shelves-page .shelves-recent-modal,
body.shelves-page .shelves-notable-modal,
body.shelves-page .shelves-research-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(1rem, 3vw, 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.shelves-page .shelves-read-modal[hidden],
body.shelves-page .shelves-details-modal[hidden],
body.shelves-page .shelves-recent-modal[hidden],
body.shelves-page .shelves-notable-modal[hidden],
body.shelves-page .shelves-research-modal[hidden] {
  display: none;
}

body.shelves-page .shelves-modal-backdrop,
body.shelves-page .shelves-recent-modal__backdrop,
body.shelves-page .shelves-notable-modal__backdrop,
body.shelves-page .shelves-research-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: rgba(5, 0, 4, 0.76);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

body.shelves-page .shelves-read-dialog,
body.shelves-page .shelves-details-dialog,
body.shelves-page .shelves-recent-dialog,
body.shelves-page .shelves-notable-dialog,
body.shelves-page .shelves-research-dialog {
  position: relative;
  z-index: 1;
  color: rgba(255, 232, 218, 0.9);
  outline: none;
  scrollbar-color: rgba(255, 116, 126, 0.42) rgba(0, 0, 0, 0.24);
}

body.shelves-page .shelves-recent-dialog,
body.shelves-page .shelves-notable-dialog,
body.shelves-page .shelves-research-dialog {
  display: grid;
  gap: 1rem;
  width: min(760px, calc(100vw - 2rem));
  max-height: min(760px, calc(100dvh - 2rem));
  overflow-y: auto;
  border: 1px solid rgba(255, 80, 100, 0.24);
  border-radius: 24px;
  padding: clamp(1.35rem, 4vw, 2.25rem);
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 64, 96, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(31, 5, 12, 0.96), rgba(8, 0, 4, 0.98));
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.56);
}

body.shelves-page .shelves-recent-dialog__header,
body.shelves-page .shelves-notable-dialog__header,
body.shelves-page .shelves-research-dialog__header {
  display: grid;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(255, 70, 95, 0.28);
  padding: 0 5.5rem 0.9rem 0;
}

body.shelves-page .shelves-recent-dialog__header p,
body.shelves-page .shelves-notable-dialog__header p,
body.shelves-page .shelves-research-dialog__header p {
  margin: 0;
  color: rgba(255, 130, 150, 0.82);
  font-family: var(--logo-font);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.shelves-page .shelves-recent-dialog__header h2,
body.shelves-page .shelves-notable-dialog__header h2,
body.shelves-page .shelves-research-dialog__header h2 {
  margin: 0;
  color: #fff1d6;
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 0.96;
}

body.shelves-page .shelves-recent-dialog__list,
body.shelves-page .shelves-notable-dialog__list {
  display: grid;
  gap: 0.6rem;
}

body.shelves-page .shelves-notable-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  border-top: 1px solid rgba(255, 70, 95, 0.14);
  padding-top: 0.85rem;
  color: rgba(255, 213, 217, 0.72);
  font-size: 0.84rem;
}

body.shelves-page .shelves-notable-pagination button {
  min-height: 34px;
  border: 1px solid rgba(255, 100, 120, 0.24);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: rgba(255, 241, 214, 0.88);
  background: rgba(80, 4, 16, 0.5);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

body.shelves-page .shelves-notable-pagination button:hover,
body.shelves-page .shelves-notable-pagination button:focus-visible {
  outline: none;
  border-color: rgba(255, 130, 150, 0.46);
  background: rgba(112, 7, 24, 0.62);
}

body.shelves-page .shelves-notable-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

body.shelves-page .shelves-read-dialog {
  width: min(780px, calc(100vw - 2rem));
  max-height: min(780px, calc(100dvh - 2rem));
  overflow-y: auto;
  border-radius: 26px;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  background:
    linear-gradient(180deg, rgba(42, 9, 12, 0.96), rgba(14, 2, 5, 0.98));
  border: 1px solid rgba(255, 80, 100, 0.24);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.56);
}

body.shelves-page .shelves-details-dialog {
  width: min(680px, calc(100vw - 2rem));
  max-height: min(720px, calc(100dvh - 2rem));
  overflow-y: auto;
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 64, 96, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(32, 4, 10, 0.96), rgba(8, 0, 4, 0.98));
  border: 1px solid rgba(255, 80, 100, 0.24);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.56);
}

body.shelves-page .shelves-modal-close,
body.shelves-page .shelves-recent-modal__close,
body.shelves-page .shelves-notable-modal__close,
body.shelves-page .shelves-research-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 100, 120, 0.32);
  background: rgba(14, 0, 5, 0.72);
  color: #fff1d6;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

body.shelves-page .shelves-modal-close:hover,
body.shelves-page .shelves-modal-close:focus-visible,
body.shelves-page .shelves-recent-modal__close:hover,
body.shelves-page .shelves-recent-modal__close:focus-visible,
body.shelves-page .shelves-notable-modal__close:hover,
body.shelves-page .shelves-notable-modal__close:focus-visible,
body.shelves-page .shelves-research-modal__close:hover,
body.shelves-page .shelves-research-modal__close:focus-visible {
  outline: none;
  border-color: rgba(255, 130, 150, 0.52);
  color: #ffffff;
}

body.shelves-page .shelves-modal-kicker {
  margin: 0 5.8rem 0.65rem 0;
  color: rgba(255, 130, 150, 0.85);
  font-family: var(--logo-font);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.shelves-page .shelves-read-title,
body.shelves-page .shelves-details-title {
  margin: 0;
  color: #fff1d6;
  font-family: var(--heading-font);
  line-height: 0.96;
}

body.shelves-page .shelves-read-title {
  max-width: 680px;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

body.shelves-page .shelves-details-title {
  max-width: 600px;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

body.shelves-page .shelves-read-author {
  margin: 0.7rem 0 0;
  color: rgba(255, 226, 218, 0.76);
  font-size: 0.96rem;
}

body.shelves-page .shelves-read-body {
  margin-top: 1.5rem;
  max-width: 680px;
  color: rgba(255, 232, 218, 0.9);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.78;
}

body.shelves-page .shelves-read-body p {
  margin: 0 0 1.1rem;
}

body.shelves-page .shelves-read-body p:last-child {
  margin-bottom: 0;
}

body.shelves-page .shelves-read-save-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 70, 95, 0.14);
  padding-top: 1rem;
}

body.shelves-page .shelves-read-save-footer .shelves-saved-documents-notice {
  flex: 1 1 220px;
}

body.shelves-page .shelves-read-footer {
  margin: 1.5rem 0 0;
  color: rgba(255, 130, 150, 0.82);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.shelves-page .shelves-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

body.shelves-page .shelves-details-grid div {
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(8, 0, 4, 0.48);
  border: 1px solid rgba(255, 80, 100, 0.16);
}

body.shelves-page .shelves-details-grid dt {
  color: rgba(255, 130, 150, 0.85);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

body.shelves-page .shelves-details-grid dd {
  margin: 0;
  color: #fff1d6;
}

body.shelves-page .shelves-details-summary {
  max-width: 58ch;
  margin: 0;
  color: rgba(255, 232, 218, 0.78);
  line-height: 1.55;
}

body.shelves-page .shelves-aid-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(1rem, 3vw, 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.shelves-page .shelves-aid-modal[hidden] {
  display: none;
}

body.shelves-page .shelves-aid-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: rgba(5, 0, 4, 0.76);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

body.shelves-page .shelves-aid-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 2rem));
  max-height: min(760px, calc(100dvh - 2rem));
  overflow-y: auto;
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  color: rgba(255, 232, 218, 0.9);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 64, 96, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(32, 4, 10, 0.96), rgba(8, 0, 4, 0.98));
  border: 1px solid rgba(255, 80, 100, 0.24);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.56);
  outline: none;
  scrollbar-color: rgba(255, 116, 126, 0.42) rgba(0, 0, 0, 0.24);
}

body.shelves-page .shelves-aid-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 100, 120, 0.32);
  background: rgba(14, 0, 5, 0.72);
  color: #fff1d6;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  box-shadow: none;
  font: inherit;
  font-weight: 800;
}

body.shelves-page .shelves-aid-close:hover,
body.shelves-page .shelves-aid-close:focus-visible {
  outline: none;
  border-color: rgba(255, 130, 150, 0.52);
  color: #ffffff;
}

body.shelves-page .shelves-aid-dialog h2 {
  margin: 0 5rem 0.5rem 0;
  color: #fff1d6;
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 0.96;
}

body.shelves-page .shelves-aid-dialog p {
  max-width: 62ch;
  margin: 0.65rem 0 0;
  color: rgba(255, 232, 218, 0.82);
  line-height: 1.55;
}

body.shelves-page .shelves-aid-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

body.shelves-page .shelves-aid-list-item {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(90px, 120px) 1fr;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 80, 100, 0.16);
  background: transparent;
  color: #fff1d6;
  cursor: pointer;
  box-shadow: none;
}

body.shelves-page .shelves-aid-list-item:hover,
body.shelves-page .shelves-aid-list-item:focus-visible {
  outline: none;
  color: #ffd6c2;
}

body.shelves-page .shelves-aid-mark {
  color: rgba(255, 110, 135, 0.92);
  font-weight: 700;
  letter-spacing: 0.08em;
}

body.shelves-page .shelves-aid-title {
  display: block;
  font-weight: 700;
}

body.shelves-page .shelves-aid-meta {
  display: block;
  margin-top: 0.2rem;
  color: rgba(255, 232, 218, 0.62);
  font-size: 0.86rem;
}

body.shelves-page .shelves-aid-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 1rem;
  color: rgba(255, 232, 218, 0.72);
  font-size: 0.86rem;
}

body.shelves-page .shelves-aid-pagination button {
  min-height: 34px;
  border: 1px solid rgba(255, 100, 120, 0.24);
  border-radius: 12px;
  padding: 0.4rem 0.75rem;
  color: #fff1d6;
  background: rgba(14, 0, 5, 0.58);
  cursor: pointer;
}

body.shelves-page .shelves-aid-pagination button:hover,
body.shelves-page .shelves-aid-pagination button:focus-visible {
  outline: none;
  border-color: rgba(255, 130, 150, 0.5);
  color: #ffffff;
}

body.shelves-page .shelves-aid-pagination button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

body.shelves-page .shelves-aid-empty {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 80, 100, 0.16);
}

body.shelves-page .shelves-aid-empty strong {
  color: #fff1d6;
}

body.shelves-page .shelves-aid-footer {
  margin-top: 1.35rem;
  color: rgba(255, 130, 150, 0.82);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

body.shelves-page button,
body.shelves-page .shelves-btn,
body.shelves-page .shelves-button,
body.shelves-page .shelves-read-btn,
body.shelves-page .shelves-details-btn,
body.shelves-page .shelves-card-link,
body.shelves-page .shelves-filter-chip {
  box-shadow: none !important;
  text-shadow: none !important;
}

body.shelves-page .shelves-btn,
body.shelves-page .shelves-button,
body.shelves-page .shelves-read-btn,
body.shelves-page .shelves-details-btn,
body.shelves-page .shelves-filter-chip {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 238, 220, 0.78);
  box-shadow: none;
}

body.shelves-page .shelves-read-btn {
  border: 1px solid rgba(255, 116, 126, 0.32);
  border-radius: 12px;
  padding: 0.44rem 0.84rem;
  background: rgba(255, 244, 216, 0.03);
  position: relative;
}

body.shelves-page .shelves-reading-desk .shelves-read-btn {
  background: rgba(74, 11, 24, 0.62);
}

body.shelves-page .shelves-read-btn:hover,
body.shelves-page .shelves-read-btn:focus-visible {
  border-color: rgba(255, 130, 145, 0.55);
  background: rgba(255, 244, 216, 0.06);
}

body.shelves-page .shelves-reading-desk .shelves-read-btn:hover,
body.shelves-page .shelves-reading-desk .shelves-read-btn:focus-visible {
  background: rgba(95, 16, 31, 0.82);
}

body.shelves-page .shelves-btn:hover,
body.shelves-page .shelves-button:hover,
body.shelves-page .shelves-details-btn:hover {
  border: 0;
  color: #fff6e6;
  text-shadow: 0 0 14px rgba(255, 35, 77, 0.5);
  box-shadow: none;
  transform: none;
}

body.shelves-page .shelves-read-btn:hover,
body.shelves-page .shelves-read-btn:focus-visible {
  color: #fff6e6;
  text-shadow: 0 0 14px rgba(255, 35, 77, 0.5);
  border: 1px solid rgba(255, 130, 145, 0.55);
  background: rgba(255, 244, 216, 0.06);
  box-shadow: none;
  transform: none;
}

body.shelves-page .shelves-filter-chip.is-active,
body.shelves-page .shelves-filter-chip.active,
body.shelves-page .shelves-filter-chip[aria-pressed="true"] {
  color: #fff6e6;
  text-shadow: 0 0 14px rgba(255, 35, 77, 0.5);
  box-shadow: none;
}

body.shelves-page .shelves-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  color: #f4e7d3;
  text-align: center;
}

body.shelves-page .shelves-category-card::before {
  content: "";
  width: 38px;
  height: 38px;
  margin-bottom: -0.1rem;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  background-color: #ff3f62;
  opacity: 0.95;
  --shelves-browse-icon: none;
}

body.shelves-page .shelves-category-card[data-shelves-browse="journals"]::before {
  -webkit-mask-image: url("../assets/icons/symbols/journal1.svg");
  mask-image: url("../assets/icons/symbols/journal1.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="manuscripts"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/scroll.svg");
  mask-image: url("../assets/icons/noctis_icons/scroll.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="letters"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/feather.svg");
  mask-image: url("../assets/icons/noctis_icons/feather.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="cryptic-codes"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/cryptic.svg");
  mask-image: url("../assets/icons/noctis_icons/cryptic.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="cryptic_codes"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/cryptic.svg");
  mask-image: url("../assets/icons/noctis_icons/cryptic.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="fragments"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/scroll-quil.svg");
  mask-image: url("../assets/icons/noctis_icons/scroll-quil.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="unstable_texts"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/scroll-quil.svg");
  mask-image: url("../assets/icons/noctis_icons/scroll-quil.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="the-veil"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/veil.svg");
  mask-image: url("../assets/icons/noctis_icons/veil.svg");
}

body.shelves-page .shelves-category-card[data-shelves-browse="veil_lore"]::before {
  -webkit-mask-image: url("../assets/icons/noctis_icons/veil.svg");
  mask-image: url("../assets/icons/noctis_icons/veil.svg");
}

body.shelves-page .shelves-category-card h3,
body.shelves-page .shelves-category-card span {
  color: #f4e7d3;
  font-size: clamp(1.05rem, 1.25vw, 1.28rem);
}

body.shelves-page .shelves-category-card p,
body.shelves-page .shelves-category-description {
  color: #f4e7d3;
  font-size: 0.78rem;
  line-height: 1.32;
  font-weight: 400;
  margin: 0;
}

body.shelves-page .shelves-category-card__footer {
  display: grid;
  justify-items: center;
  width: 100%;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.65rem;
}

body.shelves-page .shelves-category-meta,
body.shelves-page .shelves-category-count {
  width: 100%;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(205, 45, 62, 0.42);
  color: #f7dfc2;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.shelves-page .shelves-category-card__divider {
  width: min(68%, 11rem);
  height: 1px;
  background: transparent;
  border-top: 1px solid rgba(205, 45, 62, 0.42);
}

body.shelves-page .shelves-category-card__count {
  color: #f7dfc2;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-align: center;
}

body.shelves-page .shelves-category-card__count.is-empty {
  opacity: 0.48;
}

body.shelves-page .shelves-category-card.is-active {
  border-color: rgba(255, 92, 116, 0.42);
}

body.shelves-page .shelves-category-card__count span,
body.shelves-page .shelves-category-count .count,
body.shelves-page .shelves-category-count span {
  color: #f7dfc2;
}

body.shelves-page .shelves-category-count .arrow,
body.shelves-page .shelves-category-arrow {
  color: #f7dfc2;
  opacity: 0.86;
}

body.shelves-page .shelves-category-card .shelves-category-card__count,
body.shelves-page .shelves-category-count {
  font-size: 1rem;
}

body.shelves-page .shelves-category-card .shelves-category-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 0.55rem;
  color: #ff3f62;
  opacity: 0.95;
}

body.shelves-page .shelves-category-card .shelves-category-icon svg,
body.shelves-page .shelves-category-card .shelves-category-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

body.shelves-page .shelves-category-card .shelves-category-icon svg {
  stroke: #ff3f62;
  fill: none;
}

body.shelves-page .shelves-category-card .shelves-category-icon svg [fill] {
  fill: #ff3f62;
}

body.shelves-page .shelves-card,
body.shelves-page .shelves-bottom-card,
body.shelves-page .shelves-reading-desk,
body.shelves-page .shelves-search-panel,
body.shelves-page .shelves-hero {
  border-radius: 24px;
}

body.shelves-page .shelves-bottom-card {
  border-color: rgba(255, 75, 95, 0.18);
}

body.shelves-page .shelves-card,
body.shelves-page .shelves-bottom-card,
body.shelves-page .shelves-reading-desk,
body.shelves-page .shelves-search-panel {
  min-height: unset;
  height: auto;
}

body.shelves-page .shelves-bottom-card {
  padding: clamp(1rem, 1.8vw, 1.45rem);
}


.shelves-document-body::after {
  content: "";
  position: sticky;
  display: block;
  width: 48px;
  aspect-ratio: 1;
  margin-top: 1.25rem;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 213, 217, 0.32) 0 16%, transparent 17%),
    repeating-conic-gradient(from 12deg, transparent 0 20deg, rgba(0, 0, 0, 0.2) 21deg 24deg),
    rgba(120, 18, 30, 0.64);
  box-shadow:
    0 0 22px rgba(255, 35, 65, 0.22),
    inset 0 0 0 1px rgba(255, 213, 217, 0.12);
  pointer-events: none;
}

body.shelves-page .shelves-bottom-card h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.7rem);
  line-height: 1.05;
}

body.shelves-page .shelves-bottom-card p,
body.shelves-page .shelves-document-card p {
  font-size: 0.92rem;
  line-height: 1.45;
}

body.shelves-page .shelves-section-kicker,
body.shelves-page .shelves-card-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

body.shelves-page .shelves-hero,
body.shelves-page .shelves-reading-desk,
body.shelves-page .shelves-search-panel {
  border-radius: 28px;
}

body.shelves-page .shelves-bottom-card {
  border-radius: 22px;
}

body.shelves-page .shelves-card,
body.shelves-page .shelves-reading-desk {
  min-height: unset;
  height: auto;
}

@media (max-width: 1100px) {
  body.shelves-page .shelves-category-grid {
    display: flex;
    overflow-x: auto;
    gap: 0.8rem;
    padding-bottom: 0.5rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #ff2341 rgba(22, 3, 9, 0.55);
  }

  body.shelves-page .shelves-category-grid::-webkit-scrollbar {
    height: 8px;
  }

  body.shelves-page .shelves-category-grid::-webkit-scrollbar-track {
    background: rgba(22, 3, 9, 0.55);
    border-radius: 999px;
  }

  body.shelves-page .shelves-category-grid::-webkit-scrollbar-thumb {
    background: #ff2341;
    border-radius: 999px;
  }

  body.shelves-page .shelves-category-grid::-webkit-scrollbar-thumb:hover {
    background: #ff5270;
  }

  body.shelves-page .shelves-category-grid {
    justify-content: start;
    min-width: 0;
  }

  .shelves-page-shell {
    width: min(100% - 1.25rem, 720px);
    padding-top: clamp(1rem, 4vw, 1.5rem);
  }

  .shelves-hero {
    min-height: 300px;
  }

  .shelves-search-panel,
  .shelves-reading-desk {
    grid-template-columns: 1fr;
  }

  body.shelves-page .shelves-bottom-grid {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #ff2341 rgba(22, 3, 9, 0.55);
  }

  body.shelves-page .shelves-bottom-grid::-webkit-scrollbar {
    height: 8px;
  }

  body.shelves-page .shelves-bottom-grid::-webkit-scrollbar-track {
    background: rgba(22, 3, 9, 0.55);
    border-radius: 999px;
  }

  body.shelves-page .shelves-bottom-grid::-webkit-scrollbar-thumb {
    background: #ff2341;
    border-radius: 999px;
  }

  body.shelves-page .shelves-bottom-grid::-webkit-scrollbar-thumb:hover {
    background: #ff5270;
  }

  .shelves-category-card {
    flex: 0 0 min(150px, 82vw);
    scroll-snap-align: start;
    min-height: 185px;
  }

  body.shelves-page .shelves-bottom-panel {
    flex: 0 0 min(300px, 84vw);
    min-width: min(300px, 84vw);
    scroll-snap-align: start;
  }

  .shelves-document-meta {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  body.shelves-page .shelves-filter-list {
    gap: clamp(0.9rem, 2vw, 1.35rem);
  }

  body.shelves-page .shelves-filter-chip {
    padding: 0.62rem 0.22rem 0.82rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 700px) {
  body.shelves-page .shelves-reading-desk,
  body.shelves-page .shelves-reading-desk:not(.is-empty) {
    min-height: auto;
    background-position: center right;
  }

  body.shelves-page .shelves-reading-desk:not(.is-empty)::before {
    background:
      linear-gradient(
        180deg,
        rgba(8, 0, 4, 0.72) 0%,
        rgba(8, 0, 4, 0.92) 100%
      );
  }

  body.shelves-page .shelves-reading-content,
  body.shelves-page .shelves-reading-desk__copy {
    width: 100%;
    max-width: none;
    padding: 1.35rem;
  }

  body.shelves-page .shelves-reading-title,
  body.shelves-page .shelves-reading-desk h2,
  body.shelves-page .shelves-reading-desk h3 {
    font-size: clamp(2rem, 11vw, 3rem);
    max-width: 100%;
  }

  body.shelves-page .shelves-reading-controls,
  body.shelves-page .shelves-reading-desk__controls {
    position: relative;
    right: auto;
    bottom: auto;
    justify-content: flex-start;
    padding: 0 1.35rem 1.25rem;
    margin-top: 0.5rem;
  }

  body.shelves-page .shelves-search-panel {
    padding: 1.15rem;
    border-radius: 22px;
  }

  body.shelves-page .shelves-search-field,
  body.shelves-page .shelves-search-panel input,
  body.shelves-page .shelves-search-input {
    width: 100%;
  }

  body.shelves-page .shelves-filter-scroll {
    margin-inline: 0;
  }

  body.shelves-page .shelves-search-status,
  body.shelves-page .shelves-search-message {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.shelves-page .shelves-filter-list {
    gap: 0.9rem;
  }

  body.shelves-page .shelves-filter-chip {
    padding: 0.58rem 0.2rem 0.78rem;
    font-size: 0.78rem;
  }

  body.shelves-page .shelves-filter-hint {
    display: block;
    margin: 0.35rem 0 0;
    color: rgba(255, 210, 190, 0.58);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  body.shelves-page .shelves-filter-wrap::after {
    display: block;
    opacity: 1;
  }
}

@media (max-width: 700px) {
  body.shelves-page .shelves-filter-arrow,
  body.shelves-page .shelves-filter-prev,
  body.shelves-page .shelves-filter-next,
  body.shelves-page .shelves-filter-nav--prev,
  body.shelves-page .shelves-filter-nav--next {
    display: none;
  }
}

@media (max-width: 640px) {
  body.shelves-page .shelves-read-dialog,
  body.shelves-page .shelves-details-dialog,
  body.shelves-page .shelves-recent-dialog,
  body.shelves-page .shelves-notable-dialog,
  body.shelves-page .shelves-research-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 20px;
    padding: 1.25rem;
  }

  body.shelves-page .shelves-recent-dialog__header,
  body.shelves-page .shelves-notable-dialog__header,
  body.shelves-page .shelves-research-dialog__header {
    padding-right: 4.8rem;
  }

  body.shelves-page .shelves-modal-kicker {
    margin-right: 5rem;
  }

  body.shelves-page .shelves-details-grid {
    grid-template-columns: 1fr;
  }

  body.shelves-page .shelves-recently-read-header,
  body.shelves-page .shelves-notable-header {
    align-items: flex-start;
  }

  body.shelves-page .shelves-recent-view-all,
  body.shelves-page .shelves-notable-view-all {
    padding-top: 0.18rem;
  }

  body.shelves-page .shelves-recent-row__copy strong,
  body.shelves-page .shelves-recent-row__copy span,
  body.shelves-page .shelves-recent-row__copy em {
    white-space: normal;
  }

  body.shelves-page .shelves-research-trails__header {
    align-items: flex-start;
  }

  body.shelves-page .shelves-research-trails__action {
    padding-top: 0.18rem;
  }

  body.shelves-page .shelves-notable-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.45rem;
  }

  body.shelves-page .shelves-notable-row__remove,
  body.shelves-page .shelves-save-document-btn {
    width: 100%;
  }

  body.shelves-page .shelves-notable-row__main {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 0.45rem;
  }

  body.shelves-page .shelves-notable-row__thumb,
  body.shelves-page .shelves-notable-row__mark {
    width: 36px;
    height: 42px;
  }

  body.shelves-page .shelves-notable-row__copy strong,
  body.shelves-page .shelves-notable-row__copy span,
  body.shelves-page .shelves-notable-row__copy em {
    white-space: normal;
  }

  body.shelves-page .shelves-aid-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 20px;
    padding: 1.25rem;
  }

  body.shelves-page .shelves-aid-list-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  body.shelves-page .shelves-aid-pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .shelves-document-modal {
    align-items: end;
    padding: 10px;
  }

  .shelves-document-dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    border-radius: 22px 20px 18px 18px;
    padding: 52px 18px 72px;
  }

  .shelves-document-dialog > .archive-entry__stamp {
    padding-right: 0;
  }

  .shelves-document-dialog__close {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .shelves-reading-desk__actions button {
    width: 100%;
  }
}

.archive-room-panel--gallery {
  gap: clamp(16px, 3vw, 26px);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 35, 65, 0.14), transparent 36%),
    radial-gradient(circle at 84% 20%, rgba(231, 195, 106, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(34, 2, 12, 0.76), rgba(6, 0, 4, 0.86));
  background-size: auto;
}

.archive-gallery-header {
  display: grid;
  gap: 7px;
  max-width: 760px;
}

.archive-gallery-header h3 {
  margin: 2px 0 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  line-height: 0.98;
}

.archive-gallery-header p:not(.archive-entry__stamp) {
  max-width: 66ch;
  margin: 0;
  color: rgba(255, 213, 217, 0.76);
  line-height: 1.6;
}

.archive-gallery-viewer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2.4vw, 22px);
  min-width: 0;
}

.archive-gallery-viewer__nav {
  display: grid;
  place-items: center;
  width: clamp(42px, 5vw, 54px);
  height: clamp(42px, 5vw, 54px);
  border: 0;
  border-radius: 0;
  color: rgba(255, 226, 218, 0.92);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 0;
  line-height: 1;
  transition:
    color 220ms ease,
    filter 220ms ease,
    transform 220ms ease;
}

.archive-gallery-viewer__nav::before {
  content: "";
  width: 18px;
  height: 18px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.archive-gallery-viewer__nav[data-gallery-record-nav="previous"]::before {
  transform: rotate(-135deg);
}

.archive-gallery-viewer__nav[data-gallery-record-nav="next"]::before {
  transform: rotate(45deg);
}

.archive-gallery-viewer__nav:hover,
.archive-gallery-viewer__nav:focus-visible {
  color: rgba(255, 246, 238, 0.98);
  filter: drop-shadow(0 0 8px rgba(255, 35, 65, 0.46));
  outline: none;
  transform: translateY(-1px);
}

.archive-gallery-record {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0;
  animation: archiveGalleryRecordIn 220ms ease both;
}

.archive-gallery-record__image-button {
  display: grid;
  place-items: center;
  width: min(100%, 760px);
  max-width: min(90vw, 760px);
  border: 1px solid rgba(255, 116, 126, 0.2);
  border-radius: 18px;
  padding: clamp(10px, 2vw, 16px);
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 35, 65, 0.11), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 48%),
    rgba(4, 0, 3, 0.58);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.32),
    0 0 22px rgba(255, 35, 65, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: zoom-in;
}

.archive-gallery-record__image-button img {
  display: block;
  width: 100%;
  max-height: min(64vh, 560px);
  object-fit: contain;
  object-position: center;
  filter: brightness(1.05) contrast(1.07) saturate(1.08);
}

.archive-gallery-record__image-button:hover,
.archive-gallery-record__image-button:focus-visible {
  border-color: rgba(255, 116, 126, 0.44);
  outline: none;
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(255, 35, 65, 0.16);
}

.archive-gallery-record figcaption {
  display: grid;
  justify-items: center;
  gap: 5px;
  max-width: 48rem;
  text-align: center;
}

.archive-gallery-record figcaption span,
.archive-gallery-record figcaption em {
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archive-gallery-record figcaption strong {
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 0.98;
}

.archive-gallery-record figcaption p {
  margin: 0;
  color: rgba(255, 213, 217, 0.72);
  line-height: 1.55;
}

.gallery-page-shell {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  width: min(1480px, calc(100% - clamp(1.5rem, 5vw, 5rem)));
  max-width: 100%;
  overflow-x: clip;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(4rem, 8vh, 6rem);
  color: rgba(255, 232, 218, 0.9);
}

.gallery-hero {
  position: relative;
  min-height: clamp(340px, 30vw, 430px);
  display: grid;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 70, 95, 0.16);
  border-radius: 30px;
  padding: clamp(2rem, 5vw, 4rem);
  background:
    linear-gradient(90deg, rgba(5, 0, 4, 0.92) 0%, rgba(18, 0, 7, 0.78) 34%, rgba(35, 0, 10, 0.28) 64%, rgba(35, 0, 10, 0.08) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.5) 100%),
    url("../assets/images/background _images/gallery_title_bg.png") center right / cover no-repeat;
  box-shadow: none;
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 0, 4, 0.18) 100%);
  pointer-events: none;
}

.gallery-hero__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.68rem;
  width: min(590px, 100%);
}

.gallery-hero__copy .archive-entry__stamp {
  color: rgba(255, 214, 198, 0.78);
  letter-spacing: 0.18em;
}

.gallery-hero__copy h1 {
  margin: 0;
  max-width: 100%;
  color: rgba(255, 244, 216, 0.98);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(4.6rem, 8.8vw, 8rem);
  line-height: 0.82;
  overflow-wrap: anywhere;
  text-shadow: none;
}

.gallery-hero__copy p:not(.archive-entry__stamp) {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 226, 218, 0.88);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.35;
}

.gallery-hero__copy em {
  position: relative;
  margin-top: 0.75rem;
  padding-top: 0.95rem;
  color: rgba(255, 204, 194, 0.76);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.4;
}

.gallery-hero__copy em::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(110px, 40%);
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 70, 95, 0.56), transparent);
}

.gallery-main {
  display: grid;
  gap: clamp(0.8rem, 1.5vw, 1rem);
  min-width: 0;
}

.gallery-panel,
.gallery-bottom-card,
.gallery-quote-strip {
  border: 1px solid rgba(255, 70, 95, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 35, 65, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(34, 4, 12, 0.72), rgba(8, 0, 5, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.045),
    0 18px 45px rgba(0, 0, 0, 0.22);
}

.gallery-panel {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1rem, 2vw, 1.35rem);
}

.gallery-panel h2,
.gallery-card-heading h3,
.gallery-section-heading p,
.gallery-records-header h2 {
  margin: 0;
  color: rgba(255, 241, 214, 0.94);
}

.gallery-panel h2,
.gallery-section-heading p,
.gallery-card-heading h3 {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-category-list,
.gallery-quick-links,
.gallery-mini-list {
  display: grid;
  gap: 0.45rem;
}

.gallery-mini-row-wrap {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
  min-width: 0;
}

.gallery-mini-row-wrap .gallery-mini-row {
  flex: 1 1 auto;
  min-width: 0;
}

.gallery-category-row,
.gallery-filter-chip,
.gallery-quick-link,
.gallery-mini-row {
  width: 100%;
  border: 1px solid transparent;
  color: inherit;
  background: rgba(10, 0, 5, 0.34);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.gallery-category-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  padding: 0.48rem 0.58rem;
}

.gallery-filter-section {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.4vw, 1rem);
  min-width: 0;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255, 70, 95, 0.18);
  border-radius: 18px;
  padding: 0.55rem;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 35, 65, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(24, 2, 9, 0.82), rgba(8, 0, 5, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.045),
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.gallery-filter-section__filters {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.gallery-filter-track {
  display: flex;
  gap: clamp(0.42rem, 0.8vw, 0.6rem);
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.gallery-filter-track::-webkit-scrollbar {
  display: none;
}

.gallery-filter-track .gallery-filter-chip:nth-child(n + 6) {
  display: none;
}

.gallery-filter-chip {
  position: relative;
  width: auto;
  min-height: 36px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border-color: transparent;
  border-radius: 0;
  padding: 0.42rem 0.58rem 0.6rem;
  background: transparent;
  box-shadow: none;
  scroll-snap-align: start;
  white-space: nowrap;
}

.gallery-filter-chip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 70%;
  min-width: 2.25rem;
  max-width: 4.8rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 70, 100, 0.72), transparent);
  box-shadow: 0 0 10px rgba(217, 28, 63, 0.24);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.42);
  transform-origin: center;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.gallery-filter-chip:hover,
.gallery-filter-chip:focus-visible,
.gallery-filter-chip.is-active {
  color: rgba(255, 241, 214, 0.96);
  background: transparent;
  border-color: transparent;
  outline: none;
  text-shadow: 0 0 12px rgba(217, 28, 63, 0.26);
}

.gallery-filter-chip:hover::after,
.gallery-filter-chip:focus-visible::after,
.gallery-filter-chip.is-active::after {
  opacity: 0.9;
  transform: translateX(-50%) scaleX(1);
}

.gallery-category-row.is-active,
.gallery-category-row:hover,
.gallery-category-row:focus-visible {
  border-color: rgba(255, 80, 105, 0.32);
  background: rgba(115, 7, 24, 0.5);
  outline: none;
}

.gallery-filter-more {
  position: relative;
  display: grid;
  flex: 0 0 auto;
}

.gallery-filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
  min-width: max-content;
}

.gallery-filter-more__button,
.gallery-sort-control {
  min-height: 36px;
  border: 1px solid rgba(255, 70, 95, 0.16);
  border-radius: 999px;
  color: rgba(255, 232, 218, 0.86);
  background: rgba(10, 0, 5, 0.56);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.gallery-filter-more__button {
  padding: 0.42rem 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.gallery-filter-more__button::after,
.gallery-sort-control::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.gallery-filter-more__button:hover,
.gallery-filter-more__button:focus-visible,
.gallery-filter-more.is-open .gallery-filter-more__button,
.gallery-sort-control:focus-within {
  outline: none;
  border-color: rgba(255, 80, 105, 0.34);
  background: rgba(82, 5, 18, 0.5);
}

.gallery-filter-more__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 10;
  display: none;
  min-width: 210px;
  border: 1px solid rgba(255, 70, 95, 0.22);
  border-radius: 16px;
  padding: 0.45rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 35, 65, 0.12), transparent 38%),
    rgba(8, 0, 5, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.gallery-filter-more.is-open .gallery-filter-more__menu {
  display: grid;
  gap: 0.35rem;
}

.gallery-filter-more__item {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.52rem 0.6rem;
  color: rgba(255, 232, 218, 0.9);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
}

.gallery-filter-more__item:hover,
.gallery-filter-more__item:focus-visible,
.gallery-filter-more__item.is-active {
  outline: none;
  border-color: rgba(255, 80, 105, 0.28);
  background: rgba(115, 7, 24, 0.44);
}

.gallery-filter-more__item .gallery-category-row__icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.gallery-filter-more__item span:not(.gallery-category-row__icon) {
  min-width: 0;
}

.gallery-sort-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.28rem;
  padding: 0 0.72rem;
  white-space: nowrap;
}

.gallery-sort-control span {
  color: rgba(255, 180, 190, 0.74);
}

.gallery-sort-control select {
  max-width: 9.5rem;
  border: 0;
  color: rgba(255, 241, 214, 0.92);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  font-weight: 900;
  appearance: none;
}

.gallery-sort-control select:focus {
  outline: none;
}

.gallery-category-row__icon,
.gallery-quick-link__mark,
.gallery-mini-thumb {
  display: block;
  border: 1px solid rgba(255, 116, 126, 0.34);
  background:
    radial-gradient(circle, rgba(255, 70, 95, 0.5), transparent 58%),
    rgba(12, 0, 6, 0.7);
}

.gallery-category-row__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.gallery-mini-thumb {
  overflow: hidden;
}

.gallery-mini-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.gallery-filter-chip .gallery-category-row__icon {
  width: 13px;
  height: 13px;
}

.gallery-category-row span:not(.gallery-category-row__icon) {
  overflow: hidden;
  color: rgba(255, 232, 218, 0.88);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-filter-chip span:not(.gallery-category-row__icon) {
  color: rgba(255, 232, 218, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
}

.gallery-category-row strong,
.gallery-quick-link small {
  border: 1px solid rgba(255, 116, 126, 0.2);
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  color: rgba(255, 213, 217, 0.82);
  background: rgba(6, 0, 4, 0.42);
  font-size: 0.72rem;
}

.gallery-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 70, 95, 0.1);
}

.gallery-stat {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  padding: 0.95rem 0.75rem;
  background: rgba(16, 0, 7, 0.74);
  text-align: center;
}

.gallery-stat strong {
  color: rgba(255, 241, 214, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1;
}

.gallery-stat span,
.gallery-fragment-card p,
.gallery-panel--fragments > p,
.gallery-quick-link em,
.gallery-mini-row em {
  color: rgba(255, 213, 217, 0.7);
  font-style: normal;
  font-size: 0.8rem;
}

.gallery-fragment-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  border: 1px solid rgba(255, 70, 95, 0.16);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(91, 5, 20, 0.28);
}

.gallery-fragment-card__image {
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(rgba(12, 0, 7, 0.12), rgba(12, 0, 7, 0.44)),
    url("../assets/images/noctis/visual-records/lost-city.webp") center / cover no-repeat;
  box-shadow: 0 0 24px rgba(255, 35, 65, 0.18);
}

.gallery-fragment-card h3 {
  margin: 0 0 0.55rem;
  color: rgba(255, 241, 214, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: 1.08rem;
  line-height: 1.05;
}

.gallery-fragment-card p,
.gallery-panel--fragments > p {
  margin: 0;
}

.gallery-fragment-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.22rem;
  margin-bottom: 0.45rem;
}

.gallery-fragment-progress span {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 241, 214, 0.18);
}

.gallery-fragment-progress span:nth-child(-n + 3) {
  background: rgba(255, 70, 95, 0.82);
  box-shadow: 0 0 10px rgba(255, 35, 65, 0.24);
}

.gallery-fragment-button,
.gallery-featured-card__actions button:first-child,
.gallery-featured-card__meta button {
  min-height: 40px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 999px;
  padding: 0 1rem;
  color: rgba(255, 241, 214, 0.94);
  background: linear-gradient(135deg, rgba(116, 6, 24, 0.86), rgba(48, 2, 12, 0.78));
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
}

.gallery-quick-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  border-color: rgba(255, 70, 95, 0.12);
  border-radius: 14px;
  padding: 0.62rem 0.75rem;
}

.gallery-quick-link:hover,
.gallery-quick-link:focus-visible,
.gallery-mini-row:hover,
.gallery-mini-row:focus-visible {
  border-color: rgba(255, 70, 95, 0.28);
  background: rgba(36, 3, 12, 0.52);
  outline: none;
}

.gallery-quick-link__mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.gallery-quick-link strong,
.gallery-mini-row strong {
  display: block;
  overflow: hidden;
  color: rgba(255, 241, 214, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: 1rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-featured-record,
.gallery-records-section {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gallery-records-section {
  padding-top: clamp(0.1rem, 1vw, 0.4rem);
}

.gallery-section-heading,
.gallery-records-header,
.gallery-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.gallery-featured-controls,
.gallery-records-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.gallery-featured-controls span,
.gallery-records-tools span,
.gallery-mark-button,
.gallery-record-card__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 116, 126, 0.26);
  border-radius: 12px;
  background: rgba(8, 0, 4, 0.52);
}

.gallery-featured-controls span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 1px solid rgba(255, 241, 214, 0.8);
  border-right: 1px solid rgba(255, 241, 214, 0.8);
}

.gallery-featured-controls span:first-child::before {
  transform: rotate(-135deg);
}

.gallery-featured-controls span:last-child::before {
  transform: rotate(45deg);
}

.gallery-featured-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(260px, 0.8fr);
  grid-template-areas:
    "header header"
    "visual meta";
  width: 100%;
  min-width: 0;
  gap: clamp(0.55rem, 1vw, 0.75rem) clamp(1rem, 1.8vw, 1.35rem);
  overflow: hidden;
  border: 1px solid rgba(255, 70, 95, 0.24);
  border-radius: 16px;
  padding: clamp(0.75rem, 1.2vw, 1rem);
  background:
    radial-gradient(circle at 82% 4%, rgba(255, 35, 65, 0.12), transparent 34%),
    radial-gradient(circle at 6% 100%, rgba(116, 6, 24, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(22, 3, 9, 0.88), rgba(7, 0, 4, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 241, 214, 0.035) inset,
    0 18px 44px rgba(0, 0, 0, 0.28);
}

.gallery-featured-card__header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
}

.gallery-featured-card__label {
  margin: 0;
  color: rgba(255, 241, 214, 0.94);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.gallery-featured-card__controls {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.45rem;
  align-items: center;
}

.gallery-featured-card__visual {
  grid-area: visual;
  display: grid;
  align-content: start;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.gallery-featured-card__image {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: clamp(260px, 24vw, 315px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 70, 95, 0.18);
  border-radius: 0;
  background: #080004;
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.04),
    0 14px 26px rgba(0, 0, 0, 0.2);
}

.gallery-featured-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.94) contrast(1.04) saturate(1.02);
}

.gallery-featured-card__open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-featured-card__open:focus-visible {
  outline: 2px solid rgba(255, 100, 120, 0.72);
  outline-offset: -3px;
}

.gallery-featured-card::after {
  content: none;
}

.gallery-featured-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 0, 3, 0.02), rgba(5, 0, 3, 0.2));
  pointer-events: none;
}

.gallery-featured-card__nav {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid rgba(255, 116, 126, 0.26);
  border-radius: 999px;
  padding: 0;
  background: rgba(8, 0, 4, 0.48);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(166, 15, 29, 0.12);
}

.gallery-featured-card__nav:hover,
.gallery-featured-card__nav:focus-visible {
  border-color: rgba(255, 116, 126, 0.48);
  background: rgba(77, 7, 12, 0.52);
  box-shadow: 0 0 18px rgba(210, 31, 50, 0.22);
  outline: none;
}

.gallery-featured-card__nav:disabled {
  cursor: not-allowed;
  opacity: 0.3;
  box-shadow: none;
}

.gallery-featured-card__nav::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 1.5px solid rgba(255, 241, 214, 0.84);
  border-right: 1.5px solid rgba(255, 241, 214, 0.84);
}

.gallery-featured-card__nav--previous::before {
  transform: rotate(-135deg);
}

.gallery-featured-card__nav--next::before {
  transform: rotate(45deg);
}

.gallery-featured-card__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  min-height: 6px;
  padding-top: 0.05rem;
}

.gallery-featured-card__dots button,
.gallery-featured-card__dots span {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(143, 75, 86, 0.5);
  cursor: pointer;
}

.gallery-featured-card__dots button.is-active,
.gallery-featured-card__dots span.is-active {
  background: rgba(255, 70, 95, 0.9);
  box-shadow: 0 0 10px rgba(255, 35, 65, 0.26);
}

.gallery-featured-card__dots button:disabled {
  cursor: default;
}

.gallery-featured-card__meta {
  grid-area: meta;
  z-index: 1;
  display: grid;
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(0.75rem, 1vw, 0.95rem);
  width: 100%;
  min-width: 0;
  padding: clamp(0.35rem, 0.8vw, 0.65rem) 0 clamp(0.25rem, 0.6vw, 0.45rem) clamp(1rem, 1.7vw, 1.25rem);
  border-left: 1px solid rgba(255, 116, 126, 0.12);
  background: transparent;
}

.gallery-featured-card__summary {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  align-self: start;
  min-width: 0;
}

.gallery-featured-card__summary span {
  color: rgba(255, 130, 150, 0.74);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.gallery-featured-card__summary strong {
  color: rgba(255, 241, 214, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.1rem, 1.5vw, 1.42rem);
  font-weight: 600;
  line-height: 1.08;
  text-align: center;
}

.gallery-featured-card__summary p {
  margin: 0;
  color: rgba(255, 223, 218, 0.78);
  font-size: clamp(0.82rem, 0.95vw, 0.92rem);
  line-height: 1.62;
  text-align: left;
}

.gallery-featured-card__summary small {
  color: rgba(255, 213, 217, 0.58);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.gallery-featured-card__meta button {
  align-self: end;
  justify-self: stretch;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(116, 6, 24, 0.78), rgba(42, 2, 11, 0.86)),
    rgba(12, 0, 5, 0.88);
  box-shadow:
    0 0 0 1px rgba(255, 116, 126, 0.16) inset,
    0 0 16px rgba(166, 15, 29, 0.16);
}

.gallery-featured-card__meta button:hover,
.gallery-featured-card__meta button:focus-visible {
  box-shadow:
    0 0 0 1px rgba(255, 116, 126, 0.28) inset,
    0 0 22px rgba(210, 31, 50, 0.25);
  outline: none;
}

.gallery-featured-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.gallery-mark-button,
.gallery-record-card__mark {
  cursor: pointer;
}

.gallery-record-card__open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-record-card__open:focus-visible {
  outline: 2px solid rgba(255, 100, 120, 0.72);
  outline-offset: -3px;
}

.gallery-mark-button::before,
.gallery-record-card__mark::before {
  content: "";
  width: 10px;
  height: 14px;
  border: 1px solid rgba(255, 116, 126, 0.74);
  border-top-width: 2px;
  border-radius: 2px 2px 5px 5px;
}

.gallery-record-card__mark.is-marked::before {
  background: rgba(255, 70, 95, 0.72);
  box-shadow: 0 0 10px rgba(255, 35, 65, 0.22);
}

.gallery-records-header h2 {
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.gallery-records-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: clamp(0.35rem, 1vw, 0.65rem);
  color: rgba(255, 213, 217, 0.62);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.gallery-records-pagination button {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 70, 95, 0.3);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 116, 126, 0.16), transparent 58%),
    rgba(8, 0, 4, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.05),
    0 0 14px rgba(255, 35, 65, 0.08);
  cursor: pointer;
}

.gallery-records-pagination button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 1.5px solid rgba(255, 241, 214, 0.86);
  border-right: 1.5px solid rgba(255, 241, 214, 0.86);
}

.gallery-records-pagination button[data-gallery-record-set="previous"]::before {
  transform: rotate(-135deg) translate(-1px, 1px);
}

.gallery-records-pagination button[data-gallery-record-set="next"]::before {
  transform: rotate(45deg) translate(-1px, 1px);
}

.gallery-records-pagination button:hover:not(:disabled),
.gallery-records-pagination button:focus-visible {
  outline: none;
  border-color: rgba(255, 100, 120, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.08),
    0 0 18px rgba(255, 35, 65, 0.18);
}

.gallery-records-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
  box-shadow: none;
}

.gallery-records-state {
  margin: 0;
  color: rgba(255, 180, 190, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-bottom-empty {
  margin: 0;
  color: rgba(255, 213, 217, 0.62);
  font-size: 0.82rem;
  line-height: 1.45;
}

.gallery-record-modal {
  position: fixed;
  inset: 0;
  z-index: 1240;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(14px, 4vw, 42px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.gallery-record-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-record-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 35, 65, 0.2), transparent 42%),
    rgba(0, 0, 0, 0.84);
  cursor: pointer;
}

.gallery-record-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  width: min(1120px, 100%);
  max-height: min(90dvh, 860px);
  overflow: auto;
  border: 1px solid rgba(255, 70, 95, 0.28);
  border-radius: 18px;
  color: rgba(255, 232, 218, 0.92);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 35, 65, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(36, 4, 11, 0.96), rgba(8, 0, 4, 0.98));
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.58),
    0 0 36px rgba(255, 35, 65, 0.14);
}

.gallery-record-modal--utility .gallery-record-modal__dialog {
  grid-template-columns: 1fr;
  width: min(620px, 100%);
}

.gallery-record-modal--utility .gallery-record-modal__dialog--trail {
  width: min(760px, 100%);
  scrollbar-color: rgba(255, 70, 100, 0.58) rgba(16, 0, 6, 0.56);
  scrollbar-width: thin;
}

.gallery-record-modal--utility .gallery-record-modal__dialog--trail::-webkit-scrollbar {
  width: 8px;
}

.gallery-record-modal--utility .gallery-record-modal__dialog--trail::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(16, 0, 6, 0.56);
}

.gallery-record-modal--utility .gallery-record-modal__dialog--trail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 70, 100, 0.58);
}

.gallery-record-modal--utility .gallery-record-modal__dialog--trail::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 70, 100, 0.76);
}

.gallery-record-modal.gallery-record-modal--viewer {
  z-index: 20000;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(10px, 2vw, 24px);
  overflow: hidden;
}

.gallery-record-modal--viewer .gallery-record-modal__dialog {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.gallery-record-modal--viewer .gallery-record-modal__backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.gallery-record-modal__figure {
  display: grid;
  min-height: 0;
  place-items: center;
  margin: 0;
  padding: clamp(0.75rem, 2vw, 1.2rem);
  background: rgba(0, 0, 0, 0.28);
}

.gallery-record-modal__figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(76dvh, 720px);
  object-fit: contain;
}

.gallery-record-modal--viewer .gallery-record-modal__figure {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.gallery-record-modal--viewer .gallery-record-modal__figure img {
  width: auto;
  height: auto;
  max-width: calc(100vw - clamp(20px, 4vw, 48px));
  max-height: calc(100vh - clamp(20px, 4vw, 48px));
  max-height: calc(100dvh - clamp(20px, 4vw, 48px));
  object-fit: contain;
  pointer-events: auto;
}

.gallery-record-modal--viewer .gallery-record-modal__close {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: auto;
  text-transform: none;
}

.gallery-record-modal__figure figcaption {
  display: grid;
  gap: 0.16rem;
  width: 100%;
  max-width: min(760px, 100%);
  color: rgba(255, 241, 214, 0.82);
  text-align: center;
}

.gallery-record-modal__figure figcaption strong {
  color: rgba(255, 241, 214, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 600;
  line-height: 1.1;
}

.gallery-record-modal__figure figcaption span {
  color: rgba(255, 180, 190, 0.6);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-record-modal__body {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.gallery-record-modal__eyebrow {
  margin: 0;
  color: rgba(255, 130, 150, 0.76);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-record-modal__body h2 {
  margin: 0;
  color: rgba(255, 241, 214, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.95;
}

.gallery-record-modal__body p {
  margin: 0;
  color: rgba(255, 213, 217, 0.72);
  line-height: 1.55;
}

.gallery-record-modal__body dl {
  display: grid;
  gap: 0;
  margin: 0.25rem 0 0;
}

.gallery-record-modal__body dl div {
  display: grid;
  gap: 0.16rem;
  border-bottom: 1px solid rgba(255, 70, 95, 0.16);
  padding: 0.5rem 0;
}

.gallery-record-modal__body dt {
  color: rgba(255, 130, 150, 0.76);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-record-modal__body dd {
  margin: 0;
  color: rgba(255, 241, 214, 0.88);
  font-family: var(--archive-manuscript-font);
}

.gallery-record-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  min-height: 34px;
  border: 1px solid rgba(255, 100, 120, 0.32);
  border-radius: 999px;
  padding: 0 0.75rem;
  color: rgba(255, 241, 214, 0.88);
  background: rgba(8, 0, 4, 0.64);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-modal-record-list {
  display: grid;
  gap: 0.55rem;
}

.gallery-trail-summary,
.gallery-trail-modal-progress {
  display: grid;
  gap: 0.45rem;
}

.gallery-trail-list {
  display: grid;
  gap: 0.55rem;
}

.gallery-trail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.42rem;
  width: 100%;
  border: 1px solid rgba(255, 70, 95, 0.1);
  border-radius: 12px;
  padding: 0.58rem 0.62rem;
  color: inherit;
  background: rgba(10, 0, 5, 0.34);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.gallery-trail-row:hover,
.gallery-trail-row:focus-visible {
  outline: none;
  border-color: rgba(255, 70, 95, 0.3);
  background: rgba(42, 3, 12, 0.5);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.1);
}

.gallery-trail-row--list {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
}

.gallery-trail-row__copy,
.gallery-trail-row__main,
.gallery-trail-row__progress {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.gallery-trail-row__thumb {
  display: none;
}

.gallery-trail-row__copy strong {
  overflow: hidden;
  color: rgba(255, 241, 214, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-trail-row__copy em {
  color: rgba(255, 213, 217, 0.62);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.35;
}

.gallery-trail-row__progress small,
.gallery-trail-row__status {
  color: rgba(255, 213, 217, 0.64);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-trail-row__status {
  justify-self: end;
  border: 1px solid rgba(255, 70, 95, 0.18);
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  color: rgba(255, 178, 186, 0.76);
  background: rgba(8, 0, 4, 0.42);
  white-space: nowrap;
}

.gallery-trail-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
  align-items: center;
}

.gallery-trail-dots span {
  width: 0.46rem;
  height: 0.46rem;
  border: 1px solid rgba(255, 90, 112, 0.3);
  border-radius: 999px;
  background: rgba(60, 8, 16, 0.34);
}

.gallery-trail-dots span.is-recovered {
  border-color: rgba(255, 70, 95, 0.88);
  background: rgba(255, 70, 95, 0.92);
  box-shadow: 0 0 10px rgba(255, 35, 65, 0.28);
}

.gallery-trail-dots em {
  color: rgba(255, 178, 186, 0.62);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.gallery-trail-summary strong {
  color: rgba(255, 241, 214, 0.92);
  font-family: var(--archive-manuscript-font);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
}

.gallery-trail-modal-subtitle,
.gallery-trail-modal-description {
  margin: 0;
}

.gallery-trail-modal-subtitle {
  max-width: 56ch;
  color: rgba(255, 229, 215, 0.78);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  line-height: 1.35;
}

.gallery-trail-modal-description {
  max-width: 62ch;
  color: rgba(255, 213, 217, 0.68);
  line-height: 1.55;
}

.gallery-trail-summary span,
.gallery-trail-modal-progress span {
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-trail-modal-progress {
  position: relative;
  border: 1px solid rgba(255, 70, 95, 0.12);
  border-radius: 14px;
  padding: 0.72rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 146, 98, 0.08), transparent 42%),
    rgba(8, 0, 5, 0.34);
}

.gallery-trail-modal-progress__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.gallery-trail-modal-progress__meta strong {
  color: rgba(255, 198, 174, 0.8);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-trail-progress {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(60, 8, 16, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 70, 95, 0.16);
}

.gallery-trail-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 70, 95, 0.86), rgba(255, 146, 98, 0.82));
  box-shadow: 0 0 14px rgba(255, 35, 65, 0.28);
}

.gallery-trail-progress.is-complete span,
.gallery-trail-progress.is-assembling span {
  background: linear-gradient(90deg, rgba(255, 70, 95, 0.9), rgba(255, 204, 146, 0.88), rgba(255, 105, 124, 0.92));
  box-shadow:
    0 0 16px rgba(255, 35, 65, 0.34),
    0 0 26px rgba(255, 190, 110, 0.12);
}

.gallery-trail-progress.is-complete::after,
.gallery-trail-progress.is-assembling::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 244, 220, 0.38) 45%, transparent 72%);
  transform: translateX(-100%);
}

.gallery-trail-progress.is-assembling::after {
  animation: galleryTrailSweep 780ms ease forwards;
}

.gallery-trail-list-pagination {
  margin-top: 0.25rem;
}

.gallery-bottom-card .gallery-trail-row--summary {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  border-color: transparent;
  border-radius: 12px;
  padding: 0.55rem;
  background: rgba(10, 0, 5, 0.34);
  box-shadow: none;
}

.gallery-bottom-card .gallery-trail-row--summary:hover,
.gallery-bottom-card .gallery-trail-row--summary:focus-visible {
  border-color: rgba(255, 70, 95, 0.28);
  background: rgba(36, 3, 12, 0.52);
  box-shadow: none;
}

.gallery-bottom-card .gallery-trail-row__thumb {
  display: block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 116, 126, 0.34);
  border-radius: 10px;
  background:
    radial-gradient(circle, rgba(255, 70, 95, 0.28), transparent 58%),
    rgba(12, 0, 6, 0.7);
}

.gallery-bottom-card .gallery-trail-row__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.gallery-bottom-card .gallery-trail-row__thumb.is-locked {
  display: grid;
  place-items: center;
}

.gallery-bottom-card .gallery-trail-row__thumb.is-locked::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background: #ff2341;
  filter: drop-shadow(0 0 8px rgba(255, 35, 65, 0.46));
  -webkit-mask: url("../assets/icons/symbols/bloodmoon_star.svg") center / contain no-repeat;
  mask: url("../assets/icons/symbols/bloodmoon_star.svg") center / contain no-repeat;
}

.gallery-bottom-card .gallery-trail-row__copy,
.gallery-bottom-card .gallery-trail-row__main,
.gallery-bottom-card .gallery-trail-row__progress {
  gap: 0.16rem;
}

.gallery-bottom-card .gallery-trail-row__copy strong {
  font-size: 1rem;
  line-height: 1.05;
}

.gallery-bottom-card .gallery-trail-row__progress small {
  font-size: 0.68rem;
  line-height: 1.15;
  letter-spacing: 0.07em;
}

.gallery-bottom-card .gallery-trail-dots {
  gap: 0.18rem;
}

.gallery-bottom-card .gallery-trail-dots span {
  width: 0.38rem;
  height: 0.38rem;
}

@media (max-width: 560px) {
  .gallery-trail-row--list {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-trail-row__status {
    justify-self: start;
  }
}

.gallery-trail-fragment-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(100%, 520px);
  margin-inline: auto;
  isolation: isolate;
}

.gallery-trail-fragment-grid::before,
.gallery-trail-fragment-grid::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.gallery-trail-fragment-grid::before {
  inset: -1.2rem;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 35, 65, 0.16), transparent 58%),
    radial-gradient(circle at 52% 60%, rgba(255, 190, 120, 0.06), transparent 62%);
  opacity: 0.72;
}

.gallery-trail-fragment-grid::after {
  z-index: 2;
  inset: -0.3rem;
  border-radius: 16px;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 236, 210, 0.28) 42%, transparent 70%);
  opacity: 0;
  transform: translateX(-110%);
}

.gallery-trail-fragment-grid.is-assembling::after {
  opacity: 1;
  animation: galleryTrailSweep 780ms ease forwards;
}

.gallery-trail-fragment {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 70, 95, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 35, 65, 0.12), transparent 56%),
    rgba(8, 0, 4, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 214, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.25);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.gallery-trail-fragment:hover {
  border-color: rgba(255, 116, 126, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 214, 0.1),
    0 14px 30px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(255, 35, 65, 0.14);
  transform: translateY(-2px);
}

.gallery-trail-fragment-grid.is-assembling .gallery-trail-fragment {
  animation: galleryTrailFragmentAssemble 780ms ease forwards;
}

.gallery-trail-fragment__media {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  place-items: center;
}

.gallery-trail-fragment img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-trail-fragment.is-recovered::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 46%, rgba(8, 0, 4, 0.82) 100%),
    radial-gradient(circle at 50% 12%, rgba(255, 245, 215, 0.08), transparent 42%);
  pointer-events: none;
}

.gallery-trail-fragment.is-locked .gallery-trail-fragment__media > span {
  color: rgba(255, 213, 217, 0.58);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-trail-fragment.is-locked .gallery-trail-fragment__media small {
  max-width: 22ch;
  color: rgba(255, 213, 217, 0.42);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.gallery-trail-fragment__meta {
  position: absolute;
  right: 0.55rem;
  bottom: 0.5rem;
  left: 0.55rem;
  z-index: 1;
  display: flex;
  gap: 0.35rem;
  align-items: end;
  justify-content: space-between;
  color: rgba(255, 241, 214, 0.92);
}

.gallery-trail-fragment__meta strong,
.gallery-trail-fragment__meta em {
  border: 1px solid rgba(255, 198, 174, 0.16);
  border-radius: 999px;
  background: rgba(8, 0, 4, 0.62);
  backdrop-filter: blur(10px);
}

.gallery-trail-fragment__meta strong {
  min-width: 0;
  overflow: hidden;
  padding: 0.28rem 0.42rem;
  font-family: var(--archive-manuscript-font);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-trail-fragment__meta em {
  flex: 0 0 auto;
  padding: 0.25rem 0.4rem;
  color: rgba(255, 198, 174, 0.74);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-trail-fragment.is-locked .gallery-trail-fragment__meta {
  opacity: 0.72;
}

.gallery-trail-reveal-button {
  position: relative;
  justify-self: center;
  min-height: 42px;
  min-width: min(100%, 260px);
  overflow: hidden;
  border: 1px solid rgba(255, 198, 174, 0.26);
  border-radius: 999px;
  padding: 0 1.2rem;
  color: rgba(255, 241, 214, 0.94);
  background:
    linear-gradient(135deg, rgba(130, 12, 30, 0.68), rgba(24, 3, 10, 0.88)),
    rgba(10, 0, 5, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 214, 0.12),
    0 0 22px rgba(255, 35, 65, 0.14);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.gallery-trail-reveal-button::before {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -55%;
  width: 44%;
  background: linear-gradient(100deg, transparent, rgba(255, 244, 220, 0.3), transparent);
  transform: skewX(-18deg);
}

.gallery-trail-reveal-button:hover,
.gallery-trail-reveal-button:focus-visible {
  outline: none;
  border-color: rgba(255, 214, 182, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 214, 0.18),
    0 0 26px rgba(255, 35, 65, 0.2),
    0 0 18px rgba(255, 190, 120, 0.08);
  transform: translateY(-1px);
}

.gallery-trail-reveal-button:hover::before,
.gallery-trail-reveal-button:focus-visible::before {
  animation: galleryTrailButtonSweep 760ms ease forwards;
}

.gallery-trail-reveal-button:disabled {
  border-color: rgba(255, 213, 217, 0.12);
  color: rgba(255, 213, 217, 0.48);
  background: rgba(8, 0, 4, 0.54);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.gallery-trail-reveal-button:disabled::before {
  display: none;
}

@media (max-width: 420px) {
  .gallery-trail-fragment-grid {
    width: min(100%, 300px);
    gap: 0.5rem;
  }

  .gallery-trail-fragment__meta {
    right: 0.4rem;
    bottom: 0.4rem;
    left: 0.4rem;
    display: grid;
    align-items: start;
  }

  .gallery-trail-fragment__meta strong,
  .gallery-trail-fragment__meta em {
    justify-self: start;
  }
}

.gallery-trail-recover-button {
  justify-self: start;
  min-height: 36px;
  border: 1px solid rgba(255, 70, 95, 0.32);
  border-radius: 10px;
  padding: 0 0.95rem;
  color: rgba(255, 241, 214, 0.9);
  background:
    linear-gradient(135deg, rgba(116, 6, 24, 0.72), rgba(42, 2, 11, 0.84)),
    rgba(12, 0, 5, 0.88);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-trail-recover-button:hover,
.gallery-trail-recover-button:focus-visible {
  border-color: rgba(255, 116, 126, 0.52);
  box-shadow: 0 0 18px rgba(210, 31, 50, 0.22);
  outline: none;
}

.gallery-trail-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.gallery-trail-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(115, 5, 24, 0.28), transparent 48%),
    rgba(0, 0, 0, 0.86);
  cursor: pointer;
}

.gallery-trail-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(94vw, 980px);
  max-height: 92vh;
  border: 1px solid rgba(255, 116, 126, 0.22);
  border-radius: 18px;
  padding: clamp(0.8rem, 2vw, 1.1rem);
  background:
    linear-gradient(180deg, rgba(18, 0, 8, 0.82), rgba(5, 0, 3, 0.94)),
    rgba(5, 0, 3, 0.94);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.62),
    0 0 42px rgba(255, 35, 65, 0.16);
}

.gallery-trail-lightbox__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  min-height: 34px;
  border: 1px solid rgba(255, 213, 217, 0.18);
  border-radius: 999px;
  padding: 0 0.72rem;
  color: rgba(255, 241, 214, 0.86);
  background: rgba(8, 0, 4, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-trail-lightbox__close:hover,
.gallery-trail-lightbox__close:focus-visible {
  outline: none;
  border-color: rgba(255, 198, 174, 0.38);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.18);
}

.gallery-trail-lightbox__figure {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  justify-items: center;
}

.gallery-trail-lightbox__figure img {
  display: block;
  max-width: 100%;
  max-height: min(74vh, 760px);
  border-radius: 12px;
  object-fit: contain;
  background: rgba(8, 0, 4, 0.72);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(255, 70, 95, 0.12);
}

.gallery-trail-lightbox__figure figcaption {
  max-width: 62ch;
  color: rgba(255, 229, 215, 0.78);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(0.94rem, 2vw, 1.1rem);
  line-height: 1.4;
  text-align: center;
}

.gallery-trail-lightbox__figure p {
  display: none;
  margin: 0;
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.86rem;
  text-align: center;
}

.gallery-trail-lightbox__figure.is-image-missing img,
.gallery-trail-lightbox__figure.is-image-missing figcaption {
  display: none;
}

.gallery-trail-lightbox__figure.is-image-missing p {
  display: block;
}

@keyframes galleryTrailSweep {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(110%);
  }
}

@keyframes galleryTrailButtonSweep {
  0% {
    left: -55%;
  }

  100% {
    left: 115%;
  }
}

@keyframes galleryTrailFragmentAssemble {
  0%,
  100% {
    filter: brightness(1);
    transform: translate(0, 0) scale(1);
  }

  45% {
    filter: brightness(1.18);
    box-shadow:
      inset 0 1px 0 rgba(255, 241, 214, 0.12),
      0 0 26px rgba(255, 35, 65, 0.24);
    transform: translate(var(--gallery-trail-shift-x, 0), var(--gallery-trail-shift-y, 0)) scale(1.015);
  }
}

.gallery-trail-fragment-grid.is-assembling .gallery-trail-fragment:nth-child(1) {
  --gallery-trail-shift-x: 4px;
  --gallery-trail-shift-y: 4px;
}

.gallery-trail-fragment-grid.is-assembling .gallery-trail-fragment:nth-child(2) {
  --gallery-trail-shift-x: -4px;
  --gallery-trail-shift-y: 4px;
}

.gallery-trail-fragment-grid.is-assembling .gallery-trail-fragment:nth-child(3) {
  --gallery-trail-shift-x: 4px;
  --gallery-trail-shift-y: -4px;
}

.gallery-trail-fragment-grid.is-assembling .gallery-trail-fragment:nth-child(4) {
  --gallery-trail-shift-x: -4px;
  --gallery-trail-shift-y: -4px;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-trail-progress.is-assembling::after,
  .gallery-trail-fragment-grid.is-assembling::after,
  .gallery-trail-fragment-grid.is-assembling .gallery-trail-fragment,
  .gallery-trail-reveal-button:hover::before,
  .gallery-trail-reveal-button:focus-visible::before {
    animation: none;
  }

  .gallery-trail-fragment,
  .gallery-trail-reveal-button {
    transition: none;
  }
}

body.reduce-motion .gallery-trail-progress.is-assembling::after,
body.reduce-motion .gallery-trail-fragment-grid.is-assembling::after,
body.reduce-motion .gallery-trail-fragment-grid.is-assembling .gallery-trail-fragment,
body.reduce-motion .gallery-trail-reveal-button:hover::before,
body.reduce-motion .gallery-trail-reveal-button:focus-visible::before {
  animation: none;
}

body.reduce-motion .gallery-trail-fragment,
body.reduce-motion .gallery-trail-reveal-button {
  transition: none;
}

.gallery-records-tools button {
  border: 0;
  color: rgba(255, 213, 217, 0.78);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.gallery-record-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, clamp(120px, 10vw, 168px));
  grid-auto-flow: row;
  gap: clamp(0.5rem, 0.9vw, 0.75rem);
}

.gallery-record-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 70, 95, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(22, 2, 8, 0.84), rgba(7, 0, 4, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.035),
    0 14px 30px rgba(0, 0, 0, 0.18);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.gallery-record-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.gallery-record-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.gallery-record-card:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.gallery-record-card:nth-child(4) {
  grid-column: 4;
  grid-row: 1 / span 2;
}

.gallery-record-card:nth-child(5) {
  grid-column: 1;
  grid-row: 3;
}

.gallery-record-card:nth-child(6) {
  grid-column: 2;
  grid-row: 2 / span 3;
}

.gallery-record-card:nth-child(7) {
  grid-column: 3;
  grid-row: 2 / span 3;
}

.gallery-record-card:nth-child(8) {
  grid-column: 4;
  grid-row: 3;
}

.gallery-record-card:nth-child(9) {
  grid-column: 1;
  grid-row: 4;
}

.gallery-record-card:nth-child(10) {
  grid-column: 4;
  grid-row: 4;
}

.gallery-record-card:hover {
  border-color: rgba(255, 100, 120, 0.42);
  box-shadow: 0 0 22px rgba(255, 35, 65, 0.12);
  transform: translateY(-2px);
}

.gallery-record-card__image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: rgba(10, 0, 5, 0.88);
}

.gallery-record-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  filter: brightness(0.96) contrast(1.04) saturate(1.02);
  transition: transform 260ms ease, filter 260ms ease;
}

.gallery-record-card:hover .gallery-record-card__image img {
  filter: brightness(1.04) contrast(1.05) saturate(1.04);
  transform: scale(1.012);
}

.gallery-record-card__mark {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.gallery-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.5vw, 1rem);
}

.gallery-bottom-card {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1rem, 2vw, 1.35rem);
}

.gallery-card-heading {
  border-bottom: 1px solid rgba(255, 70, 95, 0.18);
  padding-bottom: 0.65rem;
}

.gallery-card-heading button {
  border: 0;
  color: rgba(255, 178, 186, 0.74);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.gallery-mini-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  border-radius: 12px;
  padding: 0.55rem;
}

.gallery-mini-row__remove {
  flex: 0 0 auto;
  min-height: 0;
  border: 1px solid rgba(255, 70, 95, 0.26);
  border-radius: 10px;
  padding: 0 0.65rem;
  color: rgba(255, 213, 217, 0.78);
  background: rgba(8, 0, 4, 0.48);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-mini-row__remove:hover,
.gallery-mini-row__remove:focus-visible {
  border-color: rgba(255, 100, 120, 0.48);
  color: rgba(255, 241, 214, 0.92);
  outline: none;
}

.gallery-mini-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.gallery-quote-strip {
  position: relative;
  margin: 0;
  border: 0;
  padding: clamp(1.2rem, 2.6vw, 1.9rem) clamp(1rem, 4vw, 2rem);
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.gallery-quote-strip blockquote {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  color: rgba(255, 232, 218, 0.9);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-style: italic;
  line-height: 1.35;
  text-wrap: balance;
}

.gallery-quote-strip blockquote::before {
  content: "“";
  position: absolute;
  top: -0.55em;
  left: 50%;
  color: rgba(255, 70, 95, 0.18);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(4rem, 8vw, 6.5rem);
  font-style: normal;
  line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-quote-strip figcaption {
  margin-top: 0.75rem;
  color: rgba(255, 180, 190, 0.8);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .gallery-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: clamp(140px, 24vw, 220px);
  }

  .gallery-record-card,
  .gallery-record-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-record-card:nth-child(1),
  .gallery-record-card:nth-child(4),
  .gallery-record-card:nth-child(6),
  .gallery-record-card:nth-child(7) {
    grid-row: span 2;
  }
}

@media (max-width: 920px) {
  .gallery-page-shell {
    width: min(100% - 1.25rem, 760px);
    padding-top: clamp(1rem, 4vw, 1.5rem);
  }

  .gallery-hero {
    min-height: 340px;
    background:
      linear-gradient(90deg, rgba(5, 0, 4, 0.94) 0%, rgba(18, 0, 7, 0.76) 48%, rgba(35, 0, 10, 0.2) 100%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.58) 100%),
      url("../assets/images/background _images/gallery_title_bg.png") center right / cover no-repeat;
  }

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

  .gallery-featured-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "visual"
      "meta";
  }

  .gallery-featured-card__image {
    height: clamp(220px, 42vw, 260px);
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 70, 95, 0.16);
  }

  .gallery-featured-card__meta {
    grid-template-rows: auto auto;
    padding: 0.4rem 0 0;
    border-left: 0;
  }

  .gallery-record-grid {
    grid-auto-rows: clamp(132px, 26vw, 210px);
  }

  .gallery-record-modal__dialog {
    grid-template-columns: 1fr;
    width: min(100%, 720px);
  }

  .gallery-record-modal__figure img {
    max-height: min(52dvh, 520px);
  }

  .gallery-filter-track .gallery-filter-chip:nth-child(n + 6) {
    display: none;
  }
}

@media (max-width: 760px) {
  .gallery-filter-section {
    flex-direction: column;
    align-items: stretch;
  }

  .gallery-filter-section__filters,
  .gallery-filter-track,
  .gallery-filter-actions {
    width: 100%;
  }

  .gallery-filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-content: space-between;
    min-width: 0;
  }

  .gallery-filter-more,
  .gallery-filter-more__button,
  .gallery-sort-control {
    width: 100%;
    min-width: 0;
  }

  .gallery-sort-control {
    justify-content: space-between;
  }

  .gallery-sort-control select {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .gallery-page-shell {
    width: calc(100% - 24px);
    overflow-x: hidden;
  }

  .gallery-hero {
    min-height: 280px;
    border-radius: 22px;
    padding: 1rem;
    background:
      linear-gradient(180deg, rgba(5, 0, 4, 0.74) 0%, rgba(5, 0, 4, 0.96) 100%),
      linear-gradient(90deg, rgba(5, 0, 4, 0.8), rgba(35, 0, 10, 0.32)),
      url("../assets/images/background _images/gallery_title_bg.png") center right / cover no-repeat;
  }

  .gallery-hero__copy h1 {
    font-size: clamp(2.8rem, 14vw, 3.6rem);
  }

  .gallery-hero__copy p:not(.archive-entry__stamp) {
    max-width: 30ch;
    font-size: 1rem;
  }

  .gallery-hero__copy em {
    max-width: 30ch;
    font-size: 0.94rem;
  }

  .gallery-record-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: clamp(180px, 58vw, 280px);
  }

  .gallery-filter-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.55rem;
  }

  .gallery-filter-section__filters,
  .gallery-filter-track,
  .gallery-filter-actions {
    width: 100%;
  }

  .gallery-filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-content: space-between;
    min-width: 0;
  }

  .gallery-filter-more,
  .gallery-filter-more__button,
  .gallery-sort-control {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .gallery-sort-control {
    justify-content: space-between;
  }

  .gallery-featured-card__image::after {
    background: linear-gradient(180deg, rgba(5, 0, 3, 0.03), rgba(5, 0, 3, 0.24));
  }

  .gallery-record-modal {
    padding: 0.75rem;
  }

  .gallery-record-modal__dialog {
    max-height: calc(100dvh - 1.5rem);
  }

  .gallery-record-modal__body {
    padding: 1rem;
  }

  .gallery-record-card,
  .gallery-record-card:nth-child(n),
  .gallery-record-card--portrait,
  .gallery-record-card--tall,
  .gallery-record-card--wide,
  .gallery-record-card--square,
  .gallery-record-card--fragment,
  .gallery-record-card--featured-small {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 460px) {
  .gallery-record-grid {
    grid-template-columns: 1fr;
  }

  .gallery-records-header,
  .gallery-section-heading,
  .gallery-card-heading {
    align-items: flex-start;
  }

  .gallery-records-header {
    flex-direction: column;
  }

  .gallery-records-pagination {
    justify-content: center;
  }

  .gallery-records-tools {
    flex-wrap: wrap;
  }

  .gallery-fragment-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .gallery-category-row span:not(.gallery-category-row__icon),
  .gallery-quick-link strong,
  .gallery-mini-row strong {
    white-space: normal;
  }
}

@keyframes archiveGalleryRecordIn {
  from {
    opacity: 0.64;
    transform: translateX(10px);
  }

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

.archive-room-panel--memory-vault {
  gap: clamp(14px, 2.5vw, 22px);
  background:
    radial-gradient(circle at 18% 12%, rgba(139, 233, 255, 0.12), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(255, 35, 65, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(18, 2, 18, 0.82), rgba(5, 0, 6, 0.9));
  background-size: auto;
}

.archive-memory-vault-header {
  display: grid;
  gap: 7px;
  max-width: 760px;
}

.archive-memory-vault-header h3 {
  margin: 2px 0 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.9rem, 4vw, 3.05rem);
  line-height: 0.98;
}

.archive-memory-vault-header p:not(.archive-entry__stamp) {
  max-width: 62ch;
  margin: 0;
  color: rgba(255, 213, 217, 0.78);
  line-height: 1.6;
}

.archive-memory-vault-unlock {
  display: grid;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(139, 233, 255, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 14% 18%, rgba(139, 233, 255, 0.12), transparent 48%),
    rgba(0, 0, 0, 0.24);
  box-shadow:
    0 0 22px rgba(139, 233, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.archive-memory-vault-unlock span {
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archive-memory-vault-unlock p,
.archive-memory-vault-note {
  margin: 0;
  color: rgba(255, 244, 216, 0.9);
  line-height: 1.55;
}

.archive-memory-vault-note {
  max-width: 48ch;
  color: rgba(255, 213, 217, 0.72);
  font-style: italic;
}

.archive-desk-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.archive-room-stat {
  min-width: 0;
  border: 1px solid rgba(231, 195, 106, 0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.archive-room-stat span,
.archive-room-rail__slot {
  display: block;
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-room-stat strong {
  display: block;
  margin-top: 8px;
  color: rgba(255, 244, 216, 0.92);
  font-size: 1rem;
}

.archive-recovered-objects,
.archive-code-panel,
.archive-shelf-entry-card,
.archive-journal-page {
  border: 1px solid rgba(255, 116, 126, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 52%),
    rgba(0, 0, 0, 0.2);
}

.archive-recovered-objects,
.archive-code-panel {
  display: grid;
  gap: 14px;
  padding: clamp(14px, 2.4vw, 20px);
}

.archive-recovered-objects h3,
.archive-code-panel h3,
.archive-journal-page h3 {
  margin: 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 0.98;
}

.archive-recovered-objects p,
.archive-code-panel p {
  margin: 0;
  color: var(--navbar-muted);
  line-height: 1.6;
}

.archive-recovered-list {
  display: grid;
  gap: 10px;
}

.archive-recovered-object {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(231, 195, 106, 0.28);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 18% 18%, rgba(231, 195, 106, 0.12), transparent 44%),
    rgba(255, 35, 65, 0.08);
  box-shadow: 0 0 18px rgba(231, 195, 106, 0.08);
}

.archive-code-panel__field span,
.archive-shelf-entry-card span {
  color: rgba(255, 213, 217, 0.68);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-recovered-object strong {
  color: rgba(255, 244, 216, 0.9);
  font-size: 1rem;
}

.archive-recovered-object p {
  margin: 0;
  color: rgba(255, 213, 217, 0.74);
  line-height: 1.5;
}

.archive-code-panel {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.56fr) auto;
  align-items: end;
}

.archive-code-panel__field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.archive-code-panel__field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 116, 126, 0.24);
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(255, 244, 216, 0.94);
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  letter-spacing: 0.04em;
}

.archive-code-panel__field input:focus {
  border-color: rgba(255, 213, 217, 0.56);
  outline: none;
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.2);
}

.archive-code-panel button,
.archive-shelf-entry-card button {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--navbar-border) 74%, rgba(255, 35, 65, 0.24));
  border-radius: 999px;
  padding: 0 16px;
  color: var(--navbar-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    color-mix(in srgb, var(--navbar-hover-bg) 76%, rgba(255, 255, 255, 0.035));
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.13);
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 800;
}

.archive-code-panel button:hover,
.archive-code-panel button:focus-visible,
.archive-shelf-entry-card button:hover,
.archive-shelf-entry-card button:focus-visible {
  border-color: color-mix(in srgb, var(--navbar-border) 70%, white);
  outline: none;
  box-shadow: 0 0 26px rgba(255, 35, 65, 0.24);
}

.archive-code-panel__feedback {
  grid-column: 1 / -1;
  min-height: 1.5em;
  color: rgba(255, 213, 217, 0.88);
  font-weight: 700;
}

.archive-room-placeholder {
  display: grid;
  gap: 8px;
  max-width: 680px;
}

.archive-room-placeholder h3 {
  margin: 8px 0 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.98;
}

.archive-room-placeholder p:not(.archive-entry__stamp) {
  color: var(--navbar-muted);
  line-height: 1.7;
}

.archive-shelf-entry-list {
  display: grid;
  grid-template-columns: minmax(0, min(100%, 430px));
  gap: 14px;
  justify-content: start;
}

.archive-shelf-entry-card {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 12px;
  align-content: start;
  overflow: hidden;
  min-height: 248px;
  padding: clamp(18px, 3vw, 26px);
  background:
    linear-gradient(135deg, rgba(255, 235, 194, 0.08), transparent 46%),
    radial-gradient(circle at 86% 8%, rgba(255, 35, 65, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(42, 4, 12, 0.9), rgba(8, 0, 4, 0.88));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.26),
    0 0 24px rgba(255, 35, 65, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.archive-shelf-entry-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid rgba(231, 195, 106, 0.1);
  border-radius: 14px;
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(231, 195, 106, 0.055) 10px 11px, transparent 11px 100%),
    linear-gradient(180deg, rgba(255, 244, 216, 0.055), transparent 42%);
  pointer-events: none;
}

.archive-shelf-entry-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: -1;
  width: 88px;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(231, 195, 106, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 232, 184, 0.1), rgba(255, 232, 184, 0.025)),
    repeating-linear-gradient(180deg, transparent 0 9px, rgba(255, 220, 185, 0.12) 9px 10px);
  opacity: 0.52;
  transform: rotate(5deg);
}

.archive-shelf-entry-card__mark {
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 35, 65, 0.48), rgba(255, 35, 65, 0.08) 52%, transparent 54%),
    linear-gradient(45deg, transparent 44%, rgba(255, 226, 205, 0.36) 45% 55%, transparent 56%);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.16);
}

.archive-shelf-entry-card h3 {
  margin: 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.65rem, 3.4vw, 2.5rem);
  line-height: 0.98;
}

.archive-shelf-entry-card p {
  margin: 0;
  color: var(--navbar-muted);
  line-height: 1.55;
}

.archive-shelf-entry-card button {
  width: fit-content;
  margin-top: auto;
}

.archive-journal-page {
  display: grid;
  gap: 18px;
  padding: clamp(16px, 3vw, 28px);
}

.archive-journal-page header {
  display: grid;
  gap: 8px;
}

.archive-journal-page header p:not(.archive-entry__stamp) {
  margin: 0;
  color: rgba(255, 213, 217, 0.72);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.archive-journal-page__body {
  display: grid;
  gap: 13px;
  max-width: 78ch;
}

.archive-journal-page__body p {
  margin: 0;
  color: rgba(255, 232, 235, 0.84);
  font-size: clamp(0.98rem, 1.3vw, 1.06rem);
  line-height: 1.78;
}

.archive-room-rail {
  display: flex;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.archive-room-rail__slot {
  flex: 0 0 180px;
  display: grid;
  min-height: 78px;
  place-items: center;
  border: 1px dashed rgba(255, 116, 126, 0.24);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 35, 65, 0.08), transparent 46%),
    rgba(0, 0, 0, 0.16);
  text-align: center;
  scroll-snap-align: start;
}

.archive-room-rail--shelf-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  overflow: visible;
  padding: 0;
}

.archive-room-rail--shelf-categories .archive-room-rail__slot {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 168px;
  overflow: hidden;
  border-style: solid;
  border-color: rgba(255, 116, 126, 0.2);
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(5, 0, 4, 0.12), rgba(5, 0, 4, 0.82)),
    rgba(0, 0, 0, 0.18);
  text-align: left;
  text-transform: none;
}

.archive-room-rail--shelf-categories .archive-room-rail__slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--shelf-category-art);
  opacity: 0.88;
  transition: transform 220ms ease, opacity 220ms ease;
}

.archive-room-rail--shelf-categories .archive-room-rail__slot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 116, 126, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(8, 0, 4, 0.1), rgba(8, 0, 4, 0.86));
  pointer-events: none;
}

.archive-room-rail--shelf-categories .archive-room-rail__slot:hover::before,
.archive-room-rail--shelf-categories .archive-room-rail__slot:focus-within::before {
  opacity: 1;
  transform: scale(1.03);
}

.archive-room-rail--shelf-categories .archive-room-rail__slot span {
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: none;
}

.archive-room-rail--shelf-categories .archive-room-rail__slot p {
  max-width: 24ch;
  margin: 0;
  color: rgba(255, 226, 218, 0.74);
  font-size: 0.82rem;
  line-height: 1.45;
  text-transform: none;
}

.archive-room-rail__slot--manuscripts {
  --shelf-category-art:
    linear-gradient(135deg, rgba(255, 232, 184, 0.2), transparent 40%),
    repeating-linear-gradient(92deg, transparent 0 22px, rgba(231, 195, 106, 0.09) 22px 24px),
    radial-gradient(ellipse at 28% 24%, rgba(231, 195, 106, 0.34), transparent 26%),
    linear-gradient(160deg, rgba(82, 37, 19, 0.72), rgba(10, 0, 5, 0.86));
}

.archive-room-rail__slot--letters {
  --shelf-category-art:
    linear-gradient(145deg, transparent 0 40%, rgba(255, 232, 184, 0.2) 40% 42%, transparent 42%),
    radial-gradient(circle at 72% 34%, rgba(255, 35, 65, 0.4), transparent 8%),
    linear-gradient(24deg, transparent 0 46%, rgba(231, 195, 106, 0.18) 46% 48%, transparent 48%),
    linear-gradient(155deg, rgba(80, 24, 18, 0.82), rgba(10, 0, 5, 0.88));
}

.archive-room-rail__slot--unstable-texts {
  --shelf-category-art:
    repeating-linear-gradient(172deg, rgba(255, 226, 205, 0.08) 0 2px, transparent 2px 13px),
    linear-gradient(92deg, transparent 0 22%, rgba(255, 35, 65, 0.2) 22% 24%, transparent 24% 56%, rgba(255, 35, 65, 0.14) 56% 58%, transparent 58%),
    radial-gradient(circle at 72% 18%, rgba(180, 108, 255, 0.18), transparent 28%),
    linear-gradient(160deg, rgba(42, 4, 20, 0.88), rgba(4, 0, 6, 0.92));
}

@media (max-width: 640px) {
  .archive-room-rail--shelf-categories {
    grid-template-columns: 1fr;
  }

  .archive-room-rail--shelf-categories .archive-room-rail__slot {
    min-height: 138px;
  }
}

.archive-room-featured-image {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 260px;
  margin: 0;
  border: 1px solid rgba(231, 195, 106, 0.14);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 22px);
  background: rgba(0, 0, 0, 0.18);
}

.archive-room-featured-image span {
  display: grid;
  min-height: 220px;
  border: 1px dashed rgba(255, 116, 126, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 35, 65, 0.14), transparent 54%),
    rgba(255, 255, 255, 0.035);
}

.archive-room-featured-image figcaption {
  display: grid;
  gap: 8px;
}

.archive-room-featured-image strong {
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  line-height: 0.98;
}

.archive-room-featured-image em {
  color: var(--navbar-muted);
  font-style: normal;
  line-height: 1.6;
}

.archive-room-toast {
  position: fixed;
  right: clamp(16px, 4vw, 34px);
  bottom: clamp(18px, 4vw, 34px);
  z-index: 1240;
  max-width: min(340px, calc(100vw - 32px));
  border: 1px solid rgba(255, 116, 126, 0.3);
  border-radius: 16px;
  padding: 14px 16px;
  color: rgba(255, 244, 216, 0.92);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 35, 65, 0.14), transparent 42%),
    rgba(10, 2, 8, 0.94);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    0 0 22px rgba(255, 35, 65, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.archive-room-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .archive-chamber-stage {
    grid-template-columns: minmax(210px, 320px) minmax(0, 1fr);
  }

  .archive-chamber-info-grid {
    grid-template-columns: 1fr;
  }

  .archive-room-panel--desk {
    grid-template-columns: 1fr;
  }

  .archive-desk-stats,
  .archive-recovered-list,
  .archive-code-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-code-panel > div,
  .archive-code-panel__feedback {
    grid-column: 1 / -1;
  }

}

@media (max-width: 640px) {
  .archive-room-shell {
    gap: 14px;
    width: 100%;
  }

  .archive-page {
    padding-bottom: 96px;
  }

  .archive-invitation {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    border-radius: 20px;
    padding: 18px 14px;
  }

  .archive-invitation h1 {
    width: min(100%, 286px);
    max-width: 286px;
    font-size: clamp(1.35rem, 6vw, 1.65rem);
    line-height: 1.08;
    white-space: normal;
    text-wrap: wrap;
  }

  .archive-invitation__copy,
  .archive-invitation__copy p {
    width: min(100%, 300px);
    max-width: 300px;
    font-size: 0.88rem;
    white-space: normal;
    text-wrap: wrap;
  }

  .archive-room-hub__heading {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    border-radius: 18px;
    padding: 16px 14px;
  }

  .archive-room-hub__heading h2 {
    width: min(100%, 300px);
    max-width: 300px;
    font-size: clamp(1.35rem, 6.6vw, 1.75rem);
    white-space: normal;
    text-wrap: wrap;
  }

  .archive-room-hub__heading p:not(.reading-section__eyebrow) {
    width: min(100%, 300px);
    max-width: 300px;
    font-size: 0.86rem;
    line-height: 1.5;
    white-space: normal;
    text-wrap: wrap;
  }

  .archive-chamber-rail {
    padding-right: 2px;
    padding-left: 2px;
    scroll-padding-inline: 2px;
  }

  .archive-chamber-viewer {
    border-radius: 22px;
    padding: 14px;
  }

  .archive-chamber-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }

  .archive-room-card--featured {
    width: min(100%, 280px);
  }

  .archive-room-card--featured .archive-room-card__button {
    aspect-ratio: 4 / 5.18;
    border-radius: 20px;
  }

  .archive-room-card--featured .archive-room-card__media {
    padding: 7px;
  }

  .archive-chamber-content {
    justify-items: center;
    text-align: center;
  }

  .archive-chamber-content h2 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .archive-chamber-tags {
    justify-content: center;
  }

  .archive-chamber-info-grid {
    text-align: left;
  }

  .archive-chamber-actions {
    justify-content: center;
    width: 100%;
  }

  .archive-chamber-nav {
    justify-content: center;
    width: 100%;
  }

  .archive-chamber-nav button {
    flex: 1 1 120px;
    max-width: 150px;
  }

  .archive-chamber-enter {
    width: min(100%, 260px);
  }

  .archive-room-featured-image,
  .archive-room-panel--desk,
  .archive-desk-stats,
  .archive-recovered-list,
  .archive-code-panel {
    grid-template-columns: 1fr;
  }

  .archive-gallery-viewer {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .archive-gallery-viewer__nav {
    width: 44px;
    height: 44px;
  }

  .archive-gallery-viewer__nav:first-child {
    order: 2;
  }

  .archive-gallery-record {
    order: 1;
  }

  .archive-gallery-viewer__nav:last-child {
    order: 3;
  }

  .archive-room-card {
    flex-basis: min(84vw, 330px);
  }

  .archive-room-card__button {
    aspect-ratio: 4 / 5.35;
  }

  .archive-room-featured-image span {
    min-height: 180px;
  }

  .archive-room-toast {
    right: 16px;
    bottom: 16px;
  }
}

/* Entry Desk redesign final scoped overrides. Keep after legacy archive rules. */
.archive-chamber-viewer.archive-chamber-viewer--entry-desk {
  width: 100%;
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.blood-moon-mode .archive-selected-chamber[data-chamber-interior="entry-desk"] {
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.entry-desk-page.entry-desk-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.entry-desk-page.entry-desk-main .entry-desk-hero,
.entry-desk-page.entry-desk-main .entry-desk-code-section,
.entry-desk-page.entry-desk-main .entry-desk-reveal-section,
.entry-desk-page.entry-desk-main .entry-desk-findings-section,
.entry-desk-page.entry-desk-main .entry-desk-activity-grid,
.entry-desk-page.entry-desk-main .entry-desk-omen {
  width: 100%;
}

.entry-desk-page.entry-desk-main .entry-desk-hero {
  min-height: clamp(420px, 52vh, 640px);
  border-radius: 28px;
}

.entry-desk-page .archive-code-panel.entry-desk-code-section,
.entry-desk-page .archive-recovered-objects.entry-desk-findings-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-height: 0;
  margin: 0;
  border-radius: 26px;
  border: 1px solid rgba(255, 55, 82, 0.24);
  background: rgba(18, 2, 8, 0.68);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.entry-desk-page .archive-recovered-object-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  justify-content: stretch;
}

.entry-desk-page .archive-code-entry {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  gap: 12px;
  width: min(100%, 940px);
}

.entry-desk-page .archive-code-whispers {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .entry-desk-page .archive-code-entry {
    display: grid;
  }

  .entry-desk-page .archive-code-entry button {
    width: 100%;
  }
}

/* Entry Desk open-page layout. Scoped by the active body state so other Noctis rooms stay unchanged. */
body.entry-desk-page {
  display: block;
  border: 0;
  border-radius: 0;
  padding: 0;
  background-color: #060003;
  box-shadow: none;
  overflow-x: hidden;
}

body.entry-desk-page .archive-page,
body.entry-desk-page .archive-room-shell,
body.entry-desk-page .archive-room-view,
body.entry-desk-page .archive-chamber-rail,
body.entry-desk-page .archive-chamber-viewer,
body.entry-desk-page.noctis-room-page .archive-room-placeholder__stage,
body.entry-desk-page.noctis-room-page .archive-room-placeholder__card,
body.entry-desk-page .archive-selected-chamber[data-chamber-interior="entry-desk"] {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

body.entry-desk-page.noctis-room-page .archive-room-placeholder-page {
  max-width: none;
  padding-inline: 0;
}

body.entry-desk-page.noctis-room-page .archive-room-placeholder__kicker,
body.entry-desk-page.noctis-room-page .archive-room-placeholder__title,
body.entry-desk-page.noctis-room-page .archive-room-placeholder__meta,
body.entry-desk-page.noctis-room-page .archive-room-placeholder__keyline,
body.entry-desk-page.noctis-room-page .archive-room-placeholder__copy,
body.entry-desk-page.noctis-room-page .archive-room-placeholder__back {
  display: none;
}

body.entry-desk-page .archive-page {
  padding-inline: 0;
}

body.entry-desk-page .archive-room-shell {
  padding: 0;
}

body.entry-desk-page .archive-room-view {
  display: block;
}

body.entry-desk-page .archive-chamber-viewer.archive-chamber-viewer--entry-desk {
  display: block;
  padding: 0 !important;
}

body.entry-desk-page .entry-desk-page-shell {
  width: min(1440px, calc(100% - clamp(1.5rem, 5vw, 5rem)));
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(4rem, 8vh, 6rem);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

body.entry-desk-page .entry-desk-page-heading {
  width: min(1180px, 100%);
  margin: 0 auto clamp(0.9rem, 2vw, 1.35rem);
  text-align: center;
}

body.entry-desk-page .entry-desk-page-heading h1 {
  margin: 0;
  color: rgba(255, 241, 220, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 12px rgba(255, 35, 77, 0.42),
    0 0 30px rgba(255, 35, 77, 0.28),
    0 0 52px rgba(110, 0, 18, 0.34),
    0 0 18px rgba(255, 230, 196, 0.12);
}

body.entry-desk-page .entry-desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "hero"
    "code"
    "reveal"
    "findings"
    "activity"
    "omen";
  gap: clamp(1.4rem, 2.5vw, 2.25rem);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.entry-desk-page .entry-desk-hero {
  grid-area: hero;
  height: clamp(320px, 36vh, 420px);
  min-height: 0;
  max-height: 420px;
  border: 0;
  border-radius: 28px;
  box-shadow: none;
}

body.entry-desk-page .entry-desk-code-section {
  grid-area: code;
  width: 100%;
}

body.entry-desk-page .entry-desk-reveal-section {
  grid-area: reveal;
  width: 100%;
}

body.entry-desk-page .entry-desk-findings-section {
  grid-area: findings;
}

body.entry-desk-page .entry-desk-findings-section .entry-desk-section-heading {
  max-width: 680px;
}

body.entry-desk-page .entry-desk-findings-section .entry-desk-section-heading h3 {
  font-size: clamp(1.45rem, 2.8vw, 2.25rem);
  line-height: 1;
}

body.entry-desk-page .archive-recovered-objects.entry-desk-findings-section {
  background:
    linear-gradient(90deg, rgba(8, 0, 5, 0.96) 0%, rgba(12, 0, 7, 0.9) 42%, rgba(18, 0, 8, 0.5) 70%, rgba(18, 0, 8, 0.25) 100%),
    radial-gradient(circle at 18% 28%, rgba(255, 35, 65, 0.16), transparent 38%),
    url("../assets/images/recovered-objects-section.webp") center right / cover no-repeat;
}

body.entry-desk-page .entry-desk-activity-grid {
  grid-area: activity;
}

body.entry-desk-page .entry-desk-omen {
  grid-area: omen;
}

body.entry-desk-page .entry-desk-code-section,
body.entry-desk-page .entry-desk-reveal-section,
body.entry-desk-page .entry-desk-findings-section,
body.entry-desk-page .entry-desk-activity-card {
  border: 0;
  border-radius: 24px;
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  background:
    linear-gradient(135deg, rgba(24, 2, 8, 0.78), rgba(8, 0, 4, 0.86));
  box-shadow: none;
}

body.entry-desk-page .entry-desk-code-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24, 2, 8, 0.78), rgba(8, 0, 4, 0.86));
}

body.entry-desk-page .entry-desk-code-section::before,
body.entry-desk-page .entry-desk-code-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.entry-desk-page .entry-desk-code-section::before {
  z-index: 0;
  background: url("../assets/images/noctis/recovered-code.png") center / cover no-repeat;
  opacity: 1;
}

body.entry-desk-page .entry-desk-code-section::after {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 0, 4, 0.84) 0%, rgba(14, 0, 6, 0.62) 46%, rgba(8, 0, 4, 0.28) 100%),
    radial-gradient(circle at 18% 24%, rgba(255, 35, 77, 0.18), transparent 36%);
}

body.entry-desk-page .entry-desk-code-section > * {
  position: relative;
  z-index: 2;
}

body.entry-desk-page .entry-desk-code-section .entry-desk-section-heading {
  justify-items: start;
  max-width: 520px;
  text-align: left;
}

body.entry-desk-page .entry-desk-code-section .entry-desk-section-heading h3 {
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  line-height: 1;
}

body.entry-desk-page .entry-desk-code-section .entry-desk-section-heading p {
  max-width: 48ch;
  font-size: 0.92rem;
  line-height: 1.55;
}

body.entry-desk-page .entry-desk-code-section .archive-code-entry {
  width: min(100%, 600px);
  align-items: end;
}

body.entry-desk-page .entry-desk-code-section .archive-code-panel__field input {
  min-height: 40px;
  border-radius: 14px;
  padding: 0 0.85rem;
}

body.entry-desk-page .entry-desk-code-section .archive-code-entry button {
  min-height: 40px;
  min-width: 148px;
  border-radius: 14px;
  padding: 0 0.9rem;
}

body.entry-desk-page .entry-desk-reveal-section {
  --reveal-feature-image: url("../assets/images/concepts-ideas/bloodmoon-veilwalker-section.webp") center / cover no-repeat;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 48, 76, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(26, 1, 8, 0.9), rgba(8, 0, 4, 0.96));
}

body.entry-desk-page .entry-desk-reveal-header {
  max-width: 780px;
  margin-bottom: 1.25rem;
}

body.entry-desk-page .entry-desk-reveal-header h3 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

body.entry-desk-page .entry-desk-reveal-header p:not(.entry-desk-kicker) {
  line-height: 1.5;
}

body.entry-desk-page .entry-desk-reveal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0;
}

body.entry-desk-page .entry-desk-reveal-card {
  min-height: 112px;
  border: 0;
  border-radius: 18px;
  padding: 1rem;
  background: rgba(8, 0, 4, 0.62);
  box-shadow:
    inset 0 0 18px rgba(255, 74, 96, 0.05),
    0 14px 34px rgba(0, 0, 0, 0.24);
}

body.entry-desk-page .entry-desk-reveal-card.featured {
  grid-column: span 2;
  background:
    linear-gradient(90deg, rgba(8, 0, 4, 0.78), rgba(45, 4, 14, 0.72)),
    var(--reveal-feature-image);
}

body.entry-desk-page .entry-desk-reveal-card > span {
  font-size: 1.05rem;
}

body.entry-desk-page .entry-desk-reveal-card h4 {
  margin: 0.45rem 0 0.25rem;
  font-size: 1rem;
  line-height: 1.05;
}

body.entry-desk-page .entry-desk-reveal-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0.82;
}

body.entry-desk-page .archive-code-toast {
  justify-self: start;
  grid-column: 1 / -1;
  width: fit-content;
  max-width: min(100%, 520px);
  margin: 0.2rem 0 0;
  border-radius: 14px;
  padding: 0.72rem 0.95rem;
  color: rgba(255, 238, 230, 0.94);
  background:
    linear-gradient(135deg, rgba(30, 2, 10, 0.92), rgba(8, 0, 4, 0.94));
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(255, 35, 77, 0.14);
  font-weight: 800;
  animation: archive-code-toast-in 180ms ease both;
}

body.entry-desk-page .archive-code-toast--success {
  color: rgba(255, 244, 216, 0.96);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(231, 195, 106, 0.2);
}

body.entry-desk-page .archive-code-toast--error {
  color: rgba(255, 204, 210, 0.96);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(255, 35, 77, 0.24);
}

body.entry-desk-page .entry-desk-reveal-card,
body.entry-desk-page .archive-recovered-object-card {
  border: 0;
  box-shadow: none;
}

body.entry-desk-page .entry-desk-findings-section .archive-recovered-inventory {
  width: 100%;
  max-width: none;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-inventory,
.archive-landing-recovered-objects .archive-recovered-inventory,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-strip {
  width: 100%;
  max-width: none;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-strip,
.archive-landing-recovered-objects .archive-recovered-object-strip,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.2rem);
  width: 100%;
  justify-content: stretch;
  padding: 0;
}

body.entry-desk-page .entry-desk-findings-section .noctis-findings-empty,
body.blood-moon-mode .archive-recovery-stack .noctis-findings-empty,
body.blood-moon-mode .archive-recovered-items-list .noctis-findings-empty,
body.entry-desk-page .archive-recovered-items-list .noctis-findings-empty {
  grid-column: 1 / -1;
  width: 100%;
}

.noctis-findings-empty {
  min-height: 180px;
  display: grid;
  align-content: center;
  gap: 0.65rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 22px;
  border: 1px solid rgba(255, 65, 90, 0.22);
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 55, 85, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(25, 0, 8, 0.78), rgba(8, 0, 4, 0.92));
}

.noctis-findings-empty .noctis-card-kicker {
  margin: 0;
  color: rgba(255, 112, 136, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.noctis-findings-empty h3 {
  margin: 0;
  color: #fff1d6;
  font-family: var(--archive-manuscript-font);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.noctis-findings-empty p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 232, 218, 0.82);
}

.noctis-findings-empty .noctis-findings-hint {
  color: rgba(255, 112, 136, 0.86);
  font-style: italic;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card,
.archive-landing-recovered-objects .archive-recovered-object-card,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card {
  width: 100%;
  min-height: 132px;
  grid-template-rows: 62px auto;
  border: 1px solid rgba(255, 35, 77, 0.34);
  border-radius: 18px;
  box-shadow: none;
  transform: none;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card__icon img,
.archive-landing-recovered-objects .archive-recovered-object-card__icon img,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__icon img {
  width: min(100%, 58px);
  height: min(100%, 58px);
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card.is-recovered,
body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card.is-active,
body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card:hover,
body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card:focus-visible,
.archive-landing-recovered-objects .archive-recovered-object-card.is-recovered,
.archive-landing-recovered-objects .archive-recovered-object-card.is-active,
.archive-landing-recovered-objects .archive-recovered-object-card:hover,
.archive-landing-recovered-objects .archive-recovered-object-card:focus-visible,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card.is-recovered,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card.is-active,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card:hover,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card:focus-visible {
  border: 1px solid rgba(255, 35, 77, 0.48);
  box-shadow: none;
  transform: none;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card:hover .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card:focus-visible .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card.is-active .archive-recovered-object-card__icon img,
.archive-landing-recovered-objects .archive-recovered-object-card:hover .archive-recovered-object-card__icon img,
.archive-landing-recovered-objects .archive-recovered-object-card:focus-visible .archive-recovered-object-card__icon img,
.archive-landing-recovered-objects .archive-recovered-object-card.is-active .archive-recovered-object-card__icon img,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card:hover .archive-recovered-object-card__icon img,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card:focus-visible .archive-recovered-object-card__icon img,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card.is-active .archive-recovered-object-card__icon img {
  transform: none;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card__copy,
.archive-landing-recovered-objects .archive-recovered-object-card__copy,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__copy {
  align-content: center;
}

body.entry-desk-page .archive-view-recovered-items-btn,
.archive-landing-recovered-objects .archive-view-recovered-items-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  justify-self: center;
  min-height: 42px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 14px;
  padding: 0.68rem 1.05rem;
  color: rgba(255, 244, 216, 0.94);
  background:
    linear-gradient(135deg, rgba(122, 11, 28, 0.74), rgba(37, 1, 10, 0.9));
  box-shadow: 0 0 22px rgba(255, 35, 77, 0.14);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

body.entry-desk-page .archive-view-recovered-items-btn img,
.archive-landing-recovered-objects .archive-view-recovered-items-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter:
    brightness(0)
    saturate(100%)
    invert(37%)
    sepia(86%)
    saturate(3048%)
    hue-rotate(330deg)
    brightness(103%)
    contrast(105%);
}

body.entry-desk-page .archive-view-recovered-items-btn:hover,
body.entry-desk-page .archive-view-recovered-items-btn:focus-visible,
.archive-landing-recovered-objects .archive-view-recovered-items-btn:hover,
.archive-landing-recovered-objects .archive-view-recovered-items-btn:focus-visible {
  border-color: rgba(255, 116, 126, 0.56);
  outline: none;
  box-shadow: 0 0 28px rgba(255, 35, 77, 0.24);
}

body.blood-moon-mode .archive-recovery-stack .archive-recovered-inventory {
  width: 100%;
  max-width: none;
}

body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.2rem);
  width: 100%;
  justify-content: stretch;
  padding: 0;
}

body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card {
  width: 100%;
  min-height: 132px;
  grid-template-rows: 62px auto;
  border: 1px solid rgba(255, 35, 77, 0.34);
  border-radius: 18px;
  box-shadow: none;
  transform: none;
}

body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__icon img {
  width: min(100%, 58px);
  height: min(100%, 58px);
}

body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card.is-recovered,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card.is-active,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card:hover,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card:focus-visible {
  border: 1px solid rgba(255, 35, 77, 0.48);
  box-shadow: none;
  transform: none;
}

body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card:hover .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card:focus-visible .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card.is-active .archive-recovered-object-card__icon img {
  transform: none;
}

body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__copy {
  align-content: center;
}

body.blood-moon-mode .archive-recovery-stack .archive-view-recovered-items-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  justify-self: center;
  min-height: 42px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 14px;
  padding: 0.68rem 1.05rem;
  color: rgba(255, 244, 216, 0.94);
  background:
    linear-gradient(135deg, rgba(122, 11, 28, 0.74), rgba(37, 1, 10, 0.9));
  box-shadow: 0 0 22px rgba(255, 35, 77, 0.14);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

body.blood-moon-mode .archive-recovery-stack .archive-view-recovered-items-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter:
    brightness(0)
    saturate(100%)
    invert(37%)
    sepia(86%)
    saturate(3048%)
    hue-rotate(330deg)
    brightness(103%)
    contrast(105%);
}

body.blood-moon-mode .archive-recovery-stack .archive-view-recovered-items-btn:hover,
body.blood-moon-mode .archive-recovery-stack .archive-view-recovered-items-btn:focus-visible {
  border-color: rgba(255, 116, 126, 0.56);
  outline: none;
  box-shadow: 0 0 28px rgba(255, 35, 77, 0.24);
}

body.blood-moon-mode .archive-recovered-items-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(145, 18, 38, 0.28), transparent 42%),
    rgba(4, 0, 3, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.blood-moon-mode .archive-recovered-items-dialog {
  position: relative;
  display: grid;
  gap: 1.2rem;
  width: min(100%, 820px);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  color: rgba(255, 226, 218, 0.88);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 35, 77, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(35, 4, 12, 0.96), rgba(7, 0, 4, 0.94));
  box-shadow:
    0 26px 78px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(255, 35, 77, 0.16);
}

body.blood-moon-mode .archive-recovered-items-dialog__header {
  display: grid;
  gap: 0.35rem;
  padding-right: 5rem;
}

body.blood-moon-mode .archive-recovered-items-dialog__header p {
  margin: 0;
  color: rgba(255, 116, 126, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.blood-moon-mode .archive-recovered-items-dialog__header h4 {
  margin: 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

body.blood-moon-mode .archive-recovered-items-list {
  display: grid;
  gap: 0.8rem;
}

body.blood-moon-mode .archive-recovered-items-list__row {
  --artifact-accent: rgba(255, 116, 126, 0.72);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--artifact-accent) 14%, rgba(255, 255, 255, 0.02)), rgba(8, 0, 4, 0.62));
}

body.blood-moon-mode .archive-recovered-items-list__row.element-air {
  --artifact-accent: rgba(186, 225, 255, 0.86);
}

body.blood-moon-mode .archive-recovered-items-list__row.element-water {
  --artifact-accent: rgba(56, 178, 255, 0.86);
}

body.blood-moon-mode .archive-recovered-items-list__row.element-fire {
  --artifact-accent: rgba(255, 102, 34, 0.88);
}

body.blood-moon-mode .archive-recovered-items-list__row.element-earth {
  --artifact-accent: rgba(150, 204, 80, 0.86);
}

body.blood-moon-mode .archive-recovered-items-list__row.is-locked {
  opacity: 0.52;
  filter: grayscale(0.35);
}

body.blood-moon-mode .archive-recovered-items-list__icon {
  display: grid;
  place-items: center;
}

body.blood-moon-mode .archive-recovered-items-list__icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

body.blood-moon-mode .archive-recovered-items-list__row strong,
body.blood-moon-mode .archive-recovered-items-list__row em {
  display: block;
}

body.blood-moon-mode .archive-recovered-items-list__row strong {
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: 1.25rem;
  line-height: 1;
}

body.blood-moon-mode .archive-recovered-items-list__row em {
  margin-top: 0.2rem;
  color: rgba(255, 221, 211, 0.68);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.entry-desk-page .archive-recovered-items-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(145, 18, 38, 0.28), transparent 42%),
    rgba(4, 0, 3, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.entry-desk-page .archive-recovered-items-dialog {
  position: relative;
  display: grid;
  gap: 1.2rem;
  width: min(100%, 820px);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  color: rgba(255, 226, 218, 0.88);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 35, 77, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(35, 4, 12, 0.96), rgba(7, 0, 4, 0.94));
  box-shadow:
    0 26px 78px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(255, 35, 77, 0.16);
}

body.entry-desk-page .archive-recovered-items-dialog__header {
  display: grid;
  gap: 0.35rem;
  padding-right: 5rem;
}

body.entry-desk-page .archive-recovered-items-dialog__header p {
  margin: 0;
  color: rgba(255, 116, 126, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.entry-desk-page .archive-recovered-items-dialog__header h4 {
  margin: 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

body.entry-desk-page .archive-recovered-items-list {
  display: grid;
  gap: 0.8rem;
}

body.entry-desk-page .archive-recovered-items-list__row {
  --artifact-accent: rgba(255, 116, 126, 0.72);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--artifact-accent) 14%, rgba(255, 255, 255, 0.02)), rgba(8, 0, 4, 0.62));
}

body.entry-desk-page .archive-recovered-items-list__row.element-air {
  --artifact-accent: rgba(186, 225, 255, 0.86);
}

body.entry-desk-page .archive-recovered-items-list__row.element-water {
  --artifact-accent: rgba(56, 178, 255, 0.86);
}

body.entry-desk-page .archive-recovered-items-list__row.element-fire {
  --artifact-accent: rgba(255, 102, 34, 0.88);
}

body.entry-desk-page .archive-recovered-items-list__row.element-earth {
  --artifact-accent: rgba(150, 204, 80, 0.86);
}

body.entry-desk-page .archive-recovered-items-list__row.is-locked {
  opacity: 0.52;
  filter: grayscale(0.35);
}

body.entry-desk-page .archive-recovered-items-list__icon {
  display: grid;
  place-items: center;
}

body.entry-desk-page .archive-recovered-items-list__icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

body.entry-desk-page .archive-recovered-items-list__row strong,
body.entry-desk-page .archive-recovered-items-list__row em {
  display: block;
}

body.entry-desk-page .archive-recovered-items-list__row strong {
  color: rgba(255, 244, 216, 0.94);
  font-family: var(--archive-manuscript-font);
  font-size: 1.25rem;
  line-height: 1;
}

body.entry-desk-page .archive-recovered-items-list__row em {
  margin-top: 0.2rem;
  color: rgba(255, 221, 211, 0.68);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.entry-desk-page .entry-desk-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.4rem);
}

body.entry-desk-page .entry-desk-activity-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: clamp(1.12rem, 1.7vw, 1.45rem);
  line-height: 1;
  white-space: nowrap;
}

body.entry-desk-page .entry-desk-activity-card h3 img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 22px;
  filter:
    brightness(0)
    saturate(100%)
    invert(37%)
    sepia(86%)
    saturate(3048%)
    hue-rotate(330deg)
    brightness(103%)
    contrast(105%);
}

body.entry-desk-page .entry-desk-activity-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: unset;
  height: auto;
  padding: clamp(1.15rem, 2vw, 1.55rem);
}

body.entry-desk-page .entry-desk-feed-list,
body.entry-desk-page .entry-desk-whisper-list {
  display: flex;
  flex-direction: column;
}

body.entry-desk-page .entry-desk-feed-list--notice,
body.entry-desk-page .entry-desk-feed-list--echo {
  flex: 1 1 auto;
  justify-content: space-evenly;
}

body.entry-desk-page .entry-desk-whisper-list {
  gap: 0.45rem;
}

body.entry-desk-page .entry-desk-feed-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.58rem 0;
  border-bottom: 1px solid rgba(255, 90, 105, 0.18);
}

body.entry-desk-page .entry-desk-feed-list--notice .entry-desk-feed-item,
body.entry-desk-page .entry-desk-feed-list--echo .entry-desk-feed-item {
  padding: 0.82rem 0;
}

body.entry-desk-page .entry-desk-feed-item:last-child {
  border-bottom: 0;
}

body.entry-desk-page .entry-desk-feed-dot {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  margin-top: 0.38rem;
  background: #ffead2;
  box-shadow: 0 0 12px rgba(255, 234, 210, 0.42);
}

body.entry-desk-page .entry-desk-feed-dot.dot-water {
  background: #69d9ff;
  box-shadow: 0 0 12px rgba(105, 217, 255, 0.7);
}

body.entry-desk-page .entry-desk-feed-dot.dot-air {
  background: #c8f7ff;
  box-shadow: 0 0 12px rgba(200, 247, 255, 0.6);
}

body.entry-desk-page .entry-desk-feed-dot.dot-fire {
  background: #ff944d;
  box-shadow: 0 0 12px rgba(255, 148, 77, 0.7);
}

body.entry-desk-page .entry-desk-feed-dot.dot-earth {
  background: #bfe58b;
  box-shadow: 0 0 12px rgba(191, 229, 139, 0.65);
}

body.entry-desk-page .entry-desk-feed-dot.dot-blood {
  background: #ff3f62;
  box-shadow: 0 0 14px rgba(255, 63, 98, 0.75);
}

body.entry-desk-page .entry-desk-feed-item h4 {
  margin: 0 0 0.12rem;
  color: #fff1d6;
  font-size: 0.88rem;
  font-weight: 700;
}

body.entry-desk-page .entry-desk-feed-item p {
  margin: 0;
  color: rgba(255, 232, 218, 0.78);
  line-height: 1.32;
  font-size: 0.84rem;
}

body.entry-desk-page .entry-desk-view-notices-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  align-self: center;
  margin-top: auto;
  margin-bottom: 0.35rem;
  min-height: 38px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 14px;
  padding: 0.58rem 0.9rem;
  color: rgba(255, 244, 216, 0.94);
  background:
    linear-gradient(135deg, rgba(122, 11, 28, 0.7), rgba(37, 1, 10, 0.88));
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

body.entry-desk-page .entry-desk-view-notices-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter:
    brightness(0)
    saturate(100%)
    invert(37%)
    sepia(86%)
    saturate(3048%)
    hue-rotate(330deg)
    brightness(103%)
    contrast(105%);
}

body.entry-desk-page .entry-desk-view-notices-btn:hover,
body.entry-desk-page .entry-desk-view-notices-btn:focus-visible {
  border-color: rgba(255, 116, 126, 0.56);
  outline: none;
}

body.entry-desk-page .entry-desk-notices-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background:
    radial-gradient(circle at 50% 42%, rgba(145, 18, 38, 0.28), transparent 42%),
    rgba(4, 0, 3, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.entry-desk-page .entry-desk-notices-dialog {
  position: relative;
  display: grid;
  gap: 1rem;
  width: min(100%, 820px);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  color: rgba(255, 226, 218, 0.88);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 35, 77, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(35, 4, 12, 0.96), rgba(7, 0, 4, 0.94));
  box-shadow:
    0 26px 78px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(255, 35, 77, 0.16);
}

body.entry-desk-page .entry-desk-modal-close {
  position: absolute;
  top: clamp(12px, 2vw, 20px);
  right: clamp(12px, 2vw, 20px);
  z-index: 2;
  min-height: 38px;
  border: 1px solid rgba(255, 116, 126, 0.38);
  border-radius: 999px;
  padding: 0 16px;
  color: rgba(255, 236, 224, 0.92);
  background: rgba(20, 0, 7, 0.82);
  box-shadow: 0 0 18px rgba(255, 35, 65, 0.16);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.entry-desk-page .entry-desk-notices-dialog__header {
  display: grid;
  gap: 0.35rem;
  padding-right: 5rem;
}

body.entry-desk-page .entry-desk-notices-dialog__header p {
  margin: 0;
  color: rgba(255, 116, 126, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.entry-desk-page .entry-desk-notices-dialog__header h4 {
  margin: 0;
  color: rgba(255, 244, 216, 0.96);
  font-family: var(--archive-manuscript-font);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

body.entry-desk-page .entry-desk-notices-dialog__list {
  min-height: 120px;
}

body.entry-desk-page .entry-desk-notices-dialog__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-top: 1px solid rgba(255, 90, 105, 0.18);
  padding-top: 1rem;
}

body.entry-desk-page .entry-desk-notices-dialog__pager button {
  min-height: 38px;
  border: 1px solid rgba(255, 116, 126, 0.28);
  border-radius: 14px;
  padding: 0.55rem 0.9rem;
  color: rgba(255, 244, 216, 0.94);
  background: rgba(37, 1, 10, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

body.entry-desk-page .entry-desk-notices-dialog__pager button:disabled {
  cursor: default;
  opacity: 0.42;
}

body.entry-desk-page .entry-desk-notices-dialog__pager span {
  color: rgba(255, 232, 218, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

body.entry-desk-page .entry-desk-whisper-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0.65rem;
  border: 1px solid rgba(255, 63, 98, 0.34);
  border-radius: 14px;
  padding: 0.58rem;
  background:
    linear-gradient(135deg, rgba(255, 63, 98, 0.1), rgba(32, 2, 12, 0.34));
  cursor: pointer;
}

body.entry-desk-page .entry-desk-whisper-row:last-child {
  border-bottom: 1px solid rgba(255, 63, 98, 0.34);
}

body.entry-desk-page .entry-desk-whisper-row:hover {
  border-color: rgba(255, 63, 98, 0.5);
}

body.entry-desk-page .entry-desk-whisper-avatar {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 105, 128, 0.35);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffe9d2;
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 84, 110, 0.55), rgba(56, 5, 18, 0.9));
  box-shadow: 0 0 18px rgba(255, 65, 95, 0.24);
  font-size: 0.78rem;
  font-weight: 700;
}

body.entry-desk-page .entry-desk-whisper-message {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: rgba(255, 232, 218, 0.86);
  line-height: 1.32;
  font-size: 0.84rem;
}

body.entry-desk-page .entry-desk-whisper-speaker {
  margin: 0.28rem 0 0;
  color: rgba(255, 115, 145, 0.9);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

body.entry-desk-page .entry-desk-whisper-hint {
  margin: 0.6rem 0 0;
  color: rgba(255, 180, 190, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

body.entry-desk-page .entry-desk-whisper-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.entry-desk-page .entry-desk-whisper-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 0, 4, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.entry-desk-page .entry-desk-whisper-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  border: 1px solid rgba(255, 86, 112, 0.28);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 64, 96, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(34, 2, 10, 0.96), rgba(8, 0, 4, 0.98));
  box-shadow:
    0 28px 100px rgba(0, 0, 0, 0.55),
    0 0 38px rgba(255, 46, 78, 0.16);
}

body.entry-desk-page .entry-desk-whisper-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 110, 130, 0.35);
  border-radius: 12px;
  color: #ffe6d6;
  background: rgba(10, 0, 5, 0.72);
  cursor: pointer;
}

body.entry-desk-page .entry-desk-modal-kicker {
  margin: 0 0 0.55rem;
  color: rgba(255, 110, 130, 0.9);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

body.entry-desk-page .entry-desk-whisper-dialog h2 {
  margin: 0 0 1rem;
  color: #fff1d6;
}

body.entry-desk-page .entry-desk-whisper-full-message {
  margin: 0;
  color: rgba(255, 232, 218, 0.9);
  line-height: 1.6;
  font-size: 1rem;
}

body.modal-open {
  overflow: hidden;
}

body.entry-desk-page .entry-desk-whisper-modal,
body.entry-desk-page .entry-desk-notices-modal,
body.entry-desk-page .archive-recovered-items-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  align-items: center;
  min-height: 100dvh;
  padding: clamp(1rem, 3vw, 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(145, 18, 38, 0.24), transparent 42%),
    rgba(5, 0, 4, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.entry-desk-page .entry-desk-whisper-modal-backdrop {
  background: rgba(5, 0, 4, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.entry-desk-page .entry-desk-whisper-dialog,
body.entry-desk-page .entry-desk-notices-dialog,
body.entry-desk-page .archive-recovered-items-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 2rem));
  max-height: min(720px, calc(100dvh - 2rem));
  overflow-y: auto;
  border: 1px solid rgba(255, 86, 112, 0.28);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 64, 96, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(34, 2, 10, 0.96), rgba(8, 0, 4, 0.98));
  box-shadow:
    0 28px 100px rgba(0, 0, 0, 0.55),
    0 0 38px rgba(255, 46, 78, 0.16);
}

body.entry-desk-page .entry-desk-modal-close,
body.entry-desk-page .entry-desk-whisper-close,
body.entry-desk-page .archive-recovered-items-dialog .archive-recovered-object-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: auto;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid rgba(255, 110, 130, 0.35);
  border-radius: 12px;
  padding: 0 0.65rem;
  color: #ffe6d6;
  background: rgba(10, 0, 5, 0.72);
  box-shadow: none;
  cursor: pointer;
}

body.entry-desk-page .entry-desk-modal-close:hover,
body.entry-desk-page .entry-desk-whisper-close:hover,
body.entry-desk-page .archive-recovered-items-dialog .archive-recovered-object-modal__close:hover,
body.entry-desk-page .entry-desk-modal-close:focus-visible,
body.entry-desk-page .entry-desk-whisper-close:focus-visible,
body.entry-desk-page .archive-recovered-items-dialog .archive-recovered-object-modal__close:focus-visible {
  border-color: rgba(255, 160, 175, 0.6);
  outline: none;
  box-shadow: 0 0 18px rgba(255, 64, 96, 0.25);
}

body.entry-desk-page .entry-desk-hero__content {
  width: min(560px, 100%);
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

body.entry-desk-page .entry-desk-hero h2 {
  font-size: clamp(2.7rem, 5vw, 4.5rem);
}

body.entry-desk-page .entry-desk-subtitle {
  text-align: center;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
}

body.entry-desk-page .entry-desk-hero__overlay {
  background:
    linear-gradient(90deg, rgba(8, 0, 4, 0.88), rgba(8, 0, 4, 0.35), rgba(8, 0, 4, 0.72)),
    linear-gradient(180deg, rgba(8, 0, 4, 0.12), rgba(8, 0, 4, 0.78));
}

@keyframes archive-code-toast-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

@media (max-width: 900px) {
  body.entry-desk-page .entry-desk-reveal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.entry-desk-page .entry-desk-reveal-card.featured {
    grid-column: span 2;
  }

  body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-landing-recovered-objects .archive-recovered-object-card,
  body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card,
  body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card {
    min-height: 116px;
    grid-template-rows: 52px auto;
    padding: 0.65rem;
  }

  .archive-landing-recovered-objects .archive-recovered-object-card__icon img,
  body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__icon img,
  body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__icon img {
    width: min(100%, 48px);
    height: min(100%, 48px);
  }

  body.entry-desk-page .entry-desk-activity-grid {
    grid-template-columns: 1fr;
  }

  .archive-landing-recovered-objects .archive-recovered-object-strip,
  body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.noctis-room-page .tarot-stage.archive-room-placeholder-page {
    padding-top: clamp(1rem, 4vw, 1.5rem);
  }

  body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.entry-desk-page .entry-desk-page-shell {
    width: calc(100% - 24px);
    padding: clamp(1rem, 4vw, 1.5rem) 0 3.5rem;
  }

  body.entry-desk-page .entry-desk-page-heading {
    margin-bottom: 0.85rem;
    text-align: center;
  }

  body.entry-desk-page .entry-desk-page-heading h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  body.entry-desk-page .entry-desk-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
    height: clamp(300px, 54vh, 360px);
    max-height: 360px;
  }

  body.entry-desk-page .entry-desk-hero__content {
    align-content: center;
    padding: 1.25rem;
  }

  body.entry-desk-page .entry-desk-whisper-dialog,
  body.entry-desk-page .entry-desk-notices-dialog,
  body.entry-desk-page .archive-recovered-items-dialog {
    width: calc(100vw - 1.25rem);
    max-height: calc(100dvh - 1.25rem);
    border-radius: 20px;
    padding: 1.25rem;
  }

  body.entry-desk-page .entry-desk-reveal-grid {
    grid-template-columns: 1fr;
  }

  body.entry-desk-page .entry-desk-reveal-card.featured {
    grid-column: auto;
  }

  .archive-landing-recovered-objects .archive-recovered-object-strip,
  body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-landing-recovered-objects .archive-recovered-object-card__copy strong,
  body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__copy strong,
  body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__copy strong {
    font-size: clamp(0.9rem, 4.4vw, 1.05rem);
  }
}

@media (min-width: 901px) and (max-width: 1366px), (min-width: 901px) and (max-height: 800px) {
  .archive-book {
    gap: clamp(14px, 2.2vw, 22px);
    min-height: auto;
  }

  .archive-spread {
    gap: clamp(12px, 2vw, 20px);
    min-height: clamp(380px, 58vh, 480px);
    border-radius: 22px;
    padding: clamp(14px, 2.2vw, 20px);
  }

  .archive-page-leaf {
    border-radius: 18px;
    padding: clamp(18px, 3vw, 28px);
  }

  .archive-page-leaf h2 {
    font-size: clamp(2rem, 4vw, 3.35rem);
  }

  .archive-entry__lede,
  .archive-page-leaf p,
  .archive-research-list {
    line-height: 1.6;
  }

  .archive-room-placeholder-page {
    min-height: auto;
    padding:
      clamp(76px, 10vh, 104px)
      clamp(16px, 3vw, 32px)
      clamp(28px, 5vh, 48px);
  }

  .archive-room-placeholder__stage {
    padding: clamp(1rem, 2vw, 1.6rem) 1rem clamp(1.5rem, 3vh, 2.2rem);
  }

  .archive-room-placeholder__card {
    max-width: min(92vw, 980px);
    padding: clamp(1.25rem, 2.4vw, 2rem);
  }

  .archive-room-placeholder__title {
    font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  }

  .gallery-page-shell {
    width: min(100% - 32px, 1120px);
    padding-top: clamp(4.8rem, 8vh, 6.5rem);
  }

  .gallery-hero {
    min-height: clamp(280px, 46vh, 390px);
    border-radius: 22px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
  }

  .gallery-featured-card,
  .gallery-bottom-grid,
  .gallery-record-grid {
    gap: clamp(0.9rem, 2vw, 1.4rem);
  }

  .gallery-record-grid {
    grid-auto-rows: clamp(130px, 18vh, 190px);
  }

  .gallery-record-card {
    min-height: 0;
  }

  .gallery-record-modal {
    padding: clamp(10px, 2.6vw, 28px);
  }

  .gallery-record-modal__dialog {
    width: min(1040px, 100%);
    max-height: min(86dvh, 760px);
  }

  .shelves-document-dialog {
    max-height: min(84vh, 720px);
    padding: clamp(1.3rem, 3vw, 2.2rem);
  }

  body.entry-desk-page .entry-desk-page-shell {
    padding: clamp(1.2rem, 3vh, 2rem) 0 clamp(3rem, 6vh, 4.5rem);
  }

  body.entry-desk-page .entry-desk-page-heading h1 {
    font-size: clamp(2.5rem, 5vw, 4.7rem);
  }

  body.entry-desk-page .entry-desk-hero {
    height: clamp(280px, 42vh, 360px);
    max-height: 360px;
  }

  body.entry-desk-page .entry-desk-hero__content {
    padding: clamp(1.25rem, 3vw, 2.3rem);
  }

  .archive-landing-recovered-objects .archive-recovered-object-card,
  body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card,
  body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card {
    min-height: 116px;
  }
}

/* Final Noctis Archive landing compact pass. This stays after legacy room rules so the landing page wins the cascade. */
body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-page {
  gap: clamp(18px, 3vw, 32px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-room-shell {
  gap: clamp(18px, 3.2vw, 36px);
  max-width: 1160px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation {
  min-height: clamp(360px, 42vw, 500px);
  border-radius: 24px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation__content {
  gap: 12px;
  width: min(100%, 560px);
  padding: clamp(26px, 4.4vw, 44px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation h1 {
  font-size: clamp(3.35rem, 6.8vw, 6.2rem);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation__copy p,
body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation__status-note {
  font-size: clamp(0.94rem, 1.2vw, 1.02rem);
  line-height: 1.58;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-blood-status {
  min-height: 31px;
  padding-inline: 12px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-room-hub {
  gap: clamp(16px, 2.4vw, 26px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-room-hub__heading h2 {
  font-size: clamp(2.05rem, 3.8vw, 3rem);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-room-hub__heading p:not(.reading-section__eyebrow) {
  margin-top: 4px;
  line-height: 1.48;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-viewer {
  gap: clamp(18px, 3vw, 30px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-thumbnail-rail {
  gap: clamp(10px, 1.4vw, 16px);
  padding: 4px clamp(12px, 2vw, 18px) 16px;
  scroll-padding-inline: clamp(12px, 2vw, 18px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-card {
  flex-basis: clamp(176px, 15vw, 210px);
  width: clamp(176px, 15vw, 210px);
  min-width: 176px;
  min-height: 336px;
  gap: 8px;
  padding: 8px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-card__body {
  gap: 6px;
  padding: 0 2px 2px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-card__body strong {
  min-height: 1.9em;
  font-size: 1.02rem;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-card__body em {
  font-size: 0.76rem;
  line-height: 1.28;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-card__status {
  min-height: 25px;
  padding-inline: 10px;
  font-size: 0.62rem;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-stage {
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 330px);
  gap: clamp(18px, 2.8vw, 34px);
  padding: clamp(18px, 2.6vw, 26px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-content {
  gap: 10px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-content h2 {
  font-size: clamp(2.5rem, 5.2vw, 4.35rem);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-description {
  font-size: clamp(0.94rem, 1.2vw, 1.02rem);
  line-height: 1.5;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-tags {
  gap: 6px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-tags li {
  padding: 5px 9px;
  font-size: 0.7rem;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-info-grid {
  gap: 8px;
  max-width: 620px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-info-card {
  gap: 4px;
  padding: 10px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-info-card p {
  font-size: 0.82rem;
  line-height: 1.42;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-actions {
  gap: clamp(10px, 1.6vw, 14px);
  margin-top: clamp(6px, 1.4vw, 12px);
  padding-top: clamp(12px, 2vw, 16px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-actions button,
body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-enter {
  min-height: 42px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-feature-art {
  width: min(100%, 320px);
  max-width: 320px;
  max-height: min(520px, 64vh);
  padding: 0;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-feature-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-landing-cards {
  gap: clamp(14px, 2vw, 20px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-recovered-objects,
body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-code-panel {
  min-height: 0;
  padding: clamp(18px, 2.8vw, 26px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-landing-recovered-objects {
  min-height: clamp(210px, 22vw, 300px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-recovered-objects h3,
body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-code-panel h3 {
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-section-copy {
  gap: 4px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-recovered-inventory {
  gap: 10px;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-landing-recovered-objects .archive-recovered-object-strip {
  gap: clamp(0.65rem, 1.4vw, 0.95rem);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-landing-recovered-objects .archive-recovered-object-card {
  min-height: 112px;
  grid-template-rows: 52px auto;
  padding: 0.65rem;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-landing-recovered-objects .archive-recovered-object-card__icon img {
  width: min(100%, 48px);
  height: min(100%, 48px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-landing-recovered-objects .archive-view-recovered-items-btn {
  min-height: 40px;
  padding: 0.6rem 0.95rem;
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-remembers-panel {
  min-height: 132px;
  gap: clamp(14px, 2.8vw, 30px);
  padding: clamp(16px, 2.4vw, 24px);
}

body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-remembers-panel span {
  line-height: 1.5;
}

@media (min-width: 901px) and (max-width: 1366px), (min-width: 901px) and (max-height: 850px) {
  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-room-shell {
    gap: clamp(14px, 2.4vw, 28px);
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation {
    min-height: clamp(330px, 42vh, 420px);
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation__content {
    padding: clamp(22px, 3.6vw, 36px);
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-stage {
    padding: clamp(16px, 2.2vw, 22px);
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-feature-art {
    width: min(100%, 290px);
    max-width: 290px;
  }
}

@media (max-width: 1040px) {
  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation {
    min-height: clamp(360px, 58vw, 500px);
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-card {
    flex-basis: 176px;
    width: 176px;
    min-width: 176px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-stage {
    grid-template-columns: 1fr;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-feature-art {
    width: min(100%, 300px);
    max-width: 300px;
  }
}

@media (max-width: 640px) {
  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-page {
    padding-bottom: 84px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-room-shell {
    gap: 16px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation {
    min-height: clamp(320px, 76vw, 400px);
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-invitation__content {
    padding: 22px 18px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-thumbnail-rail {
    padding-bottom: 12px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-card {
    flex-basis: 164px;
    width: 164px;
    min-width: 164px;
    min-height: 314px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-stage {
    gap: 14px;
    padding: 16px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-info-grid {
    grid-template-columns: 1fr;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-chamber-feature-art {
    width: min(100%, 260px);
    max-width: 260px;
    max-height: 390px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-landing-recovered-objects .archive-recovered-object-card {
    min-height: 108px;
  }

  body.blood-moon-mode:not(.entry-desk-page):not(.noctis-room-page) .archive-remembers-panel {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 10px;
    padding: 18px;
  }
}

/* Recovered Inventory slots: shared by the archive landing inventory and Entry Desk recovered findings. */
body.blood-moon-mode .archive-landing-recovered-objects,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-objects,
body.entry-desk-page .archive-recovered-objects.entry-desk-findings-section {
  gap: clamp(0.9rem, 1.8vw, 1.25rem);
  min-height: 0;
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
}

body.blood-moon-mode .archive-landing-recovered-objects {
  background:
    linear-gradient(90deg, rgba(8, 0, 5, 0.96) 0%, rgba(12, 0, 7, 0.88) 52%, rgba(18, 0, 8, 0.42) 100%),
    radial-gradient(circle at 16% 24%, rgba(255, 35, 65, 0.12), transparent 32%),
    url("../assets/images/recovered-objects-section.webp") center right / cover no-repeat;
}

.archive-recovered-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.archive-recovered-count {
  margin: 0;
  flex: 0 0 auto;
  color: rgba(255, 226, 218, 0.84);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: right;
}

body.blood-moon-mode .archive-recovered-objects h3,
body.entry-desk-page .archive-recovered-objects h3 {
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  letter-spacing: 0.08em;
}

body.blood-moon-mode .archive-recovered-object-strip,
body.entry-desk-page .archive-recovered-object-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.4vw, 1rem);
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 74px minmax(0, auto);
  align-items: start;
  gap: 0.55rem;
  min-height: 136px;
  border: 1px solid color-mix(in srgb, var(--artifact-accent, rgba(255, 35, 77, 0.7)) 40%, rgba(255, 35, 77, 0.28));
  border-radius: 14px;
  padding: 0.8rem;
  overflow: hidden;
  color: rgba(255, 232, 218, 0.9);
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--artifact-accent-soft, rgba(255, 35, 77, 0.14)) 34%, transparent), transparent 26%),
    linear-gradient(145deg, rgba(18, 1, 8, 0.9), rgba(7, 0, 4, 0.82));
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 10px 26px rgba(0, 0, 0, 0.2);
  transform: none;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card::before,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card::before,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 26%, color-mix(in srgb, var(--artifact-accent, rgba(255, 35, 77, 0.7)) 5%, transparent), transparent 21%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
  pointer-events: none;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card__icon,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__icon,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__icon {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  height: 82px;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__icon img,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__icon img {
  width: min(100%, 82px);
  height: min(100%, 82px);
  filter:
    drop-shadow(0 0 1.25px color-mix(in srgb, var(--artifact-accent, rgba(255, 35, 77, 0.7)) 6%, transparent))
    drop-shadow(0 5px 8px rgba(0, 0, 0, 0.2));
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card__copy,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__copy,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__copy {
  position: relative;
  z-index: 1;
  display: grid;
  grid-column: 1;
  gap: 0.28rem;
  align-content: end;
  min-width: 0;
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card__copy strong,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card__copy strong,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card__copy strong {
  color: rgba(255, 244, 216, 0.96);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1;
  -webkit-line-clamp: 1;
}

.archive-recovered-object-card__meta {
  color: color-mix(in srgb, var(--artifact-accent, rgba(255, 116, 126, 0.86)) 82%, rgba(255, 244, 216, 0.88));
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
}

.archive-recovered-object-card__status {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--artifact-accent, rgba(255, 116, 126, 0.82)) 48%, rgba(255, 232, 218, 0.16));
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  color: rgba(255, 232, 218, 0.9);
  background: rgba(44, 3, 13, 0.62);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.archive-recovered-object-card__arrow {
  position: relative;
  z-index: 1;
  grid-column: 2;
  align-self: end;
  justify-self: end;
  color: color-mix(in srgb, var(--artifact-accent, rgba(255, 35, 77, 0.9)) 86%, #fff1d6);
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 0 10px color-mix(in srgb, var(--artifact-accent, rgba(255, 35, 77, 0.9)) 42%, transparent);
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card.is-recovered:hover,
body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card.is-recovered:focus-visible,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card.is-recovered:hover,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card.is-recovered:focus-visible,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card.is-recovered:hover,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card.is-recovered:focus-visible {
  border-color: color-mix(in srgb, var(--artifact-accent, rgba(255, 35, 77, 0.9)) 72%, rgba(255, 232, 218, 0.24));
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 0 0 1px rgba(255, 226, 205, 0.1),
    0 0 10px color-mix(in srgb, var(--artifact-accent, rgba(255, 35, 77, 0.9)) 10%, transparent),
    0 16px 32px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card.is-recovered:hover .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card.is-recovered:focus-visible .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card.is-recovered:hover .archive-recovered-object-card__icon img,
body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card.is-recovered:focus-visible .archive-recovered-object-card__icon img,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card.is-recovered:hover .archive-recovered-object-card__icon img,
body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card.is-recovered:focus-visible .archive-recovered-object-card__icon img {
  transform: scale(1.05);
}

body.no-glow .archive-recovered-object-card,
body.no-glow .archive-recovered-object-card:hover,
body.no-glow .archive-recovered-object-card:focus-visible,
html.no-glow .archive-recovered-object-card,
html.no-glow .archive-recovered-object-card:hover,
html.no-glow .archive-recovered-object-card:focus-visible {
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}

body.no-glow .archive-recovered-object-card__icon img,
html.no-glow .archive-recovered-object-card__icon img {
  filter: none !important;
}

@media (max-width: 760px) {
  .archive-recovered-header {
    align-items: start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .archive-recovered-count {
    text-align: left;
  }

  body.blood-moon-mode .archive-recovered-object-strip,
  body.entry-desk-page .archive-recovered-object-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.blood-moon-mode .archive-landing-recovered-objects .archive-recovered-object-card,
  body.blood-moon-mode .archive-recovery-stack .archive-recovered-object-card,
  body.entry-desk-page .entry-desk-findings-section .archive-recovered-object-card {
    min-height: 128px;
    padding: 0.7rem;
  }
}

/* Mobile Noctis utility cards become swipe rails instead of stacked columns. */
@media (max-width: 900px) {
  body.gallery-page .gallery-bottom-grid,
  body.entry-desk-page .entry-desk-activity-grid {
    display: flex;
    grid-template-columns: none;
    gap: 0.85rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body.gallery-page .gallery-bottom-card,
  body.entry-desk-page .entry-desk-activity-card {
    flex: 0 0 min(84vw, 360px);
    width: min(84vw, 360px);
    min-width: min(84vw, 360px);
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  body.entry-desk-page .entry-desk-hero {
    width: 100%;
    margin-left: 0;
    border-radius: 22px;
  }
}
