:root {
  --bg: #070b11;
  --panel: rgba(8, 15, 26, 0.72);
  --panel-strong: rgba(10, 18, 33, 0.88);
  --line: rgba(138, 181, 255, 0.18);
  --line-strong: rgba(141, 252, 235, 0.4);
  --text: #eef2ff;
  --muted: rgba(222, 230, 255, 0.72);
  --cyan: #7ef4ff;
  --gold: #ffcf70;
  --lime: #b8ff52;
  --red: #ff6f74;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 18%, rgba(126, 244, 255, 0.14), transparent 0 26rem),
    radial-gradient(circle at 84% 20%, rgba(255, 111, 116, 0.16), transparent 0 28rem),
    linear-gradient(160deg, #060913 0%, #081322 54%, #02050b 100%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", sans-serif;
}

body {
  overflow-x: hidden;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.hidden {
  display: none !important;
}

.icon-sprite {
  height: 0;
  position: absolute;
  width: 0;
}

.ui-icon {
  fill: none;
  flex: 0 0 auto;
  height: 1rem;
  stroke: currentColor;
  width: 1rem;
}

.ambient-layer {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
}

.ambient-grid,
.ambient-scan,
.ambient-orb {
  position: absolute;
}

.ambient-grid {
  inset: -15%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 4.8rem 4.8rem;
  mask-image: radial-gradient(circle at center, black 38%, transparent 76%);
  opacity: 0.25;
  transform: perspective(100rem) rotateX(76deg) translateY(-16rem);
}

.ambient-orb {
  border-radius: 50%;
  filter: blur(3rem);
  mix-blend-mode: screen;
}

.ambient-orb-a {
  background: rgba(126, 244, 255, 0.2);
  height: 18rem;
  left: -4rem;
  top: 18%;
  width: 18rem;
  animation: drift 13s ease-in-out infinite alternate;
}

.ambient-orb-b {
  background: rgba(255, 207, 112, 0.15);
  bottom: 12%;
  height: 22rem;
  right: -8rem;
  width: 22rem;
  animation: drift 17s ease-in-out infinite alternate-reverse;
}

.ambient-scan {
  inset: -10% 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(126, 244, 255, 0.05) 48%,
    rgba(126, 244, 255, 0.1) 50%,
    transparent 52%
  );
  animation: scan 8s linear infinite;
}

.page-shell {
  min-height: 100vh;
  padding: 2rem;
  position: relative;
}

.hero-panel,
.game-shell,
.ending-shell {
  position: relative;
  z-index: 1;
}

.hero-panel {
  align-items: stretch;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
  min-height: calc(100vh - 4rem);
}

.hero-copy,
.hero-visual,
.status-rail,
.question-stage,
.intel-rail,
.ending-shell {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4.6rem);
}

.eyebrow {
  color: var(--cyan);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: 0.04em;
  line-height: 0.88;
  margin: 0;
  text-transform: uppercase;
}

.hero-kicker {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  margin: 1rem 0 0;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.hero-badge {
  align-items: center;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96), rgba(226, 232, 245, 0.9));
  border: 1px solid rgba(12, 27, 43, 0.08);
  border-radius: 1rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  color: #0a1421;
  display: inline-flex;
  gap: 0.55rem;
  padding: 0.62rem 0.9rem;
  position: relative;
}

.hero-badge::before {
  background: rgba(255, 243, 192, 0.82);
  border: 1px solid rgba(63, 47, 10, 0.08);
  content: "";
  height: 0.8rem;
  left: calc(50% - 1.25rem);
  position: absolute;
  top: -0.3rem;
  width: 2.5rem;
}

.hero-badge .ui-icon {
  color: #102537;
}

.hero-badge span {
  display: grid;
}

