/* Mambo Lab 교보재 — design A "Fania LP".
   Breakpoints: phone ≤767 · tablet 768–1099 · desktop ≥1100 (main). */
:root {
  --paper: #E6E3DC;   /* 신문지 회백: 바탕 */
  --ink: #1B1714;     /* 인쇄 잉크: 본문·선 */
  --red: #B3202E;     /* 크림슨: '지금'만 */
  --teal: #1E6B66;    /* 틸: 완료·검증·출처 */
  --mustard: #E3A21A; /* 머스터드: 작은 레이블 */
  --plum: #6A3456;    /* 플럼: 가이드 */
  --ink-2: rgba(27, 23, 20, .78);
  --ink-3: rgba(27, 23, 20, .68);
  --rule: rgba(27, 23, 20, .22);
  --paper-hi: rgba(255, 255, 255, .38);
  --f-disp: 'Alfa Slab One', 'IBM Plex Sans KR', serif;
  --f-label: 'Archivo Narrow', 'IBM Plex Sans KR', sans-serif;
  --f-ko-display: 'Black Han Sans', 'IBM Plex Sans KR', sans-serif;
  --f-body: 'Noto Serif KR', serif;
  --f-ui: 'IBM Plex Sans KR', sans-serif;
  --safe-bot: max(8px, env(safe-area-inset-bottom));
  --gutter: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-ui); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.h { letter-spacing: 0 !important; text-transform: none !important; font-family: var(--f-ui); }
.halftone { background-image: radial-gradient(rgba(27, 23, 20, .18) 1.1px, transparent 1.5px); background-size: 7px 7px; }
.muted { color: var(--ink-2); }
.wrap { max-width: 1280px; margin: 0 auto; }

/* ---------- top bar ---------- */
.topbar { background: var(--ink); color: var(--paper); }
.topbar .wrap { display: flex; align-items: center; height: 76px; padding: 0 var(--gutter); gap: 44px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand svg { width: 48px; height: 48px; flex: none; }
.brand .word { font-family: var(--f-disp); font-size: 25px; line-height: 1; letter-spacing: .01em; }
.brand .ko { font-weight: 700; font-size: 13px; background: var(--mustard); color: var(--ink); padding: 3px 7px 2px; margin-left: 2px; }
.topbar nav { display: flex; gap: 6px; margin-left: 12px; }
.topbar nav a { font-weight: 600; font-size: 16px; color: rgba(230, 227, 220, .78); text-decoration: none; padding: 10px 16px; position: relative; }
.topbar nav a.on { color: var(--paper); }
.topbar nav a.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 4px; background: var(--red); }
.topbar nav a.off { opacity: .45; }
.topbar .cat { margin-left: auto; font-family: var(--f-label); font-size: 13px; letter-spacing: .16em; color: rgba(230, 227, 220, .78); }

