/* 바로시도 국어학원 · 2027 예비 고1 포털 */
:root {
  --paper: #f6f4ef;
  --surface: #fffdf9;
  --ink: #1d1c1a;
  --ink-2: #4a4741;
  --ink-3: #8a857c;
  --line: #e4e0d7;
  --line-2: #d4cfc4;
  --accent: #213a33;        /* 깊은 먹색 녹색 */
  --accent-soft: #e7ece8;
  --accent-pre: #84998f;     /* 시간표: 예비과정 막대 */
  --warn: #8a5a1c;
  --warn-soft: #f5ecdd;
  --danger: #9b2c2c;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
*, *::before, *::after { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.env-banner {
  position: sticky; top: 0; z-index: 30;
  background: var(--warn-soft); color: var(--warn);
  font-size: 13px; text-align: center; padding: 6px 16px;
  border-bottom: 1px solid #ead9bd;
}
.env-banner.error { background: #f7e4e4; color: var(--danger); border-color: #ebcaca; }
/* 첫페이지 맨 위 상담 안내 띠: 예전 테스트 안내보다 높고 큰 글씨, 누르면 수강 신청 */
.consult-banner {
  position: sticky; top: 0; z-index: 30; display: block;
  background: var(--warn-soft); color: var(--warn);
  font-size: 15px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none;
  padding: 14px 16px; border-bottom: 1px solid #ead9bd;
}
/* 첫페이지 안의 띠: 페이지 위쪽 여백을 대신하고 좌우 끝까지 꽉 차게 */
.screen.has-consult { padding-top: 0; }
.screen.has-consult > .consult-banner { margin: 0 -24px 28px; }
@media (max-height: 640px) { .screen.has-consult > .consult-banner { margin-bottom: 20px; } }
.consult-banner { -webkit-tap-highlight-color: transparent; } /* iPhone 기본 회색 탭 음영 끔 */
/* 눌림 색은 스크립트로 관리(손을 떼거나 페이지가 바뀌면 항상 지움) — :active는 iPhone에서 남아 있을 수 있어 쓰지 않음 */
.consult-banner.pressed { background: #efe2cc; }

/* ---------- 화면 골격 ---------- */
.shell { max-width: 480px; margin: 0 auto; }
.screen {
  /* 화면 높이를 꽉 채워, 내용이 짧은 페이지의 하단 버튼도 긴 페이지(고정 버튼)와 같은 높이에 오도록 */
  min-height: calc(100dvh - var(--banner-h, 0px));
  display: flex; flex-direction: column;
  padding: 28px 24px 24px;
  padding-bottom: calc(26px + var(--nav-h) + var(--safe-b));
}
body.no-nav .screen { padding-bottom: calc(24px + var(--safe-b)); min-height: 100dvh; }
.screen-body { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.screen-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }
.screen.enter { animation: enter .22s var(--ease) both; }
.screen.enter-back { animation: enter-back .22s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateX(12px); } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-12px); } }

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin: -8px 0 4px; }
.back {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px 6px 0;
  background: none; border: 0; color: var(--ink-2); font-size: 15px; cursor: pointer; text-decoration: none;
}
.back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.progress { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.progress-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: -4px; }
.progress-bar > i { display: block; height: 100%; background: var(--accent); transition: width .3s var(--ease); }

/* ---------- 타이포그래피 ---------- */
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.025em; line-height: 1.3; }
h1 { font-size: 26px; }
h1:focus { outline: none; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.display { font-size: 40px; font-weight: 700; line-height: 1.15; letter-spacing: -0.035em; }
.lead { margin: 0; font-size: 19px; line-height: 1.55; color: var(--ink-2); letter-spacing: -0.02em; }
.desc { margin: 0; color: var(--ink-2); font-size: 15px; }
.small { font-size: 13px; color: var(--ink-3); margin: 0; }
.draft-mark { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }

/* ---------- 홈 ---------- */
.home .screen-body { justify-content: center; gap: 28px; }
.home-title { display: flex; flex-direction: column; gap: 14px; }
.home-rule { width: 32px; height: 1px; background: var(--ink); opacity: .5; }
.photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--line); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo figcaption { font-size: 12px; color: var(--ink-3); padding: 6px 2px 0; }

