:root {
  color-scheme: dark;
  --ink: #f8f1e5;
  --ink-soft: rgba(248, 241, 229, 0.72);
  --ink-muted: rgba(248, 241, 229, 0.46);
  --charcoal: #070604;
  --charcoal-soft: rgba(7, 6, 4, 0.66);
  --paper: #efe4cf;
  --line: rgba(248, 241, 229, 0.16);
  --line-strong: rgba(248, 241, 229, 0.34);
  --clay: #c79164;
  --amber: #e2c27d;
  --water: #a9bbb9;
  --radius: 8px;
  --header: 76px;
  --scroll: 0%;
  --mx: 50vw;
  --my: 50vh;
  --active-glow: rgba(226, 194, 125, 0.18);
  --depth-x: 0;
  --depth-y: 0;
  --chapter-focus: 1;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--charcoal);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--charcoal);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 4;
  opacity: 0.24;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(248, 241, 229, 0.052), transparent 24rem),
    radial-gradient(circle at calc(var(--mx) + 18vw) calc(var(--my) - 18vh), var(--active-glow), transparent 18rem);
  mix-blend-mode: screen;
}

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

.ambient-video-preload {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-200vw, -200vh, 0);
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(248, 241, 229, 0.9);
  outline-offset: 3px;
}

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

.page-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 130;
  opacity: 0.05;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 5px 9px;
  mix-blend-mode: overlay;
}

.scroll-meter {
  position: fixed;
  inset: 0 0 auto;
  z-index: 160;
  height: 2px;
  background: rgba(248, 241, 229, 0.08);
}

.scroll-meter span {
  display: block;
  width: var(--scroll);
  height: 100%;
  background: linear-gradient(90deg, var(--water), var(--paper), var(--clay), var(--amber));
}

.site-header {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto;
  min-height: var(--header);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  padding: 14px clamp(18px, 4vw, 60px);
  background: linear-gradient(180deg, rgba(7, 6, 4, 0.82), rgba(7, 6, 4, 0));
  transition: background 240ms ease, backdrop-filter 240ms ease;
}

.site-header.is-scrolled {
  background: rgba(7, 6, 4, 0.66);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 244px;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 22px;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.12;
}

.brand strong {
  font-size: 14px;
  font-weight: 700;
}

