/* 홍강의실 — 클래스 앞머리 lc-. 넓은 화면은 전체 너비(왼쪽 자료·단원 | 가운데 교육과정·학습 글 | 오른쪽 목차·도우미), 글 줄만 폭 제한
   변수 이름(--bg·--ink·--line·--cyan·--violet…)은 홍브레인과 같게 → 그림 상자(lc-dg-*) CSS를 그대로 씀 (맨 아래) */
:root, html[data-theme="dark"] {
  --bg: #08090f; --bg-2: #11131c; --card: rgba(255, 255, 255, .038); --card-2: rgba(255, 255, 255, .07); --line: rgba(255, 255, 255, .075); --line-2: rgba(255, 255, 255, .15);
  --ink: #f1f2f8; --ink-2: #c9ccda; --muted: #8f94a8; --cyan: #8e96ff; --cyan-2: #b7bcff; --violet: #c3a6ff; --gold: #e2c07a; --ok: #3fd9a3; --warn: #f5c04a; --danger: #fb7d7d; --extra: #f5a524;
  --main: linear-gradient(135deg, #5a5ff2, #7b4fe6); --sheen: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -18px rgba(0, 0, 0, .85);
  --shadow-up: inset 0 1px 0 rgba(255, 255, 255, .07), 0 2px 4px rgba(0, 0, 0, .4), 0 22px 44px -20px rgba(70, 76, 220, .45);
  --glow-1: rgba(98, 104, 255, .17); --glow-2: rgba(226, 192, 122, .07); --glow-3: rgba(170, 120, 255, .09);
  --r: 18px; --ease: cubic-bezier(.2, .8, .2, 1); color-scheme: dark;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, 'D2Coding', monospace;
}
html[data-theme="light"] {
  --bg: #f6f4ee; --bg-2: #fffdf9; --card: #fffdf9; --card-2: #f2efe7; --line: #e7e2d6; --line-2: #d4cdbd;
  --ink: #17161e; --ink-2: #33313d; --muted: #67646f; --cyan: #4a4dd6; --cyan-2: #3537ad; --violet: #7346d8; --gold: #9a7326; --ok: #0d8f63; --warn: #a86b12; --danger: #cf3b3b; --extra: #b05208; color-scheme: light;
  --main: linear-gradient(135deg, #4a4dd6, #6d3fd1); --sheen: linear-gradient(180deg, #fffefb, #fcfaf5);
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 2px rgba(40, 30, 10, .05), 0 12px 30px -18px rgba(40, 30, 10, .22);
  --shadow-up: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 2px 6px rgba(40, 30, 10, .06), 0 22px 40px -20px rgba(74, 77, 214, .35);
  --glow-1: rgba(98, 104, 255, .10); --glow-2: rgba(214, 170, 80, .12); --glow-3: rgba(170, 120, 255, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.6; min-height: 100dvh; overflow-x: hidden; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; letter-spacing: -.005em;
  background: radial-gradient(1100px 620px at 8% -12%, var(--glow-1), transparent 62%), radial-gradient(900px 520px at 100% -6%, var(--glow-2), transparent 60%), radial-gradient(800px 600px at 60% 110%, var(--glow-3), transparent 60%), var(--bg); background-attachment: fixed; }
::selection { background: color-mix(in srgb, var(--cyan) 32%, transparent); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.lc-muted { color: var(--muted); }

/* 홍공부방 화면 메뉴 (내 기록 · 일정 관리 · 내 공부방 · 강의 만들기 — 홍공부방 .hs-menu 와 같은 모양, 2026-10-20) */
.lc-hsnav { display: flex; gap: 2px; padding: 6px clamp(12px, 2vw, 24px) 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.lc-hsnav::-webkit-scrollbar { display: none; }
.lc-hsnav a { position: relative; padding: 9px 16px 11px; font-size: 14.5px; font-weight: 700; color: var(--muted); white-space: nowrap; border-radius: 10px 10px 0 0; }
.lc-hsnav a:hover { color: var(--ink); background: var(--card); }
.lc-hsnav a[aria-current="page"] { color: var(--ink); }
.lc-hsnav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 3px; background: var(--cyan); }
@media (max-width: 640px) { .lc-hsnav a { flex: 1; text-align: center; padding: 9px 4px 10px; font-size: 13.5px; } }

/* 위 막대 */
.lc-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 clamp(12px, 2vw, 24px); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 color-mix(in srgb, var(--gold) 10%, transparent); }
.lc-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; white-space: nowrap; }
.lc-logo { position: relative; width: 28px; height: 28px; border-radius: 9px; background: var(--main); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent), 0 6px 18px color-mix(in srgb, var(--cyan) 40%, transparent); }
.lc-logo::after { content: ""; position: absolute; inset: 8px 7px 9px; border: 2px solid rgba(255, 255, 255, .92); border-top: 0; border-radius: 0 0 6px 6px; }
.lc-crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.lc-crumb a, .lc-crumb span { overflow: hidden; text-overflow: ellipsis; }
.lc-crumb a:hover { color: var(--ink); }
.lc-crumb span { color: var(--ink-2); font-weight: 600; }
.lc-crumb i { font-style: normal; opacity: .5; }
.lc-top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lc-sync { font: inherit; font-size: 12px; color: var(--muted); background: none; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; cursor: pointer; }
.lc-sync:hover { color: var(--ink); border-color: var(--cyan); }
.lc-sync[data-state="local"]::after, .lc-sync[data-state="off"]::after { content: ' → 동기화'; color: var(--cyan-2); font-weight: 700; }
.lc-sync[data-state="sync"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.lc-sync[data-state="error"] { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.lc-icon { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--sheen); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 15px; transition: border-color .2s, transform .2s var(--ease); }
.lc-icon:hover { border-color: color-mix(in srgb, var(--cyan) 50%, var(--line)); transform: translateY(-1px); }

/* 단추 */
.lc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 17px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--sheen); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .18s var(--ease), border-color .2s, box-shadow .2s; }
.lc-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: color-mix(in srgb, var(--cyan) 60%, var(--line-2)); }
.lc-btn:active:not(:disabled) { transform: translateY(0); }
.lc-btn:focus-visible, .lc-icon:focus-visible, .lc-seg button:focus-visible, .lc-flow-dots button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lc-btn:disabled { opacity: .55; cursor: default; }
.lc-btn-main { background: var(--main); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 22px -6px color-mix(in srgb, var(--cyan) 60%, transparent); }
.lc-btn-main:hover:not(:disabled) { border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 28px -6px color-mix(in srgb, var(--cyan) 70%, transparent); }
.lc-link-btn { border: 0; background: none; padding: 4px 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.lc-link-btn:hover { color: var(--danger); }
.lc-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* 첫 화면 */
.lc-main { padding: clamp(14px, 2.4vw, 32px); }
.lc-home { max-width: 1480px; margin: 0 auto; }
.lc-hero { position: relative; padding: clamp(22px, 5vw, 64px) 0 28px; }
.lc-hero h1 { margin: 0 0 14px; font-size: clamp(28px, 4.4vw, 50px); line-height: 1.15; letter-spacing: -.035em; font-weight: 800; background: linear-gradient(115deg, var(--ink) 35%, var(--cyan-2) 75%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lc-hero p { margin: 0; max-width: 680px; color: var(--ink-2); font-size: clamp(15px, 1.4vw, 17px); }
.lc-hero-act { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.lc-steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lc-steps li { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--sheen); box-shadow: var(--shadow); }
.lc-steps b { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 14%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); color: var(--gold); font-size: 14px; }
.lc-steps span { font-weight: 700; font-size: 14.5px; display: flex; flex-direction: column; }
.lc-steps small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.lc-courses h2 { font-size: 13px; margin: 32px 0 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.lc-courses h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.lc-courses h2 small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.lc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.lc-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sheen); box-shadow: var(--shadow); overflow: hidden; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.lc-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--gold)); opacity: .7; }
.lc-card:hover { border-color: color-mix(in srgb, var(--cyan) 45%, var(--line)); transform: translateY(-3px); box-shadow: var(--shadow-up); }
.lc-card b { font-size: 17px; letter-spacing: -.02em; }
.lc-card span { font-size: 13.5px; }
.lc-card em { font-style: normal; color: var(--warn); font-weight: 700; }
.lc-bar { display: block; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; margin-top: 6px; }
.lc-bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--gold)); }
.lc-empty { padding: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.lc-empty a { color: var(--cyan); }

/* 과목 화면: 왼쪽 | 가운데 | (목차) */
.lc-course { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: clamp(14px, 2vw, 28px); align-items: start; }
.lc-side { position: sticky; top: calc(76px + var(--bb, 0px)); max-height: calc(100dvh - 92px - var(--bb, 0px)); overflow: auto; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.lc-box { border: 1px solid var(--line); border-radius: 16px; background: var(--sheen); box-shadow: var(--shadow); padding: 12px 14px; }
.lc-box > summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; }
.lc-box > summary::after { content: '▾'; color: var(--muted); }
.lc-box:not([open]) > summary::after { content: '▸'; }
.lc-box summary small { margin-left: auto; margin-right: 8px; color: var(--muted); font-weight: 600; }
.lc-files { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lc-files li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 2px; }
.lc-file-no { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--card-2); color: var(--muted); }
.lc-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-files small { color: var(--muted); flex: none; }
.lc-x { flex: none; border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.lc-x:hover { color: var(--danger); background: var(--card-2); }
.lc-drop { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; margin-top: 6px; border: 1.5px dashed var(--line-2); border-radius: 12px; cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.lc-drop:hover, .lc-drop.is-over { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 7%, transparent); }
.lc-drop b { font-size: 13.5px; color: var(--cyan); }
.lc-drop small { font-size: 12px; color: var(--muted); }
.lc-drop-big { padding: 40px 20px; margin: 18px 0; }
.lc-drop-big b { font-size: 16px; }
.lc-engs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.lc-eng { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.lc-eng input { grid-row: span 2; margin: 3px 0 0; accent-color: var(--cyan); }
.lc-eng b { font-size: 13.5px; }
.lc-eng small { font-size: 12px; color: var(--muted); }
.lc-eng.is-on { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 8%, transparent); }
.lc-tier { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.lc-tier select { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); }
.lc-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.lc-note:empty { display: none; }
.lc-box-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; padding: 2px 0 6px; }
.lc-due { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.lc-units ol { list-style: none; margin: 0; padding: 0; }
.lc-units li a { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); }
.lc-units li a:hover { background: var(--card-2); }
.lc-units li a.is-on { background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--ink); font-weight: 700; box-shadow: inset 2px 0 0 var(--cyan); }
.lc-units li a > span:nth-child(2) { flex: 1; min-width: 0; }
.lc-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; border: 1.5px solid var(--line-2); color: var(--muted); }
.lc-dot.is-made { border-color: var(--cyan); color: var(--cyan); }
.lc-dot.is-done { background: var(--ok); border-color: var(--ok); color: #06281c; }
.lc-spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--cyan); animation: lc-spin .8s linear infinite; display: inline-block; }
@keyframes lc-spin { to { transform: rotate(360deg); } }

