:root {
  --bg: #0b0910;
  --bg-soft: rgba(17, 12, 20, 0.72);
  --panel: rgba(27, 17, 26, 0.84);
  --panel-strong: rgba(42, 29, 39, 0.92);
  --line: rgba(244, 218, 184, 0.14);
  --line-strong: rgba(226, 191, 129, 0.32);
  --text: #f8efe4;
  --muted: #d6c4b5;
  --muted-soft: #ab978a;
  --gold: #d7b07a;
  --gold-soft: #f1d9a7;
  --wine: #8f3b52;
  --wine-strong: #5f2333;
  --navy: #17182e;
  --navy-soft: #232545;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.46);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-display: "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 20% 18%, rgba(130, 64, 87, 0.22), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(71, 95, 167, 0.16), transparent 32%),
    linear-gradient(180deg, #08070b 0%, #130d14 44%, #0a080d 100%);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.skyfx,
.skyfx__glow,
.skyfx__dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.skyfx {
  overflow: hidden;
}

.skyfx__glow--one {
  background: radial-gradient(circle at 15% 30%, rgba(176, 70, 103, 0.24), transparent 30%);
  animation: drift 18s ease-in-out infinite alternate;
}

.skyfx__glow--two {
  background: radial-gradient(circle at 88% 18%, rgba(137, 175, 255, 0.16), transparent 28%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

.skyfx__dust {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.76) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(251, 220, 164, 0.46) 0 1px, transparent 1px);
  background-size: 180px 180px, 260px 260px;
  background-position: 0 0, 40px 64px;
  opacity: 0.28;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
}

.music-toggle {
  position: fixed;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(23, 17, 28, 0.78);
  color: var(--gold-soft);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.music-toggle:hover {
  transform: translateY(-50%) scale(1.08);
  border-color: rgba(241, 217, 167, 0.42);
  color: var(--text);
}

.music-toggle[data-playing="true"] {
  color: var(--gold-soft);
  border-color: rgba(255, 222, 168, 0.88);
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 247, 226, 0.4), transparent 22%),
    linear-gradient(180deg, rgba(117, 88, 41, 0.3), rgba(41, 28, 16, 0.14)),
    rgba(34, 24, 18, 0.84);
  box-shadow:
    0 0 24px rgba(222, 181, 118, 0.22),
    0 12px 32px rgba(0, 0, 0, 0.32);
}

.music-toggle__icon {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  font-size: 1.2rem;
  line-height: 1;
}

.music-toggle__ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 236, 198, 0.18);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.02),
    inset 0 0 0 8px rgba(0, 0, 0, 0.12);
}

.music-toggle[data-playing="true"] .music-toggle__ring {
  animation: music-spin 4.8s linear infinite;
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  animation: fade-in 320ms ease;
}

.screen.is-active {
  display: block;
}

.eyebrow,
.chip,
.status-chip,
.metric-card span,
.atlas-card__code {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--gold);
}

.chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  color: var(--muted);
}

.status-chip--muted {
  color: #c7d8ff;
}

.home-layout {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 18px;
}

.home-rail {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 8;
  width: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(25, 18, 27, 0.9), rgba(15, 11, 19, 0.82));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.home-rail__brand {
  min-width: 0;
}

.home-rail__brand h1 {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.5vw, 1.92rem);
  line-height: 0.98;
}

.home-rail__brand p {
  margin: 0;
  max-width: 8ch;
  font-size: 0.78rem;
  line-height: 1.35;
}

.home-rail__brand p,
.home-rail__meta span,
.vn-panel p,
.overlay-panel__head p,
.info-block p,
.report-hero__intro,
.share-copy {
  color: var(--muted);
  line-height: 1.7;
}

.home-rail__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-button,
.hud-button,
.choice-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.rail-button {
  padding: 11px 10px;
  font-size: 0.88rem;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.04);
}

.rail-button--primary {
  color: #170d14;
  border-color: rgba(255, 222, 168, 0.72);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 14px 30px rgba(222, 181, 118, 0.22);
}

