@import url("./tokens.css");

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  color: var(--paper);
  font-family: "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.page-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: clamp(30px, 5vw, 92px);
  width: 100vw;
  height: 100dvh;
  min-height: 620px;
  padding: 5vh 5vw;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(83, 222, 255, 0.09), transparent 28%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    #05080b;
  background-size: auto, 38px 38px, 38px 38px, auto;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-shell::before {
  background: radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.66) 82%);
}

.page-shell::after {
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.game-stage {
  position: relative;
  z-index: 2;
  width: min(49.5vh, 440px);
  aspect-ratio: 9 / 16;
  max-height: 88dvh;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(190, 240, 255, 0.26);
  background: #080b0d;
  box-shadow:
    0 0 0 7px #0b1014,
    0 0 0 8px rgba(150, 226, 255, 0.2),
    0 40px 100px rgba(0, 0, 0, 0.86),
    0 0 65px rgba(66, 209, 240, 0.08);
}

.game-stage::before,
.game-stage::after {
  content: "";
  position: absolute;
  z-index: 20;
  pointer-events: none;
}

.game-stage::before {
  top: 0;
  left: 12%;
  width: 44px;
  height: 3px;
  background: var(--acid);
  box-shadow: 0 0 15px var(--acid);
}

.game-stage::after {
  right: -1px;
  bottom: 22%;
  width: 2px;
  height: 70px;
  background: linear-gradient(transparent, var(--cyan), transparent);
}

.story-video,
.image-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-video {
  display: none;
  background: #030506;
}

.story-video.is-visible {
  display: block;
  animation: mediaIn 280ms ease-out both;
}

.image-backdrop {
  display: block;
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
  transition: opacity 350ms ease;
}

.image-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 28%, rgba(0, 0, 0, 0.8));
}

.ambient-glow {
  position: absolute;
  z-index: -1;
  inset: -40%;
  background: conic-gradient(from 30deg, transparent, rgba(86, 219, 255, 0.25), transparent 24%);
  animation: rotate 16s linear infinite;
}

.scanlines,
.vignette {
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.scanlines {
  opacity: 0.24;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, 0.24) 4px);
  mix-blend-mode: multiply;
}

.vignette {
  background:
    linear-gradient(180deg, rgba(2, 5, 8, 0.68), transparent 14%, transparent 71%, rgba(2, 5, 8, 0.92)),
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.38));
}

.hud {
  position: absolute;
  z-index: 15;
  left: 0;
  display: flex;
  align-items: center;
  width: 100%;
  padding-inline: 18px;
  color: rgba(231, 244, 247, 0.7);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hud--top {
  top: 0;
  height: 57px;
  gap: 8px;
  background: linear-gradient(180deg, rgba(3, 7, 10, 0.9), transparent);
}

.hud__case {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: pulse 1.8s ease-in-out infinite;
}

.hud-button,
.skip-button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  color: rgba(230, 244, 248, 0.64);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.hud-link { text-decoration: none; }

.hud-button:hover,
.skip-button:hover {
  color: var(--paper);
}

.hud__loop {
  display: grid;
  justify-items: end;
  min-width: 37px;
  border-left: 1px solid rgba(255,255,255,0.16);
  padding-left: 8px;
}

.hud__loop span {
  color: rgba(255,255,255,0.38);
  font-size: 7px;
}

.hud__loop b {
  color: var(--acid);
  font-size: 12px;
  line-height: 1;
}

.hud--bottom {
  bottom: 0;
  height: 58px;
  gap: 8px;
  background: linear-gradient(0deg, rgba(3, 7, 10, 0.94), transparent);
}

.chapter-track {
  display: flex;
  gap: 4px;
}

.chapter-track i {
  display: block;
  width: 12px;
  height: 2px;
  background: rgba(255,255,255,0.18);
  transition: 250ms ease;
}

.chapter-track i.is-active {
  width: 22px;
  background: var(--acid);
  box-shadow: 0 0 7px rgba(213, 255, 66, 0.75);
}

#chapterLabel {
  white-space: nowrap;
}

.skip-button {
  margin-left: auto;
}

.story-layer > .episode-transition-hint {
  position: absolute;
  right: 20px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  left: 20px;
  margin: 0;
  color: rgba(242, 246, 244, 0.76);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.03em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  user-select: none;
}

.story-layer {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 74px 20px 69px;
  pointer-events: none;
}

.story-layer > * {
  pointer-events: auto;
}

.home-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  animation: riseIn 700ms cubic-bezier(.2,.8,.2,1) both;
}

.home-panel__classification,
.panel-kicker,
.intertitle__eyebrow,
.ending-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--acid);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.home-panel__classification::before,
.panel-kicker::before,
.intertitle__eyebrow::before,
.ending-kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
}

.home-panel h1 {
  margin: 0;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(46px, 10.8vh, 82px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.07em;
  text-shadow: 0 4px 34px rgba(0,0,0,0.8);
}

.home-panel h1 span {
  display: block;
  margin-top: 9px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.55);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.31em;
}

