:root {
  color-scheme: light;
  --ink: #102f46;
  --ink-soft: #35566a;
  --muted: #6f8796;
  --sky-25: #f6fcff;
  --sky-50: #e9f7fd;
  --sky-100: #d6eef8;
  --blue: #147fb0;
  --blue-dark: #0b5f89;
  --orange: #f4822d;
  --orange-dark: #d85c12;
  --orange-soft: #fff0e3;
  --sand: #fff8ed;
  --green: #23825d;
  --green-soft: #e9f7f0;
  --red: #c7513e;
  --line: rgba(63, 109, 131, 0.18);
  --line-strong: rgba(63, 109, 131, 0.3);
  --shadow: 0 14px 38px rgba(44, 85, 105, 0.1);
  --topbar-height: 62px;
  --controller-height: 66px;
  --outline-width: 286px;
  --outline-collapsed: 72px;
  --coach-width: 350px;
  --coach-collapsed: 58px;
  --font-display:
    "Microsoft YaHei UI",
    "Alibaba PuHuiTi 3.0",
    "HarmonyOS Sans SC",
    "Source Han Sans SC",
    "Noto Sans CJK SC",
    "PingFang SC",
    sans-serif;
  --font-body:
    "Microsoft YaHei UI",
    "Alibaba PuHuiTi 3.0",
    "HarmonyOS Sans SC",
    "Source Han Sans SC",
    "Noto Sans CJK SC",
    "PingFang SC",
    sans-serif;
  --font-number:
    "Bahnschrift",
    "DIN Alternate",
    "Arial Narrow",
    var(--font-display);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  background: #edf8fc;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(20, 127, 176, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 9px 13px;
  color: #fff;
  background: var(--blue-dark);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-loading {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: linear-gradient(155deg, var(--sky-50), var(--sand));
}

.loading-mark,
.brand-mark,
.outline-mark,
.coach-mark {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(145deg, #ff9a42, #ef6c21);
  box-shadow: 0 7px 16px rgba(224, 100, 28, 0.2);
}

.loading-mark {
  width: 58px;
  height: 58px;
  font-size: 24px;
  border-radius: 14px;
}

.app-loading p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.course-app {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(217, 243, 255, 0.94), rgba(255, 247, 233, 0.9)),
    radial-gradient(circle at 25% 0%, #fff 0 12%, transparent 34%);
}

.topbar {
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(300px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(15px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.lesson-context {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.lesson-context span {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
}

.lesson-context strong {
  overflow: hidden;
  max-width: 320px;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lesson-context small {
  color: var(--muted);
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.runtime-status,
.user-chip,
.toolbar-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  background: var(--sky-25);
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
}

.runtime-status.is-connected {
  color: var(--green);
  background: var(--green-soft);
}

.toolbar-button {
  cursor: pointer;
}

.toolbar-button:hover {
  border-color: rgba(20, 127, 176, 0.35);
  background: var(--sky-50);
}

.toolbar-button.is-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.course-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: var(--outline-width) minmax(0, 1fr) var(--coach-width);
  transition: grid-template-columns 220ms ease;
}

.course-app.is-outline-collapsed .course-workspace {
  grid-template-columns: var(--outline-collapsed) minmax(0, 1fr) var(--coach-width);
}

.course-app.is-coach-collapsed .course-workspace {
  grid-template-columns: var(--outline-width) minmax(0, 1fr) var(--coach-collapsed);
}

.course-app.is-outline-collapsed.is-coach-collapsed .course-workspace {
  grid-template-columns: var(--outline-collapsed) minmax(0, 1fr) var(--coach-collapsed);
}

.course-outline,
.coach-panel {
  position: relative;
  z-index: 25;
  min-width: 0;
  min-height: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
}

.course-outline {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.outline-header,
.coach-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
}

.outline-title,
.coach-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.outline-mark,
.coach-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 9px;
}

.coach-mark {
  background: linear-gradient(145deg, #2192bc, #126d98);
  box-shadow: 0 7px 16px rgba(18, 109, 152, 0.18);
}

.outline-title > span:last-child,
.coach-heading > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.outline-title small,
.coach-heading small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.outline-title strong,
.coach-heading strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.panel-toggle {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.panel-toggle:hover {
  color: var(--blue-dark);
  border-color: rgba(20, 127, 176, 0.35);
}

.outline-nav {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
}

.outline-stage {
  margin-bottom: 7px;
}

.outline-stage-button {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.outline-stage-button:hover {
  background: rgba(255, 255, 255, 0.78);
}

.outline-stage-button.is-active {
  background: #fff;
  border-color: rgba(244, 130, 45, 0.32);
  box-shadow: 0 6px 18px rgba(44, 85, 105, 0.07);
}

.outline-stage-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
  background: var(--sky-50);
  border-radius: 7px;
}

.outline-stage-button.is-active .outline-stage-icon {
  color: #fff;
  background: var(--orange);
}

.outline-stage-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.outline-stage-copy strong {
  font-size: 13px;
}

.outline-stage-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.outline-chevron {
  color: var(--muted);
  font-size: 12px;
  transition: transform 160ms ease;
}

.outline-stage.is-expanded .outline-chevron {
  transform: rotate(90deg);
}

.outline-slides {
  position: relative;
  display: none;
  margin: 3px 0 8px 25px;
  padding-left: 15px;
}

.outline-slides::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 1px;
  content: "";
  background: var(--line);
}

.outline-stage.is-expanded .outline-slides {
  display: grid;
  gap: 2px;
}

.outline-slide-button {
  width: 100%;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.outline-slide-button:hover {
  background: rgba(233, 247, 253, 0.8);
}

.outline-slide-button.is-active {
  color: var(--orange-dark);
  font-weight: 900;
  background: var(--orange-soft);
}

.outline-slide-button span:first-child {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.outline-slide-button span:last-child {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.outline-result {
  margin: 0 14px 14px;
  padding: 12px;
  display: grid;
  gap: 3px;
  background: rgba(255, 248, 237, 0.9);
  border-left: 3px solid var(--orange);
}

.outline-result span,
.outline-result small {
  color: var(--muted);
  font-size: 10px;
}

.outline-result strong {
  font-size: 13px;
}

.course-app.is-outline-collapsed .outline-header {
  min-height: 108px;
  flex-direction: column;
  justify-content: center;
}

.course-app.is-outline-collapsed .outline-title > span:last-child,
.course-app.is-outline-collapsed .outline-stage-copy,
.course-app.is-outline-collapsed .outline-chevron,
.course-app.is-outline-collapsed .outline-slides,
.course-app.is-outline-collapsed .outline-result {
  display: none;
}

.course-app.is-outline-collapsed .outline-stage-button {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 8px 0;
}

.course-app.is-outline-collapsed .outline-nav {
  padding: 10px 8px;
}

.course-app.is-outline-collapsed .panel-toggle span {
  display: inline-block;
  transform: rotate(180deg);
}

.presentation-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--controller-height);
  background:
    linear-gradient(160deg, rgba(232, 248, 255, 0.7), rgba(255, 247, 234, 0.78)),
    #f5fbfd;
}

.presentation-canvas {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(18px, 2.2vw, 30px);
}

.slide-content {
  width: 100%;
  height: 100%;
}

.lesson-slide {
  width: 100%;
  height: 100%;
  display: grid;
  align-content: stretch;
  animation: slide-in 220ms ease-out;
}

.lesson-slide.slide-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.lesson-slide.slide-panel > :not(.slide-heading) {
  min-height: 0;
  height: auto;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.slide-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(22px, 3vw, 40px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.slide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: clamp(16px, 2vh, 24px);
}

.slide-heading-copy {
  min-width: 0;
}

.slide-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--orange-dark);
  font-family: var(--font-display);
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.slide-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.cover-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 4.6vw, 76px);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.slide-heading p,
.cover-copy > p {
  max-width: 800px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: clamp(20px, 1.6vw, 27px);
  line-height: 1.55;
}

.slide-number {
  flex: 0 0 auto;
  color: rgba(20, 127, 176, 0.12);
  font-family: var(--font-number);
  font-size: clamp(42px, 5vw, 78px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}

.cover-slide {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  align-items: center;
  padding: clamp(28px, 4vw, 62px);
  overflow: hidden;
  color: #fff;
  background: #06111e;
  border: 1px solid rgba(180, 217, 240, 0.24);
  box-shadow: 0 24px 70px rgba(4, 13, 25, 0.28);
}

.cover-backdrop {
  position: absolute;
  z-index: -3;
  inset: 0;
  margin: 0;
}

.cover-backdrop img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
}

.cover-atmosphere {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 9, 20, 0.82) 0%, rgba(3, 11, 23, 0.54) 43%, rgba(3, 10, 20, 0.04) 76%),
    linear-gradient(0deg, rgba(0, 5, 14, 0.54), transparent 48%),
    radial-gradient(circle at 78% 40%, transparent 0 28%, rgba(3, 10, 22, 0.08) 58%, rgba(3, 10, 22, 0.34) 100%);
}

.cover-atmosphere::before,
.cover-atmosphere::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.cover-atmosphere::before {
  inset: 22px;
  border: 1px solid rgba(210, 235, 250, 0.13);
}

.cover-atmosphere::after {
  top: 22px;
  right: 22px;
  width: 92px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(162, 222, 255, 0.72));
}

.cover-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 660px;
  padding: clamp(24px, 2.5vw, 38px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(9, 20, 36, 0.72), rgba(13, 26, 43, 0.46));
  border: 1px solid rgba(214, 235, 248, 0.2);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.11),
    0 26px 70px rgba(0, 5, 14, 0.26);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.cover-copy::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 88px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #6ee7ff, rgba(110, 231, 255, 0));
}

.cover-copy-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(20px, 2.4vh, 30px);
}

.cover-copy .cover-stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(196, 231, 250, 0.09);
  border: 1px solid rgba(196, 231, 250, 0.22);
}

.cover-series {
  color: rgba(222, 241, 252, 0.58);
  font-family: var(--font-number);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.stage-cover .cover-copy h1 {
  color: #fff;
  text-shadow: 0 5px 24px rgba(0, 0, 0, 0.26);
}

.stage-cover .cover-copy > p {
  color: rgba(235, 246, 252, 0.78);
  text-wrap: balance;
}

.cover-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.cover-facts span {
  padding: 8px 11px;
  color: rgba(242, 250, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  background: rgba(214, 238, 251, 0.08);
  border: 1px solid rgba(214, 238, 251, 0.18);
  border-radius: 3px;
}

.cover-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 4vh, 48px);
  color: rgba(227, 244, 253, 0.72);
}

