:root {
  --ink: #06152a;
  --ink-2: #0b2544;
  --blue: #123f6d;
  --teal: #3c9b97;
  --gold: #d8aa51;
  --gold-light: #f4db9f;
  --cream: #fffaf0;
  --white: #fff;
  --muted: #c0cad7;
  --danger: #ffb0ad;
  --success: #8ee2b4;
  --glass: rgba(5, 19, 38, 0.78);
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

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

body {
  color: var(--white);
  background: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
}

button,
input { font: inherit; }

button { cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-shell,
.screen { width: 100%; min-height: 100dvh; }

.screen { display: none; }
.screen.is-active { display: flex; }

.eyebrow,
.step-label,
.scene-kicker,
.question-kicker {
  color: var(--gold-light);
  font-size: clamp(0.68rem, 1.2vw, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intake-screen {
  position: relative;
  min-height: 100dvh;
  background: var(--ink);
}

.intake-art,
.intake-panel {
  width: 50%;
  min-height: 100dvh;
}

.intake-art { position: relative; overflow: hidden; }

.intake-art picture {
  display: block;
  width: 100%;
  height: 100%;
}

.intake-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  animation: drift 18s ease-in-out infinite alternate;
}

.art-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 21, 42, 0.02), rgba(6, 21, 42, 0.9)),
    linear-gradient(90deg, transparent 65%, rgba(6, 21, 42, 0.5));
}

