/* Lecciones — the page around the player, and the player's 1280 × 720 frame.

   The frame is drawn at a fixed size and scaled to fit (app.js), so sizes
   inside it are pixels of the projected screen. Colours, radii, shadows and
   eases come from /ds/ tokens; reduced motion is handled once in base.css. */

@font-face { font-family: "Heinemann Special HB"; font-style: normal; font-weight: 350; font-display: swap; src: url("fonts/heinemann-special-hb-350.woff2") format("woff2"); }
@font-face { font-family: "Heinemann Special HB"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/heinemann-special-hb-700.woff2") format("woff2"); }

:root {
  --ls-read: "Heinemann Special HB", var(--font-sans);
  --ls-move: calc(var(--dur) * 2);
  --ls-draw: calc(var(--dur-slow) + var(--dur));
  --ls-glide: calc(var(--dur-slow) * 3);
}

body { background: var(--color-bg-page); min-height: 100vh; }

/* ------------------------------------------------------------- page -- */

.ls-page { min-height: 100vh; display: flex; flex-direction: column; }

.ls-header {
  position: sticky; top: 0; z-index: var(--z-header);
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--container-pad);
  background: var(--hb-paper);
  border-bottom: 1px solid var(--hb-line);
}
.ls-burger { display: flex; }
.ls-brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ls-wordmark { font-size: var(--fs-ui-xl); font-weight: var(--fw-bold); letter-spacing: -0.01em; color: var(--hb-chalkboard); white-space: nowrap; }
.ls-header-lesson { font-size: var(--fs-ui-md); color: var(--hb-chalkboard); margin-left: var(--space-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ls-header-spacer { flex: 1; }
.ls-me { font-size: var(--fs-ui-md); color: var(--hb-muted); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A phone shows the lesson but doesn't present it: the lesson name, the
   presenter view and full screen leave the bar so it fits. */
@media (max-width: 760px) {
  .ls-header-lesson, .ls-me, .ls-header-wide { display: none; }
}

.ls-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.ls-gate-card { max-width: 30rem; text-align: center; }
.ls-gate-card h1 { font-size: var(--fs-ui-xl); margin: var(--space-3) 0 var(--space-2); }
.ls-gate-card p { font-size: var(--fs-ui); color: var(--hb-ink-soft); line-height: 1.55; margin: 0 0 var(--space-3); }

.ls-list { width: 100%; max-width: 1120px; margin: 0 auto; padding: var(--space-6) var(--container-pad) var(--space-8); }
.ls-list-title { font-size: var(--fs-ui-2xl); margin: 0 0 var(--space-2); }
.ls-list-lede { font-size: var(--fs-ui-lg); color: var(--hb-chalkboard); margin: 0 0 var(--space-5); max-width: 46rem; }

/* The cards: one flat grid, or one grid under each level's heading. */
.ls-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--space-4); }
.ls-card { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); text-decoration: none; color: var(--hb-chalkboard); min-width: 0; }
.ls-card-week { font-size: var(--fs-ui-md); font-weight: var(--fw-semibold); color: var(--hb-ink-soft); }
.ls-card-title { font-size: var(--fs-ui-xl); font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.ls-card-meta { font-size: var(--fs-ui-md); color: var(--hb-ink-soft); margin-top: var(--space-2); }

/* Search and choices, above the groups. */
.ls-filters { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-4); }
.ls-search { max-width: 30rem; }
.ls-search .hb-label { display: block; margin-bottom: var(--space-1); }
.ls-choice { display: flex; flex-direction: column; gap: var(--space-1); }
.ls-choice .hb-label { margin: 0; }
/* The choices are the design system's segmented control. Only its place is
   set here: as wide as its buttons, and onto a second row on a narrow screen. */
.ls-seg { align-self: flex-start; flex-wrap: wrap; max-width: 100%; }
.ls-status { font-size: var(--fs-ui-md); color: var(--hb-ink-soft); margin: 0 0 var(--space-2); }

