:root {
  color-scheme: dark;
  font-family:
    "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --ink: #151821;
  --ink-deep: #11181b;
  --panel: #263531;
  --panel-deep: #141b1f;
  --gold: #d9bd78;
  --paper: #f7f3ea;
  --muted: #d8ded2;
  --line: rgba(219, 224, 213, 0.2);
  background: var(--ink-deep);
  color: var(--paper);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(217, 189, 120, 0.08) 0 22%, transparent 22% 100%),
    linear-gradient(90deg, rgba(247, 243, 234, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(247, 243, 234, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #263531 0%, #162124 58%, #0e1517 100%);
  background-size:
    280px 280px,
    30px 30px,
    30px 30px,
    auto;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 0;
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(217, 189, 120, 0.13) 46.2% 46.8%, transparent 47%),
    linear-gradient(45deg, transparent 0 65%, rgba(247, 243, 234, 0.07) 65.2% 65.7%, transparent 66%);
  opacity: 0.55;
}

body::after {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(217, 189, 120, 0.12), transparent 40%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2));
  background-size:
    auto,
    auto;
  opacity: 0.45;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 392px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.screen {
  min-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: screen-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero {
  justify-content: center;
}

.journey-home {
  justify-content: flex-start;
  padding-top: 10px;
}

.terminal-panel {
  position: relative;
  display: grid;
  min-height: calc(100dvh - 34px);
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 6px solid #10141d;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(38, 53, 49, 0.97), rgba(20, 27, 31, 0.99)),
    linear-gradient(135deg, rgba(224, 200, 148, 0.08) 0 24%, transparent 24% 100%);
  box-shadow: 0 24px 46px rgba(15, 18, 25, 0.24);
}

.terminal-panel::before {
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid rgba(219, 224, 213, 0.1);
  border-radius: 10px;
  content: "";
}

.terminal-panel::after {
  content: none;
}

.screen-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-title-block {
  display: grid;
  gap: 8px;
}

.eyebrow {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  color: rgba(247, 243, 234, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orbital-mark,
.channel-pill,
.chapter-rune {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(240, 217, 158, 0.4);
  border-radius: 6px;
  color: #f0d99e;
  background: rgba(240, 217, 158, 0.08);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.channel-pill {
  max-width: 54%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(247, 243, 234, 0.74);
  border-color: transparent;
  background: transparent;
  white-space: nowrap;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 10em;
  color: #fffaf0;
  font-size: clamp(30px, 8vw, 36px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 25px;
  line-height: 1.35;
  letter-spacing: 0;
}

.subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.panel,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
}

.route-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.55;
}

.route-card span {
  position: relative;
  padding-left: 16px;
}

.route-card span::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--gold);
  content: "";
  transform: rotate(45deg);
}

.actions {
  display: grid;
  gap: 12px;
}

.route-actions {
  margin-top: auto;
}

.split-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary,
.ghost {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  color: #17201d;
  background: var(--gold);
  font-weight: 900;
  letter-spacing: 0;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  touch-action: manipulation;
}

.primary::after,
.ghost::after {
  content: none;
}

.primary:active,
.ghost:active,
.choice:active {
  transform: translateY(1px) scale(0.99);
}

.ghost {
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary:disabled,
.ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.panel {
  justify-content: center;
  gap: 18px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: none;
}

.rule-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  color: #d9d1c2;
  line-height: 1.72;
  list-style: none;
}

.rule-list li {
  position: relative;
  padding-left: 18px;
}

.rule-list li::before {
  position: absolute;
  top: 0.82em;
  left: 0;
  width: 8px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.quiz {
  justify-content: flex-start;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 6px solid #10141d;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(38, 53, 49, 0.97), rgba(20, 27, 31, 0.99)),
    linear-gradient(135deg, rgba(224, 200, 148, 0.08) 0 24%, transparent 24% 100%);
  box-shadow: 0 24px 46px rgba(15, 18, 25, 0.24);
}

.quiz-top,
.card-meta,
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #f0d99e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.progress {
  height: 8px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.13);
  border: 0;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.chapter-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.journey-route {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  color: var(--gold);
}

.chapter-progress span {
  height: 6px;
  background: rgba(246, 240, 228, 0.12);
}

.journey-route span {
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
}

.chapter-progress span.is-active {
  background: var(--gold);
}

.journey-route span.is-active {
  background: var(--gold);
}

.question-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
}