/* ---------- 버튼 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 0 20px; border-radius: 12px;
  border: 1px solid transparent; font-size: 16px; font-weight: 600;
  text-decoration: none; cursor: pointer; /* 활성·비활성, 눌림 해제 모두 즉시 (페이지가 넘어갈 때 작아진 모습이 남지 않도록) */
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); transition: transform .1s; } /* 누를 때만 살짝 줄어듦 */
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary[disabled], .btn.primary[aria-disabled='true'] { opacity: .35; cursor: not-allowed; }
.btn.secondary { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn.quiet { background: transparent; color: var(--ink-2); font-weight: 500; min-height: 44px; }
.btn.danger { background: transparent; color: var(--danger); font-weight: 500; min-height: 44px; }
.btn .arrow { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.link-row { display: flex; justify-content: center; gap: 6px; font-size: 14px; color: var(--ink-3); }
.link-row a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.inline-link { background: none; border: 0; padding: 0; color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 카드·목록 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.card + .card { margin-top: -8px; }
.card-link { display: block; text-decoration: none; position: relative; padding-right: 40px; transition: border-color .15s; }
.card-link:hover { border-color: var(--line-2); }
.card-link::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px;
  border-right: 1.6px solid var(--ink-3); border-top: 1.6px solid var(--ink-3); transform: translateY(-50%) rotate(45deg);
}
.card .kicker { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.card h2 { margin-top: 2px; }
.card p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.card.muted { background: transparent; border-style: dashed; }
.card.resume { border-color: var(--accent); background: var(--accent-soft); }

.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--ink-3); padding-top: 1px; }
.facts dd { margin: 0; font-size: 15px; }
.facts dd .sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.topics li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.topics .n { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 1px; }
.topics strong { display: block; font-weight: 600; font-size: 15px; }
.topics span.d { display: block; font-size: 13px; color: var(--ink-3); }

.section-label { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 4px 0 -8px; }

.note {
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; color: var(--ink-2);
  background: rgba(0,0,0,.025); border: 1px solid var(--line);
}
.note ul { margin: 0; padding-left: 18px; }
.note li + li { margin-top: 4px; }
.note.warn { background: var(--warn-soft); border-color: #ead9bd; color: #5e4320; }
.note strong { color: var(--ink); font-weight: 600; }

/* 상태 표시 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 999px;
  vertical-align: 2px; margin-left: 6px; white-space: nowrap;
}
.tag.tentative { background: var(--warn-soft); color: var(--warn); }
.tag.undecided { background: transparent; color: var(--ink-3); border: 1px dashed var(--line-2); }
.tag.ok { background: var(--accent-soft); color: var(--accent); }
.tag.plain { background: rgba(0,0,0,.05); color: var(--ink-2); }
.tag.cancel { background: #f4e3e3; color: var(--danger); }

/* ---------- 입력 ---------- */
.fields { display: grid; gap: 18px; }
.field label, .field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input[type=text], .field input[type=tel], .field input[type=password] {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-size: 17px; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33,58,51,.12); }
.field input[aria-invalid='true'] { border-color: var(--danger); }
.field .hint { font-size: 13px; color: var(--ink-3); margin: 6px 0 0; }
.field .err, .form-error { font-size: 13px; color: var(--danger); margin: 6px 0 0; min-height: 0; }
.form-error:empty { display: none; }
.pin-input { letter-spacing: .5em; font-variant-numeric: tabular-nums; }

.choices { display: grid; gap: 10px; border: 0; margin: 0; padding: 0; }
.choices legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.choice { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; } /* 누를 때 회색 탭 음영 없음 */
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice .box {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  /* 선택 시 색이 즉시 바뀌도록 전환 효과 없음 (깜빡임 방지) */
}
.choice .mark {
  flex: none; width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 50%;
  display: grid; place-items: center; transition: all .15s;
}
.choice input[type=checkbox] + .box .mark { border-radius: 6px; }
.choice .mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s var(--ease); }
.choice input[type=checkbox] + .box .mark::after {
  width: 10px; height: 6px; border-radius: 0; background: none;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px;
}
.choice input:checked + .box { border-color: var(--accent); background: var(--accent-soft); }
.choice input:checked + .box .mark { background: var(--accent); border-color: var(--accent); }
.choice input:checked + .box .mark::after { transform: scale(1); }
.choice input[type=checkbox]:checked + .box .mark::after { transform: rotate(-45deg) scale(1); }
.choice input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice .txt .lbl { display: block; font-weight: 500; font-size: 16px; color: var(--ink); }
.choice .txt .lbl strong { font-weight: 700; }
.choice .meta-r { margin-left: auto; padding-left: 10px; font-size: 13px; color: var(--ink-3); white-space: nowrap; text-align: right; }
.choice .txt span { display: block; font-size: 13px; color: var(--ink-3); }
.choice.sep { margin-top: 6px; }