.home-panel__copy {
  max-width: 300px;
  margin: 19px 0 22px;
  color: rgba(239, 246, 247, 0.7);
  font-size: 12px;
  line-height: 1.75;
}

.primary-action,
.secondary-action,
.choice-button {
  position: relative;
  width: 100%;
  min-height: 52px;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 18px;
  background: var(--acid);
  color: #0a0d0f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  clip-path: polygon(0 0, 96% 0, 100% 26%, 100% 100%, 4% 100%, 0 74%);
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-action:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.primary-action small {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.primary-action > span,
.secondary-action > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.option-play-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.option-play-icon::before {
  content: "";
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.secondary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(4, 9, 12, 0.72);
  color: rgba(255,255,255,0.8);
  font-size: 11px;
}

.choice-panel {
  margin: auto 0 0;
  padding: 16px;
  border: 1px solid rgba(205, 241, 250, 0.2);
  background: linear-gradient(145deg, rgba(7, 13, 17, 0.94), rgba(9, 16, 20, 0.82));
  box-shadow: 0 18px 55px rgba(0,0,0,0.5);
  backdrop-filter: blur(14px);
  animation: riseIn 450ms cubic-bezier(.2,.85,.25,1) both;
}

.choice-panel::before {
  content: "DECISION REQUIRED";
  position: absolute;
  right: 20px;
  transform: translateY(-25px);
  color: rgba(255,255,255,0.2);
  font: 700 7px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .16em;
}

.choice-panel h2,
.consequence-card h2,
.ending-panel h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.choice-panel__prompt {
  margin: 7px 0 15px;
  color: rgba(231, 241, 244, 0.58);
  font-size: 10px;
  line-height: 1.5;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-button {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.17);
  background: rgba(255,255,255,0.055);
  color: var(--paper);
  transition: 170ms ease;
}

.choice-button::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--acid);
  transition: transform 180ms ease;
}

.choice-button:hover {
  border-color: rgba(218, 255, 74, 0.6);
  background: rgba(218,255,74,0.08);
  transform: translateX(3px);
}

.choice-button:hover::after {
  transform: scaleX(1);
}

.choice-button__key {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--acid);
  font: 900 12px/1 "Arial Narrow", Arial, sans-serif;
}

.choice-button__copy {
  display: grid;
  gap: 2px;
}

.choice-button__copy b {
  font-size: 12px;
}

.choice-button__copy small {
  color: rgba(255,255,255,0.46);
  font-size: 8px;
}

.choice-button__tail {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.choice-button__tail .option-play-icon {
  width: 20px;
  height: 20px;
  color: var(--acid);
}

.choice-button__arrow {
  color: var(--acid);
  font-size: 17px;
}

.timed-choice-overlay {
  width: 100%;
  margin: auto 0 0;
  padding: 12px 0 4px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.timed-choice-overlay.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.timed-choice-overlay::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -20px;
  bottom: -69px;
  left: -20px;
  height: 260px;
  background: linear-gradient(0deg, rgba(2, 5, 7, .96), rgba(2, 5, 7, .72) 58%, transparent);
  pointer-events: none;
}

.timed-choice-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--acid);
  font: 800 8px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .13em;
}

.timed-choice-meta b {
  color: var(--paper);
  font-size: 11px;
}

.timed-choice-overlay h2 {
  margin: 0 0 10px;
  color: var(--paper);
  font-size: 18px;
  line-height: 1.2;
  text-shadow: 0 2px 12px #000;
}

/* Shared E01 option skin. Node type never controls button color or hierarchy. */
.decision-options-scroll {
  min-width: 0;
  max-height: min(38dvh, 320px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.timed-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 7px;
}

.timed-choice-options > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc((100% - 7px) / 2);
  justify-self: center;
}

.decision-prompt {
  margin: -3px 0 10px;
  color: rgba(231, 241, 244, .7);
  font-size: 10px;
  line-height: 1.5;
}

.decision-label--play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.timed-choice-button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(5, 10, 13, .76);
  color: var(--paper);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}

.timed-choice-button:focus-visible {
  /* Keep focus visible inside the option list's touch-scroll region. */
  outline-offset: -3px;
}

.timed-choice-button:hover,
.timed-choice-button.is-selected {
  border-color: var(--acid);
  background: rgba(218, 255, 74, .16);
  color: var(--acid);
}

.timed-choice-button:disabled {
  cursor: default;
  opacity: .45;
}

.timed-choice-button.is-selected:disabled {
  opacity: 1;
}

.timed-choice-track {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .16);
}

.timed-choice-track i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(218, 255, 74, .65);
}

.mission-panel {
  padding-top: 13px;
}

.target-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.target-card {
  position: relative;
  min-height: 184px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  background: #11181d;
  color: white;
  text-align: left;
  transition: 180ms ease;
}

.target-card:hover {
  z-index: 2;
  border-color: var(--acid);
  transform: translateY(-4px);
  box-shadow: 0 13px 30px rgba(0,0,0,0.5);
}

.target-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06);
  transition: 300ms ease;
}

.target-card:hover img {
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.08);
}

.target-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04) 30%, rgba(3,7,9,0.95) 92%);
}