.hero-badge small {
  color: rgba(14, 28, 45, 0.46);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.hero-badge strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-badge:nth-child(1) {
  transform: rotate(-4deg);
}

.hero-badge:nth-child(2) {
  transform: rotate(2deg);
}

.hero-badge:nth-child(3) {
  transform: rotate(-2deg);
}

.hero-lead {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 1.8rem 0 0;
  max-width: 44rem;
}

.hero-lead span {
  color: var(--text);
}

.hero-actions,
.ending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.primary-button,
.ghost-button,
.choice-button {
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--cyan), #9df2b7);
  box-shadow: 0 0 0 1px rgba(126, 244, 255, 0.35), 0 16px 40px rgba(126, 244, 255, 0.18);
  color: #031018;
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.choice-button:hover {
  transform: translateY(-2px);
}

.hero-note {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(236, 241, 255, 0.82);
  margin-top: auto;
  padding-top: 1.2rem;
}

.hero-visual {
  border-radius: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2rem;
  position: relative;
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
}

.hero-visual::before {
  inset: 9%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transform: rotate(8deg);
}

.hero-visual::after {
  inset: 18%;
  border: 1px solid rgba(126, 244, 255, 0.16);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.clearance-badge {
  align-self: flex-start;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(8, 16, 28, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.6rem;
  max-width: 22rem;
  padding: 1.4rem;
  position: relative;
  z-index: 1;
}

.clearance-tag {
  color: var(--gold);
  display: block;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.clearance-badge strong {
  display: block;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 2.6rem;
  letter-spacing: 0.08em;
}

.clearance-badge p,
.rail-label,
.question-copy,
.feedback-line,
.intel-block p,
.rules-block li {
  color: var(--muted);
}

.signal-strip {
  align-items: end;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0.3rem;
  position: relative;
  z-index: 1;
}

.signal-card {
  align-items: center;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.96), rgba(226, 232, 245, 0.9));
  border: 1px solid rgba(12, 27, 43, 0.08);
  border-radius: 1rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  color: #0c1726;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 4.7rem;
  padding: 0.72rem 0.82rem 0.8rem;
  position: relative;
}

.signal-card::before {
  background: rgba(255, 243, 192, 0.82);
  border: 1px solid rgba(63, 47, 10, 0.08);
  content: "";
  height: 0.78rem;
  left: 0.9rem;
  position: absolute;
  top: -0.28rem;
  width: 2.6rem;
}

.signal-card .ui-icon {
  color: #102537;
  height: 1.05rem;
  margin-top: 0.1rem;
  width: 1.05rem;
}

.signal-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.signal-copy small,
.signal-id {
  color: rgba(14, 28, 45, 0.48);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-copy strong {
  color: rgba(8, 19, 30, 0.88);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
}

.signal-id {
  align-self: start;
  justify-self: end;
}

.signal-card-threat {
  transform: rotate(-3deg);
}

.signal-card-gatekeeper {
  transform: translateY(0.4rem) rotate(1.4deg);
}

.signal-card-mythos {
  transform: rotate(-1.6deg);
}

.sticker-cluster {
  flex: 1;
  margin: 1.2rem 0 1.8rem;
  min-height: 25rem;
  position: relative;
}

.hero-object-card {
  background:
    linear-gradient(180deg, rgba(244, 247, 255, 0.96), rgba(226, 232, 245, 0.9));
  border-radius: 1.45rem;
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.28);
  color: #091220;
  left: 10.8rem;
  overflow: hidden;
  padding: 0.9rem;
  position: absolute;
  top: 0.4rem;
  transform: rotate(8deg);
  width: 15rem;
}

.hero-object-card::before {
  background: rgba(255, 244, 192, 0.76);
  border: 1px solid rgba(63, 47, 10, 0.08);
  content: "";
  height: 1.1rem;
  left: calc(50% - 1.8rem);
  position: absolute;
  top: -0.36rem;
  transform: rotate(-5deg);
  width: 3.6rem;
}

.hero-object-photo {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.08)),
    url("./assets/clearance-pass-visual.svg") center/cover no-repeat;
  border-radius: 1.05rem;
  height: 12.8rem;
  overflow: hidden;
  position: relative;
}

.hero-object-photo::before,
.hero-object-photo::after {
  content: "";
  position: absolute;
}

.hero-object-photo::before {
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 1.1rem 1.1rem;
  opacity: 0.3;
}

.hero-object-photo::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.16)),
    radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.18), transparent 0 16%);
}

.hero-object-copy {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0.35rem 0.2rem;
}

.hero-object-tag {
  color: rgba(12, 28, 44, 0.45);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  margin: 0;
}

.hero-object-copy strong {
  font-size: 1rem;
}

.hero-object-copy span {
  color: rgba(14, 26, 42, 0.68);
  font-size: 0.88rem;
  line-height: 1.5;
}

