:root {
  color-scheme: light;
  --page: #fbf7ed; --panel: #fffdf8; --ink: #302744; --muted: #746a80;
  --purple: #7652b5; --purple-dark: #59378f; --lavender: #eee5fa; --line: #e5dbec;
  --gold: #ffd77d; --peach: #ffebc7; --mint: #dff1e8; --green: #26714d;
  --red: #a74355; --red-soft: #ffebeb; --shadow: 0 7px 24px #48355d08;
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  font-synthesis: none; color: var(--ink); background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
:focus-visible { outline: 3px solid #357eac; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; }
h3 { font-size: 1.15rem; line-height: 1.4; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 10; padding: 12px; background: white; }
.luxi-icon { width: 24px; height: 24px; flex: 0 0 24px; vertical-align: middle; }
.app-shell { max-width: 1100px; margin: 28px auto; background: #fffaf2; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: clip; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 20px 38px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 800; letter-spacing: .04em; color: var(--purple-dark); }
.brand-subtitle { display: block; font-size: 11px; font-weight: 500; letter-spacing: .07em; color: var(--muted); }
.student-nav { display: flex; gap: 14px; }
.student-nav a { display: grid; justify-items: center; gap: 5px; padding: 10px 13px; min-width: 89px; font-size: 13px; border-radius: 16px; }
.student-nav .luxi-icon { width: 29px; height: 29px; }
.student-nav a:hover, .student-nav a[aria-current=page] { color: var(--purple-dark); background: var(--lavender); }
.main-content { padding: 32px 38px 42px; min-height: 55vh; }
.app-footer { padding: 18px 38px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.parent-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.parent-link .luxi-icon { width: 17px; height: 17px; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-context { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 14px; color: var(--muted); }
.page-context > .action-with-audio { flex-shrink: 0; }
.page-context > span { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.level-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); padding: 10px 14px; background: var(--panel); border-radius: 30px; font-size: 14px; min-height: 44px; }
.level-chip .luxi-icon { width: 18px; height: 18px; flex-basis: 18px; }
.button, button[type=submit]:not([class]) { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 11px 18px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 600; line-height: 1.3; text-align: center; }
.button:hover:not(:disabled), a.level-chip:hover, summary.level-chip:hover { background: var(--lavender); border-color: #c2addf; }
.button.primary, .button--primary, button[type=submit]:not([class]) { background: var(--purple); border-color: var(--purple); color: white; box-shadow: 0 3px 0 var(--purple-dark); }
.button.primary:hover:not(:disabled), .button--primary:hover:not(:disabled) { background: var(--purple-dark); color: white; }
.button.back-button { padding: 10px 14px; min-width: 112px; flex: 0 0 auto; border-radius: 14px; white-space: nowrap; }
.picture-button { display: grid; justify-items: center; gap: 7px; min-width: 136px; padding: 13px 16px; }
.picture-button .luxi-icon { width: 30px; height: 30px; }
.text-link { color: var(--purple-dark); text-decoration: underline; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--purple-dark); }
.section { margin-top: 28px; }
.stack { display: grid; gap: 18px; }
.panel, .activity-card { background: var(--panel); padding: 26px; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.home-hero { display: grid; grid-template-columns: minmax(0,1fr) 220px; align-items: center; gap: 24px; min-height: 255px; padding: 32px 40px; background: linear-gradient(120deg, #f1e8fc 0%, #fff3d9 100%); border: 1px solid #e4d7ed; border-radius: 25px; }
.hero-copy { display: grid; gap: 14px; justify-items: start; }
.hero-copy h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
.hero-copy .progress-meter { width: min(100%, 330px); }
.hero-island { display: grid; position: relative; place-items: center; min-height: 180px; }
.hero-island::after { content: ''; position: absolute; width: 165px; height: 36px; border-radius: 50%; bottom: 4px; background: #c8b2d666; transform: rotate(-5deg); }
.hero-island > .luxi-mascot { transform: scale(2); z-index: 1; }
.island-star { position: absolute; right: 10px; top: 4px; color: #c77e24; transform: rotate(14deg); }
.island-star .luxi-icon { width: 34px; height: 34px; }
.offering-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.offering-card { background: var(--panel); padding: 22px; border: 1px solid var(--line); border-radius: 22px; display: grid; gap: 24px; box-shadow: var(--shadow); }
.offering-card:hover { border-color: var(--purple); }
.card-title { display: flex; align-items: center; gap: 15px; min-width: 0; }
.card-title strong { font-size: 19px; }
.card-title > .luxi-icon:last-child { margin-left: auto; width: 18px; flex-basis: 18px; }
.card-title p { font-size: 14px; margin-top: 5px; }
.subject-picture, .activity-picture { display: inline-grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 19px 23px 18px 23px; color: var(--subject-color, var(--purple)); background: var(--lavender); background: color-mix(in srgb, var(--subject-color, var(--purple)) 14%, var(--panel)); }
.subject-picture .luxi-icon, .activity-picture .luxi-icon { width: 37px; height: 37px; }
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.activity-card { display: flex; flex-direction: column; gap: 24px; }
.activity-card .progress-meter { margin-top: auto; }
.card-actions, .form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.card-actions { justify-content: flex-end; }
.button_to { margin: 0; }
.progress-meter { min-width: 0; }
.progress-numbers { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.progress-track { height: 10px; border-radius: 10px; background: var(--lavender); overflow: hidden; margin-top: 8px; }
.progress-fill { display: block; height: 100%; background: var(--purple); border-radius: inherit; }
.empty-progress { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; min-height: 39px; }
.empty-state { display: grid; justify-items: center; text-align: center; padding: 42px 20px; gap: 15px; }
.empty-state > .luxi-mascot { margin-bottom: 8px; }
.exercise-library { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.library-task { display: flex; align-items: center; gap: 13px; width: 100%; height: 100%; min-height: 90px; text-align: left; padding: 18px; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); background: var(--panel); }
.library-task:hover { border-color: var(--purple); }
.library-title { flex: 1; overflow-wrap: anywhere; }
.library-status { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--lavender); }
.status-solved .library-status { background: var(--mint); color: var(--green); }
.status-help .library-status { background: var(--peach); color: #945800; }
.profile-heading { display: flex; gap: 22px; align-items: center; margin-bottom: 28px; }
.profile-settings { max-width: 650px; }
.profile-settings form { display: grid; justify-items: start; gap: 14px; margin-top: 18px; }
.profile-grid, .metric-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
label { font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]), select, textarea { min-height: 48px; max-width: 100%; width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--purple); width: 20px; height: 20px; }
textarea { min-height: 110px; resize: vertical; }
input:disabled { opacity: 1; background: var(--page); }
fieldset { min-width: 0; margin: 0; }
.panel h1 + *, .panel h2 + *, .panel form + * { margin-top: 18px; }
.panel form.stack { margin-top: 20px; }
.flash, .alert, .notice { padding: 14px 18px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--lavender); }
.alert { background: var(--red-soft); color: #812f41; border-color: #e8c3c8; }
.notice { background: var(--mint); color: var(--green); }
.task-panel { padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }
.task-body { padding-top: 24px; }
.task-prompt { text-align: center; font-size: clamp(1.3rem,2.5vw,1.8rem); line-height: 1.4; margin-bottom: 22px; }
.letter-target { text-align: center; font-size: clamp(80px,12vw,110px); font-weight: 700; line-height: 1.2; margin: 4px 0 24px; }
.answer-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 0; border: 0; }
.letter-choices { max-width: 460px; margin: 0 auto; }
.choice { position: relative; min-width: 0; border: 2px solid var(--line); border-radius: 17px; background: var(--page); overflow-wrap: anywhere; display: flex; align-items: stretch; }
.choice > input { position: absolute; left: 10px; top: 9px; opacity: 0; }
.choice > label { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 23px 22px 33px; min-height: 102px; text-align: center; cursor: pointer; font-weight: 500; }
.choice:has(input:checked) { background: var(--lavender); border-color: var(--purple); }
.choice:has(input:focus-visible) { outline: 3px solid #357eac; outline-offset: 4px; }
.choice > input:disabled + label { cursor: default; }
.letter-choices .choice > label { font-size: 32px; }
.choice.correct, .choice.correct:has(input:checked), .answer-input.correct { background: var(--mint); border-color: var(--green); color: #125737; box-shadow: 0 0 0 3px #d4efdf80; }
.choice.incorrect { background: var(--red-soft); border-color: var(--red); }
.choice-mark { position: absolute; top: 8px; right: 8px; display: flex; }
.choice-mark .luxi-icon { width: 20px; height: 20px; }
.reading-passage { background: var(--page); border-left: 4px solid var(--purple); border-radius: 14px; padding: 18px 22px; margin-bottom: 24px; }
.reading-passage p + p { margin-top: 9px; }
.math-expression { display: flex; justify-content: center; align-items: center; gap: 12px; font-family: Georgia, serif; font-size: clamp(26px,4vw,38px); margin: 24px 0; overflow-wrap: anywhere; }
.answer-field { max-width: 600px; margin: 0 auto; }
.answer-input { font-size: 22px; }
.math-keypad { display: flex; flex-wrap: wrap; gap: 9px; max-width: 600px; margin: 14px auto 0; }
.symbol-key { min-width: 50px; font-size: 20px; font-weight: 500; }
.task-feedback { display: flex; gap: 14px; align-items: center; height: 96px; margin-top: 24px; border-top: 1px solid var(--line); }
.task-feedback h2 { font-size: 18px; line-height: 1.3; }
.task-feedback .spoken-button .luxi-icon { width: 17px; height: 17px; }
.task-actions { display: grid; grid-template-columns: repeat(2,minmax(0,220px)); gap: 14px; justify-content: end; }
.task-primary-slot, .task-secondary-slot { min-width: 0; height: 80px; }
.task-actions form { margin: 0; height: 100%; }
.task-action { width: 100%; height: 80px; min-width: 0; padding: 10px 14px; }
.explanation-button { background: var(--peach); border-color: #e8c994; color: #78490b; }
.task-explanation { display: grid; gap: 14px; padding: 22px; margin-top: 8px; border-radius: 16px; background: var(--mint); color: #214f39; }
/* Picture with the explanation (note on 447daf3f 29.09): scaled to fit, never cropped. */
.task-explanation-image { display: block; width: 100%; max-width: 30rem; max-height: 46vh; margin: 0 auto; object-fit: contain; border-radius: 12px; background: #fff; }
.matching-letters { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 40px; font-weight: 700; }
.save-status { min-height: 22px; font-size: 12px; color: var(--muted); margin-top: 13px; }
.round-complete { display: grid; justify-items: center; gap: 18px; text-align: center; padding: 42px 26px; }
.round-complete > .luxi-mascot { transform: scale(1.5); margin: 18px 0 26px; }
.round-complete .progress-meter { width: min(100%,420px); margin: 10px 0; }
.spoken-button { font: inherit; line-height: inherit; color: inherit; text-align: inherit; border: 0; background: transparent; padding: 3px 0; border-radius: 4px; cursor: pointer; }
.spoken-button .speech-tail > .luxi-icon { width: 16px; height: 16px; margin-left: 7px; color: var(--muted); }
.spoken-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-speech .spoken-button { font-size: 0; width: 44px; height: 44px; padding: 8px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.icon-speech .spoken-button .luxi-icon { width: 21px; height: 21px; flex-basis: 21px; margin: 0; }
.choice-speech { position: absolute; bottom: 0; right: 2px; }
/* Picture answers with their own read-aloud (user decision 01.10.2026: the day or month is heard by its picture):
   a clear speaker of its own, beside the picture's label, so hearing never selects an answer. */
.answer-choices.guided-choices .choice:has(.guided-choice-image) > label { padding-bottom: 62px; }
.guided-choices .choice:has(.guided-choice-image) .choice-speech { bottom: 6px; right: 6px; }
.guided-choices .choice:has(.guided-choice-image) .choice-speech .spoken-button { width: 52px; height: 52px; border: 2px solid var(--purple); border-radius: 50%; background: var(--panel); }
.guided-choices .choice:has(.guided-choice-image) .choice-speech .spoken-button .luxi-icon { width: 26px; height: 26px; flex-basis: 26px; }
.audio-status { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; border-radius: 14px; color: white; background: var(--ink); box-shadow: var(--shadow); z-index: 5; pointer-events: none; }
.audio-status:empty { display: none; }
.audio-status:not(:empty) { padding: 12px 18px; }
.luxi-mascot { --shell: var(--purple); position: relative; display: inline-block; width: 70px; height: 67px; flex: 0 0 70px; isolation: isolate; }
.mascot-head { position: absolute; left: 8px; top: 13px; width: 49px; height: 35px; border: 4px solid var(--shell); border-radius: 13px; background: var(--panel); z-index: 2; }
.mascot-antenna { position: absolute; left: 31px; top: 2px; height: 14px; width: 4px; background: var(--shell); }
.mascot-antenna::before { content: ''; position: absolute; left: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.eye { position: absolute; top: 7px; width: 5px; height: 6px; border-radius: 50%; background: var(--ink); }
.eye.left { left: 9px; } .eye.right { right: 9px; }
.mouth { position: absolute; top: 17px; left: 14px; width: 12px; height: 5px; border-radius: 0 0 10px 10px; background: var(--ink); }
.mascot-body { position: absolute; top: 42px; left: 18px; width: 29px; height: 18px; border-radius: 7px; background: var(--shell); }
.mascot-body::after { content: ''; position: absolute; width: 9px; height: 5px; left: 10px; top: 8px; border-radius: 2px; background: var(--gold); }
.mascot-hand { position: absolute; top: 35px; left: 2px; width: 9px; height: 17px; border-radius: 6px; background: var(--shell); transform: rotate(-30deg); }
.mascot-feet { position: absolute; top: 59px; left: 19px; width: 11px; height: 6px; border-radius: 4px; background: var(--shell); box-shadow: 15px 0 0 var(--shell); }
.mascot-badge { position: absolute; right: 0; bottom: 3px; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--ink); z-index: 3; }
.mascot-badge .luxi-icon { width: 18px; height: 18px; }
.mood-good, .mood-done { --shell: var(--green); }
.mood-good .mascot-hand, .mood-done .mascot-hand { top: 25px; transform: rotate(25deg); }
.mood-good .mascot-badge, .mood-done .mascot-badge { background: var(--mint); color: var(--green); }
.mood-wrong .mouth { height: 3px; border-radius: 3px; transform: rotate(-8deg); }
.mood-answer .mascot-badge { box-shadow: 0 0 0 4px var(--peach); }
.mood-empty .eye { height: 3px; border-radius: 3px; }
@media (max-width: 900px) {
  .app-shell { margin: 0; border-radius: 0; min-height: 100vh; border-left: 0; border-right: 0; }
  .offering-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .activity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .app-header { padding: 16px 20px; flex-wrap: wrap; gap: 15px; }
  .main-content { padding: 24px 20px 32px; }
  .app-footer { padding: 14px 20px; flex-wrap: wrap; }
  .brand { font-size: 25px; }
  .brand .luxi-mascot { display: none; }
  .student-nav { gap: 4px; }
  .student-nav a { min-width: 70px; padding: 8px; font-size: 12px; }
  .student-nav .luxi-icon { width: 26px; height: 26px; }
  .home-hero { grid-template-columns: minmax(0,1fr) 110px; padding: 26px 22px; gap: 15px; }
  .hero-island { min-height: 150px; }
  .hero-island > .luxi-mascot { transform: scale(1.35); }
  .hero-island::after { width: 108px; bottom: 19px; height: 22px; }
  .island-star { right: -4px; top: 0; }
  .offering-grid, .exercise-library { grid-template-columns: 1fr; }
  .task-panel { padding: 22px 18px; }
  .answer-choices:not(.letter-choices) { grid-template-columns: 1fr; }
  .answer-choices:not(.letter-choices) .choice > label { min-height: 74px; padding: 15px 48px 15px 18px; }
  .answer-choices:not(.letter-choices) .choice-speech { bottom: 15px; }
  .panel, .activity-card { padding: 22px; }
}
@media (max-width: 430px) {
  .main-content { padding: 22px 14px; }
  .app-header { padding: 14px; }
  .brand { font-size: 24px; }
  .brand-subtitle { display: none; }
  .student-nav { width: 100%; justify-content: space-between; }
  .student-nav a { min-width: 82px; }
  .home-hero { grid-template-columns: minmax(0,1fr) 84px; padding: 22px 17px; gap: 8px; }
  .hero-island > .luxi-mascot { transform: scale(1.05); }
  .hero-island::after { width: 82px; bottom: 32px; }
  .island-star { display: none; }
  .hero-copy p { font-size: 14px; }
  .hero-copy .button { padding: 11px; font-size: 14px; }
  .page-heading { gap: 14px; }
  .task-panel { padding: 19px 12px; }
  .task-feedback { height: 102px; gap: 5px; }
  .task-feedback h2 { font-size: 16px; }
  .task-actions { gap: 9px; }
  .task-primary-slot, .task-secondary-slot, .task-action { height: 96px; }
  .task-action { display: grid; grid-template-rows: 26px 1fr; gap: 3px; justify-items: center; padding: 10px 7px; font-size: 14px; }
  .task-action .luxi-icon { width: 26px; height: 26px; }
  .letter-choices { gap: 10px; }
  .letter-choices .choice > label { min-height: 100px; padding: 20px 12px 33px; }
  .card-actions > *, .card-actions .button { flex: 1; min-width: 0; }
  .card-actions form .button { width: 100%; }
  .card-actions { gap: 9px; }
  .picture-button { font-size: 14px; }
  .activity-picture { width: 54px; height: 58px; flex-basis: 54px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .offering-card, .library-task { transition: background-color .15s, border-color .15s; }
}
@media (forced-colors: active) {
  .progress-track { border: 1px solid CanvasText; }
  .progress-fill { background: Highlight; }
  .choice:has(input:checked) { outline: 3px solid Highlight; }
}

/* Listening controls are siblings of navigation/action controls. */
.audio-control { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 9px; color: var(--purple-dark); border: 1px solid var(--line); border-radius: 50%; background: var(--panel); }
.audio-control .luxi-icon { width: 20px; height: 20px; }
.audio-control:hover { background: var(--lavender); }
.action-with-audio { display: flex; align-items: center; gap: 9px; }
.nav-item { display: grid; justify-items: center; gap: 4px; }
.nav-item > .audio-control { width: 36px; height: 36px; padding: 7px; }
.card-actions .action-with-audio { display: grid; justify-items: center; }
.task-action-listening { display: grid; grid-template-columns: repeat(2,minmax(0,220px)); justify-content: end; gap: 14px; margin-top: 8px; }
.task-action-listening > div { display: flex; justify-content: center; min-height: 44px; }
.draft-recovery { margin-top: 20px; }
.draft-recovery dl { display: grid; gap: 8px; margin: 18px 0; }
.draft-recovery dt { color: var(--muted); font-size: 14px; }
.draft-recovery dd { margin: 0 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 430px) {
  .task-action-listening { gap: 9px; }
  .hero-copy .action-with-audio { flex-wrap: wrap; }
}

.task-image { display: block; width: 100%; max-width: 640px; height: clamp(140px,30vw,280px); object-fit: contain; margin: 0 auto 24px; border-radius: 14px; }

/* Guided media: original proportions, including on a 375px screen. */
.guided-choice-image { display: block; width: 100%; max-width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.answer-choices.guided-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answer-choices.guided-choices.layout-rows { grid-template-columns: minmax(0, 1fr); }
.answer-choices.guided-choices .choice { min-width: 0; }
.answer-choices.guided-choices .choice > label { height: 100%; min-height: 100px; padding: 14px 12px 52px; overflow-wrap: anywhere; }
.guided-answer { width: min(100%, 320px); margin: 12px auto; }
.guided-intro { margin: 16px 0; padding: 16px; border: 2px solid var(--theme-primary, var(--purple)); border-radius: 16px; min-width: 0; }
.guided-intro summary { cursor: pointer; font-weight: 750; padding: 8px; }
.intro-heading, .intro-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.intro-step[hidden], .intro-choice-check[hidden] { display: none; }
.intro-step { margin: 18px 0; overflow-wrap: anywhere; }
.intro-picture { position: relative; width: fit-content; max-width: 100%; margin: 16px auto; }
.intro-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 360px; object-fit: contain; }
.intro-highlight { position: absolute; border: 3px solid var(--theme-primary, var(--purple)); border-radius: 12px; pointer-events: none; box-sizing: border-box; }
.guided-reading { text-align: left; font-size: clamp(1.15rem, 4vw, 1.6rem); line-height: 1.8; overflow-wrap: anywhere; }
.intro-reading-line { display: flex; align-items: center; gap: 8px; }
.intro-reading-line > span:not(.reading-marker) { min-width: 0; }
.reading-marker { display: inline-block; width: 14px; height: 14px; flex: 0 0 14px; margin: 0 8px; border-radius: 50%; background: var(--theme-primary, var(--purple)); vertical-align: middle; }
.reading-marker.tappable { width: 44px; height: 44px; flex-basis: 44px; padding: 0; border: 14px solid var(--panel); outline: 2px solid var(--theme-primary, var(--purple)); cursor: pointer; }
.reading-marker.chosen { outline-width: 4px; }
.intro-word { font-size: 1.7rem; text-align: center; }
.intro-claps { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.intro-beat { display: grid; text-align: center; padding: 8px; border: 2px solid transparent; border-radius: 8px; }
.intro-beat.lit { border-color: var(--theme-primary, var(--purple)); background: var(--panel); }
.intro-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.intro-choices > div { min-width: 0; }
.intro-choice.button { width: 100%; display: flex; flex-direction: column; padding: 8px; min-height: 70px; }
.intro-choice.guided { outline: 3px solid var(--theme-primary, var(--purple)); }
.intro-choice-beats { white-space: normal; overflow-wrap: anywhere; }
.intro-practice-status { min-height: 1.5em; }

/* Keep a whole short word centered and readable without overflowing on mobile. */
.guided-flashcard { container-type: inline-size; text-align: center; }
.guided-flashcard .letter-target { font-size: min(110px, calc(90cqw / (var(--stimulus-length) + 1))); }

/* Constructed responses: the same reachable controls for tap, drag and keyboard. */
.constructed-response { width: 100%; max-width: 720px; margin-inline: auto; }
.response-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 16px; }
.response-fields legend { font-weight: 700; margin-bottom: 10px; }
.response-slots, .response-pieces, .response-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.response-cell { display: grid; justify-items: center; }
.response-slot { min-width: 54px; min-height: 64px; font-size: 1.7rem; }
.response-slot[aria-pressed="true"] { border-color: var(--purple); outline: 2px solid var(--purple); outline-offset: 2px; }
.response-clear { min-height: 44px; padding: 8px; }
.response-piece { min-width: 52px; min-height: 56px; font-size: 1.45rem; }
.response-piece[draggable="true"] { cursor: grab; }
.response-piece:disabled { opacity: .4; }
.response-tools .button { min-height: 48px; }
.response-ink { display: grid; gap: 12px; }
.response-ink p { font-size: .9rem; color: var(--muted); }
.response-ink canvas { display: block; width: 100%; max-width: 480px; height: auto; margin-inline: auto; border: 2px solid var(--line); border-radius: 16px; background: #fffdf8; touch-action: none; }
@media (max-width: 480px) {
  .response-slots, .response-pieces, .response-tools { gap: 8px; }
  .response-slot { min-width: 48px; padding-inline: 12px; }
  .response-piece { min-width: 48px; padding-inline: 12px; }
}

.response-tools .button[aria-expanded="true"] { outline: 3px solid var(--purple); outline-offset: 2px; }
.response-tools .button[title] { min-width: 58px; min-height: 54px; }
.response-ink-choice { min-width: 64px; min-height: 64px; font-size: 2rem; }
.response-tools [hidden] { display: none !important; }

.response-ink[hidden] { display: none; }

/* Account, consent and settings forms */
.field-hint { font-size: 14px; color: var(--muted); }
.check-field { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; }
.check-field input[type=checkbox] { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; }
.check-field .field-hint { display: block; margin-top: 4px; font-weight: 400; }
.inline-link { color: var(--purple-dark); text-decoration: underline; text-underline-offset: 3px; }
.button--danger { background: var(--red-soft); border-color: #e8c3c8; color: #812f41; }
.button--danger:hover:not(:disabled) { background: #ffdfe2; border-color: var(--red); }
.account-settings { max-width: 720px; }
.legal-page { max-width: 760px; min-width: 0; }
.legal-page table { width: 100%; border-collapse: collapse; }
.legal-page th, .legal-page td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal-table { max-width: 100%; overflow-x: auto; }
.legal-table table { min-width: 520px; }
.app-footer nav { display: flex; gap: 16px; }
.app-footer nav a { text-decoration: underline; text-underline-offset: 3px; }
/* The speaker stays with the last word of the text. */
.speech-tail { white-space: nowrap; }
/* Text answers in guided cards: readable, and a letter or short number is large (M5).
   Without a speaker the card needs no room for it at the bottom. */
.answer-choices.guided-choices .choice > label:not(:has(img)) { font-size: clamp(1.1rem, 3.2vw, 1.35rem); font-weight: 650; }
.answer-choices.guided-choices .choice:not(:has(.choice-speech)) > label { padding-bottom: 14px; }
.choice-text-short { font-size: clamp(2rem, 8vw, 2.6rem); font-weight: 700; line-height: 1.1; }

/* Pictures in the task with their own read-aloud (stimulus kind "panels", user decision 01.10.2026): each picture is
   one button that only plays its word, with a clear speaker badge; the text answers follow below. */
.stimulus-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.stimulus-panels.layout-rows { grid-template-columns: minmax(0, 1fr); }
.stimulus-panel { min-width: 0; }
.stimulus-panel-listen { position: relative; display: block; width: 100%; min-height: 44px; padding: 6px 6px 62px; border: 2px solid var(--line); border-radius: 16px; background: var(--panel); cursor: pointer; }
.stimulus-panel-listen:hover, .stimulus-panel-listen:focus-visible { border-color: var(--purple); }
.stimulus-panel-image { display: block; width: 100%; height: auto; max-height: 240px; object-fit: contain; margin: 0 auto; }
.stimulus-panels.layout-rows .stimulus-panel-image { max-height: 130px; }
.stimulus-panel-speaker { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: inline-grid; place-items: center; width: 52px; height: 52px; border: 2px solid var(--purple); border-radius: 50%; background: var(--lavender); color: var(--purple-dark); }
.stimulus-panel-speaker .luxi-icon { width: 26px; height: 26px; }
