﻿:root {
  color-scheme: dark;
  --bg: #06151d;
  --bg-deep: #041017;
  --panel: rgba(8, 27, 36, 0.82);
  --panel-solid: #0b222d;
  --panel-soft: rgba(17, 46, 57, 0.68);
  --line: rgba(154, 222, 218, 0.15);
  --line-strong: rgba(154, 222, 218, 0.3);
  --text: #effbfa;
  --muted: #8ba9b0;
  --muted-strong: #b8ced1;
  --teal: #59e0c8;
  --teal-soft: #88f1dc;
  --coral: #ff9a79;
  --gold: #f5c66d;
  --blue: #72baff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 4%, rgba(28, 120, 115, 0.2), transparent 30rem),
    radial-gradient(circle at 88% 90%, rgba(60, 86, 137, 0.22), transparent 34rem),
    linear-gradient(145deg, #071922 0%, #051119 56%, #071923 100%);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

button {
  border: 0;
  cursor: pointer;
}

.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;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.ambient-one {
  top: 12%;
  left: 13%;
  width: 25rem;
  height: 25rem;
  background: radial-gradient(circle, rgba(61, 208, 188, 0.07), transparent 70%);
}

.ambient-two {
  right: -8rem;
  bottom: -9rem;
  width: 36rem;
  height: 36rem;
  background: radial-gradient(circle, rgba(255, 154, 121, 0.06), transparent 70%);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 26px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(89, 224, 200, 0.35);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(89, 224, 200, 0.15), rgba(89, 224, 200, 0.03));
  box-shadow: inset 0 0 18px rgba(89, 224, 200, 0.08);
}

.brand-mark span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 11px rgba(89, 224, 200, 0.8);
}

.brand-mark span:nth-child(1) {
  top: 11px;
  left: 12px;
}

.brand-mark span:nth-child(2) {
  right: 11px;
  bottom: 11px;
}

.brand-mark span:nth-child(3) {
  top: 17px;
  left: 23px;
  width: 4px;
  height: 4px;
  background: var(--coral);
  box-shadow: 0 0 9px rgba(255, 154, 121, 0.9);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 17px;
  height: 1px;
  content: "";
  background: rgba(89, 224, 200, 0.68);
  transform-origin: left center;
}

.brand-mark::before {
  top: 15px;
  left: 15px;
  transform: rotate(34deg);
}

.brand-mark::after {
  top: 22px;
  left: 24px;
  width: 12px;
  transform: rotate(55deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.lesson-chip {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 13px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 31, 40, 0.54);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.lesson-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px var(--teal);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 17px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 42, 52, 0.72);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.control-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(21, 59, 70, 0.88);
  transform: translateY(-1px);
}

