:root {
  --bg-ink: #061724;
  --bg-mid: #052032;
  --bg-deep: #03101b;
  --cyan: #2fd0ff;
  --green: #57d09f;
  --acid: #dae949;
  --amber: #f19f2f;
  --paper: rgba(234, 244, 233, 0.82);
  --paper-strong: rgba(240, 248, 239, 0.94);
  --line: rgba(194, 244, 255, 0.34);
  --text-main: #eefaf7;
  --text-soft: #cbdfda;
  --ink-main: #0a2935;
  --font-body: "Zen Old Mincho", "Hiragino Mincho ProN", serif;
  --font-ui: "Antonio", sans-serif;
  --font-display: "Unbounded", sans-serif;
  --header-bg: rgba(2, 16, 26, 0.72);
  --surface-card: linear-gradient(145deg, rgba(5, 28, 41, 0.82), rgba(7, 37, 54, 0.73));
  --surface-panel: rgba(7, 35, 50, 0.72);
  --surface-footer: rgba(4, 24, 37, 0.78);
  --ghost-bg: rgba(4, 27, 41, 0.66);
  --ghost-hover-bg: rgba(13, 44, 63, 0.84);
  --tone-hue: 0deg;
  --tone-sat: 1;
  --tone-contrast: 1;
  --shadow-heavy: 0 32px 70px rgba(1, 9, 14, 0.5);
  --shadow-mid: 0 18px 36px rgba(3, 19, 28, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.75;
  background:
    radial-gradient(circle at 8% 9%, rgba(47, 208, 255, 0.26), transparent 30%),
    radial-gradient(circle at 83% 16%, rgba(241, 159, 47, 0.25), transparent 34%),
    radial-gradient(circle at 72% 85%, rgba(87, 208, 159, 0.22), transparent 30%),
    linear-gradient(150deg, var(--bg-ink) 0%, var(--bg-mid) 52%, var(--bg-deep) 100%);
  transition: background 0.85s cubic-bezier(0.22, 1, 0.36, 1), color 0.4s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: -14%;
  z-index: -5;
  pointer-events: none;
  opacity: 0;
  background-image: url("./keyvisual.JPG");
  background-size: cover;
  background-position: center;
  filter: blur(42px) saturate(1.55) contrast(1.08);
  transform: scale(1.24);
  transition: opacity 0.9s ease;
}

body.world-swamp-ready::before {
  opacity: 0.24;
  animation: swamp-loom 16s ease-in-out infinite alternate;
}

@keyframes swamp-loom {
  from {
    transform: scale(1.24) translate3d(-1.2%, -0.8%, 0);
  }

  to {
    transform: scale(1.32) translate3d(1.1%, 0.9%, 0);
  }
}

body[data-tone="one-day"] {
  --bg-ink: #032530;
  --bg-mid: #0c4153;
  --bg-deep: #061f2a;
  --cyan: #5fe9d0;
  --acid: #d8f874;
  --amber: #f8ba54;
  --text-main: #f0fff7;
  --text-soft: #c7e8de;
  --header-bg: rgba(3, 33, 44, 0.76);
  --surface-card: linear-gradient(145deg, rgba(8, 46, 60, 0.84), rgba(6, 54, 64, 0.75));
  --surface-panel: rgba(8, 48, 63, 0.74);
  --surface-footer: rgba(6, 37, 48, 0.8);
  --ghost-bg: rgba(6, 44, 60, 0.7);
  --ghost-hover-bg: rgba(9, 62, 78, 0.88);
  --tone-hue: 18deg;
  --tone-sat: 1.25;
  --tone-contrast: 1.06;
}

body[data-tone="film"] {
  --bg-ink: #110e18;
  --bg-mid: #2a1d2d;
  --bg-deep: #0e0b15;
  --cyan: #bb9ecb;
  --acid: #f1cd86;
  --amber: #d7964d;
  --text-main: #f7edf8;
  --text-soft: #dbcfe2;
  --header-bg: rgba(20, 15, 30, 0.8);
  --surface-card: linear-gradient(145deg, rgba(33, 24, 43, 0.86), rgba(48, 32, 58, 0.75));
  --surface-panel: rgba(36, 25, 45, 0.74);
  --surface-footer: rgba(24, 17, 32, 0.82);
  --ghost-bg: rgba(31, 23, 42, 0.75);
  --ghost-hover-bg: rgba(45, 31, 58, 0.88);
  --tone-hue: -38deg;
  --tone-sat: 0.82;
  --tone-contrast: 1.08;
}

body[data-tone="photo"] {
  --bg-ink: #08261c;
  --bg-mid: #0d3a2d;
  --bg-deep: #072118;
  --cyan: #7fd0a3;
  --acid: #d7ef9a;
  --amber: #ffbf73;
  --text-main: #effff6;
  --text-soft: #c7e4d5;
  --header-bg: rgba(7, 37, 28, 0.78);
  --surface-card: linear-gradient(145deg, rgba(11, 52, 38, 0.84), rgba(17, 66, 49, 0.74));
  --surface-panel: rgba(13, 52, 39, 0.74);
  --surface-footer: rgba(8, 36, 28, 0.82);
  --ghost-bg: rgba(13, 48, 37, 0.72);
  --ghost-hover-bg: rgba(18, 65, 48, 0.88);
  --tone-hue: 26deg;
  --tone-sat: 1.08;
  --tone-contrast: 1.03;
}

body[data-tone="bonsai"] {
  --bg-ink: #041d2f;
  --bg-mid: #0a344d;
  --bg-deep: #041a2b;
  --cyan: #69ceff;
  --acid: #b8e95c;
  --amber: #f29c57;
  --text-main: #f1fbff;
  --text-soft: #c7dfea;
  --header-bg: rgba(4, 26, 42, 0.78);
  --surface-card: linear-gradient(145deg, rgba(8, 41, 63, 0.84), rgba(8, 54, 76, 0.75));
  --surface-panel: rgba(8, 42, 62, 0.74);
  --surface-footer: rgba(6, 28, 43, 0.81);
  --ghost-bg: rgba(8, 43, 65, 0.72);
  --ghost-hover-bg: rgba(11, 62, 90, 0.88);
  --tone-hue: -8deg;
  --tone-sat: 1.16;
  --tone-contrast: 1.08;
}

body[data-tone="map"] {
  --bg-ink: #16230c;
  --bg-mid: #384714;
  --bg-deep: #111e09;
  --cyan: #d0f17a;
  --acid: #f1ea72;
  --amber: #ffb84f;
  --text-main: #fbffee;
  --text-soft: #e3efc7;
  --header-bg: rgba(25, 37, 16, 0.78);
  --surface-card: linear-gradient(145deg, rgba(39, 57, 22, 0.84), rgba(54, 78, 29, 0.75));
  --surface-panel: rgba(38, 58, 22, 0.74);
  --surface-footer: rgba(24, 37, 14, 0.81);
  --ghost-bg: rgba(37, 57, 22, 0.72);
  --ghost-hover-bg: rgba(53, 78, 31, 0.88);
  --tone-hue: 52deg;
  --tone-sat: 1.2;
  --tone-contrast: 1.07;
}

h1,
h2,
h3,
p,
ul,
ol,
li,
figure {
  margin: 0;
}

a {
  color: inherit;
}

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

.grain {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.56) 0.8px, transparent 0),
    radial-gradient(circle at 7px 7px, rgba(0, 0, 0, 0.24) 0.8px, transparent 0);
  background-size: 14px 14px, 16px 16px;
}

