:root {
  --fg: #1f2328;
  --muted: #656d76;
  --bg: #ffffff;
  --line: #d0d7de;
  --accent: #0b62c4;
  --soft: #f3f6fa;
  --sun: #c62828;
  --sat: #1565c0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6edf3; --muted: #9da7b3; --bg: #0d1117; --line: #30363d;
    --accent: #58a6ff; --soft: #161b22; --sun: #ff7b72; --sat: #79c0ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--fg); background: var(--bg);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.8; font-size: 16px;
}
a { color: var(--accent); }
.site-header, .site-footer, .layout { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.site-header { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; padding-top: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.site-title { font-size: 1.4rem; font-weight: 700; color: var(--fg); text-decoration: none; }
.site-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; padding-top: 24px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.page-title { font-size: 1.6rem; line-height: 1.4; margin: 0 0 16px; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.post-list time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 12px; }
.tag { display: inline-block; margin-left: 8px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.tag:hover { color: var(--accent); }
.post-meta { color: var(--muted); font-size: .9rem; }
.post-body { overflow-wrap: anywhere; }
.post-body img { max-width: 100%; height: auto; }
.post-body pre { overflow-x: auto; padding: 12px; border-radius: 6px; font-size: .9rem; line-height: 1.5; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.post-body table { border-collapse: collapse; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 4px 10px; }
.post-nav, .pager { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0; flex-wrap: wrap; }
.archive-year { margin-top: 32px; border-bottom: 2px solid var(--line); }
.archive-month { margin: 20px 0 4px; font-size: 1.05rem; }
.count { color: var(--muted); font-size: .85rem; }
.sidebar-heading { font-size: 1rem; margin: 0 0 8px; }
.sidebar section { margin-bottom: 32px; }
.sidebar-tags ul, .term-list { list-style: none; padding: 0; margin: 0; }
.site-footer { margin-top: 48px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* カレンダー */
.cal { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-weight: 700; color: var(--fg); text-decoration: none; }
a.cal-title { color: var(--accent); }
.cal-nav { background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--fg); width: 30px; height: 30px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-variant-numeric: tabular-nums; }
.cal-grid th { font-size: .75rem; color: var(--muted); font-weight: 600; padding: 2px 0; }
.cal-grid td { padding: 1px; }
.cal-grid .sun, .cal-grid .sun .cal-day { color: var(--sun); }
.cal-grid .sat, .cal-grid .sat .cal-day { color: var(--sat); }
.cal-day { display: block; width: 100%; padding: 4px 0; font-size: .85rem; border-radius: 4px; color: var(--muted); }
button.cal-day { border: 0; background: var(--accent); color: #fff !important; font-weight: 700; cursor: pointer; font-family: inherit; }
.today .cal-day { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-list { margin-top: 8px; font-size: .9rem; }
.cal-list:empty { display: none; }
.cal-list-date { margin: 0; color: var(--muted); }
.cal-list ul { margin: 0; padding-left: 1.2em; }
