/* =========================================================
   루디스영어학원 · 신입생 온보딩
   공통 스타일시트 (index / student / parent)
   ========================================================= */

:root {
  --navy: #0e2138;
  --navy-2: #1a3352;
  --navy-3: #2a4463;
  --red: #c62828;
  --red-dark: #a01f1f;
  --red-soft: #fdeceb;
  --green: #1b7a52;
  --blue: #2a6fb3;
  --ink: #16212f;
  --ink-2: #37475a;
  --muted: #5f6f81;
  --line: #e3e8ef;
  --line-2: #eef1f6;
  --bg: #f4f6f9;
  --card: #ffffff;
  --accent: #2a6fb3;
  --accent-soft: #eaf2fb;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 51, .06), 0 2px 8px rgba(16, 32, 51, .04);
  --shadow: 0 2px 6px rgba(16, 32, 51, .06), 0 12px 28px rgba(16, 32, 51, .07);
  --shadow-lg: 0 8px 20px rgba(16, 32, 51, .10), 0 24px 50px rgba(16, 32, 51, .10);
  --max: 720px;
}

/* 페이지별 톤 */
body.landing { --accent: #c62828; --accent-soft: #fdeceb; }
body.student { --accent: #2a6fb3; --accent-soft: #eaf2fb; }
body.parent  { --accent: #0e2138; --accent-soft: #eaeef4; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 50% -180px, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(600px 300px at 100% 0%, rgba(198, 40, 40, .05) 0%, rgba(198, 40, 40, 0) 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* ---------- 레이아웃 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

main { padding-bottom: 40px; }

.stack > * + * { margin-top: 14px; }

/* ---------- 헤더 ---------- */
.topbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line-2);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -.01em;
  min-height: 44px;
}

.brand-logo {
  height: 28px;
  width: auto;
  /* 로고는 투명 배경 PNG → 별도 배경 없이 그대로 사용 */
}

.brand-name { font-size: 15px; }

.brand-fallback {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.brand-fallback[hidden] { display: none; }

.topbar-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 10px;
}

.topbar-link:hover { color: var(--navy); background: var(--line-2); }

/* ---------- 랜딩 히어로 ---------- */
.hero {
  position: relative;
  margin-top: 18px;
  padding: 30px 22px 28px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(420px 220px at 88% -10%, rgba(198, 40, 40, .40) 0%, rgba(198, 40, 40, 0) 68%),
    radial-gradient(360px 260px at 0% 110%, rgba(42, 111, 179, .38) 0%, rgba(42, 111, 179, 0) 70%),
    linear-gradient(160deg, #12283f 0%, #0b1a2c 60%, #0a1521 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: .5;
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  background: rgba(198, 40, 40, .92);
  box-shadow: 0 6px 16px rgba(198, 40, 40, .28);
}

.hero h1 {
  margin: 16px 0 10px;
  font-size: 25px;
  line-height: 1.4;
  letter-spacing: -.02em;
  font-weight: 800;
}

.hero h1 span { color: #ffd9d7; }

.hero p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: rgba(255, 255, 255, .80);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-meta span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, .06);
}

/* ---------- 섹션 제목 ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 30px 0 12px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--navy);
}

.section-title small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

/* ---------- 강점 배지 ---------- */
.badge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 560px) {
  .badge-grid { grid-template-columns: 1fr 1fr; }
}

.badge-card {
  display: flex;
  gap: 12px;
  padding: 15px 15px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.badge-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 11px;
  background: var(--accent-soft);
}

.badge-card h3 {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--navy);
}

.badge-card p {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.62;
  color: var(--muted);
}

/* ---------- 선택 카드 ---------- */
.choice-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .choice-cards { grid-template-columns: 1fr 1fr; }
}

.pick-card {
  position: relative;
  display: block;
  padding: 20px 18px 18px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  min-height: 132px;
}

.pick-card:hover,
.pick-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(198, 40, 40, .35);
  outline: none;
}

.pick-card:focus-visible { box-shadow: 0 0 0 3px rgba(198, 40, 40, .22), var(--shadow); }

.pick-card .pick-emoji { font-size: 26px; line-height: 1; }

.pick-card h3 {
  margin: 10px 0 4px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--navy);
}

.pick-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.pick-card .pick-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--red);
}

.pick-card.navy .pick-go { color: var(--navy); }
.pick-card.navy:hover { border-color: rgba(14, 33, 56, .4); }

.pick-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pick-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--line-2);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

/* ---------- 이용 순서 ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  counter-reset: step;
}

@media (min-width: 600px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  position: relative;
  padding: 16px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  background: var(--navy);
  margin-bottom: 8px;
}

.step:nth-child(1) .step-num { background: var(--green); }
.step:nth-child(2) .step-num { background: var(--blue); }
.step:nth-child(3) .step-num { background: var(--red); }

.step h4 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}

.step p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- 진행률 바 ---------- */
.progress-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 246, 249, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.progress-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9px 18px 10px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.progress-meta strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e7ee;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a6fb3 0%, #1b7a52 55%, #c62828 100%);
  transition: width .32s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 폼 카드 ---------- */