.aura {
  position: fixed;
  z-index: -3;
  border-radius: 50%;
  filter: blur(14px);
  pointer-events: none;
}

.aura-a {
  width: 420px;
  height: 420px;
  top: -170px;
  right: -120px;
  background: radial-gradient(circle, rgba(218, 233, 73, 0.46), rgba(218, 233, 73, 0));
}

.aura-b {
  width: 480px;
  height: 480px;
  bottom: -230px;
  left: -180px;
  background: radial-gradient(circle, rgba(47, 208, 255, 0.36), rgba(47, 208, 255, 0));
}

.world-swamp-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  filter: saturate(1.2) contrast(1.1);
  transition: opacity 0.85s ease;
}

body.world-swamp-ready .world-swamp-canvas {
  opacity: 0.86;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 1.12rem;
  border-bottom: 1px solid rgba(161, 226, 244, 0.32);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  transition: background 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand {
  text-decoration: none;
  line-height: 1;
  display: grid;
}

.brand-main {
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

.brand-sub {
  margin-top: 0.18rem;
  font-family: var(--font-ui);
  letter-spacing: 0.22em;
  color: var(--cyan);
  font-size: 1.22rem;
  transition: color 0.5s ease;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  background: var(--ghost-bg);
  color: #e5f6ff;
  font-family: var(--font-ui);
  letter-spacing: 0.12em;
  transition: background 0.45s ease;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.global-nav a {
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.87rem;
  letter-spacing: 0.12em;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.32rem 0.64rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.global-nav a:hover,
.global-nav a:focus-visible {
  border-color: rgba(218, 233, 73, 0.54);
  color: var(--acid);
}

main {
  overflow: clip;
}

.opening,
.chapters,
.journey,
.site-footer {
  width: min(1280px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.opening {
  padding-top: clamp(3.6rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 6vw, 5.2rem);
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(1.1rem, 2.5vw, 2.1rem);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-ui);
  letter-spacing: 0.15em;
  font-size: 0.83rem;
  color: rgba(219, 248, 255, 0.78);
}

.opening h1 {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.16rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  font-size: clamp(2rem, 4.8vw, 4.6rem);
}

.opening h1 span:nth-child(2) {
  color: var(--acid);
}

.lead {
  margin-top: 1.15rem;
  max-width: 34ch;
  color: var(--text-soft);
  font-size: 1rem;
}

.opening-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.primary-cta,
.ghost-cta,
.chapter-link,
.journey-links a,
.modal-link {
  text-decoration: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-cta {
  border: 1px solid rgba(218, 233, 73, 0.62);
  background: linear-gradient(120deg, rgba(218, 233, 73, 0.94), rgba(47, 208, 255, 0.6));
  color: #052133;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
}

.primary-cta:hover,
.primary-cta:focus-visible {
  transform: translateY(-2px);
}

.ghost-cta {
  border: 1px solid rgba(161, 226, 244, 0.45);
  background: var(--ghost-bg);
  color: #dbf5fd;
  padding: 0.6rem 0.98rem;
  font-size: 0.84rem;
}

.ghost-cta:hover,
.ghost-cta:focus-visible {
  background: var(--ghost-hover-bg);
}

.opening-stage {
  --parallax-x: 0px;
  --parallax-y: 0px;
  position: relative;
  min-height: min(86vw, 900px);
  border-radius: 34px;
  isolation: isolate;
  transform: translate(var(--parallax-x), var(--parallax-y));
}

.keyvisual-frame {
  position: relative;
  margin: 0;
  border-radius: 42% 58% 47% 53% / 43% 40% 60% 57%;
  overflow: hidden;
  width: min(92%, 760px);
  box-shadow: var(--shadow-heavy);
  border: 2px solid rgba(206, 247, 255, 0.4);
  filter: hue-rotate(var(--tone-hue)) saturate(var(--tone-sat)) contrast(var(--tone-contrast));
  transform-style: preserve-3d;
  transition: filter 0.75s ease;
}

.keyvisual-frame img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform, opacity;
  transition: opacity 0.45s ease;
}

.keyvisual-trick-stack {
  position: absolute;
  inset: -2%;
  z-index: 2;
  pointer-events: none;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  mix-blend-mode: screen;
  opacity: 0.62;
  will-change: transform, opacity;
}

.keyvisual-layer {
  position: absolute;
  inset: -4%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
}

.keyvisual-layer-back {
  clip-path: polygon(0 0, 100% 0, 100% 46%, 82% 39%, 65% 44%, 52% 38%, 34% 43%, 14% 40%, 0 46%);
  mix-blend-mode: lighten;
  opacity: 0.58;
  filter: saturate(1.24) contrast(1.14) brightness(1.08);
}

.keyvisual-layer-mid {
  clip-path: polygon(0 28%, 100% 24%, 100% 74%, 86% 67%, 68% 72%, 49% 66%, 24% 70%, 0 68%);
  mix-blend-mode: screen;
  opacity: 0.66;
  filter: saturate(1.2) contrast(1.08);
}

.keyvisual-layer-front {
  clip-path: polygon(0 58%, 100% 52%, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  opacity: 0.54;
  filter: saturate(1.36) contrast(1.16) brightness(1.1);
}

.keyvisual-layer-beast {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0.9;
  will-change: opacity;
}

.keyvisual-lens {
  position: absolute;
  width: min(42%, 290px);
  aspect-ratio: 1 / 1;
  border-radius: 38% 62% 59% 41% / 43% 37% 63% 57%;
  border: 1px solid rgba(218, 246, 255, 0.34);
  background:
    radial-gradient(circle at 30% 28%, rgba(251, 243, 122, 0.3), rgba(251, 243, 122, 0) 56%),
    radial-gradient(circle at 71% 68%, rgba(46, 180, 214, 0.24), rgba(46, 180, 214, 0) 60%),
    rgba(4, 37, 52, 0.2);
  box-shadow: 0 14px 36px rgba(2, 16, 24, 0.26), inset 0 0 26px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

.keyvisual-lens-a {
  width: min(36%, 250px);
}

.keyvisual-lens-b {
  width: min(30%, 210px);
  border-radius: 58% 42% 37% 63% / 38% 58% 42% 62%;
}

.keyvisual-webgl {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
}

body.webgl-ready .keyvisual-webgl {
  display: block;
}

body.fx-2d .keyvisual-webgl {
  mix-blend-mode: screen;
  opacity: 0.74;
  filter: saturate(1.18) contrast(1.06) brightness(1.02);
  animation: keyvisual-chaos 4.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

body.webgl-ready .keyvisual-frame img {
  opacity: 1;
}

@keyframes keyvisual-chaos {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.012) translate3d(-0.12%, 0.18%, 0);
  }
}

.poster-frame {
  --parallax-x: 0px;
  --parallax-y: 0px;
  position: absolute;
  right: 0;
  bottom: 8%;
  margin: 0;
  width: min(36%, 320px);
  border-radius: 18px;
  overflow: hidden;
  transform: rotate(-9deg) translate(var(--parallax-x), var(--parallax-y));
  box-shadow: var(--shadow-mid);
  border: 1px solid rgba(235, 247, 231, 0.5);
  filter: hue-rotate(var(--tone-hue)) saturate(var(--tone-sat)) contrast(var(--tone-contrast));
  transition: filter 0.75s ease;
}

.poster-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 2481 / 3508;
  object-fit: cover;
  object-position: center top;
}

.floating-quote {
  position: absolute;
  left: 51%;
  top: 5%;
  transform: translateX(-50%);
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(218, 233, 73, 0.56);
  border-radius: 999px;
  background: rgba(5, 26, 38, 0.8);
  font-family: var(--font-ui);
  letter-spacing: 0.14em;
  font-size: 0.84rem;
  color: var(--acid);
}

.marquee-wrap {
  margin: 0.3rem 0 clamp(2.2rem, 5vw, 4rem);
  border-top: 1px solid rgba(163, 218, 233, 0.2);
  border-bottom: 1px solid rgba(163, 218, 233, 0.2);
  background: rgba(4, 24, 36, 0.56);
  overflow: hidden;
}

.marquee {
  white-space: nowrap;
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0.72rem 0;
  min-width: 200%;
}

.marquee span {
  font-family: var(--font-ui);
  font-size: clamp(0.9rem, 1.6vw, 1.18rem);
  letter-spacing: 0.19em;
  color: rgba(229, 252, 255, 0.88);
}

.marquee-forward {
  animation: marquee-forward 22s linear infinite;
}

.marquee-backward {
  animation: marquee-backward 30s linear infinite;
  border-top: 1px solid rgba(163, 218, 233, 0.18);
}

@keyframes marquee-forward {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes marquee-backward {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

.chapters {
  padding-top: 0.8rem;
  padding-bottom: clamp(2.6rem, 6vw, 4.6rem);
}

.section-head {
  margin-bottom: 1.35rem;
  display: grid;
  gap: 0.52rem;
}

.section-head h2,
.journey h2 {
  font-family: var(--font-display);
  font-size: clamp(1.58rem, 3.7vw, 3rem);
  line-height: 1.2;
  max-width: 18ch;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.8rem;
}

.chapter-card {
  grid-column: span 4;
  display: grid;
  gap: 0.75rem;
  padding: 0.72rem;
  border-radius: 24px;
  border: 1px solid rgba(177, 228, 240, 0.3);
  background: var(--surface-card);
  box-shadow: var(--shadow-mid);
  position: relative;
  overflow: hidden;
  transition: background 0.6s ease, border-color 0.4s ease, transform 0.3s ease;
}

.chapter-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(130deg, color-mix(in srgb, var(--accent) 45%, transparent), transparent 56%);
  opacity: 0.45;
  pointer-events: none;
}

.chapter-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 70%, white);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.chapter-card.is-active::before {
  opacity: 0.68;
}

.chapter-card:nth-child(2),
.chapter-card:nth-child(5) {
  transform: translateY(24px);
}

.chapter-card:nth-child(3),
.chapter-card:nth-child(6) {
  transform: translateY(-16px);
}

.chapter-card figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(210, 244, 255, 0.34);
  background: #0b2a3e;
  filter: hue-rotate(var(--tone-hue)) saturate(var(--tone-sat)) contrast(var(--tone-contrast));
  transition: filter 0.7s ease;
}

.chapter-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.chapter-card h3 {
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.25;
}

.chapter-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.chapter-tag {
  color: rgba(221, 243, 255, 0.74);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}

.chapter-link {
  margin-top: 0.6rem;
  border: 1px solid rgba(219, 249, 255, 0.5);
  background: rgba(6, 38, 56, 0.82);
  color: #ecfafb;
  padding: 0.5rem 0.78rem;
  font-size: 0.8rem;
}

.chapter-link:hover,
.chapter-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(218, 233, 73, 0.7);
}

.journey {
  padding-top: clamp(1.6rem, 4vw, 3.2rem);
  padding-bottom: clamp(2.8rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 1rem;
  align-items: start;
}

.journey-visual {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(186, 236, 247, 0.32);
  box-shadow: var(--shadow-mid);
  background: rgba(233, 251, 249, 0.94);
  filter: hue-rotate(var(--tone-hue)) saturate(var(--tone-sat)) contrast(var(--tone-contrast));
  transition: filter 0.75s ease;
}

.journey-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 600 / 424;
  object-fit: cover;
}

.journey-copy {
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(188, 236, 248, 0.28);
  background: var(--surface-panel);
  transition: background 0.6s ease;
}

.journey-copy ol {
  margin-top: 0.95rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.82rem;
}

.journey-copy li {
  color: #d9eeea;
}

.journey-copy h3 {
  font-family: var(--font-display);
  font-size: 0.96rem;
  margin-bottom: 0.26rem;
  color: #f3fcfb;
}

.journey-copy p {
  font-size: 0.94rem;
}

.journey-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.56rem;
}

.journey-links a {
  border: 1px solid rgba(219, 249, 255, 0.42);
  background: rgba(6, 38, 56, 0.85);
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
}

.journey-links a:hover,
.journey-links a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(218, 233, 73, 0.62);
}

.stereo-lab {
  position: relative;
  margin-bottom: clamp(2.4rem, 5vw, 4.2rem);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-radius: 26px;
  border: 1px solid rgba(179, 237, 251, 0.28);
  background:
    radial-gradient(circle at 16% 8%, rgba(219, 240, 97, 0.16), transparent 42%),
    radial-gradient(circle at 86% 26%, rgba(47, 208, 255, 0.17), transparent 44%),
    linear-gradient(145deg, rgba(4, 30, 44, 0.8), rgba(5, 39, 52, 0.66));
  box-shadow: var(--shadow-mid);
  overflow: hidden;
}

.stereo-lab::before,
.stereo-lab::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.stereo-lab::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 18px 18px, 18px 18px;
  opacity: 0.16;
}

