/* GAMEBOY.KR AI 강의실
   공책과 교과서에서 가져온 화면: 보라 잉크, 형광펜(핵심 문장), 인주 도장(다 읽은 강의).
   40대 이상 휴대폰 독자 기준으로 본문 18px 부터, 글자 크기 단추로 112.5%, 125% 까지 키운다. */

:root {
    --paper: #f6f4fb;
    --sheet: #ffffff;
    --ink: #221a33;
    --ink-2: #4c4460;
    --ink-3: #686179;
    --line: #e4e0ef;
    --line-2: #cbc4de;
    --violet: #6a1bc0;
    --violet-deep: #52109a;
    --violet-wash: #f1e9fc;
    --on-violet: #ffffff;
    --marker: #ffe45e;
    --stamp: #c8284a;
    --note: #1f5fbf;
    --note-wash: #ebf2fd;
    --tip: #157656;
    --tip-wash: #e6f4ee;
    --warn: #935000;
    --warn-wash: #fdf1df;
    --caution: #b3261e;
    --caution-wash: #fceceb;
    --shadow: 0 1px 0 rgba(60, 30, 110, .04), 0 14px 32px -22px rgba(60, 30, 110, .45);
    --font-text: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    --font-display: "Hahmlet", "Noto Serif KR", "AppleMyungjo", serif;
    --measure: 42rem;
    --wide: 74rem;
    --gutter: 1rem;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #16131f;
        --sheet: #1e1a2a;
        --ink: #efebf7;
        --ink-2: #c6bfd6;
        --ink-3: #a19ab3;
        --line: #2f2a3f;
        --line-2: #453e5a;
        --violet: #c3a0ff;
        --violet-deep: #d6bdff;
        --violet-wash: #2b2244;
        --on-violet: #1a1030;
        --marker: rgba(255, 222, 80, .32);
        --stamp: #ff7088;
        --note: #93b9ff;
        --note-wash: #1b2538;
        --tip: #79d4ae;
        --tip-wash: #152a21;
        --warn: #f2b763;
        --warn-wash: #2e2313;
        --caution: #ff9890;
        --caution-wash: #341b1a;
        --shadow: 0 14px 32px -22px rgba(0, 0, 0, .8);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html[data-size="l"] { font-size: 112.5%; }
html[data-size="xl"] { font-size: 125%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1.125rem;
    line-height: 1.75;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-wrap: pretty;
}



img { max-width: 100%; height: auto; }
a { color: var(--violet); }
button { font: inherit; }
::selection { background: var(--marker); color: var(--ink); }

:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
    border-radius: 6px;
}

.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;
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: .75rem 1rem;
    background: var(--violet);
    color: var(--on-violet);
    font-weight: 700;
    border-radius: 10px;
}
.skip:focus { top: .75rem; }

/* ---------- 위 막대 ---------- */

.topbar {
    background: var(--sheet);
    border-bottom: 1px solid var(--line);
}
.topbar-in {
    max-width: var(--wide);
    margin: 0 auto;
    padding: .5rem var(--gutter);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .875rem;
    min-height: 3.75rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--ink-3);
    font-weight: 800;
    font-size: .875rem;
    letter-spacing: .02em;
    text-decoration: none;
    min-width: 44px;
    min-height: 44px;
}
.brand img { border-radius: 8px; display: block; }
.brand span { display: none; }
.room {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1875rem;
    color: var(--ink);
    text-decoration: none;
    padding-left: .875rem;
    border-left: 1px solid var(--line-2);
    line-height: 1.3;
    white-space: nowrap;
}
.textsize {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: var(--paper);
}
.textsize button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-2);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.textsize button[data-size="m"] { font-size: 14px; }
.textsize button[data-size="l"] { font-size: 18px; }
.textsize button[data-size="xl"] { font-size: 22px; }
.textsize button[aria-pressed="true"] { background: var(--sheet); color: var(--violet); box-shadow: inset 0 0 0 2px var(--violet); }

@media (min-width: 640px) {
    .brand span { display: inline; }
}

/* 강의실 메뉴: 휴대폰에서는 둘째 줄, 넓은 화면에서는 강의실 이름 옆 */
.roomnav {
    order: 3;
    display: flex;
    gap: .25rem;
    width: calc(100% + .5rem);
    margin: 0 -.25rem;
    overflow-x: auto;
}
.roomnav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    color: var(--ink-2);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
}
.roomnav a.on { background: var(--violet-wash); color: var(--violet); }
@media (hover: hover) {
    .roomnav a:hover { color: var(--violet); }
}
@media (min-width: 768px) {
    .roomnav { order: 0; width: auto; margin: 0 0 0 .25rem; overflow: visible; }
}

