:root{--bg:#f4f7fb;--ink:#1d2a3a;--line:#dce4ed;--primary:#1769aa;--primary2:#0e4d80;--card:#fff;--danger:#b42318}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Malgun Gothic",sans-serif;background:var(--bg);color:var(--ink)}header{height:64px;background:#123a5a;color:white;display:flex;align-items:center;justify-content:space-between;padding:0 5vw;position:sticky;top:0;z-index:20}.brand{font-weight:800}nav a{color:white;text-decoration:none;margin-left:18px;font-size:14px}main{max-width:1180px;margin:28px auto;padding:0 18px 50px}footer{text-align:center;padding:30px;color:#6d7885;font-size:12px}.hero{padding:56px 20px;text-align:center;background:linear-gradient(135deg,#eaf4ff,#fff);border:1px solid var(--line);border-radius:18px}.hero h1{font-size:38px;margin:0 0 12px}.actions{display:flex;gap:12px;justify-content:center;margin-top:26px}.btn,button{display:inline-block;border:0;border-radius:9px;background:var(--primary);color:white;padding:11px 17px;text-decoration:none;font-weight:700;cursor:pointer}.btn:hover,button:hover{background:var(--primary2)}.secondary{background:#455a64}.small{padding:8px 12px;font-size:13px}.ghost{background:#eef3f7;color:#27465e}.danger{color:var(--danger)}.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:22px;margin:18px 0;box-shadow:0 3px 14px rgba(22,41,58,.04)}.narrow{max-width:520px;margin:50px auto}.quota{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.quota span,.stat{background:#f6f9fc;border:1px solid var(--line);border-radius:10px;padding:14px}.quota b{float:right;font-size:20px}.note{font-size:13px;color:#657586}.warning{border-left:4px solid #e7a600}.error{color:#b42318;font-weight:700}label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700}input,select,textarea{border:1px solid #cbd6e2;border-radius:8px;padding:10px;font:inherit;background:white}textarea{min-height:88px}.ocr{width:100%;min-height:260px;font-family:monospace}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.full{grid-column:1/-1}.inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.inline input{min-width:320px}.topline{display:flex;align-items:center;justify-content:space-between;gap:15px}.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.stat b{display:block;font-size:30px}.stat span{color:#607485;font-size:13px}table{width:100%;border-collapse:collapse;font-size:14px}th,td{border-bottom:1px solid #e6ebf0;padding:10px;text-align:left;vertical-align:top}th{background:#f7f9fb}.examrow{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.examrow small{display:block;color:#6b7988;margin-top:4px}.question{max-width:900px;margin:15px auto}.qhead{display:flex;gap:12px;color:#66798a;font-size:13px}.stem{font-size:18px;font-weight:700;line-height:1.55}.choice{display:flex;flex-direction:row;align-items:flex-start;padding:11px;border-radius:8px;font-weight:400}.choice:hover{background:#f3f7fa}.choice input{margin:3px 10px 0 0}.sticky{position:sticky;top:64px;background:#fff;border:1px solid var(--line);padding:12px 20px;z-index:10;display:flex;justify-content:space-between;max-width:900px;margin:auto;border-radius:0 0 10px 10px}.submit{font-size:18px;width:100%;padding:16px}.result{text-align:center}.score{font-size:72px;font-weight:900;color:#1769aa;margin:22px}.score small{font-size:20px;color:#627383}.pending{padding:30px;background:#fff7db;border-radius:12px;font-weight:800}@media(max-width:700px){header{height:auto;padding:13px 18px;align-items:flex-start;gap:10px;flex-direction:column}nav a{margin:0 12px 0 0}.hero h1{font-size:28px}.formgrid{grid-template-columns:1fr}.full{grid-column:auto}.topline{align-items:flex-start;flex-direction:column}.inline input{min-width:0;width:100%}table{display:block;overflow-x:auto}.sticky{top:91px}}
.toolbar{display:flex;gap:8px;flex-wrap:wrap}.success{background:#19733b}.success:hover{background:#105b2d}.info{background:#eef7ff;border:1px solid #c9e1f5;border-radius:9px;padding:12px;color:#355a75}.badge{display:inline-block;border-radius:999px;padding:4px 9px;background:#e8eef5;font-size:12px;font-weight:800}.badge.auto{background:#e4f6e9;color:#176735}.badge.manual{background:#fff2d9;color:#8a5300}.badge.waiting{background:#fff0ed;color:#a63a2d}.ghostbadge{background:#f2f4f7;color:#526474}.ready{border-left:4px solid #2f8c4c}.pendingstat{border-left:4px solid #d8792e}.examcreate{max-width:760px}.inlineform{display:inline-block;margin-left:8px}.tabs{display:flex;gap:8px}.answerbulk{width:100%;min-height:130px;margin-bottom:10px;font-family:ui-monospace,Consolas,monospace}.answerrow{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:20px;padding:20px 0;border-bottom:1px solid var(--line)}.answerrow.highlight{background:#fff7cf;margin:0 -12px;padding:20px 12px;border-radius:10px}.answerstem{line-height:1.55}.answerstem>div{margin-bottom:8px}.answerstem ol{margin:10px 0 0;padding-left:26px;color:#455766}.answerform{display:flex;flex-direction:column;gap:10px}.answerform textarea{min-height:70px}.qid{font-weight:900;color:#0e5e9c}.successmsg{padding:20px;background:#e9f7ed;border-radius:10px;color:#176735;font-weight:800}.signature-card{max-width:900px;margin:20px auto}.signature-card canvas{display:block;width:100%;height:180px;background:white;border:2px dashed #8ca3b7;border-radius:12px;touch-action:none}.sigactions{display:flex;justify-content:flex-end;margin-top:10px}.finish-note{text-align:center;margin-bottom:12px}.final-submit{max-width:900px;margin:20px auto}.sticky small{display:block;color:#657586;margin-top:3px}.signature-result{max-width:520px;margin:28px auto 0;border-top:1px solid var(--line);padding-top:18px}.signature-result img{max-width:100%;max-height:180px;border:1px solid var(--line);background:#fff;border-radius:8px}.result table{text-align:left}.result table th,.result table td{text-align:left}
@media(max-width:700px){.answerrow{grid-template-columns:1fr}.toolbar{width:100%}.toolbar .btn{flex:1;text-align:center}.sticky{align-items:flex-start;gap:10px}.signature-card canvas{height:160px}}
.installbar{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;background:#eaf4ff;border:1px solid #bdd8ed;border-radius:12px;padding:10px 14px;margin-bottom:15px}.installbar button{padding:8px 13px}.loginhelp{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.copybox{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.copybox code{flex:1;min-width:260px;padding:12px;background:#f6f8fa;border:1px solid var(--line);border-radius:8px;word-break:break-all}.pass{display:inline-block;background:#e5f6e9;color:#176735;border-radius:999px;padding:4px 10px;font-weight:800}.fail{display:inline-block;background:#fff0ed;color:#b42318;border-radius:999px;padding:4px 10px;font-weight:800}.big{font-size:16px}.retestnotice{margin:22px auto;padding:18px;background:#fff4dc;border:1px solid #f0c36a;border-radius:12px;max-width:650px}.academytitle{display:flex;align-items:center;gap:15px;margin-bottom:18px}.academytitle img{width:74px;height:74px;border-radius:18px}.academytitle h1{margin:0}.academytitle small{display:block;font-size:14px;color:#657586;margin-top:4px}.help h2{margin-top:26px}.help h2:first-child{margin-top:0}.help p{line-height:1.7}.reportpage{background:#fff;border:1px solid var(--line);padding:30px;border-radius:12px}.profile{margin:20px 0}.profile th{width:90px}.profile td{font-weight:700}.noprint{margin-bottom:20px}@media print{header,footer,.noprint,.installbar{display:none!important}body{background:#fff}.reportpage{border:0;padding:0}main{max-width:none;margin:0;padding:0}table{font-size:11pt}}@media(max-width:700px){.copybox{align-items:stretch}.copybox code{min-width:0;width:100%}.academytitle img{width:60px;height:60px}.installbar{justify-content:flex-start}.reportpage{padding:15px}}

.schoolbrand{display:flex;align-items:center;gap:10px}.headerlogo{width:40px;height:40px;object-fit:contain;background:#fff;border-radius:50%;padding:2px}.herologo{width:120px;height:120px;object-fit:contain;background:#fff;border-radius:20px;margin-bottom:12px}@media(max-width:700px){.headerlogo{width:34px;height:34px}.schoolbrand span{font-size:14px}.herologo{width:90px;height:90px}}

.printonly{display:none}.barrow{display:grid;grid-template-columns:minmax(120px,210px) 1fr 65px;gap:12px;align-items:center;margin:10px 0}.barlabel{font-weight:700}.bartrack{height:18px;background:#e6edf4;border-radius:999px;overflow:hidden}.bartrack.large{height:24px}.barfill{height:100%;background:linear-gradient(90deg,#2f80c3,#4da2dc);border-radius:999px}.barfill.low{background:linear-gradient(90deg,#d45b4b,#e38a62)}.studentbar{display:grid;grid-template-columns:minmax(150px,220px) 1fr 80px;gap:12px;align-items:center;margin:12px 0}.studentbarname{display:flex;flex-direction:column}.studentbarname small,.blocknote{font-size:12px;color:#71808f}.paperhead{display:flex;align-items:center;gap:18px;margin:0 0 18px}.paperhead img{width:72px;height:72px;object-fit:contain}.paperhead h1{margin:0}.identity th{width:80px}.identity td{min-width:120px;height:40px}.examprint,.printpage{background:#fff;border:1px solid var(--line);border-radius:12px;padding:28px}.printquestion{padding:14px 4px;border-bottom:1px solid #dfe5eb;break-inside:avoid}.printstem{font-size:16px;line-height:1.55}.printchoices{margin:8px 0 0 25px}.printchoices li{padding:4px 6px}.selected-choice{background:#e9f5ff;font-weight:700}.answerkey{color:#b42318;font-weight:800;margin-left:8px}.teacher-comment-box,.teacher-comment-print{margin-top:28px;border:1px solid #bfcad5;border-radius:10px;padding:16px;break-inside:avoid}.teacher-comment-box textarea{width:100%;min-height:110px}.printcomment{white-space:pre-wrap;min-height:36px;font-weight:600}.comment-lines{min-height:100px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 29px,#cbd4dd 30px);margin-top:8px}.printmeta{text-align:right;color:#6f7c88;font-size:12px}.reportavg{font-size:20px;padding:12px;background:#f3f7fb;border-radius:10px}.student-report-page{background:white;padding:24px;margin:18px 0;border:1px solid var(--line);border-radius:12px}.student-report-page+.student-report-page{page-break-before:always}
@media print{.printonly{display:block}.printflat,.examprint,.printpage,.student-report-page{border:0!important;box-shadow:none!important;padding:0!important;margin:0!important}.barfill,.bartrack{-webkit-print-color-adjust:exact;print-color-adjust:exact}.studentbar,.barrow{break-inside:avoid}.printquestion{font-size:11pt}.teacher-comment-box form{display:none!important}.student-report-page{page-break-after:always}.student-report-page:last-child{page-break-after:auto}a{color:#000;text-decoration:none}}
@media(max-width:700px){.barrow,.studentbar{grid-template-columns:1fr}.examprint,.printpage{padding:14px}.paperhead img{width:56px;height:56px}.identity{display:block;overflow-x:auto}}

.accesscols{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}.accessqr{width:180px;height:180px;max-width:100%;border:1px solid #ddd;border-radius:12px;background:#fff;padding:8px}.successbox{background:#e9f8ef;border:1px solid #98d2aa;border-radius:10px;padding:12px}.warn{background:#fff6dd;border:1px solid #e5c96d;border-radius:10px;padding:12px}.mobileadmin{max-width:680px;margin:0 auto}.accessguide ol{padding-left:22px}.accessguide code{word-break:break-all}@media(max-width:760px){.accesscols{grid-template-columns:1fr}.accessqr{width:150px;height:150px}}
