*{box-sizing:border-box}body{margin:0;background:#f1f5f9;color:#17233c;font-family:system-ui,"Noto Sans Thai",sans-serif;min-height:100vh;display:grid;place-items:center;padding:20px}.auth{background:#fff;width:min(100%,440px);padding:32px;border-radius:16px;box-shadow:0 12px 36px #1e293b18}.brand{font-size:25px;font-weight:800;color:#0b2d55}.brand span{display:block;font-size:13px;font-weight:500;color:#64748b}h1{font-size:21px;margin:24px 0 8px}p{line-height:1.65;color:#526176;font-size:14px}label{display:block;font-size:14px;font-weight:600;margin:16px 0}input{display:block;width:100%;margin-top:7px;padding:13px 12px;border:1px solid #cbd5e1;border-radius:9px;font-size:16px}input:focus{outline:2px solid #1d75c6}button{border:0;background:#1265ad;color:white;font-weight:700;padding:13px;width:100%;border-radius:9px;cursor:pointer;font-size:15px}button:disabled{opacity:.6}.error{color:#b91c1c;min-height:18px}small{display:block;margin-top:16px;color:#64748b}.notice{border:1px solid #cbd5e1;background:#f8fafc;padding:14px;border-radius:10px;margin:20px 0}.notice p{margin-bottom:0}
.employee{max-width:920px;margin:24px auto;padding:24px}.employee header{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between}.employee header p{flex-basis:100%;margin:0}.employee h2{font-size:20px;margin:20px 0 12px}.examcard{border:1px solid #d9e2ef;border-radius:10px;padding:14px;margin:10px 0}.examcard p{font-size:14px;margin:7px 0}.employee fieldset{border:1px solid #dce4ef;border-radius:10px;margin:12px 0;padding:14px}.employee legend{font-weight:650}.employee label.option{display:block;margin:9px 0;cursor:pointer}.employee .option input{width:auto;margin:0 8px 0 0}.employee button.secondary{background:#e9edf5;color:#152f56}.employee .history{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}

#result-dialog{max-width:380px;width:calc(100% - 32px);text-align:center;border:0;border-radius:18px;box-shadow:0 12px 70px #14273e4d;padding:30px}#result-dialog::backdrop{background:#14273e99}#result-dialog .result-icon{font-size:36px;color:#14745e}#result-dialog .result-score{font-size:44px;font-weight:800;color:#153d74}#result-dialog button{width:100%}

/* Rev 10.6 | Mobile-first refinements, tablets and desktop */
:root{font-synthesis:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html{scroll-padding-top:18px}
body{overflow-x:hidden}
.auth{min-width:0}
.auth button,.auth input,.auth select{font-family:inherit}
.auth button{min-height:46px;touch-action:manipulation}
.auth input{min-height:46px}
.auth :focus-visible{outline:3px solid #1c79c8;outline-offset:2px}
.employee{width:min(100%,960px);min-width:0}
.employee header{column-gap:16px;row-gap:8px}
.employee header h1{margin:0}
.employee header #logout{width:auto;min-width:108px;flex:0 0 auto}
.employee .examcard{overflow-wrap:anywhere}
.employee .examcard button{max-width:320px}
.employee .history{min-width:0}
.employee .option{display:flex!important;align-items:flex-start;gap:12px;padding:13px 12px;border:1px solid #e0e7f0;border-radius:10px;min-height:50px;line-height:1.5;overflow-wrap:anywhere;touch-action:manipulation}
.employee .option:has(input:checked){border-color:#1265ad;background:#eef6ff}
.employee .option input{flex:0 0 20px;width:20px;height:20px;accent-color:#1265ad;margin:1px 0 0}
.employee fieldset{min-width:0}
.employee legend{max-width:100%;overflow-wrap:anywhere;padding:0 5px;line-height:1.65}
#remaining{position:sticky;top:0;z-index:5;background:#eef6ff;color:#0b3968;padding:10px 14px;border:1px solid #bbd6ed;border-radius:10px;font-weight:700;font-variant-numeric:tabular-nums;box-shadow:0 3px 12px #12365c14}
#answer-form #send{position:sticky;bottom:max(8px,env(safe-area-inset-bottom));z-index:5;box-shadow:0 5px 15px #0b39682b}
#result-dialog{box-sizing:border-box;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
#result-dialog .result-score{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
@media(max-width:640px){
 body{display:block;padding:0;min-height:100dvh;background:#fff}
 .auth{width:100%;min-height:100dvh;border-radius:0;box-shadow:none;padding:clamp(18px,5vw,28px);padding-top:max(22px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom))}
 .brand{font-size:23px;line-height:1.3}
 h1{font-size:21px}
 .employee{margin:0;padding:16px 14px max(24px,env(safe-area-inset-bottom))}
 .employee header{align-items:center}
 .employee header h1{font-size:21px;flex:1 1 170px}
 .employee header #logout{width:auto;max-width:140px;min-width:98px;padding:11px 12px}
 .employee header p{font-size:13px;flex-basis:100%}
 .employee h2{font-size:19px}
 .employee .examcard{padding:15px;margin:12px 0}
 .employee .examcard button{max-width:none;width:100%}
 .employee .history{grid-template-columns:minmax(0,1fr)}
 .employee fieldset{padding:12px;margin:12px 0}
 .employee legend{font-size:15px}
 .employee .option{font-size:15px;margin:8px 0}
 #answer-form{padding-bottom:6px}
 #remaining{top:6px}
 #result-dialog{width:calc(100% - 24px);max-width:420px;padding:22px 18px;border-radius:16px}
 #result-dialog .result-score{font-size:38px}
}
@media(max-width:360px){.employee header #logout{font-size:13px;min-width:90px}.brand{font-size:21px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
