/* Shared controls retain their labels at narrow widths and enlarged text. */
.button, .audio-button, .tag, .char-button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; height: auto; }
.button { min-height: 44px; padding: 11px 17px; line-height: 1.35; gap: 9px; text-align: center; justify-content: center; }
.button > span, .audio-button > span { min-width: 0; }
.button .ui-icon, .audio-button .ui-icon { flex: 0 0 auto; }
.icon-button { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; }
.prelesson-actions, .lesson-actions, .support-contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.prelesson-actions > *, .lesson-actions > * { min-width: 0; }
.card { border-radius: 10px; }
.page-heading { max-width: 760px; }
.page-heading .page-title { letter-spacing: -.035em; line-height: 1.15; }
.ux-hero { padding: 28px; border-color: var(--line); }
.ux-hero h1 { line-height: 1.14; letter-spacing: -.035em; }
.ux-shortcut { border-color: var(--line); }
.ux-shortcut > div, .ux-shortcut > span { min-width: 0; }
.ux-course-block { border-radius: 10px; }
.ux-course-block > summary { min-height: 76px; }
.ux-block-copy small { line-height: 1.45; }
.ux-block-count { flex-shrink: 0; }
.ux-block-body .lesson-row { text-align: left; border-color: var(--line); }
.lesson-row-copy, .lesson-row-copy strong, .lesson-row-copy small { min-width: 0; overflow-wrap: anywhere; }
.vocabulary-interlude { margin: 6px 0 18px 40px; background: var(--surface); border-color: var(--line); }
.vocabulary-interlude > summary { padding: 4px; }
.checkpoint-level { padding: 0; margin-bottom: 14px; }
.checkpoint-level > summary { display: flex; align-items: center; gap: 16px; padding: 22px; cursor: pointer; list-style: none; }
.checkpoint-level > summary::-webkit-details-marker { display: none; }
.checkpoint-level > summary::after { content: '+'; margin-left: auto; color: var(--blue); font-size: 24px; }
.checkpoint-level[open] > summary::after { content: '−'; }
.checkpoint-level > summary > div { min-width: 0; flex: 1; }
.checkpoint-level > summary h3 { font-size: 21px; line-height: 1.3; margin: 6px 0 0; }
.checkpoint-level > summary .tag { flex: 0 0 auto; }
.checkpoint-level-body { padding: 0 22px 22px; }
.checkpoint-section > .section-head { flex-wrap: wrap; }
.checkpoint-section > .section-head .button { white-space: normal; flex-shrink: 1; }
.practice-rubric { padding: 16px 0; margin: 18px 0; border-block: 1px solid var(--line); }
.practice-rubric > summary { font-weight: 700; cursor: pointer; }
.practice-rubric[open] > summary { margin-bottom: 14px; }
.scene-reading { margin-block: 22px; max-width: 68ch; }
.scene-reading p { line-height: 1.7; margin: 10px 0 18px; }
.scene-audio-help { margin: 12px 0 20px; font-size: .85rem; color: var(--muted); }
.scene-audio-help summary { cursor: pointer; }
.settings-modal { padding: 20px; }
.settings-backdrop { background: rgb(10 20 40 / .48); backdrop-filter: blur(3px); }
.settings-panel { width: min(570px, 100%); max-height: calc(100dvh - 40px); padding: 0 26px 26px; border: 1px solid var(--line); box-shadow: 0 16px 60px rgb(0 0 0 / .18); }
.settings-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; margin: 0 -2px 22px; padding: 22px 2px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.settings-head h2 { font-size: 25px; letter-spacing: -.025em; }
.settings-group + .settings-group { margin-top: 24px; }
.settings-group-title { font-size: 14px; line-height: 1.4; letter-spacing: 0; text-transform: none; margin: 0 0 10px; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 14px 0; }
.setting-row > span { min-width: 0; overflow-wrap: anywhere; }
.setting-row strong { font-size: 15px; line-height: 1.4; }
.setting-row small { font-size: 13px; line-height: 1.5; max-width: 38ch; }
.setting-row input[type=checkbox] { width: 22px; height: 22px; margin: 4px; }
.setting-row-field { grid-template-columns: 1fr; border: 0; gap: 8px; padding: 0 0 8px; }
.setting-row-field input { width: 100%; height: auto; font-size: 16px; min-height: 46px; }
#profile-name-hint { font-size: 12px; line-height: 1.5; }
.settings-extra { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.settings-extra > summary { cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.5; }
.settings-extra[open] > summary { margin-bottom: 12px; }
.settings-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.settings-privacy-link { font-size: 13px; line-height: 1.6; }
.settings-help { display: grid; gap: 14px; }
.settings-help small { color: var(--muted); text-align: center; line-height: 1.5; }
.settings-help .button { width: 100%; }
html.dark-theme .onboarding-pose, html.dark-theme .lesson-panel .mascot { background: transparent; }
@media(max-width:600px) {
 .app-shell { padding-inline: 16px; }
 .brand strong { font-size: 14px; line-height: 1.25; letter-spacing: -.025em; }
 .topbar { gap: 12px; }
 .brand { min-width: 0; }
 .topbar-actions { gap: 6px; flex-shrink: 0; }
 .ux-hero { padding: 20px; }
 .ux-hero h1 { font-size: 28px; }
 .ux-course-block > summary { padding: 16px 12px; }
 .ux-block-copy small { display: none; }
 .vocabulary-interlude { margin-left: 24px; }
 .checkpoint-level > summary { flex-wrap: wrap; gap: 12px; padding: 18px; }
 .checkpoint-level > summary > div { flex-basis: calc(100% - 40px); }
 .checkpoint-level > summary h3 { font-size: 20px; }
 .checkpoint-level-body { padding: 0 18px 18px; }
 .settings-modal { padding: 12px; }
 .settings-panel { max-height: calc(100dvh - 24px); padding-inline: 18px; }
 .settings-head { padding-top: 18px; }
 .prelesson-actions .button, .support-contact-actions .button { flex: 1 1 220px; }
 .word-token, .choice-button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}
@media(forced-colors:active) { .settings-backdrop { background: Canvas; opacity: .85; } }
.onboarding-privacy-error:empty { display: none; }
.onboarding-panel .onboarding-privacy-summary p { line-height: 1.5; }

.alphabet-letter { min-width: 0; }
.alphabet-letter .alphabet-name, .alphabet-letter small { overflow-wrap: anywhere; min-width: 0; }
