/* ──────────────────────────────────────────────────────────────────────
   xtudy.co.kr · 상상이 소개 (2026-10 새 판)
   책상 위 인쇄물 — 지문 한 장이 시험지 다발이 되는 곳.
   ★색: 그라데이션 0 · 브랜드 블루 그림자 금지(중립 그림자만) · 이모지 0(SVG)
   ★글꼴: 제목 조선굴림 · 본문 Pretendard · 인쇄물 안쪽만 Noto Serif KR(실제 시험지의 명조 결)
   ★모서리: 종이 2px · 조작 요소 10px · 알약 999px — 모서리로 위계를 말한다
   ────────────────────────────────────────────────────────────────────── */

@font-face {
    font-family: 'Pretendard Variable';
    font-weight: 45 920;
    font-style: normal;
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/woff2/PretendardVariable.woff2') format('woff2-variations');
}
@font-face {
    font-family: 'JoseonGulim';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@1.0/ChosunGu.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

:root {
    --desk: #f3f5f7;
    --desk-2: #e9edf1;
    --sheet: #ffffff;
    --ink: #1a1d21;
    --ink-2: #4a4f57;
    --ink-3: #868c95;
    --rule: #dfe3e8;
    --rule-2: #eceff2;
    --blue: #1f6093;
    --blue-ink: #174a72;
    --blue-wash: #e7eff6;
    --red: #d23a2e;
    --red-wash: #fbeceb;
    --green: #2f8f54;
    --hl: #fff0a3;
    --kakao: #fee500;

    --sh-paper: 0 1px 1px rgba(10, 14, 26, 0.04), 0 6px 18px rgba(10, 14, 26, 0.06);
    --sh-lift: 0 2px 4px rgba(10, 14, 26, 0.05), 0 18px 40px rgba(10, 14, 26, 0.1);
    --hi: inset 0 1px 0 rgba(255, 255, 255, 0.95);

    --r-paper: 2px;
    --r-ui: 10px;
    --maxw: 1180px;
    --gut: clamp(16px, 4vw, 40px);

    --f-display: 'JoseonGulim', 'Pretendard Variable', Pretendard, sans-serif;
    --f-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --f-print: 'Noto Serif KR', 'AppleMyungjo', 'Batang', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
    margin: 0;
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.012em;
    color: var(--ink);
    background: var(--desk);
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    overflow-wrap: break-word;
    overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
/* width·height 속성은 자리 잡기(CLS)용 — CSS 가 너비만 바꾸면 높이는 비율대로 따라오게 한다.
   이게 없으면 .peek(너비 118px)처럼 속성 높이 150 이 그대로 남아 세로로 늘어난다. */
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-ui); text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* ── 글 ─────────────────────────────────────────────────────────────── */
.h-display {
    text-wrap: balance;
    font-family: var(--f-display);
    font-weight: normal;
    letter-spacing: -0.03em;
    line-height: 1.18;
}
.h1 { font-size: clamp(38px, 6.4vw, 76px); }
.h2 { font-size: clamp(28px, 4vw, 46px); }
.h3 { font-family: var(--f-body); font-size: clamp(18px, 2vw, 21px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.4; }
.lede { font-size: clamp(16px, 1.8vw, 18.5px); color: var(--ink-2); line-height: 1.75; max-width: 34em; }
.note { font-size: 14px; color: var(--ink-3); }
.kicker { font-size: 14.5px; font-weight: 700; color: var(--blue); letter-spacing: -0.01em; }

/* ── 단추 ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 50px; padding: 0 22px;
    border: 0; border-radius: var(--r-ui);
    font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; text-decoration: none; white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-ink { background: var(--ink); color: #fff; box-shadow: var(--hi); }
.btn-ink:hover { background: #2b3036; }
.btn-paper { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn-paper:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn-kakao { background: var(--kakao); color: #191600; }
.btn-kakao:hover { background: #f5dc00; }
.btn-sm { min-height: 40px; padding: 0 15px; font-size: 14px; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* ── 머리 ─────────────────────────────────────────────────────────────── */
.top {
    position: sticky; top: 0; z-index: 50;
    background: rgba(243, 245, 247, 0.88);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.top.scrolled { border-bottom-color: var(--rule); }
.top-in { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand img { width: 30px; height: 30px; }
.brand b { font-family: var(--f-display); font-weight: normal; font-size: 21px; letter-spacing: -0.03em; }
.menu { display: flex; gap: 2px; margin-left: 8px; }
.menu a {
    padding: 8px 11px; border-radius: 8px; text-decoration: none;
    font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.menu a:hover { color: var(--ink); background: var(--desk-2); }
.menu a[aria-current='true'] { color: var(--ink); }
.top-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.burger {
    display: none; width: 44px; height: 44px; margin-left: auto;
    border: 0; background: transparent; border-radius: var(--r-ui); cursor: pointer;
    place-items: center;
}
.burger svg { width: 22px; height: 22px; }
.drawer { display: none; }

@media (max-width: 1080px) {
    .menu a:nth-child(n + 6) { display: none; }
}
@media (max-width: 900px) {
    .menu, .top-cta .btn-paper { display: none; }
    .top-cta { margin-left: auto; }
    .burger { display: grid; margin-left: 2px; }
    .drawer {
        display: block; position: fixed; inset: 68px 0 auto 0; z-index: 49;
        background: var(--desk); border-bottom: 1px solid var(--rule);
        padding: 8px var(--gut) 20px;
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    }
    .drawer.open { opacity: 1; transform: none; visibility: visible; }
    .drawer a {
        display: flex; align-items: center; min-height: 50px; padding: 0 4px;
        border-bottom: 1px solid var(--rule-2); text-decoration: none; font-weight: 600; font-size: 16px;
    }
    .drawer a:last-child { border-bottom: 0; }
}

/* ── 첫 화면 ─────────────────────────────────────────────────────────── */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy .lede { margin-top: 22px; }
.hero-copy .h1 { margin-top: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero-proof {
    display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; padding-top: 22px;
    border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2);
}
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof svg { width: 16px; height: 16px; color: var(--blue); flex: 0 0 auto; }

/* 책상 — 지문 쪽지 + 인쇄물 다발 */
.desk { position: relative; min-height: 610px; }
.slip {
    position: absolute; left: -8px; top: 0; z-index: 1; width: min(268px, 48%);
    background: #fffdf4; border-radius: var(--r-paper); box-shadow: var(--sh-paper);
    padding: 16px 18px 18px; transform: rotate(-3deg);
    font-family: var(--f-print); font-size: 12.5px; line-height: 1.75; color: #3c3f45;
}
.slip-tag {
    display: flex; align-items: center; gap: 6px;
    font-family: var(--f-body); font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px;
}
.slip-tag svg { width: 13px; height: 13px; }
.slip mark { background: var(--hl); color: inherit; padding: 0 1px; }

.stack { position: absolute; right: 0; top: 118px; width: min(452px, 80%); height: 462px; }
.sheet {
    position: absolute; inset: 0;
    background: var(--sheet); border-radius: var(--r-paper);
    box-shadow: var(--sh-paper);
    padding: 26px 28px 24px;
    font-family: var(--f-print); color: var(--ink); font-size: 13.5px; line-height: 1.7;
    transform-origin: 50% 100%;
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s, box-shadow 0.3s;
    overflow: hidden;
}
.sheet[data-pos='0'] { z-index: 4; transform: none; box-shadow: var(--sh-lift); }
.sheet[data-pos='1'] { z-index: 3; transform: translate(10px, -10px) rotate(1.6deg); }
.sheet[data-pos='2'] { z-index: 2; transform: translate(20px, -18px) rotate(3.2deg); }
.sheet[data-pos='3'] { z-index: 1; transform: translate(28px, -24px) rotate(4.6deg); }
.sheet[data-pos='1'] > *, .sheet[data-pos='2'] > *, .sheet[data-pos='3'] > * { visibility: hidden; }

.sh-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1.5px solid var(--ink);
    font-family: var(--f-body); font-size: 11.5px; color: var(--ink-2);
}
.sh-head b { font-size: 13px; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; }
.sh-q { font-weight: 700; margin-bottom: 8px; }
.sh-q + .sh-q { margin-top: 14px; }
.sh-opts { display: grid; gap: 2px; padding-left: 4px; }
.sh-opts li { position: relative; padding-left: 0; }
.sh-u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sh-box {
    border: 1px solid var(--ink); padding: 10px 12px; margin: 8px 0 10px; font-size: 13px; line-height: 1.75;
}
.sh-cond { font-family: var(--f-body); font-size: 11.5px; color: var(--ink-2); }
.sh-ans { display: grid; gap: 10px; }
.sh-ans dt { font-weight: 700; }
.sh-ans dd { margin: 2px 0 0; color: #33373d; }
.sh-ans .key { color: var(--red); font-family: var(--f-body); font-weight: 800; margin-right: 6px; }
.sh-words { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: baseline; }
.sh-words dt { font-weight: 700; font-family: Georgia, var(--f-print); font-size: 14.5px; }
.sh-words dd { margin: 0; color: #33373d; }
.sh-words dd i { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); }
.sh-foot {
    position: absolute; left: 28px; right: 28px; bottom: 16px;
    display: flex; justify-content: space-between; font-family: var(--f-body); font-size: 11px; color: var(--ink-3);
}

/* 빨간 펜 — 정답 동그라미와 검산 표시 */
.pen { position: absolute; pointer-events: none; color: var(--red); overflow: visible; }
.pen path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pen-draw path { stroke-dasharray: var(--len, 240); stroke-dashoffset: var(--len, 240); }
.drawn .pen-draw path { animation: ink 0.7s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
.drawn .pen-draw.late path { animation-delay: 0.45s; }
@keyframes ink { to { stroke-dashoffset: 0; } }
.stamp {
    position: absolute; right: 22px; bottom: 40px; transform: rotate(-8deg);
    border: 2px solid var(--red); color: var(--red); border-radius: 6px;
    font-family: var(--f-body); font-weight: 800; font-size: 12px; letter-spacing: 0.02em;
    padding: 4px 8px; line-height: 1.25; text-align: center; opacity: 0;
}
.drawn .stamp { animation: stampIn 0.35s 1.1s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-8deg) scale(1.4); } to { opacity: 0.92; transform: rotate(-8deg) scale(1); } }

.peek { position: absolute; z-index: 6; left: -4px; bottom: 34px; width: 118px; pointer-events: none; }

.tabs {
    position: absolute; z-index: 7; right: 0; bottom: -6px;
    display: inline-flex; gap: 4px; padding: 5px;
    background: var(--sheet); border-radius: 999px; box-shadow: var(--sh-paper);
}
.tabs button {
    border: 0; background: transparent; cursor: pointer;
    min-height: 38px; padding: 0 15px; border-radius: 999px;
    font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap;
}
.tabs button[aria-selected='true'] { background: var(--ink); color: #fff; }
.tabs button:hover:not([aria-selected='true']) { background: var(--desk); }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .desk { min-height: 0; padding-top: 10px; }
    .slip { position: relative; z-index: 6; left: 0; width: 78%; transform: rotate(-2deg); margin-bottom: -12px; }
    .slip-more { display: none; }
    .stack { position: relative; top: 0; width: calc(100% - 22px); height: 450px; }
    .sheet[data-pos='1'] { transform: translate(7px, -8px) rotate(1.2deg); }
    .sheet[data-pos='2'] { transform: translate(13px, -14px) rotate(2.4deg); }
    .sheet[data-pos='3'] { transform: translate(18px, -18px) rotate(3.4deg); }
    .peek { display: none; }
    .tabs { position: relative; right: auto; bottom: auto; margin-top: 18px; width: 100%; overflow-x: auto; }
    .tabs button { flex: 1 0 auto; }
}
@media (max-width: 420px) {
    .stack { height: 470px; }
    .sheet { padding: 20px 18px; font-size: 13px; }
    .sh-foot { left: 18px; right: 18px; }
}

/* ── 공통 구역 ─────────────────────────────────────────────────────────── */
.sec { padding: clamp(72px, 10vw, 128px) 0; }
.sec-white { background: var(--sheet); }
.sec-head { max-width: 760px; }
.sec-head .lede { margin-top: 18px; }
.sec-head .kicker + .h2 { margin-top: 12px; }

/* 만드는 것 — 교재 목차 */
.contents {
    margin-top: clamp(40px, 6vw, 64px);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px) clamp(32px, 5vw, 72px);
}
.chap { display: flex; gap: 18px; align-items: flex-start; }
.chap > img { width: 76px; height: 76px; object-fit: contain; flex: 0 0 76px; }
.chap-body { flex: 1 1 auto; min-width: 0; }
.chap-note { margin-top: 12px; }
.chap h3 { font-family: var(--f-display); font-weight: normal; font-size: 26px; letter-spacing: -0.03em; line-height: 1.25; }
.chap h3 small { font-family: var(--f-body); font-size: 14px; font-weight: 600; color: var(--ink-3); margin-left: 8px; letter-spacing: -0.01em; }
.toc { margin-top: 10px; border-top: 1.5px solid var(--ink); }
.toc li {
    display: flex; align-items: baseline; gap: 10px;
    padding: 11px 0; border-bottom: 1px solid var(--rule-2); font-size: 15.5px;
}
.toc li b { font-weight: 700; white-space: nowrap; }
.toc li span { color: var(--ink-3); font-size: 14px; }
.toc li::after { content: ''; flex: 1 1 auto; border-bottom: 1.5px dotted var(--rule); transform: translateY(-4px); min-width: 16px; order: 2; }
.toc li em {
    order: 3; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
    background: var(--desk); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.toc li > b, .toc li > span { order: 1; }
.contents-foot { margin-top: 34px; font-size: 15px; color: var(--ink-2); }

@media (max-width: 820px) {
    .contents { grid-template-columns: 1fr; }
    .toc li span { display: none; }
}

/* 내신 — 기출과 동형 */
.twin { margin-top: clamp(40px, 6vw, 60px); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; align-items: center; }
.paper {
    background: var(--sheet); border-radius: var(--r-paper); box-shadow: var(--sh-paper);
    padding: 22px 24px; font-family: var(--f-print); font-size: 13px;
}
.paper-old { background: #fbfaf6; }
.paper .sh-head { margin-bottom: 12px; }
.ghost { display: grid; gap: 7px; }
.ghost i { display: block; height: 7px; border-radius: 2px; background: var(--rule-2); }
.ghost i.s { width: 62%; } .ghost i.m { width: 84%; } .ghost i.q { width: 40%; height: 8px; background: var(--rule); margin-top: 6px; }
.slots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.slots span {
    min-width: 30px; height: 26px; padding: 0 6px; display: grid; place-items: center;
    font-family: var(--f-body); font-size: 11.5px; font-weight: 700; color: var(--ink-2);
    border: 1.5px solid var(--rule); border-radius: 4px;
}
.slots span.sa { border-color: var(--blue); color: var(--blue); }
.bp {
    display: grid; justify-items: center; gap: 10px; text-align: center;
    font-size: 13px; color: var(--ink-2); width: 168px;
}
.bp-card {
    background: var(--blue-wash); color: var(--blue-ink); border-radius: var(--r-ui);
    padding: 12px 14px; font-weight: 700; font-size: 13.5px; line-height: 1.55; width: 100%;
}
.bp svg { width: 28px; height: 28px; color: var(--blue); }
.feats { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
.feat h3 { margin-bottom: 6px; }
.feat p { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 860px) {
    .twin { grid-template-columns: 1fr; }
    .bp { width: 100%; grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
    .bp svg { transform: rotate(90deg); }
    .feats { grid-template-columns: 1fr; }
}

/* 지문 DB — 서가 */
.lib { margin-top: clamp(40px, 6vw, 60px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.shelf { background: var(--sheet); border-radius: var(--r-ui); box-shadow: var(--sh-paper); padding: 8px; }
.shelf-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; border-bottom: 1px solid var(--rule-2); font-size: 13.5px; color: var(--ink-2); }
.shelf-bar svg { width: 16px; height: 16px; }
.tree { padding: 8px 4px; font-size: 14.5px; }
.tree li { padding: 7px 10px; border-radius: 8px; display: flex; align-items: center; gap: 9px; }
.tree li svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--ink-3); }
.tree .l2 { padding-left: 32px; }
.tree .l3 { padding-left: 56px; color: var(--ink-2); }
.tree .on { background: var(--blue-wash); color: var(--blue-ink); font-weight: 700; }
.tree .on svg { color: var(--blue); }
.tree .cnt { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tree .open-mark { font-size: 11.5px; font-weight: 700; color: var(--green); background: #e8f4ec; border-radius: 999px; padding: 1px 8px; }
.lib-points { display: grid; gap: 26px; }
.lib-points h3 { margin-bottom: 4px; }
.lib-points p { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 860px) { .lib { grid-template-columns: 1fr; } }

/* 정확도 — 까망상상의 메뉴판 */
.trust { background: #1d2126; color: #eef1f4; }
.trust .lede { color: #b9c0c8; }
.trust .kicker { color: #9cc3e4; }
.trust-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.menuboard {
    position: relative; background: #f7f4ec; color: var(--ink); border-radius: var(--r-paper);
    padding: 28px 30px 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); transform: rotate(1.2deg);
    font-family: var(--f-print);
}
.menuboard h3 { font-family: var(--f-display); font-weight: normal; font-size: 22px; letter-spacing: -0.02em; border-bottom: 1.5px solid var(--ink); padding-bottom: 10px; }
.menuboard ul { margin-top: 6px; }
.menuboard li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed #d8d2c4; font-size: 15px; }
.menuboard li s { text-decoration-color: var(--red); text-decoration-thickness: 2px; color: #6b6f76; }
.menuboard li span { margin-left: auto; font-family: var(--f-body); font-size: 12px; font-weight: 800; color: var(--red); border: 1.5px solid var(--red); border-radius: 4px; padding: 1px 6px; transform: rotate(-4deg); }
.menuboard p { margin-top: 14px; font-family: var(--f-body); font-size: 13px; color: var(--ink-3); }
.menuboard img { position: absolute; width: 132px; right: -34px; top: -78px; transform: rotate(-1.2deg); }
.checks { margin-top: 30px; display: grid; gap: 16px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 15.5px; color: #d6dbe0; }
.checks li b { color: #fff; font-weight: 700; }
.checks svg { width: 20px; height: 20px; color: #7fb6e3; margin-top: 3px; }
@media (max-width: 860px) {
    .trust-grid { grid-template-columns: 1fr; }
    .menuboard { margin-top: 54px; }
    .menuboard img { width: 104px; right: -6px; top: -64px; }
}

/* 말하기 */
.speak { margin-top: clamp(40px, 6vw, 60px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.pane { background: var(--sheet); border-radius: var(--r-ui); box-shadow: var(--sh-paper); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.pane > p { color: var(--ink-2); font-size: 15.5px; }
.chat { display: grid; gap: 10px; background: var(--desk); border-radius: var(--r-ui); padding: 16px; font-size: 14.5px; }
.bub { max-width: 88%; padding: 10px 13px; border-radius: 12px; line-height: 1.55; }
.bub small { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.bub-ai { background: var(--sheet); box-shadow: var(--sh-paper); justify-self: start; }
.bub-me { background: var(--ink); color: #fff; justify-self: end; }
.bub-me small { color: #a9b0b8; }
.why { font-size: 13.5px; color: var(--ink-2); border-left: 2px solid var(--blue); padding: 2px 0 2px 12px; }
.modes { display: grid; gap: 0; border-top: 1px solid var(--rule-2); }
.modes li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule-2); font-size: 15px; font-weight: 600; }
.modes li span { color: var(--ink-3); font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.wave { display: flex; align-items: center; gap: 3px; height: 64px; padding: 0 4px; }
.wave i { flex: 1 1 0; border-radius: 2px; background: var(--blue); min-height: 4px; }
.wave i.gap { background: var(--rule); }
.wave i.stuck { background: var(--red); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.marks { display: grid; gap: 10px; }
.marks li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; font-size: 14.5px; }
.marks time { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; padding-top: 1px; }
.marks b { display: block; }
.marks .good b { color: var(--green); } .marks .bad b { color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule-2); padding-top: 14px; }
.stats div b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats div span { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 860px) { .speak { grid-template-columns: 1fr; } }

/* 수업 뒤 — 내고 · 채점하고 · 보여주기 */
.flow { margin-top: clamp(40px, 6vw, 60px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 1.5px solid var(--ink); }
.flow li { padding: 22px 22px 6px 0; position: relative; }
.flow li + li { padding-left: 22px; border-left: 1px solid var(--rule); }
.flow li::before { counter-increment: step; content: counter(step); display: block; font-family: var(--f-display); font-size: 34px; line-height: 1; color: var(--blue); margin-bottom: 14px; }
.flow h3 { margin-bottom: 6px; }
.flow p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) {
    .flow { grid-template-columns: 1fr 1fr; }
    .flow li:nth-child(3) { padding-left: 0; border-left: 0; }
    .flow li:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
    .flow { grid-template-columns: 1fr; }
    .flow li, .flow li + li { padding-left: 0; border-left: 0; }
    .flow li + li { border-top: 1px solid var(--rule); }
}

.family { margin-top: clamp(48px, 7vw, 72px); display: flex; flex-wrap: wrap; gap: 6px 2px; align-items: flex-end; }
.family figure { display: grid; justify-items: center; width: 108px; text-align: center; }
.family img { height: 84px; width: auto; object-fit: contain; }
.family figcaption { margin-top: 8px; font-size: 14px; font-weight: 700; }
.family figcaption small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }

/* 영상 */
.film { margin-top: clamp(32px, 5vw, 48px); }
.screen {
    position: relative; aspect-ratio: 16 / 9; background: #12161b; border-radius: var(--r-ui); overflow: hidden;
    box-shadow: var(--sh-lift);
}
.screen video { width: 100%; height: 100%; object-fit: cover; background: #12161b; }
.screen-cover {
    position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer;
    background: #12161b; display: grid; place-items: center;
}
.screen-cover img.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, 0.96); color: var(--ink); border-radius: 999px; padding: 12px 20px 12px 14px;
    font-weight: 700; font-size: 15.5px; box-shadow: var(--sh-lift);
}
.play i { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.play svg { width: 15px; height: 15px; margin-left: 2px; }
.play small { font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.screen-cover:hover .play { transform: translateY(-1px); }
.screen-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #c9d0d7; padding: 24px; }
.screen-empty img { width: 120px; margin: 0 auto 14px; }

/* 후기 */
.voices { margin-top: clamp(36px, 5vw, 52px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.voice { border-top: 1.5px solid var(--ink); padding-top: 20px; }
.voice blockquote { margin: 0; font-size: 16.5px; line-height: 1.75; }
.voice figcaption { margin-top: 16px; font-size: 14px; font-weight: 700; }
.voice figcaption span { display: block; font-weight: 500; color: var(--ink-3); font-size: 13px; }
@media (max-width: 860px) { .voices { grid-template-columns: 1fr; } }

/* 도입 — 먼저 보고, 궁금한 것만 */
.adopt { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.steps { margin-top: 30px; display: grid; gap: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--rule); }
.steps li::before {
    counter-increment: s; content: counter(s);
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--rule); font-weight: 800; font-size: 14px; color: var(--blue);
}
.steps b { display: block; font-size: 16px; }
.steps span { color: var(--ink-2); font-size: 14.5px; }
.adopt-aside { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.form {
    background: var(--sheet); border-radius: var(--r-ui); box-shadow: var(--sh-paper);
    padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px;
}
.form-title { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: grid; gap: 7px; min-width: 0; }
.fld > span, .fld legend { font-size: 13.5px; font-weight: 700; color: var(--ink-2); padding: 0; }
.fld .req { color: var(--red); margin-left: 3px; }
.fld input, .fld select, .fld textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--ink);
    background: var(--desk); border: 1.5px solid transparent; border-radius: var(--r-ui);
    padding: 12px 14px; min-height: 48px; transition: border-color 0.15s, background-color 0.15s;
    -webkit-appearance: none; appearance: none;
}
.fld textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.fld select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23868c95' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.fld select:invalid { color: var(--ink-3); }
.fld input::placeholder, .fld textarea::placeholder { color: #a3a9b1; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--blue); background: var(--sheet); }
.fld [aria-invalid='true'] { border-color: var(--red); background: var(--sheet); }
.err { font-size: 12.5px; color: var(--red); font-weight: 600; min-height: 0; }
.err:empty { display: none; }
fieldset.fld { border: 0; margin: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 999px;
    background: var(--desk); font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
    box-shadow: inset 0 0 0 1.5px transparent; transition: background-color 0.15s, color 0.15s;
}
.chips input:checked + span { background: var(--ink); color: #fff; }
.chips input:focus-visible + span { outline: 2.5px solid var(--blue); outline-offset: 2px; }
.agree { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; }
.form-status { font-size: 14px; font-weight: 600; text-align: center; }
.form-status:empty { display: none; }
.form-status.err-msg { color: var(--red); }
.form [hidden] { display: none !important; }
.form-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 26px 8px; }
.form-done img { width: 110px; }
.form-done b { font-size: 19px; letter-spacing: -0.02em; }
.form-done p { color: var(--ink-2); font-size: 15px; max-width: 26em; }
@media (max-width: 860px) { .adopt { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

/* 학부모 — 입학 테스트 */
.parents { background: var(--desk-2); }
.parents-note { margin-top: 24px; display: grid; gap: 10px; }
.parents-note li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 15px; color: var(--ink-2); }
.parents-note svg { width: 18px; height: 18px; color: var(--blue); margin-top: 3px; }

/* 끝 */
.end { text-align: left; }
.end .h2 { max-width: 14em; }
.end-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.foot { background: #1d2126; color: #aeb5bd; padding: 56px 0 40px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot .brand b { color: #fff; }
.foot p { margin-top: 12px; max-width: 24em; }
.foot h2 { font-size: 13px; color: #fff; font-weight: 700; margin-bottom: 10px; }
.foot li { padding: 4px 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.biz { margin-top: 40px; padding-top: 20px; border-top: 1px solid #343a41; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; }
.biz b { color: #d9dee3; font-weight: 600; margin-right: 6px; }
.copy { margin-top: 18px; font-size: 12.5px; color: #7e868f; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* 움직임을 줄이고 싶은 분 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
    .pen-draw path { stroke-dashoffset: 0; }
    .stamp { opacity: 0.92; }
}

.screen-err { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px 16px; background: rgba(18, 22, 27, 0.92); color: #e3e7eb; font-size: 14px; }

/* 말하기 — 실제 목소리 들어 보기 */
.pane-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.listen {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px 0 11px;
    border: 0; border-radius: 999px; background: var(--desk); color: var(--ink); cursor: pointer;
    font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.listen:hover { background: var(--desk-2); }
.listen svg { width: 13px; height: 13px; }
.listen .i-pause { display: none; }
.listen[aria-pressed='true'] { background: var(--ink); color: #fff; }
.listen[aria-pressed='true'] .i-play { display: none; }
.listen[aria-pressed='true'] .i-pause { display: block; }

/* 지금 말하는 줄 — 목소리와 화면이 같은 곳을 가리킨다 */
.bub, .marks li { transition: box-shadow 0.2s, background-color 0.2s; }
.bub-ai.speaking { box-shadow: 0 0 0 2px var(--blue), var(--sh-paper); }
.bub-me.speaking { box-shadow: 0 0 0 2px #7fb6e3; }
.marks li { padding: 6px 8px; margin: 0 -8px; border-radius: 8px; }
.marks li.speaking { background: var(--blue-wash); }
.wave { position: relative; }
.playhead { position: absolute; top: 2px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--ink); left: 0; pointer-events: none; }
