@charset "UTF-8";

/* ==================================================================
   呼吸之间 · 视觉系统
   深夜诊室般的墨绿底色，温热的纸张，铜金色与珊瑚色作为呼吸的标记。
   ================================================================== */

:root {
  --ink: #07191a;
  --ink-2: #0b2424;
  --ink-3: #123230;
  --ink-4: #193d39;
  --paper: #f4efe3;
  --paper-2: #e9e1d2;
  --paper-3: #ddd2bf;
  --muted: #a7b7b0;
  --muted-dark: #657a72;
  --gold: #e2b976;
  --gold-soft: #cdae7e;
  --coral: #e07d66;
  --coral-soft: #f0a28f;
  --sage: #9fc5b0;
  --sage-deep: #5d8d78;
  --line: rgba(233, 225, 210, 0.14);
  --line-strong: rgba(233, 225, 210, 0.28);
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-pad: clamp(20px, 5vw, 76px);
  --max: 1480px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 800px at 82% 4%, rgba(40, 83, 75, 0.33), transparent 62%),
    radial-gradient(900px 720px at 8% 84%, rgba(128, 64, 48, 0.15), transparent 64%),
    linear-gradient(145deg, #061718 0%, #081d1d 48%, #061515 100%);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: var(--coral);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p,
blockquote,
ul {
  margin: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ------------------------------------------------------------------
   环境层
   ------------------------------------------------------------------ */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.ambient-orb-a {
  top: -16vh;
  right: -6vw;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, rgba(50, 103, 92, 0.36), transparent 68%);
  animation: drift 24s var(--ease) infinite alternate;
}

.ambient-orb-b {
  bottom: -24vh;
  left: -12vw;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(150, 82, 61, 0.2), transparent 70%);
  animation: drift 30s var(--ease) infinite alternate-reverse;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(226, 185, 118, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 185, 118, 0.035) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(ellipse 78% 68% at 50% 42%, black 0%, transparent 100%);
}

.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.campaign-watermark {
  position: fixed;
  top: 50%;
  right: clamp(22px, 2vw, 28px);
  z-index: 45;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  color: rgba(226, 185, 118, 0.42);
  font-family: var(--serif);
  font-size: clamp(12px, 1.35vw, 19px);
  font-weight: 500;
  letter-spacing: 0.36em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(226, 185, 118, 0.16);
  pointer-events: none;
  user-select: none;
}

/* ------------------------------------------------------------------
   顶栏
   ------------------------------------------------------------------ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 82px;
  padding: 0 var(--page-pad);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 22, 23, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.campaign-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 30px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid rgba(226, 185, 118, 0.4);
  background: rgba(226, 185, 118, 0.055);
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

.campaign-chip-mark {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border: 1px solid rgba(224, 125, 102, 0.8);
  transform: rotate(45deg);
}

.campaign-chip-mark::before,
.campaign-chip-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--coral);
  transform: translate(-50%, -50%);
}

.campaign-chip-mark::before {
  width: 5px;
  height: 1px;
}

.campaign-chip-mark::after {
  width: 1px;
  height: 5px;
}

.campaign-stamp {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  margin-bottom: 24px;
  padding: 8px 13px 8px 9px;
  border: 1px solid rgba(226, 185, 118, 0.34);
  background: linear-gradient(100deg, rgba(226, 185, 118, 0.09), rgba(224, 125, 102, 0.035));
}

.campaign-stamp-cross {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(224, 125, 102, 0.55);
  color: var(--coral-soft);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1;
}

.campaign-stamp-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.campaign-stamp-copy strong {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.campaign-stamp-copy small {
  color: #83988e;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 0;
  color: var(--paper);
  text-align: left;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  color: var(--gold);
  transition: border-color 0.25s ease, transform 0.25s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-4deg);
  border-color: var(--gold);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.18em;
  line-height: 1.2;
}

.brand-text small {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn,
.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover,
.sound-btn:hover {
  color: var(--paper);
  border-color: var(--line-strong);
  background: rgba(244, 239, 227, 0.04);
}

.ghost-btn svg {
  width: 17px;
  height: 17px;
}

.mini-count {
  padding: 1px 5px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  border: 1px solid rgba(226, 185, 118, 0.28);
}

.sound-btn {
  gap: 10px;
}

.sound-bars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.sound-bars i {
  display: block;
  width: 2px;
  height: 5px;
  background: currentColor;
  transition: height 0.2s ease;
}

.sound-bars i:nth-child(2) {
  height: 11px;
}

.sound-bars i:nth-child(3) {
  height: 8px;
}

.sound-btn[aria-pressed="true"] {
  color: var(--gold);
  border-color: rgba(226, 185, 118, 0.36);
}

.sound-btn[aria-pressed="true"] .sound-bars i {
  animation: soundBar 1.1s ease-in-out infinite alternate;
}

.sound-btn[aria-pressed="true"] .sound-bars i:nth-child(2) {
  animation-delay: 0.15s;
}

.sound-btn[aria-pressed="true"] .sound-bars i:nth-child(3) {
  animation-delay: 0.3s;
}

/* ------------------------------------------------------------------
   首页
   ------------------------------------------------------------------ */

