:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #637083;
  --paper: #eef3f7;
  --paper-2: #dfe8ef;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --surface-dark: rgba(18, 27, 39, 0.74);
  --line: rgba(255, 255, 255, 0.68);
  --line-dark: rgba(23, 32, 42, 0.1);
  --red: #b83232;
  --red-dark: #842626;
  --indigo: #22385d;
  --blue: #2f73d9;
  --green: #477760;
  --sea: #b8d7df;
  --gold: #c78d31;
  --violet: #7657d4;
  --shadow: 0 24px 70px rgba(31, 43, 58, 0.14);
  --shadow-hover: 0 30px 90px rgba(31, 43, 58, 0.22);
  --blur: blur(22px) saturate(1.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(120deg, rgba(184, 50, 50, 0.11), transparent 34%),
    linear-gradient(210deg, rgba(47, 115, 217, 0.13), transparent 38%),
    linear-gradient(0deg, rgba(71, 119, 96, 0.1), transparent 48%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, "SF Pro Text", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  min-height: 100svh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 32, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 86%);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid rgba(47, 115, 217, 0.42);
  outline-offset: 3px;
}

.audio-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(245, 231, 206, 0.35);
  border-radius: 50%;
  background: rgba(21, 19, 17, 0.72);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow:
    0 22px 60px rgba(23, 32, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.audio-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 231, 206, 0.62);
  box-shadow:
    0 28px 72px rgba(23, 32, 42, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.vinyl-disc {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f1d49b 0 5px, #7f2d2a 6px 12px, transparent 13px),
    repeating-radial-gradient(circle at 50% 50%, #111 0 3px, #27231f 4px 5px, #0b0b0b 6px 8px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 18px rgba(0, 0, 0, 0.72),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.vinyl-disc::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vinyl-disc::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 10px;
  top: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 62%);
  filter: blur(0.4px);
}

.audio-toggle.is-playing .vinyl-disc {
  animation: spinRecord 4.8s linear infinite;
}

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

@keyframes spinRecord {
  to {
    transform: rotate(360deg);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(239, 245, 249, 0.68);
  backdrop-filter: var(--blur);
  box-shadow: 0 10px 40px rgba(23, 32, 42, 0.06);
}

.nav {
  width: min(1160px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.nav-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--violet));
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(184, 50, 50, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.nav-actions {
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted);
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-actions a {
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-actions a:hover {
  background: rgba(255, 255, 255, 0.78);
  color: var(--indigo);
  transform: translateY(-1px);
}

.hero {
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  align-items: stretch;
  overflow: hidden;
}

.hero-art {
  position: relative;
  min-height: 560px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    var(--sea);
  isolation: isolate;
}

.sun {
  position: absolute;
  width: clamp(180px, 28vw, 340px);
  aspect-ratio: 1;
  left: 16%;
  top: 12%;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 18px rgba(184, 50, 50, 0.12);
}

.mountain {
  position: absolute;
  left: 8%;
  bottom: 19%;
  width: 78%;
  height: 35%;
  clip-path: polygon(0 100%, 24% 42%, 38% 62%, 58% 12%, 100% 100%);
  background: var(--indigo);
}

.mountain-b {
  left: 26%;
  bottom: 22%;
  width: 58%;
  height: 26%;
  background: #6d796a;
  opacity: 0.86;
}

.wave {
  position: absolute;
  left: -5%;
  right: -5%;
  height: 120px;
  bottom: 0;
  background:
    radial-gradient(70px 44px at 52px 20px, transparent 34px, var(--paper) 35px 47px, transparent 48px) 0 0 / 122px 70px repeat-x,
    linear-gradient(var(--paper), var(--paper));
}

.wave-b {
  bottom: 52px;
  opacity: 0.45;
  transform: translateX(36px);
}

.gate {
  position: absolute;
  right: 9%;
  bottom: 22%;
  width: 150px;
  height: 150px;
}

.gate::before,
.gate::after,
.gate span {
  content: "";
  position: absolute;
  background: var(--red-dark);
}

.gate::before {
  width: 100%;
  height: 16px;
  top: 0;
  left: 0;
  box-shadow: 0 28px 0 var(--red-dark);
}

.gate::after {
  width: 126%;
  height: 14px;
  top: -18px;
  left: -13%;
}

.gate span {
  width: 18px;
  height: 122px;
  top: 28px;
}

.gate span:first-child {
  left: 22px;
}

.gate span:last-child {
  right: 22px;
}

.hero-content {
  padding: clamp(42px, 8vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(238, 243, 247, 0.7), rgba(238, 243, 247, 0.92) 34%),
    repeating-linear-gradient(0deg, rgba(23, 32, 42, 0.035) 0 1px, transparent 1px 18px);
  backdrop-filter: blur(16px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(44px, 6.8vw, 92px);
  line-height: 0.98;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.hero-copy {
  max-width: 610px;
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}

.hero-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button,
.filter,
.era {
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 14px 30px rgba(31, 43, 58, 0.12);
}

.button:hover,
.filter:hover,
.era:hover {
  transform: translateY(-2px);
}

.primary {
  background: linear-gradient(135deg, var(--red), #d55d48);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.ghost {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: var(--blur);
  color: var(--ink);
}

.fortune {
  min-height: 28px;
  margin: 18px 0 0;
  color: var(--red-dark);
  font-weight: 800;
}

.stats {
  width: min(1160px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stats div {
  min-height: 108px;
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid rgba(23, 32, 42, 0.08);
  transition: background 180ms ease, transform 180ms ease;
}

.stats div:hover {
  background: rgba(255, 255, 255, 0.38);
}

.stats div:last-child {
  border-right: 0;
}

.stats strong {
  font-size: 34px;
}

.stats span,
.section-note {
  color: var(--muted);
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 86px auto;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter,
.era {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 14px;
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: var(--blur);
  color: var(--muted);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(31, 43, 58, 0.08);
}

.filter.active,
.era.active {
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  border-color: rgba(255, 255, 255, 0.28);
  color: white;
}

.timeline-wrap {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  align-items: start;
}

.era-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.event {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  box-shadow: 0 14px 42px rgba(31, 43, 58, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.event::before,
.archive-card::before,
.lens-grid article::before,
.map-info::before,
.gift::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 42%);
  opacity: 0.72;
}

.event:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-hover);
}

.event-year {
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.event p {
  margin-bottom: 10px;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(47, 115, 217, 0.11);
  color: var(--indigo);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(47, 115, 217, 0.12);
}

.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 22px;
  align-items: stretch;
}

.map-card,
.map-info,
.lens-grid article,
.gift {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.map-card:hover,
.map-info:hover,
.lens-grid article:hover,
.gift:hover,
.archive-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.map-card {
  min-height: 520px;
  overflow: hidden;
}

.real-map {
  width: 100%;
  min-height: 520px;
  height: 100%;
  background: #d8eef0;
  border-radius: 8px;
  overflow: hidden;
}

.leaflet-container {
  font-family: Inter, "SF Pro Text", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(31, 43, 58, 0.18);
}

.leaflet-popup-content {
  margin: 14px 16px;
}

.leaflet-popup-content strong {
  display: block;
  margin-bottom: 4px;
}

.leaflet-control-attribution {
  font-size: 11px;
}

.leaflet-control-zoom a {
  border: 0 !important;
  background: rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: var(--blur);
  color: var(--ink) !important;
  transition: background 180ms ease, transform 180ms ease;
}

.leaflet-control-zoom a:hover {
  background: rgba(255, 255, 255, 0.94) !important;
}

.map-info {
  padding: 24px;
}

.map-info > * {
  position: relative;
}

.map-info ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.archive-card {
  display: grid;
  grid-template-rows: 210px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.archive-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: var(--paper-2);
  display: block;
  filter: saturate(0.96) contrast(1.02);
  transition: transform 420ms ease, filter 220ms ease;
}

.archive-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.04);
}

.archive-card div {
  padding: 16px;
  position: relative;
}

.archive-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.archive-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.archive-card a {
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(184, 50, 50, 0.08);
  transition: background 180ms ease, transform 180ms ease;
}

.archive-card a:hover {
  background: rgba(184, 50, 50, 0.15);
  transform: translateY(-1px);
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.lens-grid article {
  min-height: 238px;
  padding: 22px;
}

.lens-grid article > * {
  position: relative;
}

.lens-grid span {
  color: var(--red);
  font-weight: 900;
}

.lens-grid p {
  color: var(--muted);
}

.gift {
  width: min(1160px, calc(100% - 32px));
  margin: 80px auto;
  padding: clamp(26px, 5vw, 46px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background:
    linear-gradient(120deg, rgba(184, 50, 50, 0.14), rgba(47, 115, 217, 0.14)),
    var(--surface-strong);
}

.gift p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.gift-dialog {
  width: min(560px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--blur);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.gift-dialog::backdrop {
  background: rgba(30, 36, 40, 0.46);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--blur);
  cursor: pointer;
}

.jp {
  color: var(--red-dark);
  font-weight: 900;
}

.footer {
  padding: 28px 16px 40px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero,
  .map-grid,
  .timeline-wrap {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 360px;
    order: 1;
  }

  .hero-content {
    order: 2;
  }

  .stats,
  .lens-grid,
  .archive-grid {
    grid-template-columns: 1fr 1fr;
  }

  .era-panel {
    position: static;
    display: flex;
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 34px 16px 46px;
  }

  .stats,
  .lens-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats div:last-child {
    border-bottom: 0;
  }

  .section-head,
  .gift {
    align-items: stretch;
    flex-direction: column;
  }

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

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

/* Museum exhibition direction */
:root {
  color-scheme: dark;
  --ink: #f2eadc;
  --muted: #b9ad9b;
  --paper: #171512;
  --paper-2: #252019;
  --surface: rgba(37, 32, 25, 0.88);
  --surface-strong: rgba(47, 40, 31, 0.94);
  --line: rgba(216, 190, 148, 0.22);
  --line-dark: rgba(242, 234, 220, 0.12);
  --red: #a84b3d;
  --red-dark: #d89d77;
  --indigo: #d8be94;
  --blue: #8f7350;
  --green: #84906f;
  --sea: #34302a;
  --gold: #c7a76a;
  --violet: #775f49;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --shadow-hover: 0 34px 96px rgba(0, 0, 0, 0.42);
  --blur: blur(10px) saturate(1.05);
}

body {
  background:
    linear-gradient(180deg, rgba(82, 61, 42, 0.22), transparent 340px),
    radial-gradient(circle at 18% 0%, rgba(168, 75, 61, 0.16), transparent 34%),
    var(--paper);
  font-family: Inter, "SF Pro Text", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

body::before {
  background-image:
    linear-gradient(rgba(216, 190, 148, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 190, 148, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 72%);
}

.site-header {
  border-bottom-color: rgba(216, 190, 148, 0.18);
  background: rgba(23, 21, 18, 0.84);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.brand-mark {
  border-radius: 8px;
  background: #a84b3d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 28px rgba(0, 0, 0, 0.28);
}

.nav-actions {
  border-color: rgba(216, 190, 148, 0.18);
  border-radius: 8px;
  background: rgba(37, 32, 25, 0.72);
  box-shadow: none;
}

.nav-actions a {
  border-radius: 6px;
}

.nav-actions a:hover {
  background: rgba(216, 190, 148, 0.12);
  color: var(--ink);
}

.hero {
  min-height: calc(92svh - 64px);
  background: #171512;
}

.hero-art {
  margin: 0;
  min-height: 560px;
  background: #0f0e0c;
  display: grid;
  align-content: stretch;
  position: relative;
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.05) brightness(0.72);
  transform: scale(1.02);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 42%, rgba(23, 21, 18, 0.56)), linear-gradient(0deg, rgba(23, 21, 18, 0.18), transparent 36%);
  pointer-events: none;
}

.hero-art figcaption {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 1;
  max-width: min(440px, calc(100% - 48px));
  padding: 8px 10px;
  border: 1px solid rgba(216, 190, 148, 0.24);
  border-radius: 6px;
  background: rgba(23, 21, 18, 0.72);
  color: #d7c8af;
  font-size: 12px;
}

.hero-content {
  background: linear-gradient(90deg, rgba(23, 21, 18, 0.72), #171512 32%);
  backdrop-filter: none;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  font-size: clamp(46px, 6.2vw, 86px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(30px, 3.7vw, 52px);
}

.eyebrow {
  color: var(--gold);
  font-size: 11px;
}

.button,
.filter,
.era {
  border-radius: 8px;
}

.button {
  box-shadow: none;
}

.primary {
  background: #a84b3d;
}

.ghost,
.filter,
.era {
  border-color: rgba(216, 190, 148, 0.24);
  background: rgba(37, 32, 25, 0.76);
  backdrop-filter: none;
  color: #d7c8af;
  box-shadow: none;
}

.filter.active,
.era.active {
  background: #d8be94;
  border-color: #d8be94;
  color: #171512;
}

.exhibition-note,
.stats,
.event,
.map-card,
.map-info,
.archive-card,
.lens-grid article,
.room-grid article,
.gift {
  border: 1px solid rgba(216, 190, 148, 0.22);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: none;
  box-shadow: var(--shadow);
}

.exhibition-note {
  width: min(1160px, calc(100% - 32px));
  margin: -42px auto 48px;
  position: relative;
  z-index: 6;
  padding: clamp(22px, 4vw, 34px);
}

.exhibition-note p:last-child {
  max-width: 900px;
  margin-bottom: 0;
  color: #d7c8af;
  font-size: 18px;
}

.stats {
  margin-top: 0;
}

.stats div,
.stats div:last-child {
  border-color: rgba(216, 190, 148, 0.16);
}

.stats div:hover {
  background: rgba(216, 190, 148, 0.06);
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.room-grid article {
  min-height: 250px;
  padding: 22px;
}

.room-grid span,
.lens-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.room-grid p {
  color: var(--muted);
}

.thesis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.thesis-grid article {
  min-height: 230px;
  padding: 22px;
  border: 1px solid rgba(216, 190, 148, 0.22);
  border-radius: 8px;
  background: rgba(37, 32, 25, 0.88);
  box-shadow: var(--shadow);
}

.thesis-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.thesis-grid p {
  color: var(--muted);
}

.event::before,
.archive-card::before,
.lens-grid article::before,
.map-info::before,
.gift::before {
  display: none;
}

.event:hover,
.map-card:hover,
.map-info:hover,
.lens-grid article:hover,
.gift:hover,
.archive-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.event-year {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
}

.tag {
  border-color: rgba(216, 190, 148, 0.2);
  background: rgba(216, 190, 148, 0.1);
  color: #d8be94;
}

.real-map,
.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.leaflet-popup-content-wrapper,
.leaflet-control-zoom a {
  background: rgba(37, 32, 25, 0.92) !important;
  color: var(--ink) !important;
  border-color: rgba(216, 190, 148, 0.22);
  backdrop-filter: none;
}

.archive-card {
  grid-template-rows: 230px auto;
}

.archive-card img {
  height: 230px;
  filter: saturate(0.82) contrast(1.04) brightness(0.86);
}

.archive-card:hover img {
  transform: scale(1.018);
  filter: saturate(0.92) contrast(1.05) brightness(0.92);
}

.hero-art.image-failed img,
.archive-card.image-failed img {
  display: none;
}

.hero-art.image-failed::before,
.archive-card.image-failed::after {
  content: "Imagen no disponible";
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 24px;
  color: var(--gold);
  background:
    linear-gradient(135deg, rgba(216, 190, 148, 0.12), transparent),
    rgba(23, 21, 18, 0.72);
  border-bottom: 1px solid rgba(216, 190, 148, 0.18);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-art.image-failed::before {
  min-height: 560px;
  border-bottom: 0;
}

.archive-card a {
  border-radius: 6px;
  background: rgba(216, 190, 148, 0.1);
  color: var(--gold);
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-list a {
  display: block;
  padding: 14px 16px;
  border: 1px solid rgba(216, 190, 148, 0.18);
  border-radius: 6px;
  color: #d7c8af;
  background: rgba(23, 21, 18, 0.3);
  transition: border-color 180ms ease, background 180ms ease;
}

.source-list a:hover {
  border-color: rgba(216, 190, 148, 0.42);
  background: rgba(216, 190, 148, 0.08);
}

.gift {
  background: var(--surface-strong);
}

.gift-dialog {
  border-radius: 8px;
  background: rgba(37, 32, 25, 0.96);
  backdrop-filter: none;
}

@media (max-width: 1100px) {
  .room-grid,
  .thesis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .room-grid,
  .thesis-grid {
    grid-template-columns: 1fr;
  }
}

/* Ukiyo-e exhibition direction */
:root {
  color-scheme: light;
  --ink: #1f2a35;
  --muted: #6f6557;
  --paper: #f3ead7;
  --paper-2: #e3d4b6;
  --surface: rgba(255, 249, 235, 0.82);
  --surface-strong: rgba(255, 247, 226, 0.94);
  --line: rgba(39, 58, 83, 0.18);
  --line-dark: rgba(31, 42, 53, 0.14);
  --red: #b64032;
  --red-dark: #8d2d25;
  --indigo: #243c5a;
  --blue: #376f8f;
  --green: #687b4c;
  --sea: #a9c5c2;
  --gold: #b47a2c;
  --violet: #5d4a68;
  --shadow: 0 22px 58px rgba(79, 59, 35, 0.16);
  --shadow-hover: 0 30px 74px rgba(79, 59, 35, 0.22);
  --blur: blur(16px) saturate(1.18);
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(182, 64, 50, 0.16), transparent 26rem),
    radial-gradient(circle at 86% 14%, rgba(55, 111, 143, 0.18), transparent 25rem),
    linear-gradient(180deg, rgba(255, 249, 235, 0.86), rgba(243, 234, 215, 0.96)),
    var(--paper);
  color: var(--ink);
}

body::before {
  background-image:
    linear-gradient(90deg, rgba(96, 73, 43, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(96, 73, 43, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 1px 1px, rgba(96, 73, 43, 0.12) 1px, transparent 0);
  background-size: 42px 42px, 42px 42px, 18px 18px;
  mask-image: none;
}

body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 34vh;
  pointer-events: none;
  background:
    radial-gradient(72px 38px at 72px 0, transparent 36px, rgba(36, 60, 90, 0.16) 37px 40px, transparent 41px) 0 0 / 144px 74px repeat-x,
    radial-gradient(72px 38px at 0 0, transparent 36px, rgba(182, 64, 50, 0.12) 37px 40px, transparent 41px) 72px 22px / 144px 74px repeat-x;
  opacity: 0.72;
}

.site-header {
  border-bottom: 1px solid rgba(36, 60, 90, 0.2);
  background: rgba(255, 249, 235, 0.78);
  backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 10px 34px rgba(79, 59, 35, 0.1);
}

.brand {
  color: var(--indigo);
}

.brand-mark {
  border-radius: 50% 48% 44% 52%;
  background: var(--red);
  color: #fff7e5;
  box-shadow: inset 0 -4px 0 rgba(31, 42, 53, 0.15), 0 10px 24px rgba(182, 64, 50, 0.24);
}

.nav-actions {
  border-color: rgba(36, 60, 90, 0.16);
  border-radius: 999px;
  background: rgba(255, 249, 235, 0.72);
  color: var(--muted);
}

.nav-actions a {
  border-radius: 999px;
}

.nav-actions a:hover {
  background: rgba(36, 60, 90, 0.1);
  color: var(--indigo);
}

.hero {
  min-height: calc(100svh - 64px);
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, 0.84fr);
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(255, 249, 235, 0.32), rgba(255, 249, 235, 0.94) 55%),
    var(--paper);
}

.hero-art {
  margin: 24px 0 24px 24px;
  min-height: 610px;
  border: 12px solid #23384f;
  border-right-width: 8px;
  border-bottom-color: #b64032;
  background: #eadbbd;
  box-shadow:
    0 28px 72px rgba(79, 59, 35, 0.24),
    inset 0 0 0 1px rgba(255, 249, 235, 0.54);
}

.hero-art img {
  min-height: 610px;
  filter: saturate(1.05) contrast(1.08) brightness(0.96) sepia(0.08);
  transform: scale(1.01);
}

.hero-art::after {
  background:
    linear-gradient(90deg, transparent 52%, rgba(243, 234, 215, 0.36)),
    repeating-linear-gradient(0deg, rgba(31, 42, 53, 0.055) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
}

.hero-art figcaption {
  left: 18px;
  bottom: 18px;
  border: 1px solid rgba(31, 42, 53, 0.2);
  border-radius: 2px;
  background: rgba(255, 249, 235, 0.86);
  color: var(--indigo);
}

.hero-content {
  position: relative;
  padding: 84px clamp(34px, 6rem, 94px);
  background:
    linear-gradient(90deg, rgba(243, 234, 215, 0.12), rgba(255, 249, 235, 0.9) 32%),
    repeating-linear-gradient(90deg, rgba(36, 60, 90, 0.04) 0 1px, transparent 1px 24px);
  backdrop-filter: none;
}

.hero-content::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: 38px;
  top: 46px;
  border-radius: 50%;
  background: rgba(182, 64, 50, 0.13);
  box-shadow: inset 0 0 0 10px rgba(182, 64, 50, 0.05);
}

.vertical-seal {
  position: absolute;
  right: clamp(18px, 3rem, 42px);
  top: 156px;
  z-index: 1;
  margin: 0;
  padding: 12px 8px;
  writing-mode: vertical-rl;
  border: 2px solid rgba(141, 45, 37, 0.74);
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 247, 226, 0.78);
}

h1,
h2,
h3 {
  color: var(--indigo);
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-weight: 700;
}

h1 {
  max-width: 680px;
  font-size: 4.75rem;
  line-height: 0.96;
}

h2 {
  font-size: 3rem;
  line-height: 1.02;
}

h3 {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
}

.eyebrow {
  color: var(--red-dark);
  font-size: 0.72rem;
}

.hero-copy,
.section-note,
.event p,
.archive-card p,
.lens-grid p,
.room-grid p,
.thesis-grid p,
.gift p,
.map-info ul {
  color: var(--muted);
}

.button,
.filter,
.era {
  border-radius: 3px;
}

.button {
  box-shadow: 5px 5px 0 rgba(36, 60, 90, 0.16);
}

.primary {
  background: var(--red);
  color: #fff7e5;
}

.ghost,
.filter,
.era {
  border-color: rgba(36, 60, 90, 0.16);
  background: rgba(255, 249, 235, 0.82);
  color: var(--indigo);
  box-shadow: 4px 4px 0 rgba(36, 60, 90, 0.08);
}

.filter.active,
.era.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff7e5;
}

.exhibition-note,
.stats,
.event,
.map-card,
.map-info,
.archive-card,
.lens-grid article,
.room-grid article,
.thesis-grid article,
.gift,
.gift-dialog {
  border: 1px solid rgba(36, 60, 90, 0.18);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 46%),
    var(--surface);
  backdrop-filter: blur(10px) saturate(1.06);
  box-shadow: var(--shadow);
}

.exhibition-note,
.gift {
  border-left: 8px solid var(--red);
}

.stats {
  border-top: 8px solid var(--indigo);
}

.stats strong,
.event-year,
.room-grid span,
.lens-grid span,
.thesis-grid span {
  color: var(--red-dark);
}

.section {
  margin: 104px auto;
}

.section-head {
  position: relative;
  padding-bottom: 16px;
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(360px, 52vw);
  height: 4px;
  background:
    linear-gradient(90deg, var(--red) 0 28%, var(--indigo) 28% 72%, var(--gold) 72%);
}

.room-grid,
.thesis-grid,
.lens-grid {
  gap: 18px;
}

.room-grid article,
.thesis-grid article,
.lens-grid article {
  position: relative;
  overflow: hidden;
}

.room-grid article::after,
.thesis-grid article::after,
.lens-grid article::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -32px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 18px solid rgba(36, 60, 90, 0.06);
}

.event {
  grid-template-columns: 132px 1fr;
  border-left: 6px solid var(--indigo);
}

.event:hover,
.map-card:hover,
.map-info:hover,
.lens-grid article:hover,
.gift:hover,
.archive-card:hover,
.room-grid article:hover,
.thesis-grid article:hover {
  transform: translateY(-4px) rotate(-0.15deg);
  box-shadow: var(--shadow-hover);
}

.tag {
  border-color: rgba(36, 60, 90, 0.16);
  border-radius: 3px;
  background: rgba(55, 111, 143, 0.1);
  color: var(--indigo);
}

.map-card {
  border: 10px solid #23384f;
  padding: 0;
}

.real-map {
  border-radius: 0;
  filter: saturate(0.8) contrast(1.05);
}

.leaflet-popup-content-wrapper,
.leaflet-control-zoom a {
  background: rgba(255, 249, 235, 0.94) !important;
  color: var(--ink) !important;
  border: 1px solid rgba(36, 60, 90, 0.18);
}

.archive-grid {
  grid-template-columns: 1.12fr 0.88fr 1fr 1.04fr;
  gap: 18px;
}

.archive-card {
  grid-template-rows: 240px auto;
}

.archive-card:nth-child(3n + 1) {
  transform: translateY(12px);
}

.archive-card:nth-child(4n) {
  transform: translateY(-10px);
}

.archive-card img {
  height: 240px;
  filter: saturate(0.96) contrast(1.12) brightness(0.98) sepia(0.08);
}

.archive-card:hover img {
  filter: saturate(1.06) contrast(1.15) brightness(1);
}

.archive-card a,
.source-list a {
  border-radius: 3px;
  color: var(--red-dark);
  background: rgba(182, 64, 50, 0.08);
}

.source-list a {
  border-color: rgba(36, 60, 90, 0.16);
  color: var(--indigo);
}

.source-list a:hover {
  border-color: rgba(182, 64, 50, 0.34);
  background: rgba(182, 64, 50, 0.08);
}

.gift {
  background:
    radial-gradient(circle at 100% 0, rgba(182, 64, 50, 0.16), transparent 18rem),
    var(--surface-strong);
}

.gift-dialog {
  color: var(--ink);
}

.jp {
  color: var(--red-dark);
}

.footer {
  color: var(--muted);
}

.audio-toggle {
  border-color: rgba(36, 60, 90, 0.22);
  background: rgba(255, 249, 235, 0.76);
}

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

  .hero-art {
    margin: 16px;
    min-height: 430px;
  }

  .hero-art img {
    min-height: 430px;
  }

  .hero-content {
    padding: 48px 24px 58px;
  }

  .vertical-seal {
    top: 42px;
  }

  h1 {
    font-size: 3.3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

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

  .archive-card:nth-child(n) {
    transform: none;
  }
}

@media (max-width: 620px) {
  .hero-art {
    border-width: 8px;
    min-height: 330px;
  }

  .hero-art img {
    min-height: 330px;
  }

  .vertical-seal {
    display: none;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 2rem;
  }

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

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

/* Floating World redesign: final art direction */
:root {
  color-scheme: light;
  --ink: #182232;
  --muted: #655f55;
  --paper: #f5ead2;
  --paper-2: #ddc69c;
  --surface: rgba(255, 248, 229, 0.9);
  --surface-strong: rgba(255, 244, 215, 0.96);
  --line: rgba(24, 34, 50, 0.18);
  --red: #bd3d2f;
  --red-dark: #8f2d24;
  --indigo: #17375f;
  --blue: #2f7394;
  --green: #5d7046;
  --gold: #b7802e;
  --shadow: 10px 10px 0 rgba(23, 55, 95, 0.11);
  --shadow-hover: 14px 14px 0 rgba(23, 55, 95, 0.16);
}

html {
  scroll-padding-top: 110px;
}

body {
  background:
    linear-gradient(90deg, rgba(23, 55, 95, 0.055) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(23, 55, 95, 0.04) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 14% 9%, rgba(189, 61, 47, 0.18), transparent 19rem),
    radial-gradient(circle at 88% 0%, rgba(47, 115, 148, 0.2), transparent 22rem),
    var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  background:
    radial-gradient(44px 26px at 44px 0, transparent 25px, rgba(23, 55, 95, 0.1) 26px 29px, transparent 30px) 0 100% / 88px 52px repeat-x,
    radial-gradient(44px 26px at 0 0, transparent 25px, rgba(189, 61, 47, 0.09) 26px 29px, transparent 30px) 44px calc(100% - 18px) / 88px 52px repeat-x;
  opacity: 0.9;
  mask-image: linear-gradient(to top, black, transparent 62%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(97deg, rgba(82, 57, 30, 0.035) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(5deg, rgba(82, 57, 30, 0.025) 0 1px, transparent 1px 13px);
}

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--indigo));
  transform-origin: left center;
}

.site-header {
  background: rgba(245, 234, 210, 0.88);
  border-bottom: 2px solid rgba(24, 34, 50, 0.16);
  backdrop-filter: blur(14px);
  box-shadow: none;
}

.nav {
  width: min(1240px, calc(100% - 34px));
}

.brand {
  color: var(--indigo);
  letter-spacing: 0;
}

.brand-mark {
  border-radius: 3px;
  background: var(--red);
  box-shadow: 4px 4px 0 rgba(23, 55, 95, 0.14);
}

.nav-actions {
  border: 2px solid rgba(24, 34, 50, 0.14);
  border-radius: 0;
  background: rgba(255, 248, 229, 0.78);
  box-shadow: 5px 5px 0 rgba(23, 55, 95, 0.08);
}

.nav-actions a {
  border-radius: 0;
  color: var(--indigo);
}

.nav-actions a:hover,
.nav-actions a.is-active {
  background: var(--indigo);
  color: #fff7e5;
}

.hero {
  width: min(1320px, calc(100% - 32px));
  min-height: calc(100svh - 64px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  gap: 28px;
  align-items: center;
  background: transparent;
  overflow: hidden;
}

.hero-art {
  min-height: min(74svh, 760px);
  margin: 32px 0;
  border: 0;
  outline: 3px solid var(--indigo);
  outline-offset: -12px;
  background: #f0d6a4;
  box-shadow: 18px 18px 0 var(--indigo), 24px 24px 0 rgba(189, 61, 47, 0.24);
  transform: rotate(-1.1deg);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 2;
  pointer-events: none;
  border: 2px solid rgba(255, 248, 229, 0.7);
}

.hero-art img {
  min-height: min(74svh, 760px);
  filter: saturate(1.18) contrast(1.08) sepia(0.05);
}

.hero-art::after {
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 50%, rgba(24, 34, 50, 0.16)),
    repeating-linear-gradient(0deg, rgba(255, 248, 229, 0.1) 0 1px, transparent 1px 6px);
  mix-blend-mode: multiply;
}

.hero-art figcaption {
  z-index: 3;
  left: 28px;
  bottom: 28px;
  border: 2px solid rgba(24, 34, 50, 0.16);
  border-radius: 0;
  background: rgba(255, 248, 229, 0.9);
  color: var(--indigo);
  font-weight: 800;
}

.hero-content {
  min-height: 68svh;
  padding: clamp(28px, 4vw, 58px) clamp(30px, 4vw, 68px);
  display: flex;
  justify-content: center;
  border: 3px solid var(--red);
  background:
    linear-gradient(180deg, rgba(255, 248, 229, 0.96), rgba(255, 238, 202, 0.92)),
    repeating-linear-gradient(90deg, rgba(23, 55, 95, 0.045) 0 1px, transparent 1px 18px);
  box-shadow: 12px 12px 0 rgba(189, 61, 47, 0.14);
  overflow: hidden;
}

.hero-content::before {
  width: 132px;
  height: 132px;
  right: 28px;
  top: 28px;
  background: var(--red);
  opacity: 0.13;
  box-shadow: none;
}

.vertical-seal {
  right: 18px;
  top: 28px;
  border: 3px solid var(--red-dark);
  background: rgba(255, 248, 229, 0.84);
  color: var(--red-dark);
}

h1,
h2,
h3 {
  color: var(--indigo);
  text-wrap: balance;
}

h1 {
  max-width: 100%;
  font-size: clamp(3rem, 4.35vw, 5.25rem);
  line-height: 0.98;
  overflow-wrap: break-word;
  hyphens: auto;
}

h2 {
  font-size: clamp(2.15rem, 4.2vw, 4.6rem);
}

.eyebrow {
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 950;
}

.hero-copy {
  max-width: 100%;
  color: #4f4b43;
  font-size: 1.05rem;
}

.hero-controls {
  margin-top: 28px;
}

.button,
.filter,
.era {
  border: 2px solid var(--indigo);
  border-radius: 0;
  box-shadow: 5px 5px 0 rgba(23, 55, 95, 0.16);
}

.button:hover,
.filter:hover,
.era:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(23, 55, 95, 0.18);
}

.primary {
  background: var(--red);
  border-color: var(--red-dark);
  color: #fff7e5;
}

.ghost,
.filter,
.era {
  background: #fff4d8;
  color: var(--indigo);
}

.filter.active,
.era.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff7e5;
}

.exhibition-note,
.stats,
.section,
.gift {
  width: min(1240px, calc(100% - 34px));
}

.exhibition-note {
  margin: 32px auto 0;
  padding: clamp(24px, 3vw, 38px);
  border: 3px solid var(--indigo);
  border-left: 18px solid var(--red);
  border-radius: 0;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.exhibition-note p:last-child {
  color: #4f4b43;
}

.stats {
  margin: 28px auto 0;
  border: 3px solid var(--indigo);
  border-radius: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stats div {
  border-right: 2px solid rgba(24, 34, 50, 0.14);
}

.stats strong {
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
}

.section {
  margin: 118px auto;
}

.section-head {
  align-items: end;
  margin-bottom: 34px;
  padding-bottom: 20px;
}

.section-head::after {
  height: 7px;
  width: min(520px, 70vw);
  background:
    linear-gradient(90deg, var(--red) 0 18%, transparent 18% 21%, var(--indigo) 21% 78%, transparent 78% 81%, var(--gold) 81%);
}

.section-note {
  max-width: 440px;
  color: #5f594e;
}

.room-grid {
  grid-template-columns: 1.1fr 0.9fr 1fr;
  gap: 22px;
}

.room-grid article,
.thesis-grid article,
.lens-grid article,
.event,
.map-info,
.archive-card,
.gift {
  border: 3px solid rgba(24, 34, 50, 0.78);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.46), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.room-grid article,
.thesis-grid article,
.lens-grid article {
  padding: 28px;
}

.room-grid article:nth-child(2),
.room-grid article:nth-child(5) {
  transform: translateY(28px);
}

.room-grid article:hover,
.thesis-grid article:hover,
.lens-grid article:hover,
.event:hover,
.map-info:hover,
.archive-card:hover,
.gift:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hover);
}

.room-grid article:nth-child(2):hover,
.room-grid article:nth-child(5):hover {
  transform: translate(-4px, 20px);
}

.room-grid span,
.thesis-grid span,
.lens-grid span,
.event-year {
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
}

.room-grid article::after,
.thesis-grid article::after,
.lens-grid article::after {
  border-color: rgba(189, 61, 47, 0.09);
}

.thesis-grid {
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.thesis-grid article {
  min-height: 210px;
}

.timeline-wrap {
  grid-template-columns: minmax(170px, 0.25fr) minmax(0, 1fr);
  gap: 30px;
}

.era-panel {
  gap: 12px;
}

.timeline {
  gap: 18px;
}

.event {
  grid-template-columns: 128px 1fr;
  border-left: 12px solid var(--red);
}

.event p,
.archive-card p,
.lens-grid p,
.room-grid p,
.thesis-grid p,
.gift p,
.map-info ul {
  color: #5f594e;
}

.tag {
  border: 1px solid rgba(23, 55, 95, 0.22);
  border-radius: 0;
  background: rgba(47, 115, 148, 0.1);
  color: var(--indigo);
}

.map-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  gap: 28px;
}

.map-card {
  border: 12px solid var(--indigo);
  border-radius: 0;
  box-shadow: 16px 16px 0 rgba(189, 61, 47, 0.18);
}

.real-map {
  border-radius: 0;
  filter: saturate(0.82) contrast(1.04);
}

.map-info {
  padding: 30px;
}

.leaflet-popup-content-wrapper,
.leaflet-control-zoom a {
  border-radius: 0 !important;
  background: #fff4d8 !important;
  color: var(--ink) !important;
}

.archive-grid {
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
  gap: 22px;
}

.archive-card {
  grid-column: span 4;
  grid-template-rows: 260px auto;
  overflow: hidden;
}

.archive-card:nth-child(5n + 1) {
  grid-column: span 5;
}

.archive-card:nth-child(5n + 2) {
  grid-column: span 3;
  margin-top: 34px;
}

.archive-card:nth-child(5n + 4) {
  margin-top: -22px;
}

.archive-card img {
  height: 260px;
  filter: saturate(1.02) contrast(1.12) sepia(0.08);
}

.archive-card:hover img {
  transform: scale(1.045);
}

.archive-card a,
.source-list a {
  border-radius: 0;
}

.lens-grid {
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 22px;
}

.gift {
  border-left: 18px solid var(--red);
  background:
    radial-gradient(circle at 92% 20%, rgba(189, 61, 47, 0.14), transparent 18rem),
    var(--surface-strong);
}

.gift-dialog {
  border: 3px solid var(--indigo);
  border-radius: 0;
  background: #fff4d8;
}

.audio-toggle {
  right: 22px;
  bottom: 22px;
  border: 3px solid var(--indigo);
  background: rgba(255, 244, 216, 0.86);
  box-shadow: 6px 6px 0 rgba(23, 55, 95, 0.16);
}

.vinyl-disc {
  background:
    radial-gradient(circle at 50% 50%, #f5ead2 0 5px, var(--red) 6px 12px, transparent 13px),
    repeating-radial-gradient(circle at 50% 50%, #111 0 3px, #24211d 4px 5px, #080808 6px 8px);
}

.reveal-ready {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-art {
    min-height: 54svh;
    margin: 22px 18px 0 0;
  }

  .hero-art img {
    min-height: 54svh;
  }

  .hero-content {
    min-height: auto;
    margin-bottom: 34px;
  }

  .room-grid,
  .lens-grid {
    grid-template-columns: 1fr 1fr;
  }

  .archive-card,
  .archive-card:nth-child(5n + 1),
  .archive-card:nth-child(5n + 2) {
    grid-column: span 6;
    margin-top: 0;
  }
}

@media (max-width: 1280px) and (min-width: 1101px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.86fr);
  }

  h1 {
    font-size: clamp(2.85rem, 4.1vw, 4.6rem);
  }

  .hero-content {
    padding-right: 54px;
  }
}

@media (max-width: 720px) {
  .nav-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav-actions a {
    padding: 8px 6px;
    border: 1px solid rgba(24, 34, 50, 0.14);
    background: rgba(255, 248, 229, 0.74);
    text-align: center;
    font-size: 12px;
  }

  .hero {
    width: min(100% - 24px, 1320px);
  }

  .hero-art {
    outline-offset: -8px;
    box-shadow: 10px 10px 0 var(--indigo);
  }

  .hero-content {
    padding: 34px 20px 42px;
  }

  .vertical-seal {
    display: none;
  }

  .exhibition-note,
  .stats,
  .section,
  .gift {
    width: min(100% - 24px, 1240px);
  }

  .stats,
  .room-grid,
  .thesis-grid,
  .lens-grid,
  .map-grid,
  .timeline-wrap {
    grid-template-columns: 1fr;
  }

  .room-grid article:nth-child(n) {
    transform: none;
  }

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

  .archive-card,
  .archive-card:nth-child(5n + 1),
  .archive-card:nth-child(5n + 2) {
    grid-column: auto;
    margin-top: 0;
  }

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

/* Scroll narrative and ukiyo-e print cards */
:root {
  --scroll-ratio: 0;
}

.scroll-readout {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 31;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid var(--indigo);
  background: rgba(255, 244, 216, 0.88);
  color: var(--red-dark);
  box-shadow: 6px 6px 0 rgba(23, 55, 95, 0.14);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 900;
  pointer-events: none;
}

.scroll-readout::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(189, 61, 47, 0.38);
}

.hero-art img {
  transform: translateY(calc(var(--scroll-ratio) * 24px)) scale(1.035);
  transition: transform 240ms ease-out;
}

.section-head,
.exhibition-note,
.stats,
.room-grid article,
.thesis-grid article,
.event,
.map-card,
.map-info,
.archive-card,
.lens-grid article,
.source-list a,
.gift {
  will-change: transform, opacity;
}

.room-grid,
.thesis-grid,
.lens-grid,
.timeline,
.archive-grid,
.source-list {
  counter-reset: ukiyoCard;
}

.room-grid article,
.thesis-grid article,
.lens-grid article,
.event,
.map-info,
.archive-card,
.source-list a,
.gift {
  counter-increment: ukiyoCard;
  isolation: isolate;
  transform-style: preserve-3d;
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 360ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    background 220ms ease;
}

.room-grid article::before,
.thesis-grid article::before,
.lens-grid article::before,
.event::before,
.map-info::before,
.archive-card::before,
.source-list a::before,
.gift::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(24, 34, 50, 0.14);
  background:
    radial-gradient(circle at 100% 0, rgba(189, 61, 47, 0.11), transparent 5.4rem),
    repeating-linear-gradient(98deg, rgba(89, 64, 35, 0.035) 0 1px, transparent 1px 8px);
}

.room-grid article::after,
.thesis-grid article::after,
.lens-grid article::after,
.event::after,
.map-info::after,
.archive-card::after,
.source-list a::after,
.gift::after {
  content: "浮";
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(143, 45, 36, 0.68);
  color: var(--red-dark);
  background: rgba(255, 248, 229, 0.74);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.archive-card::after {
  top: 14px;
  bottom: auto;
}

.source-list a,
.gift {
  position: relative;
  overflow: hidden;
}

.event {
  overflow: hidden;
}

.event::after {
  content: "史";
}

.map-info::after {
  content: "図";
}

.archive-card::after {
  content: "絵";
}

.gift::after {
  content: "寿";
}

.room-grid article:hover,
.thesis-grid article:hover,
.lens-grid article:hover,
.event:hover,
.map-info:hover,
.archive-card:hover,
.source-list a:hover,
.gift:hover {
  transform:
    perspective(900px)
    rotateX(calc((var(--card-y, 0.5) - 0.5) * -5deg))
    rotateY(calc((var(--card-x, 0.5) - 0.5) * 7deg))
    translate(-5px, -6px);
  border-color: var(--red-dark);
  box-shadow: 16px 16px 0 rgba(23, 55, 95, 0.17), 22px 22px 0 rgba(189, 61, 47, 0.11);
}

.room-grid article:nth-child(2):hover,
.room-grid article:nth-child(5):hover {
  transform:
    perspective(900px)
    rotateX(calc((var(--card-y, 0.5) - 0.5) * -5deg))
    rotateY(calc((var(--card-x, 0.5) - 0.5) * 7deg))
    translate(-5px, 20px);
}

.reveal-ready {
  opacity: 0;
  transform: translateY(52px) scale(0.975);
  clip-path: inset(16% 0 0 0);
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  clip-path: inset(0 0 0 0);
}

.reveal-ready.is-focused {
  filter: saturate(1.04) contrast(1.02);
}

.archive-card img {
  transform: scale(1.02);
}

.archive-card.is-visible img {
  animation: printImageSettle 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes printImageSettle {
  from {
    filter: saturate(0.82) contrast(1.2) sepia(0.18);
    transform: scale(1.08);
  }

  to {
    filter: saturate(1.02) contrast(1.12) sepia(0.08);
    transform: scale(1.02);
  }
}

@media (max-width: 720px) {
  .scroll-readout {
    width: 46px;
    height: 46px;
    left: 14px;
    bottom: 14px;
    font-size: 0.92rem;
  }

  .room-grid article::after,
  .thesis-grid article::after,
  .lens-grid article::after,
  .event::after,
  .map-info::after,
  .archive-card::after,
  .source-list a::after,
  .gift::after {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }
}

/* Fame-inspired scroll staging, translated into ukiyo-e exhibition language */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background:
    radial-gradient(circle at 62% 34%, rgba(189, 61, 47, 0.2), transparent 18rem),
    linear-gradient(135deg, #fff4d8, #ead7ad);
  color: var(--indigo);
  transition: opacity 620ms cubic-bezier(0.22, 1, 0.36, 1), visibility 620ms ease;
}

.loading-screen span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 12vw, 12rem);
  font-weight: 900;
  line-height: 0.8;
}

.loading-screen p {
  margin: 0;
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sakura-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sakura-petal {
  position: absolute;
  top: -12vh;
  left: var(--petal-left, 50%);
  width: var(--petal-size, 14px);
  height: calc(var(--petal-size, 14px) * 0.72);
  border-radius: 90% 12% 90% 12%;
  background:
    radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(135deg, #ffd8df, #f5a8bd 58%, #d96b82);
  opacity: var(--petal-opacity, 0.74);
  transform: rotate(var(--petal-rotate, 0deg));
  animation:
    sakuraFall var(--petal-duration, 6s) linear var(--petal-delay, 0s) infinite,
    sakuraSway calc(var(--petal-duration, 6s) * 0.52) ease-in-out var(--petal-delay, 0s) infinite alternate;
  filter: drop-shadow(0 4px 6px rgba(143, 45, 36, 0.12));
}

@keyframes sakuraFall {
  to {
    top: 112vh;
    transform: translateX(var(--petal-drift, 40px)) rotate(calc(var(--petal-rotate, 0deg) + 360deg));
  }
}

@keyframes sakuraSway {
  from {
    margin-left: -18px;
  }

  to {
    margin-left: 26px;
  }
}

body.is-loaded .loading-screen {
  opacity: 0;
  visibility: hidden;
}

@media (min-width: 901px) {
  html {
    scroll-snap-type: y proximity;
  }

  .hero,
  .section,
  .gift {
    scroll-snap-align: start;
  }

  .section {
    min-height: 82svh;
  }

  .section-head {
    position: relative;
    z-index: 1;
    padding-top: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .archive-grid {
    display: flex;
    grid-template-columns: none;
    position: relative;
    gap: 26px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 8px 34px;
    scroll-snap-type: x mandatory;
    scrollbar-color: rgba(23, 55, 95, 0.46) rgba(255, 248, 229, 0.38);
  }

  .archive-card,
  .archive-card:nth-child(5n + 1),
  .archive-card:nth-child(5n + 2) {
    flex: 0 0 clamp(310px, 34vw, 460px);
    grid-column: auto;
    margin-top: 0;
    scroll-snap-align: start;
  }

  .archive-card:nth-child(even) {
    transform: translateY(28px);
  }

  .archive-card:nth-child(even):hover {
    transform:
      perspective(900px)
      rotateX(calc((var(--card-y, 0.5) - 0.5) * -5deg))
      rotateY(calc((var(--card-x, 0.5) - 0.5) * 7deg))
      translate(-5px, 20px);
  }
}

.split-ready .line-word {
  display: inline-block;
  transform: translateY(110%) rotate(3deg);
  opacity: 0;
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--word-index, 0) * 38ms);
}

.split-ready.is-visible .line-word,
.hero .split-ready .line-word {
  transform: translateY(0) rotate(0);
  opacity: 1;
}

.section-head h2,
.hero h1 {
  overflow: hidden;
}

.stats strong.is-counting {
  font-variant-numeric: tabular-nums;
}

.nav-actions {
  counter-reset: navStep;
}

.nav-actions a {
  counter-increment: navStep;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-actions a::before {
  content: counter(navStep, decimal-leading-zero);
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78em;
  font-weight: 900;
}

.nav-actions a.is-active::before,
.nav-actions a:hover::before {
  color: #fff4d8;
}

.timeline-wrap,
.map-grid {
  position: relative;
}

.timeline-wrap::before,
.map-grid::before,
.archive-grid::before {
  content: "";
  position: absolute;
  pointer-events: none;
  background:
    radial-gradient(50px 28px at 50px 0, transparent 27px, rgba(23, 55, 95, 0.12) 28px 31px, transparent 32px) 0 0 / 100px 56px repeat-x;
}

.timeline-wrap::before,
.map-grid::before {
  left: 0;
  right: 0;
  top: -18px;
  height: 38px;
}

.map-legend {
  display: grid;
  gap: 5px;
  min-width: 178px;
  padding: 10px 12px;
  border: 2px solid rgba(24, 34, 50, 0.24);
  background: rgba(255, 244, 216, 0.92);
  color: var(--indigo);
  box-shadow: 5px 5px 0 rgba(23, 55, 95, 0.13);
  font-size: 12px;
  line-height: 1.25;
}

.map-legend strong {
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 244, 216, 0.95);
  border-radius: 50%;
}

.leaflet-tooltip {
  border: 1px solid rgba(24, 34, 50, 0.18);
  border-radius: 0;
  background: rgba(255, 244, 216, 0.94);
  color: var(--indigo);
  font-weight: 800;
  box-shadow: 4px 4px 0 rgba(23, 55, 95, 0.11);
}

.leaflet-popup-content span {
  display: block;
  margin-top: 4px;
  color: #5f594e;
}

.archive-grid::before {
  left: 0;
  right: 0;
  top: 0;
  height: 30px;
}

@media (max-width: 720px) {
  .loading-screen span {
    font-size: 4.8rem;
  }

  .nav-actions a::before {
    display: none;
  }
}

/* Mono no aware ambience: quiet seasonality, ink haze, and old paper depth */
:root {
  --paper: #f2e5c8;
  --surface: rgba(255, 248, 229, 0.84);
  --surface-strong: rgba(255, 244, 218, 0.92);
  --muted: #74695d;
}

body {
  background:
    radial-gradient(circle at 78% 13%, rgba(255, 239, 205, 0.92) 0 3.6rem, rgba(216, 150, 137, 0.15) 3.7rem 8rem, transparent 8.2rem),
    linear-gradient(180deg, rgba(221, 207, 177, 0.16), transparent 24rem),
    radial-gradient(circle at 10% 18%, rgba(189, 61, 47, 0.08), transparent 19rem),
    radial-gradient(circle at 83% 62%, rgba(47, 115, 148, 0.09), transparent 24rem),
    #f2e5c8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(170deg, transparent 0 54%, rgba(23, 55, 95, 0.1) 54.2% 54.8%, transparent 55%),
    linear-gradient(155deg, transparent 0 61%, rgba(93, 112, 70, 0.12) 61.2% 61.8%, transparent 62%),
    radial-gradient(52rem 13rem at 22% 71%, rgba(23, 55, 95, 0.12), transparent 58%),
    radial-gradient(44rem 11rem at 72% 74%, rgba(93, 112, 70, 0.1), transparent 60%),
    radial-gradient(36rem 8rem at 48% 84%, rgba(143, 45, 36, 0.06), transparent 62%),
    linear-gradient(180deg, rgba(255, 248, 229, 0.16), rgba(255, 248, 229, 0.76) 58%, rgba(242, 229, 200, 0.86));
  opacity: 0.9;
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.42), transparent 12rem),
    radial-gradient(circle at 74% 16%, rgba(255, 255, 255, 0.36), transparent 10rem),
    repeating-linear-gradient(98deg, rgba(82, 57, 30, 0.025) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(5deg, rgba(82, 57, 30, 0.018) 0 1px, transparent 1px 13px),
    radial-gradient(circle at 1px 1px, rgba(54, 38, 24, 0.08) 1px, transparent 0) 0 0 / 22px 22px;
  box-shadow: inset 0 0 12rem rgba(92, 68, 42, 0.1);
}

main#top {
  position: relative;
}

main#top::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(7px 4px at 12% 18%, rgba(214, 106, 124, 0.26) 0 58%, transparent 60%),
    radial-gradient(6px 4px at 86% 27%, rgba(214, 106, 124, 0.2) 0 58%, transparent 60%),
    radial-gradient(5px 3px at 32% 42%, rgba(214, 106, 124, 0.18) 0 58%, transparent 60%),
    radial-gradient(6px 4px at 66% 58%, rgba(214, 106, 124, 0.16) 0 58%, transparent 60%),
    radial-gradient(5px 3px at 20% 78%, rgba(214, 106, 124, 0.14) 0 58%, transparent 60%);
  background-size: 34rem 42rem;
  opacity: 0.72;
  animation: awareDrift 28s linear infinite;
}

main#top::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 30vh;
  pointer-events: none;
  background:
    radial-gradient(58px 28px at 58px 0, transparent 28px, rgba(23, 55, 95, 0.065) 29px 31px, transparent 32px) 0 100% / 116px 56px repeat-x,
    radial-gradient(58px 28px at 0 0, transparent 28px, rgba(189, 61, 47, 0.052) 29px 31px, transparent 32px) 58px calc(100% - 16px) / 116px 56px repeat-x;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 76%);
}

.site-header {
  background: rgba(242, 229, 200, 0.78);
}

.exhibition-note,
.stats,
.room-grid article,
.thesis-grid article,
.lens-grid article,
.event,
.map-info,
.archive-card,
.source-list a,
.gift {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 48%),
    rgba(255, 248, 229, 0.82);
}

@keyframes awareDrift {
  from {
    transform: translate3d(0, -1.5rem, 0);
  }

  to {
    transform: translate3d(-5rem, 5rem, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  main#top::before {
    animation: none;
  }
}

/* Seven-chapter red sun to starry night scene */
:root {
  --scene-ground: #f0dfbc;
  --sky-top: #f1d1a2;
  --sky-mid: #f5e4c1;
  --sky-low: #fff3d7;
  --sun-core: rgba(190, 48, 36, 0.92);
  --sun-glow: rgba(211, 83, 47, 0.28);
  --sun-x: 78%;
  --sun-y: 20%;
  --sun-size: 4rem;
  --haze-a: rgba(255, 246, 219, 0.62);
  --haze-b: rgba(207, 148, 72, 0.22);
  --cloud-ink: rgba(31, 64, 96, 0.055);
  --cloud-gold: rgba(180, 124, 54, 0.12);
  --motif-a: rgba(170, 55, 45, 0.13);
  --motif-b: rgba(26, 86, 132, 0.08);
  --wave: rgba(20, 57, 96, 0.075);
  --star-a: rgba(255, 255, 255, 0);
  --star-b: rgba(255, 230, 168, 0);
  --paper-grain: rgba(68, 47, 26, 0.075);
  --vignette: rgba(72, 50, 32, 0.11);
}

body {
  background:
    radial-gradient(circle at var(--sun-x) var(--sun-y), var(--sun-core) 0 var(--sun-size), var(--sun-glow) calc(var(--sun-size) + 0.15rem) calc(var(--sun-size) + 6rem), transparent calc(var(--sun-size) + 6.4rem)),
    radial-gradient(34rem 14rem at 12% 18%, var(--motif-a), transparent 72%),
    radial-gradient(38rem 18rem at 86% 64%, var(--motif-b), transparent 74%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 44%, var(--sky-low) 72%, var(--scene-ground) 100%);
  transition: background 1000ms ease;
}

body::before {
  background:
    radial-gradient(34rem 7rem at 8% 19%, var(--haze-a) 0 46%, transparent 47%),
    radial-gradient(24rem 5rem at 24% 22%, var(--haze-b) 0 43%, transparent 44%),
    radial-gradient(32rem 7rem at 86% 18%, var(--haze-a) 0 45%, transparent 46%),
    radial-gradient(22rem 5rem at 72% 21%, var(--haze-b) 0 42%, transparent 43%),
    radial-gradient(44rem 9rem at 42% 83%, var(--haze-a) 0 42%, transparent 43%),
    radial-gradient(24rem 5rem at 58% 80%, var(--haze-b) 0 40%, transparent 41%),
    radial-gradient(48rem 11rem at 18% 96%, var(--cloud-ink), transparent 58%),
    radial-gradient(42rem 10rem at 78% 98%, var(--cloud-gold), transparent 62%);
  opacity: 0.9;
  mix-blend-mode: multiply;
  transition: background 1000ms ease, opacity 1000ms ease;
}

body::after {
  background:
    radial-gradient(circle at 12% 16%, var(--star-a) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 28% 9%, var(--star-b) 0 1px, transparent 1.7px),
    radial-gradient(circle at 44% 22%, var(--star-a) 0 1.4px, transparent 2px),
    radial-gradient(circle at 62% 13%, var(--star-b) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 78% 26%, var(--star-a) 0 1.3px, transparent 2px),
    radial-gradient(circle at 91% 10%, var(--star-b) 0 1px, transparent 1.8px),
    radial-gradient(circle at 1px 1px, var(--paper-grain) 1px, transparent 0) 0 0 / 24px 24px,
    repeating-linear-gradient(92deg, rgba(80, 57, 32, 0.027) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(5deg, rgba(80, 57, 32, 0.018) 0 1px, transparent 1px 15px);
  background-size: auto, auto, auto, auto, auto, auto, 24px 24px, auto, auto;
  box-shadow: inset 0 0 11rem var(--vignette);
  transition: box-shadow 1000ms ease;
}

main#top::before {
  background:
    radial-gradient(9px 5px at 12% 18%, var(--motif-a) 0 52%, transparent 58%),
    radial-gradient(7px 4px at 86% 27%, var(--motif-a) 0 45%, transparent 58%),
    radial-gradient(6px 4px at 32% 42%, var(--motif-a) 0 38%, transparent 58%),
    radial-gradient(8px 5px at 66% 58%, var(--motif-b) 0 48%, transparent 58%),
    radial-gradient(6px 4px at 20% 78%, var(--motif-b) 0 40%, transparent 58%);
  background-size: 32rem 40rem;
  opacity: 0.7;
  transition: background 1000ms ease, opacity 1000ms ease;
}

main#top::after {
  height: 32vh;
  background:
    radial-gradient(54px 27px at 54px 0, transparent 27px, var(--wave) 28px 30px, transparent 31px) 0 100% / 108px 54px repeat-x,
    radial-gradient(54px 27px at 0 0, transparent 27px, var(--wave) 28px 30px, transparent 31px) 54px calc(100% - 16px) / 108px 54px repeat-x,
    linear-gradient(180deg, transparent, rgba(255, 248, 225, 0.58));
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 78%);
  transition: background 1000ms ease;
}

body[data-season="dawn"] {
  --scene-ground: #f0dfbc;
  --sky-top: #ecc48f;
  --sky-mid: #f4dfb8;
  --sky-low: #fff1d4;
  --sun-core: rgba(187, 43, 34, 0.96);
  --sun-glow: rgba(214, 82, 44, 0.28);
  --sun-x: 78%;
  --sun-y: 18%;
  --sun-size: 4.2rem;
  --haze-a: rgba(255, 246, 219, 0.68);
  --haze-b: rgba(210, 143, 66, 0.22);
  --motif-a: rgba(181, 70, 52, 0.13);
  --motif-b: rgba(34, 85, 128, 0.07);
}

body[data-season="spring"] {
  --scene-ground: #f1e1c2;
  --sky-top: #eebfa7;
  --sky-mid: #f4dcc2;
  --sky-low: #fff2dc;
  --sun-core: rgba(194, 50, 39, 0.9);
  --sun-glow: rgba(214, 105, 92, 0.24);
  --sun-x: 82%;
  --sun-y: 20%;
  --sun-size: 3.9rem;
  --haze-a: rgba(255, 239, 226, 0.7);
  --haze-b: rgba(218, 151, 154, 0.22);
  --motif-a: rgba(207, 92, 124, 0.18);
  --motif-b: rgba(74, 130, 88, 0.08);
  --wave: rgba(151, 78, 104, 0.07);
}

body[data-season="summer"] {
  --scene-ground: #eee0bd;
  --sky-top: #d6c98e;
  --sky-mid: #eadcae;
  --sky-low: #fff0c9;
  --sun-core: rgba(204, 71, 44, 0.82);
  --sun-glow: rgba(210, 153, 47, 0.16);
  --sun-x: 70%;
  --sun-y: 12%;
  --sun-size: 3.55rem;
  --haze-a: rgba(244, 244, 216, 0.64);
  --haze-b: rgba(96, 140, 118, 0.18);
  --motif-a: rgba(54, 119, 119, 0.14);
  --motif-b: rgba(22, 92, 145, 0.1);
  --wave: rgba(16, 86, 126, 0.1);
  --vignette: rgba(50, 68, 48, 0.1);
}

body[data-season="autumn"] {
  --scene-ground: #ebd7b1;
  --sky-top: #d79c76;
  --sky-mid: #e8bf8c;
  --sky-low: #f7dfb1;
  --sun-core: rgba(203, 60, 42, 0.84);
  --sun-glow: rgba(173, 70, 39, 0.22);
  --sun-x: 80%;
  --sun-y: 30%;
  --sun-size: 3.7rem;
  --haze-a: rgba(250, 227, 185, 0.68);
  --haze-b: rgba(185, 126, 45, 0.24);
  --motif-a: rgba(172, 76, 37, 0.18);
  --motif-b: rgba(119, 96, 45, 0.11);
  --wave: rgba(134, 89, 38, 0.08);
}

body[data-season="winter"] {
  --scene-ground: #d9d1c2;
  --sky-top: #6f83a2;
  --sky-mid: #b1b2ac;
  --sky-low: #e6d8bd;
  --sun-core: rgba(188, 61, 50, 0.62);
  --sun-glow: rgba(96, 93, 130, 0.22);
  --sun-x: 72%;
  --sun-y: 42%;
  --sun-size: 3.3rem;
  --haze-a: rgba(241, 239, 226, 0.66);
  --haze-b: rgba(131, 144, 160, 0.19);
  --motif-a: rgba(255, 255, 255, 0.38);
  --motif-b: rgba(67, 93, 118, 0.1);
  --wave: rgba(48, 76, 105, 0.075);
  --star-a: rgba(255, 255, 255, 0.34);
  --star-b: rgba(255, 232, 184, 0.2);
  --vignette: rgba(36, 48, 66, 0.12);
}

body[data-season="dusk"] {
  --scene-ground: #c6b2a0;
  --sky-top: #293d68;
  --sky-mid: #77698b;
  --sky-low: #d49b75;
  --sun-core: rgba(198, 64, 46, 0.72);
  --sun-glow: rgba(95, 77, 127, 0.28);
  --sun-x: 28%;
  --sun-y: 62%;
  --sun-size: 3.7rem;
  --haze-a: rgba(230, 208, 189, 0.42);
  --haze-b: rgba(134, 103, 139, 0.22);
  --motif-a: rgba(132, 96, 137, 0.16);
  --motif-b: rgba(31, 52, 86, 0.11);
  --wave: rgba(31, 52, 86, 0.095);
  --star-a: rgba(255, 255, 255, 0.62);
  --star-b: rgba(255, 232, 184, 0.42);
  --paper-grain: rgba(255, 238, 202, 0.045);
  --vignette: rgba(24, 30, 55, 0.2);
}

body[data-season="sunset"] {
  --scene-ground: #1f283f;
  --sky-top: #111a33;
  --sky-mid: #1e2f55;
  --sky-low: #6f4f61;
  --sun-core: rgba(160, 45, 38, 0.44);
  --sun-glow: rgba(151, 61, 52, 0.2);
  --sun-x: 18%;
  --sun-y: 88%;
  --sun-size: 4.1rem;
  --haze-a: rgba(210, 174, 133, 0.22);
  --haze-b: rgba(113, 73, 92, 0.18);
  --cloud-ink: rgba(5, 14, 34, 0.18);
  --cloud-gold: rgba(172, 92, 46, 0.1);
  --motif-a: rgba(255, 210, 156, 0.08);
  --motif-b: rgba(98, 137, 181, 0.12);
  --wave: rgba(179, 203, 231, 0.09);
  --star-a: rgba(255, 255, 255, 0.86);
  --star-b: rgba(255, 232, 184, 0.72);
  --paper-grain: rgba(255, 238, 202, 0.035);
  --vignette: rgba(5, 9, 24, 0.42);
}

/* Sitewide chapter staging */
:root {
  --chapter-ratio: 0;
}

.chapter-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  z-index: 32;
  display: grid;
  gap: 8px;
  padding: 12px 9px;
  border: 3px solid rgba(24, 34, 50, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 248, 229, 0.92), rgba(255, 244, 216, 0.78)),
    var(--surface-strong);
  box-shadow: 6px 6px 0 rgba(23, 55, 95, 0.14);
  transform: translateY(-50%);
}