.cover-caption > span {
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  background: #69dfff;
  box-shadow: 0 0 10px rgba(105, 223, 255, 0.6);
}

.cover-caption strong {
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 700;
  line-height: 1.5;
}

.cover-stage-number {
  position: absolute;
  right: clamp(32px, 4vw, 72px);
  bottom: clamp(18px, 3vh, 36px);
  z-index: 1;
  color: rgba(225, 243, 253, 0.26);
  font-family: var(--font-number);
  font-size: clamp(72px, 9vw, 150px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.08em;
  text-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
}

.history-layout,
.loop-layout,
.anatomy-layout,
.motion-layout,
.result-layout {
  min-height: 0;
  display: grid;
  gap: clamp(18px, 2.4vw, 30px);
}

.history-layout {
  height: calc(100% - 118px);
  grid-template-rows: auto minmax(0, 1fr);
}

.timeline-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.timeline-tab,
.choice-tab,
.photo-tab {
  min-height: 52px;
  padding: 8px 10px;
  color: var(--ink-soft);
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 800;
  background: var(--sky-25);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.timeline-tab:hover,
.choice-tab:hover,
.photo-tab:hover {
  border-color: rgba(20, 127, 176, 0.35);
}

.timeline-tab.is-active,
.choice-tab.is-active,
.photo-tab.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.timeline-tab {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  overflow: hidden;
  text-align: left;
  background: rgba(247, 252, 255, 0.92);
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.timeline-tab::after {
  position: absolute;
  right: 11px;
  bottom: 0;
  left: 11px;
  height: 3px;
  content: "";
  background: transparent;
}

.timeline-tab > span {
  color: rgba(11, 95, 137, 0.48);
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.timeline-tab > strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timeline-tab:hover {
  transform: translateY(-1px);
}

.timeline-tab.is-active {
  background: linear-gradient(135deg, var(--blue-dark), #147fb0);
  box-shadow: 0 8px 18px rgba(11, 95, 137, 0.18);
}

.timeline-tab.is-active::after {
  background: #ffaf68;
}

.timeline-tab.is-active > span {
  color: #ffd6b1;
}

.history-detail {
  position: relative;
  min-height: 0;
  display: block;
  isolation: isolate;
  overflow: hidden;
  background: #dceff7;
  border: 1px solid var(--line);
}

.history-detail::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(90deg, rgba(9, 37, 54, 0.12), transparent 32%, transparent 68%, rgba(9, 37, 54, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 55%, rgba(8, 31, 48, 0.12));
  pointer-events: none;
}

.history-panorama {
  --era-index: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: calc(var(--era-index) * 25%) center;
  animation: history-image-in 520ms ease-out both;
  transition: object-position 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.history-era-focus {
  --era-index: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--era-index) * 20%);
  z-index: 2;
  width: 20%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(244, 130, 45, 0.12));
  border-right: 2px solid rgba(244, 130, 45, 0.72);
  border-left: 2px solid rgba(244, 130, 45, 0.72);
  box-shadow:
    -100vw 0 0 rgba(8, 31, 48, 0.08),
    100vw 0 0 rgba(8, 31, 48, 0.08);
  pointer-events: none;
  transition: left 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.history-copy {
  position: absolute;
  bottom: clamp(18px, 2.2vw, 30px);
  left: clamp(18px, 2.2vw, 30px);
  z-index: 3;
  width: min(47%, 470px);
  padding: clamp(18px, 2vw, 25px);
  background: rgba(255, 255, 255, 0.91);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-top: 4px solid var(--orange);
  box-shadow: 0 18px 44px rgba(8, 31, 48, 0.2);
  backdrop-filter: blur(16px) saturate(120%);
  animation: history-card-in 380ms ease-out both;
}

.history-copy.is-right {
  right: clamp(18px, 2.2vw, 30px);
  left: auto;
}

.history-era-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.history-era-meta span {
  color: var(--orange-dark);
  font-family: var(--font-number);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.history-era-meta small {
  color: var(--muted);
  font-size: clamp(10px, 0.8vw, 12px);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.history-copy h2 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(29px, 2.7vw, 42px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.history-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.35vw, 21px);
  font-weight: 650;
  line-height: 1.55;
}

.history-capability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(63, 109, 131, 0.18);
}

.history-capability small {
  color: var(--muted);
  font-size: clamp(11px, 0.82vw, 13px);
  font-weight: 750;
}

.history-capability strong {
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 900;
  text-align: right;
}

@keyframes history-image-in {
  from {
    opacity: 0.72;
    transform: scale(1.018);
  }
}

@keyframes history-card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.category-grid {
  height: calc(100% - 122px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 18px);
}

.category-card,
.mission-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: clamp(17px, 2vw, 25px);
  text-align: left;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-top: 4px solid transparent;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.category-card:hover,
.mission-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 127, 176, 0.34);
}

.category-card.is-selected,
.mission-card.is-selected {
  background: linear-gradient(160deg, #fff, var(--sky-50));
  border-color: rgba(20, 127, 176, 0.3);
  border-top-color: var(--blue);
}

.category-icon,
.mission-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  font-size: 26px;
  font-weight: 900;
  background: var(--sky-50);
  border-radius: 9px;
}

.category-card h2,
.mission-card h2 {
  margin: 0;
  font-size: clamp(22px, 1.9vw, 30px);
}

.category-card p,
.mission-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.55;
}

.category-card footer,
.mission-card footer {
  margin-top: auto;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
}

.category-detail-bar {
  grid-column: 1 / -1;
  align-self: end;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.15vw, 18px);
  background: var(--sand);
  border-left: 4px solid var(--orange);
}

.category-detail-bar strong {
  color: var(--ink);
}

.family-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.family-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.family-tab {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 11px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.08vw, 18px);
  background: var(--sky-25);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.family-tab > span {
  font-size: 22px;
  font-weight: 900;
}

.family-tab.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.family-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(260px, 0.78fr);
  gap: clamp(18px, 2.6vw, 38px);
  align-items: stretch;
  overflow: hidden;
  background: linear-gradient(135deg, #fff, var(--sand));
  border: 1px solid var(--line);
}

.family-view-switch,
.future-mode-switch {
  z-index: 5;
  display: inline-flex;
  padding: 3px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(63, 109, 131, 0.22);
  box-shadow: 0 8px 20px rgba(8, 31, 48, 0.1);
  backdrop-filter: blur(12px);
}

.family-view-switch {
  position: absolute;
  top: 12px;
  left: 12px;
}

.family-view-switch button,
.future-mode-switch button {
  min-height: 34px;
  padding: 6px 11px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.family-view-switch button.is-active,
.future-mode-switch button.is-active {
  color: #fff;
  background: var(--blue-dark);
}

.family-visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--sky-50);
}

.family-visual img {
  width: 100%;
  height: 100%;
  display: block;
}

.family-visual.is-scene img {
  --scene-index: 0;
  object-fit: cover;
  object-position: calc(var(--scene-index) * 33.333%) center;
  animation: family-scene-in 420ms ease-out both;
}

.family-visual.is-diagram img {
  padding: clamp(24px, 3vw, 48px);
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.95) 0 27%, transparent 54%),
    linear-gradient(135deg, #e9f8ff, #fff4e3);
}

.family-visual figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  background: rgba(8, 31, 48, 0.72);
  border-left: 3px solid var(--orange);
  backdrop-filter: blur(8px);
}

@keyframes family-scene-in {
  from {
    opacity: 0.72;
    transform: scale(1.018);
  }
}

.family-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: clamp(18px, 2.2vw, 30px) clamp(18px, 2vw, 28px) clamp(18px, 2.2vw, 30px) 0;
}

.family-copy > span {
  color: var(--orange-dark);
  font-size: clamp(15px, 1.2vw, 20px);
  font-weight: 900;
}

.family-copy h2 {
  margin: 0;
  font-size: clamp(30px, 2.35vw, 38px);
  line-height: 1.08;
}

.family-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 1.4vw, 23px);
  line-height: 1.42;
}

.family-copy > div {
  padding: 10px 13px;
  background: var(--sky-50);
  border-left: 4px solid var(--blue);
}

.family-copy small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.family-copy strong {
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.4;
}

.loop-layout {
  height: calc(100% - 122px);
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
}

.loop-steps {
  display: grid;
  align-content: center;
  gap: 8px;
}

.loop-step {
  min-height: 66px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.loop-step > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  font-weight: 900;
  background: var(--sky-50);
  border-radius: 50%;
}

.loop-step div {
  display: grid;
  gap: 2px;
}

.loop-step strong {
  font-size: 15px;
}

.loop-step small {
  color: var(--muted);
  font-size: 11px;
}

.loop-step.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.loop-step.is-active > span {
  color: var(--blue-dark);
  background: #fff;
}

.loop-step.is-active small {
  color: rgba(255, 255, 255, 0.76);
}

.loop-demo {
  position: relative;
  min-width: 0;
  display: block;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.loop-copy {
  position: absolute;
  bottom: clamp(16px, 1.8vw, 24px);
  left: clamp(16px, 1.8vw, 24px);
  z-index: 5;
  min-width: 0;
  width: min(48%, 330px);
  padding: clamp(16px, 1.8vw, 23px);
  background: rgba(255, 255, 255, 0.92);
  border-top: 4px solid var(--orange);
  box-shadow: 0 16px 34px rgba(8, 31, 48, 0.18);
  backdrop-filter: blur(14px);
}

.loop-copy > span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
}

.loop-copy h2 {
  margin: 8px 0 13px;
  font-size: clamp(28px, 2.45vw, 38px);
  line-height: 1.12;
}

html[lang="en"] .loop-copy h2 {
  font-size: clamp(27px, 2.1vw, 32px);
}

.loop-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.48;
}

.loop-question {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 9px 11px;
  background: var(--sky-50);
  border-left: 4px solid var(--orange);
}

.loop-question small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.loop-question strong {
  color: var(--blue-dark);
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.35;
}

.embodied-ai-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-width: 0;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  background: #dff2f9;
}

