/* ============================================================
   唐 · 黄鹤楼 — UI / 开场 / 诗词 / 面板
   写实古风：墨青、宣纸、朱砂、鎏金
   ============================================================ */
:root {
  --ink-0: #080b0a;
  --ink-1: #0d1210;
  --ink-2: #121a16;
  --ink-3: #1b2620;
  --ink-4: #26352c;
  --paper: #e9dfc9;
  --paper-deep: #d8c9ab;
  --paper-shadow: #b7a17c;
  --gold: #c9a665;
  --gold-bright: #e5c98f;
  --gold-dim: #8d7448;
  --vermilion: #a83a2e;
  --vermilion-bright: #c6533e;
  --jade: #6f8b7c;
  --text: #ece3d1;
  --text-dim: #b9af9c;
  --text-faint: #847d70;
  --line: rgba(201, 166, 101, 0.28);
  --line-soft: rgba(201, 166, 101, 0.14);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --kai: "STKaiti", "KaiTi", "Kaiti SC", "KaiTi_GB2312", "Noto Serif SC", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 3px;
}

.game {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0a0e0c;
}

#webgl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#webgl:active { cursor: grabbing; }

.is-hidden { display: none !important; }
.is-invisible { opacity: 0 !important; pointer-events: none !important; }

/* ---------- 画面氛围层 ---------- */
.scene-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 46%, rgba(4, 7, 6, 0.34) 82%, rgba(2, 4, 3, 0.68) 100%),
    linear-gradient(180deg, rgba(5, 8, 7, 0.22), transparent 16%, transparent 78%, rgba(5, 8, 7, 0.34));
}
.scene-grain {
  position: absolute;
  inset: -25%;
  pointer-events: none;
  z-index: 3;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(3) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1.5%); }
  66% { transform: translate(1.5%, -1%); }
  100% { transform: translate(0, 0); }
}
.scene-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  background: #f0e8d6;
  transition: opacity 1.2s ease;
}
.scene-wash.is-on { opacity: 1; }

/* ---------- 通用文字 ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.9s ease;
}

.brand-block {
  position: absolute;
  top: 30px;
  left: 34px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
}
.brand-seal {
  width: 34px;
  height: 42px;
  border: 1px solid rgba(168, 58, 46, 0.9);
  background: rgba(117, 32, 24, 0.68);
  color: #eedcc1;
  font-family: var(--kai);
  font-size: 22px;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(238, 220, 193, 0.16);
}
.brand-title {
  font-family: var(--kai);
  font-size: 25px;
  letter-spacing: 0.24em;
  line-height: 1.1;
  color: #f0e5cf;
}
.brand-sub {
  margin-top: 7px;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(236, 227, 209, 0.54);
}

.hud-center-top {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.5));
}
.place-line {
  font-family: var(--kai);
  font-size: 17px;
  letter-spacing: 0.22em;
  color: #eee3ce;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.place-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.time-line {
  margin-top: 7px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(236, 227, 209, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.time-line i {
  display: block;
  width: 18px;
  height: 1px;
  background: rgba(201, 166, 101, 0.38);
}

.objective-card {
  position: absolute;
  top: 118px;
  left: 34px;
  width: 248px;
  padding: 15px 17px 13px;
  background: linear-gradient(135deg, rgba(10, 16, 13, 0.73), rgba(10, 16, 13, 0.42));
  border-left: 1px solid rgba(201, 166, 101, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.24);
}
.objective-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 54px; height: 1px;
  background: rgba(201, 166, 101, 0.55);
}
#objectiveText {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.72;
  letter-spacing: 0.06em;
  color: rgba(242, 234, 218, 0.92);
}
.objective-bar {
  margin-top: 12px;
  height: 2px;
  background: rgba(236, 227, 209, 0.11);
  overflow: hidden;
}
#objectiveProgress {
  display: block;
  width: 18%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 8px rgba(229, 201, 143, 0.5);
}

.hud-stats {
  position: absolute;
  top: 30px;
  right: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 17px;
  border: 1px solid rgba(201, 166, 101, 0.16);
  background: rgba(8, 13, 11, 0.36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.stat { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.stat-label {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.3em;
  color: rgba(236, 227, 209, 0.43);
}
.stat strong {
  font-family: var(--kai);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #ece1cc;
}
.stat strong em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 11px;
  color: rgba(236, 227, 209, 0.4);
  margin-left: 2px;
}
.stat-divider { width: 1px; height: 28px; background: rgba(201, 166, 101, 0.18); }

.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  opacity: 0.68;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.crosshair::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(242, 234, 218, 0.36);
  border-radius: 50%;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
.crosshair span {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(242, 234, 218, 0.9);
  box-shadow: 0 0 5px rgba(242, 234, 218, 0.6);
}
.crosshair.is-target::before {
  width: 24px;
  height: 24px;
  border-color: rgba(229, 201, 143, 0.85);
}
.crosshair.is-target { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }

.interact-prompt {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 11px;
  border: 1px solid rgba(201, 166, 101, 0.35);
  background: rgba(9, 14, 12, 0.75);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #f0e7d7;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  animation: promptIn 0.35s ease;
}
@keyframes promptIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.key-cap {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(229, 201, 143, 0.55);
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
  background: rgba(201, 166, 101, 0.08);
}

.controls-hint {
  position: absolute;
  left: 34px;
  bottom: 30px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  max-width: 48vw;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(236, 227, 209, 0.4);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.controls-hint b {
  font-weight: 500;
  color: rgba(236, 227, 209, 0.72);
  border: 1px solid rgba(236, 227, 209, 0.16);
  padding: 2px 5px;
  margin-right: 4px;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.toolbar {
  position: absolute;
  right: 34px;
  bottom: 28px;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.tool-btn {
  position: relative;
  width: 54px;
  height: 56px;
  border: 1px solid rgba(201, 166, 101, 0.18);
  background: rgba(9, 14, 12, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  color: rgba(236, 227, 209, 0.76);
}
.tool-btn:hover {
  background: rgba(32, 45, 37, 0.72);
  border-color: rgba(201, 166, 101, 0.55);
  transform: translateY(-2px);
  color: #f5ecdc;
}
.tool-icon {
  font-family: var(--kai);
  font-size: 18px;
  line-height: 1;
  color: var(--gold-bright);
}
.tool-label {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.16em;
}
.tool-btn.is-muted .tool-icon { color: rgba(236, 227, 209, 0.32); }
.tool-btn.is-muted::after {
  content: "";
  position: absolute;
  width: 25px; height: 1px;
  background: rgba(196, 94, 74, 0.8);
  transform: rotate(-38deg);
}

.mouse-hint {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: rgba(236, 227, 209, 0.62);
  padding: 8px 18px;
  background: rgba(9, 13, 11, 0.42);
  border: 1px solid rgba(201, 166, 101, 0.14);
  backdrop-filter: blur(4px);
  transition: opacity 0.5s ease;
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

.toast-layer {
  position: absolute;
  top: 160px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 45;
}
.toast {
  padding: 10px 22px;
  background: rgba(10, 16, 13, 0.83);
  border: 1px solid rgba(201, 166, 101, 0.32);
  color: #ede3d0;
  font-size: 12px;
  letter-spacing: 0.12em;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.34);
  animation: toastIn 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
  backdrop-filter: blur(6px);
}
.toast.is-out { animation: toastOut 0.45s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-7px); }
}

/* ---------- 穿越开场 ---------- */
.intro {
  position: absolute;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(85, 104, 82, 0.22), transparent 56%),
    radial-gradient(ellipse at 18% 80%, rgba(42, 62, 51, 0.3), transparent 45%),
    linear-gradient(180deg, rgba(9, 15, 12, 0.9) 0%, rgba(10, 17, 13, 0.67) 46%, rgba(6, 10, 8, 0.93) 100%);
  transition: opacity 1.2s ease, visibility 1.2s;
  backdrop-filter: saturate(0.84) brightness(0.92);
  -webkit-backdrop-filter: saturate(0.84) brightness(0.92);
}
.intro::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse at 62% 24%, rgba(207, 180, 126, 0.08), transparent 32%),
    radial-gradient(ellipse at 35% 62%, rgba(124, 145, 125, 0.1), transparent 40%);
  animation: introMist 18s ease-in-out infinite alternate;
}
@keyframes introMist {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 1.5%) scale(1.06); }
}
.intro.is-out { opacity: 0; visibility: hidden; }