.chapter-rail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: 12px;
  z-index: -1;
  width: 2px;
  background:
    linear-gradient(var(--red), var(--gold), var(--indigo)) 0 0 / 100% calc(var(--chapter-ratio) * 100%) no-repeat,
    rgba(24, 34, 50, 0.16);
  transform: translateX(-50%);
}

.chapter-jump {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(24, 34, 50, 0.3);
  background: #fff4d8;
  color: var(--indigo);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.chapter-jump:hover,
.chapter-jump.active {
  border-color: var(--red-dark);
  background: var(--indigo);
  color: #fff7e5;
  transform: translateX(-4px);
}

.hero.is-current-section .hero-content,
.section.is-current-section .section-head,
.gift.is-current-section {
  filter: saturate(1.06) contrast(1.015);
}

.section.is-current-section .section-head::after {
  box-shadow: 8px 8px 0 rgba(189, 61, 47, 0.12);
}

.archive-orbit {
  display: grid;
  grid-template-columns: 46px minmax(160px, 1fr) auto 46px;
  align-items: center;
  gap: 14px;
  margin: -12px 0 20px;
}

.archive-nav {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 3px solid var(--indigo);
  background: #fff4d8;
  color: var(--red-dark);
  box-shadow: 5px 5px 0 rgba(23, 55, 95, 0.14);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.archive-nav:hover {
  background: var(--indigo);
  color: #fff7e5;
  transform: translate(-2px, -2px);
}

.archive-nav:disabled {
  cursor: default;
  opacity: 0.38;
  transform: none;
}

.archive-track {
  height: 10px;
  border: 2px solid rgba(24, 34, 50, 0.28);
  background: rgba(255, 248, 229, 0.72);
  overflow: hidden;
}

.archive-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--indigo));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.archive-count {
  min-width: 74px;
  margin: 0;
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  text-align: right;
}