.hero-object-stamp {
  background: rgba(14, 30, 45, 0.08);
  border: 1px solid rgba(10, 23, 38, 0.14);
  border-radius: 999px;
  bottom: 1rem;
  color: rgba(9, 21, 35, 0.78);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.42rem 0.68rem;
  position: absolute;
  right: 1rem;
}

.sticker-card {
  background: linear-gradient(180deg, rgba(250, 251, 255, 0.95), rgba(229, 235, 247, 0.9));
  border-radius: 1.35rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  color: #0c1322;
  overflow: hidden;
  padding: 0.82rem;
  position: absolute;
  width: 13rem;
}

.sticker-card::before {
  background: rgba(255, 244, 191, 0.76);
  border: 1px solid rgba(76, 56, 0, 0.08);
  content: "";
  height: 1.05rem;
  left: calc(50% - 1.7rem);
  position: absolute;
  top: -0.35rem;
  transform: rotate(-4deg);
  width: 3.4rem;
}

.sticker-card-a {
  left: 0.8rem;
  top: 1.2rem;
  transform: rotate(-9deg);
}

.sticker-card-b {
  left: 12.2rem;
  top: 10.6rem;
  transform: rotate(7deg);
  z-index: 2;
}

.sticker-card-c {
  left: 2.8rem;
  top: 12.8rem;
  transform: rotate(-3deg);
}

.sticker-image {
  border-radius: 1rem;
  height: 10rem;
  overflow: hidden;
  position: relative;
}

.sticker-image::before,
.sticker-image::after {
  content: "";
  position: absolute;
}

.sticker-image::before {
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.sticker-image::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%, transparent 72%, rgba(0, 0, 0, 0.14)),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 1rem 1rem, 1rem 1rem;
  mix-blend-mode: screen;
  opacity: 0.42;
}

.sticker-image-a::before {
  background-image: url("./assets/threat-snapshot.svg");
}

.sticker-image-b::before {
  background-image: url("./assets/route-slip.svg");
}

.sticker-image-c::before {
  background-image: url("./assets/mythos-file.svg");
}

.sticker-meta {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem 0.3rem 0.2rem;
}

.sticker-meta span {
  color: rgba(17, 25, 43, 0.56);
  display: block;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.sticker-meta strong {
  display: block;
  font-size: 0.9rem;
  margin-top: 0.18rem;
}

.sticker-icon {
  color: #102537;
  height: 1.2rem;
  width: 1.2rem;
}

.game-shell {
  border-radius: 2rem;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(16rem, 18rem) minmax(0, 1fr) minmax(16rem, 20rem);
  min-height: calc(100vh - 4rem);
  padding: 1.4rem;
}

.status-rail,
.intel-rail {
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem;
}

.rail-block,
.checkpoint-block,
.rules-block,
.intel-block {
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.2rem;
  padding: 1rem;
}

.rail-label {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.rail-label-icon {
  align-items: center;
  display: inline-flex;
  gap: 0.55rem;
}

.rail-label-icon .ui-icon {
  color: var(--cyan);
}

.meter {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  height: 0.55rem;
  overflow: hidden;
}

.meter-fill,
.checkpoint-progress-fill {
  border-radius: inherit;
  height: 100%;
  transition: width 280ms ease;
}

.meter-fill-cyan {
  background: linear-gradient(90deg, #4dbdfd, var(--cyan));
}

.meter-fill-red {
  background: linear-gradient(90deg, #ff5161, #ffb174);
}

.meter-fill-gold {
  background: linear-gradient(90deg, #ffb26f, #ffe087);
}

.meter-fill-lime {
  background: linear-gradient(90deg, #90e95f, var(--lime));
}

.rail-block strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 0.75rem;
}

.checkpoint-head {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.checkpoint-head span,
.checkpoint-head strong,
.stage-id {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.checkpoint-progress {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  height: 0.6rem;
  margin-top: 0.9rem;
  overflow: hidden;
}

.checkpoint-progress-fill {
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  width: 10%;
}

.snapshot-card {
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.94), rgba(228, 235, 247, 0.88));
  border-radius: 1.25rem;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  color: #091220;
  overflow: hidden;
  padding: 0.75rem;
  position: relative;
}

.snapshot-card::before {
  background: rgba(255, 242, 184, 0.78);
  border: 1px solid rgba(63, 47, 10, 0.08);
  content: "";
  height: 0.95rem;
  position: absolute;
  right: 1rem;
  top: -0.3rem;
  transform: rotate(8deg);
  width: 3.1rem;
}

.snapshot-photo {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.08)),
    url("./assets/threat-snapshot.svg") center/cover no-repeat;
  border-radius: 0.95rem;
  height: 10rem;
  overflow: hidden;
  position: relative;
}

.snapshot-photo::before,
.snapshot-photo::after {
  content: "";
  position: absolute;
}

.snapshot-photo::before {
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 1rem 1rem;
  opacity: 0.36;
}

.snapshot-photo::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%, transparent 70%, rgba(0, 0, 0, 0.14)),
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.16), transparent 0 14%);
}