.intro-modern {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2.4s ease;
  background: linear-gradient(180deg, #101d24 0%, #102027 44%, #080d0e 100%);
}
.intro-modern.is-on { opacity: 1; }
.modern-rain {
  position: absolute;
  inset: -20%;
  opacity: 0.24;
  background-image: repeating-linear-gradient(104deg, transparent 0 17px, rgba(211, 228, 227, 0.16) 18px 19px, transparent 20px 42px);
  background-size: 240px 240px;
  animation: rainFall 0.55s linear infinite;
}
@keyframes rainFall {
  from { transform: translate(0, -10%); }
  to { transform: translate(-55px, 10%); }
}
.modern-skyline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}
.modern-date {
  position: absolute;
  left: 50%;
  top: 23%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.45em;
  color: rgba(211, 224, 221, 0.66);
  white-space: nowrap;
}
.modern-hint {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  font-family: var(--kai);
  font-size: 16px;
  letter-spacing: 0.16em;
  color: rgba(218, 228, 223, 0.52);
  white-space: nowrap;
}

.intro-flash {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #f3ecdc;
  opacity: 0;
  pointer-events: none;
}
.intro-flash.is-flash { animation: flash 2.1s ease-out forwards; }
@keyframes flash {
  0% { opacity: 0; }
  16% { opacity: 0.92; }
  36% { opacity: 0.72; }
  100% { opacity: 0; }
}

.intro-past {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2s ease;
  background:
    radial-gradient(ellipse at 68% 33%, rgba(218, 179, 108, 0.24), transparent 24%),
    radial-gradient(ellipse at 50% 62%, rgba(82, 105, 87, 0.3), transparent 48%),
    linear-gradient(180deg, #18231e 0%, #25342b 42%, #0c110e 100%);
}
.intro-past.is-on { opacity: 1; }
.past-mist {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  background: rgba(202, 205, 186, 0.15);
}
.mist-a { width: 58vw; height: 17vh; left: -12%; top: 54%; animation: mistDrift 20s ease-in-out infinite alternate; }
.mist-b { width: 50vw; height: 13vh; right: -10%; top: 67%; animation: mistDrift 26s ease-in-out infinite alternate-reverse; }
@keyframes mistDrift {
  from { transform: translateX(-3%); opacity: 0.55; }
  to { transform: translateX(5%); opacity: 0.95; }
}
.past-sun {
  position: absolute;
  right: 19%;
  top: 24%;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 213, 155, 0.72), rgba(224, 177, 103, 0.25) 48%, transparent 70%);
  filter: blur(2px);
  box-shadow: 0 0 90px rgba(228, 185, 116, 0.22);
}
.past-mountains { position: absolute; inset: 0; width: 100%; height: 100%; }
.past-date {
  position: absolute;
  left: 50%;
  top: 29%;
  transform: translateX(-50%);
  font-family: var(--kai);
  font-size: clamp(22px, 3vw, 38px);
  letter-spacing: 0.28em;
  color: rgba(240, 228, 203, 0.9);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}
.past-sub {
  position: absolute;
  left: 50%;
  top: 39%;
  transform: translateX(-50%);
  font-family: var(--kai);
  font-size: 14px;
  letter-spacing: 0.32em;
  color: rgba(222, 211, 187, 0.55);
  white-space: nowrap;
}

.intro-title-wrap {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  gap: clamp(30px, 5vw, 76px);
  padding: 0 7vw;
  transition: opacity 1.1s ease, transform 1.4s ease;
}
.intro-title-wrap.is-out {
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
}
.title-vertical {
  writing-mode: vertical-rl;
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.6em;
  color: var(--vermilion-bright);
  border: 1px solid rgba(168, 58, 46, 0.6);
  padding: 12px 7px;
  margin-top: 27px;
  background: rgba(95, 30, 22, 0.14);
}
.title-main { text-align: center; }
.game-title {
  margin: 0;
  font-family: var(--kai);
  font-weight: 400;
  font-size: clamp(64px, 10vw, 138px);
  line-height: 0.96;
  letter-spacing: 0.12em;
  color: #eee2cb;
  text-shadow:
    0 2px 0 rgba(58, 39, 24, 0.22),
    0 14px 70px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(206, 174, 113, 0.08);
  display: flex;
  gap: 0.08em;
  justify-content: center;
}
.game-title span {
  display: inline-block;
  animation: titleFloat 7s ease-in-out infinite;
}
.game-title span:nth-child(2) { animation-delay: -2.3s; }
.game-title span:nth-child(3) { animation-delay: -4.6s; }
@keyframes titleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.game-subtitle {
  margin: 22px 0 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.52em;
  color: rgba(201, 166, 101, 0.8);
}
.title-rule {
  margin: 26px auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(360px, 80%);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(236, 227, 209, 0.35);
}
.title-rule i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 166, 101, 0.45));
}
.title-rule i:last-child { background: linear-gradient(90deg, rgba(201, 166, 101, 0.45), transparent); }
.game-intro-copy {
  margin: 0 0 32px;
  font-family: var(--kai);
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 2;
  letter-spacing: 0.12em;
  color: rgba(232, 221, 201, 0.6);
}
.title-poem {
  margin-top: 27px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  writing-mode: vertical-rl;
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(222, 207, 181, 0.42);
  line-height: 1.9;
}
.intro-skip {
  display: block;
  margin: 16px auto 0;
}

