/* 栖鸾集：移动端数字展览 */
:root {
  --paper: #F4F5F1;
  --paper-warm: #F7F4EC;
  --mist: #E7ECEC;
  --mist-blue: #D5E0E5;
  --blue-gray: #8FA9B8;
  --blue-deep: #637F8F;
  --ink: #344249;
  --ink-soft: #69767B;
  --bamboo: #68744B;
  --bamboo-light: #AAB18A;
  --warm-gold: #B29A69;
  --line: rgba(99, 127, 143, 0.28);
  --white-glass: rgba(248, 248, 244, 0.88);
  --serif: "STKaiti", "Kaiti SC", "KaiTi", "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --content: 1180px;
  --edge: clamp(20px, 5.2vw, 72px);
  --section-space: clamp(92px, 12vw, 168px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.82;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.dialog-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
figure, blockquote, h1, h2, h3, p { margin-top: 0; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--paper-warm);
  border: 1px solid var(--ink);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* 顶部阅读进度 */
.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 999;
  background: rgba(244, 245, 241, 0.2);
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--warm-gold);
  transform-origin: left center;
}

/* 本地山音控制 */
.audio-toggle {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  min-width: 92px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(52, 66, 73, .34);
  color: var(--ink);
  background: rgba(247, 244, 236, .94);
  box-shadow: 0 5px 20px rgba(34, 49, 52, .09);
  cursor: pointer;
  letter-spacing: .08em;
}
.audio-toggle span { font-family: var(--serif); font-size: 15px; font-weight: 400; }
.audio-toggle strong { color: var(--blue-deep); font-size: 11px; font-weight: 400; }
.audio-toggle[data-state="playing"] { border-color: rgba(104, 116, 75, .56); }
.audio-toggle:hover, .audio-toggle:focus-visible { border-color: var(--blue-deep); outline: none; }

