:root {
  --green: #07810a;
  --light-gray: #dedede;
  --exam-paper: #ffffe9;
  --label-blue: #ededff;
  --alert-pink: #fff1f5;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; min-width: 320px; background: #fff; color: #090909; font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }

/* Main-site header */
.topline { height: 44px; background: var(--light-gray); }
.topline-inner { height: 44px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 7px 0 5px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 325px; }
.brand-mark { color: #0b5ca3; font: italic 900 27px/1 Arial, sans-serif; letter-spacing: -4px; transform: skew(-10deg); text-shadow: 1px 1px 0 #fff; }
.brand-mark::after { content: '+'; display: inline-block; margin-left: 4px; color: #c63030; font-size: 14px; transform: skew(10deg); vertical-align: top; }
.brand-copy strong { display: block; color: #585858; font: 700 16px/1.05 Georgia, serif; }
.brand-copy span { display: block; margin-top: 2px; color: #666; font: 700 15px/1 Georgia, serif; }
.top-mini-links { display: flex; gap: 20px; margin-right: auto; color: #898989; font: 16px Georgia, serif; }
.login-inline { display: flex; align-items: center; gap: 9px; margin-left: auto; white-space: nowrap; }
.login-inline label { display: flex; align-items: center; gap: 5px; font-size: 17px; font-style: italic; }
.login-inline input { width: 128px; height: 30px; border: 1px solid #8b8b8b; border-radius: 0; padding: 0 6px; background: #eef4fb; }
.login-inline button { height: 32px; border: 1px solid #777; border-radius: 2px; background: #f5f5f5; padding: 0 11px; font: 17px Georgia, serif; }
.login-inline .registration-link { height: auto; border: 0; background: transparent; color: #777; padding: 2px 0; font: 16px Arial, sans-serif; text-decoration: underline; }
.login-error { color: #b42318; font-size: 13px; font-weight: 700; position: absolute; right: 8px; top: 46px; z-index: 5; }
.guest-nav, .main-nav { height: 56px; }
.guest-nav { background: #fff; }
.main-nav { background: var(--green); color: #fff; }
.nav-inner { height: 56px; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 25px; }
.nav-link { color: #fff; background: none; border: 0; padding: 8px 0; font-weight: 700; text-decoration: none; font-size: 19px; white-space: nowrap; }
.guest-nav .nav-link { color: #050505; font-size: 20px; font-weight: 500; }
.home-icon { width: 28px; height: 28px; fill: currentColor; display: block; }
.nav-link:hover { opacity: .75; }
.nav-link.cbt { color: #ffdf00; font-size: 20px; font-weight: 800; }
.nav-link.author-link { color: #fff5a8; font-size: 17px; text-decoration: underline; }
.user-area { display: flex; align-items: center; gap: 5px; margin-left: 10px; font-size: 16px; }
.user-pill { background: #1775e7; color: #fff; padding: 3px 7px; font-weight: 500; }
.logout { border: 0; background: #1775e7; color: #fff; padding: 3px 7px 3px 2px; }

/* Home */
.home-page { width: 100%; min-height: calc(100vh - 100px); padding: 0 0 40px; background: #fff; }
.reference-home { width: min(984px, calc(100% - 32px)); margin: 0 auto; padding-top: 156px; }
.people-crop { position: relative; width: 440px; height: 260px; margin: 0 auto; overflow: hidden; background: #fff; }
.people-crop img { position: absolute; width: 2048px; max-width: none; height: 1082px; left: -806px; top: -257px; }
.site-title { margin: 18px 0 0; text-align: center; color: #363636; font-size: 39px; font-weight: 400; letter-spacing: -1.8px; }
.since { margin: 20px 0 18px; text-align: center; color: #111; font: italic 17px Georgia, serif; }
.notice-board { width: 984px; max-width: 100%; margin: 0 auto; }
.notice-list { padding: 0; margin: 0; list-style: none; color: #111; font-size: 16px; line-height: 1.42; }
.notice-list li { min-height: 22px; }
.notice-bottom { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #9a9a9a; padding-bottom: 9px; }
.file-size { font-size: 14px; white-space: nowrap; }
.board-tools { display: flex; justify-content: center; gap: 22px; padding: 10px 0 22px; font-size: 15px; }
.board-tools span:last-child { color: #858585; }
.copyright { text-align: center; color: #7c7c7c; font-size: 13px; }
.registration-success { position: absolute; top: 108px; left: 50%; transform: translateX(-50%); z-index: 2; width: min(620px, calc(100% - 28px)); border: 1px solid #3f8b43; background: #effaef; padding: 9px 14px; color: #126316; text-align: center; font-weight: 700; }

/* Registration */
.registration-page { width: min(830px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 60px; }
.registration-box { background: #dedede; padding: 5px 32px 12px; }
.registration-box h1 { margin: 0 0 22px; text-align: center; font-size: 19px; font-weight: 500; }
.registration-form { width: min(650px, 100%); margin: 0 auto; }
.registration-row { display: grid; grid-template-columns: 220px minmax(0, 310px); align-items: center; gap: 8px; margin: 6px 0; font-size: 16px; }
.registration-row > span { text-align: right; }
.registration-row input, .registration-row select { width: 100%; height: 28px; border: 1px solid #777; background: #fff; padding: 2px 5px; }
.registration-row input[readonly] { color: #333; background: #eee; }
.registration-row.important > span { color: #9b0000; font-weight: 700; }
.school-fields { display: grid; gap: 4px; }
.registration-photo-field { display: grid; grid-template-columns: 220px 120px minmax(0, 1fr); align-items: center; gap: 8px; margin: 16px 0; font-size: 16px; }
.registration-photo-field > span { text-align: right; }
.registration-photo-preview { width: 100px; height: 116px; display: grid; place-items: center; border: 1px solid #aaa; background: #fff; overflow: hidden; }
.registration-photo-preview img { width: 100%; height: 100%; object-fit: contain; }
.registration-photo-placeholder { color: #888; font-size: 13px; font-weight: 400; }
.registration-photo-field input { width: 100%; font-weight: 400; }
.verification-row { margin-top: 18px; }
.verification-notice { margin: 5px 0 0 228px; color: #8b0000; font-size: 14px; font-weight: 700; }
.registration-error { min-height: 20px; margin: 5px 0 0 228px; color: #c00; font-size: 14px; font-weight: 700; }
.registration-actions { display: flex; justify-content: center; gap: 7px; margin-top: 5px; }
.registration-actions button { border: 1px solid #777; background: #f3f3f3; padding: 2px 10px; }

/* Admin question authoring */
.author-page, .question-author-page { width: min(1050px, calc(100% - 36px)); margin: 0 auto; padding: 30px 0 60px; }
.author-page h1, .question-author-page h1 { margin: 0 0 24px; text-align: center; font-size: 27px; font-weight: 500; }
.exam-meta-form { width: min(620px, 100%); margin: 0 auto; border: 1px solid #aaa; background: #f3f3f3; padding: 28px 34px; }
.exam-meta-form > label { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 10px; margin: 14px 0; font-size: 18px; font-weight: 700; }
.exam-meta-form input { width: 100%; height: 34px; border: 1px solid #777; background: #fff; padding: 4px 7px; }
.exam-meta-form label span { display: flex; align-items: center; gap: 7px; font-weight: 400; }
.author-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.author-actions button { border: 1px solid #777; background: #f3f3f3; padding: 5px 18px; font-weight: 700; }
.author-error { min-height: 21px; color: #c00; text-align: center; font-weight: 700; }
.author-success { margin-bottom: 14px; border: 1px solid #3f8b43; background: #effaef; padding: 8px 12px; color: #126316; font-weight: 700; }
.author-summary { margin: -12px 0 22px; text-align: center; }
.author-question { margin-bottom: 24px; border: 1px solid #999; background: #f5f5f5; padding: 15px 18px; }
.author-question h2 { margin: 0 0 12px; font-size: 20px; }
.author-stem { display: grid; grid-template-columns: 70px 1fr; gap: 9px; font-weight: 700; }
.author-stem textarea { height: 70px; resize: vertical; border: 1px solid #888; background: #fff; padding: 6px; }
.author-choices { display: grid; grid-template-columns: 70px 1fr; gap: 9px; margin-top: 12px; }
.author-choices > span { font-weight: 700; }
.author-choices > div { display: grid; gap: 6px; }
.author-choices label { display: grid; grid-template-columns: 24px 1fr 28px; gap: 7px; align-items: center; }
.author-choices label > input:not(.answer-selector) { height: 30px; border: 1px solid #888; padding: 3px 6px; }
.answer-selector { width: 19px; height: 19px; }
.multi-answer { display: inline-flex; align-items: center; gap: 6px; margin: 13px 0 0 79px; font-weight: 700; }
.multi-answer input { width: 19px; height: 19px; }
.answer-help { margin: 6px 0 0 79px; color: #555; font-size: 14px; }
.sticky-author-actions { position: sticky; bottom: 0; z-index: 5; margin: 0; padding: 12px; border-top: 1px solid #999; background: rgba(255,255,255,.96); }

/* Exam list */
.catalog-page { width: min(1430px, calc(100% - 44px)); margin: 0 auto; padding: 60px 0 80px; }
.catalog-title { margin: 0; text-align: center; font-size: 28px; font-weight: 500; }
.catalog-content { margin-top: 75px; }
.server-time-row { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.legacy-button { border: 1px solid #777; border-radius: 2px; background: #f3f3f3; color: #050505; padding: 4px 10px; box-shadow: inset 0 1px 0 #fff; }
.catalog-alert { margin: 18px 0 22px; color: red; font-size: 17px; }
.exam-list { margin: 0; padding: 7px 14px; list-style: none; background: #f3f3f3; }
.exam-link { appearance: none; display: inline; border: 0; padding: 0; background: transparent; color: #070707; font-size: 18px; text-decoration: underline; }
.exam-link:hover { color: #174fbc; }
.catalog-footer { margin-top: 46px; text-align: center; font-size: 14px; }

/* Candidate information */
.flow-page { width: min(980px, calc(100% - 48px)); margin: 0 auto; padding: 18px 0 24px; }
.flow-heading { margin: 0 0 16px; text-align: center; font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; line-height: 1.25; }
.candidate-table { width: min(900px, 100%); margin: 0 auto; border: 1px dotted #aaa; }
.candidate-photo-row { display: grid; grid-template-columns: 200px 1fr; min-height: 145px; border-bottom: 1px dotted #aaa; }
.candidate-label { display: grid; place-items: center; background: var(--label-blue); border-right: 1px dotted #aaa; font-size: 24px; font-weight: 700; }
.candidate-photo { display: flex; align-items: center; padding-left: 14px; }
.candidate-photo img { width: 120px; height: 120px; object-fit: contain; }
.candidate-row { display: grid; grid-template-columns: 200px 1fr; min-height: 42px; border-bottom: 1px dotted #aaa; }
.candidate-row:last-of-type { border-bottom: 0; }
.candidate-row .candidate-label { font-size: 22px; }
.candidate-value { display: flex; align-items: center; padding: 3px 8px; font-size: 22px; }
.candidate-row.grade .candidate-value { background: var(--alert-pink); }
.grade-select { width: 440px; max-width: 100%; height: 34px; padding: 2px 8px; border: 1px solid #777; background: #fff; font-size: 16px; }
.candidate-notes { width: min(900px, 100%); margin: 0 auto; border: 1px dotted #aaa; border-top: 0; padding: 5px 7px; font-size: 16px; line-height: 1.35; }
.candidate-actions { text-align: center; padding-top: 12px; }
.big-legacy-button { border: 1px solid #666; border-radius: 3px; background: #f1f1f1; padding: 3px 14px; font-size: 26px; font-weight: 800; }
.candidate-warning { margin-top: 7px; font-size: 17px; }
.candidate-warning span { color: #e41c24; font-size: 27px; vertical-align: middle; }
.flow-footer { margin-top: 12px; text-align: center; color: #808080; font-size: 13px; }

/* Instruction screens */
.instruction-page { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 24px; }
.instruction-title { margin: 0 0 16px; text-align: center; font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; }
.instruction-panel { background: #f1f1f1; padding: 14px 24px 16px; font-size: 16px; line-height: 1.3; }
.instruction-panel h2 { margin: 0 0 10px; text-align: center; font-size: 24px; }
.instruction-line { margin: 0; }
.red { color: red; }
.blue { color: blue; font-weight: 700; }
.instruction-action { margin-top: 12px; text-align: center; font-size: 18px; }
.confirm-button { display: block; margin: 9px auto 0; border: 1px solid #777; border-radius: 3px; background: #f1f1f1; padding: 3px 13px; font-size: 25px; font-weight: 700; }
.guide-page { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 24px; }
.guide-heading { margin: 0 0 9px; font-size: clamp(22px, 2.2vw, 27px); font-weight: 500; }
.guide-summary { margin: 0 0 10px 70px; font-size: 17px; }
.guide-box { border: 4px double #777; padding: 7px 10px; background: #f7f7f7; font-size: 16px; line-height: 1.22; }
.guide-box h2 { margin: 0 0 8px; text-align: center; font-size: 24px; }
.highlight-yellow { background: #fff400; font-weight: 700; }
.highlight-cyan { background: #00eeed; }
.guide-action { margin-top: 10px; text-align: center; font-size: 18px; }

/* Live test */
.test-screen { min-height: 100vh; background: var(--exam-paper); }
.test-brandbar { min-height: 94px; display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; background: var(--green); color: #fff; }
.test-brandbar strong { font-size: 32px; line-height: 1.05; }
.test-brandbar button { border: 0; background: transparent; color: #fff; padding: 12px 0 0; text-decoration: underline; }
.test-brandbar span { padding-top: 12px; font-size: 16px; }
.test-infobar { min-height: 50px; display: flex; align-items: center; padding: 7px; background: #6e6e6e; color: #fff; font-size: 16px; font-weight: 700; }
.test-layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100vh - 144px); }
.test-sidebar { position: relative; background: #ddd; padding: 20px 12px; text-align: center; }
.remaining-label { font-size: 14px; }
.remaining-time { margin-top: 6px; font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sidebar-refresh { margin: 25px 0 18px; border: 0; background: transparent; text-decoration: underline; }
.sidebar-title { margin: 0 0 22px; font-size: 34px; }
.review-line { text-align: left; font-weight: 700; }
.review-list { min-height: 38px; margin: 8px 0 15px; text-align: left; color: #777; font-size: 13px; }
.review-empty { line-height: 1.35; }
.review-jump { width: 28px; height: 28px; margin: 0 3px 4px 0; border: 1px solid #555; background: #fff; color: #111; padding: 0; font-weight: 700; text-align: center; }
.answer-count { text-align: left; font-weight: 700; line-height: 1.55; }
.count-detail { margin: 18px 0; text-align: left; line-height: 1.4; }
.calc-open { border: 1px solid #777; background: #f5f5f5; padding: 3px 11px; }
.notepad-label { display: block; margin: 18px 0 4px; font-weight: 700; }
.global-notepad { width: 100%; height: 155px; resize: vertical; background: #fff; }
.test-side-footer { margin-top: 35px; color: #777; font-size: 12px; line-height: 1.45; }
.test-main { min-width: 0; padding: 4px 66px 70px; background: var(--exam-paper); }
.page-buttons { position: sticky; top: 0; z-index: 3; display: flex; gap: 7px; padding: 0 0 34px; background: var(--exam-paper); }
.page-button { width: 28px; height: 28px; border: 1px solid #333; background: #fff; padding: 0; font-size: 15px; }
.page-button.current { background: #000; color: #fff; font-weight: 700; }
#finish-control { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; }
.finish-button { height: 29px; border: 1px solid #666; border-radius: 2px; background: #f3f3f3; padding: 1px 12px; color: #111; font-size: 16px; font-weight: 700; }
.finish-hint { font-size: 15px; font-weight: 700; white-space: nowrap; }
.question-block { margin: 0 0 48px; scroll-margin-top: 45px; }
.question-stem { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 26px; font-size: 17px; line-height: 1.5; }
.question-review { flex: 0 0 28px; display: grid; place-items: center; }
.question-review input { position: absolute; opacity: 0; pointer-events: none; }
.question-review span { width: 25px; height: 25px; display: block; border: 2px solid #555; background: #fff; }
.question-review input:checked + span { background: #111; box-shadow: inset 0 0 0 5px #fff; }
.question-review input:focus-visible + span { outline: 2px solid #175cd3; outline-offset: 2px; }
.question-number { flex: 0 0 24px; }
.multiple-badge { margin-left: 6px; color: #b00000; font-size: 13px; white-space: nowrap; }
.test-choices { display: grid; gap: 7px; padding-left: 0; }
.test-choice { display: flex; align-items: flex-start; gap: 7px; font-size: 16px; line-height: 1.3; }
.test-choice input { margin-top: 3px; }
.question-tools { display: flex; align-items: center; gap: 10px; margin-top: 26px; color: #b7b7b7; }
.question-memo { width: min(575px, 65vw); height: 25px; border: 1px solid #cfcfcf; background: #fffef4; padding: 2px 7px; }
.calculator { position: fixed; left: 105px; top: 455px; z-index: 20; width: 205px; border: 2px solid #555; background: #ececec; padding: 8px; box-shadow: 5px 6px 18px rgba(0,0,0,.25); text-align: left; }
.calculator.hidden { display: none; }
.calculator-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; font-weight: 700; }
.calculator-close { border: 0; background: transparent; font-weight: 700; }
.calculator-display { width: 100%; height: 34px; margin-bottom: 7px; padding: 4px; text-align: right; background: #fff; border: 1px solid #777; }
.calculator-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.calculator-grid button { height: 32px; border: 1px solid #777; background: #fff; }
.calculator-grid .equals { background: #d8ead8; }

/* Exam completion dialog */
.termination-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0,0,0,.08); }
.termination-dialog { width: min(580px, calc(100% - 36px)); min-height: 365px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 5px double #555; background: #d4d4d4; box-shadow: 0 3px 10px rgba(0,0,0,.2); text-align: center; }
.termination-dialog h2 { margin: 0; font-size: 31px; }
.termination-english { margin-top: 3px; font-size: 22px; }
.termination-english strong { color: red; }
.termination-dialog p { margin: 26px 0; color: red; font-size: 20px; font-weight: 700; line-height: 1.45; }
.termination-actions { display: flex; gap: 58px; }
.termination-actions button { border: 1px solid #777; border-radius: 2px; background: #f3f3f3; padding: 3px 12px; font-size: 22px; }

/* Score and ranking */
.result-screen, .rank-screen { min-height: 100vh; background: #f3f3f3; }
.result-content { width: min(860px, calc(100% - 36px)); margin: 0 auto; padding: 14px 0 80px; }
.result-kicker { font-size: 18px; }
.result-content h1 { margin: 22px 0 24px; font-size: 21px; font-weight: 500; line-height: 1.35; }
.result-content h1 span { font-size: 18px; }
.result-wait { display: flex; align-items: center; gap: 7px; margin: 26px 0; font-size: 26px; }
.result-star { color: red; font-size: 44px; line-height: 1; }
.result-wait b { color: #ff00e6; }
.result-notice { text-align: center; font-size: 17px; font-weight: 700; line-height: 1.45; }
.score-table { width: 410px; max-width: 100%; margin: 20px auto 0; border: 3px double #777; border-collapse: collapse; background: #f4f4f4; }
.score-table th, .score-table td { border: 1px solid #888; padding: 4px 8px; text-align: left; }
.score-table th { width: 60%; }
.score-table .final-score { color: blue; font-weight: 800; }
.result-footer-actions { width: 410px; max-width: 100%; margin: 120px auto 0; text-align: center; }
.result-complete { margin: 0 0 22px; color: #ff00e6; text-align: center; font-size: 27px; font-weight: 800; }
.result-buttons { display: flex; justify-content: center; gap: 55px; padding: 0; }
.result-buttons button, .rank-close { min-width: 120px; border: 1px solid #777; border-radius: 2px; background: #f3f3f3; padding: 5px 14px; font-size: 20px; font-weight: 700; }
.rank-content { padding: 0 0 60px; }
.rank-content h1 { margin: 0; padding: 0 2px 28px; font-size: 24px; }
.rank-warning { margin: 0 10px 18px; font-size: 18px; line-height: 1.45; }
.rank-warning span { font-size: 37px; vertical-align: middle; }
.rank-warning mark { background: #ffea00; }
.rank-close { display: block; margin: 0 auto 0; min-width: 210px; font-size: 23px; }
.completion-count { margin: 0 10px; padding-top: 0; font-size: 17px; transform: translateY(18px); }
.ranking-wrap { width: 100%; overflow-x: auto; padding-top: 18px; }
.ranking-table { width: 100%; min-width: 1100px; border-collapse: collapse; background: #aaa; font-size: 14px; }
.ranking-table thead { background: #686868; color: #fff; }
.ranking-table th { padding: 3px 7px; white-space: nowrap; font-weight: 500; }
.ranking-table td { height: 62px; padding: 4px 8px; text-align: center; }
.ranking-table td:nth-child(3), .ranking-table td:nth-child(4) { text-align: left; }
.ranking-table .current-rank { background: #fff4a8; font-weight: 800; }
.ranking-photo { width: 42px; height: 50px; object-fit: contain; background: #fff; }

@media (max-width: 900px) {
  .topline { height: auto; min-height: 44px; }
  .topline-inner { height: auto; align-items: flex-start; flex-direction: column; padding: 7px 10px 10px; gap: 8px; }
  .login-inline { width: 100%; flex-wrap: wrap; margin: 0; }
  .login-inline label { flex: 1 1 140px; }
  .login-inline input { width: 100%; }
  .top-mini-links { display: none; }
  .guest-nav, .main-nav, .nav-inner { height: 52px; }
  .nav-inner { justify-content: flex-start; padding: 0 12px; overflow-x: auto; }
  .nav-links { gap: 18px; }
  .nav-link, .guest-nav .nav-link { font-size: 16px; }
  .reference-home { padding-top: 90px; }
  .candidate-photo-row, .candidate-row { grid-template-columns: 150px 1fr; }
  .candidate-label, .candidate-row .candidate-label { font-size: 20px; }
  .candidate-value { font-size: 21px; }
  .instruction-panel { font-size: 16px; }
  .guide-summary { margin-left: 0; }
  .test-layout { grid-template-columns: 190px minmax(0,1fr); }
  .test-main { padding-left: 30px; padding-right: 30px; }
}

@media (max-width: 620px) {
  .brand { min-width: 0; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy span { font-size: 12px; }
  .login-inline button { width: 100%; }
  .login-inline .registration-link { width: auto; }
  .nav-link:not(.cbt):not(.home-button):not(.author-link) { display: none; }
  .people-crop { width: 310px; height: 190px; }
  .people-crop img { transform: scale(.74); transform-origin: top left; left: -596px; top: -190px; }
  .site-title { margin-top: 14px; font-size: 29px; }
  .since { font-size: 15px; }
  .catalog-page { padding-top: 35px; }
  .catalog-content { margin-top: 45px; }
  .server-time-row { align-items: flex-start; flex-direction: column; }
  .flow-page, .instruction-page, .guide-page { width: calc(100% - 24px); }
  .registration-page { width: calc(100% - 24px); padding-top: 18px; }
  .registration-box { padding: 8px 12px 14px; }
  .registration-row { grid-template-columns: 120px minmax(0, 1fr); font-size: 14px; }
  .registration-photo-field { grid-template-columns: 120px 100px; font-size: 14px; }
  .registration-photo-field input { grid-column: 2; min-width: 0; font-size: 12px; }
  .registration-photo-preview { width: 90px; height: 105px; }
  .verification-notice, .registration-error { margin-left: 128px; font-size: 12px; }
  .author-page, .question-author-page { width: calc(100% - 24px); }
  .exam-meta-form { padding: 18px 14px; }
  .exam-meta-form > label { grid-template-columns: 105px 1fr; font-size: 16px; }
  .author-stem, .author-choices { grid-template-columns: 50px 1fr; }
  .multi-answer, .answer-help { margin-left: 59px; }
  .candidate-photo-row, .candidate-row { grid-template-columns: 108px 1fr; }
  .candidate-photo { padding-left: 8px; }
  .candidate-photo img { width: 150px; height: 150px; }
  .candidate-label, .candidate-row .candidate-label { font-size: 20px; }
  .candidate-value { font-size: 22px; }
  .candidate-notes { font-size: 17px; }
  .instruction-title { margin-bottom: 55px; }
  .instruction-panel { padding: 24px 18px; font-size: 16px; }
  .guide-box { font-size: 16px; }
  .guide-summary { font-size: 18px; }
  .test-brandbar { flex-wrap: wrap; }
  .test-brandbar strong { width: 100%; font-size: 25px; }
  .test-infobar { font-size: 13px; }
  .test-layout { display: block; }
  .test-sidebar { padding: 12px; }
  .sidebar-title { font-size: 28px; }
  .global-notepad { height: 90px; }
  .test-side-footer { display: none; }
  .test-main { padding: 8px 16px 50px; }
  .page-buttons { overflow-x: auto; padding-bottom: 26px; }
  #finish-control { margin-left: 2px; }
  .finish-hint { display: none; }
  .question-memo { width: 100%; }
  .calculator { left: 50%; top: 220px; transform: translateX(-50%); }
  .result-wait { align-items: flex-start; font-size: 20px; }
  .result-complete { margin-right: 0; text-align: center; }
  .result-buttons { justify-content: center; gap: 14px; padding-right: 0; }
}
[hidden]{display:none!important}
.author-modes{display:flex;justify-content:center;gap:12px;margin:20px 0}
.author-modes button{padding:12px;border:1px solid #777;background:#eee}
.import-warning,.missing-key{color:#b00000;background:#fff1eb;padding:10px}
.choice-editor-row{display:grid;grid-template-columns:24px 1fr 28px;gap:7px;align-items:center}
.choice-editor-row input{min-width:0;padding:5px}
.choice-editor-row input[type=checkbox],.choice-editor-row input[type=radio]{width:20px;height:20px}
.short-key{display:flex;gap:10px;margin:15px 0}.short-key textarea{flex:1;min-height:65px}
.editor-image{display:block;max-width:350px;max-height:240px;margin:10px 0}
.question-image{position:relative;width:min(650px,100%);margin:10px 0 24px;padding-bottom:34px}
.image-scroll{overflow:auto;max-height:600px}.image-scroll img{display:block;object-fit:contain}
.zoom-controls{position:absolute;bottom:0;left:0;display:flex;gap:4px}
.zoom-controls button{width:30px;height:30px;border:1px solid #555;background:white;font-size:23px;line-height:1}
.short-answer input{min-width:260px;padding:8px;border:1px solid #777}
.delete-exam{margin-left:20px;color:#b00000;border:1px solid #a66;background:#fff;padding:3px 10px}
.save-state{font-size:13px;color:#555}.exam-meta{margin-left:14px}.exam-list li{margin:8px 0}
#import-form textarea{width:100%}.question-author-page textarea{white-space:pre-wrap}