.target-card__risk,
.target-card__text,
.target-card__number {
  position: absolute;
  z-index: 2;
}

.target-card__risk {
  top: 9px;
  left: 9px;
  padding: 4px 6px;
  background: var(--acid);
  color: #0a0c0d;
  font: 900 7px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .08em;
}

.target-card--danger .target-card__risk {
  background: var(--danger);
  color: white;
}

.target-card__number {
  top: 10px;
  right: 9px;
  color: rgba(255,255,255,0.55);
  font: 900 9px/1 "Arial Narrow", Arial, sans-serif;
}

.target-card__text {
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  gap: 2px;
}

.target-card__text b {
  font-size: 16px;
}

.target-card__text small {
  color: rgba(255,255,255,0.54);
  font-size: 8px;
}

.consequence-card,
.ending-panel {
  width: 100%;
  margin: auto 0;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(5, 10, 13, 0.91);
  box-shadow: 0 20px 60px rgba(0,0,0,0.58);
  backdrop-filter: blur(16px);
  animation: glitchIn 420ms steps(2, jump-none) both;
}

.consequence-card__status {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 7px;
  background: var(--danger);
  font: 900 8px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .15em;
}

.consequence-card p,
.ending-panel p {
  margin: 10px 0 18px;
  color: rgba(232,242,244,0.62);
  font-size: 11px;
  line-height: 1.65;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 15px 0;
  color: rgba(255,255,255,0.6);
  font: 700 8px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .1em;
}

.stat-row i {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.12);
}

.stat-row i::after {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  background: var(--danger);
}

.roll-panel {
  width: 100%;
  margin: auto 0;
  padding: 18px;
  border: 1px solid rgba(90, 225, 255, 0.36);
  background: rgba(4, 12, 16, 0.92);
  box-shadow: 0 0 40px rgba(66, 215, 250, 0.1);
  animation: riseIn 330ms ease-out both;
}

.roll-panel h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.roll-panel p {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.48);
  font-size: 9px;
}

.roll-reels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.roll-reels span {
  display: grid;
  place-items: center;
  height: 64px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  background:
    linear-gradient(180deg, rgba(0,0,0,.72), transparent 45%, rgba(0,0,0,.72)),
    rgba(255,255,255,.045);
  color: var(--cyan);
  font-size: 25px;
  font-weight: 900;
  text-shadow: 0 0 12px currentColor;
}

.roll-reels.is-rolling span {
  animation: reelFlicker 120ms steps(2) infinite;
}

.roll-meta {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.35);
  font: 700 7px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .1em;
}

.qte-panel {
  width: 100%;
  margin: auto 0;
  padding: 18px;
  border: 1px solid rgba(255, 84, 98, 0.48);
  background: linear-gradient(145deg, rgba(21, 5, 9, 0.95), rgba(5, 13, 17, 0.94));
  box-shadow: 0 0 44px rgba(255, 52, 71, 0.14), 0 20px 60px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px);
  animation: glitchIn 280ms steps(2, jump-none) both;
}

.qte-panel h2 {
  margin: 0;
  color: var(--paper);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.qte-instruction {
  margin: 7px 0 12px;
  color: rgba(235, 244, 247, 0.62);
  font-size: 10px;
  line-height: 1.55;
}

.qte-progress {
  height: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.qte-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--danger), var(--acid));
  box-shadow: 0 0 12px rgba(218, 255, 74, 0.45);
}

.qte-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin: 10px 0;
}

.qte-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.42);
  font: 800 10px/1 "Arial Narrow", Arial, sans-serif;
}

.qte-steps b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  color: var(--acid);
}

.qte-steps span.is-active {
  border-color: var(--acid);
  color: var(--paper);
  background: rgba(218, 255, 74, 0.08);
}

.qte-steps span.is-complete {
  border-color: rgba(90, 225, 255, 0.5);
  color: var(--cyan);
}

.qte-gesture-surface {
  display: grid;
  place-items: center;
  min-height: 124px;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  background: radial-gradient(circle, rgba(255, 67, 84, 0.13), transparent 66%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.qte-gesture-surface:active {
  cursor: grabbing;
}

.qte-gesture-surface strong {
  color: var(--acid);
  font: 900 56px/1 "Arial Narrow", Arial, sans-serif;
  text-shadow: 0 0 20px rgba(218, 255, 74, 0.42);
}

.qte-gesture-surface span {
  margin-top: 2px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 900;
}

.qte-gesture-surface small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.qte-fallback {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid rgba(218, 255, 74, 0.55);
  background: rgba(218, 255, 74, 0.08);
  color: var(--acid);
  font-size: 11px;
  font-weight: 900;
}

.qte-hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qte-countdown {
  color: var(--danger);
  font: 900 11px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .08em;
  text-shadow: 0 0 12px rgba(255, 66, 82, .58);
}

.qte-gesture-surface {
  position: relative;
}

.qte-cue-ring {
  --qte-window-angle: 360deg;
  --qte-window-ratio: 1;
  --qte-window-scale: 1;
  --qte-tap-angle: 0deg;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  padding: 12px;
  border: 2px solid rgba(218, 255, 74, .9);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 17, 18, .88) 0 57%, rgba(218, 255, 74, .14) 58% 100%);
  box-shadow: 0 0 0 7px rgba(218, 255, 74, .08), 0 0 30px rgba(218, 255, 74, .34);
  text-align: center;
  opacity: 0;
  transform: scale(.86);
  transition: opacity 100ms linear, transform 100ms ease;
  pointer-events: none;
}

