:root {
  color-scheme: dark;
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun",
    serif;
  font-synthesis: none;
  --ink: #f4eee2;
  --ink-muted: rgba(244, 238, 226, 0.68);
  --paper: #e9dfce;
  --deep: #071a24;
  --deep-soft: #102d38;
  --sea: #17495b;
  --sea-light: #3c7b87;
  --sky: #698b91;
  --cloud: rgba(225, 231, 223, 0.38);
  --island: #253f3d;
  --stone: #7b8076;
  --stone-dark: #484f4a;
  --door: #2d2722;
  --warm: #d6a462;
  --oral: #c99150;
  --archive: #5c93a3;
  --fiction: #b5a8bc;
  --danger: #d17c67;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-top: max(20px, env(safe-area-inset-top));
  --safe-right: max(20px, env(safe-area-inset-right));
  --safe-bottom: max(20px, env(safe-area-inset-bottom));
  --safe-left: max(20px, env(safe-area-inset-left));
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--deep);
}

body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #f1d293;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.app,
.game,
.intro {
  width: 100%;
  min-height: 100dvh;
}

.eyebrow {
  margin: 0;
  color: rgba(234, 222, 201, 0.66);
  font-family:
    "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Intro */

.intro {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding:
    calc(var(--safe-top) + 24px)
    calc(var(--safe-right) + 24px)
    calc(var(--safe-bottom) + 24px)
    calc(var(--safe-left) + 24px);
  background:
    radial-gradient(circle at 50% 72%, rgba(82, 135, 143, 0.18), transparent 30%),
    linear-gradient(180deg, #06141d 0%, #09232e 58%, #0d3440 100%);
}

.intro::before,
.intro::after {
  position: absolute;
  right: -15%;
  bottom: -32%;
  left: -15%;
  height: 48%;
  border-radius: 48% 52% 0 0;
  content: "";
  opacity: 0.55;
  transform-origin: 50% 100%;
  animation: intro-tide 8s ease-in-out infinite alternate;
}

.intro::before {
  background: rgba(48, 112, 125, 0.24);
  transform: rotate(-2deg);
}

.intro::after {
  bottom: -37%;
  background: rgba(81, 144, 151, 0.16);
  animation-delay: -3s;
  transform: rotate(2deg);
}

.scene__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro__content {
  position: relative;
  z-index: 3;
  width: min(560px, 100%);
  text-align: center;
  animation: rise-in 1.1s var(--ease-out) both;
}

.intro h1 {
  margin: 18px 0 4px;
  font-size: clamp(46px, 9vw, 88px);
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1;
  text-shadow: 0 14px 48px rgba(0, 0, 0, 0.5);
}

.intro__subtitle {
  margin: 14px 0 42px;
  color: rgba(232, 224, 209, 0.42);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.intro__line {
  margin: 0 0 36px;
  color: rgba(250, 245, 235, 0.85);
  font-size: clamp(17px, 3vw, 23px);
  letter-spacing: 0.12em;
  line-height: 1.9;
}

.intro__hint {
  margin: 20px 0 0;
  color: rgba(232, 224, 209, 0.38);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.key-mark {
  position: relative;
  width: 74px;
  height: 35px;
  margin: 32px auto 0;
  opacity: 0.75;
  transform: rotate(-10deg);
}

.key-mark__ring {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--warm);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px rgba(214, 164, 98, 0.08);
}

.key-mark__stem {
  position: absolute;
  top: 16px;
  left: 30px;
  width: 40px;
  height: 2px;
  background: var(--warm);
}

.key-mark__tooth {
  position: absolute;
  top: 15px;
  right: 2px;
  width: 10px;
  height: 11px;
  border-right: 2px solid var(--warm);
  border-bottom: 2px solid var(--warm);
}

.primary-button {
  display: inline-flex;
  min-width: 174px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 14px 19px 14px 24px;
  border: 1px solid rgba(226, 191, 134, 0.44);
  border-radius: 100px;
  background: rgba(215, 172, 104, 0.08);
  color: #f5e8d2;
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0.16em;
  transition:
    background 240ms ease,
    border-color 240ms ease,
    transform 240ms ease;
}

.primary-button:hover {
  border-color: rgba(236, 203, 149, 0.8);
  background: rgba(215, 172, 104, 0.17);
  transform: translateY(-2px);
}

/* Game shell */

.game {
  position: relative;
  overflow: hidden;
  background: var(--deep);
}

.topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:
    var(--safe-top)
    var(--safe-right)
    12px
    var(--safe-left);
  background: linear-gradient(180deg, rgba(5, 17, 23, 0.72), transparent);
  pointer-events: none;
}

.brand,
.topbar__actions {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.brand__dot {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(241, 214, 168, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(238, 198, 132, 0.6);
}

.brand div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.brand span {
  color: rgba(244, 238, 226, 0.48);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.topbar__actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  padding: 8px 12px;
  border: 1px solid rgba(240, 234, 219, 0.13);
  border-radius: 100px;
  background: rgba(5, 20, 27, 0.32);
  backdrop-filter: blur(10px);
  color: rgba(248, 242, 230, 0.76);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.icon-button:hover {
  background: rgba(10, 38, 47, 0.68);
  color: var(--ink);
}

/* Scene illustration */

.scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky), var(--sea-light) 58%, var(--sea));
  isolation: isolate;
  transition: background 900ms var(--ease-out);
}

.scene--1955 {
  --sky: #6e7d7c;
  --sea-light: #46696d;
  --sea: #203f49;
  --island: #394744;
  --stone: #77776c;
  --stone-dark: #4e514b;
  --door: #3d3128;
}

.scene--1956 {
  --sky: #7e8980;
  --sea-light: #507477;
  --sea: #284d55;
  --island: #34483f;
  --stone: #777b6d;
  --stone-dark: #484f45;
  --door: #312b23;
}

.scene--2026 {
  --sky: #799ca2;
  --sea-light: #4a8790;
  --sea: #1c5869;
  --island: #294842;
  --stone: #7d8278;
  --stone-dark: #474f49;
  --door: #302a24;
}

.scene::after {
  position: absolute;
  z-index: 12;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 13, 18, 0.08), transparent 38%),
    linear-gradient(0deg, rgba(4, 13, 18, 0.58), transparent 40%);
  content: "";
  pointer-events: none;
}

.scene__sky {
  position: absolute;
  z-index: 1;
  inset: 0 0 42%;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% 20%, rgba(237, 229, 203, 0.23), transparent 22%),
    linear-gradient(180deg, rgba(236, 235, 215, 0.08), transparent);
  transition: filter 900ms var(--ease-out);
}

