/* ============================================================
   학부모용 화면 — 단정하고 신뢰감 있는 예약 서비스 느낌
   ============================================================ */

[hidden] { display: none !important; }

:root {
  --ink:      #0B1220;
  --ink-2:    #1F2A3C;
  --muted:    #667085;
  --faint:    #98A2B3;

  --accent:   #1A56DB;
  --accent-2: #1140B4;
  --accent-t: #EEF3FF;

  --ok:   #0B7A4B;  --ok-bg:   #ECF8F2;  --ok-line:  #BEE5D2;
  --no:   #B42318;  --no-bg:   #FEF3F2;  --no-line:  #FDA29B;

  --page:    #F3F4F7;
  --surface: #FFFFFF;
  --line:    #E7E9EE;
  --line-2:  #F1F2F5;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 10px;

  --sh-1: 0 1px 2px rgba(11,18,32,.04);
  --sh-2: 0 1px 2px rgba(11,18,32,.04), 0 12px 32px -16px rgba(11,18,32,.18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  background-image:
    radial-gradient(1000px 420px at 50% -240px, #E8EDFA 0%, rgba(232,237,250,0) 70%);
  background-repeat: no-repeat;
  font-family: Pretendard, 'Pretendard Variable', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.011em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }

/* ── 상단 ─────────────────────────────────── */
.site {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-inner {
  max-width: 680px; margin: 0 auto;
  padding: 13px 20px;
  display: flex; align-items: center; gap: 11px;
}
.mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 9px;
  background: linear-gradient(145deg, #23336B, #0B1220);
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.site-name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.site-sub  { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.site-link {
  margin-left: auto; font-size: 13px; color: var(--muted);
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  transition: .15s;
}
.site-link:hover { color: var(--ink); border-color: #D3D7E0; background: #fff; }

.prog { height: 3px; background: var(--line-2); }
.prog-fill {
  height: 100%; width: 25%;
  background: linear-gradient(90deg, #3B6FE8, var(--accent));
  transition: width .45s cubic-bezier(.4,0,.2,1);
}

/* ── 단계 표시 ─────────────────────────────── */
.stepline {
  display: flex; align-items: baseline; gap: 9px;
  padding-top: 30px; padding-bottom: 14px;
}
.stepnum {
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  color: var(--accent); background: var(--accent-t);
  border-radius: 999px; padding: 4px 10px;
  font-variant-numeric: tabular-nums;
}
.steplabel { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }

main.wrap { padding-bottom: 72px; }

/* ── 카드 ─────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 26px 24px;
  margin-bottom: 14px;
}
.card h2 {
  margin: 0 0 6px;
  font-size: 16.5px; font-weight: 700; letter-spacing: -.015em;
  display: flex; align-items: flex-start; gap: 9px;
}
.card h2 > .n {
  width: 22px; height: 22px; flex: none; margin-top: 2px;
  border-radius: 7px; background: var(--ink); color: #fff;
  font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
}
.card .lead { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.card .lead:last-child { margin-bottom: 0; }

.hero-card { padding-top: 24px; }
.hero-card .eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); margin: 0 0 8px;
}
.hero-card p.big { margin: 0 0 16px; font-size: 16px; line-height: 1.68; color: var(--ink-2); }

/* ── 동의서 본문 ───────────────────────────── */
.consent-wrap { position: relative; margin-bottom: 16px; }
.consent-box {
  background: #FBFBFD;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 18px 22px;
  max-height: 210px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.85;
  color: #475467;
  white-space: pre-line;
  scrollbar-width: thin;
}
.consent-box::-webkit-scrollbar { width: 10px; }
.consent-box::-webkit-scrollbar-thumb { background: #DDE0E7; border: 3px solid #FBFBFD; border-radius: 99px; }
.consent-wrap::after {
  content: ''; position: absolute; left: 1px; right: 11px; bottom: 1px; height: 34px;
  background: linear-gradient(transparent, #FBFBFD 82%);
  border-radius: 0 0 var(--r-md) var(--r-md);
  pointer-events: none;
}
.scroll-hint { font-size: 12.5px; color: var(--faint); margin: 8px 2px 0; }

/* ── 동의 선택 ─────────────────────────────── */
.agree-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.agree-row label {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 52px; padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s, background .16s, color .16s, box-shadow .16s;
}
.agree-row input { position: absolute; opacity: 0; pointer-events: none; }
.agree-row label::before {
  content: ''; width: 18px; height: 18px; flex: none;
  border: 1.5px solid #CFD4DE; border-radius: 50%;
  transition: .16s;
}
.agree-row label:hover { border-color: #CBD2DF; background: #FCFCFD; }
.agree-row label:has(input[value="동의"]:checked) {
  border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok);
  box-shadow: 0 0 0 3px rgba(11,122,75,.08);
}
.agree-row label:has(input[value="동의"]:checked)::before {
  background: var(--ok); border-color: var(--ok);
  box-shadow: inset 0 0 0 3px #fff;
}
.agree-row label:has(input[value="미동의"]:checked) {
  border-color: var(--no-line); background: var(--no-bg); color: var(--no);
}
.agree-row label:has(input[value="미동의"]:checked)::before {
  background: var(--no); border-color: var(--no);
  box-shadow: inset 0 0 0 3px #fff;
}
.agree-row label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 알림 ─────────────────────────────────── */
.notice {
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.65;
  border: 1px solid transparent;
}
.notice + .notice, .card + .notice, .notice.mt { margin-top: 12px; }
.notice.warn { background: var(--no-bg); border-color: #FEDCD8; color: #912018; }
.notice.info { background: #F7F9FC; border-color: var(--line); color: #475467; }

/* ── 입력 ─────────────────────────────────── */
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.field > label.q {
  display: block;
  font-size: 14.5px; font-weight: 650;
  margin-bottom: 3px;
}
.field .help { display: block; font-size: 13px; color: var(--muted); margin-bottom: 9px; line-height: 1.55; }
.field .help b { color: var(--ink-2); font-weight: 650; }
.req { color: var(--accent); margin-left: 3px; }

input[type=text], input[type=tel], input[type=date], input[type=time], textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .16s, box-shadow .16s;
  -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: #B6BCC8; }
textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
input:hover, textarea:hover { border-color: #D3D7E0; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(26,86,219,.12);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--no-line); background: #FFFCFC;
}
input[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3.5px rgba(180,35,24,.12);
}
.err {
  display: none; color: var(--no); font-size: 13px; font-weight: 600;
  margin: 7px 0 0; align-items: center; gap: 5px;
}
.err.show { display: flex; }
.err::before { content: '!'; width: 15px; height: 15px; flex: none; border-radius: 50%; background: var(--no); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

/* 선택형 */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row label {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 46px; padding: 0 18px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: .16s;
}
.pill-row input { position: absolute; opacity: 0; pointer-events: none; }
.pill-row label:hover { border-color: #CBD2DF; }
.pill-row label:has(input:checked) {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.pill-row label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 버튼 ─────────────────────────────────── */
.btns { display: flex; gap: 9px; margin-top: 18px; }
.btn {
  flex: 1;
  min-height: 54px;
  border: none; border-radius: var(--r-md);
  font-size: 15.5px; font-weight: 700; font-family: inherit;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background .16s, box-shadow .16s, transform .08s, color .16s;
}
.btn.primary {
  background: var(--ink); color: #fff;
  box-shadow: 0 1px 2px rgba(11,18,32,.18), 0 8px 20px -10px rgba(11,18,32,.5);
}
.btn.primary:hover:not(:disabled) { background: #18233A; }
.btn.primary:active:not(:disabled) { transform: translateY(1px); }
.btn.ghost {
  flex: 0 0 30%;
  background: #fff; color: var(--ink-2);
  border: 1.5px solid var(--line);
}
.btn.ghost:hover { background: #FAFAFC; border-color: #D3D7E0; }
.btn:disabled { background: #E4E7EC; color: #98A2B3; box-shadow: none; cursor: not-allowed; }

/* ── 확인 표 ──────────────────────────────── */
.summary { margin: 0; }
.summary div {
  display: flex; gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
  font-size: 14.5px;
}
.summary div:first-child { border-top: none; padding-top: 4px; }
.summary dt { flex: 0 0 96px; color: var(--muted); font-weight: 500; margin: 0; }
.summary dd { margin: 0; flex: 1; font-weight: 600; }

/* ── 완료 ─────────────────────────────────── */
.done-card { text-align: center; padding-top: 34px; }
.done-mark {
  width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  border: 1px solid var(--ok-line);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 800;
  animation: pop .45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(.55); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.done-card h2 { justify-content: center; font-size: 21px; letter-spacing: -.02em; }
.code-box {
  background: #FAFBFD; border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px; margin: 18px 0 20px;
}
.code-box span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.code-box b { font-size: 25px; font-weight: 750; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.done-card .summary { text-align: left; }

.foot {
  text-align: center; font-size: 12.5px; color: var(--faint);
  margin-top: 26px; line-height: 1.85;
}

@media (max-width: 430px) {
  .card { padding: 22px 18px; border-radius: 15px; }
  .steplabel { font-size: 19px; }
  .agree-row { grid-template-columns: 1fr; }
  .summary dt { flex: 0 0 80px; }
  .site-link { display: none; }
}