.intake-light {
  position: absolute;
  z-index: 2;
  inset: -20%;
  background: linear-gradient(112deg, transparent 30%, rgba(244, 219, 159, 0.14) 48%, transparent 64%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: lightSweep 8s ease-in-out infinite alternate;
}

.art-copy {
  position: absolute;
  z-index: 3;
  right: clamp(1.4rem, 5vw, 5rem);
  bottom: clamp(2rem, 7vh, 5rem);
  left: clamp(1.4rem, 5vw, 5rem);
  max-width: 42rem;
}

.art-copy h2,
.intake-copy h1,
.scene-title,
.complete-card h2 {
  margin: 0.55rem 0 0.8rem;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 0.98;
  text-wrap: balance;
}

.art-copy h2 { font-size: clamp(2.5rem, 5vw, 5.8rem); }
.art-copy p { margin: 0; color: #e8edf2; font-size: 1.02rem; }

.intake-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 6rem);
  background:
    radial-gradient(circle at 85% 8%, rgba(216, 170, 81, 0.14), transparent 30%),
    linear-gradient(145deg, #0b2748, var(--ink));
}

.brand,
.compact-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand { margin-bottom: clamp(1.5rem, 5vh, 3.5rem); }

.brand-mark {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(244, 219, 159, 0.68);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.brand-mark.small { width: 2.25rem; height: 2.25rem; font-size: 0.76rem; }

.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-name small {
  display: block;
  margin-top: 0.1rem;
  color: var(--gold-light);
  font-family: "DM Sans", sans-serif;
  font-size: 0.61rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intake-copy { max-width: 38rem; }
.intake-copy h1 { font-size: clamp(2.7rem, 5.2vw, 5.5rem); }
.intake-copy p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }

form {
  display: grid;
  gap: 0.8rem;
  width: min(100%, 38rem);
  margin-top: 1.35rem;
}

label { display: grid; gap: 0.3rem; font-weight: 700; }
label span { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
label em { color: var(--muted); font-size: 0.76rem; font-style: normal; font-weight: 500; }

input {
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.95rem;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  padding: 0.82rem 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder { color: #8493a6; }
input:focus { border-color: var(--gold-light); box-shadow: 0 0 0 4px rgba(216, 170, 81, 0.15); background: rgba(255, 255, 255, 0.1); }
input[aria-invalid="true"] { border-color: var(--danger); }

.field-error { min-height: 0.8rem; color: var(--danger); font-size: 0.72rem; font-weight: 600; }

.primary-button {
  display: inline-flex;
  min-height: 3.4rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.3rem 0.78rem 1.55rem;
  color: var(--ink);
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  box-shadow: 0 12px 32px rgba(216, 170, 81, 0.24);
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 42px rgba(216, 170, 81, 0.32); }
.primary-button:active { transform: scale(0.98); }
.primary-button:disabled { opacity: 0.38; cursor: default; box-shadow: none; transform: none; }
.begin-button { width: 100%; margin-top: 0.2rem; }

.consent-copy { margin: 0.1rem 0 0; color: #8c9aad; font-size: 0.71rem; line-height: 1.4; text-align: center; }

.presentation-screen {
  position: fixed;
  inset: 0;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--ink);
}

.presentation-header {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 4.2rem;
  align-items: center;
  justify-content: space-between;
  padding: max(0.65rem, env(safe-area-inset-top)) clamp(0.9rem, 3vw, 2.5rem) 0.55rem;
  pointer-events: none;
}

.presentation-header > * { pointer-events: auto; }

.compact-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}

.header-actions { display: flex; align-items: center; gap: 0.55rem; }

.icon-button,
.text-button,
.back-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--white);
  background: rgba(4, 15, 31, 0.64);
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.icon-button {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 50%;
}

.icon-button svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button[aria-pressed="true"] { color: var(--ink); background: var(--gold-light); }
.text-button { min-height: 2.65rem; border-radius: 999px; padding: 0 0.9rem; }

.progress-wrap {
  position: absolute;
  z-index: 31;
  top: 4.35rem;
  right: clamp(0.9rem, 3vw, 2.5rem);
  left: clamp(0.9rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.progress-track {
  height: 3px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.progress-track span {
  display: block;
  width: 7%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.scene {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
  isolation: isolate;
}

.scene-bg {
  position: absolute;
  z-index: -4;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  transform: scale(1.025);
  will-change: transform;
  animation: cameraPush 11s ease-in-out infinite alternate;
}

.scene.camera-right .scene-bg { animation-name: cameraPull; }

.scene-picture {
  position: absolute;
  z-index: -4;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene::before {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 16, 33, 0.97) 0%, rgba(5, 21, 43, 0.82) 48%, rgba(5, 21, 43, 0.16) 82%),
    linear-gradient(180deg, rgba(2, 9, 18, 0.28), rgba(2, 9, 18, 0.44));
  content: "";
}

.scene::after {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, transparent 0, rgba(1, 7, 15, 0.08) 43%, rgba(1, 7, 15, 0.36) 100%);
  content: "";
  pointer-events: none;
}

.cinema-wipe {
  position: absolute;
  z-index: 20;
  inset: 0;
  background: var(--ink);
  pointer-events: none;
  animation: cinemaReveal 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cinema-light {
  position: absolute;
  z-index: -1;
  inset: -30%;
  background: linear-gradient(112deg, transparent 33%, rgba(244, 219, 159, 0.12) 48%, transparent 63%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: lightSweep 9s ease-in-out infinite alternate;
}

.cinema-grain {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.1;
  background-image:
    repeating-radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.24) 0 0.5px, transparent 0.8px 3px),
    repeating-radial-gradient(circle at 73% 61%, rgba(0, 0, 0, 0.3) 0 0.6px, transparent 0.9px 4px);
  background-size: 7px 7px, 9px 9px;
  pointer-events: none;
  animation: grainPulse 1.8s steps(2, end) infinite;
}

.scene.align-right { justify-content: flex-end; }
.scene.align-right::before {
  background:
    linear-gradient(270deg, rgba(4, 16, 33, 0.97) 0%, rgba(5, 21, 43, 0.84) 49%, rgba(5, 21, 43, 0.18) 82%),
    linear-gradient(180deg, rgba(2, 9, 18, 0.25), rgba(2, 9, 18, 0.48));
}

.scene-content {
  display: flex;
  width: min(62rem, 68%);
  height: 100%;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: 6.7rem clamp(1.4rem, 6vw, 6.4rem) 1.6rem;
}

.scene.align-right .scene-content { align-items: flex-end; text-align: right; }

.story-content { max-width: 56rem; }
.story-content .scene-title { max-width: 13ch; font-size: clamp(3rem, 6.2vw, 6.6rem); }
.story-content .scene-copy { max-width: 38rem; margin: 0 0 1.4rem; color: #d8e0e9; font-size: clamp(0.98rem, 1.4vw, 1.18rem); line-height: 1.55; }
.scene.align-right .story-content .scene-copy { margin-left: auto; }

.personal-greeting {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  color: var(--gold-light);
  font-weight: 800;
}

.personal-greeting::before {
  width: 1.8rem;
  height: 1px;
  background: var(--gold);
  content: "";
}

.spoken-name {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45rem) scale(0.88);
  transform-origin: left center;
}

.spoken-name.is-spoken {
  animation: nameArrival 680ms cubic-bezier(0.2, 0.78, 0.28, 1.24) forwards;
}

@keyframes nameArrival {
  0% { opacity: 0; transform: translateY(0.45rem) scale(0.88); filter: blur(0.22rem); }
  62% { opacity: 1; transform: translateY(-0.08rem) scale(1.06); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.question-content { justify-content: flex-end; padding-bottom: clamp(1rem, 3.2vh, 2rem); }
.question-shell { width: min(100%, 58rem); min-height: 0; }
.question-heading {
  max-width: 19ch;
  margin: 0.35rem 0 0.3rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4.25vw, 4.55rem);
  line-height: 1.01;
  text-wrap: balance;
}

.question-description {
  max-width: 48rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  line-height: 1.4;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.42rem, 0.9vw, 0.72rem);
  margin-top: clamp(0.65rem, 1.7vh, 1.15rem);
}

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

.option-card {
  position: relative;
  display: flex;
  min-height: clamp(3.35rem, 7vh, 4.55rem);
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 0.95rem;
  padding: 0.64rem 0.82rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  text-align: left;
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  font-weight: 700;
  line-height: 1.18;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
  backdrop-filter: blur(8px);
}

.option-card[data-wide="true"] { grid-column: 1 / -1; }

.option-card::after {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  content: "";
}

.option-card:hover { transform: translateY(-2px); border-color: rgba(244, 219, 159, 0.72); }
.option-card:active { transform: scale(0.985); }
.option-card.is-selected { color: var(--ink); border-color: var(--gold-light); background: linear-gradient(120deg, var(--gold-light), var(--gold)); }
.option-card.is-selected::after { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--gold-light); background: var(--ink); }

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: clamp(0.6rem, 1.5vh, 1rem);
}

.footer-actions { display: flex; align-items: center; gap: 0.55rem; margin-left: auto; }
.selection-hint { min-height: 1.1rem; margin: 0; color: var(--danger); font-size: 0.77rem; font-weight: 700; }
.selection-hint.success { color: var(--success); }
.continue-button { min-width: 10.4rem; }

.back-button {
  min-height: 3.35rem;
  border-radius: 999px;
  padding: 0 1.05rem;
}

.scale-wrap { margin-top: clamp(0.8rem, 2vh, 1.4rem); }
.scale-values { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.77rem; font-weight: 700; }
.range-input { width: 100%; margin: 0.75rem 0; accent-color: var(--gold); }
.range-bubbles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.42rem; }
.range-bubbles button {
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.8rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
}
.range-bubbles button.is-selected { color: var(--ink); border-color: var(--gold-light); background: var(--gold-light); }

.quiz-feedback {
  display: none;
  min-height: 2rem;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
  border-radius: 0.75rem;
  padding: 0.52rem 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
}

.quiz-feedback.is-visible { display: flex; animation: feedbackPop 360ms ease-out; }
.quiz-feedback.is-correct { color: var(--success); border: 1px solid rgba(142, 226, 180, 0.42); }
.quiz-feedback.is-incorrect { color: #ffe0ac; border: 1px solid rgba(255, 224, 172, 0.35); }

.lesson-content { width: min(72rem, 78%); }
.lesson-content .scene-title { max-width: 15ch; font-size: clamp(2.6rem, 5vw, 5.2rem); }

.rule-equation {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.75rem;
  margin: 0.8rem 0;
  border: 1px solid rgba(244, 219, 159, 0.34);
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  background: rgba(6, 21, 42, 0.6);
  color: var(--gold-light);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; max-width: 48rem; }
.example-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.9rem;
  padding: 0.75rem;
  background: rgba(6, 21, 42, 0.66);
  backdrop-filter: blur(10px);
}
.example-card b { display: block; color: var(--gold-light); font-size: clamp(1.1rem, 2.5vw, 1.8rem); }
.example-card span { color: var(--muted); font-size: 0.78rem; }

.firm-note {
  max-width: 48rem;
  margin: 0.75rem 0;
  color: #e4eaf0;
  font-size: clamp(0.79rem, 1.15vw, 0.94rem);
  line-height: 1.38;
}

.disclaimer {
  max-width: 48rem;
  margin: 0.3rem 0 0;
  color: #97a5b6;
  font-size: 0.67rem;
}

.complete-scene::before {
  background:
    linear-gradient(90deg, rgba(5, 19, 38, 0.92), rgba(5, 19, 38, 0.54)),
    linear-gradient(180deg, transparent, rgba(3, 12, 25, 0.78));
}

.complete-scene { justify-content: center; }
.complete-card {
  width: min(42rem, calc(100% - 2rem));
  margin: auto;
  border: 1px solid rgba(244, 219, 159, 0.34);
  border-radius: 1.6rem;
  padding: clamp(1.1rem, 4vh, 2.4rem);
  background: rgba(5, 19, 38, 0.8);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(16px);
}

.complete-icon {
  display: grid;
  width: 3.7rem;
  height: 3.7rem;
  margin: 0 auto 0.7rem;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  font-size: 1.5rem;
  font-weight: 900;
}

.complete-card h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.complete-card > p { margin: 0.45rem auto; color: var(--muted); line-height: 1.45; }
.summary-list { display: grid; gap: 0.5rem; margin: 1rem 0; padding: 0; list-style: none; text-align: left; }
.summary-list li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.11); padding: 0.55rem 0; }
.summary-list span { color: var(--muted); }
.summary-list strong { max-width: 65%; text-align: right; }
.delivery-status { min-height: 1.2rem; color: var(--gold-light) !important; font-size: 0.83rem; font-weight: 700; }
.retry-delivery-button[hidden] { display: none; }