.qte-cue-ring.is-visible {
  opacity: 1;
  transform: scale(1);
}

.qte-cue-ring.is-hit {
  animation: qteCueHit 280ms ease-out forwards;
}

.qte-cue-ring.is-lethal {
  border-color: var(--danger);
  color: var(--danger);
  background: radial-gradient(circle, rgba(28, 1, 6, .94) 0 57%, rgba(255, 55, 73, .24) 58% 100%);
  box-shadow: 0 0 0 10px rgba(255, 55, 73, .12), 0 0 46px rgba(255, 55, 73, .65);
}

.qte-cue-ring strong,
.qte-cue-ring span,
.qte-cue-ring small,
.qte-cue-ring em {
  position: relative;
  z-index: 2;
}

.qte-panel--cinematic {
  position: absolute;
  inset: 0;
  width: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: radial-gradient(circle at center, transparent 54%, rgba(2, 4, 7, .32) 100%);
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.qte-panel--cinematic .qte-hud {
  display: none;
}

.qte-panel--cinematic h2 {
  margin-top: 3px;
  font-size: 20px;
  text-shadow: 0 2px 12px #000;
}

.qte-panel--cinematic .qte-instruction {
  margin: 4px 0 8px;
  color: rgba(240, 247, 249, .76);
  font-size: 9px;
  text-shadow: 0 2px 8px #000;
}

.qte-panel--cinematic .qte-progress {
  height: 4px;
}

.qte-panel--cinematic .qte-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 7px 0 0;
}

.qte-panel--cinematic .qte-steps span {
  justify-content: center;
  min-width: 0;
  min-height: 27px;
  padding: 4px 3px;
  overflow: hidden;
  font-size: 7px;
  white-space: nowrap;
}

.qte-panel--cinematic .qte-steps b {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  font-size: 8px;
}

.qte-panel--cinematic .qte-steps span.is-pending {
  border-style: dashed;
  color: rgba(255, 255, 255, .7);
}

.qte-panel--cinematic .qte-gesture-surface {
  position: absolute;
  z-index: 3;
  inset: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  pointer-events: auto;
}

.qte-panel--cinematic .qte-cue-ring {
  position: absolute;
  left: 50%;
  top: 52%;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  gap: 1px;
  width: 122px;
  height: 122px;
  margin: 0;
  padding: 13px;
  background:
    radial-gradient(circle, rgba(5, 10, 12, .88) 0 54%, transparent 55%),
    conic-gradient(var(--acid) 0deg var(--qte-window-angle), rgba(255, 255, 255, .14) var(--qte-window-angle) 360deg);
  transform: translate(-50%, -50%) scale(var(--qte-window-scale));
  cursor: grab;
  pointer-events: none;
  touch-action: none;
  will-change: transform, opacity;
}

.qte-panel--cinematic .qte-cue-ring.is-visible {
  transform: translate(-50%, -50%) scale(var(--qte-window-scale));
  pointer-events: auto;
}