.micro-label {
  color: rgba(247, 243, 234, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.question-panel h2 {
  color: #fffaf0;
  font-size: clamp(23px, 6.4vw, 26px);
  line-height: 1.12;
}

.question-panel-scene {
  gap: 11px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.082), rgba(255, 255, 255, 0.048)),
    radial-gradient(circle at 12% 12%, rgba(217, 189, 120, 0.13), transparent 34%);
}

.question-illustration {
  position: relative;
  height: 116px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 189, 120, 0.34);
  border-radius: 7px;
  background: #f8f5eb;
}

.question-illustration img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.question-copy {
  display: grid;
  gap: 7px;
}

.question-panel-scene h2 {
  font-size: clamp(21px, 5.8vw, 24px);
  line-height: 1.12;
}

.question-narrative {
  display: grid;
  gap: 7px;
  color: rgba(247, 243, 234, 0.88);
  font-size: 14px;
  line-height: 1.5;
}

.question-narrative p {
  margin: 0;
}

.question-callout {
  padding: 8px 9px;
  border-left: 2px solid rgba(217, 189, 120, 0.7);
  background: rgba(16, 20, 29, 0.26);
}

.question-callout-label,
.question-prompt {
  color: #f0d99e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  width: 100%;
  padding: 13px;
  color: var(--paper);
  text-align: left;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  opacity: 0;
  transform: translateX(-8px);
  animation: choice-enter 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--choice-index) * 55ms);
}

.quiz-answered {
  animation: none;
}

.quiz-answered .choice {
  opacity: 1;
  transform: translateX(0);
  animation: none;
}

.choice-prefix {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.choice-text {
  display: block;
}

.choice.selected {
  border-color: rgba(217, 189, 120, 0.8);
  background: rgba(217, 189, 120, 0.15);
  transform: translateX(0);
}

.choice.selected .choice-prefix {
  color: var(--gold);
}

.nav-row {
  margin-top: auto;
}

.quiz .nav-row {
  position: sticky;
  bottom: max(0px, env(safe-area-inset-bottom));
  z-index: 2;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(20, 27, 31, 0), rgba(20, 27, 31, 0.96) 35%);
}

.quiz-with-scene .nav-row {
  position: relative;
  bottom: auto;
  background: none;
}

.nav-row button {
  flex: 1;
}

.chapter-break {
  text-align: left;
}

.chapter-seal {
  position: absolute;
  right: 24px;
  top: 28px;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  color: rgba(199, 169, 107, 0.72);
  border: 2px solid rgba(199, 169, 107, 0.58);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: rotate(-13deg) scale(1.28);
  opacity: 0;
  animation: seal-drop 520ms 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chapter-seal::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(199, 169, 107, 0.5);
  content: "";
}

.generating {
  text-align: center;
  align-items: center;
}

.archive-loader {
  display: grid;
  gap: 8px;
  width: min(220px, 72vw);
  padding: 18px;
  border: 1px solid rgba(217, 189, 120, 0.28);
  background: rgba(217, 189, 120, 0.08);
}

.archive-loader span {
  display: block;
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(247, 243, 234, 0.48), var(--gold), transparent);
  opacity: 0.28;
  transform: scaleX(0.22);
  transform-origin: left center;
  animation: loader-line 1.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.archive-loader span:nth-child(2) {
  animation-delay: 160ms;
}

.archive-loader span:nth-child(3) {
  animation-delay: 320ms;
}

.status-list {
  display: grid;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.status-list p {
  position: relative;
  padding: 11px 38px 11px 14px;
  color: var(--paper);
  border: 1px solid rgba(217, 189, 120, 0.28);
  background: rgba(255, 255, 255, 0.045);
  opacity: 0;
  transform: translateY(6px);
  animation: status-light 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(220ms + var(--status-index) * 360ms);
}

.status-list p::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 14px;
  height: 2px;
  background: var(--gold);
  content: "";
  transform: translateY(-50%) scaleX(0.28);
  transform-origin: left center;
  opacity: 0.42;
}

.result-screen {
  justify-content: flex-start;
  gap: 14px;
}

.result-card {
  position: relative;
  padding: 18px;
  display: grid;
  gap: 14px;
  line-height: 1.55;
  overflow: hidden;
  border: 6px solid #10141d;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(38, 53, 49, 0.97), rgba(20, 27, 31, 0.99)),
    linear-gradient(135deg, rgba(224, 200, 148, 0.08) 0 24%, transparent 24% 100%);
  box-shadow: 0 24px 46px rgba(15, 18, 25, 0.24);
}

