/* Qingfan logo palette: electric blue, navy, cyan and white. */
:root{--paper:#f4f8ff;--ink:#102e65;--muted:#536984;--line:#dce7f7;--teal:#0759e8;--pale:#edf4ff;--blue:#087f9c}
body{background:radial-gradient(ellipse at 5% 0,#e4f0ff,transparent 50%),radial-gradient(ellipse at 100% 20%,#e5faff,transparent 40%),#f7faff;font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif}
h1{font-family:inherit;font-size:28px;font-weight:700;line-height:1.4;letter-spacing:0;color:#082965}
h2,h3{color:#12346d}.step{font-family:inherit;font-weight:600;font-size:16px;line-height:27px}
textarea{font-family:inherit;font-size:16px;line-height:1.85}
.devbar{background:#eaf2ff;color:#245499}
.card{box-shadow:0 5px 24px #0b46a006;border-color:#dbe7f6}
.primary{background:linear-gradient(110deg,#0061ff,#0950d5);color:#fff}
.light{background:#eef5ff;color:#0b55c8}
.modes{background:#edf3fc}.modes button[aria-pressed=true]{color:#0759e8;box-shadow:0 2px 8px #0a4fbe12}
.role.a{background:#edf4ff}.role.b{background:#eafaff}.role.b h3{color:#087f9c}
.explain{background:#edf7ff;color:#285682}
input:not([type=checkbox]),textarea,select{border-color:#cbdcf0}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline-color:#64bcff}
.turn button{white-space:nowrap;flex-shrink:0}
.transcript{background:#edf4ff}.transcript.b{background:#eafaff}
#status:not(:empty){background:#ecf5ff;color:#244f83}#status.error{background:#fff0eb;color:#943e2b}
@media(max-width:560px){h1{font-size:19px;line-height:1.5}.modes button{font-size:12px;padding:10px 6px}}
.playback-toolbar{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin:16px 0 8px}.playback-toolbar .speed-setting{flex:1;max-width:240px;min-width:150px}.playback-toolbar .check{margin:0 0 10px;white-space:nowrap}.playback-toolbar #replay{margin-left:auto;white-space:nowrap;min-height:44px}.playback-toolbar label{margin-top:0}
.practice-row{border:1px solid var(--line);border-radius:12px;padding:16px;margin:14px 0;background:#f8fbff}.practice-text{white-space:pre-wrap;line-height:2.3;overflow-wrap:anywhere}.practice-word{background:#edf4ff;color:#1456b9;padding:1px 3px;border-radius:4px;font-weight:400;font-size:inherit;line-height:1.8;margin:1px}.practice-word[aria-pressed=true]{background:#0759e8;color:white;text-decoration:underline}.practice-alternatives{display:flex;gap:8px;align-items:center;margin:8px 0}.practice-alternatives label{min-width:100px;margin:0}.practice-alternatives input{flex:1}.practice-question{border-bottom:1px solid var(--line);padding:16px 0 22px;margin-bottom:16px}.practice-question h3{margin:0 0 10px}.cloze-line{line-height:2.6;white-space:pre-wrap}.cloze-line input{display:inline-block;width:145px!important;padding:5px 8px!important;margin:0 5px;vertical-align:middle}.practice-message{padding:12px;background:#edf4ff;border-radius:8px;overflow-wrap:anywhere}.practice-message.wrong{background:#fff3ed;color:#79391d}.practice-score{font-size:24px;font-weight:700;color:#0759e8}.practice-table{overflow-x:auto}.practice-table table{width:100%;border-collapse:collapse;font-size:13px}.practice-table th,.practice-table td{text-align:left;padding:10px;border-bottom:1px solid var(--line)}#practiceStatus,#exerciseStatus{white-space:pre-wrap;overflow-wrap:anywhere}#practiceShare a{margin-top:10px}
@media(max-width:560px){.playback-toolbar{gap:12px}.playback-toolbar .speed-setting{max-width:none;flex-basis:100%}.playback-toolbar #replay{margin-left:auto}.practice-alternatives{display:block}.cloze-line input{width:115px!important}}
.teacher-shortcut{display:flex;justify-content:flex-end;margin:-12px 0 18px}.teacher-shortcut a{border:1px solid #bcd2f4}.teacher-dashboard{scroll-margin-top:20px;border-top:4px solid #0759e8}#practiceRecords{scroll-margin-top:20px}.exercise-guide{background:#eef6ff;border-radius:12px;padding:16px;margin:16px 0}.exercise-guide ol{margin:8px 0;padding-left:22px}.exercise-guide li{margin:6px 0}.cloze-preview{padding:12px;border-radius:8px;background:#fff;line-height:2;overflow-wrap:anywhere}.preview-blank{color:#0759e8;font-weight:600}.choice-answer{padding:8px 10px;border:1px solid #dae6f6;border-radius:8px}.choice-answer:has(input:checked){background:#eaf4ff;border-color:#0759e8}#choiceFormatExample{white-space:pre-wrap;font-size:13px;background:#f5f8fd;padding:14px;border-radius:8px}#choicePromptText{font-size:13px}.practice-row legend{font-size:15px;font-weight:700}.cloze-line{display:flex;flex-wrap:wrap;align-items:center;gap:14px 7px;line-height:1.7;white-space:normal;padding:8px 0}.cloze-word{min-width:0;overflow-wrap:anywhere}.cloze-line input{flex:0 1 145px;height:44px;min-width:90px;max-width:100%;margin:0!important;line-height:1.4}.cloze-line input:focus{outline-offset:2px}.practice-question{padding-bottom:26px}.teacher-help{line-height:1.8}#practiceShare .actions{margin-bottom:0}
.practice-section{border-top:1px solid var(--line);padding-top:20px;margin-top:22px}.practice-share{padding:20px;background:#eef5ff;border-radius:12px;margin-top:20px}#practiceBuilder,#practiceChoices,#choiceStatus,#teacherLesson{scroll-margin-top:20px}#choiceStatus:empty{display:none}#choiceStatus{white-space:pre-wrap;overflow-wrap:anywhere;color:#234d88}.lesson-title{margin:22px 0 8px}.practice-table th{white-space:nowrap;background:#f4f8ff}.practice-table td{vertical-align:middle}.practice-table td:first-child{min-width:95px}#teacherGradeTable td{white-space:nowrap}#teacherGradeTable td:first-child{font-weight:600}.practice-table button{white-space:nowrap}.practice-section details{margin-top:12px;padding-top:10px}.practice-section summary{color:var(--muted)}
/* Radio controls must not inherit the full-width text input layout. */
input[type="radio"]{appearance:auto;width:16px;height:16px;min-width:16px;max-width:16px;flex:0 0 16px;padding:0;margin:4px 0 0;border:0;border-radius:50%;background:transparent;box-shadow:none;accent-color:#0759e8}
.check.choice-answer{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:10px;text-align:left;width:100%;margin:7px 0;padding:9px 12px;min-height:42px;line-height:1.55;cursor:pointer}
.choice-option-text{display:block;flex:1 1 auto;min-width:0;margin:0;padding:0;text-align:left;line-height:1.55;overflow-wrap:anywhere}
#practiceChoices .practice-row{padding:14px 16px;margin:16px 0}#practiceChoices .practice-row>p{margin:6px 0 12px}#practiceChoices legend{padding:0;text-align:left}
#practiceTurns .practice-text,#practiceTurns .cloze-preview{padding:10px 12px;margin:0;background:#fff;border-radius:8px;font-size:16px;line-height:2;white-space:pre-wrap;overflow-wrap:anywhere}
#practiceTurns .practice-word{padding:1px 0;margin:0;border:0;font-size:inherit;line-height:inherit;text-align:left}
#practiceTurns .preview-label{margin:14px 0 6px;padding:0;font-size:12px;font-weight:600;color:var(--muted);text-align:left}
.ai-prompt-actions{display:flex;align-items:center;justify-content:flex-start;gap:12px;flex-wrap:wrap}.ai-prompt-actions .note{margin:0;text-align:left}#choicePromptDetails{border-top:0;margin:10px 0 18px;padding:0}#choicePromptDetails summary{list-style:none;text-align:left}#choicePromptDetails summary::-webkit-details-marker{display:none}#choicePromptDetails summary::after{content:' +'}#choicePromptDetails[open] summary::after{content:' -'}
@media(max-width:560px){.ai-prompt-actions{align-items:flex-start;gap:8px}.ai-prompt-actions .note{flex-basis:100%}.check.choice-answer{gap:9px;padding:9px 10px}#practiceTurns .practice-text,#practiceTurns .cloze-preview{padding:9px 10px}}

/* Student-led listening and compact dialogue exercises. */
.student-listening-controls{position:sticky;top:10px;z-index:5;padding:16px 20px;margin:18px 0;background:#fff;border:1px solid #c9dcff;border-radius:16px;box-shadow:0 5px 24px #0a4cab12}
.listening-instruction{margin:0 0 10px;color:var(--muted);font-size:14px;line-height:1.5}
.listening-actions{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:10px 16px}
.listening-actions button{margin:0;min-height:44px;white-space:nowrap}
.listening-speed{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;margin:0}
.listening-speed select{width:auto;min-width:130px;margin:0;padding:9px 10px;font-size:14px}
.listening-actions .listening-loop{margin:0;font-size:14px;white-space:nowrap;gap:8px}
.student-question-group{margin:24px 0;padding:0;border:0;background:transparent;box-shadow:none}
.student-question-group>h3{margin:0 0 18px}
.student-dialogue .student-dialogue-row{display:flex;align-items:baseline;gap:10px;margin:0;padding:10px 0;border:0;border-radius:0;background:transparent}
.student-dialogue-row .student-speaker{flex:0 0 24px;margin:0;line-height:44px;color:#0759e8}
.student-dialogue-row .cloze-line{flex:1;min-width:0;margin:0;line-height:1.7;row-gap:10px}
.student-choices .question{padding-top:12px;padding-bottom:18px}
.dashboard-results{min-width:960px}
.dashboard-entered,.dashboard-elapsed{white-space:nowrap;font-variant-numeric:tabular-nums}
.dashboard-timing-note{font-size:12px;margin:12px 0 0}
@media(max-width:600px){.student-listening-controls{top:4px;padding:12px;border-radius:12px}.listening-actions{gap:8px 12px}.listening-actions button{padding:10px 12px;font-size:14px}.listening-speed{font-size:12px}.listening-speed select{min-width:110px}.listening-instruction{font-size:12px}.student-dialogue .student-dialogue-row{gap:7px}.student-dialogue-row .student-speaker{flex-basis:20px}}
