:root {
  --ink: #eef7ff;
  --muted: #a8bdd4;
  --panel: rgba(8, 16, 32, 0.76);
  --panel-strong: rgba(6, 10, 22, 0.92);
  --line: rgba(142, 205, 255, 0.26);
  --blue: #20a8ff;
  --cobalt: #3159ff;
  --violet: #9a5cff;
  --pink: #ff5fa8;
  --silver: #d9e8ff;
  --paper: #f7fbff;
  --shadow: 0 28px 90px rgba(0, 5, 18, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(32, 168, 255, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(154, 92, 255, 0.22), transparent 26rem),
    linear-gradient(135deg, #030711 0%, #07142a 46%, #10091c 100%);
  font-family: 'Yu Gothic UI', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), transparent 88%);
  z-index: 0;
}

body.title-mode .mission-strip {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

body.title-mode .status-strip {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.motion-lab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(115, 207, 255, 0.4);
  border-radius: 8px;
  color: #dff5ff;
  background: rgba(13, 52, 91, 0.62);
  font-weight: 900;
  text-decoration: none;
}

.motion-lab-link:hover {
  border-color: #8edcff;
  background: rgba(30, 89, 145, 0.72);
}

.game-shell {
  position: relative;
  z-index: 1;
  width: min(1680px, 100vw);
  height: 100vh;
  padding: 18px;
  margin: 0 auto;
}

.stage {
  position: relative;
  /* Keep focus/scrollIntoView from shifting the fixed CG stage. */
  overflow: clip;
  display: flow-root;
  height: calc(100vh - 36px);
  border: 1px solid rgba(114, 196, 255, 0.34);
  border-radius: 8px;
  background: #030611;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  isolation: isolate;
  transition: margin-right 260ms ease;
}

.scene-plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 26%, rgba(36, 83, 150, 0.2), transparent 48%),
    linear-gradient(180deg, #050b19, #02050d 72%);
  transform-origin: center;
}

.scene-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: contain;
  object-position: center 15%;
  transform: scale(1);
  transition: opacity 320ms ease, filter 700ms ease;
}

.live2d-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms ease;
}

.live2d-layer.is-visible {
  opacity: 1;
}

.stage[data-shot='wide'] .scene-plane.shot-enter {
  animation: shotWide 7.5s ease-out both;
}

.stage[data-shot='medium-left'] .scene-plane.shot-enter {
  animation: shotMediumLeft 5.8s cubic-bezier(.2,.7,.2,1) both;
}

.stage[data-shot='medium-right'] .scene-plane.shot-enter {
  animation: shotMediumRight 5.8s cubic-bezier(.2,.7,.2,1) both;
}

.stage[data-shot='close'] .scene-plane.shot-enter {
  animation: shotClose 5.2s cubic-bezier(.2,.7,.2,1) both;
}

.stage[data-shot='reaction'] .scene-plane.shot-enter {
  animation: shotReaction 460ms cubic-bezier(.2,.8,.2,1) both;
}

.image-enter {
  animation: sceneIn 440ms ease both;
}

.stage[data-presentation='emotion'] .scene-image {
  animation: emotionalFrame 1100ms ease both;
}

.stage[data-presentation='emotion'][data-lighting='warm'] .scene-image {
  animation-name: warmEmotionalFrame;
  animation-duration: 1100ms;
}

.stage[data-presentation='emotion'][data-lighting='danger'] .scene-image {
  animation-name: tensionFrame;
  animation-duration: 820ms;
}

.stage[data-presentation='event'][data-motion='true'] .scene-image {
  animation: eventFrame 900ms ease both;
}

.stage[data-visual-hold='true'] .scene-image,
.stage[data-visual-hold='true'] .scene-plane {
  animation: none !important;
  transform: none !important;
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 7, 17, 0.28), transparent 30%, rgba(2, 4, 12, 0.82)),
    radial-gradient(circle at 50% 35%, transparent 0, transparent 34%, rgba(0, 6, 22, 0.58) 100%),
    linear-gradient(90deg, rgba(2, 7, 20, 0.46), transparent 28%, transparent 72%, rgba(8, 4, 18, 0.46));
  pointer-events: none;
  z-index: 1;
  transition: background 900ms ease, opacity 900ms ease;
}

.stage[data-lighting='warm'] .scene-vignette {
  background:
    linear-gradient(180deg, rgba(18, 6, 16, 0.12), transparent 34%, rgba(12, 4, 16, 0.78)),
    radial-gradient(circle at 56% 35%, rgba(255, 176, 155, 0.08), transparent 35%, rgba(9, 3, 18, 0.56) 100%);
}

.stage[data-lighting='danger'] .scene-vignette {
  background:
    linear-gradient(180deg, rgba(32, 2, 16, 0.22), transparent 30%, rgba(16, 1, 12, 0.84)),
    radial-gradient(circle at 50% 38%, transparent 20%, rgba(108, 5, 42, 0.35) 100%);
}

.sun-dust {
  position: absolute;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(circle, rgba(128, 216, 255, 0.74) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(165, 115, 255, 0.5) 0 1px, transparent 2px);
  background-size: 94px 94px, 141px 141px;
  transition: opacity 900ms ease;
}

.stage[data-particles='true'] .sun-dust {
  opacity: 0.22;
  animation: driftDust 28s linear infinite;
}

.detail-cutin {
  position: absolute;
  left: 0;
  right: 0;
  top: 18%;
  z-index: 4;
  height: min(34vh, 320px);
  border-top: 1px solid rgba(202, 235, 255, 0.5);
  border-bottom: 1px solid rgba(202, 235, 255, 0.38);
  background-repeat: no-repeat;
  box-shadow: 0 24px 70px rgba(0, 4, 18, 0.44);
  opacity: 0;
  pointer-events: none;
}

.detail-cutin::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 8, 22, 0.2), transparent 28%, transparent 72%, rgba(3, 8, 22, 0.28));
}

.detail-cutin.is-soft {
  border-color: rgba(255, 184, 226, 0.46);
}

.detail-cutin.is-danger {
  border-color: rgba(255, 103, 150, 0.62);
}

.detail-cutin.is-showing {
  animation: cutinReveal var(--cutin-hold, 2200ms) cubic-bezier(.2,.7,.2,1) both;
}

.blink-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.eye-blink {
  position: absolute;
  left: calc(var(--x) - var(--w) / 2);
  top: calc(var(--y) - var(--h) / 2);
  width: var(--w);
  height: var(--h);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(12, 16, 30, 0.92), rgba(45, 52, 80, 0.85));
  filter: blur(0.2px);
  opacity: 0;
  transform: rotate(var(--r)) scaleY(0);
  transform-origin: center;
  animation: blink 5.7s ease-in-out infinite;
  animation-delay: var(--delay);
}

.top-bar {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: #f6fbff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.72);
}