.stereo-lab::after {
  width: 44%;
  aspect-ratio: 1 / 1;
  right: -14%;
  bottom: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 217, 182, 0.22), rgba(88, 217, 182, 0));
}

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

.stereo-lead {
  max-width: 62ch;
  color: var(--text-soft);
  margin-bottom: 0.95rem;
}

.stereo-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.95rem;
}

.stereo-controls label {
  display: grid;
  gap: 0.36rem;
  padding: 0.68rem 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(188, 236, 248, 0.25);
  background: rgba(7, 37, 52, 0.62);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.stereo-controls input[type="range"] {
  width: 100%;
  accent-color: var(--acid);
}

.stereo-controls select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(186, 231, 246, 0.42);
  background: rgba(4, 28, 42, 0.88);
  color: #eafaff;
  padding: 0.42rem 0.5rem;
}

.stereo-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.26fr) minmax(0, 0.94fr);
  gap: 0.9rem;
  align-items: stretch;
}

.stereo-pair-view,
.stereo-anaglyph-view {
  margin: 0;
  border-radius: 18px;
  border: 1px solid rgba(186, 233, 247, 0.24);
  background: rgba(3, 24, 37, 0.68);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.16);
}

.stereo-pair-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
  padding: 0.56rem;
}

.stereo-pair-view[data-mode="cross"] #stereo-left-canvas {
  order: 2;
}

