/* 바로시도 국어학원 · 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: #c3d0c8;     /* 시간표: 예비과정 막대 (더 옅게: 이전 #a7b8af, 처음 #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;
  /* 길게 눌러도 글자가 선택되거나 iPhone 길게 누르기 메뉴(복사·링크 미리보기)가 뜨지 않게 */
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
/* 입력 칸은 예외: 글자 입력·커서 이동·붙여 넣기가 그대로 되도록 (iPhone은 이 예외가 없으면 입력이 안 될 수 있음) */
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
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;
}
/* 카카오톡·라인 안의 브라우저에서만 보이는 안내 띠 (스크롤하면 함께 올라감) */
.inapp-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; line-height: 1.4;
  padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: center;
}
.inapp-banner button {
  flex: none; font-size: 13px; font-weight: 700; color: #fff; background: var(--accent);
  border: 0; border-radius: 999px; padding: 6px 12px; -webkit-tap-highlight-color: transparent;
}
.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; margin: 20px 0; } /* 위아래 여백 각 +20px */
.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.danger-fill { background: var(--danger); color: #fff; border-color: var(--danger); } /* 신청 취소 확인 창의 실행 버튼 */
.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: #e9edeb; } /* 버튼 색 계열, 채도 낮춤 */
/* 첫페이지 ‘신청 내역’ 카드·‘신청 내역 확인·변경’ 링크: iPhone 기본 회색 탭 음영 끔
   (떠나는 순간 음영이 찍힌 화면이 뒤로 가기 때 잠깐 보였다가 사라져 깜빡여 보이던 문제) */
.card-link, .link-row a { -webkit-tap-highlight-color: transparent; }
/* 눌림 색은 스크립트로 누르는 동안만 (손을 떼면 바로 지움) */
.card.resume.pressed { background: #dfe5e2; }

.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.labeled li { grid-template-columns: 34px 1fr; gap: 12px; } /* ‘문학’·‘독서’: 표의 항목 이름(개강일 등)과 같은 폭·양끝 맞춤, 제목은 표의 내용과 같은 위치 */
.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 .row.phone-check { font-size: 20px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.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-rows { position: relative; display: grid; gap: 5px; } /* 막대 줄 사이 간격 절반(막대 사이 9px) */
.tl-rows::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 25% 100%; } /* 월 구분 세로선: 줄 사이에서 끊기지 않게 한 번에 */
.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 { text-align: center; } /* 월 표시는 해당 열 가운데, 월 행에는 세로선 없음 */
.tl-track { position: relative; height: 24px; } /* 막대(위 4px + 높이 20px) */

.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: 4px; height: 20px; line-height: 20px; padding-left: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink); background: var(--paper); } /* 막대 바로 왼쪽, 막대와 같은 높이 (뒤 세로선은 가림) */
.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; }
/* 신청이 접수된 브라우저: ‘신청 조회’ 글자·아이콘만 초록 (음영은 현재 페이지 음영과 동일하게 회색) */
.tabbar a.applied, .tabbar a.applied[aria-current='page'] { color: #1f7a4a; }
/* 기기의 ‘동작 줄이기’ 설정과 관계없이 항상 미끄러지게 (전체 동작 줄이기 규칙에서 제외) */
@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-js, var(--actions-bottom)); /* 실제 내비 위치를 재서 맞춘 값(--actions-js)이 있으면 그 값 우선 */
  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: 68px; padding-top: 80px; border-top: 1px solid var(--line); } /* 구분선 위·아래 여백 각 +50px (8→58, 20→70), 2026-11-23 +10px씩 (68·80) */
.class-group h2 { font-size: 16px; }
/* 수강반 선택: 제목 줄 오른쪽 끝 ‘필수’ 배지 */
.class-group h2:has(> .tag.required) { display: flex; align-items: center; }
.class-group h2 > .tag.required { margin-left: auto; }
.tag.required { background: var(--accent-soft); color: var(--accent); }
.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 24px; /* 다른 페이지와 같은 좌우 여백 */
  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); }
}


/* 손가락 안내 상자 안 문구 */
.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; }