/* A level's heading wears the level's ray as a short bar on its left. */
.ls-group { margin-top: var(--space-6); }
.ls-group:first-of-type { margin-top: var(--space-4); }
.ls-group-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3); padding-left: var(--space-3);
  font-size: var(--fs-ui-xl); font-weight: var(--fw-semibold); color: var(--hb-chalkboard);
  border-left: 4px solid var(--ls-level, var(--hb-line));
}
.ls-group-count { font-size: var(--fs-ui-md); font-weight: var(--fw-regular); color: var(--hb-ink-soft); }
/* The team's page only (lesson-list.js, teacherUrl): each group's teacher tag
   beside its heading, and a Copy teacher link button under each card. The
   chips take the small corners: nothing on this screen is pill-shaped. */
.ls-group-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.ls-group-bar .ls-group-head { margin: 0; }
.ls-tag { border-radius: var(--radius-sm); }
.ls-tag code { font-size: inherit; }
.ls-card-item { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.ls-card-item > .ls-card { flex: 1; }
.ls-card-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ls-copy-failed { margin: 0; font-size: var(--fs-ui-md); color: var(--hb-ink-soft); overflow-wrap: anywhere; }
/* Set tag (tag-editor.js): under the heading or card it was opened from. */
.ls-tag-editor { display: flex; flex-direction: column; gap: var(--space-2); max-width: 560px; margin: 0 0 var(--space-4); padding: var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--hb-paper); }
.ls-card-extra { grid-column: 1 / -1; }
.ls-card-extra .ls-tag-editor { margin: 0; }
.ls-tag-editor .hb-label { margin: 0; }
.ls-tag-editor-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ls-tag-input { flex: 1 1 220px; min-width: 0; width: auto; font-family: var(--font-mono); }
/* A phone: the box has the first row, Save and Cancel share the next. */
@media (max-width: 479px) { .ls-tag-input { flex-basis: 100%; } }
.ls-tag-help { margin: 0; font-size: var(--fs-ui-md); color: var(--hb-ink-soft); }
.ls-tag-error { margin: 0; font-size: var(--fs-ui-md); font-weight: var(--fw-semibold); color: var(--hb-adobe-ink); }
.ls-tag-saved { margin: 0 0 var(--space-3); font-size: var(--fs-ui-md); color: var(--hb-ink-soft); }
.ls-card-extra .ls-tag-saved { margin: 0; }
/* Read by a screen reader, not shown. */
.ls-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ls-level--verde { --ls-level: var(--hb-agave); }
.ls-level--amarilla { --ls-level: var(--hb-sol); }
.ls-level--morada { --ls-level: var(--hb-petalo); }
.ls-level--azul { --ls-level: var(--hb-agua); }
.ls-level--roja { --ls-level: var(--hb-adobe); }

/* The stage area under the header; in full screen it is the whole screen. */
.ls-viewport { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--hb-cloud-soft); }
.ls-viewport:fullscreen { padding: 0; background: var(--hb-paper); }
.ls-scaler { position: relative; flex: none; }
.ls-holder { position: absolute; top: 0; left: 0; width: 1280px; height: 720px; transform-origin: 0 0; }

/* ------------------------------------------------------------ frame -- */

/* The lesson's level colours (player.js and presenter.js set them from slides.js LEVEL_COLORS: Verde
   green, Amarilla yellow, Morada, Azul, Roja): --ls-acc the full colour (lit boxes, dots, arrows, the
   dotted border), --ls-light its tint (a part already read, the tinted screens, the progress track),
   --ls-deep the saturated one, --ls-fill the progress bar's fill. Green when none is set. */
.ls-frame, .ls-presenter {
  --ls-acc: var(--hb-agave); --ls-light: var(--hb-agave-light); --ls-deep: var(--hb-text-agave); --ls-fill: var(--hb-text-agave);
}
.ls-frame {
  position: relative; width: 1280px; height: 720px; overflow: hidden;
  background: var(--hb-paper); color: var(--hb-chalkboard); font-family: var(--font-sans);
  border-radius: var(--radius-card); box-shadow: var(--shadow-md);
}
.ls-viewport:fullscreen .ls-frame { border-radius: 0; box-shadow: none; }