/* ---------- 공통 조각 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: .5rem 1.375rem;
    border: 1.5px solid var(--line-2);
    border-radius: 999px;
    background: var(--sheet);
    color: var(--ink);
    font-weight: 700;
    font-size: 1.0625rem;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--on-violet);
}

.actions { display: flex; flex-wrap: wrap; gap: .625rem; }

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem 1.5rem;
    margin: 0;
}
.facts div { display: flex; gap: .5rem; align-items: baseline; }
.facts dt { color: var(--ink-3); font-size: .9375rem; }
.facts dd { margin: 0; font-weight: 700; font-size: .9375rem; }
.facts + .actions { margin-top: 1.75rem; }
@media (max-width: 639px) {
    .course-hero .facts {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        gap: .25rem 1rem;
        align-items: baseline;
    }
    .course-hero .facts div { display: contents; }
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    font-size: .9375rem;
    color: var(--ink-3);
}
.crumbs > * { display: inline-flex; align-items: center; min-height: 2.75rem; }
.crumbs a {
    color: var(--ink-2);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: .2em;
}
.crumbs a:hover { color: var(--violet); text-decoration-color: currentColor; }
.crumbs > * + *::before {
    content: "/";
    content: "/" / "";
    margin-right: .5rem;
    color: var(--line-2);
}

.course-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.015em;
    text-wrap: balance;
}
.course-title a { color: inherit; text-decoration: none; }
.course-title a:hover { color: var(--violet); }
.course-summary {
    margin: .875rem 0 1.25rem;
    color: var(--ink-2);
    font-size: 1.1875rem;
    line-height: 1.6;
}

.progress {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0 0;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--ink-2);
}
.progress[hidden] { display: none; }
.progress-bar {
    flex: 0 0 7rem;
    height: .5rem;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}
.progress-bar span { display: block; height: 100%; background: var(--stamp); border-radius: inherit; }

.section-title {
    margin: 0 0 .25rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.625rem;
    line-height: 1.3;
}

/* ---------- 목차 (첫 화면, 과정, 강의 옆) ---------- */

.course-toc {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: .75rem 1.25rem 1.25rem;
    box-shadow: var(--shadow);
}
.toc-part-name {
    margin: 1.25rem 0 0;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.35;
}
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li + li { border-top: 1px solid var(--line); }
.toc-list a {
    display: grid;
    grid-template-columns: 3.75rem minmax(0, 1fr) 1.75rem;
    gap: .75rem;
    align-items: start;
    padding: .875rem .375rem;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
}
.toc-label {
    padding-top: .1em;
    color: var(--violet);
    font-weight: 800;
    font-size: .9375rem;
    white-space: nowrap;
}
.toc-title {
    display: block;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.45;
}
.toc-summary {
    display: block;
    margin-top: .125rem;
    color: var(--ink-3);
    font-size: .9375rem;
    line-height: 1.55;
}

/* 휴대폰: 이름표(1강, 준비)를 제목 위로 올려 글이 화면 폭을 다 쓰게 한다 */
@media (max-width: 639px) {
    .course-toc { padding: .5rem 1rem 1rem; border-radius: 18px; }
    .course-toc .toc-list a {
        grid-template-columns: minmax(0, 1fr) 1.5rem;
        gap: .125rem .75rem;
        padding: .875rem .125rem;
    }
    .course-toc .toc-label { grid-column: 1; grid-row: 1; padding: 0; font-size: .875rem; line-height: 1.4; }
    .course-toc .toc-text { grid-column: 1; grid-row: 2; }
    .course-toc .done-mark { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 1.5rem; height: 1.5rem; }
}

/* 다 읽은 강의: 작은 도장 */
.done-mark {
    width: 1.625rem;
    height: 1.625rem;
    margin-top: .1rem;
    border-radius: 50%;
}
.is-done .done-mark {
    border: 2px solid var(--stamp);
    transform: rotate(-12deg);
}
.is-done .done-mark::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: var(--stamp);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 62% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 62% no-repeat;
}

/* ---------- 첫 화면 ---------- */

.hub-hero {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 3rem var(--gutter) 2.5rem;
}
.hub-title {
    margin: 0;
    max-width: 12em;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.625rem, 10vw, 5.25rem);
    line-height: 1.08;
    letter-spacing: -.025em;
    text-wrap: balance;
}
.hub-lead {
    max-width: 52rem;
    margin-top: 1.25rem;
    color: var(--ink-2);
    font-size: 1.25rem;
    line-height: 1.65;
}
.hub-lead p { margin: 0; }
.hub-lead p + p { margin-top: .75rem; }

