@import url("ui/raster/lesson-surfaces/runtime-frames.css");

body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) {
  --control-u: 1px;
}

body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind]):not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) {
  --exercise-cream: url("ui/raster/lesson-exercise-bespoke-v3/cream.svg");
  --exercise-gold: url("ui/raster/lesson-exercise-bespoke-v3/gold-concept.svg");
  --exercise-coral: url("ui/raster/lesson-exercise-bespoke-v3/coral.svg");
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind]):not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) :is(.word-pieces button,.sentence-answer button,[data-pronounce],.row-actions button.quiet) {
  border-image: var(--exercise-cream) 16 18 18 fill / calc(13 * var(--control-u)) calc(16 * var(--control-u)) calc(17 * var(--control-u)) stretch;
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) :is(.word-pieces button,.sentence-answer button) {
  min-width: 44px;
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind]):not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .answer-grid button {
  border-image: var(--exercise-gold) 14 18 18 fill / calc(12 * var(--control-u)) calc(16 * var(--control-u)) calc(17 * var(--control-u)) stretch;
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind]):not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) :is(.row-actions button:not(.quiet),#check-order) {
  border-image: var(--exercise-coral) 19 22 22 fill / calc(16 * var(--control-u)) calc(19 * var(--control-u)) calc(20 * var(--control-u)) stretch;
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind]):not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) :is(.row-actions button,.dialogue-pronounce)::before {
  background-image: url("ui/raster/lesson-exercise-bespoke-v3/speaker.svg");
  filter: none;
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind]):not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .row-actions button:not(.quiet)::before {
  background-image: url("ui/raster/lesson-exercise-bespoke-v3/speaker-light.svg");
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .lesson-progress {
  background: linear-gradient(#ead5ed,#f1dff3,#ead4ee);
  box-shadow: inset 0 calc(2 * var(--control-u)) #f8e9f4, inset 0 calc(-2 * var(--control-u)) #f6e7ee;
}
body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .lesson-progress > span {
  background: linear-gradient(#9064b9 0%,#8253ae 22%,#8050ab 82%,#76499f 100%);
  box-shadow: inset 0 calc(2 * var(--control-u)) #ad85cc, inset calc(-2 * var(--control-u)) 0 #6d3f95;
}
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) :where(.answer-grid button,.word-pieces button,.sentence-answer button,[data-pronounce],.row-actions button,#record-speech,#check-order,#lesson-next) {
  min-width: 0;
  min-height: 44px;
  border: calc(4 * var(--control-u)) solid transparent;
  border-image: var(--surface-cream-button) 14 fill / calc(14 * var(--control-u)) stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ui-ink);
  text-shadow: none;
  overflow-wrap: anywhere;
}
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .answer-grid button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 10px 16px;
  border-image-source: var(--surface-gold-button);
  border-image-slice: 13 fill;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
}
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .answer-grid button > span { max-width: 100%; font: inherit; color: inherit; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .answer-grid button > .choice-status { font-size: 24px; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .correct-answer > .choice-status { color: #347b2d; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .wrong-answer > .choice-status { color: #e94b58; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .answer-grid button.correct-answer { opacity: 1; border-image: var(--lesson-feedback-answer-right) 18 fill / calc(14 * var(--control-u)) stretch; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .answer-grid button.wrong-answer { opacity: 1; border-image: var(--lesson-feedback-answer-wrong) 18 fill / calc(14 * var(--control-u)) stretch; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .answer-grid button[data-answer-state="inactive"] { opacity: 1; color: #98749a; filter: saturate(.6); }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) :is([data-pronounce],.row-actions button) { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; font-size: 20px; line-height: 1.1; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) :where(#record-speech,#check-order,#lesson-next,.row-actions button:not(.quiet)) { border-image-source: var(--surface-coral-button); color: #fff8e9; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) :where(#record-speech,#check-order) { border-image-source: var(--surface-rose-button); border-image-slice: 15 fill; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) #record-speech { color: var(--ui-ink); border-image-source: var(--surface-microphone-button); border-image-slice: 22 fill; border-image-width: calc(22 * var(--control-u)); }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) :is(.word-pieces button,.sentence-answer button) { display: inline-flex; flex-direction: column; justify-content: center; padding: 10px 14px; font-size: 20px; line-height: 1.15; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .sentence-answer button > [data-native-text],
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .sentence-answer > span { font: inherit; color: inherit; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .row-actions button::before {
  content: "";
  flex: none;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  background: url("ui/raster/learning/speaker.svg") center / contain no-repeat;
}
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) .row-actions button:not(.quiet)::before { filter: brightness(0) invert(1); }
body.play-screen #panel.lesson-panel .dialogue-prompt-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
body.play-screen #panel.lesson-panel .dialogue-prompt-row .exercise-prompt { min-width: 0; margin: 0; color: #355c3d; font: 700 30px/1.15 Georgia,serif; overflow-wrap: anywhere; }
body.play-screen #panel.lesson-panel .lesson-shell .dialogue-prompt-row .dialogue-pronounce { flex: none; width: 54px; min-width: 54px; height: 54px; padding: 0; }
body.play-screen #panel.lesson-panel .lesson-shell .dialogue-pronounce::before { content: ""; width: 28px; height: 28px; margin: 0; background: url("ui/raster/learning/speaker.svg") center / contain no-repeat; }
body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid)) button:focus-visible { outline: 2px solid #8a57b3; outline-offset: -5px; }

@media (max-width: 899px), (max-height: 649px) {
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) { width: min(960px,calc(100vw - 16px)); height: calc(100dvh - 32px); max-height: none; margin: 16px auto; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-header { width: 100%; padding: 12px 12px 6px; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-header #exit-lesson { width: 46px; height: 46px; min-height: 46px; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-header .eyebrow { font-size: 18px; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-body { width: 100%; max-width: none; padding: 12px; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-body h3 { margin: 0 0 18px; font-size: 24px; line-height: 1.15; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-body .exercise-counter { margin-bottom: 14px; font-size: 13px; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-body > p:not(.exercise-counter) { margin: 0 0 18px; font-size: 15px; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .lesson-body > p.exercise-prompt { color: #3f6649; font: 700 28px/1.2 Georgia,serif; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words,.match-grid,.lesson-footer.right,.lesson-footer.wrong)) .answer-grid { gap: 10px; margin-top: 18px; }
}

@media (min-width: 900px) and (min-height: 650px) {
  body.play-screen #panel.lesson-panel:not(:has(.intro-words)) {
    --s-x: calc(100vw / 1586);
    --s-y: calc(100dvh / 992);
    --s-u: min(var(--s-x),var(--s-y));
    --s-art: var(--surface-match);
    --s-counter-color: #85917c;
    --s-header-x: 350; --s-header-y: 30; --s-header-w: 892; --s-close: 70;
    --s-progress-x: 87; --s-progress-y: 20; --s-progress-w: 716; --s-progress-h: 28;
    --s-plant-x: 814; --s-plant-y: 0; --s-title-x: 0; --s-title-y: 73; --s-title-size: 30;
    --s-counter-x: 350; --s-counter-y: 153; --s-counter-size: 20;
    --s-body-x: 328; --s-body-y: 200; --s-body-w: 930; --s-body-h: 630; --s-inset: 22;
    --s-heading-size: 48; --s-heading-bottom: 10; --s-help-size: 26; --s-help-bottom: 34;
    --s-match-row: 88; --s-match-gap: 12; --s-match-font: 36;
    --s-answer-row: 98; --s-answer-font: 36; --s-answer-gap: 16;
    --s-footer-x: 355; --s-footer-y: 827; --s-footer-w: 875; --s-footer-h: 100;
  }
  body.play-screen #panel.lesson-panel:not(:has(.intro-words)):has(.lesson-shell [data-exercise-kind]) { background: var(--s-art) center / 100% 100% no-repeat,#fff1df; }
  body.play-screen #panel.lesson-panel:has([data-exercise-kind="listen"]) {
    --s-art: var(--surface-listen);
    --s-header-x: 366; --s-header-y: 33; --s-header-w: 867; --s-close: 70;
    --s-progress-x: 88; --s-progress-y: 23; --s-progress-w: 694; --s-progress-h: 31;
    --s-plant-x: 797; --s-plant-y: 8; --s-title-x: 1; --s-title-y: 84; --s-title-size: 28;
    --s-counter-x: 367; --s-counter-y: 159; --s-counter-size: 22;
    --s-body-x: 336; --s-body-y: 211; --s-body-w: 914; --s-body-h: 430; --s-inset: 14;
    --s-heading-size: 44; --s-heading-bottom: 27; --s-answer-row: 100; --s-answer-gap: 12;
  }
  body.play-screen #panel.lesson-panel:has([data-exercise-kind="meaning"]) {
    --s-x: calc(100vw / 1672); --s-y: calc(100dvh / 941);
    --s-art: var(--surface-meaning);
    --s-counter-color: #785482;
    --s-header-x: 330; --s-header-y: 85; --s-header-w: 1010; --s-close: 82;
    --s-progress-x: 114; --s-progress-y: 25; --s-progress-w: 797; --s-progress-h: 32;
    --s-plant-x: 930; --s-plant-y: 5; --s-title-x: 3; --s-title-y: 87; --s-title-size: 28;
    --s-counter-x: 333; --s-counter-y: 231; --s-counter-size: 24;
    --s-body-x: 333; --s-body-y: 273; --s-body-w: 1015; --s-body-h: 466; --s-inset: 0;
    --s-heading-size: 50; --s-heading-bottom: 36; --s-answer-row: 104; --s-answer-font: 40;
  }
  body.play-screen #panel.lesson-panel:has([data-exercise-kind="fill"]) {
    --s-art: var(--surface-fill);
    --s-header-x: 335; --s-header-y: 64; --s-header-w: 914; --s-close: 72;
    --s-progress-x: 99; --s-progress-y: 19; --s-progress-w: 717; --s-progress-h: 32;
    --s-plant-x: 838; --s-plant-y: 0; --s-title-x: -6; --s-title-y: 78;
    --s-counter-x: 329; --s-counter-y: 201; --s-counter-size: 22;
    --s-body-x: 322; --s-body-y: 249; --s-body-w: 942; --s-body-h: 488; --s-inset: 6;
    --s-heading-size: 46; --s-heading-bottom: 28; --s-answer-row: 96; --s-answer-gap: 14;
  }
  body.play-screen #panel.lesson-panel:has([data-exercise-kind="dialogue"]) {
    --s-art: var(--surface-dialogue);
    --s-header-x: 450; --s-header-y: 49; --s-header-w: 870; --s-close: 68;
    --s-progress-x: 92; --s-progress-y: 18; --s-progress-w: 682; --s-progress-h: 29;
    --s-plant-x: 789; --s-plant-y: -1; --s-title-x: 32; --s-title-y: 70;
    --s-counter-x: 398; --s-counter-y: 196; --s-counter-size: 22;
    --s-body-x: 374; --s-body-y: 270; --s-body-w: 1018; --s-body-h: 524; --s-inset: 3;
    --s-heading-size: 48; --s-heading-bottom: 24; --s-answer-row: 98; --s-answer-gap: 20;
  }
  body.play-screen #panel.lesson-panel:has([data-exercise-kind="order"]) {
    --s-art: var(--surface-order);
    --s-header-x: 327; --s-header-y: 34; --s-header-w: 942; --s-close: 70;
    --s-progress-x: 98; --s-progress-y: 16; --s-progress-w: 734; --s-progress-h: 34;
    --s-plant-x: 864; --s-plant-y: -3; --s-title-x: -2; --s-title-y: 74; --s-title-size: 24;
    --s-counter-x: 327; --s-counter-y: 163; --s-counter-size: 22;
    --s-body-x: 253; --s-body-y: 201; --s-body-w: 1038; --s-body-h: 574; --s-inset: 72;
    --s-heading-size: 48; --s-heading-bottom: 28; --s-help-size: 30; --s-help-bottom: 35;
  }
  body.play-screen #panel.lesson-panel:has([data-exercise-kind="speak"]) {
    --s-art: var(--surface-speak);
    --s-header-x: 391; --s-header-y: 36; --s-header-w: 824; --s-close: 70;
    --s-progress-x: 93; --s-progress-y: 23; --s-progress-w: 653; --s-progress-h: 32;
    --s-plant-x: 751; --s-plant-y: -2; --s-title-x: -3; --s-title-y: 91;
    --s-counter-x: 388; --s-counter-y: 173; --s-counter-size: 22;
    --s-body-x: 386; --s-body-y: 215; --s-body-w: 814; --s-body-h: 510; --s-inset: 0;
    --s-heading-size: 46; --s-heading-bottom: 30;
    --s-footer-x: 343; --s-footer-y: 847; --s-footer-w: 900; --s-footer-h: 102;
  }
  body.play-screen #panel.lesson-panel:has(.lesson-footer:is(.right,.wrong)) {
    --s-x: calc(100vw / 1586); --s-y: calc(100dvh / 992);
    --s-art: var(--surface-feedback);
    --s-counter-color: #98779d;
    --s-header-x: 378; --s-header-y: 15; --s-header-w: 826; --s-close: 76;
    --s-progress-x: 104; --s-progress-y: 17; --s-progress-w: 620; --s-progress-h: 30;
    --s-plant-x: 734; --s-plant-y: 5; --s-title-x: 12; --s-title-y: 72; --s-title-size: 30;
    --s-counter-x: 390; --s-counter-y: 122; --s-counter-size: 20;
    --s-body-x: 366; --s-body-y: 190; --s-body-w: 844; --s-body-h: 480; --s-inset: 0;
    --s-heading-size: 44; --s-heading-bottom: 20; --s-answer-row: 80; --s-answer-font: 30; --s-answer-gap: 12;
    --s-footer-x: 54; --s-footer-y: 758; --s-footer-w: 1480; --s-footer-h: 188;
  }
  body.play-screen #panel.lesson-panel:has(.match-grid):has(.lesson-footer.right) {
    --s-art: var(--surface-matched);
    --s-header-x: 383; --s-header-y: 14; --s-header-w: 819; --s-close: 80;
    --s-progress-x: 105; --s-progress-y: 20; --s-progress-w: 614; --s-progress-h: 28;
    --s-plant-x: 731; --s-plant-y: 10; --s-title-x: 16; --s-title-y: 74; --s-title-size: 28;
    --s-counter-x: 388; --s-counter-y: 147; --s-counter-size: 20;
    --s-body-x: 388; --s-body-y: 192; --s-body-w: 811; --s-body-h: 486; --s-inset: 0;
    --s-heading-size: 40; --s-heading-bottom: 10; --s-help-bottom: 21;
    --s-match-row: 68; --s-match-gap: 6; --s-match-font: 30;
    --s-footer-x: 395; --s-footer-y: 780; --s-footer-w: 795; --s-footer-h: 154;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) {
    --control-u: var(--s-u);
    position: relative;
    width: 100%; height: 100dvh; max-height: none;
    margin: 0; padding: 0; border: 0;
    background: none; transform: none;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words))::before,
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words))::after { display: none; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-header {
    position: fixed;
    left: calc(var(--s-header-x) * var(--s-x)); top: calc(var(--s-header-y) * var(--s-y));
    width: calc(var(--s-header-w) * var(--s-x)); max-width: none; height: calc(120 * var(--s-y));
    margin: 0; padding: 0; background: none;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-header-row { display: contents; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-header-row::before { display: none; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-header #exit-lesson {
    position: absolute; left: 0; top: 0;
    width: max(44px,calc(var(--s-close) * var(--s-x))); height: max(44px,calc(var(--s-close) * var(--s-y)));
    min-height: 44px; margin: 0; padding: 0; border: 0; border-image: none; background: transparent; box-shadow: none; color: var(--ui-ink);
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) #exit-lesson::before,
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) #exit-lesson::after { content: ""; display: block; position: absolute; left: 50%; top: 50%; width: calc(34 * var(--s-u)); height: calc(6 * var(--s-u)); background: currentColor; border-radius: 2px; transform: translate(-50%,-50%) rotate(45deg); }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) #exit-lesson::after { transform: translate(-50%,-50%) rotate(-45deg); }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-progress {
    position: absolute;
    left: calc(var(--s-progress-x) * var(--s-x)); top: calc(var(--s-progress-y) * var(--s-y));
    width: calc(var(--s-progress-w) * var(--s-x)); height: calc(var(--s-progress-h) * var(--s-y));
    margin: 0; border: calc(2 * var(--s-u)) solid #b797cc; border-radius: calc(8 * var(--s-u));
    background: #e6d3ee; box-shadow: inset 0 calc(2 * var(--s-u)) #fff5e7;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-progress > span { border-radius: calc(5 * var(--s-u)); background: #8a5bb4; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-header canvas {
    position: absolute; left: calc(var(--s-plant-x) * var(--s-x)); top: calc(var(--s-plant-y) * var(--s-y));
    width: calc(72 * var(--s-u)); height: calc(80 * var(--s-u)); margin: 0;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-header .eyebrow {
    position: absolute; left: calc(var(--s-title-x) * var(--s-x)); top: calc(var(--s-title-y) * var(--s-y));
    width: calc(100% - 60 * var(--s-x)); margin: 0;
    font-size: max(16px,calc(var(--s-title-size) * var(--s-u))); font-weight: 900; line-height: 1.1; color: var(--ui-ink);
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .exercise-counter {
    position: fixed; left: calc(var(--s-counter-x) * var(--s-x)); top: calc(var(--s-counter-y) * var(--s-y));
    margin: 0; padding: 0; color: var(--s-counter-color); font-size: max(13px,calc(var(--s-counter-size) * var(--s-u))); font-weight: 800; line-height: 1.2; letter-spacing: .055em;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-scroll {
    position: fixed; left: calc(var(--s-body-x) * var(--s-x)); top: calc(var(--s-body-y) * var(--s-y));
    width: calc(var(--s-body-w) * var(--s-x)); height: calc(var(--s-body-h) * var(--s-y));
    min-height: 0; max-height: none; margin: 0; padding: 0; flex: none; background: none; overflow: auto;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-body { width: 100%; max-width: none; margin: 0; padding: 0 0 0 calc(var(--s-inset) * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-body h3 {
    margin: 0 0 calc(var(--s-heading-bottom) * var(--s-y)); padding: 0;
    font-size: max(22px,calc(var(--s-heading-size) * var(--s-u))); font-weight: 900; line-height: 1.15; color: var(--ui-ink);
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-body > p:not(.exercise-counter,.exercise-prompt,.lesson-answer-summary) { margin: 0 0 calc(var(--s-help-bottom) * var(--s-y)); color: #818c76; font-size: max(15px,calc(var(--s-help-size) * var(--s-u))); font-weight: 700; line-height: 1.2; }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .answer-grid { width: calc(100% + var(--s-inset) * var(--s-x)); margin: 0 0 0 calc(-1 * var(--s-inset) * var(--s-x)); grid-template-columns: repeat(2,minmax(0,1fr)); gap: calc(var(--s-answer-gap) * var(--s-y)) calc(18 * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .answer-grid button { min-height: max(44px,calc(var(--s-answer-row) * var(--s-y))); padding: calc(10 * var(--s-u)) calc(32 * var(--s-u)); font-size: max(18px,calc(var(--s-answer-font) * var(--s-u))); }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) [data-pronounce]:not(.dialogue-pronounce) { width: fit-content; min-width: calc(196 * var(--s-x)); min-height: max(44px,calc(88 * var(--s-y))); padding: calc(10 * var(--s-u)) calc(24 * var(--s-u)); font-size: max(18px,calc(36 * var(--s-u))); }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-footer {
    position: fixed; left: calc(var(--s-footer-x) * var(--s-x)); top: calc(var(--s-footer-y) * var(--s-y));
    width: calc(var(--s-footer-w) * var(--s-x)); height: max(44px,calc(var(--s-footer-h) * var(--s-y))); max-height: none; min-height: 0;
    margin: 0; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; width: 100%; max-width: none; height: 100%; margin: 0; gap: calc(12 * var(--s-y)); }
  body.play-screen #panel.lesson-panel .lesson-shell:not(:has(.intro-words)) .lesson-footer-inner > button { flex: none; width: 100%; min-height: 44px; height: 100%; margin: 0; padding: calc(8 * var(--s-u)) calc(24 * var(--s-u)); font-size: max(18px,calc(40 * var(--s-u))); line-height: 1.1; }

  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .match-grid { width: calc(100% + var(--s-inset) * var(--s-x)); margin: 0 0 0 calc(-1 * var(--s-inset) * var(--s-x)); grid-template-columns: repeat(2,minmax(0,1fr)); gap: calc(22 * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .match-grid > div { display: grid; gap: calc(var(--s-match-gap) * var(--s-y)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .match-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: max(44px,calc(var(--s-match-row) * var(--s-y))); padding: calc(10 * var(--s-u)) calc(16 * var(--s-u)); border: calc(6 * var(--s-u)) solid transparent; border-image: var(--surface-gold-button) 13 fill / calc(14 * var(--s-u)) stretch; border-radius: 0; background: transparent; box-shadow: none; font-size: max(18px,calc(var(--s-match-font) * var(--s-u))); font-weight: 800; line-height: 1.1; color: var(--ui-ink); overflow-wrap: anywhere; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .match-grid button.matched { display: grid; grid-template-columns: calc(36 * var(--s-u)) minmax(0,1fr); column-gap: calc(24 * var(--s-u)); padding-left: calc(30 * var(--s-u)); border-image-source: var(--surface-green-button); border-image-slice: 10 fill; text-align: left; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .matched::before { content: "✓"; grid-column: 1; grid-row: 1 / span 3; margin: 0; color: #578b1f; font-size: calc(40 * var(--s-u)); line-height: 1; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .matched > * { grid-column: 2; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .match-grid button.selected { border-image-source: var(--controls-matching-selected); border-image-slice: 8 fill; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) .match-grid button[aria-invalid="true"] { border-image-source: var(--lesson-feedback-answer-wrong); border-image-slice: 18 fill; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid) #lesson-next { border: calc(4 * var(--s-u)) solid transparent; border-image: var(--surface-coral-button) 14 fill / calc(14 * var(--s-u)) stretch; border-radius: 0; background: transparent; box-shadow: none; color: #fff8e9; }

  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="meaning"]):not(:has(.lesson-footer)) [data-pronounce] { min-width: calc(216 * var(--s-x)); min-height: max(44px,calc(98 * var(--s-y))); font-size: calc(40 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="meaning"]):not(:has(.lesson-footer)) .answer-grid { margin-top: calc(26 * var(--s-y)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="listen"]):not(:has(.lesson-footer)) .row-actions { flex-wrap: nowrap; gap: calc(14 * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="listen"]):not(:has(.lesson-footer)) .row-actions button { min-height: max(44px,calc(84 * var(--s-y))); width: calc(280 * var(--s-x)); padding: calc(10 * var(--s-u)) calc(12 * var(--s-u)); font-size: calc(30 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="listen"]):not(:has(.lesson-footer)) .row-actions .quiet { width: calc(294 * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="listen"]):not(:has(.lesson-footer)) .row-actions button::before { width: calc(48 * var(--s-u)); height: calc(44 * var(--s-u)); margin-right: calc(12 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="listen"]):not(:has(.lesson-footer)) .answer-grid { margin-top: calc(40 * var(--s-y)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="fill"]):not(:has(.lesson-footer)) .lesson-body > p:not(.exercise-counter,.exercise-prompt) { margin-bottom: calc(34 * var(--s-y)); font-size: calc(28 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="fill"]):not(:has(.lesson-footer)) .exercise-prompt { margin: 0 0 calc(50 * var(--s-y)); color: #3d6547; font: 700 calc(48 * var(--s-u))/1.2 Georgia,serif; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="dialogue"]):not(:has(.lesson-footer)) .exercise-counter { min-width: calc(276 * var(--s-x)); max-width: calc(100vw - 430 * var(--s-x)); min-height: calc(53 * var(--s-y)); padding: calc(8 * var(--s-u)) calc(18 * var(--s-u)); border: calc(6 * var(--s-u)) solid transparent; border-image: var(--surface-cream-button) 14 fill / calc(14 * var(--s-u)) stretch; color: var(--ui-ink); text-align: center; letter-spacing: .02em; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="dialogue"]):not(:has(.lesson-footer)) .dialogue-prompt-row { gap: calc(38 * var(--s-x)); margin: 0 0 calc(24 * var(--s-y)) calc(7 * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="dialogue"]):not(:has(.lesson-footer)) .dialogue-prompt-row .dialogue-pronounce { min-width: calc(90 * var(--s-x)); width: calc(90 * var(--s-x)); height: max(44px,calc(82 * var(--s-y))); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="dialogue"]):not(:has(.lesson-footer)) .dialogue-pronounce::before { width: calc(48 * var(--s-u)); height: calc(44 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="dialogue"]):not(:has(.lesson-footer)) .exercise-prompt { font-size: calc(54 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="dialogue"]):not(:has(.lesson-footer)) .lesson-body > [data-pronounce] { min-width: calc(200 * var(--s-x)); min-height: max(44px,calc(76 * var(--s-y))); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="dialogue"]):not(:has(.lesson-footer)) .answer-grid { margin-top: calc(34 * var(--s-y)); }

  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) h3 { display: flex; align-items: center; justify-content: center; width: calc(612 * var(--s-x)); min-height: calc(89 * var(--s-y)); margin-left: calc(-72 * var(--s-x)); padding: calc(12 * var(--s-u)) calc(60 * var(--s-u)); background: var(--surface-order-heading) center / 100% 100% no-repeat; line-height: 1.05; text-align: center; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .lesson-body > p:not(.exercise-counter) { margin-left: calc(-10 * var(--s-x)); color: #7d5e81; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .sentence-answer { display: flex; align-items: center; flex-wrap: wrap; gap: calc(8 * var(--s-u)); width: calc(100% + 23 * var(--s-x)); min-height: calc(138 * var(--s-y)); margin: 0 0 0 calc(-23 * var(--s-x)); padding: calc(30 * var(--s-u)) calc(36 * var(--s-u)); border: calc(2 * var(--s-u)) dashed #9ca785; border-radius: calc(28 * var(--s-u)); background: transparent; font-size: calc(26 * var(--s-u)); font-weight: 800; color: #859078; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .sentence-answer > span { font: inherit; color: inherit; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .word-pieces { display: flex; flex-wrap: wrap; gap: calc(14 * var(--s-x)); width: calc(100% + 23 * var(--s-x)); margin: calc(38 * var(--s-y)) 0 0 calc(-23 * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="order"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .word-pieces button { min-height: max(44px,calc(110 * var(--s-y))); padding: calc(8 * var(--s-u)) calc(22 * var(--s-u)); font-size: calc(30 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="speak"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .exercise-prompt { margin: 0 0 calc(4 * var(--s-y)); color: #3b6049; font: 700 calc(48 * var(--s-u))/1.15 Georgia,serif; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="speak"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) .lesson-body > p:not(.exercise-counter,.exercise-prompt,#speech-status,#speech-transcript,#speech-score) { margin-bottom: calc(28 * var(--s-y)); font-size: calc(26 * var(--s-u)); font-weight: 600; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="speak"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) [data-pronounce] { display: flex; width: calc(196 * var(--s-x)); min-height: max(44px,calc(88 * var(--s-y))); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="speak"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) #record-speech { display: block; width: calc(378 * var(--s-x)); min-height: max(44px,calc(132 * var(--s-y))); margin-top: calc(22 * var(--s-y)); font-size: calc(40 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="speak"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) #record-speech[hidden] { display: none; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="speak"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) #speech-status { margin: calc(28 * var(--s-y)) 0 0; font-size: calc(26 * var(--s-u)); font-weight: 600; line-height: 1.2; text-align: center; }
  body.play-screen #panel.lesson-panel .lesson-shell:has([data-exercise-kind="speak"]):not(:has(.lesson-footer.right,.lesson-footer.wrong)) #skip-speech { padding: calc(12 * var(--s-u)); border: 0; border-image: none; background: transparent; box-shadow: none; color: var(--ui-ink); font-size: calc(36 * var(--s-u)); }

  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-body h3 { margin-left: calc(18 * var(--s-x)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-body > [data-pronounce] { min-width: calc(186 * var(--s-x)); min-height: max(44px,calc(66 * var(--s-y))); margin-left: calc(12 * var(--s-x)); font-size: calc(30 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .answer-grid { margin-top: calc(24 * var(--s-y)); grid-template-columns: 1.03fr 1fr; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .choice-status { right: calc(20 * var(--s-u)); font-size: calc(40 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-body > .lesson-answer-summary { position: relative; display: grid; grid-template-columns: calc(86 * var(--s-u)) minmax(0,1fr); align-items: center; gap: calc(24 * var(--s-u)); left: calc(4 * var(--s-x)); width: min(calc(800 * var(--s-x)),100%); min-height: calc(132 * var(--s-y)); margin: calc(13 * var(--s-y)) auto 0; padding: calc(20 * var(--s-u)) calc(68 * var(--s-u)) calc(20 * var(--s-u)) calc(92 * var(--s-u)); font-size: calc(37 * var(--s-u)); font-weight: 800; line-height: 1.2; color: var(--ui-ink); text-align: left; background: var(--lesson-feedback-answer-plaque) center / 100% 100% no-repeat; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-answer-summary::before { position: static; grid-column: 1; grid-row: 1; width: calc(86 * var(--s-u)); height: calc(82 * var(--s-u)); transform: none; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-answer-text { grid-column: 2; min-width: 0; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer.right) .lesson-answer-meaning { color: #34752e; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-footer { top: auto; bottom: calc(46 * var(--s-y)); height: max(120px,calc(188 * var(--s-y))); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-footer-inner > button { width: calc(740 * var(--s-x)); height: max(44px,calc(84 * var(--s-y))); }
  /* Keep the main action visible when translated feedback wraps. */
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-feedback { flex: 1; min-height: 0; width: calc(100% - 440 * var(--s-x)); margin: 0 0 0 calc(296 * var(--s-x)); padding: 0; overflow: auto; color: var(--ui-ink); font-size: calc(28 * var(--s-u)); line-height: 1.2; text-align: left; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-feedback > strong { font-size: calc(40 * var(--s-u)); font-weight: 900; line-height: 1.15; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-feedback p { margin: calc(6 * var(--s-y)) 0 0; font-size: calc(28 * var(--s-u)); font-weight: 700; line-height: 1.2; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)):not(:has(.match-grid)) .lesson-feedback.wrong::before { display: none; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer.wrong):not(:has(.match-grid)) .lesson-footer::after { content: ""; position: absolute; left: calc(293 * var(--s-x)); top: 0; width: calc(58 * var(--s-u)); height: calc(56 * var(--s-u)); pointer-events: none; background: var(--lesson-feedback-warning-icon) center / contain no-repeat; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer.right):not(:has(.match-grid)) .lesson-footer::before { content: ""; position: absolute; inset: calc(-28 * var(--s-y)) 0 calc(-22 * var(--s-y)); z-index: -1; background: var(--surface-success-footer) center / 100% 100% no-repeat; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid):has(.lesson-footer.right) .lesson-footer-inner { gap: calc(22 * var(--s-y)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid):has(.lesson-footer.right) .lesson-feedback { flex: none; align-self: stretch; margin: 0 0 0 calc(18 * var(--s-x)); padding: 0; font-size: calc(36 * var(--s-u)); line-height: 1.2; color: var(--ui-ink); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid):has(.lesson-footer.right) .lesson-feedback > strong { font-size: inherit; font-weight: 900; }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid):has(.lesson-footer.right) .lesson-footer-inner > button { height: max(44px,calc(84 * var(--s-y))); }
  /* The check must fit the 68px row without increasing its intrinsic height. */
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid):has(.lesson-footer.right) .matched::before { font-size: calc(36 * var(--s-u)); }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.lesson-footer:is(.right,.wrong)) #lesson-next {
    border-image: url("ui/raster/lesson-intro-surfaces-v4/example-start.svg") 18 28 18 fill / calc(18 * var(--s-u)) calc(28 * var(--s-u)) calc(18 * var(--s-u)) stretch;
  }
  body.play-screen #panel.lesson-panel .lesson-shell:has(.match-grid):has(.lesson-footer.right) #lesson-next { border-image-outset: calc(8 * var(--s-y)) 0 0; }
}
