:root{--accent:#238b55;--text:#292d32;--sub:#70767d;--radius:15px}
*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--text);font-family:'DM Sans',sans-serif}main{max-width:1100px;margin:0 auto;padding:48px 28px 30px}header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:32px}h1{font-family:'Fraunces',serif;font-size:32px;margin:0 0 8px}p{color:var(--sub);line-height:1.6}header p{margin:0}a{color:var(--accent)}label{display:block;font-size:14px;font-weight:600;margin-bottom:10px}input,textarea,select{font:inherit;width:100%;padding:16px;border:1px solid #d9dde1;border-radius:12px;background:white;color:var(--text)}input:focus,button:focus-visible,a:focus-visible{outline:3px solid #71bd94;outline-offset:3px}#studentSearch{max-width:520px}#resultCount{font-size:14px}.table-wrap{overflow-x:auto;background:white;border:1px solid #e5e7ea;border-radius:16px}table{border-collapse:collapse;width:100%;text-align:left}th{font-size:12px;color:var(--sub);background:#fafbfc}th,td{padding:20px 24px;border-bottom:1px solid #edf0f2}tr:last-child td{border-bottom:0}tbody tr:hover{background:#f0f8f3}td:first-child a{font-weight:600;text-decoration:none}tbody tr{cursor:pointer}button{font:inherit;font-weight:600;padding:12px 22px;border:0;border-radius:10px;background:var(--accent);color:white;cursor:pointer}button:disabled{opacity:.4;cursor:default}.badge{background:#e5eee9;color:#36674c;border-radius:20px;padding:8px 14px;font-size:13px;white-space:nowrap}.notice{background:#fff6df;color:#795b20;padding:14px 18px;border-radius:12px;font-size:14px}.answer-page{background:white;border:1px solid #e5e7ea;border-radius:var(--radius);padding:40px;min-height:330px;text-align:center}.answer-page h2{font-family:'Fraunces',serif;font-size:28px;white-space:pre-wrap;line-height:1.4}.question-image{display:block;max-width:100%;max-height:350px;object-fit:contain;margin:0 auto 24px}.answer-page textarea{resize:vertical;min-height:140px;line-height:1.6}.options{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:28px auto;max-width:750px}.option{border:2px solid #e4e7e9;border-radius:12px;padding:22px;white-space:pre-wrap}.option.selected{border-color:var(--accent);background:#eaf7ef;font-weight:700}.option.selected::after{content:' ✓';color:var(--accent)}.answer-page select:disabled{opacity:1;color:var(--text)}.stamp-board{position:relative;width:100%;aspect-ratio:900/200;background:#fff;border:2px solid #eee;border-radius:12px;overflow:hidden}.stamp-background{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.stamp{position:absolute;width:5.333333%;height:24%;object-fit:contain;transform:translate(-50%,-50%)}nav{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:24px}#pageCount{font-size:14px;color:var(--sub)}[hidden]{display:none!important}.answer-page pre{text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}.answer-page .body-text{white-space:pre-wrap}#status{padding:20px 0}@media(max-width:600px){main{padding:24px 16px}h1{font-size:26px}th,td{padding:16px 12px}.answer-page{padding:22px 14px}.answer-page h2{font-size:22px}.options{grid-template-columns:1fr}header{align-items:flex-start}nav button{padding:12px 16px}}

/* The frame owns the exported test styling; the outer box only contains it. */
.answer-page:has(.test-frame){padding:0;overflow:hidden}.test-frame{display:block;width:100%;height:620px;border:0;background:white}#answerNotice{font-size:14px}
/* Match the dashboard login field and editor back control. */
#studentSearch{width:100%;max-width:520px;height:46px;background:#f5f5f5;border:2px solid transparent;border-radius:15px;padding:0 16px;font-family:'DM Sans',sans-serif;font-size:15px;color:#1a1a1a;outline:none;transition:all .25s cubic-bezier(.4,0,.2,1)}
#studentSearch::placeholder{color:#999}
#studentSearch:hover{background:#eee}
#studentSearch:focus{border-color:#2ecc71;background:#fff;outline:none}
.back-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;margin-bottom:28px;border:none;background:#f5f5f5;border-radius:10px;font-family:'DM Sans',sans-serif;font-size:14px;font-weight:500;color:#1a1a1a;text-decoration:none;white-space:nowrap;transition:all .25s cubic-bezier(.4,0,.2,1)}
.back-btn:hover{background:#e8e8e8}
.back-btn svg{width:14px;height:14px}
#exportPDF,#previousAnswer,#nextAnswer,.back-btn{border-radius:13px}
.review-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
#exportStatus{font-size:14px;color:var(--sub);line-height:1.5}
@media(max-width:600px){#resultViewer>header{flex-wrap:wrap}.review-actions{justify-content:flex-start}}
