:root {
  --paper: #f7f8fc;
  --paper-warm: #fffaf2;
  --surface: #ffffff;
  --surface-soft: #f0f2f8;
  --ink: #1d2433;
  --ink-soft: #5e687b;
  --line: #d8deea;
  --line-strong: #b7c0d2;
  --navy: #17213f;
  --space: #101731;
  --space-soft: #1c2850;
  --violet: #6d54d8;
  --violet-dark: #4e39a7;
  --violet-pale: #ece8ff;
  --cyan: #58d4e8;
  --cyan-pale: #def8fb;
  --coral: #ff7a74;
  --coral-pale: #ffe7e4;
  --gold: #f5bc56;
  --gold-pale: #fff2d6;
  --green: #2fa77b;
  --green-pale: #def5ec;
  --shadow-1: 0 2px 8px rgba(24, 32, 56, .08);
  --shadow-2: 0 12px 32px rgba(24, 32, 56, .13);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --header-h: 64px;
  --footer-h: 64px;
  font-family: "Noto Sans KR", Pretendard, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
}

body {
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.presentation-shell {
  display: grid;
  grid-template-rows: var(--header-h) 4px minmax(0, 1fr) var(--footer-h);
  width: 100%;
  height: 100dvh;
  min-height: 520px;
  background:
    radial-gradient(circle at 12% 6%, rgba(109, 84, 216, .06), transparent 22rem),
    radial-gradient(circle at 94% 90%, rgba(88, 212, 232, .08), transparent 26rem),
    var(--paper);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 clamp(20px, 4vw, 64px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(216, 222, 234, .75);
  backdrop-filter: blur(14px);
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand svg {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 1.8;
}

.brand span {
  display: grid;
  line-height: 1.15;
}

.brand strong {
  font-size: 15px;
  font-weight: 800;
}

.brand small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: .05em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.tool-button:hover {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}

.tool-button > span:first-child {
  font-size: 17px;
  line-height: 1;
}

.progress-track {
  position: relative;
  z-index: 18;
  background: #e7eaf2;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width .35s ease;
}

.deck {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: clamp(20px, 3.5vh, 40px) clamp(28px, 6vw, 88px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.slide.is-active {
  display: flex;
  animation: slide-in .34s ease both;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide > * {
  width: min(100%, 1200px);
  margin-right: auto;
  margin-left: auto;
}

.slide-heading {
  margin-bottom: clamp(20px, 3vh, 32px);
  text-align: center;
}

.slide-heading.compact {
  margin-bottom: clamp(14px, 2vh, 22px);
}

.scene-tag {
  margin: 0 0 8px;
  color: var(--violet);
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 800;
  letter-spacing: .08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -.035em;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.12;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 3.5vw, 48px);
  line-height: 1.18;
}

h3 {
  margin-bottom: 8px;
  font-size: clamp(17px, 1.8vw, 22px);
}

.slide-heading > p:last-child {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.45vw, 18px);
}

.lead {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.6;
}

.primary-action,
.secondary-action,
.quiet-action,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  color: #fff;
  background: var(--violet);
  border: 1px solid var(--violet);
  box-shadow: 0 3px 0 var(--violet-dark);
}

.primary-action:hover {
  background: #6048c7;
  transform: translateY(-1px);
}

.primary-action:active {
  box-shadow: none;
  transform: translateY(2px);
}

.secondary-action {
  color: var(--violet-dark);
  background: #fff;
  border: 1px solid #afa1ee;
}

.secondary-action:hover {
  background: var(--violet-pale);
}

.quiet-action {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
}

.quiet-action:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.deck-controls {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(20px, 4vw, 64px);
  background: rgba(255, 255, 255, .94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-button {
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.nav-button:hover {
  background: var(--surface-soft);
}

.nav-button.primary {
  justify-self: end;
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.nav-button:disabled {
  opacity: .35;
  cursor: default;
}

.slide-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.slide-status strong {
  max-width: 28ch;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-status b {
  color: var(--violet);
}

.canvas-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.canvas-card canvas,
.order-grid canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.space-card,
.deep-space-card {
  background:
    radial-gradient(circle at 25% 25%, rgba(88, 212, 232, .12), transparent 18rem),
    radial-gradient(circle at 76% 74%, rgba(109, 84, 216, .17), transparent 22rem),
    var(--space);
  border-color: #293760;
}

.deep-space-card {
  background:
    radial-gradient(circle at 24% 28%, rgba(88, 212, 232, .12), transparent 17rem),
    radial-gradient(circle at 76% 66%, rgba(255, 122, 116, .1), transparent 21rem),
    #0b1229;
}

.grid-card {
  background:
    linear-gradient(rgba(102, 116, 146, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 116, 146, .08) 1px, transparent 1px),
    #fff;
  background-size: 24px 24px;
}

.canvas-note {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 5px 9px;
  color: #dce5ff;
  background: rgba(11, 18, 41, .74);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.grid-card .canvas-note {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .9);
  border-color: var(--line);
}

.status-message {
  margin: 0;
  padding: 12px 14px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.status-message.is-success {
  color: #176c53;
  background: #e8f7f1;
  border-color: #78cbb0;
  font-weight: 800;
}

.micro-answer {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--violet-dark);
  font-weight: 700;
}

.basis-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin: 16px 0;
  padding: 11px 13px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
}

.basis-example b {
  color: var(--violet-dark);
}

.wide-thought {
  margin: 18px auto 0;
  padding: 13px 18px;
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
}

/* 01 */
.hero-slide {
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 48%, rgba(88, 212, 232, .13), transparent 23rem),
    linear-gradient(135deg, #0f1731 0%, #17213f 54%, #2a2254 100%);
  color: #fff;
}

.hero-slide::before,
.hero-slide::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-slide::before {
  width: 420px;
  height: 420px;
  top: -220px;
  left: -130px;
}

.hero-slide::after {
  width: 620px;
  height: 620px;
  right: -330px;
  bottom: -410px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1180px;
}

.hero-copy .scene-tag {
  color: #91e6f3;
}

.hero-copy .lead {
  max-width: 600px;
  margin-bottom: 28px;
  color: #d7def3;
}

.hero-orbit {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(-100px, 2vw, 20px);
  width: min(54vw, 690px);
  transform: translateY(-50%);
  opacity: .82;
}

.hero-orbit svg {
  width: 100%;
  overflow: visible;
  fill: var(--gold);
  stroke: rgba(139, 225, 242, .48);
  stroke-width: 2;
}

.hero-orbit ellipse {
  fill: none;
  stroke: rgba(255, 255, 255, .1);
}

.hero-orbit path {
  fill: none;
  stroke: rgba(139, 225, 242, .56);
}

/* 02 */
.lab-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.lab-slide.is-active {
  display: flex;
}

.mission-layout,
.explorer-layout,
.sequence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr);
  gap: clamp(20px, 3vw, 36px);
  min-height: 0;
}

.mission-layout {
  height: min(430px, calc(100vh - 220px));
  min-height: 320px;
}

.mission-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  padding: 8px 12px;
  color: #fff;
  background: rgba(11, 18, 41, .78);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  text-align: center;
}

.mission-badge span {
  color: #bdc8e7;
  font-size: 10px;
  font-weight: 700;
}

.mission-badge strong {
  font-size: 20px;
}

.mission-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.mission-question {
  margin-bottom: 0;
  font-size: 21px;
  font-weight: 800;
}

.operation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.operation-grid button {
  display: grid;
  place-items: center;
  min-height: 82px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  font-weight: 800;
  cursor: pointer;
}

.operation-grid button:hover {
  border-color: var(--violet);
  background: var(--violet-pale);
}

.operation-grid button span {
  color: var(--violet);
  font-size: 25px;
  line-height: 1;
}

.console-row {
  display: flex;
  gap: 10px;
}

.console-row > * {
  flex: 1;
}

/* 03, 07, 08, 12, 18 */
.split-slide {
  gap: clamp(24px, 5vw, 72px);
}

.split-slide > .slide-copy,
.split-slide > .canvas-card {
  width: auto;
  margin: 0;
}

.split-slide {
  display: none;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  max-width: none;
}

.split-slide.is-active {
  display: grid;
}

.split-slide .slide-copy {
  align-self: center;
}

.split-slide .canvas-card {
  height: min(430px, calc(100vh - 190px));
  min-height: 330px;
}

.sequence-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0;
}

.sequence-strip span {
  padding: 8px 11px;
  color: var(--violet-dark);
  background: var(--violet-pale);
  border: 1px solid #d4ccfa;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
}

.sequence-strip i {
  color: var(--line-strong);
  font-style: normal;
}

/* 04 */
.prediction-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.prediction-slide.is-active {
  display: flex;
}

.prediction-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
  gap: 32px;
  height: min(410px, calc(100vh - 250px));
  min-height: 310px;
}

.prediction-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.candidate-list {
  display: grid;
  gap: 10px;
}

.candidate-list button {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 64px;
  padding: 9px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
}

.candidate-list button:hover,
.candidate-list button.is-correct {
  border-color: var(--violet);
  background: var(--violet-pale);
}

.candidate-list strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--violet);
  border-radius: 50%;
}