.rail-button--ghost {
  color: var(--muted);
  background: transparent;
}

.home-rail__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  font-size: 0.68rem;
  opacity: 0.82;
}

.home-stage,
.quiz-stage,
.result-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.home-stage {
  height: calc(100vh - 36px);
  min-height: 680px;
  background:
    linear-gradient(180deg, rgba(30, 18, 24, 0.14), rgba(7, 6, 10, 0.46)),
    url("./assets/scene-13-relation-naming.webp") center / cover;
}

.home-stage__backdrop,
.quiz-stage__veil,
.result-stage__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center top, rgba(246, 212, 161, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(13, 11, 16, 0.18), rgba(7, 6, 11, 0.72));
}

.home-stage__arch {
  display: none;
}

.home-stage__arch::before {
  display: none;
}

.home-stage__arch--left {
  left: 13%;
}

.home-stage__arch--center {
  left: 40%;
}

.home-stage__arch--right {
  right: 13%;
}

.home-stage__chandelier {
  position: absolute;
  top: 5%;
  left: 50%;
  width: 230px;
  height: 230px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 247, 206, 0.76) 0 10%, transparent 11%),
    radial-gradient(circle at center, rgba(255, 219, 160, 0.28) 0 34%, transparent 35%),
    conic-gradient(from 0deg, rgba(255, 233, 191, 0.7), transparent 22%, rgba(255, 224, 168, 0.7) 45%, transparent 68%, rgba(255, 233, 191, 0.7));
  filter: blur(0.2px);
  opacity: 0.92;
}

.home-stage__chandelier::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 2px solid rgba(255, 234, 190, 0.28);
  border-radius: 50%;
}

.home-stage__sigil {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: min(480px, 38vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 44%, rgba(255, 235, 194, 0.18) 45% 46%, transparent 47%),
    radial-gradient(circle at center, transparent 0 63%, rgba(255, 228, 173, 0.12) 64% 65%, transparent 66%),
    conic-gradient(from 0deg, rgba(255, 230, 171, 0.22), transparent 20%, rgba(255, 230, 171, 0.22) 40%, transparent 60%, rgba(255, 230, 171, 0.22) 80%, transparent 100%);
  opacity: 0.84;
  display: grid;
  place-items: center;
  z-index: 3;
}

.sigil-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 40px;
  border: 2px solid rgba(255, 222, 168, 0.52);
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(255, 230, 180, 0.18), transparent 70%),
    linear-gradient(135deg, rgba(215, 176, 122, 0.88), rgba(180, 130, 72, 0.92));
  color: #170d14;
  box-shadow:
    0 0 40px rgba(222, 181, 118, 0.3),
    0 16px 40px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  animation: sigil-pulse 3s ease-in-out infinite;
}

.sigil-cta:hover {
  transform: scale(1.06);
  border-color: rgba(255, 240, 200, 0.8);
  box-shadow:
    0 0 60px rgba(222, 181, 118, 0.45),
    0 20px 50px rgba(0, 0, 0, 0.32);
}

.sigil-cta__label {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.sigil-cta__sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

@keyframes sigil-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(222, 181, 118, 0.3), 0 16px 40px rgba(0, 0, 0, 0.28); }
  50% { box-shadow: 0 0 56px rgba(222, 181, 118, 0.45), 0 16px 40px rgba(0, 0, 0, 0.28); }
}

.home-stage__hero,
.quiz-stage__character,
.result-stage__card {
  position: absolute;
  z-index: 2;
}

.home-stage__hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.34));
  user-select: none;
  -webkit-user-drag: none;
}

.quiz-stage__character img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.34));
  user-select: none;
  -webkit-user-drag: none;
}

.home-stage__hero img {
  transform: scale(1.16);
  transform-origin: center top;
}