.lc-center { min-width: 0; }
.lc-start, .lc-wait { max-width: 720px; margin: clamp(10px, 5vh, 60px) auto; text-align: center; }
.lc-start h1 { font-size: 26px; margin: 0 0 8px; }
.lc-start p { color: var(--ink-2); }
.lc-title-in { width: 100%; padding: 12px 14px; font-size: 18px; font-weight: 700; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); text-align: center; }
.lc-wait .lc-spin { width: 34px; height: 34px; border-width: 3px; margin-bottom: 14px; }
.lc-wait b { display: block; font-size: 17px; }
.lc-wait p { color: var(--muted); }

.lc-plan-head h1 { margin: 0 0 10px; font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -.03em; line-height: 1.2; }
.lc-plan-head p { margin: 0; color: var(--ink-2); max-width: 820px; }
.lc-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lc-stats span { padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--sheen); box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.lc-stats b { font-size: 20px; margin-right: 5px; letter-spacing: -.02em; background: linear-gradient(120deg, var(--ink), var(--cyan-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lc-plan-head > small { display: block; margin-top: 8px; font-size: 12px; }
.lc-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 20px 0 0; }
.lc-panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--sheen); box-shadow: var(--shadow); padding: 18px 20px; margin-top: 14px; }
.lc-two .lc-panel { margin: 0; }
.lc-panel h2 { margin: 0 0 8px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.lc-panel h2 small { color: var(--muted); font-weight: 600; font-size: 12px; }
.lc-panel ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.lc-unit-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.lc-unit { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheen); box-shadow: var(--shadow); transition: border-color .25s, box-shadow .25s; }
.lc-unit:hover { border-color: color-mix(in srgb, var(--cyan) 35%, var(--line)); }
.lc-unit.is-done { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.lc-unit-no { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--cyan) 13%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); color: var(--cyan-2); }
.lc-unit.is-done .lc-unit-no { background: var(--ok); border-color: var(--ok); color: #06281c; }
.lc-unit-body { min-width: 0; }
.lc-unit h3 { margin: 2px 0 4px; font-size: 16px; }
.lc-unit h3:hover { color: var(--cyan); }
.lc-unit p { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); }
.lc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.lc-tags span { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.lc-tags .is-extra { border-color: color-mix(in srgb, var(--extra) 50%, transparent); color: var(--extra); }
.lc-tags .is-extra::before { content: '+ '; }
.lc-unit-exam b { font-size: 11.5px; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); margin-right: 4px; }
.lc-unit small { font-size: 12px; }
.lc-unit-act { display: flex; align-items: flex-start; }
.lc-busy { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); max-width: 130px; }
.lc-foot { margin-top: 28px; text-align: right; }

/* 학습 글 (글 줄은 읽기 좋은 폭으로) */
.lc-article { max-width: 820px; margin: 0 auto; font-size: 16.5px; line-height: 1.8; }
.lc-article h1 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.25; margin: 4px 0 20px; letter-spacing: -.03em; }
.lc-article h2 { position: relative; font-size: 22px; letter-spacing: -.02em; margin: 44px 0 14px; padding-left: 16px; scroll-margin-top: 140px; }
.lc-article h2::before { content: ""; position: absolute; left: 0; top: .28em; width: 4px; height: 1em; border-radius: 4px; background: linear-gradient(var(--cyan), var(--violet) 60%, var(--gold)); }
.lc-article h3 { font-size: 17.5px; margin: 28px 0 8px; }
.lc-article p, .lc-article li { color: var(--ink-2); }
/* 정리 목록 아래 괄호 쉬운 설명 (운영자 요청 2026-10-19) — 정리와 구분되게 왼쪽 선·조금 작게 */
.lc-article p.lc-easy { margin: 10px 0 16px; padding: 8px 14px; border-left: 3px solid var(--cyan); border-radius: 0 10px 10px 0; background: var(--card-2); color: var(--ink-2); font-size: .95em; line-height: 1.75; }
.lc-article p.lc-ex { border-left-color: var(--violet); color: var(--ink); font-size: 1em; }
.lc-article p.lc-ex > strong:first-child { color: var(--violet); margin-right: 4px; }
.lc-article strong { color: var(--ink); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--cyan) 22%, transparent) 0); }
.lc-article li::marker { color: var(--cyan); font-weight: 800; }
.lc-article code { font-family: var(--mono); font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); }
.lc-article pre { overflow: auto; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.lc-article pre code { border: 0; background: none; padding: 0; }
.lc-article table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 14.5px; margin: 16px 0; }
.lc-article th, .lc-article td { border: 1px solid var(--line-2); padding: 7px 12px; text-align: left; vertical-align: top; }
.lc-article th { background: var(--card-2); }
.lc-article blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--line-2); color: var(--muted); }
.lc-article img { max-width: 100%; }
.lc-callout { --co: var(--cyan); margin: 18px 0; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--co) 45%, transparent); background: color-mix(in srgb, var(--co) 7%, transparent); overflow: hidden; }
.lc-callout-head { padding: 8px 16px; font-weight: 800; font-size: 13.5px; color: var(--co); background: color-mix(in srgb, var(--co) 10%, transparent); }
.lc-callout-body { padding: 10px 16px 2px; font-size: 15.5px; }
.lc-callout-body > :first-child { margin-top: 0; }
.lc-callout-extra { --co: var(--extra); }
.lc-callout-myth { --co: var(--danger); }
.lc-callout-memorize { --co: var(--violet); }
.lc-callout-keypoint { --co: var(--ok); }
.lc-callout-important, .lc-callout-exam { --co: var(--warn); }
.lc-callout-answer { --co: var(--ok); }
details.lc-callout > summary { cursor: pointer; list-style: none; }
details.lc-callout:not([open]) > summary { background: none; }
.lc-art-foot { max-width: 820px; margin: 36px auto 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-size: 13px; }
.lc-art-foot .lc-link-btn { margin-left: auto; }
.lc-pager { max-width: 820px; margin: 18px auto 40px; display: flex; justify-content: space-between; gap: 10px; }
.lc-pager a { max-width: 48%; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheen); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: border-color .2s; }
.lc-pager a:hover { border-color: var(--cyan); }
.lc-rev-sum { font-size: 15px; margin: 0; max-width: none; }
.lc-later { list-style: none; padding: 0 !important; }
.lc-later li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.lc-later a:hover { color: var(--cyan); }