.control-button.primary {
  color: #052019;
  border-color: rgba(89, 224, 200, 0.74);
  background: linear-gradient(135deg, #91f5df, #4dd5bc);
  box-shadow: 0 8px 26px rgba(29, 163, 140, 0.18);
}

.control-button.primary:hover {
  color: #031b16;
  background: linear-gradient(135deg, #adffe9, #5ce4c8);
}

.control-button.primary.is-running {
  color: var(--text);
  border-color: rgba(255, 154, 121, 0.35);
  background: rgba(255, 154, 121, 0.13);
  box-shadow: none;
}

.control-button.icon-only {
  width: 42px;
  padding: 0;
}

.control-button[aria-pressed="false"] {
  color: rgba(139, 169, 176, 0.55);
  background: rgba(7, 25, 32, 0.58);
}

.button-icon.play-icon {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.is-running .play-icon {
  width: 9px;
  height: 10px;
  border: 0;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.label-icon {
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.reset-icon {
  font-size: 21px;
  line-height: 1;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 20px;
  flex: 1;
  min-height: 0;
  padding: 20px 0 14px;
}

.stage-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(13, 39, 49, 0.72), rgba(6, 23, 31, 0.84)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 18px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stage-heading h1 {
  margin: 0;
  font-family: "STSong", "SimSun", Georgia, serif;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.phase-badge {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 106px;
  padding: 7px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 19, 26, 0.5);
}

.phase-badge span:first-child {
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 14px;
}

.phase-badge span:last-child {
  font-size: 15px;
  font-weight: 600;
}

.viewport {
  position: relative;
  touch-action: none;
  min-height: 430px;
  margin: 0 16px;
  overflow: hidden;
  border: 1px solid rgba(127, 213, 207, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 52% 43%, rgba(31, 104, 113, 0.18), transparent 32%),
    radial-gradient(circle at 50% 92%, rgba(56, 155, 156, 0.08), transparent 38%),
    linear-gradient(180deg, #071b25, #061720 70%, #081b23);
  isolation: isolate;
}

.viewport::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(89, 224, 200, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(89, 224, 200, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 48%, #000 10%, transparent 72%);
}

#sceneCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#sceneCanvas:active {
  cursor: grabbing;
}

.viewport-grid {
  position: absolute;
  right: 18px;
  bottom: 12px;
  z-index: 1;
  width: 180px;
  height: 90px;
  opacity: 0.22;
  border-right: 1px solid var(--teal);
  border-bottom: 1px solid var(--teal);
  transform: perspective(170px) rotateX(62deg);
  transform-origin: bottom;
}

.label-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.model-label {
  --label-color: var(--teal);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 7px;
  white-space: nowrap;
  color: #dceeed;
  border: 1px solid color-mix(in srgb, var(--label-color) 32%, transparent);
  border-radius: 999px;
  background: rgba(5, 23, 30, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(9px);
  font-size: 10px;
  letter-spacing: 0.03em;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
}

.model-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--label-color);
  box-shadow: 0 0 9px var(--label-color);
}

.viewport-status {
  position: absolute;
  top: 17px;
  left: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(89, 224, 200, 0.08);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(89, 224, 200, 0.02);
    opacity: 0.72;
  }
}

.count-panel {
  position: absolute;
  top: 16px;
  right: 17px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 13px;
  align-items: end;
  padding: 9px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 22, 29, 0.76);
  backdrop-filter: blur(12px);
}

.count-panel > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 42px;
}

.count-label {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.count-panel strong {
  color: var(--teal-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
}

.count-panel > div:nth-child(2) strong {
  color: var(--coral);
}

.count-scope {
  position: absolute;
  right: 12px;
  bottom: -17px;
  color: rgba(139, 169, 176, 0.74);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.camera-hint {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(178, 208, 211, 0.62);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.camera-hint span {
  color: var(--teal);
  font-size: 13px;
}

.narration {
  position: absolute;
  bottom: 15px;
  left: 18px;
  z-index: 4;
  max-width: min(430px, 54%);
  padding: 11px 14px 11px 13px;
  border-left: 2px solid var(--teal);
  background: linear-gradient(90deg, rgba(4, 22, 29, 0.88), rgba(4, 22, 29, 0.52));
  backdrop-filter: blur(9px);
}

.narration-kicker {
  color: var(--teal);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.narration p {
  margin: 4px 0 0;
  color: #dce9e9;
  font-size: 11px;
  line-height: 1.65;
}

.timeline-card {
  padding: 17px 26px 20px;
}

.timeline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.timeline-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.timeline-heading span {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.timeline-heading small {
  color: var(--muted);
  font-size: 9px;
}

#progressLabel {
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.range-wrap {
  position: relative;
  height: 30px;
  margin-bottom: 4px;
}

.range-track-glow {
  position: absolute;
  pointer-events: none;
  top: 14px;
  left: 8.3333%;
  right: 8.3333%;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(152, 208, 207, 0.16);
}

.range-track-glow::after {
  display: block;
  width: var(--range-progress, 0%);
  height: 100%;
  content: "";
  background: linear-gradient(90deg, var(--teal), #d2f6d3);
  box-shadow: 0 0 8px var(--teal);
}

#timeline {
  position: absolute;
  top: 0;
  right: 8.3333%;
  bottom: 0;
  left: 8.3333%;
  z-index: 3;
  width: auto;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: grab;
  touch-action: none;
}

#timeline:active {
  cursor: grabbing;
}

.range-wrap::after {
  position: absolute;
  pointer-events: none;
  top: 9px;
  left: calc(8.3333% + var(--range-progress, 0%) * 0.833334);
  width: 8px;
  height: 8px;
  border: 2px solid #dffcf5;
  border-radius: 50%;
  content: "";
  background: var(--teal);
  box-shadow: 0 0 13px rgba(89, 224, 200, 0.85);
  transform: translateX(-50%);
}

.phase-nav {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.phase-step {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 34px;
  padding: 7px 3px;
  color: rgba(167, 196, 199, 0.58);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.phase-step:hover {
  color: var(--text);
  background: rgba(107, 211, 200, 0.06);
}

.phase-step span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
}

.phase-step strong {
  font-size: 10px;
  font-weight: 500;
}

.phase-step.is-past {
  color: rgba(187, 221, 220, 0.8);
}

.phase-step.is-active {
  color: var(--teal-soft);
  border-color: rgba(89, 224, 200, 0.23);
  background: rgba(89, 224, 200, 0.09);
}

.phase-step.is-active::after {
  position: absolute;
  bottom: -11px;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  content: "";
  background: var(--teal);
  box-shadow: 0 0 7px var(--teal);
}

.lesson-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(15, 42, 51, 0.9), rgba(7, 25, 33, 0.94));
  box-shadow: var(--shadow);
}

.lesson-scroll {
  min-height: 0;
  padding: 25px 25px 18px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(89, 224, 200, 0.2) transparent;
}

.section-kicker {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.section-line {
  height: 1px;
  background: var(--line);
}

#sectionPercent {
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
}

.phase-title {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 22px;
}

.phase-number {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--teal);
  border: 1px solid rgba(89, 224, 200, 0.25);
  border-radius: 15px;
  background: rgba(89, 224, 200, 0.055);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
}

.phase-title p {
  margin: 0 0 2px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
  letter-spacing: 0.17em;
}

.phase-title h2 {
  margin: 0;
  font-family: "STSong", "SimSun", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.phase-summary {
  margin: 18px 0 0;
  color: #c3d7d8;
  font-size: 13px;
  line-height: 1.86;
}

.key-points {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.key-points li {
  position: relative;
  padding-left: 17px;
  color: #d7e7e7;
  font-size: 12px;
  line-height: 1.7;
}

.key-points li::before {
  position: absolute;
  top: 0.62em;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--teal);
  box-shadow: 0 0 7px rgba(89, 224, 200, 0.58);
}

.task-block {
  display: flex;
  gap: 13px;
  margin-top: 22px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 23, 30, 0.46);
}

.task-icon {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(89, 224, 200, 0.24);
  border-radius: 50%;
}

.task-icon span:first-child {
  position: absolute;
  top: 7px;
  left: 12px;
  width: 1px;
  height: 9px;
  background: var(--teal);
}

.task-icon span:last-child {
  position: absolute;
  top: 15px;
  left: 12px;
  width: 6px;
  height: 1px;
  background: var(--teal);
  transform: rotate(43deg);
  transform-origin: left center;
}

.block-label {
  display: block;
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.task-block p,
.concept-block p {
  margin: 6px 0 0;
  color: #bad0d2;
  font-size: 11px;
  line-height: 1.72;
}

.concept-block {
  margin-top: 12px;
  padding: 3px 0 3px 15px;
  border-left: 1px solid var(--coral);
}

.concept-block .block-label {
  color: var(--coral);
}

.quiz-block {
  margin-top: 24px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.quiz-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quiz-heading h3 {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.quiz-counter {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
}

.quiz-question {
  margin: 14px 0 11px;
  color: #d8e8e7;
  font-size: 12px;
  line-height: 1.7;
}

.quiz-options {
  display: grid;
  gap: 7px;
}

.quiz-option {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 35px;
  padding: 8px 10px;
  color: #b8cdcf;
  border: 1px solid rgba(148, 208, 205, 0.12);
  border-radius: 9px;
  background: rgba(5, 22, 29, 0.42);
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.quiz-option:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(89, 224, 200, 0.28);
  background: rgba(89, 224, 200, 0.06);
}

.quiz-option span {
  display: grid;
  flex: 0 0 19px;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(157, 203, 201, 0.2);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
}

.quiz-option.is-correct {
  color: #dffcf1;
  border-color: rgba(89, 224, 200, 0.45);
  background: rgba(89, 224, 200, 0.1);
}

.quiz-option.is-wrong {
  color: #ffd8cd;
  border-color: rgba(255, 154, 121, 0.38);
  background: rgba(255, 154, 121, 0.08);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-feedback {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.quiz-feedback.is-correct {
  color: var(--teal-soft);
}

.quiz-feedback.is-wrong {
  color: #ffb7a3;
}

.lesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 25px 18px;
  border-top: 1px solid var(--line);
  background: rgba(5, 21, 28, 0.38);
}

.next-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-width: 190px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--teal-soft);
  border: 1px solid rgba(89, 224, 200, 0.24);
  border-radius: 11px;
  background: rgba(89, 224, 200, 0.07);
  font-size: 11px;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.next-button:hover {
  border-color: rgba(89, 224, 200, 0.46);
  background: rgba(89, 224, 200, 0.12);
}

.lesson-footer p {
  margin: 0;
  color: rgba(139, 169, 176, 0.62);
  font-size: 8px;
  text-align: right;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 42px;
  padding: 8px 0 14px;
  color: rgba(139, 169, 176, 0.58);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p::before {
  margin-right: 20px;
  color: rgba(139, 169, 176, 0.3);
  content: "·";
}

.site-footer button {
  padding: 0;
  color: rgba(158, 213, 207, 0.8);
  background: none;
  font-size: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.method-dialog {
  width: min(540px, calc(100vw - 32px));
  padding: 0;
  color: var(--text);
  border: 1px solid rgba(133, 222, 213, 0.22);
  border-radius: 20px;
  background: #0a232d;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.55);
}

.method-dialog::backdrop {
  background: rgba(2, 10, 14, 0.76);
  backdrop-filter: blur(8px);
}

.method-dialog form {
  position: relative;
  padding: 28px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 31px;
  height: 31px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 21px;
  line-height: 1;
}

.method-dialog h2 {
  margin: 8px 0 13px;
  font-family: "STSong", "SimSun", serif;
  font-size: 24px;
  font-weight: 600;
}

.method-dialog p {
  color: #bad0d2;
  font-size: 12px;
  line-height: 1.8;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.method-grid div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(5, 21, 28, 0.38);
}

.method-grid strong {
  color: var(--teal);
  font-size: 11px;
}

.method-grid span {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.55;
}

.method-note + .method-note {
  margin-top: 12px;
}

.method-note {
  margin-bottom: 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: 10px !important;
}

.webgl-fallback {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid rgba(255, 154, 121, 0.32);
  border-radius: 15px;
  background: #102c36;
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%);
}

.webgl-fallback strong {
  color: var(--coral);
}

.webgl-fallback span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.6;
}

.webgl-fallback[hidden] {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    padding: 0 18px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
    gap: 14px;
  }

  .stage-heading {
    padding-right: 20px;
    padding-left: 20px;
  }

  .timeline-card {
    padding-right: 20px;
    padding-left: 20px;
  }

  .lesson-scroll {
    padding-right: 20px;
    padding-left: 20px;
  }

  .lesson-footer {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (max-width: 960px) {
  .app-shell {
    min-height: auto;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .lesson-chip {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    flex: initial;
  }

  .stage-pane {
    min-height: 740px;
  }

  .lesson-pane {
    min-height: 700px;
  }

  .lesson-scroll {
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 0 10px;
  }

  .topbar {
    min-height: 70px;
    gap: 8px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small {
    font-size: 9px;
  }

  .top-actions {
    gap: 5px;
  }

  .control-button {
    min-height: 38px;
  }

  .control-button.primary {
    width: 39px;
    padding: 0;
  }

  .auto-label {
    display: none;
  }

  .control-button.icon-only {
    width: 38px;
  }

  .stage-pane {
    min-height: 620px;
    border-radius: 20px;
  }

  .stage-heading {
    padding: 18px 16px 14px;
  }

  .stage-heading h1 {
    font-size: 23px;
  }

  .eyebrow {
    font-size: 9px;
  }

  .phase-badge {
    min-width: 84px;
    padding: 6px 8px;
  }

  .phase-badge span:last-child {
    font-size: 12px;
  }

  .viewport {
    min-height: 318px;
    margin: 0 9px;
    border-radius: 15px;
  }

  .count-panel {
    top: 11px;
    right: 9px;
    gap: 6px;
    padding: 6px 8px;
    transform: scale(0.9);
    transform-origin: top right;
  }

  .viewport-status {
    top: 12px;
    left: 12px;
    font-size: 8px;
  }

  .narration {
    pointer-events: none;
    right: 10px;
    bottom: 44px;
    left: 10px;
    max-width: none;
  }

  .camera-hint {
    right: 12px;
    bottom: 14px;
    font-size: 9px;
  }

  .model-label {
    font-size: 8px;
  }

  .timeline-card {
    padding: 14px 12px 18px;
  }

  .timeline-heading small {
    display: none;
  }

  .phase-step {
    flex-direction: column;
    gap: 0;
    min-height: 37px;
  }

  .phase-step strong {
    font-size: 9px;
  }

  .lesson-pane {
    min-height: auto;
    border-radius: 20px;
  }

  .lesson-scroll {
    padding: 21px 17px;
  }

  .lesson-footer {
    padding: 14px 17px 17px;
  }

  .lesson-footer p {
    display: none;
  }

  .next-button {
    width: 100%;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 5px 12px;
    padding: 10px 8px 18px;
    text-align: center;
  }

  .site-footer p + p::before {
    display: none;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }
}

.hint-touch {
  display: none;
}

@media (pointer: coarse) {
  .hint-desktop {
    display: none;
  }

  .hint-touch {
    display: inline;
  }
}

@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;
  }
}

/* ===================== 微课工具：录课模式 / 锚点 / 工具条 / 卡片 ===================== */

.record-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.65);
}

.timeline-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
}

.tool-button {
  padding: 5px 11px;
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(120, 178, 178, 0.22);
  border-radius: 8px;
  background: rgba(12, 38, 46, 0.6);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.tool-button:hover {
  color: var(--teal-soft);
  border-color: rgba(89, 224, 200, 0.4);
  background: rgba(20, 56, 62, 0.7);
}

.tool-button.primary {
  color: #04161c;
  font-weight: 600;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), #b8f2df);
}

.tool-button.primary:hover {
  color: #04161c;
  background: linear-gradient(135deg, #7ff0dd, #d5fbec);
}

.speed-group {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(10, 34, 42, 0.66);
}

.speed-group button {
  padding: 3px 8px;
  color: var(--muted);
  font-size: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.speed-group button.is-active {
  color: var(--teal-soft);
  background: rgba(89, 224, 200, 0.16);
}

.anchor-label {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--teal-soft);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 200ms ease;
}

.anchor-label.is-visible {
  opacity: 1;
}

.range-ticks {
  position: absolute;
  top: 0;
  right: 8.3333%;
  left: 8.3333%;
  z-index: 2;
  height: 100%;
  pointer-events: none;
}

.range-ticks span {
  position: absolute;
  top: 19px;
  width: 1px;
  height: 5px;
  background: rgba(152, 208, 207, 0.3);
  transform: translateX(-50%);
}

.range-ticks span.is-major {
  top: 18px;
  height: 7px;
  background: rgba(152, 208, 207, 0.55);
}

@keyframes countPulse {
  0% { transform: scale(1); }
  30% {
    transform: scale(1.055);
    border-color: rgba(89, 224, 200, 0.55);
    box-shadow: 0 0 26px rgba(89, 224, 200, 0.35);
  }
  100% { transform: scale(1); }
}

.count-panel.is-pulse {
  animation: countPulse 1.15s ease;
}

.record-subtitle {
  position: absolute;
  bottom: 16px;
  left: 50%;
  display: flex;
  gap: 14px;
  align-items: baseline;
  max-width: 90%;
  padding: 11px 22px;
  font-size: clamp(15px, 1.35vw, 23px);
  line-height: 1.5;
  border: 1px solid rgba(89, 224, 200, 0.22);
  border-radius: 14px;
  background: rgba(3, 14, 20, 0.86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}

.record-subtitle strong {
  flex: none;
  color: var(--teal-soft);
  font-size: 0.86em;
  letter-spacing: 0.14em;
}

.record-bar {
  position: fixed;
  top: 13px;
  left: 50%;
  z-index: 60;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 9px 7px 14px;
  font-size: 11px;
  color: var(--text);
  border: 1px solid rgba(89, 224, 200, 0.2);
  border-radius: 999px;
  background: rgba(3, 14, 20, 0.88);
  transform: translateX(-50%);
}

.record-bar .record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5f5f;
  box-shadow: 0 0 9px rgba(255, 95, 95, 0.8);
  animation: pulse 1.5s ease-in-out infinite;
}

.record-keys {
  color: var(--muted);
  letter-spacing: 0.02em;
}

.record-bar button {
  padding: 4px 10px;
  color: #04161c;
  font-size: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  cursor: pointer;
}

.overlay-card {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  gap: 14px;
  align-content: center;
  justify-items: start;
  padding: clamp(22px, 4.4vw, 64px);
  overflow: auto;
  background:
    radial-gradient(circle at 26% 14%, rgba(16, 52, 62, 0.94), rgba(3, 13, 19, 0.97) 62%),
    rgba(3, 13, 19, 0.96);
}

.overlay-card[hidden],
.record-bar[hidden],
.record-subtitle[hidden] {
  display: none !important;
}

.overlay-kicker {
  margin: 0;
  color: var(--teal-soft);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.overlay-card h2 {
  margin: 0;
  max-width: 22em;
  text-wrap: balance;
  font-family: "STSong", "SimSun", Georgia, serif;
  font-size: clamp(21px, 2.5vw, 40px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.overlay-lead {
  margin: 0;
  max-width: 40em;
  color: var(--muted);
  font-size: clamp(12px, 0.95vw, 16px);
  line-height: 1.75;
}

.overlay-lead strong {
  color: var(--teal-soft);
}

.overlay-points,
.summary-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.overlay-points li {
  position: relative;
  padding-left: 18px;
  color: rgba(199, 221, 222, 0.86);
  font-size: clamp(11px, 0.9vw, 15px);
  line-height: 2;
}

.overlay-points li::before {
  position: absolute;
  top: 0.85em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--teal);
}

.overlay-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.overlay-actions .tool-button {
  padding: 9px 18px;
  font-size: 12px;
}

.summary-timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 4px 0 2px;
}

.summary-timeline li {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(120, 178, 178, 0.16);
  border-radius: 10px;
  background: rgba(10, 34, 42, 0.5);
}

.summary-timeline b {
  color: var(--teal-soft);
  font-size: clamp(11px, 0.95vw, 15px);
  font-weight: 600;
}

.summary-timeline span {
  color: var(--muted);
  font-size: clamp(9px, 0.72vw, 12px);
  line-height: 1.5;
}

.summary-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.summary-counts div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 178, 178, 0.16);
  border-radius: 10px;
  background: rgba(10, 34, 42, 0.44);
}

.summary-counts span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.summary-counts b {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 1.5vw, 24px);
  letter-spacing: 0.04em;
}

.summary-counts em {
  color: rgba(152, 194, 194, 0.72);
  font-size: 9px;
  font-style: normal;
}

.summary-note {
  margin: 0;
  color: rgba(199, 221, 222, 0.9);
  font-size: clamp(11px, 0.95vw, 15px);
  line-height: 1.7;
}

/* ---------- 录课模式 ---------- */

body.is-recording {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #030d13;
}

body.is-recording .app-shell,
body.is-recording .workspace {
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
}

body.is-recording .topbar,
body.is-recording .site-footer,
body.is-recording .lesson-pane {
  display: none;
}

body.is-recording .app-shell {
  display: block;
  min-height: 100vh;
  padding: 0;
}

body.is-recording .workspace {
  display: block;
  width: 100%;
  padding: 0;
}

body.is-recording .stage-pane {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.is-recording .viewport {
  margin: 0;
  border-radius: 0;
}

body.is-recording .camera-hint,
body.is-recording .viewport-status,
body.is-recording .narration {
  display: none;
}

body.is-recording .stage-heading {
  padding: 10px 26px 2px;
}

body.is-recording .stage-heading .eyebrow {
  font-size: 10px;
}

body.is-recording .stage-heading h1 {
  font-size: clamp(20px, 2vw, 34px);
}

body.is-recording .timeline-card {
  padding: 8px 22px 10px;
}

body.is-recording.cursor-idle,
body.is-recording.cursor-idle * {
  cursor: none !important;
}

@media (max-width: 720px) {
  .timeline-tools {
    flex-wrap: wrap;
    gap: 6px;
  }

  .anchor-label {
    display: none;
  }

  .summary-timeline,
  .summary-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