.qte-panel--cinematic .qte-cue-ring.is-pressed {
  filter: brightness(1.35);
  transform: translate(-50%, -50%) scale(.94);
  cursor: grabbing;
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue {
  overflow: hidden;
  border-width: 1px;
  border-radius: 22px;
  background: linear-gradient(110deg, rgba(4, 12, 15, .94), rgba(20, 31, 24, .84));
  box-shadow: 0 0 0 4px rgba(218, 255, 74, .07), 0 0 34px rgba(218, 255, 74, .34);
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 4px;
  border-radius: 17px;
  background: linear-gradient(90deg, rgba(218, 255, 74, .04), rgba(218, 255, 74, .38));
  transform: scaleX(var(--qte-window-ratio));
  transform-origin: left;
  opacity: .72;
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(218, 255, 74, .46);
  font: 900 25px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .08em;
  text-shadow: 0 0 13px rgba(218, 255, 74, .72);
  pointer-events: none;
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue {
  grid-template: auto auto / 48px minmax(0, 1fr) auto;
  column-gap: 7px;
  row-gap: 1px;
  align-content: center;
  padding: 9px 12px;
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue strong {
  grid-row: 1 / 3;
  grid-column: 1;
  align-self: center;
  font-size: 36px;
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue span {
  grid-row: 1;
  grid-column: 2;
  align-self: end;
  margin: 0;
  font-size: 10px;
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue small {
  grid-row: 2;
  grid-column: 2;
  align-self: start;
  max-width: 118px;
  margin: 0;
  font-size: 6px;
  white-space: nowrap;
}

.qte-panel--cinematic .qte-cue-ring.is-swipe-cue em {
  grid-row: 1 / 3;
  grid-column: 3;
  align-self: center;
}

.qte-panel--cinematic .qte-direction-left,
.qte-panel--cinematic .qte-direction-right {
  width: 198px;
  height: 82px;
}

.qte-panel--cinematic .qte-direction-up,
.qte-panel--cinematic .qte-direction-down {
  grid-template: auto auto auto auto / 1fr;
  gap: 3px;
  width: 88px;
  height: 190px;
  padding: 14px 8px;
  border-radius: 30px;
}

.qte-panel--cinematic .qte-cue-ring.qte-direction-up strong,
.qte-panel--cinematic .qte-cue-ring.qte-direction-down strong,
.qte-panel--cinematic .qte-cue-ring.qte-direction-up span,
.qte-panel--cinematic .qte-cue-ring.qte-direction-down span,
.qte-panel--cinematic .qte-cue-ring.qte-direction-up small,
.qte-panel--cinematic .qte-cue-ring.qte-direction-down small,
.qte-panel--cinematic .qte-cue-ring.qte-direction-up em,
.qte-panel--cinematic .qte-cue-ring.qte-direction-down em {
  grid-row: auto;
  grid-column: 1;
  align-self: center;
  max-width: 70px;
  white-space: normal;
}

.qte-panel--cinematic .qte-direction-up::before,
.qte-panel--cinematic .qte-direction-down::before {
  background: linear-gradient(180deg, rgba(218, 255, 74, .04), rgba(218, 255, 74, .38));
  transform: scaleY(var(--qte-window-ratio));
  transform-origin: top;
}

.qte-panel--cinematic .qte-direction-up-left,
.qte-panel--cinematic .qte-direction-up-right,
.qte-panel--cinematic .qte-direction-down-left,
.qte-panel--cinematic .qte-direction-down-right {
  width: 190px;
  height: 96px;
}

.qte-panel--cinematic .qte-direction-left::after {
  content: "‹  ‹  ‹";
  animation: qteGuideLeft 760ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-direction-right::after {
  content: "›  ›  ›";
  animation: qteGuideRight 760ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-direction-up::after {
  content: "⌃\A⌃\A⌃";
  white-space: pre;
  animation: qteGuideUp 760ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-direction-down::after {
  content: "⌄\A⌄\A⌄";
  white-space: pre;
  animation: qteGuideDown 760ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-direction-up-left::after {
  content: "↖   ↖   ↖";
  animation: qteGuideUpLeft 820ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-direction-up-right::after {
  content: "↗   ↗   ↗";
  animation: qteGuideUpRight 820ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-direction-down-left::after {
  content: "↙   ↙   ↙";
  animation: qteGuideDownLeft 820ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-direction-down-right::after {
  content: "↘   ↘   ↘";
  animation: qteGuideDownRight 820ms ease-in-out infinite;
}

.qte-panel--cinematic .qte-cue-ring.is-rapid-cue {
  width: 154px;
  height: 154px;
  border-width: 3px;
  background:
    radial-gradient(circle, rgba(5, 10, 12, .93) 0 53%, transparent 54%),
    conic-gradient(var(--acid) 0deg var(--qte-tap-angle), rgba(255, 255, 255, .14) var(--qte-tap-angle) 360deg);
  box-shadow: 0 0 0 9px rgba(218, 255, 74, .08), 0 0 42px rgba(218, 255, 74, .48);
}

.qte-panel--cinematic .qte-cue-ring.is-rapid-cue {
  grid-template-rows: auto auto auto;
  gap: 2px;
  align-content: center;
}

.qte-panel--cinematic .qte-cue-ring.is-rapid-cue strong {
  font-size: 31px;
}

.qte-panel--cinematic .qte-cue-ring.is-rapid-cue span {
  margin: 0;
  font-size: 10px;
}

.qte-panel--cinematic .qte-cue-ring.is-rapid-cue small {
  display: none;
}

.qte-panel--cinematic .qte-cue-ring.is-rapid-cue em {
  margin-top: 3px;
}

.qte-panel--cinematic .qte-cue-ring.is-rapid-hit {
  animation: qteRapidTap 110ms ease-out both;
}

.qte-panel--cinematic .qte-cue-ring.is-hit {
  animation: qteCueHit 280ms ease-out forwards;
}

.qte-panel--cinematic .qte-cue-ring strong {
  color: var(--acid);
  font-size: 42px;
  line-height: .9;
  text-shadow: 0 0 19px rgba(218, 255, 74, .72), 0 2px 8px #000;
}

.qte-panel--cinematic .qte-cue-ring span {
  margin-top: -2px;
  font-size: 11px;
  text-shadow: 0 2px 6px #000;
}

.qte-panel--cinematic .qte-cue-ring small {
  max-width: 90px;
  margin-top: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 7px;
  line-height: 1.25;
  text-shadow: 0 2px 6px #000;
}

.qte-panel--cinematic .qte-cue-ring em {
  margin-top: 2px;
  padding: 2px 5px;
  border: 1px solid rgba(218, 255, 74, .45);
  border-radius: 8px;
  color: var(--acid);
  background: rgba(0, 0, 0, .42);
  font: 900 8px/1 "Arial Narrow", Arial, sans-serif;
  font-style: normal;
  letter-spacing: .08em;
  text-shadow: 0 0 8px rgba(218, 255, 74, .52);
}

.qte-panel--cinematic .qte-fallback {
  display: none;
}

.qte-panel--cinematic.is-cue-active .qte-fallback {
  background: rgba(218, 255, 74, .13);
}

.qte-panel--cinematic.is-complete .qte-hud {
  border-color: rgba(90, 225, 255, .58);
}

.qte-panel--cinematic.is-failure::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 57, 72, .08), rgba(111, 0, 12, .66));
  animation: qteFailureFlash 720ms steps(2, jump-none) both;
  pointer-events: none;
}

.game-stage.qte-impact .story-video {
  animation: qteCameraImpact 720ms steps(2, jump-none) both;
}

@keyframes qteGuideLeft {
  0% { opacity: 0; transform: translateX(24px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translateX(-24px); }
}

@keyframes qteGuideRight {
  0% { opacity: 0; transform: translateX(-24px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translateX(24px); }
}

@keyframes qteGuideUp {
  0% { opacity: 0; transform: translateY(24px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-24px); }
}

@keyframes qteGuideDown {
  0% { opacity: 0; transform: translateY(-24px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translateY(24px); }
}

@keyframes qteGuideUpLeft {
  0% { opacity: 0; transform: translate(18px, 12px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translate(-18px, -12px); }
}

@keyframes qteGuideUpRight {
  0% { opacity: 0; transform: translate(-18px, 12px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translate(18px, -12px); }
}

@keyframes qteGuideDownLeft {
  0% { opacity: 0; transform: translate(18px, -12px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translate(-18px, 12px); }
}

@keyframes qteGuideDownRight {
  0% { opacity: 0; transform: translate(-18px, -12px); }
  45% { opacity: .9; }
  100% { opacity: 0; transform: translate(18px, 12px); }
}

@keyframes qteRapidTap {
  0% { filter: brightness(2.2); }
  100% { filter: brightness(1); }
}

@keyframes qteCueHit {
  0% { opacity: 1; filter: brightness(1.6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.42); filter: brightness(2); }
}

@keyframes qteFailureFlash {
  0% { opacity: 0; }
  18% { opacity: 1; }
  42% { opacity: .45; }
  100% { opacity: .88; }
}

@keyframes qteCameraImpact {
  0% { transform: translate(0, 0) scale(1); filter: none; }
  18% { transform: translate(-4px, 5px) scale(1.035); filter: contrast(1.25) saturate(1.35); }
  35% { transform: translate(5px, -3px) scale(1.045); filter: sepia(.2) saturate(1.7) hue-rotate(322deg); }
  100% { transform: translate(0, 0) scale(1.055); filter: brightness(.45) saturate(1.6); }
}

.qte-panel.is-perfect {
  border-color: var(--acid);
}

.qte-panel.is-ordinary {
  border-color: var(--cyan);
}

.qte-panel.is-failure {
  border-color: var(--danger);
  animation: glitchIn 160ms steps(2, jump-none) both;
}

.intertitle {
  display: grid;
  place-items: center;
  min-height: 100%;
  text-align: center;
  animation: intertitleIn 400ms ease both;
}

.intertitle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 9, 0.83);
  backdrop-filter: blur(8px);
}

.intertitle > div {
  position: relative;
}

.intertitle__eyebrow {
  justify-content: center;
  color: var(--cyan);
}

.intertitle h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.1;
}

.intertitle p {
  margin: 9px 0 0;
  color: rgba(255,255,255,0.48);
  font-size: 10px;
  letter-spacing: .08em;
}

.ending-panel {
  text-align: left;
}

.ending-panel--success {
  border-color: rgba(213,255,66,0.45);
}

.ending-panel--danger {
  border-color: rgba(255,63,78,0.52);
}

.ending-panel--danger .ending-kicker {
  color: var(--danger);
}

.ending-panel h2 {
  font-size: 28px;
}

.ending-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 16px 0 18px;
}

.ending-stats div {
  padding: 9px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.035);
}

.ending-stats span {
  display: block;
  margin-bottom: 4px;
  color: rgba(255,255,255,0.4);
  font: 700 7px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .08em;
}

.ending-stats b {
  color: var(--acid);
  font-size: 13px;
}

.ending-panel .primary-action {
  margin-top: 12px;
  box-shadow: 0 0 0 1px rgba(213,255,66,.18), 0 9px 24px rgba(0,0,0,.28);
}

.ending-panel .secondary-action {
  min-height: 44px;
}

.timeline-dialog {
  width: min(430px, calc(100vw - 24px));
  max-height: min(88dvh, 780px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(87, 221, 238, 0.38);
  border-radius: 8px;
  background: #070b0e;
  color: var(--paper);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.78);
}

.timeline-dialog::backdrop {
  background: rgba(0, 3, 5, 0.86);
  backdrop-filter: blur(8px);
}

.timeline-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(87, 221, 238, 0.16);
  background: linear-gradient(180deg, rgba(36, 53, 60, 0.44), rgba(7, 11, 14, 0));
}

.timeline-dialog__header span {
  color: var(--acid);
  font: 800 8px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.16em;
}

.timeline-dialog__header h2 {
  margin: 7px 0 0;
  font-size: 23px;
}

.timeline-dialog__close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  font-size: 21px;
}

.timeline-dialog__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.56);
  font-size: 10px;
}

.timeline-dialog__summary b {
  color: var(--acid);
  font-size: 17px;
}

.timeline-collection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px 18px 18px;
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 13px;
  min-height: 112px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.025);
}

.timeline-card.is-collected {
  border-color: rgba(213,255,66,0.44);
  background: linear-gradient(145deg, rgba(213,255,66,0.085), rgba(65,215,232,0.035));
}

.timeline-card.is-collected::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10px;
  width: 52px;
  height: 3px;
  background: var(--acid);
}

.timeline-card.is-locked {
  color: rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.012);
}

.timeline-card__thumbnail {
  position: relative;
  align-self: stretch;
  min-height: 92px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: #11171b;
}

.timeline-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-card.is-locked .timeline-card__thumbnail img {
  filter: grayscale(1) brightness(.22) blur(2px);
  transform: scale(1.08);
}

.timeline-card__thumbnail > span {
  display: grid;
  place-items: center;
  height: 100%;
  color: rgba(255,255,255,.28);
  font: 800 9px/1 "Arial Narrow", Arial, sans-serif;
}

.timeline-card__content {
  min-width: 0;
}

.timeline-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.timeline-card__meta span {
  padding: 4px 6px;
  border: 1px solid currentColor;
  color: var(--acid);
  font: 800 7px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.1em;
}

.timeline-card.is-locked .timeline-card__meta span {
  color: rgba(255,255,255,0.28);
}

.timeline-card__meta small {
  color: rgba(255,255,255,0.28);
  font: 700 7px/1 "Arial Narrow", Arial, sans-serif;
}

.timeline-card h3 {
  margin: 11px 0 6px;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.3;
}

.timeline-card.is-locked h3 {
  color: rgba(255,255,255,0.34);
}

.timeline-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(232,242,244,0.56);
  font-size: 9px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.timeline-card.is-locked p {
  color: rgba(255,255,255,0.24);
}

.timeline-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: rgba(255,255,255,0.28);
  font: 700 6px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.1em;
}

.timeline-card__status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.timeline-card.is-collected .timeline-card__status {
  color: var(--cyan);
}

.timeline-dialog__footer {
  display: flex;
  justify-content: stretch;
  padding: 0 18px 18px;
}

.timeline-dialog__footer .secondary-action {
  width: 100%;
  min-height: 40px;
}

@media (max-width: 480px) {
  .timeline-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .timeline-dialog__header,
  .timeline-dialog__summary {
    padding-right: 14px;
    padding-left: 14px;
  }

  .timeline-collection {
    padding: 12px 14px 16px;
  }

  .timeline-dialog__footer {
    padding: 0 14px 14px;
  }
}

.tap-to-play,
.loading-indicator {
  position: absolute;
  z-index: 40;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tap-to-play {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(4,9,12,0.88);
  cursor: pointer;
  font-size: 10px;
  backdrop-filter: blur(12px);
}

.tap-to-play span {
  color: var(--acid);
}

.loading-indicator {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(4, 9, 12, 0.7);
  backdrop-filter: blur(8px);
}

.loading-indicator span {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--acid);
  border-radius: 50%;
  animation: rotate 700ms linear infinite;
}

.loading-indicator small {
  color: rgba(255,255,255,0.52);
  font-size: 8px;
  letter-spacing: .13em;
}

.hidden {
  display: none !important;
}

.world-panel {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  color: rgba(224, 242, 246, 0.5);
  font-family: "Arial Narrow", Arial, sans-serif;
  text-transform: uppercase;
}

.world-panel--left {
  align-items: flex-end;
  text-align: right;
}

.world-panel--right {
  align-items: flex-start;
}

/* Center the episode block, not the entire right column or its bottom motto. */
.episode-navigation-group {
  position: absolute;
  top: 50%;
  left: 0;
  width: min(100%, 205px);
  transform: translateY(-50%);
}

.bureau-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bureau-mark__seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(205,240,247,0.35);
  color: var(--acid);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.08em;
  clip-path: polygon(50% 0, 95% 24%, 95% 76%, 50% 100%, 5% 76%, 5% 24%);
  background: rgba(255,255,255,0.03);
}