.ls-slide { position: absolute; inset: 0; animation: ls-in var(--dur-slow) var(--ease-out); }
.ls-slide--tinted { background: var(--ls-light); }
@keyframes ls-in { from { opacity: 0; } to { opacity: 1; } }

.ls-border { position: absolute; inset: 20px; z-index: 3; border: 5px dotted var(--ls-acc); border-radius: var(--radius-xl); pointer-events: none; }

/* A picture the screen has no address for (a title screen whose deck gave it
   no icon, a picture whose address hasn't come yet) keeps its place but isn't
   painted: the browser would draw a broken-picture box there. (A Listen
   screen with no picture draws no <img> at all.) */
.ls-frame img[src=""] { visibility: hidden; }

.ls-head { position: absolute; top: 44px; right: 64px; left: 64px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ls-head-activity { display: flex; align-items: center; gap: 14px; }
.ls-head-activity img { display: block; width: 44px; height: 44px; }
.ls-head-activity p { margin: 0; font-size: 22px; font-weight: var(--fw-semibold); line-height: 1.2; }
.ls-head-day { margin: 0; font-size: 18px; line-height: 1.2; }

.ls-bar { position: absolute; right: 64px; bottom: 40px; left: 64px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 48px; }
.ls-progress { flex: none; width: 200px; height: 8px; overflow: hidden; border-radius: var(--radius-pill); background: var(--ls-light); }
.ls-progress-fill { height: 100%; border-radius: var(--radius-pill); background: var(--ls-fill); transition: width var(--dur-slow) var(--ease-out); }
.ls-controls { display: flex; align-items: center; gap: 10px; }
.ls-jump {
  height: 48px; max-width: 300px; padding: 0 12px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-field);
  background: var(--hb-paper); color: var(--hb-chalkboard); font: inherit; font-size: 16px;
}

.ls-notes {
  position: absolute; right: 64px; bottom: 104px; left: 64px; z-index: 4;
  max-height: 270px; overflow: auto; padding: 18px 24px 12px;
  border: 1px solid var(--hb-line); border-radius: var(--radius-panel);
  background: var(--hb-paper); box-shadow: var(--shadow-lg);
}
.ls-notes-title { margin: 0 0 10px; font-size: 14px; font-weight: var(--fw-semibold); letter-spacing: 0.14em; }
.ls-notes p { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }

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

/* ----------------------------------------------------- shared shapes -- */

.ls-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ls-center--column { flex-direction: column; gap: 36px; }
.ls-stage { position: absolute; top: 104px; right: 64px; bottom: 112px; left: 64px; display: flex; align-items: center; justify-content: center; }
.ls-stage--column { flex-direction: column; }

/* A word in boxes: units (letters or syllables) with a dot under each, on
   the thin arrow. Joining animates gap, borders, corners and padding. */