.candidate-list span {
  font-weight: 700;
}

/* 05 */
.explorer-layout {
  height: min(420px, calc(100vh - 235px));
  min-height: 320px;
}

.explorer-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.tab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

#transformCanvas,
#arrowToyCanvas {
  cursor: grab;
}

#transformCanvas.is-dragging,
#arrowToyCanvas.is-dragging {
  cursor: grabbing;
}

.tab-grid button,
.invariant-tabs button,
.arrow-presets button,
.origin-buttons button,
.rule-card-tabs button {
  min-height: 46px;
  padding: 8px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.tab-grid button:hover,
.tab-grid button.is-selected,
.invariant-tabs button:hover,
.invariant-tabs button.is-selected,
.arrow-presets button:hover,
.arrow-presets button.is-selected,
.origin-buttons button:hover,
.origin-buttons button.is-selected,
.rule-card-tabs button:hover,
.rule-card-tabs button.is-selected {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: #b9aaef;
}

.spoken-rule {
  padding: 18px;
  background: var(--surface-soft);
  border-radius: 14px;
}

.spoken-rule span,
.machine-result > span,
.plain-rule > span,
.command-card > span,
.bridge-answer > span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}

.spoken-rule strong {
  display: block;
  margin-bottom: 6px;
  font-size: 21px;
}