.screen {
  position: relative;
  z-index: 1;
}

.home-screen {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr);
  align-items: center;
  gap: clamp(24px, 5vw, 84px);
  min-height: calc(100vh - 82px);
  padding: clamp(48px, 8vh, 92px) 0 clamp(36px, 6vh, 70px);
}

.home-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow-line {
  display: inline-block;
  width: 38px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.display {
  display: flex;
  flex-direction: column;
  gap: 0.17em;
  margin: 22px 0 28px;
  font-family: var(--serif);
  font-size: clamp(4.8rem, 9.8vw, 9.6rem);
  font-weight: 500;
  letter-spacing: -0.09em;
  line-height: 0.94;
}

.display span:first-child {
  color: var(--paper);
}

.display-outline {
  padding-left: 0.24em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 239, 227, 0.56);
  text-shadow: 0 0 44px rgba(226, 185, 118, 0.08);
}

.lede {
  max-width: 620px;
  color: #c9d3cc;
  font-family: var(--serif);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 2;
  letter-spacing: 0.02em;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 54px;
  padding: 0 22px;
  text-decoration: none;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s var(--ease);
}

.primary-btn {
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.primary-btn:hover {
  background: var(--gold);
  transform: translateY(-2px);
}

.btn-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(7, 25, 26, 0.22);
  font-family: var(--mono);
  font-size: 15px;
}

.secondary-btn {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-align: left;
}

.secondary-btn small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.secondary-btn:hover {
  border-color: var(--gold);
  background: rgba(226, 185, 118, 0.06);
  transform: translateY(-2px);
}

.primary-btn-small {
  min-height: 46px;
  padding: 0 20px;
}

.home-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(38px, 6vh, 64px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px 15px 0;
}

.meta-item + .meta-item {
  padding-left: clamp(12px, 1.6vw, 24px);
  border-left: 1px solid var(--line);
}

.meta-item strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.meta-item span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.meta-collection strong {
  color: var(--gold);
}

.home-note {
  margin-top: 22px;
  color: #788c84;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

/* 主视觉 */

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(480px, 62vh, 660px);
}

.art-rings {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(48vw, 500px);
  height: min(48vw, 500px);
  transform: translate(-50%, -50%);
}

.art-rings span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(226, 185, 118, 0.12);
  border-radius: 50%;
  animation: breatheRing 7s var(--ease) infinite;
}

.art-rings span:nth-child(2) {
  inset: 9%;
  animation-delay: 0.8s;
}

.art-rings span:nth-child(3) {
  inset: 19%;
  animation-delay: 1.6s;
}

.lung-art {
  position: relative;
  z-index: 2;
  width: min(100%, 470px);
  max-height: 620px;
  filter: drop-shadow(0 24px 70px rgba(0, 0, 0, 0.34));
}

