/* 叙事舞台：让场景承担氛围，界面只保留当下需要的动作。 */
.game-screen {
  position: relative;
  min-height: 100svh;
  padding: 0;
  color: #f5fbff;
  background: #102936;
  overflow-x: clip;
}

.game-topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 12;
  min-height: 82px;
  padding: 14px clamp(18px, 2.8vw, 54px);
  color: #fff;
  background: linear-gradient(180deg, rgba(7, 24, 34, .7), rgba(7, 24, 34, 0));
  border: 0;
  backdrop-filter: none;
}

.game-topbar .brand-compact,
.game-topbar .quiet-button {
  color: #fff;
}

.game-topbar .quiet-button {
  background: rgba(7, 28, 38, .28);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(14px);
}

.game-topbar .life-position span,
.game-topbar .life-position small,
.game-topbar .autosave-indicator {
  color: rgba(255, 255, 255, .7);
}

.game-grid {
  position: relative;
  display: block;
  width: 100%;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.scene-panel {
  position: absolute;
  inset: 0;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, #bdeee9, #b9ccf7);
  box-shadow: none;
}

.scene-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 23, 31, .08) 0%, rgba(4, 23, 31, .03) 38%, rgba(5, 22, 31, .7) 72%, rgba(5, 20, 29, .94) 100%),
    linear-gradient(180deg, rgba(4, 22, 31, .2), transparent 25%, transparent 66%, rgba(4, 20, 28, .74));
}

.scene-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(6, 24, 32, .6));
}

.stage-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.06) contrast(1.01);
  transform: scale(1.002);
}

#life-scene { display: none; }

.scene-heading {
  position: absolute;
  z-index: 4;
  top: 102px;
  left: clamp(20px, 3.5vw, 70px);
  right: auto;
  display: flex;
  gap: 10px;
  padding: 0;
  color: rgba(255, 255, 255, .82);
  text-shadow: 0 2px 16px rgba(8, 25, 34, .54);
}

.scene-heading .tiny-button {
  color: #fff;
  background: rgba(8, 29, 39, .28);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(12px);
}

.character-chip {
  position: absolute;
  z-index: 4;
  left: clamp(20px, 3.5vw, 70px);
  bottom: 58px;
  width: min(360px, calc(46vw - 40px));
  margin: 0;
  padding: 10px 13px;
  color: #fff;
  background: rgba(8, 30, 39, .34);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  box-shadow: none;
  backdrop-filter: blur(15px);
}

.character-chip small { color: rgba(255, 255, 255, .7); }
.character-chip em { display: none; }

.stage-track {
  position: absolute;
  z-index: 4;
  left: clamp(20px, 3.5vw, 70px);
  bottom: 28px;
  width: min(360px, calc(46vw - 40px));
  margin: 0;
}

.stage-dot { height: 3px; background: rgba(255, 255, 255, .28); }
.stage-dot.is-done { background: rgba(255, 255, 255, .66); }
.stage-dot.is-current { background: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, .72); }