.scene.enter-forward .scene-content { animation: enterForward 620ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.scene.enter-back .scene-content { animation: enterBack 520ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.scene.enter-forward .scene-bg,
.scene.enter-back .scene-bg { animation-duration: 11s; }
.reveal-1,
.reveal-2,
.reveal-3,
.reveal-4 { opacity: 0; transform: translateY(18px); animation: reveal 560ms forwards; }
.reveal-1 { animation-delay: 130ms; }
.reveal-2 { animation-delay: 310ms; }
.reveal-3 { animation-delay: 500ms; }
.reveal-4 { animation-delay: 670ms; }

button:focus-visible,
input:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

@keyframes drift { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.08) translateX(-1%); } }
@keyframes cinematicDrift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.6%, -0.7%, 0); } }
@keyframes cameraPush { from { transform: scale(1.04) translate3d(1%, 0, 0); } to { transform: scale(1.2) translate3d(-2.4%, -1%, 0); } }
@keyframes cameraPull { from { transform: scale(1.19) translate3d(-2%, -0.8%, 0); } to { transform: scale(1.04) translate3d(1.2%, 0.4%, 0); } }
@keyframes imageFade { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }
@keyframes enterForward { from { opacity: 0; transform: translateX(5vw); } to { opacity: 1; transform: translateX(0); } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-5vw); } to { opacity: 1; transform: translateX(0); } }
@keyframes feedbackPop { 0% { opacity: 0; transform: scale(0.96); } 70% { transform: scale(1.015); } 100% { opacity: 1; transform: scale(1); } }
@keyframes cinemaReveal { 0% { opacity: 1; } 44% { opacity: 0.92; } 100% { opacity: 0; visibility: hidden; } }
@keyframes lightSweep { from { transform: translateX(-13%) rotate(-1deg); opacity: 0.35; } to { transform: translateX(13%) rotate(1deg); opacity: 0.86; } }
@keyframes grainPulse { 0% { transform: translate(0, 0); } 50% { transform: translate(-1px, 1px); } 100% { transform: translate(1px, -1px); } }