.home-stage__hero {
  right: clamp(24px, 5.2vw, 96px);
  bottom: clamp(8px, 3vh, 36px);
  width: min(40.8vw, 616px);
  height: min(92vh, 1040px);
  max-height: calc(100% - 24px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.vn-panel {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(77, 56, 49, 0.44), rgba(35, 24, 29, 0.66)),
    rgba(18, 14, 22, 0.62);
  backdrop-filter: blur(20px) saturate(110%);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
}

.vn-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.vn-panel--home {
  left: clamp(124px, 9.2vw, 164px);
  width: min(42vw, 620px);
  right: auto;
  bottom: 20px;
  padding: 16px 18px 18px;
  background:
    linear-gradient(180deg, rgba(101, 78, 69, 0.2), rgba(32, 22, 30, 0.34)),
    rgba(14, 12, 20, 0.28);
}

.vn-panel--home h2,
.vn-panel--quiz h2,
.vn-panel--result h2,
.overlay-panel__head h3,
.overlay-panel__head h4 {
  margin: 0;
  font-family: var(--font-display);
}

.vn-panel--home h2 {
  font-size: clamp(1.55rem, 2vw, 2.08rem);
  line-height: 1.2;
  max-width: none;
  text-wrap: balance;
}

.vn-panel--quiz h2,
.vn-panel--result h2 {
  font-size: clamp(1.52rem, 2vw, 2.18rem);
  line-height: 1.14;
}

.vn-panel--quiz h2 {
  font-size: clamp(0.92rem, 1.2vw, 1.2rem);
  line-height: 1.55;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  color: rgba(236, 232, 255, 0.92);
}

#question-text .q-line {
  display: block;
  position: relative;
}

#question-text .q-line--narrate {
  font-style: normal;
  color: rgba(236, 232, 255, 0.88);
}

#question-text .q-line--stellae {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: baseline;
  padding: 0.34em 0.8em 0.34em 0.7em;
  border-left: 2px solid rgba(196, 167, 118, 0.6);
  background: linear-gradient(
    90deg,
    rgba(196, 167, 118, 0.11),
    rgba(196, 167, 118, 0.02) 80%
  );
  border-radius: 0 6px 6px 0;
}

#question-text .q-line--stellae .q-line__who {
  font-family: var(--font-display);
  font-size: 0.78em;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0.88;
  white-space: nowrap;
}

#question-text .q-line--stellae .q-line__body {
  color: rgba(248, 240, 224, 0.96);
  font-feature-settings: "cv11";
}

#question-text .q-break {
  display: block;
  height: 0.15em;
}

.vn-panel__speaker {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.vn-panel__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.vn-panel__role {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vn-panel__chips,
.result-preview-tags,
.live-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vn-panel p,
.vn-panel__scene-note,
.vn-panel__guide,
.choice-button p {
  font-size: clamp(0.86rem, 0.85vw, 0.94rem);
}

.quiz-stage,
.result-stage {
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  margin: 18px;
  background: #09070b;
}

.quiz-stage__bg,
.result-stage__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quiz-hud {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz-hud__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-button {
  padding: 10px 16px;
  background: rgba(12, 11, 16, 0.54);
  color: var(--muted);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}

.hud-button[disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.hud-button--back {
  font-size: 0.82rem;
}

.quiz-hud__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.quiz-hud__center strong {
  font-family: var(--font-display);
  font-size: 1.22rem;
}

.quiz-stage__character {
  left: 50%;
  right: auto;
  top: clamp(54px, 5vh, 72px);
  bottom: calc(46vh + 22px);
  height: auto;
  transform: translateX(-50%);
  width: min(44vw, 600px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.vn-panel--quiz,
.vn-panel--result {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: clamp(360px, 62vw, 760px);
  bottom: 18px;
  padding: 18px 22px;
  background:
    linear-gradient(180deg, rgba(80, 72, 100, 0.34), rgba(32, 28, 42, 0.54)),
    rgba(13, 14, 24, 0.42);
}

.vn-panel__header,
.vn-panel__footer,
.result-actions,
.result-metrics,
.report-hero {
  display: flex;
  gap: 18px;
}

.vn-panel__header {
  justify-content: space-between;
  align-items: flex-start;
}

.vn-panel__scene-note,
.vn-panel__guide {
  margin: 0;
}

.vn-panel__status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 14px;
}

.choice-button {
  padding: 14px 14px 16px;
  text-align: left;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.04);
}

.choice-button strong {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 0.12em;
}

.choice-button p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.choice-button.is-selected {
  border-color: rgba(255, 221, 175, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 232, 190, 0.16), transparent),
    rgba(159, 65, 93, 0.28);
}

.vn-panel__footer {
  justify-content: space-between;
  align-items: flex-end;
}

.progress-track {
  width: min(220px, 26vw);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.progress-track__fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #f7dfad);
  transition: width 220ms ease;
}

.result-stage__card {
  z-index: 4;
  left: 50%;
  top: 24px;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  width: min(28vw, 380px);
  aspect-ratio: 0.72;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(17, 12, 18, 0.64);
  box-shadow:
    0 0 60px rgba(222, 181, 118, 0.14),
    0 28px 70px rgba(0, 0, 0, 0.44);
}

.result-stage__art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 12, 18, 0.88), rgba(40, 28, 37, 0.7));
}