.spoken-rule p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* 06 */
.invariant-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.invariant-slide.is-active {
  display: flex;
}

.invariant-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}

.invariant-tabs {
  display: grid;
  gap: 10px;
}

.property-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.property-board article {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 18px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-1);
}

.property-board span {
  color: var(--ink-soft);
  font-size: 14px;
}

.property-board strong {
  color: var(--green);
  font-size: 21px;
}

.property-board strong.is-changed {
  color: var(--coral);
}

/* 07 */
.choice-row {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.choice-row button {
  flex: 1;
  min-height: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.choice-row button:hover,
.choice-row button.is-selected {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: var(--violet);
}

/* 08 */
.address-readout {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin: 24px 0;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}

.address-readout span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 10px;
}

.address-readout small {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.address-readout strong {
  color: var(--violet);
  font-size: 30px;
}

.address-readout i {
  color: var(--line-strong);
  font-style: normal;
  font-size: 28px;
}

/* 09 */
.decoder-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.decoder-slide.is-active {
  display: flex;
}

.decoder-stage {
  max-width: 900px;
  margin: 0 auto;
}

.before-after-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  background: var(--space);
  border-radius: 18px;
  box-shadow: var(--shadow-2);
}

.before-after-card b {
  color: var(--cyan);
  font-size: 26px;
}

.address-chip {
  padding: 13px 18px;
  color: #dce5ff;
  background: var(--space-soft);
  border: 1px solid #35466f;
  border-radius: 12px;
  font-weight: 800;
}

.address-chip.accent {
  color: #fff3cf;
  border-color: var(--gold);
}

.rule-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.rule-options button {
  min-height: 82px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.rule-options button:hover,
.rule-options button.is-correct {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: var(--violet);
}

/* 10 */
.body-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.body-slide.is-active {
  display: flex;
}

.body-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: 32px;
  min-height: 330px;
}

.body-board {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    linear-gradient(rgba(88, 101, 132, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 101, 132, .1) 1px, transparent 1px),
    #fff;
  background-size: 54px 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.floor-axis {
  position: absolute;
  background: #7f899d;
}

.floor-axis.x {
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
}

.floor-axis.y {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
}

.person {
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  background: var(--violet);
  border: 4px solid #fff;
  border-radius: 50% 50% 46% 46%;
  box-shadow: 0 5px 0 rgba(78, 57, 167, .25);
  font-style: normal;
  font-weight: 800;
  transition: .35s ease;
}

.person::before {
  position: absolute;
  top: -17px;
  width: 22px;
  height: 22px;
  content: "";
  background: var(--gold);
  border: 3px solid #fff;
  border-radius: 50%;
}

.person.p1 { left: 24%; top: 22%; }
.person.p2 { left: 66%; top: 24%; background: var(--coral); }
.person.p3 { left: 31%; top: 68%; background: var(--green); }
.person.p4 { left: 71%; top: 63%; background: #397ac9; }

.body-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.command-card {
  padding: 22px;
  background: var(--gold-pale);
  border: 2px dashed #e7ae44;
  border-radius: 18px;
}

.command-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.command-card p,
.body-console > p {
  margin: 0;
  color: var(--ink-soft);
}

/* 11 */
.machine-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.machine-slide.is-active {
  display: flex;
}

.rule-machine {
  display: grid;
  grid-template-columns: minmax(190px, .65fr) 40px minmax(290px, 1fr) 40px minmax(210px, .7fr);
  align-items: center;
  gap: 14px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.number-steppers {
  display: grid;
  gap: 12px;
}

.number-steppers label {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.number-steppers label > span {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.number-steppers button {
  min-height: 46px;
  background: #fff;
  border: 0;
  font-size: 21px;
  cursor: pointer;
}

.number-steppers output {
  color: var(--violet);
  text-align: center;
  font-size: 24px;
  font-weight: 800;
}

.machine-arrow {
  color: var(--line-strong);
  text-align: center;
  font-size: 30px;
}

.plain-rule {
  padding: 20px;
  background: var(--violet-pale);
  border: 1px solid #d2c9f8;
  border-radius: 16px;
}

.plain-rule > strong {
  display: block;
  margin-bottom: 14px;
  color: var(--violet-dark);
  font-size: 20px;
}

.rule-card-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.rule-card-tabs button {
  min-height: 38px;
  font-size: 12px;
}

.machine-result {
  padding: 20px;
  background: var(--cyan-pale);
  border: 1px solid #b5e9f0;
  border-radius: 16px;
}

.machine-result > strong {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #15778a;
  font-size: 32px;
}

.machine-result i {
  color: #83cbd7;
  font-style: normal;
}

.machine-result p {
  margin: 0;
  color: #3d6870;
  font-size: 13px;
}

/* 12 */
.arrow-presets,
.origin-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.basis-slide {
  gap: clamp(24px, 3.5vw, 48px);
}

.basis-slide h2 {
  font-size: clamp(30px, 3.2vw, 42px);
}

.basis-slide .lead {
  font-size: clamp(16px, 1.6vw, 19px);
}

.basis-slide .basis-example {
  margin: 11px 0;
}

.basis-slide .arrow-presets {
  margin-top: 10px;
}

.basis-slide .arrow-presets button {
  min-height: 42px;
}

.basis-slide .micro-answer {
  margin-top: 9px;
}

/* 13 */
.probe-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.probe-slide.is-active {
  display: flex;
}

.probe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 30px;
  height: min(390px, calc(100vh - 260px));
  min-height: 310px;
}

.probe-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.probe-clue {
  padding: 16px;
  background: var(--surface-soft);
  border-radius: 14px;
}

.probe-clue p {
  margin: 0;
  font-weight: 700;
}

.probe-clue p + p {
  margin-top: 8px;
}

.red-dot,
.blue-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  background: var(--coral);
  border-radius: 50%;
}

.blue-dot {
  background: var(--cyan);
}

.choice-column {
  display: grid;
  gap: 8px;
}

.choice-column button {
  min-height: 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.choice-column button:hover,
.choice-column button.is-correct {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: var(--violet);
}

/* 14 */
.cancel-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.cancel-slide.is-active {
  display: flex;
}

.cancel-layout {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
}

.cancel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.cancel-stage > b {
  color: var(--line-strong);
  font-size: 30px;
}

.move-card {
  display: grid;
  place-items: center;
  min-width: 190px;
  min-height: 100px;
  padding: 16px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 800;
}

.move-card.fixed {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border: 2px solid #c6baf4;
}

.move-card.mystery {
  color: #927022;
  background: var(--gold-pale);
  border: 2px dashed #e2ab43;
  font-size: 36px;
}

.move-card.home {
  color: var(--green);
  background: var(--green-pale);
  border: 2px solid #a4ddc8;
}

.cancel-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.cancel-options button {
  min-height: 58px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cancel-options button:hover,
.cancel-options button.is-correct {
  color: var(--green);
  background: var(--green-pale);
  border-color: var(--green);
}

.cancel-layout .quiet-action {
  margin-top: 12px;
}

/* 15 */
.order-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.order-slide.is-active {
  display: flex;
}

.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-height: 260px;
}

.order-grid article {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  min-height: 270px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow-1);
}

.order-grid h3 {
  margin: 0;
  padding: 12px;
  background: var(--surface-soft);
}

.order-grid h3 i {
  color: var(--violet);
  font-style: normal;
}

.order-grid strong {
  padding: 10px;
  color: var(--violet-dark);
}

.center-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}

.center-actions p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* 16 */
.sequence-layout {
  height: min(390px, calc(100vh - 235px));
  min-height: 320px;
}

.sequence-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}

.sequence-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sequence-slots span {
  display: grid;
  place-items: center;
  min-height: 62px;
  padding: 8px;
  color: var(--line-strong);
  background: #fff;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.sequence-slots span.is-filled {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-style: solid;
  border-color: #b8a9ef;
}

.sequence-bank {
  display: grid;
  gap: 8px;
}

.sequence-bank button {
  min-height: 45px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.sequence-bank button:hover {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: var(--violet);
}

/* 17 */
.odd-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.odd-slide.is-active {
  display: flex;
}

.odd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 26px;
  height: min(340px, calc(100vh - 270px));
  min-height: 280px;
}

.odd-options {
  display: grid;
  align-content: center;
  gap: 10px;
}

.odd-options button {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.odd-options strong {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--violet);
  border-radius: 50%;
}

.odd-options button:hover,
.odd-options button.is-correct {
  color: #9a413c;
  background: var(--coral-pale);
  border-color: var(--coral);
}

/* 19 */
.name-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.name-slide.is-active {
  display: flex;
}

.name-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
}

.name-cards article {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 180px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-1);
}