@media (max-width: 820px) {
  .intake-screen {
    display: none;
    min-height: 100dvh;
    overflow-y: auto;
  }
  .intake-screen.is-active { display: block; }
  .intake-art {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100dvh;
  }
  .intake-art img { object-position: center top; }
  .art-shade { background: linear-gradient(180deg, rgba(4, 16, 33, 0.26), rgba(4, 16, 33, 0.93) 47%, #06152a 100%); }
  .art-copy { display: none; }
  .intake-panel {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    justify-content: flex-end;
    padding: 1rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
    background: transparent;
  }
  .brand { position: absolute; top: max(1rem, env(safe-area-inset-top)); left: 1rem; margin: 0; }
  .brand-name { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
  .intake-copy { padding-top: 45vh; }
  .intake-copy h1 { font-size: clamp(2rem, 9vw, 3.3rem); }
  .intake-copy p { font-size: 0.86rem; line-height: 1.4; }
  form { gap: 0.44rem; margin-top: 0.85rem; }
  label { gap: 0.16rem; }
  label span { font-size: 0.78rem; }
  input { min-height: 2.9rem; padding: 0.68rem 0.82rem; }
  .field-error { min-height: 0.5rem; font-size: 0.64rem; }
  .begin-button { min-height: 3.2rem; }
  .consent-copy { font-size: 0.63rem; line-height: 1.28; }

  .presentation-header { height: 3.8rem; padding: max(0.55rem, env(safe-area-inset-top)) 0.8rem 0.45rem; }
  .compact-brand > span:last-child { display: none; }
  .text-button { min-height: 2.45rem; padding: 0 0.75rem; font-size: 0.75rem; }
  .icon-button { width: 2.45rem; height: 2.45rem; }
  .progress-wrap { top: 3.95rem; right: 0.8rem; left: 0.8rem; }

  .scene-bg { inset: -1%; width: 102%; height: 102%; object-position: center top; }
  .scene::before,
  .scene.align-right::before {
    background:
      linear-gradient(180deg, rgba(4, 16, 33, 0.13) 0%, rgba(4, 16, 33, 0.35) 30%, rgba(4, 16, 33, 0.91) 57%, #06152a 100%),
      linear-gradient(90deg, rgba(4, 16, 33, 0.25), rgba(4, 16, 33, 0.08));
  }
  .scene-content,
  .lesson-content {
    width: 100%;
    height: 100%;
    align-items: stretch;
    justify-content: flex-end;
    padding: 5.1rem 0.88rem calc(0.72rem + env(safe-area-inset-bottom));
    text-align: left;
  }
  .scene.align-right .scene-content { align-items: stretch; text-align: left; }
  .story-content .scene-title { max-width: 13ch; font-size: clamp(2.35rem, 11vw, 4.25rem); }
  .story-content .scene-copy { max-width: 34rem; margin-bottom: 0.9rem; font-size: 0.89rem; line-height: 1.42; }
  .scene.align-right .story-content .scene-copy { margin-left: 0; }

  .question-content { padding-bottom: calc(0.65rem + env(safe-area-inset-bottom)); }
  .question-shell { width: 100%; }
  .question-heading { max-width: 100%; margin-top: 0.23rem; font-size: clamp(1.42rem, 6.15vw, 2.2rem); line-height: 1.04; }
  .question-description { margin-top: 0.24rem; font-size: 0.74rem; line-height: 1.25; }
  .options-grid,
  .options-grid.columns-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.38rem;
    margin-top: 0.55rem;
  }
  .option-card {
    min-height: clamp(2.85rem, 6.4vh, 3.65rem);
    border-radius: 0.8rem;
    padding: 0.46rem 0.58rem;
    font-size: clamp(0.7rem, 3.15vw, 0.84rem);
    line-height: 1.12;
  }
  .option-card::after { width: 0.68rem; height: 0.68rem; border-width: 1.5px; }
  .question-footer { margin-top: 0.48rem; }
  .selection-hint { max-width: 48%; font-size: 0.66rem; line-height: 1.18; }
  .footer-actions { gap: 0.4rem; }
  .continue-button { min-width: 8.4rem; min-height: 3rem; padding: 0.62rem 0.9rem 0.62rem 1.1rem; font-size: 0.78rem; }
  .back-button { min-height: 3rem; padding: 0 0.82rem; font-size: 0.75rem; }
  .scale-wrap { margin-top: 0.65rem; }
  .range-bubbles button { min-height: 2.75rem; }
  .quiz-feedback { min-height: 1.7rem; margin-top: 0.42rem; padding: 0.38rem 0.55rem; font-size: 0.7rem; }

  .lesson-content .scene-title { font-size: clamp(2rem, 8vw, 3.15rem); }
  .rule-equation { margin: 0.5rem 0; padding: 0.5rem 0.72rem; font-size: 0.92rem; }
  .example-grid { gap: 0.38rem; }
  .example-card { border-radius: 0.72rem; padding: 0.5rem; }
  .example-card b { font-size: 1rem; }
  .example-card span { font-size: 0.65rem; }
  .firm-note { margin: 0.52rem 0; font-size: 0.7rem; line-height: 1.25; }
  .disclaimer { font-size: 0.58rem; line-height: 1.2; }

  .complete-card { max-height: calc(100dvh - 5.4rem); margin: 4.9rem auto 0.5rem; padding: 1rem; }
  .complete-icon { width: 3rem; height: 3rem; margin-bottom: 0.5rem; }
  .complete-card h2 { font-size: clamp(2rem, 8vw, 3rem); }
  .complete-card > p { font-size: 0.8rem; line-height: 1.3; }
  .summary-list { margin: 0.65rem 0; font-size: 0.72rem; }
  .summary-list li { padding: 0.4rem 0; }
  .delivery-status { font-size: 0.7rem !important; }
}

@media (max-width: 420px) and (max-height: 760px) {
  .art-copy { top: 4.2rem; }
  .art-copy h2 { font-size: 2.15rem; }
  .intake-copy { padding-top: 36vh; }
  .question-heading { font-size: 1.32rem; }
  .question-kicker { font-size: 0.59rem; }
  .question-description { display: none; }
  .option-card { min-height: 2.7rem; font-size: 0.68rem; }
  .story-content .scene-title { font-size: 2.25rem; }
  .story-content .scene-copy { font-size: 0.78rem; }
  .lesson-content .scene-title { font-size: 1.85rem; }
  .firm-note { font-size: 0.64rem; }
}

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