.archive-grid {
  scroll-behavior: smooth;
}

.archive-grid.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.archive-grid.is-dragging .archive-card {
  pointer-events: none;
}

.archive-card {
  opacity: 0.78;
}

.archive-card.is-current {
  opacity: 1;
  border-color: var(--red-dark);
  box-shadow: 16px 16px 0 rgba(23, 55, 95, 0.16), 22px 22px 0 rgba(189, 61, 47, 0.1);
}

@media (max-width: 900px) {
  .chapter-rail {
    display: none;
  }

  .archive-orbit {
    grid-template-columns: 42px 1fr auto 42px;
    gap: 10px;
  }

  .archive-nav {
    width: 42px;
    height: 42px;
    font-size: 1.7rem;
  }
}

@media (max-width: 620px) {
  .archive-orbit {
    grid-template-columns: 38px 1fr 38px;
  }

  .archive-count {
    grid-column: 1 / -1;
    order: 4;
    text-align: left;
  }
}

/* Cinematic interaction pass: clean, product-grade, Ponder-inspired */
:root {
  color-scheme: dark;
  --ink: #f7f3ea;
  --muted: #b9c0bf;
  --paper: #07090c;
  --paper-2: #10151a;
  --surface: rgba(12, 16, 20, 0.72);
  --surface-strong: rgba(18, 23, 28, 0.88);
  --line: rgba(255, 255, 255, 0.12);
  --red: #ff5a4d;
  --red-dark: #ff9a72;
  --indigo: #e8ddd0;
  --blue: #58d6e8;
  --green: #78d09c;
  --gold: #ffc46b;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  --shadow-hover: 0 34px 110px rgba(0, 0, 0, 0.46);
  --blur: blur(18px) saturate(1.25);
}

