:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #202c40;
  background: #f7f9fc;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1080px; margin: 40px auto; padding: 24px; background: white; border-radius: 20px; box-shadow: 0 12px 48px #1e293b07; }
form { display: flex; gap: 12px; max-width: 620px; margin-bottom: 8px; }
input, button { font: inherit; font-size: 16px; border: 1px solid #dce4ef; border-radius: 9px; height: 48px; padding: 0 18px; }
input { min-width: 0; flex: 1; color: inherit; background: #fbfcfe; }
input::placeholder { color: #8495aa; }
input[aria-invalid="true"] { border-color: #bb4343; }
button { cursor: pointer; background: white; color: #405976; }
button:disabled { cursor: default; opacity: .45; }
#submit { min-width: 104px; background: #2864f0; border-color: #2864f0; color: white; }
#submit:hover:not(:disabled) { background: #1e52d4; }
a { color: #2864f0; text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #99b7ff; outline-offset: 4px; }
.map { position: relative; height: 560px; overflow: hidden; background: #edf1f2; border: 1px solid #e0e6ee; border-radius: 12px; }
#map-svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; user-select: none; }
#map-svg.dragging { cursor: grabbing; }
#map-svg:focus-visible { outline: 3px solid #99b7ff; outline-offset: -3px; }
.map-controls { position: absolute; top: 12px; right: 12px; display: grid; gap: 6px; }
.map-controls button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 8px; font-size: 24px; background: #fff; box-shadow: 0 2px 8px #23354a12; }
.map-controls button:disabled { opacity: .65; }
.map-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pin-halo { fill: #2864f0; opacity: .16; }
.pin-shape { fill: #2864f0; stroke: white; stroke-width: 4; filter: drop-shadow(0 3px 5px #12347255); }
.pin-centre { fill: white; }
.result { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; }
.region { min-width: 0; }
h1 { margin: 0 0 8px; font-size: 16px; font-weight: 500; color: #74859c; }
#location-name { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.actions { display: flex; align-items: center; flex-shrink: 0; gap: 22px; }
.actions a { font-size: 15px; }
#receipt:hover:not(:disabled) { border-color: #91b1f8; color: #2864f0; }
#notice.error { margin: 10px 0 0; color: #b34141; font-size: 14px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 1120px) { main { margin: 24px; } }
@media (max-width: 620px) {
  main { margin: 12px; padding: 16px; border-radius: 16px; }
  form { gap: 8px; margin-bottom: 8px; }
  input, button { padding: 0 14px; }
  #submit { min-width: 86px; }
  .map { height: 430px; }
  .result { flex-direction: column; align-items: stretch; gap: 20px; padding-top: 20px; }
  #location-name { font-size: 20px; }
  .actions { justify-content: space-between; }
}

.form-help { margin: 0 0 20px; color: #65758b; font-size: 13px; line-height: 1.5; }
#test { min-width: 72px; }
#test:hover:not(:disabled) { background: #f4f7fd; }
#location-detail { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: #65758b; }
#location-detail:empty { display: none; }
#notice.testing { margin: 12px 0 0; padding: 12px 14px; border: 1px solid #edce83; border-radius: 8px; color: #795109; background: #fff8e8; font-size: 14px; line-height: 1.6; }
.preview #result-heading { color: #926113; font-weight: 600; }
.preview .pin-shape { fill: #b87912; }
.preview .pin-halo { fill: #b87912; }
@media (max-width: 380px) {
  form { flex-wrap: wrap; }
  #student-id { flex-basis: 100%; }
  #submit, #test { flex: 1; }
}