.btn {
  position: relative;
  border: 1px solid rgba(201, 166, 101, 0.5);
  background: transparent;
  cursor: pointer;
  padding: 13px 38px;
  min-width: 150px;
  transition: background 0.35s, border-color 0.35s, color 0.35s, transform 0.35s;
}
.btn:hover { transform: translateY(-2px); }
.btn-vermillion {
  border-color: rgba(190, 72, 53, 0.75);
  background: linear-gradient(180deg, rgba(126, 39, 29, 0.76), rgba(91, 27, 21, 0.8));
  color: #f1e2c9;
  box-shadow: 0 10px 36px rgba(67, 15, 10, 0.34), inset 0 0 22px rgba(238, 200, 150, 0.04);
}
.btn-vermillion:hover {
  background: linear-gradient(180deg, rgba(151, 49, 36, 0.9), rgba(108, 32, 25, 0.92));
  border-color: rgba(229, 201, 143, 0.7);
}
.btn-ink {
  border-color: rgba(201, 166, 101, 0.38);
  background: rgba(201, 166, 101, 0.06);
  color: rgba(236, 227, 209, 0.82);
  padding: 10px 26px;
  min-width: 100px;
}
.btn-ink:hover { background: rgba(201, 166, 101, 0.14); color: #f5ecdc; }
.start-btn { padding: 11px 46px 12px; display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.btn-en { font-family: var(--sans); font-size: 7px; letter-spacing: 0.32em; opacity: 0.5; }
.btn-cn { font-family: var(--kai); font-size: 21px; letter-spacing: 0.32em; margin-left: 0.18em; }
.text-btn {
  border: 0;
  background: none;
  padding: 6px 10px;
  color: rgba(236, 227, 209, 0.36);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: color 0.3s;
}
.text-btn:hover { color: rgba(229, 201, 143, 0.8); }

.intro-cinematic {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.intro-cinematic.is-on { opacity: 1; }
.cinema-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 9vh;
  background: #050706;
  transform: scaleY(0);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cinema-bar.top { top: 0; transform-origin: top; }
.cinema-bar.bottom { bottom: 0; transform-origin: bottom; }
.intro-cinematic.is-on .cinema-bar { transform: scaleY(1); }
.cinema-line {
  position: absolute;
  left: 50%;
  bottom: 21%;
  transform: translateX(-50%);
  font-family: var(--kai);
  font-size: clamp(16px, 2vw, 24px);
  letter-spacing: 0.26em;
  color: rgba(238, 228, 209, 0.88);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.8s ease;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.cinema-line.is-on { opacity: 1; }
.cinema-skip {
  position: absolute;
  right: 5vw;
  bottom: 4vh;
  z-index: 3;
  pointer-events: auto;
  border: 1px solid rgba(236, 227, 209, 0.2);
  background: rgba(6, 9, 8, 0.36);
  color: rgba(236, 227, 209, 0.58);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  padding: 6px 13px;
  cursor: pointer;
}
.cinema-skip:hover { color: #eee4d3; border-color: rgba(201, 166, 101, 0.5); }

/* ---------- 舞台遮罩 ---------- */
.stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(9, 14, 11, 0.22), rgba(3, 6, 4, 0.72) 70%),
    rgba(3, 6, 5, 0.42);
  backdrop-filter: blur(9px) saturate(0.9);
  -webkit-backdrop-filter: blur(9px) saturate(0.9);
  animation: overlayIn 0.5s ease;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 对话 ---------- */
.dialogue-stage { align-items: flex-end; }
.dialogue-panel {
  width: min(840px, 94vw);
  margin-bottom: 3vh;
  border: 1px solid rgba(201, 166, 101, 0.28);
  background:
    linear-gradient(180deg, rgba(13, 20, 16, 0.94), rgba(8, 13, 10, 0.97));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(229, 201, 143, 0.08);
  position: relative;
  animation: panelUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes panelUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.dialogue-panel::before, .dialogue-panel::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(201, 166, 101, 0.42);
  border-style: solid;
  pointer-events: none;
}
.dialogue-panel::before { left: -1px; top: -1px; border-width: 1px 0 0 1px; }
.dialogue-panel::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }
.speaker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 25px 14px;
  border-bottom: 1px solid rgba(201, 166, 101, 0.13);
}
.speaker-seal {
  width: 48px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 166, 101, 0.35);
  background: radial-gradient(circle at 50% 35%, rgba(79, 102, 82, 0.6), rgba(21, 33, 26, 0.8));
  color: var(--gold-bright);
  font-family: var(--kai);
  font-size: 28px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25);
}
.speaker-name {
  font-family: var(--kai);
  font-size: 23px;
  letter-spacing: 0.14em;
  color: #f1e4cd;
}
.speaker-title {
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(236, 227, 209, 0.42);
}
.dialogue-body {
  padding: 22px 30px 15px;
  min-height: 116px;
}
#dialogueText {
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 2.05;
  letter-spacing: 0.08em;
  color: #ebe0cb;
  min-height: 58px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  transition: opacity 0.16s ease;
}
.dialogue-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
.choice-btn {
  border: 1px solid rgba(201, 166, 101, 0.3);
  background: rgba(201, 166, 101, 0.05);
  color: rgba(236, 227, 209, 0.8);
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 8px 17px;
  cursor: pointer;
  transition: all 0.3s;
}
.choice-btn:hover { border-color: rgba(229, 201, 143, 0.7); background: rgba(201, 166, 101, 0.12); color: #f4ebda; }
.dialogue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 25px 14px;
  border-top: 1px solid rgba(201, 166, 101, 0.1);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(236, 227, 209, 0.36);
}
.dialogue-footer b { color: var(--gold); font-weight: 500; }
.mini-btn {
  border: 1px solid rgba(201, 166, 101, 0.26);
  background: transparent;
  color: rgba(236, 227, 209, 0.68);
  padding: 6px 15px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.3s;
}
.mini-btn:hover { border-color: rgba(229, 201, 143, 0.65); color: #f2e8d6; background: rgba(201, 166, 101, 0.08); }

/* ---------- 诵诗 ---------- */
.poem-stage {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(70, 91, 75, 0.24), transparent 53%),
    rgba(4, 7, 5, 0.82);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  padding: 2.5vh 3vw;
}
.poem-mist {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 22% 70%, rgba(202, 208, 190, 0.09), transparent 34%),
    radial-gradient(ellipse at 82% 28%, rgba(220, 195, 148, 0.08), transparent 28%);
  animation: poemMist 14s ease-in-out infinite alternate;
}
@keyframes poemMist {
  from { opacity: 0.6; transform: translateX(-1%); }
  to { opacity: 1; transform: translateX(1.5%); }
}
.poem-scroll {
  position: relative;
  width: min(920px, 94vw);
  max-height: 92vh;
  padding: clamp(28px, 4vw, 48px) clamp(28px, 5vw, 72px) 24px;
  background:
    linear-gradient(90deg, rgba(83, 65, 39, 0.11), transparent 7%, transparent 93%, rgba(83, 65, 39, 0.11)),
    radial-gradient(ellipse at 50% 10%, rgba(255, 249, 234, 0.9), transparent 65%),
    linear-gradient(180deg, #e7dbc2, #dfd1b5 52%, #d6c5a5);
  box-shadow:
    0 35px 110px rgba(0, 0, 0, 0.62),
    inset 0 0 130px rgba(108, 84, 47, 0.15),
    inset 0 0 28px rgba(255, 251, 240, 0.3);
  color: #28251e;
  border-top: 2px solid rgba(105, 79, 42, 0.45);
  border-bottom: 2px solid rgba(105, 79, 42, 0.4);
  animation: scrollOpen 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden auto;
}
@keyframes scrollOpen {
  from { opacity: 0; transform: scaleY(0.88) translateY(10px); }
  to { opacity: 1; transform: scaleY(1) translateY(0); }
}
.poem-scroll::before, .poem-scroll::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105, 79, 42, 0.3), transparent);
}
.poem-scroll::before { top: 15px; }
.poem-scroll::after { bottom: 15px; }
.poem-head { text-align: center; position: relative; }
.poem-author-line {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.36em;
  color: rgba(61, 53, 40, 0.55);
}
.poem-head h2 {
  margin: 8px 0 6px;
  font-family: var(--kai);
  font-weight: 400;
  font-size: clamp(35px, 4.6vw, 54px);
  letter-spacing: 0.28em;
  color: #29241c;
  text-shadow: 0 1px 0 rgba(255, 252, 243, 0.5);
  margin-left: 0.28em;
}
.poem-author-sub {
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(61, 53, 40, 0.54);
}
.poem-lines {
  margin: clamp(20px, 3.6vh, 38px) auto clamp(17px, 2.8vh, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 18px);
  align-items: center;
  min-height: 210px;
}
.poem-couplet {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15em 1.2em;
  font-family: var(--kai);
  font-size: clamp(21px, 3.05vw, 38px);
  line-height: 1.5;
  letter-spacing: 0.16em;
  color: rgba(46, 41, 31, 0.28);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s ease, color 0.9s ease, transform 0.9s ease, text-shadow 0.9s ease;
  filter: blur(1.2px);
}
.poem-couplet.is-visible { opacity: 1; transform: translateY(0); filter: blur(0); }
.poem-couplet.is-active {
  color: #201d17;
  filter: blur(0);
  text-shadow: 0 0 30px rgba(138, 99, 42, 0.18);
}
.poem-couplet.is-done { color: rgba(79, 62, 34, 0.67); filter: blur(0); }
.poem-couplet .verse { white-space: nowrap; }
.poem-couplet.is-active .verse:last-child::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--vermilion);
  margin-left: 0.35em;
  vertical-align: 0.12em;
  box-shadow: 0 0 8px rgba(168, 58, 46, 0.5);
}
.poem-notes {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0 4px;
  border-top: 1px solid rgba(84, 67, 42, 0.18);
  font-family: var(--kai);
  font-size: 12px;
  line-height: 1.8;
  color: rgba(61, 53, 40, 0.6);
}
.notes-label {
  flex: 0 0 auto;
  color: var(--vermilion);
  font-size: 10px;
  letter-spacing: 0.2em;
  border: 1px solid rgba(168, 58, 46, 0.35);
  padding: 1px 6px;
}
.poem-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.recite-state {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: rgba(61, 53, 40, 0.55);
}
.sound-wave { display: inline-flex; align-items: center; gap: 2px; height: 12px; }
.sound-wave i {
  display: block;
  width: 2px;
  height: 5px;
  background: var(--vermilion);
  opacity: 0.75;
  animation: wave 1.1s ease-in-out infinite;
}
.sound-wave i:nth-child(2) { animation-delay: -0.18s; }
.sound-wave i:nth-child(3) { animation-delay: -0.36s; }
.sound-wave i:nth-child(4) { animation-delay: -0.54s; }
.sound-wave i:nth-child(5) { animation-delay: -0.72s; }
@keyframes wave {
  0%, 100% { height: 4px; opacity: 0.45; }
  50% { height: 12px; opacity: 0.9; }
}
.recite-state.is-paused .sound-wave i { animation-play-state: paused; opacity: 0.28; }
.poem-actions { display: flex; gap: 8px; }
.poem-actions .mini-btn { border-color: rgba(72, 57, 35, 0.25); color: rgba(53, 45, 32, 0.7); }
.poem-actions .mini-btn:hover { background: rgba(75, 57, 31, 0.07); border-color: rgba(72, 57, 35, 0.5); color: #211d16; }

/* ---------- 文化卡片 ---------- */
.lore-card {
  position: relative;
  width: min(690px, 92vw);
  max-height: 88vh;
  overflow: hidden auto;
  padding: clamp(28px, 4vw, 46px) clamp(28px, 5vw, 58px) 26px;
  background:
    radial-gradient(ellipse at 85% 8%, rgba(255, 251, 239, 0.8), transparent 38%),
    linear-gradient(150deg, #e7dcc5, #d9c9ab);
  color: #2d2921;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55), inset 0 0 100px rgba(110, 86, 48, 0.12);
  border-top: 2px solid rgba(105, 79, 42, 0.42);
  border-bottom: 2px solid rgba(105, 79, 42, 0.35);
  animation: panelUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lore-watermark {
  position: absolute;
  right: 15px;
  top: -14px;
  font-family: var(--kai);
  font-size: 170px;
  line-height: 1;
  color: rgba(96, 73, 39, 0.055);
  pointer-events: none;
}
.lore-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: rgba(61, 53, 40, 0.55);
}
.lore-topline i { width: 30px; height: 1px; background: rgba(105, 79, 42, 0.28); }
.lore-card h2 {
  margin: 13px 0 13px;
  font-family: var(--kai);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: 0.14em;
  color: #27231b;
}
.lore-rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(105, 79, 42, 0.35), transparent 72%);
  margin-bottom: 20px;
}
.lore-card p {
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 2.05;
  letter-spacing: 0.05em;
  color: rgba(43, 38, 29, 0.9);
  white-space: pre-line;
}
.lore-quote {
  margin-top: 22px;
  padding: 13px 0 13px 18px;
  border-left: 2px solid rgba(168, 58, 46, 0.55);
  font-family: var(--kai);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: rgba(76, 57, 36, 0.78);
}
.lore-quote:empty { display: none; }
.lore-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid rgba(105, 79, 42, 0.17);
}
.lore-collected {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(76, 57, 36, 0.5);
}
.lore-footer .mini-btn { border-color: rgba(72, 57, 35, 0.28); color: rgba(53, 45, 32, 0.72); }
.lore-footer .mini-btn:hover { background: rgba(75, 57, 31, 0.08); color: #211d16; }

/* ---------- 设置 / 手札 / 帮助 ---------- */
.settings-card, .journal-card, .help-card {
  width: min(620px, 94vw);
  max-height: 90vh;
  overflow: hidden auto;
  padding: 28px 34px 22px;
  border: 1px solid rgba(201, 166, 101, 0.28);
  background: linear-gradient(160deg, rgba(17, 27, 21, 0.97), rgba(8, 13, 10, 0.98));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(229, 201, 143, 0.07);
  animation: panelUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.journal-card { width: min(880px, 94vw); }
.help-card { width: min(760px, 94vw); }
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.panel-heading h2 {
  margin: 8px 0 0;
  font-family: var(--kai);
  font-weight: 400;
  font-size: 31px;
  letter-spacing: 0.14em;
  color: #f0e3cd;
}
.icon-close {
  border: 0;
  background: transparent;
  color: rgba(236, 227, 209, 0.38);
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
}
.icon-close:hover { color: var(--gold-bright); transform: rotate(90deg); }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid rgba(201, 166, 101, 0.11);
}
.master-row { border-top: 1px solid rgba(201, 166, 101, 0.24); }
.setting-copy { display: flex; flex-direction: column; gap: 4px; }
.setting-copy span { font-size: 14px; letter-spacing: 0.08em; color: rgba(240, 232, 216, 0.9); }
.setting-copy small { font-family: var(--sans); font-size: 9px; letter-spacing: 0.08em; color: rgba(236, 227, 209, 0.36); }
.switch {
  width: 45px;
  height: 23px;
  border-radius: 20px;
  border: 1px solid rgba(201, 166, 101, 0.25);
  background: rgba(236, 227, 209, 0.06);
  position: relative;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  flex: 0 0 auto;
}
.switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(236, 227, 209, 0.48);
  transition: transform 0.3s, background 0.3s;
}
.switch.is-on { background: rgba(201, 166, 101, 0.19); border-color: rgba(201, 166, 101, 0.55); }
.switch.is-on span { transform: translateX(21px); background: var(--gold-bright); box-shadow: 0 0 8px rgba(229, 201, 143, 0.4); }
.volume-group { padding: 4px 0 9px; }
.volume-row {
  display: grid;
  grid-template-columns: 78px 1fr 34px;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
}
.volume-label { font-size: 12px; letter-spacing: 0.08em; color: rgba(236, 227, 209, 0.7); }
.volume-row output {
  font-family: var(--sans);
  font-size: 9px;
  color: rgba(201, 166, 101, 0.65);
  text-align: right;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--gold) var(--fill, 50%), rgba(236, 227, 209, 0.13) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 1px solid rgba(60, 44, 25, 0.5);
  box-shadow: 0 0 8px rgba(229, 201, 143, 0.3);
}
input[type="range"]::-moz-range-track { height: 2px; background: rgba(236, 227, 209, 0.14); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--gold); }
input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px; border: 1px solid rgba(60, 44, 25, 0.5);
  border-radius: 50%; background: var(--gold-bright);
}
.voice-row { opacity: 0.65; }
.audio-note {
  margin-top: 12px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: rgba(236, 227, 209, 0.34);
  background: rgba(201, 166, 101, 0.04);
  border-left: 1px solid rgba(201, 166, 101, 0.25);
}
.panel-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 166, 101, 0.13);
}

