@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #070d14;
  --navy: #0c1824;
  --stage: #10202e;
  --panel: rgba(16, 32, 46, 0.72);
  --line: rgba(243, 234, 215, 0.14);
  --cream: #f3ead7;
  --paper: #fff8ee;
  --bone: #e4d4b8;
  --muscle: #d24b4b;
  --muscle-deep: #9a2c2e;
  --cartilage: #3cbea8;
  --gold: #e3b441;
  --sky: #7ec8e3;
  --text: #f6f0e4;
  --muted: #adc0ce;
  --ok: #4ade80;
  --bad: #fb7185;
  --focus: #f3ead7;
  --hud-h: 64px;
  --rail-h: 96px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Outfit", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: hidden;
}
body.scroll-mobile {
  overflow: auto;
}
button,
input,
select {
  font-family: inherit;
}
button {
  cursor: pointer;
}
img {
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

#app {
  position: relative;
  height: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(226, 180, 65, 0.08), transparent 55%),
    radial-gradient(900px 600px at 100% 10%, rgba(210, 75, 75, 0.12), transparent 50%),
    radial-gradient(800px 500px at 80% 100%, rgba(60, 190, 168, 0.08), transparent 50%),
    var(--ink);
}
#app::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
#loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#loader[hidden] {
  display: none !important;
}
.loader-card {
  text-align: center;
  width: min(420px, 86vw);
}
.loader-mark {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.2rem;
  position: relative;
}
.loader-mark svg {
  width: 100%;
  height: 100%;
}
.loader-card h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
}
.loader-card p {
  color: var(--muted);
  margin: 0 0 1.4rem;
}
.bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(243, 234, 215, 0.12);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, var(--gold), var(--muscle));
  transition: width 0.4s var(--ease);
}

/* HUD */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--hud-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  background: linear-gradient(to bottom, rgba(7, 13, 20, 0.88), transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
}
.brand h1 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
.brand small {
  display: block;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  text-transform: none;
  font-weight: 400;
}
.hud-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(16, 32, 46, 0.55);
  color: var(--cream);
  border-radius: 12px;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
}
.icon-btn:hover:not(:disabled) {
  background: rgba(243, 234, 215, 0.1);
}
.icon-btn[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Bottom rail */
.rail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: var(--rail-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0 1.2rem 0.6rem;
  background: linear-gradient(to top, rgba(7, 13, 20, 0.94), transparent);
}
.nav-btn {
  min-width: 118px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 32, 46, 0.7);
  color: var(--cream);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(243, 234, 215, 0.1);
}
.nav-btn.primary {
  background: var(--cream);
  color: var(--ink);
  border-color: transparent;
}
.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  border: 0;
  padding: 0;
  background: rgba(243, 234, 215, 0.22);
  transition: width 0.3s, background 0.3s;
}
.dot.is-on {
  width: 28px;
  background: var(--gold);
}
.dot:hover {
  background: var(--cream);
}
.rail-center {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  min-width: 0;
}
.journey {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
}
.journey button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
}
.journey button.is-on {
  color: var(--gold);
  background: rgba(227, 180, 65, 0.14);
  opacity: 1;
}
.journey button.is-done {
  color: #7ec8e3;
  opacity: 0.9;
}
.journey button:not(.is-on):not(.is-done) {
  opacity: 0.38;
  color: var(--muted);
}
.mini-btn.is-on,
.nav-btn.is-on {
  background: var(--cream);
  color: var(--ink);
  border-color: transparent;
}
.mini-btn:disabled,
.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.progress-meta {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

/* Stage */
#stage {
  position: relative;
  height: 100%;
  padding: var(--hud-h) 0 var(--rail-h);
}
.scene {
  position: absolute;
  inset: var(--hud-h) 1.2rem var(--rail-h);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), visibility 0.55s;
  display: grid;
  align-items: stretch;
}
.scene.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  z-index: 2;
}
.scene-frame {
  width: min(100%, 1560px);
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 1.4rem;
  min-height: 0;
}
.scene.solo .scene-frame {
  grid-template-columns: 1fr;
}
.scene.stack .scene-frame {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.4rem 1.5rem;
  backdrop-filter: blur(16px);
  overflow: auto;
  min-height: 0;
}
.kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.display {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 3.1rem);
  line-height: 1.08;
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}
.lede {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--cream);
  margin: 0 0 1rem;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}
.chip {
  border: 1px solid var(--line);
  background: rgba(243, 234, 215, 0.06);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}