.continue {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .875rem;
    margin: 1.75rem 0 0;
    padding: .5rem .5rem .5rem 1.25rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.continue { border-radius: 999px; }
.continue[hidden] { display: none; }
@media (max-width: 639px) {
    .continue { display: grid; justify-items: start; gap: .375rem; padding: .75rem; border-radius: 28px; }
    .continue-label { padding: 0 .5rem; }
    .continue-link { border-radius: 16px; }
}
.continue-label { color: var(--ink-3); font-size: .9375rem; font-weight: 700; }
.continue-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .375rem 1.125rem;
    border-radius: 999px;
    background: var(--violet);
    color: var(--on-violet);
    font-weight: 800;
    text-decoration: none;
    line-height: 1.35;
}

@media (min-width: 960px) {
    .hub-hero { padding-top: 4.5rem; padding-bottom: 2.5rem; }
}

/* 첫 화면 바로 가기: 무료 강의, 유료 강의, 강의 문의 */
.hub-jump {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}
.hub-jump a {
    display: flex;
    flex-direction: column;
    min-width: 9.5rem;
    padding: .75rem 1.125rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
}
.jump-name { font-weight: 800; font-size: 1.0625rem; line-height: 1.4; }
.jump-count { color: var(--ink-3); font-size: .875rem; font-weight: 600; line-height: 1.4; }

/* ---------- 강의 목록 (카드) ---------- */

.catalog {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 1.5rem var(--gutter) 3rem;
    scroll-margin-top: .5rem;
}
.catalog-head { display: grid; gap: .5rem; max-width: 46rem; margin-bottom: 1.5rem; }
.catalog-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.875rem, 5vw, 2.5rem);
    line-height: 1.2;
    letter-spacing: -.01em;
}
.catalog-desc { margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; }
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.course-grid > li { display: flex; }
/* 과정이 하나뿐인 칸은 넓은 가로 카드로 (빈 칸이 길게 남지 않게) */
@media (min-width: 768px) {
    .course-grid:has(> li:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 54rem; }
    .course-grid > li:only-child .course-card { flex-direction: row; }
    .course-grid > li:only-child .card-cover { flex: 0 0 40%; min-height: 15rem; }
    .course-grid > li:only-child .cover-title { font-size: 2.5rem; }
    .course-grid > li:only-child .card-body { padding: 1.5rem 1.75rem; }
    .course-grid > li:only-child .card-title { font-size: 1.5rem; }
}