.consent { display: flex; gap: 12px; align-items: center; cursor: pointer; font-size: 15px; }
.consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
details.policy { font-size: 13px; color: var(--ink-2); margin-top: 8px; padding-left: 32px; }
details.policy summary { cursor: pointer; color: var(--ink-3); list-style: none; }
details.policy summary::-webkit-details-marker { display: none; }
details.policy summary::marker { content: ''; }
details.policy dl { margin: 8px 0 0; display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; }
details.policy dt { color: var(--ink-3); }
details.policy dd { margin: 0; }

/* ---------- 확인·완료 ---------- */
.summary { display: grid; gap: 12px; }
.summary .card { padding: 16px 18px; }
.summary .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.summary .head h2 { font-size: 15px; }
.summary .row { font-size: 16px; }
.summary .row + .row { margin-top: 2px; }
.summary .meta { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.summary .edit { font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.done-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }
.done-mark svg { width: 22px; height: 22px; stroke: var(--accent); stroke-width: 2.2; fill: none; }
.ref { font-variant-numeric: tabular-nums; letter-spacing: .08em; font-weight: 600; }

/* ---------- 타임라인 ---------- */
.timeline { --rows: 3; display: grid; gap: 10px; }
.tl-months { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.tl-months span { padding-left: 4px; border-left: 1px solid var(--line); }
.tl-track { position: relative; height: 54px; }
.tl-track::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 25% 100%;
}
.tl-bar {
  position: absolute; top: 4px; height: 20px; border-radius: 6px;
  background: var(--accent); transform-origin: left center;
}
.tl-bar.fade-end { border-top-right-radius: 0; border-bottom-right-radius: 0; background: linear-gradient(90deg, var(--accent) 0 55%, rgba(33,58,51,0) 100%); }
.tl-bar.fuzzy-start { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.outline { background: none; border: 1.5px dashed var(--accent); }
.tl-bar.outline.fade-end { border-right: 0; background: none; -webkit-mask: linear-gradient(90deg, #000 50%, transparent); mask: linear-gradient(90deg, #000 50%, transparent); }
.tl-label { position: absolute; top: 30px; font-size: 12.5px; white-space: nowrap; color: var(--ink-2); }
.tl-label strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
/* 예비과정은 연한 색, 본과정은 진한 색으로 구분 */
.tl-bar.pre { background: var(--accent-pre); }

.week { display: grid; gap: 8px; }
.week .slot { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.week .slot:last-child { border-bottom: 0; }
.week .slot span:first-child { color: var(--ink-3); flex: none; }

/* ---------- 하단 내비게이션 (글래스) ---------- */
.tabbar {
  position: fixed; z-index: 20; left: 50%; bottom: calc(10px + var(--safe-b));
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 400px); height: var(--nav-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px; border-radius: 22px;
  background: rgba(252, 250, 246, .72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 8px 30px rgba(29, 28, 26, .10), 0 1px 0 rgba(255,255,255,.6) inset;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; font-size: 11.5px; font-weight: 600; color: var(--ink-3); border-radius: 16px;
  transition: color .15s, background .15s;
}
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current='page'] { color: var(--accent); }
.tabbar a { position: relative; z-index: 1; -webkit-tap-highlight-color: transparent; } /* 누를 때 iPhone 기본 회색 음영 깜빡임 제거 */
.tabbar a:focus:not(:focus-visible) { outline: none; }
/* 현재 페이지 강조 음영: 하나의 음영이 버튼 사이를 미끄러지듯 이동 */
.tab-ind {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; width: 0;
  border-radius: 16px; background: rgba(33, 58, 51, .084); pointer-events: none;
  /* 버튼에서 버튼으로 일정하게 미끄러지듯: 위치(transform)만 움직임 — 폭은 모든 버튼이 같아 애니메이션하지 않음 */
  transition: transform .38s cubic-bezier(.45, 0, .2, 1), opacity .2s ease;
  will-change: transform;
}
.tab-ind.no-anim { transition: none !important; }
/* 기기의 ‘동작 줄이기’ 설정과 관계없이 항상 미끄러지게 (전체 동작 줄이기 규칙에서 제외) */
@media (prefers-reduced-motion: reduce) {
  .tab-ind { transition-duration: .38s, .2s !important; }
}
body.typing .tabbar, body.no-nav .tabbar {
  opacity: 0; pointer-events: none; transform: translate(-50%, calc(100% + 20px));
}
body.typing .screen { padding-bottom: 24px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabbar { background: rgba(252, 250, 246, .97); }
}

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px + var(--safe-b)); transform: translate(-50%, 8px);
  background: var(--ink); color: #fff; font-size: 14px; padding: 10px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); z-index: 40; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.pad { padding: 24px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 작은 화면 */
@media (max-height: 640px) {
  .screen { padding-top: 20px; }
  .display { font-size: 34px; }
  .screen-body { gap: 16px; }
}
@media (min-width: 720px) {
  .screen { padding-top: 56px; }
}

/* 모션 축소 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
.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; }

/* 하단 행동 버튼: 내용이 길어도 내비 위에 항상 보이도록 */
html { scroll-padding-bottom: calc(var(--nav-h) + 120px); }
body.typing { scroll-padding-bottom: 110px; }
.screen:not(.home) .screen-actions {
  --actions-bottom: calc(var(--nav-h) + 26px + var(--safe-b));
  position: sticky; z-index: 10;
  bottom: var(--actions-bottom);
  margin: 0 -24px; padding: 20px 24px 0;
  background: linear-gradient(to bottom, rgba(246,244,239,0), var(--paper) 22px);
}
/* 액션 버튼 아래 ~ 화면 맨 아래: 뒤로 지나가는 내용을 흐리게 */
.screen:not(.home) .screen-actions::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%;
  height: var(--actions-bottom);
  background: rgba(246, 244, 239, .55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .screen:not(.home) .screen-actions::after { background: rgba(246, 244, 239, .94); }
}
body.typing .screen:not(.home) .screen-actions,
body.no-nav .screen:not(.home) .screen-actions { --actions-bottom: calc(12px + var(--safe-b)); }
.screen-body > .eyebrow + h1 { margin-top: -12px; }
.lead strong { color: var(--ink); font-weight: 650; }

/* 페이지 가로 슬라이드 전환 */
body { overflow-x: hidden; }
#app.is-sliding { position: relative; overflow-x: clip; }
/* 전환 중 떠나는·지나가는 페이지: 제자리 페이지 위에 겹쳐 함께 밀림 */
#app.is-sliding > .slide-pane { position: absolute; top: 0; left: 0; will-change: transform; }
#app.is-sliding > .screen { will-change: transform; }

/* 라벨 일부만 굵게: 예) **학생** 이름 */
.field label.mixed { font-weight: 500; }
.field label.mixed strong { font-weight: 700; }

/* 수강반선택·수업변경: 예비과정/본과정 두 영역 */
.class-group { display: grid; gap: 12px; }
.class-group + .class-group { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.class-group h2 { font-size: 16px; }
.class-group .h-sub { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 6px; }

/* 섹션 제목 일부만 굵게: ‘1차 개강 **예비과정**’ */
h2.mixed { font-weight: 500; }
h2.mixed strong { font-weight: 700; }
.h-desc { margin: -6px 0 2px; font-size: 14px; color: var(--ink-3); }
/* 박스 없는 안내 불릿 */
.bullets { margin: 2px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.bullets li + li { margin-top: 4px; }
/* 신청조회: 비밀번호 분실 안내 */
.forgot { align-self: flex-start; color: var(--ink-2); font-weight: 500; }
.forgot-msg { margin-top: -10px; }
.forgot-msg a { color: var(--ink); font-weight: 600; }

/* 강의 세부 정보: 좌우로 넘기는 강의 카드 */
.topbar { position: relative; }
.topbar-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dots { display: flex; gap: 2px; }
.dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dot::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--line-2); transition: width .2s var(--ease), background .2s; }
.dot.live::before { width: 18px; background: var(--accent); }
.carousel {
  display: flex; align-items: flex-start;
  margin: 0 -24px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: none;      /* 끝에서 더 밀어도 브라우저 뒤로 가기·튕김 없이(마지막 강의의 끌림은 직접 처리) */
  scrollbar-width: none;
  transition: height .25s var(--ease);
}
.carousel::-webkit-scrollbar { display: none; }
.car-panel {
  flex: 0 0 100%; box-sizing: border-box; padding: 0 34px; /* 좌우 ‘<’ ‘>’ 버튼 자리(32px) 확보 */
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; gap: 20px;
}
.car-panel > .eyebrow + .car-title { margin-top: -12px; }
/* 강의 제목: 페이지 제목(h1) 아래 단계지만 보기는 이전과 같게 */
.car-title { font-size: 26px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.3; }

/* 처음 진입 시 손가락 넘기기 안내 (1초) */
.carousel-wrap { position: relative; }
.swipe-hint {
  position: absolute; z-index: 5; left: 50%; top: 96px; transform: translateX(-50%);
  width: 156px; height: 156px; border-radius: 42px; /* 손가락 1.5배에 맞춰 상자도 1.5배 */
  display: grid; place-items: center; pointer-events: none;
  background: rgba(29, 28, 26, .20); /* 음영 20%, 블러 없음 */
}
.swipe-hint[hidden] { display: none; }
.swipe-hint svg { width: 96px; height: 96px; /* 64px → 1.5배 */ fill: none; stroke: #fff; stroke-width: 2.6; overflow: visible; }
.swipe-hint .sw-hand { transform: translateX(12px); } /* 움직임은 app.js(스크립트 애니메이션, 1.5초) */
.swipe-hint .sw-arrow { opacity: .85; }


/* 신청내역: 상태 표시는 카드 제목 오른쪽 */
.summary .head .tag { margin-left: auto; flex: none; }
/* 수업변경: 예비과정과 본과정이 각각 한 화면에 들어오도록 구분선 위아래 여백을 넓힘 */
.screen.audit .class-group + .class-group { margin-top: 56px; padding-top: 56px; }

/* 신청내역: 학생명과 최근 변경을 한 줄에, 배지는 카드 제목 바로 옆, 링크는 오른쪽 */
.name-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.name-row .small { flex: none; }
.my-summary .head { justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.my-summary .head .tag { margin-left: 0; }
.card-link-row { margin-top: 10px; text-align: right; }

/* 수업 시간 변경 저장 완료: ‘최근 변경’ 일시를 초록색으로 잠깐 강조 */
#changed-at { border-radius: 999px; padding: 2px 8px; margin-right: -8px; }
/* 움직임은 app.js(스크립트 애니메이션). 아래 클래스는 ‘동작 줄이기’ 설정에서만 사용 */
@keyframes saved-flash {
  0%   { color: #1f7a4a; background: rgba(46, 160, 98, .22); transform: scale(1.06); }
  25%  { color: #1f7a4a; background: rgba(46, 160, 98, .18); transform: scale(1); }
  70%  { color: #1f7a4a; background: rgba(46, 160, 98, .10); }
  100% { color: var(--ink-3); background: rgba(46, 160, 98, 0); }
}
@media (prefers-reduced-motion: reduce) {
  /* 움직임 없이 초록색으로만 표시 */
  #changed-at.saved-flash { animation: none; color: #1f7a4a; background: rgba(46, 160, 98, .14); }
}

/* 교육과정: 화면 중앙 오른쪽의 반투명 ‘>’ 버튼(넘길 수 있음 표시, 누르면 다음 강의) */
.car-arrow {
  position: fixed; z-index: 15; top: 50%;
  transform: translateY(-50%);
  opacity: 0; pointer-events: none; visibility: hidden;
  width: 30px; height: 56px; padding: 0; border: 0; background: none; /* 원형 배경 없음 */
  display: grid; place-items: center; cursor: pointer;
  color: var(--ink-2);
  transition: opacity .2s var(--ease);
}
/* 강의 영역의 좌우 여백(34px) 안에만 놓이도록: 화면 가장자리에서 2px, 너비 30px */
.car-prev { left: max(2px, calc(50% - 240px + 2px)); }
.car-next { right: max(2px, calc(50% - 240px + 2px)); }
.car-prev svg { transform: scaleX(-1); }
.car-arrow.show { opacity: 1; pointer-events: auto; visibility: visible; }
.car-arrow:not(.show) { transition: opacity .12s var(--ease), visibility 0s .12s; } /* 숨길 때는 빠르게 */
.car-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.car-arrow:active { opacity: .6; }
body.typing .car-arrow, body.no-nav .car-arrow { opacity: 0; pointer-events: none; }

/* 손가락 안내 상자 안 문구 */
.swipe-hint { grid-auto-flow: row; align-content: center; gap: 2px; }
.swipe-hint-text { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }

/* 교육과정: 페이지 좌우 여백을 34px로 넓혀 ‘<’ ‘>’ 버튼(화면 가장자리 2~32px)이 글자와 겹치지 않게 */
.screen.courses { padding-left: 34px; padding-right: 34px; }
.screen.courses .carousel { margin: 0 -34px; }
.screen.courses .screen-actions { margin: 0 -34px; padding-left: 34px; padding-right: 34px; }
/* 교육과정·시간표·수강 신청 단계: 버튼 위쪽의 흐려지는 영역 (48px, 흐림 효과) 통일 */
.screen.courses .screen-actions,
.screen.schedule .screen-actions,
.screen.flow-step .screen-actions {
  padding-top: 48px;
  background: linear-gradient(to bottom, rgba(246, 244, 239, 0), rgba(246, 244, 239, .85) 30px, var(--paper) 48px);
}
.screen.courses .screen-actions::before,
.screen.schedule .screen-actions::before,
.screen.flow-step .screen-actions::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 48px; pointer-events: none;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%); mask-image: linear-gradient(to bottom, transparent, #000 70%);
}

/* 교육과정: 제목 아래 강의 탭 (현재 강의만 옅은 녹색 둥근 배경) */
.course-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 12px; } /* 페이지 너비에 균등 배분, 제목과 간격 넓힘, 아래 강의 내용과도 간격 넓힘 */
.ctab {
  border: 0; background: none; cursor: pointer;
  padding: 10px 4px; border-radius: 999px; text-align: center;
  font-size: 17px; font-weight: 600; /* 15px → 17px */ letter-spacing: -0.01em; color: var(--ink-3);
  transition: color .2s var(--ease); -webkit-tap-highlight-color: transparent;
}
.ctab.live { color: var(--accent); }
/* 강의 탭의 옅은 녹색 배경: 하단 내비처럼 탭에서 탭으로 미끄러져 이동 (--i = 현재 탭 번호) */
.course-tabs { position: relative; }
.ctab { position: relative; z-index: 1; }
.ctab-ind {
  position: absolute; z-index: 0; top: 0; bottom: 0; left: 0;
  width: calc((100% - 12px) / 3); /* 탭 3개, 사이 간격 6px */
  border-radius: 999px; background: rgba(33, 58, 51, .14); pointer-events: none;
  transform: translateX(calc(var(--i, 0) * (100% + 6px)));
  /* 누르자마자 빠르게 출발해 부드럽게 멈춤 (0.38초 천천히 출발 → 0.3초 빠른 출발) */
  transition: transform .3s cubic-bezier(.2, .75, .25, 1); will-change: transform;
}
@media (prefers-reduced-motion: reduce) { .ctab-ind { transition-duration: .3s !important; } }

/* 넘기는 동안에는 높이 변화를 즉시 반영(잘림 방지), 끝난 뒤에만 부드럽게 줄임 */
.carousel.moving { transition: none; }
/* ‘<’ ‘>’ 버튼: 나타나고 사라지는 시간을 짧게 */
.car-arrow { transition-duration: .1s; }
.car-arrow:not(.show) { transition: opacity .08s var(--ease), visibility 0s .08s; }


/* 다른 페이지로 넘어가는 중인 교육과정: 딱 맞춤을 꺼서 보던 강의 위치 유지 */
.carousel.leaving { scroll-snap-type: none; }

/* 교육과정 탭 안 섹션: 수업일정 · 수업목표 · 수업내용 · 교육비 */
.car-panel .sec-title { margin: 30px 0 -8px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); } /* 섹션 사이 간격 넓힘 (10px → 30px) */
.car-panel > .sec-title:first-child { margin-top: 0; }
.car-panel > .eyebrow + .sec-title { margin-top: -6px; }
.car-panel .goal { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.tbd { color: var(--ink-3); }
.cand-meta { font-size: 12px; color: var(--ink-3); }
.car-panel .goal-list { font-size: 15px; color: var(--ink-2); }
.car-panel .goal-list li + li { margin-top: 6px; }

/* 교육과정 항목 이름: 세 글자·네 글자 모두 같은 너비(네 글자 폭)로 양끝 맞춤 */
.dt-even { display: inline-flex; justify-content: space-between; width: 4em; }
/* 학습목표: 수업내용과 같은 01·02·03 번호 형식 (문장은 보통 굵기) */
.goal-topics .g { font-size: 15px; color: var(--ink); line-height: 1.5; }

/* 비밀번호 네 자리 칸: 기존 입력 칸 모양 그대로, 자리마다 ‘_’ 또는 숫자를 가운데 정렬 */
.pin-slots {
  position: relative; height: 54px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-2);
  transition: border-color .15s, box-shadow .15s;
}
.pin-slots:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33,58,51,.12); }
.pin-slots.invalid { border-color: var(--danger); }
.field .pin-slots .pin-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  border: 0; background: transparent; box-shadow: none !important; outline: none;
  color: transparent; caret-color: transparent; font-size: 16px; letter-spacing: 0; z-index: 1;
}
.pin-cells {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  align-items: center; justify-items: center; pointer-events: none; padding: 0 12%;
}
.pin-cell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 32px; font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
/* 자리마다 긴 밑줄 — 숫자를 입력해도 그대로 남음 */
.pin-cell::after {
  content: ''; position: absolute; left: 50%; width: 31px; margin-left: -15.5px; /* 길이 36px → 31px(약 85%) */
  bottom: -1px; height: 2px; border-radius: 2px; /* 3px 위로 (숫자 위치는 그대로) */
  background: var(--line-2); opacity: .7; /* 조금 흐리게 */
}
.pin-cell.filled::after { background: var(--ink-3); }
.pin-cell.next::after { background: var(--accent); }

/* 개인정보 동의: 문구 오른쪽 ‘보기 ›’ → 아래에서 올라오는 시트 */
.consent-row { display: flex; align-items: center; gap: 8px; }
.consent-row .consent { flex: 1; min-width: 0; }
.consent-more {
  flex: none; display: inline-flex; align-items: center; gap: 0; padding: 8px 0 8px 6px;
  border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--ink-3);
  -webkit-tap-highlight-color: transparent;
}
.consent-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.sheet-dim { position: fixed; inset: 0; z-index: 60; background: rgba(29, 28, 26, .35); }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 480px); max-height: 85dvh; overflow-y: auto;
  background: var(--paper); border-radius: 20px 20px 0 0;
  padding: 10px 24px calc(20px + var(--safe-b));
  box-shadow: 0 -8px 30px rgba(29, 28, 26, .12);
}
.sheet .grip { width: 36px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 18px; }
.sheet h2 { font-size: 18px; margin: 0 0 6px; }
.sheet .desc { margin: 0 0 16px; }
.sheet .facts { margin-bottom: 24px; }
.sheet .facts > div { grid-template-columns: 72px 1fr; }
.sheet .btn { width: 100%; }

/* 교육과정: ‘수업일정’ 제목과 같은 줄 오른쪽 끝에 개강 안내 작은 글씨 */
.car-panel > .sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 -8px; }
.car-panel > .sec-head .sec-title { margin: 0; }
.car-panel > .sec-head .eyebrow { text-align: right; }