.ls-blend { position: relative; display: inline-flex; flex-direction: column; }
.ls-units { display: flex; transition: gap var(--ls-move) var(--ease-out); }
.ls-unit { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ls-box {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  height: 200px; font-family: var(--ls-read); font-size: 132px; font-weight: 700; line-height: 1; white-space: nowrap;
  border-style: solid; border-color: var(--hb-chalkboard);
  transition: transform var(--dur-slow) var(--ease-bounce), box-shadow var(--dur-slow) var(--ease-out),
    background-color var(--dur) var(--ease-out), border-width var(--ls-move) var(--ease-out),
    border-radius var(--ls-move) var(--ease-out), padding var(--ls-move) var(--ease-out);
}
.ls-box--small { height: 96px; font-size: 58px; }
.ls-words-screen .ls-unit { gap: 8px; }

.ls-dot-cell { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 72px; }
.ls-dot {
  box-sizing: border-box; display: block; width: 40px; height: 40px; border-radius: var(--radius-pill); border: 4px solid var(--ls-acc);
  transition: transform var(--dur-slow) var(--ease-bounce), opacity var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.ls-dot-cell--medium { height: 56px; }
.ls-dot--medium { width: 32px; height: 32px; }
.ls-words-screen .ls-dot-cell { height: 40px; }
.ls-words-screen .ls-dot { width: 22px; height: 22px; border-width: 3px; }

.ls-lane { position: absolute; right: 0; bottom: 0; left: 0; display: grid; align-items: center; height: 72px; }
.ls-arrow { grid-area: 1 / 1; display: flex; align-items: center; width: 100%; }
.ls-arrow--thin { transition: opacity var(--dur) var(--ease-out); }
.ls-arrow--thick { transition: clip-path var(--ls-draw) var(--ease-out); }
.ls-shaft { flex: 1; background: var(--ls-acc); }
.ls-tip { flex: none; margin-left: -1px; background: var(--ls-acc); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.ls-lane--big .ls-arrow--thin .ls-shaft { height: 8px; border-radius: 4px 0 0 4px; }
.ls-lane--big .ls-arrow--thin .ls-tip { width: 30px; height: 30px; }
.ls-lane--big .ls-arrow--thick .ls-shaft { height: 24px; border-radius: 12px 0 0 12px; }
.ls-lane--big .ls-arrow--thick .ls-tip { width: 64px; height: 68px; }

.ls-lane--medium { height: 56px; }
.ls-lane--medium .ls-arrow--thin .ls-shaft { height: 6px; border-radius: 3px 0 0 3px; }
.ls-lane--medium .ls-arrow--thin .ls-tip { width: 24px; height: 24px; }
.ls-lane--medium .ls-arrow--thick .ls-shaft { height: 18px; border-radius: 9px 0 0 9px; }
.ls-lane--medium .ls-arrow--thick .ls-tip { width: 50px; height: 52px; }

.ls-lane--small { height: 40px; }
.ls-lane--small .ls-arrow--thin .ls-shaft { height: 5px; border-radius: 3px 0 0 3px; }
.ls-lane--small .ls-arrow--thin .ls-tip { width: 18px; height: 18px; }
.ls-lane--small .ls-arrow--thick .ls-shaft { height: 12px; border-radius: 6px 0 0 6px; }
.ls-lane--small .ls-arrow--thick .ls-tip { width: 34px; height: 36px; }

/* --------------------------------------------------------- the kinds -- */

.ls-cover { position: absolute; top: 64px; right: 96px; bottom: 120px; left: 96px; display: flex; align-items: center; justify-content: center; gap: 72px; }
.ls-cover-book { display: block; width: 330px; height: 500px; object-fit: contain; border-radius: var(--radius-card); box-shadow: var(--shadow-md); }
.ls-cover-text { display: flex; flex-direction: column; gap: 16px; max-width: 540px; }
.ls-eyebrow { margin: 0; font-size: 18px; font-weight: var(--fw-semibold); letter-spacing: 0.14em; }
.ls-cover-title { margin: 0; font-size: 60px; font-weight: var(--fw-regular); line-height: 1.1; }
.ls-cover-book-title { margin: 0; font-family: var(--ls-read); font-size: 36px; font-weight: 700; line-height: 1.2; }

.ls-day { margin: 0; font-family: var(--ls-read); font-size: 132px; font-weight: 700; line-height: 1; }

/* 220px tall; as wide as the icon is. Most are one circle (square); "Sílabas" (titulo-silabas, the Amarilla decks'
   la | las) is two circles side by side. */
.ls-title-icon { display: block; width: auto; height: 220px; }
.ls-title { margin: 0; font-size: 52px; font-weight: var(--fw-semibold); line-height: 1.15; text-align: center; }

.ls-listen { gap: 22px; }
.ls-listen-pic { display: block; width: 520px; height: 280px; object-fit: contain; }
.ls-listen-row { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ls-phase { margin: 0; min-height: 28px; font-size: 20px; font-weight: var(--fw-semibold); letter-spacing: 0.06em; }
/* No picture: only the dots take room, so they land in the middle of the
   page; the label hangs above them. */
.ls-listen--bare .ls-listen-row { position: relative; }
.ls-listen--bare .ls-phase { position: absolute; bottom: 100%; left: 50%; margin-bottom: 22px; transform: translateX(-50%); white-space: nowrap; }
/* --ls-listen-scale: set by slides.js (listenScale) when a word of many
   sounds would be wider than the stage; 1 otherwise. */
.ls-dots { display: flex; align-items: center; justify-content: center; height: 98px; zoom: var(--ls-listen-scale, 1); transition: gap var(--ls-move) var(--ease-out); }
.ls-dot-bar {
  box-sizing: border-box; display: block; height: 70px; border-style: solid; border-color: var(--ls-acc);
  transition: width var(--ls-move) var(--ease-out), border-width var(--ls-move) var(--ease-out), border-radius var(--ls-move) var(--ease-out),
    background-color var(--dur) var(--ease-out), transform var(--dur-slow) var(--ease-bounce);
}

.ls-letter {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 340px; height: 340px;
  border: 4px solid var(--hb-chalkboard); border-radius: var(--radius-xl); background: var(--hb-paper);
  font-family: var(--ls-read); font-size: 230px; font-weight: 700; line-height: 1;
}

.ls-dictation { gap: 32px; }
/* --ls-dict-scale: set by slides.js (dictationScale) when a row is wider than the stage; 1 otherwise. */
.ls-dictation-item { display: flex; align-items: center; justify-content: center; gap: calc(64px * var(--ls-dict-scale, 1)); }
.ls-dictation-groups { display: flex; align-items: center; gap: calc(48px * var(--ls-dict-scale, 1)); }
.ls-dictation-group { display: flex; gap: calc(14px * var(--ls-dict-scale, 1)); }
.ls-write-box {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  width: calc(150px * var(--ls-dict-scale, 1)); height: calc(190px * var(--ls-dict-scale, 1));
  border: 4px solid var(--hb-chalkboard); border-radius: var(--radius-lg); background: var(--hb-paper);
}
.ls-write-letter {
  display: block; font-family: var(--ls-read); font-size: calc(124px * var(--ls-dict-scale, 1)); font-weight: 700; line-height: 1;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-bounce);
}
.ls-dictation-pic { display: block; width: calc(240px * var(--ls-dict-scale, 1)); height: calc(300px * var(--ls-dict-scale, 1)); object-fit: contain; }
.ls-track { display: flex; gap: 12px; }
.ls-track-dot { box-sizing: border-box; display: block; width: 18px; height: 18px; border-radius: var(--radius-pill); border: 3px solid var(--ls-acc); transition: background-color var(--dur) var(--ease-out); }

.ls-blend-pic {
  flex: none; height: 360px; overflow: hidden;
  transition: width var(--ls-move) var(--ease-out), margin-left var(--ls-move) var(--ease-out),
    opacity var(--dur-slow) var(--ease-out) var(--dur-fast), transform var(--ls-move) var(--ease-bounce);
}
.ls-blend-pic img { display: block; width: 340px; height: 360px; object-fit: contain; }
/* --ls-blend-scale: set by slides.js (blendScale) on a Sound it out stage
   whose word is wider than the stage; 1 (as before) otherwise. zoom draws the
   word's boxes, letters, dots and arrow and its picture smaller by that share
   and lays them out at that size, so the stage centres them. */
.ls-stage > .ls-blend, .ls-stage > .ls-blend-pic { zoom: var(--ls-blend-scale, 1); }

.ls-hfw { display: inline-flex; flex-direction: column; }
.ls-hfw-word { margin: 0; padding: 0 32px 8px; font-family: var(--ls-read); font-size: 168px; font-weight: 700; line-height: 1.1; text-align: center; }
.ls-lane--slow .ls-arrow--thick { transition-duration: var(--ls-glide); }
.ls-bead {
  box-sizing: border-box; position: absolute; top: 16px; width: 40px; height: 40px;
  border-radius: var(--radius-pill); border: 5px solid var(--hb-chalkboard); background: var(--hb-paper);
  transition: left var(--ls-glide) var(--ease-in-out);
}

.ls-sentence { gap: 24px; }
.ls-sentence-pics {
  display: flex; align-items: flex-end; justify-content: center; gap: 24px; height: 210px;
  transition: opacity var(--dur-slow) var(--ease-out) var(--dur), transform var(--ls-move) var(--ease-bounce) var(--dur);
}
.ls-sentence-pics img { display: block; height: 210px; max-width: 440px; object-fit: contain; }
/* A sentence too long for one row takes two, or three (slides.js,
   sentenceLayout), centred, each with its own arrow. The pictures' height
   and the words' size come from sentenceLayout too, as inline styles. */
.ls-sentence-rows { display: flex; flex: none; flex-direction: column; align-items: center; gap: 24px; }
.ls-sentence-line { position: relative; display: inline-flex; flex-direction: column; }
.ls-words { display: flex; align-items: flex-end; gap: 20px; }
.ls-sentence .ls-unit { gap: 10px; }
.ls-word {
  display: block; padding: 6px 14px; border-radius: var(--radius-lg);
  font-family: var(--ls-read); font-size: 72px; font-weight: 700; line-height: 1.1; white-space: nowrap;
  transition: transform var(--dur-slow) var(--ease-bounce), background-color var(--dur) var(--ease-out);
}
.ls-sentence .ls-arrow--thick { transition-duration: calc(var(--dur-slow) * 2); }

.ls-tiles-screen { gap: 40px; }
.ls-prompt { margin: 0; font-size: 30px; line-height: 1.3; text-align: center; }
.ls-prompt--wide { max-width: 900px; font-size: 28px; line-height: 1.35; }
.ls-tiles { display: grid; gap: 20px; }
.ls-tile {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 128px; height: 128px;
  border: 4px solid var(--hb-chalkboard); border-radius: var(--radius-lg);
  font-family: var(--ls-read); font-size: 64px; font-weight: 700; line-height: 1;
  transition: transform var(--dur-slow) var(--ease-bounce), box-shadow var(--dur-slow) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.ls-words-screen { gap: 36px; }
.ls-word-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 64px; }
/* A warm-up word too wide for a third of the row: slides.js (wordsLayout)
   puts two words to a row, as the deck does, or one (a word wider than
   half the row, or a screen of one word), or sets --ls-blend-scale on the
   stage, or both, whichever keeps the words biggest. zoom draws each
   word's boxes, letters, dots and arrow smaller by that share; its picture
   keeps its size. Screens whose words read as before get neither, so they
   draw as before. */
.ls-word-grid--two-per-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ls-word-grid--one-per-row { grid-template-columns: minmax(0, 1fr); }
.ls-word-cell > .ls-blend { zoom: var(--ls-blend-scale, 1); }
.ls-word-cell { display: flex; justify-content: center; }
.ls-word-cell--pictured { flex-direction: column; align-items: center; gap: 20px; }
/* A warm-up word's picture. Its box is the same size before and after it
   comes in, so nothing moves; only opacity and size change. One row of
   words gets a bigger picture than two rows; with two rows of pictured
   words the word boxes and the gaps shrink a little too, so the six words,
   their pictures and the prompt all fit between the header and the bar. */
.ls-word-pic {
  flex: none; display: flex; align-items: center; justify-content: center; width: 320px; height: 240px;
  transition: opacity var(--dur-slow) var(--ease-out) var(--dur-fast), transform var(--ls-move) var(--ease-bounce);
}
/* The picture box is the fixed, reserved room. The picture inside hugs its
   own shape, so the rounded corners land on the picture itself. This rule
   draws it until it loads; then slides.js sets its width and height to the
   largest size that fits the room (a small picture grows). In two rows the
   gap above the room clears the arrow's tip, which hangs 4px below its lane. */
.ls-word-pic img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: var(--radius-lg); }
/* Pictured screens: the columns keep their width when a word joins, and a
   word with no picture stays at the top of its row beside its pictured
   neighbours (its arrow stays under its own boxes). */
.ls-words-screen--pictured .ls-word-grid { width: 100%; align-items: start; }
.ls-words-screen--two-rows { gap: 16px; }
.ls-words-screen--two-rows .ls-word-grid { gap: 26px 48px; }
.ls-words-screen--two-rows .ls-word-cell--pictured { gap: 10px; }
.ls-words-screen--two-rows .ls-box--small { height: 72px; font-size: 46px; }
.ls-words-screen--two-rows .ls-unit { gap: 4px; }
.ls-words-screen--two-rows .ls-dot-cell { height: 32px; }
.ls-words-screen--two-rows .ls-lane--small { height: 32px; }
.ls-words-screen--two-rows .ls-word-pic { width: 120px; height: 72px; }

.ls-story { position: absolute; top: 100px; right: 72px; bottom: 112px; left: 72px; display: flex; align-items: center; gap: 48px; }
.ls-story-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ls-story-title { margin: 0 0 6px; font-family: var(--ls-read); font-size: 52px; font-weight: 700; line-height: 1.15; }
.ls-story-line { display: flex; align-items: center; gap: 16px; transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-bounce); }
.ls-turn { display: block; flex: none; width: 52px; height: 52px; }
.ls-story-words { margin: 0; font-family: var(--ls-read); font-size: 44px; font-weight: 350; line-height: 1.3; }
.ls-story-words--turn { font-weight: 700; }
.ls-story-pics { flex: none; display: flex; gap: 20px; }
.ls-story-pics img { display: block; height: 400px; object-fit: contain; border-radius: var(--radius-lg); }

.ls-celebrate { gap: 56px; }
.ls-celebrate-text { display: flex; flex-direction: column; gap: 14px; }
.ls-celebrate-text p { margin: 0; font-size: 30px; line-height: 1.4; }
.ls-celebrate-title { margin: 0; font-family: var(--ls-read); font-size: 96px; font-weight: 700; line-height: 1; }
.ls-celebrate-pic { display: block; width: auto; height: 470px; }

.ls-logo { display: block; width: 360px; height: auto; }

/* -------------------------------------------------------- presenter -- */

/* The teacher's window: "now" over "next" on the left, the notes large on the
   right, the clock above, the controls below. Previews are sized by
   LessonPresenter.fit(); the notes column takes the rest. */
.ls-presenter { height: 100vh; display: flex; flex-direction: column; background: var(--hb-cloud-soft); }
.ls-presenter-top {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--container-pad);
  background: var(--hb-paper); border-bottom: 1px solid var(--hb-line);
}
.ls-presenter-clock { font-size: var(--fs-ui-2xl); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--hb-chalkboard); }

