:root { --text: #222; --muted: #666; --bg: #fff; --line: #ddd; --accent: #1a6b54; --code: #f4f4f2; }
@media (prefers-color-scheme: dark) {
  :root { --text: #e6e6e6; --muted: #aaa; --bg: #181a1b; --line: #3a3d40; --accent: #6fcfae; --code: #24272a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; line-height: 1.85; font-size: 17px; }
header.site, main, footer.site { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.site { padding-top: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
main { padding-top: 8px; padding-bottom: 40px; }
h1 { font-size: 1.6rem; line-height: 1.45; margin: 1.2em 0 .4em; }
h2 { font-size: 1.3rem; margin-top: 2em; padding-bottom: .2em; border-bottom: 2px solid var(--line); }
h3 { font-size: 1.1rem; margin-top: 1.6em; }
a { color: var(--accent); }
.date, .lead { color: var(--muted); }
table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; margin: 1em 0; }
th, td { border: 1px solid var(--line); padding: .35em .7em; white-space: nowrap; }
th { background: var(--code); }
@media (max-width: 600px) {
  /* スマホ幅では折り返して、表の横スクロールを減らす(数字の列が細くなりすぎないよう最小幅を置く) */
  th, td { white-space: normal; min-width: 4.5em; padding: .3em .5em; font-size: .9rem; }
}
code { background: var(--code); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
pre { background: var(--code); padding: .8em 1em; overflow-x: auto; border-radius: 6px; }
pre code { padding: 0; }
img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
ul.posts { list-style: none; padding: 0; }
ul.posts li { padding: 1em 0; border-bottom: 1px solid var(--line); }
ul.posts li a { font-weight: 700; font-size: 1.1rem; }
ul.posts li p { margin: .3em 0 0; color: var(--muted); font-size: .95rem; }
nav.cats { margin: 1em 0; line-height: 2; }
section.related h2 { font-size: 1.1rem; }
section.related ul { padding-left: 1.2em; line-height: 1.8; }
p.cat { margin-top: 2.5em; padding-top: .8em; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
footer.site { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 32px; color: var(--muted); font-size: .9rem; }
