:root {
  color-scheme: light;
  --ink: #203a32;
  --muted: #718078;
  --line: #e2e8df;
  --paper: #fff;
  --canvas: #f4f6f0;
  --green: #173f36;
  --green-dark: #12342c;
  --lime: #d9e99f;
  --shadow: 0 18px 54px rgba(28, 53, 43, .09);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% -25%, #fff 0, var(--canvas) 62%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

.shell {
  width: 100%;
  max-width: 1320px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 48px) 28px;
}

.brand {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  display: block;
  width: 205px;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

.brand span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #52675c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: right;
}

.intro {
  max-width: 680px;
  margin: 18px 0;
  color: var(--muted);
  line-height: 1.55;
}

.panel {
  margin: 18px 0;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(221, 229, 218, .95);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

#login-panel {
  width: min(100%, 520px);
  margin: clamp(32px, 7vh, 78px) auto;
  padding: clamp(26px, 4vw, 42px);
}

[hidden] { display: none !important; }

h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(23px, 3vw, 29px);
  font-weight: 740;
  letter-spacing: -.035em;
  line-height: 1.16;
}

h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -.02em;
}

p {
  margin: 8px 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.heading-row {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 14px;
}

.heading-row p { margin: 4px 0 0; }

.camera-box {
  position: relative;
  width: 100%;
  min-height: 220px;
  max-height: 55vh;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 16px 0 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: linear-gradient(145deg, #1e332b, #14241e);
  box-shadow: 0 12px 28px rgba(19, 39, 31, .14);
}

.camera-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-box video.is-hidden { display: none; }

.camera-box::after {
  position: absolute;
  inset: 11%;
  border-radius: 12px;
  background:
    linear-gradient(var(--lime), var(--lime)) left top / 24px 3px no-repeat,
    linear-gradient(var(--lime), var(--lime)) left top / 3px 24px no-repeat,
    linear-gradient(var(--lime), var(--lime)) right top / 24px 3px no-repeat,
    linear-gradient(var(--lime), var(--lime)) right top / 3px 24px no-repeat,
    linear-gradient(var(--lime), var(--lime)) left bottom / 24px 3px no-repeat,
    linear-gradient(var(--lime), var(--lime)) left bottom / 3px 24px no-repeat,
    linear-gradient(var(--lime), var(--lime)) right bottom / 24px 3px no-repeat,
    linear-gradient(var(--lime), var(--lime)) right bottom / 3px 24px no-repeat;
  content: "";
  opacity: .9;
  pointer-events: none;
}

#camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  letter-spacing: .01em;
}

#camera-placeholder b {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(217, 233, 159, .5);
  border-radius: 18px;
  background: rgba(217, 233, 159, .1);
  color: var(--lime);
  font-size: 31px;
  font-weight: 500;
}

button {
  min-height: 50px;
  padding: 12px 17px;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(79, 126, 99, .32);
  outline-offset: 2px;
}

.primary {
  width: 100%;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  font-weight: 720;
}

.primary:hover { background: var(--green-dark); }
.primary:disabled { opacity: .58; cursor: wait; }

.quiet {
  border: 1px solid #dbe4d8;
  background: #fff;
  color: #385b4c;
  font-weight: 650;
}

