/* Classroom demo surfaces follow the App's 402 × 874 lesson geometry. */
#first-lesson .lesson-screen { background: #282828; }
#first-lesson .lesson-screen::before { display: none; }
#first-lesson .lesson-status { z-index: 10; color: #fff; pointer-events: none; }
#first-lesson .lesson-status-icons img { filter: brightness(0) invert(1); }
#first-lesson .lesson-phone { align-self: start; touch-action: pan-y; user-select: none; }
#first-lesson .lesson-gesture-hint { margin-top: 22px; color: #7d8491; font-size: 12px; line-height: 1.5; }
.lesson-classroom {
  --lp: calc(100cqi / 402);
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #282828;
  color: #fff;
  font-family: var(--ui-font);
  animation: none;
}
.lesson-classroom[hidden] { display: none; }
.lesson-classroom p { margin: 0; }
.lesson-room-backdrop { position: absolute; inset: 0; background: url("assets/lesson/classroom/bg1.webp") center / cover; }
.lesson-classroom-role .lesson-room-backdrop { background-image: url("assets/lesson/classroom/course_bg_01.webp"); }
.lesson-teacher-scene { position: absolute; top: calc(9 * var(--lp)); left: calc(-34 * var(--lp)); width: calc(470 * var(--lp)); height: calc(470 * var(--lp)); overflow: hidden; mask: linear-gradient(#000 0 72%, transparent 100%); }
.lesson-teacher-scene > img, .lesson-teacher-scene > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 21%; }
.lesson-avatar-shade { position: absolute; inset: 0; background: linear-gradient(rgb(0 0 0 / 28%) 0, transparent 22%, transparent 36%, rgb(0 0 0 / 25%) 55%, #282828 85%); }
.lesson-ui-nav { position: absolute; z-index: 2; top: calc(68 * var(--lp)); left: calc(20 * var(--lp)); right: calc(20 * var(--lp)); height: calc(44 * var(--lp)); display: flex; align-items: center; justify-content: space-between; }
.lesson-ui-progress { display: block; margin-left: calc(3 * var(--lp)); width: calc(36 * var(--lp)); height: calc(36 * var(--lp)); border-radius: 50%; background: conic-gradient(#fff var(--lesson-progress), rgb(255 255 255 / 30%) 0); mask: radial-gradient(transparent calc(50% - 8 * var(--lp)), #000 calc(50% - 7.5 * var(--lp))); }
.lesson-ui-nav-actions { display: flex; gap: calc(8 * var(--lp)); }
.lesson-ui-nav-button { display: grid; place-items: center; width: calc(44 * var(--lp)); height: calc(44 * var(--lp)); border-radius: 50%; background: rgb(255 255 255 / 20%); }
.lesson-ui-nav-button img { width: calc(24 * var(--lp)); height: calc(24 * var(--lp)); object-fit: contain; }
.lesson-live-subtitle { position: absolute; z-index: 2; top: calc(363 * var(--lp)); left: calc(16 * var(--lp)); right: calc(16 * var(--lp)); color: #fff; font-size: calc(15 * var(--lp)); line-height: calc(20 * var(--lp)); text-align: center; text-shadow: 0 1px 3px rgb(0 0 0 / 40%); }
.lesson-explain-card { position: absolute; left: calc(16 * var(--lp)); right: calc(16 * var(--lp)); top: calc(420 * var(--lp)); height: calc(427 * var(--lp)); border: calc(1 * var(--lp)) solid #67625f; border-radius: calc(40 * var(--lp)); background: linear-gradient(104deg, rgb(255 255 255 / 20%) 6.53%, rgb(153 153 153 / 20%) 98.72%), #25211e; }
.lesson-explain-sentence { position: absolute; inset: calc(28 * var(--lp)) calc(22 * var(--lp)) calc(116 * var(--lp)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: calc(36 * var(--lp)); font-weight: 600; line-height: calc(50 * var(--lp)); text-align: center; white-space: normal; }
.lesson-explain-sentence > p { margin: 0; }
.lesson-blue-highlight { color: #88caff; }
.lesson-yellow-highlight { color: #ffe191; }
.lesson-skip { position: absolute; left: 0; right: 0; bottom: calc(78 * var(--lp)); color: rgb(255 255 255 / 40%); font-size: calc(16 * var(--lp)); line-height: calc(19 * var(--lp)); text-align: center; }
.lesson-playback-controls { position: absolute; left: calc(24 * var(--lp)); right: calc(24 * var(--lp)); bottom: calc(16 * var(--lp)); height: calc(48 * var(--lp)); display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--lp)); }
.lesson-playback-controls > span { display: grid; place-items: center; width: calc(81 * var(--lp)); height: calc(48 * var(--lp)); border: calc(1 * var(--lp)) solid rgb(255 255 255 / 8%); border-radius: calc(30 * var(--lp)); background: rgb(255 255 255 / 8%); }
.lesson-playback-controls > span:nth-child(2) { width: calc(108 * var(--lp)); }
.lesson-playback-controls img { width: calc(26 * var(--lp)); height: calc(26 * var(--lp)); object-fit: contain; }
.lesson-classroom-drill {
  --drill-success-text: #00ca47;
  background: #282828;
}
.lesson-drill-instruction { position: absolute; top: calc(140 * var(--lp)); left: calc(20 * var(--lp)); right: calc(20 * var(--lp)); display: flex; align-items: center; gap: calc(12 * var(--lp)); height: calc(44 * var(--lp)); }
.lesson-drill-avatar { display: block; flex: none; width: calc(44 * var(--lp)); height: calc(44 * var(--lp)); overflow: hidden; border-radius: 50%; background: #a9cee9; }
.lesson-drill-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 21%; transform: scale(1.15); }
.lesson-drill-instruction p { color: rgb(255 255 255 / 60%); font-size: calc(16 * var(--lp)); line-height: calc(22 * var(--lp)); }
.lesson-drill-card { position: absolute; top: calc(204 * var(--lp)); left: calc(20 * var(--lp)); right: calc(20 * var(--lp)); height: calc(522 * var(--lp)); border: calc(1 * var(--lp)) solid rgb(255 255 255 / 16%); border-radius: calc(40 * var(--lp)); background: rgb(255 255 255 / 8%); }
.lesson-drill-sentence { color: #fff; font-size: calc(36 * var(--lp)); font-weight: 600; line-height: calc(50 * var(--lp)); text-align: center; }
.lesson-drill-translation { position: absolute; top: calc(298 * var(--lp)); left: calc(18 * var(--lp)); right: calc(18 * var(--lp)); color: rgb(255 255 255 / 50%); font-size: calc(16 * var(--lp)); line-height: calc(24 * var(--lp)); text-align: center; }
.lesson-drill-replay { position: absolute; right: calc(24 * var(--lp)); bottom: calc(24 * var(--lp)); width: calc(24 * var(--lp)); height: calc(24 * var(--lp)); opacity: .75; }
.lesson-drill-replay img { width: 100%; height: auto; }
.lesson-cannot-speak { position: absolute; top: calc(758 * var(--lp)); inset-inline: 0; color: rgb(255 255 255 / 60%); font-size: calc(15 * var(--lp)); line-height: calc(19 * var(--lp)); text-align: center; }
.lesson-speak-button { position: absolute; left: calc(20 * var(--lp)); right: calc(20 * var(--lp)); top: calc(797 * var(--lp)); display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--lp)); height: calc(50 * var(--lp)); border-radius: calc(50 * var(--lp)); background: rgb(0 161 255 / 90%); color: #fff; font-size: calc(17 * var(--lp)); line-height: calc(25 * var(--lp)); font-weight: 600; }
.lesson-speak-button img { width: calc(24 * var(--lp)); height: calc(24 * var(--lp)); object-fit: contain; }
.lesson-classroom-role .lesson-ui-nav > strong { font-size: calc(20 * var(--lp)); line-height: calc(24 * var(--lp)); font-weight: 700; }
.lesson-classroom-role .lesson-teacher-scene { top: calc(10 * var(--lp)); }
.lesson-classroom-role .lesson-avatar-shade { background: linear-gradient(rgb(0 0 0 / 30%) 0, transparent 22%, rgb(40 40 40 / 55%) 40%, #282828 70%); }
.lesson-dialogue { position: absolute; z-index: 1; top: calc(300 * var(--lp)); left: calc(20 * var(--lp)); right: calc(20 * var(--lp)); display: flex; flex-direction: column; gap: calc(12 * var(--lp)); }
.lesson-dialogue-message { max-width: 85%; padding: calc(14 * var(--lp)) calc(16 * var(--lp)); border-radius: calc(20 * var(--lp)); background: #272729; }
.lesson-dialogue-message > p:first-child { font-size: calc(17 * var(--lp)); line-height: calc(25 * var(--lp)); color: #fff; }
.lesson-dialogue-message > p + p { margin-top: calc(8 * var(--lp)); color: rgb(255 255 255 / 55%); font-size: calc(14 * var(--lp)); line-height: calc(20 * var(--lp)); }
.lesson-dialogue-user { align-self: flex-end; background: #c4c4cc; }
.lesson-dialogue-user > p:first-child { color: #19191b; }
.lesson-dialogue-user > p + p { color: rgb(0 0 0 / 50%); }
.lesson-role-composer { position: absolute; left: calc(20 * var(--lp)); right: calc(20 * var(--lp)); top: calc(797 * var(--lp)); height: calc(50 * var(--lp)); display: flex; align-items: center; gap: calc(8 * var(--lp)); }
.lesson-keyboard-button { display: grid; place-items: center; flex: none; width: calc(50 * var(--lp)); height: calc(50 * var(--lp)); background: #404042; border-radius: 50%; }
.lesson-keyboard-button img { width: calc(24 * var(--lp)); height: calc(24 * var(--lp)); object-fit: contain; }
.lesson-role-speak { display: flex; flex: 1; min-width: 0; height: calc(50 * var(--lp)); align-items: center; justify-content: space-between; gap: calc(8 * var(--lp)); padding: 0 calc(13 * var(--lp)) 0 calc(16 * var(--lp)); border-radius: calc(50 * var(--lp)); background: #49494b; color: #fff; font-size: calc(16 * var(--lp)); line-height: calc(25 * var(--lp)); white-space: nowrap; }
.lesson-role-speak img { flex: none; width: calc(24 * var(--lp)); height: calc(24 * var(--lp)); object-fit: contain; }
@media (max-width: 700px) {
  #first-lesson .lesson-gesture-hint { margin-top: 12px; }
}

/* Natural lesson story: the three text steps scroll; only the phone stays put.
   These dimensions are measured against the viewport by lesson-flow.js. */
#first-lesson .lesson-scroll-track { position: relative; }
#first-lesson .lesson-stage {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 7vw, 104px);
  width: min(100%, 1128px);
}
#first-lesson .lesson-stage > * { min-width: 0; }
#first-lesson .lesson-stage::before { right: 0; }
#first-lesson .lesson-story {
  position: relative;
  display: block;
  padding: 0;
}
#first-lesson .lesson-select {
  position: absolute;
  top: 24px;
  left: 0;
  z-index: 1;
  margin: 0;
}
#first-lesson .lesson-story-steps { position: relative; }
#first-lesson .lesson-story-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: var(--lesson-step-height, 680px);
  padding: 60px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
#first-lesson .lesson-story-step:first-child {
  padding-top: clamp(220px, 18vw, 300px);
}
#first-lesson .lesson-story-copy { width: 100%; min-height: 0; }
#first-lesson .lesson-story-step .lesson-counter,
#first-lesson .lesson-story-step h3,
#first-lesson .lesson-story-step h3 + p { transition: color .24s ease; }
#first-lesson .lesson-story-step:not(.is-current) .lesson-counter,
#first-lesson .lesson-story-step:not(.is-current) h3,
#first-lesson .lesson-story-step:not(.is-current) h3 + p { color: #8e96a6; }
#first-lesson .lesson-story-step:focus-visible { outline: none; }
#first-lesson .lesson-story-step:focus-visible .lesson-story-copy {
  outline: 2px solid #0388ff;
  outline-offset: 12px;
  border-radius: 4px;
}
#first-lesson .lesson-phone-pin {
  position: sticky;
  top: var(--lesson-pin-top, 24px);
  align-self: start;
  display: grid;
  justify-items: center;
  width: 100%;
  height: var(--lesson-phone-height, auto);
  min-height: 0;
}
#first-lesson .lesson-phone {
  width: var(--lesson-phone-width, min(100%, 375.584px));
  max-width: 100%;
  height: auto;
  aspect-ratio: 375.584 / 771.824;
  margin-inline: auto;
}
#first-lesson .lesson-controls { display: none; }
#first-lesson .lesson-copy-measure {
  position: absolute;
  inset: 0 auto auto 0;
  visibility: hidden;
  pointer-events: none;
  min-height: 0 !important;
  height: auto;
}
@media (min-width: 701px) {
  /* Align the first and last copy with a taller phone as it enters and exits. */
  #first-lesson .lesson-story {
    padding-block: max(0px, calc((var(--lesson-phone-height, 0px) - var(--lesson-step-height, 680px)) / 2));
    margin-bottom: var(--lesson-story-end-margin, 0px);
  }
  /* Keep the cloud near the phone rather than scaling its offset with all three steps. */
  #first-lesson .lesson-stage::before { top: -54px; }
}
@media (max-width: 700px) {
  #first-lesson .lesson-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    touch-action: pan-y;
  }
  #first-lesson .lesson-story { padding: 0; }
  #first-lesson .lesson-select {
    position: relative;
    top: auto;
    left: auto;
    margin: 0 auto 32px;
  }
  #first-lesson .lesson-story-steps {
    max-width: 640px;
    min-height: var(--lesson-copy-height, 150px);
    margin-inline: auto;
  }
  #first-lesson .lesson-story-step,
  #first-lesson .lesson-story-step:first-child {
    display: none;
    min-height: 0;
    padding: 0;
    align-items: center;
  }
  #first-lesson .lesson-story-step.is-current { display: flex; }
  #first-lesson .lesson-story-copy {
    max-width: none;
    min-height: var(--lesson-copy-height, 150px);
    text-align: center;
  }
  #first-lesson .lesson-phone-pin { position: relative; top: auto; }
  #first-lesson .lesson-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(100%, 380px);
    margin: 24px auto 0;
  }
  #first-lesson .lesson-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dce1e9;
    border-radius: 50%;
    background: #fff;
    color: #121a2e;
    font: inherit;
    font-size: 20px;
    cursor: pointer;
  }
  #first-lesson .lesson-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }
  #first-lesson .lesson-arrow:disabled { opacity: .35; cursor: default; }
  #first-lesson .lesson-dots { display: flex; flex: 1; justify-content: center; gap: 10px; }
  #first-lesson .lesson-dot {
    display: grid;
    place-items: center;
    width: 36px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  #first-lesson .lesson-dot::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: #c8cfde;
    transition: width .2s ease, background-color .2s ease;
  }
  #first-lesson .lesson-dot.is-current::after { width: 28px; background: #0388ff; }
  #first-lesson .lesson-controls button:focus-visible {
    outline: 2px solid #0388ff;
    outline-offset: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #first-lesson .lesson-story-step .lesson-counter,
  #first-lesson .lesson-story-step h3,
  #first-lesson .lesson-story-step h3 + p,
  #first-lesson .lesson-dot::after { transition: none; }
}

