:root {
  color-scheme: dark;
  --gold: #efd59a;
  --gold-strong: #ffe7ae;
  --ink: #07090e;
  --text: #f7f1e7;
  --soft: rgba(247, 241, 231, .66);
  --line: rgba(239, 213, 154, .28);
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif;
  --sans: "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #03050a; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

#game {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
  color: var(--text);
  font-family: var(--serif);
  background: radial-gradient(circle at 50% 30%, #182038, #03050a 70%);
}

.stage, .scene { position: absolute; inset: 0; }
.scene {
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.035);
  transition: opacity 1.2s ease, transform 4s ease;
}
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 5, 10, .52), transparent 42%, rgba(3, 5, 10, .18)),
    linear-gradient(0deg, rgba(3, 5, 10, .82), transparent 54%);
}
.scene-opening { background: #020308; }
.scene-hall { background-image: url("assets/scenes/heart-domain-hall-keyframe.webp"); }
.scene-platform { background-image: url("assets/scenes/heart-domain-platform.jpg"); }
.scene-portal { background-image: url("assets/scenes/heart-domain-portal.png"); }
.scene-gallery { background-image: url("assets/scenes/heart-domain-gallery.jpg"); }
.scene-transit { background-image: radial-gradient(circle, #c9e5ff 0 3%, #728fc7 10%, #172548 32%, #03050a 72%); }
#game[data-scene="opening"] .scene-opening,
#game[data-scene="hall"] .scene-hall,
#game[data-scene="platform"] .scene-platform,
#game[data-scene="portal"] .scene-portal,
#game[data-scene="gallery"] .scene-gallery,
#game[data-scene="transit"] .scene-transit { opacity: 1; transform: scale(1); }

.story-keyframe {
  position: absolute;
  z-index: 8;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.025);
  transition: opacity .75s ease, transform 2.8s ease;
  pointer-events: none;
}
.story-keyframe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,5,10,.42), transparent 48%), linear-gradient(0deg, rgba(3,5,10,.72), transparent 52%);
}
.keyframe-identity { background-image: url("assets/scenes/identity-load-keyframe.webp"); }
.keyframe-passage { background-image: url("assets/scenes/passage-forming-keyframe.webp"); }
.keyframe-siyan { background-image: url("assets/scenes/siyan-door-keyframe.webp"); background-position: center 42%; }
.keyframe-gold-anchor { background-image: url("assets/scenes/gold-anchor-hand-keyframe.webp"); background-position: center 46%; }
#game[data-presentation="identity"] .keyframe-identity,
#game[data-presentation="passage-forming"] .keyframe-passage,
#game[data-presentation="mystery-reveal"] .keyframe-siyan,
#game[data-presentation="gold-anchor"] .keyframe-gold-anchor { opacity: 1; transform: scale(1); }
#game[data-presentation="identity"] .system-actor,
#game[data-presentation="passage-forming"] .system-actor,
#game[data-presentation="mystery-reveal"] .mystery-actor,
#game[data-presentation="gold-anchor"] .mystery-actor { opacity: 0; }

.system-dialogue-video-layer,
.male-dialogue-video-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity .45s ease;
  pointer-events: none;
}
.system-dialogue-video-layer::after,
.male-dialogue-video-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,5,10,.42), transparent 48%), linear-gradient(0deg, rgba(3,5,10,.72), transparent 52%);
}
.system-dialogue-video-layer video,
.male-dialogue-video-layer video { width: 100%; height: 100%; object-fit: cover; }
#game[data-system-video="true"] .system-dialogue-video-layer { opacity: 1; }
#game[data-system-video="true"] .system-actor { opacity: 0; }
#game[data-presentation="mystery-dialogue"] .male-dialogue-video-layer,
#game[data-presentation="gallery-dialogue"] .male-dialogue-video-layer { opacity: 1; }
#game[data-presentation="mystery-dialogue"] .mystery-actor,
#game[data-presentation="gallery-dialogue"] .mystery-actor { opacity: 0; }

.grain {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  animation: grain 9s steps(2) infinite;
}
@keyframes grain { 50% { transform: translate3d(4%, -3%, 0); } }

.star-lines { position: absolute; inset: 0; opacity: 0; transition: opacity .7s; }
.star-lines i { position: absolute; left: 51%; top: 45%; width: 1px; height: 44vmax; transform-origin: top; background: linear-gradient(rgba(255,255,255,.9), transparent); }
.star-lines i:nth-child(2) { transform: rotate(47deg); }
.star-lines i:nth-child(3) { transform: rotate(132deg); }
.star-lines i:nth-child(4) { transform: rotate(228deg); }
#game[data-scene="transit"] .star-lines { opacity: .75; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity: .24; transform: scale(1.1); } }

.hud {
  position: absolute;
  z-index: 20;
  top: max(18px, env(safe-area-inset-top));
  left: max(24px, calc(env(safe-area-inset-left) + 10px));
  display: flex;
  align-items: center;
  gap: 22px;
  transition: opacity .25s;
}
.hud div { display: flex; gap: 10px; align-items: baseline; }
.hud span, .hud b, .countdown { letter-spacing: .2em; }
.hud span { font: 9px/1 var(--mono); color: rgba(255,255,255,.46); }
.hud b { font-size: 16px; font-weight: 500; }
.countdown { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.2); color: var(--gold); font: 11px/1 var(--mono); }

.story-controls {
  position: absolute;
  z-index: 30;
  top: max(12px, env(safe-area-inset-top));
  right: max(18px, calc(env(safe-area-inset-right) + 8px));
  display: flex;
  gap: 2px;
}
.story-controls button, .review-panel button {
  min-width: 48px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.58);
  font: 11px/1 var(--sans);
  cursor: pointer;
}
.story-controls button:hover, .story-controls button:focus-visible, .story-controls button[aria-pressed="true"] { color: var(--gold-strong); background: rgba(255,255,255,.06); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 2px; }

