:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #26241f;
  --muted: #6a665d;
  --rule: #e4dfd4;
  --accent: #5b6b4f;
  --accent-soft: #eef0e8;
  --note-bg: #f3efe6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17160f;
    --surface: #1f1e17;
    --ink: #ebe7dc;
    --muted: #a39e90;
    --rule: #34322a;
    --accent: #a9b896;
    --accent-soft: #272a20;
    --note-bg: #24231b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Noto Sans JP", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:lang(ja) body, body:lang(ja) { word-break: normal; line-break: strict; }
.wrap { max-width: 42rem; margin: 0 auto; padding: 24px 16px 56px; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.brand { font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.langs { display: flex; gap: 4px; }
.langs a, .langs span { padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; line-height: 1.6; text-decoration: none; color: var(--muted); }
.langs span { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.langs a:hover { color: var(--ink); border-color: var(--muted); }
h1 { font-size: 1.65rem; line-height: 1.4; margin: 8px 0 8px; font-weight: 600; }
h2 { font-size: 1.15rem; line-height: 1.5; margin: 2.2rem 0 .5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-weight: 600; }
h3 { font-size: 1rem; margin: 1.4rem 0 .3rem; }
p { margin: .6rem 0; }
ul, ol { margin: .6rem 0; padding-left: 1.4rem; }
li { margin: .3rem 0; }
a { color: var(--accent); text-underline-offset: 3px; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.meta span { display: inline-block; margin-right: 14px; }
.note { background: var(--note-bg); border-radius: 10px; padding: 12px 16px; margin: 1rem 0; }
.note p { margin: .3rem 0; }
.table-wrap { overflow-x: auto; margin: .8rem 0; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
th { background: var(--accent-soft); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 600; background: var(--accent-soft); }
.pages { list-style: none; padding: 0; margin: 1rem 0; }
.pages li { margin: 0; }
.pages a { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.pages a:hover { color: var(--accent); }
.pages a::after { content: "\203A"; color: var(--muted); }
.group-title { font-weight: 600; margin: 1.6rem 0 .2rem; }
footer { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