.bureau-mark b,
.bureau-mark small {
  display: block;
}

.bureau-mark b {
  color: rgba(235,247,249,0.75);
  font-size: 11px;
  letter-spacing: .14em;
}

.bureau-mark small {
  margin-top: 3px;
  font-size: 7px;
  letter-spacing: .12em;
}

.case-index {
  margin-top: auto;
  padding-bottom: 12vh;
}

.case-index span,
.telemetry span,
.timeline-label {
  color: rgba(255,255,255,0.26);
  font-size: 8px;
  letter-spacing: .18em;
}

.case-index strong {
  display: block;
  color: rgba(255,255,255,0.84);
  font-size: clamp(42px, 5vw, 76px);
  letter-spacing: -.08em;
  line-height: .92;
}

.case-index i {
  display: inline-block;
  width: 110px;
  height: 2px;
  margin-top: 11px;
  background: linear-gradient(90deg, transparent, var(--acid));
}

.case-index p {
  font-size: 7px;
  letter-spacing: .15em;
}

.telemetry {
  width: min(100%, 205px);
  margin-top: auto;
  padding-bottom: 1vh;
}

.telemetry b {
  display: block;
  margin: 5px 0;
  color: var(--cyan);
  font-size: 19px;
}

.telemetry__line {
  height: 3px;
  background: rgba(255,255,255,0.08);
}