.start-card {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  background: radial-gradient(circle at 50% 38%, rgba(67,82,117,.22), transparent 35%), #03050a;
}
.start-card::before { content: ""; width: 1px; height: 54px; background: linear-gradient(transparent, var(--gold)); }
.start-card span, .transition span, .registration header span, .anchor-action > span, .world-route header span { color: rgba(239,213,154,.68); font: 9px/1 var(--mono); letter-spacing: .26em; }
.start-card h1 { margin: 18px 0 10px; font-size: clamp(28px, 4vw, 48px); font-weight: 400; letter-spacing: .18em; }
.start-card p { margin: 0 0 24px; color: var(--soft); font-size: 12px; letter-spacing: .08em; }
.start-card button, #sign-button, #enter-world {
  min-width: 144px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(239,213,154,.66);
  border-radius: 6px;
  background: linear-gradient(135deg, #f4d999, #c99f55);
  color: #16120b;
  font: 13px/1 var(--serif);
  letter-spacing: .12em;
  cursor: pointer;
}

.dialogue {
  position: absolute;
  z-index: 24;
  left: max(6vw, calc(env(safe-area-inset-left) + 22px));
  right: 34vw;
  bottom: max(7vh, calc(env(safe-area-inset-bottom) + 24px));
  min-height: 118px;
  padding: 12px 28px 10px 0;
  text-shadow: 0 2px 12px #000, 0 1px 3px #000;
  cursor: pointer;
  transition: opacity .25s;
}
.dialogue::before { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 1px; background: var(--gold); }
.dialogue b { display: block; min-height: 20px; margin: 0 0 10px; color: var(--gold-strong); font-size: 14px; font-weight: 500; letter-spacing: .16em; }
.dialogue p { max-width: 760px; margin: 0; font-size: clamp(15px, 1.45vw, 19px); line-height: 1.85; letter-spacing: .045em; }
.dialogue i { display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: rotate(45deg); opacity: 0; }
.dialogue.is-complete i { opacity: 1; animation: mark 1s ease infinite; }
@keyframes mark { 50% { transform: translateY(4px) rotate(45deg); } }

.system-actor {
  position: absolute;
  z-index: 10;
  right: 8vw;
  bottom: -4vh;
  width: min(34vw, 430px);
  height: 72vh;
  margin: 0;
  opacity: 0;
  transform: translate3d(8vw, 3vh, 0) scale(.86);
  transition: opacity .75s, transform .9s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.system-actor.is-visible { opacity: 1; transform: none; }
.system-actor img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 22px rgba(170,202,255,.42)); }