.embodied-ai-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(8, 31, 48, 0.08), transparent 35%),
    linear-gradient(180deg, transparent 58%, rgba(8, 31, 48, 0.12));
  pointer-events: none;
}

.embodied-ai-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 62% center;
}

.embodied-ai-visual figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 7px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  background: rgba(8, 31, 48, 0.74);
  border-left: 3px solid var(--orange);
}

.ai-scan-line,
.ai-object-box,
.ai-thought-node,
.ai-route,
.ai-action-ring {
  position: absolute;
  z-index: 3;
  display: none;
  pointer-events: none;
}

.is-sense .ai-scan-line,
.is-sense .ai-object-box,
.is-understand .ai-object-box,
.is-understand .ai-thought-node,
.is-plan .ai-route,
.is-plan .ai-object-box,
.is-act .ai-action-ring {
  display: block;
}

.ai-scan-line {
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, #79ddff 24% 76%, transparent);
  box-shadow: 0 0 18px rgba(121, 221, 255, 0.9);
  animation: ai-scan 2.2s ease-in-out infinite;
}

.ai-object-box {
  right: 17%;
  bottom: 24%;
  width: 16%;
  height: 17%;
  padding: 5px;
  color: #fff;
  font-family: var(--font-number);
  font-size: 9px;
  font-weight: 900;
  border: 2px solid #6be3ff;
  box-shadow: 0 0 0 1px rgba(8, 31, 48, 0.3);
}

.ai-thought-node {
  top: 16%;
  min-width: 54px;
  padding: 7px 9px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  background: rgba(11, 95, 137, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  animation: thought-float 1.8s ease-in-out infinite;
}

.ai-thought-node.node-a { left: 12%; }
.ai-thought-node.node-b { left: 29%; animation-delay: -0.7s; }

.ai-route {
  right: 17%;
  bottom: 29%;
  width: 44%;
  height: 28%;
  border-top: 4px dashed #ff9b4c;
  border-radius: 50%;
  transform: rotate(-8deg);
  animation: route-dash 1.3s linear infinite;
}

.ai-action-ring {
  right: 17%;
  bottom: 24%;
  width: 17%;
  aspect-ratio: 1;
  border: 4px solid rgba(244, 130, 45, 0.8);
  border-radius: 50%;
  animation: action-ring 1.2s ease-out infinite;
}

@keyframes ai-scan {
  0%, 100% { left: 10%; opacity: 0; }
  18%, 82% { opacity: 1; }
  50% { left: 88%; }
}

@keyframes thought-float {
  50% { transform: translateY(-8px); }
}

@keyframes route-dash {
  to { transform: rotate(-8deg) translateX(8px); }
}

@keyframes action-ring {
  from { opacity: 0.9; transform: scale(0.72); }
  to { opacity: 0; transform: scale(1.22); }
}

.future-layout {
  position: relative;
  height: calc(100% - 122px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.future-mode-switch {
  position: absolute;
  top: 12px;
  right: 12px;
}

.future-vision {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #dceef5;
  border: 1px solid var(--line);
}

.future-vision::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(90deg, rgba(8, 31, 48, 0.58), transparent 52%);
  pointer-events: none;
}

.future-vision img {
  --scene-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: calc(var(--scene-index) * 33.333%) center;
  transition: object-position 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.future-story {
  position: absolute;
  bottom: clamp(18px, 2vw, 28px);
  left: clamp(18px, 2vw, 28px);
  z-index: 3;
  width: min(43%, 430px);
  color: #fff;
}

.future-story > span {
  color: #ffc38f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.future-story h2 {
  margin: 6px 0 5px;
  font-size: clamp(31px, 3vw, 46px);
  line-height: 1.06;
}

.future-story strong {
  display: block;
  color: #e1f7ff;
  font-size: clamp(16px, 1.25vw, 20px);
}

.future-story p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.5;
}

.future-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.future-chip {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 11px;
  color: var(--ink-soft);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.future-chip strong {
  font-size: 14px;
}

.future-chip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.future-chip.is-selected {
  color: #fff;
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.future-chip.is-selected small {
  color: rgba(255, 255, 255, 0.76);
}

.future-challenges {
  grid-row: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.challenge-card {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-content: center;
  gap: 13px;
  padding: clamp(15px, 1.6vw, 22px);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  overflow: hidden;
}

.challenge-card > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--orange-dark);
  font-size: 20px;
  font-weight: 900;
  background: var(--orange-soft);
  border-radius: 50%;
}

.challenge-card h2 {
  margin: 0 0 7px;
  font-size: clamp(17px, 1.4vw, 22px);
}

.challenge-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.55;
}

.challenge-card > i {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 84px;
  height: 84px;
  border: 10px solid rgba(20, 127, 176, 0.08);
  border-radius: 50%;
  animation: challenge-pulse 2.4s ease-in-out infinite;
}

@keyframes challenge-pulse {
  50% { transform: scale(1.13); opacity: 0.45; }
}

.mission-grid {
  height: calc(100% - 122px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
}

.mission-card {
  justify-content: flex-start;
  padding: 12px;
  gap: 7px;
}

.mission-card .mission-icon {
  width: 38px;
  height: 38px;
  font-size: 21px;
}

.mission-image {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 8;
  margin: 0;
  overflow: hidden;
  background: var(--sky-50);
  border: 1px solid var(--line);
}

.mission-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mission-card .mission-goal {
  font-size: clamp(15px, 1.15vw, 18px);
}

.mission-flow-slide {
  height: calc(100% - 122px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
}

.mission-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

.flow-step {
  position: relative;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(20px, 2.5vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
}

.flow-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: calc(clamp(12px, 2vw, 24px) / -1 - 17px);
  z-index: 2;
  width: 34px;
  color: var(--orange);
  content: "→";
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  transform: translateY(-50%);
}

.flow-step span {
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 900;
}

.flow-step strong {
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.3;
}

.flow-step small {
  color: var(--muted);
  font-size: 12px;
}

.flow-safety {
  padding: 14px 17px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.1vw, 17px);
  background: var(--orange-soft);
  border-left: 4px solid var(--orange);
}

.brief-layout {
  height: calc(100% - 122px);
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
}

.brief-prompts,
.mission-form,
.safety-column,
.assembly-column,
.motion-palette,
.motion-stage,
.showcase-card,
.result-card {
  min-height: 0;
  padding: clamp(18px, 2vw, 26px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
}

.brief-prompts h2,
.mission-form h2,
.motion-palette h2,
.motion-stage h2,
.showcase-card h2,
.result-card h2 {
  margin: 0 0 14px;
  font-size: clamp(18px, 1.55vw, 24px);
}

.brief-prompts ol {
  margin: 0;
  padding-left: 23px;
}

.brief-prompts li {
  margin: 13px 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.5;
}

.mission-form {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  align-content: center;
  gap: 15px;
}

.mission-form h2,
.mission-form .form-actions {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.field input {
  min-height: 48px;
  padding: 0 12px;
}

.field textarea {
  min-height: 112px;
  padding: 11px 12px;
  resize: none;
}

.primary-action,
.secondary-action {
  min-height: 43px;
  padding: 9px 16px;
  font-weight: 900;
  border-radius: 5px;
  cursor: pointer;
}

.primary-action {
  color: #fff;
  background: var(--orange);
  border: 1px solid var(--orange);
}

.secondary-action {
  color: var(--blue-dark);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.form-actions,
.motion-actions,
.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.anatomy-layout {
  height: calc(100% - 122px);
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
}

.robot-photo-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px;
}

.robot-photo {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #f5fbfe, #f7f0e5);
  border: 1px solid var(--line);
}

.robot-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.body-parts {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.part-card {
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
}

.part-card span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 900;
}

.part-card h2 {
  margin: 0;
  font-size: clamp(19px, 1.45vw, 24px);
}

.part-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.45;
}

.hardware-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hardware-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(105px, 0.96fr) minmax(0, 1.04fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
}

.hardware-image {
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--sky-50);
  border-bottom: 1px solid var(--line);
}

.hardware-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.hardware-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 13px 12px;
}

.hardware-copy span {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
}

.hardware-copy h2 {
  margin: 0;
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.18;
}

.hardware-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.42;
}

.safe-assembly-layout {
  height: calc(100% - 122px);
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
}

.safety-column {
  display: grid;
  align-content: center;
  gap: 12px;
  background: var(--orange-soft);
  border-color: rgba(244, 130, 45, 0.24);
}

.safety-column h2,
.assembly-column h2 {
  margin: 0;
  font-size: clamp(19px, 1.6vw, 25px);
}

.safety-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: var(--ink-soft);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.48;
}

.safety-item span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--orange);
  border-radius: 50%;
}

.assembly-column {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.assembly-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.assembly-tab {
  min-height: 38px;
  color: var(--blue-dark);
  font-weight: 900;
  background: var(--sky-25);
  border: 1px solid var(--line);
  cursor: pointer;
}

.assembly-tab.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.assembly-focus {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(190px, 0.92fr);
  background: var(--sky-25);
  border: 1px solid var(--line);
}

.assembly-focus figure {
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border-right: 1px solid var(--line);
}

.assembly-focus img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.assembly-focus img.is-illustration {
  padding: clamp(8px, 1vw, 14px);
  object-fit: contain;
}

.assembly-focus > div {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: clamp(16px, 2vw, 26px);
}

.assembly-focus span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
}

.assembly-focus h3 {
  margin: 0;
  font-size: clamp(22px, 2vw, 32px);
}

.assembly-focus p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.55;
}

.quest-layout,
.safety-quest-layout {
  min-height: 0;
  display: grid;
  gap: 18px;
}

.quest-layout {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.quest-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  background: var(--sky-50);
  border: 1px solid var(--line);
  outline: none;
}

.quest-canvas:focus-visible {
  box-shadow: 0 0 0 4px rgba(20, 127, 176, 0.2);
}

.quest-brief {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(150deg, #fff, var(--orange-soft));
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
}

.quest-brief > span,
.safety-quest-card > span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
}

.quest-brief h2,
.safety-quest-card h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.2;
}

.quest-brief h2 {
  font-size: clamp(18px, 1.35vw, 23px);
}

.quest-brief p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.55;
}

.quest-brief > span {
  display: none;
}

.quest-brief > h2 {
  grid-column: 1;
  grid-row: 1;
}

.quest-brief > p:not(.quest-feedback) {
  grid-column: 2;
  grid-row: 1;
}