.stereo-pair-view[data-mode="cross"] #stereo-right-canvas {
  order: 1;
}

.stereo-pair-view canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(196, 237, 249, 0.36);
  background: rgba(1, 10, 16, 0.9);
}

.stereo-anaglyph-view {
  display: grid;
  place-items: center;
  padding: 0.56rem;
}

.stereo-anaglyph-view canvas {
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(196, 237, 249, 0.36);
  background: rgba(1, 10, 16, 0.9);
}

.hologram-composer {
  margin-top: 0.95rem;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(186, 233, 247, 0.24);
  background:
    radial-gradient(circle at 18% 16%, rgba(229, 245, 110, 0.12), transparent 34%),
    radial-gradient(circle at 86% 78%, rgba(70, 220, 246, 0.16), transparent 38%),
    linear-gradient(142deg, rgba(3, 25, 40, 0.8), rgba(4, 34, 49, 0.68));
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 0.7rem;
}

.hologram-composer h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.05em;
}

.hologram-composer p {
  color: rgba(223, 243, 248, 0.9);
  font-size: 0.9rem;
}

.hologram-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.hologram-controls label {
  display: grid;
  gap: 0.34rem;
  padding: 0.66rem 0.72rem;
  border-radius: 13px;
  border: 1px solid rgba(188, 236, 248, 0.25);
  background: rgba(6, 34, 48, 0.64);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.hologram-controls input[type="range"] {
  width: 100%;
  accent-color: var(--acid);
}

.hologram-stage-wrap {
  position: relative;
  width: min(100%, clamp(260px, 68vw, 540px));
  margin-inline: auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(198, 241, 250, 0.34);
  background:
    radial-gradient(circle at 30% 26%, rgba(228, 247, 121, 0.16), transparent 34%),
    radial-gradient(circle at 72% 76%, rgba(60, 211, 241, 0.2), transparent 42%),
    linear-gradient(154deg, rgba(4, 24, 36, 0.92), rgba(8, 37, 50, 0.84));
  aspect-ratio: 1 / 1;
}

.hologram-stage-wrap::before,
.hologram-stage-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hologram-stage-wrap::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px;
  opacity: 0.14;
}

