/*
  홈 랜딩(/)의 참가 신청 모달(.edu-modal).
  - 데스크톱(>= 960px): 화면 중앙 640px 모달.
  - 모바일(<= 959px): 아래에서 올라오는 바텀 시트(24px 상단 모서리) + 4단계 좌우 슬라이드(.edu-steps-track).
  landing.*.css 의 기존 .edu-modal 규칙 위에 덮어써서 동작한다.
*/
.edu-modal {
  --ap-acc: #003dff;
  --ap-acc-h: #0033d6;
  --ap-acc-l: #eef2ff;
  --ap-acc-ll: #f5f7ff;
  --step: 0;
}
.edu-modal[data-current-step="0"] { --step: 0; }
.edu-modal[data-current-step="1"] { --step: 1; }
.edu-modal[data-current-step="2"] { --step: 2; }
.edu-modal[data-current-step="3"] { --step: 3; }

.edu-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.edu-only-m, .edu-sheet-handle, .edu-step-top, .edu-step-bar { display: none; }

.edu-q__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.edu-char-count { flex: none; font-size: 13px; color: #8a8696; font-variant-numeric: tabular-nums; }
.edu-textarea { height: auto !important; min-height: 152px; padding: 14px 16px; resize: vertical; line-height: 1.65; color: #212121; }
.edu-input { color: #212121; }

/* 라디오·세부 칩·직접 입력 */
.edu-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.edu-choice-stack { display: flex; flex-direction: column; gap: 10px; }
.edu-field-group { display: flex; flex-direction: column; gap: 10px; }
.edu-opt__rd { flex: none; position: relative; width: 18px; height: 18px; border: 1.5px solid #c9c7d1; border-radius: 50%; background: #fff; transition: border-color .2s, background-color .2s; }
.edu-opt:hover .edu-opt__rd { border-color: var(--ap-acc); }
.edu-opt:has(input:checked), .edu-opt.is-on { border-color: var(--ap-acc); background: var(--ap-acc-ll); }
.edu-opt:has(input:checked) .edu-opt__rd { border-color: var(--ap-acc); background: radial-gradient(circle, #fff 0 3.5px, var(--ap-acc) 4px 100%); }
.edu-opt:has(input:checked) .edu-opt__mk { border-color: var(--ap-acc); background: var(--ap-acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 3.8L4 7L9 1' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center / 10px 8px no-repeat; }
.edu-opt__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.edu-opt__txt small { font-size: 13px; line-height: 1.5; font-weight: 400; color: #8a8696; }
.edu-q.is-err .edu-opt__rd { border-color: #e52929; }

.edu-sub-ctl { margin-top: 10px; }
.edu-field-group > .edu-sub-ctl { margin-top: 0; padding-left: 14px; border-left: 2px solid rgba(0, 61, 255, .35); }
.edu-sub-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px 14px; border-left: 2px solid rgba(0, 61, 255, .35); }
.edu-chip { position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid #dcdbe2; border-radius: 999px; background: #fafafb; color: #4b4857; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.edu-chip input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.edu-chip:hover { border-color: var(--ap-acc); color: #17151f; }
.edu-chip:has(input:checked) { border-color: var(--ap-acc); background: var(--ap-acc); color: #fff; font-weight: 600; }
.edu-chip:has(input:focus-visible) { outline: 2px solid var(--ap-acc); outline-offset: 2px; }
.edu-q.is-err .edu-chip { border-color: rgba(229, 41, 41, .5); }

.edu-step + .edu-step { margin-top: 32px; }
.edu-foot-actions { display: flex; gap: 10px; }
.edu-btn--prev { flex: 0 0 108px; }
.edu-foot-note { margin: 12px 0 0; font-size: 13px; line-height: 1.6; color: #8a8696; text-align: center; }
.edu-foot-note a { color: #4b4857; text-decoration: underline; text-underline-offset: 2px; }
.edu-done__ic svg { color: var(--ap-acc); }

/* ===== 모바일 바텀 시트 + 좌우 스텝 이동 (<= 959px) ===== */
@media (max-width: 959px) {
  .edu-only-d { display: none !important; }
  .edu-only-m { display: block; }

  .edu-modal {
    padding: 0;
    align-items: flex-end;
    justify-content: center;
  }
  .edu-modal__panel {
    width: 100%;
    height: 86svh;
    height: 86dvh;
    max-height: 740px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .42);
    animation: eduSheet .34s cubic-bezier(.22, 1, .36, 1) both;
  }

  .edu-sheet-handle { display: flex; justify-content: center; flex: none; padding: 10px 0 2px; background: #fff; }
  .edu-sheet-handle span { width: 38px; height: 4px; border-radius: 999px; background: #d6d4de; }

  .edu-modal__head { padding: 8px 20px 14px; }
  .edu-modal__title, .edu-modal__sums { display: none; }
  .edu-modal__x { position: static; width: 36px; height: 36px; margin-right: -6px; flex: none; }

  .edu-step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .edu-step-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .edu-step-badge { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--ap-acc-l); color: var(--ap-acc); font-size: 12px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
  .edu-step-heading { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: #17151f; }

  .edu-step-bar { display: block; height: 4px; margin-top: 12px; border-radius: 999px; background: #ecebf0; overflow: hidden; }
  .edu-step-bar span { display: block; height: 100%; width: 25%; border-radius: 999px; background: var(--ap-acc); transition: width .32s cubic-bezier(.22, 1, .36, 1); }
  .edu-modal[data-current-step="0"] [data-edu-step-bar] { width: 25%; }
  .edu-modal[data-current-step="1"] [data-edu-step-bar] { width: 50%; }
  .edu-modal[data-current-step="2"] [data-edu-step-bar] { width: 75%; }
  .edu-modal[data-current-step="3"] [data-edu-step-bar] { width: 100%; }

  .edu-modal__band { margin-top: 10px; padding: 8px 12px; font-size: 12px; }

  .edu-modal__body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
  .edu-modal__body > form { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  .edu-steps-viewport { flex: 1 1 0; min-height: 0; display: flex; overflow: hidden; }
  .edu-steps-track { flex: 1 1 0; display: flex; width: 100%; height: 100%; transform: translateX(calc(var(--step, 0) * -100%)); transition: transform .32s cubic-bezier(.22, 1, .36, 1); will-change: transform; }
  .edu-step { flex: 0 0 100%; width: 100%; height: 100%; margin-top: 0 !important; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px 20px 24px; }

  .edu-notice { margin: 0 0 16px; }
  .edu-q + .edu-q { margin-top: 24px; }
  .edu-choice-grid { gap: 8px; }
  .edu-choice-grid .edu-opt { justify-content: center; gap: 8px; min-height: 52px; padding: 12px 10px; font-size: 15px; }
  .edu-choice-grid .edu-opt__rd { width: 16px; height: 16px; }
  .edu-textarea { min-height: 160px; }

  .edu-modal__foot { flex: none; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .edu-btn--prev { flex: 0 0 96px; padding: 0 18px; }
  .edu-foot-note { margin-top: 10px; font-size: 12px; }
  .edu-done { flex: 1 1 0; padding: 36px 20px calc(28px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .edu-modal__dim, .edu-modal__panel, .edu-steps-track, .edu-step-bar span { transition: none !important; animation: none !important; }
}