.name-copy {
  min-width: 0;
}

.name-copy h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.name-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.name-copy small {
  display: block;
  margin-top: 9px;
  color: var(--violet-dark);
  font-size: 12px;
  font-weight: 800;
}

.name-cards button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--violet-dark);
  background: var(--violet-pale);
  border: 1px solid #c9bef4;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.name-cards > article > strong {
  grid-column: 1 / -1;
  min-height: 40px;
  color: var(--violet);
  text-align: center;
  font-size: 26px;
}

.name-visual {
  position: relative;
  width: 110px;
  height: 90px;
  background:
    linear-gradient(rgba(109, 84, 216, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 84, 216, .12) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.name-visual::before,
.name-visual::after {
  position: absolute;
  content: "";
  background: var(--line-strong);
}

.name-visual::before {
  top: 50%;
  right: 6px;
  left: 6px;
  height: 1px;
}

.name-visual::after {
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 1px;
}

.name-visual i {
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  background: var(--coral);
  border-radius: 50%;
}

.name-visual i:nth-child(1) { left: 25px; top: 22px; }
.name-visual i:nth-child(2) { left: 69px; top: 22px; }
.name-visual i:nth-child(3) { left: 47px; top: 61px; }
.affine-visual i { transform: translateX(16px); }

.name-note {
  max-width: 900px;
  margin: 18px auto 0;
  color: var(--ink-soft);
  text-align: center;
}

/* 20 */
.lift-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.lift-slide.is-active {
  display: flex;
}

.lift-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr);
  gap: 28px;
  height: min(350px, calc(100vh - 285px));
  min-height: 290px;
}