/* 교육과정·시간표·수강 신청 단계: 버튼 위쪽의 흐려지는 영역 (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);
}
/* 커리큘럼(예비과정): ‘시간표 보기’ 위 아래쪽 꺾쇠 — 반투명, 위아래로 천천히 움직임, 내리면 서서히 사라짐 */
.scroll-cue {
  position: absolute; left: 50%; top: 6px; width: 30px; height: 30px; margin-left: -15px;
  padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  color: var(--ink); opacity: 0; pointer-events: none; z-index: 1;
  transition: opacity .35s var(--ease);
  animation: cue-bob 1.4s ease-in-out infinite; /* 사라지는 동안에도 움직임을 이어 가서 끊기지 않게 */
}
.scroll-cue svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(90deg); }
.scroll-cue.show { opacity: .38; pointer-events: auto; } /* 보일 때만 누를 수 있음 */
.scroll-cue::after { content: ''; position: absolute; inset: -10px -24px; } /* 손가락으로 누르기 쉽게 */
@keyframes cue-bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
.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; }
/* 강의 탭 줄: 스크롤해도 화면 맨 위에 붙어 머묾. 배경은 페이지와 같은 색(불투명)
   (흐림 효과를 쓰면 iPhone에서 탭 줄 뒤로 강의가 옆으로 넘어갈 때 탭 줄이 깜빡임 → 쓰지 않음) */
/* 커리큘럼 맨 위 묶음(작은 제목·큰 제목·강의 탭): 처음부터 화면 맨 위에 고정, 강의 내용만 스크롤 */
.tabs-sentinel { position: absolute; height: 0; } /* 평소엔 자리 차지 없음 (탭을 옮기는 동안만 묶음 자리를 대신함) */
.course-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 20px;
  margin: -28px -24px 0; padding: 28px 24px 20px; /* 화면 위 여백까지 묶음에 포함 → 처음부터 맨 위에 붙어 있음, 아래 여백 20px */
  background: var(--paper);
}
/* 고정 묶음 아래 음영: 내용이 묶음 밑으로 지나갈 때만 서서히 나타남 (커리큘럼·시간표 공통) */
.course-head::after, .page-head::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(29, 28, 26, .15), rgba(29, 28, 26, .06) 45%, rgba(29, 28, 26, 0)); /* 진하기 1.5배 */
  opacity: 0; transition: opacity .25s var(--ease);
}
.course-head.stuck::after, .page-head.stuck::after { opacity: 1; }
/* 시간표: ‘2027 예비 고1 / 수업 시간표’ 제목 묶음을 처음부터 화면 맨 위에 고정 (커리큘럼과 같은 방식) */
.page-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 20px;
  margin: -28px -24px -12px; padding: 28px 24px 32px; /* 화면 위 여백 포함, 아래 여백 32px(12px + 20px) */
  background: var(--paper);
}

.page-head > .eyebrow + h1 { margin-top: -12px; }
/* 시간표 ‘수업 시간’: 커리큘럼 강의와 같은 섹션 모양을 그대로 씀 (car-panel), 페이지 여백만 맞춤 */
.screen.schedule .car-panel.sched-panel, .swipe-preview .car-panel.sched-panel { padding: 0; }
.page-head + .sched-panel { margin-top: 0; } /* 고정 묶음 → 예비과정 (20px 줄임: 30 → 10) */ /* 막대 영역(고정 묶음) → 예비과정: 예비과정 → 본과정 사이와 같은 보이는 간격 */
.sched-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; margin-right: -4px; } /* 위 막대와 같은 색 */
.sched-dot.pre { background: var(--accent-pre); }
.sched-dot.main { background: var(--accent); }
.sched-note { font-size: 13px; color: var(--ink-3); margin-left: auto; } /* ‘선호 조사’: 줄 오른쪽 끝 */
/* 반 이름(A 반 등): 본문과 같은 크기·색, 굵게 */
.sched-panel .facts dt { font-size: 15px; font-weight: 700; color: var(--ink); }
.car-panel.sched-panel .facts > div { grid-template-columns: 24px 1fr; } /* 반 이름(A반 등) 칸 = 이름 폭 → 이름과 요일 사이 = 칸 사이 12px */ /* 반 이름 칸: 커진 글자에 맞춘 세 글자 폭 */
.car-panel.sched-panel .facts dt .dt-even { width: auto; justify-content: flex-start; } /* 반 이름은 붙여 씀 (A반) */
.sched-panel .sec-head .sched-title { display: inline-flex; justify-content: space-between; width: 3.4em; } /* ‘본과정’ 세 글자를 ‘예비과정’ 네 글자 폭에 양끝 맞춤 → 옆 배지 위치도 세로로 맞음 */
/* 요일 칸(고정 폭)과 시간 칸을 나눠 세로로 줄 맞춤 */
/* 요일 줄: 월~토를 옅게, 수업 요일만 진한 원 안에 흰 글자 */
/* 요일 원 18px (휴대폰 폭에 한 줄로 들어가는 크기) */
.day-strip { display: inline-flex; gap: 1px; margin-right: 12px; vertical-align: baseline; } /* 요일 → 시간 12px (반 이름 → 요일과 같게) */
.day-strip .d { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
  font-size: 11px; font-weight: 500; line-height: 1; color: var(--line-2); }
 /* 390px보다 좁은 화면: ‘주 N회’ 숨김 (요일 원 개수가 같은 정보) */