/* 首屏 */
.hero {
  position: relative;
  min-height: 92svh;
  height: 920px;
  max-height: 1000px;
  overflow: hidden;
  isolation: isolate;
  background: #d8ddda;
}
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  z-index: -2;
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(22, 35, 37, 0.05) 32%, rgba(20, 33, 34, 0.18) 62%, rgba(16, 29, 30, 0.78) 100%);
}
.hero__content {
  position: absolute;
  left: max(var(--edge), calc((100vw - var(--content)) / 2));
  right: var(--edge);
  bottom: clamp(38px, 7svh, 76px);
  color: #fffdf6;
  max-width: 540px;
  text-shadow: 0 2px 22px rgba(19, 31, 32, 0.36);
}
.hero__eyebrow {
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: .24em;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .14em;
}
.hero h1 span { display: block; font-size: clamp(52px, 11vw, 96px); }
.hero h1 small {
  display: block;
  margin-top: 14px;
  font-size: clamp(21px, 4.3vw, 34px);
  letter-spacing: .24em;
}
.hero__description { margin: 24px 0 22px; font-size: 15px; letter-spacing: .12em; }
.hero__start {
  display: inline-flex;
  min-width: 150px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 253, 246, .72);
  text-decoration: none;
  letter-spacing: .18em;
  transition: background-color .28s ease, color .28s ease, transform .28s ease;
}
.hero__start:hover, .hero__start:focus-visible { background: #fffdf6; color: var(--ink); transform: translateY(-2px); }
.hero__hint { margin: 13px 0 0; font-size: 11px; letter-spacing: .16em; opacity: .82; }

@keyframes hero-scroll-cue {
  0%, 100% { transform: translateY(0); opacity: .82; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* 轻量章节导航 */
.chapter-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 245, 241, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.chapter-nav__inner {
  display: flex;
  width: min(100%, var(--content));
  margin: 0 auto;
  padding-inline: max(10px, calc(var(--edge) - 12px));
  overflow-x: auto;
  scrollbar-width: none;
}
.chapter-nav__inner::-webkit-scrollbar { display: none; }
.chapter-nav a {
  flex: 1 0 auto;
  min-width: 56px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: .1em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.chapter-nav a:hover, .chapter-nav a:focus-visible, .chapter-nav a[aria-current="true"] { color: var(--blue-deep); border-bottom-color: var(--blue-deep); }

/* 通用章节 */
.section {
  position: relative;
  width: min(100%, var(--content));
  margin-inline: auto;
  padding: var(--section-space) var(--edge);
}
.section-heading { position: relative; z-index: 1; max-width: 790px; margin-bottom: clamp(42px, 7vw, 76px); }
.section-heading__index {
  margin-bottom: 12px;
  color: var(--blue-deep);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .2em;
}
.section-heading h2 {
  margin-bottom: 18px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(32px, 5.6vw, 58px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .07em;
}
.section-heading__intro { max-width: 620px; margin-bottom: 20px; color: var(--ink-soft); }
.section-heading__rule { display: block; width: min(100%, 440px); height: 1px; background: linear-gradient(90deg, var(--blue-deep), transparent); }
.voice-control {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: 0;
  color: var(--blue-deep);
  background: transparent;
  cursor: pointer;
  text-align: left;
  letter-spacing: .06em;
}
.voice-control::before { content: "▶"; flex: 0 0 14px; color: var(--bamboo); font-size: 9px; }
.voice-control[data-state="loading"]::before { content: "…"; font-size: 13px; }
.voice-control[data-state="playing"]::before { content: "Ⅱ"; font-size: 10px; }
.voice-control[data-state="ended"]::before { content: "↻"; font-size: 13px; }
.voice-control[data-state="error"] { color: var(--warm-gold); }
.voice-control > [data-voice-label] { flex: 1; }
.voice-control [data-voice-duration] { flex: 0 0 auto; color: var(--ink-soft); font-size: 10px; letter-spacing: .06em; }
.voice-control [data-voice-duration]:empty { display: none; }
.voice-control:hover, .voice-control:focus-visible { color: var(--ink); outline: none; }
.section-heading__narration { width: auto; max-width: 100%; margin: 0 0 12px; padding-right: 8px; font-size: 12px; }
.section__ghost {
  position: absolute;
  right: 4vw;
  top: 6%;
  color: rgba(99, 127, 143, .055);
  font-family: var(--serif);
  font-size: clamp(180px, 34vw, 420px);
  line-height: 1;
  pointer-events: none;
}
.chapter-sentence {
  margin: clamp(70px, 10vw, 130px) 0 0;
  text-align: center;
  color: var(--blue-deep);
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: .18em;
}

/* 浮玉传说 */
.legend {
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 92% 12%, rgba(213, 224, 229, .65), transparent 38%),
    var(--paper);
}
.legend__guyu-art {
  position: absolute;
  z-index: 0;
  top: clamp(250px, 52vw, 330px);
  right: -9%;
  width: min(78%, 430px);
  margin: 0;
  opacity: .5;
  pointer-events: none;
}
.legend__guyu-art img {
  width: 100%;
  height: auto;
  filter: saturate(.68) contrast(.88) sepia(.04);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .28) 18%, #000 48%, #000 87%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 7%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .28) 18%, #000 48%, #000 87%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 7%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
.legend-guide {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 0 clamp(52px, 8vw, 84px);
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.legend-guide__copy { align-self: center; max-width: 580px; }
.legend-guide__eyebrow {
  margin-bottom: 10px;
  color: var(--warm-gold);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .22em;
}
.legend-guide h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 58px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .14em;
}
.legend-guide__role {
  margin-bottom: 0;
  color: var(--bamboo);
  font-size: 12px;
  letter-spacing: .14em;
}
.legend-guide__intro {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--ink-soft);
}
.legend-guide__voice {
  width: min(100%, 250px);
  margin-top: 18px;
  padding-right: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(99, 127, 143, .18);
  font-size: 12px;
}
.legend__body { position: relative; z-index: 1; max-width: 680px; }
.legend__body p { margin-bottom: 1.45em; color: var(--ink-soft); }
.legend__body .legend__lead { color: var(--ink); font-size: clamp(18px, 2.2vw, 22px); }
.legend__body .legend__turn { margin-block: 2em; color: var(--ink); font-family: var(--serif); font-size: 24px; letter-spacing: .08em; }
.classic-quote {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: clamp(60px, 9vw, 110px) 0 0 auto;
  padding: 34px 0 20px clamp(20px, 5vw, 64px);
  border-left: 1px solid var(--warm-gold);
}
.classic-quote blockquote { margin-bottom: 18px; font-family: var(--serif); font-size: clamp(23px, 4vw, 40px); line-height: 1.7; }
.classic-quote figcaption { color: var(--ink-soft); font-size: 13px; letter-spacing: .14em; }

/* 三幕时间轴 */
.flow { width: 100%; max-width: none; background: var(--mist); }
.flow > .section-heading, .timeline { width: min(100%, var(--content)); margin-inline: auto; }
.flow > .section-heading { padding-inline: var(--edge); }
.timeline { position: relative; display: grid; gap: 0; padding-inline: var(--edge); }
.timeline::before { content: ""; position: absolute; left: calc(var(--edge) + 24px); top: 28px; bottom: 28px; width: 1px; background: var(--line); }
.act { position: relative; padding: 0 0 70px 76px; }
.act:last-child { padding-bottom: 0; }
.act__mark {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--paper-warm);
  background: var(--blue-deep);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 21px;
  box-shadow: 0 0 0 8px var(--mist);
}
.act__place { margin: 0 0 8px; color: var(--blue-deep); font-size: 12px; letter-spacing: .16em; }
.act h3 { margin-bottom: 18px; font-family: var(--serif); font-size: clamp(26px, 4vw, 38px); font-weight: 400; letter-spacing: .06em; }
.act > p:not(.act__place) { max-width: 620px; color: var(--ink-soft); }
.keywords { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.keywords li { color: var(--bamboo); font-size: 12px; letter-spacing: .08em; }
.keywords li:not(:last-child)::after { content: " ·"; color: var(--warm-gold); }

/* 人物 */
.characters { background: var(--paper-warm); }
.character-grid { display: grid; gap: 36px; }
.character {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 0 0 36px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.character__portrait {
  width: 100%;
  align-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.character__portrait img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.character__info { min-width: 0; display: flex; flex-direction: column; align-self: stretch; padding-top: 2px; }
.character__identity { color: var(--ink-soft); font-size: 12px; line-height: 1.5; letter-spacing: .08em; }
.character__name { margin: 8px 0 14px; font-family: var(--serif); font-size: clamp(32px, 6vw, 48px); font-weight: 400; line-height: 1.18; letter-spacing: .1em; white-space: nowrap; }
.character__wish { color: var(--bamboo); font-size: 13px; line-height: 1.55; }
.character__actions { margin-top: auto; border-top: 1px solid var(--line); }
.character__voice { width: 100%; border-bottom: 1px solid rgba(99, 127, 143, .18); }
.character__detail {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: 0;
  color: var(--blue-deep);
  background: transparent;
  cursor: pointer;
  text-align: left;
  letter-spacing: .06em;
}
.character__voice > span, .character__detail > span:first-child { flex: 1; }
.character__detail > span:last-child { flex: 0 0 auto; transition: transform .25s ease; }
.character__detail:hover, .character__detail:focus-visible { color: var(--ink); outline: none; }
.character__detail:hover > span:last-child, .character__detail:focus-visible > span:last-child { transform: translateX(4px); }
.character__portrait:focus-visible, .voice-control:focus-visible, .character__detail:focus-visible, .clue__preview:focus-visible, .clue__detail:focus-visible, .map-figure:focus-visible, .dialog-close:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 4px; }

/* 地图与游线 */
.route { background: var(--paper); }
.map-figure { width: 100%; padding: 0; border: 0; color: var(--ink-soft); background: transparent; cursor: zoom-in; text-align: left; }
.map-figure img { width: 100%; height: auto; aspect-ratio: 1785 / 1280; object-fit: contain; background: var(--paper-warm); }
.map-figure span { display: block; padding-top: 10px; font-size: 12px; letter-spacing: .08em; }
.route-list { display: grid; margin: 58px 0 0; padding: 0; list-style: none; }
.route-list li { position: relative; min-height: 102px; padding: 0 0 30px 62px; }
.route-list li:not(:last-child)::before { content: ""; position: absolute; left: 20px; top: 42px; bottom: 0; width: 1px; background: var(--line); }
.route-list li > span { position: absolute; left: 0; top: 0; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--blue-gray); border-radius: 50%; color: var(--blue-deep); font-family: var(--serif); }
.route-list strong, .route-list small { display: block; }
.route-list strong { padding-top: 2px; font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: .05em; }
.route-list small { margin-top: 5px; color: var(--ink-soft); }

/* 五采任务 */
.tasks { background: var(--paper-warm); }
.task { display: grid; gap: 30px; padding: 46px 0; border-top: 1px solid var(--line); }
.task:last-child { border-bottom: 1px solid var(--line); }
.task figure { margin: 0; }
.task img { width: 100%; height: auto; object-fit: cover; background: var(--mist); }
.task__text { align-self: center; }
.task__index { margin-bottom: 8px; color: var(--warm-gold); font-family: var(--serif); font-size: 13px; letter-spacing: .16em; }
.task h3 { margin-bottom: 18px; font-family: var(--serif); font-size: clamp(28px, 4vw, 42px); font-weight: 400; letter-spacing: .08em; }
.task__text > p:not(.task__index):not(.task__role) { color: var(--ink-soft); }
.task__role { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--bamboo); font-size: 13px; }

/* 线索 */
.clues { background: var(--mist); }
.clue-carousel { min-width: 0; container-type: inline-size; }
.clue-gallery { display: flex; gap: 18px; margin-right: calc(var(--edge) * -1); padding: 4px var(--edge) 18px 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-color: var(--blue-gray) transparent; }
.clue {
  flex: 0 0 min(76vw, 300px);
  color: var(--ink);
  scroll-snap-align: start;
}
.clue__preview { width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.clue img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .35s ease, opacity .35s ease; }
.clue__preview:hover img, .clue__preview:focus-visible img { transform: translateY(-4px); opacity: .9; }
.clue__copy { padding: 17px 2px 0; }
.clue__copy > strong, .clue__copy > small { display: block; }
.clue__copy > strong { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: .05em; }
.clue__copy > small { margin-top: 6px; color: var(--ink-soft); font-size: 12px; }
.clue__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 4px; border-top: 1px solid rgba(99, 127, 143, .18); }
.clue__voice { min-width: 0; flex: 1 1 auto; font-size: 11px; white-space: nowrap; }
.clue__detail {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border: 0;
  color: var(--blue-deep);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .06em;
}
.clue__detail > span:last-child { transition: transform .25s ease; }
.clue__detail:hover, .clue__detail:focus-visible { color: var(--ink); outline: none; }
.clue__detail:hover > span:last-child, .clue__detail:focus-visible > span:last-child { transform: translateX(3px); }
.clue-position { display: none; }

/* 空间落地 */
.space { overflow: hidden; background: var(--paper); }
.space__intro { padding-bottom: 66px; }
.logic-chain { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 8px; color: var(--ink-soft); font-size: 12px; white-space: nowrap; scrollbar-width: thin; }
.logic-chain span { padding: 8px 0; }
.logic-chain i { flex: 0 0 22px; height: 1px; background: var(--warm-gold); }
.scene { width: min(100%, 1600px); margin: 0 auto clamp(70px, 9vw, 110px); }
.scene img { width: 100%; height: auto; aspect-ratio: 1600 / 893; object-fit: cover; }
.scene figcaption { display: grid; gap: 8px; width: min(100%, var(--content)); margin: 0 auto; padding: 18px var(--edge) 0; }
.scene figcaption strong { font-family: var(--serif); font-size: 23px; font-weight: 400; letter-spacing: .06em; }
.scene figcaption span { color: var(--ink-soft); font-size: 13px; }
.space__notes { padding-top: 10px; padding-bottom: 80px; }
.space__notes > p { max-width: 760px; color: var(--ink-soft); }
.space__notes blockquote { margin: 60px 0 0; text-align: right; color: var(--blue-deep); font-family: var(--serif); font-size: clamp(29px, 5vw, 54px); letter-spacing: .15em; }
.chapter-sentence--space { margin: 0; padding: 20px var(--edge) 120px; }

/* 终章 */
.finale { position: relative; min-height: 86svh; overflow: hidden; color: #edf1ec; background: #405156; }
.finale::before { content: "宁"; position: absolute; right: -3vw; bottom: -7vw; color: rgba(239, 242, 236, .035); font-family: var(--serif); font-size: min(62vw, 720px); line-height: .8; }
.finale__mist { position: absolute; inset: 0; background: radial-gradient(ellipse at 18% 16%, rgba(143, 169, 184, .32), transparent 44%); }
.finale__inner { position: relative; padding-top: clamp(110px, 14vw, 180px); padding-bottom: clamp(100px, 12vw, 160px); }
.finale .section-heading__index { color: var(--bamboo-light); }
.finale h2 { margin-bottom: 48px; font-family: var(--serif); font-size: clamp(46px, 8vw, 84px); font-weight: 400; letter-spacing: .16em; }
.finale__inner > p:not(.section-heading__index) { max-width: 760px; color: rgba(237, 241, 236, .78); }
.finale__inner .finale__lead { margin-bottom: 36px; color: #fffdf6; font-family: var(--serif); font-size: clamp(23px, 3.6vw, 34px); line-height: 1.75; }
.finale__small { margin-top: 58px; font-family: var(--serif); font-size: 17px; letter-spacing: .08em; }
.finale__project { margin-top: 84px; padding-top: 28px; border-top: 1px solid rgba(237, 241, 236, .22); }
.finale__project strong, .finale__project span { display: block; }
.finale__project strong { font-family: var(--serif); font-size: 27px; font-weight: 400; letter-spacing: .18em; }
.finale__project span { margin-top: 8px; color: rgba(237, 241, 236, .62); font-size: 12px; }
.finale__actions { display: flex; flex-wrap: wrap; gap: 16px 30px; align-items: center; margin-top: 50px; }
.back-top, .final-audio-toggle { display: inline-flex; min-height: 44px; align-items: center; color: var(--paper-warm); font-size: 12px; letter-spacing: .14em; border: 0; border-bottom: 1px solid rgba(237, 241, 236, .55); background: transparent; text-decoration: none; cursor: pointer; }
.back-top:hover, .back-top:focus-visible, .final-audio-toggle:hover, .final-audio-toggle:focus-visible { border-bottom-color: var(--paper-warm); outline: none; }

footer { padding: 20px var(--edge); color: var(--ink-soft); background: var(--paper-warm); text-align: center; }
footer p { margin: 0; font-size: 11px; letter-spacing: .1em; }

/* 统一原生对话框 */
.exhibit-dialog {
  width: min(94vw, 1040px);
  max-width: none;
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.exhibit-dialog::backdrop { background: rgba(26, 38, 39, .74); backdrop-filter: blur(3px); }
.dialog-shell { position: relative; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper-warm); box-shadow: 0 24px 70px rgba(12, 24, 25, .34); }
.dialog-close { position: sticky; z-index: 4; top: 12px; float: right; min-width: 58px; min-height: 44px; margin: 12px 12px -56px 0; padding: 8px 12px; border: 1px solid var(--line); color: var(--ink); background: rgba(247, 244, 236, .94); cursor: pointer; }
.dialog-layout { display: grid; }
.dialog-media { margin: 0; background: var(--mist); }
.dialog-media img { width: 100%; max-height: 78dvh; object-fit: contain; }
.dialog-media figcaption { padding: 10px 18px; color: var(--ink-soft); font-size: 11px; }
.dialog-media figcaption:empty { display: none; }
.dialog-copy { padding: 34px var(--edge) 50px; }
.dialog-copy:empty { display: none; }
.role-detail__identity { margin-bottom: 8px; color: var(--blue-deep); font-size: 12px; letter-spacing: .14em; }
.role-detail h2 { margin-bottom: 30px; font-family: var(--serif); font-size: 42px; font-weight: 400; letter-spacing: .12em; }
.role-detail dl { margin: 0; }
.role-detail dl div { padding: 18px 0; border-top: 1px solid var(--line); }
.role-detail dt { margin-bottom: 5px; color: var(--bamboo); font-size: 12px; letter-spacing: .1em; }
.role-detail dd { margin: 0; color: var(--ink-soft); }
.image-detail h2 { margin-bottom: 18px; font-family: var(--serif); font-size: 32px; font-weight: 400; letter-spacing: .08em; }
.image-detail p { margin: 0; color: var(--ink-soft); }
.image-detail__voice { width: 100%; margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid rgba(99, 127, 143, .18); }

/* 进入动效 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .45s ease, transform .45s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 720px) {
  .hero { height: 100svh; }
  .hero__image { object-position: center 61%; }
  .legend__guyu-art {
    top: clamp(230px, 24vw, 310px);
    right: -3%;
    width: min(48%, 520px);
    opacity: .28;
  }
  .legend-guide__copy { width: min(62%, 580px); }
  .character-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .character { display: block; padding-bottom: 16px; }
  .character__info { padding-top: 20px; }
  .character__name { font-size: 38px; }
  .character__actions { margin-top: 24px; }
  .task { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: clamp(38px, 6vw, 90px); padding: 72px 0; }
  .task--reverse figure { order: 2; }
  .task--reverse .task__text { order: 1; }
  .clue-gallery { display: grid; grid-template-columns: repeat(3, 1fr); margin-right: 0; padding-right: 0; overflow: visible; }
  .clue { min-width: 0; }
  .scene figcaption { grid-template-columns: 230px 1fr; gap: 40px; }
  .dialog-layout:has(.dialog-copy:not(:empty)) { grid-template-columns: minmax(320px, .78fr) minmax(360px, 1fr); }
  .dialog-copy { padding: 74px clamp(40px, 5vw, 76px); }
}

@media (min-width: 980px) {
  .hero { background: var(--paper-warm); }
  .hero__image {
    left: 36%;
    width: 64%;
    object-position: 58% center;
  }
  .hero__veil {
    background:
      linear-gradient(90deg, var(--paper-warm) 0%, var(--paper-warm) 27%, rgba(247, 244, 236, .9) 36%, rgba(247, 244, 236, .12) 57%, transparent 72%),
      linear-gradient(180deg, transparent 58%, rgba(21, 34, 35, .2) 100%);
  }
  .hero__content {
    left: max(var(--edge), calc((100vw - var(--content)) / 2));
    bottom: 12vh;
    width: min(36vw, 500px);
    color: var(--ink);
    text-shadow: none;
  }
  .hero__eyebrow, .hero__hint { color: var(--ink-soft); }
  .hero__start { border-color: var(--ink); }
  .hero__start:hover, .hero__start:focus-visible { background: var(--ink); color: var(--paper-warm); }
  .chapter-nav__inner { padding-inline: var(--edge); }
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 42px; }
  .timeline::before { left: calc(var(--edge) + 25px); right: calc(var(--edge) + 25px); top: 25px; bottom: auto; width: auto; height: 1px; }
  .act { padding: 82px 0 0; }
  .act__mark { left: 0; }
  .act > p:not(.act__place) { font-size: 15px; }
  .route-list { grid-template-columns: repeat(5, 1fr); gap: 20px; }
  .route-list li { min-height: 0; padding: 64px 10px 0 0; }
  .route-list li:not(:last-child)::before { left: 42px; right: -20px; top: 21px; bottom: auto; width: auto; height: 1px; }
  .logic-chain { font-size: 14px; }
  .logic-chain i { flex-basis: 46px; }
}

@media (max-width: 520px) {
  :root { --edge: 20px; --section-space: 96px; }
  body { font-size: 15px; line-height: 1.78; }
  .hero { height: 100svh; max-height: none; min-height: 680px; }
  .hero__image { object-position: 22% center; }
  .hero__content { left: 20px; right: 20px; bottom: max(34px, env(safe-area-inset-bottom)); }
  .hero h1 span { font-size: 50px; }
  .hero h1 small { font-size: 20px; }
  .hero__description { margin-top: 18px; }
  .hero__hint { animation: hero-scroll-cue .9s ease-in-out .6s 5; }
  .section-heading h2 { font-size: 34px; }
  .section__ghost { right: -20px; top: 7%; font-size: 210px; }
  .legend__guyu-art { top: clamp(250px, 70vw, 300px); right: -8%; width: 82%; }
  .legend-guide { margin-bottom: 56px; padding-bottom: 38px; }
  .legend-guide__copy { max-width: none; }
  .legend-guide h3 { font-size: 40px; }
  .legend-guide__intro { margin-top: 18px; font-size: 13px; line-height: 1.8; }
  .legend-guide__voice { width: min(100%, 230px); }
  .classic-quote { margin-left: 8px; padding-left: 22px; }
  .classic-quote blockquote { font-size: 23px; }
  .flow { padding-block: var(--section-space); }
  .flow > .section-heading { padding-inline: 20px; }
  .timeline { padding-inline: 20px; }
  .timeline::before { left: 44px; }
  .act { padding-left: 72px; }
  .characters { padding-bottom: 64px; }
  .character { grid-template-columns: 46% minmax(0, 1fr); gap: 18px; padding-bottom: 36px; }
  .character__identity { font-size: 11px; }
  .character__name { margin-block: 7px 12px; font-size: clamp(28px, 8vw, 32px); letter-spacing: .08em; }
  .character__wish { font-size: 12px; word-break: keep-all; }
  .character__voice, .character__detail { font-size: 11px; }
  .clue-gallery {
    gap: 16px;
    padding: 4px calc(18vw - var(--edge)) 14px 0;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-padding-left: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .clue-gallery::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .clue { width: 82vw; width: 92.25cqw; max-width: none; flex: 0 0 auto; scroll-snap-stop: always; }
  .clue__copy > strong { font-size: 22px; }
  .clue-position {
    min-height: 44px;
    display: flex;
    align-items: center;
    margin: 8px 0 0;
    color: var(--blue-deep);
    font-family: var(--serif);
    font-size: 11px;
    letter-spacing: .2em;
  }
  .chapter-sentence { font-size: 27px; letter-spacing: .12em; }
  .scene img { min-height: 240px; object-fit: cover; }
  .space__notes blockquote { font-size: 28px; letter-spacing: .1em; }
  .finale h2 { font-size: 43px; letter-spacing: .1em; }
  .dialog-layout { display: block; }
  .dialog-media img { max-height: 59dvh; }
  .dialog-copy { padding: 28px 22px 44px; }
  .role-detail h2 { font-size: 36px; }
  .audio-toggle { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
