/* 홍강의실 — 클래스 앞머리 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); }

/* 위 막대 */
.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); }
.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-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; }

/* 안내 카드 */

/* 암기 필수 상자 — 다른 상자보다 눈에 띄게 (운영자 요청 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-memo textarea { width: 100%; box-sizing: border-box; min-height: 80px; resize: vertical; font: inherit; font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.lc-memo textarea:focus { outline: none; border-color: var(--cyan); }
.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; }
.lc-cards .lc-article { padding: clamp(20px, 3.2vw, 44px); border: 1px solid var(--line); border-radius: 24px; background: var(--sheen); box-shadow: var(--shadow); min-height: 50vh; }
.lc-cards .lc-sec:not(.is-on) { display: none; }
.lc-cards .lc-sec.is-on { animation: lc-in .35s var(--ease); }
.lc-cards .lc-sec > :first-child, .lc-cards .lc-sec > h1:first-child + h2 { margin-top: 0; }
@keyframes lc-in { from { opacity: 0; transform: translateY(10px); } }
.lc-sec-nav { display: none; }
.lc-cards .lc-sec-nav { display: flex; max-width: 860px; margin: 16px auto 0; justify-content: space-between; align-items: center; gap: 10px; }
.lc-cards .lc-sec-nav .lc-btn { min-width: 110px; }
.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 textarea { flex: 1; min-height: 0; resize: none; font-size: 14px; line-height: 26px; padding: 6px 14px; border-radius: 12px; background: repeating-linear-gradient(to bottom, transparent 0 25px, var(--line) 25px 26px) 0 6px / 100% 26px local, color-mix(in srgb, var(--bg) 45%, transparent); }
.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-cards .lc-article { padding: 18px 16px; border-radius: 18px; }
  .lc-cards .lc-sec-nav .lc-btn { flex: 1; min-width: 0; }
  .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 textarea { background-color: #ffffff; color: #1c1b22; border-color: #e3e7ef; }
html[data-memo="paper"] .lc-rail .lc-memo textarea { background: repeating-linear-gradient(to bottom, transparent 0 25px, #edf1f8 25px 26px) 0 6px / 100% 26px local, #ffffff; }
html[data-memo="paper"] .lc-memo textarea::placeholder { color: #9a98a6; }
html[data-memo="paper"] .lc-memo textarea:focus { border-color: #a9adf2; box-shadow: 0 0 0 3px rgba(74, 77, 214, .12); }
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; }