.title-mode .top-bar > div:first-child {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.episode-label,
.kicker {
  margin: 0 0 6px;
  color: #8edbff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-bar h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  opacity: 0.82;
}

.quick-actions {
  position: absolute;
  top: 46px;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(142, 205, 255, 0.24);
  border-radius: 8px;
  background: rgba(3, 10, 24, 0.72);
  box-shadow: 0 18px 48px rgba(0, 5, 18, 0.36);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  backdrop-filter: blur(16px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.quick-actions.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.menu-button {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(151, 214, 255, 0.36);
  border-radius: 999px;
  color: #eaf6ff;
  background: rgba(8, 18, 38, 0.62);
  box-shadow: 0 14px 34px rgba(0, 6, 20, 0.28);
  font-size: 19px;
  backdrop-filter: blur(12px);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.menu-button:hover,
.menu-button.is-open {
  transform: rotate(28deg) scale(1.04);
  border-color: rgba(151, 226, 255, 0.72);
  background: rgba(20, 44, 84, 0.88);
}

.mission-strip {
  position: absolute;
  top: 74px;
  left: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100% - 40px));
  padding: 7px 10px;
  border: 1px solid rgba(142, 205, 255, 0.22);
  border-radius: 999px;
  color: #eff9ff;
  background: rgba(4, 14, 31, 0.34);
  box-shadow: 0 10px 28px rgba(0, 5, 18, 0.2);
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.mission-strip span {
  flex: 0 0 auto;
  color: #7fe0ff;
  font-size: 10px;
  font-weight: 950;
}

.mission-strip strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-strip {
  position: absolute;
  top: 112px;
  left: 20px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(520px, calc(100% - 40px));
  transition: opacity 180ms ease, transform 180ms ease;
}

.status-strip div {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(142, 205, 255, 0.2);
  border-radius: 999px;
  background: rgba(4, 14, 31, 0.32);
  box-shadow: 0 10px 24px rgba(0, 5, 18, 0.16);
  backdrop-filter: blur(12px);
}

.status-strip span {
  display: block;
  color: #8edbff;
  font-size: 10px;
  font-weight: 950;
}

.status-strip strong {
  display: block;
  overflow: hidden;
  color: #f3fbff;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-actions button,
.title-actions button,
.next-button,
.choices button {
  border: 1px solid rgba(151, 214, 255, 0.36);
  border-radius: 8px;
  background: rgba(8, 18, 38, 0.72);
  box-shadow: 0 14px 34px rgba(0, 6, 20, 0.28);
  backdrop-filter: blur(12px);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.quick-actions button {
  padding: 9px 11px;
  color: #eef9ff;
  font-size: 13px;
  font-weight: 850;
}

.quick-actions button:hover,
.title-actions button:hover,
.next-button:hover,
.choices button:hover {
  transform: translateY(-1px);
  border-color: rgba(151, 226, 255, 0.72);
  background: rgba(20, 44, 84, 0.88);
  box-shadow: 0 0 26px rgba(32, 168, 255, 0.18);
}

.quick-actions .is-on {
  color: #07101d;
  background: linear-gradient(135deg, #89e4ff, #a98cff);
}

.title-panel {
  position: absolute;
  left: clamp(24px, 7vw, 104px);
  bottom: clamp(56px, 8vh, 104px);
  z-index: 6;
  width: min(760px, calc(100% - 48px));
  color: #f6fbff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.74);
}

.title-panel h2 {
  max-width: 680px;
  margin: 0 0 18px;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
  word-break: keep-all;
}

.title-panel h2 small {
  display: block;
  margin-top: 10px;
  color: #ffd37a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.full-remaster .title-panel h2 small::before {
  content: '';
  display: inline-block;
  width: 34px;
  height: 1px;
  margin: 0 10px 3px 0;
  background: #ffd37a;
}

.full-remaster .mission-strip span,
.full-remaster .pane-label {
  color: #ffd37a;
}

.full-remaster .mission-strip,
.full-remaster .status-strip {
  display: none;
}

.full-remaster .progress-card i {
  background: linear-gradient(90deg, #68d7ff, #ffd37a, #ff7ba8);
}

.title-panel p {
  max-width: 560px;
  margin: 0 0 20px;
  color: #d8eaff;
  font-size: 17px;
  line-height: 1.75;
}

.title-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.title-actions button {
  min-width: 128px;
  padding: 13px 18px;
  color: #eff9ff;
  font-weight: 950;
}

.title-actions button:first-child {
  color: #03101b;
  background: linear-gradient(135deg, #8ee7ff, #7a7cff 58%, #d36dff);
}

.dialogue-box {
  position: absolute;
  left: 50%;
  width: min(980px, calc(100% - 64px));
  transform: translateX(-50%);
  right: auto;
  bottom: 24px;
  z-index: 7;
  min-height: 118px;
  padding: 14px 68px 14px 18px;
  border: 1px solid rgba(155, 219, 255, 0.44);
  border-radius: 8px;
  color: #eaf6ff;
  background:
    linear-gradient(90deg, rgba(36, 169, 255, 0.12), transparent 34%),
    rgba(5, 14, 30, 0.7);
  box-shadow: 0 18px 54px rgba(0, 5, 20, 0.42);
  backdrop-filter: blur(12px);
}

.dialogue-box::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(129, 224, 255, 0.8), rgba(168, 124, 255, 0.7), transparent);
}

.stage[data-dialogue-mode='subtitle'] .dialogue-box {
  bottom: 26px;
  width: min(820px, calc(100% - 80px));
  min-height: 0;
  padding: 8px 80px 10px 14px;
  border-color: rgba(152, 220, 255, 0.2);
  background: rgba(2, 8, 20, 0.42);
  box-shadow: 0 12px 40px rgba(0, 4, 18, 0.28);
  backdrop-filter: blur(7px);
}

.stage[data-dialogue-mode='subtitle'] .dialogue-box::before,
.stage[data-dialogue-mode='narration'] .dialogue-box::before {
  display: none;
}

.stage[data-dialogue-mode='subtitle'] .speaker-row {
  margin-bottom: 3px;
}

.stage[data-dialogue-mode='subtitle'] .speaker-name {
  min-width: 0;
  height: auto;
  padding: 0;
  color: #a7e8ff;
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.92);
}

.stage[data-dialogue-mode='subtitle'] .scene-hint,
.stage[data-dialogue-mode='subtitle'] .scene-progress {
  display: none;
}

.stage[data-dialogue-mode='subtitle'] #dialogueText {
  min-height: 0;
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.48;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.96);
}

.stage[data-dialogue-mode='narration'] .dialogue-box {
  bottom: 34px;
  width: min(900px, calc(100% - 88px));
  min-height: 0;
  padding: 8px 80px 10px 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.stage[data-dialogue-mode='narration'] .speaker-row {
  display: none;
}

.stage[data-dialogue-mode='narration'] #dialogueText {
  min-height: 0;
  color: #f3f7ff;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  text-align: center;
  text-shadow:
    0 3px 8px rgba(0, 0, 0, 1),
    0 3px 24px rgba(0, 0, 0, 0.96);
}

.stage[data-dialogue-mode='choice'] .dialogue-box {
  width: min(1020px, calc(100% - 52px));
  min-height: 0;
  padding: 16px 18px;
  background: rgba(4, 12, 28, 0.84);
  backdrop-filter: blur(16px);
}

.stage[data-dialogue-mode='choice'] .next-button {
  display: none;
}

/* 화자의 목소리를 화면 위치와 재질로 구분하는 애니노벨 대화 문법 */
.stage[data-dialogue-mode='esky'] .dialogue-box,
.stage[data-dialogue-mode='esky-live'] .dialogue-box,
.stage[data-dialogue-mode='player'] .dialogue-box,
.stage[data-dialogue-mode='mascot'] .dialogue-box,
.stage[data-dialogue-mode='faculty'] .dialogue-box,
.stage[data-dialogue-mode='system'] .dialogue-box,
.stage[data-dialogue-mode='chat'] .dialogue-box,
.stage[data-dialogue-mode='placard'] .dialogue-box {
  min-height: 0;
  backdrop-filter: blur(11px);
  transition: left 260ms ease, right 260ms ease, width 260ms ease, background 260ms ease, border-color 260ms ease;
}

.stage[data-dialogue-mode='esky'] .dialogue-box {
  left: clamp(24px, 5vw, 78px);
  right: auto;
  bottom: 28px;
  width: min(650px, calc(100% - 150px));
  padding: 13px 58px 14px 18px;
  transform: none;
  border-color: rgba(139, 160, 255, 0.56);
  border-left: 3px solid #8f8cff;
  border-radius: 8px 20px 20px 8px;
  background:
    linear-gradient(105deg, rgba(41, 47, 125, 0.78), rgba(8, 13, 37, 0.68) 72%),
    rgba(5, 10, 28, 0.72);
  box-shadow: 0 20px 54px rgba(2, 4, 22, 0.46), 0 0 34px rgba(80, 86, 255, 0.1);
}

.stage[data-dialogue-mode='esky'] .speaker-name {
  color: #f4f1ff;
  background: linear-gradient(135deg, #526eff, #a264ff 68%, #ef8fda);
}

.stage[data-dialogue-mode='esky-live'] .dialogue-box {
  left: 50%;
  right: auto;
  bottom: 24px;
  width: min(790px, calc(100% - 120px));
  padding: 13px 64px 14px 22px;
  transform: translateX(-50%);
  border-color: rgba(255, 119, 185, 0.5);
  border-top: 2px solid rgba(255, 104, 164, 0.88);
  border-radius: 8px 8px 20px 20px;
  background:
    linear-gradient(90deg, rgba(121, 33, 104, 0.38), rgba(31, 28, 93, 0.72) 42%, rgba(5, 13, 34, 0.76)),
    rgba(5, 10, 28, 0.78);
  box-shadow: 0 20px 56px rgba(9, 2, 28, 0.5), 0 -3px 24px rgba(255, 73, 154, 0.1);
}

.stage[data-dialogue-mode='esky-live'] .dialogue-box::before {
  content: 'ON AIR';
  left: auto;
  right: 18px;
  top: -13px;
  width: auto;
  height: 22px;
  padding: 2px 8px 0;
  border-radius: 999px;
  color: #fff5fa;
  background: linear-gradient(135deg, #ff4d86, #a94fff);
  box-shadow: 0 0 18px rgba(255, 70, 145, 0.42);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.stage[data-dialogue-mode='esky-live'] .speaker-name {
  color: #fff5fb;
  background: linear-gradient(135deg, #d94fbe, #674eff 72%);
}

.stage[data-dialogue-mode='player'] .dialogue-box {
  left: auto;
  right: clamp(24px, 5vw, 78px);
  bottom: 28px;
  width: min(620px, calc(100% - 150px));
  padding: 13px 58px 14px 18px;
  transform: none;
  border-color: rgba(126, 221, 255, 0.42);
  border-right: 3px solid #83dcff;
  border-radius: 20px 8px 8px 20px;
  background:
    linear-gradient(255deg, rgba(23, 92, 126, 0.72), rgba(4, 14, 32, 0.72) 72%),
    rgba(3, 12, 27, 0.78);
}

.stage[data-dialogue-mode='player'] .speaker-row {
  flex-direction: row-reverse;
}

.stage[data-dialogue-mode='player'] .scene-progress {
  margin-right: auto;
  margin-left: 0;
}

.stage[data-dialogue-mode='player'] .speaker-name {
  color: #04131f;
  background: linear-gradient(135deg, #91eaff, #8fc8ff);
}

.stage[data-dialogue-mode='mascot'] .dialogue-box {
  left: clamp(34px, 9vw, 150px);
  right: auto;
  bottom: 38px;
  width: min(520px, calc(100% - 120px));
  padding: 13px 58px 14px 20px;
  transform: none;
  border: 2px solid rgba(194, 151, 255, 0.72);
  border-radius: 28px 28px 28px 8px;
  background: linear-gradient(135deg, rgba(52, 28, 91, 0.9), rgba(15, 10, 39, 0.84));
  box-shadow: 0 18px 44px rgba(14, 4, 34, 0.46), inset 0 0 30px rgba(175, 104, 255, 0.08);
  animation: mascotBubbleIn 380ms cubic-bezier(.2, 1.2, .3, 1) both;
}

.stage[data-dialogue-mode='mascot'] .dialogue-box::after {
  content: '';
  position: absolute;
  left: 20px;
  bottom: -12px;
  width: 20px;
  height: 20px;
  border-left: 2px solid rgba(194, 151, 255, 0.72);
  border-bottom: 2px solid rgba(194, 151, 255, 0.72);
  background: #1d103b;
  transform: rotate(-35deg) skew(-8deg);
}

.stage[data-dialogue-mode='mascot'] .speaker-name {
  color: #231138;
  background: linear-gradient(135deg, #e2c2ff, #a88aff);
}

/* The flat mascot on these notebook inserts is the action, not background.
   A lower, wider desktop bubble keeps it visible and reserves Next-button space.
   Asset-scoped: no other reviewed CG or mobile dialogue layout is changed. */
@media (min-width: 561px) {
  .stage[data-dialogue-mode='mascot']:has(#sceneImage:is([src*='esky-refill-20260910-prologue-notebook-'], [src*='esky-refill-20260912-prologue-notebook-'])) .dialogue-box {
    left: 50%;
    right: auto;
    bottom: 20px;
    width: min(860px, calc(100% - 64px));
    padding: 12px 80px 12px 18px;
    transform: translateX(-50%);
    animation: none;
  }
}

.mascot-speaker {
  position: absolute;
  right: clamp(28px, 6vw, 92px);
  bottom: clamp(132px, 20vh, 206px);
  z-index: 6;
  width: clamp(126px, 13vw, 184px);
  opacity: 0;
  transform: translate3d(28px, 20px, 0) scale(0.76) rotate(7deg);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 20px 28px rgba(9, 2, 30, 0.56));
  pointer-events: none;
}

.mascot-speaker.is-showing {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotate(0);
  transition: opacity 180ms ease-out, transform 360ms cubic-bezier(.18, 1.34, .36, 1);
}

.mascot-speaker__portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid rgba(220, 186, 255, 0.86);
  border-radius: 50% 50% 46% 54%;
  background-image:
    radial-gradient(circle at 50% 46%, transparent 52%, rgba(22, 8, 48, 0.38) 78%),
    url('../assets/scenes/remake-vb-prologue-chuuring-energy-puff.webp');
  background-position: center, 52% 35%;
  background-size: 100%, 282% auto;
  box-shadow:
    0 0 0 5px rgba(83, 41, 130, 0.38),
    inset 0 0 30px rgba(242, 205, 255, 0.2),
    0 15px 40px rgba(32, 9, 72, 0.58);
}

.mascot-speaker__portrait::after {
  content: '';
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(255, 232, 176, 0.38);
  border-radius: inherit;
}

.mascot-speaker__signal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin: -14px auto 0;
  padding: 5px 10px 6px;
  border: 1px solid rgba(207, 168, 255, 0.66);
  border-radius: 999px;
  color: #f6ecff;
  background: rgba(31, 13, 63, 0.92);
  box-shadow: 0 8px 24px rgba(8, 2, 24, 0.42);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.mascot-speaker__signal span {
  color: #c9a8ff;
  font-size: 8px;
  font-weight: 900;
}

.mascot-speaker__signal strong {
  font-size: 12px;
}

.mascot-speaker.is-excited.is-showing .mascot-speaker__portrait {
  animation: chuuringSpeakerBounce 820ms cubic-bezier(.2, 1.15, .32, 1) both;
}

.mascot-speaker.is-protest.is-showing .mascot-speaker__portrait {
  animation: chuuringSpeakerProtest 620ms ease-out both;
}

.mascot-speaker.is-whisper.is-showing .mascot-speaker__portrait {
  animation: chuuringSpeakerWhisper 1.5s ease-in-out both;
}

.mascot-speaker.is-talk.is-showing .mascot-speaker__portrait {
  animation: chuuringSpeakerTalk 1.25s ease-in-out both;
}

.mascot-speaker.is-static .mascot-speaker__portrait {
  animation: none !important;
}

@keyframes chuuringSpeakerBounce {
  0% { transform: translateY(18px) scale(.86); }
  42% { transform: translateY(-14px) scale(1.06, .96); }
  68% { transform: translateY(3px) scale(.98, 1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes chuuringSpeakerProtest {
  0%, 100% { transform: translateX(0) rotate(0); }
  22% { transform: translateX(-9px) rotate(-4deg); }
  45% { transform: translateX(8px) rotate(4deg); }
  66% { transform: translateX(-5px) rotate(-2deg); }
  84% { transform: translateX(3px) rotate(1deg); }
}

@keyframes chuuringSpeakerWhisper {
  0% { transform: translateY(9px) scale(.94); filter: brightness(.82); }
  45% { transform: translateY(0) scale(1); filter: brightness(1); }
  100% { transform: translateY(3px) scale(.98); filter: brightness(.94); }
}

@keyframes chuuringSpeakerTalk {
  0% { transform: translateY(8px) rotate(-1deg); }
  45% { transform: translateY(-4px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0); }
}

.stage[data-dialogue-mode='faculty'] .dialogue-box {
  bottom: 30px;
  width: min(780px, calc(100% - 100px));
  padding: 15px 62px 15px 20px;
  border-color: rgba(228, 190, 104, 0.58);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(125, 80, 22, 0.22), transparent 24%, rgba(78, 44, 106, 0.16)),
    rgba(8, 12, 28, 0.82);
  box-shadow: 0 18px 54px rgba(0, 4, 18, 0.46), inset 0 0 0 1px rgba(255, 225, 155, 0.1);
}

.stage[data-dialogue-mode='faculty'] .speaker-name {
  color: #251806;
  background: linear-gradient(135deg, #ffe5a1, #b88a3c);
}

.stage[data-dialogue-mode='system'] .dialogue-box {
  bottom: 34px;
  width: min(760px, calc(100% - 96px));
  padding: 12px 58px 13px 18px;
  border-color: rgba(102, 235, 255, 0.34);
  border-radius: 3px;
  background:
    repeating-linear-gradient(180deg, rgba(117, 221, 255, 0.025) 0 1px, transparent 1px 4px),
    rgba(1, 13, 29, 0.84);
  box-shadow: 0 16px 44px rgba(0, 7, 24, 0.42), inset 4px 0 0 rgba(94, 220, 255, 0.58);
}

.stage[data-dialogue-mode='system'] .speaker-name {
  color: #06141a;
  background: linear-gradient(135deg, #8ff1ff, #65bfff);
  font-family: Consolas, 'Courier New', monospace;
}

.stage[data-dialogue-mode='system'] #dialogueText {
  color: #dffaff;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
}

.stage[data-dialogue-mode='chat'] .dialogue-box {
  left: auto;
  right: clamp(24px, 5vw, 76px);
  bottom: 34px;
  width: min(540px, calc(100% - 132px));
  min-height: 0;
  padding: 11px 54px 12px 16px;
  transform: none;
  border-color: rgba(129, 138, 255, 0.34);
  border-radius: 15px 4px 15px 15px;
  background:
    repeating-linear-gradient(180deg, rgba(135, 120, 255, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(255deg, rgba(58, 29, 112, 0.84), rgba(5, 13, 33, 0.86));
  box-shadow: 0 16px 44px rgba(0, 5, 24, 0.44), inset -3px 0 0 rgba(153, 117, 255, 0.56);
}

.stage[data-dialogue-mode='chat'] .dialogue-box::before {
  content: 'LIVE CHAT';
  left: auto;
  right: 14px;
  top: -10px;
  width: auto;
  height: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: #dcd6ff;
  background: rgba(20, 12, 52, 0.94);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.stage[data-dialogue-mode='chat'] .speaker-name {
  color: #160d36;
  background: linear-gradient(135deg, #d4b8ff, #8ca8ff);
}

.stage[data-dialogue-mode='chat'] #dialogueText {
  color: #f0ecff;
}

.stage[data-dialogue-mode='placard'] .dialogue-box {
  bottom: 30px;
  width: min(640px, calc(100% - 96px));
  padding: 14px 58px 15px 18px;
  border: 2px solid rgba(218, 191, 142, 0.72);
  border-radius: 5px;
  color: #f8edda;
  background: linear-gradient(135deg, rgba(62, 45, 50, 0.9), rgba(24, 17, 32, 0.9));
  box-shadow: 0 20px 54px rgba(0, 4, 18, 0.48);
  transform: translateX(-50%) rotate(-0.35deg);
}

.stage[data-dialogue-mode='placard'] .speaker-name {
  color: #24182c;
  background: linear-gradient(135deg, #f1dba9, #cbb5e9);
}

.stage[data-dialogue-mode='placard'].has-prop-overlay .dialogue-box {
  left: 0;
  right: 0;
  bottom: 14px;
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
  pointer-events: none;
}

.stage[data-dialogue-mode='placard'].has-prop-overlay .speaker-row,
.stage[data-dialogue-mode='placard'].has-prop-overlay #dialogueText {
  visibility: hidden;
}

.stage[data-dialogue-mode='placard'].has-prop-overlay .next-button {
  right: 26px;
  bottom: 0;
  display: inline-flex;
  pointer-events: auto;
}

.prop-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.prop-overlay.is-showing {
  opacity: 1;
}

.prop-card {
  position: absolute;
  left: var(--prop-x);
  top: var(--prop-y);
  width: var(--prop-width);
  padding: 0.7em 0.8em;
  border: 2px solid rgba(229, 211, 178, 0.88);
  border-radius: 8px;
  color: #f8f0dc;
  background:
    linear-gradient(135deg, rgba(81, 63, 76, 0.94), rgba(26, 21, 35, 0.96)),
    #1c1723;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  font-size: var(--prop-size);
  font-weight: 950;
  line-height: 1.32;
  text-align: center;
  text-wrap: balance;
  white-space: pre-line;
  transform: translate(-50%, -50%) rotate(var(--prop-rotate));
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.48);
  animation: propCardIn 360ms cubic-bezier(.2, .86, .22, 1) both;
}

.prop-card.is-paper {
  border-color: rgba(126, 93, 76, 0.76);
  color: #332332;
  background:
    linear-gradient(rgba(255, 255, 255, 0.4), transparent),
    #efe3ca;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), inset 0 0 24px rgba(103, 67, 84, 0.12);
  text-shadow: none;
}

.prop-card.is-ink,
.prop-card.is-chalk {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.prop-card.is-ink {
  color: #34293b;
  text-shadow: none;
}

.prop-card.is-chalk {
  color: #f5eaff;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.72), 0 0 12px rgba(190, 132, 255, 0.3);
}

.prop-card.is-violet {
  border-color: rgba(206, 167, 255, 0.82);
  background: linear-gradient(135deg, rgba(83, 42, 122, 0.96), rgba(23, 16, 46, 0.98));
}

@keyframes mascotBubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes propCardIn {
  from { opacity: 0; transform: translate(-50%, -44%) rotate(var(--prop-rotate)) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(var(--prop-rotate)) scale(1); }
}

.is-title .dialogue-box {
  opacity: 0;
  pointer-events: none;
}

.stage.is-cinematic .top-bar,
.stage.is-cinematic .mission-strip,
.stage.is-cinematic .status-strip {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.stage.is-cinematic .dialogue-box {
  left: 50%;
  bottom: 34px;
  width: min(620px, calc(100% - 52px));
  min-height: 0;
  padding: 12px 58px 12px 16px;
  background: rgba(3, 10, 24, 0.54);
}

.stage.is-cinematic .speaker-row {
  display: none;
}

.stage.is-cinematic #dialogueText {
  min-height: 0;
  color: #d9ecff;
  font-size: 15px;
  text-align: center;
}

.stage.is-cinematic .next-button {
  right: 12px;
  bottom: 10px;
  min-width: 42px;
  padding: 8px 10px;
}

.stage.is-cinematic-centered .dialogue-box {
  top: 50%;
  bottom: auto;
  width: min(1120px, calc(100% - 72px));
  min-height: 0;
  padding: 0 72px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: translate(-50%, -50%);
  overflow: visible;
}

.stage.is-cinematic-centered .dialogue-box::before {
  display: none;
}

.stage.is-cinematic-centered #dialogueText {
  min-height: 2.9em;
  color: #f2f8ff;
  font-size: clamp(27px, 3.4vw, 50px);
  font-weight: 800;
  line-height: 1.58;
  text-align: center;
  text-wrap: balance;
  text-shadow:
    0 4px 28px rgba(0, 0, 0, 0.9),
    0 0 42px rgba(58, 164, 255, 0.28);
}

.stage.is-cinematic-centered #dialogueText.caption-enter {
  animation: cinematicCaptionIn var(--caption-duration, 1800ms) cubic-bezier(.2,.7,.2,1) both;
}

.stage.is-cinematic-centered #dialogueText.caption-leave {
  animation: cinematicCaptionOut 900ms ease-in both;
}

.stage.is-cinematic-centered .next-button {
  right: 50%;
  bottom: -82px;
  min-width: 54px;
  padding: 10px 14px;
  transform: translateX(50%);
  opacity: 0.72;
}

.stage.is-cinematic-centered .next-button:hover {
  transform: translateX(50%) translateY(-1px);
}

.stage.is-caption-leaving .next-button {
  pointer-events: none;
  opacity: 0;
}

.anime-cut {
  position: absolute;
  left: 50%;
  top: 22%;
  z-index: 12;
  display: grid;
  gap: 8px;
  min-width: min(520px, calc(100% - 48px));
  padding: 18px 26px 20px;
  border-left: 3px solid #8ee7ff;
  color: #f6fbff;
  background:
    linear-gradient(90deg, rgba(4, 14, 32, 0.9), rgba(4, 14, 32, 0.26)),
    linear-gradient(135deg, rgba(142, 231, 255, 0.18), rgba(255, 128, 206, 0.08));
  box-shadow: 0 22px 70px rgba(0, 8, 28, 0.52);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 18px, 0) scale(0.98);
}

.anime-cut span {
  color: #8ee7ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.anime-cut strong {
  overflow-wrap: anywhere;
  font-size: clamp(24px, 4vw, 46px);
  line-height: 1.05;
  text-shadow: 0 0 24px rgba(142, 231, 255, 0.34);
}

.anime-cut.is-soft {
  border-left-color: #ff9bd8;
  background:
    linear-gradient(90deg, rgba(28, 10, 30, 0.88), rgba(18, 9, 28, 0.28)),
    linear-gradient(135deg, rgba(255, 155, 216, 0.18), rgba(142, 231, 255, 0.1));
}

.anime-cut.is-alert {
  border-left-color: #ff6f9f;
}

.anime-cut.is-showing {
  animation: animeCutCard var(--cut-duration, 1900ms) cubic-bezier(.2,.8,.2,1) both;
}

.speaker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.speaker-name {
  display: inline-flex;
  align-items: center;
  min-width: 76px;
  height: 30px;
  padding: 0 13px;
  border-radius: 6px;
  color: #07101d;
  background: linear-gradient(135deg, #9be7ff, #dbd5ff);
  font-weight: 950;
}

.speaker-name[hidden] {
  display: none;
}

.speaker-row.is-narration {
  gap: 0;
  margin-bottom: 7px;
}

.speaker-row.is-narration .scene-hint {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  width: fit-content;
  padding: 4px 0;
  color: rgba(210, 231, 249, 0.74);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.speaker-row.is-narration .scene-hint:not(:empty)::before {
  content: '';
  width: 18px;
  height: 1px;
  margin-right: 8px;
  background: linear-gradient(90deg, #7fdcff, rgba(127, 220, 255, 0));
}

.scene-hint {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-progress {
  flex: 0 0 auto;
  margin-left: auto;
  color: rgba(211, 232, 255, 0.7);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

#dialogueText {
  min-height: 44px;
  margin: 0;
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.62;
  word-break: keep-all;
}

.next-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-width: 48px;
  min-height: 44px;
  padding: 10px 12px;
  color: #07101d;
  background: linear-gradient(135deg, #8ee7ff, #9b8cff);
  font-size: 13px;
  font-weight: 950;
  touch-action: manipulation;
}

.next-button:hover {
  color: #f6fbff;
}

.choices button {
  touch-action: manipulation;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.choices:empty {
  display: none;
}

.choices button {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  text-align: left;
  color: #f1f9ff;
  font-weight: 850;
}

.choices button::before {
  content: '';
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--violet));
  opacity: 0.8;
}

.stage[data-presentation='conversation'] .choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stage[data-presentation='conversation'] .choices button {
  min-height: 64px;
  border-color: rgba(255, 184, 226, 0.34);
  background: rgba(19, 18, 42, 0.82);
}

.stage[data-presentation='conversation'] .choices button::before {
  background: linear-gradient(180deg, #ff9ed2, #88cfff);
}

.choices .nickname-input {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(151, 214, 255, 0.36);
  border-radius: 8px;
  outline: 0;
  color: #f1f9ff;
  background:
    linear-gradient(90deg, rgba(36, 169, 255, 0.1), transparent 38%),
    rgba(8, 18, 38, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 34px rgba(0, 6, 20, 0.28);
  font: inherit;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.choices .nickname-input::placeholder {
  color: rgba(207, 231, 255, 0.56);
}

.side-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  width: min(398px, calc(100vw - 36px));
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(135, 213, 255, 0.28);
  border-radius: 8px;
  color: #edf8ff;
  background:
    linear-gradient(90deg, rgba(55, 176, 255, 0.08) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(151, 214, 255, 0.08) 31px 32px),
    rgba(5, 12, 27, 0.92);
  box-shadow: 0 30px 100px rgba(0, 4, 16, 0.66);
  transform: translateX(calc(100% + 32px));
  transition: transform 260ms ease;
  backdrop-filter: blur(18px);
}

.side-panel.is-open {
  transform: translateX(0);
}

.note-pane {
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(146, 215, 255, 0.22);
  border-radius: 8px;
  background: rgba(13, 25, 48, 0.66);
  box-shadow: none;
}

.note-pane.is-active {
  display: block;
}

.notebook-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.notebook-head p {
  margin: 0 0 4px;
  color: #76dcff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.notebook-head button {
  padding: 7px 9px;
  border: 1px solid rgba(151, 214, 255, 0.22);
  border-radius: 6px;
  background: rgba(238, 248, 255, 0.08);
  color: #eaf6ff;
  font-size: 12px;
  font-weight: 900;
}

.side-panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: 0;
}

.side-panel h3 {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: 0;
}

.note-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.note-tabs button {
  min-width: 0;
  padding: 9px 6px;
  border: 1px solid rgba(151, 214, 255, 0.22);
  border-radius: 7px;
  color: #cdeaff;
  background: rgba(238, 248, 255, 0.06);
  font-size: 12px;
  font-weight: 950;
}

.note-tabs button.is-active {
  color: #06101d;
  background: linear-gradient(135deg, #8ee7ff, #a98cff);
}

.pane-label {
  margin: 0 0 7px;
  color: #76dcff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#noteMissionBody,
.relation-memo {
  margin: 0;
  color: #d7ecff;
  font-size: 14px;
  line-height: 1.65;
}

.note-clues {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  margin: 16px 0 0;
  color: #c3d8ef;
  font-size: 13px;
  line-height: 1.5;
}

.progress-card {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(151, 214, 255, 0.18);
  border-radius: 8px;
  background: rgba(238, 248, 255, 0.05);
}

.progress-card span {
  color: #cfe7ff;
  font-size: 12px;
  font-weight: 950;
}

.progress-card div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(215, 236, 255, 0.1);
}

.progress-card i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink));
  transition: width 240ms ease;
}

.ending-archive {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(151, 214, 255, 0.16);
}

.ending-archive ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 0;
  color: #d7ecff;
  font-size: 13px;
  line-height: 1.5;
}

.chapter-splash {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  color: #f4fbff;
  background: rgba(1, 7, 20, 0.36);
  font-size: clamp(42px, 8vw, 96px);
  font-weight: 950;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 8px 42px rgba(37, 167, 255, 0.45), 0 8px 56px rgba(0, 0, 0, 0.72);
  transform: scale(1.05);
}

.chapter-splash.show {
  animation: chapterSplash 1150ms ease both;
}

.briefing-overlay {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
}

.briefing-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(32, 168, 255, 0.18), transparent 28rem),
    rgba(1, 7, 20, 0.18);
  opacity: 0;
}

.briefing-card {
  position: relative;
  width: min(680px, calc(100vw - 52px));
  padding: 26px 30px 28px;
  border: 1px solid rgba(158, 227, 255, 0.66);
  border-radius: 8px;
  color: #f7fcff;
  background:
    linear-gradient(135deg, rgba(13, 34, 67, 0.88), rgba(20, 13, 43, 0.86)),
    rgba(5, 14, 30, 0.92);
  box-shadow: 0 26px 90px rgba(0, 5, 18, 0.58), 0 0 46px rgba(32, 168, 255, 0.22);
  overflow: hidden;
  transform: translate3d(34vw, -4vh, 0) rotate(3deg) scale(0.9);
}

.briefing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(151, 226, 255, 0.32), transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 18px);
  transform: translateX(-120%);
}

.briefing-card p,
.briefing-card h2 {
  position: relative;
  margin: 0;
}

.briefing-card > p:first-child {
  margin-bottom: 10px;
  color: #8ee7ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.briefing-card h2 {
  margin-bottom: 12px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 950;
}

.briefing-card > p:last-child {
  color: #d9ecff;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.55;
  font-weight: 800;
}

.briefing-card span {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(18px) rotate(4deg);
}

.briefing-overlay.is-showing {
  animation: briefingOverlay var(--briefing-duration, 2600ms) ease both;
}

.briefing-overlay.is-showing::before {
  animation: briefingDim var(--briefing-duration, 2600ms) ease both;
}

.briefing-overlay.is-showing .briefing-card {
  animation: briefingSettle var(--briefing-duration, 2600ms) cubic-bezier(.2,.8,.2,1) both;
}

.briefing-overlay.fly-left.is-showing .briefing-card {
  animation-name: briefingSettle;
}

.briefing-overlay.fly-up.is-showing .briefing-card {
  animation-name: briefingSettle;
}

.briefing-overlay.is-showing .briefing-card::before {
  animation: briefingSheen 900ms ease 180ms both;
}

.briefing-overlay.is-showing .briefing-card span {
  animation: letterSpark 1200ms ease both;
  animation-delay: calc(140ms + var(--i) * 16ms);
}

.briefing-overlay.is-narration .briefing-card {
  width: min(900px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.briefing-overlay.is-narration .briefing-card::before {
  display: none;
}

.briefing-overlay.is-narration .briefing-card > p:first-child {
  color: #9ee9ff;
  text-shadow: 0 0 24px rgba(32, 168, 255, 0.55);
}

.briefing-overlay.is-narration .briefing-card h2 {
  font-size: clamp(44px, 8vw, 112px);
  text-shadow:
    0 0 18px rgba(142, 231, 255, 0.6),
    0 10px 56px rgba(0, 0, 0, 0.8);
}

.briefing-overlay.is-narration .briefing-card > p:last-child {
  color: #f1f8ff;
  text-shadow: 0 6px 34px rgba(0, 0, 0, 0.72);
}

.choice-toast {
  position: absolute;
  left: 50%;
  bottom: 222px;
  z-index: 10;
  max-width: min(720px, calc(100% - 40px));
  padding: 10px 16px;
  border: 1px solid rgba(148, 221, 255, 0.44);
  border-radius: 8px;
  color: #f5fbff;
  background: linear-gradient(135deg, rgba(10, 35, 62, 0.94), rgba(42, 27, 70, 0.94));
  box-shadow: 0 18px 44px rgba(0, 7, 22, 0.34);
  font-size: 14px;
  font-weight: 950;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
}

.archive-clip-indicator {
  position: absolute;
  z-index: 16;
  top: 112px;
  left: 50%;
  display: grid;
  min-width: 230px;
  padding: 11px 16px 9px;
  overflow: hidden;
  border: 1px solid rgba(123, 239, 255, 0.45);
  border-radius: 12px;
  color: #f6fbff;
  background: rgba(7, 12, 25, 0.84);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.42), 0 0 24px rgba(83, 218, 255, 0.13);
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.archive-clip-indicator.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.archive-clip-indicator span {
  color: #66efff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.archive-clip-indicator strong {
  margin-top: 3px;
  font-size: 13px;
}

.archive-clip-indicator i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #62edff, #b284ff, #ff82c8);
  transform-origin: left;
  animation: archiveClipProgress 7.4s linear forwards;
}

@keyframes archiveClipProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 720px) {
  .archive-clip-indicator {
    top: 88px;
    min-width: 205px;
    padding: 9px 13px 8px;
  }
}

.choice-toast.show {
  animation: toastIn 1250ms ease both;
}

.meter {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #cfe7ff;
  font-size: 13px;
  font-weight: 950;
}

.meter div {
  overflow: hidden;
  height: 11px;
  border-radius: 999px;
  background: rgba(215, 236, 255, 0.1);
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cobalt), var(--violet), var(--pink));
  transition: width 300ms ease;
}

.note-pane ol#dialogueLog {
  display: grid;
  gap: 10px;
  max-height: 100%;
  padding-left: 18px;
  margin: 0;
  overflow: auto;
  color: #c3d8ef;
  font-size: 13px;
  line-height: 1.5;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.gallery-grid button {
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(142, 205, 255, 0.24);
  border-radius: 6px;
  background: #07101e;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.gallery-grid button:hover img {
  filter: saturate(1.16);
  transform: scale(1.08);
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 28px;
}

.gallery-modal.is-open {
  display: grid;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 14, 0.76);
  backdrop-filter: blur(12px);
}

.gallery-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(1080px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow: hidden;
  border: 1px solid rgba(142, 205, 255, 0.36);
  border-radius: 8px;
  background: rgba(5, 12, 27, 0.96);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.72);
}

.gallery-modal__panel img {
  width: 100%;
  height: min(70vh, 760px);
  object-fit: contain;
  background: #020711;
}

.gallery-modal__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid rgba(142, 205, 255, 0.2);
}

.gallery-modal__info strong {
  min-width: 0;
  overflow: hidden;
  color: #eff9ff;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-modal__info div {
  display: flex;
  gap: 8px;
}

.gallery-modal__info button {
  padding: 9px 12px;
  border: 1px solid rgba(151, 214, 255, 0.32);
  border-radius: 7px;
  color: #eef9ff;
  background: rgba(238, 248, 255, 0.08);
  font-size: 13px;
  font-weight: 950;
}

.gallery-modal__info button:first-child {
  color: #06101d;
  background: linear-gradient(135deg, #8ee7ff, #a98cff);
}

.system-modal {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: none;
  place-items: center;
  padding: 28px;
}

.system-modal.is-open {
  display: grid;
}

.system-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 14, 0.72);
  backdrop-filter: blur(12px);
}

