/* aegloslab.com — totalg(FIAFIA) 포털의 디자인을 따른다: 테마 세 가지(낮·보통·밤), 장미 강조색, 장미→해바라기 로고, 둥근 카드·알약 단추.
   색 값은 totalg portal/src/css/00-theme.css 와 같다. 다른 점: 책은 오래 읽으므로 기본이 낮(DAY)이다(totalg 는 보통).
   SVG 도해는 흰 바탕 기준 하우스 스타일이라 모든 테마에서 흰 카드에 둔다. 본문 글꼴은 Noto Sans KR, 둥근 글꼴은 로고·단추에만. */
:root {
  --bg1: #fff0f7; --bg2: #fff8e8; --bg3: #f6ecff; --bgc: #fff8e8; --glow: #ff6fb04d;
  --panel: #ffffff; --line: #ffb3d9;
  --text: #3a0a2e; --muted: #5a1050; --dim: #6e2a66;
  --accent: #ff4f9a; --accent-soft: #ffe0ee; --accent-ink: #b0104e; --on-accent: #3a0a2e;
  --shadow: #ff4f9a33; --index-bg: #fff0f7e6; --scrim: #3a0a2e8c;
  /* 읽기 화면용(totalg 에는 없는 것) */
  --brand-grad: linear-gradient(90deg, #e91e7a, #ff8a1f);
  --head: #b0104e; --head-3: #6e2a66; --secnum: #d6568c; --link: #b0104e;
  --em: #8a0f45; --em-hl: #ffd23f99;
  --code-bg: #fff0f7; --code-line: #ffcfe5; --code-ink: #8a0f45;
  --pre-bg: #ffffff; --pre-ink: #3a0a2e;
  --cell-line: #ffcfe5; --th-bg: #ffe0ee; --th-ink: #8a0f45; --row-alt: #fff7fb; --table-bg: #ffffff;
  --quote-bg: #fff0f7; --nav-bg: #ffffffa6; --hover: #ffe0ee;
  --topbar-h: 60px; --nav-w: 312px; --measure: 46rem;
  --font: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Varela Round", "Noto Sans KR", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK KR", "D2Coding", monospace;
  color-scheme: light;
}
:root[data-theme="medium"] {
  --bg1: #4a0f6e; --bg2: #64137e; --bg3: #8a1668; --bgc: #561173; --glow: #ff4f9a40;
  --panel: #6a1a8c; --line: #c45cff;
  --text: #fff7fb; --muted: #ffe9f5; --dim: #f6d6ee;
  --accent-soft: #c2185b; --accent-ink: #fff0f6;
  --shadow: #1a003355; --index-bg: #4a0f6ee6; --scrim: #1a0030b8;
  --brand-grad: linear-gradient(90deg, #ff4f9a, #ffd23f);
  --head: #ffd1e6; --head-3: #ffe9f5; --secnum: #ff9cc8; --link: #ffc2dd;
  --em: #ffffff; --em-hl: #ffd23f80;
  --code-bg: #ffffff1f; --code-line: #ffffff33; --code-ink: #fff0f6;
  --pre-bg: #3a0a5c; --pre-ink: #fff7fb;
  --cell-line: #c45cff66; --th-bg: #c2185b; --th-ink: #fff0f6; --row-alt: #ffffff0d; --table-bg: #ffffff08;
  --quote-bg: #ffffff14; --nav-bg: #2a0848a6; --hover: #ffffff1a;
  color-scheme: dark;
}
:root[data-theme="night"] {
  --bg1: #160828; --bg2: #22093a; --bg3: #2e0b44; --bgc: #22093a; --glow: #c2185b33;
  --panel: #2c0f48; --line: #6a2a9a;
  --text: #fbefff; --muted: #ecd6ff; --dim: #d0b0ee;
  --accent-soft: #6a0d36; --accent-ink: #ffb3d1;
  --shadow: #00000066; --index-bg: #1a0830e6; --scrim: #060010c4;
  --brand-grad: linear-gradient(90deg, #ff4f9a, #ffd23f);
  --head: #ffb3d1; --head-3: #ecd6ff; --secnum: #ff8cbf; --link: #ffb3d1;
  --em: #ffe0f0; --em-hl: #ffd23f66;
  --code-bg: #ffffff14; --code-line: #ffffff26; --code-ink: #ffd6ea;
  --pre-bg: #1a0830; --pre-ink: #fbefff;
  --cell-line: #6a2a9a; --th-bg: #6a0d36; --th-ink: #ffb3d1; --row-alt: #ffffff08; --table-bg: #ffffff05;
  --quote-bg: #ffffff0d; --nav-bg: #120620b3; --hover: #ffffff12;
  color-scheme: dark;
}

/* 도해(SVG) 색: 빌드가 하우스 스타일 토큰 색을 역할 변수로 바꿔 둔다(tools/build_site.py SVG_ROLES).
   낮은 흰 종이에 자두·장미 잉크, 보통·밤은 짙은 종이에 밝은 잉크. 데이터 계열 4색은 색상을 지키고 어두운 테마에서 밝힌다.
   흰색 = 종이: 강조 상자(짙은 채움 + 흰 글자)는 어두운 테마에서 밝은 채움 + 종이색 글자로 뒤집힌다. */
:root {
  --g-paper: #ffffff; --g-ink: #3a0a2e; --g-ink2: #6e2a66; --g-ink3: #4a1a3e; --g-mute: #9a6a8e;
  --g-edge: #8a0f45; --g-wire: #6e2a66; --g-zero: #d38fb4; --g-grid: #ffe3ef; --g-grid2: #fff0f6; --g-line: #ffcfe5; --g-gray: #ebc6da;
  --g-box: #fff7fb; --g-box-m: #fbf4f8; --g-acc-f: #ffe0ee; --g-acc: #ff4f9a;
  --g-warn-f: #fff3d6; --g-warn: #b7791f; --g-bad-f: #ffe8e8; --g-bad: #c0392b; --g-ok-f: #e7f5ec; --g-ok: #2e8b57;
  --g-s1: #2a78d6; --g-s2: #eb6834; --g-s3: #1baf7a; --g-s4: #4a3aa7;
  --g-s1-f: #e8f1fc; --g-s2-f: #fdeee6; --g-s3-f: #e3f6ee; --g-s4-f: #ece9f8;
}
:root[data-theme="medium"] {
  --g-paper: #3a0a5c; --g-ink: #fff7fb; --g-ink2: #f6d6ee; --g-ink3: #ffe9f5; --g-mute: #d9a8cc;
  --g-edge: #ffb3d9; --g-wire: #f6d6ee; --g-zero: #c98ae6; --g-grid: #ffffff2e; --g-grid2: #ffffff1a; --g-line: #c45cff80; --g-gray: #8a5aa8;
  --g-box: #5a1a7e; --g-box-m: #ffffff12; --g-acc-f: #c2185b80; --g-acc: #ff7ab8;
  --g-warn-f: #8a5a0080; --g-warn: #ffd23f; --g-bad-f: #c0392b66; --g-bad: #ff8a80; --g-ok-f: #0f7a4680; --g-ok: #6fe0a0;
  --g-s1: #7ab8ff; --g-s2: #ff9a66; --g-s3: #3ee08f; --g-s4: #c9a6ff;
  --g-s1-f: #7ab8ff2e; --g-s2-f: #ff9a662e; --g-s3-f: #3ee08f2e; --g-s4-f: #c9a6ff2e;
}
:root[data-theme="night"] {
  --g-paper: #1a0830; --g-ink: #fbefff; --g-ink2: #d0b0ee; --g-ink3: #ecd6ff; --g-mute: #a888c4;
  --g-edge: #ff8cbf; --g-wire: #c9a6e6; --g-zero: #8a5ab4; --g-grid: #ffffff1f; --g-grid2: #ffffff12; --g-line: #6a2a9a; --g-gray: #4a2a6a;
  --g-box: #2c0f48; --g-box-m: #ffffff0a; --g-acc-f: #6a0d36; --g-acc: #ffb3d1;
  --g-warn-f: #5a4000; --g-warn: #ffe066; --g-bad-f: #5a1a1a; --g-bad: #ff8a80; --g-ok-f: #0d4a2c; --g-ok: #9ff0c8;
  --g-s1: #6fb4ff; --g-s2: #ff9a66; --g-s3: #3ee08f; --g-s4: #b07aff;
  --g-s1-f: #6fb4ff24; --g-s2-f: #ff9a6624; --g-s3-f: #3ee08f24; --g-s4-f: #b07aff24;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 20px); }
html, body { margin: 0; min-height: 100%; }
body { background: radial-gradient(ellipse 70% 520px at 85% 0, var(--glow), transparent 100%), linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 38%, var(--bg3) 100%);
  background-color: var(--bgc); color: var(--text); font-family: var(--font); line-height: 1.8;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 999px; font-weight: 800; }
.skip:focus { left: 12px; }

/* ---------- 머리 막대 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--index-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
.brand { flex: none; display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand img { display: block; width: 30px; height: 30px; }
.brand span { font-family: var(--round); font-size: 19px; font-weight: 800; letter-spacing: 3px; color: var(--accent-ink);
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topbar-book { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; }
.topbar-book::before { content: "/"; color: var(--line); margin-right: 14px; }
.topbar-book:hover { color: var(--text); }
.topbar button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border: 1.5px solid var(--line);
  border-radius: 999px; background: var(--panel); color: var(--dim); font: inherit; font-family: var(--round); font-size: .78rem; font-weight: 800; letter-spacing: 1.5px;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.topbar button:hover { border-color: var(--accent); color: var(--text); }
.topbar button svg { width: 18px; height: 18px; flex: none; }
.nav-toggle { display: none !important; flex: none; }
.nav-toggle[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.themes { margin-left: auto; display: flex; flex: none; }
.themes button { border-radius: 0; padding: 0 14px 0 12px; }
.themes button + button { margin-left: -1.5px; }
.themes button:first-child { border-radius: 999px 0 0 999px; }
.themes button:last-child { border-radius: 0 999px 999px 0; }
.themes button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); position: relative; }
.theme-cycle { display: none !important; margin-left: auto; width: 40px; padding: 0 !important; }
.theme-cycle span { display: none; }
:root[data-theme="day"] .theme-cycle .t-day, :root[data-theme="medium"] .theme-cycle .t-medium, :root[data-theme="night"] .theme-cycle .t-night { display: inline-flex; }

/* ---------- 틀: 왼쪽 목차 + 본문 ---------- */
.layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }
.booknav { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--nav-bg); border-right: 1.5px solid var(--line); padding: 18px 12px 48px; font-size: .84rem; line-height: 1.5; }
.content { min-width: 0; padding: 44px clamp(16px, 4vw, 56px) 80px; min-height: calc(100vh - var(--topbar-h)); }
.content > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }

.booknav ol { list-style: none; margin: 0; padding: 0; }
.nav-head a { display: block; padding: 9px 12px; border-radius: 14px; color: var(--text); font-weight: 800; text-decoration: none; line-height: 1.45; }
.nav-head a:hover { background: var(--hover); }
.nav-head a[aria-current] { background: var(--accent); color: var(--on-accent); }
.nav-head + .nav-secs { margin-left: 12px; }
.nav-parts { margin-top: 12px !important; }
.nav-part > summary { display: flex; align-items: baseline; gap: 7px; padding: 7px 10px; border-radius: 12px; list-style: none; cursor: pointer; color: var(--text); font-weight: 700; }
.nav-part > summary::-webkit-details-marker { display: none; }
.nav-part > summary::before { content: ""; flex: none; width: 6px; height: 6px; margin-right: 2px; position: relative; top: -2px;
  border-right: 1.8px solid var(--secnum); border-bottom: 1.8px solid var(--secnum); transform: rotate(-45deg); transition: transform .15s; }
.nav-part[open] > summary::before { transform: rotate(45deg); }
.nav-part > summary:hover { background: var(--hover); }
.pl { color: var(--secnum); font-weight: 800; white-space: nowrap; }
.nav-chaps { padding: 2px 0 8px 12px !important; }
.nav-chaps a { display: flex; gap: 8px; padding: 5px 10px; border-radius: 12px; color: var(--muted); text-decoration: none; }
.nav-chaps a:hover { background: var(--hover); color: var(--text); }
.nav-chaps .n { flex: none; min-width: 2.7em; color: var(--secnum); font-variant-numeric: tabular-nums; }
.nav-chaps li.cur > a { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.nav-chaps li.cur > a .n { color: var(--on-accent); opacity: .75; }
.nav-secs { margin: 5px 0 8px 22px !important; padding-left: 8px !important; border-left: 2px solid var(--line); }
.nav-secs a { display: block; padding: 3px 8px; border-radius: 8px; color: var(--dim); text-decoration: none; font-size: .8rem; }
.nav-secs a:hover { background: var(--hover); color: var(--text); }
.nav-secs a.active { color: var(--accent-ink); font-weight: 800; background: var(--accent-soft); }
.nav-secs .secnum { color: var(--secnum); margin-right: .35em; }
.nav-secs a.active .secnum { color: inherit; }
.nav-backdrop { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex !important; }
  .layout { display: block; }
  .booknav { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; height: auto; width: min(88vw, 360px); z-index: 40; background: var(--bgc);
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 12px 32px rgba(0, 0, 0, .38); visibility: hidden; }
  body.nav-open .booknav { transform: none; visibility: visible; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 35; background: var(--scrim); }
  body.nav-open { overflow: hidden; }
  .content { padding-top: 32px; }
}
@media (max-width: 899px) {
  .themes { display: none; }
  .theme-cycle { display: inline-flex !important; }
}
@media (max-width: 560px) {
  html { font-size: 16px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar-book { display: none; }
  .brand span { font-size: 17px; letter-spacing: 2px; }
  .brand img { width: 26px; height: 26px; }
  .content { padding: 26px 16px 64px; }
}

/* ---------- 본문 ---------- */
.kicker { margin: 0 0 .5em; font-size: .85rem; font-weight: 800; color: var(--secnum); }
.kicker .pl { margin-right: .35em; }
/* 제목 크기는 본문(17px) 대비 1.5·1.25·1.1·1배 — 차이가 크면 읽는 흐름이 끊긴다(사용자 2026-11-03: "본문과 헤더의 글자 크기 차이가 너무 심하다") */
.chapter h1 { margin: 0 0 1.1em; padding-bottom: .4em; border-bottom: 3px solid var(--accent); font-size: 1.5rem; line-height: 1.4;
  font-weight: 900; color: var(--head); letter-spacing: -.015em; }
.chapter h2 { margin: 2.4em 0 .8em; padding-left: .6em; border-left: 5px solid var(--accent); font-size: 1.25rem; line-height: 1.45;
  font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.chapter h3 { margin: 1.9em 0 .55em; font-size: 1.1rem; line-height: 1.5; font-weight: 800; color: var(--head-3); }
.chapter h4 { margin: 1.6em 0 .45em; font-size: 1rem; line-height: 1.6; font-weight: 800; color: var(--head-3); }
.chapter h5, .chapter h6 { margin: 1.4em 0 .4em; font-size: 1rem; font-weight: 700; }
.chapter h1 + h2, .chapter .kicker + h1 + h2 { margin-top: 0; }
.secnum { color: var(--secnum); font-variant-numeric: tabular-nums; margin-right: .4em; }
.chapter p { margin: 0 0 1.05em; }
.chapter strong { font-weight: 800; color: var(--text); }
.chapter em { font-style: normal; font-weight: 700; color: var(--em); background: linear-gradient(transparent 82%, var(--em-hl) 82%); padding: 0 1px; }
.chapter a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 3px; }
.chapter a:hover { text-decoration-color: currentColor; }
.chapter ul, .chapter ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.chapter li { margin: 0 0 .4em; }
.chapter li::marker { color: var(--secnum); }
.chapter li > ul, .chapter li > ol { margin: .4em 0 .2em; }
.chapter hr { border: 0; border-top: 1.5px solid var(--line); margin: 2.4em 0; }
del { opacity: .7; }
img { max-width: 100%; height: auto; }
.chapter img { display: block; margin: 1.2em auto; border-radius: 14px; }

code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 6px;
  padding: .06em .34em; color: var(--code-ink); overflow-wrap: anywhere; }