.journal-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
}
.journal-grid h3 {
  margin: 0 0 13px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--gold);
}
.journal-quests { list-style: none; margin: 0; padding: 0; }
.journal-quests li {
  position: relative;
  padding: 9px 0 9px 23px;
  font-family: var(--kai);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(236, 227, 209, 0.45);
  border-bottom: 1px dashed rgba(201, 166, 101, 0.1);
}
.journal-quests li::before {
  content: "○";
  position: absolute;
  left: 0; top: 8px;
  color: rgba(201, 166, 101, 0.4);
  font-size: 11px;
}
.journal-quests li.is-done { color: rgba(229, 201, 143, 0.8); }
.journal-quests li.is-done::before { content: "●"; color: var(--gold-bright); }
.journal-lore {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.lore-chip {
  border: 1px solid rgba(201, 166, 101, 0.18);
  background: rgba(201, 166, 101, 0.04);
  color: rgba(236, 227, 209, 0.28);
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 10px;
}
.lore-chip.is-found { color: rgba(230, 209, 171, 0.9); border-color: rgba(201, 166, 101, 0.42); background: rgba(201, 166, 101, 0.09); }
.journal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 166, 101, 0.13);
}
#journalStats { font-family: var(--sans); font-size: 9px; letter-spacing: 0.18em; color: rgba(236, 227, 209, 0.4); }

