:root {
  --ink: #17191d;
  --paper: #f1f0eb;
  --paper-deep: #e5e3dc;
  --line: rgba(23, 25, 29, 0.2);
  --blue: #6bb1e6;
  --blue-deep: #1b527a;
  --red: #a84432;
  --night: #08090b;
  --muted: #74767a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-x: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 76px;
  padding: 0 4vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: white;
  mix-blend-mode: difference;
  pointer-events: none;
}

.topbar a,
.topbar button {
  pointer-events: auto;
}

.wordmark {
  width: fit-content;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.wordmark-cn {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 18px;
  font-weight: 700;
}

.wordmark-en,
.chapter-readout,
.section-no,
.eyebrow,
.panel-header > p,
.preview-label,
.story-nav > p,
.epilogue-copy > p:first-child,
footer {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.18em;
}

.chapter-readout {
  display: flex;
  gap: 12px;
}

.chapter-index {
  opacity: 0.5;
}

.sound-toggle {
  justify-self: end;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.sound-bars {
  height: 13px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.sound-bars i {
  display: block;
  width: 1px;
  height: 5px;
  background: currentColor;
  transition: height 0.3s;
}

.sound-toggle.active .sound-bars i:nth-child(1) {
  animation: sound 0.8s ease-in-out infinite alternate;
}

.sound-toggle.active .sound-bars i:nth-child(2) {
  animation: sound 0.55s 0.15s ease-in-out infinite alternate;
}

.sound-toggle.active .sound-bars i:nth-child(3) {
  animation: sound 0.7s 0.3s ease-in-out infinite alternate;
}

@keyframes sound {
  to { height: 13px; }
}

.chapter {
  position: relative;
}

.hero {
  min-height: 100svh;
  padding: 12vh 6vw 8vh;
  background: #78bce9;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(209, 234, 249, 0.88) 0%, rgba(106, 179, 229, 0.06) 58%, rgba(20, 76, 116, 0.24) 100%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: 48%;
  max-width: 710px;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--blue-deep);
}

.hero h1 {
  margin: 0;
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(74px, 9vw, 150px);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero h1 span {
  display: block;
  margin-top: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2.7vw, 44px);
  font-style: italic;
  line-height: 1;
  color: var(--blue-deep);
}

.hero-intro {
  margin: 45px 0 28px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.8;
}

.identity-line {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(23, 25, 29, 0.62);
  font-size: 12px;
}

.identity-line i {
  width: 24px;
  height: 1px;
  background: currentColor;
}

.portrait-stage {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 56vw;
  height: 100%;
  cursor: crosshair;
  --x: 58%;
  --y: 42%;
}

.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}

.portrait-base {
  filter: blur(22px) saturate(0.58) brightness(1.03);
  transform: scale(1.055);
  opacity: 0.68;
}

.particle-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  mix-blend-mode: normal;
  pointer-events: none;
}

.portrait-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(circle at var(--x) var(--y), rgba(255, 255, 255, 0.02) 0 120px, transparent 240px),
    linear-gradient(90deg, rgba(120, 188, 233, 0.18), rgba(12, 45, 68, 0.18));
  pointer-events: none;
}

.portrait-hint {
  position: absolute;
  z-index: 5;
  right: 3vw;
  bottom: 7vh;
  margin: 0;
  color: white;
  font-size: 11px;
  letter-spacing: 0.12em;
  transition: opacity 0.3s;
}

.portrait-stage:hover .portrait-hint {
  opacity: 0;
}

.enter-story {
  position: absolute;
  z-index: 5;
  left: 6vw;
  bottom: 6vh;
  padding: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: transparent;
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
}

.enter-story .arrow {
  font-size: 18px;
}