.lift-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.lift-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lift-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 7px 12px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
}

.lift-steps li span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-radius: 50%;
}

.lift-steps li.is-active {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: #b7a8ee;
}

.lift-steps li.is-active span {
  color: #fff;
  background: var(--violet);
}

.lift-caption {
  margin: 14px auto 0;
  color: var(--ink-soft);
  text-align: center;
  font-size: 14px;
}

.lift-caption span {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

/* 21 */
.wonder-slide {
  display: none;
  grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
  gap: 50px;
  color: #fff;
  background: linear-gradient(135deg, #101731, #1b2449 60%, #302355);
}

.wonder-slide.is-active {
  display: grid;
}

.wonder-copy,
.wonder-canvas {
  width: auto;
  margin: 0;
}

.wonder-copy {
  align-self: center;
}

.wonder-copy .scene-tag {
  color: var(--cyan);
}

.wonder-copy p {
  color: #cbd4ec;
  font-size: 19px;
}

.wonder-copy strong {
  display: block;
  margin-top: 22px;
  color: #fff2cf;
  font-size: 18px;
  line-height: 1.55;
}

.wonder-canvas {
  height: min(430px, calc(100vh - 190px));
  min-height: 330px;
}

/* 22 */
.physics-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.physics-slide.is-active {
  display: flex;
}

.physics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, .6fr);
  gap: 28px;
  height: min(335px, calc(100vh - 305px));
  min-height: 285px;
}

.physics-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.physics-console label {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}

.physics-console output {
  color: var(--violet);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--violet);
}

.symmetry-reveal {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 5px 10px;
  padding: 14px;
  background: var(--surface-soft);
  border-radius: 12px;
  font-size: 13px;
}

.symmetry-reveal span {
  color: var(--ink-soft);
  font-weight: 700;
}

.symmetry-reveal strong {
  color: var(--green);
}

.physics-note,
.vision-note,
.language-note {
  margin: 14px auto 0;
  color: var(--ink-soft);
  text-align: center;
  font-size: 14px;
}

.motion-slide,
.llm-transform-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.motion-slide.is-active,
.llm-transform-slide.is-active {
  display: flex;
}

.motion-layout,
.llm-transform-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(290px, .58fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 28px;
  height: min(340px, calc(100vh - 300px));
  min-height: 290px;
}

.motion-console,
.llm-transform-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}

.motion-console {
  gap: 8px;
}

.motion-steps {
  gap: 6px;
}

.motion-steps li {
  min-height: 50px;
  padding: 6px 10px;
}

.motion-steps small {
  font-size: 10.5px;
}

.motion-comparison {
  display: grid;
  gap: 8px;
}

.motion-comparison article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.motion-comparison span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.motion-comparison strong {
  color: var(--violet-dark);
}

.model-caution {
  color: var(--ink-soft);
  text-align: center;
  font-size: 11px;
}

.llm-layer-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.llm-layer-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 12px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.llm-layer-steps li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--surface-soft);
  border-radius: 50%;
  font-weight: 800;
}

.llm-layer-steps b,
.llm-layer-steps small {
  display: block;
}

.llm-layer-steps b {
  color: var(--ink);
  font-size: 13px;
}

.llm-layer-steps small {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
}

.llm-layer-steps li.is-active {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: #b7a8ee;
}

.llm-layer-steps li.is-active > span {
  color: #fff;
  background: var(--violet);
}

.llm-transform-note {
  margin: 14px auto 0;
  color: var(--ink-soft);
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
}

.llm-stage-readout {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.llm-stage-readout > span {
  flex: 0 0 auto;
  color: var(--violet-dark);
  font-size: 15px;
  font-weight: 800;
}

.llm-stage-readout > p {
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.4;
}

/* 22–23 */
.studio-rig-slide,
.studio-camera-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.studio-rig-slide.is-active,
.studio-camera-slide.is-active {
  display: flex;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, .52fr);
  gap: 28px;
  height: min(380px, calc(100dvh - 300px));
  min-height: 330px;
}

.studio-canvas-card {
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(109, 84, 216, .18), transparent 24rem),
    linear-gradient(145deg, #111a38, #0c132b);
}

