:root{font-family:"Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif;color:#253451;background:#f4f5f7;font-synthesis:none;--yellow:#ffc13e;--ink:#253451;--muted:#687793;--mint:#eaf9f5;--line:#e8e3d7}*{box-sizing:border-box}body{margin:0;min-width:280px;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:28px 16px}button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid #34858c;outline-offset:3px}button:disabled{cursor:default;opacity:.5}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}.kiosk{width:100%;max-width:480px;background:linear-gradient(155deg,#fffdf6,#fffaf0);border:1px solid #eee4ce;border-radius:28px;padding:20px;box-shadow:0 12px 50px #2534510b}.brand{position:relative;overflow:hidden;isolation:isolate;background:linear-gradient(115deg,#fff6d1,#fff0af);border-radius:20px;padding:18px 15px 21px;text-align:center}.brand:before,.brand:after{content:"";position:absolute;z-index:-1;border-radius:50%;width:145px;height:100px;transform:rotate(-25deg)}.brand:before{background:linear-gradient(30deg,#ffdbd3,#ffd0d2);top:-64px;left:-32px}.brand:after{background:linear-gradient(30deg,#ffe08988,#ffdb6588);bottom:-70px;right:-30px}.brand-top{display:flex;justify-content:space-between;margin-bottom:15px}.brand-label{font-size:10px;letter-spacing:.08em;color:#7b775c;font-weight:700}.brand h1{margin:0;font-size:clamp(27px,7.1vw,36px);font-weight:900;letter-spacing:-1.7px;line-height:1.3;overflow-wrap:anywhere}.brand-sub{display:flex;align-items:center;justify-content:center;gap:9px;margin:10px 0 0;font-size:clamp(17px,4.5vw,22px);font-weight:800;letter-spacing:-.8px}.brand-sub svg{width:36px;height:36px;fill:none;stroke:#ffb323;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.brand-sub svg .heart{fill:#ffbd2f;stroke:none;transform:scale(.66);transform-origin:center}.screen{padding:22px 2px 4px}h2{font-size:25px;line-height:1.45;letter-spacing:-.9px;margin:0;font-weight:800}p{line-height:1.65}.section-heading{text-align:center;margin-bottom:24px}.eyebrow{display:block;font-size:12px;color:#54898a;font-weight:700;letter-spacing:.03em;margin-bottom:7px}.section-heading p{font-size:14px;color:var(--muted);margin:9px 0 0}label{display:block;font-size:14px;font-weight:700;margin:0 0 9px}input{width:100%;height:54px;border:1px solid #dedfdc;border-radius:12px;background:#fff;padding:0 15px;color:var(--ink);font-size:16px;min-width:0}input::placeholder{color:#929aaa;font-size:14px}input:disabled{background:#f1f2ef}#login-id,#login-password{margin-bottom:19px}.verification-heading{display:flex;justify-content:space-between;align-items:center}.otp-timer{color:#b35d28;font-size:13px;font-variant-numeric:tabular-nums}.verification-row{display:flex;gap:8px}.verification-row input{flex:1}.button-outline{border:1px solid #e3b853;border-radius:12px;background:#fff8df;color:#705622;font-size:13px;font-weight:700;padding:0 12px;min-width:114px}.field-help{font-size:12px;color:var(--muted);margin:9px 0 0;min-height:20px}.form-message{color:#b54040;font-size:13px;min-height:21px;margin:8px 0 12px}.button-primary{width:100%;border:0;border-radius:13px;min-height:60px;background:linear-gradient(110deg,#ffca4f,#ffbd32);color:var(--ink);font-weight:800;font-size:20px;padding:14px 12px;line-height:1.4}.login-note{display:flex;gap:7px;margin:21px 0 0;padding:15px 0 1px;border-top:1px solid var(--line);color:var(--muted);font-size:11px}.login-note p{margin:0}.keypad-title{text-align:center;font-size:17px;font-weight:600;color:var(--muted);margin:0 0 13px}.code-display{height:62px;border:1px solid #b6e6de;background:linear-gradient(100deg,#e9faf5,#f0fbf7);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#4e627e;font-weight:700;font-size:27px;letter-spacing:10px;padding-left:10px}.code-placeholder{font-size:14px;font-weight:400;letter-spacing:0;padding-right:10px;color:#8a9d9f}.keypad-error{min-height:21px;margin:7px 0;color:#b54040;text-align:center;font-size:12px}.keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.keypad button{height:66px;border:1px solid #eae3d5;border-radius:12px;background:#fff;box-shadow:0 2px 4px #d1bf9410;color:var(--ink);font-size:29px;font-weight:800}.keypad button.key-text{font-size:14px;letter-spacing:-.5px}.confirm-button{margin-top:12px;min-height:64px;font-size:23px}.screen-help{font-size:12px;color:var(--muted);text-align:center;min-height:20px;margin:14px 0 0}.result-screen,.expired-screen{text-align:center;padding-top:34px}.result-symbol{display:flex;align-items:center;justify-content:center;background:#cef5e4;width:84px;height:84px;border-radius:50%;margin:0 auto 23px;font-size:52px;line-height:1;font-weight:700;color:#344c77}.result-symbol.warning{background:#fff0b7}.result-symbol.error{background:#ffd9d4}.result-symbol.repeat{background:#e1f5ef;color:#55999a}.result-child{font-size:22px;font-weight:800;margin:13px 0 0}.result-time{font-size:36px;letter-spacing:-1px;font-weight:900;color:#354ea0;margin:3px 0 0;font-variant-numeric:tabular-nums}.result-description{color:var(--muted);font-size:16px;white-space:pre-line;margin:15px 0 29px;overflow-wrap:anywhere}.result-screen h2{overflow-wrap:break-word}.expired-screen .result-description{margin:24px 0 32px}.expired-screen .button-primary{margin-top:14px}.result-screen .screen-help{margin-top:15px}footer{display:flex;align-items:center;justify-content:center;gap:6px;color:#929997;font-size:10px;letter-spacing:.02em;margin:23px 0 1px}.footer-dot{width:5px;height:5px;border-radius:50%;background:#aac8bd}.demo-banner{padding:8px;text-align:center;font-size:11px;color:#775a18;background:#fff0bb;border-radius:10px;margin-bottom:12px}.loading-screen{text-align:center;min-height:340px;padding-top:90px}.loading-screen h2{font-size:20px;margin:22px 0 8px}.loading-screen p{font-size:14px;color:var(--muted)}.spinner{display:block;width:35px;height:35px;border-radius:50%;border:3px solid #f3e6bd;border-top-color:#d99c29;margin:auto;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:520px){body{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#fffcf4;align-items:flex-start}.kiosk{border:0;box-shadow:none;border-radius:0;padding:8px;width:100%}.brand{padding:14px 12px 19px}.brand-top{margin-bottom:11px}.screen{padding-top:22px}.keypad button{height:clamp(54px,8.5dvh,76px)}}@media(max-height:710px) and (min-width:521px){body{padding:12px}.kiosk{padding:14px;max-width:430px}.brand{padding:9px 14px 13px}.brand-top{margin-bottom:4px}.brand h1{font-size:28px}.brand-sub{font-size:18px;margin-top:4px}.screen{padding-top:16px}.keypad button{height:52px}.code-display{height:50px}footer{margin-top:13px}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}}

/* 긴 번호는 마스킹 상태로 내부 스크롤하며 카드 너비를 늘리지 않습니다. */
.code-display{justify-content:flex-start;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:thin}.code-display>span{margin-inline:auto;flex-shrink:0;padding-inline:14px}.code-display>.code-placeholder{padding-inline:0}


/* 표시 영역의 높이에 맞춰 배치하며, 공간이 부족하면 본문 안에서 스크롤합니다. */
html{height:100%}
body{
  --viewport-space:clamp(4px,1.4dvh,16px);
  min-width:0;min-height:0;height:100vh;height:100dvh;align-items:center;
  padding:max(var(--viewport-space),env(safe-area-inset-top)) max(var(--viewport-space),env(safe-area-inset-right)) max(var(--viewport-space),env(safe-area-inset-bottom)) max(var(--viewport-space),env(safe-area-inset-left));
}
.kiosk{height:100%;max-height:100%;min-height:0;min-width:0;display:flex;flex-direction:column;padding:clamp(6px,1.4dvh,20px)}
.brand{flex:0 0 auto;padding:clamp(6px,1.1dvh,18px) clamp(10px,2vw,15px)}
.brand-top{margin-bottom:clamp(3px,.6dvh,12px)}
.brand-label{font-size:clamp(9px,1.5dvh,10px)}
.brand h1{font-size:clamp(22px,4dvh,36px);line-height:1.2}
.brand-sub{font-size:clamp(15px,2.8dvh,22px);line-height:1.25;margin-top:clamp(3px,.6dvh,10px)}
.brand-sub svg{width:clamp(22px,4.5dvh,36px);height:clamp(22px,4.5dvh,36px)}
.screen{flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;padding:clamp(6px,1.1dvh,22px) 2px 0;scroll-padding:8px}
h2{font-size:clamp(18px,3.3dvh,25px);line-height:1.25}
h2[tabindex="-1"]:focus{outline:none}
.section-heading{margin-bottom:clamp(6px,1.2dvh,20px)}
.eyebrow{font-size:clamp(10px,1.7dvh,12px);line-height:1.2;margin-bottom:3px}
.section-heading p{font-size:clamp(11px,1.9dvh,14px);line-height:1.3;margin:4px 0 0}
label{font-size:clamp(12px,2dvh,14px);line-height:1.2;margin-bottom:4px}
input{height:clamp(36px,6dvh,54px);font-size:16px}
#login-id,#login-password{margin-bottom:clamp(5px,1dvh,16px)}
.verification-row{gap:6px}
.field-help{font-size:clamp(10px,1.7dvh,12px);line-height:1.3;min-height:0;margin:4px 0 0}
.form-message{font-size:12px;line-height:1.3;min-height:0;margin:4px 0}
.form-message:empty,.keypad-error:empty{display:none}
.button-primary{min-height:44px;padding:8px 10px;font-size:clamp(17px,3dvh,20px);line-height:1.25}
#login-button{margin-top:6px}
.login-note{align-items:center;font-size:clamp(9px,1.6dvh,11px);line-height:1.3;margin-top:clamp(4px,.8dvh,12px);padding:clamp(4px,.8dvh,12px) 0 0}
.login-note p{line-height:1.3;min-width:0}
#test-login-button{flex:0 0 auto;min-height:36px;padding:6px 8px;font-size:12px}
.demo-banner{display:none}
footer{flex:0 0 auto;margin:clamp(4px,.8dvh,16px) 0 0;font-size:9px;line-height:1.25}

/* 키패드 네 줄이 남은 높이를 나눠 사용하고 확인 버튼까지 표시합니다. */
.keypad-title{font-size:clamp(15px,2.5dvh,17px);line-height:1.3;margin-bottom:6px}
#keypad-screen{display:flex;flex-direction:column}
#keypad-screen>*{flex-shrink:0}
.code-display{height:clamp(40px,7.5dvh,62px);margin-bottom:6px;font-size:clamp(22px,4dvh,27px)}
.keypad-error{min-height:0;margin:0 0 6px;font-size:11px;line-height:1.3}
#keypad{flex:1 0 178px;min-height:178px;grid-template-rows:repeat(4,minmax(40px,1fr));gap:6px}
.keypad button{height:auto;min-height:40px;font-size:clamp(22px,4dvh,29px)}
.keypad button.key-text{font-size:clamp(11px,2dvh,14px)}
.confirm-button{min-height:44px;margin-top:6px;font-size:clamp(18px,3.5dvh,23px)}
.screen-help{min-height:0;font-size:clamp(10px,1.7dvh,12px);line-height:1.3;margin:6px 0 0}
.result-screen,.expired-screen{padding-top:clamp(8px,3dvh,34px)}
.result-symbol{width:clamp(48px,10dvh,84px);height:clamp(48px,10dvh,84px);font-size:clamp(30px,6dvh,52px);margin-bottom:clamp(8px,2dvh,23px)}
.result-child{font-size:clamp(18px,3dvh,22px);line-height:1.3;margin-top:8px;overflow-wrap:anywhere}
.result-time{font-size:clamp(26px,4.8dvh,36px);line-height:1.3}
.result-description,.expired-screen .result-description{font-size:clamp(13px,2.2dvh,16px);line-height:1.4;margin:clamp(8px,1.5dvh,24px) 0 clamp(10px,2dvh,29px)}
.expired-screen .button-primary{margin-top:0}
.result-screen .screen-help{margin-top:6px}
.loading-screen{min-height:0;padding-top:clamp(20px,10dvh,90px)}
.loading-screen h2{font-size:clamp(17px,3dvh,20px);margin:12px 0 6px}
.loading-screen p{font-size:clamp(12px,2dvh,14px)}

/* 낮은 화면에서는 로그인 라벨과 입력칸을 나란히 배치해 세로 공간을 확보합니다. */
@media(max-height:700px){
  .section-heading{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);column-gap:8px;text-align:left}
  .section-heading .eyebrow{grid-column:1;grid-row:1}
  .section-heading h2{grid-column:1;grid-row:2}
  .section-heading p{grid-column:2;grid-row:1 / 3;align-self:center;margin:0}
  #login-form{display:grid;grid-template-columns:64px minmax(0,1fr);gap:5px 8px;align-items:center}
  #login-form>label,#login-id,#login-password{margin:0}
  #login-form>.verification-heading,#login-form>.verification-row,#login-form>.field-help,#login-form>.form-message,#login-form>.button-primary{grid-column:1 / -1;margin:0}
  .verification-heading label{margin:0}
}
@media(max-height:600px){
  #keypad{flex-basis:156px;min-height:156px;grid-template-rows:repeat(4,minmax(36px,1fr));gap:4px}
  .keypad button{min-height:36px}
  .confirm-button{min-height:40px}
}

/* 가로 화면에서는 헤더와 본문을 나란히 배치하고, 안내 문구와 기능은 유지합니다. */
@media(max-height:500px) and (min-width:560px){
  .kiosk{max-width:960px;display:grid;grid-template-columns:minmax(145px,.7fr) minmax(0,1.3fr);grid-template-rows:auto minmax(0,1fr) auto;column-gap:14px}
  .demo-banner{grid-column:1 / -1;grid-row:1}
  .brand{grid-column:1;grid-row:2;align-self:center}
  .screen{grid-column:2;grid-row:2;height:100%;padding-top:0}
  footer{grid-column:1 / -1;grid-row:3}
  .brand h1{font-size:clamp(20px,3.5vw,28px)}
  .brand-sub{font-size:15px;gap:5px}
  .brand-sub svg{width:22px;height:22px}
}