.course-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.course-card:focus-within { outline: 3px solid var(--violet); outline-offset: 3px; }
.card-link { color: inherit; text-decoration: none; }
.card-link:focus-visible { outline: 0; }
/* 카드 어디를 눌러도 과정으로 간다 (링크는 제목 하나) */
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* 표지: 천으로 싼 공책. 왼쪽 책등, 옅은 줄, 과정마다 다른 색 */
.card-cover, .hero-cover {
    --c1: #3b0f80;
    --c2: #6d28d9;
    position: relative;
    display: grid;
    align-content: space-between;
    gap: 1rem;
    min-height: 10.5rem;
    padding: 1rem 1.25rem 1.125rem 1.75rem;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .2) 0 .5rem, rgba(255, 255, 255, .12) .5rem calc(.5rem + 1px), transparent calc(.5rem + 1px)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 1.75rem),
        linear-gradient(135deg, var(--c2), var(--c1));
}
.cover-violet { --c1: #3b0f80; --c2: #6d28d9; }
.cover-blue { --c1: #172e6e; --c2: #2c52b0; }
.cover-green { --c1: #103a26; --c2: #1f6b45; }
.cover-teal { --c1: #0d3a38; --c2: #186a64; }
.cover-rose { --c1: #661030; --c2: #a8264b; }
.cover-amber { --c1: #5f2906; --c2: #9a4a0c; }
.cover-tags { display: flex; flex-wrap: wrap; gap: .375rem; }
.cover-tag {
    padding: .125rem .625rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: #1d1530;
    font-size: .875rem;
    font-weight: 800;
    line-height: 1.5;
}
.cover-tag-soon { background: #ffe45e; color: #3a2a00; }
.cover-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.cover-level {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    padding: .0625rem .625rem;
    border: 1.5px solid rgba(255, 255, 255, .75);
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.5;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .625rem;
    padding: 1.125rem 1.25rem 1.25rem;
}
.card-title { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.4; }
.card-summary { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.6; }
.card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .875rem;
    margin: auto 0 0;
    padding-top: .75rem;
    border-top: 1px dashed var(--line-2);
}
.card-price { color: var(--ink); font-weight: 800; font-size: 1.0625rem; }
.card-extra { color: var(--ink-3); font-size: .9375rem; font-weight: 600; }
.course-card .progress { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: .375rem; margin: 0; padding: 0; list-style: none; }
.chip {
    padding: .1875rem .625rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.5;
}
.chip-free { background: var(--tip-wash); border-color: transparent; color: var(--tip); }
.chip-paid { background: var(--violet-wash); border-color: transparent; color: var(--violet); }
.chip-soon { background: var(--warn-wash); border-color: transparent; color: var(--warn); }

/* ---------- 강사 소개, 문의 띠 ---------- */

.hub-bottom {
    display: grid;
    gap: 2rem;
    max-width: var(--wide);
    margin: 0 auto;
    padding: 1rem var(--gutter) 4rem;
}
@media (min-width: 1024px) {
    .hub-bottom { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
}
.teacher { scroll-margin-top: .5rem; }
.teacher-card {
    position: relative;
    padding: 1.5rem 1.5rem 1.25rem 1.75rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.teacher-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--violet);
}
.teacher-kicker { margin: 0; color: var(--violet); font-weight: 800; font-size: .9375rem; }
.teacher-headline {
    margin: .25rem 0 1rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.3;
    text-wrap: balance;
}
.teacher-body { max-width: none; font-size: 1.0625rem; }
.teacher-body h3 { margin-top: 1.5rem; font-size: 1.125rem; }

.ask {
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--violet-wash);
    border-radius: 22px;
}
.ask-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.3; }
.ask-desc { margin: .5rem 0 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; }

/* ---------- 과정 페이지 ---------- */

.course-page {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 1.25rem var(--gutter) 4rem;
}
.course-hero { max-width: 46rem; padding: 2rem 0 2.75rem; }
.hero-cover { min-height: 7rem; margin-bottom: 1.25rem; border-radius: 20px; align-content: end; }
.hero-cover .cover-title { font-size: 1.75rem; }
.course-hero .chips { margin-bottom: .875rem; }
.course-hero .course-title { font-size: clamp(2.5rem, 9vw, 4.25rem); }
.course-body { display: grid; gap: 3.5rem; }
.course-body .course-toc { max-width: 56rem; }
.course-toc .section-title { margin-top: .5rem; }
.course-intro { max-width: 46rem; }
.course-intro .prose { margin-top: 1rem; max-width: none; }

/* 넓은 화면: 첫 화면과 같은 짜임. 왼쪽에 과정 머리를 붙여 두고, 오른쪽에 안내와 목차 */
@media (min-width: 1024px) {
    .course-page {
        display: grid;
        grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
        column-gap: 4rem;
        align-items: start;
    }
    .course-page > .crumbs { grid-column: 1 / -1; }
    .course-hero { max-width: none; padding: 1.5rem 0 0; }
    .course-hero .course-title { font-size: 3rem; }
    .course-hero .facts {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        gap: .25rem 1rem;
        align-items: baseline;
    }
    .course-hero .facts div { display: contents; }
    .course-body { padding-top: 1.5rem; }
    .course-intro, .course-body .course-toc { max-width: none; }
}
/* 머리가 화면보다 길면 붙여 두지 않는다 (아래가 잘려 안 보이므로) */
@media (min-width: 1024px) and (min-height: 880px) {
    .course-hero { position: sticky; top: 1.5rem; }
}
/* 1024~1279: 왼쪽 머리 칸을 줄여 오른쪽 목차 글이 덜 꺾이게 */
@media (min-width: 1024px) and (max-width: 1279px) {
    .course-page { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); column-gap: 3rem; }
}


/* ---------- 강의 페이지 ---------- */

.lesson-shell {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.rail {
    margin-top: 1rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 18px;
}
.rail-summary {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: .75rem 3rem .75rem 1.125rem;
    list-style: none;
    cursor: pointer;
}
.rail-summary::-webkit-details-marker { display: none; }
.rail-summary:focus-visible { outline-offset: -4px; border-radius: 16px; }
.rail-summary::after {
    content: "";
    position: absolute;
    right: 1.125rem;
    top: 50%;
    width: .625rem;
    height: .625rem;
    margin-top: -.45rem;
    border-right: 2px solid var(--ink-2);
    border-bottom: 2px solid var(--ink-2);
    transform: rotate(45deg);
    transition: transform .2s;
}
.rail[open] .rail-summary::after { transform: rotate(-135deg); margin-top: -.1rem; }
.rail-kicker { color: var(--violet); font-weight: 800; font-size: .875rem; }
.rail-course { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.35; }
.rail-body { padding: 0 .75rem 1rem; }
.rail-home {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    margin: 0 .375rem;
    font-size: .9375rem;
    font-weight: 700;
}
.rail .progress { margin: .75rem .375rem 0; }
.rail .toc-part-name {
    margin: 1.125rem .375rem .25rem;
    padding: 0;
    border: 0;
    font-family: var(--font-text);
    font-size: .875rem;
    font-weight: 800;
    color: var(--ink-3);
}
.rail .toc-list li + li { border-top: 0; }
.rail .toc-list a {
    grid-template-columns: 3rem minmax(0, 1fr) 1.375rem;
    gap: .5rem;
    padding: .5rem .5rem;
}
.rail .toc-label { font-size: .875rem; }
.rail .toc-title { font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.rail .done-mark { width: 1.25rem; height: 1.25rem; }
.rail .is-current a { background: var(--violet-wash); }
.rail .is-current .toc-title { color: var(--violet); font-weight: 800; }

.lesson {
    min-width: 0;
    max-width: var(--measure);
    padding: 1.5rem 0 4rem;
}
.lesson-head { margin: 1.75rem 0 2.25rem; }
.lesson-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .625rem;
    margin: 0 0 .875rem;
}
.lesson-label {
    padding: .125rem .75rem;
    border-radius: 999px;
    background: var(--violet);
    color: var(--on-violet);
    font-weight: 800;
    font-size: .9375rem;
}
.lesson-part { color: var(--ink-3); font-weight: 700; font-size: .9375rem; }
.lesson-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.125rem, 8vw, 3.375rem);
    line-height: 1.18;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.lesson-summary {
    margin: 1rem 0 1.125rem;
    color: var(--ink-2);
    font-size: 1.25rem;
    line-height: 1.6;
}

.on-page {
    margin: 0 0 2.75rem;
    padding: .25rem 0 .25rem 1.125rem;
    border-left: 3px solid var(--violet);
}
.on-page-title { margin: 0 0 .25rem; color: var(--violet); font-weight: 800; font-size: 1rem; }
.on-page-list { margin: 0; padding: 0; list-style: none; }
.on-page-list a {
    display: block;
    padding: .55rem 0;
    color: var(--ink-2);
    font-size: 1.0625rem;
    line-height: 1.5;
    text-decoration: none;
}
.on-page-list a:hover { color: var(--violet); text-decoration: underline; }
@media (pointer: fine) {
    .on-page-list a { padding: .3rem 0; }
}
@media (min-width: 768px) {
    .on-page-list:has(> li:nth-child(6)) { columns: 2; column-gap: 2.5rem; }
    .on-page-list li { break-inside: avoid; }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .lesson-shell { max-width: calc(var(--measure) + 2 * var(--gutter)); }
}
@media (max-width: 1023px) {
    .lesson > .crumbs { display: none; }
    .lesson { padding-top: .5rem; }
}
@media (min-width: 1024px) {
    .lesson-shell {
        display: grid;
        grid-template-columns: 19rem minmax(0, 1fr);
        gap: 3.5rem;
        align-items: start;
    }
    .rail {
        position: sticky;
        top: 1rem;
        margin-top: 1.5rem;
        max-height: calc(100vh - 2rem);
        overflow: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--line-2) transparent;
    }
    /* 목차를 감싼 nav 가 본문 높이만큼 늘어나야 안쪽 목차가 따라 내려온다(sticky) */
    .rail-nav { align-self: stretch; }
    .rail-summary {
        position: sticky;
        top: 0;
        z-index: 1;
        padding-right: 1.125rem;
        background: var(--sheet);
        border-bottom: 1px solid var(--line);
        border-radius: 18px 18px 0 0;
        cursor: default;
    }
    .rail-summary::after { display: none; }
    .rail-body { padding-top: .5rem; }
    .lesson { padding-top: 1.75rem; }
}

@media (min-width: 1280px) {
    .lesson-shell { gap: 2.5rem; }
    .lesson {
        max-width: none;
        display: grid;
        grid-template-columns: minmax(0, var(--measure)) minmax(9rem, 1fr);
        column-gap: 2.5rem;
        align-items: start;
    }
    .lesson > * { grid-column: 1; }
    .lesson > .on-page {
        grid-column: 2;
        grid-row: 2 / span 5;
        position: sticky;
        top: 1.5rem;
        margin: 1.75rem 0 0;
    }
    .lesson > .on-page .on-page-list { columns: auto; }
    .lesson > .on-page .on-page-list a { font-size: .9375rem; padding: .3rem 0; }
}

/* ---------- 본문 ---------- */

.prose { max-width: var(--measure); }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.25rem; }
.prose p { text-wrap: pretty; }
.prose > p + ul, .prose > p + ol, .prose > p + .prompt { margin-top: .75rem; }

.prose h2 {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.625rem, 5vw, 2rem);
    line-height: 1.3;
    letter-spacing: -.01em;
    text-wrap: balance;
    scroll-margin-top: 1rem;
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 {
    margin-top: 2.25rem;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.45;
    scroll-margin-top: 1rem;
}
.prose h2 + *, .prose h3 + * { margin-top: .875rem; }

.prose ul { padding-left: 1.375rem; }
.prose ul > li::marker { color: var(--violet); }
.prose li + li { margin-top: .5rem; }
.prose strong { font-weight: 800; }
.prose a {
    color: var(--violet);
    text-decoration: underline;
    text-decoration-thickness: from-font;
    text-underline-offset: .2em;
}
.prose a:hover { color: var(--violet-deep); }
.prose a.ext::after {
    content: "";
    display: inline-block;
    width: .75em;
    height: .75em;
    margin-left: .2em;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5h10v10M19 5L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5h10v10M19 5L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose code {
    padding: .1em .35em;
    border-radius: 6px;
    background: var(--violet-wash);
    font-family: inherit;
    font-size: .95em;
}
.prose img { border-radius: 14px; border: 1px solid var(--line); }

/* 따라 하기 단계 */
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; }
.prose ol.steps > li {
    position: relative;
    counter-increment: step;
    min-height: 2.375rem;
    padding-left: 3.25rem;
}
.prose ol.steps > li + li { margin-top: 1rem; }
.prose ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -.1rem;
    display: grid;
    place-items: center;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 50%;
    background: var(--violet-wash);
    color: var(--violet);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1;
}
.prose ol.steps > li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(1.1875rem - 1px);
    top: 2.5rem;
    bottom: -.875rem;
    width: 2px;
    background: var(--line);
}