.studio-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.studio-stage-readout,
.studio-note {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.studio-stage-readout {
  display: grid;
  gap: 5px;
}

.studio-stage-readout span {
  color: var(--violet-dark);
  font-size: 15px;
  font-weight: 800;
}

.studio-stage-readout strong {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.rig-chain,
.camera-pipeline {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rig-chain span,
.camera-pipeline span {
  padding: 6px 8px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  transition: .25s ease;
}

.rig-chain span.is-active,
.camera-pipeline span.is-active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 4px 12px rgba(109, 84, 216, .22);
}

.rig-chain span.is-inherited {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: #b8aae9;
}

.rig-chain i,
.camera-pipeline i {
  color: var(--line-strong);
  font-style: normal;
}

.studio-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

.projection-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.projection-switch button {
  min-height: 48px;
  color: var(--violet-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-weight: 800;
  cursor: pointer;
}

.projection-switch button.is-active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
}

.camera-console .status-message {
  min-height: 58px;
  margin: 0;
  padding: 11px 13px;
}

/* 23 */
.vision-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.vision-slide.is-active {
  display: flex;
}

.vision-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 28px;
  height: min(335px, calc(100vh - 305px));
  min-height: 285px;
}

.camera-card {
  background:
    linear-gradient(135deg, rgba(109, 84, 216, .09), rgba(88, 212, 232, .1)),
    #fff;
}

.vision-console {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.vision-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.vision-controls button {
  display: grid;
  place-items: center;
  min-height: 66px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--violet);
  font-size: 23px;
  font-weight: 800;
  cursor: pointer;
}

.vision-controls button:hover {
  background: var(--violet-pale);
  border-color: var(--violet);
}

.vision-controls span {
  color: var(--ink-soft);
  font-size: 11px;
}

.feature-controls {
  display: grid;
  gap: 9px;
}

.feature-controls button {
  min-height: 52px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.feature-controls button:hover,
.feature-controls button.is-selected {
  color: var(--violet-dark);
  background: var(--violet-pale);
  border-color: var(--violet);
}

/* 24 */
.language-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.language-slide.is-active {
  display: flex;
}

.language-lab {
  max-width: 1000px;
  margin: 0 auto;
}

.sentence-pair {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: -4px;
}

.sentence-row {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: -4px;
}

.sentence-pair .sentence-row {
  min-width: 0;
  gap: 6px;
  margin-bottom: 0;
}

.sentence-pair .sentence-row span,
.sentence-pair .sentence-row button {
  padding: 10px 11px;
}

.sentence-row span,
.sentence-row button {
  min-height: 48px;
  padding: 11px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-weight: 800;
}

.sentence-row button {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  cursor: pointer;
}

.sentence-row button:hover,
.sentence-row button.is-selected {
  background: var(--coral);
  border-color: var(--coral);
}

.context-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  height: 230px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.context-lane {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-soft);
}

.body-lane {
  background:
    radial-gradient(circle at 50% 86%, rgba(255, 122, 116, .18), transparent 10rem),
    var(--surface-soft);
}

.boat-lane {
  background:
    radial-gradient(circle at 50% 86%, rgba(88, 212, 232, .19), transparent 10rem),
    var(--surface-soft);
}

.context-lane::after {
  position: absolute;
  top: 76px;
  bottom: 77px;
  left: 50%;
  width: 3px;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    var(--route-color) 0 7px,
    transparent 7px 13px
  );
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity .3s ease;
}

.body-lane { --route-color: rgba(255, 122, 116, .62); }
.boat-lane { --route-color: rgba(36, 166, 190, .62); }

.context-stage.is-mixed .context-lane::after {
  opacity: 1;
  animation: context-dash .9s linear infinite;
}

@keyframes context-dash {
  to { background-position: 0 13px; }
}

.meaning-zone {
  position: absolute;
  right: clamp(18px, 12%, 64px);
  bottom: 18px;
  left: clamp(18px, 12%, 64px);
  display: grid;
  place-items: center;
  min-width: 0;
  height: 78px;
  border: 2px dashed;
  border-radius: 18px;
}

.body-zone {
  color: #9d4842;
  background: var(--coral-pale);
  border-color: var(--coral);
}

.boat-zone {
  color: #187789;
  background: var(--cyan-pale);
  border-color: var(--cyan);
}

.meaning-zone span {
  font-size: 12px;
  font-weight: 800;
}

.moving-token {
  position: absolute;
  z-index: 3;
  top: 49px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--violet);
  border-radius: 12px;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(44, 34, 93, .18);
  transform: translateX(-50%);
  transition:
    top .65s cubic-bezier(.2, .8, .2, 1),
    background .35s ease,
    transform .65s cubic-bezier(.2, .8, .2, 1);
}

.context-stage.is-mixed .moving-token {
  top: 164px;
  transform: translate(-50%, -50%);
}

.context-stage.is-mixed .body-lane .moving-token {
  background: var(--coral);
}

.context-stage.is-mixed .boat-lane .moving-token {
  color: #083640;
  background: var(--cyan);
}

.context-hint {
  position: absolute;
  top: 13px;
  left: 50%;
  padding: 6px 9px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}

.language-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.language-actions p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* 25 */
.bridge-slide {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.bridge-slide.is-active {
  display: flex;
}

.bridge-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}

.bridge-track article {
  min-height: 180px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow-1);
}

.bridge-track > i {
  color: var(--line-strong);
  text-align: center;
  font-style: normal;
  font-size: 30px;
}

.bridge-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  color: #fff;
  background: var(--violet);
  border-radius: 16px;
  font-size: 17px;
  font-weight: 800;
}