.chip.muscle { border-color: rgba(210, 75, 75, 0.5); color: #ffb4b4; }
.chip.bone { border-color: rgba(228, 212, 184, 0.5); color: var(--bone); }
.chip.joint { border-color: rgba(227, 180, 65, 0.5); color: var(--gold); }
.chip.cart { border-color: rgba(60, 190, 168, 0.5); color: var(--cartilage); }

.fact {
  border-left: 3px solid var(--gold);
  padding: 0.7rem 0.9rem;
  background: rgba(227, 180, 65, 0.08);
  border-radius: 0 16px 16px 0;
  margin: 1rem 0 0;
}
.fact.alert {
  border-left-color: var(--muscle);
  background: rgba(210, 75, 75, 0.1);
}
.fact h3 {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.fact p { margin: 0; }

.def-box {
  background: rgba(255, 248, 238, 0.06);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  margin: 0.8rem 0;
}
.def-box span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 0.25rem;
}

.stage-view {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 280px at 50% 20%, rgba(243, 234, 215, 0.08), transparent 60%),
    linear-gradient(180deg, #152838, #0b1722);
  min-height: 0;
}
.stage-view canvas,
.stage-view .fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#anatomy-rig {
  position: absolute;
  inset: 0;
  z-index: 1;
}
#anatomy-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#anatomy-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.pip-film {
  position: absolute !important;
  left: 0.8rem;
  right: auto;
  bottom: 3.4rem;
  top: auto;
  width: 42% !important;
  height: 28% !important;
  z-index: 3;
  border-radius: 14px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.overlay-ui {
  position: absolute;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.overlay-ui.top-left { top: 0.8rem; left: 0.8rem; }
.overlay-ui.top-right { top: 0.8rem; right: 0.8rem; justify-content: flex-end; }
.overlay-ui.bottom-left { bottom: 0.8rem; left: 0.8rem; }
.seg {
  display: flex;
  background: rgba(7, 13, 20, 0.62);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.seg button.is-on {
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(227, 180, 65, 0.45);
}
body.mode-present .explore-only {
  display: none !important;
}
body.stage-focus .scene.is-on .panel {
  display: none;
}
body.stage-focus .scene.is-on .scene-frame {
  grid-template-columns: 1fr;
}
.mini-btn {
  border: 1px solid var(--line);
  background: rgba(7, 13, 20, 0.62);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 36px;
  letter-spacing: 0.02em;
}
.mini-btn:hover:not(:disabled) {
  background: rgba(243, 234, 215, 0.1);
}
.mini-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stage-view > .info-float { display: none; }
.info-float {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 6;
  width: min(320px, 86%);
  background: rgba(7, 13, 20, 0.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s var(--ease);
}
.info-float.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.info-float[hidden],
.anatomy-tip[hidden] {
  display: none !important;
}
.info-float h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
}
.info-float p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.info-fn {
  margin: 0.7rem 0 0;
  color: var(--cream);
  font-size: 0.86rem;
  line-height: 1.45;
}
.info-fn strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.info-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
}
.anatomy-info {
  pointer-events: auto;
}
.anatomy-tip {
  position: absolute;
  z-index: 8;
  transform: translate(-50%, -110%);
  max-width: 220px;
  background: rgba(7, 13, 20, 0.9);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  pointer-events: none;
  text-align: center;
}
.anatomy-tip b {
  display: block;
}
.anatomy-tip span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}
.cinema {
  position: absolute;
  left: 0.9rem;
  top: 4.2rem;
  bottom: auto;
  z-index: 9;
  width: min(380px, calc(100% - 1.8rem));
  background: rgba(7, 13, 20, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.95rem 1rem 0.85rem;
  pointer-events: none;
}
.cinema[hidden] {
  display: none !important;
}
.cinema.is-on {
  pointer-events: auto;
}
.cinema-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.cinema-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.15;
}
.cinema-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.cinema-callouts {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}
.cinema-callouts span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(227, 180, 65, 0.4);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
#cinema-skip {
  margin-top: 0.8rem;
  min-width: 0;
  height: 36px;
  font-size: 0.78rem;
}
.lab-badge {
  background: rgba(7, 13, 20, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.55rem 0.8rem;
  max-width: 240px;
}
.lab-badge .kicker { margin: 0; }
.lab-badge p:last-child {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0.85rem 0;
}
.story-grid article {
  background: rgba(243, 234, 215, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.5rem 0.6rem;
}
.story-grid b {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.15rem;
}
.story-grid span {
  color: var(--cream);
  font-size: 0.82rem;
  line-height: 1.35;
}
.move-chain {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  margin: 0.9rem 0 1rem;
}
.move-chain li {
  opacity: 0.28;
  background: rgba(243, 234, 215, 0.06);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.move-chain.is-play li {
  animation: chainIn 0.55s var(--ease) forwards;
}
.move-chain.is-play li:nth-child(1) { animation-delay: 0.05s; }
.move-chain.is-play li:nth-child(2) { animation-delay: 0.28s; }
.move-chain.is-play li:nth-child(3) { animation-delay: 0.5s; }
.move-chain.is-play li:nth-child(4) { animation-delay: 0.72s; }
.move-chain.is-play li:nth-child(5) { animation-delay: 0.94s; }
@keyframes chainIn {
  from { opacity: 0.28; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.recap-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0 0.8rem;
}
.recap-formula i {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}
.recap-formula strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--cream);
}
.recap-formula span,
.recap-formula strong,
.recap-formula i {
  opacity: 0.25;
}
.recap-formula.is-play span,
.recap-formula.is-play strong,
.recap-formula.is-play i {
  animation: chainIn 0.5s var(--ease) forwards;
}
.recap-formula.is-play span:nth-of-type(1) { animation-delay: 0.05s; }
.recap-formula.is-play i:nth-of-type(1) { animation-delay: 0.2s; }
.recap-formula.is-play span:nth-of-type(2) { animation-delay: 0.35s; }
.recap-formula.is-play i:nth-of-type(2) { animation-delay: 0.5s; }
.recap-formula.is-play span:nth-of-type(3) { animation-delay: 0.65s; }
.recap-formula.is-play i:nth-of-type(3) { animation-delay: 0.8s; }
.recap-formula.is-play span:nth-of-type(4) { animation-delay: 0.95s; }
.recap-formula.is-play i:nth-of-type(4) { animation-delay: 1.1s; }
.recap-formula.is-play strong { animation-delay: 1.25s; }
.recap-cheer {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.8rem;
  color: var(--gold);
}
.quiz-gate {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.quiz-gate-lead {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.info-act {
  margin-top: 0.8rem;
  min-width: 0;
  height: 38px;
  font-size: 0.78rem;
}
.info-act[hidden] {
  display: none !important;
}
.anatomy-boot {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-content: center;
  gap: 0.8rem;
  background: linear-gradient(180deg, rgba(12, 24, 36, 0.55), rgba(12, 24, 36, 0.82));
  text-align: center;
  padding: 1.2rem;
}
.anatomy-boot[hidden] {
  display: none !important;
}
.anatomy-boot p {
  margin: 0;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--cream);
}
.anatomy-boot .bar {
  width: min(240px, 70%);
  margin: 0 auto;
}
.anatomy-debug {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 9;
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(7, 13, 20, 0.7);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  pointer-events: none;
}
#anatomy-canvas.is-ready {
  animation: anatomyIn 0.7s var(--ease);
}
@keyframes anatomyIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hot-label {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -120%);
  border: 0;
  background: rgba(7, 13, 20, 0.8);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.hot-label.is-on { opacity: 1; }

/* Hook */
.hero {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  align-content: center;
  text-align: left;
}
.hero .display {
  font-size: clamp(2.4rem, 7vw, 6.2rem);
  max-width: 14ch;
}
.q-list {
  display: grid;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
}
.q-item {
  font-size: 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(243, 234, 215, 0.05);
  border: 1px solid var(--line);
}
.cta-row {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

/* Steps / comparison */
.flow {
  display: grid;
  gap: 0.55rem;
}
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.7rem;
  align-items: center;
  background: rgba(243, 234, 215, 0.04);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
}
.step b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--muscle);
  font-size: 0.8rem;
}
.step.relax b { background: var(--cartilage); color: var(--ink); }
.split-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.card {
  background: rgba(243, 234, 215, 0.05);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.card.a { border-color: rgba(60, 190, 168, 0.35); }
.card.b { border-color: rgba(227, 180, 65, 0.35); }

.list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--cream);
}
.list li { margin: 0.25rem 0; }