.help-columns { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 32px; }
.key-list { display: flex; flex-direction: column; gap: 7px; }
.key-list > div { display: flex; align-items: center; gap: 7px; min-height: 32px; border-bottom: 1px dashed rgba(201, 166, 101, 0.1); }
.key-list kbd {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 25px;
  padding: 0 6px;
  border: 1px solid rgba(201, 166, 101, 0.25);
  background: rgba(201, 166, 101, 0.05);
  font-family: var(--sans);
  font-size: 9px;
  color: rgba(229, 201, 143, 0.8);
  border-radius: 2px;
}
.key-list span { margin-left: 7px; font-size: 12px; letter-spacing: 0.06em; color: rgba(236, 227, 209, 0.62); }
.help-copy p {
  margin: 0 0 14px;
  font-family: var(--kai);
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: 0.04em;
  color: rgba(236, 227, 209, 0.68);
}
.help-copy .help-tip { color: rgba(201, 166, 101, 0.64); font-size: 12px; padding-top: 8px; border-top: 1px solid rgba(201, 166, 101, 0.12); }

/* ---------- 暂停 ---------- */
.pause-stage {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 5, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.pause-card {
  text-align: center;
  padding: 32px 44px;
  border: 1px solid rgba(201, 166, 101, 0.24);
  background: rgba(9, 15, 11, 0.86);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
}
.pause-card h2 { margin: 10px 0 8px; font-family: var(--kai); font-weight: 400; font-size: 28px; letter-spacing: 0.16em; }
.pause-card p { margin: 0 0 22px; font-family: var(--sans); font-size: 10px; letter-spacing: 0.08em; color: rgba(236, 227, 209, 0.44); }

/* ---------- 终章 ---------- */
.ending-stage {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 5, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ending-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(187, 147, 82, 0.13), transparent 40%),
    radial-gradient(ellipse at 30% 70%, rgba(88, 110, 91, 0.15), transparent 42%);
}
.ending-card {
  position: relative;
  text-align: center;
  width: min(720px, 92vw);
  padding: clamp(34px, 5vw, 58px) clamp(25px, 5vw, 68px);
  border-top: 1px solid rgba(201, 166, 101, 0.36);
  border-bottom: 1px solid rgba(201, 166, 101, 0.3);
  background: linear-gradient(180deg, rgba(16, 25, 19, 0.9), rgba(8, 13, 10, 0.95));
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.6);
  animation: panelUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ending-stamp {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(168, 58, 46, 0.85);
  background: rgba(117, 32, 24, 0.55);
  color: #f0dfc2;
  font-family: var(--kai);
  font-size: 25px;
}
.ending-card h2 {
  margin: 13px 0 20px;
  font-family: var(--kai);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: 0.16em;
  color: #f0e4d0;
}
.ending-poem {
  margin: 0 0 18px;
  font-family: var(--kai);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 2;
  letter-spacing: 0.12em;
  color: rgba(229, 201, 143, 0.84);
}
.ending-copy {
  margin: 0 auto 18px;
  max-width: 500px;
  font-family: var(--kai);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.05em;
  color: rgba(236, 227, 209, 0.62);
}
.ending-stats {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(236, 227, 209, 0.36);
  padding: 13px 0 20px;
}
.ending-actions { display: flex; justify-content: center; gap: 10px; }

