:root {
  --bg: #fbfaf7;
  --surface: #f3f1ec;
  --text: #1f1e1c;
  --muted: #6b6862;
  --line: #e2ded6;
  --accent: #8a4b2f;
  --accent-soft: #f4e9e2;
  --measure: 680px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161514;
    --surface: #1f1e1c;
    --text: #ebe8e2;
    --muted: #a19d95;
    --line: #34322e;
    --accent: #e0a07f;
    --accent-soft: #2a211c;
  }
}
:root[data-theme="dark"] {
  --bg: #161514;
  --surface: #1f1e1c;
  --text: #ebe8e2;
  --muted: #a19d95;
  --line: #34322e;
  --accent: #e0a07f;
  --accent-soft: #2a211c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 20px; flex-wrap: wrap; }
.brand { font-family: "Iowan Old Style", "Hiragino Mincho ProN", Georgia, serif; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: .01em; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: .9rem; }
nav a:first-child { margin-left: 0; }
nav a:hover { color: var(--text); }

main { padding: 48px 0 80px; }
h1, h2, h3 { font-family: "Iowan Old Style", "Hiragino Mincho ProN", Georgia, serif; font-weight: 600; line-height: 1.3; }
h1 { font-size: 2.1rem; margin: 0 0 12px; }
h2 { font-size: 1.5rem; margin: 56px 0 12px; padding-top: 8px; }
h3 { font-size: 1.15rem; margin: 32px 0 8px; }
p, ul, ol { margin: 0 0 18px; }
a { color: var(--accent); text-underline-offset: 3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: 32px; }

blockquote { margin: 0 0 24px; padding: 14px 18px; background: var(--surface); border-left: 3px solid var(--accent); font-size: .92rem; color: var(--muted); }
blockquote p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

code { background: var(--surface); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
em { color: inherit; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.post-list a { font-family: "Iowan Old Style", "Hiragino Mincho ProN", Georgia, serif; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.post-list a:hover { color: var(--accent); }
.post-list p { color: var(--muted); font-size: .95rem; margin: 6px 0 0; }
.lede { color: var(--muted); font-size: 1.05rem; margin-bottom: 40px; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer.site .wrap { padding-top: 24px; padding-bottom: 40px; }
footer.site a { color: var(--muted); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  main { padding-top: 32px; }
}