.day-strip .d.on { border: 1.5px solid #586660; color: #586660; font-weight: 700; }
/* 수업이 없는 요일: 글자 대신 작은 점 (칸 크기는 같아 요일 간격 유지) */
.day-strip .d { position: relative; }
.day-strip .d.off { color: transparent; }
.day-strip .d.off::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); } /* 수업 요일: 원·글자색 150% 진하게 (#84998f → #586660) */
.sched-time { font-variant-numeric: tabular-nums; }
.sched-start { display: inline-block; min-width: 2.75em; text-align: right; }
.car-panel.sched-panel .facts dd { display: flex; align-items: baseline; }
.car-panel.sched-panel .facts dd .sched-meta { margin-left: auto; padding-left: 8px; font-size: 12px; } /* 오른쪽 정보: 요일 원 18px에서도 한 줄에 여유 있게 */
/* 오른쪽 정보는 가장 긴 ‘주 1회 180분+α’ 폭의 칸에 왼쪽 맞춤 → ‘주 2회’·‘주 1회’가 같은 위치에서 시작 */
.car-panel.sched-panel .facts dd .sched-meta { min-width: calc(6.3em + 8px); display: inline-flex; justify-content: space-between; gap: 4px; }
.sched-meta .meta-mins { margin-left: auto; } /* ‘주 N회’를 숨긴 작은 화면에서도 ‘α’는 오른쪽 끝 */
@media (max-width: 389px) { .car-panel.sched-panel .facts dd .sched-meta { min-width: calc(3.7em + 8px); } } /* ‘180분+α’ 폭 */ /* ‘90분 2회+α’ 줄 오른쪽 끝 */
.sched-panel > .facts + .sched-foot { margin-top: -6px; }
.sched-panel > .sched-foot + .sec-head { margin-top: 30px; }
/* 문법특강에서 더 밀 때 오른쪽에 미리 그려 두는 시간표 페이지 */
.screen.courses { position: relative; }
.swipe-preview { position: absolute; left: 100%; width: 100%; overflow: hidden; pointer-events: none; background: var(--paper); }
.swipe-preview > .screen { min-height: 100%; }
.course-head > .eyebrow + h1 { margin-top: -12px; } /* 작은 제목과 큰 제목 사이: 묶기 전과 같게 */
.course-head > .course-tabs-bar { margin: 0; padding: 0 0 6px; background: none; } /* 강의 탭: 선택 음영의 위쪽이 시간표 페이지 월 줄(11월·12월…)과 같은 높이에서 시작 */
/* 강의 영역의 위쪽 경계를 탭 줄 바로 아래에 붙이고, 원래 있던 26px 간격(탭 줄 아래 여백 6px + 페이지 간격 20px)은
   강의 안쪽 위 여백으로 옮김 → 보이는 간격은 같고, 강의 영역이 잘라 내는 경계가 불투명한 탭 줄 뒤에 숨음
   (내린 상태에서 넘길 때 탭 줄 바로 아래 글자의 위쪽이 잠깐 잘려 보이던 문제) */
.course-head + .carousel-wrap { margin-top: -20px; }
.screen.courses .car-panel { padding-top: 26px; } /* 페이지 너비에 균등 배분, 제목과 간격 넓힘, 아래 강의 내용과도 간격 넓힘 */
.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; /* 과정별 색은 아래 data-i 규칙 */
  transform: translateX(calc(var(--i, 0) * (100% + 6px)));
  /* 누르자마자 빠르게 출발해 부드럽게 멈춤 (0.38초 천천히 출발 → 0.3초 빠른 출발) */
  transition: transform .3s cubic-bezier(.2, .75, .25, 1), background-color .3s, border-color .3s; will-change: transform;
}
@media (prefers-reduced-motion: reduce) { .ctab-ind { transition-duration: .3s !important; } }