.scene--1955 .scene__sky {
  filter: saturate(0.58) brightness(0.82);
}

.scene--1956 .scene__sky {
  filter: sepia(0.13) saturate(0.72) brightness(0.88);
}

.cloud {
  position: absolute;
  width: 38vw;
  height: 8vw;
  min-height: 60px;
  border-radius: 50%;
  background: var(--cloud);
  filter: blur(22px);
  opacity: 0.46;
  animation: cloud-drift 24s linear infinite;
}

.cloud--one {
  top: 15%;
  left: -12%;
}

.cloud--two {
  top: 31%;
  left: 55%;
  animation-duration: 33s;
  animation-direction: reverse;
  opacity: 0.3;
}

.scene__sea {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 46%;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      176deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 12px
    ),
    linear-gradient(180deg, var(--sea-light), var(--sea));
  transition: background 900ms var(--ease-out);
}

.wave {
  position: absolute;
  right: -12%;
  left: -12%;
  height: 38px;
  border-top: 1px solid rgba(228, 240, 235, 0.16);
  border-radius: 50%;
  animation: wave-rock 7s ease-in-out infinite alternate;
}

.wave--one {
  top: 18%;
}

.wave--two {
  top: 48%;
  opacity: 0.7;
  animation-delay: -2s;
}

.wave--three {
  top: 74%;
  opacity: 0.4;
  animation-delay: -5s;
}

.scene__island {
  position: absolute;
  z-index: 3;
  right: -8%;
  bottom: 24%;
  width: 82%;
  height: 28%;
  border-radius: 64% 18% 0 0;
  background:
    radial-gradient(circle at 32% 0, rgba(119, 139, 113, 0.28), transparent 28%),
    linear-gradient(155deg, var(--island), #142d2c);
  box-shadow: -20px 18px 60px rgba(3, 16, 18, 0.28);
  clip-path: polygon(2% 74%, 12% 46%, 29% 35%, 43% 12%, 60% 32%, 71% 22%, 100% 49%, 100% 100%, 0 100%);
  transition:
    background 900ms var(--ease-out),
    filter 900ms var(--ease-out);
}

.scene--1955 .scene__island {
  filter: saturate(0.45);
}

.scene--1956 .scene__island {
  filter: saturate(0.58);
}

.scene__house {
  position: absolute;
  z-index: 8;
  right: clamp(8%, 14vw, 18%);
  bottom: 26%;
  width: clamp(250px, 32vw, 480px);
  aspect-ratio: 1.35;
  filter: drop-shadow(-18px 24px 26px rgba(3, 15, 17, 0.35));
  transform: perspective(800px) rotateY(-3deg);
  transform-origin: bottom center;
  transition:
    filter 900ms var(--ease-out),
    transform 900ms var(--ease-out);
}

.scene--1955 .scene__house {
  filter: drop-shadow(-18px 24px 26px rgba(3, 15, 17, 0.35)) saturate(0.72);
}

.scene--1956 .scene__house {
  filter: drop-shadow(-18px 24px 26px rgba(3, 15, 17, 0.35)) saturate(0.6);
}

.house__wall {
  position: absolute;
  right: 4%;
  bottom: 0;
  left: 3%;
  height: 73%;
  border-radius: 3px 4px 1px 2px;
  background:
    radial-gradient(circle at 20% 30%, rgba(52, 55, 49, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 63%, rgba(41, 44, 40, 0.26) 0 2px, transparent 3px),
    linear-gradient(100deg, rgba(255, 255, 255, 0.07), transparent 38%),
    var(--stone);
  background-size: 52px 46px, 63px 57px, auto, auto;
  box-shadow:
    inset -20px 0 32px rgba(24, 28, 25, 0.28),
    inset 0 -8px 18px rgba(27, 31, 28, 0.28);
}

.house__roof {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 37%;
  background:
    repeating-linear-gradient(
      8deg,
      rgba(25, 28, 25, 0.22) 0,
      rgba(25, 28, 25, 0.22) 4px,
      transparent 4px,
      transparent 18px
    ),
    var(--stone-dark);
  clip-path: polygon(8% 100%, 2% 86%, 47% 2%, 95% 80%, 100% 100%);
}

.house__door {
  position: absolute;
  z-index: 3;
  right: 18%;
  bottom: 0;
  width: 23%;
  height: 56%;
  border: 3px solid rgba(29, 27, 23, 0.52);
  border-bottom: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 14px
    ),
    var(--door);
  box-shadow: inset 10px 0 20px rgba(0, 0, 0, 0.35);
}

.house__door::after {
  position: absolute;
  top: 48%;
  left: 17%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b9a276;
  box-shadow: 0 0 7px rgba(245, 206, 138, 0.25);
  content: "";
}

.house__window {
  position: absolute;
  z-index: 3;
  bottom: 24%;
  left: 20%;
  width: 23%;
  height: 26%;
  border: 5px solid rgba(53, 52, 45, 0.78);
  background:
    linear-gradient(90deg, transparent 47%, rgba(41, 41, 37, 0.8) 48% 52%, transparent 53%),
    linear-gradient(transparent 47%, rgba(41, 41, 37, 0.8) 48% 52%, transparent 53%),
    rgba(18, 40, 44, 0.62);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.45);
}

.scene--1955 .house__window {
  background:
    linear-gradient(90deg, transparent 47%, rgba(41, 41, 37, 0.8) 48% 52%, transparent 53%),
    linear-gradient(transparent 47%, rgba(41, 41, 37, 0.8) 48% 52%, transparent 53%),
    rgba(214, 171, 100, 0.28);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.36),
    0 0 28px rgba(219, 178, 105, 0.16);
}

.house__step {
  position: absolute;
  z-index: 1;
  right: 10%;
  bottom: -5%;
  height: 8%;
  background: #4e554f;
  clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%);
}

.house__step--one {
  width: 38%;
}

.house__step--two {
  right: 5%;
  bottom: -12%;
  width: 50%;
  opacity: 0.8;
}

.scene-caption {
  position: absolute;
  z-index: 18;
  top: 18%;
  left: max(6vw, var(--safe-left));
  max-width: 350px;
  text-shadow: 0 2px 18px rgba(4, 15, 19, 0.48);
  transition:
    opacity 500ms ease,
    transform 600ms var(--ease-out);
}