.result-card::before {
  position: absolute;
  right: -18px;
  top: 98px;
  color: rgba(247, 243, 234, 0.035);
  content: attr(data-archive);
  font-size: 90px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.result-card::after {
  content: none;
}

.identity-strip {
  width: fit-content;
  padding: 5px 9px;
  color: var(--ink);
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.result-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.avatar-frame {
  width: min(100%, 232px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 189, 120, 0.58);
  border-radius: 8px;
  background: #f7f5ed;
}

.avatar-frame > * {
  grid-area: 1 / 1;
}

.avatar-frame img {
  width: min(190px, 100%);
  height: min(190px, 100%);
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.avatar-placeholder {
  width: min(190px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #263531;
  background: #f7f5ed;
  font-size: 42px;
  font-weight: 800;
}

.result-card h1 {
  font-size: 34px;
}

.result-hero h1 {
  max-width: 100%;
  color: #fffaf0;
  font-size: clamp(34px, 9vw, 42px);
  line-height: 1.05;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.archive-label {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.headline {
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
}

.result-hero .headline {
  max-width: 13em;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.result-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.result-mini-grid p,
.journey-summary {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.result-mini-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
}

.result-mini-grid span {
  display: block;
  margin-top: 5px;
  color: rgba(247, 243, 234, 0.74);
  font-size: 11px;
}

.journey-summary {
  padding: 13px;
  font-size: 14px;
  line-height: 1.62;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  padding: 5px 8px;
  color: #17201d;
  background: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.charge-box {
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--gold);
}

.hidden-trait {
  padding: 14px;
  background: rgba(217, 189, 120, 0.1);
  border: 1px solid rgba(217, 189, 120, 0.24);
}

.hidden-trait span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hidden-trait strong {
  display: block;
  margin-top: 3px;
  color: #fffaf0;
  font-size: 18px;
}

.hidden-trait-copy {
  margin-top: 6px;
  color: #d9d1c2;
  font-size: 13px;
  line-height: 1.6;
}

.copy-section,
.result-grid {
  display: grid;
  gap: 8px;
}

.copy-section h2 {
  color: var(--gold);
  font-size: 14px;
}

.result-grid {
  grid-template-columns: 1fr;
}

.result-grid p {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
}

.behavior-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.charge-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.confidence,
.hint {
  color: rgba(247, 243, 234, 0.58);
  font-size: 12px;
}

.details-toggle {
  min-height: 48px;
  width: 100%;
}

.result-details {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.detail-section {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
}

.detail-section h2 {
  color: var(--gold);
  font-size: 14px;
}

.detail-section p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.clipboard-fallback {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end center;
  padding: 16px;
}

.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(8px);
}

.share-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(92dvh, 820px);
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  border: 1px solid rgba(199, 169, 107, 0.44);
  background:
    linear-gradient(180deg, rgba(25, 29, 46, 0.98), rgba(8, 9, 16, 0.98)),
    repeating-linear-gradient(180deg, rgba(246, 240, 228, 0.035) 0 1px, transparent 1px 13px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
  animation: sheet-enter 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.share-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share-sheet-head h2 {
  margin-top: 6px;
  font-size: 22px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 28px;
  line-height: 1;
}

.share-preview {
  display: grid;
  place-items: center;
  min-height: min(320px, 42dvh);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(217, 189, 120, 0.22);
}

.share-preview-image {
  display: block;
  width: min(100%, 260px);
  max-height: min(52dvh, 420px);
  object-fit: contain;
  border: 1px solid rgba(199, 169, 107, 0.34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  user-select: auto;
  -webkit-touch-callout: default;
}

.share-preview-loading {
  color: var(--gold);
  font-size: 14px;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.share-note {
  color: #d9d1c2;
  font-size: 12px;
  line-height: 1.65;
}

.platform-panel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.platform-list {
  display: grid;
  gap: 8px;
}

.platform-button {
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--paper);
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.platform-button span {
  font-weight: 800;
}

.platform-button small {
  max-width: 52%;
  color: var(--muted);
  line-height: 1.35;
  text-align: right;
}

.share-toast {
  padding: 10px 12px;
  color: #17201d;
  background: var(--gold);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

@media (min-width: 720px) {
  body {
    display: grid;
    place-items: center;
    padding: 24px 0;
  }

  .app-shell {
    min-height: min(860px, calc(100dvh - 48px));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
      inset 0 0 0 1px rgba(217, 189, 120, 0.08),
      0 24px 80px rgba(0, 0, 0, 0.42);
    background: rgba(13, 20, 22, 0.54);
  }

  .screen {
    min-height: min(824px, calc(100dvh - 84px));
  }

  .share-overlay {
    place-items: center;
  }
}

@media (max-width: 430px) and (max-height: 760px) {
  .app-shell {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .screen {
    min-height: calc(100dvh - 22px);
  }

  .hero {
    justify-content: flex-start;
    padding-top: 8px;
  }

  .terminal-panel {
    gap: 14px;
    padding: 14px;
  }

  .terminal-panel::before {
    inset: 9px;
  }

  h1 {
    font-size: clamp(30px, 9vw, 38px);
  }

  h2 {
    font-size: 23px;
  }

  .subtitle {
    font-size: 16px;
  }

  .prologue {
    gap: 9px;
    padding: 14px;
    line-height: 1.55;
  }

  .primary,
  .ghost {
    min-height: 44px;
  }

  .quiz {
    gap: 12px;
    padding: 14px;
    padding-top: 14px;
  }

  .question-panel-scene {
    gap: 9px;
    padding: 11px;
  }

  .question-illustration {
    height: 92px;
  }

  .question-panel-scene h2 {
    font-size: 21px;
  }

  .question-narrative {
    gap: 6px;
    font-size: 13px;
    line-height: 1.42;
  }

  .question-callout {
    padding: 7px 8px;
  }

  .chapter-progress {
    margin-top: 0;
  }

  .choices {
    gap: 8px;
  }

  .choice {
    padding: 12px 13px;
    line-height: 1.38;
  }

  .choice-prefix {
    margin-bottom: 2px;
  }

  .result-card {
    gap: 11px;
    padding: 16px;
  }

  .avatar-frame,
  .avatar-placeholder {
    width: min(100%, 192px);
  }

  .result-card h1 {
    font-size: 38px;
  }

  .headline {
    font-size: 18px;
  }

  .share-overlay {
    padding: 10px;
  }

  .share-sheet {
    max-height: calc(100dvh - 20px);
    gap: 10px;
    padding: 12px;
  }

  .share-sheet-head h2 {
    font-size: 20px;
  }

  .share-preview {
    min-height: min(240px, 36dvh);
    padding: 8px;
  }

  .share-preview-image {
    width: min(100%, 220px);
    max-height: 36dvh;
  }

  .share-note {
    font-size: 11px;
    line-height: 1.55;
  }

  .share-actions {
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .question-illustration {
    height: 86px;
  }

  .question-narrative {
    font-size: 12px;
  }

  .choice {
    padding: 13px;
  }

  .nav-row {
    flex-direction: column;
  }

  .share-overlay {
    padding: 10px;
  }

  .share-sheet {
    padding: 12px;
  }

  .platform-button {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-button small {
    max-width: 100%;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@keyframes terminal-scan {
  0%,
  32% {
    transform: translateX(-60%);
  }
  68%,
  100% {
    transform: translateX(60%);
  }
}

@keyframes panel-scan {
  0%,
  42% {
    opacity: 0;
    transform: translateX(-80px);
  }
  52% {
    opacity: 0.55;
  }
  72%,
  100% {
    opacity: 0;
    transform: translateX(260px);
  }
}

@keyframes screen-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes choice-enter {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes seal-drop {
  0% {
    opacity: 0;
    transform: rotate(-13deg) scale(1.28);
  }
  74% {
    opacity: 0.72;
    transform: rotate(-13deg) scale(0.94);
  }
  100% {
    opacity: 0.62;
    transform: rotate(-13deg) scale(1);
  }
}

@keyframes panel-once-scan {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes loader-line {
  0%,
  100% {
    opacity: 0.2;
    transform: scaleX(0.18);
  }
  48% {
    opacity: 0.9;
    transform: scaleX(1);
  }
}

@keyframes status-light {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes result-image-scan {
  0% {
    opacity: 0;
    transform: translateX(-110%);
  }
  35% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translateX(110%);
  }
}

@keyframes sheet-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