.brand small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.top-links {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-links a,
.top-links button,
.mobile-menu a,
.mobile-menu button,
.button,
.drawer-close,
.chapter-rail button,
.menu-button {
  border-radius: var(--radius);
}

.top-links a,
.top-links button,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(248, 241, 229, 0.78);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.top-links a:hover,
.top-links a:focus-visible,
.top-links button:hover,
.top-links button:focus-visible,
.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.top-links a:hover,
.top-links a:focus-visible,
.top-links button:hover,
.top-links button:focus-visible {
  background: rgba(248, 241, 229, 0.08);
  color: var(--ink);
}

.button {
  border-color: var(--line);
  background: rgba(248, 241, 229, 0.08);
  color: var(--ink);
}

.button-primary {
  border-color: rgba(248, 241, 229, 0.92);
  background: var(--ink);
  color: var(--charcoal);
}

.button-secondary {
  backdrop-filter: blur(14px);
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: rgba(248, 241, 229, 0.06);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.mobile-menu {
  position: fixed;
  z-index: 112;
  top: var(--header);
  left: 0;
  right: 0;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 18px 18px;
  background: rgba(7, 6, 4, 0.94);
  backdrop-filter: blur(18px);
}

.mobile-menu.is-open {
  display: grid;
}

.mobile-menu a,
.mobile-menu button {
  min-height: 46px;
  border: 1px solid rgba(248, 241, 229, 0.12);
  background: rgba(248, 241, 229, 0.04);
  color: var(--ink-soft);
  font-weight: 700;
}

.chapter-rail {
  position: fixed;
  z-index: 108;
  top: 50%;
  right: clamp(14px, 2vw, 26px);
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.chapter-rail::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(248, 241, 229, 0.28), transparent);
}

.chapter-rail button {
  position: relative;
  z-index: 1;
  width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(248, 241, 229, 0.16);
  background: rgba(7, 6, 4, 0.34);
  color: rgba(248, 241, 229, 0.62);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.chapter-rail button:hover,
.chapter-rail button:focus-visible,
.chapter-rail button.is-active {
  transform: translateX(-4px);
  border-color: rgba(248, 241, 229, 0.78);
  background: rgba(248, 241, 229, 0.95);
  color: var(--charcoal);
}

.chapter-rail span {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 22px;
}

.chapter-rail b {
  position: absolute;
  right: 58px;
  width: max-content;
  max-width: 130px;
  padding: 7px 9px;
  border: 1px solid rgba(248, 241, 229, 0.14);
  background: rgba(7, 6, 4, 0.72);
  color: var(--ink);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.chapter-rail button:hover b,
.chapter-rail button:focus-visible b {
  opacity: 1;
  transform: translateX(0);
}

.spatial-journey {
  position: relative;
  height: 780svh;
  min-height: 5600px;
  background:
    radial-gradient(circle at 50% 20%, rgba(76, 65, 48, 0.26), transparent 44rem),
    linear-gradient(180deg, #080705, #050403 55%, #090806);
}

.space-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.space-sticky::before,
.space-sticky::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.space-sticky::before {
  z-index: 1;
  opacity: calc(0.12 + (var(--chapter-focus) * 0.18));
  background:
    radial-gradient(ellipse at 50% 47%, transparent 0 22%, rgba(248, 241, 229, 0.08) 22.2%, transparent 22.7%),
    radial-gradient(ellipse at 50% 47%, transparent 0 38%, rgba(169, 187, 185, 0.06) 38.15%, transparent 38.65%);
  transform:
    translate3d(calc(var(--depth-x) * 0.16px), calc(var(--depth-y) * 0.12px), 0)
    scale(calc(1.06 - (var(--chapter-focus) * 0.025)));
  mix-blend-mode: screen;
}

.space-sticky::after {
  z-index: 6;
  opacity: 0.18;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(248, 241, 229, 0.045) 18.2%, transparent 18.4%),
    linear-gradient(90deg, transparent 0 82%, rgba(248, 241, 229, 0.035) 82.2%, transparent 82.45%),
    linear-gradient(180deg, transparent 0 12%, rgba(248, 241, 229, 0.035) 12.2%, transparent 12.35%);
  mix-blend-mode: overlay;
}

.space-atmosphere,
.space-canvas,
.space-fallback,
.motion-veil,
.space-vignette,
.kanji-field {
  position: absolute;
  inset: 0;
}

.space-atmosphere {
  z-index: 0;
  overflow: hidden;
  background: #050403;
}

.space-atmosphere img {
  position: absolute;
  inset: -6vh -6vw;
  width: 112vw;
  height: 112vh;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1.16) brightness(0.88) contrast(1.24);
  transform:
    translate3d(calc(var(--depth-x) * -0.32px), calc(var(--depth-y) * -0.34px), 0)
    scale(1.08);
  transition: opacity 900ms ease, transform 1200ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 900ms ease;
}

.space-atmosphere img.is-active {
  opacity: calc(0.32 + (var(--chapter-focus) * 0.52));
  filter: saturate(1.24) brightness(0.96) contrast(1.3);
  transform:
    translate3d(calc(var(--depth-x) * -0.48px), calc(var(--depth-y) * -0.42px), 0)
    scale(1.02);
}

.space-canvas {
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

.space-fallback {
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: saturate(1.08) brightness(0.72) contrast(1.18);
}

.motion-veil {
  z-index: 3;
  pointer-events: none;
  opacity: 0.22;
  background:
    linear-gradient(118deg, transparent 0 36%, rgba(248, 241, 229, 0.034) 43%, transparent 53%),
    radial-gradient(circle at calc(50% + var(--depth-x) * 0.6px) calc(46% + var(--depth-y) * 0.5px), rgba(248, 241, 229, 0.07), transparent 17rem),
    repeating-linear-gradient(100deg, transparent 0 86px, rgba(248, 241, 229, 0.024) 88px, transparent 176px);
  mix-blend-mode: screen;
  animation: veil-drift 18s ease-in-out infinite alternate;
}

.space-vignette {
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 28%, rgba(7, 6, 4, 0.04) 54%, rgba(7, 6, 4, 0.72) 100%),
    linear-gradient(90deg, rgba(7, 6, 4, 0.74), rgba(7, 6, 4, 0.02) 35%, rgba(7, 6, 4, 0.04) 66%, rgba(7, 6, 4, 0.68)),
    linear-gradient(180deg, rgba(7, 6, 4, 0.22), transparent 25%, transparent 70%, rgba(7, 6, 4, 0.82));
}

.kanji-field {
  z-index: 5;
  pointer-events: none;
  display: grid;
  place-items: center end;
  padding-right: clamp(44px, 9vw, 150px);
  opacity: 0.16;
  mix-blend-mode: screen;
}

.kanji-field span {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(210px, 32vw, 560px);
  line-height: 0.8;
  color: var(--paper);
  transform: translate3d(calc(var(--depth-x, 0) * 1px), calc(var(--depth-y, 0) * 1px), 0);
}

.chapter-panel {
  position: absolute;
  z-index: 7;
  left: clamp(18px, 5vw, 76px);
  top: 50%;
  width: min(760px, calc(100% - 180px));
  transform: translateY(-50%);
  opacity: calc(0.18 + (var(--chapter-focus) * 0.82));
  transition: opacity 220ms ease, transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chapter-panel.is-changing {
  opacity: 0.24;
  transform: translateY(calc(-50% + 18px));
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(248, 241, 229, 0.66);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  font-size: clamp(58px, 9.5vw, 148px);
  line-height: 0.86;
}

h2 {
  max-width: 860px;
  font-size: clamp(40px, 6vw, 82px);
  line-height: 0.96;
}

.chapter-panel > p:not(.eyebrow) {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(248, 241, 229, 0.78);
  font-size: clamp(17px, 1.55vw, 22px);
}

.chapter-facts {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.chapter-facts span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid rgba(248, 241, 229, 0.16);
  border-radius: var(--radius);
  background: rgba(7, 6, 4, 0.34);
  color: rgba(248, 241, 229, 0.72);
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(14px);
}

.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.chapter-actions .button-secondary {
  display: none;
}

.ritual-hotspots {
  position: absolute;
  z-index: 8;
  right: clamp(76px, 12vw, 240px);
  top: 50%;
  width: min(310px, 30vw);
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
  opacity: calc(0.05 + (var(--chapter-focus) * 0.95));
  pointer-events: none;
}

.ritual-hotspots button {
  min-height: 52px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(248, 241, 229, 0.12);
  border-radius: var(--radius);
  background: rgba(7, 6, 4, 0.2);
  color: rgba(248, 241, 229, 0.74);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.18;
  backdrop-filter: blur(16px);
  opacity: 0.46;
  pointer-events: auto;
  transform: translate3d(calc(var(--depth-x) * 0.22px), calc(var(--depth-y) * 0.18px), 0);
  transition: opacity 180ms ease, transform 220ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.ritual-hotspots span {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 240ms ease, opacity 180ms ease;
}

.ritual-hotspots button:nth-child(2) {
  margin-left: clamp(22px, 3vw, 54px);
}

.ritual-hotspots button:nth-child(3) {
  margin-left: clamp(6px, 1.6vw, 34px);
}

.ritual-hotspots button:hover,
.ritual-hotspots button:focus-visible,
.ritual-hotspots button.is-active {
  opacity: 1;
  border-color: rgba(248, 241, 229, 0.66);
  background: rgba(248, 241, 229, 0.9);
  color: var(--charcoal);
  transform: translate3d(calc(var(--depth-x) * 0.22px - 6px), calc(var(--depth-y) * 0.18px), 0);
}

.ritual-hotspots button:hover span,
.ritual-hotspots button:focus-visible span,
.ritual-hotspots button.is-active span {
  max-width: 220px;
  opacity: 1;
}

.ritual-hotspots i {
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(248, 241, 229, 0.06);
}

.detail-drawer {
  position: absolute;
  z-index: 10;
  right: clamp(74px, 7vw, 138px);
  bottom: clamp(26px, 5vw, 62px);
  width: min(430px, calc(100% - 96px));
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(248, 241, 229, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(248, 241, 229, 0.12), rgba(248, 241, 229, 0.025)),
    rgba(7, 6, 4, 0.64);
  color: var(--ink);
  backdrop-filter: blur(22px);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 22px, 0) scale(0.98);
  transition: opacity 240ms ease, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.detail-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.detail-drawer img {
  width: 118px;
  height: 154px;
  border-radius: calc(var(--radius) - 2px);
  object-fit: cover;
  filter: saturate(1.08) brightness(0.94) contrast(1.16);
}

.detail-drawer h2 {
  font-size: 28px;
}

.detail-drawer ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.detail-drawer li {
  padding-top: 8px;
  border-top: 1px solid rgba(248, 241, 229, 0.12);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.4;
  transition: color 160ms ease, border-color 160ms ease;
}

.detail-drawer li.is-emphasis {
  border-color: rgba(226, 194, 125, 0.58);
  color: var(--ink);
}

.detail-drawer li.is-copy {
  padding-top: 0;
  border-top: 0;
  color: rgba(248, 241, 229, 0.84);
  font-size: 15px;
}

.drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(248, 241, 229, 0.16);
  background: rgba(7, 6, 4, 0.5);
  color: rgba(248, 241, 229, 0.76);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.depth-readout {
  position: absolute;
  z-index: 8;
  left: clamp(18px, 5vw, 76px);
  bottom: clamp(18px, 4vw, 46px);
  display: grid;
  grid-template-columns: auto 72px auto;
  align-items: center;
  gap: 12px;
  color: rgba(248, 241, 229, 0.74);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: calc(0.26 + (var(--chapter-focus) * 0.74));
}

.map-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 64px);
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(226, 194, 125, 0.12), transparent 22rem),
    rgba(5, 4, 3, 0.9);
  backdrop-filter: blur(26px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 260ms ease, transform 460ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.map-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.map-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(248, 241, 229, 0.2);
  border-radius: var(--radius);
  background: rgba(248, 241, 229, 0.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.map-stage {
  width: min(1280px, 100%);
  min-height: min(760px, calc(100svh - 72px));
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(420px, 1.35fr) minmax(260px, 0.72fr);
  gap: clamp(18px, 3vw, 42px);
  align-items: center;
}

.map-copy > p:not(.eyebrow),
.map-inspector > p {
  color: var(--ink-soft);
  font-size: 16px;
}

.map-art {
  position: relative;
  aspect-ratio: 1.42;
  min-height: 420px;
  border: 1px solid rgba(248, 241, 229, 0.13);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 62%, rgba(169, 187, 185, 0.2), transparent 19rem),
    radial-gradient(circle at 70% 34%, rgba(226, 194, 125, 0.14), transparent 21rem),
    linear-gradient(145deg, rgba(18, 23, 17, 0.92), rgba(6, 6, 4, 0.9));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.34), 0 36px 120px rgba(0, 0, 0, 0.35);
}

.map-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(248, 241, 229, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(248, 241, 229, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 78%);
}

.map-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
}

.topo {
  stroke: rgba(248, 241, 229, 0.16);
  stroke-width: 1.4;
}

.water-line {
  stroke: rgba(169, 187, 185, 0.42);
  stroke-width: 2.4;
  stroke-dasharray: 9 11;
  animation: map-current 16s linear infinite;
}

.route-line {
  stroke: rgba(226, 194, 125, 0.86);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-dasharray: 18 13;
  filter: drop-shadow(0 0 10px rgba(226, 194, 125, 0.36));
  animation: map-current 10s linear infinite;
}

.map-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(248, 241, 229, 0.3);
  border-radius: 50%;
  background: rgba(5, 4, 3, 0.66);
  color: var(--ink);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 0 10px rgba(248, 241, 229, 0.035);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.map-node:hover,
.map-node:focus-visible,
.map-node.is-active {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--charcoal);
  box-shadow: 0 0 0 14px rgba(226, 194, 125, 0.11), 0 0 40px rgba(226, 194, 125, 0.24);
  transform: translate(-50%, -50%) scale(1.08);
}