/* Each step gets its own halftone cloud: same dot style, different shape and placement. */
#first-lesson .lesson-story-step:nth-child(1) .lesson-story-copy::before { background-image: url("assets/lesson/cloud-step-1.webp"); }
#first-lesson .lesson-story-step:nth-child(2) .lesson-story-copy::before { inset: -42px 8% -32px -6%; background-image: url("assets/lesson/cloud-step-2.webp"); }
#first-lesson .lesson-story-step:nth-child(3) .lesson-story-copy::before { inset: -16px -10% -46px 22%; background-image: url("assets/lesson/cloud-step-3.webp"); }

/* Explainer card motion and colours, ported from the app's ExplainCardWidget. */
.lesson-explain-card { box-shadow: 0 calc(16 * var(--lp)) calc(30 * var(--lp)) rgb(0 0 0 / 18%); }
.lesson-explain-sentence > p { white-space: nowrap; }
.lesson-explain-char { display: inline-block; color: #fff; white-space: pre; }
.is-scripted .lesson-explain-char { opacity: 0; }
.is-scripted.is-typing .lesson-explain-char {
  animation: lesson-explain-char-in 140ms ease-out both;
  animation-delay: calc(var(--i) * 30ms);
}
@keyframes lesson-explain-char-in {
  from { opacity: 0; filter: blur(calc(6 * var(--lp))); transform: translateY(calc(6 * var(--lp))); }
  60% { transform: none; }
  to { opacity: 1; filter: none; transform: none; }
}
.is-blue .lesson-explain-char.is-pattern {
  color: #62a8ff;
  transition: color 270ms ease-in-out;
  transition-delay: calc(var(--i) * 20ms);
}
.lesson-explain-chunk { position: relative; display: inline-block; white-space: pre; }
.lesson-explain-chunk::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: calc(-4 * var(--lp));
  right: calc(-4 * var(--lp));
  height: calc(42 * var(--lp));
  border-radius: calc(12 * var(--lp));
  background: rgb(255 217 80 / 20%);
  content: "";
  transform: translateY(-50%);
  clip-path: inset(0 100% 0 0 round calc(12 * var(--lp)));
}
.is-yellow .lesson-explain-chunk::before { clip-path: inset(0 round calc(12 * var(--lp))); transition: clip-path 300ms linear; }
.is-yellow .lesson-explain-chunk .lesson-explain-char { color: #ffd950; }
.lesson-explain-sentence { isolation: isolate; }
.is-static .lesson-explain-char { animation: none !important; opacity: 1; transition: none !important; }
.is-static .lesson-explain-chunk::before { transition: none !important; }

/* Teacher layer: the supplied full-screen classroom still (teacher, room and dark fade in one image). */
#first-lesson .lesson-classroom-explainer .lesson-room-backdrop,
#first-lesson .lesson-classroom-role .lesson-room-backdrop { background: url("assets/lesson/classroom/teacher-scene.webp") center top / cover no-repeat #1f1e1e; }
#first-lesson .lesson-classroom-explainer .lesson-teacher-scene,
#first-lesson .lesson-classroom-explainer .lesson-avatar-shade,
#first-lesson .lesson-classroom-role .lesson-teacher-scene,
#first-lesson .lesson-classroom-role .lesson-avatar-shade { display: none; }
#first-lesson .lesson-drill-avatar img { object-position: center; transform: none; }

/* No light hairline between the screen and the bezel: a black plate sits under the
   screen and reaches beneath the frame, so sub-pixel gaps show black, not the page. */
#first-lesson .lesson-phone::before {
  position: absolute;
  z-index: -1;
  inset: 1.3% 3.2%;
  border-radius: 13% / 6.4%;
  background: #000;
  content: "";
}