/* 알림 */
.lc-toast { position: fixed; left: 50%; bottom: 22px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: min(560px, calc(100vw - 28px)); padding: 12px 20px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .45); transition: opacity .25s, transform .25s var(--ease); }
.lc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.lc-toast.is-bad { background: var(--danger); color: #fff; }

/* AI 도우미 창 (공용 부품 hong-ai) — 넓은 화면: 오른쪽에 붙임(너비는 --hai-w), 좁은 화면: 아래에서 올라오는 창 */
#lc-ai.lc-ai { position: fixed; z-index: 50; left: 8px; right: 8px; bottom: 8px; height: min(78dvh, 640px); }
#lc-ai.lc-ai[hidden] { display: none !important; }
@media (min-width: 900px) {
  #lc-ai.lc-ai { left: auto; top: 64px; right: 10px; bottom: 10px; height: auto; width: min(var(--hai-w, 420px), calc(100vw - 20px)); }
  body.lc-ai-dock { padding-right: calc(var(--hai-w, 420px) + 10px); }
  body.lc-ai-dock .lc-top { margin-right: calc(-10px - var(--hai-w, 420px)); }
}

/* 좁은 화면 */
@media (max-width: 1100px) { body.lc-ai-dock .lc-course { grid-template-columns: minmax(0, 1fr); } body.lc-ai-dock .lc-side { position: static; max-height: none; } }
@media (max-width: 860px) {
  .lc-course, .lc-reading { grid-template-columns: minmax(0, 1fr); }
  .lc-side { position: static; max-height: none; }
  .lc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-reading .lc-side { order: 2; }
}
@media (max-width: 560px) {
  .lc-sync { padding: 3px 8px; font-size: 11px; }
  .lc-sync[data-state="local"]::after, .lc-sync[data-state="off"]::after { content: ''; }
  .lc-steps { grid-template-columns: minmax(0, 1fr); }
  .lc-unit { grid-template-columns: auto 1fr; }
  .lc-unit-act { grid-column: 2; }
  .lc-article { font-size: 16px; }
  .lc-art-foot .lc-link-btn { margin-left: 0; }
  .lc-hero-act .lc-btn { flex: 1; }
}

/* ---- 그림 상자 (md.js ```흐름 ``` 등) — 홍브레인 style.css 에서 가져옴 (br- → lc-) ---- */
.lc-md .lc-keyline { font-size: 18.5px; line-height: 1.65; font-weight: 700; margin: 0 0 18px; padding: 14px 18px; border-radius: 12px; background: color-mix(in srgb, var(--cyan) 8%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); }
.lc-md .lc-keyline strong, .lc-md th strong { background: none; padding: 0; }

/* 글 안 그림 (md.js가 ```flow·layers·compare·seq·tree를 바꿈). 그림 폭에 따라 모양이 바뀌도록 컨테이너 쿼리 */
.lc-dg { margin: 22px 0; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--violet) 4%, var(--card-2)); container-type: inline-size; line-height: 1.5; }
.lc-dg > figcaption { margin: 0 0 12px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.lc-dg b { font-weight: 800; color: var(--ink); }
.lc-dg small { color: var(--muted); }
.lc-dg .is-hot:not(li), .lc-dg li.is-hot > .lc-dg-node { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, var(--bg-2)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 35%, transparent); }
.lc-dg ul { margin: 0; padding: 0; list-style: none; }
.lc-dg li { margin: 0; }
/* 흐름 */
.lc-dg-row { display: flex; flex-direction: column; }
.lc-dg-row:not(.is-h) { max-width: 480px; margin: 0 auto; }   /* 긴 흐름은 세로로, 넓은 화면에선 가운데 좁게 */
.lc-dg-step { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); }
.lc-dg-step b { font-size: 14.5px; }
.lc-dg-step small { font-size: 12.5px; }
.lc-dg-arrow { position: relative; display: flex; align-items: center; min-height: 30px; padding: 6px 0 6px calc(50% + 14px); font-size: 12px; font-weight: 700; color: var(--cyan); }
.lc-dg-arrow::before { content: ""; position: absolute; left: calc(50% - 1px); top: 3px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--muted); opacity: .6; }
.lc-dg-arrow::after { content: ""; position: absolute; left: calc(50% - 5px); bottom: 3px; border: 5px solid transparent; border-bottom: 0; border-top: 6px solid var(--muted); }
@container (min-width: 600px) {
  .lc-dg-row.is-h { flex-direction: row; align-items: stretch; }
  .lc-dg-row.is-h .lc-dg-step { flex: 1 1 0; min-width: 0; justify-content: center; }
  .lc-dg-row.is-h .lc-dg-arrow { flex: 0 0 78px; min-height: 0; padding: 0 4px; justify-content: center; text-align: center; font-size: 11.5px; line-height: 1.3; }
  .lc-dg-row.is-h .lc-dg-arrow span { position: absolute; left: 2px; right: 2px; bottom: calc(50% + 6px); }
  .lc-dg-row.is-h .lc-dg-arrow::before { left: 6px; right: 12px; top: calc(50% - 1px); bottom: auto; width: auto; height: 2px; }
  .lc-dg-row.is-h .lc-dg-arrow::after { left: auto; right: 5px; top: calc(50% - 5px); bottom: auto; border: 5px solid transparent; border-right: 0; border-left: 7px solid var(--muted); }
}
/* 층 */
.lc-dg-stack { display: flex; flex-direction: column; gap: 6px; }
.lc-dg-layer { display: flex; align-items: baseline; gap: 4px 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-2); border-left: 4px solid color-mix(in srgb, var(--violet) 60%, transparent); background: var(--bg-2); }
.lc-dg-layer b { flex: 0 0 34%; font-size: 14.5px; }
.lc-dg-layer span { font-size: 13px; color: var(--muted); }
.lc-dg-layer.is-hot { border-left-color: var(--cyan); }
@container (max-width: 440px) { .lc-dg-layer { flex-direction: column; } .lc-dg-layer b { flex: none; } }
/* 비교 */
.lc-dg-cols { display: grid; gap: 10px; }
@container (min-width: 480px) { .lc-dg-cols.lc-dg-n2 { grid-template-columns: 1fr 1fr; } }
@container (min-width: 600px) { .lc-dg-cols.lc-dg-n3 { grid-template-columns: repeat(3, 1fr); } }
.lc-dg-col { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); }
.lc-dg-col-head { display: block; margin-bottom: 6px; font-size: 15px; }
.lc-dg-col p { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.lc-dg-col ul { margin: 0 0 4px; }
.lc-dg-col li { position: relative; padding-left: 14px; margin: 3px 0; font-size: 13.5px; line-height: 1.5; }
.lc-dg-col li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
/* 주고받기 */
.lc-dg-n2 { --n: 2; } .lc-dg-n3 { --n: 3; } .lc-dg-n4 { --n: 4; } .lc-dg-n5 { --n: 5; }
.lc-dg-from1 { grid-column-start: 1; } .lc-dg-from2 { grid-column-start: 2; } .lc-dg-from3 { grid-column-start: 3; } .lc-dg-from4 { grid-column-start: 4; } .lc-dg-from5 { grid-column-start: 5; }
.lc-dg-span1 { grid-column-end: span 1; --span: 1; } .lc-dg-span2 { grid-column-end: span 2; --span: 2; } .lc-dg-span3 { grid-column-end: span 3; --span: 3; } .lc-dg-span4 { grid-column-end: span 4; --span: 4; } .lc-dg-span5 { grid-column-end: span 5; --span: 5; }
.lc-dg-seq { position: relative; padding-bottom: 6px; }
.lc-dg-lanes, .lc-dg-seq-head, .lc-dg-msg-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.lc-dg-lanes { position: absolute; inset: 14px 0 0; pointer-events: none; }
.lc-dg-lanes i { position: relative; }
.lc-dg-lanes i::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed var(--line-2); }
.lc-dg-seq-head { position: relative; margin-bottom: 4px; }
.lc-dg-actor { justify-self: center; max-width: calc(100% - 4px); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.lc-dg-msg-row { position: relative; }
.lc-dg-msg { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; margin-inline: calc(50% / var(--span)); padding-top: 10px; min-width: 0; }
.lc-dg-msg-text { padding: 0 4px 3px; font-size: 12.5px; line-height: 1.35; text-align: center; color: var(--ink-2); overflow-wrap: anywhere; }
.lc-dg-msg-line { position: relative; align-self: stretch; height: 2px; background: var(--cyan); }
.lc-dg-msg-line::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-right: 0; border-left: 7px solid var(--cyan); }
.lc-dg-msg.is-left .lc-dg-msg-line::after { right: auto; left: -1px; border-left: 0; border-right: 7px solid var(--cyan); }
.lc-dg-msg.is-back .lc-dg-msg-line { background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 10px); }
.lc-dg-msg.is-back .lc-dg-msg-line::after { border-left-color: var(--muted); }
.lc-dg-msg.is-back.is-left .lc-dg-msg-line::after { border-right-color: var(--muted); }
.lc-dg-msg.is-self { margin-inline: 2px; }
.lc-dg-msg.is-self .lc-dg-msg-text { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); }
/* 나무 */
.lc-dg-tree ul { margin-left: 14px; padding-left: 18px; }
.lc-dg-tree li { position: relative; padding: 4px 0; }
.lc-dg-tree ul > li::before { content: ""; position: absolute; left: -18px; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.lc-dg-tree ul > li:last-child::before { bottom: auto; height: 22px; }
.lc-dg-tree ul > li::after { content: ""; position: absolute; left: -18px; top: 22px; width: 14px; border-top: 1px solid var(--line-2); }
.lc-dg-node { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); }
.lc-dg-node b { font-size: 14px; }
.lc-dg-node small { font-size: 12.5px; }