.map-node span {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 24px;
  line-height: 1;
}

.map-node b {
  position: absolute;
  top: calc(100% + 8px);
  width: max-content;
  max-width: 110px;
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
  transform: translateY(3px);
}

.map-inspector {
  display: grid;
  gap: 12px;
  padding: 16px 0;
}

.map-inspector h3 {
  font-size: clamp(30px, 3.2vw, 50px);
  line-height: 0.98;
}

.map-inspector [data-map-meta] {
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
  color: var(--water);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

body.map-open {
  overflow: hidden;
}

.immersion-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: clamp(18px, 4vw, 64px);
  padding: calc(var(--header) + 30px) clamp(18px, 5vw, 76px) clamp(24px, 5vw, 70px);
  background: #050403;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.012);
  transition: opacity 280ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.immersion-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.immersion-media,
.immersion-media img,
.immersion-media video,
.immersion-media-shade {
  position: absolute;
  inset: 0;
}

.immersion-media {
  z-index: 0;
  overflow: hidden;
}

.immersion-media img,
.immersion-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.2) brightness(1.02) contrast(1.28);
  transform: scale(1.035);
}

.immersion-media video {
  opacity: 0;
  transition: opacity 260ms ease;
}

.immersion-overlay.has-video .immersion-media video {
  opacity: 1;
}