pre { font-family: var(--mono); font-size: .84rem; line-height: 1.6; tab-size: 4; margin: 1.1em 0 1.5em; padding: 16px 20px; overflow-x: auto;
  background: var(--pre-bg); color: var(--pre-ink); border: 1.5px solid var(--line); border-left: 5px solid var(--accent); border-radius: 14px; }
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; white-space: pre; overflow-wrap: normal; word-break: normal; }

blockquote { margin: 1.2em 0 1.5em; padding: .8em 1.2em; border-left: 5px solid var(--accent); background: var(--quote-bg); border-radius: 0 14px 14px 0; }
blockquote > :last-child { margin-bottom: 0; }

/* 표: 좁은 화면에서는 표만 가로로 밀어 본다 */
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.7em; border: 1.5px solid var(--line); border-radius: 14px; background: var(--table-bg); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.6; }
th, td { border: 1px solid var(--cell-line); padding: .5em .75em; text-align: left; vertical-align: top; }
.table-wrap tr > :first-child { border-left: 0; } .table-wrap tr > :last-child { border-right: 0; }
.table-wrap thead tr:first-child > * { border-top: 0; } .table-wrap tbody tr:last-child > * { border-bottom: 0; }
th { background: var(--th-bg); color: var(--th-ink); font-weight: 800; }
tbody tr:nth-child(even) { background: var(--row-alt); }
td:first-child code { white-space: nowrap; }
.table-wrap td a { white-space: nowrap; }

