
@page { size: A4; margin: 18mm 16mm 20mm 16mm; }
body { font-family: "Segoe UI", Arial, sans-serif; font-size: 10pt; color: #000; line-height: 1.45; }
.cover { height: 250mm; display: flex; flex-direction: column; justify-content: center; border-left: 8mm solid #0b5cad;
  padding-left: 12mm; page-break-after: always; }
.cover img { width: 46mm; margin-bottom: 14mm; }
.cover h1 { color: #0b5cad; font-size: 26pt; margin: 0 0 6mm; border: none; }
.cover .meta { font-size: 11pt; } .cover .class { margin-top: 10mm; font-weight: bold; color: #0b5cad; }
.toc { page-break-after: always; } .toc h2 { margin-top: 0; } .toc ul { list-style: none; padding: 0; }
.toc .toc-1 { font-weight: bold; margin-top: 3mm; color: #0b5cad; }
h1, h2.part { color: #0b5cad; font-size: 20pt; border-bottom: 2pt solid #0b5cad; padding-bottom: 2mm; page-break-before: always; }
h2 { color: #0b5cad; font-size: 15pt; margin-top: 8mm; page-break-after: avoid; }
h3 { color: #000; font-size: 12pt; border-left: 3pt solid #0b5cad; padding-left: 2mm; page-break-after: avoid; }
h4 { font-size: 10.5pt; page-break-after: avoid; }
table { border-collapse: collapse; width: 100%; margin: 3mm 0; font-size: 8.5pt; page-break-inside: auto; }
th { background: #0b5cad; color: #fff; text-align: left; padding: 1.5mm; }
td { border: 0.5pt solid #b8c7da; padding: 1.5mm; vertical-align: top; } tr { page-break-inside: avoid; }
code { font-family: Consolas, monospace; font-size: 8.5pt; background: #eef3f9; padding: 0 0.6mm; }
pre { background: #eef3f9; border-left: 3pt solid #0b5cad; padding: 3mm; font-size: 8pt; white-space: pre-wrap; }
pre code { background: none; }
.callout { border: 1pt solid #0b5cad; border-left: 5pt solid #0b5cad; background: #f2f7fc; padding: 1mm 4mm; margin: 3mm 0; }
.callout.warning { border-color: #000; border-left-color: #000; background: #f4f4f4; }
.xref { color: #0b5cad; } hr { border: none; border-top: 0.5pt solid #b8c7da; }
.figures { display: flex; flex-wrap: wrap; gap: 4mm; justify-content: center; margin: 4mm 0; page-break-inside: avoid; }
figure { margin: 0; page-break-inside: avoid; } figure.screen { width: 100%; } figure.phone { width: 40mm; } figure.half { width: 80mm; }
figure img { width: 100%; display: block; border: 0.5pt solid #b8c7da; border-radius: 2mm; }
figcaption { font-size: 8.5pt; font-style: italic; color: #333; text-align: center; margin-top: 1.5mm; }
.toc a, .index a { color: inherit; text-decoration: none; } .index a { color: #0b5cad; }
.index-jump { font-weight: bold; letter-spacing: 1mm; } .index-jump a { color: #0b5cad; }
.index h3 { border: none; padding: 0; margin: 5mm 0 1mm; } .index-list { list-style: none; padding: 0; columns: 2; column-gap: 8mm; margin: 0; }
.index-list li { break-inside: avoid; margin: 0 0 0.8mm; } .index-term { font-weight: 600; }
.finder, .chapter-art, .guide, .progress { display: none; }
@media screen {
  body { max-width: 960px; margin: 0 auto; padding: 0 22px 80px; font-size: 17.5px; line-height: 1.65; }
  h1, h2.part { font-size: 34px; } h2 { font-size: 27px; margin-top: 10px; } h3 { font-size: 21px; } h4 { font-size: 18px; }
  table { font-size: 15.5px; } code, pre { font-size: 15px; } figcaption { font-size: 14.5px; }
  p, li { max-width: 72ch; }
  .chapter-art { display: flex; align-items: center; gap: 22px; margin: 64px 0 4px; padding: 18px 24px; border-radius: 22px;
    background: #eaf2fb; border: 1px solid #cfe0f3; overflow: hidden; }
  .chapter-art .main { flex: none; animation: float 6s ease-in-out infinite; }
  .chapter-label { flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .chapter-label span { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #3a5a80; }
  .chapter-label strong { font-size: 24px; color: #0b5cad; }
  .chapter-friends { display: flex; align-items: flex-end; gap: 12px; opacity: 0.85; }
  .chapter-friends .f0 { animation: float 7s ease-in-out infinite 1s; } .chapter-friends .f1 { animation: float 8s ease-in-out infinite 2s; }
  .callout { display: flex; gap: 16px; align-items: flex-start; border-radius: 16px; padding: 14px 18px; }
  .callout .guide { display: block; flex: none; width: 64px; height: 64px; }
  .callout-body { flex: 1; min-width: 0; position: relative; background: #fff; border-radius: 12px; padding: 2px 14px;
    border: 1px solid #cfe0f3; }
  .callout-body::before { content: ""; position: absolute; left: -9px; top: 22px; width: 16px; height: 16px; background: #fff;
    border-left: 1px solid #cfe0f3; border-bottom: 1px solid #cfe0f3; transform: rotate(45deg); }
  @media (max-width: 640px) { .chapter-friends { display: none; } .chapter-art .main { width: 72px; height: 72px; } }
  .callout .wave { transform-origin: 50px 44px; animation: wave 5s ease-in-out infinite; }
  .progress { display: block; position: fixed; top: 0; left: 0; height: 4px; width: 0; background: #0b5cad; z-index: 20; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
  @keyframes wave { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-20deg); } 90% { transform: rotate(14deg); } 95% { transform: rotate(-10deg); } }
  @media (prefers-reduced-motion: reduce) { .chapter-art *, .callout .wave { animation: none !important; } }
  .cover { height: auto; min-height: 60vh; }
  .finder { display: block; position: sticky; top: 0; z-index: 10; background: #fff; padding: 10px 0 8px;
    border-bottom: 1px solid #b8c7da; }
  .finder-row { display: flex; gap: 10px; align-items: center; }
  .finder input { flex: 1; font: inherit; font-size: 16px; padding: 10px 14px; border: 2px solid #0b5cad; border-radius: 10px; }
  .finder input:focus { outline: 3px solid #b8d4f0; }
  .finder-count { color: #444; font-size: 13px; white-space: nowrap; } .finder-index { color: #0b5cad; font-weight: 600; white-space: nowrap; }
  .finder ol { list-style: none; margin: 6px 0 0; padding: 0; max-height: 60vh; overflow: auto; border: 1px solid #b8c7da;
    border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
  .finder ol a { display: block; padding: 9px 14px; color: #000; text-decoration: none; border-bottom: 1px solid #eef3f9; }
  .finder ol a:hover, .finder ol a:focus { background: #eef3f9; }
  .finder ol strong { display: block; color: #0b5cad; } .finder ol span { font-size: 13px; color: #333; }
  mark { background: #ffe58a; padding: 0 1px; } mark.found { outline: 2px solid #f0b400; }
  h1, h2, h3, h4, h2.part { scroll-margin-top: 80px; }
}
@media print { .finder { display: none !important; } }