.system-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow: hidden;
  border: 1px solid rgba(142, 205, 255, 0.34);
  border-radius: 8px;
  color: #edf8ff;
  background: rgba(5, 12, 27, 0.96);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.72);
}

.system-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid rgba(142, 205, 255, 0.2);
}

.system-modal__head p {
  margin: 0 0 4px;
  color: #76dcff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-modal__head h2 {
  margin: 0;
  font-size: 24px;
}

.system-modal__head button,
.slot-card,
.setting-row input,
.setting-toggle {
  border: 1px solid rgba(151, 214, 255, 0.24);
  border-radius: 8px;
  background: rgba(238, 248, 255, 0.06);
  color: #edf8ff;
}

.system-modal__head button {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 950;
}

.status-panel {
  width: min(620px, calc(100vw - 40px));
}

.status-panel__body {
  display: grid;
  gap: 14px;
  padding: 18px;
  overflow: auto;
}

.status-operation,
.status-cards section {
  border: 1px solid rgba(142, 205, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 42, 73, 0.72), rgba(8, 17, 34, 0.8));
}

.status-operation {
  display: grid;
  gap: 7px;
  padding: 16px;
}

.status-operation span,
.status-cards span {
  color: #82ddff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.status-operation strong {
  color: #fff4ca;
  font-size: 19px;
  line-height: 1.45;
}

