* { box-sizing: border-box; }
:root { --ink: #222222; --muted: #4f5d57; --accent: #216553; --soft: #e9f2ed; --line: #dfe5df; --paper: #fff; --page: #f6f7f2; }
body { margin: 0; color: var(--ink); background: var(--page); font: 18px/1.75 -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; letter-spacing: .02rem; word-break: keep-all; overflow-wrap: anywhere; }
body[data-book='operator'] { --accent: #68529b; --soft: #f0ebf8; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, .role-links a, .library-link, .page-turn a { min-height: 44px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 20; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
.book-header { position: sticky; top: 0; z-index: 10; height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 36px; background: #fdfdf9f5; border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.manual-brand { display: flex; align-items: center; gap: 12px; color: var(--accent); text-decoration: none; }
.manual-brand strong { display: block; font-size: 20px; line-height: 1.3; letter-spacing: -.5px; }
.manual-brand small { display: block; color: var(--muted); font-size: 14px; letter-spacing: 1px; }
.library-link { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; text-decoration: none; }
.book-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); max-width: 1500px; margin: auto; }
.book-sidebar { position: sticky; top: 80px; align-self: start; height: calc(100dvh - 80px); padding: 28px 16px 18px 22px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.role-links { display: flex; gap: 4px; margin-bottom: 22px; flex-shrink: 0; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.role-links a { display: flex; align-items: center; justify-content: center; flex: 1; padding: 5px; font-size: 14px; text-align: center; text-decoration: none; border-radius: 7px; }
.role-links a[aria-current] { background: var(--accent); color: #fff; }
#toc { min-height: 0; overflow: auto; flex: 1; }
#toc summary { display: none; }
.toc-heading { display: flex; justify-content: space-between; margin: 0 8px 8px; font-size: 14px; font-weight: 700; }
.toc-heading span { font-size: 14px; font-weight: 400; color: var(--muted); }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-group { color: var(--muted); font-size: 14px; padding: 22px 8px 6px; letter-spacing: .4px; }
.toc-list a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 9px 10px; margin: 2px 0; border-radius: 8px; font-size: 14px; line-height: 1.65; text-decoration: none; color: var(--ink); }
.toc-number { flex-shrink: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc-list a:hover { background: #edf0e9; }
.toc-list a[aria-current] { background: var(--soft); color: var(--accent); font-weight: 700; box-shadow: inset 3px 0 var(--accent); }
.sidebar-note { margin: 20px 8px 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.book-reading { min-width: 0; max-width: 1040px; padding: 48px 48px 24px; }
.book-intro { margin-bottom: 24px; }
.audience { display: inline-block; font-size: 14px; letter-spacing: .8px; color: var(--accent); font-weight: 700; }
h1, h2, h3 { line-height: 1.5; letter-spacing: 0; }
h1 { font-size: 30px; margin: 8px 0; }
.book-intro > p { font-size: 18px; color: var(--muted); margin: 10px 0; }
.reading-tools { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 18px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-label { display: flex; flex: 1; min-width: min(100%, 240px); flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); }
.search-label input { min-height: 44px; width: 100%; background: #fff; border: 1px solid #b8c7bb; border-radius: 8px; color: var(--ink); padding: 8px 12px; font-size: 14px; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-buttons button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; color: var(--ink); }
.tool-buttons button[aria-pressed='true'] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.pdf-download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 8px; background: #fff; color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; }
.pdf-download svg { flex-shrink: 0; }
.pdf-download:hover { background: var(--soft); }
.reading-status { margin: 12px 0 5px; color: var(--muted); font-size: 14px; min-height: 21px; }
progress { display: block; height: 3px; border: 0; width: 100%; margin: 0 0 24px; background: var(--line); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); }
.chapter { background: var(--paper); border: 1px solid var(--line); border-radius: 4px 18px 18px 4px; padding: 36px 40px; box-shadow: 0 6px 28px #24372b04; scroll-margin-top: 105px; margin-bottom: 24px; }
.chapter-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--accent); font-size: 14px; letter-spacing: .6px; }
.chapter h2 { margin: 0 0 10px; font-size: 29px; scroll-margin-top: 105px; }
.chapter h2:focus { outline: none; }
.chapter-lead { color: var(--muted); margin: 0 0 24px; font-size: 18px; }
.chapter h3 { margin: 36px 0 14px; font-size: 24px; }
.chapter-body { font-size: 18px; }
.chapter-body > p { margin: 18px 0; }
.chapter-body strong { font-weight: 750; }
.screen-location { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 0 0 28px; font-size: 14px; }
.screen-location > span { color: var(--muted); }
.screen-location a { display: inline-flex; gap: 12px; padding: 6px 0; min-height: 36px; font-weight: 700; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 22px 0 30px; }
.steps > li { position: relative; counter-increment: step; padding: 0 0 22px 45px; min-height: 40px; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #c7d7ca; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.note { padding: 18px 20px; margin: 24px 0; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--soft); font-size: 18px; }
.note > strong { display: block; color: var(--accent); font-size: 18px; }
.note p { margin: 6px 0 0; }
figure { margin: 26px 0; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #f8faf7; }
figure a { display: block; }
figcaption { color: var(--muted); font-size: 14px; line-height: 1.7; margin-top: 8px; }
.screen-guides { border-top: 1px solid var(--line); margin-top: 36px; }
.screen-help { color: var(--muted); font-size: 14px; }
.screen-js-hint { display: none; }
body:has(.screens-enhanced) .screen-js-hint { display: inline; }
.screen-guide { margin: 28px 0 36px; }
.screen-guide-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.screen-guide h4 { font-size: 24px; line-height: 1.65; margin: 0; }
.screen-enlarge { flex-shrink: 0; padding: 7px 12px; background: var(--soft); color: var(--accent); border: 1px solid #c9d6cb; border-radius: 8px; font-size: 14px; font-weight: 700; }
.screen-guide figure { margin: 0; }
.annotated-screen { position: relative; isolation: isolate; width: 100%; line-height: 0; background: #f4f4f4; border: 1px solid #c7cec9; }
.annotated-screen img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; margin: 0; }
.screen-arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.screen-arrows rect { fill: none; stroke: #cc2441; stroke-width: 2; vector-effect: non-scaling-stroke; }
.screen-arrows > path { fill: none; stroke: #cc2441; stroke-width: 3; vector-effect: non-scaling-stroke; }
.screen-arrows marker path { fill: #cc2441; stroke: none; }
.screen-arrows .screen-selected { fill: #ffcb4526; stroke: #ce4c00; stroke-width: 4; }
.screen-number { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: #b71f39; color: #fff; font-size: 14px; font-weight: 800; line-height: 1; box-shadow: 0 1px 5px #0005; pointer-events: none; }
.screen-guide figcaption { margin-top: 10px; }
.screen-static-note { display: block; }
.screen-steps { list-style: none; padding: 0; margin: 18px 0 0; }
.screen-steps > li { margin: 0 0 8px; }
.screen-step, .screen-step-fallback { display: flex; align-items: flex-start; gap: 12px; width: 100%; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 18px; line-height: 1.75; text-align: left; }
.screen-step:hover { background: var(--soft); border-color: var(--accent); }
.screen-step strong, .screen-step-fallback strong { display: block; font-size: 18px; margin-bottom: 2px; }
.step-number { display: grid; place-items: center; flex-shrink: 0; width: 27px; height: 27px; border-radius: 50%; background: #b71f39; color: #fff; font-size: 14px; font-weight: 700; line-height: 1; }
.screen-step small { display: block; color: var(--accent); font-size: 14px; margin-top: 4px; }
.screens-enhanced .screen-step-fallback { display: none; }
.screen-viewing { overflow: hidden; }
.screen-viewer { width: min(1500px, calc(100vw - 24px)); max-width: none; height: min(1000px, calc(100dvh - 24px)); max-height: none; padding: 20px; border: 1px solid #bbc8be; border-radius: 16px; background: var(--paper); color: var(--ink); }
.screen-viewer[open] { display: flex; flex-direction: column; }
.screen-viewer::backdrop { background: #10201bba; }
.screen-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.screen-viewer h2 { font-size: 24px; margin: 0; }
.screen-viewer button { background: #fff; color: var(--ink); border: 1px solid #b6c6ba; border-radius: 8px; min-width: 44px; padding: 6px 12px; font-size: 14px; }
.screen-viewer button[aria-pressed='true'] { background: var(--accent); color: white; border-color: var(--accent); }
.screen-viewer [data-screen-close] { flex-shrink: 0; font-weight: 700; }
#screen-viewer-help { margin: 10px 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.screen-viewer-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.screen-viewer-positions { display: flex; flex-wrap: wrap; gap: 4px; }
#screen-viewer-instruction { margin: 12px 0; font-size: 18px; line-height: 1.7; flex-shrink: 0; }
.screen-viewport { position: relative; min-height: 120px; flex: 1; overflow: auto; overscroll-behavior: contain; background: #eef0ec; border: 1px solid var(--line); padding: 12px; -webkit-overflow-scrolling: touch; }
.screen-enlarged { max-width: none; margin: 0; }
@media (max-width: 600px) {
  .screen-guide h4 { font-size: 24px; }
  .screen-viewer { padding: 12px; border-radius: 10px; }
  .screen-viewer h2 { font-size: 24px; }
  #screen-viewer-help { font-size: 14px; }
  #screen-viewer-instruction { font-size: 18px; max-height: 92px; overflow: auto; }
  .screen-viewer-toolbar { gap: 6px; }
  .screen-viewer button { font-size: 14px; padding: 6px 9px; }
}
.table-scroll { max-width: 100%; overflow: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 18px; line-height: 1.8; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: #f1f5f0; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.source { font-size: 14px; color: var(--muted); }
.page-turn { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 36px; }
.page-turn a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.page-turn a:last-child { text-align: right; }
.page-turn small { color: var(--muted); font-size: 14px; }
.page-turn strong { font-size: 14px; }
.book-footer { color: var(--muted); padding: 28px 0; font-size: 14px; line-height: 1.9; }
.book-footer p { margin: 4px 0; }
#search-results { margin: 20px 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
#search-results h2 { font-size: 17px; margin: 0 0 14px; }
#search-results > a { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; }
#search-results > a strong { font-size: 14px; }
#search-results > a span, #search-results > p { font-size: 14px; color: var(--muted); }
.library-main { max-width: 1220px; margin: auto; padding: 64px 40px 20px; }
.library-intro { margin-bottom: 36px; }
.library-intro h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: 0; margin: 12px 0 20px; }
.library-intro p { color: var(--muted); font-size: 18px; }
.featured-guide { position: relative; display: block; text-decoration: none; border-radius: 18px; padding: 34px 40px; color: #fff; background: #205a4b; overflow: hidden; margin-bottom: 28px; }
.featured-guide::after { content: 'PDF'; position: absolute; right: 45px; top: 40px; display: grid; place-items: center; width: 130px; height: 165px; border: 1px solid #ffffff60; border-radius: 4px 24px 4px 4px; font-size: 32px; letter-spacing: 4px; transform: rotate(8deg); color: #d4f1c6; }
.featured-guide h2 { font-size: 28px; margin: 12px 0; }
.featured-label { font-size: 14px; color: #d0e8bc; letter-spacing: .8px; }
.featured-guide p { font-size: 18px; margin: 12px 0 18px; }
.guide-tag { font-size: 14px; padding: 7px 12px; border: 1px solid #ffffff45; border-radius: 24px; }
.book-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.book-card { position: relative; display: flex; flex-direction: column; background: #edf3e7; border: 1px solid #d5e0cd; border-radius: 4px 16px 16px 4px; box-shadow: inset 8px 0 #2f5f3a12; }
.book-card:nth-child(2) { background: #eeebf6; border-color: #ddd6ea; }
.book-card:nth-child(3) { background: #eaf1f3; border-color: #d6e0e5; }
.book-card-link { display: flex; flex: 1; flex-direction: column; min-height: 330px; padding: 30px 26px; color: var(--ink); text-decoration: none; }
.book-card > .pdf-download { align-self: flex-start; margin: 0 26px 26px; }
.book-cards h2 { font-size: 25px; margin: 28px 0 12px; }
.book-cards p { color: var(--muted); font-size: 18px; }
.cover-number { position: absolute; right: 22px; top: 20px; color: #56644f; font-size: 14px; }
.open-book { margin-top: auto; padding-top: 20px; font-size: 14px; font-weight: 700; }
.library-tip { color: var(--muted); margin: 30px 0 0; font-size: 14px; }
@media (min-width: 980px) { #toc:not([open]) > .toc-body { display: block; } }
@media (max-width: 1150px) and (min-width: 980px) { .book-reading { padding: 32px 24px; } .chapter { padding: 28px 24px; } }
@media (max-width: 979px) {
  .book-header { height: 68px; padding: 10px 20px; }
  .book-layout { display: block; }
  .book-sidebar { position: sticky; top: 68px; z-index: 9; display: block; height: auto; padding: 10px 20px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--page); }
  .role-links { margin-bottom: 8px; max-width: 430px; }
  .role-links a { font-size: 14px; min-height: 44px; }
  #toc summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; min-height: 44px; font-size: 14px; font-weight: 700; }
  #toc summary::marker, #toc summary::-webkit-details-marker { display: none; }
  #toc .toc-body { max-height: 55dvh; overflow-y: auto; padding: 12px 0; }
  #toc .when-open, #toc[open] .when-closed { display: none; }
  #toc[open] .when-open { display: inline; }
  .sidebar-note { display: none; }
  .book-reading { padding: 28px 20px 16px; max-width: 850px; margin: auto; }
  h1 { font-size: 25px; }
  .chapter { padding: 28px 24px; scroll-margin-top: 200px; }
  .chapter h2 { scroll-margin-top: 200px; font-size: 25px; }
  .library-main { padding: 36px 24px 20px; }
  .book-cards { gap: 12px; }
  .book-card-link { padding: 24px 18px; }
  .book-card > .pdf-download { margin: 0 18px 24px; }
  .book-cards h2 { font-size: 21px; }
}
@media (max-width: 600px) {
  .book-header { padding: 10px 16px; }
  .manual-brand strong { font-size: 18px; }
  .library-link { font-size: 14px; gap: 6px; }
  .book-sidebar { padding: 8px 16px; }
  .book-reading { padding: 24px 14px 16px; }
  h1 { font-size: 24px; }
  .chapter { padding: 24px 18px; border-radius: 3px 12px 12px 3px; }
  .chapter h2 { font-size: 24px; }
  .chapter h3 { font-size: 24px; }
  .chapter-body { font-size: 18px; }
  .chapter-lead { font-size: 18px; }
  .note { padding: 14px 15px; font-size: 18px; }
  .steps > li { padding-left: 38px; }
  .page-turn { gap: 12px; }
  th, td { padding: 10px; font-size: 18px; }
  .library-main { padding: 30px 18px 20px; }
  .featured-guide { padding: 26px 22px; }
  .featured-guide::after { width: 65px; height: 90px; right: 24px; top: 38px; font-size: 18px; }
  .featured-guide h2 { font-size: 23px; max-width: 200px; }
  .featured-guide p { max-width: 270px; font-size: 18px; }
  .guide-tag { font-size: 14px; }
  .book-cards { grid-template-columns: 1fr; gap: 16px; }
  .book-card-link { min-height: 240px; padding: 26px; }
  .book-card > .pdf-download { margin: 0 26px 26px; }
  .book-cards h2 { font-size: 25px; margin-top: 18px; }
}
@media print {
  @page { size: A4; margin: 17mm; }
  body { background: white; color: #111; font-size: 13.5pt; line-height: 1.75; }
  .book-header, .book-sidebar, .reading-tools, #search-results, .reading-status, progress, .page-turn, .skip-link, .book-footer, noscript { display: none !important; }
  .book-layout { display: block; }
  .book-reading { max-width: none; margin: 0; padding: 0; }
  .book-intro { border-bottom: 1px solid #bbb; padding-bottom: 12px; }
  .chapter, .chapter[hidden] { display: block !important; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; break-before: page; }
  .chapter h2 { font-size: 22pt; }
  .chapter h3, .chapter h2 { break-after: avoid; }
  .chapter-body, .chapter-lead { font-size: 13.5pt; }
  .chapter-meta { margin-top: 12px; }
  .note, figure, tr { break-inside: avoid; }
  .note { background: #f4f4f4; }
  figure img { max-height: 210mm; width: 100%; object-fit: contain; }
  .table-scroll { overflow: visible; }
  a { color: #111; }
  .steps > li::before { color: #111; background: #eee; }
  .screen-viewer, .screen-enlarge, .screen-js-hint, .screen-step small { display: none !important; }
  .screen-viewing { overflow: visible; }
  .screen-guide { break-inside: auto; }
  .screen-guide-heading { break-after: avoid; }
  .screen-guide .annotated-screen { width: min(100%, var(--screen-print-width)); margin: auto; }
  .annotated-screen img { max-height: none; object-fit: initial; }
  .screen-number, .step-number { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .screen-arrows { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .screen-steps > li { break-inside: avoid; }
  .screen-step { padding: 8px; font-size: 13.5pt; }
}