.form-intro {
  margin: 18px 0 0;
  padding: 16px 17px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.form-intro h1 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--navy);
  line-height: 1.4;
}

.form-intro p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

.form-intro .req-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.req-note b { color: var(--red); }

.card {
  margin-top: 14px;
  padding: 18px 17px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 92px;
}

body.student .card { border-radius: 20px; box-shadow: 0 1px 2px rgba(16,32,51,.05), 0 10px 24px rgba(42,111,179,.07); }
body.parent .card { border-radius: 12px; }

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}

.card-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  font-variant-numeric: tabular-nums;
}

body.student .card-num { border-radius: 50%; background: linear-gradient(135deg, #2a6fb3, #1b7a52); }
body.parent .card-num { border-radius: 8px; background: var(--navy); }

.card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--navy);
  line-height: 1.4;
}

.card-head .card-sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- 필드 ---------- */
.field + .field { margin-top: 16px; }

.field > label,
.field > .label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: -.01em;
}

.req {
  display: inline-block;
  margin-left: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: var(--red);
  border-radius: 5px;
  padding: 1px 5px;
  vertical-align: 2px;
}

.hint {
  display: block;
  margin: -2px 0 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: #fbfcfe;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  -webkit-appearance: none;
  appearance: none;
}

textarea { min-height: 84px; resize: vertical; }

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235f6f81' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

input::placeholder, textarea::placeholder { color: #9aa7b6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(42, 111, 179, .14);
}

body.parent input:focus,
body.parent select:focus,
body.parent textarea:focus { box-shadow: 0 0 0 3.5px rgba(14, 33, 56, .13); }

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #d93b30;
  background: #fffafa;
}

.field.invalid input:focus,
.field.invalid select:focus,
.field.invalid textarea:focus { box-shadow: 0 0 0 3.5px rgba(217, 59, 48, .15); }

.error {
  display: none;
  margin: 7px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #c62828;
  line-height: 1.5;
}

.field.invalid .error { display: block; }

/* ---------- 선택 칩 ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.chip {
  min-height: 40px;
  padding: 8px 13px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

.chip:active { transform: scale(.97); }

.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 카드형 라디오 ---------- */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 540px) {
  .choice-grid.two-col { grid-template-columns: 1fr 1fr; }
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.choice-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

body.student .choice-body { border-radius: 14px; }
body.parent .choice-body { border-radius: 9px; }

.choice-num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--line-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  transition: all .16s ease;
}

.choice:hover .choice-body { border-color: #cbd6e2; background: #fff; }

.choice input:checked + .choice-body {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
  color: var(--navy);
  font-weight: 700;
}

.choice input:checked + .choice-body .choice-num {
  background: var(--accent);
  color: #fff;
}

.choice input:focus-visible + .choice-body {
  outline: 3px solid rgba(42, 111, 179, .35);
  outline-offset: 2px;
}

body.parent .choice input:focus-visible + .choice-body { outline-color: rgba(14, 33, 56, .3); }

.field.invalid .choice-body { border-color: #e8b0ac; }

/* ---------- 체크박스 ---------- */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 48px;
  padding: 11px 4px;
  cursor: pointer;
  font-size: 13.8px;
  line-height: 1.6;
  color: var(--ink-2);
}

.check-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

.check-row input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(42, 111, 179, .35);
  outline-offset: 2px;
}

.check-row b { color: var(--navy); }

/* 서약 강조 */
.pledge {
  padding: 4px 14px;
  border-radius: 14px;
  border: 1.5px dashed rgba(198, 40, 40, .45);
  background: linear-gradient(180deg, #fff 0%, #fff8f7 100%);
}

.pledge .check-row { font-size: 14.5px; font-weight: 700; color: var(--navy); }

/* ---------- 토글 스위치 ---------- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(14, 33, 56, .1);
}

.switch {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  width: 100%;
  justify-content: space-between;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: #c3ccd8;
  transition: background .2s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 32, 51, .3);
  transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}

.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(42, 111, 179, .35); outline-offset: 2px; }

/* ---------- 안내 박스 ---------- */
.notice {
  padding: 14px 15px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  font-size: 13.2px;
  line-height: 1.7;
  color: var(--ink-2);
}

.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }
.notice ul { margin: 0; padding-left: 17px; }
.notice li + li { margin-top: 5px; }

