:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #2b2b2b;
  --muted: #6f6f6f;
  --line: #e4e4e0;
  --accent: #e8590c;
  --link: #1c6bb8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.8; font-size: 16px;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { padding-top: 14px; padding-bottom: 10px; }
.brand { font-size: 26px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: .02em; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.site-nav { border-top: 1px solid var(--line); }
.site-nav .wrap { display: flex; gap: 4px 18px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.site-nav a:hover { color: var(--accent); }
.nav-search { margin-left: auto; }

main.wrap { padding-top: 20px; padding-bottom: 40px; }
.list-title { font-size: 22px; margin: 4px 0 16px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: var(--text); text-decoration: none; }
.card a:hover { border-color: var(--accent); }
.card-thumb { aspect-ratio: 16 / 10; background: #eceae4; display: flex; align-items: center; justify-content: center; }
.card-thumb img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 10px 12px 12px; }
.card h2, .card h3 { font-size: 15px; line-height: 1.5; margin: 4px 0 6px; }
.card time { color: var(--muted); font-size: 12px; }
.cards-small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cat { display: inline-block; font-size: 11px; color: #fff; background: var(--accent); border-radius: 3px; padding: 0 6px; line-height: 1.8; text-decoration: none; margin-right: 4px; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 28px 0 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; padding: 4px 10px; text-align: center; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); text-decoration: none; color: var(--text); }
.pager .current { background: var(--text); color: #fff; border-color: var(--text); }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px 18px 28px; }
.post h1 { font-size: 24px; line-height: 1.45; margin: 8px 0; }
.dates { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.eyecatch { margin: 0 0 18px; text-align: center; }
.eyecatch img { max-height: 360px; width: auto; object-fit: contain; }
.post-content h2 { font-size: 20px; margin: 2em 0 .8em; padding: .4em .7em; background: #f3efe9; border-left: 5px solid var(--accent); }
.post-content h3 { font-size: 18px; margin: 1.6em 0 .6em; padding-bottom: .25em; border-bottom: 2px solid var(--line); }
.post-content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 6px 10px; }
.post-content blockquote { margin: 1em 0; padding: .6em 1em; border-left: 4px solid var(--line); color: var(--muted); }
.pn { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; font-size: 14px; }
.pn a { flex: 1; color: var(--text); }
.pn-next { text-align: right; }
.related h2 { font-size: 18px; margin: 28px 0 12px; }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 18px 0; font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
  .post { padding: 16px 14px 22px; border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; }
  .post h1 { font-size: 21px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card h2 { font-size: 13px; }
}