.scene-caption span {
  display: block;
  color: rgba(248, 236, 212, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.88;
}

.scene-caption p {
  margin: 15px 0 0 5px;
  color: rgba(246, 239, 225, 0.68);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.scene__vignette {
  z-index: 15;
  background:
    radial-gradient(circle at 50% 45%, transparent 42%, rgba(3, 13, 17, 0.32) 100%),
    repeating-radial-gradient(
      circle at 73% 42%,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: multiply;
}

/* Interactive hotspots */

.hotspots {
  position: absolute;
  z-index: 19;
  inset: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.hotspot::before,
.hotspot::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.hotspot::before {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(250, 226, 178, 0.92);
  background: rgba(22, 49, 54, 0.5);
  box-shadow:
    0 0 0 6px rgba(239, 202, 139, 0.08),
    0 0 22px rgba(245, 210, 150, 0.35);
}

.hotspot::after {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(247, 216, 163, 0.3);
  animation: hotspot-pulse 2.8s ease-out infinite;
}

.hotspot span {
  position: absolute;
  top: 42px;
  left: 50%;
  min-width: max-content;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(6, 25, 31, 0.68);
  backdrop-filter: blur(8px);
  color: rgba(249, 241, 226, 0.82);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -5px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.hotspot:hover span,
.hotspot:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hotspot--found::before {
  border-color: rgba(204, 210, 190, 0.58);
  background: rgba(61, 93, 86, 0.62);
  box-shadow: none;
}

.hotspot--found::after {
  display: none;
}

/* Chapter card */

.chapter-card {
  position: absolute;
  z-index: 45;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100% - 48px));
  padding: 36px 28px;
  border: 1px solid rgba(245, 236, 219, 0.16);
  background: rgba(6, 21, 27, 0.74);
  backdrop-filter: blur(18px);
  text-align: center;
  transform: translate(-50%, -50%);
  transition:
    opacity 600ms ease,
    transform 700ms var(--ease-out);
}

.chapter-card--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 20px));
}

.chapter-card span {
  color: rgba(239, 211, 165, 0.66);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  letter-spacing: 0.24em;
}

.chapter-card h2 {
  margin: 12px 0 0;
  font-size: clamp(27px, 5vw, 42px);
  font-weight: 500;
  letter-spacing: 0.16em;
}

/* Dialogue */

.dialogue {
  position: absolute;
  z-index: 35;
  right: max(4vw, var(--safe-right));
  bottom: calc(118px + var(--safe-bottom));
  left: max(4vw, var(--safe-left));
  display: grid;
  max-width: 980px;
  min-height: 148px;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 0 auto;
  padding: 22px 24px;
  border: 1px solid rgba(244, 236, 220, 0.16);
  border-radius: 3px;
  background:
    linear-gradient(125deg, rgba(14, 42, 49, 0.92), rgba(6, 23, 30, 0.94));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  transition:
    opacity 380ms ease,
    transform 500ms var(--ease-out);
}

.dialogue--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px);
}

.portrait {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid rgba(237, 219, 184, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, rgba(217, 183, 126, 0.15), transparent 46%),
    rgba(11, 34, 40, 0.72);
  color: rgba(242, 222, 187, 0.82);
  font-size: 24px;
}

.dialogue__body {
  align-self: stretch;
}

.dialogue__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.dialogue__meta strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.dialogue__meta span {
  padding: 3px 7px;
  border: 1px solid rgba(181, 168, 188, 0.24);
  border-radius: 20px;
  color: rgba(216, 204, 220, 0.62);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.dialogue__body > p {
  min-height: 50px;
  margin: 0;
  color: rgba(250, 246, 237, 0.92);
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.055em;
  line-height: 1.9;
}

.continue-button {
  align-self: end;
  padding: 10px 0 4px 12px;
  border: 0;
  background: transparent;
  color: rgba(239, 216, 176, 0.72);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.continue-button span {
  display: inline-block;
  margin-left: 4px;
  animation: nudge 1.4s ease-in-out infinite;
}

.dialogue__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.choice-button {
  padding: 8px 12px;
  border: 1px solid rgba(232, 212, 179, 0.2);
  border-radius: 2px;
  background: rgba(226, 192, 137, 0.06);
  color: rgba(246, 237, 220, 0.82);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.choice-button:hover {
  border-color: rgba(232, 212, 179, 0.44);
  background: rgba(226, 192, 137, 0.12);
}

/* Tide navigation */

.tide-nav {
  position: absolute;
  z-index: 32;
  right: max(3vw, var(--safe-right));
  bottom: var(--safe-bottom);
  left: max(3vw, var(--safe-left));
  display: grid;
  max-width: 1040px;
  grid-template-columns: minmax(130px, 0.7fr) minmax(120px, 1fr) minmax(330px, 2fr);
  gap: 24px;
  align-items: center;
  margin: 0 auto;
  padding: 13px 18px;
  border: 1px solid rgba(241, 233, 217, 0.13);
  border-radius: 2px;
  background: rgba(6, 24, 31, 0.68);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  transition:
    opacity 400ms ease,
    filter 400ms ease;
}

.tide-nav--locked {
  filter: saturate(0.4);
  opacity: 0.55;
}

.tide-nav__label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.tide-nav__label span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.tide-nav__label small {
  color: rgba(241, 233, 217, 0.42);
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tide-track {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: rgba(229, 220, 204, 0.14);
}

.tide-track__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #6c9ca3, #d0b17d);
  transition: width 700ms var(--ease-out);
}

.tide-years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.tide-year {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: rgba(244, 237, 222, 0.46);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: left;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.tide-year:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 237, 222, 0.76);
}

.tide-year:disabled {
  cursor: not-allowed;
}

.tide-year strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.tide-year span {
  font-size: 9px;
  letter-spacing: 0.1em;
}

.tide-year--active {
  background: rgba(226, 194, 141, 0.08);
  color: #efd7ad;
}

.tide-year--active::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 2px;
  height: 20px;
  background: #d8b87e;
  content: "";
  transform: translateY(-50%);
}

/* Side panels */

.side-panel {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(470px, 94vw);
  overflow-y: auto;
  padding:
    calc(var(--safe-top) + 30px)
    calc(var(--safe-right) + 24px)
    calc(var(--safe-bottom) + 36px)
    28px;
  border-left: 1px solid rgba(245, 235, 217, 0.14);
  background:
    radial-gradient(circle at 80% 10%, rgba(72, 117, 119, 0.18), transparent 28%),
    #0a222b;
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.38);
  transform: translateX(105%);
  transition: transform 520ms var(--ease-out);
}