/* Arm lab */
.lab-controls {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}
.slider-wrap label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--muscle);
}
.status-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.pill {
  border-radius: 14px;
  padding: 0.7rem;
  border: 1px solid var(--line);
}
.pill strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.pill.hard { background: rgba(210, 75, 75, 0.18); }
.pill.soft { background: rgba(60, 190, 168, 0.14); }

/* Joint type buttons */
.joint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.joint-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(243, 234, 215, 0.04);
  color: var(--cream);
  border-radius: 14px;
  padding: 0.65rem 0.7rem;
}
.joint-btn small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}
.joint-btn.is-on {
  border-color: var(--gold);
  background: rgba(227, 180, 65, 0.12);
}

/* Cartilage compare */
.toggle-row {
  display: flex;
  gap: 0.4rem;
  margin: 0.8rem 0;
}
.toggle-row button.is-on {
  background: var(--cream);
  color: var(--ink);
}

/* Quiz */
.quiz-wrap {
  max-width: 860px;
  margin: 0 auto;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 1rem;
}
.choices {
  display: grid;
  gap: 0.55rem;
}
.choice {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(243, 234, 215, 0.05);
  color: var(--cream);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
}
.choice.is-right { border-color: var(--ok); background: rgba(74, 222, 128, 0.12); }
.choice.is-wrong { border-color: var(--bad); background: rgba(251, 113, 133, 0.12); }
.choice:disabled { cursor: default; }
.quiz-feedback {
  min-height: 3rem;
  color: var(--muted);
}
.score-ring {
  width: 160px;
  height: 160px;
  margin: 0.4rem auto 1rem;
  position: relative;
}
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
}