.result-stage__tagline {
  margin: 10px 0;
  color: var(--gold-soft);
  font-size: 1.04rem;
}

.result-stage__intro {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.72;
}

.result-metrics {
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.metric-card {
  min-width: 124px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.74rem;
  color: var(--muted-soft);
}

.metric-card strong {
  font-family: var(--font-display);
  font-size: 1.48rem;
}

.result-actions {
  flex-wrap: wrap;
  margin-top: 20px;
}

.vn-panel--result {
  left: 50%;
  right: auto;
  top: min(56vh, 480px);
  bottom: 18px;
  width: min(960px, calc(100% - 36px));
  transform: translateX(-50%);
  z-index: 3;
  overflow: auto;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.overlay[hidden] {
  display: none;
}

.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.68);
  backdrop-filter: blur(16px);
}

.overlay__sheet {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(32, 22, 28, 0.96), rgba(12, 10, 16, 0.96)),
    rgba(15, 11, 18, 0.96);
  box-shadow: var(--shadow);
  overflow: auto;
}

.overlay__close {
  position: sticky;
  top: 0;
  left: calc(100% - 42px);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.5rem;
}

.overlay-panel {
  display: none;
}

.overlay-panel.is-active {
  display: block;
}

.overlay-panel__head {
  margin-bottom: 18px;
}

.overlay-panel__head h3 {
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.overlay-panel__head h4 {
  font-size: 1.35rem;
}

#report-population-note {
  margin-top: -6px;
  color: var(--gold-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.overlay-panel__head--compact {
  margin-bottom: 12px;
}

.stack-list,
.method-grid,
.report-dimensions {
  display: grid;
  gap: 14px;
}

.stack-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-block,
.method-card,
.report-dimension {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.info-block strong,
.method-card strong,
.report-dimension strong {
  display: block;
  margin-bottom: 10px;
}

.method-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-card h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.method-card span {
  color: var(--gold);
  font-size: 0.82rem;
}

.atlas-book {
  position: relative;
  padding-left: 20px;
}

.atlas-book__spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 26px;
  border-radius: 20px 0 0 20px;
  background:
    linear-gradient(180deg, rgba(111, 67, 45, 0.92), rgba(67, 38, 28, 0.92)),
    rgba(59, 36, 27, 0.92);
  border: 1px solid rgba(233, 199, 138, 0.18);
}

.atlas-book__page {
  padding: 24px;
  border: 1px solid rgba(227, 204, 169, 0.26);
  border-radius: 0 28px 28px 0;
  background:
    linear-gradient(180deg, rgba(247, 239, 223, 0.96), rgba(233, 219, 191, 0.92)),
    #efe0be;
  color: #3f2b24;
}

.atlas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.atlas-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  perspective: 1200px;
}

.atlas-card__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 0.68;
}

.atlas-card.is-unlocked .atlas-card__inner {
  cursor: pointer;
}

.atlas-card.is-unlocked .atlas-card__inner:hover .atlas-card__face {
  transform: translateY(-3px);
}

