/* A single task surface, with controls kept beside the content they affect. */
:root { --lesson-ink: #17151d; --lesson-muted: #625e6c; --lesson-line: #e5e2eb; --lesson-accent: #4f2bff; --lesson-success: #147a52; }
.lesson-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; color: inherit; }
.lesson-meta { display: flex; align-items: center; gap: 12px; }
.effects-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 6px; color: #575360; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.effects-toggle:hover { background: #f3f1f7; color: #17151d; }
.effects-toggle[aria-pressed="false"] { color: #625e6c; }
.effects-toggle:focus-visible, .lesson-selector-close:focus-visible { outline: 2px solid #4f2bff; outline-offset: 2px; }
.lesson-meta .effects-toggle > span { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; }
#lesson-stage .stage-header { margin-bottom: 24px; }
#lesson-stage .stage-header h2 { margin: 10px 0 8px; font-size: 34px; line-height: 1.2; font-weight: 600; letter-spacing: 0; text-wrap: balance; }
#lesson-stage .stage-header p { display: block !important; max-width: 65ch; margin: 0; color: #625e6c; font-size: 16px; line-height: 1.6; font-weight: 400; }
#lesson-stage .stage-kicker-row .badge { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #625e6c; font-size: 12px; font-weight: 400; }
.stage > .progress-track { height: 4px; margin-bottom: 22px; border: 0; border-radius: 2px; background: #eeecf2; box-shadow: none; }
.stage > .progress-track > #progress-bar { background: #4f2bff; box-shadow: none; border-radius: 2px; transition: width 200ms ease-out; }
.learning-step-heading { font-size: 14px; }
.learning-step-activities .phase-item { min-height: 40px; padding: 7px 10px; border: 0; border-radius: 6px; }
.learning-step-activities .phase-item.current { background: #ece8ff; }
.learning-step-activities .phase-item .phase-name { font-size: 13px; font-weight: 400; color: #625e6c; }
.learning-step-activities .phase-item.current .phase-name { font-weight: 600; color: #3920ba; }
.learning-step-activities .phase-item.done .phase-index { background: #147a52; border-color: #147a52; color: #fff; }
.learning-step-activities .phase-index { width: 12px; height: 12px; }

/* Numbered destinations show position; checks represent completed work. */
#lesson-stage .focused-task-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 12px 0 20px; padding: 0 0 12px; background: transparent; border: 0; border-bottom: 1px solid #e5e2eb; border-radius: 0; box-shadow: none; }
#lesson-stage .focused-task-progress-copy { display: grid; gap: 2px; flex: 1; min-width: 120px; }
#lesson-stage .question-position { color: #17151d; font-size: 14px; font-weight: 600; }
#lesson-stage .question-completion-count { color: #625e6c; font-size: 12px; font-weight: 400; }
#lesson-stage .focused-task-dots { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; width: auto; margin: 0; }
#lesson-stage .focused-task-dot { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 6px; border: 0; background: transparent !important; box-shadow: none !important; }
#lesson-stage .focused-task-dot::before, #lesson-stage .focused-task-dot::after { content: none; }
#lesson-stage .focused-task-dot > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #ddd8e7; background: #fff; color: #625e6c; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
#lesson-stage .focused-task-dot.current > span { background: #4f2bff; border-color: #4f2bff; color: #fff; font-weight: 600; }
#lesson-stage .focused-task-dot.done > span { color: #147a52; background: #eaf6ef; border-color: #d0e8db; }
#lesson-stage .focused-task-dot.current.done > span { outline: 2px solid #147a52; outline-offset: 2px; }
#lesson-stage .focused-task-dot .lesson-icon { width: 16px; height: 16px; }
#lesson-stage .focused-task-dot:focus-visible { outline: 2px solid #4f2bff; outline-offset: 0; border-radius: 50%; }
#lesson-stage .focused-flow-actions { margin: 24px 0 0; padding: 16px 0 0; border-top: 1px solid #e5e2eb; background: transparent; box-shadow: none; }
#lesson-stage .focused-flow-hint { grid-column: 1 / -1; margin: 0; color: #625e6c; font-weight: 400; font-size: 12px; text-align: right; }
#lesson-stage .question-workspace { border-radius: 8px; box-shadow: none; background: #fff; }
#lesson-stage .question-workspace > h3 { font-weight: 600; color: #17151d; }
#lesson-stage .question-workspace .option-button { border-radius: 6px; font-weight: 400; box-shadow: none; transition: background-color 120ms, border-color 120ms, color 120ms; }
#lesson-stage .question-workspace .option-button:not(.selected):hover { transform: none; box-shadow: none; }
#lesson-stage .question-workspace .option-button.selected { background: #4f2bff; border-color: #4f2bff; color: #fff; }
#lesson-stage .question-workspace .option-button.selected :is(.answer-choice-copy, .answer-choice-mark) { color: inherit; }
#lesson-stage .question-workspace .option-button.correct { background: #edf8f1; border-color: #399c6b; color: #14623f; }
#lesson-stage .question-workspace .option-button.incorrect { background: #fff4f0; border-color: #d37b61; color: #963c28; }
#lesson-stage .question-workspace .answer-choice-mark { color: inherit; border-color: currentColor; }
#lesson-stage .reward-feedback { box-shadow: none; border-radius: 6px; }
.task-status { font-size: 12px; font-weight: 400; }

/* Original audio, recording, and feedback form one short vertical sequence. */
#lesson-stage .mimic-panel { padding: 24px; border: 1px solid #e5e2eb; border-radius: 8px; background: #fff; box-shadow: none; }
#lesson-stage .mimic-panel .speak-card-top { margin: 0 0 12px; }
#lesson-stage .mimic-panel .task-title-row { margin: 0; }
#lesson-stage .mimic-panel .mini-label { color: #625e6c; font-size: 13px; font-weight: 400; }
#lesson-stage .listen-player { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#lesson-stage .listen-player audio { width: 100%; min-width: 0; height: 46px; }
#lesson-stage .speech-coach { padding: 16px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#lesson-stage .voice-recorder { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0; margin-top: 16px; }
#lesson-stage .voice-recorder :is(.mic-button, .stop-button) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 108px; height: 44px; min-height: 44px; padding: 10px 16px; border: 1px solid #ddd8e7; border-radius: 6px; color: #17151d; background: #fff; box-shadow: none; font: inherit; font-size: 14px; font-weight: 600; transform: none; }
#lesson-stage .voice-recorder .mic-button { background: #4f2bff; border-color: #4f2bff; color: #fff; }
#lesson-stage .voice-recorder :is(.mic-button, .stop-button)::before, #lesson-stage .voice-recorder :is(.mic-button, .stop-button)::after { content: none; }
#lesson-stage .voice-recorder :is(.mic-button, .stop-button) > span { display: inline !important; position: static; width: auto; height: auto; border: 0; background: none; color: inherit; font: inherit; transform: none; }
#lesson-stage .voice-recorder :is(.mic-button, .stop-button) > span::before, #lesson-stage .voice-recorder :is(.mic-button, .stop-button) > span::after { content: none; }
#lesson-stage .voice-recorder :is(.mic-button, .stop-button):disabled { opacity: 1; background: #f4f2f7; color: #8a8493; border-color: #e5e2eb; }
#lesson-stage .voice-recorder :is(.microphone-icon, .stop-icon) { display: block; width: 20px; height: 20px; filter: none; stroke: currentColor; stroke-width: 1.8; }
#lesson-stage .voice-recorder audio { flex: 1 1 100%; width: 100%; min-width: 0; margin: 8px 0 0; }
#lesson-stage .mimic-panel .speech-coach { min-height: 0; padding-top: 0; }
#lesson-stage .mimic-panel .voice-recorder { justify-content: flex-start; min-height: 44px; margin-top: 18px; }
#lesson-stage .speaking-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#lesson-stage .speaking-hero-row { display: block; }
#lesson-stage .speaking-question { font-size: 21px; line-height: 1.5; font-weight: 600; }
#lesson-stage .speaking-focus-grid { margin: 20px 0 0; }
#lesson-stage .speaking-focus-card { padding: 16px 0; border: 0; background: transparent; box-shadow: none; }
#lesson-stage .speaking-focus-card + .speaking-focus-card { padding-left: 18px; }
#lesson-stage .grammar-focus-card > strong { color: #393441; font-size: 15px; line-height: 1.5; font-weight: 400; }
#lesson-stage .speaking-answer-starter { display: block; margin-top: 8px; color: #625e6c; font-size: 14px; line-height: 1.6; }
#lesson-stage .target-chip-row span { padding: 5px 9px; border-radius: 4px; color: #3920ba; background: #f0ecff; font-weight: 400; }
#lesson-stage .vocab-sort-button { border-radius: 6px; }
#lesson-stage .vocab-sort-button > span { font-weight: 600; }
#lesson-stage .simple-word-card { padding: 18px; }
#lesson-stage .simple-word-card .headword-row { margin-bottom: 12px; }
#lesson-stage .voice-answer-coach { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 0; border: 0; border-top: 1px solid #e5e2eb; border-radius: 0; background: transparent; color: #17151d; box-shadow: none; }
#lesson-stage .voice-answer-coach .ai-coach-icon { display: grid; place-items: center; width: 28px; height: 28px; min-width: 28px; border: 0; background: transparent; color: #4f2bff; }
#lesson-stage .voice-answer-coach .ai-coach-icon::before, #lesson-stage .voice-answer-coach .ai-coach-icon::after { content: none; }
#lesson-stage .voice-answer-coach .ai-coach-kicker { color: #17151d; font-size: 13px; font-weight: 600; }
#lesson-stage .voice-answer-coach p:not(.ai-coach-kicker) { color: #625e6c; font-size: 13px; font-weight: 400; }
#lesson-stage .watch-video-cta { min-height: 0; padding: 10px 16px; }
#lesson-stage .watch-video-actions { width: 100%; justify-content: space-between; }

/* Grammar uses the example as the entry point; supporting facts stay quiet. */
#lesson-stage .grammar-pattern-sheet { padding: 20px 0; border: 0; border-top: 1px solid #e5e2eb; border-bottom: 1px solid #e5e2eb; border-radius: 0; box-shadow: none; background: transparent; }
#lesson-stage .grammar-pattern-main > h3 { max-width: 32ch; margin: 10px 0 16px; font-size: 26px; line-height: 1.4; font-weight: 600; }
#lesson-stage .grammar-pattern-main { display: block; min-height: 0; }
#lesson-stage .grammar-build { gap: 4px; }
#lesson-stage .grammar-build span { padding: 4px 8px; border-radius: 4px; background: #f0ecff; color: #3920ba; font-size: 13px; font-weight: 400; box-shadow: none; animation: none; opacity: 1; transform: none; }
#lesson-stage .grammar-core-facts { margin-top: 18px; padding-top: 0; border: 0; }
#lesson-stage .grammar-core-facts dt { color: #625e6c; font-weight: 600; text-transform: none; }
#lesson-stage .grammar-core-facts dd { font-size: 15px; line-height: 1.65; max-width: 64ch; }
#lesson-stage .grammar-usage-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 18px 0 24px; }
#lesson-stage .grammar-usage-notes p, #lesson-stage .grammar-caution-list { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: #393441; }
#lesson-stage .grammar-usage-notes .mini-label { color: #625e6c; font-size: 12px; font-weight: 600; }
#lesson-stage .grammar-usage-notes > div:last-child:has(.grammar-caution-list) { padding: 0; border: 0; border-radius: 0; background: transparent; }
#lesson-stage .grammar-caution-list { padding-left: 18px; }
#lesson-stage .grammar-caution-list li::marker { color: #625e6c; }
#lesson-stage .grammar-core-facts { display: grid; gap: 16px; }
#lesson-stage .grammar-core-facts > div { display: block; }
#lesson-stage .grammar-core-facts dt { margin-bottom: 4px; }
#lesson-stage .grammar-usage-notes.grammar-reference { display: block; margin: 8px 0 16px; }
#lesson-stage .grammar-reference > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 0; color: #625e6c; font-size: 13px; font-weight: 400; cursor: pointer; list-style: none; }
#lesson-stage .grammar-reference > summary::-webkit-details-marker { display: none; }
#lesson-stage .grammar-reference > summary .lesson-icon { width: 16px; height: 16px; }
#lesson-stage .grammar-reference[open] > summary .lesson-icon { transform: rotate(90deg); }
#lesson-stage .grammar-reference-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px 0 20px; }
#lesson-stage .grammar-reference-content > div { display: block; }
#lesson-stage .grammar-reference-content .mini-label { margin: 0 0 4px; }
#lesson-stage .grammar-caution-list li { padding-left: 0; }
#lesson-stage .grammar-caution-list li::before { content: none; }
#lesson-stage .grammar-reference > summary:focus-visible { outline: 2px solid #4f2bff; outline-offset: 2px; }
#lesson-stage .grammar-task-section { padding-top: 16px; }
#lesson-stage .grammar-task-heading { margin-bottom: 8px; }
#lesson-stage .grammar-task-heading .mini-label { display: none; }
#lesson-stage .grammar-task-heading h3 { font-size: 18px; font-weight: 600; }
#lesson-stage .grammar-bonus-trigger { margin: 20px 0; padding: 16px 0; border: 0; border-top: 1px solid #e5e2eb; border-bottom: 1px solid #e5e2eb; border-radius: 0; background: transparent; box-shadow: none; }
#lesson-stage .grammar-bonus-trigger-action { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.grammar-bonus-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border-radius: 8px; border: 1px solid #e5e2eb; box-shadow: 0 16px 64px #17151d24; }
.grammar-bonus-dialog::before { content: none; }
.grammar-bonus-header { grid-template-columns: 40px minmax(0,1fr); gap: 14px; padding: 28px 56px 20px 28px; background: #fff; }
.grammar-bonus-lockup { width: 40px; height: 40px; border-radius: 8px; color: #75531d; background: #fff1cf; border: 1px solid #f0d699; }
.grammar-bonus-header h2 { max-width: none; font-size: 26px; line-height: 1.25; font-weight: 600; }
.grammar-bonus-kicker { margin-bottom: 6px; color: #147a52; font-size: 12px; font-weight: 600; }
.grammar-bonus-header #grammar-bonus-description { margin-top: 8px; font-size: 14px; color: #625e6c; }
.grammar-bonus-close { top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; min-height: 44px; min-width: 44px; background: transparent; border: 0; border-radius: 6px; box-shadow: none; }
.grammar-bonus-close::before, .grammar-bonus-close::after { content: none; }
.grammar-bonus-list { padding: 0 28px; }
.grammar-bonus-note { display: block; padding: 18px 0; border-top: 1px solid #e5e2eb; animation: none; opacity: 1; transform: none; }
.grammar-bonus-note-number { display: none; }
.grammar-bonus-note h3 { font-size: 18px; line-height: 1.4; font-weight: 600; }
.grammar-bonus-note blockquote { margin: 12px 0; padding: 10px 14px; border-left: 2px solid #4f2bff; background: #f6f3ff; color: #3920ba; font-size: 16px; font-weight: 400; line-height: 1.5; }
.grammar-bonus-note p { font-size: 14px; line-height: 1.65; color: #625e6c; }
.grammar-bonus-footer { justify-content: flex-end; padding: 16px 28px 24px; }
.grammar-bonus-footer button { min-height: 44px; min-width: 112px; border-radius: 6px; }

/* Track tabs never share a grid cell with a lesson. */
.lesson-menu .lesson-menu-popover { display: flex; flex-direction: column; grid-template-columns: minmax(0, 1fr); gap: 0; width: 380px; max-width: calc(100vw - 32px); max-height: min(560px, calc(100dvh - 100px)); padding: 0; overflow: hidden; border: 1px solid #e5e2eb; border-radius: 8px; background: #fff; box-shadow: 0 12px 36px #17151d1f; }
.lesson-menu:not([open]) .lesson-menu-popover { display: none; }
.lesson-selector-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 4px 18px; flex: 0 0 auto; }
.lesson-selector-header strong { font-size: 14px; font-weight: 600; }
.lesson-selector-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; background: transparent; border: 0; border-radius: 6px; color: #625e6c; }
.lesson-track-tabs { display: flex; gap: 4px; padding: 0 14px; flex: 0 0 auto; border-bottom: 1px solid #e5e2eb; }
.lesson-track-tabs button { flex: 1; min-height: 44px; padding: 10px; border: 0; border-bottom: 2px solid transparent; background: #fff; color: #625e6c; font: inherit; font-size: 13px; font-weight: 400; cursor: pointer; }
.lesson-track-tabs button[aria-selected="true"] { color: #3920ba; border-bottom-color: #4f2bff; font-weight: 600; }
.lesson-selector-list { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; scrollbar-width: thin; scrollbar-color: #c8c3d2 transparent; }
.lesson-menu-popover .lesson-selector-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 18px; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 10px 12px; margin: 0; border: 0; border-radius: 6px; background: #fff; color: #17151d; text-decoration: none; }
.lesson-menu-popover .lesson-selector-row:hover { background: #f6f4f9; }
.lesson-menu-popover .lesson-selector-row.active { background: #efebff; color: #3920ba; border: 0; }
.lesson-menu-popover .lesson-selector-row .lesson-selector-number { font-size: 12px; color: #625e6c; font-weight: 400; font-variant-numeric: tabular-nums; }
.lesson-menu-popover .lesson-selector-row .lesson-selector-copy { display: grid; min-width: 0; gap: 3px; font: inherit; }
.lesson-menu-popover .lesson-selector-row strong { color: inherit; font-size: 14px; line-height: 1.4; font-weight: 600; }
.lesson-selector-copy small { font-size: 11px; line-height: 1.4; font-weight: 400; color: #625e6c; }
.lesson-selector-row > .lesson-icon { width: 18px; height: 18px; }
.lesson-selector-row:focus-visible, .lesson-track-tabs button:focus-visible { outline: 2px solid #4f2bff; outline-offset: -2px; }
.activity-picker-trigger { display: none; }
.activity-picker-dialog { width: min(400px, calc(100vw - 24px)); max-height: min(620px, calc(100dvh - 24px)); padding: 0; border: 1px solid #e5e2eb; border-radius: 8px; color: #17151d; background: #fff; overflow: hidden; }
.activity-picker-dialog[open] { display: flex; flex-direction: column; }
.activity-picker-dialog::backdrop { background: #17151d60; }
.activity-picker-dialog > header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e5e2eb; }
.activity-picker-dialog h2 { margin: 0; font-size: 18px; font-weight: 600; }
.activity-picker-dialog [data-close-activities] { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; color: #625e6c; }
.activity-picker-scroll { position: relative; overflow: auto; overscroll-behavior: contain; padding: 16px; }
.activity-picker-list { display: grid; gap: 18px; padding: 0; margin: 0; list-style: none; }
.activity-picker-dialog .phase-item { min-height: 44px; }
.activity-picker-dialog footer { padding: 8px 16px; border-top: 1px solid #e5e2eb; }
.activity-picker-dialog footer button { min-height: 44px; color: #625e6c; }
#lesson-stage .reveal-next-action { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 24px 0; padding: 20px 0; border: 0; border-top: 1px solid #e5e2eb; border-radius: 0; background: transparent; box-shadow: none; }
.reveal-next-copy { flex: 1 1 280px; }
#lesson-stage .reveal-next-action { flex-direction: row; }
#lesson-stage .roleplay-actions .compact-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.reveal-next-copy h3 { margin: 6px 0; font-size: 20px; line-height: 1.4; font-weight: 600; }
.reveal-next-copy > p:not(.mini-label) { margin: 8px 0 0; max-width: 60ch; font-size: 14px; color: #625e6c; line-height: 1.6; }
.reveal-results { flex-basis: 100%; margin-top: 4px; font-size: 13px; }
.reveal-results > summary { display: list-item; min-height: 44px; align-content: center; color: #625e6c; cursor: pointer; }
.reveal-results dl { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.reveal-results dl div { min-width: 140px; }
.reveal-results dt { margin-bottom: 4px; font-weight: 600; }
.reveal-results dd { margin: 0; color: #625e6c; }
@media (max-width: 940px) {
  .stage-kicker-row { display: flex; justify-content: space-between; gap: 12px; }
  .activity-picker-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 8px 0 8px 8px; border: 0; background: transparent; color: #4f2bff; font: inherit; font-size: 12px; }
  .activity-picker-trigger .lesson-icon { width: 16px; height: 16px; }
}

@media (max-width: 640px) {
  .lesson-meta { gap: 2px; }
  .effects-toggle { padding: 10px; }
  .effects-toggle > span { display: none; }
  #lesson-stage .stage-header { margin-bottom: 18px; }
  #lesson-stage .stage-header h2 { font-size: 28px; }
  #lesson-stage .stage-header p { font-size: 14px; line-height: 1.55; }
  #lesson-stage .focused-task-progress { gap: 4px; margin: 8px 0 16px; padding-bottom: 8px; }
  #lesson-stage .focused-task-dots { gap: 0; }
  #lesson-stage .focused-task-progress-copy { min-width: 100px; }
  #lesson-stage .focused-flow-hint { text-align: left; }
  #lesson-stage .mimic-panel { padding: 16px 0; border: 0; border-top: 1px solid #e5e2eb; border-radius: 0; }
  #lesson-stage .grammar-pattern-main > h3 { font-size: 22px; }
  #lesson-stage .grammar-usage-notes { grid-template-columns: 1fr; gap: 12px; }
  #lesson-stage .speaking-question { font-size: 19px; }
  #lesson-stage .speaking-focus-grid { grid-template-columns: 1fr; }
  #lesson-stage .speaking-focus-card + .speaking-focus-card { padding-left: 0; border-top: 1px solid #e5e2eb; }
  #lesson-stage .watch-video-cta { padding: 10px; }
  .grammar-bonus-header { padding: 24px 48px 16px 20px; gap: 10px; }
  .grammar-bonus-header h2 { font-size: 24px; }
  .grammar-bonus-list { padding: 0 20px; }
  .grammar-bonus-footer { padding: 12px 20px 20px; }
  .lesson-menu[open] { z-index: 200; }
  .lesson-menu[open]::before { position: fixed; inset: 0; z-index: 0; background: #17151d38; }
  .lesson-menu .lesson-menu-popover { position: fixed; inset: auto 8px max(8px, env(safe-area-inset-bottom)); transform: none; width: auto; max-width: none; height: min(520px, 70dvh); max-height: 70dvh; border-radius: 8px; z-index: 1; }
  .lesson-menu .lesson-menu-popover::before { content: none; }
  .lesson-menu-popover .lesson-selector-row { min-height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage > .progress-track > #progress-bar { transition: none; }
  .grammar-bonus-dialog, .grammar-bonus-header > *, .grammar-bonus-note { animation: none; }
}