.snapshot-meta {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem 0.25rem 0.15rem;
}

.snapshot-tag {
  color: rgba(15, 28, 46, 0.46);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  margin: 0;
}

.snapshot-meta strong {
  font-size: 0.98rem;
}

.snapshot-meta span {
  color: rgba(13, 26, 43, 0.68);
  font-size: 0.9rem;
  line-height: 1.55;
}

.rules-block ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.1rem;
}

.shortcut-note {
  color: rgba(233, 239, 255, 0.66);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.7;
  margin: 0.95rem 0 0;
}

.question-stage {
  border-radius: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  overflow: hidden;
  padding: 1.6rem;
}

.stage-head {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.stage-head h2 {
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.95;
  margin: 0;
}

.stage-id {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--cyan);
  margin: 0;
  padding: 0.55rem 0.9rem;
}

.stage-body {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.8rem;
}

.question-copy {
  font-size: 1.08rem;
  line-height: 1.85;
  margin: 0;
  max-width: 52rem;
}

.choices-list {
  display: grid;
  gap: 1rem;
}

.choice-button {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.5rem;
  color: var(--text);
  display: flex;
  gap: 1rem;
  min-height: 5.7rem;
  padding: 1rem 1.15rem;
  text-align: left;
}

.choice-index {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--cyan);
  display: inline-flex;
  flex: 0 0 auto;
  height: 2.3rem;
  justify-content: center;
  margin-top: 0.2rem;
  width: 2.3rem;
}

.choice-copy strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.choice-copy span {
  color: var(--muted);
  line-height: 1.6;
}

.choice-button.is-selected {
  background:
    linear-gradient(135deg, rgba(126, 244, 255, 0.13), rgba(184, 255, 82, 0.08)),
    rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(126, 244, 255, 0.1), 0 16px 30px rgba(126, 244, 255, 0.12);
}

.choice-button.secret-choice {
  background:
    linear-gradient(120deg, rgba(184, 255, 82, 0.18), rgba(126, 244, 255, 0.08)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(184, 255, 82, 0.35);
  position: relative;
}

.choice-button.secret-choice::after {
  animation: flicker 1.6s linear infinite;
  content: "HIDDEN";
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  position: absolute;
  right: 1rem;
  top: 0.9rem;
}

.stage-foot {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1.8rem;
}

.feedback-stack {
  display: grid;
  gap: 0.8rem;
  max-width: 70%;
}

.feedback-line {
  margin: 0;
}

.impact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.impact-chip {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: rgba(241, 245, 255, 0.82);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  padding: 0.45rem 0.7rem;
}

.impact-chip.positive {
  background: rgba(126, 244, 255, 0.08);
  border-color: rgba(126, 244, 255, 0.18);
}

.impact-chip.negative {
  background: rgba(255, 111, 116, 0.08);
  border-color: rgba(255, 111, 116, 0.18);
}

.impact-chip.neutral {
  background: rgba(255, 255, 255, 0.04);
}

.route-log {
  display: grid;
  gap: 0.7rem;
  max-height: 20rem;
  overflow: auto;
}

.log-details[open] summary {
  margin-bottom: 0.85rem;
}

.log-details summary {
  cursor: pointer;
  list-style: none;
}

.log-details summary::-webkit-details-marker {
  display: none;
}

.route-log-item {
  border-left: 2px solid rgba(126, 244, 255, 0.28);
  color: rgba(236, 241, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.55;
  padding-left: 0.85rem;
}

.route-log-item strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.2rem;
}

.route-log-item span {
  display: block;
}

.intel-block-muted {
  margin-top: auto;
}

.secret-checklist {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.secret-check-item {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.secret-check-bullet {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.48);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  height: 1.3rem;
  justify-content: center;
  width: 1.3rem;
}

.secret-check-item.is-done .secret-check-bullet {
  background: rgba(184, 255, 82, 0.1);
  border-color: rgba(184, 255, 82, 0.36);
  color: var(--lime);
}

.secret-check-item.is-done span:last-child {
  color: rgba(245, 255, 229, 0.9);
}

.ending-shell {
  align-items: center;
  border-radius: 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.1fr);
  min-height: calc(100vh - 4rem);
  overflow: hidden;
  padding: 1.6rem;
}

.ending-banner {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 207, 112, 0.35), transparent 0 30rem),
    linear-gradient(145deg, rgba(10, 16, 28, 0.75), rgba(4, 8, 14, 0.95));
  border-radius: 1.6rem;
  min-height: 100%;
  position: relative;
}

