:root {
  color-scheme: light;
  --paper: #fafaf7;
  --ink: #20242a;
  --muted: #60625f;
  --border: #dedfda;
  --green: #294b36;
  --error: #a3362f;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.entry { width: min(100% - 48px, 800px); padding: 52px 0 20px; text-align: center; }
.identity { margin-bottom: 42px; }
.gate { display: block; width: 150px; height: 74px; object-fit: contain; margin: 0 auto 28px; }
h1 { margin: 0; font-size: clamp(1.875rem, 3.35vw, 3.25rem); line-height: 1.35; font-weight: 600; letter-spacing: .055em; }
.command-form label { display: block; margin-bottom: 38px; color: var(--muted); font-size: clamp(1.125rem, 1.75vw, 1.625rem); line-height: 1.55; }
.command-field {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 94px;
  padding: 16px 21px 16px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 21px;
  box-shadow: 0 3px 5px #262a2210, 0 1px 2px #262a2208;
  transition: border-color 160ms, box-shadow 160ms;
}
.command-field:focus-within { border-color: #6d8975; box-shadow: 0 0 0 3px #294b3612, 0 3px 7px #262a2210; }
.command-field.is-error { border-color: var(--error); }
.command-field.is-error:focus-within { box-shadow: 0 0 0 3px #a3362f12; }
input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 1.5rem; line-height: 1.5; }
input::placeholder { color: #737570; opacity: 1; }
.submit { flex: 0 0 56px; width: 56px; height: 56px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: #232522; cursor: pointer; transition: background 150ms, transform 150ms; }
.submit:hover { background: var(--green); }
.submit:active { transform: scale(.95); }
.submit:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
.submit:disabled { cursor: wait; opacity: .55; }
.help { margin: 35px 0 0; color: var(--muted); font-size: 1.125rem; line-height: 1.6; }
.status { min-height: 1.6em; margin: 16px 0 0; color: var(--error); font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.status.is-loading { color: var(--green); }
.no-script { color: var(--error); font-size: 1rem; }
@media (max-width: 600px) {
  .entry { width: calc(100% - 40px); padding: 32px 0 16px; }
  .identity { margin-bottom: 30px; }
  .gate { width: 116px; height: 58px; margin-bottom: 24px; }
  h1 { font-size: clamp(1.625rem, 7.1vw, 2.375rem); letter-spacing: .02em; }
  .command-form label { font-size: 1.125rem; margin-bottom: 26px; }
  .command-field { min-height: 76px; padding: 12px 13px 12px 18px; gap: 10px; border-radius: 20px; }
  input { font-size: 1.1875rem; }
  .submit { flex-basis: 48px; width: 48px; height: 48px; }
  .help { font-size: .875rem; margin-top: 25px; }
  .status { font-size: .875rem; }
}
@media (max-height: 540px) and (min-width: 601px) {
  .entry { padding: 24px 0 8px; }
  .gate { width: 100px; height: 48px; margin-bottom: 14px; }
  .identity { margin-bottom: 18px; }
  h1 { font-size: 2rem; }
  .command-form label { font-size: 1.125rem; margin-bottom: 20px; }
  .command-field { min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
  .help { margin-top: 20px; font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media (forced-colors: active) { .submit { border: 2px solid ButtonText; } .command-field { border: 1px solid CanvasText; } }
[hidden]{display:none!important}
.keypad-toggle{font:inherit;font-size:16px;color:var(--green);background:transparent;border:1px solid var(--border);border-radius:8px;padding:8px 17px;margin-top:12px;cursor:pointer}
.number-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;width:min(100%,360px);margin:12px auto 0}
.number-keypad button{min-height:43px;border:1px solid #c9d4c9;border-radius:8px;background:#fff;color:var(--green);font-family:inherit;font-weight:600;font-size:23px;line-height:1.2;cursor:pointer}
.number-keypad #keypad-clear,.number-keypad #keypad-back{font-size:16px}.number-keypad .keypad-check{grid-column:1/-1;font-size:17px;background:#edf2eb}
.number-keypad button:hover,.keypad-toggle:hover{background:#e8efe7}
.course-match{background:#edf2eb;border:1px solid #b7c9b7;border-radius:12px;padding:14px 18px;margin:12px auto 0;width:min(100%,520px)}
.course-match p{margin:0 0 12px;font-size:19px;line-height:1.5}.course-match button{font:inherit;font-size:17px;border:1px solid #a5bca8;border-radius:7px;padding:8px 16px;cursor:pointer;background:#fff;color:var(--green);margin:0 5px}
.course-match #confirm-course{background:var(--green);color:#fff}.course-match button:disabled{opacity:.5;cursor:wait}
.number-keypad button:focus-visible,.keypad-toggle:focus-visible,.course-match button:focus-visible{outline:3px solid #b9974e;outline-offset:3px}
.number-entry-open .entry{padding-top:20px;padding-bottom:16px}.number-entry-open .identity{margin-bottom:14px}.number-entry-open .gate{width:102px;height:50px;margin-bottom:12px}.number-entry-open h1{font-size:34px}.number-entry-open .command-form label{font-size:19px;margin-bottom:14px}.number-entry-open .command-field{min-height:64px;padding:8px 16px}.number-entry-open .submit{width:44px;height:44px;flex-basis:44px}.number-entry-open .help{margin-top:10px;font-size:15px}.number-entry-open .status:empty{min-height:0;margin:0}.number-entry-open .course-match{padding:10px 16px}.number-entry-open .course-match p{font-size:17px;margin-bottom:8px}
.number-entry-open .gate-stage{width:110px;height:54px;margin-bottom:12px}