.side-panel--open {
  transform: translateX(0);
}

.side-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.side-panel h2 {
  margin: 8px 0 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.close-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(245, 235, 217, 0.15);
  border-radius: 50%;
  background: transparent;
  color: rgba(245, 235, 217, 0.68);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 22px;
}

.side-panel__lead {
  margin: 24px 0;
  color: rgba(244, 236, 220, 0.62);
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

.archive-list {
  display: grid;
  gap: 12px;
}

.archive-empty {
  padding: 46px 12px;
  border-top: 1px solid rgba(245, 235, 217, 0.1);
  border-bottom: 1px solid rgba(245, 235, 217, 0.1);
  color: rgba(244, 236, 220, 0.4);
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

.archive-card {
  position: relative;
  padding: 16px 16px 17px 18px;
  border: 1px solid rgba(245, 235, 217, 0.11);
  background: rgba(255, 255, 255, 0.025);
  animation: card-in 420ms var(--ease-out) both;
}

.archive-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--card-color, var(--fiction));
  content: "";
}

.archive-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(244, 236, 220, 0.43);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.archive-card h3 {
  margin: 9px 0 7px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.archive-card p {
  margin: 0;
  color: rgba(244, 236, 220, 0.64);
  font-size: 12px;
  line-height: 1.75;
}

.archive-card a {
  display: inline-block;
  margin-top: 11px;
  color: rgba(172, 207, 211, 0.76);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  text-decoration: none;
}

.archive-card a:hover {
  color: #d0e6e7;
  text-decoration: underline;
}

.panel-scrim {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(2, 10, 13, 0.58);
  backdrop-filter: blur(3px);
}

.about-copy {
  margin-top: 26px;
  color: rgba(244, 236, 220, 0.66);
  font-size: 14px;
  line-height: 1.9;
}

.about-copy ul {
  display: grid;
  gap: 11px;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid rgba(245, 235, 217, 0.1);
  border-bottom: 1px solid rgba(245, 235, 217, 0.1);
  list-style: none;
}

.about-copy li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.source-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.source-dot--archive {
  background: var(--archive);
}

.source-dot--oral {
  background: var(--oral);
}

.source-dot--fiction {
  background: var(--fiction);
}

.about-copy a {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(171, 202, 204, 0.18);
  color: rgba(181, 216, 218, 0.82);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  text-decoration: none;
}

.about-copy a:hover {
  border-color: rgba(171, 202, 204, 0.4);
  background: rgba(171, 202, 204, 0.06);
}

.toast {
  position: fixed;
  z-index: 100;
  top: calc(var(--safe-top) + 58px);
  left: 50%;
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px 15px;
  border: 1px solid rgba(242, 224, 190, 0.18);
  border-radius: 100px;
  background: rgba(8, 30, 37, 0.88);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
  color: rgba(248, 240, 225, 0.82);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -12px);
  transition:
    opacity 260ms ease,
    transform 360ms var(--ease-out);
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */

@media (max-width: 760px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand span {
    display: none;
  }

  .icon-button {
    padding: 7px 9px;
    font-size: 10px;
  }

  .scene-caption {
    top: 14%;
    left: 24px;
  }

  .scene__house {
    right: -2%;
    bottom: 30%;
    width: clamp(250px, 62vw, 390px);
  }

  .dialogue {
    right: 12px;
    bottom: calc(108px + var(--safe-bottom));
    left: 12px;
    min-height: 138px;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 17px;
  }

  .portrait {
    width: 46px;
    height: 46px;
    align-self: start;
    font-size: 18px;
  }

  .continue-button {
    position: absolute;
    right: 14px;
    bottom: 11px;
  }

  .dialogue__body > p {
    padding-right: 30px;
    font-size: 14px;
    line-height: 1.75;
  }

  .tide-nav {
    right: 12px;
    left: 12px;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px 10px;
  }

  .tide-nav__label,
  .tide-track {
    display: none;
  }

  .tide-year {
    padding: 7px 9px;
  }

  .tide-year strong {
    font-size: 14px;
  }

  .side-panel {
    padding-left: 22px;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .scene-caption {
    top: 17%;
  }

  .scene-caption span {
    font-size: 50px;
  }

  .dialogue {
    bottom: calc(82px + var(--safe-bottom));
    min-height: 112px;
    padding: 14px 18px;
  }

  .dialogue__body > p {
    min-height: 38px;
    font-size: 14px;
    line-height: 1.65;
  }

  .portrait {
    width: 52px;
    height: 52px;
  }

  .tide-nav {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .scene__house {
    bottom: 22%;
    width: min(36vw, 390px);
  }
}

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

/* Animations */

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

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

@keyframes intro-tide {
  from {
    transform: rotate(-2deg) scaleY(0.9);
  }

  to {
    transform: rotate(1deg) scaleY(1.08);
  }
}

@keyframes cloud-drift {
  from {
    transform: translateX(-10vw);
  }

  to {
    transform: translateX(55vw);
  }
}

@keyframes wave-rock {
  from {
    transform: translateX(-1%) scaleY(0.8);
  }

  to {
    transform: translateX(1%) scaleY(1.2);
  }
}

@keyframes hotspot-pulse {
  0% {
    opacity: 0.65;
    transform: scale(0.72);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes nudge {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(4px);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* Complete demo layers */

.scene--art::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(5, 18, 24, 0.08), rgba(5, 18, 24, 0.28)),
    var(--scene-image);
  background-position: center;
  background-size: cover;
  content: "";
  opacity: 0;
  transform: scale(1.025);
  transition:
    opacity 900ms ease,
    transform 7s ease-out;
}

.scene--asset-ready::before {
  opacity: 1;
  transform: scale(1);
}

.scene--asset-ready .scene__sky,
.scene--asset-ready .scene__sea,
.scene--asset-ready .scene__island,
.scene--asset-ready .scene__house {
  opacity: 0.08;
}

.scene--interior-1955,
.scene--interior-1956 {
  background:
    radial-gradient(circle at 68% 48%, rgba(202, 153, 84, 0.22), transparent 22%),
    linear-gradient(135deg, #18292b, #3b3c34 58%, #151f22);
}

.scene--interior-1955 .scene__sky,
.scene--interior-1955 .scene__sea,
.scene--interior-1955 .scene__island,
.scene--interior-1955 .scene__house,
.scene--interior-1956 .scene__sky,
.scene--interior-1956 .scene__sea,
.scene--interior-1956 .scene__island,
.scene--interior-1956 .scene__house,
.scene--cave .scene__sky,
.scene--cave .scene__sea,
.scene--cave .scene__island,
.scene--cave .scene__house {
  opacity: 0;
}

.scene--interior-1955::after,
.scene--interior-1956::after {
  background:
    linear-gradient(90deg, rgba(3, 12, 15, 0.5), transparent 45%),
    linear-gradient(0deg, rgba(4, 13, 16, 0.72), transparent 50%);
}

.scene--storm {
  filter: saturate(0.68) contrast(1.06);
}

.scene--storm::after {
  background:
    radial-gradient(circle at 72% 40%, transparent 0 10%, rgba(3, 11, 15, 0.34) 55%),
    linear-gradient(0deg, rgba(2, 10, 14, 0.66), rgba(10, 28, 32, 0.15));
}

.scene--cave {
  background:
    radial-gradient(circle at 57% 55%, rgba(222, 174, 99, 0.16), transparent 19%),
    radial-gradient(circle at 50% 50%, #364146, #152329 58%, #07141a);
}

.scene--cave::after {
  background:
    radial-gradient(circle at 56% 56%, transparent 0 12%, rgba(2, 9, 12, 0.42) 44%, rgba(1, 6, 8, 0.82) 100%),
    linear-gradient(0deg, rgba(1, 7, 10, 0.66), transparent 55%);
}

.hotspot--selected::before {
  border-color: #f2ca83;
  background: rgba(195, 139, 66, 0.66);
  box-shadow:
    0 0 0 8px rgba(239, 186, 102, 0.12),
    0 0 28px rgba(245, 198, 123, 0.45);
}

.hotspot--selected::after {
  display: none;
}

.objective {
  position: absolute;
  z-index: 28;
  top: max(26%, 170px);
  left: max(6vw, var(--safe-left));
  display: flex;
  width: min(285px, calc(100vw - 48px));
  flex-direction: column;
  gap: 7px;
  padding: 15px 17px;
  border: 1px solid rgba(242, 230, 209, 0.14);
  border-left: 2px solid rgba(226, 183, 112, 0.62);
  background: rgba(6, 24, 30, 0.58);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 300ms ease,
    transform 400ms var(--ease-out);
}

.objective--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.objective > span {
  color: rgba(239, 207, 154, 0.58);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.objective > strong {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.55;
}

.objective > p {
  margin: 0;
  color: rgba(244, 236, 221, 0.5);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  line-height: 1.5;
}

.objective > button {
  align-self: flex-start;
  margin-top: 5px;
  padding: 8px 11px;
  border: 1px solid rgba(232, 199, 143, 0.28);
  border-radius: 2px;
  background: rgba(215, 167, 91, 0.11);
  color: rgba(250, 235, 210, 0.9);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.objective > button:hover {
  border-color: rgba(232, 199, 143, 0.55);
  background: rgba(215, 167, 91, 0.19);
}

/* Parallel montage */

.montage,
.echo,
.ending {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow-y: auto;
}

.montage {
  display: grid;
  align-content: center;
  justify-items: center;
  padding:
    calc(var(--safe-top) + 72px)
    max(5vw, var(--safe-right))
    calc(var(--safe-bottom) + 48px)
    max(5vw, var(--safe-left));
  background:
    linear-gradient(90deg, rgba(14, 51, 61, 0.96) 0 49.7%, rgba(34, 30, 28, 0.96) 50.3% 100%),
    #0c242c;
}

.montage::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 24% 24%, rgba(94, 158, 165, 0.2), transparent 28%),
    radial-gradient(circle at 76% 70%, rgba(198, 139, 73, 0.15), transparent 30%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 6px);
  content: "";
}

.montage__header {
  width: min(920px, 100%);
  margin-bottom: 26px;
  text-align: center;
}

.montage__header > span {
  color: rgba(234, 210, 171, 0.58);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.2em;
}

.montage__header h2 {
  margin: 8px 0 9px;
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 500;
  letter-spacing: 0.18em;
}

.montage__header p {
  margin: 0;
  color: rgba(242, 235, 221, 0.58);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.montage__pairs {
  display: grid;
  width: min(980px, 100%);
  gap: 10px;
}

.montage-pair {
  position: relative;
  display: grid;
  min-height: 116px;
  grid-template-columns: 1fr 68px 1fr;
  gap: 13px;
  align-items: stretch;
  padding: 0;
  border: 1px solid rgba(244, 235, 219, 0.12);
  background: rgba(4, 16, 21, 0.28);
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition:
    border-color 260ms ease,
    background 260ms ease,
    transform 260ms ease;
}

.montage-pair:hover {
  border-color: rgba(234, 202, 150, 0.36);
  background: rgba(7, 25, 31, 0.48);
  transform: translateY(-2px);
}

.montage-pair > span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px;
}

.montage-pair > span:first-child {
  align-items: flex-end;
  text-align: right;
}

.montage-pair strong {
  margin-bottom: 7px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.07em;
}

.montage-pair small {
  max-width: 330px;
  color: rgba(244, 236, 220, 0.48);
  font-size: 11px;
  line-height: 1.65;
}

.montage-pair > i {
  display: grid;
  align-self: center;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(236, 205, 151, 0.22);
  border-radius: 50%;
  color: rgba(237, 204, 148, 0.5);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.montage-pair--seen {
  border-color: rgba(229, 191, 126, 0.34);
  background:
    linear-gradient(90deg, rgba(76, 128, 133, 0.12), rgba(191, 132, 68, 0.1)),
    rgba(5, 20, 25, 0.42);
}

.montage-pair--seen > i {
  border-color: rgba(238, 202, 139, 0.62);
  background: rgba(221, 174, 95, 0.11);
  color: rgba(248, 223, 181, 0.88);
  box-shadow: 0 0 30px rgba(221, 174, 95, 0.13);
}

.montage > .primary-button {
  margin-top: 22px;
}

/* Grounded memory / constrained model dialogue */

.echo {
  display: grid;
  place-items: center;
  padding:
    calc(var(--safe-top) + 70px)
    max(4vw, var(--safe-right))
    calc(var(--safe-bottom) + 48px)
    max(4vw, var(--safe-left));
  background:
    radial-gradient(circle at 50% 58%, rgba(205, 157, 86, 0.13), transparent 24%),
    linear-gradient(180deg, rgba(5, 17, 22, 0.94), rgba(5, 18, 24, 0.98));
  backdrop-filter: blur(8px);
}

.echo__content {
  width: min(900px, 100%);
}

.echo__content > h2 {
  margin: 9px 0 8px;
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 500;
  letter-spacing: 0.15em;
}

.echo__content > p {
  margin: 0 0 22px;
  color: rgba(244, 236, 221, 0.58);
  font-size: 13px;
  line-height: 1.8;
}

.echo__sources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.echo-source {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(245, 234, 216, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    transform 200ms ease;
}

.echo-source:hover {
  border-color: rgba(235, 203, 149, 0.32);
  transform: translateY(-2px);
}

.echo-source--selected {
  border-color: rgba(235, 195, 127, 0.62);
  background: rgba(211, 155, 77, 0.1);
  box-shadow: inset 0 0 30px rgba(211, 155, 77, 0.05);
}

.echo-source > span {
  color: rgba(237, 207, 159, 0.5);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.echo-source > strong {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.echo-source > small {
  color: rgba(243, 235, 220, 0.44);
  font-size: 10px;
  line-height: 1.6;
}

.echo__listening,
.settings-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(245, 234, 216, 0.11);
}

.echo__listening legend,
.settings-form legend {
  padding: 0 7px;
  color: rgba(239, 208, 157, 0.58);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9px;
  letter-spacing: 0.11em;
}

.echo__listening label,
.settings-form fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(244, 236, 221, 0.7);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
}

.echo__listening input,
.settings-form input {
  accent-color: #d4a55f;
}

.echo__content > .primary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.6);
  opacity: 0.42;
}

.echo-result {
  position: relative;
  margin-top: 23px;
  padding: 24px 26px;
  border: 1px solid rgba(234, 198, 137, 0.28);
  background:
    radial-gradient(circle at 85% 15%, rgba(217, 167, 87, 0.09), transparent 26%),
    rgba(8, 27, 33, 0.84);
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.28);
  animation: rise-in 600ms var(--ease-out) both;
}

.echo-result__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(236, 201, 143, 0.58);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.echo-result > p {
  margin: 19px 0 13px;
  color: rgba(252, 244, 229, 0.94);
  font-size: clamp(17px, 3vw, 22px);
  letter-spacing: 0.06em;
  line-height: 1.85;
}

.echo-result > small {
  display: block;
  color: rgba(242, 233, 216, 0.4);
  font-size: 10px;
  line-height: 1.7;
}

.echo-result > button {
  margin-top: 18px;
  padding: 9px 13px;
  border: 1px solid rgba(234, 198, 137, 0.27);
  background: rgba(212, 163, 86, 0.09);
  color: rgba(247, 227, 194, 0.84);
  cursor: pointer;
}

/* Ending */

.ending {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background:
    radial-gradient(circle at 50% 72%, rgba(74, 134, 142, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(5, 17, 23, 0.94), #082833 70%, #0d3943);
  text-align: center;
  animation: ending-in 1.4s ease both;
}

.ending__content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
}

.ending h2 {
  margin: 18px 0;
  font-size: clamp(35px, 7vw, 66px);
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.45;
}

.ending__content > p {
  margin: 0 0 30px;
  color: rgba(243, 235, 220, 0.64);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.ending__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 22px;
}

.ending__actions a,
.ending__actions button {
  padding: 11px 15px;
  border: 1px solid rgba(238, 222, 193, 0.2);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(246, 236, 218, 0.78);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  text-decoration: none;
}

.ending__content > small {
  color: rgba(239, 230, 213, 0.34);
  font-size: 9px;
  letter-spacing: 0.06em;
}

/* Settings */

.settings-form {
  margin-top: 30px;
  color: rgba(244, 236, 220, 0.7);
}

.settings-form fieldset {
  margin-bottom: 14px;
}

.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(245, 235, 217, 0.09);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.setting-toggle input {
  width: 34px;
  height: 18px;
  accent-color: #d3a45f;
}

.danger-button {
  width: 100%;
  margin-top: 28px;
  padding: 11px 14px;
  border: 1px solid rgba(209, 124, 103, 0.25);
  background: rgba(209, 124, 103, 0.06);
  color: rgba(231, 164, 147, 0.8);
  cursor: pointer;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (max-width: 820px) {
  .objective {
    top: 22%;
    left: 18px;
    width: min(250px, calc(100vw - 36px));
  }

  .montage {
    align-content: start;
    padding-top: calc(var(--safe-top) + 82px);
  }

  .montage-pair {
    grid-template-columns: 1fr 44px 1fr;
  }

  .montage-pair > span {
    padding: 15px 13px;
  }

  .montage-pair > i {
    width: 38px;
    height: 38px;
    font-size: 8px;
  }

  .echo {
    align-items: start;
    padding-top: calc(var(--safe-top) + 78px);
  }

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

@media (max-width: 520px) {
  .topbar__actions {
    gap: 4px;
  }

  .topbar__actions .icon-button {
    padding: 7px;
    font-size: 9px;
  }

  .objective {
    top: 20%;
  }

  .montage-pair {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .montage-pair > span,
  .montage-pair > span:first-child {
    align-items: flex-start;
    text-align: left;
  }

  .montage-pair > i {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
  }

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

  .echo-source {
    min-height: 92px;
  }

  .echo__listening {
    display: grid;
  }
}

@keyframes ending-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* -------------------------------------------------------------------------- */
/* Cinematic memory world v2                                                  */
/* -------------------------------------------------------------------------- */

:root {
  --cinema-black: #020607;
  --cinema-glass: rgba(4, 10, 11, 0.48);
  --cinema-line: rgba(246, 226, 190, 0.22);
}

.intro {
  display: block;
  background:
    linear-gradient(90deg, rgba(1, 5, 6, 0.72), rgba(1, 5, 6, 0.08) 65%),
    url("../assets/images/cinematic/bg-outside-2026-v2.webp") center / cover no-repeat;
}

.intro::before,
.intro::after {
  display: none;
}

.intro__video {
  position: absolute;
  z-index: 0;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04) brightness(0.82);
  transform: scale(1.02);
}

.intro__shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(1, 5, 7, 0.82) 0%, rgba(1, 5, 7, 0.38) 42%, rgba(1, 5, 7, 0.06) 72%),
    linear-gradient(0deg, rgba(1, 5, 7, 0.8), transparent 48%),
    linear-gradient(180deg, rgba(1, 5, 7, 0.5), transparent 22%);
  pointer-events: none;
}

.intro__worldmark {
  position: absolute;
  z-index: 4;
  top: calc(var(--safe-top) + 5px);
  left: max(4vw, var(--safe-left));
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(245, 235, 216, 0.64);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e3bd78;
  box-shadow: 0 0 0 5px rgba(227, 189, 120, 0.09), 0 0 18px rgba(227, 189, 120, 0.48);
  animation: live-breathe 2.4s ease-in-out infinite;
}

.intro__content {
  position: absolute;
  z-index: 4;
  bottom: max(8vh, calc(var(--safe-bottom) + 36px));
  left: max(7vw, var(--safe-left));
  width: min(690px, calc(100% - 10vw));
  text-align: left;
  animation: cinema-title-in 1.4s var(--ease-out) both;
}

.intro__content .eyebrow {
  color: rgba(238, 212, 168, 0.72);
  font-size: 10px;
}

.intro .key-mark {
  width: 54px;
  height: 28px;
  margin: 20px 0 0;
  opacity: 0.82;
}

.intro .key-mark__ring {
  width: 24px;
  height: 24px;
}

.intro .key-mark__stem {
  top: 13px;
  left: 25px;
  width: 30px;
}

.intro .key-mark__tooth {
  top: 13px;
  left: 44px;
}

.intro h1 {
  max-width: 760px;
  margin: 17px 0 7px;
  font-size: clamp(48px, 7.2vw, 96px);
  letter-spacing: 0.09em;
  line-height: 1.04;
  text-wrap: balance;
}

.intro__subtitle {
  margin: 12px 0 30px;
  color: rgba(238, 218, 183, 0.55);
  font-size: 10px;
  letter-spacing: 0.24em;
}

.intro__line {
  margin: 0 0 20px;
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: 0.1em;
  line-height: 1.75;
}

.intro__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 22px;
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.intro__modes span {
  padding: 6px 10px;
  border: 1px solid rgba(245, 231, 205, 0.15);
  border-radius: 100px;
  background: rgba(3, 10, 12, 0.26);
  backdrop-filter: blur(12px);
  color: rgba(246, 236, 217, 0.57);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.intro__modes span:first-child {
  border-color: rgba(228, 192, 129, 0.42);
  color: rgba(250, 232, 199, 0.9);
}

.intro__modes i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: #e0b877;
}

.intro .primary-button {
  min-width: 220px;
  justify-content: space-between;
  border-color: rgba(240, 214, 169, 0.44);
  border-radius: 100px;
  background: rgba(7, 17, 18, 0.42);
  backdrop-filter: blur(14px);
}

.intro .primary-button:hover {
  background: rgba(205, 163, 95, 0.16);
}

.intro__hint {
  margin-top: 14px;
  color: rgba(240, 232, 216, 0.4);
}

.scene {
  background: #03090b;
}

.scene--art::before {
  z-index: 0;
  inset: -3%;
  background-image:
    linear-gradient(180deg, rgba(2, 7, 9, 0.03), rgba(2, 7, 9, 0.12)),
    var(--scene-image);
  background-position: center;
  opacity: 1;
  filter: saturate(0.9) contrast(1.035);
  transform: scale(1.035);
  transition:
    opacity 900ms ease,
    filter 900ms ease;
}

.scene--asset-ready::before {
  opacity: 1;
  transform: scale(1.025);
}

.scene__video {
  position: absolute;
  z-index: 1;
  inset: -3%;
  display: block;
  width: 106%;
  height: 106%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.9) contrast(1.035);
  pointer-events: none;
  transform: scale(1.005);
  transition: opacity 1.1s ease;
  will-change: opacity;
}

.scene--video-ready .scene__video {
  opacity: 1;
}

.scene--video-ready::before {
  opacity: 0.16;
}

.scene--asset-ready .scene__sky,
.scene--asset-ready .scene__sea,
.scene--asset-ready .scene__island,
.scene--asset-ready .scene__house {
  display: none;
}

.scene::after {
  z-index: 12;
  background:
    linear-gradient(90deg, rgba(1, 5, 7, 0.42), transparent 42%, rgba(1, 5, 7, 0.06)),
    linear-gradient(0deg, rgba(1, 5, 7, 0.7), transparent 36%),
    linear-gradient(180deg, rgba(1, 5, 7, 0.4), transparent 24%);
}

.scene--interior-1955::after,
.scene--interior-1956::after,
.scene--storm::after,
.scene--cave::after {
  background:
    linear-gradient(90deg, rgba(1, 4, 5, 0.5), transparent 48%),
    linear-gradient(0deg, rgba(1, 4, 5, 0.74), transparent 45%),
    linear-gradient(180deg, rgba(1, 4, 5, 0.36), transparent 25%);
}

.scene__vignette {
  z-index: 15;
  background:
    radial-gradient(ellipse at 52% 45%, transparent 45%, rgba(0, 3, 4, 0.48) 110%),
    repeating-radial-gradient(circle at 19% 31%, rgba(255, 255, 255, 0.035) 0 0.5px, transparent 0.8px 5px);
  mix-blend-mode: normal;
  opacity: 0.58;
}

.cinema-frame {
  position: absolute;
  z-index: 17;
  inset: 0;
  pointer-events: none;
}

.cinema-frame::before,
.cinema-frame::after {
  position: absolute;
  right: 0;
  left: 0;
  height: clamp(17px, 3.1vh, 30px);
  background: var(--cinema-black);
  content: "";
}

.cinema-frame::before {
  top: 0;
}

.cinema-frame::after {
  bottom: 0;
}

.topbar {
  z-index: 34;
  padding-top: calc(var(--safe-top) + 1px);
  background: none;
}

.brand {
  opacity: 0.72;
  transition: opacity 220ms ease;
}

.brand:hover {
  opacity: 1;
}

.brand strong {
  font-size: 11px;
  letter-spacing: 0.16em;
}

.brand span {
  font-size: 8px;
}

.icon-button {
  padding: 7px 11px;
  border-color: rgba(245, 229, 201, 0.13);
  background: rgba(2, 8, 10, 0.28);
  backdrop-filter: blur(16px);
  font-size: 9px;
}

.world-status {
  position: absolute;
  z-index: 22;
  top: calc(var(--safe-top) + 52px);
  right: max(3vw, var(--safe-right));
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid rgba(245, 226, 192, 0.12);
  border-radius: 100px;
  background: rgba(2, 9, 11, 0.34);
  backdrop-filter: blur(14px);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.world-status > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.world-status strong {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.world-status small {
  color: rgba(242, 232, 213, 0.48);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.scene-caption {
  top: 14%;
  left: max(4vw, var(--safe-left));
}

.scene-caption span {
  color: rgba(249, 238, 218, 0.82);
  font-size: clamp(42px, 7vw, 84px);
  text-shadow: 0 8px 42px rgba(0, 0, 0, 0.42);
}

.scene-caption p {
  max-width: 420px;
  color: rgba(246, 236, 216, 0.72);
  font-size: 10px;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.objective {
  top: 29%;
  left: max(4vw, var(--safe-left));
  width: min(270px, calc(100vw - 48px));
  border: 0;
  border-left: 1px solid rgba(232, 191, 120, 0.72);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(1, 7, 9, 0.62), rgba(1, 7, 9, 0.18));
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.hotspot {
  width: 58px;
  height: 58px;
}

.hotspot::before {
  width: 8px;
  height: 8px;
  border-color: rgba(255, 226, 176, 0.96);
  background: rgba(5, 15, 16, 0.42);
  box-shadow:
    0 0 0 7px rgba(234, 190, 117, 0.08),
    0 0 28px rgba(242, 207, 149, 0.45);
}

.hotspot::after {
  width: 34px;
  height: 34px;
  border-color: rgba(245, 214, 159, 0.24);
}

.hotspot span {
  top: 49px;
  border: 0;
  border-radius: 2px;
  background: rgba(1, 7, 9, 0.64);
  color: rgba(250, 238, 218, 0.9);
  font-size: 9px;
  opacity: 0.58;
}

.hotspot:hover span,
.hotspot:focus-visible span {
  opacity: 1;
}

.dialogue {
  right: max(20vw, var(--safe-right));
  bottom: calc(84px + var(--safe-bottom));
  left: max(5vw, var(--safe-left));
  min-height: 118px;
  grid-template-columns: 1fr auto;
  gap: 20px;
  margin: 0;
  padding: 18px 20px 20px 21px;
  border: 0;
  border-left: 1px solid rgba(232, 192, 125, 0.62);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(1, 7, 9, 0.78), rgba(1, 7, 9, 0.18));
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.dialogue .portrait {
  display: none;
}

.dialogue__meta {
  margin-bottom: 7px;
}

.dialogue__meta strong {
  color: rgba(244, 204, 139, 0.92);
  font-size: 11px;
}

.dialogue__body > p {
  min-height: 44px;
  font-size: clamp(16px, 1.65vw, 21px);
  letter-spacing: 0.04em;
  line-height: 1.72;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
}

.continue-button {
  padding-right: 5px;
}

.tide-nav {
  right: auto;
  bottom: calc(var(--safe-bottom) + 5px);
  left: 50%;
  width: min(720px, calc(100% - 40px));
  grid-template-columns: 105px 0.6fr 1.8fr;
  gap: 14px;
  padding: 7px 12px;
  border-color: rgba(242, 226, 198, 0.1);
  border-radius: 100px;
  background: rgba(1, 7, 9, 0.48);
  box-shadow: none;
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.tide-nav__label small {
  display: none;
}

.tide-year {
  padding: 5px 9px;
}

.tide-year strong {
  font-size: 13px;
}

.tide-year span {
  font-size: 8px;
}

.chapter-card {
  border: 0;
  background: rgba(1, 7, 9, 0.42);
  box-shadow: 0 0 120px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

.montage {
  background:
    linear-gradient(90deg, rgba(5, 20, 24, 0.94) 0 49.7%, rgba(18, 15, 13, 0.92) 50.3% 100%),
    url("../assets/images/cinematic/bg-outside-2026-v2.webp") center / cover no-repeat;
}

.montage-pair {
  border-color: rgba(244, 226, 194, 0.14);
  background: rgba(2, 8, 10, 0.34);
  backdrop-filter: blur(12px);
}

.echo {
  background:
    linear-gradient(90deg, rgba(1, 6, 8, 0.9), rgba(1, 6, 8, 0.64)),
    url("../assets/images/cinematic/bg-cave-2026-v2.webp") center / cover no-repeat;
}

.echo__content {
  padding: 26px;
  border: 1px solid rgba(241, 222, 188, 0.12);
  background: rgba(1, 7, 9, 0.42);
  backdrop-filter: blur(14px);
}

.echo-source {
  background: rgba(1, 8, 10, 0.36);
  backdrop-filter: blur(10px);
}

.ending {
  background:
    linear-gradient(90deg, rgba(1, 6, 8, 0.88), rgba(1, 6, 8, 0.46)),
    url("../assets/images/cinematic/bg-outside-2026-v2.webp") center / cover no-repeat;
  text-align: left;
}

.ending__content {
  width: min(850px, 100%);
  margin-right: auto;
  margin-left: max(6vw, var(--safe-left));
}

.ending__actions {
  justify-content: flex-start;
}

.side-panel {
  background: rgba(3, 12, 14, 0.88);
  backdrop-filter: blur(24px);
}

.reduce-motion .intro__video,
.reduce-motion .scene__video {
  display: none !important;
}

@media (max-width: 820px) {
  .intro__content {
    bottom: max(7vh, calc(var(--safe-bottom) + 26px));
    left: max(5vw, var(--safe-left));
  }

  .world-status {
    right: 18px;
  }

  .world-status small {
    display: none;
  }

  .dialogue {
    right: 18px;
    bottom: calc(94px + var(--safe-bottom));
    left: 18px;
  }

  .tide-nav {
    grid-template-columns: 1fr;
    width: min(440px, calc(100% - 28px));
    border-radius: 16px;
  }

  .tide-nav__label,
  .tide-track {
    display: none;
  }
}

@media (max-width: 520px) {
  .intro__worldmark {
    font-size: 8px;
  }

  .intro h1 {
    max-width: 360px;
    font-size: clamp(42px, 14vw, 64px);
    line-height: 1.16;
  }

  .intro__line {
    font-size: 15px;
  }

  .intro__modes span:nth-child(n + 2) {
    display: none;
  }

  .brand span,
  .scene-caption p {
    display: none;
  }

  .scene-caption {
    top: 15%;
  }

  .scene-caption span {
    font-size: 42px;
  }

  .objective {
    top: 24%;
  }

  .world-status {
    top: calc(var(--safe-top) + 48px);
  }

  .dialogue {
    bottom: calc(98px + var(--safe-bottom));
    min-height: 136px;
    padding: 16px;
  }

  .dialogue__body > p {
    font-size: 15px;
    line-height: 1.65;
  }

  .tide-nav {
    padding: 6px 8px;
  }

  .cinema-frame::before,
  .cinema-frame::after {
    height: 14px;
  }
}

@keyframes live-breathe {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes cinema-title-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