/* Role-play: its own supplied still. The input bar is part of the image, so the HTML one is hidden. */
#first-lesson .lesson-classroom-role .lesson-room-backdrop { background-image: url("assets/lesson/classroom/teacher-scene-role.webp"); background-color: #1c1c1e; }
#first-lesson .lesson-classroom-role .lesson-role-composer { display: none; }
#first-lesson .lesson-classroom-role .lesson-dialogue { top: calc(352 * var(--lp)); }

/* Lesson chrome restored from the app's PlanTemplateScreen.
   Progress: Flutter CircularProgressIndicator in a 36 pt box with an 8 pt stroke centred on
   the box edge (outer 44 pt, inner 28 pt), white on a 30% track (16% in the no-teacher lesson). */
#first-lesson .lesson-ui-progress { position: relative; background: none; mask: none; }
#first-lesson .lesson-ui-progress::before {
  position: absolute;
  inset: calc(-4 * var(--lp));
  border-radius: 50%;
  background: conic-gradient(#fff var(--lesson-progress), rgb(255 255 255 / var(--lesson-progress-track, 30%)) 0);
  content: "";
  mask: radial-gradient(closest-side, transparent calc(100% - 8 * var(--lp) - .5px), #000 calc(100% - 8 * var(--lp)));
}
#first-lesson .lesson-classroom-drill { --lesson-progress-track: 16%; }
#first-lesson .lesson-classroom-drill .lesson-ui-nav-button { background: rgb(255 255 255 / 16%); }
/* Drill card: NoAvatarLessonCardStyle, 8% white fill and a 1 pt border that fades
   from 16% white to nothing at 48% and back, along the card's diagonal. */
#first-lesson .lesson-drill-card { border: 0; background: rgb(255 255 255 / 8%); }
#first-lesson .lesson-drill-card::before {
  position: absolute;
  inset: 0;
  padding: calc(1 * var(--lp));
  border-radius: inherit;
  background: linear-gradient(119.6deg, rgb(255 255 255 / 16%) 2.9%, rgb(255 255 255 / 0) 48%, rgb(255 255 255 / 16%) 96.7%);
  content: "";
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
/* Teacher entry: 44 pt, 50% white plate, soft shadow, artwork scaled 49/44 inside the clip. */
#first-lesson .lesson-drill-avatar { background: rgb(255 255 255 / 50%); box-shadow: 0 0 calc(21.29 * var(--lp)) rgb(0 0 0 / 10%); }
#first-lesson .lesson-drill-avatar img { transform: scale(calc(49 / 44)); }

/* The prompt and its audio controls share a center, with space for the translation below. */
.lesson-drill-prompt {
  position: absolute;
  inset: 0 calc(17 * var(--lp)) calc(44 * var(--lp));
  display: grid;
  place-content: center;
  justify-items: center;
  gap: calc(10 * var(--lp));
}
.lesson-drill-audio-row { display: flex; justify-content: center; gap: calc(10 * var(--lp)); }
.lesson-drill-audio-row > span {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--lp));
  height: calc(36 * var(--lp));
  padding: 0 calc(13 * var(--lp)) 0 calc(16 * var(--lp));
  border-radius: calc(18 * var(--lp));
  background: #4b4b4b;
  color: #fff;
  font: 400 calc(14 * var(--lp)) / calc(18 * var(--lp)) var(--ui-font);
}
.lesson-drill-audio-row img {
  box-sizing: border-box;
  width: calc(20 * var(--lp));
  height: calc(20 * var(--lp));
  padding: calc(1.2083 * var(--lp)) calc(4.1276 * var(--lp));
}
#first-lesson .lesson-drill-translation { top: auto; bottom: calc(17 * var(--lp)); left: calc(21 * var(--lp)); right: calc(21 * var(--lp)); color: #fff; font-size: calc(16 * var(--lp)); line-height: calc(24 * var(--lp)); }
#first-lesson .lesson-drill-bookmark { position: absolute; top: calc(6 * var(--lp)); right: calc(6 * var(--lp)); display: grid; place-items: center; width: calc(44 * var(--lp)); height: calc(44 * var(--lp)); }
#first-lesson .lesson-drill-bookmark img { width: calc(16.475 * var(--lp)); height: calc(18.6726 * var(--lp)); }