/* 도해: 카드 바탕이 테마의 '종이'(--g-paper)다. 좁은 화면에서는 글씨가 읽히는 폭을 지키고 가로로 민다 */
figure { margin: 1.4em 0 1.8em; text-align: center; }
figure.svg-fig { padding: 16px 18px 14px; background: var(--g-paper); color: var(--g-ink); border: 1.5px solid var(--line); border-radius: 18px; overflow-x: auto;
  box-shadow: 0 6px 22px var(--shadow); }
figure.svg-fig > svg { display: block; width: 100%; max-width: 660px; height: auto; margin: 0 auto; }
@media (max-width: 560px) { figure.svg-fig > svg { min-width: 470px; } }
figcaption { margin-top: .7em; font-size: .9rem; line-height: 1.6; color: var(--dim); }
figure.svg-fig figcaption { color: var(--g-ink2); }
figure.diagram pre { display: inline-block; max-width: 100%; position: relative; margin: 0; padding: 22px 22px 14px; text-align: left; line-height: 1.3; white-space: pre; }
figure.diagram pre::before { content: "도해"; position: absolute; top: -1.5px; left: -5px; padding: 1px 9px; border-radius: 14px 0 12px 0;
  background: var(--accent); color: var(--on-accent); font-family: var(--round); font-size: .62rem; font-weight: 800; letter-spacing: .1em; }
