:root {
  color-scheme: light;
  --ink: #102f35;
  --ink-soft: #365c61;
  --paper: #efe7d3;
  --paper-deep: #d8c9a7;
  --cinnabar: #a23c31;
  --cyan: #75d5d2;
  --gold: #cfad64;
  --shadow: 0 28px 80px rgba(7, 24, 27, 0.24);
  font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #0b2429; }
button { font: inherit; }
body { min-width: 320px; color: var(--ink); }
.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; }
.music-toggle { position: fixed; z-index: 40; top: 18px; right: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; color: #fff8e8; background: rgba(8,34,39,.84); box-shadow: 0 10px 26px rgba(0,0,0,.2); cursor: pointer; font: 700 .82rem/1 system-ui, sans-serif; backdrop-filter: blur(12px); }
.music-toggle:hover { background: rgba(23,76,84,.94); }
.music-toggle.is-muted { color: #e6d9bd; background: rgba(63,54,46,.82); }
.music-toggle-icon { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-size: 1rem; }
body:has(.explore-screen.screen--active) .music-toggle { top: 118px; }

.game-shell { min-height: 100svh; overflow: hidden; }
.screen { min-height: 100svh; position: relative; padding: clamp(28px, 5vw, 72px); }
.screen[hidden] { display: none; }

.intro-screen {
  display: grid;
  place-items: center start;
  isolation: isolate;
  background: #e8dfca url("./assets/cover.png") center/cover no-repeat;
}
.intro-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(239, 231, 211, 0.98) 0%, rgba(239, 231, 211, 0.77) 34%, rgba(239, 231, 211, 0.02) 67%);
}
.intro-wash {
  position: absolute;
  inset: 7% auto auto 4%;
  width: 35vw;
  aspect-ratio: 1;
  z-index: -1;
  opacity: 0.45;
  background: radial-gradient(circle, rgba(117, 213, 210, 0.45), transparent 62%);
  filter: blur(18px);
}
.intro-copy { width: min(900px, 90vw); margin-left: clamp(0px, 5vw, 88px); }
.eyebrow { margin: 0 0 10px; color: var(--cinnabar); font: 700 0.82rem/1.2 system-ui, sans-serif; letter-spacing: 0.28em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(3.25rem, 10vw, 9rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.06em; white-space: nowrap; }
.intro-lead { margin: 26px 0 34px; font-size: clamp(1.08rem, 2.2vw, 1.45rem); letter-spacing: 0.08em; }
.experience-note { margin: 18px 0 0; color: var(--ink-soft); font: .78rem/1.5 system-ui, sans-serif; }
.co-creation-entry { display: block; width: max-content; max-width: 100%; margin-top: 18px; color: var(--ink); font: 700 .86rem/1.45 system-ui, sans-serif; text-decoration-color: var(--cinnabar); text-underline-offset: 5px; }
.co-creation-entry:hover { color: var(--cinnabar); }
.co-creation-entry:focus-visible { outline: 3px solid var(--cyan); outline-offset: 5px; }

.primary-button, .seal-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fffaf0;
  background: var(--ink);
  padding: 14px 25px;
  box-shadow: 0 12px 30px rgba(16, 47, 53, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.primary-button:hover, .seal-button:hover { transform: translateY(-2px); background: #174c54; box-shadow: 0 16px 32px rgba(16, 47, 53, 0.28); }
.primary-button:focus-visible, .seal-button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.primary-button--paper { color: var(--ink); background: #f4ead2; }
.primary-button--paper:hover { color: #fff; }
.text-button { border: 0; padding: 7px 3px; color: var(--ink); background: transparent; cursor: pointer; font: 700 0.9rem/1.2 system-ui, sans-serif; border-bottom: 1px solid currentColor; }
.text-button--light { color: #fff7e6; }
.text-button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.text-button:disabled { opacity: .46; cursor: not-allowed; }
.back-button { position: absolute; top: 26px; left: 28px; z-index: 10; }

.select-screen {
  background:
    radial-gradient(circle at 14% 20%, rgba(117, 213, 210, 0.18), transparent 30%),
    linear-gradient(160deg, #eee5cf 0%, #d8c9a7 100%);
}
.screen-header { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.screen-header h2 { margin: 0 0 12px; font-size: clamp(2.3rem, 5vw, 4.5rem); font-weight: 600; }
.screen-header p:last-child { margin: 0; font-family: system-ui, sans-serif; color: var(--ink-soft); font-size: 1rem; }
.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: min(680px, 100%); margin: 0 auto; align-items: stretch; }
.character-card { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 0; text-align: left; cursor: pointer; border: 2px solid rgba(16, 47, 53, 0.18); border-radius: 28px 6px 28px 6px; background: rgba(250, 246, 234, 0.72); box-shadow: 0 14px 40px rgba(7, 24, 27, .17); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; display: flex; flex-direction: column; }
.character-card:hover, .character-card.is-selected { transform: translateY(-5px); border-color: var(--cinnabar); box-shadow: var(--shadow); }
.character-card:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.character-card img { width: 100%; height: clamp(280px, 51vh, 500px); object-fit: contain; object-position: center; display: block; background: rgba(255,250,238,.56); }
.card-caption { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 78px; margin-top: auto; padding: 12px 14px; color: #fff; background: #17383b; }
.card-caption span { font-size: clamp(.95rem, 1.5vw, 1.25rem); font-weight: 700; }
.card-caption small { display: block; margin-top: 5px; color: #bde9e5; font: 600 .75rem/1.3 system-ui, sans-serif; }
.card-caption strong { flex: 0 0 auto; padding: 6px 8px; border-radius: 999px; color: #fff; background: var(--cinnabar); font: 700 .68rem/1 system-ui, sans-serif; }

/* 李白篇启幕 */
.cinematic-screen { display: grid; place-items: center; min-height: 100svh; padding: 0; color: #fff7e6; background: #071b20; }
.opening-frame { position: relative; width: min(100vw, calc(100svh * 1672 / 941)); aspect-ratio: 1672 / 941; }
.opening-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.opening-start { position: absolute; left: 45%; top: 84%; width: 26%; height: 12%; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
.opening-start:hover { background: rgba(255,241,191,.1); }
.opening-start:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.cinematic-screen .back-button { top: auto; bottom: 18px; left: 24px; z-index: 4; padding: 8px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 99px; background: rgba(4,18,22,.78); }
.opening-dialogue { position: absolute; z-index: 4; top: 14px; right: 18px; max-width: min(360px, 45vw); padding: 9px 13px; border: 1px solid rgba(255,241,191,.6); border-radius: 12px; color: #fff7e6; background: rgba(4,18,22,.82); font: .88rem/1.5 system-ui, sans-serif; }
.opening-dialogue summary { cursor: pointer; font-weight: 700; }
.opening-dialogue blockquote { margin: 10px 0 2px; font: 1rem/1.6 "Songti SC", serif; }
.eyebrow--light { color: #90e7e2; }

/* 地图抵达 */
.map-screen { display: grid; place-items: center; padding: 0; overflow: hidden; color: #f9f1dc; background: #183238; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.035); animation: map-breathe 10s ease-in-out infinite alternate; }
@keyframes map-breathe { to { transform: scale(1.085); } }
.map-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 26, 30, .88), rgba(7, 26, 30, .24) 42%, rgba(7, 26, 30, .1)), linear-gradient(0deg, rgba(7, 26, 30, .66), transparent 52%); }
.map-heading { position: absolute; z-index: 2; left: clamp(24px, 7vw, 110px); top: clamp(40px, 9vh, 120px); width: min(430px, 78vw); }
.map-heading h2 { margin: 0; font-size: clamp(3.5rem, 8vw, 7.5rem); line-height: .95; }
.map-heading p:last-child { font: 0.9rem/1.5 system-ui, sans-serif; opacity: .76; }
.map-destination { position: absolute; z-index: 4; left: 60%; top: 57%; border: 0; padding: 0; color: #fff; background: transparent; cursor: pointer; }
.map-pulse { position: relative; display: block; width: 32px; height: 32px; margin: 0 auto 11px; border: 8px solid rgba(255,255,255,.86); border-radius: 50%; background: var(--cinnabar); box-shadow: 0 0 0 0 rgba(117, 213, 210, .65); animation: pin-pulse 2s infinite; }
@keyframes pin-pulse { 70% { box-shadow: 0 0 0 28px rgba(117, 213, 210, 0); } 100% { box-shadow: 0 0 0 0 rgba(117, 213, 210, 0); } }
.map-pin-label { display: block; min-width: 160px; padding: 10px 15px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; backdrop-filter: blur(12px); background: rgba(9, 42, 47, .76); font-weight: 700; }
.map-destination:focus-visible { outline: 3px solid var(--cyan); outline-offset: 9px; border-radius: 50%; }
.map-route { position: absolute; z-index: 3; left: 44%; top: 67%; width: 17%; height: 2px; transform: rotate(-18deg); background: repeating-linear-gradient(90deg, rgba(255,255,255,.85) 0 8px, transparent 8px 16px); filter: drop-shadow(0 0 7px #fff); }
.map-route span { position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.map-screen.is-flying .map-destination { visibility: hidden; }
.map-flight-gif { position: absolute; z-index: 5; left: 38%; top: 26%; width: min(50vw, 620px); height: auto; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(0,0,0,.38)); animation: map-flight-in 2.7s ease-in-out both; pointer-events: none; }
.map-flight-gif[hidden], .map-flight-status[hidden] { display: none; }
.map-flight-status { position: absolute; z-index: 6; left: 50%; bottom: 7%; transform: translateX(-50%); min-width: max-content; padding: 10px 18px; border: 1px solid rgba(255,255,255,.6); border-radius: 99px; background: rgba(7,26,30,.84); font: 700 1rem/1.2 system-ui, sans-serif; }
@keyframes map-flight-in { from { transform: translate(-92vw, 24vh) scale(.58); opacity: .35; } 60% { opacity: 1; } to { transform: translate(0, 0) scale(1); opacity: 1; } }

/* 寻幽场景 */
.explore-screen { min-height: 100svh; padding: 0; overflow: hidden; color: #fff8e8; background: #102c32; }
.scene-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 24, 28, .76), transparent 38%, rgba(7, 24, 28, .25)); pointer-events: none; }
.explore-hud { position: absolute; z-index: 5; inset: 0 0 auto; display: flex; align-items: start; justify-content: space-between; gap: 22px; padding: 28px clamp(22px, 4vw, 62px); }
.explore-hud h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.8rem); }
.ink-progress { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 6px 16px; padding: 14px 18px; border: 1px solid rgba(255,255,255,.42); border-radius: 14px 3px 14px 3px; color: #fff8e8; background: rgba(10, 39, 44, .74); backdrop-filter: blur(14px); font: .78rem/1.2 system-ui, sans-serif; text-align: left; }
.ink-progress strong { font-size: 1rem; }
.stamp-row { grid-column: 1 / -1; display: flex; gap: 8px; }
.stamp-row i { width: 21px; height: 21px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; }
.stamp-row i.is-filled { border-color: #dc6c59; background: var(--cinnabar); box-shadow: inset 0 0 0 4px rgba(255,255,255,.22), 0 0 18px rgba(220,108,89,.45); }
.hotspot { position: absolute; z-index: 4; border: 0; padding: 0; color: #062f35; background: transparent; cursor: pointer; }
.hotspot--flute { left: 24%; top: 68%; }
.hotspot--crane { left: 66%; top: 34%; }
.hotspot-core { position: relative; z-index: 2; display: grid; place-items: center; width: 54px; height: 54px; border: 2px solid rgba(255,255,255,.82); border-radius: 50%; background: rgba(125, 232, 225, .92); box-shadow: 0 0 30px rgba(117,213,210,.9); font-size: 1.35rem; font-weight: 700; }
.hotspot-core img { width: 39px; height: 39px; object-fit: contain; }
.hotspot-core--crane { overflow: hidden; }
.crane-sprite { display: block; width: 48px; height: 48px; background: url("./assets/crane-sprite.png") 0 0 / 400% 200% no-repeat; animation: crane-wing 1.35s steps(1, end) infinite; }
@keyframes crane-wing { 0% { background-position: 0 0; } 12.5% { background-position: 33.333% 0; } 25% { background-position: 66.666% 0; } 37.5% { background-position: 100% 0; } 50% { background-position: 0 100%; } 62.5% { background-position: 33.333% 100%; } 75% { background-position: 66.666% 100%; } 87.5% { background-position: 100% 100%; } }
.hotspot-orbit { position: absolute; z-index: 1; inset: -12px; border: 1px solid rgba(144,231,226,.9); border-radius: 50%; animation: orbit 2.4s ease-out infinite; }
@keyframes orbit { from { transform: scale(.65); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }
.hotspot-label { position: absolute; top: 10px; left: 67px; width: max-content; padding: 8px 12px; border: 1px solid rgba(255,255,255,.48); border-radius: 99px; color: #fff; background: rgba(5, 34, 39, .72); backdrop-filter: blur(10px); font: 700 .8rem/1 system-ui, sans-serif; }
.hotspot.is-done .hotspot-core { color: #fff; background: var(--cinnabar); box-shadow: 0 0 30px rgba(162,60,49,.75); }
.hotspot.is-active .hotspot-core { outline: 3px solid #fff7d8; outline-offset: 4px; }
.hotspot.is-done .hotspot-orbit { display: none; }
.hotspot:focus-visible { outline: 3px solid #fff; outline-offset: 10px; border-radius: 50%; }
.anchor-nav { position: absolute; z-index: 6; left: clamp(18px, 4vw, 62px); bottom: clamp(18px, 4vw, 48px); display: flex; gap: 8px; }
.anchor-nav button { padding: 11px 18px; border: 1px solid rgba(255,255,255,.56); border-radius: 999px; color: #fff; background: rgba(5,34,39,.8); cursor: pointer; }
.anchor-nav button.is-done { background: var(--cinnabar); }
.anchor-nav button.is-active { outline: 2px solid #fff; }
.explore-next { position: absolute; z-index: 7; left: 50%; bottom: clamp(18px, 4vw, 48px); transform: translateX(-50%); min-width: min(330px, calc(100vw - 40px)); padding: 16px 26px; border: 1px solid rgba(255,255,255,.6); background: #a23c31; box-shadow: 0 18px 50px rgba(0,0,0,.38); }
.explore-next:hover { transform: translate(-50%, -2px); background: #8e3027; }
.speaker-row { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; font: .75rem/1.3 system-ui, sans-serif; }
.speaker-row div { display: grid; }
.speaker-row span:not(.speaker-seal) { color: var(--ink-soft); }
.speaker-seal { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px 2px 8px 2px; color: #fff; background: var(--cinnabar); font: 700 1.1rem/1 serif; }
.story-kicker { margin: 0 0 5px; color: var(--cinnabar); font: 700 .72rem/1.2 system-ui, sans-serif; letter-spacing: .17em; }
.anchor-media-dialog { position: fixed; width: min(960px, 88vw); max-width: none; max-height: 88svh; padding: 12px 12px 0; border: 1px solid rgba(255,239,191,.8); border-radius: 22px 5px 22px 5px; color: #fdf3dd; background: #102f35; box-shadow: 0 28px 90px rgba(0,0,0,.55); }
.anchor-media-dialog:not([open]) { display: none; }
.anchor-media-dialog::backdrop { background: rgba(5,22,27,.72); backdrop-filter: blur(5px); }
.anchor-media-dialog img { display: block; width: 100%; height: auto; max-height: 72svh; object-fit: contain; border-radius: 12px 2px 12px 2px; }
.anchor-media-dialog p { margin: 11px 4px 13px; font-size: 1.1rem; }
.anchor-dialog-close { position: absolute; z-index: 2; right: 18px; top: 18px; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; color: #fff; background: rgba(4,18,22,.8); cursor: pointer; font: 1.8rem/1 system-ui, sans-serif; }
.journey-card { position: absolute; z-index: 1; left: 50%; top: 50%; width: min(540px, calc(100% - 44px)); max-height: min(70svh, 570px); overflow: auto; padding: 22px 24px; border: 1px solid rgba(255,255,255,.7); border-radius: 24px 5px 24px 5px; color: var(--ink); background: rgba(242,235,214,.78); box-shadow: 0 22px 65px rgba(0,0,0,.3); backdrop-filter: blur(10px); animation: journey-card-in .65s .45s ease both; }
@keyframes journey-card-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
.journey-card .speaker-row { margin-bottom: 13px; }
.journey-card .story-kicker { margin: 0 0 5px; color: var(--cinnabar); font: 700 .72rem/1.2 system-ui, sans-serif; }
.journey-card h3 { margin: 0 0 9px; font-size: clamp(1.35rem, 2.3vw, 1.85rem); line-height: 1.28; }
.journey-card .journey-dialogue { margin: 0; font-size: clamp(.92rem, 1.3vw, 1.08rem); line-height: 1.68; }
.journey-note { margin: 9px 0 0 !important; color: var(--ink-soft); font: .8rem/1.45 system-ui, sans-serif !important; }
.journey-source { margin-top: 8px; color: var(--ink-soft); font: .78rem/1.45 system-ui, sans-serif; }
.journey-source summary { cursor: pointer; font-weight: 700; }
.journey-source div { margin-top: 5px; }
.journey-ack { width: 100%; margin-top: 12px; }

/* 共题诗 */
.poem-screen { min-height: 100svh; overflow: hidden; background: #e8dec6; }
.poem-paper { position: absolute; inset: 0; opacity: .62; background: url("./assets/memory-paper.png") center/cover no-repeat; mix-blend-mode: multiply; }
.poem-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 78% 28%, rgba(117,213,210,.26), transparent 30%), linear-gradient(100deg, rgba(244,237,220,.84), rgba(244,237,220,.48)); }
.poem-layout { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: clamp(28px, 6vw, 90px); width: min(1250px, 100%); margin: 26px auto 0; align-items: center; }
.poem-workspace { max-width: 700px; }
.poem-workspace > h2 { margin: 0 0 14px; font-size: clamp(2.3rem, 5vw, 4.7rem); line-height: 1.06; letter-spacing: -.04em; }
.poem-intro { max-width: 640px; margin: 0 0 26px; color: var(--ink-soft); font: 1rem/1.75 system-ui, sans-serif; }
.keyword-section { padding: 20px 0 16px; border-top: 1px solid rgba(16,47,53,.24); border-bottom: 1px solid rgba(16,47,53,.24); }
.keyword-section h3 { margin: 0 0 13px; font-size: 1.1rem; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 9px; }
.keyword-chip { border: 1px solid rgba(16,47,53,.36); border-radius: 999px; padding: 9px 15px; color: var(--ink); background: rgba(255,255,255,.38); cursor: pointer; }
.keyword-chip.is-selected { border-color: var(--cinnabar); color: #fff; background: var(--cinnabar); }
.keyword-chip:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.custom-keyword { display: grid; grid-template-columns: auto minmax(100px, 1fr) auto; gap: 12px; align-items: center; margin-top: 15px; font: .9rem/1.2 system-ui, sans-serif; }
.title-input, .draft-editor textarea { width: 100%; border: 1px solid rgba(16,47,53,.28); border-radius: 10px 3px 10px 3px; color: var(--ink); background: rgba(255,255,255,.48); }
.title-input:focus, .draft-editor textarea:focus { outline: 3px solid rgba(117,213,210,.5); border-color: var(--ink); }
.selection-hint { margin: 12px 0 0; color: var(--ink-soft); font: .82rem/1.4 system-ui, sans-serif; }
.poem-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.poem-actions--generate { justify-content: flex-start; margin-top: 22px; }
.draft-editor { margin-top: 24px; padding: 20px; border: 1px solid rgba(16,47,53,.2); border-radius: 22px 5px 22px 5px; background: rgba(250,246,234,.7); box-shadow: 0 18px 55px rgba(16,47,53,.12); }
.draft-header { display: flex; justify-content: space-between; margin-bottom: 16px; color: var(--cinnabar); font: 700 .75rem/1.2 system-ui, sans-serif; letter-spacing: .12em; }
.draft-editor label { display: block; margin: 11px 0 6px; color: var(--ink-soft); font: 700 .75rem/1.2 system-ui, sans-serif; }
.title-input { padding: 10px 12px; font-size: 1.15rem; font-weight: 700; }
.draft-editor textarea { padding: 12px 14px; resize: vertical; font: 1.2rem/1.85 "Songti SC", "Noto Serif SC", serif; }
.draft-error { margin: 9px 0; color: #a23c31; font: 700 .84rem/1.5 system-ui, sans-serif; }
.poem-actions button:disabled { opacity: .45; cursor: not-allowed; }
.poet-companion { position: relative; align-self: stretch; min-height: 620px; overflow: hidden; border-radius: 80px 8px 80px 8px; background: rgba(16,47,53,.16); box-shadow: var(--shadow); }
.poet-companion img { width: 100%; height: 100%; object-fit: contain; background: #eadfc6; }
.poet-quote { position: absolute; inset: auto 20px 20px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.45); border-radius: 18px 4px 18px 4px; color: #fff; background: rgba(8,34,39,.78); backdrop-filter: blur(12px); }
.poet-quote span { color: #9be8e4; font: 700 .72rem/1 system-ui, sans-serif; letter-spacing: .16em; }
.poet-quote p { margin: 9px 0 0; font-size: 1.05rem; line-height: 1.65; }

/* 记忆卡 */
.memory-screen { display: grid; place-items: center; min-height: 100svh; color: #fff5df; background: radial-gradient(circle at 70% 24%, #1e5b60, transparent 34%), #0b252a; }
.memory-stage { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: clamp(26px, 4vw, 60px); width: min(1420px, 100%); align-items: center; }
.memory-card { position: relative; width: 100%; min-width: 0; height: clamp(520px, 42vw, 620px); overflow: hidden; border: 1px solid rgba(255,255,255,.42); border-radius: 26px 7px 26px 7px; box-shadow: 0 34px 100px rgba(0,0,0,.42); background: #e9dfc8; }
.memory-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.memory-copy { position: absolute; inset: 8% 5% 7% 48%; display: flex; flex-direction: column; color: var(--ink); }
.memory-eyebrow { margin: 0 0 2%; color: var(--cinnabar); font: 700 clamp(.55rem, .85vw, .8rem)/1 system-ui, sans-serif; letter-spacing: .18em; }
.memory-copy h2 { margin: 0 0 4%; font-size: clamp(1.8rem, 3.2vw, 3.6rem); line-height: 1; }
.memory-poem-title { margin: 0 0 3%; color: var(--cinnabar); font-size: clamp(.7rem, 1vw, 1rem); }
.memory-poem { display: grid; gap: .35em; font-size: clamp(.9rem, 1.55vw, 1.55rem); line-height: 1.42; }
.memory-poem p { margin: 0; }
.memory-meta { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; padding-top: 3%; border-top: 1px solid rgba(16,47,53,.26); font: clamp(.95rem, 1.2vw, 1.2rem)/1.38 system-ui, sans-serif; }
.memory-meta span { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; }
.memory-meta strong { font-weight: 800; color: #102f35; }
.memory-player-note { padding: 6px 8px; border-left: 3px solid var(--cinnabar); background: rgba(255,250,232,.56); }
.memory-player-note strong { display: block; overflow-wrap: anywhere; color: #ad3127; }
.receipt-strip { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10px; margin-top: 2%; }
.receipt-strip div { min-width: 0; padding: 6px 8px; border-radius: 7px; background: rgba(16,47,53,.08); }
.receipt-strip span { display: block; color: var(--ink-soft); font: clamp(.6rem, .75vw, .78rem)/1.2 system-ui, sans-serif; }
.receipt-strip code { display: block; overflow: hidden; text-overflow: ellipsis; font-size: clamp(.6rem, .78vw, .8rem); white-space: nowrap; }
.demo-status { margin: 2% 0 0; color: #80574f; font: 700 clamp(.68rem, .85vw, .88rem)/1.2 system-ui, sans-serif; }
.demo-status i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #c47b3b; }
.demo-status[data-state="pending"] { color: #80574f; }
.demo-status[data-state="confirmed"] { color: #1b6a55; }
.demo-status[data-state="confirmed"] i { background: #2d9b70; box-shadow: 0 0 0 4px rgba(45,155,112,.15); }
.memory-controls h3 { margin: 0 0 14px; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.05; }
.memory-controls p:not(.eyebrow) { color: rgba(255,245,223,.82); font: 1.1rem/1.75 system-ui, sans-serif; }
.memory-buttons { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; margin-top: 28px; }
.memory-note-label { display: block; margin-top: 22px; color: #fff5df; font: 700 1rem/1.5 system-ui, sans-serif; }
.memory-controls textarea { width: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.55); border-radius: 10px; color: #fff5df; background: rgba(0,0,0,.18); font: 1rem/1.5 system-ui, sans-serif; resize: vertical; }
.memory-controls textarea:disabled { opacity: .72; cursor: not-allowed; }

.official-certification { margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); color: #fff5df; font-family: system-ui, sans-serif; }
.official-certification > summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; color: #9be8e4; cursor: pointer; list-style-position: outside; }
.official-certification > summary span { font: 800 .82rem/1.35 system-ui, sans-serif; }
.official-certification > summary small { color: rgba(255,245,223,.58); font: .7rem/1.4 system-ui, sans-serif; }
.official-certification[open] > summary { margin-bottom: 10px; }
.official-certification .chain-seal-panel { margin-top: 0; }

.chain-seal-panel { margin-top: 22px; padding: 18px; border: 1px solid rgba(144,231,226,.36); border-radius: 20px 5px 20px 5px; background: rgba(4,22,27,.55); box-shadow: inset 0 1px rgba(255,255,255,.05); font-family: system-ui, sans-serif; }
.chain-seal-panel[data-state="ready"] { border-color: rgba(144,231,226,.76); background: rgba(9,47,52,.72); }
.chain-seal-panel[data-state="confirmed"] { border-color: rgba(94,217,158,.84); background: rgba(9,55,45,.72); }
.chain-seal-panel[data-state="error"] { border-color: rgba(231,144,122,.66); }
.chain-seal-panel[data-state="warning"] { border-color: rgba(219,177,92,.7); }
.chain-seal-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.chain-seal-header h4 { margin: 4px 0 0; color: #fff8e8; font: 700 1.12rem/1.35 "Songti SC", serif; }
.memory-controls .chain-kicker { display: flex; align-items: center; gap: 7px; margin: 0; color: #9be8e4; font: 800 .7rem/1.2 system-ui, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.chain-kicker i { width: 8px; height: 8px; border-radius: 50%; background: #cfad64; box-shadow: 0 0 0 4px rgba(207,173,100,.13); }
.chain-seal-panel[data-state="ready"] .chain-kicker i, .chain-seal-panel[data-state="confirmed"] .chain-kicker i { background: #5ed99e; box-shadow: 0 0 0 4px rgba(94,217,158,.14); }
.chain-id-badge { flex: 0 0 auto; padding: 6px 8px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #e9ddc4; background: rgba(255,255,255,.06); font: 700 .66rem/1 system-ui, sans-serif; }
.memory-controls .chain-privacy { margin: 13px 0; color: rgba(255,245,223,.7); font: .78rem/1.55 system-ui, sans-serif; }
.chain-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0; }
.chain-facts div { min-width: 0; padding: 8px 9px; border-radius: 9px; background: rgba(255,255,255,.055); }
.chain-facts dt { margin-bottom: 3px; color: rgba(255,245,223,.5); font: 600 .65rem/1.2 system-ui, sans-serif; }
.chain-facts dd { margin: 0; overflow: hidden; color: #fff8e8; font: 700 .73rem/1.3 system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.chain-facts a, .chain-tx-link { color: #9be8e4; text-underline-offset: 3px; }
.chain-foundation-proof { margin-top: 10px; color: rgba(255,245,223,.68); font: .7rem/1.4 system-ui, sans-serif; }
.chain-foundation-proof summary { cursor: pointer; font-weight: 700; }
.memory-controls .chain-foundation-proof p { display: inline; margin: 0 12px 0 0; font: .7rem/1.4 system-ui, sans-serif; }
.chain-foundation-proof a { color: #9be8e4; text-underline-offset: 3px; }
.chain-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.chain-actions .seal-button { padding: 11px 17px; color: #0d3437; background: #9be8e4; box-shadow: none; font: 800 .8rem/1 system-ui, sans-serif; }
.chain-actions .seal-button:hover { color: #fff; background: #267d79; }
.chain-actions button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.chain-connect { font-size: .78rem; white-space: nowrap; }
.memory-controls .chain-status { min-height: 2.8em; margin: 12px 0 0; color: rgba(255,245,223,.74); font: .74rem/1.45 system-ui, sans-serif; }
.chain-tx-link { display: inline-block; margin-top: 8px; font: 700 .74rem/1.3 system-ui, sans-serif; }
.chain-tx-link[hidden] { display: none; }
.chain-recovery-actions { margin-top: 8px; }
.chain-recovery-actions button { font-size: .74rem; }
.chain-proof { margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.chain-proof[hidden] { display: none; }
.chain-proof summary { color: #9be8e4; cursor: pointer; font: 700 .76rem/1.3 system-ui, sans-serif; }
.chain-proof dl { display: grid; gap: 7px; margin: 11px 0 13px; }
.chain-proof dl div { min-width: 0; }
.chain-proof dt { color: rgba(255,245,223,.5); font: 600 .63rem/1.2 system-ui, sans-serif; }
.chain-proof dd { margin: 3px 0 0; }
.chain-proof code { display: block; overflow-wrap: anywhere; color: #fff8e8; font: .67rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.chain-proof button { font-size: .72rem; }

@keyframes screen-in { from { opacity: 0; transform: scale(1.01); } to { opacity: 1; transform: scale(1); } }
.screen--active { animation: screen-in 420ms ease both; }

@media (max-width: 1200px) {
  .memory-stage { grid-template-columns: 1fr; }
  .memory-card { height: 560px; }
  .memory-controls { width: min(760px, 100%); max-width: 760px; }
}
@media (max-width: 980px) {
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .character-card img { height: min(42vh, 410px); }
  .card-caption { padding: 9px; min-height: 72px; }
  .card-caption span { font-size: .92rem; }
  .card-caption small { font-size: .66rem; }
  .card-caption strong { font-size: .58rem; padding: 5px 6px; }
  .poem-layout { grid-template-columns: 1fr; }
  .poet-companion { min-height: 460px; }
  .memory-card { min-height: 560px; }
  .memory-copy { inset: 7% 5% 6% 46%; }
  .memory-meta { font-size: 1rem; }
}
@media (max-width: 650px) {
  .screen { padding: 24px 18px; }
  .intro-screen { align-items: end; background-position: 64% center; }
  .intro-screen::after { background: linear-gradient(0deg, rgba(239, 231, 211, 0.98) 0%, rgba(239, 231, 211, 0.55) 50%, rgba(239, 231, 211, 0.05) 78%); }
  .intro-copy { margin: 0 0 8vh; }
  h1 { font-size: clamp(3.1rem, 12.5vw, 6rem); }
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .character-card img { height: min(44vh, 340px); }
  .card-caption { align-items: center; padding: 10px; }
  .card-caption span { font-size: .96rem; }
  .card-caption strong { font-size: .58rem; }
  .cinematic-screen { padding: 0; }
  .cinematic-screen .back-button { bottom: 12px; left: 12px; }
  .opening-dialogue { top: auto; bottom: 54px; right: 12px; max-width: 68vw; font-size: .72rem; }
  .opening-dialogue blockquote { font-size: .82rem; }
  .map-art { object-position: 60% center; }
  .map-destination { left: 57%; top: 61%; }
  .map-route { display: none; }
  .map-flight-gif { left: 13%; top: 34%; width: 76vw; }
  .map-flight-status { bottom: 18%; }
  .explore-hud { padding: 22px 18px; }
  .explore-hud > div:first-child { max-width: 58%; }
  .explore-hud h2 { font-size: 1.75rem; }
  .ink-progress { padding: 10px 12px; }
  .scene-art { object-position: 62% center; }
  .hotspot--flute { left: 15%; top: 43%; }
  .hotspot--crane { left: 70%; top: 30%; }
  .hotspot-core { width: 46px; height: 46px; }
  .hotspot-label { display: none; }
  .anchor-nav { left: 18px; bottom: auto; top: 105px; }
  .anchor-media-dialog { width: 94vw; padding: 8px 8px 0; }
  .journey-card { width: calc(100% - 28px); max-height: 65svh; padding: 15px; }
  .poem-screen { overflow: auto; }
  .poem-layout { margin-top: 50px; }
  .poet-companion { min-height: 390px; order: -1; }
  .memory-screen { padding-inline: 12px; }
  .memory-card { height: max(760px, 100svh); }
  .memory-card > img { height: 48%; object-position: left center; }
  .memory-copy { inset: 45% 5% 5%; padding: 14px; border-radius: 12px; background: rgba(250,246,232,.9); }
  .memory-copy h2 { font-size: clamp(1.25rem, 6vw, 2rem); }
  .memory-poem { font-size: 1rem; }
  .memory-meta { gap: 5px; font-size: .88rem; }
  .receipt-strip { grid-template-columns: 1fr; gap: 3px; }
  .receipt-strip div { padding: 3px 5px; }
  .chain-facts { grid-template-columns: 1fr; }
  .chain-actions { align-items: stretch; flex-direction: column; }
  .chain-actions button { width: 100%; }
}

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

/* ==================== 伯牙子期篇 · 高山流水 ==================== */
.boya-root { position: fixed; z-index: 30; inset: 0; overflow: hidden auto; background: #0b252a; }
.boya-screen { padding: 0; overflow: hidden; }

/* 启幕 · 开屏图 + 启程热区 */
.boya-launch-screen { display: grid; place-items: center; min-height: 100svh; padding: 0; color: #fff7e6; background: #071b20; }
.boya-opening-frame { position: relative; width: min(100vw, calc(100svh * 1672 / 941)); aspect-ratio: 1672 / 941; }
.boya-opening-art { display: block; width: 100%; height: 100%; object-fit: contain; animation: boya-opening-in 1.6s ease both; }
.boya-opening-start { position: absolute; left: 40%; top: 88%; width: 20%; height: 10%; border: 0; border-radius: 999px; background: transparent; cursor: pointer; transition: background 180ms ease; }
.boya-opening-start:hover { background: rgba(255,241,191,.12); }
.boya-opening-start:focus-visible { outline: 3px solid #fff7d8; outline-offset: 4px; }
.boya-opening-dialogue { position: absolute; z-index: 4; top: 14px; right: 18px; max-width: min(360px, 45vw); padding: 9px 13px; border: 1px solid rgba(255,241,191,.6); border-radius: 12px; color: #fff7e6; background: rgba(4,18,22,.82); font: .88rem/1.5 system-ui, sans-serif; }
.boya-opening-dialogue summary { cursor: pointer; font-weight: 700; }
.boya-opening-dialogue blockquote { margin: 10px 0 2px; font: 1rem/1.6 "Songti SC", serif; }
@keyframes boya-opening-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }

/* 大地图 · 泛舟驶向琴台月湖 */
.boya-map-screen { display: grid; place-items: center; padding: 0; overflow: hidden; color: #f9f1dc; background: #183238; }
.boya-map-destination { position: absolute; z-index: 4; left: 20%; top: 72%; border: 0; padding: 0; color: #fff; background: transparent; cursor: pointer; }
.boya-map-pulse { position: relative; display: block; width: 32px; height: 32px; margin: 0 auto 11px; border: 8px solid rgba(255,255,255,.86); border-radius: 50%; background: #2f9e94; box-shadow: 0 0 0 0 rgba(117,213,210,.65); animation: pin-pulse 2s infinite; }
.boya-map-destination:focus-visible { outline: 3px solid var(--cyan); outline-offset: 9px; border-radius: 50%; }
.boya-map-route { position: absolute; z-index: 3; left: 26%; top: 79%; width: 30%; height: 2px; background: repeating-linear-gradient(90deg, rgba(120,224,214,.85) 0 8px, transparent 8px 16px); filter: drop-shadow(0 0 7px rgba(120,224,214,.8)); }
.boya-map-route span { position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #8ff0e6; }
.boya-map-boat { position: absolute; z-index: 5; left: 56%; top: 63%; width: min(19vw, 250px); height: auto; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0,0,0,.35)); animation: boya-map-sail 4.4s linear both; pointer-events: none; }
.boya-map-boat[hidden] { display: none; }
@keyframes boya-map-sail {
  0% { left: 56%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 27.5%; opacity: 1; }
}

/* 月湖 / 琴台 场景 */
.boya-scene-tint { background: linear-gradient(180deg, rgba(7,24,28,.68), transparent 42%, rgba(7,24,28,.32)); }
.boya-hotspot--lake { left: 50%; top: 62%; }
.boya-hotspot--qintai { left: 56%; top: 40%; }
.boya-hotspot-core { font-size: 1.2rem; font-family: 'Songti SC', serif; }
.boya-lake-screen .explore-hud h2, .boya-qintai-screen .explore-hud h2 {
  color: #fff8e8;
  text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 2px 10px rgba(0,0,0,.9), 0 0 28px rgba(0,0,0,.75), 0 0 60px rgba(0,0,0,.5);
}
.boya-qintai-screen .explore-hud .eyebrow--light, .boya-qintai-screen .explore-hud h2 { -webkit-text-stroke: .4px rgba(0,0,0,.55); }
.boya-hint { position: absolute; z-index: 6; left: 50%; bottom: clamp(78px, 12vh, 130px); transform: translateX(-50%); margin: 0; padding: 11px 22px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; color: #fff; background: rgba(7,32,37,.78); backdrop-filter: blur(12px); font: 700 .92rem/1.2 system-ui, sans-serif; white-space: nowrap; }
.boya-hint:empty { display: none; }
.boya-pulse { animation: boya-pulse 1.5s ease-in-out 2; }
@keyframes boya-pulse { 0%, 100% { box-shadow: 0 18px 50px rgba(0,0,0,.38); } 50% { box-shadow: 0 0 0 12px rgba(255,241,191,.28), 0 18px 50px rgba(0,0,0,.38); } }

/* 泛舟过渡（月湖 → 琴台） */
.boya-sail-screen { display: grid; place-items: center; background: #071b20; }
.boya-sail-bg { opacity: .5; filter: blur(2px) saturate(.8); }
.boya-sail-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,22,26,.7), rgba(6,22,26,.42)); }
.boya-sail-boat { position: relative; z-index: 2; width: min(620px, 74vw); animation: boya-sail-across 2.8s ease-in-out both; }
.boya-sail-status { position: absolute; z-index: 3; bottom: 9%; margin: 0; padding: 11px 22px; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; color: #fff; background: rgba(7,26,30,.84); font: 700 1rem/1.2 system-ui, sans-serif; }
@keyframes boya-sail-across { 0% { transform: translateX(-46vw) scale(.82); opacity: 0; } 22% { opacity: 1; } 78% { opacity: 1; } 100% { transform: translateX(44vw) scale(1.04); opacity: 0; } }

/* 五弦琴共创舞台 · 纸质卷轴风 */
.boya-qin-screen { overflow: hidden auto; padding: clamp(22px, 4vw, 52px); color: var(--ink); background:
  radial-gradient(circle at 82% 6%, rgba(207,173,100,.16), transparent 26%),
  radial-gradient(circle at 18% 12%, #f6eed9, #ecdfc3 58%, #dccba8); }
.boya-qin-screen::before { content: ""; position: absolute; inset: 12px; pointer-events: none; border: 1px solid rgba(140,94,64,.28); border-radius: 18px; }
.boya-qin-header { position: absolute; z-index: 6; top: 16px; right: 20px; margin: 0; padding: 6px 10px; border: 1px solid rgba(140,94,64,.4); border-radius: 999px; background: rgba(255,252,244,.7); backdrop-filter: blur(8px); }
.boya-qin-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: clamp(22px, 3.4vw, 46px); max-width: 1360px; margin: 0 auto; align-items: start; }
.boya-guqin-frame { position: relative; overflow: hidden; aspect-ratio: 1448 / 836; border: 2px solid rgba(176,141,64,.65); border-radius: 22px 8px 22px 8px; box-shadow: 0 20px 52px rgba(74,46,30,.24), inset 0 0 0 1px rgba(207,173,100,.5); background: url("./assets/boya-guqin-panel.png") top center / 100% auto no-repeat #f6eed9; }
.boya-guqin-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background: transparent; touch-action: none; cursor: crosshair; }
.boya-guqin-readout { margin: 10px 2px 0; color: #6b4a2b; font: .86rem/1.5 system-ui, sans-serif; }

/* 五弦组件底下：试听 + 重新谱曲 */
.boya-preview-row { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 11px 14px; border: 1px solid rgba(176,141,64,.45); border-radius: 14px 4px 14px 4px; background: rgba(255,252,244,.55); }
.boya-track-play--inline { width: 42px; height: 42px; font-size: .95rem; }
.boya-preview-status { flex: 1; min-width: 0; color: #6b4a2b; font: .82rem/1.4 system-ui, sans-serif; }
.boya-recompose-inline { color: #8c6a4f; font-size: .84rem; white-space: nowrap; }
.boya-recompose-inline:hover { color: var(--cinnabar); }
.boya-string-keys { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.boya-string-key { display: grid; justify-items: center; gap: 3px; padding: 12px 4px; border: 1px solid rgba(140,94,64,.45); border-radius: 12px 3px 12px 3px; color: #4a2e1e; background: rgba(255,252,244,.6); cursor: pointer; transition: transform 140ms ease, background 140ms ease; box-shadow: 0 4px 14px rgba(74,46,30,.12); }
.boya-string-key:hover { transform: translateY(-3px); background: rgba(255,255,255,.85); }
.boya-string-key:active { transform: translateY(1px); background: var(--cinnabar); color: #fff; }
.boya-string-key:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.boya-string-key span { font: 700 1.3rem/1 'Songti SC', serif; }
.boya-string-key small { color: #8c6a4f; font: 600 .68rem/1 system-ui, sans-serif; }
.boya-note-trail { display: flex; flex-wrap: wrap; gap: 6px; min-height: 38px; margin: 16px 0 0; padding: 10px; border: 1px dashed rgba(140,94,64,.42); border-radius: 12px; list-style: none; background: rgba(255,252,244,.4); }
.boya-note-trail:empty::after { content: "尚未奏音——在画面上按住琴弦左右拨动，或点下方琴音键。"; color: #8c6a4f; font: .82rem/1.4 system-ui, sans-serif; }
.boya-note-chip { padding: 5px 11px; border-radius: 999px; color: #fff; background: var(--cinnabar); font: 700 .8rem/1 system-ui, sans-serif; }
.boya-note-chip.is-down { background: #2f6f74; }
.boya-qin-panel { display: grid; gap: 16px; padding: 24px 22px; border: 1px solid rgba(140,94,64,.4); border-radius: 20px 6px 20px 6px; background: linear-gradient(180deg, rgba(255,252,242,.9), rgba(248,240,222,.82)); box-shadow: 0 18px 48px rgba(74,46,30,.18), inset 0 0 0 4px rgba(255,255,255,.4); }
.boya-config h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 11px; padding-bottom: 8px; border-bottom: 1px solid rgba(140,94,64,.26); font: 700 1.06rem/1.3 'Songti SC', serif; color: #4a2e1e; }
.boya-config h3 small { color: #8c6a4f; font: 600 .72rem/1 system-ui, sans-serif; }
.boya-theme-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.boya-theme-card { display: grid; gap: 4px; padding: 15px 13px; text-align: left; border: 2px solid rgba(140,94,64,.3); border-radius: 14px 3px 14px 3px; color: #4a2e1e; background: rgba(255,255,255,.5); cursor: pointer; transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.boya-theme-card:hover { transform: translateY(-3px); }
.boya-theme-card.is-selected { border-color: var(--cinnabar); background: rgba(255,252,244,.95); box-shadow: 0 12px 30px rgba(162,60,49,.22), inset 0 0 0 1px rgba(207,173,100,.4); }
.boya-theme-card strong { font: 700 1.32rem/1.2 'Songti SC', serif; }
.boya-theme-card small { color: var(--cinnabar); font: 700 .78rem/1.3 'Songti SC', serif; }
.boya-theme-card em { color: #8c6a4f; font: .72rem/1.4 system-ui, sans-serif; font-style: normal; }
.boya-layer-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.boya-layer-chip { padding: 9px 6px; border: 1px solid rgba(140,94,64,.4); border-radius: 999px; color: #4a2e1e; background: rgba(255,255,255,.5); cursor: pointer; font: 600 .88rem/1.2 'Songti SC', serif; text-align: center; white-space: nowrap; }
.boya-layer-chip.is-selected { border-color: var(--cinnabar); color: #fff; background: var(--cinnabar); }
.boya-selection-hint { margin: 10px 0 0; color: #8c6a4f; font: .8rem/1.45 system-ui, sans-serif; }
.boya-gate-error { margin: 0; padding: 11px 14px; border-left: 4px solid var(--cinnabar); border-radius: 8px; color: #8c2f26; background: rgba(162,60,49,.12); font: 700 .85rem/1.5 system-ui, sans-serif; }
.boya-gate-error[hidden] { display: none; }
.boya-generate { width: 100%; margin-top: 4px; padding: 16px; font-size: 1rem; }
.boya-recompose { justify-self: center; margin-top: 2px; color: #8c6a4f; font-size: .84rem; }
.boya-recompose:hover { color: var(--cinnabar); }

/* 结算 · 高山流水人格结算 */
.boya-capsule-screen { overflow: hidden auto; padding: clamp(20px, 3.4vw, 48px); color: #fff5df; background: url("./assets/boya-settle-bg.png") center / cover no-repeat fixed #0a2226; }
.boya-capsule-screen::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6,18,20,.34), rgba(6,18,20,.14) 40%, rgba(6,18,20,.5)); }
.boya-capsule-screen > * { position: relative; }
.boya-settle-stage { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); gap: clamp(18px, 2.6vw, 36px); width: min(1240px, 100%); margin: 0 auto; align-items: stretch; }
.boya-settle-panel { display: flex; flex-direction: column; padding: clamp(20px, 2.6vw, 34px); border: 1px solid rgba(207,173,100,.6); border-radius: 24px 6px 24px 6px; background: linear-gradient(180deg, rgba(250,244,228,.9), rgba(240,229,204,.86)); backdrop-filter: blur(6px); box-shadow: 0 24px 70px rgba(0,0,0,.35), inset 0 0 0 4px rgba(255,255,255,.3); color: #4a2e1e; }
.boya-settle-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; color: var(--cinnabar); font: 800 .8rem/1 system-ui, sans-serif; letter-spacing: .18em; }
.boya-settle-kicker i { width: 9px; height: 9px; border-radius: 50%; background: var(--cinnabar); box-shadow: 0 0 0 4px rgba(162,60,49,.16); }
.boya-settle-panel h2 { margin: 0 0 6px; font-size: clamp(2.2rem, 4.4vw, 4rem); line-height: 1.04; color: #2b1c12; letter-spacing: -.02em; }
.boya-settle-motto { margin: 0 0 14px; color: var(--cinnabar); font: 700 .95rem/1.4 'Songti SC', serif; letter-spacing: .14em; }
.boya-settle-desc { margin: 0 0 20px; max-width: 60ch; color: #5c4326; font: .98rem/1.8 system-ui, sans-serif; }
.boya-settle-bars { display: grid; gap: 13px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(140,94,64,.3); }
.boya-settle-bar { display: grid; grid-template-columns: auto 52px minmax(0,1fr) 52px auto; align-items: center; gap: 10px; }
.boya-settle-bar-name { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 9px 3px 9px 3px; color: #fff; background: #2b1c12; font: 700 .92rem/1 'Songti SC', serif; }
.boya-settle-bar-pct { min-width: 44px; text-align: center; font: 800 .84rem/1 system-ui, sans-serif; color: #4a2e1e; }
.boya-settle-bar-track { display: flex; height: 12px; overflow: hidden; border-radius: 999px; background: rgba(74,46,30,.14); }
.boya-settle-bar-fill { height: 100%; }
.boya-settle-bar-fill--mountain { background: linear-gradient(90deg, #6b4a2b, #8c6a4f); }
.boya-settle-bar-fill--pluck { background: linear-gradient(90deg, #a23c31, #c46a4f); }
.boya-settle-bar-fill--swift { background: linear-gradient(90deg, #cfad64, #e0c98a); }
.boya-settle-bar-fill--solo { background: linear-gradient(90deg, #2f6f74, #4a9ea4); }
.boya-settle-bar-fill--rest { background: linear-gradient(90deg, #9db8b6, #c8dcd8); }
.boya-settle-receipt { margin: 18px 0 0; }
.boya-settle-receipt div { background: rgba(74,46,30,.08); }
.boya-settle-receipt code { color: #4a2e1e; }

/* 右侧 · 专属曲目播放器 */
.boya-settle-track { display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 30px); border: 1px solid rgba(207,173,100,.55); border-radius: 24px 6px 24px 6px; background: linear-gradient(180deg, rgba(16,44,48,.82), rgba(8,28,32,.86)); backdrop-filter: blur(8px); box-shadow: 0 24px 70px rgba(0,0,0,.4); color: #fff5df; }
.boya-settle-track-kicker { margin: 0 0 8px; color: #cfad64; font: 800 .76rem/1 system-ui, sans-serif; letter-spacing: .2em; }
.boya-settle-track h3 { margin: 0 0 4px; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.15; color: #fff8e8; font-family: 'Songti SC', serif; }
.boya-settle-track-sub { margin: 0 0 20px; color: rgba(255,245,223,.6); font: .82rem/1.5 system-ui, sans-serif; }
.boya-track-player { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border: 1px solid rgba(207,173,100,.4); border-radius: 16px 4px 16px 4px; background: rgba(0,0,0,.24); }
.boya-track-play { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto; border: 2px solid rgba(207,173,100,.7); border-radius: 50%; color: #fff8e8; background: radial-gradient(circle at 34% 30%, #a23c31, #6e2419); cursor: pointer; font-size: 1.15rem; transition: transform 140ms ease, box-shadow 140ms ease; }
.boya-track-play:hover { transform: scale(1.06); box-shadow: 0 0 24px rgba(162,60,49,.5); }
.boya-track-play:disabled { opacity: .6; cursor: wait; transform: none; }
.boya-track-play:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.boya-track-progress { flex: 1; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.boya-track-progress i { display: block; width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #cfad64, #f0dca2); transition: width .12s linear; }
.boya-track-time { flex: 0 0 auto; min-width: 46px; text-align: right; color: #e9ddc4; font: 700 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.boya-settle-track-quote { margin: 18px 0 0; color: rgba(255,245,223,.72); font: .92rem/1.75 'Songti SC', serif; }
.boya-track-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 20px; }
.boya-track-actions .primary-button { width: 100%; padding: 15px; }
.boya-settle-track-status { min-height: 1.4em; margin: 10px 0 0; color: #cfad64; font: 700 .78rem/1.4 system-ui, sans-serif; }

/* 结算页底部：留言 + 链上封存 */
.boya-settle-foot { display: grid; grid-template-columns: minmax(260px, 1fr) auto; grid-template-areas: "note actions" "official official"; gap: clamp(18px, 2.6vw, 36px); width: min(1240px, 100%); margin: clamp(20px, 3vh, 36px) auto 0; padding: clamp(14px, 2vw, 22px); border: 1px solid rgba(207,173,100,.3); border-radius: 20px 6px 20px 6px; background: rgba(6,22,26,.55); backdrop-filter: blur(8px); align-items: start; }
.boya-settle-foot-note { grid-area: note; }
.official-certification--boya { grid-area: official; margin-top: 0; }
.boya-settle-foot-note textarea { width: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.55); border-radius: 10px; color: #fff5df; background: rgba(0,0,0,.18); font: 1rem/1.5 system-ui, sans-serif; resize: vertical; }
.boya-settle-foot-actions { grid-area: actions; display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }

/* 链上独立核验页 */
.verify-screen { position: fixed; z-index: 45; inset: 0; overflow: hidden auto; color: #fff5df; background: radial-gradient(circle at 68% 20%, #1c565c, transparent 38%), #0a2226; }
.verify-shell { width: min(920px, 92vw); margin: 0 auto; padding: clamp(34px, 7vh, 84px) 0 60px; }
.verify-header h1 { margin: 0 0 12px; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.verify-header p:last-child { color: rgba(255,245,223,.76); font: 1rem/1.7 system-ui, sans-serif; }
.verify-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin: 30px 0 22px; }
.verify-form label { grid-column: 1 / -1; color: rgba(255,245,223,.62); font: 600 .78rem/1.2 system-ui, sans-serif; }
.verify-form .title-input { padding: 13px 15px; color: #fff; background: rgba(0,0,0,.24); border-color: rgba(255,255,255,.42); }
.verify-form .primary-button { padding: 14px 24px; white-space: nowrap; }
.verify-result { display: grid; gap: 13px; min-height: 80px; }
.verify-note { margin: 0; padding: 13px 16px; border-radius: 12px 3px 12px 3px; font: .95rem/1.65 system-ui, sans-serif; }
.verify-note--pending { color: #ffe6b8; background: rgba(207,173,100,.16); }
.verify-note--ok { color: #b6f0d3; background: rgba(94,217,158,.15); }
.verify-note--warning { color: #ffe0b0; background: rgba(219,177,92,.16); }
.verify-note--error { color: #ffcdc4; background: rgba(231,144,122,.16); }
.verify-note--note { color: rgba(255,245,223,.72); background: rgba(255,255,255,.07); }
.verify-table { display: grid; gap: 7px; margin: 0; }
.verify-table div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; padding: 10px 13px; border-radius: 10px; background: rgba(255,255,255,.06); }
.verify-table dt { color: rgba(255,245,223,.55); font: 600 .76rem/1.45 system-ui, sans-serif; }
.verify-table dd { margin: 0; overflow-wrap: anywhere; color: #fff8e8; font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.verify-back { margin-top: 26px; color: #9be8e4; }

@media (max-width: 1180px) {
  .boya-settle-stage { grid-template-columns: 1fr; }
  .boya-settle-foot { grid-template-columns: 1fr; grid-template-areas: "note" "actions" "official"; }
  .boya-settle-foot-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 1080px) {
  .boya-qin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .boya-opening-dialogue { right: 12px; bottom: 12px; max-width: 78vw; }
  .boya-opening-start { left: 34%; width: 32%; }
  .boya-map-destination { left: 12%; top: 62%; }
  .boya-map-route { display: none; }
  .boya-map-boat { left: 56%; top: 56%; width: 44vw; }
  .boya-preview-row { flex-wrap: wrap; }
  .boya-hint { bottom: 84px; font-size: .78rem; white-space: normal; text-align: center; }
  .boya-hotspot--lake { left: 46%; top: 52%; }
  .boya-hotspot--qintai { left: 52%; top: 34%; }
  .boya-lake-screen .explore-hud, .boya-qintai-screen .explore-hud { flex-direction: column; align-items: stretch; gap: 12px; padding: 62px 16px 18px; }
  .boya-lake-screen .explore-hud > div:first-child, .boya-qintai-screen .explore-hud > div:first-child { max-width: 100%; min-width: 0; }
  .boya-lake-screen .explore-hud h2, .boya-qintai-screen .explore-hud h2 { font-size: 1.32rem; line-height: 1.3; letter-spacing: -.01em; }
  .boya-lake-screen .explore-hud h2, .boya-qintai-screen .explore-hud h2 { color: #fff8e8; text-shadow: 0 2px 14px rgba(0,0,0,.92), 0 0 30px rgba(0,0,0,.6); }
  .boya-lake-screen .eyebrow, .boya-qintai-screen .eyebrow { font-size: .7rem; letter-spacing: .2em; }
  .boya-lake-screen .ink-progress, .boya-qintai-screen .ink-progress { justify-self: start; padding: 8px 12px; }
  .boya-lake-screen .anchor-nav, .boya-qintai-screen .anchor-nav { top: auto; bottom: 22px; left: 16px; }
  .boya-qin-screen::before { inset: 8px; }
  .boya-string-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .boya-theme-choice { grid-template-columns: 1fr; }
  .boya-qin-panel { padding: 16px; }
  .verify-form { grid-template-columns: 1fr; }
  .verify-table div { grid-template-columns: 1fr; gap: 4px; }
}