/* 课堂板块不放小云朵插画：文字栏里的云朵（原 lesson-clouds.js）已删除，
   每段文字背后的云和手机旁边的云也都不显示 */
#first-lesson .lesson-story-step:nth-child(n) .lesson-story-copy::before,
#first-lesson .lesson-stage::before { display: none; }
#first-lesson .lesson-story-step { position: relative; z-index: 1; }

/* The three Explainer / Drill / Role-play cards are removed; the space reserved
   for them above the first step goes with them. */
#first-lesson .lesson-select { display: none; }
#first-lesson .lesson-story-step:first-child { padding-top: 60px; }
@media (max-width: 700px) {
  #first-lesson .lesson-story-step:first-child { padding-top: 0; }
}

/* Practice previews follow the app's live word highlight and pass sheet. */
.lesson-classroom [hidden] { display: none !important; }
.lesson-drill-sentence [data-drill-word] { transition: color 180ms ease; }
.lesson-drill-sentence .is-heard { color: #5b7cff; }
[data-drill-phase="passed"] .lesson-drill-sentence [data-drill-word] { color: var(--drill-success-text); }

.lesson-demo-recording {
  position: absolute;
  z-index: 3;
  top: calc(797 * var(--lp));
  right: calc(20 * var(--lp));
  left: calc(20 * var(--lp));
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(50 * var(--lp));
  padding: 0 calc(16 * var(--lp));
  border-radius: calc(28 * var(--lp));
  background: #444448;
  animation: lesson-demo-record-in 300ms cubic-bezier(.22, .8, .2, 1) both;
}
.lesson-demo-recording img {
  width: calc(26 * var(--lp));
  height: calc(26 * var(--lp));
  object-fit: contain;
}
.lesson-demo-wave { display: flex; align-items: center; gap: calc(5 * var(--lp)); }
.lesson-demo-wave i {
  width: calc(4 * var(--lp));
  height: calc(22 * var(--lp));
  border-radius: 999px;
  background: #fff;
  animation: lesson-demo-wave 520ms ease-in-out infinite alternate;
}
.lesson-demo-wave i:nth-child(2n) { animation-delay: -230ms; }
.lesson-demo-wave i:nth-child(3) { animation-delay: -360ms; }
@keyframes lesson-demo-wave { from { scale: 1 .2; } to { scale: 1 1; } }
@keyframes lesson-demo-record-in {
  from { opacity: 0; scale: .88; }
}

[data-drill-phase] .lesson-speak-button,
[data-drill-phase] .lesson-cannot-speak { visibility: hidden; }
.lesson-drill-recording {
  top: calc(793 * var(--lp));
  height: calc(60 * var(--lp));
  padding: 0;
  gap: calc(12 * var(--lp));
  background: none;
  animation: none;
}
.lesson-drill-record-close,
.lesson-drill-record-send {
  display: grid;
  place-items: center;
  width: calc(48 * var(--lp));
  height: calc(48 * var(--lp));
  border-radius: 50%;
  flex: none;
}
.lesson-drill-record-close { background: rgb(255 255 255 / 18%); }
.lesson-drill-record-capsule {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1;
  height: 100%;
  border-radius: calc(30 * var(--lp));
  background: #0394e9 url("assets/lesson/classroom/input_recording_video_frist.webp") center / cover;
}
.lesson-drill-record-send {
  position: absolute;
  right: calc(6 * var(--lp));
  background: #fff;
}
.lesson-drill-recording img { width: calc(24 * var(--lp)); height: calc(24 * var(--lp)); }
.lesson-drill-recording .lesson-demo-wave { gap: calc(3.4 * var(--lp)); }
.lesson-drill-recording .lesson-demo-wave i {
  width: calc(3 * var(--lp));
  height: calc(var(--wave-height, 21) * var(--lp));
  animation: lesson-demo-wave 483ms ease-in-out infinite alternate;
}
.lesson-drill-recording .lesson-demo-wave i:nth-child(2n) { animation-delay: -160ms; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(3n) { animation-delay: -310ms; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(1),
.lesson-drill-recording .lesson-demo-wave i:nth-child(17) { --wave-height: 2; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(2),
.lesson-drill-recording .lesson-demo-wave i:nth-child(16) { --wave-height: 4; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(3),
.lesson-drill-recording .lesson-demo-wave i:nth-child(15) { --wave-height: 9; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(4),
.lesson-drill-recording .lesson-demo-wave i:nth-child(14) { --wave-height: 12; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(5),
.lesson-drill-recording .lesson-demo-wave i:nth-child(13) { --wave-height: 14; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(6),
.lesson-drill-recording .lesson-demo-wave i:nth-child(12) { --wave-height: 16; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(7),
.lesson-drill-recording .lesson-demo-wave i:nth-child(11) { --wave-height: 18; }
.lesson-drill-recording .lesson-demo-wave i:nth-child(8),
.lesson-drill-recording .lesson-demo-wave i:nth-child(10) { --wave-height: 20; }

.lesson-drill-pass {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: calc(22 * var(--lp)) calc(20 * var(--lp)) calc(27 * var(--lp));
  border-radius: calc(28 * var(--lp)) calc(28 * var(--lp)) 0 0;
  background: #ddf6e6;
  color: var(--drill-success-text);
  font-size: calc(17 * var(--lp));
}
.lesson-drill-pass-title { display: flex; align-items: center; gap: calc(6 * var(--lp)); }
.lesson-drill-pass-title span { font-size: calc(30 * var(--lp)); font-weight: 800; line-height: 1; }
.lesson-drill-pass-title strong { font-size: calc(24 * var(--lp)); font-weight: 900; line-height: 1.17; }
.lesson-drill-pass .lesson-drill-pass-meaning { margin-top: calc(10 * var(--lp)); font-weight: 900; line-height: calc(21 * var(--lp)); }
.lesson-drill-pass .lesson-drill-pass-translation { margin-top: calc(8 * var(--lp)); line-height: calc(24 * var(--lp)); }
.lesson-drill-continue {
  height: calc(50 * var(--lp));
  margin-top: calc(18 * var(--lp));
  padding: 0;
  border: 0;
  border-radius: calc(25 * var(--lp));
  background: var(--drill-success-text);   /* 和上面「Excellent!」等文字同一个绿（原来 #008f31 偏暗） */
  color: #fff;
  font: 600 calc(17 * var(--lp)) / calc(18 * var(--lp)) var(--ui-font);
  cursor: pointer;
}
.lesson-drill-continue:active { scale: .97; }

#first-lesson .lesson-classroom-role .lesson-dialogue {
  bottom: calc(93 * var(--lp));
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 calc(10 * var(--lp)));
  padding-top: calc(10 * var(--lp));
}
.lesson-dialogue-message { flex: none; }
.lesson-dialogue-ai { align-self: flex-start; }
.lesson-dialogue-message.is-entering { animation: lesson-demo-message-in 200ms cubic-bezier(.215, .61, .355, 1) both; }
.lesson-dialogue-untyped,
.lesson-dialogue-message.is-typing > p + p { visibility: hidden; }
@keyframes lesson-demo-message-in {
  from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-drill-sentence [data-drill-word] { transition: none; }
  .lesson-demo-recording, .lesson-demo-wave i, .lesson-drill-pass,
  .lesson-dialogue-message.is-entering { animation: none; }
}

/* 手机：层级理顺 —— 板块标题（27px）> 步骤标题（19px）> 说明（14px），序号是浅灰小字；
   步骤文字和上面的板块介绍拉开距离，不再挤在一起 */
@media (max-width: 700px) {
  #first-lesson .lesson-story-steps { margin-top: 12px; }
  #first-lesson .lesson-story-copy .lesson-counter {
    margin-bottom: 6px;
    color: #8e96a6;
    font-size: 12px;
    letter-spacing: .06em;
  }
  #first-lesson .lesson-story-copy h3 {
    margin-bottom: 6px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.01em;
  }
  #first-lesson .lesson-story-copy h3 + p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
  }
}

/* 手机：三步直接排开（lesson-flow.js 加 .has-m-slots），不再用左右箭头和圆点切换 */
@media (max-width: 700px) {
  #first-lesson.has-m-slots .lesson-story {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  #first-lesson.has-m-slots :is(.lesson-controls, .lesson-gesture-hint) { display: none; }
  #first-lesson .lesson-m-slots { display: grid; gap: 48px; }
  #first-lesson .lesson-m-head { display: block; text-align: center; }
  #first-lesson .lesson-m-frame { display: grid; justify-items: center; margin-top: 16px; }
}

/* 手机：三格的标题区和定制课程一致——左对齐，序号是标题前的蓝色小标签；不要文字背后的点阵云朵 */
@media (max-width: 700px) {
  #first-lesson .lesson-m-slots { margin-top: 8px; }
  #first-lesson .lesson-m-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 8px;
    align-items: baseline;
    text-align: left;
  }
  #first-lesson .lesson-m-head::before { display: none; }
  #first-lesson .lesson-m-head .lesson-counter {
    grid-column: 1;
    margin: 0;
    color: #2f7bf6;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
  }
  #first-lesson .lesson-m-head h3 { grid-column: 2; margin: 0; }
  #first-lesson .lesson-m-head h3 + p { grid-column: 1 / -1; margin-top: 4px; }
}

/* 课堂手机：屏幕的裁切圆角和手机边框图（phone-frame.webp）里屏幕开口的圆角一致（量得约 113px / 904×1973），
   原来 9% / 4.6% 偏小：底部弹出浅绿面板时，拐角处露出一圈变厚的黑边，看起来没被手机框住 */
#first-lesson .lesson-screen { border-radius: 12.6% / 5.8%; }

/* 手机：课堂三格做成和即时反馈一样的卡片——白色文字区 + 分隔线 + 浅灰演示区里放手机，整张圆角卡片。
   序号、标题、说明和手机本身不变 */
@media (max-width: 700px) {
  #first-lesson .lesson-m-slots { gap: 24px; }
  #first-lesson .lesson-m-slot {
    overflow: clip;
    border: 1px solid rgb(17 24 39 / 9%);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(17 24 39 / 4%), 0 18px 40px -24px rgb(17 24 39 / 18%);
  }
  #first-lesson .lesson-m-head { padding: 24px 20px 20px; border-bottom: 1px solid rgb(17 24 39 / 7%); }
  #first-lesson .lesson-m-frame { margin-top: 0; padding: 24px 0; background: rgb(241 241 245 / 60%); }
}
/* 文字区节奏和即时反馈卡片一致：第一行离卡片顶 36px，标题和说明之间 12px，底部多留一点 */
@media (max-width: 700px) {
  #first-lesson .lesson-m-head { padding: 36px 20px 28px; }
  #product #first-lesson .lesson-m-head h3 + p { margin-top: 12px; }
}

/* 电脑：课堂内容区和导航条同宽、居中（宽度由 lesson-flow.js 按导航收起后的宽度算出） */
@media (min-width: 931px) {
  #first-lesson .lesson-stage { width: min(100%, 1128px, var(--lesson-stage-width, 1128px)); margin-inline: auto; }
}