.immersion-media-shade {
  z-index: 1;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(248, 241, 229, 0.052), transparent 20rem),
    linear-gradient(90deg, rgba(5, 4, 3, 0.78), rgba(5, 4, 3, 0.06) 48%, rgba(5, 4, 3, 0.58)),
    linear-gradient(180deg, rgba(5, 4, 3, 0.24), transparent 34%, rgba(5, 4, 3, 0.84));
}

.immersion-copy,
.immersion-service,
.immersion-close {
  position: relative;
  z-index: 2;
}

.immersion-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(248, 241, 229, 0.2);
  border-radius: var(--radius);
  background: rgba(5, 4, 3, 0.42);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
}

.immersion-copy {
  max-width: 970px;
  align-self: center;
}

.immersion-copy h2 {
  max-width: 1010px;
  font-size: clamp(54px, 9vw, 142px);
  line-height: 0.86;
}

.immersion-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 26px 0 0;
  color: rgba(248, 241, 229, 0.78);
  font-size: clamp(18px, 1.6vw, 24px);
}

.immersion-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.immersion-facts span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid rgba(248, 241, 229, 0.18);
  border-radius: var(--radius);
  background: rgba(5, 4, 3, 0.32);
  color: rgba(248, 241, 229, 0.74);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.immersion-service {
  align-self: end;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(248, 241, 229, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(248, 241, 229, 0.12), rgba(248, 241, 229, 0.026)),
    rgba(5, 4, 3, 0.55);
  backdrop-filter: blur(22px);
}