/* Recap */
.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}
.glossary article {
  background: rgba(243, 234, 215, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
}
.glossary h3 {
  margin: 0 0 0.3rem;
  color: var(--gold);
  font-size: 1rem;
}
.glossary p { margin: 0; color: var(--muted); }

/* Help / source modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(7, 13, 20, 0.72);
  display: none;
  place-items: center;
  padding: 1.5rem;
}
.modal.is-on {
  display: grid;
}
.modal[hidden] {
  display: none !important;
}
.info-body strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.modal-card {
  width: min(720px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #132333;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.4rem;
}
.modal-card h2 {
  font-family: var(--font-display);
  margin: 0 0 0.8rem;
}
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  padding: 0 0.35rem;
  height: 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(243, 234, 215, 0.08);
  font-size: 0.75rem;
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}
.source-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* Video chrome */
.vid-chrome {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 6;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  background: rgba(7, 13, 20, 0.7);
  border-radius: 14px;
  padding: 0.45rem 0.6rem;
}
.caption {
  font-size: 0.85rem;
  color: var(--cream);
}
.vid-progress {
  height: 4px;
  background: rgba(243, 234, 215, 0.15);
  border-radius: 99px;
  overflow: hidden;
}
.vid-progress > span {
  display: block;
  height: 100%;
  background: var(--gold);
  width: 0;
}

.live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

:fullscreen .hud,
:-webkit-full-screen .hud {
  background: linear-gradient(to bottom, rgba(7, 13, 20, 0.55), transparent);
}
:fullscreen .rail,
:-webkit-full-screen .rail {
  background: linear-gradient(to top, rgba(7, 13, 20, 0.72), transparent);
}
:fullscreen .scene,
:-webkit-full-screen .scene {
  inset: calc(var(--hud-h) - 8px) 1.1rem calc(var(--rail-h) - 6px);
}

@media (max-width: 1366px) {
  .journey button {
    font-size: 0.58rem;
    padding: 0.14rem 0.36rem;
  }
}

@media (max-width: 980px) {
  :root { --rail-h: 118px; }
  .scene-frame {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 42%) minmax(220px, 1fr);
    overflow: hidden;
  }
  .scene.stack .scene-frame,
  .scene.solo .scene-frame {
    grid-template-rows: auto 1fr;
  }
  .display { font-size: clamp(1.5rem, 6vw, 2.4rem); }
  .split-compare, .joint-grid, .status-pills, .story-grid { grid-template-columns: 1fr; }
  .rail {
    grid-template-columns: 1fr 1fr;
    height: auto;
    min-height: var(--rail-h);
    padding: 0.35rem 0.7rem 0.55rem;
    gap: 0.45rem;
  }
  .rail-center {
    grid-column: 1 / -1;
    order: -1;
  }
  .dots { display: none; }
  .progress-meta { display: none; }
  .nav-btn { width: 100%; min-width: 0; }
  .hud { padding: 0 0.7rem; }
  .scene { inset: var(--hud-h) 0.6rem var(--rail-h); }
  .panel {
    border-radius: 20px;
    padding: 1rem;
    overflow: auto;
    min-height: 0;
  }
  .overlay-ui.top-left { max-width: 46%; }
  .overlay-ui.top-right {
    top: auto;
    bottom: 3.4rem;
    left: 0.5rem;
    right: 0.5rem;
    justify-content: center;
  }
  .lab-badge { display: none; }
  .pip-film {
    width: 48% !important;
    height: 22% !important;
    bottom: 3.8rem;
  }
}
@media (max-width: 640px) {
  .brand small { display: none; }
  .hero .display { font-size: 2.2rem; }
  .brand h1 { font-size: 0.68rem; }
  .icon-btn { width: 36px; height: 36px; }
  .overlay-ui.bottom-left { max-width: calc(100% - 1rem); }
}

@media (prefers-reduced-motion: reduce) {
  .scene {
    transform: none;
    transition: opacity 0.2s;
  }
}