.event-panel {
  position: relative;
  z-index: 3;
  width: min(50vw, 760px);
  min-height: 100svh;
  margin-left: auto;
  padding: clamp(116px, 13vh, 152px) clamp(50px, 5vw, 96px) 112px clamp(34px, 4.3vw, 78px);
  color: #f5fbff;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.event-content { max-width: 610px; margin: 0; }
.story-view { position: relative; }

.story-age {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-height: 0;
  margin: 0 0 12px;
  color: #fff;
}

.story-age strong {
  font-size: clamp(52px, 5.4vw, 78px);
  line-height: .82;
  letter-spacing: -.075em;
  text-shadow: 0 10px 32px rgba(1, 11, 17, .28);
}

.story-age > span { color: #65ead7; font-size: 17px; }
.story-age small { margin-left: 12px; color: rgba(255, 255, 255, .62); font-size: 11px; letter-spacing: .16em; }

.story-overline {
  margin: 22px 0 8px;
  color: #75ead9;
  font-size: 10px;
  letter-spacing: .18em;
}

.event-title {
  max-width: 590px;
  margin-bottom: 14px;
  color: #fff;
  font-size: clamp(35px, 3.7vw, 55px);
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
  text-shadow: 0 12px 36px rgba(0, 12, 18, .34);
}

.event-scene {
  max-width: 570px;
  margin-bottom: 0;
  color: rgba(244, 251, 255, .82);
  font-size: 16px;
  line-height: 1.75;
}

.story-more { margin-top: 8px; color: rgba(255, 255, 255, .7); }
.story-more summary { width: max-content; color: #70dfd0; font-size: 11px; cursor: pointer; }
.story-more p { margin: 8px 0 0; font-size: 14px; line-height: 1.75; }

.memory-echo {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 12px 0 4px;
  color: #d7cffb;
  font-size: 12px;
}

.memory-echo::before {
  content: "";
  width: 28px;
  height: 1px;
  background: #a99af1;
}

.life-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.life-controls button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, .88);
  background: rgba(10, 35, 46, .26);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.life-controls small { color: rgba(255, 255, 255, .58); font-size: 9px; }
.life-controls b { font-size: 11px; }

.choice-list { gap: 9px; margin-top: 22px; }

.choice-button {
  grid-template-columns: 26px minmax(0, 1fr) 18px;
  min-height: 59px;
  padding: 11px 14px;
  color: #f7fbff;
  background: rgba(7, 28, 38, .42);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 15px;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.choice-button:hover {
  transform: translateX(-4px);
  color: #fff;
  background: rgba(13, 55, 64, .72);
  border-color: rgba(105, 235, 216, .56);
  box-shadow: 0 14px 38px rgba(0, 14, 22, .2);
}

.choice-button b {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.choice-button em { color: #6ce0d0; }
.choice-ripple { width: 24px; height: 24px; border-color: rgba(103, 234, 214, .5); }
.choice-ripple::before { inset: 4px; border-color: rgba(198, 187, 255, .42); }
.choice-ripple::after { inset: 8px; background: #67e4d1; }

.speaker-line {
  margin: 14px 0 0;
  padding: 0 0 0 13px;
  color: rgba(255, 255, 255, .78);
  background: transparent;
  border-left: 2px solid rgba(173, 158, 247, .72);
  border-radius: 0;
  font-size: 13px;
}

.speaker-line b { color: #c7bdf8; }

.fork-notice {
  margin: 13px 0 0;
  padding: 10px 12px;
  color: rgba(255, 255, 255, .76);
  background: rgba(86, 53, 92, .3);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
}

.fork-notice b { font-size: 11px; }
.fork-notice .tiny-button { color: #fff; background: rgba(255, 255, 255, .12); }

.result-card {
  padding: 18px 0 0;
  color: #f7fbff;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, .2);
  border-radius: 0;
}

.result-card h3 { font-size: 18px; line-height: 1.65; }
.experience-note { color: #71e5d4; }
.ripple-callout { color: #d4cdfa; background: rgba(255, 255, 255, .08); }
.result-actions .quiet-button { color: #fff; background: rgba(255, 255, 255, .1); }

.game-nav {
  position: fixed;
  z-index: 14;
  top: 50%;
  right: 16px;
  bottom: auto;
  left: auto;
  display: grid;
  width: 48px;
  padding: 6px;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(7, 27, 37, .34);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.game-nav button {
  min-width: 0;
  width: 36px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .56);
  border-radius: 12px;
  font-size: 0;
}

.game-nav button span { margin: 0; font-size: 16px; }
.game-nav button.is-active { color: #fff; background: linear-gradient(145deg, rgba(24, 186, 166, .78), rgba(113, 93, 232, .78)); }

.game-guide {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  align-items: end;
  justify-items: start;
  padding: 8vh 7vw;
  color: #f8fcff;
  background: radial-gradient(circle at 24% 34%, transparent 0 16%, rgba(5, 21, 29, .2) 30%, rgba(5, 21, 29, .82) 78%);
  backdrop-filter: blur(3px);
}

.game-guide-card {
  width: min(440px, 100%);
  padding: 24px;
  background: rgba(9, 34, 44, .72);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 10, 16, .32);
  backdrop-filter: blur(18px);
}

.game-guide-card small { color: #71e5d4; letter-spacing: .16em; }
.game-guide-card h2 { margin: 8px 0 10px; font-size: 30px; }
.game-guide-card p { color: rgba(255, 255, 255, .76); }
.game-guide-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.game-guide-actions button { color: #fff; }
.guide-progress { display: flex; gap: 6px; margin-top: 16px; }
.guide-progress i { width: 24px; height: 3px; background: rgba(255, 255, 255, .22); border-radius: 3px; }
.guide-progress i.is-active { background: #65e3d1; }

@media (max-width: 900px) {
  .game-screen { color: #f5fbff; background: #071b25; padding-bottom: 72px; }
  .game-topbar { position: absolute; min-height: 68px; padding: 10px 14px; }
  .game-grid { min-height: 100svh; overflow: visible; }
  .scene-panel { position: fixed; inset: 0; min-height: 100svh; height: 100svh; }
  .scene-panel::before {
    background:
      linear-gradient(180deg, rgba(3, 17, 24, .62), rgba(4, 22, 31, .18) 28%, rgba(4, 21, 30, .48) 62%, rgba(3, 17, 24, .88)),
      linear-gradient(90deg, rgba(5, 23, 31, .22), rgba(15, 28, 53, .2));
  }
  .stage-illustration { filter: saturate(1.08) contrast(1.03) blur(2px); transform: scale(1.035); }
  .scene-heading { display: none; }
  .character-chip { top: 78px; right: 14px; bottom: auto; left: 14px; width: auto; background: rgba(6, 29, 39, .42); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .stage-track { position: fixed; z-index: 9; right: 16px; bottom: 78px; left: 16px; width: auto; }
  .event-panel {
    position: relative;
    z-index: 4;
    width: calc(100% - 24px);
    min-height: calc(100svh - 176px);
    margin: 154px 12px 98px;
    padding: 30px 24px 34px;
    color: #f5fbff;
    background: linear-gradient(160deg, rgba(8, 34, 45, .72), rgba(12, 27, 47, .66));
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 13, 22, .28);
    backdrop-filter: blur(26px) saturate(1.12);
    -webkit-backdrop-filter: blur(26px) saturate(1.12);
  }
  .event-content { max-width: 720px; margin: 0 auto; }
  .story-age, .event-title, .result-card { color: #f7fbff; text-shadow: 0 2px 18px rgba(0, 15, 24, .28); }
  .story-age small { color: rgba(255, 255, 255, .56); }
  .story-overline { color: #71e5d4; }
  .event-scene { color: rgba(238, 248, 251, .78); }
  .story-more { color: rgba(235, 246, 249, .68); }
  .story-more summary { color: #72dfd1; }
  .memory-echo { color: #c8bcff; }
  .life-controls button { color: rgba(255, 255, 255, .9); background: rgba(7, 30, 40, .46); border-color: rgba(255, 255, 255, .14); }
  .life-controls small { color: rgba(255, 255, 255, .55); }
  .choice-button { color: #f7fbff; background: rgba(5, 25, 35, .62); border-color: rgba(255, 255, 255, .15); box-shadow: 0 12px 28px rgba(0, 13, 22, .16); }
  .choice-button:hover { color: #fff; background: rgba(14, 61, 69, .78); }
  .speaker-line { color: rgba(244, 249, 252, .76); }
  .fork-notice { color: rgba(244, 246, 255, .8); background: rgba(50, 40, 91, .46); border-color: rgba(195, 182, 255, .2); }
  .fork-notice .tiny-button { color: #d8d0ff; background: rgba(255, 255, 255, .09); }
  .result-card { border-top-color: rgba(255, 255, 255, .18); }
  .result-actions .quiet-button { color: #f5fbff; background: rgba(255, 255, 255, .1); }
  .ripple-callout { color: #d7ceff; background: rgba(83, 64, 147, .32); }
  .game-nav {
    top: auto;
    right: 10px;
    bottom: 8px;
    left: 10px;
    display: flex;
    justify-content: space-around;
    width: auto;
    padding: 6px;
    transform: none;
    background: rgba(14, 38, 48, .8);
    border-radius: 20px;
  }
  .game-nav button { flex: 1; width: auto; max-width: 78px; }
  .game-guide { align-items: end; justify-items: stretch; padding: 18px 18px 86px; background: rgba(5, 21, 29, .62); }
  .game-guide-card { width: 100%; }
}

@media (max-width: 560px) {
  .game-grid { width: 100%; margin: 0; }
  .scene-panel { min-height: 100svh; height: 100svh; max-height: none; }
  .stage-illustration { object-position: center 35%; }
  .game-topbar .game-tools .quiet-button:first-of-type { display: none; }
  .game-topbar .life-position { justify-self: center; }
  .game-topbar .life-position b { font-size: 18px; }
  .character-chip { top: 67px; right: 10px; left: 10px; padding: 8px 10px; }
  .character-chip > span { width: 34px; height: 34px; }
  .character-chip small { display: none; }
  .stage-track { bottom: 75px; }
  .event-panel { width: calc(100% - 20px); min-height: calc(100svh - 148px); margin: 132px 10px 88px; padding: 24px 17px 30px; border-radius: 22px; }
  .story-age { margin-bottom: 8px; }
  .story-age strong { font-size: 48px; }
  .story-age > span { font-size: 14px; }
  .story-age small { margin-left: 5px; font-size: 9px; }
  .life-controls { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .life-controls::-webkit-scrollbar { display: none; }
  .life-controls button { flex: 0 0 auto; }
  .story-overline { margin-top: 18px; }
  .event-title { font-size: clamp(29px, 9vw, 38px); }
  .event-scene { font-size: 14px; line-height: 1.7; }
  .fork-notice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .fork-notice b { grid-column: 1 / -1; line-height: 1.55; }
  .fork-notice .tiny-button { width: 100%; min-width: 0; padding-inline: 8px; }
  .choice-list { margin-top: 18px; }
  .choice-button { grid-template-columns: 24px minmax(0, 1fr) 14px; min-height: 56px; padding: 10px 11px; border-radius: 14px; }
  .choice-button b { font-size: 13px; }
  .game-guide-card { padding: 20px; border-radius: 21px; }
  .game-guide-card h2 { font-size: 25px; }
}

@media (min-width: 1800px) {
  .event-panel { width: min(46vw, 820px); }
  .character-chip, .stage-track { width: 390px; }
}