.vertical-note {
  position: absolute;
  z-index: 3;
  right: 1.4vw;
  top: 50%;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  letter-spacing: 0.23em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.choice-section {
  min-height: 100svh;
  padding: 16vh 8vw 10vh;
  background: var(--paper);
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 8vw;
  align-content: center;
}

.section-heading {
  align-self: start;
  position: sticky;
  top: 16vh;
}

.section-no {
  color: var(--red);
}

.section-heading h2 {
  margin: 36px 0 24px;
  max-width: 500px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 400;
  line-height: 1.18;
}

.section-heading > p:last-child {
  max-width: 370px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.route-list {
  border-top: 1px solid var(--line);
}

.route {
  position: relative;
  width: 100%;
  min-height: 128px;
  padding: 25px 20px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
}

.route::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

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

.route:hover::before,
.route.active::before {
  transform: translateY(0);
}

.route:hover,
.route.active {
  color: var(--paper);
}

.route-no {
  align-self: start;
  padding-top: 5px;
  color: var(--red);
  font-family: Georgia, serif;
  font-style: italic;
}

.route-main strong {
  display: block;
  margin-bottom: 12px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(22px, 2vw, 31px);
  font-weight: 400;
}

.route-main small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.route:hover small,
.route.active small {
  color: rgba(241, 240, 235, 0.55);
}

.route-arrow {
  font-size: 22px;
}

.route-preview {
  margin-top: 30px;
  padding-left: 72px;
  color: var(--muted);
}

.route-preview p {
  margin: 10px 0 0;
  max-width: 480px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: 14px;
  line-height: 1.75;
}

.story-section {
  min-height: 100svh;
  padding: 12vh 5vw 8vh;
  color: var(--paper);
  background: var(--night);
}

.story-shell {
  min-height: 80vh;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 5vw;
}

.story-nav {
  padding-top: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.story-nav > p {
  margin: 0 0 52px;
  color: rgba(255, 255, 255, 0.4);
  writing-mode: vertical-rl;
}

.story-dot {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px 8px 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.32);
  background: transparent;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.story-dot span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-style: italic;
}

.story-dot.active {
  color: white;
}

.story-dot.active span {
  color: var(--night);
  background: var(--paper);
  border-color: var(--paper);
}

.story-panels {
  position: relative;
}

.story-panel {
  display: none;
  animation: panelIn 0.7s both;
}

.story-panel.active {
  display: block;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: grid;
  grid-template-columns: 0.5fr 1.4fr;
  gap: 5vw;
  align-items: start;
  margin-bottom: 9vh;
}

.panel-header > p {
  margin-top: 15px;
  color: var(--red);
}

.panel-header h2 {
  margin: 0;
  max-width: 920px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(46px, 5.5vw, 88px);
  font-weight: 400;
  line-height: 1.16;
}

.panel-body {
  margin-left: calc(26% + 5vw);
  max-width: 920px;
}

.lead {
  max-width: 720px;
  margin: 0 0 8vh;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 18px;
  line-height: 2;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.research-item {
  padding: 24px 28px 35px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.research-item + .research-item {
  padding-left: 28px;
}

.research-item:last-child {
  border-right: 0;
}

.research-item > span {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 12px;
}

.research-item h3 {
  margin: 40px 0 20px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.research-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.9;
}

blockquote {
  margin: 7vh 0 0;
  padding-left: 24px;
  border-left: 2px solid var(--red);
  color: rgba(255, 255, 255, 0.72);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 20px;
}

.self-layout {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 7vw;
  align-items: center;
}

.self-statement {
  position: relative;
  height: min(63vh, 700px);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 25% 25%;
}

.self-statement > span {
  font-family: Georgia, serif;
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.18em;
}

.self-statement > p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 5.3vw, 84px);
  line-height: 0.85;
}

.self-statement > p i {
  color: var(--red);
  font-weight: 400;
}

.statement-note {
  align-self: flex-end;
  color: rgba(255, 255, 255, 0.45);
  text-align: right;
}

.trait {
  width: 100%;
  padding: 23px 5px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  color: rgba(255, 255, 255, 0.48);
  text-align: left;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.trait span {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 11px;
}

.trait strong {
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(23px, 2.4vw, 35px);
  font-weight: 400;
}

.trait i {
  font-style: normal;
  font-size: 22px;
}

.trait.active {
  color: white;
}

.trait.active i {
  transform: rotate(45deg);
}

.trait-copy {
  display: none;
  margin: 0;
  padding: 4px 45px 25px 40px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.9;
}

.trait-copy.active {
  display: block;
}

.moon-panel {
  min-height: 78vh;
}

.moon-heading {
  position: relative;
  z-index: 2;
  margin-bottom: -2vh;
  pointer-events: none;
}

.moon-viewer {
  margin-left: 10vw;
}

.moon-frame {
  margin: 0;
}

.moon-frame img {
  display: block;
  width: 100%;
  height: min(52vh, 570px);
  object-fit: contain;
  transition: opacity 0.28s, transform 0.5s;
}

.moon-frame img.changing {
  opacity: 0;
  transform: scale(0.985);
}

.moon-frame figcaption {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.moon-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.moon-controls button {
  width: 44px;
  height: 44px;
  padding: 0;
  color: white;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  cursor: pointer;
}

.moon-controls button:hover {
  color: var(--night);
  background: var(--paper);
}

.moon-progress {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.moon-progress i {
  display: block;
  width: 33.333%;
  height: 100%;
  background: var(--paper);
  transition: transform 0.4s;
}

.epilogue {
  min-height: 90svh;
  padding: 13vh 8vw 4vh;
  color: white;
  background: #421d1a;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.epilogue > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.epilogue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 5, 5, 0.9), rgba(52, 12, 8, 0.2) 70%);
}

.epilogue-copy {
  position: relative;
  z-index: 2;
  width: 60%;
}

.epilogue-copy > p:first-child {
  color: #d18473;
}

.epilogue-copy h2 {
  margin: 35px 0;
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(46px, 6vw, 90px);
  font-weight: 400;
  line-height: 1.15;
}

.english-line {
  color: rgba(255, 255, 255, 0.62);
  font-family: Georgia, serif;
  font-size: 17px;
  font-style: italic;
  line-height: 1.7;
}

.epilogue-copy a {
  display: inline-flex;
  gap: 60px;
  margin-top: 6vh;
  padding-bottom: 9px;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 13px;
}

footer {
  position: absolute;
  z-index: 2;
  left: 8vw;
  right: 8vw;
  bottom: 4vh;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.38);
}

@media (max-width: 820px) {
  .topbar {
    height: 62px;
    padding: 0 20px;
    grid-template-columns: 1fr auto;
  }

  .wordmark-en,
  .chapter-readout {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding: 13vh 24px 9vh;
    align-items: flex-start;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(202, 231, 248, 0.86) 0%, rgba(109, 183, 230, 0.1) 50%, rgba(10, 45, 70, 0.44) 100%);
  }

  .hero-copy {
    z-index: 4;
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(58px, 20vw, 88px);
  }

  .hero h1 span {
    margin-top: 18px;
    font-size: 25px;
  }

  .hero-intro {
    margin-top: 28px;
    font-size: 16px;
  }

  .identity-line {
    font-size: 10px;
  }

  .portrait-stage {
    top: 36%;
    width: 100%;
    height: 64%;
  }

  .portrait {
    object-position: 50% 24%;
  }

  .portrait-hint {
    right: 24px;
    bottom: 80px;
  }

  .enter-story {
    left: 24px;
    bottom: 32px;
  }

  .vertical-note {
    display: none;
  }

  .choice-section {
    padding: 12vh 24px 9vh;
    display: block;
  }

  .section-heading {
    position: static;
    margin-bottom: 55px;
  }

  .section-heading h2 {
    margin-top: 25px;
    font-size: 45px;
  }

  .route {
    min-height: 108px;
    padding-inline: 12px;
    grid-template-columns: 35px 1fr auto;
  }

  .route-preview {
    padding-left: 47px;
  }

  .story-section {
    padding: 10vh 20px 8vh;
  }

  .story-shell {
    display: block;
  }

  .story-nav {
    position: sticky;
    top: 62px;
    z-index: 20;
    padding: 8px 0;
    display: flex;
    gap: 5px;
    background: var(--night);
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .story-nav > p {
    display: none;
  }

  .story-dot {
    width: auto;
    margin: 0;
    padding: 6px 10px 6px 0;
  }

  .panel-header {
    display: block;
    margin: 52px 0 55px;
  }

  .panel-header > p {
    margin-bottom: 25px;
  }

  .panel-header h2 {
    font-size: 43px;
  }

  .panel-body {
    margin-left: 0;
  }

  .lead {
    margin-bottom: 55px;
    font-size: 16px;
  }

  .research-grid {
    display: block;
  }

  .research-item,
  .research-item + .research-item {
    padding: 22px 0 30px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .research-item h3 {
    margin: 18px 0 12px;
  }

  blockquote {
    margin-bottom: 40px;
    font-size: 17px;
    line-height: 1.7;
  }

  .self-layout {
    display: block;
  }

  .self-statement {
    height: 48vh;
    margin-bottom: 35px;
  }

  .trait strong {
    font-size: 24px;
  }

  .trait-copy {
    padding-left: 40px;
    padding-right: 8px;
  }

  .moon-heading {
    margin-bottom: 30px;
  }

  .moon-viewer {
    margin-left: 0;
  }

  .moon-frame img {
    height: 39vh;
  }

  .epilogue {
    min-height: 82svh;
    padding: 12vh 24px 8vh;
  }

  .epilogue > img {
    object-position: 58% center;
  }

  .epilogue-copy {
    width: 100%;
  }

  .epilogue-copy h2 {
    font-size: 44px;
  }

  footer {
    left: 24px;
    right: 24px;
  }
}

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