.ls-presenter-body {
  flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-5); padding: var(--space-4) var(--container-pad);
}
.ls-presenter-screens { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.ls-presenter-label { margin: var(--space-2) 0 0; font-size: var(--fs-ui-sm); font-weight: var(--fw-semibold); letter-spacing: 0.14em; color: var(--hb-chalkboard); }
.ls-presenter-label:first-child { margin-top: 0; }
.ls-presenter-shot { position: relative; flex: none; overflow: hidden; border-radius: var(--radius-card); background: var(--hb-paper); box-shadow: var(--shadow-sm); }
.ls-presenter-shot .ls-frame { border-radius: 0; box-shadow: none; }
.ls-presenter-end {
  display: flex; align-items: center; justify-content: center; flex: none;
  border: 1px dashed var(--color-border-strong); border-radius: var(--radius-card);
  font-size: var(--fs-ui-lg); color: var(--hb-chalkboard);
}

.ls-presenter-notes {
  min-height: 0; overflow: auto; padding: var(--space-5);
  background: var(--hb-paper); border-radius: var(--radius-panel); box-shadow: var(--shadow-sm);
}
.ls-presenter-notes p:not(.ls-presenter-label) { margin: var(--space-3) 0 0; font-size: var(--fs-ui-2xl); line-height: 1.45; color: var(--hb-chalkboard); }

.ls-presenter-bar {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--container-pad);
  background: var(--hb-paper); border-top: 1px solid var(--hb-line);
}

@media (max-width: 900px) {
  .ls-presenter { height: auto; min-height: 100vh; }
  .ls-presenter-body { grid-template-columns: minmax(0, 1fr); }
}