.hologram-stage-wrap::after {
  background: radial-gradient(
    circle at 50% 48%,
    rgba(239, 255, 173, 0.14) 0%,
    rgba(129, 238, 255, 0.08) 42%,
    rgba(1, 12, 20, 0.46) 100%
  );
  mix-blend-mode: screen;
}

#hologram-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: rgba(2, 14, 21, 0.58);
}

.stereo-note {
  margin-top: 0.86rem;
  color: rgba(220, 244, 250, 0.84);
  font-size: 0.82rem;
}

.stereo-model-card {
  margin-top: 0.95rem;
  padding: 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(186, 233, 247, 0.24);
  background: rgba(3, 24, 37, 0.66);
  display: grid;
  gap: 0.68rem;
}

.stereo-model-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.stereo-model-card model-viewer {
  width: 100%;
  height: min(62vw, 520px);
  min-height: 320px;
  border-radius: 14px;
  border: 1px solid rgba(196, 237, 249, 0.36);
  background:
    radial-gradient(circle at 24% 20%, rgba(224, 245, 116, 0.2), transparent 40%),
    radial-gradient(circle at 76% 70%, rgba(76, 200, 236, 0.18), transparent 44%),
    rgba(2, 12, 20, 0.9);
}

.stereo-model-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.56rem;
}