.immersion-service > span {
  color: var(--water);
  font-size: 12px;
  font-weight: 700;
}

.immersion-service h3 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 0.98;
}

.immersion-service ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.immersion-service li {
  padding-top: 9px;
  border-top: 1px solid rgba(248, 241, 229, 0.12);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.42;
}

.immersion-layers {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 4px;
}

.immersion-layer-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.immersion-layer-tabs button {
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid rgba(248, 241, 229, 0.14);
  border-radius: var(--radius);
  background: rgba(5, 4, 3, 0.22);
  color: rgba(248, 241, 229, 0.7);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.immersion-layer-tabs button:hover,
.immersion-layer-tabs button:focus-visible,
.immersion-layer-tabs button.is-active {
  transform: translateY(-1px);
  border-color: rgba(248, 241, 229, 0.82);
  background: rgba(248, 241, 229, 0.92);
  color: #090806;
}

.immersion-layer-panel {
  display: grid;
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(248, 241, 229, 0.18);
}

.immersion-layer-panel h4 {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.02;
}

.immersion-layer-panel p:not(.eyebrow) {
  margin: 0;
  color: rgba(248, 241, 229, 0.74);
  font-size: 14px;
  line-height: 1.48;
}

.immersion-layer-panel ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.immersion-layer-panel li {
  position: relative;
  padding: 0 0 0 14px;
  border: 0;
  color: rgba(248, 241, 229, 0.68);
  font-size: 13px;
}

.immersion-layer-panel li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 1px;
  background: var(--water);
}

