.worksheet-exam{color:#142d31}.exam-controls{padding:16px;background:#fff;border:1px solid #b4c9c7;border-radius:10px;margin-bottom:20px}.exam-controls h3{font-weight:bold;margin:12px 0 6px}.exam-controls p{margin:7px 0;line-height:1.6}.exam-controls label{display:inline-flex;align-items:center;gap:6px;margin:5px;flex-wrap:wrap}.exam-controls input:not([type=checkbox]),.exam-controls select{padding:6px;border:1px solid #a8babb;border-radius:4px;max-width:100%;color:#111;background:#fff}.exam-controls input:not([type=checkbox]){min-width:80px}.exam-controls fieldset{margin:12px 0}.exam-controls button{background:#137b80;color:#fff;padding:7px 10px;margin:5px;border-radius:5px;font-weight:bold}.exam-controls button:disabled{opacity:.5}.exam-controls [role=alert]{color:#a52a22}.exam-char-picker{display:flex;gap:6px;flex-wrap:wrap}.exam-char-picker label{font-size:21px;border:1px solid #c6d4d4;border-radius:5px;padding:5px 9px}.exam-draft{border-top:1px solid #c9d4d4;padding:12px 0}.exam-draft img{height:70px;width:95px;object-fit:contain;display:inline-block}.exam-draft input:not([type=checkbox]){width:100%}.exam-draft label:has(input:not([type=checkbox])){display:flex}.exam-selected li{display:flex;align-items:center;gap:4px;border-top:1px solid #e5eceb;padding:4px}.exam-selected li span{flex:1}.exam-selected button{font-size:12px;padding:4px 7px}.exam-preview-scroll{overflow:auto;max-width:100%}.exam-pages{width:297mm}.exam-page{width:297mm;height:210mm;box-sizing:border-box;padding:6mm;display:flex;flex-direction:row-reverse;background:#fff;color:#111;margin:0 0 15px;box-shadow:0 1px 8px #bbb;font-family:'Iansui','DFKai-SB','BiauKai',serif;overflow:hidden;line-height:1.2}.exam-page *{box-sizing:border-box}.exam-header{width:19mm;flex-shrink:0;border:.25mm solid #222;display:flex;align-items:center;flex-direction:column;padding:2mm 1mm;gap:2mm;font-size:3.1mm}.exam-header strong{writing-mode:vertical-rl;text-orientation:upright;font-size:5.5mm;font-weight:bold;max-height:95mm;letter-spacing:.4mm}.exam-header .exam-scope{writing-mode:vertical-rl;text-orientation:upright;font-size:4mm;max-height:25mm}.exam-header>div{font-size:3.3mm;white-space:nowrap}.exam-header small{margin-top:auto;font-size:2.8mm}.exam-body{width:266mm;height:198mm;display:flex;flex-direction:column}.exam-region{width:266mm;height:99mm;display:flex;flex-direction:row-reverse;align-items:stretch;padding:2mm 1mm;overflow:hidden}.exam-region:first-child{border-bottom:.25mm solid #444}.exam-group{display:flex;flex-direction:row-reverse;height:94mm;flex-shrink:0}.exam-group>h3{writing-mode:vertical-rl;text-orientation:upright;font-size:4.6mm;color:#155b63;width:7mm;line-height:1.25;padding:0 .7mm;margin:0;font-weight:bold;max-height:94mm;overflow:hidden}.exam-group-questions{display:flex;flex-direction:row-reverse}.exam-question{height:94mm;flex-shrink:0;padding:0 1mm;display:flex;flex-direction:column;align-items:center;overflow:hidden;font-size:5mm}.exam-number{align-self:flex-end;font-size:3.5mm;margin-bottom:1mm}.exam-content{height:86mm;width:100%;display:flex;flex-direction:column;align-items:center;gap:2mm;overflow:hidden}.exam-content>img{height:23mm;width:23mm;object-fit:contain;flex-shrink:0}.exam-options{display:flex;flex-direction:column;gap:1mm;align-items:center}.exam-option{border:.2mm solid #9ca9aa;padding:.7mm;min-width:12mm;display:flex;align-items:center;justify-content:center}.exam-kind-circle .exam-options{flex-direction:row-reverse;align-items:stretch;gap:1mm}.exam-kind-circle .exam-option{writing-mode:vertical-rl;flex-direction:row;min-width:9mm}.exam-model{display:flex;gap:.5mm;justify-content:center}.exam-word{writing-mode:vertical-rl}.exam-grid{width:20mm;height:20mm;border:.2mm solid #959da1;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:linear-gradient(to right,transparent calc(50% - .08mm),#d1d6d8 50%,transparent calc(50% + .08mm)),linear-gradient(to bottom,transparent calc(50% - .08mm),#d1d6d8 50%,transparent calc(50% + .08mm));font-size:16mm}.exam-traces,.exam-copy-grids{display:flex;flex-direction:column;gap:1.5mm}.exam-gray,.exam-gray .t9-base{color:#b6bcc0}.exam-part{width:19mm;height:19mm;display:inline-flex}.exam-part svg{width:100%;height:100%}.exam-parts{display:flex;flex-direction:column;align-items:center;font-size:4mm;gap:1mm}.exam-sentence{writing-mode:vertical-rl;text-orientation:upright;max-height:61mm;flex-shrink:0;line-height:1.55;font-size:5mm}.exam-sentence .t5-sentence{display:inline;writing-mode:vertical-rl}.exam-bank{writing-mode:vertical-rl;text-orientation:upright;max-height:65mm;font-size:5mm;line-height:1.6}.exam-bank>div{margin-left:1mm}.exam-kind-cloze .exam-content,.exam-kind-phrase .exam-content{flex-direction:row-reverse;justify-content:flex-start;align-items:flex-start;gap:2mm}.exam-kind-correct .exam-content{display:grid;grid-template-columns:20mm 1fr;grid-template-rows:60mm 22mm;gap:2mm}.exam-kind-correct .exam-sentence{grid-column:2;grid-row:1;max-width:10mm;max-height:59mm;overflow:hidden}.exam-kind-correct .exam-options{grid-column:1;grid-row:1}.exam-kind-correct .exam-grid{grid-column:1 / 3;grid-row:2;justify-self:center}.exam-token-bank{writing-mode:vertical-rl;font-size:4.3mm;max-height:35mm;line-height:1.5}.exam-token-bank>span{border:.2mm solid #9ca9aa;padding:1mm;margin-left:1mm;display:inline-block}.exam-answer-line{height:17mm;width:100%;border-bottom:.2mm solid #9ba9aa}.exam-kind-phrase .exam-sentence{max-width:16mm}.exam-page .t9-ruby{--t9-size:5mm;writing-mode:horizontal-tb;vertical-align:middle;display:inline-flex;align-items:center;position:relative;flex-shrink:0;height:var(--t9-size);width:calc(var(--t9-size)*1.42);font-size:var(--t9-size);line-height:1}.exam-page .t9-base{width:var(--t9-size);height:var(--t9-size);font-size:var(--t9-size);line-height:1;text-align:center}.exam-page .t9-annotation{width:calc(var(--t9-size)*.42);height:var(--t9-size);display:flex;align-items:center;justify-content:center;position:relative;cursor:default}.exam-page .t9-syllable{display:flex;flex-direction:column;align-items:center;position:relative;line-height:1;font-size:calc(var(--t9-size)*.27)}.exam-page .t9-symbol{display:block;line-height:1}.exam-page .t9-side-tone{position:absolute;left:100%;top:50%;transform:translateY(-50%);font-size:calc(var(--t9-size)*.3)}.exam-page .t9-light-tone{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:calc(var(--t9-size)*.3)}.exam-page .t5-punctuation{font-size:5mm}.exam-page .t9-annotation[title]{pointer-events:none}
@page worksheet-exam-landscape{size:A4 landscape;margin:0}
.exam-hide-zhuyin .t9-annotation{display:none!important}
.exam-hide-zhuyin .t9-ruby{width:var(--t9-size)!important}
.exam-correct-independent .t9-annotation{display:none!important}
.exam-correct-independent .t9-ruby{width:var(--t9-size)!important}
@media print{
 .exam-page .exam-header{display:flex!important}
 .exam-pages{width:297mm!important;writing-mode:horizontal-tb!important}
 .exam-page{display:flex!important;flex-direction:row-reverse!important;width:297mm!important;height:210mm!important;min-height:210mm!important;max-height:210mm!important;overflow:hidden!important}
 .exam-body{display:flex!important;flex-direction:column!important;width:266mm!important;height:198mm!important;flex-shrink:0!important}
 .exam-region{display:flex!important;flex-direction:row-reverse!important;width:266mm!important;height:99mm!important;flex-shrink:0!important}
 .exam-group,.exam-group-questions{display:flex!important;flex-direction:row-reverse!important;flex-shrink:0!important}
 .exam-page{page:worksheet-exam-landscape;break-inside:avoid;page-break-inside:avoid;margin:0!important;box-shadow:none!important;break-after:page;page-break-after:always}
 .exam-page:last-child{break-after:auto;page-break-after:auto}
 body.worksheet-exam-active{margin:0!important;padding:0!important}
 body.worksheet-exam-active .exam-print-ancestor{display:block!important;position:static!important;overflow:visible!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important}
 body.worksheet-exam-active .exam-print-ancestor>:not(.exam-print-ancestor):not(.exam-pages){display:none!important}
 body.worksheet-exam-active>.exam-print-ancestor{display:block!important}
 body.worksheet-exam-active>:not(.exam-print-ancestor){display:none!important}
 body.worksheet-exam-active .exam-pages{display:block!important;width:297mm!important;margin:0!important}
}

.exam-page .exam-sentence{font-size:5.6mm;line-height:1.3;max-width:24mm}
.exam-kind-correct .exam-content{display:grid;grid-template-columns:1fr 12mm;grid-template-rows:60mm 22mm;gap:2mm}
.exam-kind-correct .exam-sentence{grid-column:1;grid-row:1;height:60mm;max-height:60mm;max-width:none;width:100%;overflow:visible}
.exam-kind-correct .exam-options{grid-column:2;grid-row:1;justify-self:center}
.exam-kind-correct .exam-grid{grid-column:1 / 3;grid-row:2}
.exam-kind-cloze .exam-content{gap:1mm}
.exam-kind-cloze .exam-sentence{height:70mm;max-height:70mm;max-width:24mm}
.exam-kind-cloze .exam-cloze-sentence{max-width:none;width:max-content;line-height:1.9}
.exam-cloze-blank{display:inline-flex;writing-mode:vertical-rl;align-items:center;vertical-align:middle;white-space:nowrap;gap:.5mm}
.exam-cloze-gap-number{display:inline-block;writing-mode:horizontal-tb;text-orientation:mixed;white-space:nowrap;font-size:3.5mm;width:7mm;height:4.5mm;line-height:1.2;text-align:center}
.exam-cloze-write-space,.exam-cloze-code-space{display:inline-block;font-size:5mm;writing-mode:vertical-rl;white-space:nowrap}
.exam-cloze-write-space{height:24mm;display:flex;justify-content:space-between;flex-direction:row}
.exam-cloze-settings{padding:6px;border:1px solid #b4c9c7;background:#f5faf9}

.exam-header{gap:1.4mm}
.exam-header strong{font-size:5mm;max-height:65mm}
.exam-header>div{writing-mode:vertical-rl;text-orientation:upright;height:21mm;width:100%;font-size:3.3mm;white-space:normal;align-self:center;display:flex;align-items:center}
.exam-header small{font-size:2.5mm;white-space:nowrap}

/* Teacher acceptance: compact questions, shared correction bank, editable bold zhuyin. */
.exam-page .t9-annotation,.exam-page .t9-syllable,.exam-page .t9-symbol,.exam-page .t9-side-tone,.exam-page .t9-light-tone{font-weight:700;}
.worksheet-exam .exam-page .t9-annotation[title]{pointer-events:auto;cursor:pointer;}
@media screen{.worksheet-exam .t9-annotation:hover{outline:1px dashed #21897f;}}
.exam-group-circle .exam-group-questions{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,47mm);direction:rtl;}
.exam-kind-circle{height:47mm;direction:ltr;}
.exam-kind-circle .exam-content{height:42mm;gap:.5mm;}
.exam-kind-circle .exam-content>img{width:20mm;height:20mm;}
.exam-kind-circle .exam-number{height:3.5mm;margin-bottom:.5mm;}
.exam-kind-circle .exam-option{padding:.4mm;}
.exam-kind-cloze{padding:0 .3mm;}
.exam-kind-cloze .exam-content{flex-direction:row-reverse;justify-content:flex-start;gap:.6mm;}
.exam-kind-cloze .exam-sentence{height:82mm;max-height:82mm;max-width:none;}
.exam-cloze-aids{width:22mm;display:flex;flex-direction:column;align-items:center;gap:1mm;flex-shrink:0;}
.exam-cloze-aids .exam-bank{display:flex;flex-direction:row-reverse;writing-mode:horizontal-tb;max-height:none;gap:1mm;width:22mm;justify-content:center;}
.exam-cloze-aids .exam-bank>div{writing-mode:vertical-rl;text-orientation:upright;margin:0;max-height:33mm;line-height:1.3;}
.exam-cloze-aids .exam-bank{display:grid;grid-template-columns:repeat(2,max-content);gap:1mm;font-size:4.3mm;}
.exam-cloze-aids img{width:22mm;height:22mm;object-fit:contain;}
.exam-kind-correct .exam-content{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:1mm;}
.exam-kind-correct .exam-sentence{height:78.5mm;max-height:78.5mm;max-width:100%;width:auto;overflow:visible;}
.exam-correct-grid .exam-sentence{height:61mm;max-height:61mm;}
.exam-code-answer{height:6mm;line-height:1;font-size:5.6mm;writing-mode:horizontal-tb;flex-shrink:0;}
.exam-correction-bank{height:94mm;flex-shrink:0;display:flex;flex-direction:row-reverse;align-items:flex-start;padding-top:1mm;}
.exam-correction-bank>b{font-size:3mm;writing-mode:vertical-rl;width:4mm;line-height:1.2;flex-shrink:0;}
.exam-correction-bank-entries{display:grid;grid-auto-flow:column;grid-template-rows:repeat(7,12mm);grid-auto-columns:9mm;direction:rtl;}
.exam-correction-entry{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:.5mm;direction:ltr;}
.exam-bank-code{font-size:3.5mm;line-height:4.5mm;min-width:4.5mm;height:4.5mm;border:.2mm solid #555;border-radius:50%;text-align:center;writing-mode:horizontal-tb;}

/* Answer parentheses precede the question; sentence writing gets three vertical lines. */
.exam-kind-correct .exam-content{justify-content:flex-start;gap:1mm;}
.exam-kind-correct .exam-sentence,.exam-correct-grid .exam-sentence{height:77mm;max-height:77mm;}
.exam-code-answer{display:flex;align-items:center;justify-content:center;height:7mm;line-height:7mm;font-size:5.6mm;}
.exam-answer-blank{display:inline-block;width:6mm;height:7mm;}
.exam-written-answer .exam-answer-blank{width:9mm;}
.exam-code-answer{writing-mode:vertical-rl;text-orientation:mixed;flex-direction:row;width:8mm;height:22mm;min-height:22mm;line-height:1;flex-shrink:0;}
.exam-code-answer .exam-answer-blank{width:7mm;height:6mm;flex-shrink:0;}
.exam-written-answer .exam-answer-blank{width:7mm;height:9mm;}
.exam-kind-correct .exam-sentence{height:61mm;max-height:61mm;}
.exam-kind-reorder .exam-content{flex-direction:row-reverse;align-items:flex-start;justify-content:flex-start;gap:1mm;}
.exam-reorder-answers{display:flex;flex-direction:row-reverse;width:25.5mm;height:82mm;flex-shrink:0;}
.exam-sentence-answer-line{display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:8.5mm;height:82mm;flex-shrink:0;font-size:6mm;line-height:1;}
.exam-reorder-clues{width:30mm;height:85mm;display:flex;flex-direction:column;align-items:center;gap:1mm;flex-shrink:0;}
.exam-reorder-clues>img{width:23mm;height:23mm;object-fit:contain;flex-shrink:0;}
.exam-reorder-clues{order:-1;}
.exam-reorder-clues .exam-token-bank{height:59mm;max-height:59mm;max-width:30mm;font-size:4.3mm;line-height:1.4;}
.exam-reorder-clues .exam-token-bank>span{max-height:55mm;max-width:28mm;overflow-wrap:anywhere;}
.exam-reorder-clues .exam-token-bank{display:flex;writing-mode:horizontal-tb;direction:ltr;flex-direction:column;flex-wrap:wrap-reverse;align-content:flex-start;align-items:flex-start;gap:.7mm 1mm;width:30mm;}
.exam-reorder-clues .exam-token-bank>span{writing-mode:vertical-rl;text-orientation:upright;flex:0 0 auto;margin:0;max-height:none;white-space:nowrap;word-break:keep-all;overflow-wrap:normal;}
.exam-reorder-clues .exam-token-bank>span .t5-sentence{white-space:nowrap;flex-wrap:nowrap;word-break:keep-all;overflow-wrap:normal;}

.exam-bank-picker{border:1px solid #b8cdcb;padding:10px;margin:10px 0;border-radius:8px;background:#f5faf9;}
.exam-bank-picker fieldset label{display:flex;}
.exam-bank-item{padding:12px 0;border-top:1px solid #bdcdcb;}
.exam-bank-item>img{display:block;width:auto;max-width:100%;max-height:300px;object-fit:contain;background:white;}
.exam-bank-item ol{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;list-style:none;}
.exam-teacher-answer{margin-top:8px;font-size:13px;}
.exam-kind-mcq{padding:0 .5mm;}
.exam-kind-mcq .exam-content{gap:.5mm;align-items:flex-start;}
.exam-mcq-answer{height:7mm;line-height:7mm;font-size:5.6mm;flex-shrink:0;align-self:flex-end;}
.exam-mcq-columns{height:75mm;display:flex;flex-direction:row-reverse;gap:.4mm;align-items:flex-start;flex-shrink:0;padding-right:1mm;}
.exam-mcq-stem,.exam-mcq-option{height:75mm;writing-mode:vertical-rl;text-orientation:upright;line-height:1.3;font-size:5.6mm;flex-shrink:0;}
.exam-mcq-option{font-size:5.3mm;}
.exam-group-mcq_image .exam-group-questions{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,47mm);direction:rtl;}
.exam-kind-mcq_image{height:47mm;direction:ltr;}
.exam-kind-mcq_image .exam-content{height:41mm;justify-content:flex-start;align-items:center;}
.exam-kind-mcq_image .exam-mcq-prompt-image{width:100%;height:40mm;object-fit:contain;object-position:top right;}
.exam-page .exam-bopo{display:inline-block;position:relative;writing-mode:horizontal-tb;text-orientation:upright;vertical-align:middle;line-height:1;padding-right:.65em;white-space:nowrap;break-inside:avoid;font-weight:700}
.exam-page .exam-bopo-body{display:flex;flex-direction:column;align-items:center;line-height:1.05}
.exam-page .exam-bopo-tone{position:absolute;right:0;top:50%;transform:translateY(-50%);line-height:1;width:.65em;text-align:center}
.exam-page .exam-bopo-light{margin-top:.55em}
.exam-page .exam-bopo-neutral{position:absolute;bottom:100%;left:calc((100% - .65em)/2);transform:translateX(-50%);line-height:.55;height:.55em;text-align:center}
.exam-kind-match .exam-content{justify-content:flex-start;gap:0;}
.exam-match-board{width:100%;height:84mm;display:grid;grid-template-rows:24mm 24mm minmax(0,1fr);direction:ltr;border:.2mm solid #879b9f;border-radius:1mm;padding:1mm;}
.exam-match-images,.exam-match-words{display:grid;grid-template-columns:repeat(var(--match-count),minmax(0,1fr));gap:.4mm;direction:rtl;}
.exam-match-station{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2mm;direction:ltr;min-width:0;}
.exam-match-images .exam-match-station{justify-content:flex-end;}
.exam-match-images img{width:19mm;height:20mm;object-fit:contain;flex-shrink:0;}
.exam-match-dot{display:block;width:1.6mm;height:1.6mm;min-height:1.6mm;border-radius:50%;background:#222;flex-shrink:0;}
.exam-match-word{writing-mode:vertical-rl;text-orientation:upright;max-height:29mm;line-height:1.3;}
.exam-imitation{display:flex;flex-direction:row-reverse;gap:1mm;align-items:flex-start;height:85mm;width:100%;writing-mode:horizontal-tb}.exam-imitation-model,.exam-imitation-task,.exam-imitation-frame,.exam-imitation-hints{writing-mode:vertical-rl;text-orientation:upright;max-height:84mm;font-size:4.3mm;line-height:1.3}.exam-imitation-model{max-width:17mm}.exam-imitation-frame{max-width:17mm}.exam-imitation-task{font-size:3mm;color:#295e62}.exam-imitation-image{width:16mm!important;height:22mm!important;object-fit:contain;flex-shrink:0}.exam-imitation-hints{font-size:3.2mm;max-width:17mm}.exam-imitation-writing{display:flex;flex-direction:column;justify-content:space-between;align-items:center;height:83mm;width:16mm;border-left:.2mm solid #c4cece;border-right:.2mm solid #c4cece;flex-shrink:0}
.exam-imitation>.exam-imitation-model,.exam-imitation>.exam-imitation-frame,.exam-imitation>.exam-imitation-hints{max-width:none;flex-shrink:0}.exam-imitation>.exam-imitation-task{flex-shrink:0}
.exam-imitation-writing{width:24mm}
.exam-imitation-blank{display:inline-block;border:.2mm solid var(--slot-border);background:var(--slot-bg);color:var(--slot-ink);font-size:4mm;white-space:nowrap;padding:.5mm}.exam-imitation-hint-box{border:.2mm solid var(--slot-border);color:var(--slot-ink);background:var(--slot-bg);padding:.6mm;margin-left:.7mm}.exam-imitation-hints{gap:1mm}.exam-imitation-blank,.exam-imitation-hint-box{-webkit-print-color-adjust:exact;print-color-adjust:exact}
.exam-imitation-hint-box{margin:0}
.exam-imitation-number{display:inline-block;writing-mode:horizontal-tb;text-orientation:mixed;white-space:nowrap;line-height:1.2;font-size:4mm;width:7mm;height:5mm;text-align:center;vertical-align:middle}
.exam-imitation-blank{display:inline-flex;writing-mode:vertical-rl;align-items:center;gap:.5mm;vertical-align:middle}
.exam-imitation-frame{line-height:2.1}
.exam-imitation{width:max-content;padding:0 1mm}
.exam-imitation-hints{display:flex;writing-mode:horizontal-tb;flex-direction:row-reverse;align-items:flex-start;gap:1mm}
.exam-imitation-hint-box{writing-mode:vertical-rl;text-orientation:upright;height:max-content;max-height:84mm;flex-shrink:0;line-height:1.8}
.exam-imitation-option{display:inline-block;margin-bottom:1mm}.exam-imitation-option>span:first-child{font-size:4.3mm}.exam-imitation-hint-box{white-space:normal}
.exam-header .exam-scope{height:25mm;min-height:25mm;flex-shrink:0;max-width:15mm;overflow-wrap:anywhere}.exam-header>.exam-name{margin-top:0;height:42mm;flex-shrink:0}

/* Complete-character decomposition: answers remain blank in student print. */

.exam-parts-compose{display:flex;flex-direction:column;align-items:center;gap:2mm;flex-shrink:0;width:22mm}.exam-parts-n3{gap:.6mm!important;font-size:3.6mm!important}.exam-parts-n3 .exam-part{width:13mm!important;height:13mm!important}.exam-parts-n4{gap:.4mm!important;font-size:3mm!important}.exam-parts-n4 .exam-part{width:10mm!important;height:10mm!important}.exam-parts-word{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:3mm;width:46mm;height:84mm}.exam-parts-word-column{width:21mm;display:flex;flex-direction:column;align-items:center;gap:2mm;flex-shrink:0}.exam-parts-word-column small{font-size:4mm}.exam-parts-word-answer{width:20mm;height:74mm;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-size:5mm}.exam-parts-review-images{display:flex;gap:16px}.exam-parts-review-images>div{display:flex;flex-direction:column;align-items:center}.exam-parts-review-images svg{width:80px;height:80px}

/* Sentence clues: source, question and response follow right-to-left columns. */
.exam-clue{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:2mm;width:max-content;height:83mm;flex-shrink:0}.exam-clue-source,.exam-clue-question{writing-mode:vertical-rl;text-orientation:upright;height:76mm;font-size:5.2mm;line-height:1.5;flex-shrink:0;white-space:normal}.exam-clue-source{border:.2mm solid #aaa;padding:1mm;min-width:10mm}.exam-clue-question{padding-top:1mm}.exam-clue-options{display:flex;flex-direction:column;align-items:center;gap:2mm;width:12mm;flex-shrink:0}.exam-clue-option{writing-mode:vertical-rl;text-orientation:upright;font-size:5.2mm;line-height:1.4;white-space:nowrap;border:.2mm solid #b1baba;padding:1mm;max-height:40mm}.exam-clue-code{font-size:5mm}.exam-clue-written{display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:20mm;height:76mm;font-size:5mm;flex-shrink:0}.exam-clue-editor select{max-width:100%}.exam-clue-editor input:not([type=checkbox]){width:100%}

/* Keep paired questions in two rows in both print paths; generic flex rules must not flatten them. */
.exam-section-instruction,.exam-section-points{font-size:3.2mm;font-weight:normal;line-height:1.25;color:#193a40}
.exam-inline-number{display:inline-block;writing-mode:horizontal-tb;text-orientation:mixed;white-space:nowrap;font-size:.88em;line-height:1;vertical-align:middle}
.exam-group>h3{height:94mm;overflow-wrap:anywhere;white-space:normal}
.exam-question-points{font-size:2.5mm;writing-mode:horizontal-tb;white-space:nowrap;font-weight:normal;margin-left:.5mm}
.exam-score-editor{padding:10px;border:1px solid #91b1ad;border-radius:6px;margin:12px 0;background:#f5fbf9}
.exam-score-total{font-weight:bold;color:#145b54}
.exam-section-editor{padding:8px 0;border-top:1px solid #c5d6d2}
.exam-section-editor>summary{cursor:pointer;font-weight:bold;line-height:1.6}
.exam-section-editor label{display:flex;gap:8px;align-items:center}
.exam-section-editor label>input:not([type=checkbox]){width:130px;flex:1}
.exam-section-editor textarea{border:1px solid #a8babb;padding:7px;flex:1;min-width:0;color:#111;background:#fff}
.exam-text-overlay{position:fixed;inset:0;z-index:100000;background:#0008;padding:12px;display:flex;align-items:center;justify-content:center}
.exam-text-editor{background:white;color:#173c3c;border-radius:12px;padding:18px;width:min(900px,100%);max-height:94vh;display:flex;flex-direction:column;gap:8px;box-shadow:0 5px 30px #3336}
.exam-text-editor>header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.exam-text-editor>header h3{margin:0}.exam-text-fields{overflow:auto;min-height:0;flex:1;padding-right:6px}
.exam-text-fields label.exam-edit-field{display:flex;align-items:flex-start;flex-direction:column;gap:4px;margin:9px 0;width:100%}
.exam-text-fields .exam-edit-field>input,.exam-text-fields .exam-edit-field>textarea{width:100%;min-width:0;padding:7px;border:1px solid #9eb5b1;border-radius:4px;background:white;color:#152d2d;font:inherit;box-sizing:border-box}
.exam-text-fields fieldset{border:1px solid #c3d4cf;border-radius:5px;padding:9px;margin:10px 0}.exam-text-fields legend{font-weight:bold;padding:0 4px}
.exam-text-fields details{padding:8px 0;border-top:1px solid #d6e3df}.exam-text-fields summary{cursor:pointer;font-weight:bold}
.exam-text-editor>footer{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;border-top:1px solid #c3d4cf;padding-top:8px;flex-shrink:0}
.exam-edit-reminder,.exam-edit-source{font-size:13px;line-height:1.5}.exam-text-editor [role=alert]{color:#a12624;max-height:70px;overflow:auto}
@media print{.exam-text-overlay,.exam-score-editor{display:none!important}}
@media print{
 .exam-group-circle .exam-group-questions,
 .exam-group-mcq_image .exam-group-questions{
  display:grid!important;
  grid-auto-flow:column!important;
  grid-template-rows:repeat(2,47mm)!important;
  direction:rtl;
 }
}

/* Shared word bank stays beside the group; picture pairs retain two tight rows. */
.exam-picture-wordbank{display:flex;flex-flow:column wrap;align-content:flex-start;gap:1mm;height:92mm;flex-shrink:0;writing-mode:horizontal-tb;direction:rtl;padding:0 .4mm;box-sizing:border-box}
.exam-picture-wordbank-entry{writing-mode:vertical-rl;text-orientation:upright;display:flex;align-items:center;gap:.7mm;height:29mm;width:8mm;flex-shrink:0;font-size:5mm}
.exam-circle-bank-answer{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:.7mm;writing-mode:horizontal-tb;width:30mm;height:40mm}
.exam-circle-bank-answer>img{width:20mm;height:22mm;object-fit:contain;flex-shrink:0}
.exam-circle-bank-blank{display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:8mm;flex-shrink:0;font-size:5mm;line-height:1}
.exam-picture-wordbank-entry{direction:ltr;flex-direction:row}

/* Assessed phonetic clues remain visible even when auxiliary ruby is disabled. */
.exam-word-sound{display:flex;flex-direction:column;gap:0;width:29mm;writing-mode:horizontal-tb;direction:ltr;flex-shrink:0}
.exam-word-sound-row{display:flex;width:29mm;height:21mm;border:.25mm solid #7b888d;align-items:center;flex-shrink:0;box-sizing:border-box}
.exam-word-sound-row+.exam-word-sound-row{border-top:0}
.exam-word-sound-row .t9-ruby,.exam-hide-zhuyin .exam-word-sound-row .t9-ruby{display:flex;width:29mm!important;height:20mm;align-items:center;flex-shrink:0}
.exam-word-sound-row .t9-base,.exam-word-sound-char{width:20mm;height:20mm;line-height:20mm;font-size:16mm;text-align:center;flex-shrink:0}
.exam-word-sound-target .t9-base{visibility:hidden;background:linear-gradient(to right,transparent calc(50% - .08mm),#d1d6d8 50%,transparent calc(50% + .08mm)),linear-gradient(to bottom,transparent calc(50% - .08mm),#d1d6d8 50%,transparent calc(50% + .08mm))}
.exam-word-sound-target .t9-ruby{background:linear-gradient(to right,transparent calc(10mm - .08mm),#d1d6d8 10mm,transparent calc(10mm + .08mm)),linear-gradient(to bottom,transparent calc(50% - .08mm),#d1d6d8 50%,transparent calc(50% + .08mm));background-size:20mm 20mm;background-repeat:no-repeat}
.exam-word-sound-row .t9-annotation,.exam-hide-zhuyin .exam-word-sound-row .t9-annotation{display:flex!important;border-left:.2mm solid #7b888d;width:8.5mm;height:20mm;flex-shrink:0;padding-right:1mm;color:#111}
.exam-word-sound-empty{width:8.5mm;height:20mm;border-left:.2mm solid #7b888d;display:block;flex-shrink:0}

/* Manual connective-pattern writing follows the exam's vertical right-to-left flow. */
.exam-pattern-builder>label{display:flex;align-items:flex-start;flex-direction:column;width:100%}
.exam-pattern-builder textarea{width:100%;max-width:700px;padding:8px;border:1px solid #a8babb;border-radius:4px;background:white;color:#111;font:inherit}
.exam-sentence-pattern{display:flex;flex-direction:row-reverse;gap:1mm;align-items:flex-start;height:83mm;width:max-content;writing-mode:horizontal-tb;flex-shrink:0}
.exam-pattern-prompt{writing-mode:vertical-rl;text-orientation:upright;height:82mm;font-size:5.6mm;line-height:1.4;flex-shrink:0;white-space:normal;overflow-wrap:anywhere}
.exam-pattern-answer{display:flex;flex-direction:row-reverse;gap:0;height:82mm;flex-shrink:0}
.exam-pattern-answer-column{display:block;width:9mm;height:82mm;border-left:.2mm solid #bac4c7;flex-shrink:0}

/* Long exam titles use the existing 65mm block; identity field spacing stays fixed. */
.exam-header strong{max-width:15mm;overflow-wrap:anywhere;word-break:break-all;flex-shrink:0}