html {
  scroll-padding-top: 92px;
}

body {
  padding-bottom: 92px;
  background:
    linear-gradient(120deg, rgba(255, 90, 77, 0.12), transparent 28%),
    linear-gradient(240deg, rgba(88, 214, 232, 0.1), transparent 30%),
    linear-gradient(180deg, #050608 0%, #0b1014 48%, #050608 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 17px);
  background-size: 48px 48px, 48px 48px, auto;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), transparent 88%);
  opacity: 0.62;
  mix-blend-mode: screen;
}

body::after,
main#top::before,
main#top::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::after {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent) 0 0 / 36rem 100% no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%, transparent 78%, rgba(255, 255, 255, 0.04));
  opacity: 0.54;
  animation: stageScan 16s linear infinite;
}

main#top::before {
  background:
    linear-gradient(180deg, transparent 0 72%, rgba(88, 214, 232, 0.09) 72.2%, transparent 72.6%),
    linear-gradient(180deg, transparent 0 84%, rgba(255, 196, 107, 0.08) 84.2%, transparent 84.6%);
  opacity: 0.76;
  animation: none;
}

main#top::after {
  inset: auto 0 0 0;
  height: 34vh;
  background:
    repeating-linear-gradient(0deg, rgba(88, 214, 232, 0.08) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, transparent, rgba(5, 6, 8, 0.92));
  mask-image: linear-gradient(to top, black, transparent 82%);
}