/* 넘기는 동안에는 높이 변화를 즉시 반영(잘림 방지), 끝난 뒤에만 부드럽게 줄임 */
.carousel.moving { transition: none; }


/* 다른 페이지로 넘어가는 중인 교육과정: 딱 맞춤을 꺼서 보던 강의 위치 유지 */
.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; }
/* 섹션 사이 ‘보이는’ 간격 통일: 앞 내용이 선(수업일정 표 밑줄)·상자(안내 상자)로 끝나면 글자로 끝날 때보다 4px 가까워 보여서 보정 */
.car-panel > .facts + .sec-title, .car-panel > .note + .sec-title { margin-top: 34px; }
/* 섹션 안 글 덩어리 사이 20px로 통일 (수업일정 표 → 안내 목록) */
.car-panel > .facts + .bullets { margin-top: 0; }
/* 표의 항목 이름(개강일)·내용(날짜)·배지(변동 가능)의 글자 바닥선을 한 줄로 맞춤 (따로 올리고 내리던 보정은 없앰) */
.car-panel .facts > div { align-items: baseline; }
.car-panel .facts dt { padding-top: 0; }
.car-panel .facts dd .tag { vertical-align: baseline; }
/* 개강일 옆 ‘변동 가능’·‘반별 상이’·‘추후 안내’: 배지 대신 옅은 색 글자 */
.car-panel .facts dd .tag { display: inline; background: none; border: 0; padding: 0; margin-left: 8px; border-radius: 0;
  font-size: 13px; font-weight: 400; line-height: inherit; color: var(--ink-3); }
/* 커리큘럼 세 탭 섹션 모양 통일: 제목 → 구분선 한 줄 → 내용 (표 안의 줄마다 있던 구분선은 없앰) */
.car-panel .facts > div { border-bottom: 0; }
.car-panel > .sec-title + :not(.facts) { border-top: 1px solid var(--line); padding-top: 12px; } /* 표는 원래 위 선이 있음 */
/* 세 탭: 수업일정·교육비 표의 줄 간격을 수업내용 목록과 같게 (줄 사이 12px, 선 아래 첫 줄 위치는 그대로) */
.car-panel .facts { gap: 12px; padding-top: 12px; }
.car-panel .facts > div { padding: 0; grid-template-columns: 34px 1fr; } /* 항목 이름 칸 = 세 글자 폭(2.6em ≈ 34px) */
.car-panel > .facts + .sec-title { margin-top: 30px; } /* 표 아래 여백(12px)이 없어진 만큼 섹션 사이 간격 유지 */
.car-panel > .facts + .note { margin-top: 4px; } /* 표 → 안내 상자: 섹션 안 다른 덩어리 사이(약 28px)와 같게 */
.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: 2.6em; } /* 항목 이름 공통 폭 = 세 글자 폭(13px 글자 약 34px) */
/* 학습목표: 수업내용과 같은 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; }
/* 아래에서 올라오는 창 바깥: 어둡게 하지 않음(투명). 창 바깥을 누르면 닫히도록 화면만 덮음.
   (어둡게 하면 iPhone Safari가 직접 칠하는 화면 맨 위 줄은 어두워지지 않거나 시차가 생겨 두 구간으로 보임) */
