:root {
  --bg: #FAF9F7;
  --text: #1C1C1C;
  --muted: #6F6F6F;
  --line: #E5E3DF;
  --accent: #C22;
  --accent-soft: #f6eaea;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", "PingFang SC", sans-serif;
  line-height: 1.85;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: rgba(250, 249, 247, 0.85);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.site-header .wrap {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.brand {
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  letter-spacing: 0.8px;
}
.toc a {
  display: inline-block;
  margin-left: 16px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
}
.toc a:hover, .toc a:focus {
  color: var(--text);
  background: var(--accent-soft);
}

.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

article h1 {
  font-family: "Noto Serif JP", serif;
  font-size: 2.6rem;
  line-height: 1.3;
  margin: 18px 0 6px;
  letter-spacing: 0.8px;
}

section h2 {
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 44px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

section h3 {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin: 18px 0 6px;
}

p { margin: 0 0 14px; }
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

a { color: var(--accent); }
a:hover { opacity: 0.85; }

.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.back-to-top {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 8px;
}
.back-to-top:hover { color: var(--text); }

@media (max-width: 780px) {
  .toc { display: none; }
  article h1 { font-size: 2rem; }
}