/* 강조 상자: 교과서 상자처럼 위에 이름표 */
.callout {
    --tone: var(--note);
    --wash: var(--note-wash);
    position: relative;
    margin-top: 2.5rem !important;
    padding: 1.375rem 1.25rem 1.25rem;
    background: var(--wash);
    border-radius: 4px 20px 20px 20px;
}
.callout-tip { --tone: var(--tip); --wash: var(--tip-wash); }
.callout-warning { --tone: var(--warn); --wash: var(--warn-wash); }
.callout-caution { --tone: var(--caution); --wash: var(--caution-wash); }
.callout-title {
    margin: -2.5rem 0 .75rem -1.25rem;
    font-size: 1rem;
    line-height: 2.125;
}
.callout-title span {
    display: inline;
    padding: .3rem .875rem;
    border-radius: 12px 12px 12px 0;
    background: var(--tone);
    color: var(--sheet);
    font-weight: 800;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.callout-body { font-size: 1.0625rem; line-height: 1.7; }
.callout-body > * { margin: 0; }
.callout-body > * + * { margin-top: .75rem; }
.callout-body ul { padding-left: 1.25rem; }
.callout-body ul > li::marker { color: var(--tone); }
.callout-body li + li { margin-top: .4rem; }
.callout-body a { color: inherit; font-weight: 700; }

/* 핵심: 형광펜 */
.callout-important {
    background: transparent;
    border: 2px solid var(--violet);
}
.callout-important .callout-title { margin-left: calc(-1.25rem - 2px); }
.callout-important .callout-title span { background: var(--violet); color: var(--on-violet); }
.callout-important .callout-body ul { list-style: none; padding: 0; }
.callout-important .callout-body .key {
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.3125rem;
    line-height: 1.6;
}
.callout-important .callout-body li + li { margin-top: .625rem; }
.callout-important .hl {
    background: linear-gradient(transparent 56%, var(--marker) 56%, var(--marker) 94%, transparent 94%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.callout-important .callout-body { color: var(--ink-2); }

/* 프롬프트: AI 앱 입력창처럼 */
.prompt {
    display: grid;
    gap: .625rem;
    margin-inline: 0;
    padding: 1rem 1rem 1rem 1.25rem;
    background: var(--sheet);
    border: 1.5px solid var(--line-2);
    border-radius: 24px 24px 24px 8px;
    box-shadow: var(--shadow);
}
.prompt-head { display: flex; align-items: baseline; gap: .5rem; }
.prompt-head::before {
    content: "AI";
    padding: .125rem .4rem;
    border-radius: 6px;
    background: var(--violet);
    color: var(--on-violet);
    font-size: .875rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.4;
}
.prompt-label { color: var(--violet); font-weight: 800; font-size: .9375rem; line-height: 1.45; }
.prompt-text p { margin: 0; font-size: 1.125rem; line-height: 1.7; }
.prompt-text p + p { margin-top: .625rem; }
.prompt-text p[lang="en"] { color: var(--ink-3); font-size: 1rem; line-height: 1.6; }
.prompt-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .25rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
}
.prompt-copy {
    min-width: 7.5rem;
    min-height: 2.75rem;
    padding: .375rem 1.125rem;
    border: 1.5px solid var(--violet);
    border-radius: 999px;
    background: var(--violet);
    color: var(--on-violet);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.3;
    cursor: pointer;
}
.prompt-copy[data-copy="en"] { background: transparent; color: var(--violet); }
.prompt-copy.is-done { background: var(--tip); border-color: var(--tip); color: var(--sheet); }

/* 표 */
.table-wrap:focus-visible { outline-offset: 2px; }
.table-wrap {
    overflow-x: auto;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 16px;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    line-height: 1.6;
}
.prose th {
    padding: .75rem 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line-2);
    color: var(--ink-2);
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}
.prose td {
    padding: .8125rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 700; }
@media (min-width: 640px) {
    /* '앱, 한국어' 같은 짧은 이름이 두 줄로 꺾이지 않게 첫 칸 최소 폭 */
    .prose .table-kv td:first-child::before { content: ""; display: block; width: 6.5em; }
}

@media (max-width: 639px) {
    .table-wrap { overflow: visible; background: none; border: 0; border-radius: 0; }
    .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
    .prose thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }
    .prose tr {
        padding: .875rem 1rem;
        background: var(--sheet);
        border: 1px solid var(--line);
        border-radius: 16px;
    }
    .prose tr + tr { margin-top: .625rem; }
    .prose td { padding: 0; border: 0; }
    .prose td:first-child { font-size: 1.0625rem; color: var(--ink); }
    .prose td + td { margin-top: .375rem; }
    .table-wrap:has(> .table-kv) { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; }
    .prose .table-kv tr { background: none; border: 0; border-radius: 0; }
    .prose .table-kv tr + tr { margin-top: 0; border-top: 1px solid var(--line); }
    .prose .table-grid td + td::before {
        content: attr(data-label);
        display: block;
        color: var(--ink-3);
        font-size: .875rem;
        font-weight: 800;
    }
}