.immersion-actions {
  display: grid;
  grid-template-columns: 0.6fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

body.immersion-open {
  overflow: hidden;
}

@keyframes veil-drift {
  from {
    transform: translate3d(-1.4vw, -0.6vh, 0);
  }

  to {
    transform: translate3d(1.2vw, 0.9vh, 0);
  }
}

@keyframes map-current {
  to {
    stroke-dashoffset: -240;
  }
}

.depth-readout i {
  display: block;
  height: 1px;
  background: rgba(248, 241, 229, 0.34);
}

.reserve-section {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: calc(var(--header) + 70px) clamp(18px, 5vw, 72px) 90px;
  background: var(--charcoal);
}

.reserve-media,
.reserve-media img {
  position: absolute;
  inset: 0;
}

.reserve-media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.66) contrast(1.22);
}

.reserve-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 6, 4, 0.82), rgba(7, 6, 4, 0.24), rgba(7, 6, 4, 0.76)),
    linear-gradient(180deg, rgba(7, 6, 4, 0.12), rgba(7, 6, 4, 0.9));
}

.reserve-content {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
}

.reserve-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 42px;
  border: 1px solid rgba(248, 241, 229, 0.14);
  background: rgba(248, 241, 229, 0.12);
}

.reserve-grid div {
  min-height: 160px;
  padding: 20px;
  background: rgba(7, 6, 4, 0.58);
}