@keyframes stageScan {
  from {
    background-position: -40rem 0, 0 0;
  }

  to {
    background-position: calc(100vw + 40rem) 0, 0 0;
  }
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 7, 10, 0.64);
  backdrop-filter: blur(22px) saturate(1.35);
}

.nav {
  width: min(1280px, calc(100% - 34px));
}

.brand,
.nav-actions a,
h1,
h2,
h3 {
  color: var(--ink);
}

.brand-mark {
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--red), var(--gold));
  color: #080a0d;
  box-shadow:
    0 0 34px rgba(255, 90, 77, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.nav-actions {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-actions a {
  border-radius: 6px;
  color: rgba(247, 243, 234, 0.7);
}

.nav-actions a:hover,
.nav-actions a.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.nav-actions a::before {
  color: var(--gold);
}

.hero {
  width: min(1320px, calc(100% - 36px));
  min-height: calc(100svh - 80px);
  gap: 26px;
}

.hero-art {
  outline: 1px solid rgba(255, 255, 255, 0.18);
  outline-offset: -1px;
  border-radius: 8px;
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: none;
}

.hero-art::before {
  inset: 0;
  border: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 30%, rgba(88, 214, 232, 0.12));
}

.hero-art img {
  filter: saturate(1.1) contrast(1.05) brightness(0.68);
  transform: translateY(calc(var(--scroll-ratio) * 20px)) scale(1.04);
}

.hero-art figcaption {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 10, 13, 0.62);
  color: rgba(247, 243, 234, 0.78);
}