/* 다이어그램 (```draw, md.js drawDiagram) — 상자·선은 SVG, 색은 테마 변수. 좁은 화면에선 80%까지 줄고 그보다 좁으면 옆으로 밀어 봄 */
.lc-dg-canvas { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.lc-dg-canvas svg { display: block; height: auto; margin: 0 auto; font-family: inherit; overflow: visible; }
.lc-dg-draw .lc-dg-n rect, .lc-dg-draw .lc-dg-n circle, .lc-dg-draw .lc-dg-n ellipse, .lc-dg-draw .lc-dg-n polygon, .lc-dg-draw .lc-dg-n path { fill: var(--bg-2); stroke: var(--muted); stroke-width: 1.4; }
.lc-dg-draw .lc-dg-n .is-fill { fill: var(--ink); stroke: none; }
.lc-dg-draw .lc-dg-n .lc-dg-stick { fill: none; stroke-linecap: round; }
.lc-dg-draw .lc-dg-n.is-hot rect, .lc-dg-draw .lc-dg-n.is-hot circle, .lc-dg-draw .lc-dg-n.is-hot ellipse, .lc-dg-draw .lc-dg-n.is-hot polygon, .lc-dg-draw .lc-dg-n.is-hot path:not(.lc-dg-stick) { stroke: var(--cyan); stroke-width: 2; fill: color-mix(in srgb, var(--cyan) 10%, var(--bg-2)); }
.lc-dg-draw .lc-dg-sep { stroke: var(--line-2); stroke-width: 1.2; }
.lc-dg-draw text { fill: var(--ink-2); font-size: 12.5px; }
.lc-dg-draw .lc-dg-name { fill: var(--ink); font-size: 13.5px; font-weight: 700; }
.lc-dg-draw .lc-dg-sub { fill: var(--ink-2); font-size: 12.5px; }
.lc-dg-draw .lc-dg-e :is(line, path) { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.lc-dg-draw .lc-dg-e.is-dash :is(line, path) { stroke-dasharray: 6 4; }
.lc-dg-draw .lc-dg-head { fill: var(--muted); stroke: var(--muted); stroke-width: 1.4; stroke-linejoin: round; }
.lc-dg-draw .lc-dg-head.is-open { fill: var(--bg-2); }
.lc-dg-draw .lc-dg-e.is-hot :is(line, path) { stroke: var(--cyan); stroke-width: 2.2; }
.lc-dg-draw .lc-dg-e.is-hot .lc-dg-head { stroke: var(--cyan); }
.lc-dg-draw .lc-dg-e.is-hot .lc-dg-head:not(.is-open) { fill: var(--cyan); }
.lc-dg-draw .lc-dg-tagbg { fill: var(--bg-2); stroke: var(--line); stroke-width: 1; }
.lc-dg-draw .lc-dg-elabel, .lc-dg-draw .lc-dg-mult { text-anchor: middle; font-size: 12px; font-weight: 700; }
.lc-dg-draw .lc-dg-elabel { fill: var(--cyan); }
.lc-dg-draw .lc-dg-mult { fill: var(--ink-2); }
.lc-dg-draw .lc-dg-g rect { fill: none; stroke: var(--line-2); stroke-width: 1.4; stroke-dasharray: 7 5; }
.lc-dg-draw .lc-dg-g text { fill: var(--muted); font-size: 12px; font-weight: 800; }
.lc-dg-draw svg g { transition: opacity .25s; }
.lc-dg-draw svg g.is-later { opacity: .08; }
.lc-dg-draw .lc-dg-n.is-new rect, .lc-dg-draw .lc-dg-n.is-new circle:not(.is-fill), .lc-dg-draw .lc-dg-n.is-new ellipse, .lc-dg-draw .lc-dg-n.is-new polygon, .lc-dg-draw .lc-dg-n.is-new path:not(.lc-dg-stick) { stroke: var(--gold); stroke-width: 2.2; }
.lc-dg-draw .lc-dg-e.is-new :is(line, path) { stroke: var(--gold); stroke-width: 2.2; }
.lc-dg-draw .lc-dg-e.is-new .lc-dg-head { stroke: var(--gold); }
.lc-dg-draw .lc-dg-e.is-new .lc-dg-head:not(.is-open) { fill: var(--gold); }
.lc-dg-draw .lc-dg-g.is-new rect { stroke: var(--gold); }
.lc-dg-swipe { display: none; margin: 6px 0 0; font-size: 12px; color: var(--muted); text-align: right; }
@container (max-width: 420px) { .lc-dg-swipe { display: block; } }
.lc-dg-stepbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.lc-dg-stepbar b { margin-right: 4px; font-size: 12.5px; color: var(--muted); }
.lc-dg-stepbar button { min-width: 32px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lc-dg-stepbar button.is-on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--bg-2)); color: var(--ink); }
.lc-dg .lc-dg-steps { margin: 12px 0 0; padding-left: 22px; list-style: decimal; font-size: 13.5px; color: var(--ink-2); }
.lc-dg .lc-dg-steps li { margin: 3px 0; padding: 2px 6px; border-radius: 6px; }
.lc-dg .lc-dg-steps li.is-on { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--ink); font-weight: 700; }

/* 안내 카드 */

/* 암기 필수 상자 — 다른 상자보다 눈에 띄게 (운영자 요청 2026-10-17 "암기 필수인 것은 표시가 잘 보이게") */
.lc-callout-must { --co: var(--danger); border-width: 1.5px; border-left-width: 5px; }
.lc-callout-must .lc-callout-head { letter-spacing: .04em; }
.lc-callout-must .lc-callout-body { font-weight: 600; color: var(--ink); }
.lc-callout-must .lc-callout-body li, .lc-callout-must .lc-callout-body p { color: var(--ink); }
@media (max-width: 860px) { .lc-course:not(.lc-reading) .lc-units { display: none; } }