/* 스스로 확인하기 체크 목록 */
.checklist {
    padding: 1.25rem 1.25rem 1rem;
    background: var(--sheet);
    border: 2px solid var(--line-2);
    border-radius: 20px;
}
.checklist.is-complete { border-color: var(--tip); }
.checklist-title {
    margin: 0 0 .25rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1875rem;
    line-height: 1.4;
}
.prose .tasks { list-style: none; margin: 0; padding: 0; }
.prose .tasks li + li { margin-top: 0; border-top: 1px dashed var(--line-2); }
.task {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    min-height: 2.75rem;
    padding: .75rem 0;
    cursor: pointer;
}
.task input {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 1.625rem;
    height: 1.625rem;
    margin: .125rem 0 0;
    border: 2px solid var(--violet);
    border-radius: 7px;
    background: var(--sheet);
    cursor: pointer;
}
.task input::before {
    content: "";
    width: 1rem;
    height: 1rem;
    background: var(--on-violet);
    transform: scale(0);
    transition: transform .12s;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.task input:checked { background: var(--violet); }
.task input:checked::before { transform: scale(1); }
.task-text { line-height: 1.6; }
.checklist-count { margin: .5rem 0 0; color: var(--ink-3); font-size: .9375rem; font-weight: 700; }
.checklist-count:empty { display: none; }
.checklist.is-complete .checklist-count { color: var(--tip); }

/* 영상 카드 */
.prose .video-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
    gap: 1rem;
}
.prose .video-list li { margin: 0; }
.video-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 16px;
    color: inherit !important;
    text-decoration: none !important;
}
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; }
.video-thumb::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3.25rem;
    height: 3.25rem;
    margin: -1.625rem 0 0 -1.625rem;
    border-radius: 50%;
    background: rgba(20, 10, 40, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23fff'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.video-title { padding: .875rem 1rem 0; font-weight: 800; font-size: 1.0625rem; line-height: 1.45; }
.video-note { padding: .25rem 1rem 1rem; color: var(--ink-3); font-size: .9375rem; line-height: 1.5; }

/* ---------- 다 읽음 도장 ---------- */

.finish { margin-top: 4.5rem; }
.finish-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--sheet);
    border: 1.5px dashed var(--line-2);
    border-radius: 20px;
}
.finish-card.is-stamped { border-style: solid; border-color: var(--line); }
.finish-text { display: grid; justify-items: start; gap: .875rem; }
.finish-q { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.3125rem; line-height: 1.4; }
.finish-note { margin: 0; color: var(--ink-3); font-size: .875rem; line-height: 1.5; }
.stamp {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 6.5rem;
    height: 6.5rem;
    border: 3px dashed var(--line-2);
    border-radius: 50%;
    color: var(--line-2);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.2;
    text-align: center;
    transform: rotate(-12deg);
}
.stamp::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    opacity: 0;
}
.stamp span { white-space: nowrap; letter-spacing: -.03em; opacity: .55; }
.is-stamped .stamp {
    border-style: solid;
    border-color: var(--stamp);
    color: var(--stamp);
}
.is-stamped .stamp::before { opacity: 1; }
.is-stamped .stamp span { opacity: 1; }
.is-stamped.animate .stamp { animation: stamp-press .5s cubic-bezier(.2, 1.4, .35, 1); }
@keyframes stamp-press {
    0% { transform: rotate(-12deg) scale(1.7); opacity: 0; }
    55% { transform: rotate(-12deg) scale(.93); opacity: 1; }
    100% { transform: rotate(-12deg) scale(1); }
}
@media (prefers-color-scheme: light) {
    .is-stamped .stamp { mix-blend-mode: multiply; }
}