.mystery-actor { position: absolute; z-index: 9; right: 12vw; bottom: -1vh; width: min(38vw, 510px); height: 84vh; margin: 0; opacity: 0; transform: translateY(7%); transition: 1.1s ease; filter: brightness(.38) contrast(1.2) drop-shadow(0 0 30px #fff7); pointer-events: none; }
.mystery-actor img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.mystery-actor.is-visible { opacity: 1; transform: none; }
.mystery-actor.is-revealed { filter: brightness(.92) contrast(1.04) drop-shadow(0 0 28px #fff4); }

.anomaly-screen {
  position: absolute;
  z-index: 8;
  left: 11vw;
  top: 14vh;
  width: 52vw;
  aspect-ratio: 16/9;
  overflow: hidden;
  opacity: 0;
  border: 1px solid rgba(172,214,255,.42);
  box-shadow: inset 0 0 50px #8ab8ff33, 0 0 60px #70a5ff24;
  transform: perspective(900px) rotateY(5deg) scale(.92);
  transition: .7s;
  pointer-events: none;
}
.anomaly-screen.is-visible { opacity: .94; transform: perspective(900px) rotateY(5deg); }
.anomaly-screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) contrast(1.1); }
.anomaly-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, #a7d3ff0b 4px); }
.rift-scan { position: absolute; inset: -30% 49% -10%; border-left: 1px solid #d9efff; transform: rotate(8deg); filter: drop-shadow(0 0 8px #b9ddff); }
.data-stream { position: absolute; color: rgba(197,225,255,.72); font: 8px/1.8 var(--mono); letter-spacing: .14em; }
.data-a { right: 2%; top: 5%; }.data-b { left: 2%; bottom: 4%; }

.identity-stream { position: absolute; z-index: 8; inset: 14% 23% 25%; opacity: 0; transform: scale(.9); transition: .7s; pointer-events: none; }
.identity-stream.is-visible { opacity: 1; transform: none; }
.identity-stream::before { content: ""; position: absolute; inset: 8%; border: 1px solid #c8e4ff55; border-radius: 50%; box-shadow: 0 0 70px #b5d7ff22; animation: spin 16s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.identity-stream article { position: absolute; width: 150px; padding: 12px; border-left: 1px solid #d9ebff88; background: linear-gradient(90deg, #cce6ff18, transparent); backdrop-filter: blur(4px); }
.identity-stream article:nth-child(1) { left: 2%; top: 16%; }.identity-stream article:nth-child(2) { right: 2%; top: 31%; }.identity-stream article:nth-child(3) { left: 24%; bottom: 3%; }
.identity-stream span { display: block; color: #c8deff88; font: 8px/1 var(--mono); letter-spacing: .18em; }.identity-stream b { display: block; margin-top: 8px; font-size: 13px; font-weight: 400; }

.registration {
  position: absolute;
  z-index: 50;
  left: 50%; top: 50%;
  width: min(680px, calc(100% - 48px));
  max-height: calc(100% - 36px);
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 28px 34px 30px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(22,25,34,.96), rgba(6,8,13,.97));
  box-shadow: 0 30px 90px #000c, inset 0 0 0 3px #ffffff08;
  backdrop-filter: blur(18px);
}
.registration header { position: relative; padding-bottom: 18px; border-bottom: 1px solid #ffffff15; }
.registration h2 { margin: 10px 0 0; font-size: 22px; font-weight: 500; letter-spacing: .13em; }
.registration header em { position: absolute; right: 0; bottom: 20px; color: var(--gold); font: normal 10px/1 var(--mono); letter-spacing: .1em; }
.registration ol { display: grid; gap: 8px; margin: 18px 0 12px; padding: 0; list-style: none; }
.registration li { display: flex; gap: 14px; align-items: center; min-height: 32px; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.55; }
.registration li b { color: var(--gold); font: 10px/1 var(--mono); }
.registration-note { margin: 10px 0 16px; color: rgba(255,255,255,.5); font: 11px/1.6 var(--sans); }
.registration dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 18px; border-top: 1px solid #ffffff12; border-left: 1px solid #ffffff12; }
.registration dl div { display: flex; justify-content: space-between; padding: 10px 12px; border-right: 1px solid #ffffff12; border-bottom: 1px solid #ffffff12; }
.registration dt { color: rgba(255,255,255,.48); font: 10px/1.4 var(--sans); }.registration dd { margin: 0; color: var(--gold); font: 10px/1.4 var(--mono); }
.registration label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }.registration label span { color: rgba(255,255,255,.42); font: 10px/1 var(--mono); }
.name-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.name-row input { min-width: 0; height: 46px; padding: 0 14px; border: 1px solid #ffffff28; border-radius: 6px; color: #fff; background: rgba(0,0,0,.3); font-family: var(--serif); }
.name-row input::placeholder { color: #ffffff4d; }.name-error { min-height: 16px; margin: 7px 0 0; color: #ff9aa6; font: 11px/1.4 var(--sans); }

.anchor-action { position: absolute; z-index: 45; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; background: rgba(2,4,8,.58); backdrop-filter: blur(9px); }
.anchor-object { position: relative; display: block; width: 86px; height: 116px; filter: drop-shadow(0 0 20px currentColor); }
.anchor-object::before, .anchor-object::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%) rotate(45deg); border: 1px solid currentColor; }
.anchor-object::before { top: 5px; width: 56px; height: 56px; background: linear-gradient(135deg, transparent, #fff9); }
.anchor-object::after { top: 45px; width: 22px; height: 60px; border-top: 0; }
.anchor-object i { position: absolute; left: 50%; top: 32px; width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg); background: #fff; box-shadow: 0 0 18px #fff; }
.anchor-object.silver { color: #cfe5ff; }.anchor-object.gold { color: #ffd47f; }
.anchor-action h2 { margin: 12px 0 6px; font-size: 21px; font-weight: 400; letter-spacing: .12em; }
.anchor-action p { margin: 0 0 12px; color: var(--soft); font-size: 12px; }
#hold-button { position: relative; width: 100px; height: 100px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
#hold-button svg { position: absolute; inset: 0; transform: rotate(-90deg); }
#hold-button circle { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 2; }
#hold-progress { stroke: var(--gold) !important; stroke-width: 3 !important; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; }
#hold-button b { position: relative; z-index: 1; font-size: 13px; font-weight: 400; letter-spacing: .16em; }

.anchor-catch { position: absolute; z-index: 48; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, #fff2 0, transparent 34%); }
#catch-button { width: 220px; height: 220px; display: grid; place-content: center; justify-items: center; gap: 6px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
#catch-button .anchor-object { animation: catch 1.6s ease-in-out infinite; }
#catch-button b { color: var(--gold-strong); font-size: 13px; font-weight: 400; letter-spacing: .18em; }
@keyframes catch { 50% { transform: translateY(-13px) scale(1.03); } }

.transition { position: absolute; z-index: 60; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; background: #03050a; }
.transition::before, .transition::after { content: ""; width: min(320px, 44vw); height: 1px; margin: 25px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.transition h2 { order: 2; margin: 0; font-size: clamp(28px, 5vw, 58px); font-weight: 300; letter-spacing: .22em; }.transition span { order: 1; }.transition p { order: 3; margin: 0; color: var(--soft); font-size: 12px; letter-spacing: .16em; }.transition::before { order: 0; }.transition::after { order: 4; }

.world-route { position: absolute; z-index: 70; inset: 0; padding: max(28px, env(safe-area-inset-top)) max(38px, calc(env(safe-area-inset-right) + 14px)) max(24px, env(safe-area-inset-bottom)); background: #090a0f; overflow: hidden; }
.world-route > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: saturate(.45) brightness(.55); }
.world-route::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #07080e 0 12%, transparent 55%, #07080ecc), linear-gradient(0deg, #07080eee, transparent 62%); pointer-events: none; }
.world-route header, .route-list, #enter-world { position: relative; z-index: 1; }
.world-route header { margin-left: 2vw; }.world-route h2 { margin: 8px 0 5px; font-size: 25px; font-weight: 400; letter-spacing: .12em; }.world-route header p { margin: 0; color: var(--soft); font-size: 11px; }.world-route header p b { color: var(--gold); font: 10px/1 var(--mono); }
.route-list { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 10px; margin-top: clamp(24px, 7vh, 70px); }
.route-card { position: relative; min-width: 0; height: min(47vh, 390px); padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; background: #10131a; color: #fff; text-align: left; filter: grayscale(.9); opacity: .55; cursor: not-allowed; }
.route-card > i { position: absolute; z-index: 2; top: 10px; left: 10px; color: #fff8; font: normal 9px/1 var(--mono); }.route-card > b, .route-card > em { position: absolute; z-index: 2; left: 12px; right: 8px; }.route-card > b { bottom: 32px; font-size: 16px; font-weight: 400; letter-spacing: .12em; }.route-card > em { bottom: 13px; color: #ffffff73; font: normal 9px/1 var(--sans); }
.route-visual { position: absolute; inset: 0; background-position: center; background-size: cover; transform: scale(1.02); }
.route-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #080a10 8%, transparent 70%); }
.route-visual.entertainment { background-image: url("../assets/world-route-final.jpg"); background-position: 5% 50%; }.route-visual.palace { background-image: url("../assets/world-route.jpg"); background-position: 15% 50%; }.route-visual.fantasy { background-image: url("../assets/world-route.jpg"); background-position: 32% 50%; }.route-visual.republic { background-image: url("../assets/world-route.jpg"); background-position: 50% 50%; }.route-visual.immortal { background-image: url("../assets/world-route.jpg"); background-position: 70% 50%; }.route-visual.doomsday { background-image: url("../assets/world-route.jpg"); background-position: 90% 50%; }
.route-card.is-open { filter: none; opacity: 1; cursor: pointer; border-color: rgba(239,213,154,.38); }.route-card.is-open:hover, .route-card.is-open:focus-visible, .route-card.is-selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(239,213,154,.2); }.route-card.is-selected { transform: translateY(-5px); }
#enter-world { float: right; margin-top: 18px; }

/* 旧版六世界成图直接作为可见界面；下方按钮只提供原卡位热区与选中反馈。 */
.world-route { padding: 0; }
.world-route > img { opacity: 1; filter: none; object-position: 50% 40%; }
.world-route::after { background: linear-gradient(0deg, rgba(3,5,10,.42), transparent 22%); }
.world-route header { position: absolute; visibility: hidden; pointer-events: none; }
.world-route .route-list {
  position: absolute;
  z-index: 2;
  left: 12.4%;
  right: 12.4%;
  top: 21%;
  bottom: 18%;
  display: grid;
  grid-template-columns: 1.6fr repeat(5, 1fr);
  gap: .85%;
  margin: 0;
  overflow: visible;
}
.world-route .route-card {
  width: auto;
  height: auto;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  opacity: 1;
  filter: none;
}
.world-route .route-card > * { visibility: hidden; }
.world-route .route-card:hover, .world-route .route-card:focus-visible { border-color: rgba(255,255,255,.46); background: rgba(255,255,255,.025); }
.world-route .route-card.is-selected { transform: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(239,213,154,.18), inset 0 0 30px rgba(239,213,154,.08); }
.world-route #enter-world { position: absolute; z-index: 3; right: max(24px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); margin: 0; }

.review-panel { position: absolute; z-index: 90; top: 0; right: 0; width: min(520px, 90vw); height: 100%; padding: 22px 26px; overflow: auto; border-left: 1px solid var(--line); background: rgba(7,9,14,.97); box-shadow: -20px 0 70px #000a; backdrop-filter: blur(20px); }
.review-panel header { position: sticky; top: -22px; display: flex; align-items: center; justify-content: space-between; margin: -22px -10px 14px; padding: 22px 10px 12px; background: #080a0fef; }.review-panel h2 { margin: 0; font-size: 18px; font-weight: 400; }.review-panel button { min-width: 44px; font-size: 26px; }.review-panel ol { margin: 0; padding: 0; list-style: none; }.review-panel li { padding: 12px 0; border-bottom: 1px solid #ffffff10; font-size: 13px; line-height: 1.65; }.review-panel li b { display: block; margin-bottom: 3px; color: var(--gold); font-size: 11px; font-weight: 400; }
.toast { position: absolute; z-index: 100; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 14px; border: 1px solid #ffffff22; border-radius: 4px; background: rgba(4,6,10,.88); color: #ffffffe0; font: 11px/1.4 var(--sans); backdrop-filter: blur(10px); }

#game.ui-hidden .hud, #game.ui-hidden .dialogue { opacity: 0; pointer-events: none; }
#game[data-mode="registration"] .system-actor { opacity: 0; visibility: hidden; transition: none; }
#game[data-mode="registration"] .story-controls, #game[data-mode="hold"] .story-controls, #game[data-mode="catch"] .story-controls, #game[data-mode="transition"] .story-controls, #game[data-mode="route"] .story-controls { opacity: 0; pointer-events: none; }

@media (max-width: 900px), (max-height: 560px) {
  .hud { top: max(8px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); }.hud b { font-size: 14px; }.hud span { display: none; }
  .story-controls { top: max(4px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); }
  .story-controls button { min-width: 44px; }
  .dialogue { left: max(5vw, calc(env(safe-area-inset-left) + 14px)); right: 31vw; bottom: max(3vh, calc(env(safe-area-inset-bottom) + 10px)); min-height: 92px; padding-top: 9px; }
  .dialogue b { min-height: 15px; margin-bottom: 5px; font-size: 12px; }.dialogue p { font-size: 13px; line-height: 1.7; }
  .system-actor { right: 2vw; bottom: -8vh; width: 34vw; height: 78vh; }
  .mystery-actor { right: 4vw; height: 90vh; }
  .anomaly-screen { left: 7vw; top: 13vh; width: 58vw; }
  .identity-stream { inset: 10% 18% 22%; }.identity-stream article { width: 125px; padding: 8px; }
  .registration { width: min(650px, calc(100% - 32px)); max-height: calc(100% - 22px); padding: 17px 24px 18px; }
  .registration header { padding-bottom: 11px; }.registration h2 { margin-top: 7px; font-size: 17px; }.registration header em { bottom: 12px; }
  .registration ol { gap: 3px; margin: 10px 0 6px; }.registration li { min-height: 22px; font-size: 11px; }.registration-note { margin: 4px 0 8px; font-size: 9px; }
  .registration dl { margin-bottom: 9px; }.registration dl div { padding: 6px 9px; }.registration label { margin-bottom: 5px; }.name-row input, .start-card button, #sign-button { height: 44px; }
  .anchor-action .anchor-object { transform: scale(.65); margin: -17px 0; }.anchor-action h2 { margin: 5px 0 3px; font-size: 17px; }.anchor-action p { margin-bottom: 2px; }.anchor-action #hold-button { width: 84px; height: 84px; }
  .world-route { padding: 0; }.world-route .route-list { left: 12.4%; right: 12.4%; top: 21%; bottom: 23%; grid-template-columns: repeat(6, 1fr); gap: .85%; padding: 0; overflow: visible; }.world-route .route-card { height: auto; }.world-route #enter-world { height: 44px; right: max(14px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) and (orientation: landscape) {
  .registration { left: 16px; right: 16px; width: auto; transform: translateY(-50%); }.registration dl { grid-template-columns: repeat(4, 1fr); }.registration dl div { display: block; }.registration dd { margin-top: 3px; }
  .world-route { padding: 0; }.world-route .route-list { grid-template-columns: repeat(6, 1fr); }
}

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

/* V1.122 alignment: C59 story HUD, C10 dialogue, C89 hold QTE, C95/C97 immersive states. */
html, body, #game { height: 100dvh; }
#game { min-height: 0; }

.hud {
  inset: max(6px, env(safe-area-inset-top)) max(24px, calc(env(safe-area-inset-right) + 10px)) auto max(24px, calc(env(safe-area-inset-left) + 10px));
  height: 44px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.hud-left { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.hud-left strong { font: 600 14px/1 var(--serif); letter-spacing: .1em; }
.hud-left > span { color: rgba(255,255,255,.62); font: 400 14px/1 var(--serif); letter-spacing: .08em; }
.hud-center { min-width: 1px; }
.countdown { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.2); color: var(--gold); font: 500 10px/1 var(--mono); letter-spacing: .08em; }
.story-controls { position: static; justify-self: end; display: flex; align-items: center; gap: 8px; }
.story-controls button {
  width: 52px;
  height: 44px;
  min-width: 52px;
  min-height: 44px;
  padding: 0;
  display: grid;
  grid-template-rows: 26px auto;
  place-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.62);
  font: 500 11px/1 var(--serif);
}
.story-controls button span { display: block; }
.story-controls svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.story-controls #auto-button svg { fill: currentColor; stroke: none; }
.story-controls button:hover, .story-controls button:focus-visible, .story-controls button[aria-pressed="true"] { color: var(--gold-strong); background: transparent; }

.dialogue {
  left: clamp(82px, 22vw, 430px);
  right: clamp(74px, 13vw, 270px);
  bottom: max(56px, calc(env(safe-area-inset-bottom) + 24px));
  width: auto;
  min-height: calc(21.6px + 12px + 76px);
  padding: 0;
  text-shadow: 0 2px 12px #000, 0 1px 3px #000;
  cursor: default;
}
.dialogue::before { border: 0; }
.dialogue > b {
  display: block;
  min-height: 21.6px;
  margin: 0 0 12px;
  color: #e4bd6e;
  font: 600 18px/21.6px var(--serif);
  letter-spacing: .12em;
}
.dialogue > b:empty { visibility: hidden; }
.dialogue > p { display: block; height: 76px; margin: 0; overflow: hidden; color: #f3efe8; font: 500 20px/38px var(--serif); letter-spacing: .015em; }
.dialogue .wq-dialogue-line-reserved { visibility: hidden; }
.dialogue > i {
  width: 0;
  height: 0;
  margin-left: 12px;
  border: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
  transform: none;
  opacity: 0;
  vertical-align: -.12em;
}
.dialogue:not(.is-typing) > i:not([hidden]) { opacity: 1; animation: cue-pulse 1s ease infinite; }
@keyframes cue-pulse { 50% { opacity: .45; transform: translateX(3px); } }
.dialogue.wq-dialogue-readability::before { z-index: -1; }

.registration {
  width: min(960px, calc(100% - 48px));
  padding: 24px;
  border-radius: 0;
  background: rgba(7,9,14,.94);
  box-shadow: 0 30px 90px #000c;
}
.registration h2 { font-size: 22px; font-weight: 600; }
.registration label { font-size: 14px; }
.name-row { gap: 12px; }
.name-row input { height: 48px; padding: 0 12px; font-size: 14px; }
#sign-button { height: 48px; padding-inline: 16px; font-size: 14px; }
.name-error { min-height: 16px; margin-top: 4px; font-size: 11px; }

.anchor-action { align-content: center; padding: 16px; }
.hold-track { position: relative; width: min(560px, 68vw); height: 24px; margin: 12px 0 4px; overflow: hidden; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; background: rgba(3,4,8,.72); }
.hold-track::before { position: absolute; left: 72%; top: 0; bottom: 0; width: 18%; border-left: 1px dashed #5eead4; border-right: 1px dashed #5eead4; background: rgba(94,234,212,.16); content: ""; }
.hold-track i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--gold), #ff8e9c); opacity: .82; }
.hold-track b { position: absolute; left: 0; top: 50%; width: 22px; height: 22px; border: 3px solid #11131a; border-radius: 50%; background: var(--gold); transform: translate(-50%,-50%); box-shadow: 0 0 0 5px rgba(255,212,121,.14); }
#hold-button {
  width: min(560px, 68vw);
  height: 64px;
  margin-top: 12px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid rgba(239,213,154,.72);
  border-radius: 6px;
  background: linear-gradient(90deg,rgba(239,213,154,.96),rgba(239,213,154,.78));
  color: #17130b;
}
#hold-button::before { content: ""; }
#hold-button svg { display: none; }
#hold-button b { font: 600 16px/1.2 var(--serif); }
#hold-button small { justify-self: end; font: 600 10px/1.2 var(--mono); opacity: .68; }
#hold-button:active { transform: translateY(1px); }
.anchor-action.is-failed .hold-track i { background: #ff8e9c; }

.transition {
  background: #000;
  opacity: 0;
  transition: opacity 520ms ease;
}
.transition.is-visible { opacity: 1; }
.transition::before, .transition::after { display: none; }
.transition span { order: initial; color: rgba(255,255,255,.55); font: 500 9px/1.2 var(--mono); letter-spacing: 7px; }
.transition h2 { order: initial; margin: 12px 0 0; font: 700 26px/1.2 var(--serif); letter-spacing: 8px; }
.transition p { order: initial; margin: 12px 0 0; color: rgba(255,255,255,.62); font: 400 11px/1.5 var(--sans); letter-spacing: 3px; }

.review-panel {
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 24px max(48px, 15vw) 48px;
  border: 0;
  background: rgba(3,4,8,.88);
  box-shadow: none;
  backdrop-filter: blur(18px);
}
.review-panel header { top: -24px; margin: -24px 0 24px; padding: 24px 0 12px; background: rgba(3,4,8,.82); }
.review-panel h2 { font: 600 22px/1.2 var(--serif); }
.review-panel button { width: 44px; height: 44px; }
.review-panel li { padding: 0 0 24px; border: 0; font: 400 16px/1.8 var(--serif); }
.review-panel li b { margin-bottom: 8px; color: var(--gold); font: 500 14px/1.4 var(--serif); }

.orientation-guard {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  background: #05060a;
  color: var(--text);
  text-align: center;
}
.orientation-guard svg { width: 64px; height: 64px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.orientation-guard span { margin-top: 24px; color: var(--gold); font: 500 9px/1.2 var(--mono); letter-spacing: .18em; }
.orientation-guard h2 { margin: 12px 0 0; font: 600 20px/1.2 var(--serif); letter-spacing: .08em; }
.orientation-guard p { margin: 12px 0 0; color: var(--soft); font: 400 11px/1.5 var(--sans); }

#game.ui-hidden .hud, #game.ui-hidden .dialogue { opacity: 0; pointer-events: none; }

@media (max-width: 1000px), (max-height: 560px) {
  .scene-hall { background-position: center 52%; }
  .keyframe-identity { background-position: center 48%; }
  .keyframe-passage { background-position: center 48%; }
  .keyframe-siyan { background-position: center 44%; }
  .keyframe-gold-anchor { background-position: center 46%; }
  .hud { inset: max(2px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) auto max(14px, env(safe-area-inset-left)); height: 44px; gap: 8px; }
  .hud-left { gap: 8px; }
  .hud-left strong, .hud-left > span { display: inline; font-size: 13px; }
  .countdown { padding-left: 8px; font-size: 10px; }
  .story-controls { gap: 6px; }
  .story-controls button { width: 44px; min-width: 44px; height: 44px; grid-template-rows: 22px auto; font-size: 10px; }
  .story-controls button span { display: block; }
  .story-controls svg { width: 22px; height: 22px; }
  .dialogue { left: max(64px, calc(env(safe-area-inset-left) + 36px), 16vw); right: max(24px, calc(env(safe-area-inset-right) + 14px), 4vw); bottom: max(56px, calc(env(safe-area-inset-bottom) + 24px)); width: auto; min-height: calc(20px + 8px + 56px); padding: 0; }
  .dialogue > b { min-height: 20px; margin-bottom: 8px; font-size: 14px; line-height: 16.8px; }
  .dialogue > p { height: 56px; font-size: 16px; line-height: 28px; }
  .dialogue > i { margin-left: 10px; border-top-width: 7px; border-bottom-width: 7px; border-left-width: 10px; }
  .registration { width: calc(100% - 28px); max-height: calc(100% - 28px); padding: 16px; }
  .registration h2 { font-size: 18px; }
  .registration label, .name-row input, #sign-button { font-size: 13px; }
  .name-row input, #sign-button { height: 44px; }
  .name-row { gap: 8px; }
  .hold-track, #hold-button { width: min(620px, calc(100vw - 64px)); }
  #hold-button { height: 56px; margin-top: 8px; }
  .transition h2 { font-size: 22px; letter-spacing: 5px; }
  .transition p { font-size: 10px; letter-spacing: 2px; }
  .review-panel { padding: 16px max(36px, 5vw) 32px; }
  .review-panel header { top: -16px; margin-top: -16px; padding-top: 16px; }
  .review-panel h2 { font-size: 18px; }
  .review-panel li { padding-bottom: 24px; font-size: 14px; }
  .review-panel li b { font-size: 13px; }
  .world-route .route-list { top: 21%; bottom: 18%; grid-template-columns: 1.6fr repeat(5, 1fr); }
}

@media (orientation: portrait) and (pointer: coarse), (orientation: portrait) and (max-width: 820px) {
  #orientation-guard { display: grid !important; }
}

/* V1.124 · 新开场全屏叙事、系统立绘与闭合圆环玩法 */
.scene-worlds { background-image: url("assets/scenes/opening-star-sea.jpg"); }
#game[data-scene="worlds"] .scene-worlds { opacity: 1; transform: scale(1); }

.opening-film {
  position: absolute;
  z-index: 120;
  inset: 0;
  overflow: hidden;
  background: #03050b url("assets/scenes/opening-star-sea.jpg") center / cover no-repeat;
}
.opening-film::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,4,10,.08), rgba(2,4,10,.28) 72%, rgba(2,4,10,.72));
  pointer-events: none;
}
.opening-film__visual { position: absolute; inset: -5%; transform: scale(1.04); }
.opening-film__visual::before,
.opening-film__visual::after,
.opening-film__visual i {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(230,240,255,.88);
  box-shadow: 0 0 14px rgba(188,211,255,.9);
  opacity: 0;
}
.opening-film__visual::before { left: 18%; top: 24%; width: 3px; height: 3px; }
.opening-film__visual::after { right: 21%; top: 31%; width: 4px; height: 4px; }
.opening-film__visual i:nth-child(1) { left: 35%; top: 60%; width: 2px; height: 2px; }
.opening-film__visual i:nth-child(2) { left: 72%; top: 70%; width: 3px; height: 3px; }
.opening-film__visual i:nth-child(3) { left: 53%; top: 17%; width: 2px; height: 2px; }
.opening-film.is-playing .opening-film__visual { animation: film-drift 4.6s cubic-bezier(.18,.72,.25,1) both; }
.opening-film.is-playing .opening-film__visual::before,
.opening-film.is-playing .opening-film__visual::after,
.opening-film.is-playing .opening-film__visual i { animation: film-stars 2.1s ease-in-out infinite alternate; }
.opening-film.is-playing { cursor: pointer; }
@keyframes film-drift { to { transform: scale(1.13) translate3d(-1.2%, -.8%, 0); filter: saturate(1.12) brightness(1.08); } }
@keyframes film-stars { 35%,100% { opacity: .9; transform: scale(1.8); } }
.film-start { position: absolute; z-index: 2; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; }
.film-start span { position: absolute; left: 50%; bottom: max(74px, calc(env(safe-area-inset-bottom) + 58px)); transform: translateX(-50%); color: rgba(255,255,255,.55); font: 500 9px/1 var(--mono); letter-spacing: .22em; white-space: nowrap; }
.film-start b { position: absolute; left: 50%; bottom: max(34px, calc(env(safe-area-inset-bottom) + 20px)); transform: translateX(-50%); color: rgba(255,255,255,.94); font: 500 14px/1 var(--serif); letter-spacing: .18em; text-shadow: 0 2px 14px #000; }
.film-start b::after { content: ""; display: block; width: 48px; height: 1px; margin: 12px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.film-start:focus-visible { outline: 1px solid rgba(239,213,154,.72); outline-offset: -8px; }
.film-skip {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  min-height: 44px;
  padding: 0 8px 13px;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.94);
  font: 500 14px/1.35 var(--serif);
  letter-spacing: .08em;
  text-shadow: 0 2px 14px #000;
  white-space: nowrap;
  cursor: pointer;
}
.film-skip::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 48px; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.film-skip:hover, .film-skip:focus-visible { color: var(--gold-strong); }
.film-skip:focus-visible { outline: 1px solid rgba(239,213,154,.72); outline-offset: 5px; }
#game[data-mode="film"] .hud { opacity: 0; pointer-events: none; }

@media (max-width: 1000px), (max-height: 560px) {
  .film-skip { bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px)); font-size: 12px; }
}

.explain-layer {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}
.explain-layer::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(34,49,83,.4), rgba(3,5,10,.05) 48%); }
.explain-orbits { position: relative; width: min(42vw, 520px); aspect-ratio: 1; opacity: .48; }
.explain-orbits i { position: absolute; inset: 13%; border: 1px solid rgba(205,224,255,.38); border-radius: 50%; animation: spin 18s linear infinite; }
.explain-orbits i:nth-child(2) { inset: 25%; border-color: rgba(239,213,154,.42); animation-direction: reverse; animation-duration: 13s; }
.explain-orbits i:nth-child(3) { inset: 36%; border-style: dashed; animation-duration: 9s; }
.explain-orbits b { position: absolute; inset: 45%; border: 1px solid rgba(239,213,154,.76); transform: rotate(45deg); box-shadow: 0 0 28px rgba(239,213,154,.38); }
.explain-layer > span, .explain-layer > strong { position: absolute; left: 50%; transform: translateX(-50%); text-shadow: 0 2px 16px #000; }
.explain-layer > span { top: 18%; color: rgba(239,213,154,.7); font: 500 9px/1 var(--mono); letter-spacing: .24em; }
.explain-layer > strong { top: calc(18% + 25px); font: 500 24px/1.2 var(--serif); letter-spacing: .18em; }
#game[data-presentation="world-passage"] .explain-layer,
#game[data-presentation="rift"] .explain-layer,
#game[data-presentation="resonance"] .explain-layer,
#game[data-presentation="invitation"] .explain-layer,
#game[data-presentation="anchor-bind"] .explain-layer { opacity: 1; }

.anomaly-screen { inset: 0; width: 100%; aspect-ratio: auto; border: 0; box-shadow: none; transform: scale(1.04); opacity: 0; }
.anomaly-screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72) contrast(1.08) brightness(.72); }
#game[data-presentation="anomaly"] .anomaly-screen,
#game[data-presentation="rift"] .anomaly-screen { opacity: .94; transform: scale(1); }
.identity-stream { inset: 0; opacity: 0; transform: scale(.94); }
.identity-stream::before { inset: 10% 24%; }
.identity-stream article:nth-child(1) { left: 16%; top: 22%; }
.identity-stream article:nth-child(2) { right: 16%; top: 35%; }
.identity-stream article:nth-child(3) { left: 36%; top: 40%; bottom: auto; }
#game[data-presentation="identity"] .identity-stream,
#game[data-presentation="another-life"] .identity-stream { opacity: 1; transform: none; }

.system-actor { right: -3vw; bottom: -11vh; width: min(52vw, 680px); height: 104vh; }
.system-actor[data-face="happy"] { animation: system-happy 2.6s ease-in-out infinite; }
.system-actor[data-face="confused"], .system-actor[data-face="unamused"] { transform: rotate(2.5deg); }
@keyframes system-happy { 50% { translate: 0 -8px; } }

#game.cinematic-only .hud,
#game.cinematic-only .dialogue { opacity: 0; pointer-events: none; }

.anchor-action { background: rgba(2,4,8,.74); backdrop-filter: blur(12px); }
.anchor-action h2 { margin: 8px 0 6px; }
.anchor-action p { min-height: 18px; margin: 0 0 8px; }
#hold-button {
  width: 144px;
  height: 144px;
  margin-top: 6px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
#hold-button svg { display: block; position: absolute; inset: 8px; width: 128px; height: 128px; transform: rotate(-90deg); }
#hold-button circle { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 2; }
#hold-progress { stroke: var(--gold) !important; stroke-width: 3 !important; stroke-linecap: round; stroke-dasharray: 346; stroke-dashoffset: 346; transition: stroke .2s ease; }
#hold-button .anchor-object { position: absolute; left: 50%; top: 50%; width: 72px; height: 92px; transform: translate(-50%,-50%) scale(.68); margin: 0; }
#hold-button:focus-visible { outline: 1px solid rgba(239,213,154,.72); outline-offset: 2px; }
.hold-help { margin-top: 8px; color: rgba(255,255,255,.48); font: 500 10px/1.2 var(--sans); }
.anchor-action.is-holding #hold-button { filter: drop-shadow(0 0 20px rgba(239,213,154,.28)); }
.anchor-action.is-confirming #hold-progress { animation: hold-confirm .7s linear infinite; }
.anchor-action.is-failed #hold-progress { stroke: #ff8e9c !important; }
@keyframes hold-confirm { to { transform: rotate(360deg); transform-origin: 64px 64px; } }

/* 选中反馈留在卡片内部，不再给卡位热区套大矩形框。 */
.world-route .route-card,
.world-route .route-card:hover,
.world-route .route-card:focus-visible,
.world-route .route-card.is-selected { border-color: transparent; box-shadow: none; background: transparent; outline: 0; }
.world-route .route-card.is-open::after { content: ""; position: absolute; left: 50%; bottom: 4%; width: 6px; height: 6px; border: 1px solid rgba(255,255,255,.52); transform: translateX(-50%) rotate(45deg); opacity: 0; transition: opacity .2s, box-shadow .2s, background .2s; }
.world-route .route-card.is-open:hover::after,
.world-route .route-card.is-open:focus-visible::after,
.world-route .route-card.is-selected::after { opacity: 1; border-color: var(--gold); background: var(--gold); box-shadow: 0 0 14px rgba(239,213,154,.78); }

/* The prologue ends here while the entertainment Demo is being rebuilt. */
.route-ending { position: absolute; z-index: 3; right: max(24px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 16px; }
#world-route-status { margin: 0; color: var(--gold); font: 14px/1.7 var(--serif); text-align: right; text-shadow: 0 2px 8px #000; }
#world-route-status span { display: block; color: #f2f2f2; font: 11px/1.5 var(--sans); }
.world-route .route-ending #enter-world { position: static; float: none; margin: 0; background: rgba(10,10,16,.88); border-color: rgba(255,255,255,.28); color: #f2f2f2; cursor: not-allowed; opacity: 1; }
@media (max-width: 1000px), (max-height: 560px) {
  .route-ending { right: max(14px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); gap: 12px; }
  #world-route-status { font-size: 13px; }
  #world-route-status span { font-size: 10px; }
}

@media (max-width: 1000px), (max-height: 560px) {
  .film-start span { bottom: max(52px, calc(env(safe-area-inset-bottom) + 40px)); font-size: 8.5px; }
  .film-start b { bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px)); font-size: 13px; }
  .system-actor { right: -1vw; bottom: -8vh; width: min(43vw, 360px); height: 88dvh; }
  .dialogue { width: auto; }
  .explain-orbits { width: min(40vw, 260px); }
  .explain-layer > span { top: 13%; font-size: 8.5px; }
  .explain-layer > strong { top: calc(13% + 20px); font-size: 18px; }
  .identity-stream::before { inset: 8% 28%; }
  .identity-stream article { width: 125px; padding: 8px; }
  .identity-stream article:nth-child(1) { left: 14%; top: 18%; }
  .identity-stream article:nth-child(2) { right: 14%; top: 28%; }
  .identity-stream article:nth-child(3) { left: 38%; top: 32%; bottom: auto; }
  #hold-button { width: 112px; height: 112px; }
  #hold-button svg { inset: 8px; width: 96px; height: 96px; }
  #hold-button .anchor-object { width: 58px; height: 78px; transform: translate(-50%,-50%) scale(.56); }
  .hold-help { margin-top: 4px; font-size: 10px; }
}

/* V1.131 · 紧凑横屏：闭环确认、登记书、对白位置与快捷操作清晰度 */
.anchor-action.is-confirming #hold-progress {
  stroke-dashoffset: 0 !important;
  animation: none;
  filter: drop-shadow(0 0 5px rgba(239,213,154,.72));
}

@media (max-width: 1000px), (max-height: 560px) {
  .story-controls button {
    color: rgba(255,255,255,.9);
    text-shadow: 0 1px 4px #000, 0 0 10px rgba(0,0,0,.9);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.82));
  }
  .story-controls button[aria-pressed="true"] { color: var(--gold-strong); }

  .dialogue {
    bottom: max(30px, calc(env(safe-area-inset-bottom) + 14px));
  }

  .registration {
    width: min(820px, calc(100% - 32px));
    max-height: calc(100% - 20px);
    padding: 14px 18px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(230px, .75fr);
    grid-template-areas:
      "header header"
      "rules data"
      "note data"
      "label label"
      "form form"
      "error error";
    column-gap: 22px;
    border-color: rgba(239,213,154,.22);
    background: linear-gradient(120deg, rgba(8,10,16,.97), rgba(13,15,23,.94));
    box-shadow: 0 24px 70px #000c, inset 0 1px rgba(255,255,255,.045);
  }
  .registration header { grid-area: header; }
  .registration ol { grid-area: rules; align-content: start; }
  .registration-note { grid-area: note; align-self: end; }
  .registration dl { grid-area: data; align-self: stretch; grid-template-columns: 1fr; margin: 10px 0 8px; }
  .registration dl div { min-height: 34px; align-items: center; }
  .registration label { grid-area: label; }
  .registration .name-row { grid-area: form; }
  .registration .name-error { grid-area: error; }

  #hold-button svg { overflow: visible; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .registration {
    left: 50%;
    right: auto;
    width: calc(100% - 24px);
    grid-template-columns: minmax(0, 1.15fr) minmax(210px, .85fr);
    column-gap: 14px;
    transform: translate(-50%, -50%);
  }
}

/* V1.134 · 稳定锚内部图形以独立位移居中，提示文字避开圆环 */
.anchor-object::before,
.anchor-object::after {
  translate: -50% 0;
  transform: rotate(45deg);
}

.anchor-object i {
  translate: -50% 0;
  transform: rotate(45deg);
}

.hold-help {
  position: relative;
  z-index: 2;
  margin-top: 16px;
}

@media (max-width: 1000px), (max-height: 560px) {
  .hold-help {
    margin-top: 18px;
  }
}

/* V1.133 · 剧情快捷操作图文收紧并补足顶部呼吸空间 */
.story-controls button {
  grid-template-rows: 26px auto;
  align-content: center;
  gap: 2px;
  padding-block: 2px;
}

@media (max-width: 1000px), (max-height: 560px) {
  .story-controls button {
    grid-template-rows: 22px auto;
    gap: 2px;
    padding-block: 2px;
  }
}

/* V1.132 · 紧凑横屏：快捷操作同色、异常数据避让与稳定锚同心 */
.story-controls button span {
  color: inherit;
  font: inherit;
}

#hold-button .anchor-object {
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  transform: none;
  scale: .68;
}

@media (max-width: 1000px), (max-height: 560px) {
  #game .story-controls button,
  #game .story-controls button span,
  #game .story-controls button svg {
    color: rgba(255,255,255,.9);
  }
  #game .story-controls button[aria-pressed="true"],
  #game .story-controls button[aria-pressed="true"] span,
  #game .story-controls button[aria-pressed="true"] svg {
    color: var(--gold-strong);
  }

  .data-a {
    top: max(64px, calc(env(safe-area-inset-top) + 58px));
    right: max(12px, calc(env(safe-area-inset-right) + 6px));
    text-align: right;
  }

  #hold-button .anchor-object {
    translate: -50% -50%;
    transform: none;
    scale: .56;
  }
}