.atlas-card__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 2px solid rgba(88, 56, 40, 0.18);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 26px rgba(69, 46, 34, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.atlas-card__face--front {
  display: block;
}

.atlas-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px 14px 8px;
  background:
    radial-gradient(circle at center top, rgba(255, 245, 220, 0.78), transparent 50%),
    linear-gradient(180deg, rgba(45, 29, 24, 0.14), rgba(255, 255, 255, 0.38));
}

.atlas-card__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 54px;
  padding: 0 4px;
}

.atlas-card__code {
  font-size: 0.68rem;
  color: #6b5146;
}

.atlas-card__label strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.15;
  color: #4d392f;
}

.atlas-card__face--back {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center 28%, rgba(255, 230, 183, 0.34) 0 10%, transparent 11%),
    radial-gradient(circle at center 28%, transparent 0 26%, rgba(245, 212, 155, 0.22) 27% 28%, transparent 29%),
    radial-gradient(circle at center 70%, rgba(116, 31, 59, 0.16), transparent 48%),
    linear-gradient(180deg, #25141d, #140c15 62%, #0f0a11);
  color: #f7ede2;
}

.atlas-card__seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: calc(100% - 28px);
  padding: 24px 20px;
  border-radius: 20px;
  border: 1px solid rgba(244, 215, 167, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(113, 33, 58, 0.08));
  text-align: center;
}

.atlas-card__crest {
  width: 84px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 233, 190, 0.5);
  background:
    radial-gradient(circle at center, rgba(255, 237, 199, 0.36) 0 12%, transparent 13%),
    radial-gradient(circle at center, transparent 0 42%, rgba(255, 222, 168, 0.22) 43% 44%, transparent 45%),
    conic-gradient(from 0deg, rgba(255, 231, 176, 0.44), transparent 18%, rgba(255, 231, 176, 0.44) 36%, transparent 54%, rgba(255, 231, 176, 0.44) 72%, transparent 90%, rgba(255, 231, 176, 0.44));
  box-shadow: 0 0 24px rgba(255, 225, 180, 0.12);
}

.atlas-card__seal strong {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.1vw, 1.26rem);
  color: #f4dfc1;
}

.atlas-card__seal span {
  max-width: 14ch;
  color: rgba(247, 237, 226, 0.82);
  font-size: clamp(0.8rem, 0.86vw, 0.98rem);
  line-height: 1.48;
}

.atlas-card__actions {
  display: flex;
  gap: 8px;
}