/* ---------- 이전, 다음 ---------- */

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1.5rem;
}
.pager-link {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-height: 5.5rem;
    padding: 1rem 1.25rem;
    background: var(--sheet);
    border: 1.5px solid var(--line-2);
    border-radius: 20px;
    color: var(--ink);
    text-decoration: none;
}
.pager-next {
    align-items: flex-end;
    text-align: right;
    background: var(--violet-wash);
    border-color: var(--violet);
    color: var(--ink);
}
.pager-next .pager-dir { color: var(--violet); opacity: 1; }
.finish:has(.is-stamped) + .pager .pager-next { background: var(--violet); color: var(--on-violet); }
.finish:has(.is-stamped) + .pager .pager-next .pager-dir { color: inherit; opacity: .8; }
.pager-prev { grid-column: 1; grid-row: 1; }
.pager-next { grid-column: 2; grid-row: 1; }
.pager-dir { font-size: .875rem; font-weight: 700; opacity: .8; }
.pager-title { font-weight: 800; font-size: 1.0625rem; line-height: 1.4; }

@media (max-width: 520px) {
    .pager { grid-template-columns: 1fr; }
    .pager-prev, .pager-next { grid-column: auto; grid-row: auto; }
    .pager-next { align-items: flex-start; text-align: left; }
    .finish-card { gap: 1.125rem; padding: 1.25rem; }
    .stamp { width: 5.75rem; height: 5.75rem; font-size: .9375rem; }
}