.bridge-track article:nth-of-type(2) .bridge-icon {
  background: #ba7720;
}

.bridge-track article:nth-of-type(3) .bridge-icon {
  background: var(--green);
}

.bridge-track article:nth-of-type(4) .bridge-icon {
  background: var(--coral);
}

.bridge-track p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.bridge-answer {
  max-width: 1050px;
  margin: 18px auto 0;
  padding: 16px 22px;
  color: #fff;
  background: var(--navy);
  border-radius: 14px;
  text-align: center;
}

.bridge-answer span {
  color: #aab8dc;
}

.bridge-answer strong {
  font-size: 18px;
}

/* 26 */
.finale-slide {
  display: none;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: 60px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 76% 50%, rgba(88, 212, 232, .16), transparent 22rem),
    linear-gradient(135deg, #111a37, #2c2257);
}

.finale-slide.is-active {
  display: grid;
}

.finale-copy,
.finale-mark {
  width: auto;
  margin: 0;
}

.finale-copy {
  align-self: center;
}

.finale-copy .scene-tag {
  color: var(--cyan);
}

.finale-copy p {
  max-width: 570px;
  color: #d3dbef;
  font-size: 18px;
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.final-actions .secondary-action {
  color: #fff;
  background: transparent;
  border-color: #68779e;
}

.final-actions .secondary-action:hover {
  background: rgba(255, 255, 255, .08);
}

.finale-mark {
  align-self: center;
  text-align: center;
}

.finale-mark svg {
  width: min(34vw, 330px);
  fill: var(--gold);
  stroke: var(--cyan);
  stroke-width: 3;
}

.finale-mark svg > circle {
  fill: none;
  stroke: rgba(255, 255, 255, .15);
}

.finale-mark path {
  fill: none;
  stroke: #9fe8f2;
}

.finale-mark strong {
  display: block;
  margin-top: 12px;
  color: #fff2cf;
  font-size: 22px;
}

/* TOC */
.toc-panel {
  position: fixed;
  z-index: 200;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100dvh;
  padding: 22px;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px rgba(20, 27, 48, .18);
  transform: translateX(104%);
  transition: transform .25s ease;
}

.toc-panel.is-open {
  transform: translateX(0);
}

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.toc-head > div {
  display: grid;
}

.toc-head span {
  color: var(--ink-soft);
  font-size: 12px;
}

.toc-head strong {
  font-size: 20px;
}

.toc-head button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--surface-soft);
  border: 0;
  border-radius: 12px;
  font-size: 24px;
  cursor: pointer;
}

#tocList {
  display: grid;
  gap: 5px;
  max-height: calc(100dvh - 110px);
  overflow: auto;
}

#tocList button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 43px;
  padding: 6px 9px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

#tocList button:hover,
#tocList button.is-current {
  color: var(--violet-dark);
  background: var(--violet-pale);
}

#tocList b {
  color: var(--line-strong);
  font-size: 11px;
}

#tocList span {
  font-weight: 700;
}

.toc-backdrop {
  position: fixed;
  z-index: 190;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(10, 15, 30, .38);
  border: 0;
}