.atlas-card__action {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(108, 83, 68, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.44);
  color: #4d392f;
  font-size: 0.9rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.atlas-card__action:hover {
  transform: translateY(-1px);
  border-color: rgba(157, 118, 84, 0.34);
  background: rgba(255, 252, 245, 0.8);
}

.atlas-card__action[disabled] {
  opacity: 0.55;
  cursor: default;
}

.atlas-card.is-locked .atlas-card__face--front {
  display: none;
}

.atlas-card.is-unlocked .atlas-card__face--back {
  display: none;
}

.report-hero {
  align-items: flex-start;
  margin-bottom: 22px;
}

.report-hero__poster {
  width: min(360px, 34vw);
  aspect-ratio: 0.72;
  object-fit: contain;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.report-hero__copy {
  flex: 1;
  min-width: 0;
}

.report-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.report-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.72;
}

.report-section + .report-section {
  margin-top: 22px;
}

.report-dimensions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-dimension span {
  display: inline-flex;
  margin-top: 10px;
  color: var(--gold);
  font-size: 0.82rem;
}

.share-card {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background:
    radial-gradient(circle at right top, rgba(212, 177, 123, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(19, 14, 22, 0.78);
}

.share-card__poster {
  display: flex;
}

.share-card__art {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.share-card__content h5 {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.share-card__content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.share-card__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.share-card__qr {
  width: 112px;
  height: 112px;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
}

.share-card__footer-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.share-card__footer-copy strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

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

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 18px;
}

@media (max-width: 1100px) {
  body {
    overflow-y: auto;
  }

  .app-shell,
  .screen {
    height: auto;
    min-height: 100vh;
  }

  .quiz-stage,
  .result-stage {
    min-height: 100vh;
  }

  .home-stage__hero,
  .quiz-stage__character {
    width: min(38vw, 400px);
    bottom: calc(44vh + 22px);
  }

  .vn-panel--home {
    width: min(46vw, 560px);
  }

  .vn-panel--quiz {
    width: clamp(300px, 70vw, 680px);
    max-height: 44vh;
  }

  .vn-panel--result {
    width: min(900px, calc(100% - 36px));
  }

  .result-stage__card {
    width: min(30vw, 320px);
  }

  .stack-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atlas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .music-toggle {
    top: 50%;
    right: 10px;
    bottom: auto;
    width: 48px;
    height: 48px;
  }

  .home-layout {
    padding: 12px;
  }

  .home-rail {
    width: 88px;
    padding: 12px 10px;
    border-radius: 22px;
  }

  .home-rail__brand p,
  .home-rail__meta {
    font-size: 0.72rem;
  }

  .rail-button {
    padding: 10px 8px;
    font-size: 0.82rem;
  }

  .home-stage__hero {
    right: 18px;
    bottom: 86px;
    width: min(46vw, 352px);
    height: min(74vh, 704px);
    max-height: calc(100% - 96px);
  }

  .home-stage__chandelier {
    width: 170px;
    height: 170px;
  }

  .quiz-hud {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .quiz-hud__left {
    gap: 6px;
  }

  .hud-button {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .quiz-stage__character {
    left: 50%;
    right: auto;
    top: 68px;
    bottom: calc(50vh + 22px);
    height: auto;
    transform: translateX(-50%);
    width: min(68vw, 400px);
  }

  .result-stage__card {
    top: 24px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    width: min(48vw, 320px);
  }

  .vn-panel--quiz {
    left: 18px;
    right: 18px;
    transform: none;
    width: auto;
    bottom: 18px;
    top: auto;
    height: auto;
    max-height: 50vh;
    overflow: auto;
    padding: 16px 16px 18px;
  }

  .vn-panel--result {
    top: min(52vh, 420px);
    left: 18px;
    right: 18px;
    bottom: 18px;
    width: auto;
    transform: none;
    padding: 18px;
    overflow: auto;
  }

  .vn-panel__header,
  .vn-panel__footer,
  .report-hero {
    flex-direction: column;
  }

  .vn-panel__status {
    justify-content: flex-start;
  }

  .choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid,
  .report-dimensions {
    grid-template-columns: 1fr;
  }

  .overlay__sheet {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    margin: 8px auto;
    padding: 18px;
  }

  .report-hero__poster {
    width: min(52vw, 280px);
  }

  .atlas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .music-toggle {
    position: fixed;
    top: 48%;
    right: 8px;
    bottom: auto;
    left: auto;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
  }

  .home-layout {
    display: block;
    padding: 10px;
  }

  .home-rail {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    z-index: 8;
    gap: 10px;
    padding: 10px 12px;
    bottom: auto;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(20, 17, 27, 0.82), rgba(16, 13, 21, 0.7));
    backdrop-filter: blur(14px);
  }

  .home-rail__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .home-rail__brand p,
  .home-rail__meta,
  .home-rail__brand .eyebrow {
    display: none;
  }

  .home-rail__brand h1 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1;
  }

  .eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .home-rail__nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .rail-button {
    min-height: 44px;
    padding: 8px 6px;
    font-size: 0.76rem;
    border-radius: 14px;
    text-align: center;
  }

  .home-stage,
  .quiz-stage,
  .result-stage {
    border-radius: 24px;
  }

  .home-stage {
    min-height: calc(100vh - 20px);
  }

  .home-stage__hero {
    left: 50%;
    right: auto;
    width: min(86vw, 400px);
    height: min(68vh, 600px);
    top: 70px;
    bottom: auto;
    transform: translateX(-50%);
    max-height: 68vh;
  }

  .home-stage__hero img {
    transform: scale(1.24);
    transform-origin: center top;
  }

  .home-stage__sigil {
    bottom: 32%;
    width: min(268px, 62vw);
    opacity: 0.96;
  }

  .sigil-cta {
    padding: 16px 30px;
    gap: 5px;
    border-color: rgba(255, 239, 203, 0.92);
    background:
      radial-gradient(circle at center, rgba(255, 243, 210, 0.34), transparent 70%),
      linear-gradient(135deg, rgba(247, 225, 173, 0.98), rgba(223, 181, 112, 0.98));
    box-shadow:
      0 0 54px rgba(222, 181, 118, 0.42),
      0 18px 44px rgba(0, 0, 0, 0.34);
  }

  .sigil-cta__label {
    font-size: 1.18rem;
    letter-spacing: 0.14em;
  }

  .sigil-cta__sub {
    font-size: 0.66rem;
    opacity: 0.9;
  }

  .vn-panel--home {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px 14px 14px;
    width: auto;
    max-height: 38vh;
    overflow: auto;
    background:
      linear-gradient(180deg, rgba(78, 62, 74, 0.18), rgba(24, 20, 33, 0.42)),
      rgba(10, 12, 20, 0.22);
    backdrop-filter: blur(20px) saturate(110%);
  }

  .vn-panel--home h2 {
    width: 100%;
    max-width: none;
    font-size: clamp(1.12rem, 4.2vw, 1.38rem);
    line-height: 1.22;
  }

  .vn-panel--home .vn-panel__speaker {
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
  }

  .vn-panel--home p {
    font-size: 0.76rem;
    line-height: 1.58;
    margin: 6px 0 8px;
  }

  .vn-panel--home .vn-panel__chips {
    gap: 6px;
  }

  .vn-panel--home .chip {
    padding: 5px 9px;
    font-size: 0.64rem;
  }

  .quiz-hud {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 8px;
  }

  .quiz-hud__left {
    gap: 4px;
    flex-shrink: 0;
  }

  .hud-button {
    padding: 8px 10px;
    font-size: 0.76rem;
    border-radius: 14px;
  }

  .quiz-hud__center {
    min-width: 0;
    overflow: hidden;
  }

  .quiz-hud__center strong {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quiz-stage__character {
    left: 50%;
    right: auto;
    top: 52px;
    bottom: calc(44vh - 10px);
    height: auto;
    transform: translateX(-50%);
    width: min(92vw, 388px);
  }

  .vn-panel--quiz {
    left: 10px;
    right: 10px;
    transform: none;
    width: auto;
    bottom: 10px;
    top: 41.5vh;
    height: auto;
    max-height: none;
    overflow: auto;
    padding: 12px 13px 14px;
    background:
      linear-gradient(180deg, rgba(88, 99, 144, 0.18), rgba(22, 24, 42, 0.46)),
      rgba(11, 14, 28, 0.38);
    backdrop-filter: blur(22px) saturate(114%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  }

  .vn-panel--quiz h2 {
    font-size: clamp(0.88rem, 3.6vw, 1.05rem);
    line-height: 1.5;
    gap: 0.4em;
  }

  .vn-panel--result h2 {
    font-size: clamp(1.04rem, 4.2vw, 1.36rem);
    line-height: 1.32;
  }

  #question-text .q-line--stellae {
    padding: 0.28em 0.6em 0.28em 0.56em;
    column-gap: 7px;
  }

  #question-text .q-line--stellae .q-line__who {
    font-size: 0.7em;
    letter-spacing: 0.12em;
  }

  .vn-panel p,
  .vn-panel__scene-note,
  .vn-panel__guide,
  .choice-button p {
    font-size: 0.8rem;
    line-height: 1.54;
  }

  .vn-panel--quiz .vn-panel__name {
    font-size: 1rem;
  }

  .vn-panel--quiz .vn-panel__role,
  .vn-panel--quiz .status-chip {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }

  .vn-panel--quiz .vn-panel__scene-note {
    font-size: 0.74rem;
    line-height: 1.52;
    margin-top: 2px;
  }

  .vn-panel--quiz .vn-panel__guide {
    font-size: 0.76rem;
    line-height: 1.5;
  }

  .choice-list {
    grid-template-columns: 1fr;
    gap: 7px;
    margin: 9px 0 9px;
  }

  .choice-button {
    padding: 9px 11px;
  }

  .choice-button strong {
    font-size: 0.84rem;
    margin-bottom: 3px;
  }

  .choice-button p {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .vn-panel__footer {
    flex-direction: column;
    gap: 8px;
  }

  .live-tags {
    gap: 6px;
  }

  .live-tags .chip {
    padding: 4px 8px;
    font-size: 0.64rem;
  }

  .progress-track {
    width: 100%;
  }

  .result-stage__card {
    top: 20px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    width: min(56vw, 260px);
    padding: 10px;
    border-radius: 22px;
  }

  .result-stage__art {
    border-radius: 16px;
  }

  .vn-panel--result {
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    height: auto;
    max-height: 48vh;
    overflow: auto;
    padding: 14px;
    transform: none;
    width: auto;
  }

  .result-metrics {
    gap: 10px;
  }

  .metric-card {
    min-width: calc(50% - 6px);
    padding: 10px 12px;
  }

  .metric-card span {
    font-size: 0.68rem;
    margin-bottom: 4px;
  }

  .metric-card strong {
    font-size: 1.2rem;
  }

  .result-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
  }

  .result-stage__tagline {
    font-size: 0.92rem;
    margin: 6px 0;
  }

  .result-stage__intro {
    font-size: 0.86rem;
    margin-bottom: 12px;
  }

  .stack-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .atlas-card__actions,
  .share-actions {
    flex-direction: column;
  }

  .atlas-book {
    padding-left: 12px;
  }

  .atlas-book__spine {
    width: 16px;
  }

  .atlas-book__page {
    padding: 14px 12px 16px;
    border-radius: 0 22px 22px 0;
  }

  .atlas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .atlas-card {
    gap: 8px;
  }

  .atlas-card__inner {
    aspect-ratio: 0.7;
  }

  .atlas-card.is-locked .atlas-card__actions {
    display: none;
  }

  .atlas-card__label {
    min-height: 42px;
  }

  .atlas-card__label strong {
    font-size: 0.9rem;
  }

  .atlas-card__seal {
    gap: 10px;
    width: calc(100% - 18px);
    padding: 14px 12px;
  }

  .atlas-card__seal strong {
    font-size: 0.84rem;
  }

  .atlas-card__seal span {
    max-width: 12ch;
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .overlay-panel__head h3 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .report-hero__poster {
    width: min(60vw, 240px);
    align-self: center;
  }

  .confirm-dialog__box {
    width: min(340px, calc(100% - 24px));
    padding: 22px 18px 18px;
  }
}

.vn-panel--quiz.is-transitioning {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  pointer-events: none;
}

@media (max-width: 820px) {
  .vn-panel--quiz.is-transitioning {
    transform: translateY(6px);
  }
}

.vn-panel--quiz {
  transition: opacity 180ms ease, transform 180ms ease;
  max-height: 46vh;
  overflow-y: auto;
}

.choice-button {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.choice-button.is-selected {
  transform: scale(0.97);
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
}

.confirm-dialog[hidden] {
  display: none;
}

.confirm-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.72);
  backdrop-filter: blur(10px);
}

.confirm-dialog__box {
  position: relative;
  z-index: 1;
  width: min(400px, calc(100% - 32px));
  padding: 28px 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(32, 22, 28, 0.96), rgba(12, 10, 16, 0.96));
  box-shadow: var(--shadow);
  text-align: center;
}

.confirm-dialog__box p {
  margin: 0 0 20px;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.6;
}

.confirm-dialog__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-dialog__actions .rail-button {
  min-width: 100px;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(0, -16px, 0) scale(1.08);
  }
}

@keyframes music-spin {
  from {
    transform: rotate(0deg);
  }

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