.quiet:hover { border-color: #bacbbd; background: #f8faf6; }
.heading-row .quiet { min-height: 44px; }
.full { width: 100%; }

label {
  display: block;
  margin: 15px 0;
  color: #506258;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}

input, select {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #d8e1d5;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

input::placeholder { color: #a0aaa1; }

.message {
  min-height: 22px;
  margin: 10px 0;
  color: #627469;
  font-size: 13px;
  line-height: 1.45;
}

.manual-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid #edf0e9;
}

.manual-form label { min-width: 0; margin: 0; }
.manual-form button { min-width: 160px; }

.photo-note {
  margin: 5px 0 0;
  color: #87938a;
  font-size: 12px;
  text-align: center;
}

.idle-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: start;
  gap: 15px;
  padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid #e7ebdf;
  border-radius: 18px;
  background: linear-gradient(145deg, #fbfcf8, #f4f7ef);
}

.idle-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid #e2e9d7;
  border-radius: 15px;
  background: #fff;
  color: var(--green);
  font-size: 25px;
}

.eyebrow {
  color: #789064;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.idle-card h2 { margin: 6px 0 7px; font-size: 19px; }
.idle-card p { margin: 0; font-size: 14px; }

.idle-note {
  grid-column: 1 / -1;
  padding-top: 13px;
  border-top: 1px solid #e5eadf;
  color: #708078;
  font-size: 12px;
  line-height: 1.45;
}

.student-card, .result-card {
  margin-top: 12px;
  padding: clamp(17px, 2vw, 24px);
  border: 1px solid #e6eadf;
  border-radius: 18px;
  background: #f8f9f5;
}

.student-card > b {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf4e5;
  color: #557b36;
  font-size: 12px;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.student-card p, .result-card p { margin: 6px 0; }
.student-card .primary { min-height: 58px; margin-top: 12px; font-size: 16px; }
.student-card .quiet { width: 100%; margin-top: 8px; }
.result-card .primary { margin-top: 12px; }
.eligible { color: #557b36; }

.denied {
  border-color: #f0d9cb;
  background: #fff8f4;
  color: #985336;
}

.approved {
  border-color: #dbe9c7;
  background: #f4f8ec;
  color: #44672b;
}

.error { color: #a74730; }
footer { margin: 22px 0 0; color: #8b9689; font-size: 12px; text-align: center; }

@media (min-width: 600px) and (min-height: 600px) {
  body.kiosk-ready {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .kiosk-ready .shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
    max-width: 1440px;
    flex-direction: column;
    overflow: hidden;
    padding: 10px clamp(18px, 3vw, 40px);
  }

  .kiosk-ready .intro, .kiosk-ready footer { display: none; }

  .kiosk-ready .brand {
    height: 58px;
    min-height: 58px;
    flex: 0 0 58px;
    padding: 4px 0 9px;
  }

  .kiosk-ready .brand img { width: 190px; max-height: 40px; }
  .kiosk-ready .brand span { padding: 7px 11px; font-size: 12px; }

  .kiosk-ready .panel {
    min-height: 0;
    flex: 1;
    overflow: hidden;
    margin: 10px 0 0;
    padding: 10px clamp(14px, 2vw, 28px);
    border-radius: 22px;
  }

  .kiosk-ready .heading-row {
    height: 62px;
    min-height: 62px;
    padding: 0 2px 10px;
  }

  .kiosk-ready .heading-row h1 { font-size: 22px; }
  .kiosk-ready .heading-row p { margin: 4px 0 0; font-size: 13px; }

  .kiosk-ready .kiosk-grid {
    display: grid;
    height: calc(100% - 62px);
    min-height: 0;
    grid-template-columns: minmax(250px, min(42vw, 40vh)) minmax(0, 1fr);
    align-items: start;
    gap: clamp(16px, 2.5vw, 34px);
    padding-top: 10px;
  }

  .kiosk-ready .scan-column {
    display: flex;
    width: min(42vw, 40vh);
    max-height: 100%;
    flex-direction: column;
    justify-content: flex-start;
  }

  .kiosk-ready .camera-box {
    width: 100%;
    height: min(42vw, 40vh);
    min-height: 0;
    max-height: none;
    margin: 4px auto 10px;
    aspect-ratio: auto;
    border-radius: 20px;
  }

  .kiosk-ready .camera-box #camera-placeholder { border-radius: 20px; }
  .kiosk-ready .scan-column label { margin: 2px 0 7px; font-size: 12px; }
  .kiosk-ready .scan-column select { min-height: 42px; margin-top: 5px; padding: 8px 11px; font-size: 14px; }
  .kiosk-ready #camera-start { min-height: 48px; padding: 9px 14px; }
  .kiosk-ready #camera-message { min-height: 20px; margin: 6px 0; font-size: 12px; }
  .kiosk-ready #qr-photo-button { min-height: 42px; padding: 8px 12px; }
  .kiosk-ready .photo-note { margin: 4px 0 0; font-size: 10px; }

  .kiosk-ready .checkin-column {
    display: flex;
    max-height: 100%;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
  }

  .kiosk-ready .manual-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 0 12px;
    padding: 0 0 14px;
    border-bottom: 1px solid #edf0e9;
  }

  .kiosk-ready .manual-form input { min-height: 48px; }
  .kiosk-ready .manual-form button { min-width: 142px; min-height: 48px; }
  .kiosk-ready .student-card, .kiosk-ready .result-card { margin-top: 8px; padding: 16px; }
  .kiosk-ready .idle-card { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 19px; }
  .kiosk-ready .idle-icon { width: 42px; height: 42px; border-radius: 13px; font-size: 22px; }
  .kiosk-ready .idle-card h2 { font-size: 19px; }
  .kiosk-ready .idle-card p { font-size: 13px; }
  .kiosk-ready .idle-note { font-size: 11px; }
  .kiosk-ready .student-card h2, .kiosk-ready .result-card h2 { font-size: 21px; }
  .kiosk-ready .student-card p, .kiosk-ready .result-card p { font-size: 14px; }
  .kiosk-ready .student-card .primary { min-height: 54px; }
  .kiosk-ready .student-card .quiet, .kiosk-ready .result-card .primary { min-height: 46px; }
}

@media (max-width: 639px) {
  .shell { padding: 16px 15px 24px; }
  .brand { min-height: 58px; gap: 12px; }
  .brand img { width: min(48vw, 185px); max-height: 46px; }
  .brand span { padding: 7px 10px; font-size: 11px; }
  .panel { margin: 14px 0; padding: 20px 17px; border-radius: 20px; }
  .heading-row { align-items: flex-start; }
  .heading-row .quiet { min-height: 42px; padding: 9px 12px; }
  .manual-form { grid-template-columns: 1fr; gap: 8px; }
  .manual-form button { width: 100%; }
}

@media (min-width: 600px) and (min-height: 600px) and (orientation: landscape) {
  .kiosk-ready .kiosk-grid {
    grid-template-columns: minmax(280px, min(44vw, 46vh)) minmax(0, 1fr);
    gap: clamp(22px, 3vw, 40px);
  }

  .kiosk-ready .scan-column { width: min(44vw, 46vh); }
  .kiosk-ready .camera-box { height: min(44vw, 46vh); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.practice-preview{padding:12px;border:2px solid #afc48c;border-radius:14px;background:#f5f8eb;margin:0 0 10px}.practice-preview p{font-size:13px;margin:6px 0}.practice-preview .primary{min-height:44px;padding:10px}.checkin-column:has(.practice-preview){overflow-y:auto;max-height:calc(100vh - 140px)}

.teaching-alternative{margin-top:8px}.teaching-alternative summary{cursor:pointer;padding:12px;color:#6e7e65;font-size:13px}.practice-preview+.quiet{width:100%}