/* ---------- 아래 ---------- */

.foot {
    margin-top: 0;
    background: var(--sheet);
    border-top: 1px solid var(--line);
}
.foot-in {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 2rem var(--gutter) 2.5rem;
    color: var(--ink-3);
    font-size: .9375rem;
    line-height: 1.65;
}
.foot-name {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .5rem;
    color: var(--ink);
    font-weight: 800;
}
.foot-name img { border-radius: 6px; }
.foot-note { margin: 0; max-width: 64rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-2); }
.foot-copy { margin: .75rem 0 0; font-size: .875rem; }

/* 짧은 제목, 요약, 이름표만 줄 길이를 고르게 나눈다.
   본문(목록, 표, 상자 글)은 body 의 pretty 를 그대로 써서 줄을 끝까지 채운다 */
.course-summary, .lesson-summary, .toc-title, .video-title, .prompt-label, .callout-title,
.pager-title, .rail-course, .callout-important .key {
    text-wrap: balance;
}

/* 마우스로 가리킬 때만. 터치 기기에서 누른 뒤 색이 남지 않게 */
@media (hover: hover) {
    .btn:hover { border-color: var(--violet); color: var(--violet); }
    .btn-primary:hover { background: var(--violet-deep); border-color: var(--violet-deep); color: var(--on-violet); }
    .toc-list a:hover .toc-title {
        color: var(--violet);
        text-decoration: underline;
        text-decoration-thickness: from-font;
        text-underline-offset: .2em;
    }
    .video-card:hover { border-color: var(--violet); }
    .pager-link:hover { border-color: var(--violet); }
    .pager-next:hover { border-color: var(--violet-deep); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    .topbar, .rail, .finish, .pager, .foot, .prompt-actions, .skip { display: none !important; }
    body { background: #fff; color: #000; }
    .lesson-shell { display: block; }
    .callout, .prompt, .course-toc { box-shadow: none; break-inside: avoid; }
}
