@font-face {
  font-family: "Pretendard Variable";
  src: url("/assets/PretendardVariable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --font-serif-ko: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --navy: #0f2d63;
  --teal: #0e7d88;
  --teal-dark: #096570;
  --ink: #172b49;
  --muted: #65748b;
  --line: #dfe6ed;
  --soft: #f4f7fa;
  --surface: #fff;
  --brand-muted: #c4d3e8;
  --brand-accent: #9ee0e5;
  --warning-bg: #fff7e8;
  --warning-text: #77500d;
  --danger: #a72f31;
  font-family: var(--font-serif-ko);
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible { outline: 3px solid #7fb5d9; outline-offset: 4px; }
[hidden] { display: none !important; }
.kiosk { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.brand-panel { background: var(--navy); color: white; min-width: 0; position: relative; padding: 38px 34px 30px; display: grid; grid-template-rows: auto 1fr auto auto; }
.wordmark { display: block; width: min(210px, 100%); line-height: 0; }
.brand-logo { display: block; width: 100%; height: auto; filter: brightness(0) invert(1); }
.brand-center { text-align: center; align-self: center; padding: 48px 0; }
.brand-eyebrow { color: var(--brand-accent); letter-spacing: 2.5px; font-weight: 560; font-size: 12px; margin-bottom: 18px; }
h1 { font-size: clamp(27px, 3.4vw, 46px); font-weight: 650; letter-spacing: -1.7px; line-height: 1.35; word-break: keep-all; }
.brand-description { margin-top: 19px; font-size: clamp(14px, 1.4vw, 18px); color: var(--brand-muted); line-height: 1.85; word-break: keep-all; }
.compact-break { display: none; }
.steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; list-style: none; padding: 0; margin: 0 0 28px; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--brand-muted); white-space: nowrap; }
.steps li > span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #ffffff45; border-radius: 50%; font-size: 10px; }
.steps li[aria-current="step"] { color: white; font-weight: 650; }
.steps li[aria-current="step"] > span { color: var(--navy); background: var(--brand-accent); border-color: var(--brand-accent); }
.brand-footer { text-align: center; color: var(--brand-muted); font-size: 11px; }
.main-panel { min-width: 0; display: flex; flex-direction: column; gap: 0; padding: 22px clamp(22px, 3.3vw, 48px) 18px; }
.main-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 12px; }
.roster-refresh-button { flex-shrink: 0; white-space: nowrap; }
.connection-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.connection-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.connection-state.is-offline::before { background: #b77c1a; }
.screen { width: 100%; max-width: 440px; margin: auto; padding: 12px 0; }
.section-heading .eyebrow { display: block; color: var(--teal); font-weight: 650; font-size: 12px; margin-bottom: 10px; letter-spacing: .5px; }
h2 { font-size: 24px; line-height: 1.4; letter-spacing: -.8px; font-weight: 670; word-break: keep-all; }
.section-heading p { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.6; word-break: keep-all; }
.section-heading p strong { font-weight: 650; color: var(--navy); }
.text-button { min-height: 44px; padding: 8px 2px; color: var(--muted); background: transparent; border: 0; font-size: 13px; line-height: 1.4; }
.text-button:hover { color: var(--navy); }
.text-button:disabled { opacity: .5; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; padding: 13px 18px; color: #fff; background: var(--teal); border: 0; border-radius: 11px; font-weight: 650; font-size: 16px; line-height: 1.4; }
.primary-button:hover:not(:disabled) { background: var(--teal-dark); }
.primary-button:disabled { color: #768295; background: #e9eef3; }
.input-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 15px; }
.initial-slots { display: flex; gap: 7px; min-width: 0; }
.initial-slot { display: grid; place-items: center; width: 47px; height: 51px; border: 1px solid var(--line); border-radius: 10px; font-size: 25px; font-weight: 600; color: var(--navy); background: var(--soft); }
.initial-slot.is-filled { border-color: var(--navy); background: white; }
.initial-slot.is-next { border-color: var(--teal); border-bottom-width: 3px; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.key { min-height: 48px; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 24px; font-weight: 540; }
.key:hover:not(:disabled), .key:active:not(:disabled) { background: var(--soft); border-color: var(--teal); }
.key:disabled { opacity: .4; }
.key.erase-key { background: var(--soft); font-size: 12px; color: var(--muted); }
.search-button { margin-top: 15px; }
.help-text { font-size: 12px; color: var(--muted); line-height: 1.65; margin-top: 16px; word-break: keep-all; }
.main-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px 12px; margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.main-footer span:first-child { letter-spacing: 1px; font-size: 10px; }
.login-screen { padding-bottom: 34px; }
.login-screen form { margin-top: 32px; }
.login-screen label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.password-field { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: visible; margin-bottom: 16px; }
.password-field:focus-within { border-color: var(--teal); }
.password-field input { flex: 1; min-width: 0; min-height: 52px; padding: 13px 14px; border: 0; border-radius: 10px; background: white; font-size: 16px; color: var(--ink); }
.password-field .text-button { padding: 9px 14px; }
.back-button { margin-bottom: 20px; text-align: left; }
.results { margin-top: 22px; }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.student-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.student-name { font-size: 21px; font-weight: 670; letter-spacing: -.5px; overflow-wrap: anywhere; }
.student-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.student-status { font-size: 11px; color: var(--teal); line-height: 1.45; margin-top: 4px; }
.row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.row-button { min-width: 53px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--teal); border-radius: 9px; background: var(--teal); color: white; font-size: 14px; font-weight: 600; }
.row-button:disabled { border-color: var(--line); background: white; color: #919bab; }
.empty-results { display: flex; flex-direction: column; gap: 12px; padding: 32px 0 18px; font-size: 14px; color: var(--muted); }
.empty-results strong { color: var(--ink); font-size: 19px; }
.confirmation-card { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 36px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--soft); margin: 26px 0 20px; }
.confirmation-card strong { font-size: 34px; font-weight: 670; letter-spacing: -1px; word-break: break-all; }
.action-label { color: var(--teal); font-size: 16px; font-weight: 650; }
.done-screen { text-align: center; }
.done-mark { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; color: white; background: var(--teal); font-size: 34px; margin: 10px auto 24px; }
.receipt { display: flex; flex-direction: column; gap: 16px; margin: 28px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.receipt > div { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.return-timer { color: var(--muted); font-size: 11px; margin-top: 8px; }
.notice, .queue-notice { padding: 12px 14px; border-radius: 9px; background: var(--warning-bg); color: var(--warning-text); font-size: 12px; line-height: 1.6; margin-bottom: 12px; overflow-wrap: anywhere; }
.queue-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-notice .text-button { flex-shrink: 0; color: var(--warning-text); }
.queue-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; gap: 0 10px; }
@media (max-width: 950px) { .queue-notice { align-items: flex-start; flex-direction: column; gap: 0; } .queue-actions { justify-content: flex-start; } }
.conflict-notice { color: var(--warning-text); background: var(--warning-bg); border-radius: 9px; padding: 0 14px; font-size: 12px; margin-bottom: 12px; line-height: 1.65; }
.conflict-notice summary { min-height: 44px; display: list-item; padding-block: 12px; cursor: pointer; }
.conflict-notice ul { margin: 0; padding: 0 0 14px 18px; }
.conflict-notice li + li { margin-top: 9px; }
.error-message { border-left: 3px solid var(--danger); padding: 10px 12px; background: #fff4f4; color: var(--danger); font-size: 13px; line-height: 1.6; margin-bottom: 16px; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 950px) {
  .brand-panel { padding: 30px 24px 24px; }
  .main-panel { padding: 18px 24px 16px; }
  .steps { gap: 14px; }
  .steps li { gap: 5px; font-size: 11px; }
  .steps li > span { width: 23px; height: 23px; }
  .compact-break { display: block; }
  h2 { font-size: 21px; }
  .main-footer { font-size: 10px; }
}

@media (max-width: 700px) {
  .kiosk { grid-template-columns: minmax(0, 1fr); }
  .brand-panel { padding: 22px 22px 20px; }
  .wordmark { width: min(168px, 100%); }
  .brand-center { padding: 32px 0 28px; }
  .brand-eyebrow { font-size: 10px; margin-bottom: 12px; }
  h1 { font-size: 31px; }
  .brand-description { font-size: 14px; margin-top: 12px; }
  .compact-break { display: none; }
  .steps { margin-bottom: 0; gap: 22px; }
  .brand-footer { display: none; }
  .main-panel { padding: 15px 22px 20px; }
  .main-header { margin-bottom: 6px; }
  .screen { padding: 16px 0; }
  .main-footer { margin-top: 20px; }
  .login-screen { padding: 28px 0; }
}

@media (max-width: 360px) {
  .main-panel { padding-inline: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .steps { gap: 14px; }
  .initial-slot { width: 39px; }
  .input-line { gap: 6px; }
  .initial-slots { gap: 5px; }
  .row-button { min-width: 47px; padding-inline: 9px; }
  .row-actions { gap: 4px; }
}

@media (max-height: 760px) and (min-width: 701px) {
  .main-panel { padding-block: 12px; }
  .main-header { margin-bottom: 3px; }
  .screen { padding-block: 5px; }
  .input-line { margin-top: 17px; margin-bottom: 11px; }
  .key { min-height: 44px; font-size: 22px; }
  .keypad { gap: 7px; }
  .help-text { margin-top: 10px; }
  .main-footer { margin-top: 13px; }
  .brand-panel { padding-block: 27px 22px; }
}