.telemetry__line i {
  display: block;
  width: 72.4%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(91,224,255,.5);
  transition: width 500ms ease, background 500ms ease;
}

.timeline-label {
  margin-bottom: 10px;
}

.episode-indicator {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 145px;
  padding: 10px;
  border: 1px solid rgba(213,255,66,.34);
  background: linear-gradient(90deg, rgba(213,255,66,.08), rgba(5,10,13,.5));
  box-shadow: inset 3px 0 var(--acid), 0 10px 30px rgba(0,0,0,.18);
}

.episode-indicator span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--acid);
  color: var(--acid);
  font: 900 13px/1 "Arial Narrow", Arial, sans-serif;
}

.episode-indicator b {
  color: rgba(240,247,249,.88);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: none;
}

.episode-navigation {
  display: grid;
  width: min(100%, 205px);
  gap: 7px;
  margin-top: 0;
  max-height: min(46vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.episode-navigation__item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid rgba(211, 235, 241, 0.16);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(5, 10, 13, 0.32));
  color: rgba(240, 247, 249, 0.72);
  text-align: left;
  transition: 160ms ease;
}

.episode-navigation__item:hover,
.episode-navigation__item:focus-visible {
  border-color: rgba(218, 255, 74, 0.58);
  background: rgba(218, 255, 74, 0.07);
  color: var(--paper);
}

