:root { --ink: #231f1c; --muted: #6b625c; --line: #e5dccf; --red: #c8212d; --paper: #fbf7f0; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.85; font-size: 16px; }
.doc { max-width: 820px; margin: 0 auto; padding: 40px 20px 80px; }
.doc .back { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: .9rem; }
.doc h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.4; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: .85rem; margin-bottom: 28px; }
.doc h2 { font-size: 1.15rem; margin: 30px 0 8px; padding-left: 12px; border-left: 4px solid var(--red); }
.doc p, .doc li { font-size: .97rem; }
.doc ul, .doc ol { padding-left: 1.4em; margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .95rem; background: #fff; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { width: 30%; background: #f3ece1; font-weight: 700; }
.todo { background: #fff3c4; padding: 0 4px; border-radius: 4px; font-weight: 700; }
.en-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.print-btn { display: inline-block; margin: 0 8px 20px 0; padding: 10px 22px; border-radius: 999px; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; border: 0; font: inherit; cursor: pointer; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11pt; line-height: 1.6; }
  .doc { padding: 0; max-width: none; }
  .no-print { display: none !important; }
}

/* Japanese line breaking: only break between BudouX phrases (see tools/jp-wrap.py) */
html:lang(ja) body { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
h1, h2, h3, summary, .answer, .tile b, .panel b, .reasons b, .worries li, .pick span, .pick b, .book-grid b, .scard-top .meta h3, .panel-card h3, .burst { text-wrap: balance; }
p, li, td { text-wrap: pretty; }

.doc th { width: 36%; padding: 10px 8px; }
@media (max-width: 420px) { .doc th { font-size: .85rem; } }