.mermaid { margin: 1.2em 0; text-align: center; background: #fff; border-radius: 18px; padding: 12px; }
mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; max-width: 100%; margin: 1em 0 1.3em !important; }

/* 연습문제 정답: 접어 둔다 */
details.answer { margin: .6em 0 1.4em; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); }
details.answer > summary { display: flex; align-items: center; gap: .6em; padding: .5em 1.1em; cursor: pointer; list-style: none;
  font-family: var(--round); font-size: .88rem; font-weight: 800; letter-spacing: 1px; color: var(--accent-ink); }
details.answer > summary::-webkit-details-marker { display: none; }
details.answer > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; }
details.answer[open] > summary::before { transform: rotate(45deg); }
details.answer[open] > summary { border-bottom: 1.5px solid var(--line); }
details.answer > :not(summary) { margin-left: 1.1rem; margin-right: 1.1rem; }
details.answer > summary + * { margin-top: .9em; }
details.answer > :last-child { margin-bottom: 1em; }

/* ---------- 이전·다음 ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 3.6em; padding-top: 1.6em; border-top: 1.5px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--panel);
  color: var(--muted); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.pager a:hover { border-color: var(--accent); box-shadow: 0 6px 22px var(--shadow); }
.pager .next { grid-column: 2; text-align: right; }
.pager .dir { font-family: var(--round); font-size: .74rem; font-weight: 800; letter-spacing: 1.5px; color: var(--secnum); }
.pager .pt { font-weight: 700; color: var(--text); line-height: 1.5; }
.pager .pt .n { color: var(--secnum); margin-right: .25em; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: auto; } .pager span:empty { display: none; } }

/* ---------- 책 표지(책 첫 쪽) ---------- */
.cover { padding: 1.4em 0 2em; margin-bottom: 2.6em; border-bottom: 1.5px solid var(--line); }
.cover .kicker { font-family: var(--round); color: var(--secnum); font-size: .76rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; }
.cover h1 { margin: .35em 0 .5em; font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.38; font-weight: 900; letter-spacing: -.02em; color: var(--head);
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cover .sub { margin: 0 0 1em; font-size: 1.04rem; line-height: 1.75; color: var(--muted); }
.cover .meta { margin: 0 0 1.5em; font-size: .86rem; color: var(--dim); }
.cover .cta { margin: 0; }
.btn { display: inline-block; padding: .72em 1.4em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 22px var(--shadow); transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn .secnum, .btn code { color: inherit; background: none; border: 0; }

/* ---------- 첫 화면 ---------- */
.solo .hero { padding: 2.6em 0 .6em; }
.hero h1 { display: flex; align-items: center; gap: .45em; margin: 0 0 .3em; font-family: var(--round); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: 6px; }
.hero h1 span { color: var(--accent-ink); background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero h1 .emblem { flex: none; width: 1.75em; height: 1.75em; border-radius: 22%; box-shadow: 0 6px 22px var(--shadow); }   /* 아에글로스(길갈라드의 창) */
.hero p { margin: 0; font-size: 1.05rem; color: var(--muted); }
.shelf h2 { margin: 2.2em 0 1em; font-family: var(--round); font-size: .82rem; font-weight: 800; letter-spacing: .2em; color: var(--secnum); }
.book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.book-card a { display: block; padding: 22px 26px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--panel); color: inherit; text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.book-card a:hover { border-color: var(--accent); box-shadow: 0 8px 26px var(--shadow); transform: translateY(-1px); }
.book-card h3 { margin: 0 0 .4em; font-size: 1.12rem; line-height: 1.45; font-weight: 800; color: var(--text); }
.book-card .sub { margin: 0 0 .8em; font-size: .95rem; line-height: 1.7; color: var(--muted); }
.book-card .meta { margin: 0; font-size: .82rem; color: var(--secnum); font-weight: 700; }

.sitefoot { padding: 22px 20px; border-top: 1.5px solid var(--line); text-align: center; font-size: .8rem; color: var(--dim); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  :root, :root[data-theme] { --text: #1c2126; --muted: #333; --dim: #555; --head: #8a0f45; --head-3: #3a0a2e; --pre-bg: #fff; --pre-ink: #1c2126; --code-bg: #f6f6f6;
    --code-ink: #3a0a2e; --th-bg: #f2f2f2; --th-ink: #3a0a2e; --row-alt: #fafafa; --table-bg: #fff; --quote-bg: #f6f6f6; --link: #8a0f45; --em: #3a0a2e; }
  body { background: #fff; }
  .topbar, .booknav, .nav-backdrop, .pager, .sitefoot, .skip { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
  figure.svg-fig { box-shadow: none; break-inside: avoid; }
}