/* Responsive */
@media (max-width: 900px) {
  :root {
    --header-h: 58px;
    --footer-h: 60px;
  }

  .slide {
    padding: 22px 24px;
  }

  .topbar {
    padding: 0 18px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand small,
  .tool-button span:last-child {
    display: none;
  }

  .tool-button {
    width: 42px;
    padding: 0;
  }

  .deck-controls {
    grid-template-columns: 80px 1fr 80px;
    padding: 0 14px;
  }

  .nav-button {
    padding: 0 10px;
  }

  .nav-button span:nth-child(2):not([aria-hidden]),
  .nav-button.primary span:first-child {
    display: none;
  }

  .split-slide.is-active,
  .wonder-slide.is-active,
  .finale-slide.is-active {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
  }

  .split-slide .canvas-card,
  .wonder-canvas {
    width: 100%;
    height: 330px;
    min-height: 330px;
  }

  .mission-layout,
  .explorer-layout,
  .prediction-layout,
  .body-layout,
  .probe-layout,
  .sequence-layout,
  .odd-layout,
  .lift-layout,
  .physics-layout,
  .motion-layout,
  .llm-transform-layout,
  .vision-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .motion-slide.is-active,
  .llm-transform-slide.is-active,
  .studio-rig-slide.is-active,
  .studio-camera-slide.is-active {
    justify-content: flex-start;
  }

  .motion-slide > *,
  .llm-transform-slide > *,
  .studio-rig-slide > *,
  .studio-camera-slide > * {
    flex-shrink: 0;
  }

  .motion-console,
  .llm-transform-console,
  .studio-console {
    min-height: max-content;
  }

  .mission-layout > .canvas-card,
  .explorer-layout > .canvas-card,
  .prediction-layout > .canvas-card,
  .probe-layout > .canvas-card,
  .sequence-layout > .canvas-card,
  .odd-layout > .canvas-card,
  .lift-layout > .canvas-card,
  .physics-layout > .canvas-card,
  .motion-layout > .canvas-card,
  .llm-transform-layout > .canvas-card,
  .vision-layout > .canvas-card {
    height: 330px;
    min-height: 330px;
  }

  .studio-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
    width: 100%;
    height: auto;
    min-width: 0;
  }

  .studio-layout > .canvas-card {
    width: 100%;
    height: clamp(330px, 88vw, 390px);
    min-height: clamp(330px, 88vw, 390px);
  }

  .property-board {
    grid-template-columns: 1fr 1fr;
  }

  .rule-machine {
    grid-template-columns: 1fr;
  }

  .machine-arrow {
    transform: rotate(90deg);
  }

  .name-cards {
    grid-template-columns: 1fr;
  }

  .bridge-track {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bridge-track > i {
    transform: rotate(90deg);
  }

  .finale-mark svg {
    width: 240px;
  }
}

@media (max-width: 620px) {
  .slide {
    padding: 20px 16px;
  }

  h1 {
    font-size: 39px;
  }

  h2 {
    font-size: 29px;
  }

  .hero-orbit {
    right: -160px;
    width: 620px;
    opacity: .28;
  }

  .operation-grid,
  .tab-grid,
  .rule-card-tabs,
  .arrow-presets,
  .origin-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .rule-options,
  .cancel-options,
  .order-grid {
    grid-template-columns: 1fr;
  }

  .invariant-layout {
    grid-template-columns: 1fr;
  }

  .invariant-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .property-board article {
    min-height: 105px;
  }

  .before-after-card {
    flex-direction: column;
  }

  .before-after-card b {
    transform: rotate(90deg);
  }

  .body-board {
    min-height: 290px;
  }

  .cancel-stage {
    flex-wrap: wrap;
  }

  .move-card {
    min-width: 135px;
    min-height: 82px;
    font-size: 14px;
  }

  .name-cards article {
    grid-template-columns: 90px 1fr;
  }

  .name-cards button {
    grid-column: 1 / -1;
  }

  .name-visual {
    width: 88px;
  }

  .vision-controls {
    grid-template-columns: 1fr 1fr;
  }

  .sentence-row {
    flex-wrap: wrap;
  }

  .sentence-pair {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 6px;
  }

  .context-stage {
    height: 240px;
  }

  .meaning-zone {
    right: 9px;
    left: 9px;
    height: 74px;
  }

  .meaning-zone span {
    max-width: 9ch;
    text-align: center;
    line-height: 1.3;
  }

  .context-hint {
    max-width: calc(100% - 12px);
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
  }

  .context-stage.is-mixed .moving-token {
    top: 174px;
  }

  .language-actions {
    flex-direction: column;
  }

  .slide-status strong {
    display: none;
  }
}

@media (min-width: 901px) {
  .llm-transform-slide {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .llm-transform-slide .slide-heading.compact {
    margin-bottom: 10px;
  }

  .llm-transform-slide .slide-heading h2 {
    margin-bottom: 8px;
  }

  .llm-transform-slide .slide-heading > p:last-child {
    max-width: 920px;
  }

  .llm-transform-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 24px;
    height: clamp(360px, calc(100dvh - 320px), 410px);
    min-height: 360px;
  }

  .llm-transform-layout > .canvas-card {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .llm-transform-console {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
    min-height: 0;
  }

  .llm-transform-console .llm-stage-readout {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px;
  }

  .llm-transform-console .llm-stage-readout > span {
    font-size: 16px;
  }

  .llm-transform-console .llm-stage-readout > p {
    font-size: 14px;
  }

  .llm-transform-console > .primary-action {
    width: 100%;
    min-height: 64px;
  }

  .llm-transform-console .llm-transform-note {
    margin: 0;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: left;
    font-size: 12.5px;
    line-height: 1.55;
  }

}

@media (max-width: 900px) {
  .llm-transform-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 10px;
    width: 100%;
    height: auto;
    min-width: 0;
  }

  .llm-transform-layout > .canvas-card {
    width: 100%;
    height: clamp(310px, 84vw, 360px);
    min-width: 0;
    min-height: clamp(310px, 84vw, 360px);
  }

  .llm-transform-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
  }

  .llm-transform-console > .primary-action {
    width: 100%;
  }

  .llm-stage-readout {
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }

  .llm-stage-readout > span {
    font-size: 13px;
  }

  .llm-stage-readout > p {
    font-size: 12px;
  }

  .llm-transform-note {
    margin: 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: left;
    font-size: 12px;
    line-height: 1.45;
  }
}

@media (max-width: 620px) {
  .llm-transform-slide .slide-heading.compact {
    margin-bottom: 10px;
  }

  .llm-transform-slide .slide-heading > p:last-child {
    font-size: 14px;
  }

  .llm-stage-readout {
    display: grid;
    gap: 2px;
  }
}

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

@media print {
  body {
    overflow: visible;
  }

  .presentation-shell {
    display: block;
    height: auto;
  }

  .topbar,
  .progress-track,
  .deck-controls,
  .toc-panel,
  .toc-backdrop {
    display: none !important;
  }

  .deck {
    overflow: visible;
  }

  .slide {
    position: relative;
    display: flex !important;
    min-height: 100vh;
    break-after: page;
  }
}