/* 파일 변환 (#/convert) */
.lc-conv { max-width: 900px; margin: 0 auto; width: 100%; }
.lc-conv-list { margin: 16px 0 12px; }
.lc-conv-row { flex-wrap: wrap; padding: 8px 4px !important; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); }
.lc-conv-row select { font: inherit; padding: 4px 6px; border-radius: 8px; }
.lc-conv-out { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 100%; }
.lc-conv-out .lc-btn { font-size: 12px; padding: 4px 10px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-bad { color: var(--danger); font-style: normal; font-size: 12px; }
@media (max-width: 600px) { .lc-conv-row .lc-file-name { flex-basis: calc(100% - 40px); } .lc-conv-out { flex-basis: 100%; } }

/* 자료 순서 바꾸기 (▲▼ · 끌기) */
.lc-files li[draggable] { cursor: grab; border-radius: 8px; }
.lc-files li.is-drag { opacity: .4; }
.lc-move { display: flex; flex: none; }
.lc-move button { border: 0; background: none; color: var(--muted); font-size: 9px; line-height: 1; padding: 4px 3px; border-radius: 5px; }
.lc-move button:hover { color: var(--ink); background: var(--card-2); }
.lc-files li:first-child .lc-move [data-d="-1"], .lc-files li:last-child .lc-move [data-d="1"] { visibility: hidden; }

/* 메모 (단원 아래 · #/c/id/notes) */
.lc-memo { margin-top: 18px; }
.lc-memo h2 { display: flex; align-items: baseline; gap: 8px; }
.lc-memo h2 small { font-size: 12px; font-weight: 400; }
.lc-memo-all { margin-left: auto; font-size: 13px; font-weight: 600; }
.lc-panel.lc-memo .lc-ed { min-height: 64px; padding: 4px 2px; }
.lc-memo-tip { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.lc-notes-only .is-empty { display: none; }
.lc-note-only { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.lc-pick { position: absolute; z-index: 50; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--cyan); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.3); cursor: pointer; }
.lc-pick[hidden] { display: none; }

/* ---- 만드는 중 띠 (위 막대 바로 아래, 어느 화면에서도) ---- */
.lc-busybar { position: sticky; top: 58px; z-index: 29; display: flex; align-items: center; gap: 10px; padding: 9px clamp(12px, 2vw, 24px); font-size: 13.5px; background: linear-gradient(90deg, color-mix(in srgb, var(--cyan) 20%, var(--bg)), color-mix(in srgb, var(--violet) 16%, var(--bg))); border-bottom: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); overflow: hidden; }
.lc-busybar[hidden] { display: none; }
.lc-busybar b { white-space: nowrap; }
.lc-busybar b em { font-style: normal; color: var(--gold); margin-left: 4px; }
.lc-busybar-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.lc-busybar a { font-weight: 800; color: var(--cyan-2); white-space: nowrap; }
.lc-busybar s { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; text-decoration: none; background: linear-gradient(90deg, transparent, var(--gold), var(--cyan), transparent) no-repeat; background-size: 35% 100%; animation: lc-slide 1.5s linear infinite; }
@keyframes lc-slide { from { background-position: -60% 0; } to { background-position: 160% 0; } }
body.lc-is-busy { --bb: 40px; }
.lc-unit:has(.lc-busy) { border-color: color-mix(in srgb, var(--cyan) 55%, transparent); animation: lc-glow 1.8s ease-in-out infinite; }
.lc-busy { color: var(--cyan-2); font-weight: 700; }
.lc-units li a:has(.lc-spin) { background: color-mix(in srgb, var(--cyan) 9%, transparent); }
@keyframes lc-glow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 16%, transparent), var(--shadow); } }
.lc-wait { padding: 40px 24px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--cyan) 35%, var(--line)); background: var(--sheen); box-shadow: var(--shadow); animation: lc-glow 1.8s ease-in-out infinite; }
.lc-wait b { color: var(--cyan-2); }