.hero-content {
  min-height: 66svh;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%),
    rgba(10, 13, 17, 0.62);
  backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.hero-content::before,
.vertical-seal {
  display: none;
}

h1 {
  font-size: clamp(3rem, 4.9vw, 5.7rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2.15rem, 4vw, 4.35rem);
}

.eyebrow {
  color: var(--gold);
}

.hero-copy,
.section-note,
.exhibition-note p:last-child,
.event p,
.archive-card p,
.lens-grid p,
.room-grid p,
.thesis-grid p,
.gift p,
.map-info ul,
.footer {
  color: var(--muted);
}

.button,
.filter,
.era,
.archive-nav,
.chapter-jump {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 30px rgba(0, 0, 0, 0.24);
}

.button:hover,
.filter:hover,
.era:hover {
  transform: translateY(-2px);
}

.primary {
  border-color: rgba(255, 154, 114, 0.5);
  background:
    linear-gradient(135deg, #ff5a4d, #ffc46b);
  color: #080a0d;
  box-shadow:
    0 0 36px rgba(255, 90, 77, 0.22),
    0 18px 42px rgba(0, 0, 0, 0.25);
}

.ghost,
.filter,
.era {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(247, 243, 234, 0.86);
}

.filter.active,
.era.active {
  border-color: rgba(88, 214, 232, 0.62);
  background: rgba(88, 214, 232, 0.16);
  color: #eaffff;
  box-shadow: 0 0 34px rgba(88, 214, 232, 0.16);
}

.exhibition-note,
.stats,
.room-grid article,
.thesis-grid article,
.lens-grid article,
.event,
.map-info,
.archive-card,
.source-list a,
.gift,
.gift-dialog {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), transparent 34%),
    rgba(11, 15, 19, 0.72);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: var(--shadow);
}

.exhibition-note,
.gift {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.stats {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.section-head::after {
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--blue), transparent);
}

.room-grid article::before,
.thesis-grid article::before,
.lens-grid article::before,
.event::before,
.map-info::before,
.archive-card::before,
.source-list a::before,
.gift::before {
  inset: 0;
  border: 0;
  background:
    linear-gradient(90deg, rgba(88, 214, 232, 0.08), transparent 18%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 22px);
}

.room-grid article::after,
.thesis-grid article::after,
.lens-grid article::after,
.event::after,
.map-info::after,
.archive-card::after,
.source-list a::after,
.gift::after {
  display: none;
}

.room-grid article:hover,
.thesis-grid article:hover,
.lens-grid article:hover,
.event:hover,
.map-info:hover,
.archive-card:hover,
.source-list a:hover,
.gift:hover {
  transform:
    perspective(900px)
    rotateX(calc((var(--card-y, 0.5) - 0.5) * -3deg))
    rotateY(calc((var(--card-x, 0.5) - 0.5) * 4deg))
    translateY(-4px);
  border-color: rgba(88, 214, 232, 0.42);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    0 0 44px rgba(88, 214, 232, 0.08);
}

.room-grid article:nth-child(2),
.room-grid article:nth-child(5),
.room-grid article:nth-child(2):hover,
.room-grid article:nth-child(5):hover,
.archive-card:nth-child(even),
.archive-card:nth-child(even):hover {
  transform: none;
}

.stats strong,
.event-year,
.room-grid span,
.lens-grid span,
.thesis-grid span,
.archive-count {
  color: var(--gold);
}

.tag {
  border-color: rgba(88, 214, 232, 0.22);
  border-radius: 8px;
  background: rgba(88, 214, 232, 0.1);
  color: #bff7ff;
}

.map-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.real-map {
  border-radius: 8px;
}

.archive-orbit {
  grid-template-columns: 48px minmax(180px, 1fr) auto 48px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--blur);
}

.archive-nav {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 1.55rem;
}

.archive-nav:hover {
  background: rgba(88, 214, 232, 0.16);
  color: #eaffff;
  transform: translateY(-2px);
}

.archive-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.archive-track span {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--blue));
  box-shadow: 0 0 24px rgba(88, 214, 232, 0.28);
}

.archive-card {
  opacity: 0.62;
  transition:
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 360ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease;
}

.archive-card.is-current {
  opacity: 1;
  border-color: rgba(255, 196, 107, 0.52);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.44),
    0 0 50px rgba(255, 196, 107, 0.12);
}

.archive-card img {
  filter: saturate(1.08) contrast(1.08) brightness(0.78);
}

.source-list a {
  color: rgba(247, 243, 234, 0.86);
}

.gift-dialog {
  color: var(--ink);
}

.dialog-close {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.audio-toggle {
  right: 22px;
  top: 86px;
  bottom: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--blur);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
}

.scroll-readout {
  left: 22px;
  bottom: 24px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  backdrop-filter: var(--blur);
}