.stereo-model-links a {
  border: 1px solid rgba(219, 249, 255, 0.42);
  background: rgba(6, 38, 56, 0.85);
  padding: 0.44rem 0.72rem;
  font-size: 0.78rem;
  text-decoration: none;
}

.stereo-model-links a:hover,
.stereo-model-links a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(218, 233, 73, 0.62);
}

.site-footer {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto 1.4rem;
  border: 1px solid rgba(193, 237, 248, 0.28);
  border-radius: 18px;
  background: var(--surface-footer);
  padding: 1.2rem;
  transition: background 0.6s ease;
}

.footer-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.footer-layout ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
}

.footer-layout a {
  color: #e4f9ff;
}

.source-note {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: rgba(221, 242, 248, 0.8);
}

.program-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.program-modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 9, 15, 0.72);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(204, 247, 255, 0.38);
  background:
    radial-gradient(circle at 12% 12%, rgba(47, 208, 255, 0.18), transparent 36%),
    radial-gradient(circle at 86% 84%, rgba(218, 233, 73, 0.19), transparent 40%),
    var(--surface-panel);
  padding: 1.2rem;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  transition: background 0.6s ease;
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(208, 246, 255, 0.5);
  border-radius: 50%;
  background: rgba(6, 37, 55, 0.9);
  color: #f1fbff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-kicker {
  font-family: var(--font-ui);
  letter-spacing: 0.15em;
  font-size: 0.82rem;
  color: #cdebf8;
}