.status-identity {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(182, 148, 255, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 0%, rgba(137, 96, 255, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(25, 30, 60, 0.9), rgba(7, 16, 34, 0.88));
}

.status-identity__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-identity__head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.status-identity__head span,
.status-identity__form label {
  color: #9de4ff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.status-identity__head strong {
  overflow: hidden;
  color: #fff4ca;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-identity__head small {
  color: rgba(211, 230, 248, 0.66);
  font-size: 11px;
  line-height: 1.5;
}

.status-identity button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(151, 214, 255, 0.3);
  border-radius: 8px;
  color: #eef9ff;
  background: rgba(238, 248, 255, 0.07);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.status-identity__head button {
  color: #08111f;
  background: linear-gradient(135deg, #8ee7ff, #b99aff);
  box-shadow: 0 8px 28px rgba(118, 173, 255, 0.2);
}

.status-identity button:disabled {
  cursor: not-allowed;
  color: rgba(226, 239, 249, 0.46);
  background: rgba(238, 248, 255, 0.04);
  box-shadow: none;
}

.status-identity__form {
  display: grid;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px solid rgba(151, 214, 255, 0.15);
}

.status-identity__form[hidden] {
  display: none;
}

.status-identity__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.status-identity__controls input {
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(142, 205, 255, 0.38);
  border-radius: 8px;
  outline: none;
  color: #f5fbff;
  background: rgba(2, 9, 21, 0.78);
  font: inherit;
}

.status-identity__controls input:focus {
  border-color: #8ee7ff;
  box-shadow: 0 0 0 3px rgba(105, 215, 255, 0.13);
}

.status-identity__controls button[type='submit'] {
  color: #07111f;
  background: linear-gradient(135deg, #8ee7ff, #b99aff);
}

.status-identity__message {
  min-height: 0;
  margin: 0;
  color: rgba(213, 233, 248, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.status-identity__message:empty {
  display: none;
}

.status-identity__message[data-tone='success'] {
  color: #aef4d0;
}

.status-identity__message[data-tone='error'] {
  color: #ffb4c6;
}

.status-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-cards section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
}

.status-cards strong {
  overflow: hidden;
  color: #f2f9ff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-panel__note {
  margin: 0;
  color: rgba(205, 229, 248, 0.68);
  font-size: 12px;
  line-height: 1.6;
}

.status-growth {
  display: grid;
  gap: 11px;
  padding: 15px;
  border: 1px solid rgba(142, 205, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 11, 25, 0.54);
}

.status-growth > div {
  display: grid;
  grid-template-columns: 92px minmax(90px, 1fr) minmax(130px, auto);
  align-items: center;
  gap: 10px;
}

.status-growth span,
.status-growth strong {
  font-size: 12px;
}

.status-growth span {
  color: #9bdfff;
  font-weight: 900;
}

.status-growth strong {
  color: rgba(239, 248, 255, 0.78);
  text-align: right;
}

.status-growth i {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(211, 236, 255, 0.1);
}

.status-growth b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6bdcff, #a68cff, #ff86b7);
  transition: width 420ms ease;
}

@media (max-width: 560px) {
  .status-identity__head {
    align-items: stretch;
    flex-direction: column;
  }

  .status-identity__head button {
    width: 100%;
  }

  .status-identity__controls {
    grid-template-columns: 1fr 1fr;
  }

  .status-identity__controls input {
    grid-column: 1 / -1;
  }

  .status-growth > div {
    grid-template-columns: 86px 1fr;
  }

  .status-growth strong {
    grid-column: 1 / -1;
    text-align: left;
  }
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.slot-card {
  display: grid;
  grid-template-rows: 110px auto auto minmax(44px, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 10px;
  text-align: left;
}

.slot-card img,
.slot-empty-mark {
  width: 100%;
  height: 110px;
  border-radius: 6px;
}

.slot-card img {
  object-fit: cover;
}

.slot-empty-mark {
  display: grid;
  place-items: center;
  color: rgba(205, 234, 255, 0.46);
  background: rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.slot-card strong,
.slot-card span,
.slot-card p {
  min-width: 0;
  overflow: hidden;
}

.slot-card strong {
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-card span {
  color: #8edbff;
  font-size: 12px;
  font-weight: 850;
}

.slot-card p {
  display: -webkit-box;
  margin: 0;
  color: #cfe3f8;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.backlog-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 16px 16px 16px 36px;
  margin: 0;
  overflow: auto;
  color: #d9ecff;
  line-height: 1.55;
}

.settings-panel {
  width: min(560px, calc(100vw - 56px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
}

.setting-row,
.setting-toggle {
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: center;
  gap: 14px;
  margin: 14px 16px 0;
  padding: 14px;
  font-weight: 900;
}

.setting-row input {
  width: 100%;
  accent-color: var(--blue);
}

.setting-toggle {
  grid-template-columns: auto 1fr;
  margin-bottom: 16px;
}

.setting-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.audio-settings {
  margin: 14px 16px 0;
  padding: 14px;
  border: 1px solid rgba(112, 181, 255, 0.2);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 31, 56, 0.88), rgba(11, 18, 34, 0.74));
}

.audio-settings__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 8px;
}

.audio-settings__head div {
  display: grid;
  gap: 4px;
}

.audio-settings__head strong {
  color: #e9f5ff;
  font-size: 15px;
}

.audio-settings__head small {
  color: #8db2d7;
  font-size: 11px;
}

.setting-toggle--compact {
  margin: 0;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(91, 164, 255, 0.1);
}

.setting-row--audio {
  grid-template-columns: 82px 1fr 34px;
  gap: 10px;
  margin: 4px 0 0;
  padding: 9px 4px;
  font-size: 12px;
}

.setting-row--audio output {
  min-width: 30px;
  padding: 3px 4px;
  border-radius: 8px;
  background: rgba(95, 177, 255, 0.12);
  color: #a9d5ff;
  font-size: 11px;
  text-align: center;
}

.reduced-motion .scene-image,
.reduced-motion .scene-plane,
.reduced-motion .live2d-layer,
.reduced-motion .sun-dust,
.reduced-motion .eye-blink,
.reduced-motion .detail-cutin,
.reduced-motion #dialogueText {
  animation: none !important;
}

@keyframes shotWide {
  from { transform: scale(1.035) translate3d(-0.35%, 0.15%, 0); }
  to { transform: scale(1.015) translate3d(0.35%, -0.1%, 0); }
}

@keyframes shotMediumLeft {
  from { transform: scale(1.025) translate3d(0.2%, 0.08%, 0); }
  to { transform: scale(1.055) translate3d(-0.55%, -0.18%, 0); }
}

@keyframes shotMediumRight {
  from { transform: scale(1.025) translate3d(-0.2%, 0.08%, 0); }
  to { transform: scale(1.055) translate3d(0.55%, -0.18%, 0); }
}

@keyframes shotClose {
  from { transform: scale(1.045); }
  to { transform: scale(1.095) translate3d(0, -0.28%, 0); }
}

@keyframes shotReaction {
  0% { transform: scale(1.045); }
  45% { transform: scale(1.075) translate3d(-0.18%, 0, 0); }
  70% { transform: scale(1.067) translate3d(0.12%, 0, 0); }
  100% { transform: scale(1.07); }
}

@keyframes sceneIn {
  from {
    opacity: 0.35;
    filter: brightness(0.78);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}

.stage .scene-image.frame-enter {
  animation: frameCrossfade 1200ms cubic-bezier(.2,.7,.2,1) both !important;
}

@keyframes frameCrossfade {
  0% {
    opacity: 0.18;
    filter: blur(5px) brightness(0.78);
  }
  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
  }
}

@keyframes cinematicCaptionIn {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(18px) scale(0.99);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes cinematicCaptionOut {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(-12px) scale(0.995);
  }
}

@keyframes emotionalFrame {
  from {
    opacity: 0.62;
    filter: brightness(0.88);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}

@keyframes warmEmotionalFrame {
  from {
    opacity: 0.62;
    filter: saturate(0.96) brightness(0.96);
  }
  to {
    opacity: 1;
    filter: saturate(1.03) brightness(1.02);
  }
}

@keyframes tensionFrame {
  from {
    opacity: 0.56;
    filter: saturate(0.88) brightness(0.88);
  }
  to {
    opacity: 1;
    filter: saturate(0.98) brightness(0.96);
  }
}

@keyframes eventFrame {
  from {
    opacity: 0.42;
    filter: saturate(0.88) brightness(0.9);
  }
  to {
    opacity: 1;
    filter: saturate(1.04) brightness(1);
  }
}

@keyframes cutinReveal {
  0% {
    opacity: 0;
    transform: scale(1.025);
    filter: blur(5px);
  }
  18%, 82% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.995);
  }
}

@keyframes driftDust {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(6%, -8%, 0);
  }
}

@keyframes blink {
  0%,
  88%,
  94%,
  100% {
    opacity: 0;
    transform: rotate(var(--r)) scaleY(0);
  }
  90%,
  92% {
    opacity: 0.88;
    transform: rotate(var(--r)) scaleY(1);
  }
}

@keyframes chapterSplash {
  0% {
    opacity: 0;
    transform: scale(1.08);
  }
  18%,
  62% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.98);
  }
}

@keyframes toastIn {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -5px);
  }
}