.sheet-dim { position: fixed; inset: 0; z-index: 60; background: transparent; }
.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 -4px 20px rgba(29, 28, 26, .15), 0 -40px 320px rgba(29, 28, 26, .40); /* 뒤 화면을 어둡게 하지 않는 대신 그림자로 구분: 창 바로 위 약 24px(15%) + 위로 약 360px까지 넓게 퍼짐(40%) */
}
.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%; }
.sheet #sheet-cancel-ok { margin-top: 24px; } /* 신청 취소 확인: 제목과 버튼 사이 여백 (기존 6px) */
.sheet .sheet-body { margin: 6px 0 24px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.sheet.sheet-detail .sheet-body { margin-bottom: 8px; } /* ‘닫기’ 버튼이 없는 ‘자세히’ 창: 아래 여백만 */
.sheet .sheet-body p { margin: 0; }
.sheet .sheet-body p + p { margin-top: 10px; }
.sheet .sheet-sub { margin: 20px 0 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.sheet .sheet-body > .sheet-sub:first-child { margin-top: 0; }
.sheet .goal-topics { font-size: 15px; color: var(--ink); }
/* 수업내용 제목 옆 ‘자세히 ›’ 버튼 (글자만, 누르는 영역은 넉넉하게) */
.topics .t-row { display: flex; align-items: center; gap: 8px; }
.topics .t-row .topic-more { margin-left: auto; } /* ‘자세히 ›’는 줄 오른쪽 끝에 */
.topic-more {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 1px;
  border: 0; border-radius: 0; padding: 3px 0; cursor: pointer; /* 채움·테두리 없이 글자(자세히 ›)만 */
  background: none; color: var(--ink-3); font-size: 13px; font-weight: 500; line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.topic-more::after { content: ''; position: absolute; inset: -10px -8px; } /* 손가락으로 누르기 쉽게 */
.topic-more svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.topic-more:active { opacity: .7; }

/* 교육과정: ‘수업일정’ 제목과 같은 줄 오른쪽 끝에 개강 안내 작은 글씨 */
.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; }
/* 세 탭 모두: ‘1차 개강 · 방학 전 과정’ 같은 작은 글씨를 ‘수업일정’ 바로 옆에 */
.car-panel > .sec-head { justify-content: flex-start; gap: 10px; align-items: center; } /* 제목 옆 배지는 제목 글자와 세로 가운데 맞춤 */
.car-panel > .sec-head .eyebrow { text-align: left; }
.sec-head .head-tags { display: inline-flex; gap: 6px; }
.sec-head .head-tags .tag { margin-left: 0; }
/* ‘1차 개강’·‘2차 개강’·‘별도 특강’ 배지 강조: 빛 지나가기 한 번 */
.sec-head .head-tags .tag { position: relative; }
.sec-head .tag.fx-shine { overflow: hidden; }
.sec-head .tag.fx-shine::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 60%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.85) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-120%); animation: badge-shine .8s ease-in-out 1 forwards; pointer-events: none;
}
@keyframes badge-shine { to { transform: translateX(220%); } }