#modal-title {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  line-height: 1.2;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.modal-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 0.92rem;
  align-items: start;
}

.modal-figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(215, 250, 255, 0.4);
  background: #082338;
}

.modal-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.modal-content {
  display: grid;
  gap: 0.8rem;
}

.modal-content p,
.modal-content li {
  color: #d5ece8;
  font-size: 0.96rem;
}

#modal-facts {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.26rem;
}

.modal-link {
  justify-self: start;
  border: 1px solid rgba(218, 233, 73, 0.68);
  background: linear-gradient(120deg, rgba(218, 233, 73, 0.85), rgba(47, 208, 255, 0.52));
  color: #052437;
  padding: 0.52rem 0.82rem;
  font-size: 0.82rem;
}

.modal-link:hover,
.modal-link:focus-visible {
  transform: translateY(-2px);
}

body.modal-open {
  overflow: hidden;
}

.reveal-block {
  opacity: 0;
  transform: translateY(44px);
  filter: blur(4px);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

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

@media (max-width: 1080px) {
  .opening,
  .journey {
    grid-template-columns: 1fr;
  }

  .opening-stage {
    order: -1;
    min-height: auto;
  }

  .keyvisual-frame {
    width: 100%;
  }

  .keyvisual-trick-stack {
    opacity: 0.52;
  }

  .keyvisual-lens {
    display: none;
  }

  .poster-frame {
    width: min(42%, 280px);
    right: 0.4rem;
    bottom: -0.6rem;
  }

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

  .chapter-card,
  .chapter-card:nth-child(2),
  .chapter-card:nth-child(3),
  .chapter-card:nth-child(5),
  .chapter-card:nth-child(6) {
    grid-column: span 1;
    transform: none;
  }

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

  .modal-figure img {
    aspect-ratio: 4 / 3;
  }

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

  .stereo-stage {
    grid-template-columns: 1fr;
  }

  .stereo-model-card model-viewer {
    height: min(80vw, 460px);
  }

  .hologram-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 0.62rem 0.8rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .global-nav {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0.75rem;
    display: none;
    width: min(280px, calc(100vw - 1.5rem));
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.6rem;
    background: var(--surface-panel);
    box-shadow: var(--shadow-mid);
  }

  .global-nav.is-open {
    display: flex;
  }

  .opening,
  .chapters,
  .journey {
    width: calc(100% - 1.2rem);
  }

  .floating-quote {
    position: static;
    transform: none;
    margin-top: 0.7rem;
    width: fit-content;
  }

  .marquee {
    gap: 1.2rem;
    min-width: 260%;
  }

  .footer-layout {
    grid-template-columns: 1fr;
  }

  .stereo-controls {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal-block {
    opacity: 1;
    transform: none;
    filter: none;
  }

  body.world-swamp-ready .world-swamp-canvas {
    opacity: 0.45;
    filter: saturate(1.02) contrast(1.02);
  }

  .keyvisual-trick-stack {
    display: none;
  }
}