.reserve-grid span,
.reserve-form label span {
  color: var(--clay);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.reserve-grid strong {
  display: block;
  margin-top: 10px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 500;
  line-height: 1.04;
}

.reserve-grid p {
  margin: 12px 0 0;
  color: var(--ink-soft);
}

.reserve-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(140px, 0.55fr) minmax(170px, 0.8fr) minmax(260px, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.reserve-form label,
.reserve-form output {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(248, 241, 229, 0.16);
  border-radius: var(--radius);
  background: rgba(7, 6, 4, 0.5);
  backdrop-filter: blur(12px);
}

.reserve-form label {
  display: grid;
  gap: 4px;
}

.reserve-form input,
.reserve-form select {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
}

.reserve-form output {
  display: flex;
  align-items: center;
  color: var(--ink-soft);
}

.reserve-content > .button {
  margin-top: 24px;
}

@media (max-width: 1160px) {
  .top-links {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .chapter-panel {
    width: min(720px, calc(100% - 112px));
  }

  .ritual-hotspots {
    right: 22px;
    width: min(290px, 32vw);
  }

  .map-stage {
    grid-template-columns: 1fr;
    align-items: start;
    overflow-y: auto;
    max-height: calc(100svh - 72px);
    padding-right: 4px;
  }

  .map-copy {
    max-width: 760px;
  }

  .map-art {
    width: min(760px, 100%);
    min-height: 360px;
  }

  .immersion-overlay {
    grid-template-columns: 1fr;
    align-items: end;
    overflow-y: auto;
  }

  .immersion-service {
    width: min(620px, 100%);
  }

  .reserve-form {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  :root {
    --header: 66px;
  }

  .site-header {
    padding: 10px 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-seal {
    width: 42px;
    height: 42px;
  }

  .brand small {
    display: none;
  }

  .chapter-rail {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 10px;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    transform: none;
  }

  .chapter-rail::before {
    top: 21px;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(248, 241, 229, 0.22), transparent);
  }

  .chapter-rail button {
    width: 100%;
    min-height: 42px;
  }

  .chapter-rail button:hover,
  .chapter-rail button:focus-visible,
  .chapter-rail button.is-active {
    transform: translateY(-2px);
  }

  .chapter-rail b {
    display: none;
  }

  .chapter-rail span {
    font-size: 18px;
  }

  .spatial-journey {
    height: 720svh;
    min-height: 4700px;
  }

  .space-atmosphere img {
    inset: -4vh -16vw;
    width: 132vw;
    height: 108vh;
  }

  .space-vignette {
    background:
      radial-gradient(circle at 50% 45%, transparent 0 16%, rgba(7, 6, 4, 0.28) 50%, rgba(7, 6, 4, 0.84) 100%),
      linear-gradient(180deg, rgba(7, 6, 4, 0.22), rgba(7, 6, 4, 0.12) 34%, rgba(7, 6, 4, 0.9));
  }

  .kanji-field {
    place-items: center end;
    padding-right: 6px;
    opacity: 0.12;
  }

  .kanji-field span {
    font-size: 220px;
  }

  .chapter-panel {
    left: 18px;
    right: 18px;
    top: 45%;
    width: auto;
  }

  h1 {
    font-size: clamp(48px, 15vw, 68px);
    line-height: 0.94;
  }

  h2 {
    font-size: clamp(36px, 11vw, 52px);
  }

  .chapter-panel > p:not(.eyebrow) {
    font-size: 16px;
  }

  .chapter-facts {
    display: none;
  }

  .chapter-actions {
    margin-top: 22px;
  }

  .ritual-hotspots {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: 142px;
    width: auto;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    transform: none;
  }

  .ritual-hotspots button {
    min-height: 44px;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px;
    font-size: 10px;
    text-align: center;
  }

  .ritual-hotspots button:nth-child(2),
  .ritual-hotspots button:nth-child(3) {
    margin-left: 0;
  }

  .ritual-hotspots i {
    display: none;
  }

  .ritual-hotspots span {
    max-width: none;
    opacity: 1;
    overflow: visible;
    white-space: normal;
  }

  .detail-drawer {
    left: 14px;
    right: 14px;
    bottom: 76px;
    width: auto;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .detail-drawer img {
    width: 92px;
    height: 132px;
  }

  .detail-drawer h2 {
    font-size: 25px;
  }

  .detail-drawer li {
    font-size: 13px;
  }

  .drawer-close {
    top: 8px;
    right: 8px;
  }

  .depth-readout {
    display: none;
  }

  .reserve-section {
    padding: calc(var(--header) + 54px) 16px 118px;
  }

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

  .map-overlay {
    padding: 70px 14px 18px;
  }

  .map-close {
    top: 12px;
    right: 12px;
  }

  .map-stage {
    min-height: 0;
    gap: 18px;
  }

  .map-copy > p:not(.eyebrow) {
    display: none;
  }

  .map-art {
    min-height: 300px;
  }

  .map-node {
    width: 44px;
    height: 44px;
  }

  .map-node b {
    display: none;
  }

  .map-inspector h3 {
    font-size: 32px;
  }

  .immersion-overlay {
    padding: 72px 16px 18px;
    gap: 18px;
    align-content: start;
    align-items: start;
  }

  .immersion-close {
    top: 12px;
    right: 12px;
  }

  .immersion-copy {
    align-self: start;
    padding-top: min(9vh, 72px);
  }

  .immersion-copy h2 {
    font-size: clamp(42px, 13vw, 64px);
    line-height: 0.94;
  }

  .immersion-copy > p:not(.eyebrow) {
    margin-top: 18px;
    font-size: 16px;
  }

  .immersion-facts {
    display: none;
  }

  .immersion-service {
    padding: 14px;
    max-height: none;
  }

  .immersion-service h3 {
    font-size: 28px;
  }

  .immersion-actions {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