.quest-brief > small {
  display: none;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.quest-score {
  grid-column: 3;
  grid-row: 1;
  min-width: 92px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
}

.quest-score small {
  color: var(--muted);
}

.quest-score strong {
  color: var(--blue-dark);
  font-size: 24px;
}

.quest-feedback {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 0;
  padding: 7px 10px;
  font-size: 13px !important;
  background: rgba(255, 255, 255, 0.74);
  border-left: 3px solid var(--blue);
}

.safety-quest-layout {
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
}

.safety-quest-visual {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0;
  overflow: hidden;
  background: var(--sky-50);
  border: 1px solid var(--line);
}

.safety-quest-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.safety-quest-visual img.is-illustration {
  padding: clamp(10px, 1.2vw, 18px);
  object-fit: contain;
}

.safety-quest-visual figcaption {
  padding: 10px 13px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  background: #fff;
}

.safety-animation {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 20px;
  color: #16384b;
  background:
    radial-gradient(circle at 50% 38%, rgba(72, 190, 228, 0.2), transparent 42%),
    linear-gradient(145deg, #effaff, #fff7eb);
  transition: background 240ms ease;
}

.safety-animation.is-safe {
  background:
    radial-gradient(circle at 50% 38%, rgba(35, 130, 93, 0.2), transparent 42%),
    linear-gradient(145deg, #effbf6, #fff);
}

.safety-animation.is-alert {
  background:
    radial-gradient(circle at 50% 38%, rgba(220, 75, 54, 0.2), transparent 42%),
    linear-gradient(145deg, #fff3ef, #fff9ef);
}

.safety-animation svg {
  width: min(100%, 520px);
  height: 100%;
  min-height: 280px;
  filter: drop-shadow(0 18px 22px rgba(21, 66, 88, 0.13));
}

.safety-visual-label {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  padding: 7px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: #12384c;
  border-left: 4px solid var(--orange);
}

.safety-floor,
.safety-cable,
.safety-arm-static,
.safety-arm-test,
.safety-arm-jam,
.safety-safe-arc,
.safety-danger-arc,
.safety-sound path,
.safety-audience path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.safety-floor {
  stroke: rgba(22, 56, 75, 0.18);
  stroke-width: 5;
}

.safety-bot-head {
  fill: #eaf5f8;
  stroke: #153c50;
  stroke-width: 7;
}

.safety-bot-body {
  fill: #fff;
  stroke: #153c50;
  stroke-width: 7;
}

.safety-eye {
  fill: #21acd5;
  animation: safety-blink 3s steps(1) infinite;
}

.safety-eye.is-alert-eye {
  fill: #ef5c45;
}

.safety-cable,
.safety-arm-static,
.safety-arm-test,
.safety-arm-jam {
  stroke-width: 24;
}

.safety-cable {
  stroke: #2d708e;
}

.safety-cable.is-wrong-line {
  stroke: #ef5c45;
  stroke-dasharray: 15 10;
  animation: safety-cable-flow 1.1s linear infinite;
}

.safety-power-switch circle {
  fill: #fff;
  stroke: #153c50;
  stroke-width: 6;
}

.safety-power-switch path {
  fill: none;
  stroke: #ef5c45;
  stroke-linecap: round;
  stroke-width: 7;
}

.safety-power-switch {
  transform-origin: 76px 252px;
  animation: safety-power-pulse 1.7s ease-in-out infinite;
}

.safety-spark {
  fill: #f4a029;
  transform-origin: 436px 258px;
  animation: safety-spark 0.8s steps(2) infinite;
}

.safety-arm-test {
  stroke: #2683a8;
  transform-origin: 337px 174px;
  animation: safety-small-wave 1.7s ease-in-out infinite;
}

.safety-arm-static,
.safety-arm-jam {
  stroke: #2683a8;
}

.safety-arm-jam {
  animation: safety-jam 0.22s linear infinite;
}

.safety-joint {
  fill: #fff;
  stroke: #153c50;
  stroke-width: 6;
}

.safety-joint.is-jammed {
  fill: #ef5c45;
  animation: safety-joint-alert 0.8s ease-in-out infinite;
}

.safety-safe-arc {
  stroke: #25885f;
  stroke-width: 7;
  stroke-dasharray: 8 12;
}

.safety-danger-arc {
  stroke: rgba(220, 75, 54, 0.38);
  stroke-width: 5;
  stroke-dasharray: 12 12;
}

.safety-speed-dots {
  fill: #25885f;
  animation: safety-speed 1.4s ease-in-out infinite;
}

.safety-sound path {
  stroke: #ef5c45;
  stroke-width: 7;
  animation: safety-sound 1s ease-out infinite;
}

.safety-stop circle {
  fill: #fff;
  stroke: #ef5c45;
  stroke-width: 7;
}

.safety-stop rect {
  fill: #ef5c45;
}

.safety-stop {
  transform-origin: 104px 105px;
  animation: safety-stop-pulse 1.2s ease-in-out infinite;
}

.safety-zone-ring {
  fill: rgba(244, 160, 41, 0.08);
  stroke: #f4a029;
  stroke-width: 5;
  stroke-dasharray: 14 10;
  animation: safety-zone 5s linear infinite;
}

.safety-zone-ring.is-inner {
  fill: rgba(33, 172, 213, 0.06);
  stroke: rgba(33, 172, 213, 0.55);
  animation-direction: reverse;
}

.safety-bot.is-performing {
  transform-origin: 260px 244px;
  animation: safety-perform 1.7s ease-in-out infinite;
}

.safety-audience circle {
  fill: #fff;
  stroke: #153c50;
  stroke-width: 6;
}

.safety-audience path {
  stroke-width: 9;
}

@keyframes safety-blink { 0%, 46%, 50%, 100% { opacity: 1; } 48% { opacity: 0.15; } }
@keyframes safety-cable-flow { to { stroke-dashoffset: -50; } }
@keyframes safety-power-pulse { 50% { transform: scale(1.09); } }
@keyframes safety-spark { 50% { transform: scale(1.18) rotate(4deg); } }
@keyframes safety-small-wave { 50% { transform: rotate(-22deg); } }
@keyframes safety-jam { 50% { transform: translate(4px, -2px); } }
@keyframes safety-joint-alert { 50% { transform: scale(1.25); } }
@keyframes safety-speed { 50% { transform: translateX(18px); opacity: 0.45; } }
@keyframes safety-sound { 0% { opacity: 0; transform: scale(0.8); } 50% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes safety-stop-pulse { 50% { transform: scale(1.1); } }
@keyframes safety-zone { to { stroke-dashoffset: -96; } }
@keyframes safety-perform { 50% { transform: translateY(-8px) rotate(2deg); } }

.safety-quest-card {
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(20px, 2.5vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
}

.safety-choices {
  display: grid;
  gap: 10px;
}

.safety-choice {
  min-height: 58px;
  padding: 11px 15px;
  color: var(--ink);
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 900;
  text-align: left;
  background: var(--sky-25);
  border: 1px solid var(--line);
  cursor: pointer;
}

.safety-choice:hover:not(:disabled) {
  border-color: var(--blue);
}

.safety-choice.is-correct {
  color: #176a4b;
  background: var(--green-soft);
  border-color: rgba(35, 130, 93, 0.42);
}

.safety-choice.is-wrong {
  color: #9a3528;
  background: var(--orange-soft);
  border-color: rgba(220, 75, 54, 0.42);
}

.safety-answer {
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
}

.safety-answer.is-alert {
  background: var(--orange-soft);
  border-left-color: var(--orange);
}

.safety-answer p,
.safety-hint {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.safety-next {
  justify-self: end;
}

.motion-layout {
  height: calc(100% - 122px);
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 14px;
}

.motion-palette {
  display: grid;
  grid-template-rows: auto auto minmax(128px, 1fr) auto auto;
  gap: 9px;
}

.motion-palette-heading,
.motion-stage-heading,
.motion-sequence-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.motion-palette-heading h2,
.motion-stage-heading h2 {
  margin: 0;
}

.motion-palette-heading small,
.motion-sequence-heading small {
  color: var(--muted);
  font-size: 11px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.action-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  background: var(--sky-50);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.action-button:hover,
.action-button:focus-visible {
  color: #fff;
  background: var(--blue-dark);
  border-color: var(--blue);
}

.action-button.is-dragging,
.sequence-chip.is-dragging {
  opacity: 0.42;
}

.motion-sequence {
  min-height: 128px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
  background: linear-gradient(145deg, #f7fafb, #eef6f8);
  border: 1px dashed var(--line-strong);
  transition: border-color 160ms ease, background 160ms ease;
}

.motion-sequence.is-drop-target {
  background: #e8f7fb;
  border-color: var(--blue);
}

.motion-sequence-heading > span {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.sequence-track {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sequence-chip {
  position: relative;
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px 20px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 6px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  background: #fff;
  border: 1px solid rgba(20, 127, 176, 0.22);
  cursor: grab;
}

.sequence-chip.is-drop-target {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
}

.sequence-number {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-number);
  font-size: 10px;
  background: var(--orange-dark);
  border-radius: 50%;
}

.sequence-emoji {
  font-size: 15px;
}

.sequence-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sequence-controls {
  position: absolute;
  z-index: 2;
  top: -8px;
  right: 3px;
  display: flex;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.sequence-chip:hover .sequence-controls,
.sequence-chip:focus-within .sequence-controls {
  opacity: 1;
  transform: translateY(0);
}

.sequence-controls button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--blue-dark);
  font-size: 11px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.sequence-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}

.motion-empty {
  min-height: 72px;
  display: grid;
  place-content: center;
  gap: 3px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.motion-empty strong {
  color: var(--blue-dark);
  font-size: 14px;
}

.studio-launch {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(125deg, var(--blue-dark), var(--blue));
  border-radius: 5px;
}

.studio-launch > span {
  display: grid;
  gap: 2px;
}

.studio-launch small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.studio-launch strong {
  font-size: 13px;
}

.studio-launch b {
  font-size: 22px;
}

.motion-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
  text-align: center;
  color: #eaf8fc;
  background: #0b151b;
  border: 1px solid #253840;
}

.motion-stage-heading {
  padding: 12px 14px 0;
  text-align: left;
}

.motion-stage-heading > span {
  color: #65d9ff;
  font-family: var(--font-number);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.motion-stage-heading h2 {
  color: #fff;
  font-size: 16px;
}

.robot-preview {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px 16px 4px;
  background:
    radial-gradient(circle at 50% 25%, rgba(69, 206, 249, 0.2), transparent 30%),
    linear-gradient(rgba(101, 217, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 217, 255, 0.08) 1px, transparent 1px),
    linear-gradient(160deg, #111f27, #05090c);
  background-size: auto, 30px 30px, 30px 30px, auto;
  border: 0;
}

.robot-preview::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 8%;
  height: 14px;
  background: rgba(63, 212, 255, 0.3);
  border-radius: 50%;
  filter: blur(5px);
}

.stage-scan {
  position: absolute;
  z-index: 2;
  top: 8%;
  left: 8%;
  right: 8%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #62ddff, transparent);
  box-shadow: 0 0 16px #62ddff;
  animation: stage-scan 3.4s ease-in-out infinite;
}

.stage-status {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(234, 248, 252, 0.7);
  font-size: 9px;
}

.stage-status i {
  width: 6px;
  height: 6px;
  background: #58e3a8;
  border-radius: 50%;
  box-shadow: 0 0 10px #58e3a8;
}

.robot-character {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 308px;
  transform-origin: center bottom;
  transform-style: preserve-3d;
}

.robot-character .antenna {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 107px;
  width: 6px;
  height: 22px;
  background: #a9bbc2;
  border-radius: 4px;
}

.robot-character .antenna::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 14px;
  height: 14px;
  background: #67ddff;
  border-radius: 50%;
  box-shadow: 0 0 16px #67ddff;
}

.robot-character .head {
  position: absolute;
  top: 21px;
  left: 58px;
  width: 104px;
  height: 70px;
  display: grid;
  place-items: center;
  color: #80e5ff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(145deg, #142b35, #061016);
  border: 7px solid #dce8ec;
  border-radius: 17px;
  transform: translateX(0);
  transform-origin: center bottom;
}

.robot-character .body {
  position: absolute;
  top: 102px;
  left: 47px;
  width: 126px;
  height: 112px;
  display: block;
  background: linear-gradient(145deg, #f8fbfc, #9fb1b8);
  border: 7px solid #35464d;
  border-radius: 24px 24px 32px 32px;
  box-shadow: inset 0 -20px 24px rgba(16, 37, 46, 0.12);
}

.robot-character .chest-light {
  position: absolute;
  z-index: 2;
  top: 132px;
  left: 95px;
  width: 30px;
  height: 14px;
  background: #5adfff;
  border: 4px solid #30444d;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(90, 223, 255, 0.72);
}

.robot-character .arm,
.robot-character .leg {
  position: absolute;
  width: 31px;
  display: block;
  background: linear-gradient(90deg, #eef5f7, #8fa4ac);
  border: 6px solid #35464d;
  border-radius: 14px;
  transform-origin: top center;
}

.robot-character .arm { top: 116px; height: 108px; }
.robot-character .arm.left { left: 19px; transform: rotate(10deg); }
.robot-character .arm.right { right: 19px; transform: rotate(-10deg); }
.robot-character .leg { top: 210px; height: 93px; }
.robot-character .leg.left { left: 63px; transform: rotate(3deg); }
.robot-character .leg.right { right: 63px; transform: rotate(-3deg); }

.robot-character.is-nod .head { animation: nod 650ms ease; }
.robot-character.is-wave .arm.right { animation: wave 850ms ease; }
.robot-character.is-turn { animation: turn 800ms ease; }
.robot-character.is-happy { animation: happy 580ms ease; }
.robot-character.is-armsup .arm.left { animation: arms-up-left 820ms ease; }
.robot-character.is-armsup .arm.right { animation: arms-up-right 820ms ease; }
.robot-character.is-march .leg.left { animation: march-left 920ms ease-in-out; }
.robot-character.is-march .leg.right { animation: march-right 920ms ease-in-out; }
.robot-character.is-crouch { animation: crouch 850ms ease-in-out; }
.robot-character.is-look .head { animation: look 820ms ease-in-out; }
.robot-character.is-clap .arm.left { animation: clap-left 850ms ease-in-out; }
.robot-character.is-clap .arm.right { animation: clap-right 850ms ease-in-out; }
.robot-character.is-finish { animation: bow 760ms ease; }

@keyframes nod { 50% { transform: translateY(5px) rotate(12deg); } }
@keyframes wave { 35%, 75% { transform: rotate(-135deg); } 55% { transform: rotate(-105deg); } }
@keyframes turn { 50% { transform: rotateY(180deg); } }
@keyframes happy { 50% { transform: translateY(-13px); } }
@keyframes bow { 50% { transform: rotate(18deg); } }
@keyframes arms-up-left { 50% { transform: rotate(155deg); } }
@keyframes arms-up-right { 50% { transform: rotate(-155deg); } }
@keyframes march-left { 35%, 75% { transform: rotate(28deg) translateY(-8px); } }
@keyframes march-right { 35%, 75% { transform: rotate(-28deg) translateY(-8px); } }
@keyframes crouch { 45%, 70% { transform: translateY(32px) scaleY(0.88); } }
@keyframes look { 30% { transform: translateX(-12px); } 70% { transform: translateX(12px); } }
@keyframes clap-left { 35%, 70% { transform: rotate(-48deg) translateX(20px); } }
@keyframes clap-right { 35%, 70% { transform: rotate(48deg) translateX(-20px); } }
@keyframes stage-scan { 0%, 100% { transform: translateY(20px); opacity: 0.25; } 50% { transform: translateY(250px); opacity: 0.85; } }

.preview-caption {
  min-height: 38px;
  margin: 0;
  padding: 10px 14px;
  color: rgba(234, 248, 252, 0.8);
  font-size: 11px;
  background: #101f27;
  border-top: 1px solid #253840;
}

.ai-learning-layout {
  height: calc(100% - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(290px, 0.84fr);
  gap: 14px;
}

.ai-journey {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.ai-era-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ai-era-tabs button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  background: #f5fafb;
  border: 1px solid var(--line);
  cursor: pointer;
}

.ai-era-tabs button span {
  font-family: var(--font-number);
  font-size: 10px;
  opacity: 0.6;
}

.ai-era-tabs button.is-selected {
  color: #fff;
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.ai-era-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(155px, 0.38fr) minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.ai-era-orbit {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(101, 217, 255, 0.22), transparent 42%),
    linear-gradient(155deg, #162b36, #071014);
}

.ai-era-orbit::before,
.ai-era-orbit::after {
  content: "";
  position: absolute;
  inset: 19%;
  border: 1px solid rgba(101, 217, 255, 0.32);
  border-radius: 50%;
  animation: ai-orbit 8s linear infinite;
}

.ai-era-orbit::after {
  inset: 30%;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 5s;
}

.ai-human-node,
.ai-core-node,
.ai-robot-node {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: #203f4d;
  border: 1px solid rgba(101, 217, 255, 0.65);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(101, 217, 255, 0.24);
}

.ai-human-node { top: 18%; left: 16%; }
.ai-core-node {
  top: 44%;
  left: 50%;
  width: 58px;
  height: 58px;
  color: #08212c;
  background: #65d9ff;
  transform: translate(-50%, -50%);
  animation: ai-core 2.2s ease-in-out infinite;
}
.ai-robot-node { right: 14%; bottom: 18%; }

.ai-era-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: clamp(16px, 1.8vw, 24px);
}

.ai-era-copy > span,
.ai-class-quiz header > span {
  color: var(--orange-dark);
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ai-era-copy h2 {
  margin: 0;
  font-size: clamp(21px, 1.8vw, 28px);
  line-height: 1.22;
}

.ai-era-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.5;
}

.ai-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-tool-row b {
  padding: 5px 8px;
  color: var(--blue-dark);
  font-size: 11px;
  background: var(--sky-50);
  border: 1px solid rgba(20, 127, 176, 0.2);
}

.ai-era-copy dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.ai-era-copy dl > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.ai-era-copy dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ai-era-copy dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.ai-class-quiz {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: clamp(16px, 2vw, 25px);
  background: linear-gradient(145deg, #fff9ee, #fff);
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
}

.ai-class-quiz header {
  display: grid;
  gap: 3px;
}

.ai-class-quiz h2,
.ai-class-quiz h3,
.ai-class-quiz p {
  margin: 0;
}

.ai-class-quiz h2 {
  font-size: clamp(20px, 1.8vw, 28px);
}

.ai-class-quiz header p,
.ai-quiz-hint {
  color: var(--muted);
  font-size: 11px;
}

.ai-class-quiz h3 {
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.42;
}

.ai-quiz-choices {
  display: grid;
  gap: 7px;
}

.ai-quiz-choices button {
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.ai-quiz-choices button span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  background: var(--sky-50);
  border-radius: 50%;
}

.ai-quiz-choices button:hover:not(:disabled) {
  border-color: var(--blue);
}

.ai-quiz-choices button.is-correct {
  background: var(--green-soft);
  border-color: rgba(35, 130, 93, 0.42);
}

.ai-quiz-choices button.is-wrong {
  background: var(--orange-soft);
  border-color: rgba(220, 75, 54, 0.42);
}

.ai-quiz-feedback {
  padding: 9px 11px;
  font-size: 11px;
  line-height: 1.45;
  background: var(--green-soft);
  border-left: 4px solid var(--green);
}

.ai-quiz-feedback.is-wrong {
  background: var(--orange-soft);
  border-left-color: var(--orange);
}

.ai-quiz-feedback p {
  margin-top: 3px;
  color: var(--ink-soft);
}

.ai-quiz-next {
  justify-self: end;
  padding: 8px 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  background: var(--blue-dark);
  border: 0;
  cursor: pointer;
}

@keyframes ai-orbit { to { transform: rotate(360deg); } }
@keyframes ai-core { 50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 28px rgba(101, 217, 255, 0.55); } }

.showcase-layout {
  height: calc(100% - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 18px;
}

.check-list {
  display: grid;
  gap: 9px;
}

.check-list label {
  min-height: 49px;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--ink-soft);
  font-size: clamp(13px, 1vw, 16px);
  background: var(--sky-25);
  border: 1px solid var(--line);
  cursor: pointer;
}

.check-list input {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
}

.reflection-list {
  margin: 0;
  padding-left: 23px;
}

.reflection-list li {
  margin: 18px 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.55;
}

.result-layout {
  height: calc(100% - 122px);
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.result-card {
  display: grid;
  align-content: center;
  gap: 12px;
}

.result-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.result-row span {
  color: var(--muted);
  font-size: 12px;
}

.result-row strong {
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.45;
}

.story-card {
  display: grid;
  align-content: center;
  gap: 15px;
  padding: clamp(22px, 3vw, 38px);
  background: linear-gradient(145deg, var(--sky-50), var(--sand));
  border: 1px solid var(--line);
}

.story-card span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
}

.story-card h2 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 38px);
}

.story-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.65;
}

.completion-trigger {
  position: relative;
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  margin-top: 12px;
  padding: 17px 20px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  background:
    linear-gradient(112deg, rgba(7, 21, 40, 0.97), rgba(17, 64, 94, 0.94)),
    #071528;
  border: 1px solid rgba(75, 193, 238, 0.46);
  border-radius: 5px;
  box-shadow: 0 15px 34px rgba(7, 44, 72, 0.16);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.completion-trigger::before {
  position: absolute;
  inset: 0 auto 0 -42%;
  width: 36%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: skewX(-16deg);
  transition: left 420ms ease;
}

.completion-trigger:hover {
  border-color: rgba(102, 224, 255, 0.88);
  box-shadow: 0 18px 42px rgba(7, 52, 87, 0.26);
  transform: translateY(-2px);
}

.completion-trigger:hover::before {
  left: 118%;
}

.completion-trigger > span,
.completion-trigger > strong {
  display: block;
  grid-column: 1;
}

.completion-trigger > span {
  color: rgba(197, 232, 248, 0.68);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.completion-trigger > strong {
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.2;
}

.completion-trigger > i {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 28px;
  font-style: normal;
}

.completion-modal {
  position: fixed;
  z-index: 920;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 220ms ease;
}

.completion-modal[hidden] {
  display: none;
}

.completion-modal.is-visible {
  opacity: 1;
}

.completion-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(46, 172, 231, 0.18), transparent 38%),
    rgba(1, 7, 17, 0.82);
  border: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
}

.completion-dialog {
  position: relative;
  width: min(620px, 92vw);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(34px, 5vw, 64px);
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(12, 28, 48, 0.91), rgba(5, 12, 26, 0.94));
  border: 1px solid rgba(163, 222, 248, 0.28);
  border-radius: 8px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 40px 110px rgba(0, 5, 15, 0.58);
  transform: translateY(18px) scale(0.96);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.completion-modal.is-visible .completion-dialog {
  transform: translateY(0) scale(1);
}

.completion-glow {
  position: absolute;
  top: -210px;
  left: 50%;
  width: 500px;
  height: 500px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(77, 202, 255, 0.3), rgba(73, 128, 255, 0.08) 42%, transparent 69%);
  transform: translateX(-50%);
}

.completion-mark {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: #06111f;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 950;
  background: linear-gradient(145deg, #f4fbff, #74ddff);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow:
    0 0 0 10px rgba(96, 213, 255, 0.08),
    0 0 46px rgba(76, 204, 255, 0.36);
}

.completion-dialog > small {
  position: relative;
  color: rgba(146, 223, 255, 0.72);
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.completion-dialog h2 {
  position: relative;
  margin: 12px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.completion-dialog > p {
  position: relative;
  max-width: 460px;
  margin: 0;
  color: rgba(228, 243, 251, 0.75);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.7;
}

.completion-honor {
  position: relative;
  margin-top: 22px;
  color: #87e6ff;
  font-size: clamp(19px, 2vw, 27px);
  text-shadow: 0 0 22px rgba(83, 214, 255, 0.3);
}

.completion-badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
}

.completion-badges span {
  padding: 7px 11px;
  color: rgba(236, 249, 255, 0.84);
  font-size: 11px;
  font-weight: 800;
  background: rgba(174, 224, 247, 0.08);
  border: 1px solid rgba(174, 224, 247, 0.18);
}

.completion-close {
  position: relative;
  min-width: 230px;
  min-height: 46px;
  margin-top: 28px;
  padding: 10px 18px;
  color: #06111f;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #f6fcff, #7de2ff);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.completion-confetti i {
  --confetti-color: #75e3ff;
  position: absolute;
  top: -8%;
  left: calc(7% + (var(--confetti-index) * 6.6%));
  width: 6px;
  height: 17px;
  background: var(--confetti-color);
  opacity: 0;
  transform: rotate(calc(var(--confetti-index) * 31deg));
}

.completion-confetti i:nth-child(3n + 1) {
  --confetti-color: #ffffff;
}

.completion-confetti i:nth-child(3n + 2) {
  --confetti-color: #ffc75f;
}

.completion-modal.is-visible .completion-confetti i {
  animation: completion-confetti-fall 1.8s calc(var(--confetti-index) * 45ms) ease-out both;
}

@keyframes completion-confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -30px, 0) rotate(0);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc((var(--confetti-index) - 7) * 5px), 570px, 0) rotate(520deg);
  }
}

.slide-controller {
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) minmax(110px, 170px);
  align-items: center;
  gap: 16px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.93);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.slide-nav-button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 900;
  border-radius: 5px;
  cursor: pointer;
}

.slide-nav-button.is-secondary {
  background: #fff;
  border: 1px solid var(--line-strong);
}

.slide-nav-button.is-primary {
  color: #fff;
  background: var(--orange);
  border: 1px solid var(--orange);
}

.slide-nav-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slide-dots {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.slide-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: #cddde4;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.slide-dot.is-active {
  width: 28px;
  background: var(--blue);
  border-radius: 99px;
}

.coach-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.coach-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 13px;
  scrollbar-width: thin;
}

.coach-page-meta {
  display: grid;
  gap: 5px;
  padding: 13px;
  background: linear-gradient(145deg, var(--sky-50), #fff);
  border-left: 4px solid var(--blue);
}

.coach-page-meta span {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 900;
}

.coach-page-meta strong {
  font-size: 16px;
}

.coach-page-meta small {
  color: var(--muted);
  font-size: 11px;
}

.coach-section {
  margin-top: 11px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.coach-section h2 {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 12px;
}

.coach-section p,
.coach-section li {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.coach-section p {
  margin: 0;
}

.coach-section ol {
  margin: 0;
  padding-left: 20px;
}

.coach-section li + li {
  margin-top: 5px;
}

.coach-section.is-goal {
  background: var(--green-soft);
  border-color: rgba(35, 130, 93, 0.2);
}

.coach-section.is-principle {
  background: var(--sky-50);
  border-color: rgba(20, 127, 176, 0.2);
}

.coach-section.is-table {
  padding: 0;
  overflow: hidden;
}

.coach-section.is-table h2 {
  margin: 0;
  padding: 11px 12px 9px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.coach-table-scroll {
  overflow-x: auto;
}

.coach-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.coach-table th,
.coach-table td {
  padding: 8px 9px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.coach-table th:last-child,
.coach-table td:last-child {
  border-right: 0;
}

.coach-table tr:last-child td {
  border-bottom: 0;
}

.coach-table th {
  color: var(--blue-dark);
  font-weight: 900;
  background: var(--sky-50);
}

.coach-section.is-safety {
  background: var(--orange-soft);
  border-color: rgba(244, 130, 45, 0.24);
}

.course-app.is-coach-collapsed .coach-header {
  min-height: 108px;
  flex-direction: column;
  justify-content: center;
}

.course-app.is-coach-collapsed .coach-heading > span:last-child,
.course-app.is-coach-collapsed .coach-content {
  display: none;
}

.course-app.is-coach-collapsed .coach-toggle span {
  display: inline-block;
  transform: rotate(180deg);
}

.mobile-stage-tools {
  display: none;
}

.drawer-backdrop {
  position: fixed;
  inset: var(--topbar-height) 0 0;
  z-index: 70;
  background: rgba(11, 35, 48, 0.26);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 82px;
  z-index: 200;
  max-width: min(340px, calc(100vw - 30px));
  padding: 11px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: rgba(16, 47, 70, 0.93);
  border-radius: 6px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 150ms ease, transform 150ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.exit-presentation {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 300;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.22;
}

.exit-presentation:hover,
.exit-presentation:focus-visible {
  opacity: 1;
}

.course-app.is-presentation-mode {
  grid-template-rows: minmax(0, 1fr);
}

.course-app.is-presentation-mode .topbar,
.course-app.is-presentation-mode .course-outline,
.course-app.is-presentation-mode .coach-panel,
.course-app.is-presentation-mode .mobile-stage-tools {
  display: none;
}

.course-app.is-presentation-mode .course-workspace {
  display: block;
}

.course-app.is-presentation-mode .presentation-shell {
  width: 100%;
  height: 100%;
}

.course-app.is-presentation-mode .presentation-canvas {
  padding: clamp(24px, 3vw, 46px);
}

.course-app.is-presentation-mode .slide-heading h1 {
  font-size: clamp(54px, 5vw, 86px);
}

.course-app.is-presentation-mode .cover-copy h1 {
  font-size: clamp(64px, 6vw, 100px);
}

.course-app.is-presentation-mode .slide-heading p,
.course-app.is-presentation-mode .cover-copy > p {
  font-size: clamp(26px, 2.2vw, 36px);
}

@media (max-width: 1320px) {
  :root {
    --outline-width: 250px;
    --coach-width: 310px;
  }

  .topbar {
    grid-template-columns: minmax(190px, 0.8fr) auto minmax(280px, 1fr);
  }

  .runtime-status {
    display: none;
  }

  .slide-panel,
  .cover-slide {
    padding: clamp(20px, 2.4vw, 30px);
  }

  .motion-palette {
    padding: 16px;
  }

  .motion-stage {
    padding: 0;
  }

  .motion-palette {
    gap: 8px;
  }

  .motion-palette h2 {
    margin-bottom: 8px;
  }

  .motion-stage .motion-stage-heading h2 {
    margin: 0;
  }

  .action-button {
    min-height: 42px;
    padding: 5px;
  }

  .motion-sequence {
    min-height: 44px;
    padding: 7px;
  }

  .studio-launch {
    min-height: 44px;
    padding: 7px 10px;
  }
}

@media (max-width: 1440px) {
  :root {
    --outline-width: 260px;
  }

  .course-workspace,
  .course-app.is-outline-collapsed .course-workspace,
  .course-app.is-coach-collapsed .course-workspace,
  .course-app.is-outline-collapsed.is-coach-collapsed .course-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .lesson-context,
  .brand-copy small,
  .user-chip,
  #coach-mobile-button {
    display: none;
  }

  .course-outline,
  .coach-panel {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    z-index: 90;
    width: min(360px, calc(100vw - 44px));
    transition: transform 220ms ease;
  }

  .course-outline {
    left: 0;
    transform: translateX(-102%);
  }

  .coach-panel {
    right: 0;
    transform: translateX(102%);
  }

  .course-app.is-outline-drawer-open .course-outline,
  .course-app.is-coach-drawer-open .coach-panel {
    transform: translateX(0);
  }

  .course-app.is-outline-collapsed .outline-header,
  .course-app.is-coach-collapsed .coach-header {
    min-height: 72px;
    flex-direction: row;
    justify-content: space-between;
  }

  .course-app.is-outline-collapsed .outline-title > span:last-child,
  .course-app.is-outline-collapsed .outline-stage-copy,
  .course-app.is-outline-collapsed .outline-chevron,
  .course-app.is-outline-collapsed .outline-result,
  .course-app.is-coach-collapsed .coach-heading > span:last-child,
  .course-app.is-coach-collapsed .coach-content {
    display: grid;
  }

  .course-app.is-outline-collapsed .outline-result {
    display: block;
  }

  .course-app.is-outline-collapsed .outline-stage-button {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    justify-items: stretch;
    padding: 9px;
  }

  .course-app.is-outline-collapsed .outline-nav {
    padding: 12px 10px;
  }

  .mobile-stage-tools {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--line);
  }

  .mobile-stage-tools button {
    min-height: 30px;
    padding: 4px 9px;
    color: var(--blue-dark);
    font-size: 11px;
    font-weight: 900;
    background: var(--sky-50);
    border: 1px solid var(--line);
    border-radius: 4px;
  }

  .mobile-stage-tools span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .presentation-shell {
    grid-template-rows: 42px minmax(0, 1fr) var(--controller-height);
  }

  .toolbar-button.is-primary {
    display: inline-flex;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr)) auto;
  }

}

@media (max-width: 760px) {
  :root {
    --topbar-height: 58px;
    --controller-height: 60px;
  }

  .topbar {
    padding: 0 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .toolbar-button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .toolbar-button > span:first-child {
    display: none;
  }

  .topbar-actions .toolbar-button.is-primary {
    display: none;
  }

  .mobile-stage-tools {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .mobile-stage-tools button:last-child {
    justify-self: end;
  }

  .presentation-canvas {
    overflow-y: auto;
    padding: 10px;
  }

  .lesson-slide {
    height: auto;
    min-height: 100%;
  }

  .slide-panel,
  .cover-slide {
    overflow: visible;
    padding: 19px;
  }

  .slide-heading {
    margin-bottom: 15px;
  }

  .slide-heading h1,
  .cover-copy h1 {
    font-size: 34px;
  }

  .slide-heading p,
  .cover-copy > p {
    font-size: 18px;
    line-height: 1.55;
  }

  .slide-number {
    font-size: 38px;
  }

  .cover-slide {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .cover-slide.stage-cover {
    min-height: 620px;
    align-content: center;
    padding: 14px;
    overflow: hidden;
  }

  .stage-cover .cover-atmosphere {
    background:
      linear-gradient(90deg, rgba(2, 9, 20, 0.75), rgba(3, 11, 23, 0.3)),
      linear-gradient(0deg, rgba(0, 5, 14, 0.75), transparent 60%);
  }

  .stage-cover .cover-copy {
    width: 100%;
    padding: 25px 22px;
  }

  .stage-cover .cover-copy-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 24px;
  }

  .stage-cover .cover-facts {
    margin-top: 20px;
  }

  .stage-cover .cover-caption {
    margin-top: 25px;
  }

  .stage-cover .cover-stage-number {
    right: 24px;
    bottom: 24px;
    font-size: 82px;
  }

  .completion-dialog {
    min-height: 0;
    max-height: calc(100vh - 32px);
    padding: 34px 22px;
    overflow-y: auto;
  }

  .completion-mark {
    width: 62px;
    height: 62px;
    font-size: 26px;
  }

  .completion-close {
    min-width: 0;
    width: 100%;
  }

  .cover-visual {
    height: 300px;
    overflow: hidden;
  }

  .cover-visual::before {
    width: 270px;
  }

  .cover-visual-label {
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    font-size: 11px;
  }

  .history-layout,
  .category-grid,
  .loop-layout,
  .challenge-grid,
  .future-layout,
  .mission-grid,
  .mission-flow-slide,
  .brief-layout,
  .anatomy-layout,
  .family-layout,
  .hardware-grid,
  .safe-assembly-layout,
  .quest-layout,
  .safety-quest-layout,
  .motion-layout,
  .ai-learning-layout,
  .showcase-layout,
  .result-layout {
    height: auto;
  }

  .timeline-tabs {
    display: flex;
    overflow-x: auto;
  }

  .timeline-tab {
    min-width: 96px;
  }

  .history-detail,
  .loop-demo,
  .brief-layout,
  .anatomy-layout,
  .family-stage,
  .assembly-focus,
  .quest-layout,
  .safety-quest-layout,
  .safe-assembly-layout,
  .motion-layout,
  .showcase-layout,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .history-detail {
    min-height: 560px;
  }

  .history-panorama {
    height: 54%;
    object-position: calc(var(--era-index) * 25%) center;
  }

  .history-detail::after {
    bottom: 46%;
  }

  .history-era-focus {
    bottom: 46%;
  }

  .history-copy,
  .history-copy.is-right {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    padding: 17px;
  }

  .history-copy h2 {
    font-size: 30px;
  }

  .history-copy p {
    font-size: 17px;
  }

  .history-orbit {
    width: 240px;
  }

  .category-grid,
  .hardware-grid,
  .mission-grid,
  .challenge-grid,
  .ai-learning-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .family-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .family-tab {
    min-width: 130px;
  }

  .family-visual {
    min-height: 260px;
  }

  .family-copy {
    padding: 20px;
  }

  .hardware-card {
    min-height: 340px;
  }

  .quest-canvas {
    height: auto;
    aspect-ratio: 1200 / 540;
  }

  .quest-brief {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
  }

  .quest-brief > h2 {
    grid-column: 1;
    grid-row: 1;
  }

  .quest-brief > p:not(.quest-feedback) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .quest-score {
    grid-column: 2;
    grid-row: 1;
  }

  .quest-feedback {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .safety-quest-visual {
    min-height: 320px;
  }

  .assembly-focus figure {
    min-height: 250px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .category-card,
  .mission-card {
    min-height: 180px;
  }

  .category-detail-bar,
  .future-choice,
  .prompt-formula {
    grid-column: 1;
  }

  .future-choice {
    flex-wrap: wrap;
  }

  .future-layout {
    min-height: 630px;
  }

  .future-vision {
    min-height: 500px;
  }

  .future-story {
    right: 18px;
    width: auto;
  }

  .future-tabs {
    display: flex;
    overflow-x: auto;
  }

  .future-chip {
    min-width: 150px;
  }

  .future-challenges {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(140px, auto));
  }

  .loop-layout {
    grid-template-columns: 1fr;
  }

  .loop-demo {
    min-height: 620px;
  }

  .loop-steps {
    grid-template-columns: repeat(4, minmax(82px, 1fr));
    overflow-x: auto;
  }

  .loop-step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .loop-step small {
    display: none;
  }

  .embodied-ai-visual {
    top: 0;
    bottom: auto;
    height: 55%;
    min-height: 330px;
  }

  .loop-copy {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
  }

  .mission-flow {
    grid-template-columns: 1fr;
  }

  .flow-step:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -28px;
    transform: translateX(50%) rotate(90deg);
  }

  .mission-form {
    grid-template-columns: 1fr;
  }

  .mission-form h2,
  .mission-form .form-actions {
    grid-column: 1;
  }

  .robot-photo {
    height: 330px;
  }

  .body-parts {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .part-card {
    min-height: 98px;
  }

  .action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sequence-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .robot-preview {
    min-height: 320px;
  }

  .ai-era-card {
    grid-template-columns: 1fr;
  }

  .ai-era-orbit {
    min-height: 190px;
  }

  .slide-controller {
    width: 100%;
    overflow: hidden;
    grid-template-columns: 1fr auto 1fr;
    gap: 7px;
    padding: 7px 9px;
  }

  .slide-nav-button {
    min-width: 0;
    min-height: 43px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .slide-dots {
    gap: 5px;
  }

  .slide-dot {
    width: 8px;
    height: 8px;
  }

  .slide-dot.is-active {
    width: 20px;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  :root {
    --topbar-height: 56px;
    --controller-height: 58px;
  }

  .outline-header,
  .coach-header {
    min-height: 62px;
  }

  .presentation-canvas {
    padding: 14px;
  }

  .slide-heading {
    margin-bottom: 12px;
  }

  .slide-heading h1,
  .cover-copy h1 {
    font-size: clamp(32px, 3.2vw, 46px);
  }

  .slide-heading p,
  .cover-copy > p {
    font-size: clamp(16px, 1.25vw, 20px);
  }

  .cover-slide,
  .slide-panel {
    padding: 22px;
  }

  .coach-section {
    margin-top: 7px;
    padding: 9px 11px;
  }

  .coach-section p,
  .coach-section li {
    font-size: 11px;
  }

  .history-layout {
    height: calc(100% - 96px);
    gap: 10px;
  }

  .timeline-tab {
    min-height: 48px;
    padding: 6px 9px;
  }

  .history-copy {
    bottom: 14px;
    left: 14px;
    width: min(49%, 420px);
    padding: 13px 15px;
  }

  .history-copy.is-right {
    right: 14px;
    left: auto;
  }

  .history-copy h2 {
    margin-block: 5px 7px;
    font-size: clamp(25px, 2.4vw, 34px);
  }

  .history-copy p {
    font-size: clamp(14px, 1.15vw, 17px);
    line-height: 1.42;
  }

  .history-capability {
    margin-top: 9px;
    padding-top: 8px;
  }

  .safety-quest-card {
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    padding: 15px;
  }

  .safety-quest-card h2 {
    font-size: clamp(22px, 2vw, 28px);
  }

  .safety-choice {
    min-height: 44px;
    padding: 8px 11px;
    font-size: 15px;
  }

  .safety-answer {
    padding: 8px 10px;
  }

  .safety-answer p,
  .safety-hint {
    font-size: 12px;
  }

  .safety-next {
    min-height: 36px;
    padding-block: 6px;
  }
}

/* Classroom projection readability
   Keep lesson content readable from the back of a classroom. Decorative numbers
   may stay compact, but teaching copy and controls use presentation-scale type. */
.lesson-slide .slide-kicker {
  font-size: clamp(16px, 1.1vw, 19px);
}

.lesson-slide .cover-copy .cover-stage,
.lesson-slide .cover-facts span {
  font-size: clamp(15px, 1vw, 17px);
}

.lesson-slide .cover-series {
  font-size: 14px;
}

.lesson-slide .cover-caption strong {
  font-size: clamp(16px, 1.15vw, 19px);
}

.lesson-slide .timeline-tab,
.lesson-slide .choice-tab,
.lesson-slide .photo-tab,
.lesson-slide .family-view-switch button,
.lesson-slide .future-mode-switch button {
  font-size: clamp(15px, 1vw, 17px);
}

.lesson-slide .timeline-tab > span {
  font-size: 14px;
}

.lesson-slide .timeline-tab > strong {
  font-size: clamp(15px, 1.05vw, 18px);
}

.lesson-slide .history-era-meta small,
.lesson-slide .history-capability small,
.lesson-slide .history-capability strong {
  font-size: clamp(15px, 1vw, 17px);
}

.lesson-slide .category-card footer,
.lesson-slide .mission-card footer,
.lesson-slide .family-visual figcaption,
.lesson-slide .family-copy small,
.lesson-slide .embodied-ai-visual figcaption {
  font-size: 15px;
}

.lesson-slide .category-detail-bar,
.lesson-slide .challenge-card p,
.lesson-slide .future-story p,
.lesson-slide .flow-safety,
.lesson-slide .brief-prompts li,
.lesson-slide .hardware-copy p,
.lesson-slide .safety-item,
.lesson-slide .quest-brief p,
.lesson-slide .check-list label,
.lesson-slide .reflection-list li,
.lesson-slide .result-row strong,
.lesson-slide .story-card p {
  font-size: clamp(17px, 1.15vw, 20px);
}

.lesson-slide .loop-step strong {
  font-size: 18px;
}

.lesson-slide .loop-step small,
.lesson-slide .loop-copy > span,
.lesson-slide .loop-question small,
.lesson-slide .future-story > span,
.lesson-slide .flow-step span,
.lesson-slide .flow-step small,
.lesson-slide .part-card span,
.lesson-slide .hardware-copy span,
.lesson-slide .assembly-focus span,
.lesson-slide .quest-brief > span,
.lesson-slide .safety-quest-card > span,
.lesson-slide .story-card span {
  font-size: 15px;
}

.lesson-slide .loop-copy p {
  font-size: clamp(17px, 1.2vw, 20px);
}

.lesson-slide .ai-object-box {
  font-size: 14px;
}

.lesson-slide .ai-thought-node {
  min-width: 64px;
  font-size: 14px;
}

.lesson-slide .future-chip strong {
  font-size: 17px;
}

.lesson-slide .future-chip small {
  font-size: 14px;
}

.lesson-slide .field label {
  font-size: 16px;
}

.lesson-slide .field input,
.lesson-slide .field textarea {
  font-size: 17px;
  line-height: 1.5;
}

.lesson-slide .primary-action,
.lesson-slide .secondary-action,
.lesson-slide .assembly-tab {
  min-height: 46px;
  font-size: 16px;
}

.lesson-slide .safety-item span {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.lesson-slide .quest-brief > small,
.lesson-slide .quest-score small {
  font-size: 14px;
}

.lesson-slide .quest-feedback {
  padding: 9px 12px;
  font-size: 16px !important;
  line-height: 1.5;
}

.lesson-slide .safety-quest-visual figcaption,
.lesson-slide .safety-visual-label {
  font-size: 15px;
}

.lesson-slide .safety-quest-card {
  overflow-y: auto;
}

.lesson-slide .safety-choice {
  min-height: 60px;
  font-size: clamp(18px, 1.25vw, 21px);
  line-height: 1.4;
}

.lesson-slide .safety-answer p,
.lesson-slide .safety-hint {
  font-size: 17px;
}

.lesson-slide .motion-palette {
  gap: 5px;
  padding: 16px;
  overflow-y: auto;
}

.lesson-slide .motion-palette-heading h2,
.lesson-slide .motion-stage-heading h2 {
  font-size: clamp(21px, 1.55vw, 25px);
}

.lesson-slide .motion-palette-heading small,
.lesson-slide .motion-sequence-heading small {
  font-size: 15px;
  line-height: 1.45;
}

.lesson-slide .action-buttons {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.lesson-slide .action-button {
  min-height: 58px;
  flex-direction: column;
  gap: 3px;
  padding: 7px 5px;
  font-size: 15px;
  line-height: 1.3;
}

.lesson-slide .motion-sequence {
  min-height: 105px;
  padding: 7px;
}

.lesson-slide .motion-sequence-heading > span {
  font-size: 15px;
}

.lesson-slide .sequence-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 3px;
}

.lesson-slide .sequence-chip {
  flex: 0 0 max(112px, calc((100% - 12px) / 3));
  min-height: 56px;
  grid-template-columns: 31px 22px minmax(0, 1fr);
  gap: 7px;
  padding: 7px;
  font-size: 14px;
}

.lesson-slide .sequence-number {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.lesson-slide .sequence-emoji {
  font-size: 18px;
}

.lesson-slide .sequence-controls button {
  width: 28px;
  height: 28px;
  font-size: 15px;
}

.lesson-slide .motion-empty {
  flex: 1 0 100%;
  font-size: 15px;
  line-height: 1.45;
}

.lesson-slide .motion-empty strong {
  font-size: 18px;
}

.lesson-slide .studio-launch {
  min-height: 46px;
}

.lesson-slide .studio-launch small {
  font-size: 14px;
}

.lesson-slide .studio-launch strong {
  font-size: 17px;
}

.lesson-slide .motion-stage-heading > span,
.lesson-slide .stage-status {
  font-size: 14px;
}

.lesson-slide .preview-caption {
  min-height: 46px;
  font-size: 15px;
  line-height: 1.45;
}

.lesson-slide .ai-era-tabs button {
  min-height: 54px;
  font-size: 16px;
}

.lesson-slide .ai-era-tabs button span,
.lesson-slide .ai-era-copy > span,
.lesson-slide .ai-class-quiz header > span {
  font-size: 14px;
}

.lesson-slide .ai-era-copy > p {
  font-size: clamp(17px, 1.1vw, 19px);
}

.lesson-slide .ai-tool-row b {
  font-size: 14px;
}

.lesson-slide .ai-era-copy dl > div {
  grid-template-columns: 76px minmax(0, 1fr);
}

.lesson-slide .ai-era-copy dt {
  font-size: 14px;
}

.lesson-slide .ai-era-copy dd {
  font-size: 15px;
}

.lesson-slide .ai-class-quiz {
  overflow-y: auto;
}

.lesson-slide .ai-class-quiz header p,
.lesson-slide .ai-quiz-hint {
  font-size: 14px;
}

.lesson-slide .ai-class-quiz h3 {
  font-size: clamp(19px, 1.4vw, 23px);
}

.lesson-slide .ai-quiz-choices button {
  min-height: 52px;
  font-size: 16px;
  line-height: 1.4;
}

.lesson-slide .ai-quiz-feedback,
.lesson-slide .ai-quiz-next {
  font-size: 15px;
}

.lesson-slide .result-row span {
  font-size: 16px;
}

.lesson-slide .completion-trigger > span,
.completion-dialog > small {
  font-size: 14px;
}

.completion-dialog > p {
  font-size: clamp(18px, 1.4vw, 21px);
}

.completion-badges span {
  font-size: 15px;
}

.completion-close {
  min-height: 50px;
  font-size: 16px;
}

@media (max-width: 760px) {
  .lesson-slide .action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  .lesson-slide .motion-palette {
    grid-template-rows: auto auto minmax(92px, 1fr) auto auto;
    gap: 4px;
    padding: 14px;
  }

  .lesson-slide .action-button {
    min-height: 52px;
    padding-block: 4px;
  }

  .lesson-slide .motion-sequence {
    min-height: 92px;
    gap: 4px;
    padding: 5px;
  }

  .lesson-slide .motion-empty {
    min-height: 52px;
  }

  .lesson-slide .studio-launch {
    min-height: 46px;
    padding-block: 4px;
  }
}

.course-app.is-presentation-mode .lesson-slide .slide-kicker,
.course-app.is-presentation-mode .lesson-slide :is(
  .history-era-meta small,
  .history-capability small,
  .history-capability strong,
  .category-card footer,
  .mission-card footer,
  .family-visual figcaption,
  .family-copy small,
  .loop-step small,
  .loop-copy > span,
  .loop-question small,
  .future-story > span,
  .flow-step span,
  .flow-step small,
  .part-card span,
  .hardware-copy span,
  .assembly-focus span,
  .quest-brief > span,
  .safety-quest-card > span,
  .safety-quest-visual figcaption,
  .safety-visual-label,
  .motion-palette-heading small,
  .motion-sequence-heading small,
  .motion-sequence-heading > span,
  .studio-launch small,
  .motion-stage-heading > span,
  .stage-status,
  .ai-era-copy > span,
  .ai-class-quiz header > span,
  .ai-class-quiz header p,
  .ai-quiz-hint,
  .story-card span
) {
  font-size: 17px;
}

.course-app.is-presentation-mode .lesson-slide :is(
  .category-detail-bar,
  .challenge-card p,
  .future-story p,
  .flow-safety,
  .brief-prompts li,
  .hardware-copy p,
  .safety-item,
  .quest-brief p,
  .safety-answer p,
  .safety-hint,
  .ai-era-copy > p,
  .check-list label,
  .reflection-list li,
  .result-row strong,
  .story-card p
) {
  font-size: clamp(20px, 1.55vw, 25px);
}

@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;
  }
}