@keyframes briefingOverlay {
  0%,
  100% {
    opacity: 0;
  }
  10%,
  82% {
    opacity: 1;
  }
}

@keyframes briefingDim {
  0%,
  100% {
    opacity: 0;
  }
  14%,
  78% {
    opacity: 1;
  }
}

@keyframes briefingFlyRight {
  0% {
    opacity: 0;
    transform: translate3d(34vw, -4vh, 0) rotate(3deg) scale(0.9);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-8vw, 0, 0) rotate(-1deg) scale(0.98);
  }
}

@keyframes briefingFlyLeft {
  0% {
    opacity: 0;
    transform: translate3d(-34vw, 4vh, 0) rotate(-3deg) scale(0.9);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(8vw, 0, 0) rotate(1deg) scale(0.98);
  }
}

@keyframes briefingFlyUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 24vh, 0) rotate(0) scale(0.92);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(0) scale(0.98);
  }
}

@keyframes briefingSettle {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
    filter: blur(6px);
  }
  16%, 80% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -8px, 0) scale(0.995);
    filter: blur(2px);
  }
}

@keyframes briefingSheen {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes letterSpark {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(10px);
  }
  18%,
  72% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(-6px);
  }
}

@keyframes animeCutCard {
  0% {
    opacity: 0;
    transform: translate3d(-54%, 12px, 0) scale(0.985);
    filter: blur(5px);
  }
  14%,
  76% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-47%, -5px, 0) scale(0.995);
    filter: blur(2px);
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .game-shell {
    height: auto;
    min-height: 100vh;
    padding: 10px;
  }

  .stage {
    min-height: 76vh;
  }

  .mascot-speaker {
    right: 16px;
    bottom: clamp(190px, 30svh, 258px);
    width: clamp(98px, 26vw, 132px);
  }

  .mascot-speaker__signal {
    gap: 4px;
    padding: 4px 8px 5px;
    font-size: 10px;
  }

  .top-bar {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .quick-actions {
    flex-direction: column;
  }

  .mission-strip {
    top: 112px;
    left: 12px;
    max-width: calc(100% - 24px);
  }

  .status-strip {
    top: 166px;
    left: 12px;
    width: calc(100% - 24px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .title-panel {
    left: 18px;
    bottom: 128px;
  }

  .dialogue-box {
    left: 10px;
    right: 10px;
    width: auto;
    transform: none;
    bottom: 10px;
    padding: 14px 62px 14px 14px;
  }

  .side-panel {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: min(370px, calc(100vw - 20px));
  }

  .gallery-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .choices {
    grid-template-columns: 1fr;
  }

  .stage[data-presentation='conversation'] .choices {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .game-shell:has(.side-panel.is-open) .stage {
    margin-right: 410px;
  }

  .game-shell:has(.side-panel.is-open) .top-bar h1 {
    max-width: 430px;
    overflow: hidden;
    font-size: 32px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-shell:has(.side-panel.is-open) .dialogue-box {
    left: 18px;
    right: 18px;
    width: auto;
    transform: none;
  }

  .stage.notebook-open .dialogue-box {
    left: 18px;
    right: 18px;
    width: auto;
    transform: none;
  }
}

@media (max-width: 560px) {
  .stage {
    height: calc(100svh - 20px);
    min-height: calc(100svh - 20px);
  }

  .mission-strip,
  .status-strip {
    display: none;
  }

  .status-cards {
    grid-template-columns: 1fr;
  }

  .top-bar h1 {
    max-width: calc(100vw - 92px);
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quick-actions button {
    padding: 8px 9px;
    font-size: 12px;
  }

  .title-panel h2 {
    max-width: 100%;
    font-size: 34px;
    overflow-wrap: anywhere;
  }

  .title-panel h2 span {
    display: block;
  }

  .title-panel p {
    font-size: 15px;
  }

  #dialogueText {
    font-size: 16px;
    line-height: 1.58;
  }

  .dialogue-box {
    max-height: 58svh;
    overflow-y: auto;
  }

  .stage[data-dialogue-mode='subtitle'] .dialogue-box,
  .stage[data-dialogue-mode='narration'] .dialogue-box {
    left: 12px;
    right: 12px;
    bottom: 16px;
    width: auto;
    max-height: 46svh;
    min-height: 76px;
    padding: 9px 80px 10px 12px;
    transform: none;
  }

  .stage[data-dialogue-mode='esky'] .dialogue-box,
  .stage[data-dialogue-mode='esky-live'] .dialogue-box,
  .stage[data-dialogue-mode='player'] .dialogue-box,
  .stage[data-dialogue-mode='mascot'] .dialogue-box,
  .stage[data-dialogue-mode='faculty'] .dialogue-box,
  .stage[data-dialogue-mode='system'] .dialogue-box,
  .stage[data-dialogue-mode='chat'] .dialogue-box,
  .stage[data-dialogue-mode='placard'] .dialogue-box {
    left: 12px;
    right: 12px;
    bottom: 14px;
    width: auto;
    max-height: 48svh;
    padding: 11px 80px 12px 13px;
    transform: none;
  }

  .stage[data-dialogue-mode='player'] .speaker-row {
    flex-direction: row;
  }

  .stage[data-dialogue-mode='esky-live'] .speaker-name,
  .stage[data-dialogue-mode='chat'] .speaker-name {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .stage[data-dialogue-mode='esky-live'] .dialogue-box::before,
  .stage[data-dialogue-mode='chat'] .dialogue-box::before {
    top: 12px;
  }

  .stage[data-dialogue-mode='player'] .scene-progress {
    margin-right: 0;
    margin-left: auto;
  }

  .prop-card {
    width: min(var(--prop-width), 54%);
    font-size: min(var(--prop-size), 16px);
  }

  .stage[data-dialogue-mode='subtitle'] #dialogueText,
  .stage[data-dialogue-mode='narration'] #dialogueText {
    font-size: 16px;
    line-height: 1.52;
  }

  .stage.has-choices .dialogue-box {
    max-height: 72svh;
    padding-right: 14px;
  }

  .stage.has-choices .choices {
    gap: 6px;
    margin-top: 10px;
  }

  .stage.has-choices .choices button {
    min-height: 50px;
    padding: 9px 10px;
    font-size: 14px;
    line-height: 1.36;
  }

  .detail-cutin {
    top: 16%;
    height: 28svh;
  }

  .anime-cut {
    top: 17%;
    min-width: calc(100% - 28px);
    padding: 14px 18px 16px;
  }

  .briefing-overlay {
    padding: 16px;
  }

  .briefing-overlay.is-narration .briefing-card h2 {
    font-size: 40px;
  }

  .stage.is-cinematic-centered .dialogue-box {
    width: calc(100% - 28px);
    padding: 0 12px;
  }

  .stage.is-cinematic:not(.is-cinematic-centered) .dialogue-box {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
  }

  .stage.is-cinematic-centered #dialogueText {
    min-height: 4.6em;
    font-size: clamp(23px, 7vw, 34px);
    line-height: 1.62;
  }

  .stage.is-cinematic-centered .next-button {
    bottom: -68px;
  }

  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* 컷 전환 겹침(09-30) */
.scene-plane .scene-image.scene-ghost {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 1;
  animation-name: none !important;
  transform: none;
  transition: none;
}
.scene-plane .scene-image.scene-ghost.is-leaving {
  animation-name: ghostOut !important;
  animation-timing-function: ease-out !important;
  animation-fill-mode: forwards !important;
}
@keyframes ghostOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* 폰 세로 화면(10-05): 가로 CG를 화면 위쪽에 크게 채우고(양옆 크롭), 컷마다 천천히 좌우로 흐르는 팬으로 잘린 곳을 보여준다.
   남는 아래쪽은 같은 그림을 흐리게 깔아 채운다 */
@media (max-width: 560px) and (orientation: portrait) {
  .scene-plane {
    place-items: start stretch;
    padding-top: calc(env(safe-area-inset-top, 0px) + 58px);
    background: #02050d;
  }
  .scene-plane::before {
    content: '';
    position: absolute;
    inset: -40px;
    z-index: 0;
    background: var(--scene-bg, none) center / cover no-repeat;
    filter: blur(22px) brightness(0.5) saturate(1.1);
    transform: scale(1.08);
    pointer-events: none;
  }
  .scene-plane .scene-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 56svh;
    max-height: none;
    object-fit: cover;
    object-position: var(--fx, 50%) 30%;
    -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
    mask-image: linear-gradient(180deg, #000 82%, transparent);
    animation: mobilePan 9s ease-in-out both;
  }
  .stage[data-visual-hold='true'] .scene-plane .scene-image {
    animation: none !important;
  }
  .scene-plane .scene-image.scene-ghost {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(env(safe-area-inset-top, 0px) + 58px);
    height: 56svh;
  }
}
@keyframes mobilePan {
  from { object-position: calc(var(--fx, 50%) - 7%) 30%; }
  to { object-position: calc(var(--fx, 50%) + 7%) 30%; }
}

/* 모션그래픽 층(10-06, src/motion-fx.js): 그림은 그대로, 만화 기호·빛·카메라만 코드로 움직인다 */
.mfx-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.mfx-emote {
  position: absolute;
  width: var(--sz, 48px);
  height: var(--sz, 48px);
  transform: translate(-50%, -50%);
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  animation: mfxPop 2.6s cubic-bezier(.2,.9,.3,1.2) both;
  animation-play-state: paused;
}
.mfx-layer.is-ready .mfx-emote { animation-play-state: running; }
.mfx-emote svg { width: 100%; height: 100%; overflow: visible; }
.mfx-sweat { animation-name: mfxSweat; animation-duration: 2.4s; }
.mfx-anger { animation-name: mfxAnger; animation-duration: 2.2s; }
.mfx-heart, .mfx-music { animation-name: mfxFloat; animation-duration: 2.8s; }
.mfx-sparkle { animation-name: mfxTwinkle; animation-duration: 2.4s; }
.mfx-blush { width: calc(var(--sz) * 2.2); animation-name: mfxBlush; animation-duration: 3.2s; }
.mfx-gloom { width: calc(var(--sz) * 1.8); animation-name: mfxGloom; animation-duration: 3.4s; }
@keyframes mfxPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  24% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}
@keyframes mfxSweat {
  0% { opacity: 0; transform: translate(-50%, -80%) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -20%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, 0) scale(.9); }
}
@keyframes mfxAnger {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  22%, 44%, 66% { transform: translate(-50%, -50%) scale(.92); }
  33%, 55% { transform: translate(-50%, -50%) scale(1.1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@keyframes mfxFloat {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.5); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(.9) rotate(8deg); }
}
@keyframes mfxTwinkle {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(25deg); }
  50% { opacity: .5; transform: translate(-50%, -50%) scale(.7) rotate(45deg); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(60deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(90deg); }
}
@keyframes mfxBlush {
  0% { opacity: 0; }
  25%, 80% { opacity: .9; }
  100% { opacity: 0; }
}
@keyframes mfxGloom {
  0% { opacity: 0; transform: translate(-50%, -80%); }
  25% { opacity: .85; transform: translate(-50%, -50%); }
  85% { opacity: .85; }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}

/* 장면 빛·입자 */
.mfx-amb {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms ease;
}
.stage[data-mfx-amb='onair'] .mfx-amb {
  opacity: 1;
  background: radial-gradient(circle at 88% 8%, rgba(255, 40, 70, 0.32), transparent 34%);
  animation: mfxOnAir 1.8s ease-in-out infinite;
}
.stage[data-mfx-amb='monitor'] .mfx-amb {
  opacity: 1;
  background: linear-gradient(120deg, rgba(90, 140, 255, 0.10), transparent 45%, rgba(150, 110, 255, 0.08));
  animation: mfxMonitor 3.2s steps(1, end) infinite;
}
.stage[data-mfx-amb='warm'] .mfx-amb {
  opacity: 1;
  background: radial-gradient(circle at 30% 70%, rgba(255, 170, 90, 0.16), transparent 55%);
  animation: mfxCandle 2.4s ease-in-out infinite;
}
.stage[data-mfx-amb='dust'] .mfx-amb {
  opacity: .5;
  background-image:
    radial-gradient(circle, rgba(220, 235, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(190, 160, 255, 0.6) 0 1.5px, transparent 2.5px);
  background-size: 120px 120px, 190px 190px;
  animation: mfxDust 22s linear infinite;
}
@keyframes mfxOnAir { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes mfxMonitor { 0% { opacity: .9; } 37% { opacity: .65; } 41% { opacity: 1; } 70% { opacity: .8; } }
@keyframes mfxCandle { 0%, 100% { opacity: .7; } 30% { opacity: 1; } 55% { opacity: .8; } 75% { opacity: .95; } }
@keyframes mfxDust { from { background-position: 0 0, 0 0; } to { background-position: 60px -240px, -40px -380px; } }

/* 설렘·부끄러움: 화면 가장자리 분홍빛 */
.mfx-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(255, 120, 170, 0.32) 100%);
}
.stage[data-mfx-blush='true'] .mfx-layer.is-ready::before { animation: mfxBlush 3.6s ease both; }

/* 집중선 */
.mfx-layer::after {
  content: '';
  position: absolute;
  inset: -10%;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 45%, rgba(255, 255, 255, 0.0) 0deg 4deg, rgba(255, 255, 255, 0.22) 4deg 5deg);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, transparent 26%, #000 62%);
  mask-image: radial-gradient(circle at 50% 45%, transparent 26%, #000 62%);
}
.stage[data-mfx-lines='true'] .mfx-layer::after { animation: mfxLines 1.4s ease-out both; }
@keyframes mfxLines { 0% { opacity: 0; transform: scale(1.15); } 15% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }

/* 순간 섬광(방송 시작 등) */
.mfx-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}
.mfx-flash.is-on { animation: mfxFlash 420ms ease-out both; }
@keyframes mfxFlash { 0% { opacity: .55; } 100% { opacity: 0; } }

.reduced-motion .mfx-amb, .reduced-motion .mfx-layer::after { animation: none !important; }

/* 게임 시스템(10-10, src/game-systems.js): 방송 아카이브·방송 리포트·방송 종료 카드 */
.gs-modal { z-index: 80; }
.gs-modal .system-modal__panel { width: min(860px, calc(100vw - 32px)); max-height: calc(100svh - 32px); }
.gs-body { overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; }
.gs-progress { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #aebde0; font-size: 13px; }
.gs-progress b { color: #ffd37a; font-size: 16px; }
.gs-tabs { display: flex; gap: 8px; }
.gs-tabs button, .gs-actions button, .gs-fork button, .gs-primary {
  border: 1px solid rgba(151, 214, 255, 0.28); border-radius: 8px; padding: 9px 14px;
  color: #edf8ff; background: rgba(238, 248, 255, 0.06); font-weight: 800; cursor: pointer;
}
.gs-tabs button.is-on, .gs-primary { background: linear-gradient(135deg, #7b5cff, #39a7ff); border-color: transparent; }
.gs-tab[data-pane="endings"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gs-tab[hidden] { display: none !important; }
.gs-ending { border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(142, 205, 255, 0.18); }
.gs-ending__img { aspect-ratio: 16 / 9; background: center / cover no-repeat; }
.gs-ending.is-locked .gs-ending__img { filter: blur(14px) brightness(0.35) saturate(0.4); transform: scale(1.1); }
.gs-ending__text { padding: 10px 12px 12px; }
.gs-ending__text strong { display: block; font-size: 14px; margin-bottom: 4px; }
.gs-ending__text p { margin: 0; color: #9fb0d4; font-size: 12.5px; line-height: 1.5; }
.gs-ending.tone-true.is-seen { border-color: #ffd37a; box-shadow: 0 0 22px rgba(255, 211, 122, 0.25); }
.gs-ending.tone-hidden.is-seen { border-color: #c9a2ff; }
.gs-chapter h3 { margin: 6px 0 8px; font-size: 15px; color: #ffd37a; }
.gs-chapter h3 small { color: #8fa3cc; font-weight: 700; margin-left: 6px; }
.gs-fork { padding: 10px 12px; margin-bottom: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.gs-fork__q { margin: 0 0 6px; color: #c9d8ff; font-size: 13px; }
.gs-fork.is-unknown .gs-fork__q { color: #6f7fa3; font-style: italic; }
.gs-fork ul { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
.gs-fork li.is-taken { color: #edf8ff; }
.gs-fork li.is-taken::marker { content: "✓ "; color: #6fe3a7; }
.gs-fork li.is-locked { color: #5f6f92; }
.gs-fork button { padding: 5px 10px; font-size: 12px; }
.gs-report__chapter { margin: 0; color: #76dcff; font-weight: 900; }
.gs-report__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 16px; }
.gs-stat { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 8px; font-size: 13px; color: #aebde0; }
.gs-stat i { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.gs-stat em { display: block; height: 100%; background: linear-gradient(90deg, #6aa8ff, #b28bff); transition: width 900ms ease; }
.gs-stat.stat-risk em { background: linear-gradient(90deg, #ff9a6f, #ff4f6d); }
.gs-stat b { text-align: right; color: #6f7fa3; }
.gs-stat.is-up b { color: #6fe3a7; }
.gs-stat.stat-risk.is-up b { color: #ff6f7d; }
.gs-stat.is-down b { color: #ff9a6f; }
.gs-body h4 { margin: 2px 0 -4px; font-size: 13px; color: #ffd37a; }
.gs-report__picks, .gs-report__chat { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.gs-report__chat { list-style: none; padding: 10px 12px; border-radius: 8px; background: rgba(120, 90, 255, 0.1); }
.gs-report__chat b { color: #c9a2ff; margin-right: 6px; }
.gs-churing { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(83, 41, 130, 0.25); border: 1px solid rgba(220, 186, 255, 0.3); }
.gs-churing__face {
  flex: 0 0 58px; height: 58px; border-radius: 50% 50% 46% 54%; border: 2px solid rgba(220, 186, 255, 0.86);
  background: url("../assets/scenes/remake-vb-prologue-chuuring-energy-puff.webp") 52% 35% / 282% auto no-repeat;
  animation: gsBob 2.4s ease-in-out infinite;
}
.gs-churing p { margin: 0; font-size: 14px; line-height: 1.55; }
.gs-churing strong { display: block; margin-bottom: 4px; color: #e7cfff; }
.gs-review ul { margin: 4px 0; padding-left: 18px; font-size: 13px; display: grid; gap: 2px; }
.gs-review li.is-miss { color: #ff9aa6; }
.gs-review li.is-ok { color: #8fe7b8; }
@keyframes gsBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.gs-card { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 211, 122, 0.4); background: #050b19; }
.gs-card__cg { aspect-ratio: 16 / 7; max-height: 38vh; background: var(--cg) center 30% / cover no-repeat; -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent); mask-image: linear-gradient(180deg, #000 65%, transparent); }
.gs-card__info { padding: 0 16px 16px; margin-top: -28px; position: relative; display: grid; gap: 8px; }
.gs-card__kicker { margin: 0; color: #76dcff; font-size: 11px; font-weight: 900; letter-spacing: 0.08em; }
.gs-card h3 { margin: 0; font-size: clamp(20px, 3.2vw, 28px); }
.gs-card__who { margin: 0; color: #aebde0; font-size: 13px; }
.gs-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.gs-primary { justify-self: end; }
@media (max-width: 560px) {
  .gs-stat { grid-template-columns: 96px 1fr 30px; font-size: 12px; }
  .gs-tab[data-pane="endings"] { grid-template-columns: 1fr 1fr; }
}

/* 게임 시스템 2단계(10-10): 업적 알림·시청자 투표 비율·생방송 돌발 선택 */
.gs-toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); z-index: 95;
  display: grid; gap: 2px; min-width: 240px; max-width: calc(100vw - 32px); padding: 10px 16px;
  border-radius: 10px; border: 1px solid rgba(255, 211, 122, 0.6); color: #fff7e0;
  background: linear-gradient(135deg, rgba(60, 36, 110, 0.96), rgba(18, 30, 70, 0.96));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); transform: translate(-50%, -140%); transition: transform 420ms cubic-bezier(.2,.9,.3,1.2);
}
.gs-toast.is-on { transform: translate(-50%, 0); }
.gs-toast b { color: #ffd37a; font-size: 14px; }
.gs-toast span { font-size: 12.5px; color: #d9dcff; }
.gs-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.gs-ach__item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); color: #6f7fa3; }
.gs-ach__item b { font-size: 18px; line-height: 1; }
.gs-ach__item strong { display: block; font-size: 13.5px; }
.gs-ach__item p { margin: 2px 0 0; font-size: 12px; }
.gs-ach__item.is-got { color: #edf8ff; background: rgba(255, 211, 122, 0.08); border: 1px solid rgba(255, 211, 122, 0.3); }
.gs-ach__item.is-got b { color: #ffd37a; }
.gs-poll {
  position: absolute; right: 14px; top: 64px; z-index: 30; width: min(340px, calc(100% - 28px)); padding: 10px 12px;
  border-radius: 10px; background: rgba(8, 10, 28, 0.88); border: 1px solid rgba(201, 162, 255, 0.45);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45); color: #e9ecff; font-size: 12.5px;
  opacity: 0; transform: translateY(-8px); transition: opacity 400ms ease, transform 400ms ease; pointer-events: none;
}
.gs-poll.is-on { opacity: 1; transform: none; }
.gs-poll__head { margin: 0 0 6px; color: #ff6f9c; font-weight: 900; font-size: 11px; letter-spacing: 0.06em; }
.gs-poll__row { display: grid; grid-template-columns: 1fr 70px 36px; gap: 6px; align-items: center; margin: 3px 0; color: #aab3d8; }
.gs-poll__row span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gs-poll__row i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.gs-poll__row em { display: block; height: 100%; background: #7e8cff; transition: width 800ms ease; }
.gs-poll__row b { text-align: right; }
.gs-poll__row.is-mine { color: #fff; }
.gs-poll__row.is-mine em { background: linear-gradient(90deg, #ff7eb6, #c9a2ff); }
.gs-poll__foot { margin: 6px 0 0; color: #c9a2ff; }
.gs-timer { grid-column: 1 / -1; display: grid; gap: 4px; margin-bottom: 4px; color: #ffd37a; font-size: 12.5px; font-weight: 800; }
.gs-timer i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.gs-timer em { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffd37a, #ff8f5a); }
.gs-timer.is-hurry { color: #ff6f7d; animation: gsHurry 0.5s ease-in-out infinite alternate; }
.gs-timer.is-hurry em { background: #ff4f6d; }
@keyframes gsHurry { from { opacity: 1; } to { opacity: 0.55; } }
@media (max-width: 560px) {
  .gs-poll { top: auto; bottom: 46%; right: 10px; }
}

/* 갈림길 정지 연출(10-10): 선택지가 뜨면 장면이 한 톤 가라앉고(배경음도 game-systems.js에서 낮춤) 고르는 순간에 집중한다 */
.stage .scene-plane .scene-image { transition: opacity 320ms ease, filter 700ms ease; }
.stage.has-choices .scene-plane .scene-image:not(.scene-ghost) { filter: brightness(0.78) saturate(0.9); }
.stage.has-choices .scene-vignette { opacity: 1; }