/* ---------- 载入 / 提示 ---------- */
.loading {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(49, 70, 57, 0.34), transparent 52%),
    #080c0a;
  transition: opacity 1s ease, visibility 1s;
}
.loading.is-out { opacity: 0; visibility: hidden; }
.loading-mark {
  width: 54px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 166, 101, 0.42);
  color: var(--gold-bright);
  font-family: var(--kai);
  font-size: 31px;
  background: rgba(102, 34, 25, 0.2);
  box-shadow: inset 0 0 26px rgba(201, 166, 101, 0.06);
  animation: loadingMark 2.8s ease-in-out infinite;
}
@keyframes loadingMark {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; box-shadow: inset 0 0 36px rgba(201, 166, 101, 0.15), 0 0 30px rgba(201, 166, 101, 0.06); }
}
.loading-title {
  margin: 21px 0 20px;
  font-family: var(--kai);
  font-size: 17px;
  letter-spacing: 0.65em;
  color: rgba(236, 227, 209, 0.7);
  padding-left: 0.65em;
}
.loading-line { width: 160px; height: 1px; background: rgba(236, 227, 209, 0.11); overflow: hidden; }
#loadingBar { display: block; height: 100%; width: 3%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); transition: width 0.35s ease; }
.loading-copy {
  margin-top: 17px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(236, 227, 209, 0.34);
}

.rotate-hint {
  position: absolute;
  inset: 0;
  z-index: 190;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #080c0a;
  color: rgba(236, 227, 209, 0.66);
}
.rotate-icon { font-size: 44px; color: var(--gold); transform: rotate(-90deg); animation: rotatePhone 2.4s ease-in-out infinite; }
.rotate-hint p { font-family: var(--sans); font-size: 11px; letter-spacing: 0.13em; }
@keyframes rotatePhone {
  0%, 100% { transform: rotate(-90deg); }
  50% { transform: rotate(0deg); }
}
.error-banner {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 300;
  padding: 11px 22px;
  border: 1px solid rgba(176, 63, 45, 0.6);
  background: rgba(51, 15, 11, 0.92);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #f0cfc4;
  max-width: 80vw;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .brand-block { top: 22px; left: 22px; }
  .hud-stats { top: 22px; right: 22px; }
  .objective-card { top: 104px; left: 22px; width: 230px; }
  .controls-hint { left: 22px; bottom: 22px; max-width: 65vw; }
  .toolbar { right: 22px; bottom: 20px; }
  .title-poem { display: none; }
  .intro-title-wrap { padding: 0 5vw; }
  .journal-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 720px) {
  .brand-sub, .controls-hint, .hud-center-top { display: none; }
  .objective-card { width: min(250px, 68vw); }
  .hud-stats { padding: 8px 11px; gap: 10px; }
  .stat strong { font-size: 15px; }
  .tool-btn { width: 43px; height: 49px; }
  .tool-label { display: none; }
  .game-title { font-size: clamp(48px, 17vw, 88px); }
  .title-vertical { display: none; }
  .intro-title-wrap { display: block; }
  .start-btn { min-width: 138px; }
  .poem-scroll { padding: 24px 22px 18px; }
  .poem-couplet { font-size: 20px; gap: 0.1em 0.6em; }
  .poem-notes { font-size: 10px; }
  .dialogue-body { padding: 18px 20px 12px; }
  .dialogue-footer { padding: 9px 18px 11px; }
  .speaker { padding: 13px 18px 11px; }
  .speaker-name { font-size: 19px; }
  .settings-card, .journal-card, .help-card, .lore-card { padding: 23px 20px 18px; max-height: 92vh; }
  .help-columns { grid-template-columns: 1fr; gap: 18px; }
  .volume-row { grid-template-columns: 64px 1fr 30px; gap: 8px; }
  .journal-footer { flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
  .ending-actions { flex-direction: column; }
  .cinema-skip { bottom: 12vh; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .rotate-hint.is-hidden { display: none; }
}
@media (pointer: coarse) {
  .mouse-hint { font-size: 9px; letter-spacing: 0.16em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- 长江泛舟 HUD ---------- */
.boat-hud {
  position: absolute;
  right: 22px;
  left: auto;
  bottom: 96px;
  transform: none;
  width: min(310px, calc(100vw - 40px));
  padding: 13px 17px 12px;
  background:
    linear-gradient(180deg, rgba(12, 18, 15, 0.9), rgba(7, 11, 9, 0.94)),
    radial-gradient(ellipse at 50% 0%, rgba(201, 166, 101, 0.16), transparent 60%);
  border: 1px solid rgba(201, 166, 101, 0.32);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(229, 201, 143, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  pointer-events: none;
  z-index: 8;
}
.boat-hud::before, .boat-hud::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(201, 166, 101, 0.42), transparent);
}
.boat-hud::before { left: 6px; }
.boat-hud::after { right: 6px; }
.boat-eyebrow {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 7px;
}
.boat-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(201, 166, 101, 0.16);
}
.boat-main span {
  font-family: var(--kai);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.boat-main strong {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  white-space: nowrap;
}
.boat-dock-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.boat-dock-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-dim);
  box-shadow: 0 0 8px rgba(201, 166, 101, 0.4);
}
.boat-hud.is-near-dock .boat-dock-dot {
  background: var(--gold-bright);
  box-shadow: 0 0 12px rgba(229, 201, 143, 0.8);
}
.boat-hud.is-near-dock .boat-dock-line { color: var(--gold-bright); }
.boat-controls {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--text-faint);
}
@media (max-width: 720px) {
  .boat-hud { right: 12px; bottom: 82px; padding: 10px 14px 9px; }
  .boat-controls { font-size: 8px; }
  .boat-main span { font-size: 13px; }
}

/* ============================================================
   千年黄鹤楼 · 连续航线 / 时代标识 / 小地图
   ============================================================ */