.chapter-rail {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 18px;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 11, 14, 0.68);
  backdrop-filter: blur(22px) saturate(1.35);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(-50%);
}

.chapter-rail::before {
  left: 8px;
  right: 8px;
  top: auto;
  bottom: 5px;
  width: auto;
  height: 2px;
  background:
    linear-gradient(90deg, var(--red), var(--gold), var(--blue)) 0 0 / calc(var(--chapter-ratio) * 100%) 100% no-repeat,
    rgba(255, 255, 255, 0.12);
  transform: none;
}

.chapter-jump {
  width: 44px;
  height: 38px;
  border-color: transparent;
  background: transparent;
  color: rgba(247, 243, 234, 0.56);
  box-shadow: none;
}

.chapter-jump:hover,
.chapter-jump.active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.chapter-jump.active {
  box-shadow: 0 0 28px rgba(88, 214, 232, 0.16);
}

.hero.is-current-section .hero-content,
.section.is-current-section .section-head,
.gift.is-current-section {
  filter: none;
}

.section.is-current-section .section-head::after {
  box-shadow: 0 0 24px rgba(88, 214, 232, 0.26);
}

.reveal-ready {
  transform: translateY(44px) scale(0.985);
  clip-path: none;
}

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

@media (max-width: 900px) {
  body {
    padding-bottom: 86px;
  }

  .chapter-rail {
    display: flex;
    width: min(calc(100% - 24px), 560px);
    overflow-x: auto;
  }

  .chapter-jump {
    flex: 0 0 40px;
  }

  .audio-toggle {
    top: auto;
    right: 14px;
    bottom: 92px;
  }

  .scroll-readout {
    display: none;
  }
}

@media (max-width: 620px) {
  .hero {
    width: min(100% - 24px, 1320px);
  }

  .hero-content {
    border-radius: 8px;
  }

  .archive-orbit {
    grid-template-columns: 42px 1fr 42px;
  }
}

/* Classical Japanese refinement: washi, sumi, vermilion, quiet motion */
:root {
  color-scheme: light;
  --ink: #241f1a;
  --muted: #6e6254;
  --paper: #efe2c4;
  --paper-2: #d8c39a;
  --surface: rgba(255, 248, 229, 0.84);
  --surface-strong: rgba(255, 244, 218, 0.94);
  --line: rgba(36, 31, 26, 0.18);
  --red: #a7372e;
  --red-dark: #7d251f;
  --indigo: #1e344d;
  --blue: #496e86;
  --green: #63745a;
  --gold: #ad762c;
  --shadow: 0 18px 42px rgba(58, 43, 24, 0.16);
  --shadow-hover: 0 24px 58px rgba(58, 43, 24, 0.22);
  --blur: blur(10px) saturate(1.04);
}

body {
  padding-bottom: 88px;
  background:
    linear-gradient(90deg, rgba(36, 31, 26, 0.035) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(rgba(36, 31, 26, 0.028) 1px, transparent 1px) 0 0 / 38px 38px,
    radial-gradient(44rem 18rem at 16% 18%, rgba(167, 55, 46, 0.09), transparent 62%),
    radial-gradient(38rem 16rem at 84% 76%, rgba(30, 52, 77, 0.08), transparent 64%),
    #efe2c4;
  color: var(--ink);
}

body::before {
  background:
    linear-gradient(165deg, transparent 0 55%, rgba(30, 52, 77, 0.11) 55.2% 55.7%, transparent 56%),
    linear-gradient(152deg, transparent 0 63%, rgba(99, 116, 90, 0.12) 63.2% 63.8%, transparent 64%),
    radial-gradient(50rem 10rem at 28% 78%, rgba(30, 52, 77, 0.12), transparent 64%),
    radial-gradient(42rem 9rem at 74% 82%, rgba(99, 116, 90, 0.1), transparent 64%);
  opacity: 0.78;
  mix-blend-mode: multiply;
  mask-image: none;
}

body::after {
  background:
    repeating-linear-gradient(96deg, rgba(83, 60, 35, 0.028) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(6deg, rgba(83, 60, 35, 0.02) 0 1px, transparent 1px 13px),
    radial-gradient(circle at 1px 1px, rgba(54, 38, 24, 0.08) 1px, transparent 0) 0 0 / 22px 22px;
  opacity: 0.62;
  animation: none;
  box-shadow: inset 0 0 9rem rgba(92, 68, 42, 0.09);
}

main#top::before {
  background:
    radial-gradient(8px 5px at 12% 18%, rgba(184, 93, 100, 0.18) 0 52%, transparent 58%),
    radial-gradient(7px 4px at 82% 27%, rgba(184, 93, 100, 0.12) 0 48%, transparent 58%),
    radial-gradient(6px 4px at 34% 54%, rgba(30, 52, 77, 0.1) 0 44%, transparent 58%);
  background-size: 32rem 40rem;
  opacity: 0.58;
}

main#top::after {
  inset: auto 0 0 0;
  height: 30vh;
  background:
    radial-gradient(56px 28px at 56px 0, transparent 28px, rgba(30, 52, 77, 0.075) 29px 31px, transparent 32px) 0 100% / 112px 56px repeat-x,
    radial-gradient(56px 28px at 0 0, transparent 28px, rgba(167, 55, 46, 0.052) 29px 31px, transparent 32px) 56px calc(100% - 15px) / 112px 56px repeat-x;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 78%);
}

.site-header {
  border-bottom: 1px solid rgba(36, 31, 26, 0.14);
  background: rgba(239, 226, 196, 0.82);
  backdrop-filter: blur(12px) saturate(1.04);
}

.brand,
.nav-actions a,
h1,
h2,
h3 {
  color: var(--indigo);
}

.brand-mark {
  border-radius: 4px;
  background: var(--red);
  color: #fff4dc;
  box-shadow: 4px 4px 0 rgba(30, 52, 77, 0.12);
}

.nav-actions {
  border: 1px solid rgba(36, 31, 26, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 229, 0.72);
  box-shadow: 4px 4px 0 rgba(30, 52, 77, 0.06);
}

.nav-actions a {
  border-radius: 999px;
  color: rgba(30, 52, 77, 0.72);
}

.nav-actions a:hover,
.nav-actions a.is-active {
  background: var(--indigo);
  color: #fff4dc;
}

.nav-actions a::before,
.nav-actions a:hover::before,
.nav-actions a.is-active::before {
  color: currentColor;
}

.hero {
  min-height: calc(100svh - 72px);
  gap: 30px;
}

.hero-art {
  border: 10px solid #1e344d;
  border-bottom-color: var(--red);
  outline: 1px solid rgba(255, 248, 229, 0.54);
  outline-offset: -16px;
  border-radius: 2px;
  background: #dcc39a;
  box-shadow: 18px 18px 0 rgba(30, 52, 77, 0.14), var(--shadow);
}

.hero-art::before {
  inset: 16px;
  border: 1px solid rgba(255, 248, 229, 0.58);
  background: transparent;
}

.hero-art img {
  filter: saturate(0.98) contrast(1.08) brightness(0.92) sepia(0.06);
  transform: translateY(calc(var(--scroll-ratio) * 18px)) scale(1.025);
}

.hero-art figcaption {
  border: 1px solid rgba(36, 31, 26, 0.18);
  border-radius: 2px;
  background: rgba(255, 248, 229, 0.86);
  color: var(--indigo);
}

.hero-content {
  border: 1px solid rgba(36, 31, 26, 0.16);
  border-left: 8px solid var(--red);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 42%),
    rgba(255, 248, 229, 0.86);
  backdrop-filter: blur(8px) saturate(1.03);
  box-shadow: var(--shadow);
}

.hero-content::before {
  display: block;
  width: 124px;
  height: 124px;
  right: 30px;
  top: 28px;
  border-radius: 50%;
  background: rgba(167, 55, 46, 0.11);
  box-shadow: inset 0 0 0 8px rgba(167, 55, 46, 0.045);
}

.vertical-seal {
  display: block;
  right: 20px;
  top: 38px;
  border: 2px solid var(--red-dark);
  background: rgba(255, 248, 229, 0.82);
  color: var(--red-dark);
}

h1 {
  font-size: clamp(3rem, 4.4vw, 5.25rem);
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
}

.eyebrow,
.stats strong,
.event-year,
.room-grid span,
.lens-grid span,
.thesis-grid span,
.archive-count {
  color: var(--red-dark);
}

.hero-copy,
.section-note,
.exhibition-note p:last-child,
.event p,
.archive-card p,
.lens-grid p,
.room-grid p,
.thesis-grid p,
.gift p,
.map-info ul,
.footer {
  color: var(--muted);
}

.button,
.filter,
.era,
.archive-nav,
.chapter-jump {
  border: 1px solid rgba(36, 31, 26, 0.18);
  border-radius: 3px;
  box-shadow: 4px 4px 0 rgba(30, 52, 77, 0.09);
}

.primary {
  border-color: var(--red-dark);
  background: var(--red);
  color: #fff4dc;
  box-shadow: 5px 5px 0 rgba(30, 52, 77, 0.12);
}

.ghost,
.filter,
.era {
  background: rgba(255, 248, 229, 0.72);
  color: var(--indigo);
}

.filter.active,
.era.active {
  border-color: var(--indigo);
  background: var(--indigo);
  color: #fff4dc;
  box-shadow: 5px 5px 0 rgba(167, 55, 46, 0.12);
}

.exhibition-note,
.stats,
.room-grid article,
.thesis-grid article,
.lens-grid article,
.event,
.map-info,
.archive-card,
.source-list a,
.gift,
.gift-dialog {
  border: 1px solid rgba(36, 31, 26, 0.16);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 46%),
    rgba(255, 248, 229, 0.82);
  backdrop-filter: blur(8px) saturate(1.03);
  box-shadow: var(--shadow);
}

.exhibition-note,
.gift {
  border-left: 8px solid var(--red);
}

.stats {
  border-top: 6px solid var(--indigo);
}

.section-head::after {
  height: 4px;
  background:
    linear-gradient(90deg, var(--red) 0 24%, transparent 24% 28%, var(--indigo) 28% 76%, transparent 76% 80%, var(--gold) 80%);
}

.room-grid article::before,
.thesis-grid article::before,
.lens-grid article::before,
.event::before,
.map-info::before,
.archive-card::before,
.source-list a::before,
.gift::before {
  inset: 10px;
  border: 1px solid rgba(36, 31, 26, 0.08);
  background:
    radial-gradient(circle at 100% 0, rgba(167, 55, 46, 0.08), transparent 5rem),
    repeating-linear-gradient(98deg, rgba(83, 60, 35, 0.028) 0 1px, transparent 1px 8px);
}

.room-grid article:hover,
.thesis-grid article:hover,
.lens-grid article:hover,
.event:hover,
.map-info:hover,
.archive-card:hover,
.source-list a:hover,
.gift:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 55, 46, 0.34);
  box-shadow: var(--shadow-hover);
}

.tag {
  border-color: rgba(30, 52, 77, 0.16);
  border-radius: 3px;
  background: rgba(30, 52, 77, 0.08);
  color: var(--indigo);
}

.map-card {
  border: 8px solid var(--indigo);
  border-radius: 2px;
  box-shadow: 14px 14px 0 rgba(167, 55, 46, 0.12), var(--shadow);
}

.real-map {
  border-radius: 0;
  filter: saturate(0.86) contrast(1.04);
}

.archive-orbit {
  border: 1px solid rgba(36, 31, 26, 0.16);
  border-radius: 2px;
  background: rgba(255, 248, 229, 0.74);
  backdrop-filter: blur(8px) saturate(1.03);
  box-shadow: var(--shadow);
}

.archive-nav {
  background: rgba(255, 244, 218, 0.86);
  color: var(--red-dark);
  font-size: 1.55rem;
}

.archive-nav:hover {
  background: var(--indigo);
  color: #fff4dc;
  transform: translateY(-2px);
}

.archive-track {
  height: 7px;
  border: 1px solid rgba(36, 31, 26, 0.12);
  border-radius: 999px;
  background: rgba(30, 52, 77, 0.12);
}

.archive-track span {
  background: linear-gradient(90deg, var(--red), var(--gold), var(--indigo));
  box-shadow: none;
}

.archive-card {
  opacity: 0.72;
}

.archive-card.is-current {
  opacity: 1;
  border-color: rgba(167, 55, 46, 0.42);
  box-shadow: 0 24px 60px rgba(58, 43, 24, 0.22);
}

.archive-card img {
  filter: saturate(0.98) contrast(1.08) brightness(0.94) sepia(0.06);
}

.source-list a {
  color: var(--indigo);
}

.gift-dialog {
  color: var(--ink);
}

.dialog-close {
  background: rgba(255, 248, 229, 0.78);
  color: var(--ink);
}