/* 확대: 두 손가락 확대는 허용, 두 번 탭해서 확대되는 것은 막음 */
html, body { touch-action: manipulation; }
.home .card.resume { margin-top: 24px; }
.resume-note { text-align: left; margin: 6px 0 0; color: var(--ink-3); font-size: 13px; } /* 카드 안, 학생명 아래 */
.rv-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 15px; color: var(--ink-2); }
.rv-row b { color: var(--ink); font-weight: 700; display: inline-block; width: 1.6em; text-align: center; } /* 수강반: 고정 폭 가운데 정렬 → A·B·C·D 글자 폭 차이와 무관하게 요일 시작 위치 통일 */
/* 과정명: 텍스트. 네 글자(예비과정) 폭으로 통일, 세 글자(본과정)는 글자 사이를 벌려 같은 폭 */
.rv-course { flex: none; display: inline-block; position: relative; width: auto; padding-left: 16px; white-space: nowrap; font-size: 14px; font-weight: 400; color: var(--accent); }
.rv-course.pre::before, .rv-course.main::before { content: ''; position: absolute; left: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 3px; } /* 시간표 과정 표시 네모 (같은 색) */
.rv-course.pre::before { background: var(--accent-pre); }
.rv-course.main::before { background: var(--accent); }
.rv-course.wide { letter-spacing: 0.4em; margin-right: -0.4em; } /* 끝 자간은 빼서 눈에 보이는 간격을 같게 */ /* 본과정(세 글자): 예비과정(네 글자)과 보이는 폭이 같도록 자간 조정 */
.rv-more { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.car-panel .sec-title.plain { font-weight: 500; }
.sec-head .head-tags .tag.plain { background: rgba(0, 0, 0, .075); } /* 2차 개강 배지 음영 150% */
.screen.schedule { position: relative; } /* 스와이프 미리보기 기준 */
.note.danger { background: #f7e4e4; color: var(--danger); border-color: #ebcaca; }
.my-head .student-line { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 0; font-size: 16px; }
.my-head .student-line strong { font-weight: 700; color: var(--ink); }
.my-head .parent-tel { font-size: 14px; color: var(--ink-3); }
.head-l { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.head-l h2 { margin: 0; }
.my-summary.struck .row { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-3); }
.screen.audit section[aria-labelledby="main-h"] .bullets { margin-bottom: 24px; } /* 2차 개강 불렛 아래 여백 */
/* 문법특강: 예비과정과 같은 행, 실선 막대. 이름은 막대 안 왼쪽 */
.tl-bar.solid-soft { background: var(--paper); border: 1.5px solid var(--accent); box-sizing: border-box; border-radius: 6px; top: 4px; height: 20px; } /* 문법특강: 색은 채우지 않고(페이지 바탕색) 실선 테두리 — 안쪽 월 세로선은 가림 */
.tl-inlabel { position: absolute; top: 4px; height: 20px; line-height: 20px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink); }
/* 문법특강 이름: 예비과정 막대 끝과 문법특강 막대 시작 사이 빈 칸에 두 줄로 오른쪽 맞춤 */
.tl-label.gram-name { white-space: nowrap; } /* 문법특강: 한 줄, 막대 왼쪽 (막대는 이름 폭만큼 왼쪽에서 줄어듦) */
/* 신청 내역 상단: 시간표 페이지 상단(page-head)과 같은 크기·위치·여백 (고정은 하지 않음) */
.my-head {
  position: static; display: flex; flex-direction: column; gap: 20px;
  margin: -28px -24px -12px; padding: 28px 24px 12px;
}
.my-head > .eyebrow + .name-row { margin-top: -12px; }
.resume-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.resume-title .tag.ok { background: var(--accent); color: #fff; border: 0; margin-left: 0; font-size: 12px; padding: 5px 9px; } /* 카드 테두리와 같은 색 채움, 흰 글자 */
/* 탭 음영 = 시간표 막대 색: 예비과정 막대색(연녹), 본과정 막대색(진녹, 글자 흰색), 문법특강은 채우지 않고 테두리만 */
.course-tabs[data-i="0"] .ctab-ind { background: var(--accent-pre); }
.course-tabs[data-i="1"] .ctab-ind { background: var(--accent); }
.course-tabs[data-i="2"] .ctab-ind { background: transparent; border: 1.5px solid var(--accent); box-sizing: border-box; }
.course-tabs[data-i="1"] .ctab.live { color: #fff; }
/* 학생명 행 아래 여백: 과정 행 사이(4px)보다 넓게 */
.resume-title + .rv-row, .resume-note + .rv-row { margin-top: 14px; }
/* 취소된 신청 (홈 카드): 빨간 카드, 이름 제외 글자 취소선, 빨간 ‘신청 취소’ 배지 */
.card.resume.cancelled { border-color: var(--danger); background: #fbf1f1; }
.card.resume.cancelled.pressed { background: #f9ecec; }
.resume-title .tag.cancel { background: var(--danger); color: #fff; border: 0; margin-left: 0; font-size: 12px; padding: 5px 9px; }

.card.resume.cancelled .rv-row, .card.resume.cancelled .rv-row * { color: var(--ink-3); }
.resume-note.struck { text-decoration: line-through; text-decoration-thickness: 1.5px; }
/* 신청 내역 상단: 최근 변경일자를 ‘신청 내역’ 제목의 바닥에 맞춤 */
.my-head .name-row { align-items: flex-end; }
/* 수강반 변경: 카드 배지가 있는 행의 오른쪽 끝 */
.my-summary .head .link-right { margin-left: auto; white-space: nowrap; }
.rv-course.rv-hide { visibility: hidden; } /* 여러 반 줄의 과정명 자리 (글자 없이 열만 맞춤) */
/* 수업내용: 섹션 제목과 항목 제목 볼드 해제 (400) */
.car-panel .sec-title.lite { font-weight: 400; }
.car-panel .topics strong { font-weight: 400; }
/* 시간표: 맨 위 제목 묶음은 고정하지 않음 (일반 흐름) */
.sched-head { position: static; }
.sched-head::after { display: none; }
/* 주 N회: 시간 칸 오른쪽 끝에 맞춤 */
.car-panel.sched-panel .facts dd .sched-meta { text-align: right; }
/* 주 N회: 커리큘럼 ‘자세히’ 버튼과 같은 글자 크기·색·굵기, 우측 끝 정렬 (배경·좌우 여백 없음) */
.car-panel.sched-panel .facts dd .sched-meta { min-width: 0; margin: 0 0 0 auto; padding: 3px 0; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink-3); vertical-align: baseline; justify-content: flex-end; }
/* 예비과정 → 본과정 섹션 사이 여백 */
.sched-panel > .facts + .sec-head { margin-top: 20px; }
/* 수강반 이름(A반 등): 같은 폭(24px)에 글자 끝 맞춤 → 반 이름의 끝 위치가 모든 줄에서 같음 */
.car-panel.sched-panel .facts dt .dt-even { width: 24px; justify-content: space-between; }
/* 주 1회·주 2회: 같은 폭(33px)에 오른쪽 맞춤 → 글자 시작 위치 통일 */
.car-panel.sched-panel .facts dd .sched-meta .meta-freq { display: inline-block; width: 22px; text-align: right; font-variant-numeric: tabular-nums; } /* 숫자 폭 동일(1·2) → 주 1회·주 2회 폭 통일 */
/* 정보입력: 제목 묶음 위치를 시간표·커리큘럼과 같게 (화면 기본 여백 18px만큼 위로) */
/* 정보입력 제목: 진행 막대 아래 일반 흐름, 기본 여백 사용 */
.info-title { margin-top: 0; }
/* 수강반선택: 섹션 제목 + 개강 배지 (커리큘럼 섹션 머리와 같은 모양) */
.class-head { display: flex; align-items: center; gap: 10px; }
.class-head .sec-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
/* 수강반선택: 본과정 섹션 하단 여백 100px */
.screen.flow-step section[aria-labelledby="main-h"] { margin-bottom: 80px; }
/* 내용 확인: ‘본과정’(세 글자)을 ‘예비과정’(네 글자) 폭과 같게 글자 사이를 벌림 */
.class-head .sec-title.spread { display: inline-flex; justify-content: space-between; width: 3.38em; }
/* 접수완료: 세로 가운데 배치, 크기 키움, 체크 아이콘은 그리기 애니메이션(세션에서 한 번) */
.done-page .screen-body { min-height: calc(100dvh - 200px); justify-content: center; align-items: center; text-align: center; gap: 28px; }
.done-page h1 { font-size: 30px; }
.done-page .desc { font-size: 17px; }
.done-mark.big { width: 96px; height: 96px; }
.done-mark.big svg { width: 44px; height: 44px; stroke-width: 2.4; }
.done-mark svg path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: check-draw .7s ease .2s forwards; }
.done-mark.drawn svg path { stroke-dashoffset: 0; animation: none; }
@keyframes check-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .done-mark svg path { stroke-dashoffset: 0; animation: none; } }
/* 시간표: 반별 행간 4px 줄임 (12 → 8) */
.car-panel.sched-panel .facts { gap: 8px; }
/* 첫페이지 신청 카드: 요일 칸 고정 폭(‘수·금’ 기준) → 하루(토)·이틀(수·금)이어도 시간이 같은 위치에서 시작 */
.rv-row .rv-days { flex: none; width: 2em; text-align: center; }

.car-panel.sched-panel .facts dd .sched-meta .meta-dur { display: inline-block; width: 38px; margin-right: 6px; text-align: right; font-variant-numeric: tabular-nums; } /* 90분·180분 오른쪽 맞춤 */
@media (max-width: 374px) { /* 375보다 좁은 화면(일부 안드로이드): 요일 원을 조금 줄여 한 줄 유지 */
  .car-panel.sched-panel .day-strip { margin-right: 8px; }
  .car-panel.sched-panel .day-strip .d { width: 16px; }
  .car-panel.sched-panel .facts dd .sched-meta .meta-dur { margin-right: 4px; }
}
/* 비활성 반: 수강반 선택에서 흐리게, 누를 수 없음 (시간표에서는 숨김) */
.choice.off { opacity: .45; }
.choice.off input { cursor: not-allowed; }
/* 첫페이지 신청 카드 아래 안내 (빨간 글씨, 신청 완료 상태에서만) */
.resume-alert { margin: 14px 0 0; padding: 0 0 0 18px; color: var(--danger); font-size: 14px; font-weight: 600; line-height: 1.5; }
.resume-alert li + li { margin-top: 4px; }
