/* A viewport-sized workspace: question content can grow without moving paging controls. */
body.practice-page.is-quiz{height:100vh;height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:0}
.is-quiz #learning-destinations,.is-quiz #notice,.is-quiz>footer{display:none!important}
.practice-page.is-quiz>.top{flex:0 0 52px;min-height:52px;height:52px;padding:5px 24px;max-width:1180px}
.practice-page.is-quiz .top .brand-logo{width:126px;height:42px}
.is-quiz .tools{gap:15px}.is-quiz .tools select{font-size:13px;padding:5px 8px;min-height:34px}
.practice-page.is-quiz #main{flex:1;min-height:0;width:100%;max-width:1180px;padding:6px 24px 0;display:flex;outline:none}
.practice-page.is-quiz .quiz{flex:1;min-width:0;min-height:0;width:100%;max-width:none;margin:0;padding:0;display:grid;grid-template-rows:54px 40px minmax(0,1fr) auto;gap:6px}
.quiz-toolbar{display:flex;align-items:center;gap:18px;min-width:0}
.practice-page.is-quiz .quiz-toolbar .back{margin:0;padding:8px 0;font-size:14px;min-height:40px}
.quiz-counter{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.quiz-helper-slot{position:relative;margin-left:auto;min-height:52px;z-index:31}
.is-quiz #floating-help-panel{position:absolute;inset:0 0 auto auto;margin:0;width:250px;max-width:calc(100vw - 28px);box-shadow:0 6px 24px #173f3226}
.is-quiz #floating-help-panel.is-compact{position:relative;inset:auto;width:auto;max-width:190px;padding:0 3px;border:0;background:transparent;box-shadow:none}
.is-quiz #floating-help-panel.is-compact #help{min-height:52px}
.is-quiz #floating-help-panel.is-compact #guardian{width:52px;height:52px;flex-basis:52px}
.is-quiz #floating-help-panel.is-compact #floating-help-toggle{width:34px;height:40px;min-width:34px}
.practice-page.is-quiz .question-nav{margin:0;padding:2px 1px;gap:8px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;align-items:center;scrollbar-width:thin}
.practice-page.is-quiz .question-nav button{flex:0 0 auto;min-width:34px;width:34px;height:34px;font-size:12px;border-radius:10px}
.practice-page.is-quiz .quiz-body{min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:16px;margin:0;padding:18px;border-radius:18px;overflow:auto;overscroll-behavior:contain;box-shadow:none}
.question-pane,.choices-pane{min-width:0;min-height:0}
.question-pane{grid-column:1;grid-row:1;overflow:auto;overscroll-behavior:contain;padding-right:4px}
.choices-pane{grid-column:2;grid-row:1 / span 2;overflow:auto;overscroll-behavior:contain}
.practice-page.is-quiz .quiz-body.has-analysis{grid-template-rows:auto minmax(130px,1fr)}
.has-analysis .question-pane{max-height:45vh}
.practice-page.is-quiz .question-meta{font-size:10px;line-height:1.5;gap:3px 10px;margin:0 0 8px}
.practice-page.is-quiz .stem{margin:0;font-weight:500;line-height:1.45}
.is-quiz .practice-stem{margin:8px 0 12px}
.is-quiz .practice-stem .study-pinyin{font-size:20px;line-height:1.4;margin:0 0 4px}
.is-quiz .practice-stem .study-hanzi{font-size:25px;line-height:1.5}
.is-quiz .practice-stem .study-traditional{font-size:16px;line-height:1.4;margin:3px 0}
.is-quiz .practice-stem .study-translation{font-size:14px;line-height:1.45;margin-top:5px}
.practice-page.is-quiz .hints{font-size:13px;padding:9px 12px;margin:10px 0 0;border-radius:10px}
.is-quiz .hint-language{font-size:11px;margin-bottom:5px;gap:6px}
.is-quiz .hint-language select{font-size:11px;padding:3px 6px;min-height:28px}
.is-quiz .hints>div{display:flex;flex-wrap:wrap;gap:4px 12px}
.is-quiz .hints>div[hidden]{display:none}
.is-quiz .hints p{font-size:13px;line-height:1.4;margin:0}
.is-quiz .hints .meaning-hint-label{display:none}
.practice-page.is-quiz .answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch}
.practice-page.is-quiz .answer{padding:12px;gap:8px;min-height:110px;border-radius:12px;align-items:flex-start}
.practice-page.is-quiz .answer .letter{width:23px;height:23px;font-size:11px;margin-top:2px;flex-basis:23px;border-radius:6px}
.is-quiz .answer .study-hanzi{font-size:22px;line-height:1.4}
.is-quiz .answer .study-pinyin{font-size:18px;line-height:1.35;margin:0 0 2px;letter-spacing:0}
.is-quiz .answer .study-traditional{font-size:14px;line-height:1.35;margin-top:2px}
.is-quiz .answer .study-hanzi,.is-quiz .answer .study-traditional{display:inline;margin-right:5px}
.is-quiz .answer .study-translation{font-size:13px;line-height:1.4;margin-top:3px}
.is-quiz .answer .study-missing{font-size:11px;margin-top:3px}
.is-quiz .feedback{padding:9px 12px;margin:0 0 10px;border-radius:10px;outline:none}
.is-quiz .feedback h3{font-size:15px;line-height:1.4;margin:0 0 4px}
.is-quiz .feedback .answer-label{display:inline;margin:0 7px 0 0;font-size:12px}
.is-quiz .feedback .answer-reveal{display:inline;line-height:1.5}
.is-quiz .feedback .answer-reveal>span{display:inline;margin-right:7px;font-size:14px;line-height:1.5}
.is-quiz .feedback .answer-reveal .study-hanzi{font-size:19px;font-weight:650}
.is-quiz .feedback .answer-reveal .study-pinyin{font-size:17px}
.is-quiz .feedback .reference{display:none}
.is-quiz .feedback .reading-note{font-size:11px}
.analysis-panel{grid-column:1;grid-row:2;display:flex;flex-direction:column;min-height:0;min-width:0;border:1px solid var(--line);border-radius:12px;background:#f6f7f0;overflow:hidden}
.analysis-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-bottom:1px solid var(--line);flex-shrink:0}
.analysis-heading>b{font-size:12px;font-weight:600}
.analysis-tabs{display:flex;gap:5px}
.analysis-tabs button{min-height:34px;min-width:34px;border:1px solid var(--line);border-radius:8px;background:white;font-size:12px;padding:4px 8px}
.analysis-tabs button.is-correct{border-color:#87a884}
.analysis-tabs button[aria-pressed=true]{background:#235742;color:white;border-color:#235742}
.is-quiz .option-explanation{padding:10px 12px;min-height:0;overflow:auto;overscroll-behavior:contain;border:0;border-radius:0;background:transparent;flex:1}
.is-quiz .option-explanation .study-hanzi{font-size:15px;line-height:1.6}
.is-quiz .option-explanation .study-pinyin{font-size:17px;line-height:1.5}
.is-quiz .option-explanation .study-traditional{font-size:13px;line-height:1.5}
.is-quiz .option-explanation .study-translation{font-size:14px;line-height:1.5}
.is-quiz .option-meaning{display:none}
.auto-status{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;font-size:13px;color:#235742}
.practice-page.is-quiz .auto-status button{min-height:36px;padding:6px 9px;font-size:12px;white-space:nowrap}
.practice-page.is-quiz .quiz-actions{margin:0;padding:10px 0 max(12px,env(safe-area-inset-bottom));border:0;background:var(--paper);display:grid;grid-template-columns:1fr 1.2fr 1fr;gap:10px;z-index:20}
.practice-page.is-quiz .quiz-actions button{min-width:0;min-height:46px;padding:8px 12px;font-size:14px;white-space:normal}
.is-quiz .self-check-note{font-size:12px;line-height:1.5;color:var(--muted);margin-top:10px}
.practice-page.is-quiz .error{top:58px;bottom:auto;max-height:25dvh;overflow:auto;font-size:13px}
@media(min-width:701px){
 .practice-page.is-quiz .quiz-body.has-analysis{grid-template-rows:minmax(0,1fr) minmax(160px,.75fr)}
 .has-analysis .question-pane{max-height:none}
 .has-analysis .choices-pane{grid-row:1}
 .has-analysis .hints{display:none}
 .analysis-panel{grid-column:1 / -1}
}
@media(max-width:700px){
 .practice-page.is-quiz>.top{padding:4px 14px;min-height:46px;height:46px;flex-basis:46px}
 .practice-page.is-quiz .top .brand-logo{width:112px;height:37px}
 .practice-page.is-quiz #main{padding:2px 12px 0}
 .practice-page.is-quiz .quiz{grid-template-rows:52px 36px minmax(0,1fr) auto;gap:4px}
 .practice-page.is-quiz .quiz-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1.15fr);gap:10px;padding:12px;border-radius:14px}
 .question-pane{grid-column:1;grid-row:1;overflow:auto;padding:0}
 .choices-pane{grid-column:1;grid-row:2;overflow:auto}
 .practice-page.is-quiz .quiz-body.has-analysis{grid-template-rows:auto auto minmax(105px,1fr)}
 .has-analysis .question-pane{max-height:29dvh;overflow:auto}
 .has-analysis .choices-pane{max-height:24dvh}
 .has-analysis .hints{display:none}
 .practice-page.is-quiz .has-analysis .answer{min-height:67px;padding:6px 8px}
 .has-analysis .answer .study-translation{display:none}
 .has-analysis .answer .study-hanzi,.has-analysis .answer .study-traditional{display:inline;margin-right:5px}
 .has-analysis .answer .study-pinyin{font-size:15px}
 .has-analysis .answer .study-hanzi{font-size:18px}
 .is-quiz .option-meaning{display:block;border-bottom:1px solid var(--line);padding-bottom:6px;margin-bottom:6px}
 .is-quiz .option-meaning .study-pinyin,.is-quiz .option-meaning .study-hanzi,.is-quiz .option-meaning .study-traditional{display:none}
 .is-quiz .option-meaning .study-translation{display:inline;margin-right:12px}
 .analysis-panel{grid-column:1;grid-row:3}
 .is-quiz .practice-stem{margin:6px 0}
 .is-quiz .practice-stem .study-pinyin{font-size:18px;line-height:1.35}
 .is-quiz .practice-stem .study-hanzi{font-size:22px;line-height:1.4}
 .is-quiz .practice-stem .study-traditional{font-size:14px;line-height:1.3}
 .is-quiz .practice-stem .study-translation{font-size:13px;line-height:1.35;margin-top:3px}
 .practice-page.is-quiz .hints{padding:6px 9px;margin-top:7px}
 .is-quiz .hint-language{margin-bottom:3px}
 .is-quiz .hints p{font-size:12px}
 .practice-page.is-quiz .answer{padding:9px 8px;gap:5px;min-height:94px}
 .practice-page.is-quiz .answers{gap:8px}
 .practice-page.is-quiz .answer .letter{width:19px;height:21px;flex-basis:19px;font-size:10px}
 .is-quiz .answer .study-hanzi{font-size:20px}
 .is-quiz .answer .study-hanzi,.is-quiz .answer .study-traditional{display:inline;margin-right:5px}
 .is-quiz .answer .study-pinyin{font-size:17px}
 .is-quiz .answer .study-traditional{font-size:13px}
 .is-quiz .answer .study-translation{font-size:12px;line-height:1.3}
 .practice-page.is-quiz .quiz-actions{gap:7px;padding:7px 0 max(9px,env(safe-area-inset-bottom))}
 .practice-page.is-quiz .quiz-actions button{font-size:12px;padding:8px 4px;min-height:44px}
 .is-quiz .feedback{padding:7px 9px;margin-bottom:7px}
 .is-quiz .feedback h3{font-size:13px}
 .is-quiz .feedback .answer-reveal>span{font-size:12px}
 .is-quiz .feedback .answer-reveal .study-pinyin{font-size:15px}
 .is-quiz .feedback .answer-reveal .study-hanzi{font-size:18px}
 .is-quiz .option-explanation .study-pinyin{font-size:16px}
 .is-quiz .option-explanation .study-translation{font-size:13px}
}
@media(max-height:600px){.practice-page.is-quiz .quiz-body{overflow:auto}.practice-page.is-quiz .question-nav{height:32px}.practice-page.is-quiz .quiz{grid-template-rows:48px 32px minmax(0,1fr) auto}}
@media print{body.practice-page.is-quiz{height:auto;overflow:visible;display:block}.practice-page.is-quiz #main,.practice-page.is-quiz .quiz,.practice-page.is-quiz .quiz-body{display:block;overflow:visible;height:auto}.quiz-toolbar,.quiz-actions{display:none!important}}

/* Character-aligned pronunciation stays attached when a sentence wraps. */
.practice-page .practice-phrase .study-annotated{line-height:2.2;overflow-wrap:normal;word-break:normal}
.practice-page .study-annotated ruby{ruby-position:over;ruby-align:center;margin-inline:.1em;white-space:nowrap}
.practice-page .study-annotated rt{font-family:Arial,sans-serif;font-size:clamp(14px,.72em,18px);font-weight:600;line-height:1;color:#9a4831;letter-spacing:0;text-align:center}
.practice-page .practice-stem .study-annotated rt,.practice-page .answer .study-annotated rt{font-size:clamp(16px,.72em,18px)}
.practice-page.is-quiz .answer .study-annotated{display:block;line-height:2.15}
.practice-page.is-quiz .feedback .study-annotated{line-height:2.1}
.practice-page.is-quiz .option-explanation .study-annotated{line-height:2.2}
.practice-page.is-quiz .practice-phrase .study-pinyin{font-size:16px;line-height:1.65;font-weight:600;letter-spacing:0}