/* ---- 학습 글: 카드로 넘기기 / 이어 읽기 ---- */
.lc-flow { position: sticky; top: calc(66px + var(--bb, 0px)); z-index: 6; max-width: 860px; margin: 0 auto 16px; padding: 12px 14px 10px; border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.lc-flow-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lc-flow-n { font-size: 13px; color: var(--muted); font-weight: 800; letter-spacing: .02em; }
.lc-seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.lc-seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.lc-seg button[aria-pressed="true"] { background: var(--main); color: #fff; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--cyan) 70%, transparent); }
.lc-flow-bar { height: 4px; margin-top: 10px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.lc-flow-bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--gold)); transition: width .35s var(--ease); }
.lc-flow-dots { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.lc-flow-dots::-webkit-scrollbar { display: none; }
.lc-flow-dots button { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 11px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; color: var(--muted); transition: border-color .2s, color .2s; }
.lc-flow-dots button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-flow-dots i { flex: none; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; background: var(--card-2); }
.lc-flow-dots button:hover { color: var(--ink); border-color: var(--line-2); }
.lc-flow-dots .is-past i { background: color-mix(in srgb, var(--cyan) 22%, transparent); color: var(--cyan-2); }
.lc-flow-dots .is-on { color: var(--ink); border-color: color-mix(in srgb, var(--cyan) 60%, transparent); font-weight: 700; }
.lc-flow-dots .is-on i { background: var(--main); color: #fff; }
@keyframes lc-in { from { opacity: 0; transform: translateY(10px); } }
.lc-cards.is-last .lc-art-foot { border-top-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
@media (hover: none) { #lc-sec-hint { display: none; } }

/* ---- 메모: 글 오른쪽에 늘 붙어 있음 ---- */
.lc-reading { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(300px, 360px); }
.lc-rail { position: sticky; top: calc(76px + var(--bb, 0px)); height: calc(100dvh - 92px - var(--bb, 0px)); min-height: 360px; }
.lc-rail .lc-memo { margin: 0; height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheen); box-shadow: var(--shadow); }
.lc-rail h2 { margin: 0; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.lc-rail h2::before { content: '✎'; color: var(--gold); }
.lc-rail .lc-ed { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 4px 40px; font-size: 14.5px; }
.lc-rail-x { display: none; margin-left: 2px; }
.lc-memo-fab { display: none; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 44; align-items: center; gap: 6px; padding: 11px 18px; border: 0; border-radius: 999px; background: var(--main); color: #fff; font-weight: 800; font-size: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 14px 30px -8px color-mix(in srgb, var(--cyan) 70%, transparent); }
.lc-memo-fab i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
@media (max-width: 1180px) {
  .lc-reading { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); }
  .lc-rail { position: fixed; z-index: 45; top: calc(68px + var(--bb, 0px)); right: 12px; bottom: 12px; width: min(380px, calc(100vw - 24px)); height: auto; min-height: 0; transform: translateX(calc(100% + 24px)); visibility: hidden; transition: transform .35s var(--ease), visibility .35s; }
  .lc-rail .lc-memo { background: var(--bg-2); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55); }
  .lc-rail.is-open { transform: none; visibility: visible; }
  .lc-rail-x { display: block; }
  .lc-memo-fab { display: inline-flex; }
}
@media (min-width: 1181px) and (max-width: 1700px) {
  body.lc-ai-dock .lc-reading { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); }
  body.lc-ai-dock .lc-rail { position: fixed; z-index: 45; top: calc(68px + var(--bb, 0px)); right: calc(var(--hai-w, 420px) + 22px); bottom: 12px; width: 360px; height: auto; min-height: 0; transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform .35s var(--ease), visibility .35s; }
  body.lc-ai-dock .lc-rail .lc-memo { background: var(--bg-2); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55); }
  body.lc-ai-dock .lc-rail.is-open { transform: none; visibility: visible; }
  body.lc-ai-dock .lc-rail-x { display: block; }
  body.lc-ai-dock .lc-memo-fab { display: inline-flex; right: calc(var(--hai-w, 420px) + 22px); }
}
@media (min-width: 900px) and (max-width: 1180px) { body.lc-ai-dock .lc-rail, body.lc-ai-dock .lc-memo-fab { right: calc(var(--hai-w, 420px) + 22px); } }
@media (max-width: 860px) { .lc-reading, body.lc-ai-dock .lc-reading { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  #lc-sec-hint { display: none; }
  .lc-rail { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(62dvh, 520px); transform: translateY(calc(100% + 20px)); }
  .lc-flow { padding: 10px 10px 8px; border-radius: 14px; top: calc(62px + var(--bb, 0px)); }
  .lc-flow-dots button { max-width: 150px; }
  .lc-busybar-what .lc-muted { display: none; }
}

/* 메모장 하얀 종이는 고르는 것 (운영자 요청 2026-10-17 — 처음엔 테마를 따라가고, 메모 칸의 ☀ 단추로 켜면 다크에서도 하얀 종이, 이 기기에 기억) */
html[data-memo="paper"] .lc-memo { --ink: #1c1b22; --ink-2: #3a3845; --muted: #6e6b78; --line: #e9edf5; --line-2: #d6dce8; --cyan: #4a4dd6; --cyan-2: #3537ad; --gold: #b08a3e; color-scheme: light; color: var(--ink); }
html[data-memo="paper"] .lc-rail .lc-memo, html[data-memo="paper"] .lc-panel.lc-memo { background: #ffffff; border-color: #e6e9f0; box-shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 18px 40px -22px rgba(20, 24, 40, .35); }
html[data-memo="paper"] .lc-memo { --card-2: #f3f4f8; --card: #ffffff; --bg-2: #ffffff; }
html[data-memo="paper"] .lc-memo .lc-x:hover { background: #f1f3f8; }
html[data-memo="paper"] .lc-memo a { color: var(--cyan-2); }
@media (max-width: 1180px) { html[data-memo="paper"] .lc-rail .lc-memo { background: #ffffff; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45); } }
.lc-paper { margin-left: auto; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.lc-memo-all + .lc-paper, .lc-act .lc-paper { margin-left: 0; }
.lc-paper[aria-pressed="true"] { color: var(--cyan-2); border-color: var(--cyan); }
html[data-theme="light"] .lc-paper { display: none; }
/* 핵심만 / 곁가지 (운영자 요청 2026-10-18 "꼭 읽어야 하는 부분이랑 구분") — 곁가지는 흐리고 '선택' 꼬리표, 핵심만 단추를 켜면 빠짐 */
.lc-core-btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.lc-core-btn[aria-pressed="true"] { background: var(--main); color: #fff; border-color: transparent; }
.lc-core-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lc-article .lc-opt { opacity: .62; }
.lc-article .lc-opt:hover { opacity: 1; }
.lc-article .lc-callout.lc-opt .lc-callout-head::after, .lc-article h2.lc-opt::after { content: '선택'; margin-left: 8px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); vertical-align: 2px; }
.lc-flow-top { flex-wrap: wrap; } .lc-flow-top .lc-seg { margin-left: auto; }
/* 도우미가 보는 범위 (운영자 요청 2026-10-19) — 도우미 창을 열고 카드로 넘길 때만 보임 */
.lc-aiscope { display: none; }
body.lc-ai-dock .lc-reading .lc-aiscope { display: inline-block; }
.lc-aiscope[aria-pressed="true"] { background: var(--card-2); color: var(--cyan-2); border-color: var(--cyan); }

/* ---- 메모 편집기 (editor.js — 홍공부방 기록 칸과 같은 노션식, 운영자 요청 2026-10-18 "줄노트 디자인 별로") ---- */
.lc-ed { outline: none; white-space: pre-wrap; font-size: 15px; line-height: 1.75; min-height: 30px; overflow-wrap: anywhere; color: var(--ink); caret-color: var(--cyan); }
.lc-ed b, .lc-ed strong { font-weight: 800; }
.lc-ed code { font-family: ui-monospace, Consolas, monospace; font-size: .87em; background: var(--card-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.lc-ed a { color: var(--cyan-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.lc-ed-hl { background: #fde68a; color: #1a1a1a; border-radius: 3px; padding: 0 2px; }
.lc-el { position: relative; min-height: 1.75em; padding-left: var(--pl, 0); }
.lc-el[data-k=h1] { font-size: 1.45em; font-weight: 800; line-height: 1.35; margin: .5em 0 .2em; letter-spacing: -.01em; }
.lc-el[data-k=h2] { font-size: 1.22em; font-weight: 800; line-height: 1.4; margin: .45em 0 .15em; }
.lc-el[data-k=h3] { font-size: 1.06em; font-weight: 800; margin: .35em 0 .1em; }
.lc-ed > .lc-el:first-child { margin-top: 0; }
.lc-el[data-k=ul], .lc-el[data-k=ol], .lc-el[data-k=todo], .lc-el[data-k=tog] { --pl: 1.6em; }
.lc-el[data-k=ul]::before, .lc-el[data-k=ol]::before, .lc-el[data-k=todo]::before, .lc-el[data-k=tog]::before, .lc-el[data-k=call]::before { position: absolute; left: 0; top: 0; width: 1.6em; text-align: center; user-select: none; -webkit-user-select: none; }
.lc-el[data-k=ul]::before { content: '•'; font-weight: 800; color: var(--cyan-2); }
.lc-el[data-k=ul][data-ind="1"]::before, .lc-el[data-k=ul][data-ind="4"]::before { content: '◦'; }
.lc-el[data-k=ul][data-ind="2"]::before, .lc-el[data-k=ul][data-ind="5"]::before { content: '▪'; font-size: .8em; line-height: 2.2; }
.lc-el[data-k=ol]::before { content: attr(data-n) '.'; font-variant-numeric: tabular-nums; color: var(--cyan-2); font-weight: 700; }
.lc-el[data-k=todo]::before { content: ''; left: .25em; top: .42em; width: 1em; height: 1em; box-sizing: border-box; border: 1.5px solid var(--ink-2); border-radius: 4px; cursor: pointer; }
.lc-el[data-k=todo][data-done]::before { content: '✓'; background: var(--cyan); border-color: var(--cyan); color: #fff; font: 800 .72em/1.3 sans-serif; width: 1.38em; height: 1.38em; top: .58em; }
.lc-el[data-k=todo][data-done] { text-decoration: line-through; color: var(--muted); }
.lc-el[data-k=tog]::before { content: '▶'; font-size: .7em; line-height: 2.5; width: 2.3em; color: var(--muted); cursor: pointer; transition: transform .15s; }
.lc-el[data-k=tog][data-open]::before { transform: rotate(90deg); }
.lc-el[data-k=quote] { --pl: 14px; color: var(--ink-2); }
.lc-el[data-k=quote]::after { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; border-left: 3px solid var(--cyan); border-radius: 2px; }
.lc-el[data-k=call] { --pl: 2.6em; --pt: 10px; padding-top: 10px; padding-bottom: 10px; padding-right: 12px; margin: 6px 0; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); }
.lc-el[data-k=call]::before { content: attr(data-ico); left: .5em; top: 10px; cursor: pointer; }
.lc-el[data-k=hr] { padding: 4px 0; cursor: default; }
.lc-ed-hr { border: 0; border-top: 1px solid var(--line-2); margin: 8px 0; }
.lc-el[data-k=raw] { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--ink-2); background: var(--card-2); padding-left: 10px; }
.lc-el.lc-el-hid { display: none; }
.lc-ed-tbl { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; }
.lc-ed-tbl table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 13.5px; line-height: 1.5; }
.lc-ed-tbl th, .lc-ed-tbl td { min-width: 64px; max-width: 240px; padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: pre-wrap; }
.lc-ed-tbl th { font-weight: 800; background: var(--card-2); }
.lc-ed-tbl th + th, .lc-ed-tbl td + td { border-left: 1px solid var(--line); }
.lc-ed-tbl tbody tr:last-child td { border-bottom: 0; }
.lc-ed-tblbt { display: none; gap: 4px; padding: 4px 6px; border-top: 1px solid var(--line); position: sticky; left: 0; }
.lc-ed-tbl:hover .lc-ed-tblbt, .lc-ed-tbl:focus-within .lc-ed-tblbt { display: flex; }
.lc-ed-tblbt button { border: 1px solid var(--line); background: none; color: var(--ink-2); border-radius: 6px; padding: 2px 8px; font: 600 12px/1.4 inherit; cursor: pointer; }
.lc-ed-tblbt button:hover { color: var(--ink); background: var(--card-2); }
.lc-el-empty.lc-el-cur::after, .lc-el-empty:not([data-k=p])::after, .lc-ed > .lc-el-empty:only-child[data-k=p]::after { content: attr(data-ph); position: absolute; left: var(--pl, 0); right: 0; top: var(--pt, 0); color: var(--muted); opacity: .8; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-ed > .lc-el-empty:only-child[data-k=p]::after { white-space: normal; }
.lc-el[data-k=quote].lc-el-empty::after { border: 0; }
.lc-fmt { position: fixed; z-index: 60; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.lc-fmt button { min-width: 32px; height: 32px; border: 0; background: none; color: var(--ink); border-radius: 8px; font: 600 14px/1 inherit; cursor: pointer; padding: 0 7px; }
.lc-fmt button:hover { background: var(--card-2); }
.lc-fmt code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.lc-slash { position: fixed; z-index: 62; width: min(260px, calc(100vw - 16px)); max-height: 300px; overflow: auto; padding: 6px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .38); }
.lc-slash-h { margin: 2px 8px 6px; font-size: 12px; color: var(--muted); }
.lc-slash button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--ink); border-radius: 9px; padding: 6px 8px; font: 500 14px/1.3 inherit; text-align: left; cursor: pointer; }
.lc-slash button.on, .lc-slash button:hover { background: var(--card-2); }
.lc-slash-i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); font-size: 13px; font-weight: 700; }

/* ---- 요구사항 (운영자 요청 2026-10-18 "특정 요구사항을 적어서 참고해 만들고, 이미 만든 것도 통째로 고치기") ---- */
.lc-wish-lab { display: block; margin: 16px 0 6px; font-weight: 800; font-size: 14px; }
.lc-wish-lab small { font-weight: 400; margin-left: 6px; }
.lc-wish-in { display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; font: inherit; font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lc-wish-in:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent); }
.lc-start .lc-wish-in { max-width: 560px; margin-bottom: 14px; }
.lc-wish { margin: 0 0 18px; }
.lc-wish summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; min-width: 0; }
.lc-wish summary::-webkit-details-marker { display: none; }
.lc-wish summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.lc-wish:not([open]) summary::after { transform: rotate(-90deg); }
.lc-wish summary h2 { margin: 0; flex: none; }
.lc-wish summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.lc-wish[open] summary span { display: none; }
.lc-wish .lc-wish-in { margin-top: 12px; }
.lc-wish p { margin: 8px 0 10px; font-size: 13px; }
.lc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.lc-art-tools { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; }
.lc-ask { max-width: 860px; margin: 14px auto 0; }
.lc-ask[hidden] { display: none; }
.lc-ask h2 { margin: 0 0 4px; }
.lc-ask p { margin: 0 0 10px; font-size: 13px; }
.lc-ask .lc-act { margin-top: 10px; align-items: center; }

/* ---- 직접 고치기: 학습 글 (마크다운 + 미리보기) ---- */
.lc-edit-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lc-edit-head h1 { margin: 0; font-size: 22px; }
.lc-edit-btns { display: inline-flex; gap: 8px; margin-left: auto; }
.lc-edit-tabs { display: none; }
.lc-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.lc-edit-grid textarea { width: 100%; box-sizing: border-box; height: calc(100dvh - 230px - var(--bb, 0px)); min-height: 420px; resize: vertical; font: 13.5px/1.7 ui-monospace, Consolas, monospace; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; tab-size: 2; }
.lc-edit-grid textarea:focus { outline: none; border-color: var(--cyan); }
.lc-edit-pv { height: calc(100dvh - 230px - var(--bb, 0px)); min-height: 420px; overflow-y: auto; box-sizing: border-box; padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--sheen); }
.lc-edit-pv > :first-child { margin-top: 0; }
.lc-edit-help { font-size: 12.5px; margin: 10px 0 0; }
@media (max-width: 1100px) {
  .lc-edit-tabs { display: inline-flex; }
  .lc-edit-grid { grid-template-columns: minmax(0, 1fr); }
  .lc-edit-grid[data-tab=md] .lc-edit-pv, .lc-edit-grid[data-tab=pv] textarea { display: none; }
}
@media (max-width: 560px) {
  .lc-edit-head h1 { font-size: 19px; width: 100%; }
  .lc-edit-grid textarea, .lc-edit-pv { height: calc(100dvh - 260px); min-height: 320px; padding: 12px; }
  .lc-art-tools { margin-left: 0; }
}

/* ---- 직접 고치기: 교육과정 ---- */
.lc-pe { display: flex; flex-direction: column; gap: 12px; }
.lc-pe-head h1 { margin: 0 0 4px; }
.lc-pe-head p { margin: 0; font-size: 13.5px; }
.lc-pe label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.lc-pe label small { font-weight: 400; }
.lc-pe input, .lc-pe textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; resize: vertical; }
.lc-pe input:focus, .lc-pe textarea:focus { outline: none; border-color: var(--cyan); }
.lc-pe h2 { margin: 10px 0 0; font-size: 17px; }
.lc-pe .lc-two { margin: 0; }
.lc-pe-units { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lc-pe-unit { display: flex; flex-direction: column; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheen); }
.lc-pe-top { display: flex; align-items: center; gap: 10px; }
.lc-pe-top input { font-weight: 800; font-size: 15px; }
.lc-pe-no { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--card-2); font-size: 13px; }
.lc-pe-mv { flex: none; display: inline-flex; gap: 2px; }
.lc-pe-mv button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--muted); font-size: 11px; cursor: pointer; }
.lc-pe-mv button:hover { color: var(--ink); border-color: var(--line-2); }
.lc-pe-mv [data-rm]:hover { color: var(--danger); }
.lc-pe-unit:first-child [data-mv="-1"], .lc-pe-unit:last-child [data-mv="1"] { visibility: hidden; }
.lc-pe-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 200px) 80px; gap: 10px; align-items: start; }
#lc-pe-add { align-self: flex-start; }
.lc-pe-foot { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
@media (max-width: 560px) {
  .lc-pe-row { grid-template-columns: minmax(0, 1fr) 80px; }
  .lc-pe-row > label:first-child { grid-column: 1 / -1; }
  .lc-pe-unit { padding: 12px; }
  .lc-pe-mv button { width: 28px; }
}

/* ---- 이 장만 그 자리에서 고치기 (2026-10-18) ---- */
.lc-sec-tools { float: right; display: flex; gap: 6px; margin: 2px 0 10px 14px; position: relative; z-index: 1; }
.lc-sec-edit, .lc-sec-copy { font: 600 12.5px var(--font); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s; }
.lc-sec-edit:hover, .lc-sec-edit:focus-visible, .lc-sec-copy:hover, .lc-sec-copy:focus-visible { color: var(--cyan); border-color: var(--cyan); outline: none; }
.lc-sec.is-editing { float: none; }
.lc-secedit { display: grid; gap: 10px; }
.lc-secedit-md { width: 100%; box-sizing: border-box; min-height: 220px; resize: vertical; font: 13.5px/1.7 var(--mono); color: var(--ink); background: var(--card-2); border: 1px solid var(--cyan); border-radius: 14px; padding: 12px 14px; tab-size: 2; }
.lc-secedit-md:focus { outline: none; box-shadow: 0 0 0 3px var(--glow-1); }
.lc-secedit-help { margin: 0; font-size: 12.5px; }
.lc-secedit-pv { border: 1px dashed var(--line-2); border-radius: 14px; padding: 4px 16px; max-height: 50vh; overflow: auto; }
.lc-secedit-pv:empty { display: none; }
.lc-secedit .lc-act { display: flex; gap: 8px; }
/* 완료·취소 줄은 위에 붙어 다님 (고치는 동안 단계 막대는 붙지 않게) */
body:has(.lc-secedit) .lc-flow { position: static; }
.lc-secedit-bar { position: sticky; top: calc(66px + var(--bb, 0px)); z-index: 7; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent); background: color-mix(in srgb, var(--bg-2) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.lc-secedit-bar b { font-size: 14px; white-space: nowrap; }
.lc-secedit-bar span { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .lc-secedit-bar span { display: none; } .lc-secedit-bar b { flex: 1; } }
/* 형식 본보기 줄 (요구사항 칸 안) */
.lc-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; }
.lc-sample > b { flex: none; }
.lc-sample > span { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.lc-sample details { flex-basis: 100%; order: 3; }
.lc-sample summary { cursor: pointer; color: var(--muted); }
.lc-sample pre { margin: 8px 0 0; max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.6 var(--mono); padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.lc-sample .lc-btn { padding: 5px 10px; font-size: 12.5px; }
@media (max-width: 560px) { .lc-sec-tools { float: none; justify-content: flex-end; margin: 0 0 10px; } }

/* ---- PDF로 저장 (운영자 요청 2026-10-19) — 인쇄 창에서 학습 글만, 밝은 색·단원마다 새 쪽 ---- */
#lc-print { display: none; }
@media print {
  @page { size: A4; margin: 16mm 15mm; }
  body.lc-printing { background: #fff !important; padding: 0 !important; }
  body.lc-printing > *:not(#lc-print) { display: none !important; }
  body.lc-printing #lc-print { display: block; color: #17161e; }
  body.lc-printing::before, body.lc-printing::after { display: none !important; }
  .lc-dg-stepbar, .lc-dg-swipe { display: none !important; }
  .lc-dg-draw svg g.is-later { opacity: 1 !important; }
  .lc-dg-canvas { overflow: visible; }
  .lc-dg-canvas svg { min-width: 0 !important; }
  .lc-dg-draw { break-inside: avoid; }
  #lc-print .lc-article { max-width: none; margin: 0; padding: 0; font-size: 11pt; line-height: 1.7; }
  #lc-print .lc-print-unit + .lc-print-unit, #lc-print .lc-print-cover + .lc-print-unit { break-before: page; }
  #lc-print .lc-print-cover h1 { font-size: 22pt; margin: 0 0 10px; }
  #lc-print .lc-print-cover p { color: #33313d; }
  #lc-print .lc-print-cover ol { margin-top: 18px; line-height: 2; }
  #lc-print h1, #lc-print h2, #lc-print h3 { break-after: avoid; }
  #lc-print .lc-callout, #lc-print p.lc-easy, #lc-print table, #lc-print pre, #lc-print .lc-dg, #lc-print li { break-inside: avoid; }
  #lc-print .lc-callout, #lc-print p.lc-easy, #lc-print pre { box-shadow: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #lc-print .lc-opt { opacity: 1; }
  #lc-print pre { white-space: pre-wrap; overflow: visible; }
}

/* ---- 메모 접기 (운영자 요청 2026-10-19) — 넓은 화면에서 글 옆 메모도 × 로 접고 '✎ 메모'로 다시 폄 ---- */
@media (min-width: 1181px) {
  .lc-rail-x { display: block; }
  body.lc-memo-off .lc-reading { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
  body.lc-memo-off .lc-reading .lc-rail:not(.is-open) { display: none; }
  body.lc-memo-off .lc-memo-fab { display: inline-flex; }
}
@media (min-width: 1701px) { body.lc-ai-dock.lc-memo-off .lc-memo-fab { right: calc(var(--hai-w, 420px) + 22px); } }

/* 입구 (2026-10-20 "작당 통해서 들어올 수 있게만") — 작당 로그인 + lecture_ok 가 아니면 이것만 */

/* ---- A4 교재 (2026-10-20 운영자 요청 "PDF처럼 보여 주면서 AI가 같이 보는 방식") ----
   종이는 밝은 테마·어두운 테마 모두 흰 종이 (PDF 뷰어처럼 — 그림 색이 흰 바탕 기준). 쪽 크기 = A4 비율, 글을 실제 높이로 재서 채움 (app.js bookFlow) */
.lc-book { --a4-pad: clamp(18px, 5.2%, 46px); display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 820px; margin: 0 auto; }
.lc-book-wait { display: flex; align-items: center; gap: 10px; margin: 60px 0; color: var(--muted); font-weight: 700; }
.lc-a4 {
  --bg: #ffffff; --bg-2: #fbfaf7; --card: #ffffff; --card-2: #f4f2ec; --line: #e7e2d6; --line-2: #d4cdbd;
  --ink: #17161e; --ink-2: #2f2d39; --muted: #67646f; --cyan: #4a4dd6; --cyan-2: #3537ad; --violet: #7346d8; --gold: #9a7326; --ok: #0d8f63; --warn: #a86b12; --danger: #cf3b3b; --extra: #b05208;
  color-scheme: light; color: var(--ink);
  position: relative; width: 100%; aspect-ratio: 210 / 297; display: flex; flex-direction: column; overflow: hidden;   /* 넘치는 글이 쪽을 늘리지 않게 (aspect-ratio 의 자동 최소 높이를 끔) — 넘침은 bookFlow 가 재서 다음 쪽으로 */
  padding: calc(var(--a4-pad) * .62) var(--a4-pad) calc(var(--a4-pad) * .55); background: #fff; border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 10px 34px -12px rgba(0, 0, 0, .45);
}
html[data-theme="light"] .lc-a4 { box-shadow: 0 0 0 1px rgba(40, 30, 10, .06), 0 2px 4px rgba(40, 30, 10, .06), 0 16px 36px -18px rgba(40, 30, 10, .3); }
.lc-a4.is-tall { aspect-ratio: auto; min-height: calc(min(820px, 100%) * 1.414); }
.lc-a4-run { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: calc(var(--a4-pad) * .45); border-bottom: 1px solid #e3ded2; font-size: 11.5px; color: #8b8794; letter-spacing: .01em; }
.lc-a4-run span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-a4-run span:last-child { text-align: right; }
.lc-a4-body.lc-article { flex: 1; min-height: 0; overflow: hidden; max-width: none; width: 100%; margin: 0; font-size: 15.5px; line-height: 1.75; }
.lc-a4-no { margin-top: 10px; text-align: center; font-size: 11.5px; color: #8b8794; font-variant-numeric: tabular-nums; }
.lc-a4 .lc-sec { position: relative; }
.lc-a4 .lc-sec > :first-child, .lc-a4 .lc-sec > .lc-sec-tools + * { margin-top: 0; }
.lc-a4-body > .lc-sec:first-child > h1, .lc-a4-body > .lc-sec:first-child > .lc-sec-tools + h1 { margin-top: 0; }
.lc-a4 .lc-article h1, .lc-a4.lc-article h1, .lc-a4 h1 { font-size: clamp(22px, 3.4vw, 30px); }
.lc-a4 h2 { font-size: 20px; margin-top: 30px; }
.lc-a4 h3 { margin-top: 22px; }
.lc-a4 strong { background: linear-gradient(transparent 64%, rgba(74, 77, 214, .16) 0); }
/* 장 고치기·복사: 종이 위엔 숨겼다가 올리면 (휴대폰은 늘 작게) */
.lc-a4 .lc-sec-tools { position: absolute; float: none; top: -6px; right: 0; margin: 0; opacity: 0; transition: opacity .15s; }
.lc-a4 .lc-sec:hover > .lc-sec-tools, .lc-a4 .lc-sec-tools:focus-within { opacity: 1; }
@media (hover: none) { .lc-a4 .lc-sec-tools { opacity: .9; } .lc-a4 .lc-sec-tools button { padding: 4px 9px; font-size: 11.5px; } }
.lc-a4 .lc-sec.is-editing > .lc-secedit { margin: 0 -4px; }

/* 교재 그림: mermaid · AI가 그린 SVG · 강의 원본 그림 쪽 — 어느 화면에서든 흰 바탕 카드 */
.lc-fig { margin: 20px 0; padding: 14px; border: 1px solid #e3ded2; border-radius: 10px; background: #fff; color: #17161e; break-inside: avoid; text-align: center; }
.lc-fig > figcaption { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: #6b6775; text-align: center; }
.lc-fig svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.lc-fig--svg svg { width: 100%; max-height: 640px; }
.lc-fig .lc-mm svg { max-height: 640px; }
.lc-fig--mermaid:not(.is-bad) .lc-mm-src { visibility: hidden; height: 60px; margin: 0; overflow: hidden; }
.lc-fig--mermaid.is-bad .lc-mm-src { text-align: left; font-size: 13px; }
.lc-fig--src img { display: block; max-width: 100%; max-height: 560px; margin: 0 auto; border-radius: 4px; border: 1px solid #eee; }
.lc-a4 .lc-fig { padding: 10px 6px; border-color: #ece8de; }
.lc-fig--svg, .lc-fig--mermaid { overflow-x: auto; overscroll-behavior-x: contain; }
.lc-fig--svg svg { min-width: min(100%, 440px); }   /* 휴대폰에선 440px 아래로 줄지 않고 옆으로 밀어 봄 (mermaid 는 md.js 가 원래 너비로) */
@media (max-width: 560px) { .lc-fig--svg svg { min-width: 440px; } }

@media (max-width: 560px) {
  .lc-book { gap: 14px; margin: 0 -6px; }
  .lc-a4 { --a4-pad: 16px; }
  .lc-a4-body.lc-article { font-size: 14.5px; line-height: 1.7; }
  .lc-a4 h2 { font-size: 18px; }
  .lc-a4-run { font-size: 10.5px; }
}
@media print {
  .lc-fig { border: 0; padding: 0; }
  .lc-fig .lc-mm svg, .lc-fig--svg svg { max-height: none; }
  #lc-print .lc-fig { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 내 공부방 '강의 자료' 칸 안 (?embed=1, 2026-10-20) — 위 메뉴·도우미·이 단원 메모는 내 공부방이 가짐, 읽기만 */
.lc-embed .lc-hsnav, .lc-embed .lc-brand, .lc-embed #lc-ai-btn, .lc-embed #lc-theme, .lc-embed .lc-rail, .lc-embed .lc-memo-fab, .lc-embed #lc-ai { display: none !important; }
.lc-embed body { padding-right: 0 !important; background: var(--bg); }
.lc-embed .lc-top { height: 46px; gap: 10px; }
.lc-embed .lc-crumb { font-size: 13px; }
.lc-embed .lc-reading { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); }
/* 글을 읽는 중엔 위 줄(위치·동기화)을 없애 글 칸을 넓게 (운영자 요청 2026-10-20) */
.lc-embed body:has(.lc-reading) .lc-top { display: none; }
/* 쪽수 상자: 글을 가리지 않게 따라오지 않음, 단추 없이 한 줄로 작게 (쪽수 · 차례, 아래 얇은 진행 막대) */
.lc-embed .lc-flow { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; margin: 0 auto 10px; padding: 6px 10px; border-radius: 12px; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.lc-embed .lc-flow-top { display: block; }
.lc-embed .lc-flow-top .lc-core-btn { display: none; }
.lc-embed .lc-flow-n { font-size: 12px; white-space: nowrap; }
.lc-embed .lc-flow-dots { margin-top: 0; grid-column: 2; grid-row: 1; }
.lc-embed .lc-flow-dots button { font-size: 12px; padding: 2px 9px 2px 2px; max-width: 180px; }
.lc-embed .lc-flow-dots i { width: 18px; height: 18px; font-size: 10px; }
.lc-embed .lc-flow-bar { grid-column: 1 / -1; height: 3px; margin-top: 6px; }
@media (max-width: 860px) { .lc-embed .lc-reading { grid-template-columns: minmax(0, 1fr); } }