.audio-toggle {
  top: 86px;
  right: 22px;
  bottom: auto;
  border: 1px solid rgba(36, 31, 26, 0.18);
  background: rgba(255, 248, 229, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.scroll-readout {
  border-color: rgba(36, 31, 26, 0.18);
  background: rgba(255, 248, 229, 0.78);
  color: var(--red-dark);
  backdrop-filter: blur(10px);
}

.chapter-rail {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 18px;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(36, 31, 26, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 229, 0.82);
  backdrop-filter: blur(12px) saturate(1.04);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.chapter-rail::before {
  left: 16px;
  right: 16px;
  top: auto;
  bottom: 7px;
  width: auto;
  height: 2px;
  background:
    linear-gradient(90deg, var(--red), var(--gold), var(--indigo)) 0 0 / calc(var(--chapter-ratio) * 100%) 100% no-repeat,
    rgba(36, 31, 26, 0.12);
  transform: none;
}

.chapter-jump {
  width: 42px;
  height: 36px;
  border-color: transparent;
  background: transparent;
  color: rgba(30, 52, 77, 0.62);
  box-shadow: none;
}

.chapter-jump:hover,
.chapter-jump.active {
  border-color: rgba(36, 31, 26, 0.14);
  background: var(--red);
  color: #fff4dc;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 rgba(30, 52, 77, 0.1);
}

.section.is-current-section .section-head::after {
  box-shadow: 6px 6px 0 rgba(167, 55, 46, 0.09);
}

.loading-screen {
  background:
    radial-gradient(circle at 62% 34%, rgba(167, 55, 46, 0.13), transparent 18rem),
    linear-gradient(135deg, #fff4d8, #e6d1a8);
  color: var(--indigo);
}

@media (max-width: 900px) {
  .chapter-rail {
    display: flex;
    width: min(calc(100% - 24px), 560px);
    overflow-x: auto;
  }

  .audio-toggle {
    top: auto;
    right: 14px;
    bottom: 92px;
  }
}

@media (max-width: 720px) {
  .vertical-seal {
    display: none;
  }
}

/* Background reset: keep the site clean and fast */
body {
  background: #efe2c4 !important;
}

/* Classical Japanese finishing details */
:root {
  --chapter-label: "巻";
}

.section-head {
  padding-left: clamp(54px, 6vw, 78px);
}

.section-head > div:first-child {
  position: relative;
}

.section-head > div:first-child::before {
  content: "巻";
  position: absolute;
  left: calc(clamp(54px, 6vw, 78px) * -1);
  top: 4px;
  width: 42px;
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(63, 42, 29, 0.36);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 55%),
    var(--washi);
  color: var(--seal-dark);
  box-shadow:
    inset 0 0 0 3px rgba(255, 248, 229, 0.5),
    4px 4px 0 rgba(63, 42, 29, 0.11);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 1.28rem;
  font-weight: 900;
  writing-mode: vertical-rl;
}

#rooms .section-head > div:first-child::before {
  content: "第一巻";
}

#china .section-head > div:first-child::before {
  content: "第二巻";
}

#timeline .section-head > div:first-child::before {
  content: "第三巻";
}

#map .section-head > div:first-child::before {
  content: "第四巻";
}

#archive .section-head > div:first-child::before {
  content: "第五巻";
}

#lenses .section-head > div:first-child::before {
  content: "第六巻";
}

#sources .section-head > div:first-child::before {
  content: "第七巻";
}

.room-grid article:nth-child(1)::after {
  content: "鉄";
}

.room-grid article:nth-child(2)::after,
.thesis-grid article:nth-child(3)::after {
  content: "仏";
}

.room-grid article:nth-child(3)::after,
.map-info::after {
  content: "北";
}

.room-grid article:nth-child(4)::after {
  content: "海";
}

.room-grid article:nth-child(5)::after {
  content: "武";
}

.room-grid article:nth-child(6)::after,
.event::after {
  content: "史";
}

.thesis-grid article:nth-child(1)::after {
  content: "字";
}

.thesis-grid article:nth-child(2)::after {
  content: "法";
}

.thesis-grid article:nth-child(4)::after {
  content: "道";
}

.lens-grid article:nth-child(1)::after {
  content: "人";
}

.lens-grid article:nth-child(2)::after {
  content: "橋";
}

.lens-grid article:nth-child(3)::after {
  content: "航";
}

.lens-grid article:nth-child(4)::after {
  content: "北";
}

.archive-card::after {
  content: "蔵";
}

.gift::after {
  content: "寿";
}

.room-grid article::after,
.thesis-grid article::after,
.lens-grid article::after,
.event::after,
.map-info::after,
.archive-card::after,
.gift::after {
  display: grid;
  place-items: center;
  color: rgba(114, 32, 27, 0.92);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-weight: 900;
  line-height: 1;
}

.timeline-wrap {
  position: relative;
}

.timeline-wrap::after {
  content: "";
  position: absolute;
  left: 183px;
  top: 16px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent, rgba(114, 32, 27, 0.32), rgba(63, 42, 29, 0.22), transparent);
}

.event {
  position: relative;
  margin-left: 18px;
  border-left: 0;
}

.event::before {
  z-index: 0;
}

.event > * {
  position: relative;
  z-index: 1;
}

.event[data-scroll-label]::marker {
  content: "";
}

.event[data-scroll-label]::before {
  content: attr(data-scroll-label);
  position: absolute;
  left: -82px;
  top: 20px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(114, 32, 27, 0.46);
  border-radius: 50%;
  background: var(--washi);
  color: var(--seal-dark);
  box-shadow: 3px 3px 0 rgba(63, 42, 29, 0.1);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
  font-weight: 900;
}

.map-card {
  position: relative;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent),
    var(--washi-deep);
}

.map-card::before,
.map-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
  width: 46px;
  height: 46px;
  border-color: rgba(63, 42, 29, 0.38);
  border-style: solid;
}

.map-card::before {
  left: 14px;
  top: 14px;
  border-width: 2px 0 0 2px;
}

.map-card::after {
  right: 14px;
  bottom: 14px;
  border-width: 0 2px 2px 0;
}

.real-map {
  min-height: 500px;
  border: 1px solid rgba(63, 42, 29, 0.18);
}

.museum-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 4px 8px;
  border: 1px solid rgba(63, 42, 29, 0.2);
  background: rgba(234, 216, 178, 0.54);
  color: var(--seal-dark);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
}

.archive-card a {
  gap: 7px;
}

.archive-card a span {
  color: var(--seal-dark);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
}

.gift-dialog {
  border: 1px solid rgba(63, 42, 29, 0.34);
  border-left: 10px solid var(--seal);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 42%),
    repeating-linear-gradient(90deg, rgba(111, 74, 47, 0.024) 0 1px, transparent 1px 13px),
    #fff3d6;
  box-shadow:
    inset 0 0 0 5px rgba(255, 248, 229, 0.45),
    0 30px 90px rgba(58, 43, 24, 0.28);
}

.gift-dialog::before {
  content: "寿";
  position: absolute;
  right: 28px;
  top: 26px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(114, 32, 27, 0.76);
  color: rgba(114, 32, 27, 0.9);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 1.4rem;
  font-weight: 900;
}

.gift-dialog h2 {
  padding-right: 76px;
}

@media (max-width: 900px) {
  .section-head {
    padding-left: 0;
    padding-top: 72px;
  }

  .section-head > div:first-child::before {
    left: 0;
    top: -78px;
    width: auto;
    min-height: 42px;
    padding: 0 12px;
    writing-mode: horizontal-tb;
  }

  .timeline-wrap::after,
  .event[data-scroll-label]::before {
    display: none;
  }

  .event {
    margin-left: 0;
  }
}

/* Classical controls and cards: shoji frames, washi panels, vermilion seals */
:root {
  --wood: #6f4a2f;
  --wood-dark: #3f2a1d;
  --washi: #fff3d6;
  --washi-deep: #ead8b2;
  --seal: #a7372e;
  --seal-dark: #72201b;
}

.button,
.filter,
.era,
.archive-nav,
.chapter-jump,
.dialog-close,
.archive-card a,
.source-list a {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(63, 42, 29, 0.42);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 58%),
    linear-gradient(90deg, transparent 0 10px, rgba(111, 74, 47, 0.12) 10px 11px, transparent 11px),
    var(--washi);
  color: var(--wood-dark);
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 229, 0.62),
    inset 0 -3px 0 rgba(111, 74, 47, 0.08),
    3px 3px 0 rgba(63, 42, 29, 0.14);
  font-weight: 900;
}

.button::before,
.filter::before,
.era::before,
.archive-nav::before,
.chapter-jump::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(63, 42, 29, 0.12);
  background:
    linear-gradient(60deg, transparent 0 47%, rgba(111, 74, 47, 0.08) 48% 52%, transparent 53%),
    linear-gradient(120deg, transparent 0 47%, rgba(111, 74, 47, 0.06) 48% 52%, transparent 53%);
  background-size: 18px 18px;
  opacity: 0.72;
}

.button:hover,
.filter:hover,
.era:hover,
.archive-nav:hover,
.chapter-jump:hover,
.archive-card a:hover,
.source-list a:hover {
  border-color: rgba(114, 32, 27, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 54%),
    #f7e7c2;
  color: var(--seal-dark);
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 229, 0.68),
    5px 5px 0 rgba(63, 42, 29, 0.16);
}

.primary,
.filter.active,
.era.active,
.chapter-jump.active {
  border-color: var(--seal-dark);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 55%),
    var(--seal);
  color: #fff4dc;
  box-shadow:
    inset 0 0 0 2px rgba(255, 218, 182, 0.18),
    4px 4px 0 rgba(63, 42, 29, 0.18);
}

.primary::after,
.filter.active::after,
.era.active::after,
.chapter-jump.active::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 244, 220, 0.82);
}

.room-grid article,
.thesis-grid article,
.lens-grid article,
.event,
.map-info,
.archive-card,
.source-list a,
.gift,
.exhibition-note,
.stats {
  border: 1px solid rgba(63, 42, 29, 0.28);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 42%),
    repeating-linear-gradient(90deg, rgba(111, 74, 47, 0.026) 0 1px, transparent 1px 12px),
    var(--washi);
  box-shadow:
    inset 0 0 0 5px rgba(255, 248, 229, 0.42),
    inset 0 0 0 6px rgba(63, 42, 29, 0.08),
    0 16px 38px rgba(58, 43, 24, 0.13);
  backdrop-filter: none;
}

.room-grid article::before,
.thesis-grid article::before,
.lens-grid article::before,
.event::before,
.map-info::before,
.archive-card::before,
.source-list a::before,
.gift::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid rgba(63, 42, 29, 0.1);
  background:
    linear-gradient(60deg, transparent 0 47%, rgba(111, 74, 47, 0.055) 48% 52%, transparent 53%),
    linear-gradient(120deg, transparent 0 47%, rgba(111, 74, 47, 0.045) 48% 52%, transparent 53%);
  background-size: 26px 26px;
}

.room-grid article::after,
.thesis-grid article::after,
.lens-grid article::after,
.event::after,
.map-info::after,
.archive-card::after,
.gift::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  display: block;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(114, 32, 27, 0.72);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(167, 55, 46, 0.18), transparent),
    rgba(255, 244, 220, 0.72);
}

.event {
  border-left: 9px solid var(--seal);
}

.archive-card {
  opacity: 0.78;
}

.archive-card.is-current {
  opacity: 1;
  border-color: rgba(114, 32, 27, 0.52);
  box-shadow:
    inset 0 0 0 5px rgba(255, 248, 229, 0.44),
    inset 0 0 0 6px rgba(114, 32, 27, 0.1),
    0 22px 52px rgba(58, 43, 24, 0.2);
}

.archive-card img {
  border-bottom: 1px solid rgba(63, 42, 29, 0.18);
}

.tag {
  border-color: rgba(63, 42, 29, 0.18);
  background: rgba(255, 244, 220, 0.62);
  color: var(--wood-dark);
}

body::before,
body::after,
main#top::before,
main#top::after {
  display: none !important;
  content: none !important;
  background: none !important;
  animation: none !important;
}

.hero-art img {
  transform: scale(1.01) !important;
}

/* Clean washi background */
body {
  background: #efe2c4 !important;
}

/* Final seal text lock */
.event::after {
  content: "史";
}

.map-info::after {
  content: "図";
}

.archive-card::after {
  content: "蔵";
}

.gift::after {
  content: "寿";
}

.event::after,
.map-info::after,
.archive-card::after,
.gift::after {
  display: grid;
  place-items: center;
  color: rgba(114, 32, 27, 0.92);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-weight: 900;
  line-height: 1;
}