.era-banner {
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  min-width: 300px;
  padding: 9px 30px 8px;
  text-align: center;
  pointer-events: none;
  color: #f1e5c9;
  background: linear-gradient(90deg, rgba(8, 12, 10, 0.12), rgba(8, 12, 10, 0.62) 18%, rgba(8, 12, 10, 0.62) 82%, rgba(8, 12, 10, 0.12));
  border-top: 1px solid rgba(214, 183, 128, 0.25);
  border-bottom: 1px solid rgba(214, 183, 128, 0.2);
  letter-spacing: 0.12em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.era-banner-year { font-size: 12px; letter-spacing: 0.32em; color: rgba(224, 203, 164, 0.78); }
.era-banner-name { margin-top: 3px; font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; font-size: 30px; line-height: 1.12; font-weight: 600; letter-spacing: 0.18em; }
.era-banner-rule { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 5px; font-size: 9px; letter-spacing: 0.28em; color: rgba(218, 198, 163, 0.52); }
.era-banner-rule i { display: block; width: 36px; height: 1px; background: rgba(218, 198, 163, 0.32); }

.route-progress {
  position: absolute;
  top: 112px;
  right: 24px;
  width: 318px;
  z-index: 24;
  padding: 11px 13px 10px;
  background: rgba(8, 12, 10, 0.58);
  border: 1px solid rgba(213, 185, 132, 0.2);
  border-radius: 3px;
  backdrop-filter: blur(7px);
  color: rgba(232, 218, 190, 0.8);
  pointer-events: none;
}
.route-progress-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; letter-spacing: 0.22em; color: rgba(220, 200, 160, 0.65); }
.route-progress-head b { font-size: 13px; letter-spacing: 0.12em; color: #ead9b3; font-weight: 500; }
.route-progress-track { position: relative; height: 3px; margin: 8px 0; background: rgba(218, 195, 152, 0.16); overflow: hidden; }
#routeProgressFill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, rgba(190, 145, 80, 0.55), #dfbd7f); transition: width 0.7s ease; }
.route-progress-nodes { display: flex; justify-content: space-between; }
.route-node { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(228, 214, 184, 0.42); font-size: 9px; letter-spacing: 0.08em; }
.route-node i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(219, 193, 145, 0.42); background: rgba(8, 12, 10, 0.6); transition: 0.4s; }
.route-node.is-past { color: rgba(225, 209, 177, 0.7); }
.route-node.is-past i { background: rgba(183, 145, 82, 0.58); border-color: rgba(218, 184, 119, 0.8); }
.route-node.is-current { color: #f2dfb7; }
.route-node.is-current i { background: #e7c37e; border-color: #f7e0ae; box-shadow: 0 0 10px rgba(231, 195, 126, 0.75); transform: scale(1.35); }
.route-node.is-future { opacity: 0.46; }

.route-minimap {
  position: absolute;
  left: 24px;
  bottom: 70px;
  width: 410px;
  z-index: 23;
  padding: 10px 13px 8px;
  background: linear-gradient(90deg, rgba(8, 12, 10, 0.62), rgba(8, 12, 10, 0.42));
  border: 1px solid rgba(213, 185, 132, 0.17);
  border-radius: 3px;
  color: rgba(232, 218, 190, 0.8);
  pointer-events: none;
}
.route-minimap-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 9px; letter-spacing: 0.24em; color: rgba(220, 200, 160, 0.55); }
.route-minimap-head b { font-size: 11px; letter-spacing: 0.1em; color: rgba(238, 219, 181, 0.86); font-weight: 500; }
.route-minimap-body { position: relative; height: 72px; margin-top: 3px; }
.route-minimap-river { position: absolute; left: 0; right: 0; top: 4px; width: 100%; height: 56px; color: rgba(183, 200, 181, 0.85); }
.route-minimap-stops { position: absolute; left: 2%; right: 2%; top: 30px; display: flex; justify-content: space-between; }
.route-stop { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(230, 217, 188, 0.48); font-size: 9px; letter-spacing: 0.08em; }
.route-stop i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid rgba(218, 194, 148, 0.5); background: rgba(8, 12, 10, 0.7); }
.route-stop.is-past { color: rgba(230, 215, 184, 0.7); }
.route-stop.is-past i { background: rgba(185, 148, 86, 0.7); }
.route-stop.is-current { color: #f0d9a9; }
.route-stop.is-current i { background: #e5bf78; box-shadow: 0 0 8px rgba(229, 191, 120, 0.7); transform: scale(1.4); }
.route-stop.is-future { opacity: 0.45; }
.minimap-boat { position: absolute; top: 3px; left: 7%; transform: translateX(-50%); font-size: 13px; color: #f2d394; text-shadow: 0 0 8px rgba(241, 195, 111, 0.8); transition: left 0.5s ease; }

.loading-scene {
  position: absolute;
  inset: 0;
  background: url("../docs/preview/sanguo_loading.png") center 42% / cover no-repeat;
  filter: saturate(0.72) brightness(0.64);
  transform: scale(1.04);
  animation: loadingScene 18s ease-out both;
}
.loading-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(10, 14, 12, 0.05), rgba(7, 10, 8, 0.78) 75%), linear-gradient(to bottom, rgba(7, 10, 8, 0.45), rgba(7, 10, 8, 0.2) 45%, rgba(7, 10, 8, 0.9)); }
.loading-mark, .loading-title, .loading-subtitle, .loading-line, .loading-copy { position: relative; z-index: 2; }
.loading-subtitle { margin-top: 8px; font-size: 10px; letter-spacing: 0.26em; color: rgba(228, 212, 180, 0.55); }
@keyframes loadingScene { from { transform: scale(1.1); } to { transform: scale(1.0); } }

.intro-sanguo-bg {
  position: absolute;
  inset: 0;
  background: url("../docs/preview/sanguo_loading.png") center 42% / cover no-repeat;
  filter: saturate(0.7) brightness(0.46) contrast(1.05);
  transform: scale(1.02);
}
.intro-sanguo-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(6, 9, 8, 0.55), rgba(6, 9, 8, 0.12) 48%, rgba(6, 9, 8, 0.82)); }
.intro-modern { display: none !important; }
.intro-past { background: transparent; }
.intro-past .past-mountains { display: none; }
.intro-flash { display: none; }
.game-title { font-size: clamp(36px, 5.6vw, 74px); letter-spacing: 0.04em; }
.game-title span:nth-child(4) { animation-delay: -1.1s; }
.game-title span:nth-child(5) { animation-delay: -3.4s; }
.game-subtitle { letter-spacing: 0.16em; font-size: clamp(10px, 1.2vw, 14px); }
.hud.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-title-wrap { display: block; text-align: center; padding: 0 5vw; }
.title-vertical { display: none; }
.title-poem { display: none; }
.past-date, .past-sub { display: none; }
.game-title { justify-content: center; }
.title-main { max-width: 980px; margin: 0 auto; }

@media (max-width: 900px) {
  .route-progress { display: none; }
  .route-minimap { left: 12px; bottom: 58px; width: min(72vw, 360px); }
  .era-banner { top: 56px; padding-left: 18px; padding-right: 18px; min-width: 0; width: min(88vw, 420px); }
  .era-banner-name { font-size: 22px; }
  .route-minimap-head { font-size: 8px; }
}

