/* 초격차 겨울방학 특강 · 전화 상담 신청 (lab404.my/vacation)
   색·간격·둥글기·움직임은 lab404-design tokens.css 값. 선·테두리 대신 바탕색으로 구분한다. */
@font-face { font-family: Pretendard; src: url("assets/pretendard-ksx.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --font: Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --brand: #fb5a1a; --brand-press: #dd4a10; --brand-text: #c9300f; --brand-soft: #ffede4; --on-brand: #17100c;
  --bg: #ffffff; --bg-2: #f7f5f2; --bg-3: #f0ece7;
  --ink: #211c18; --ink-2: #57504a; --gray: #6f6862; --gray-2: #a39b93;
  --night: #131010; --night-2: #1d1917; --night-3: #2a2522;
  --retry: #c2263f; --retry-soft: #fdecef;
  --r-sm: 12px; --r: 20px; --pill: 999px;
  --sh-3: 0 4px 12px rgba(33, 28, 24, .08), 0 16px 40px rgba(33, 28, 24, .14);
  --ease: cubic-bezier(.35, 0, .35, 1); --ease-in: cubic-bezier(0, 0, .15, 1); --spring: cubic-bezier(.32, .72, 0, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: max(env(safe-area-inset-bottom, 0px), 16px);
}
html.safe { --safe-t: 47px; --safe-b: 34px; }   /* 캡처용: iPhone 13 안전 영역 흉내(?safe=1) */

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg-2); color: var(--ink); font: 400 16px/1.6 var(--font); word-break: keep-all; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
h1, h2, p, dl, dd { margin: 0; }
img { display: block; }
a { color: inherit; }
button { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; text-align: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1[tabindex="-1"]:focus { outline: none; }   /* 화면을 옮길 때 제목에 주는 포커스만 숨긴다 */
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.night { --bg: var(--night); --bg-2: var(--night-2); --bg-3: var(--night-3); --ink: #fff; --ink-2: rgba(255, 255, 255, .64); --gray: rgba(255, 255, 255, .64); --gray-2: rgba(255, 255, 255, .38); --brand-text: #ff8a5c; }

/* 휴대폰에서는 화면 전체, 넓은 화면에서는 가운데 한 줄 */
.stage { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.device { position: relative; width: 430px; height: min(900px, calc(100dvh - 48px)); border-radius: 36px; overflow: hidden; background: var(--bg); box-shadow: var(--sh-3); }
.app { position: absolute; inset: 0; overflow: hidden; }
.screens { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--ink); padding-bottom: calc(56px + 28px + var(--safe-b)); }
.screen.done { padding-bottom: calc(24px + var(--safe-b)); }
@media (max-width: 600px) {
  body { background: #fff; }
  .stage { display: block; padding: 0; }
  .device { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; box-shadow: none; }
}

/* 위 막대: 뒤로(입력 유지) · 과정 이름 · 짧은 진행 표시 */
.nav { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; height: calc(56px + var(--safe-t)); padding: var(--safe-t) 4px 0; background: var(--bg); }
.back { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--pill); transition: background .15s var(--ease); }
.back:active { background: var(--bg-3); transition: none; }
.nav-title { flex: 1; min-width: 0; text-align: center; font: 600 15px/1.2 var(--font); color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-step { flex: none; width: 48px; padding-right: 12px; text-align: right; font: 600 14px/1 var(--font); color: var(--gray); font-variant-numeric: tabular-nums; }
.progress { position: absolute; z-index: 3; left: 0; right: 0; top: calc(56px + var(--safe-t)); height: 2px; opacity: 0; transition: opacity .2s var(--ease); pointer-events: none; }
.progress.on { opacity: 1; }
.progress i { display: block; height: 100%; background: var(--brand); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .3s var(--ease); }

/* 첫 화면: 원본 초격차 표지 · 두 줄 제목 · 상담 신청 하나 */
.cover-page { display: flex; flex-direction: column; }
.cover-img { width: 100%; height: auto; margin-top: var(--safe-t); }
.hero { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px 24px 0; }
.cover { font: 800 clamp(26px, 7.6vw, 32px)/1.25 var(--font); letter-spacing: -.04em; text-wrap: balance; }
.cover-img, .hero { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.hero { animation-delay: .08s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* 한 화면 한 입력 */
.q { padding: 12px 24px 0; }
.q h1 { font: 700 26px/1.36 var(--font); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.sub { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--gray); }
.sub a { color: var(--ink-2); text-underline-offset: 3px; }

/* 과정 고르기: 포스터 · 학년 · 6주 뒤 가져가는 것 */
.rows { display: grid; gap: 8px; padding: 24px 16px 0; }
.course-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 88px; padding: 9px 16px 9px 9px; border-radius: var(--r); background: var(--bg-2); text-align: left; transition: background .15s var(--ease); }
.course-row:active { background: var(--bg-3); transition: none; }
.course-row[aria-pressed="true"] { background: var(--brand-soft); }
.course-row:disabled { opacity: .5; }
.thumb { flex: none; width: 56px; height: 70px; border-radius: 10px; object-fit: cover; background: var(--night); }
.course-row .t { flex: 1; min-width: 0; }
.course-row small { display: block; font: 600 14px/1.4 var(--font); color: var(--gray); }
.course-row strong { display: block; margin-top: 2px; font: 700 17px/1.38 var(--font); letter-spacing: -.02em; }
.course-row em { flex: none; font: 600 13px/1 var(--font); font-style: normal; color: var(--retry); }
.q .more { margin: 8px -8px 0; }

/* 펼침과 클레어: 같은 문법(열 때 200ms, 닫을 때 150ms) */
.more-q { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border-radius: var(--pill); font: 600 15px/1.3 var(--font); color: var(--ink-2); transition: background .15s var(--ease); }
.more-q:active { background: var(--bg-3); transition: none; }
.more-q svg { flex: none; transition: transform .2s var(--ease); }
.open > .more-q svg { transform: rotate(180deg); }
.fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .15s var(--ease); }
.open > .fold { grid-template-rows: 1fr; transition-duration: .2s; transition-timing-function: var(--ease-in); }
.fold > div { overflow: hidden; min-height: 0; }
.editorial { padding: 4px 8px 8px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.editorial p + p { margin-top: 8px; }
.claire { margin: 24px 24px 0; }
.q .claire { margin: 24px 0 0; }
.claire .ask { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px 10px 14px; border-radius: var(--pill); background: var(--bg-2); font: 600 14px/1.35 var(--font); color: var(--ink-2); text-align: left; transition: background .15s var(--ease); }
.claire .ask:active { background: var(--bg-3); transition: none; }
.claire .ask::before { content: "✦"; color: var(--brand); }
.claire p { margin-top: 8px; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); font-size: 15px; line-height: 1.6; }
.claire p b { margin-right: 6px; color: var(--brand-text); }

.choices { display: grid; gap: 8px; margin-top: 28px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice { min-height: 56px; padding: 12px 18px; border-radius: 16px; background: var(--bg-2); font: 600 17px/1.35 var(--font); transition: background .15s var(--ease), color .15s var(--ease); }
.choice small { display: block; margin-top: 2px; font: 500 14px/1.4 var(--font); color: var(--gray); }
.choice:active { background: var(--bg-3); transition: none; }
.choice[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-text); }
.choice:disabled { opacity: .5; }
.field { margin-top: 28px; }
.input { display: block; width: 100%; height: 60px; padding: 0 20px; border: 0; border-radius: 16px; background: var(--bg-2); color: var(--ink); font: 600 20px/1 var(--font); outline: none; caret-color: var(--brand); transition: background .15s var(--ease); -webkit-appearance: none; appearance: none; }
.input::placeholder { color: var(--gray-2); font-weight: 500; }
.input:focus { background: var(--bg-3); }
.input[aria-invalid="true"] { background: var(--retry-soft); }
.err { margin-top: 8px; font: 600 14px/1.5 var(--font); color: var(--retry); }

/* 번호 화면의 동의: 한 줄 체크 + 보기 */
.consent { margin-top: 12px; border-radius: 16px; background: var(--bg-2); transition: background .15s var(--ease); }
.agree-row { display: flex; align-items: center; padding-right: 6px; }
.consent:has(.agree[aria-checked="true"]) { background: var(--brand-soft); }
.consent:has(.agree[aria-invalid="true"]) { background: var(--retry-soft); }
.agree { flex: 1; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 16px 8px 16px 18px; border-radius: 16px; font: 600 15px/1.5 var(--font); text-align: left; }
.agree em { font-style: normal; color: var(--gray); font-weight: 500; }
.box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -1px; border-radius: 8px; background: #fff; color: transparent; box-shadow: inset 0 0 0 2px var(--gray-2); transition: background .15s var(--ease), box-shadow .15s var(--ease); }
.agree[aria-checked="true"] .box { background: var(--brand); color: var(--on-brand); box-shadow: none; }
.see { flex: none; min-height: 44px; padding: 0 14px; border-radius: var(--pill); font: 600 15px/1 var(--font); color: var(--ink-2); transition: background .15s var(--ease); }
.see:active { background: var(--bg-3); transition: none; }
.privacy { padding: 4px 18px 16px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.privacy p + p { margin-top: 6px; }

/* 완료: 누가, 어느 번호로, 다음에 무엇이 */
.result { display: flex; flex-direction: column; min-height: 100%; padding: calc(var(--safe-t) + 72px) 24px 0; }
.mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--on-brand); }
.result h1 { margin-top: 24px; font: 800 32px/1.2 var(--font); letter-spacing: -.04em; }
.result .lead { margin-top: 12px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.callno { display: inline-block; margin-top: 20px; font: 800 30px/1.2 var(--font); letter-spacing: -.02em; text-decoration: none; }
.result .small { margin-top: 20px; font-size: 14px; line-height: 1.6; color: var(--gray); }
.text-btn { align-self: flex-start; margin-top: 32px; min-height: 48px; padding: 0 20px; border-radius: var(--pill); background: var(--bg-2); font: 700 16px/1 var(--font); transition: background .15s var(--ease); }
.text-btn:active { background: var(--bg-3); transition: none; }

/* 엄지 영역: 버튼 하나. 키보드가 열리면 화면은 버튼 위에서 끝나고 버튼은 키보드 바로 위 */
.dock { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 12px 16px var(--safe-b); background: #fff; transition: transform .3s var(--spring), opacity .2s var(--ease), padding .2s var(--ease); }
.dock.off { transform: translateY(100%); opacity: 0; pointer-events: none; }
.dock.night { background: var(--night); }
.note { margin: 0 4px 10px; padding: 12px 16px; border-radius: 16px; background: var(--retry-soft); color: var(--retry); font: 600 14px/1.5 var(--font); }
.note a { color: inherit; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border-radius: var(--pill); background: var(--brand); color: var(--on-brand); font: 700 17px/1 var(--font); transition: background .15s var(--ease), transform .15s var(--ease), height .2s var(--ease); }
.cta:active { background: var(--brand-press); transform: scale(.98); transition: none; }
.cta[aria-busy="true"] { background: var(--brand-press); cursor: progress; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(23, 16, 12, .35); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app.kb .screens { bottom: 66px; }
.app.kb .screen { padding-bottom: 16px; }
.app.kb .dock { padding: 8px 16px; transition-property: transform, opacity; }
.app.kb .cta { height: 50px; }
.app.kb .note { margin-block: 0 8px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; } .spin { animation: none; } }
html.reduce *, html.reduce *::before, html.reduce *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }

.winter-guide { flex: none; margin: 8px 24px 0; font-size: 15px; }
.winter-guide summary { cursor: pointer; padding: 12px 0; font-weight: 650; }
.winter-guide h2 { margin-top: 8px; font-size: 20px; }
.winter-guide dt { margin-top: 16px; font-weight: 700; }
.winter-guide dd, .winter-guide p { color: var(--ink-2); }
.winter-guide p { margin: 8px 0 16px; }

.winter-guide a { display: inline-flex; align-items: center; min-height: 44px; }
