:root {
  --bg: #fdfdfb;
  --text: #23302a;
  --muted: #5f6f66;
  --accent: #2f7d4f;
  --accent-soft: #eaf6ee;
  --border: #dde5df;
  --note-bg: #f4f8f2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131a16;
    --text: #e4ece7;
    --muted: #9db0a5;
    --accent: #6fc493;
    --accent-soft: #1d2b23;
    --border: #2a3a31;
    --note-bg: #1a241f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  font-size: 1.05rem;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text);
}
.site-header nav { display: flex; gap: 1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

main { padding: 2rem 0 3rem; }

.hero h1 { font-size: 1.9rem; line-height: 1.3; margin: 0 0 0.5rem; }
.hero p { color: var(--muted); margin-top: 0; }

h1 { font-size: 1.7rem; line-height: 1.3; }
h2 { font-size: 1.3rem; margin-top: 2.2rem; }
h3 { font-size: 1.1rem; }

.post-meta { color: var(--muted); font-size: 0.9rem; }

.post-list ul { list-style: none; padding: 0; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.post-list li a { font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.post-list li p { margin: 0.3rem 0 0; color: var(--muted); }
.post-list .post-meta { margin-left: 0.5rem; }

.affiliate-note {
  background: var(--note-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 1.25rem 0;
}
.affiliate-note strong { color: var(--text); }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th { background: var(--accent-soft); }

img { max-width: 100%; height: auto; border-radius: 6px; }

code {
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}
pre { background: var(--accent-soft); padding: 1rem; border-radius: 6px; overflow-x: auto; }
pre code { background: none; padding: 0; }

blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 1rem;
  border-left: 4px solid var(--border);
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- 左右比較ブロック（compare ショートコード） ---- */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 700px) {
  .compare { grid-template-columns: 1fr; }
}
.compare-col {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--note-bg);
  min-width: 0;
}
.compare-col.correct { border-color: #2f7d4f; }
.compare-col.wrong { border-color: #b4472e; }
.compare-col.partial { border-color: #b8892b; }

.compare-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}
.compare-col.correct .compare-head { background: rgba(47, 125, 79, 0.14); }
.compare-col.wrong .compare-head { background: rgba(180, 71, 46, 0.14); }
.compare-col.partial .compare-head { background: rgba(184, 137, 43, 0.14); }

.verdict {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}
.verdict.correct { background: #2f7d4f; }
.verdict.wrong { background: #b4472e; }
.verdict.partial { background: #b8892b; }
.verdict.correct::before { content: "\2713"; }
.verdict.wrong::before { content: "\2717"; }
.verdict.partial::before { content: "!"; }

.compare-body {
  padding: 0.85rem;
  font-size: 0.93rem;
  overflow-x: auto;
}
.compare-body > :first-child { margin-top: 0; }
.compare-body > :last-child { margin-bottom: 0; }
.compare-body table { font-size: 0.88rem; }

/* ---- 全文トランスクリプト（transcript ショートコード） ---- */
.transcript {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  margin: 1rem 0;
  background: var(--note-bg);
  font-size: 0.93rem;
}
.transcript > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  padding: 0.25rem 0;
}
.transcript[open] > summary { margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
