:root {
  --fg: #1a1a1a;
  --bg: #ffffff;
  --card-bg: #f7f8fa;
  --accent: #2563eb;
  --accent-bg: #eaf1ff;
  --muted: #666;
  --border: #e5e5e5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e5e5e5;
    --bg: #121212;
    --card-bg: #1c1c1e;
    --accent: #60a5fa;
    --accent-bg: #1e2a3f;
    --muted: #999;
    --border: #2a2a2a;
  }
}
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
body {
  font-family: -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 48px;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.8;
}
.site-header { padding: 24px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.site-title { font-size: 1.3rem; font-weight: bold; text-decoration: none; color: var(--fg); }
.site-desc { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: var(--fg);
}
.post-card-thumb {
  width: calc(100% + 32px);
  max-width: none;
  margin: -16px -16px 4px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  display: block;
}
.post-card { overflow: hidden; min-width: 0; }
.post-card-thumb { object-position: top center; background: var(--border); }
.post { max-width: 720px; margin: 0 auto; }
.eyecatch {
  width: 100%;
  max-height: 405px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  margin-bottom: 24px;
  display: block;
  background: var(--card-bg);
}
.post-card-theme {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 8px;
  border-radius: 999px;
}
.post-card-title { font-size: 1.05rem; margin: 0; line-height: 1.5; }
.post-card-date { font-size: 0.78rem; color: var(--muted); margin-top: auto; }

.post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; }
.post h1 { font-size: 1.6rem; line-height: 1.4; margin: 8px 0 16px; }
.post-body { font-size: 1rem; }
.post-body h2 { font-size: 1.25rem; margin-top: 32px; }
.post-body pre { overflow-x: auto; background: var(--card-bg); padding: 12px; border-radius: 8px; }

a { color: var(--accent); }
.site-footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); }

@media (max-width: 480px) {
  body { padding: 0 12px 32px; }
  .post-grid { grid-template-columns: 1fr; }
  .site-title { font-size: 1.15rem; }
  .post h1 { font-size: 1.35rem; }
}
