.exam-timer{display:inline-flex;align-items:center;justify-content:center;min-width:78px;padding:.45rem .7rem;border:1px solid #d9bbb0;border-radius:8px;background:#fff4ee;color:#7e3037;font-variant-numeric:tabular-nums;font-weight:750;letter-spacing:.03em}
.exam-review{margin-top:1.5rem;text-align:left;border-top:1px solid #ead8d0;padding-top:1rem}
.exam-review summary{cursor:pointer;color:#7e3037;font-weight:650;padding:.4rem 0}
.exam-review-list{display:grid;gap:.7rem;margin-top:.8rem}
.exam-review-row{padding:1rem;border:1px solid #ead8d0;border-radius:9px;background:#fffaf7}
.exam-review-row strong{color:#642830}
.exam-review-row p{margin-top:.45rem;line-height:1.6}
.exam-review-row .button{margin-top:.6rem}
.exam-perfect{margin:1.25rem 0;color:#246344;background:#edf6ef;border:1px solid #cee3d5;border-radius:9px;padding:.9rem}
.exam-visual{margin:1.15rem 0 1.25rem;padding:.65rem;border:1px solid #ead8d0;border-radius:14px;background:#fffaf7;text-align:center}
.exam-visual img{display:block;width:100%;max-width:900px;max-height:540px;object-fit:contain;margin:auto;border-radius:10px;background:#fff}
.exam-visual.is-missing{display:none}
.exam-visual figcaption{margin:.45rem .2rem 0;color:#7b6a64;font-size:.75rem}
@media(max-width:700px){.exam-visual{margin:.9rem -0.15rem 1rem;padding:.45rem}.exam-visual img{max-height:none}.exam-visual figcaption{font-size:.72rem}}
@media(max-width:700px){.exam-session-top{align-items:stretch}.exam-session-top .exam-timer{order:4;min-width:0;flex:1}.exam-session-top .exam-count{display:flex;align-items:center}.exam-review-row{padding:.85rem}.exam-review-row .button{width:100%}}

.exam-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:25px 0}.exam-options .answer{display:flex;align-items:center;flex-direction:column;gap:10px;padding:16px;min-width:0}.exam-options:not(.has-pictures) .answer{flex-direction:row;align-items:center;justify-content:flex-start;text-align:left}.exam-options:not(.has-pictures) .answer-letter{align-self:auto;flex:0 0 auto}.exam-options .answer-letter{align-self:flex-start}.exam-choice-visual{margin:0;width:100%;min-height:100px}.exam-choice-visual img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:8px}.exam-option-pinyin{font-size:14px;color:#8b303b}.exam-text,.exam-passage{margin:20px 0;padding:22px;background:#faf0e8;border-radius:12px}.exam-text [lang=zh],.exam-passage [lang=zh]{font-size:22px;line-height:1.8}.exam-text .pinyin,.exam-passage .pinyin{font-size:16px;line-height:1.8}.exam-jump{display:grid;grid-template-columns:repeat(10,1fr);gap:7px;margin:22px 0}.exam-jump button{border:1px solid #d7c4be;padding:10px 0;background:white;border-radius:7px;cursor:pointer}.exam-jump .answered{background:#efe0d8}.exam-jump .current{border:2px solid #8b303b}.exam-ai-result{margin:24px 0;padding:24px;border:1px solid #ead7d1;border-radius:12px}.exam-options .selected{outline:2px solid #8b303b;background:#fff5f0}.exam-visual-fallback{font-size:14px;color:#8b303b;padding:15px}
.exam-response{display:grid;gap:.5rem;margin:1rem 0;padding:1rem;border:1px solid #ead8d0;border-radius:12px;background:#fffaf7}.exam-response textarea{width:100%;box-sizing:border-box;resize:vertical;padding:.75rem;border:1px solid #d9bbb0;border-radius:8px;font:inherit;line-height:1.55;background:#fff}.exam-transcript{margin:.8rem 0 0;padding:.8rem;border-left:3px solid #8b303b;background:#fff8f3;line-height:1.65}
@media(max-width:650px){.exam-options{grid-template-columns:1fr}.exam-options.has-pictures{grid-template-columns:repeat(2,minmax(0,1fr))}.exam-jump{grid-template-columns:repeat(8,1fr)}.exam-options .answer{padding:10px}.exam-session-top{flex-wrap:wrap}.exam-text,.exam-passage{padding:15px}.exam-text [lang=zh],.exam-passage [lang=zh]{font-size:20px}}

/* v115: answer navigator is always visible beside the question on desktop. */
.exam-session{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start;max-width:1180px;margin:auto}.exam-session-top,.exam-session>progress{grid-column:1/-1}.exam-session>progress{width:100%;accent-color:#8b303b}.exam-question{grid-column:2;grid-row:3;min-width:0}.exam-jump{grid-column:1;grid-row:3;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-content:start;gap:6px;margin:0;padding:48px 14px 14px;border:1px solid #ead8d0;border-radius:12px;background:#fff;position:sticky;top:16px}.exam-jump:before{content:'BẢNG CÂU HỎI';position:absolute;top:16px;left:14px;color:#7e3037;font-size:11px;font-weight:800;letter-spacing:.1em}.exam-jump:after{content:'Viền đỏ: câu đang làm · nền hồng: đã trả lời';grid-column:1/-1;color:#786662;font-size:10px;line-height:1.45;padding-top:7px}.exam-jump button{min-width:0;min-height:34px;padding:5px 0;border-radius:6px}.exam-session>button[data-action='exam-submit-review']{grid-column:1;grid-row:4;width:100%}.exam-options.has-pictures{gap:12px}.exam-options.has-pictures .answer{position:relative;padding:10px;border-radius:10px}.exam-choice-visual{display:flex;align-items:center;justify-content:center;width:100%;height:200px;min-height:0;margin:0;background:#faf7f5;border-radius:8px;overflow:hidden}.exam-choice-visual img{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:contain}.exam-options .selected{outline:3px solid rgba(139,48,59,.18);border:2px solid #8b303b}.exam-options.has-pictures .answer-letter{z-index:1}.exam-nav{position:sticky;bottom:0;padding-top:16px;background:#fff}.exam-options.has-pictures:has(.answer:nth-child(4)):not(:has(.answer:nth-child(5))){grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){.exam-session{display:flex;flex-direction:column;gap:12px}.exam-session-top,.exam-session>progress,.exam-question,.exam-jump,.exam-session>button[data-action='exam-submit-review']{width:100%}.exam-question{order:3}.exam-jump{order:2;position:static;grid-template-columns:repeat(10,minmax(30px,1fr));padding:42px 10px 10px}.exam-session>button[data-action='exam-submit-review']{order:4}.exam-choice-visual{height:155px}.exam-options.has-pictures{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){.exam-choice-visual{height:124px}.exam-options .answer{padding:7px}.exam-nav .button{padding-left:10px;padding-right:10px}}

/* Shared Stimulus Layout (Desktop 2-column, Mobile 1-column) */
.exam-question-shared{padding:18px}
.exam-shared-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,0.85fr);gap:20px;align-items:start}
.exam-stimulus-pane{position:sticky;top:16px;background:#fffaf7;border:1px solid #ead8d0;border-radius:12px;padding:12px}
.exam-stimulus-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.exam-stimulus-header .eyebrow{font-size:11px;font-weight:750;color:#7e3037;letter-spacing:.05em}
.button-zoom{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;font-size:12px;font-weight:600;border-radius:6px;border:1px solid #d9bbb0;background:#fff;color:#7e3037;cursor:pointer;transition:background .15s}
.button-zoom:hover{background:#fdf2ec}
.exam-stimulus-pane .exam-visual{margin:0;border:none;padding:0;background:transparent}
.exam-stimulus-pane .exam-visual img{cursor:zoom-in;max-height:500px;object-fit:contain;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.06)}
.exam-visual-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.exam-visual-footer figcaption{margin:0;font-size:11px;color:#7b6a64}
.link-btn{background:none;border:none;color:#8b303b;font-weight:600;cursor:pointer;padding:0;font-size:11px;text-decoration:underline}
.link-btn:hover{color:#642830}
.exam-question-pane{display:flex;flex-direction:column;gap:14px}
.exam-prompt-card{background:#faf2ed;border:1px solid #e7d5cd;border-radius:10px;padding:16px}
.exam-prompt-card .exam-qnum{display:inline-block;font-weight:800;color:#8b303b;font-size:13px;margin-bottom:4px;letter-spacing:.03em}
.exam-prompt-card .exam-pinyin{font-size:15px;color:#8b303b;font-weight:500;line-height:1.5;margin-bottom:4px}
.exam-prompt-card .exam-hanzi{font-size:22px;font-weight:600;color:#222;line-height:1.5;margin:0}
.exam-options.shared-letters-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:10px 0}
.exam-options.shared-letters-grid .answer{display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:750;padding:14px;border-radius:10px;border:1px solid #d7c4be;background:#fff;cursor:pointer;transition:all .15s ease}
.exam-options.shared-letters-grid .answer:hover{background:#fdf5f0;border-color:#8b303b}
.exam-options.shared-letters-grid .answer.selected{background:#8b303b;color:#fff;border-color:#8b303b;box-shadow:0 2px 6px rgba(139,48,59,.25)}
.exam-options.shared-text-grid{display:flex;flex-direction:column;gap:10px;margin:10px 0}
.exam-options.shared-text-grid .answer{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:10px;border:1px solid #d7c4be;background:#fff;cursor:pointer;text-align:left}
.exam-options.shared-text-grid .answer-letter{font-weight:750;font-size:16px;color:#8b303b;min-width:22px}
.exam-options.shared-text-grid .answer-content{display:flex;flex-direction:column;gap:2px}
.exam-options.shared-text-grid .answer-pinyin{font-size:12px;color:#786662}
.exam-options.shared-text-grid .answer-hanzi{font-size:17px;color:#222}
.exam-options.shared-text-grid .answer.selected{background:#fff5f0;border:2px solid #8b303b;outline:none}

@media(max-width:860px){
  .exam-shared-layout{grid-template-columns:1fr;gap:14px}
  .exam-stimulus-pane{position:static}
  .exam-stimulus-pane .exam-visual img{max-height:360px}
  .exam-options.shared-letters-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:480px){
  .exam-stimulus-pane .exam-visual img{max-height:260px}
  .exam-prompt-card .exam-hanzi{font-size:19px}
  .exam-options.shared-letters-grid{grid-template-columns:repeat(3,1fr);gap:8px}
  .exam-options.shared-letters-grid .answer{padding:10px;font-size:16px}
}

/* Fullscreen Image Zoom Viewer Modal */
.image-viewer-modal{position:fixed;inset:0;z-index:99999;background:rgba(15,10,10,0.88);backdrop-filter:blur(4px);display:flex;flex-direction:column;user-select:none;touch-action:none}
.image-viewer-modal[hidden]{display:none !important}
.image-viewer-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:rgba(30,20,20,0.75);color:#fff;z-index:10}
.image-viewer-title{font-size:14px;font-weight:600;color:#f5ddd6}
.image-viewer-controls{display:flex;align-items:center;gap:8px}
.image-viewer-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:8px;border:1px solid rgba(255,255,255,0.2);background:rgba(255,255,255,0.12);color:#fff;font-size:16px;font-weight:bold;cursor:pointer;transition:all .15s ease}
.image-viewer-btn:hover{background:rgba(255,255,255,0.25);border-color:rgba(255,255,255,0.4)}
.image-viewer-zoom-level{font-size:13px;font-variant-numeric:tabular-nums;min-width:48px;text-align:center;color:#e5cfc8}
.image-viewer-viewport{flex:1;overflow:hidden;position:relative;display:flex;align-items:center;justify-content:center;cursor:grab}
.image-viewer-viewport.is-dragging{cursor:grabbing}
.image-viewer-img{max-width:92vw;max-height:86vh;object-fit:contain;transform-origin:center center;transition:transform 0.05s ease-out;pointer-events:none;box-shadow:0 4px 24px rgba(0,0,0,0.5);border-radius:6px}
.image-viewer-hint{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);background:rgba(0,0,0,0.65);padding:6px 14px;border-radius:20px;color:#eee;font-size:12px;pointer-events:none}