.notice.highlight {
  background: linear-gradient(180deg, #fff6f5 0%, #fff 100%);
  border: 1.5px solid rgba(198, 40, 40, .3);
}

.notice.navy {
  background: linear-gradient(180deg, #f3f6fa 0%, #fff 100%);
  border: 1.5px solid rgba(14, 33, 56, .16);
}

.notice .notice-title {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.notice.highlight .notice-title { color: var(--red-dark); }

.notice .small { font-size: 12px; color: var(--muted); }

.price-emph {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--red-dark);
  letter-spacing: -.01em;
}

/* ---------- 표 ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
  min-width: 300px;
}

table.table caption {
  caption-side: top;
  text-align: left;
  font-size: 12.5px;
  color: var(--muted);
  padding: 0 0 7px;
}

table.table th,
table.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  vertical-align: middle;
}

table.table thead th {
  background: #f5f7fa;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.01em;
  white-space: nowrap;
}

table.table tbody tr:last-child td { border-bottom: 0; }

table.table td.amount {
  text-align: right;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- 접이식 details ---------- */
details.fold {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  overflow: hidden;
}

details.fold + details.fold { margin-top: 8px; }

details.fold > summary {
  min-height: 48px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.8px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

details.fold > summary::-webkit-details-marker { display: none; }

details.fold > summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  transition: transform .2s ease;
}

details.fold[open] > summary::after { content: "–"; }

details.fold > summary:focus-visible {
  outline: 3px solid rgba(42, 111, 179, .3);
  outline-offset: -3px;
}

details.fold .fold-body {
  padding: 0 15px 14px;
  font-size: 13.2px;
  line-height: 1.72;
  color: var(--ink-2);
  border-top: 1px solid var(--line-2);
  padding-top: 12px;
}

details.fold .fold-body p { margin: 0; }
details.fold .fold-body p + p { margin-top: 7px; }
details.fold .fold-body ol { margin: 0; padding-left: 18px; }
details.fold .fold-body ol li + li { margin-top: 6px; }
details.fold .fold-body .small { font-size: 12px; color: var(--muted); }

/* ---------- 시간 선택 ---------- */
.time-groups[hidden] { display: none; }

.time-group + .time-group { margin-top: 14px; }

.time-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
}

.time-group-title span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--line-2);
  padding: 1px 7px;
  border-radius: 999px;
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

@media (min-width: 480px) {
  .time-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.time {
  position: relative;
  display: block;
  cursor: pointer;
}

.time input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.time span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 6px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  transition: all .15s ease;
  font-variant-numeric: tabular-nums;
}

.time input:checked + span {
  border-color: var(--navy);
  background: #eaeef4;
  color: var(--navy);
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--navy) inset;
}

.time input:focus-visible + span { outline: 3px solid rgba(14, 33, 56, .28); outline-offset: 2px; }

/* ---------- 제출 버튼 ---------- */
.actions {
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #fff;
  background: linear-gradient(180deg, #d23434 0%, #b32222 100%);
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(198, 40, 40, .26);
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
  text-decoration: none;
}

body.student .btn { background: linear-gradient(180deg, #2f7ec8 0%, #235f9d 100%); box-shadow: 0 8px 18px rgba(42, 111, 179, .26); border-radius: 15px; }
body.parent .btn { background: linear-gradient(180deg, #16304c 0%, #0c1c2e 100%); box-shadow: 0 8px 18px rgba(14, 33, 56, .24); border-radius: 10px; }

.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(16, 32, 51, .18); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.995); }
.btn:disabled { cursor: not-allowed; opacity: .82; transform: none; }
.btn:focus-visible { outline: 3px solid rgba(42, 111, 179, .35); outline-offset: 3px; }

.btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}

.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-label { opacity: .9; }

@keyframes spin { to { transform: rotate(360deg); } }

.btn.ghost {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn.ghost:hover { border-color: var(--navy); }

.form-foot {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}

/* ---------- 토스트 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 140%);
  z-index: 90;
  width: calc(100% - 32px);
  max-width: 460px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #1d2a3a;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 12px 30px rgba(11, 22, 36, .34);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.34, 1.3, .64, 1), opacity .25s ease;
}

.toast.show { transform: translate(-50%, 0); opacity: 1; }

.toast.error { background: #a82020; }
.toast.info { background: #1d2a3a; }

/* ---------- 완료 화면 ---------- */
.success {
  margin-top: 22px;
  padding: 34px 22px 30px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise .45s cubic-bezier(.2, .8, .3, 1) both;
}

.success[hidden] { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.success-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b7a52 0%, #2a9d68 100%);
  box-shadow: 0 10px 24px rgba(27, 122, 82, .3);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both .1s;
}

.success-icon svg { width: 36px; height: 36px; }

@keyframes pop {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success h2 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--navy);
}

.success p {
  margin: 0 auto;
  max-width: 380px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--muted);
}

.success .success-meta {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f8fb;
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.65;
}

.success .success-actions {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

@media (min-width: 480px) {
  .success .success-actions { grid-template-columns: 1fr 1fr; }
}

/* ---------- 푸터 ---------- */
.site-foot {
  margin-top: 34px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-foot p {
  margin: 0;
  font-size: 11.8px;
  line-height: 1.75;
  color: var(--muted);
}

.site-foot .foot-brand {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

/* ---------- 유틸 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

html { scroll-behavior: smooth; }

/* ---------- 데스크톱 미세 조정 ---------- */
@media (min-width: 720px) {
  .hero { padding: 38px 34px 34px; }
  .hero h1 { font-size: 30px; }
  .card { padding: 22px 22px 24px; }
  .form-intro { padding: 20px 22px; }
}