.lung-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawLung 2.8s var(--ease) 0.35s forwards;
}

.lung-line-right {
  animation-delay: 0.55s;
}

.art-dashed {
  transform-origin: 220px 286px;
  animation: rotateSlow 80s linear infinite;
}

.art-crosshair {
  position: absolute;
  z-index: 1;
  width: 34px;
  height: 34px;
  opacity: 0.6;
}

.art-crosshair::before,
.art-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(226, 185, 118, 0.42);
}

.art-crosshair::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.art-crosshair::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

.art-crosshair-a {
  top: 18%;
  left: 9%;
}

.art-crosshair-b {
  right: 9%;
  bottom: 21%;
}

.art-readout {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 9px 11px;
  border: 1px solid rgba(226, 185, 118, 0.2);
  background: rgba(6, 22, 23, 0.58);
  backdrop-filter: blur(8px);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.art-readout span {
  color: var(--muted);
  font-size: 8px;
}

.art-readout strong {
  font-size: 15px;
  font-weight: 500;
}

.art-readout em {
  color: var(--muted);
  font-style: normal;
  font-size: 8px;
}

.art-readout-a {
  top: 24%;
  right: 3%;
}

.art-readout-b {
  bottom: 25%;
  left: 1%;
}

.art-caption {
  position: absolute;
  bottom: 2%;
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: 90%;
  transform: translateX(-50%);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

/* 首页下半部分 */

.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(32px, 6vw, 100px);
  padding: clamp(40px, 7vh, 80px) 0;
  border-top: 1px solid var(--line);
}

.section-kicker {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.manifesto-grid article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.manifesto-grid .num {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.manifesto-grid h3 {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.manifesto-grid p {
  color: #91a39b;
  font-size: 12px;
  line-height: 1.9;
}

.mini-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 20px;
}

.mini-ending {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: #70857c;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.mini-ending i {
  display: block;
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.mini-ending.is-found {
  border-color: rgba(226, 185, 118, 0.25);
  color: var(--paper);
  background: rgba(226, 185, 118, 0.04);
}

.mini-ending.is-found i {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(226, 185, 118, 0.7);
}

.aside-quote {
  margin-top: 28px;
  color: #c3cec7;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.9;
}

.aside-source {
  display: block;
  margin-top: 8px;
  color: var(--muted-dark);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: #61756c;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

/* ------------------------------------------------------------------
   游戏界面
   ------------------------------------------------------------------ */

.game-screen {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 4vh, 46px) var(--page-pad) 80px;
}

.game-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.game-chapter {
  margin-top: 7px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 26px);
  letter-spacing: 0.03em;
}

.game-head-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ghost-btn-small {
  min-height: 34px;
  font-size: 10px;
}

.text-btn {
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-decoration-color: rgba(167, 183, 176, 0.3);
  text-underline-offset: 5px;
  transition: color 0.2s ease;
}

.text-btn:hover {
  color: var(--paper);
}

.chapter-rail {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 30px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.chapter-rail::-webkit-scrollbar {
  display: none;
}

.rail-step {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #536960;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.rail-step::after {
  content: "";
  width: 22px;
  height: 1px;
  margin: 0 8px;
  background: var(--line);
}

.rail-step:last-child::after {
  display: none;
}

.rail-dot {
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.rail-step.is-done {
  color: var(--gold-soft);
}

.rail-step.is-done .rail-dot {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.rail-step.is-current {
  color: var(--paper);
}

.rail-step.is-current .rail-dot {
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(224, 125, 102, 0.14);
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  align-items: start;
  gap: clamp(24px, 3.4vw, 48px);
}

/* 剧情卡 */

.scene-card {
  position: relative;
  min-height: 660px;
  padding: clamp(26px, 4.2vw, 58px) clamp(24px, 4.8vw, 66px) clamp(30px, 4vw, 54px);
  overflow: hidden;
  scroll-margin-top: 96px;
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(255, 255, 255, 0.44), transparent 60%),
    linear-gradient(180deg, #f8f3e8 0%, #f1e9db 100%);
  color: #18302d;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.scene-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--gold), transparent 86%);
}

.scene-card::after,
.ending-main::after {
  content: "AI防痨、健康同行";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  transform: translate(-50%, -50%) rotate(-24deg);
  color: rgba(24, 48, 45, 0.07);
  -webkit-text-stroke: 1px rgba(24, 48, 45, 0.1);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.2vw, 5.2rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.scene-card > *,
.ending-main > * {
  position: relative;
  z-index: 1;
}

.scene-card.is-changing {
  animation: cardOut 0.2s ease forwards;
}

.scene-card.is-entering {
  animation: cardIn 0.55s var(--ease) both;
}

.scene-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(24, 48, 45, 0.15);
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-act {
  display: flex;
  align-items: center;
  gap: 9px;
}

.scene-act .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--coral);
}

.scene-place {
  text-align: right;
}

.scene-title {
  max-width: 760px;
  margin: 25px 0 22px;
  color: #142a27;
  font-family: var(--serif);
  font-size: clamp(32px, 4.3vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.scene-copy {
  max-width: 720px;
  color: #314d47;
  font-family: var(--serif);
  font-size: clamp(15px, 1.25vw, 17.5px);
  line-height: 2.05;
}

.scene-copy p + p {
  margin-top: 13px;
}

.scene-copy p:first-child::first-letter {
  float: left;
  margin: 8px 7px 0 0;
  color: var(--coral);
  font-size: 3.6em;
  line-height: 0.72;
}

.scene-quote {
  position: relative;
  margin: 26px 0 24px;
  padding: 13px 0 13px 19px;
  border-left: 2px solid var(--coral);
  color: #2b4841;
}

.scene-quote cite {
  display: block;
  margin-bottom: 3px;
  color: #8b6b4d;
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.18em;
}

.scene-quote p {
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.8;
}

.scene-quote p::before {
  content: "“";
  color: var(--coral);
}

.scene-quote p::after {
  content: "”";
  color: var(--coral);
}

.choice-block {
  max-width: 760px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(24, 48, 45, 0.15);
}

.prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #6b7d74;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prompt::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.choices {
  display: grid;
  gap: 9px;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(24, 48, 45, 0.16);
  background: rgba(255, 255, 255, 0.35);
  color: #203e38;
  text-align: left;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s var(--ease);
}

.choice:hover {
  transform: translateX(4px);
  border-color: #203e38;
  background: #17332e;
  color: var(--paper);
}

.choice:disabled {
  cursor: default;
  opacity: 0.55;
}

.choice-key {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0.7;
}

.choice-text {
  font-family: var(--serif);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.75;
}

.choice-arrow {
  font-family: var(--mono);
  font-size: 13px;
  opacity: 0.55;
  transition: transform 0.22s var(--ease);
}

.choice:hover .choice-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

.choice.is-picked {
  border-color: var(--coral);
  background: #17332e;
  color: var(--paper);
}

/* 选择结果 */

.outcome-view {
  animation: outcomeIn 0.45s var(--ease) both;
}

.outcome-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(24, 48, 45, 0.15);
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.outcome-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.outcome-dot.tone-good {
  background: var(--sage-deep);
}

.outcome-dot.tone-bad {
  background: var(--coral);
}

.outcome-dot.tone-warn {
  background: var(--gold);
}

.outcome-title {
  margin: 26px 0 18px;
  color: #142a27;
  font-family: var(--serif);
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 500;
  line-height: 1.22;
}

.outcome-text {
  max-width: 690px;
  color: #36524b;
  font-family: var(--serif);
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 2;
}

.delta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.delta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(24, 48, 45, 0.14);
  color: #5c7068;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.delta-chip b {
  font-weight: 600;
}

.delta-chip.is-up {
  border-color: rgba(93, 141, 120, 0.38);
  color: #3f6b57;
}

.delta-chip.is-down {
  border-color: rgba(224, 125, 102, 0.4);
  color: #a94e3d;
}

.tip-callout {
  position: relative;
  margin-top: 30px;
  padding: 18px 20px 18px 22px;
  border: 1px solid rgba(24, 48, 45, 0.14);
  background: rgba(255, 255, 255, 0.34);
}

.tip-callout::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 3px;
  background: var(--gold);
}

.tip-callout-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #8b6b4d;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.tip-callout h4 {
  margin: 0 0 4px;
  color: #233f38;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.tip-callout p {
  color: #4d655d;
  font-size: 12px;
  line-height: 1.8;
}

.outcome-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}

.continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-height: 50px;
  padding: 0 18px;
  background: #17332e;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, transform 0.2s var(--ease);
}

.continue-btn:hover {
  background: #264b42;
  transform: translateY(-2px);
}

.continue-btn span:last-child {
  color: var(--gold);
}

.outcome-note {
  color: #7a8c83;
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* 侧栏 */

.side-panel {
  position: sticky;
  top: 106px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-card,
.side-note {
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(9, 31, 31, 0.62);
  backdrop-filter: blur(14px);
}

.status-head,
.side-note-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.status-head h2,
.side-note-head h2 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.status-head span,
.side-note-head span {
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.stat + .stat {
  margin-top: 16px;
}

.stat-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}

.stat-label span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.stat-label strong {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.meter {
  height: 4px;
  overflow: hidden;
  background: rgba(244, 239, 227, 0.1);
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  transition: width 0.75s var(--ease), background 0.3s ease;
}

.stat-health .meter i {
  background: var(--sage);
}

.stat-knowledge .meter i {
  background: var(--gold);
}

.stat-risk .meter i {
  background: var(--coral);
}

.risk-note {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #71877d;
  font-size: 10px;
  line-height: 1.75;
}

.risk-note.is-high {
  color: var(--coral-soft);
}

.latest-tips {
  display: grid;
  gap: 9px;
}

.latest-tip {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.latest-tip:first-child {
  padding-top: 0;
  border-top: 0;
}

.latest-tip span {
  display: block;
  margin-bottom: 2px;
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.latest-tip p {
  color: #b9c7bf;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.7;
}

.empty-note {
  color: #6f857b;
  font-size: 11px;
  line-height: 1.8;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--gold-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: left;
}

.link-btn:hover {
  color: var(--paper);
}

.restart-link {
  align-self: flex-start;
  margin-top: 2px;
  color: #6d8278;
  font-size: 10px;
}

/* ------------------------------------------------------------------
   结局
   ------------------------------------------------------------------ */

.ending-screen {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(42px, 7vh, 84px) var(--page-pad) 70px;
}

.ending-hero {
  position: relative;
  max-width: 980px;
  margin: 0 auto clamp(42px, 6vh, 70px);
  text-align: center;
}

.ending-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.ending-kicker .eyebrow-line {
  width: 24px;
}

.ending-hero h2 {
  margin: 17px 0 15px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
  animation: titleIn 0.8s var(--ease) both;
}

.ending-subtitle {
  max-width: 640px;
  margin: 0 auto;
  color: #b9c7bf;
  font-family: var(--serif);
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.9;
}

.ending-badge {
  display: inline-block;
  margin-top: 20px;
  padding: 5px 12px;
  border: 1px solid rgba(226, 185, 118, 0.3);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.ending-screen[data-tone="warn"] .ending-badge {
  border-color: rgba(226, 185, 118, 0.3);
  color: var(--gold);
}

.ending-screen[data-tone="bad"] .ending-badge {
  border-color: rgba(224, 125, 102, 0.38);
  color: var(--coral-soft);
}

.ending-screen[data-tone="bad"] .ending-kicker {
  color: var(--coral-soft);
}

.ending-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: start;
  gap: clamp(24px, 4vw, 54px);
}

.ending-main {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 50px);
  background:
    radial-gradient(600px 320px at 100% 0%, rgba(255, 255, 255, 0.4), transparent 60%),
    var(--paper);
  color: #203a35;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.25);
}

.ending-description {
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 2.05;
}

.ending-description p + p {
  margin-top: 14px;
}

.ending-quote {
  margin: 30px 0;
  padding: 16px 0 16px 22px;
  border-left: 2px solid var(--coral);
  color: #74513e;
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 25px);
  line-height: 1.7;
}

.ending-quote::before {
  content: "“";
  color: var(--coral);
}

.ending-quote::after {
  content: "”";
  color: var(--coral);
}

.medical-panel,
.advice-panel {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(32, 58, 53, 0.15);
}

.panel-kicker {
  margin-bottom: 8px;
  color: #8b6b4d;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.medical-panel p:last-child {
  color: #3f5b53;
  font-size: 12px;
  line-height: 1.9;
}

.advice-panel ul {
  padding: 0;
  list-style: none;
}

.advice-panel li {
  position: relative;
  padding-left: 17px;
  color: #3f5b53;
  font-size: 12px;
  line-height: 1.85;
}

.advice-panel li + li {
  margin-top: 7px;
}

.advice-panel li::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 0;
  width: 6px;
  height: 1px;
  background: var(--coral);
}

.ending-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.score-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(9, 31, 31, 0.62);
}

.grade-seal {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  border: 1px solid rgba(226, 185, 118, 0.4);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  box-shadow: inset 0 0 30px rgba(226, 185, 118, 0.07);
}

.score-copy {
  display: flex;
  flex-direction: column;
}

.score-copy span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.score-copy strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.score-copy p {
  color: var(--gold-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.run-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}

.run-stats div {
  padding: 13px 14px;
}

.run-stats div + div {
  border-left: 1px solid var(--line);
}

.run-stats span {
  display: block;
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.run-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
}

.collection-panel,
.leaderboard-panel {
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(9, 31, 31, 0.5);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.07em;
}

.panel-head span {
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.ending-collection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.collection-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  color: #61766c;
  font-size: 9px;
  line-height: 1.3;
}

.collection-item i {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.collection-item.is-found {
  border-color: rgba(226, 185, 118, 0.22);
  color: #c6d1ca;
}

.collection-item.is-found i {
  background: var(--gold);
}

.collection-item.is-current {
  background: rgba(226, 185, 118, 0.08);
  color: var(--gold);
  border-color: rgba(226, 185, 118, 0.45);
}

.score-form {
  display: flex;
  gap: 6px;
}

.score-form input {
  min-width: 0;
  flex: 1;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: rgba(244, 239, 227, 0.04);
  color: var(--paper);
  font-size: 11px;
}

.score-form input::placeholder {
  color: #5e746a;
}

.score-form input:focus {
  border-color: var(--gold);
}

.small-btn {
  min-width: 58px;
  height: 38px;
  padding: 0 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: background 0.2s ease;
}

.small-btn:hover {
  background: var(--gold);
}

.small-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.form-note {
  margin-top: 7px;
  color: #5f756b;
  font-size: 8px;
  line-height: 1.6;
}

.leaderboard-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.leader-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.leader-rank {
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 8px;
}

.leader-name {
  overflow: hidden;
  color: #b9c7bf;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-score {
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.leader-row.is-self .leader-name {
  color: var(--gold);
}

.trail-section {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(9, 31, 31, 0.42);
}

.trail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.trail-item {
  flex: 0 0 188px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 239, 227, 0.02);
}

.trail-item span {
  display: block;
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.trail-item h4 {
  margin: 5px 0 4px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
}

.trail-item p {
  display: -webkit-box;
  overflow: hidden;
  color: #7c9187;
  font-size: 9px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.trail-item.is-bad {
  border-color: rgba(224, 125, 102, 0.18);
}

.ending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.ending-actions .primary-btn {
  min-height: 50px;
}

.ending-actions .secondary-btn {
  min-height: 50px;
}

.ending-disclaimer {
  max-width: 880px;
  margin-top: 30px;
  color: #5d7268;
  font-size: 9px;
  line-height: 1.8;
}

.ending-disclaimer strong {
  color: var(--gold-soft);
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------
   弹窗
   ------------------------------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 11, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.25s ease both;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(226, 185, 118, 0.18);
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(255, 255, 255, 0.04), transparent 60%),
    #0b2424;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  animation: modalIn 0.42s var(--ease) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 185, 118, 0.3) transparent;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 21px;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.modal-close:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.notebook-progress {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.notebook-progress span {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.notebook-track {
  height: 3px;
  flex: 1;
  background: rgba(244, 239, 227, 0.08);
}

.notebook-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 0.6s var(--ease);
}

.notebook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.note-card {
  position: relative;
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(244, 239, 227, 0.025);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.note-card.is-unlocked {
  border-color: rgba(226, 185, 118, 0.24);
  background: rgba(226, 185, 118, 0.035);
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.note-category {
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.note-state {
  color: #5f746a;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.note-card.is-unlocked .note-state {
  color: var(--sage);
}

.note-card h3 {
  margin-bottom: 5px;
  color: #d8e1db;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.note-card p {
  color: #8fa299;
  font-size: 11px;
  line-height: 1.8;
}

.note-card.is-unlocked p {
  color: #b4c3ba;
}

.notebook-foot {
  margin-top: 18px;
  color: #5f746a;
  font-size: 9px;
  line-height: 1.7;
}

.confirm-panel {
  width: min(100%, 430px);
}

.confirm-panel h2 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.confirm-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}

.confirm-actions .secondary-btn {
  min-height: 44px;
  font-size: 11px;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 300;
  max-width: min(90vw, 460px);
  padding: 10px 16px;
  transform: translate(-50%, 16px);
  border: 1px solid rgba(226, 185, 118, 0.28);
  background: #0d2928;
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

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

/* ------------------------------------------------------------------
   动画
   ------------------------------------------------------------------ */

.reveal {
  opacity: 1;
  animation: fadeUp 0.9s var(--ease) var(--delay, 0s) forwards;
}

@keyframes fadeUp {
  from {
    transform: translateY(18px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translateY(16px);
    letter-spacing: 0.04em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -0.06em;
  }
}

@keyframes breatheRing {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.035);
    opacity: 1;
  }
}

@keyframes drawLung {
  to { stroke-dashoffset: 0; }
}

@keyframes rotateSlow {
  to { transform: rotate(360deg); }
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

@keyframes soundBar {
  from { height: 4px; }
  to { height: 13px; }
}

@keyframes cardOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

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

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

/* ------------------------------------------------------------------
   响应式
   ------------------------------------------------------------------ */

@media (max-width: 1180px) {
  .game-grid {
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 24px;
  }

  .scene-card {
    padding-left: clamp(24px, 3.6vw, 46px);
    padding-right: clamp(24px, 3.6vw, 46px);
  }

  .side-panel {
    top: 96px;
  }
}

@media (max-width: 980px) {
  .campaign-chip {
    padding: 0 8px;
    font-size: 8px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 54px;
  }

  .home-copy {
    max-width: 820px;
  }

  .display {
    font-size: clamp(5rem, 16vw, 9rem);
  }

  .hero-art {
    min-height: 480px;
    width: min(100%, 540px);
    margin: 0 auto;
  }

  .art-rings {
    width: min(74vw, 470px);
    height: min(74vw, 470px);
  }

  .home-lower {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .side-panel {
    position: static;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 14px;
  }

  .side-panel .restart-link {
    grid-column: 1 / -1;
  }

  .status-card {
    grid-row: span 2;
  }

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

  .ending-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .score-card {
    grid-column: 1 / -1;
  }

  .leaderboard-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .campaign-watermark {
    display: none;
  }

  :root {
    --page-pad: 18px;
  }

  .masthead {
    height: 66px;
    gap: 8px;
  }

  .campaign-chip {
    height: 28px;
    gap: 5px;
    padding: 0 7px;
    font-size: 8px;
    letter-spacing: 0.04em;
  }

  .campaign-stamp {
    margin-bottom: 20px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-text {
    font-size: 15px;
    letter-spacing: 0.12em;
  }

  .brand-text small {
    font-size: 6px;
  }

  .sound-label {
    display: none;
  }

  .sound-btn {
    padding: 0 10px;
  }

  .ghost-btn {
    padding: 0 9px;
    font-size: 10px;
  }

  .mini-count {
    display: none;
  }

  .home-screen {
    padding-top: 0;
  }

  .home-hero {
    padding-top: 42px;
    gap: 12px;
  }

  .display {
    font-size: clamp(4.4rem, 21vw, 7rem);
    line-height: 0.98;
    gap: 0.24em;
    margin-top: 18px;
    margin-bottom: 22px;
  }

  .lede {
    font-size: 14px;
    line-height: 1.95;
  }

  .home-actions {
    margin-top: 26px;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
    min-height: 50px;
  }

  .home-meta {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 34px;
  }

  .meta-item:nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .meta-item:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .hero-art {
    min-height: 390px;
    margin-top: 8px;
  }

  .lung-art {
    width: min(88vw, 350px);
  }

  .art-readout-a {
    right: 0;
  }

  .art-readout-b {
    left: 0;
  }

  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-footer {
    flex-direction: column;
    gap: 7px;
  }

  .game-screen {
    padding-top: 22px;
  }

  .game-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .game-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .chapter-rail {
    margin-bottom: 18px;
  }

  .scene-card {
    min-height: 0;
    padding: 24px 20px 30px;
  }

  .scene-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .scene-place {
    text-align: left;
  }

  .scene-title {
    margin: 20px 0 17px;
    font-size: clamp(28px, 9.2vw, 38px);
  }

  .scene-copy {
    font-size: 15px;
    line-height: 1.95;
  }

  .scene-quote {
    margin: 21px 0;
  }

  .choice {
    grid-template-columns: 27px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 13px 12px;
  }

  .choice-key {
    width: 26px;
    height: 26px;
  }

  .choice-text {
    font-size: 14px;
  }

  .outcome-title {
    font-size: 29px;
  }

  .outcome-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .status-card {
    grid-row: auto;
  }

  .ending-screen {
    padding-top: 38px;
  }

  .ending-hero {
    margin-bottom: 32px;
    text-align: left;
  }

  .ending-kicker {
    justify-content: flex-start;
  }

  .ending-subtitle {
    margin: 0;
  }

  .ending-hero h2 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .ending-main {
    padding: 24px 20px;
  }

  .ending-side {
    grid-template-columns: 1fr;
  }

  .score-card,
  .leaderboard-panel {
    grid-column: auto;
  }

  .ending-actions .primary-btn,
  .ending-actions .secondary-btn {
    width: 100%;
  }

  .trail-section {
    padding: 18px;
  }

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

  .modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: 92vh;
    padding: 22px 18px;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .primary-btn,
  .confirm-actions .secondary-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .campaign-chip {
    gap: 5px;
    padding: 0 6px;
    font-size: 8px;
  }

  .campaign-chip-mark {
    width: 9px;
    height: 9px;
  }

  .sound-btn {
    padding: 0 8px;
  }

  .brand-text small {
    display: none;
  }

  .ghost-btn span:not(.mini-count) {
    display: none;
  }

  .home-meta {
    grid-template-columns: 1fr 1fr;
  }

  .ending-collection {
    grid-template-columns: 1fr;
  }

  .run-stats {
    grid-template-columns: 1fr;
  }

  .run-stats div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 360px) {
  .brand-text {
    display: none;
  }
}

@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;
  }

  .reveal {
    opacity: 1;
  }

  .lung-line {
    stroke-dashoffset: 0;
  }
}