.episode-navigation::-webkit-scrollbar {
  display: none;
}

.episode-navigation__item > span {
  color: var(--acid);
  font: 900 9px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.episode-navigation__item b {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.episode-navigation__item:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.event-log {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-log li {
  position: relative;
  display: grid;
  grid-template-columns: 27px auto;
  column-gap: 8px;
  opacity: .32;
}

.event-log li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 11px;
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.18);
}

.event-log li.is-current,
.event-log li.is-done {
  opacity: 1;
}

.event-log li.is-current span {
  border-color: var(--acid);
  color: var(--acid);
}

.event-log li.is-done span {
  background: var(--acid);
  color: #071013;
}

.event-log li span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 8px;
}

.event-log li b {
  color: rgba(240,247,249,0.72);
  font-size: 9px;
  letter-spacing: .12em;
}

.event-log li small {
  margin-top: 4px;
  font-size: 7px;
  letter-spacing: .1em;
}

.motto {
  margin-top: auto;
  color: rgba(255,255,255,.42);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .12em;
}

.motto span {
  color: rgba(255,255,255,.2);
  font-size: 6px;
}

@keyframes mediaIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glitchIn {
  0% { opacity: 0; transform: translate(10px, -4px); filter: hue-rotate(80deg); }
  45% { opacity: .8; transform: translate(-5px, 2px); }
  100% { opacity: 1; transform: none; filter: none; }
}

@keyframes intertitleIn {
  from { opacity: 0; letter-spacing: .1em; }
  to { opacity: 1; letter-spacing: normal; }
}

@keyframes reelFlicker {
  0% { transform: translateY(-4px); color: var(--acid); }
  50% { transform: translateY(5px); color: var(--cyan); }
  100% { transform: translateY(-2px); color: white; }
}

@keyframes pulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    padding-inline: 3vw;
  }

  .case-index strong {
    font-size: 44px;
  }

  .bureau-mark div,
  .world-panel--right .motto {
    display: none;
  }
}

@media (max-width: 720px), (max-height: 700px) {
  html,
  body {
    background: #020405;
  }

  .page-shell {
    display: block;
    min-height: 0;
    padding: 0;
    background: #020405;
  }

  .world-panel {
    display: none;
  }

  .game-stage {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    box-shadow: none;
  }

  .game-stage::before {
    left: 18px;
  }

  .story-layer {
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(69px, calc(env(safe-area-inset-bottom) + 59px));
    padding-left: max(20px, env(safe-area-inset-left));
  }

  .hud--top {
    padding-top: env(safe-area-inset-top);
    height: calc(57px + env(safe-area-inset-top));
  }

  .hud--bottom {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(58px + env(safe-area-inset-bottom));
  }

  .home-panel h1 {
    font-size: clamp(62px, 19vw, 86px);
  }

  .target-card {
    min-height: min(31vh, 240px);
  }
}

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