@font-face {
  font-family: Inter;
  src: url("/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #172346;
  background: #eef2fb;
  accent-color: #5243bb;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 12% 8%, #dce9ff 0, transparent 48%), radial-gradient(ellipse at 90% 6%, #e6ddff 0, transparent 50%), #f2f5fc; }
header { color: #fff; background: linear-gradient(115deg, #111936, #242454 70%, #383078); border-bottom: 1px solid #7375af; }
.header-inner { width: min(100% - 36px, 500px); margin: auto; min-height: 72px; display: flex; gap: 12px; align-items: center; font-size: .94rem; letter-spacing: -.01em; }
.header-inner img { padding: 4px; object-fit: contain; border-radius: 12px; background: #ffffffeb; }
main { width: min(100% - 24px, 500px); margin: clamp(20px, 6vw, 60px) auto; }
.card { min-width: 0; background: #fff; border: 1px solid #dce3f4; border-radius: 27px; padding: clamp(20px, 5vw, 34px); box-shadow: 0 22px 66px #28366e22, 0 2px 8px #28366e0d; }
h1 { margin: 0 0 12px; font-size: clamp(1.65rem, 6vw, 2.22rem); font-weight: 800; line-height: 1.12; letter-spacing: -.05em; text-wrap: balance; }
p { line-height: 1.5; }
#intro { margin: 0 0 24px; color: #495673; }
#status:empty { display: none; }
#status { padding: 12px 14px; border-radius: 13px; background: #edf0ff; border-inline-start: 3px solid #645ad2; color: #283461; }
.fields { display: grid; gap: 8px; }
label { font-size: .85rem; font-weight: 720; }
select, input, button { width: 100%; min-height: 48px; border-radius: 12px; padding: 8px 14px; font: inherit; }
select, input { color: inherit; background: #f8f9ff; border: 1px solid #cbd4eb; }
select:disabled, input:disabled { color: #5f6880; background: #edf0f6; opacity: 1; cursor: not-allowed; }
.name-results { list-style: none; margin: 0; padding: 5px; background: #f9faff; border: 1px solid #cbd4eb; border-radius: 14px; max-height: min(320px, 48vh); overflow-y: auto; scrollbar-color: #8e9bcc #eff2fb; }
.name-results button { display: block; text-align: start; background: transparent; color: #243259; font-weight: 580; overflow-wrap: anywhere; }
.name-results button:hover, .name-results button:focus-visible { background: #e7eaff; }
.name-results li + li { margin-top: 4px; }
.name-hint { padding: 8px 10px; color: #495673; font-size: .9rem; }
button { color: #fff; background: linear-gradient(110deg, #3534a3, #583ec2); border: 0; font-weight: 700; cursor: pointer; }
button:active { translate: 0 1px; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #5650be; outline-offset: 2px; }
#face:disabled { display: none; }
.text-button { background: transparent; color: #4036a3; min-height: 44px; font-size: .9rem; }
.quiet { background: #edf0ff; color: #302d83; }
.face-panel { margin-top: 16px; min-width: 0; }
.face-instruction { margin-bottom: 10px; padding: 10px 14px; border-inline-start: 4px solid #6f63cf; border-radius: 12px; background: #eef0ff; }
.face-instruction span { color: #443a95; font-size: .8rem; font-weight: 650; }
.face-instruction p { margin: 3px 0 0; font-weight: 700; }
.face-preview { position: relative; width: 100%; height: clamp(200px, 43vh, 350px); overflow: hidden; border: 1px solid #414871; border-radius: 16px; background: #141b35; }
.face-preview video { display: block; width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); }
.scan-reticle { position: absolute; inset: 17% 23%; border: 2px solid #c9d8ff; border-radius: 35%; box-shadow: 0 0 0 500px #141b3544; pointer-events: none; }
progress { display: block; width: 100%; height: 8px; margin-top: 12px; }
#qr { margin-top: 12px; overflow: hidden; }
#qr video { max-width: 100%; }
#cancel { margin-top: 12px; }
.review-students { display: grid; gap: 12px; list-style: none; padding: 0; margin: 12px 0 0; }
.review-students > li { padding: 14px; border: 1px solid #dce3f4; border-radius: 16px; }
.review-students h2 { font-size: 1rem; margin: 0 0 8px; }
.review-students p { margin: 0; color: #495673; }
.review-students p:empty { display: none; }
.review-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.reference-photo { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; background: #141b35; margin-bottom: 12px; }
.success { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; margin-top: 16px; padding: 16px; border: 1px solid #b6dbbf; border-radius: 16px; background: #edf8ef; animation: success-enter 420ms ease-out both; }
.success strong { display: block; font-size: 1.1rem; }
.success p { margin: 4px 0 0; color: #335c49; }
.success-mark { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #24754d; animation: success-mark 480ms ease-out both; }
.success-mark::before { content: ""; width: 19px; height: 11px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: translateY(-2px) rotate(-45deg); }
@keyframes success-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes success-mark { 0% { transform: scale(.7); } 65% { transform: scale(1.1); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .success, .success-mark { animation: none; } }