.ending-banner::before,
.ending-banner::after {
  content: "";
  position: absolute;
}

.ending-banner::before {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  inset: 14%;
}

.ending-banner::after {
  border: 1px solid rgba(126, 244, 255, 0.14);
  border-radius: 50%;
  inset: 26%;
}

.ending-artifacts {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.ending-artifacts::before,
.ending-artifacts::after {
  content: "";
  position: absolute;
}

.ending-banner.ending-opus .ending-artifacts::before {
  background:
    linear-gradient(180deg, rgba(246, 249, 255, 0.04), rgba(9, 13, 20, 0.08)),
    url("./assets/clearance-pass-visual.svg") center/cover no-repeat;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
  height: 11rem;
  left: 12%;
  top: 16%;
  transform: rotate(-8deg);
  width: 8.4rem;
}

.ending-banner.ending-opus .ending-artifacts::after {
  background:
    linear-gradient(135deg, rgba(126, 244, 255, 0.16), rgba(255, 207, 112, 0.14)),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 34, 52, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  color: #0b1d2b;
  content: "AUTHORIZED";
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
  height: 2.3rem;
  letter-spacing: 0.08em;
  left: 33%;
  padding-top: 0.7rem;
  text-align: center;
  top: 54%;
  width: 7.6rem;
}

.ending-banner.ending-blocked .ending-artifacts::before {
  background:
    repeating-linear-gradient(
      -24deg,
      rgba(255, 206, 112, 0.9),
      rgba(255, 206, 112, 0.9) 1rem,
      rgba(15, 18, 24, 0.92) 1rem,
      rgba(15, 18, 24, 0.92) 2rem
    );
  border-radius: 999px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
  height: 2.2rem;
  left: 10%;
  top: 22%;
  transform: rotate(-10deg);
  width: 14rem;
}

.ending-banner.ending-blocked .ending-artifacts::after {
  background:
    linear-gradient(180deg, rgba(255, 111, 116, 0.12), rgba(8, 11, 17, 0.08)),
    url("./assets/threat-snapshot.svg") center/cover no-repeat;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
  height: 10.4rem;
  left: 25%;
  top: 46%;
  transform: rotate(9deg);
  width: 8.1rem;
}

.ending-banner.ending-mythos .ending-artifacts::before {
  background:
    linear-gradient(180deg, rgba(184, 255, 82, 0.06), rgba(0, 0, 0, 0.08)),
    url("./assets/mythos-file.svg") center/cover no-repeat;
  border: 1px solid rgba(184, 255, 82, 0.2);
  border-radius: 1.15rem;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
  height: 10.8rem;
  left: 14%;
  top: 20%;
  width: 8rem;
}

.ending-banner.ending-mythos .ending-artifacts::after {
  background: linear-gradient(135deg, rgba(184, 255, 82, 0.18), rgba(126, 244, 255, 0.18));
  border: 1px solid rgba(184, 255, 82, 0.28);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  color: rgba(242, 255, 226, 0.96);
  content: "MYTHOS TRACE";
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  height: 2.3rem;
  left: 40%;
  letter-spacing: 0.08em;
  padding-top: 0.7rem;
  text-align: center;
  top: 58%;
  width: 8rem;
}

.ending-banner.ending-opus {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 207, 112, 0.32), transparent 0 28rem),
    radial-gradient(circle at 72% 68%, rgba(126, 244, 255, 0.18), transparent 0 24rem),
    linear-gradient(145deg, rgba(9, 16, 27, 0.78), rgba(3, 8, 15, 0.96));
}