/* ---------- 朝代快速跳转 / 云雾过渡 ---------- */
.era-jump-panel {
  position: absolute;
  top: 196px;
  right: 24px;
  z-index: 27;
  width: 208px;
  pointer-events: auto;
  color: rgba(236, 223, 197, 0.88);
  background: linear-gradient(180deg, rgba(9, 14, 12, 0.86), rgba(7, 11, 9, 0.92));
  border: 1px solid rgba(211, 180, 123, 0.28);
  border-radius: 3px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(229, 201, 143, 0.08);
  backdrop-filter: blur(8px);
}
.era-jump-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.era-jump-seal {
  display: grid;
  place-items: center;
  width: 26px;
  height: 28px;
  border: 1px solid rgba(167, 62, 48, 0.8);
  color: #d88668;
  font-family: var(--kai);
  font-size: 16px;
  background: rgba(96, 31, 22, 0.24);
}
.era-jump-toggle-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.era-jump-toggle-copy b { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; }
.era-jump-toggle-copy small { font-size: 8px; letter-spacing: 0.08em; color: rgba(218, 200, 166, 0.5); }
.era-jump-chevron { font-size: 14px; color: rgba(221, 190, 133, 0.7); transition: transform 0.3s; }
.era-jump-panel.is-open .era-jump-chevron { transform: rotate(180deg); }
.era-jump-list { display: none; padding: 0 8px 9px; border-top: 1px solid rgba(211, 180, 123, 0.13); }
.era-jump-panel.is-open .era-jump-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.era-jump-head, .era-jump-note { grid-column: 1 / -1; }
.era-jump-head { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 3px 5px; font-size: 9px; letter-spacing: 0.2em; color: rgba(220, 199, 160, 0.56); }
.era-jump-head small { font-size: 8px; letter-spacing: 0.06em; color: rgba(218, 200, 166, 0.38); }
.era-jump-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 4px 3px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(231, 217, 190, 0.72);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s ease;
}
.era-jump-btn:hover { background: rgba(214, 181, 119, 0.08); border-color: rgba(214, 181, 119, 0.2); color: #f4e7cb; }
.era-jump-btn i { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(195, 161, 104, 0.35); border-radius: 50%; font-family: var(--kai); font-size: 11px; font-style: normal; color: rgba(231, 207, 165, 0.75); }
.era-jump-btn span { font-size: 11px; letter-spacing: 0.12em; }
.era-jump-btn em { display: none; }
.era-jump-btn.is-current { border-color: rgba(220, 183, 117, 0.22); background: rgba(220, 183, 117, 0.07); color: #f5e4bf; }
.era-jump-btn.is-current i { border-color: rgba(238, 203, 139, 0.75); color: #f1d198; box-shadow: 0 0 10px rgba(221, 183, 112, 0.25); }
.era-jump-note { display: none; padding: 8px 3px 0; font-size: 8px; line-height: 1.5; letter-spacing: 0.04em; color: rgba(220, 202, 170, 0.35); }

.travel-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 52%, rgba(210, 218, 202, 0.16), rgba(10, 18, 15, 0.72) 72%);
}
.travel-overlay.is-on { opacity: 1; visibility: visible; }
.travel-cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.5;
  background: radial-gradient(circle, rgba(224, 227, 211, 0.55), rgba(190, 202, 190, 0.22) 48%, transparent 72%);
}
.travel-cloud.cloud-a { width: 70vw; height: 54vh; left: -16%; top: 8%; animation: travelDrift 5.2s ease-in-out infinite alternate; }
.travel-cloud.cloud-b { width: 62vw; height: 46vh; right: -12%; bottom: 2%; animation: travelDrift 6.4s ease-in-out infinite alternate-reverse; }
.travel-cloud.cloud-c { width: 42vw; height: 34vh; left: 30%; top: 32%; opacity: 0.42; filter: blur(36px); animation: travelBreath 3.6s ease-in-out infinite; }
.travel-copy { position: relative; z-index: 2; text-align: center; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75); }
.travel-eyebrow { display: block; font-size: 9px; letter-spacing: 0.36em; color: rgba(231, 218, 192, 0.62); }
.travel-copy strong { display: block; margin: 9px 0 7px; font-family: var(--kai); font-size: clamp(24px, 3.4vw, 38px); font-weight: 400; letter-spacing: 0.16em; color: #f1e3c7; }
.travel-copy small { display: block; font-size: 10px; letter-spacing: 0.16em; color: rgba(225, 214, 190, 0.48); }
@keyframes travelDrift { from { transform: translate3d(-3%, 0, 0) scale(0.98); } to { transform: translate3d(4%, 2%, 0) scale(1.05); } }
@keyframes travelBreath { 0%, 100% { opacity: 0.3; transform: scale(0.96); } 50% { opacity: 0.6; transform: scale(1.06); } }

@media (max-width: 900px) {
  .era-jump-panel { top: 150px; right: 12px; width: min(200px, 54vw); }
}

/* Desktop composition: more space for the river and architecture. */
.scene-vignette { background: radial-gradient(ellipse at 50% 48%, transparent 58%, rgba(11,25,27,.22) 100%); }
.scene-grain { opacity: .018; animation: none; }
.route-progress { display: none; }
.era-banner {
  top: 82px;
  min-width: 332px;
  padding: 11px 34px 10px;
  color: #fff6df;
  background: rgba(10, 28, 26, .88);
  border: 1px solid rgba(238, 198, 108, .82);
  box-shadow: 0 7px 24px rgba(0, 0, 0, .52), inset 0 0 0 1px rgba(255, 244, 204, .12);
  backdrop-filter: blur(7px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.era-banner-year { color: #ffe2a2; font-weight: 700; }
.era-banner-name { color: #fff8e8; text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }
.era-banner-rule { color: #f5d593; }
.era-banner-rule i { background: rgba(245, 213, 147, .72); }
.era-banner.is-faded { opacity: .78; transform: translate(-50%, -5px); }
.era-jump-panel { top: 102px; width: 195px; background: rgba(17,35,37,.72); box-shadow: 0 8px 30px rgba(0,0,0,.16); }
.objective-card { max-width: 246px; background: linear-gradient(90deg,rgba(16,34,35,.64),rgba(16,34,35,.25)); }
#objectiveText { font-size: 12px; line-height: 1.9; }
.route-minimap { width: 340px; bottom: 76px; background: rgba(16,34,35,.55); border-radius: 6px; }
.route-minimap-body { height: 57px; }
.boat-hud { width: 270px; bottom: 94px; padding: 10px 14px; background: rgba(16,34,35,.65); box-shadow: 0 8px 26px rgba(0,0,0,.15); }
.brand-sub { opacity: .7; }
.settings-card { max-height: 88vh; overflow-y: auto; width: min(620px, 90vw); }
.desktop-preferences { margin-top: 20px; border-top: 1px solid rgba(120,110,80,.2); padding-top: 12px; }
.desktop-preferences h3 { font-size: 15px; letter-spacing: .2em; margin-bottom: 12px; }
.desktop-preferences label { display: flex; align-items: center; gap: 15px; justify-content: space-between; padding: 8px 0; font-size: 13px; }
.desktop-preferences select { border: 1px solid #9f967b; background: #e9e4d6; color: #304443; padding: 5px 14px; border-radius: 4px; }
.desktop-preferences input[type=range] { width: 45%; margin-left: auto; }
.desktop-preferences input[type=checkbox] { width: 17px; height: 17px; accent-color: #507a70; }
.desktop-preferences output { min-width: 32px; }
.desktop-preferences p { font-size: 11px; opacity: .65; margin-top: 10px; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
@media (max-height: 650px) { .route-minimap { bottom: 65px; width: 290px; } .objective-card { top: 94px; } .boat-controls { display: none; } .era-banner-name { font-size: 23px; } }