/* ---------- home: sleeve + progress ---------- */
.band { display: grid; grid-template-columns: 1.3fr 1fr; min-height: 440px; }
.sleeve { position: relative; overflow: hidden; background-color: var(--red); color: var(--paper); padding: 40px var(--gutter) 42px; }
.sleeve > * { position: relative; z-index: 2; }
.sleeve .kick { font-family: var(--f-label); font-weight: 700; letter-spacing: .16em; font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; }
.sleeve .kick .cn { border: 1.5px solid var(--paper); padding: 1px 7px; }
.sleeve h2 { font-family: var(--f-ko-display); font-weight: 400; font-size: 56px; line-height: 1.05; margin: 18px 0 6px; }
.sleeve .meta { margin: 0 0 22px; font-size: 16px; font-weight: 600; }
.sleeve .meta b { font-family: var(--f-label); letter-spacing: .06em; margin-right: 4px; }
.tracks { width: min(430px, 100%); background: var(--paper); color: var(--ink); list-style: none; margin: 0 0 22px; padding: 4px 16px; }
.tracks li a { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1.5px dotted var(--rule); text-decoration: none; min-height: 48px; }
.tracks li:last-child a { border-bottom: 0; }
.tracks .code { font-family: var(--f-label); font-weight: 700; font-size: 15px; color: var(--red); }
.tracks .t { font-weight: 600; font-size: 16px; line-height: 1.25; }
.tracks .t small { display: block; font-weight: 400; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.tracks .tag { font-size: 12.5px; font-weight: 600; border: 1.5px solid var(--ink); padding: 2px 6px; white-space: nowrap; }
.play { display: inline-block; font-weight: 600; font-size: 16px; background: var(--ink); color: var(--paper); border: 0; padding: 14px 22px 13px; cursor: pointer; text-decoration: none; min-height: 48px; }
.play b { font-family: var(--f-label); margin-right: 8px; }
.congas { position: absolute; right: -56px; bottom: -40px; width: 330px; height: 440px; z-index: 1 !important; }
.prog { background: var(--teal); color: var(--paper); padding: 40px 44px 34px; display: flex; flex-direction: column; gap: 22px; }
.prog h3 { font-family: var(--f-label); font-weight: 700; font-size: 14px; letter-spacing: .16em; margin: 0; display: flex; gap: 10px; align-items: baseline; }
.ring-row { display: flex; align-items: center; gap: 26px; }
.ring { width: 150px; height: 150px; flex: none; }
.ring-copy .big { margin: 0 0 6px; font-family: var(--f-label); font-weight: 700; font-size: 48px; line-height: 1; }
.ring-copy .big small { font-size: 24px; }
.ring-copy p { margin: 0; font-size: 15.5px; line-height: 1.65; }
.meter { display: grid; grid-template-columns: 84px 1fr 66px; align-items: center; gap: 14px; font-size: 15px; }
.meter .k { font-weight: 600; }
.meter .v { font-family: var(--f-label); font-weight: 700; font-size: 19px; text-align: right; }
.cells { display: grid; gap: 3px; grid-template-columns: repeat(25, 1fr); grid-auto-rows: 9px; }
.cells i { background: rgba(230, 227, 220, .24); }
.cells i.on { background: var(--paper); }
.prog .foot { font-size: 14px; line-height: 1.6; border-top: 1.5px dotted rgba(230, 227, 220, .5); padding-top: 12px; margin: auto 0 0; }

/* ---------- home: crate ---------- */
.home { padding: 52px var(--gutter) 60px; }
.lower { display: grid; grid-template-columns: 1fr 330px; gap: 40px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 3px solid var(--ink); padding-bottom: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-family: var(--f-ko-display); font-weight: 400; font-size: 30px; line-height: 1; }
.sec-head h2 span { font-family: var(--f-label); font-weight: 700; font-size: 14px; letter-spacing: .16em; margin-left: 12px; vertical-align: 4px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1.5px solid var(--ink); }
.seg button { border: 0; background: transparent; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 40px; }
.seg button.on { background: var(--ink); color: var(--paper); }
.crate { list-style: none; margin: 0; padding: 0; }
.spine { width: 100%; text-align: left; display: grid; grid-template-columns: 72px 1fr 190px 96px; align-items: center; border: 2px solid var(--ink); margin-bottom: 6px; min-height: 56px; background: var(--paper); cursor: pointer; padding: 0; }
.spine .side { align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: center; border-right: 2px solid var(--ink); font-family: var(--f-label); font-weight: 700; line-height: 1; }
.spine .side small { font-size: 11px; letter-spacing: .12em; margin-bottom: 3px; }
.spine .side b { font-size: 20px; }
.spine .title { padding: 0 18px; font-weight: 600; font-size: 16.5px; }
.spine .title em { font-style: normal; font-family: var(--f-label); font-weight: 700; margin-right: 10px; color: var(--ink-2); }
.spine .era { font-family: var(--f-label); font-size: 14px; letter-spacing: .04em; color: var(--ink-2); }
.spine .cnt { font-family: var(--f-label); font-weight: 700; font-size: 16px; text-align: right; padding-right: 16px; }
.spine.has .side { background: var(--teal); color: var(--paper); }
.spine.open { border-width: 3px; box-shadow: 6px 6px 0 var(--ink); margin: 14px 0 0; }
.spine.open .side { background: var(--red); color: var(--paper); border-right-width: 3px; }
.spine.open .cnt { color: var(--red); }
.spine.empty { border-style: dashed; border-color: var(--ink-3); color: var(--ink-2); }
.spine.empty .side { border-right: 2px dashed var(--ink-3); }
.tracklist { border: 3px solid var(--ink); border-top: 0; margin: 0 0 20px; box-shadow: 6px 6px 0 var(--ink); background: var(--paper); }
.tracklist .th, .trk { display: grid; grid-template-columns: 72px 1fr 1fr 70px 120px; }
.tracklist .th { padding: 9px 0; border-bottom: 1.5px solid var(--ink); font-family: var(--f-label); font-weight: 600; font-size: 12px; letter-spacing: .16em; color: var(--ink-2); text-transform: uppercase; }
.tracklist .th span:first-child { text-align: center; }
.trk { align-items: center; min-height: 48px; border-bottom: 1.5px dotted var(--rule); font-size: 15.5px; text-decoration: none; }
.trk:last-child { border-bottom: 0; }
.trk .c { text-align: center; font-family: var(--f-label); font-weight: 700; font-size: 16px; }
.trk .n { font-weight: 600; }
.trk .a, .trk .y { color: var(--ink-2); }
.trk .y { font-family: var(--f-label); font-size: 15px; }
.trk .s { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
a.trk .s { color: var(--teal); }
a.trk:hover { background: var(--paper-hi); }
.trk .tier { font-family: var(--f-label); font-size: 11px; letter-spacing: .1em; border: 1px solid var(--ink-3); padding: 0 4px; margin-left: 6px; vertical-align: 2px; color: var(--ink-2); }
.divider { position: relative; padding-top: 30px; }
.divider .tab { position: absolute; top: 0; left: 22px; background: var(--mustard); border: 2.5px solid var(--ink); border-bottom: 0; font-family: var(--f-label); font-weight: 700; letter-spacing: .16em; font-size: 13px; padding: 6px 14px; }
.divider .card { border: 2.5px solid var(--ink); padding: 22px 22px 18px; background: var(--paper); }
.divider h3 { margin: 0 0 4px; font-family: var(--f-ko-display); font-weight: 400; font-size: 26px; }
.divider p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }

/* ---------- lesson ---------- */
.lesson-head .wrap { padding: 32px var(--gutter) 24px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; border-bottom: 1.5px solid var(--ink); }
.crumb { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.crumb a { text-decoration: none; }
.crumb b { font-family: var(--f-label); font-weight: 700; letter-spacing: .06em; color: var(--ink); }
.lesson-head h1 { margin: 0; font-family: var(--f-disp); font-weight: 400; font-size: 58px; line-height: 1.05; }
.lesson-head .by { font-size: 19px; font-weight: 600; margin-top: 10px; }
.lesson-head .by span { font-family: var(--f-label); font-weight: 700; margin-left: 6px; color: var(--ink-2); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; }
.steps li { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--ink); margin-left: -1.5px; padding: 9px 18px 9px 12px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.steps li b { font-family: var(--f-label); font-size: 17px; line-height: 1; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 1.5px solid currentColor; border-radius: 50%; }
.steps li.on { background: var(--red); border-color: var(--red); color: var(--paper); position: relative; z-index: 1; }
.steps li.on b { background: var(--paper); color: var(--red); border-color: var(--paper); }
.steps li.later { opacity: .55; }
.lesson { display: grid; grid-template-columns: 336px 1fr; gap: 48px; padding: 36px var(--gutter) 80px; align-items: start; }
.rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 22px; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; border: 1.5px solid var(--ink); }
.video iframe, .video > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vol { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.vol button { border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; padding: 4px 10px; min-height: 32px; white-space: nowrap; cursor: pointer; }
.vol button:disabled, .vol input:disabled { opacity: .45; cursor: default; }
.vol input { flex: 1; min-width: 0; accent-color: var(--red); cursor: pointer; }
.vol output { font-family: var(--f-label); font-weight: 700; width: 3ch; text-align: right; }
.qmedia + .vol { max-width: 480px; margin: -12px auto 22px; }
.qmedia.gone + .vol { display: none; }
@media (max-width: 767px) { .vol { display: none !important; } }
.video-cap { font-size: 13px; line-height: 1.55; color: var(--ink-2); margin-top: 8px; }
.mini { display: none; }
.credits { border-top: 1.5px solid var(--ink); padding-top: 12px; }
.credits h4, .legend h4, .toc h4 { margin: 0 0 10px; font-weight: 700; font-size: 14px; }
.credits dl { display: grid; grid-template-columns: 84px 1fr; margin: 0; font-size: 15px; line-height: 1.5; }
.credits dt { color: var(--ink-2); padding: 6px 0; border-bottom: 1px dotted var(--rule); font-size: 14px; }
.credits dd { margin: 0; padding: 6px 0; border-bottom: 1px dotted var(--rule); font-weight: 600; }
.legend { border: 1.5px solid var(--ink); padding: 14px 16px; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.legend li .badge { min-width: 92px; justify-content: center; }
.legend .lnote { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.toc ol { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.toc a { display: flex; gap: 10px; padding: 6px 0; text-decoration: none; }
.toc a b { font-family: var(--f-label); width: 18px; }
.toc a.on { font-weight: 700; }
.toc a.on b { color: var(--red); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12.5px; line-height: 1; padding: 4px 7px 3px; border: 1.5px solid; border-radius: 2px; white-space: nowrap; }
.b-cross { color: var(--teal); border-color: var(--teal); }
.b-single { color: var(--ink-2); border-color: var(--ink-3); }
.b-dispute { color: var(--ink); border-color: var(--mustard); background: rgba(227, 162, 26, .2); }
.b-fixed { color: var(--ink); border: 1.5px dashed var(--ink); }

.read { min-width: 0; max-width: 760px; }
.read section { scroll-margin-top: 24px; margin-bottom: 56px; }
.read .kick { font-family: var(--f-label); font-weight: 700; letter-spacing: .16em; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.read h2 { margin: 0 0 16px; font-weight: 700; font-size: 28px; line-height: 1.4; letter-spacing: -.01em; }
.lead { font-family: var(--f-body); font-weight: 600; font-size: 18.5px; line-height: 1.8; margin: 0 0 6px; padding-bottom: 22px; border-bottom: 1.5px solid var(--ink); }
.story { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.item .no { font-family: var(--f-label); font-weight: 700; font-size: 20px; line-height: 1.6; color: var(--ink-2); }
.ln { display: grid; grid-template-columns: 1fr 104px; column-gap: 16px; align-items: start; }
.ln .bd { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 6px; }
.ln p { margin: 0; font-family: var(--f-body); font-weight: 500; font-size: 17px; line-height: 1.85; }
.subs { margin-top: 8px; display: grid; gap: 6px; }
.subs .ln p { font-size: 16px; line-height: 1.8; color: var(--ink-2); padding-left: 16px; border-left: 2px solid var(--rule); }
.fn { position: relative; border: 0; background: none; padding: 0 1px; cursor: pointer; font-family: var(--f-label); font-weight: 700; font-size: 13px; color: var(--teal); vertical-align: 6px; line-height: 0; white-space: nowrap; }
.fn::after { content: ""; position: absolute; inset: -14px -12px; }
.fn:hover, .fn.on { text-decoration: underline; }
.item.open { background: var(--paper-hi); margin: 0 -16px; padding: 20px 16px 22px; border: 1.5px solid var(--ink); }
.source { margin-top: 14px; border: 1.5px solid var(--ink); background: var(--paper); }
.source + .source { margin-top: 10px; }
.source .sh { display: flex; align-items: center; gap: 10px; background: var(--teal); color: var(--paper); padding: 8px 14px; font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .12em; flex-wrap: wrap; }
.source .sh .ttl { font-family: var(--f-ui); letter-spacing: 0; font-weight: 600; font-size: 14px; }
.source .sh a { margin-left: auto; color: var(--paper); font-family: var(--f-ui); font-weight: 600; font-size: 13.5px; letter-spacing: 0; text-underline-offset: 3px; }
.source .sb { padding: 14px 16px; }
.source .fact { margin: 0 0 10px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.source .fact b { color: var(--ink); margin-right: 6px; }
.source blockquote { margin: 0; font-family: var(--f-body); font-size: 15.5px; line-height: 1.75; padding-left: 14px; border-left: 3px solid var(--rule); overflow-wrap: anywhere; }
.checks { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px dotted var(--rule); display: grid; gap: 7px; }
.checks li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.checks li b { font-weight: 700; font-size: 13px; color: var(--ink); }
.checks li.ok b { color: var(--teal); }
.checks li.warn b { color: var(--ink); background: rgba(227, 162, 26, .3); }
.guide { margin-top: 28px; border: 1.5px solid var(--plum); border-left-width: 6px; padding: 18px 22px 14px; }
.guide h4 { margin: 0 0 8px; font-weight: 700; font-size: 15px; color: var(--plum); display: flex; gap: 10px; align-items: baseline; }
.guide h4 small { font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: .16em; }
.guide ol { margin: 0; padding: 0; list-style: none; counter-reset: g; }
.guide li { counter-increment: g; display: grid; grid-template-columns: 26px 1fr; font-family: var(--f-body); font-weight: 500; font-size: 16px; line-height: 1.8; padding: 7px 0; border-top: 1px dotted rgba(106, 52, 86, .35); }
.guide li::before { content: counter(g); font-family: var(--f-label); font-weight: 700; color: var(--plum); }
.after h2 { font-size: 22px; }
.kp { margin: 0; padding-left: 22px; font-family: var(--f-body); font-size: 17px; line-height: 1.85; }
.conn { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.conn div { border: 1.5px solid var(--ink); padding: 10px 12px; font-size: 14.5px; line-height: 1.6; }
.conn b { display: block; }

/* glossary term + popover / sheet */
.term { position: relative; display: inline; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; border-bottom: 2px dotted var(--teal); }
.term::after { content: ""; position: absolute; inset: -10px -4px; }
.pop { position: absolute; z-index: 30; width: 340px; background: var(--paper); border: 1.5px solid var(--ink); font-size: 14.5px; line-height: 1.65; box-shadow: 0 6px 18px rgba(27, 23, 20, .18); }
.card-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 4px; font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: .14em; color: var(--teal); }
.card-t { display: block; padding: 0 14px; font-weight: 700; font-size: 17px; }
.card-b { padding: 4px 14px 10px; }
.card-b ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.card-f { display: block; border-top: 1px dotted var(--rule); padding: 8px 14px 10px; font-size: 13.5px; font-weight: 600; color: var(--teal); }

.scrim { position: fixed; inset: 0; background: rgba(27, 23, 20, .35); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--paper); border-top: 3px solid var(--ink); max-height: 62vh; display: flex; flex-direction: column; animation: up .18s ease-out; }
.sheet.tall { max-height: 88vh; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--ink-3); margin: 8px auto 2px; }
.sheet .shead { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 4px 16px; font-family: var(--f-label); font-weight: 700; letter-spacing: .12em; font-size: 13px; color: var(--ink-2); }
.sheet .x { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; cursor: pointer; }
.sheet .sbody { overflow-y: auto; padding: 4px 16px 12px; -webkit-overflow-scrolling: touch; }
.sheet .sfoot { padding: 8px 16px var(--safe-bot); border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr; }
.sheet .sfoot button { min-height: 48px; border: 2px solid var(--ink); background: transparent; font-weight: 600; cursor: pointer; }

/* simple pages */
.page { padding: 40px var(--gutter) 80px; }
.page h1 { font-family: var(--f-ko-display); font-weight: 400; font-size: 40px; margin: 0 0 6px; }
.glist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.glist li { border: 1.5px solid var(--ink); background: var(--paper); }
.empty-note { border: 1.5px dashed var(--ink-3); padding: 18px; color: var(--ink-2); line-height: 1.7; }

/* bottom tab bar (phone) */
.tabbar { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1099px) {
  :root { --gutter: 32px; }
  .band { grid-template-columns: 1fr; }
  .lower { grid-template-columns: 1fr; }
  .lesson { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .rail { position: static; }
  .read { max-width: 680px; margin: 0 auto; width: 100%; }
  .lesson-head .wrap { grid-template-columns: 1fr; }
}

/* ---------- phone ---------- */
@media (max-width: 767px) {
  :root { --gutter: 20px; }
  .topbar .wrap { height: 56px; gap: 12px; padding-top: env(safe-area-inset-top); }
  .brand svg { width: 34px; height: 34px; }
  .brand .word { font-size: 20px; }
  .topbar nav, .topbar .cat { display: none; }
  body.has-tabbar { padding-bottom: calc(64px + var(--safe-bot)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); padding-bottom: var(--safe-bot); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; color: rgba(230, 227, 220, .78); text-decoration: none; font-size: 12.5px; font-weight: 600; border-top: 3px solid transparent; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--paper); border-top-color: var(--red); font-weight: 700; }
  .tabbar a.off { opacity: .45; }
  .sleeve { padding: 28px var(--gutter) 30px; }
  .sleeve h2 { font-size: 42px; }
  .congas { width: 200px; height: 270px; right: -60px; bottom: -30px; opacity: .9; }
  .play { width: 100%; text-align: center; }
  .prog { padding: 28px var(--gutter); }
  .ring { width: 96px; height: 96px; }
  .ring-copy .big { font-size: 36px; }
  .home { padding: 32px var(--gutter) 40px; }
  .sec-head h2 { font-size: 26px; }
  .spine { grid-template-columns: 56px 1fr 64px; }
  .spine .era { display: none; }
  .spine .title { padding: 10px 12px; font-size: 15.5px; line-height: 1.35; }
  .tracklist .th { display: none; }
  .trk { grid-template-columns: 52px 1fr auto; grid-template-areas: "c n s" "c a s"; padding: 8px 12px 8px 0; min-height: 56px; }
  .trk .c { grid-area: c; } .trk .n { grid-area: n; } .trk .s { grid-area: s; }
  .trk .a { grid-area: a; font-size: 13.5px; }
  .trk .y { display: none; }

  .lesson-head .wrap { padding: 10px var(--gutter) 10px; gap: 8px; }
  .lesson-head h1 { font-size: 30px; }
  .lesson-head .by { font-size: 15px; margin-top: 4px; }
  .lesson-head .crumb { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
  .lesson-head .ltools { margin-bottom: 4px; }
  .steps li { padding: 7px 10px 7px 8px; font-size: 13px; gap: 6px; }
  .steps li span { display: none; }
  .steps li.on span { display: inline; }
  .lesson { padding: 0 0 80px; gap: 0; }
  .rail { gap: 0; display: contents; }
  .rail .credits, .rail .legend, .rail .toc { display: none; }
  /* the player is fixed and never resizes the page: a bottom bar that opens into a sheet (pm-a), for every lesson with a video */
  .videobox { position: fixed; z-index: 30; background: var(--ink); color: var(--paper); }
  .videobox .video { border: 0; }
  .videobox .video-cap { display: none; }
  .vscrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(27, 23, 20, .5); }
  .mini { display: flex; align-items: center; gap: 4px; height: 58px; padding: 0 4px 0 14px; font-size: 12.5px; }
  .mini .mt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; color: rgba(230, 227, 220, .78); }
  .mini .mt b { display: block; overflow: hidden; text-overflow: ellipsis; font-family: var(--f-disp); font-weight: 400; font-size: 15px; color: var(--paper); }
  .mini button { width: 44px; height: 44px; flex: none; border: 0; background: none; color: var(--paper); font-size: 18px; cursor: pointer; }
  .videobox.open .vctrl { display: flex; }
  .videobox.open .video { width: min(100%, calc((100vh - 150px) * 16 / 9)); width: min(100%, calc((100dvh - 150px) * 16 / 9)); margin: 0 auto; }
  .videobox.open .mini { position: sticky; top: 0; z-index: 2; background: var(--ink); }
  .videobox.open .video-cap { display: block; margin: 0; padding: 0 16px 14px; font-size: 13px; color: rgba(230, 227, 220, .82); }
  .vctrl { gap: 6px; justify-content: center; padding: 10px 12px; }
  .vctrl button { min-height: 44px; padding: 0 12px; border: 1.5px solid rgba(230, 227, 220, .5); background: none; color: var(--paper); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .vctrl [data-pp2] { min-width: 64px; background: var(--paper); color: var(--ink); border-color: var(--paper); font-size: 18px; }
  /* A: music. A thin bar along the bottom with a small live picture; tap it to open the sheet */
  .pm-a { left: 0; right: 0; bottom: 0; padding-bottom: var(--safe-bot); box-shadow: 0 -3px 0 var(--red); max-height: 100vh; overflow-y: auto; }
  .pm-a .mini { padding-left: 78px; cursor: pointer; }
  .pm-a:not(.open) .video { position: absolute; left: 12px; top: 13px; width: 54px; height: 31px; aspect-ratio: auto; overflow: hidden; pointer-events: none; }
  .pm-a:not(.open) .video iframe { left: 0; top: 0; right: auto; bottom: auto; width: 356px; height: 200px; transform: scale(.1517); transform-origin: 0 0; }
  .pm-a.open { box-shadow: 0 -3px 0 var(--red), 0 -12px 30px rgba(0, 0, 0, .35); }
  .pm-a.open .mini { padding-left: 16px; }
  .pm-a.open .mini [data-pp] { display: none; }
  /* a play button that reads as one, and a one-time pulse on the first visit */
  .pm-a:not(.open) .mini [data-pp] { border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 15px; margin-right: 2px; }
  .pm-a.cue:not(.open) .mini [data-pp] { animation: ppcue 1.5s ease-out 4; }
  .pm-a.flash { animation: barflash .9s ease-out 1; }
  /* the 'listen' card at the top of a music lesson */
  .lcard { display: grid; grid-template-columns: 124px 1fr; gap: 12px; align-items: center; width: 100%; margin: 0 0 24px; padding: 10px; border: 0; background: var(--ink); color: var(--paper); font: inherit; text-align: left; cursor: pointer; }
  .lc-thumb { position: relative; display: block; width: 124px; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; }
  .lc-thumb i { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--ink); font-style: normal; font-size: 15px; }
  .lc-text b { display: block; font-size: 16.5px; }
  .lc-text span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.55; color: rgba(230, 227, 220, .82); }
  body.has-pm-a { padding-bottom: calc(64px + var(--safe-bot)); }
  /* C: dancers. A small window over the bottom-right corner; enlarge to see the moves */
  /* reading progress along the top edge */
  .rprog { display: block; position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 31; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
  .read { padding: 20px var(--gutter) 0; }
  .read section { scroll-margin-top: 72px; margin-bottom: 44px; }
  .read h2 { font-size: 22px; }
  .lead { font-size: 17.5px; }
  .item { grid-template-columns: 1fr; }
  .item .no { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1.4; margin-bottom: 4px; }
  .ln { grid-template-columns: 1fr; }
  .ln .bd { display: none; }
  .no .bd2 { display: inline-flex; gap: 6px; }
  .ln p { font-size: 17px; line-height: 1.8; }
  .fn { margin: 0 3px; }
  .item.open { margin: 0; padding: 18px 0; border: 0; background: none; }
  .pop { display: none !important; }
  .page { padding: 28px var(--gutter) 40px; }
  .page h1 { font-size: 32px; }
}
@media (min-width: 768px) { .no .bd2 { display: none; } .mini { display: none !important; } }

/* lesson tools shown below desktop width */
.ltools { display: none; }
@media (max-width: 1099px) {
  .ltools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .ltools a, .ltools button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border: 1.5px solid var(--ink); background: transparent; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
}
.leadwrap .srcbox:empty, .item .srcbox:empty { display: none; }
.kp .fn, .conn .fn { vertical-align: 4px; }
.tabbar[hidden] { display: none !important; }
.spine .era b { font-weight: 700; color: var(--ink); margin-right: 8px; }
.sheet { max-height: 62vh; }
.sheet.tall { max-height: 62vh; }
.source blockquote + blockquote { margin-top: 8px; }
.source .pg { margin: 14px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.source .fact { margin: 12px 0 0; font-size: 13.5px; }
.source .fact b { font-size: 12.5px; color: var(--ink-2); }

/* only disputes are flagged on screen */
.ln { grid-template-columns: 1fr !important; }
.ln .badge { margin-left: 6px; vertical-align: 2px; }
.source .dispute { margin-top: 12px; padding: 10px 12px; background: rgba(227, 162, 26, .18); border-left: 4px solid var(--mustard); font-size: 14px; line-height: 1.65; }
.source .dispute b { display: block; margin-bottom: 2px; }

/* plain-Korean home labels */
.tracks .code { font-family: var(--f-ui); font-size: 13px; color: var(--red); border: 1.5px solid var(--red); padding: 2px 4px; text-align: center; white-space: nowrap; }
.tracks li a { grid-template-columns: 64px 1fr auto; }
.sleeve .meta.h { font-weight: 500; line-height: 1.6; max-width: 30em; }
.sleeve .kick .cn.h { font-weight: 700; font-size: 14px; }
.prog h3.h { font-size: 18px; font-weight: 700; }
.ring-copy .big small { font-size: 20px; }

.spine { grid-template-columns: 72px 1fr 150px 136px; }
.spine .cnt.h { white-space: nowrap; }
@media (max-width: 767px) { .spine { grid-template-columns: 56px 1fr auto; } .spine .cnt.h { padding-right: 12px; font-size: 13px; } }
/* chapter number box: centered both ways, number and 장 on one baseline */
.spine .side { flex-direction: column !important; align-items: center !important; justify-content: center !important; }
.spine .side .sn { display: inline-flex; align-items: baseline; gap: 2px; line-height: 1; }

/* ---------- step 2: buttons ---------- */
.btn-main, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 2px solid var(--ink); font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer; }
.btn-main { background: var(--ink); color: var(--paper); }
.btn-main:hover { background: var(--red); border-color: var(--red); }
.btn-main[disabled] { opacity: .45; cursor: default; background: var(--ink); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-hi); }
.btn-ghost.danger { border-color: var(--red); color: var(--red); }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border: 1.5px solid currentColor; border-radius: 3px; font-family: var(--f-label); font-weight: 700; font-size: 13px; opacity: .75; }

/* ---------- lesson steps ---------- */
.steps li { padding: 0; }
.steps li a { display: flex; align-items: center; gap: 10px; padding: 9px 18px 9px 12px; min-height: 44px; color: inherit; text-decoration: none; }
.steps li:not(.on) a:hover { background: var(--paper-hi); }
.steps li.past { color: var(--teal); }
.steps li.past b { background: var(--teal); color: var(--paper); border-color: var(--teal); font-size: 14px; }
.stepnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 3px solid var(--ink); flex-wrap: wrap; }
.lesson.stepview { grid-template-columns: 1fr; }
.stepview .read { margin: 0 auto; width: 100%; max-width: 760px; }
.steptip { margin: -6px 0 24px; font-size: 15px; line-height: 1.7; }
.kp.big { list-style: none; padding: 0; counter-reset: k; }
.kp.big li { counter-increment: k; display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 18px; font-weight: 500; }
.kp.big li::before { content: counter(k); grid-row: span 2; font-family: var(--f-disp); font-size: 28px; line-height: 1.2; color: var(--red); }
.kp.big .kt { grid-column: 2; }
.kp.big .basis { grid-column: 2; justify-self: start; margin-top: 6px; font-family: var(--f-ui); font-size: 13.5px; font-weight: 600; color: var(--teal); text-decoration: none; }
.kp.big .basis:hover { text-decoration: underline; }
.item.flash, .leadwrap.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 40% { background: rgba(227, 162, 26, .35); } 100% { background: transparent; } }

/* check questions (lesson) and review questions share the option look */
.qcard { border: 2px solid var(--ink); padding: 18px 20px 16px; margin-bottom: 16px; background: var(--paper); }
.qq { margin: 0 0 14px; font-weight: 600; font-size: 17.5px; line-height: 1.6; }
.qq b { font-family: var(--f-label); color: var(--red); margin-right: 4px; }
.qopts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qopt { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--ink); background: transparent; font-size: 15.5px; line-height: 1.4; cursor: pointer; }
.qopt:hover:not([disabled]) { background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--ink); }
.qopt[disabled] { cursor: default; color: var(--ink-2); }
.qopt.right { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.qopt.wrong { background: rgba(179, 32, 46, .12); border-color: var(--red); color: var(--red); text-decoration: line-through; }
.qfb { margin: 12px 0 0; font-size: 15px; line-height: 1.7; }
.qfb a { color: var(--teal); font-weight: 600; }
.qfb .ok, .qres.ok { color: var(--teal); }
.qfb .no, .qres.no { color: var(--red); }
.checkres { border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 18px 20px; margin: 26px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.checkres[hidden] { display: none; }
.checkres p { margin: 0; font-size: 16px; }
.checkres b { font-family: var(--f-label); font-size: 24px; }
.donebox { background: var(--teal); color: var(--paper); padding: 30px 32px; margin-bottom: 44px; }
.donebox .kick { color: rgba(230, 227, 220, .8) !important; }
.donebox h2 { font-family: var(--f-ko-display); font-weight: 400; font-size: 40px; margin: 0 0 10px !important; }
.donebox p { margin: 0 0 20px; font-size: 16px; line-height: 1.7; }
.donenav { display: flex; gap: 10px; flex-wrap: wrap; }
.donebox .btn-main { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.donebox .btn-main:hover { background: var(--mustard); border-color: var(--mustard); }
.donebox .btn-ghost { color: var(--paper); border-color: var(--paper); }

/* ---------- home additions ---------- */
.revbtn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: var(--paper); color: var(--ink); text-decoration: none; padding: 12px 16px; min-height: 52px; border: 2px solid var(--paper); }
.revbtn b { font-size: 16px; }
.revbtn span { font-size: 14.5px; color: var(--ink-2); }
.revbtn i { font-style: normal; color: var(--red); }
.revbtn:hover { background: var(--mustard); border-color: var(--mustard); }
.divider .wrong { list-style: none; margin: 8px 0 10px; padding: 0; }
.divider .wrong a { display: block; padding: 9px 0; border-bottom: 1px dotted var(--rule); text-decoration: none; font-size: 14.5px; line-height: 1.45; }
.divider .wrong a:hover { color: var(--teal); }
.divider .wrong small { display: block; font-size: 12px; font-weight: 600; color: var(--red); }
.divider .wnote { font-size: 13px; }

/* ---------- review ---------- */
.review { max-width: 860px; }
.rintro { font-size: 15.5px; line-height: 1.75; margin: 4px 0 22px; max-width: 46em; }
.rstats { display: grid; grid-template-columns: repeat(3, 1fr); border: 2.5px solid var(--ink); }
.rstats div { padding: 16px 18px; border-left: 1.5px solid var(--ink); display: flex; flex-direction: column; gap: 4px; }
.rstats div:first-child { border-left: 0; }
.rstats div.hot { background: var(--red); color: var(--paper); }
.rstats b { font-family: var(--f-label); font-size: 38px; line-height: 1; }
.rstats b small { font-size: 20px; }
.rstats span { font-size: 14px; font-weight: 600; }
.rtypes { font-size: 14px; color: var(--ink-2); margin: 12px 0 26px; }
.rstart { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rnote { font-size: 13.5px; line-height: 1.65; margin-top: 16px; }
.quiz { max-width: 760px; padding: 28px var(--gutter) 80px; }
.qtop { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 22px; }
.qcount { font-family: var(--f-label); font-weight: 700; font-size: 18px; }
.qbar { height: 8px; border: 1.5px solid var(--ink); }
.qbar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.qquit { border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: underline; cursor: pointer; min-height: 44px; }
.qmedia { position: relative; max-width: 480px; margin: 0 auto 22px; }
.qmedia.gone { position: absolute; left: -9999px; top: 0; width: 480px; }
.veil { position: absolute; inset: 0; background-color: var(--ink); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; border: 1.5px solid var(--ink); }
.veil .vtop { position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: auto; }
.veil .vlabel { font-family: var(--f-ko-display); font-size: 26px; }
.veil .vstate { font-size: 13.5px; color: rgba(230, 227, 220, .8); text-align: center; padding: 0 20px; }
.veil .vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(230, 227, 220, .2); }
.veil .vprog i { display: block; height: 100%; width: 0; background: var(--mustard); }
.eq { display: flex; align-items: flex-end; gap: 5px; height: 44px; }
.eq i { width: 9px; height: 30%; background: var(--paper); }
.veil.playing .eq i { animation: eq .9s ease-in-out infinite alternate; }
.veil.playing .eq i:nth-child(2) { animation-delay: -.3s; }
.veil.playing .eq i:nth-child(3) { animation-delay: -.6s; }
.veil.playing .eq i:nth-child(4) { animation-delay: -.15s; }
.veil.playing .eq i:nth-child(5) { animation-delay: -.45s; }
@keyframes eq { from { height: 15%; } to { height: 100%; } }
.veil.revealed { display: none; }
/* dancer link/style questions: the lesson video plays silently next to the name, nothing to hide */
.qmedia.watch .veil, .qmedia.watch + .vol { display: none; }
.qhints { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; gap: 6px; }
.qhints li { padding: 9px 14px; border: 1.5px solid var(--ink); border-left-width: 5px; background: var(--paper-hi); font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
.qnote { margin: -8px 0 14px; font-size: 13.5px; color: var(--ink-2); }
.qopts.ini .qopt { font-family: var(--f-label); font-weight: 700; font-size: 19px; letter-spacing: .02em; }
.qmap { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.qhead { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.qtype { font-size: 13px; font-weight: 700; color: var(--paper); background: var(--red); padding: 3px 8px; }
.qsrc { font-size: 13.5px; color: var(--ink-2); }
.qsong { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
.qsong b { font-family: var(--f-disp); font-weight: 400; font-size: 34px; line-height: 1.15; }
.qsong span { font-family: var(--f-label); font-weight: 700; font-size: 18px; color: var(--ink-2); }
.qtools { margin: -4px 0 14px; }
.qtools .btn-ghost { min-height: 40px; font-size: 14px; padding: 0 14px; }
.qskip { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1.5px dashed var(--ink-3); background: transparent; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.qskip.wrong { border-color: var(--red); color: var(--red); }
.qres { font-size: 18px; font-weight: 700; margin: 6px 0 8px; }
.qreveal { margin: 0 0 6px; font-size: 16px; }
.qreveal b { font-size: 17px; }
.qbasis { margin: 0 0 8px; padding: 10px 14px; border-left: 4px solid var(--teal); background: var(--paper-hi); font-family: var(--f-body); font-size: 15.5px; line-height: 1.75; }
.qbasis b { display: block; font-family: var(--f-ui); font-size: 12.5px; color: var(--teal); }
.qdue { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.qnext { display: flex; gap: 10px; flex-wrap: wrap; }
.rscore { font-size: 18px; margin: 6px 0 20px; }
.rscore b { font-family: var(--f-label); font-size: 44px; color: var(--red); margin-right: 2px; }
.rlist { list-style: none; margin: 0 0 8px; padding: 0; border-top: 2px solid var(--ink); }
.rlist li { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dotted var(--rule); font-size: 15px; line-height: 1.45; }
.rlist .mk { font-weight: 700; font-size: 18px; text-align: center; }
.rlist li.ok .mk { color: var(--teal); }
.rlist li.no .mk { color: var(--red); }
.rlist small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.rlist a { font-size: 13.5px; font-weight: 600; color: var(--teal); text-decoration: none; white-space: nowrap; }
.rbtns { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- library ---------- */
.lintro { font-size: 15.5px; line-height: 1.7; margin: 4px 0 20px; max-width: 46em; }
.ltop { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.lsearch, .lfilter { min-height: 42px; border: 1.5px solid var(--ink); background: var(--paper); font: inherit; font-size: 15px; padding: 0 12px; border-radius: 0; color: var(--ink); }
.lsearch { flex: 1; min-width: 200px; }
.ltable { border: 2.5px solid var(--ink); background: var(--paper); }
.lhead, .lrow { display: grid; grid-template-columns: 52px 1.3fr 1fr 52px 84px 60px; gap: 10px; align-items: center; padding: 0 14px; }
.lhead { padding-top: 9px; padding-bottom: 9px; border-bottom: 1.5px solid var(--ink); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.lrow { min-height: 52px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px dotted var(--rule); font-size: 15px; }
.lrow .c { font-size: 13px; color: var(--ink-2); }
.lrow .n { font-weight: 600; line-height: 1.35; min-width: 0; }
.lrow .n a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.lrow .n small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.lrow .tier { font-size: 11.5px; border: 1px solid var(--red); color: var(--red); padding: 0 4px; margin-left: 6px; vertical-align: 2px; font-weight: 600; }
.lrow .a { color: var(--ink-2); font-size: 14px; line-height: 1.4; min-width: 0; }
.lrow .y { font-family: var(--f-label); color: var(--ink-2); }
.lrow .s { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.lrow.lesson .s, .lrow.reading .s, .lrow.done .s { color: var(--teal); }
.lrow .v a { font-size: 13px; font-weight: 600; color: var(--teal); text-decoration: none; }
.lcount { margin: 0; padding: 10px 14px; font-size: 13px; }
.ltable .empty-note { margin: 14px; }
.backup { margin-top: 48px; border-top: 3px solid var(--ink); padding-top: 18px; }
.backup h2 { margin: 0 0 6px; font-size: 22px; }
.backup p { font-size: 14.5px; line-height: 1.7; margin: 0 0 14px; max-width: 46em; }
.bbtns { display: flex; gap: 10px; flex-wrap: wrap; }
.bmsg { margin-top: 10px !important; font-weight: 600; color: var(--teal); min-height: 1.5em; }

@media (max-width: 767px) {
  .steps li a { padding: 7px 10px 7px 8px; gap: 6px; }
  .stepnav { margin-top: 28px; }
  .stepnav a { flex: 1; }
  .kp.big li { grid-template-columns: 34px 1fr; font-size: 16.5px; }
  .kp.big li::before { font-size: 22px; }
  .qcard { padding: 16px 14px 14px; }
  .qopts { grid-template-columns: 1fr; }
  .qq { font-size: 16.5px; }
  .donebox { padding: 24px 20px; margin: 0 calc(-1 * var(--gutter)) 36px; }
  .donebox h2 { font-size: 32px; }
  .donenav a { flex: 1 1 100%; }
  .rstats b { font-size: 30px; }
  .rstats div { padding: 12px; }
  .rstats span { font-size: 12.5px; }
  .rstart .btn-main { flex: 1 1 100%; }
  .rstart .seg { display: flex; flex: 1 1 100%; }
  .rstart .seg button { flex: 1; padding: 8px 4px; }
  .quiz { padding: 16px var(--gutter) 40px; }
  .qsong b { font-size: 28px; }
  .qnext > * { flex: 1; }
  .lhead { display: none; }
  .lrow { grid-template-columns: 1fr auto; grid-template-areas: "n s" "a v"; row-gap: 2px; padding: 10px 12px; }
  .lrow .c, .lrow .y { display: none; }
  .lrow .n { grid-area: n; }
  .lrow .a { grid-area: a; font-size: 13px; }
  .lrow .s { grid-area: s; text-align: right; }
  .lrow .v { grid-area: v; text-align: right; }
  .ltop .seg { flex: 1 1 100%; }
  .ltop .seg button { flex: 1; }
  .lsearch { min-width: 0; }
}

/* ---------- glossary page: one readable list, details open on demand ---------- */
.gpage { max-width: 820px; }
.gintro { font-size: 15.5px; margin: 4px 0 18px; }
.gsearch { width: 100%; min-height: 46px; border: 1.5px solid var(--ink); background: var(--paper); font: inherit; font-size: 16px; padding: 0 14px; border-radius: 0; color: var(--ink); margin-bottom: 28px; }
.gentries section { margin-bottom: 34px; }
.gentries h2 { margin: 0; padding-bottom: 8px; border-bottom: 3px solid var(--ink); font-family: var(--f-ko-display); font-weight: 400; font-size: 26px; }
.gentries h2 small { font-family: var(--f-label); font-size: 16px; color: var(--ink-2); margin-left: 4px; }
.gentry { border-bottom: 1px solid var(--rule); scroll-margin-top: 16px; }
.gentry summary { list-style: none; display: grid; grid-template-columns: 1fr 28px; gap: 12px; align-items: center; padding: 16px 0; cursor: pointer; }
.gentry summary::-webkit-details-marker { display: none; }
.gentry summary:hover .gt b { color: var(--teal); }
.gentry .gt b { display: block; font-size: 18px; line-height: 1.4; }
.gentry .gshort { display: block; margin-top: 4px; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.gentry .gmore { width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; position: relative; }
.gentry .gmore::before, .gentry .gmore::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); }
.gentry .gmore::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .15s; }
.gentry[open] .gmore::after { transform: translate(-50%, -50%) rotate(0deg); }
.gentry[open] .gmore { background: var(--ink); }
.gentry[open] .gmore::before, .gentry[open] .gmore::after { background: var(--paper); }
.gbody { padding: 0 40px 20px 0; }
.gbody ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.gbody li { font-family: var(--f-body); font-size: 15.5px; line-height: 1.75; }
.gbody li::marker { color: var(--teal); }
.gsrc { margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.gsrc a { color: var(--teal); text-decoration: none; }
.gsrc a:hover { text-decoration: underline; }
.gentry.flash { animation: flash 2.4s ease-out; }
@media (max-width: 767px) {
  .gentry .gt b { font-size: 17px; }
  .gbody { padding-right: 0; }
}


/* home: the main action sits right under the heading */
.play.big { display: inline-flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin: 14px 0 14px; padding: 16px 26px; font-size: 22px; font-weight: 700; background: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.play.big b { font-size: 20px; color: var(--red); margin-right: 0; }
.play.big small { flex-basis: 100%; font-size: 14px; font-weight: 600; color: var(--ink-2); padding-left: 32px; }
.play.big:hover { background: var(--mustard); }
.sleeve .subcopy { margin: 4px 0 10px; font-size: 19px; font-weight: 700; line-height: 1.45; max-width: 28em; }
.sleeve .play.big { margin-bottom: 24px; }
@media (max-width: 767px) { .sleeve .subcopy { font-size: 16.5px; } }
@media (max-width: 767px) { .play.big { width: 100%; justify-content: flex-start; } }

/* lesson: folded "더 알아보기" layer */
.deep { margin: 8px 0 48px; border: 2px solid var(--ink); background: var(--paper-hi); }
.deep > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; position: relative; padding-right: 56px; }
.deep > summary::-webkit-details-marker { display: none; }
.deep > summary b { font-size: 19px; }
.deep > summary span { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.deep > summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--f-label); font-weight: 700; font-size: 18px; }
.deep[open] > summary::after { content: "−"; background: var(--ink); color: var(--paper); }
.deep[open] > summary { border-bottom: 1.5px solid var(--ink); }
.deep section { padding: 4px 20px 0; margin-bottom: 28px !important; }
.deep section h2 { font-size: 21px; margin-top: 18px; }
.deep .lead { font-size: 17px; }
@media (max-width: 767px) { .deep { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-left: 0; border-right: 0; } .deep section { padding: 4px var(--gutter) 0; } }

/* end-of-chapter prompts */
.wrapbox { border: 3px solid var(--plum); border-left-width: 8px; padding: 22px 24px 18px; margin: 0 0 40px; background: var(--paper); }
.wrapbox h2 { margin: 0 0 6px; font-family: var(--f-ko-display); font-weight: 400; font-size: 30px; color: var(--plum); }
.wrapbox > p { margin: 0 0 14px; font-size: 16px; line-height: 1.7; }
.wrapbox ol { margin: 0; padding: 0; list-style: none; counter-reset: w; display: grid; gap: 14px; }
.wrapbox li { counter-increment: w; display: grid; grid-template-columns: 34px 1fr; border-top: 1px dotted rgba(106, 52, 86, .4); padding-top: 12px; }
.wrapbox li::before { content: counter(w); font-family: var(--f-disp); font-size: 24px; color: var(--plum); line-height: 1.2; }
.wrapbox li p { margin: 0; font-family: var(--f-body); font-size: 16.5px; line-height: 1.8; }
.wrapbox .wl { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.wrapbox .wl a { font-size: 13.5px; font-weight: 600; color: var(--teal); text-decoration: none; }
.wrapbox .wl a::before { content: "♪ "; }
.wrappage { max-width: 820px; }
.wrappage.examining .wrapbox { display: none; } /* tasks retell answers: hidden while the exam runs */
.wrappage .crumb { margin-bottom: 16px; }
.tracks li a { grid-template-columns: 80px 1fr auto; }

/* check step: answered cards keep their state; evidence shown inline */
.qcard.done { background: var(--paper-hi); }
.qcard .qfb p { margin: 0 0 8px; }
.qcard .qbasis { margin: 8px 0 10px; }
.checkres .crow { display: flex; gap: 10px; flex-wrap: wrap; }

/* home: the two study paths, big and side by side */
.pathbar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 34px; }
.pathcard { display: grid; grid-template-columns: 1fr; gap: 6px; text-align: left; padding: 18px 20px 16px; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.pathcard .pk { font-family: var(--f-ko-display); font-size: 30px; line-height: 1.1; }
.pathcard .pd { font-size: 14px; color: var(--ink-2); }
.pathcard .pp { height: 8px; border: 1.5px solid currentColor; margin-top: 4px; }
.pathcard .pp i { display: block; height: 100%; background: var(--red); }
.pathcard .pn { font-family: var(--f-label); font-weight: 700; font-size: 15px; }
.pathcard:hover { background: var(--paper-hi); }
.pathcard.on { background: var(--ink); color: var(--paper); box-shadow: 6px 6px 0 var(--red); }
.pathcard.on .pd { color: rgba(230, 227, 220, .8); }
.pathcard.on .pp i { background: var(--mustard); }
.pathcard:not(.on) .pk::after { content: " →"; font-size: 22px; color: var(--red); }
@media (max-width: 767px) {
  .pathbar { gap: 10px; margin-bottom: 24px; }
  .pathcard { padding: 12px 12px 10px; }
  .pathcard .pk { font-size: 22px; }
  .pathcard .pd { font-size: 12.5px; }
}

/* account: top bar chip, login prompt, dialog, toast */
.acct-slot { margin-left: auto; }
.acct { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1.5px solid rgba(230, 227, 220, .7); background: transparent; color: var(--paper); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.acct:hover { border-color: var(--paper); }
.acct.on { border-color: var(--mustard); }
.acct.on span { font-weight: 400; font-size: 12px; color: rgba(230, 227, 220, .7); }
.loginbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 2.5px solid var(--ink); border-left: 8px solid var(--mustard); background: var(--paper); padding: 14px 16px; margin: 0 0 24px; }
.loginbar p { margin: 0; font-size: 15px; line-height: 1.6; flex: 1 1 280px; }
.loginbar div { display: flex; gap: 8px; }
.loginbar .btn-main, .loginbar .btn-ghost { min-height: 42px; }
.modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(27, 23, 20, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { position: relative; width: min(420px, 100%); background: var(--paper); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 22px 22px 18px; }
.modal h2 { margin: 0 0 4px; font-family: var(--f-ko-display); font-weight: 400; font-size: 28px; }
.modal .muted { margin: 0 0 14px; font-size: 14px; line-height: 1.6; }
.modal label { display: grid; gap: 4px; margin-bottom: 12px; font-size: 13.5px; font-weight: 700; }
.modal label small { font-weight: 500; color: var(--ink-2); }
.modal input { min-height: 44px; border: 1.5px solid var(--ink); background: #fff; font: inherit; font-size: 16px; padding: 0 12px; border-radius: 0; }
.modal .msg { min-height: 1.4em; margin: 2px 0 12px; font-size: 14px; line-height: 1.6; color: var(--red); }
.modal .row { display: flex; gap: 8px; flex-wrap: wrap; }
.modal .row > * { flex: 1; }
.modal .x { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: 0; background: none; font-size: 24px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(80px + var(--safe-bot)); transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--paper); padding: 12px 18px; font-weight: 600; font-size: 14.5px; box-shadow: 4px 4px 0 var(--red); max-width: calc(100% - 32px); }
@media (max-width: 767px) {
  .acct { min-height: 34px; padding: 0 10px; font-size: 13px; }
  .acct.on span { display: none; }
}

/* ---------- footer ---------- */
.sitefoot { border-top: 2px solid var(--ink); margin-top: 48px; padding: 18px var(--gutter) 22px; font-family: var(--f-ui); font-size: 13.5px; color: var(--ink-2); }
.sitefoot a { color: var(--ink); font-weight: 600; }

/* ---------- scoreboard ---------- */
.board .bnote { margin: 4px 0 20px; }
.blist { list-style: none; margin: 0; padding: 0; border: 2.5px solid var(--ink); max-width: 760px; background: var(--paper); }
.bhead, .brow { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 12px 18px; }
.bhead { background: var(--ink); color: var(--paper); padding-top: 8px; padding-bottom: 8px; font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .14em; }
.bhead span:first-child { text-align: center; }
.brow { border-top: 1.5px dotted var(--rule); }
.bhead + .brow { border-top: 0; }
.brow .rk { font-family: var(--f-label); font-weight: 700; font-size: 28px; line-height: 1; text-align: center; }
.brow.r1 .rk { color: var(--red); }
.brow .who { min-width: 0; }
.brow .who b { font-size: 17px; overflow-wrap: anywhere; }
.brow .who em { font-style: normal; font-size: 12px; font-weight: 700; background: var(--mustard); color: var(--ink); padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.brow .who small span { white-space: nowrap; }
.brow .who small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.brow .pts { font-family: var(--f-label); font-weight: 700; font-size: 26px; white-space: nowrap; }
.brow .pts small { font-family: var(--f-ui); font-size: 13px; margin-left: 2px; }
.brow.me { background: var(--paper-hi); box-shadow: inset 6px 0 0 var(--mustard); }
.bidle { max-width: 760px; margin: 14px 0 0; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.bidle b { color: var(--ink); margin-right: 6px; }
.bidle span { display: inline-block; border: 1.5px solid var(--rule); padding: 0 8px; margin: 0 4px 4px 0; line-height: 1.7; }
.bidle span.me { border-color: var(--mustard); background: var(--paper-hi); color: var(--ink); }
.bfoot { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin: 12px 0 0; max-width: 760px; }
.prog .boardlink { color: var(--paper); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
@media (max-width: 767px) {
  .bhead, .brow { grid-template-columns: 38px 1fr auto; gap: 10px; padding: 10px 12px; }
  .brow .rk { font-size: 22px; }
  .brow .pts { font-size: 22px; }
}
/* top bar: keep the wordmark on one line; a long nickname gets cut instead */
.brand { min-width: 0; flex: none; }
.brand .word { white-space: nowrap; }
.acct { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) { .acct { display: block; max-width: 30vw; line-height: 32px; white-space: nowrap; } .acct.on span { display: none; } }
.brow .who em.done { background: var(--teal); color: var(--paper); }
.brow .bar { display: block; height: 6px; background: rgba(27, 23, 20, .12); margin: 6px 0 4px; max-width: 360px; }
.brow .bar i { display: block; height: 100%; background: var(--ink); }
.brow.fin .bar i { background: var(--teal); }
.brow.me .bar i { background: var(--red); }
.board .btabs { margin: 6px 0 0; }
.board .btabs button { min-width: 88px; font-size: 15px; }

/* ---------- chapters 3–8: title & chorus, listening points ---------- */
.songnote { border: 2px solid var(--ink); background: var(--paper-hi); padding: 4px 16px; margin: 0 0 30px; }
.songnote .snrow { display: grid; grid-template-columns: 64px 1fr; column-gap: 12px; padding: 12px 0; border-top: 1px dotted var(--rule); }
.songnote .snrow:first-child { border-top: 0; }
.songnote .snk { font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .08em; color: var(--red); padding-top: 3px; }
.songnote p { margin: 0; font-size: 16px; line-height: 1.7; }
.songnote p i { font-family: var(--f-body); font-size: 17px; }
.songnote p small { font-size: 12px; color: var(--ink-3); border: 1px solid var(--rule); padding: 0 5px; margin-left: 4px; }
.songnote .srcbox { grid-column: 2; }
.listenbox { border-left: 6px solid var(--teal); padding-left: 16px; margin: 10px 0 36px; }
.listenbox h2 { color: var(--teal); }

/* ---------- chapter exam ---------- */
.exambox { border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 20px 22px; margin: 0 0 36px; background: var(--paper); }
.exambox h2 { margin: 0 0 8px; font-family: var(--f-ko-display); font-weight: 400; font-size: 30px; }
.exambox > p { font-size: 15.5px; line-height: 1.7; margin: 0 0 12px; }
.exambox .exstamp { display: inline-block; font-family: var(--f-label); font-weight: 700; font-size: 18px; letter-spacing: .06em; color: var(--paper); background: var(--teal); padding: 4px 12px; transform: rotate(-2deg); }
.exambox .qbasis a { color: var(--teal); font-weight: 600; margin-right: 6px; }

/* ---------- dancer card (현역) ---------- */
.dcard { border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); background: var(--paper); padding: 6px 18px 10px; margin: 0 0 30px; }
.dcard .dc-badge { display: inline-block; margin: 10px 0 4px; font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .1em; background: var(--teal); color: var(--paper); padding: 2px 10px; }
.dcard .dc-row { display: grid; grid-template-columns: 64px 1fr; column-gap: 12px; padding: 12px 0; border-top: 1px dotted var(--rule); }
.dcard .dc-row:nth-child(2) { border-top: 0; }
.dcard .dk { font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .08em; color: var(--red); padding-top: 3px; }
.dcard p { margin: 0; font-size: 16px; line-height: 1.7; }
.dcard .srcbox { grid-column: 2; }
.dcard ul, .dcard ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.dcard .dc-lin b { font-family: var(--f-label); font-size: 13px; color: var(--ink-2); margin-right: 8px; }
.dcard .dc-items { counter-reset: dci; }
.dcard .dc-items li { counter-increment: dci; display: grid; grid-template-columns: 22px 1fr; }
.dcard .dc-items li::before { content: counter(dci); font-family: var(--f-label); font-weight: 700; color: var(--ink-3); }
.dcard .dc-items li .srcbox, .dcard .dc-lin li .srcbox { grid-column: 1 / -1; }

/* ---------- 제작노트 ---------- */
.sitefoot .sep { margin: 0 10px; color: var(--ink-3); }
.notes { max-width: 820px; }
.notes .nsec { margin: 0 0 44px; }
.notes .nsec h2 { display: flex; align-items: baseline; gap: 12px; font-family: var(--f-ko-display); font-weight: 400; font-size: 26px; margin: 0 0 14px; }
.notes .nsec h2 span { font-family: var(--f-label); font-weight: 700; font-size: 15px; color: var(--red); letter-spacing: .08em; }
/* the maker's own voice: a dark panel like the back of a record sleeve, set apart from the factual sections */
.notes .letter { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); padding: 42px 38px 30px; }
.notes .letter::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(230, 227, 220, .08) 1.1px, transparent 1.5px); background-size: 7px 7px; pointer-events: none; }
.notes .letter > * { position: relative; }
.notes .letter .lk { display: block; margin: 0; font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .16em; color: var(--mustard); }
.notes .letter .lk span { display: inline; margin-right: 0; font: inherit; letter-spacing: inherit; color: inherit; }
.notes .letter .lk span::after { content: " · "; }
.notes .letter .lq { margin: 12px 0 26px; font-family: var(--f-ko-display); font-weight: 400; font-size: clamp(30px, 5vw, 44px); line-height: 1.3; }
.notes .letter .lq em { font-style: normal; color: var(--mustard); }
.notes .letter p { margin: 0 0 16px; max-width: 38em; font-family: var(--f-ui); font-size: 16px; line-height: 1.95; color: rgba(230, 227, 220, .92); }
.notes .letter p.hello { color: var(--paper); font-weight: 700; }
.notes .letter p.close { margin-top: 8px; font-family: var(--f-ko-display); font-size: 24px; color: var(--mustard); }
.notes .letter .sign { display: flex; justify-content: flex-end; margin-top: 28px; padding-top: 22px; border-top: 1.5px solid rgba(230, 227, 220, .4); }
.notes .letter .stamp { display: inline-block; transform: rotate(-4deg); padding: 6px 16px 7px; background: var(--teal); color: var(--paper); text-align: center; font-family: var(--f-label); font-weight: 700; line-height: 1.25; }
.notes .letter .stamp span { display: block; font-size: 13px; letter-spacing: .2em; }
.notes .letter .stamp b { display: block; font-size: 21px; letter-spacing: .06em; }
.notes .nlist { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; font-size: 15.5px; line-height: 1.8; }
.notes .ndetail { margin-top: 6px; }
.notes .nnote { margin: -6px 0 12px; font-size: 14px; }
.notes .nlog { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.notes .nlog li { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px dotted var(--rule); }
.notes .nlog time { font-family: var(--f-label); font-weight: 700; font-size: 15px; letter-spacing: .04em; padding-top: 2px; }
.notes .nlog p { margin: 3px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 767px) {
  .notes .letter { padding: 32px 20px 24px; }
  .notes .letter .sign { justify-content: flex-start; }
  .notes .nlog li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- path-aware next lesson ---------- */
.sleeve .pathdone-note { margin: -4px 0 10px; font-size: 14.5px; font-weight: 600; opacity: .92; }
.donebox .nextwhere { margin: 2px 0 12px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.donebox .pathdone { border: 2px solid var(--ink); background: var(--paper-hi); padding: 14px 16px; margin: 6px 0 14px; }
.donebox .pathdone b { font-size: 17px; }
.donebox .pathdone p { margin: 6px 0 10px; font-size: 14.5px; line-height: 1.7; }

/* ---------- 읽을거리 (glossary footer) ---------- */
.reading { margin: 56px 0 0; padding-top: 28px; border-top: 3px solid var(--ink); max-width: 820px; }
.reading h2 { font-family: var(--f-ko-display); font-weight: 400; font-size: 30px; margin: 0 0 8px; }
.reading .rintro { margin: 0 0 22px; font-size: 14.5px; line-height: 1.75; }
.reading .rgroup { margin: 0 0 26px; }
.reading h3 { font-family: var(--f-label); font-weight: 700; font-size: 14px; letter-spacing: .12em; color: var(--red); margin: 0 0 6px; }
.reading .rdocs { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.reading .ritem { padding: 14px 0; border-bottom: 1px dotted var(--rule); }
.reading .rt { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.reading .rt a { color: var(--ink); text-decoration-color: var(--teal); text-underline-offset: 3px; }
.reading .rby { margin: 3px 0 5px; font-size: 13px; color: var(--ink-2); }
.reading .rbl { margin: 0 0 5px; font-size: 14.5px; line-height: 1.7; }
.reading .rcount { margin: 0; font-family: var(--f-label); font-size: 13px; letter-spacing: .02em; color: var(--ink-3); }
.reading .rref { margin-top: 6px; }
.reading .rref .rdocs { margin-top: 8px; }
.reading .rrow { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px dotted var(--rule); font-size: 14.5px; }
.reading .rrow a { color: var(--ink); font-weight: 600; }
@media (max-width: 767px) { .reading h2 { font-size: 26px; } .reading .rt { font-size: 15.5px; } }

/* wide layout: the progress panel now holds just the ring, review and ranking, so center it instead of leaving a blank bottom */
@media (min-width: 1100px) {
  .prog { justify-content: center; gap: 28px; }
  .prog .ring { width: 190px; height: 190px; }
  .prog .ring-copy .big { font-size: 64px; }
  .prog .ring-copy .big small { font-size: 28px; }
  .prog .ring-copy p { font-size: 17px; }
}

/* ---------- 영상과 링크 (dancer lessons: extra videos by year + official links) ---------- */
.media { border-top: 3px solid var(--ink); padding-top: 22px; max-width: 720px; }
.media .vh { margin: 22px 0 6px; font-family: var(--f-ui); font-size: 14px; font-weight: 700; letter-spacing: 0; }
.media .vnote { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.vlist { margin: 0; padding: 0; list-style: none; border-top: 1.5px solid var(--ink); }
.vlist li { border-bottom: 1px dotted var(--rule); }
.vlist button { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; padding: 10px 6px; cursor: pointer; font-size: 14px; line-height: 1.45; }
.vlist button:hover { background: var(--paper-hi); }
.vlist .yr { font-family: var(--f-label); font-weight: 700; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.vlist .t { display: block; font-weight: 600; }
.vlist .c { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.vlist li.on button { background: var(--ink); color: var(--paper); }
.vlist li.on .c { color: rgba(230, 227, 220, .8); }
.olinks { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); display: grid; grid-template-columns: 96px 1fr; font-size: 15px; line-height: 1.5; }
.olinks li { display: contents; }
.olinks .k { color: var(--ink-2); padding: 8px 0; border-bottom: 1px dotted var(--rule); font-size: 14px; }
.olinks .v { padding: 8px 0; border-bottom: 1px dotted var(--rule); font-weight: 600; overflow-wrap: anywhere; }
.olinks .v a { text-decoration-color: var(--teal); text-underline-offset: 3px; }
.olinks .v small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.vjump { margin: 8px 0 0; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
@media (max-width: 767px) { .vjump { display: none; } .olinks { grid-template-columns: 84px 1fr; } }
@media (min-width: 1100px) { .rail { gap: 16px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; } }
.sronly { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (min-width: 1100px) { .rail :focus-visible { outline-offset: -2px; } }

/* phone-only player pieces stay hidden on wider screens */
:where(.vctrl, .vscrim, .rprog) { display: none; }
/* first-time hint for the dotted terms */
.termhint { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 22px; padding: 10px 12px; border: 1.5px dashed var(--teal); font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.termhint b { font-weight: 600; color: var(--ink); border-bottom: 2px dotted var(--teal); }
.termhint button { flex: none; min-height: 40px; padding: 2px 14px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
/* footnote numbers are tiny; give fingers a bigger target */
@media (max-width: 767px), (pointer: coarse) { .fn::after { content: ""; position: absolute; inset: -18px -8px -20px; } }
:where(.lcard) { display: none; }
@keyframes ppcue { 0% { box-shadow: 0 0 0 0 rgba(227, 162, 26, .95); } 100% { box-shadow: 0 0 0 14px rgba(227, 162, 26, 0); } }
@keyframes barflash { 0%, 100% { background: var(--ink); } 35% { background: #4a3a1f; } }
@media (prefers-reduced-motion: reduce) { .pm-a.cue .mini [data-pp], .pm-a.flash { animation: none; } }