.ending-banner.ending-blocked {
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 111, 116, 0.28), transparent 0 28rem),
    radial-gradient(circle at 76% 68%, rgba(255, 188, 114, 0.1), transparent 0 24rem),
    linear-gradient(145deg, rgba(21, 11, 18, 0.82), rgba(8, 6, 10, 0.98));
}

.ending-banner.ending-mythos {
  background:
    radial-gradient(circle at 28% 30%, rgba(184, 255, 82, 0.28), transparent 0 28rem),
    radial-gradient(circle at 72% 68%, rgba(126, 244, 255, 0.16), transparent 0 26rem),
    linear-gradient(145deg, rgba(8, 18, 16, 0.82), rgba(3, 10, 12, 0.97));
}

.ending-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}

.ending-content h2 {
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.92;
  margin: 0;
  text-transform: uppercase;
}

.ending-copy {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
  margin: 0;
  max-width: 42rem;
}

.ending-stats {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.ending-stat {
  align-items: center;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.1rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.95rem 1rem;
}

.ending-stat span {
  color: var(--muted);
}

.ending-stat strong {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

@keyframes scan {
  0% {
    transform: translateY(-20%);
  }
  100% {
    transform: translateY(120%);
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5rem, -1rem, 0) scale(1.08);
  }
}

@keyframes flicker {
  0%,
  19%,
  23%,
  100% {
    opacity: 0.95;
  }
  20%,
  22% {
    opacity: 0.22;
  }
}

@media (max-width: 1100px) {
  .hero-panel,
  .game-shell,
  .ending-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .game-shell,
  .ending-shell {
    min-height: auto;
  }

  .sticker-cluster {
    min-height: 30rem;
  }

  .hero-object-card {
    left: 9.4rem;
  }

  .question-stage {
    order: 1;
  }

  .status-rail {
    order: 2;
  }

  .intel-rail {
    order: 3;
  }

  .snapshot-card {
    max-width: 26rem;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 1rem;
  }

  .hero-panel {
    gap: 0.85rem;
  }

  .hero-copy,
  .hero-visual,
  .question-stage,
  .status-rail,
  .intel-rail,
  .ending-shell {
    border-radius: 1.4rem;
  }

  .hero-copy h1 {
    font-size: 3.35rem;
  }

  .hero-copy {
    padding: 1.35rem;
  }

  .hero-kicker {
    font-size: 0.95rem;
  }

  .hero-badges {
    gap: 0.55rem;
    margin-top: 1.05rem;
  }

  .hero-badge {
    padding: 0.52rem 0.74rem;
  }

  .hero-badge strong {
    font-size: 0.82rem;
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.65;
    margin-top: 1.35rem;
  }

  .hero-actions {
    margin-top: 1.3rem;
  }

  .hero-note {
    margin-top: 1.25rem;
    padding-top: 0.95rem;
  }

  .hero-visual {
    padding: 1.15rem;
  }

  .stage-head h2 {
    font-size: 2.3rem;
  }

  .stage-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-stack {
    max-width: none;
  }

  .sticker-cluster {
    margin: 0.55rem 0 0.9rem;
    min-height: 18rem;
    transform: scale(0.72);
    transform-origin: top left;
  }

  .hero-object-card {
    left: 3.6rem;
    top: 0.5rem;
    width: 11.1rem;
  }

  .sticker-card-a {
    left: -0.2rem;
    top: 0.6rem;
  }

  .sticker-card-b {
    left: 7.4rem;
    top: 8.7rem;
  }

  .sticker-card-c {
    display: none;
  }

  .signal-strip {
    gap: 0.45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-card {
    min-height: 3.95rem;
    padding: 0.58rem 0.66rem 0.68rem;
  }

  .signal-copy strong {
    font-size: 0.74rem;
  }

  .signal-card-mythos,
  .signal-id {
    display: none;
  }

  .ending-banner.ending-blocked .ending-artifacts::before {
    width: 10rem;
  }

  .status-rail {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkpoint-block,
  .snapshot-card,
  .rules-block {
    grid-column: 1 / -1;
  }

  .intel-rail {
    gap: 0.85rem;
  }

  .route-log {
    max-height: 11rem;
  }

  .log-details {
    display: grid;
    gap: 0.65rem;
  }

  .log-details:not([open]) .route-log {
    display: none;
  }
}
