:root {
  --utopia-container: 1200px;
  --utopia-content: 760px;
  --utopia-gap: 24px;
  --utopia-border: #e2e8f0;
  --utopia-primary: #163d7a;
  --utopia-secondary: #1f5fbf;
  --utopia-text: #1e293b;
  --utopia-muted: #64748b;
  --utopia-bg: #ffffff;
  --utopia-surface: #f8fafc;
  --utopia-button-radius: 999px;
}

/* ── Dark mode: early flash prevention ── */
html.utopia-dark-pre body {
  background: #0f172a;
  color: #e2e8f0;
}

/* ── Dark mode variables ── */
body.utopia-dark-mode {
  color-scheme: dark;
  --utopia-bg: #0f172a;
  --utopia-surface: #1e293b;
  --utopia-text: #e2e8f0;
  --utopia-border: #334155;
  --utopia-muted: #94a3b8;
  background: #0f172a;
  color: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--utopia-text);
  background: var(--utopia-bg);
  font-family: var(--utopia-body-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  line-height: 1.7;
}

a {
  color: var(--utopia-secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

article {
  margin-bottom: 32px;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-top: 0;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

/* 投稿・固定ページの段落間スペース（Enter改行を反映）
 * flex + gap で確実にブロック間にスペースを確保（マージン相殺の影響を受けない） */
.single-content .entry-content,
.page-content .entry-content {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

/* 子要素は幅100%（flexで潰れないように） */
.single-content .entry-content > *,
.page-content .entry-content > * {
  min-width: 0;
}

/* clearfix ::after は flex では不要（gap で余白確保済み）かつ下部に余計な gap が入るため無効化 */
.single-content .entry-content::after,
.page-content .entry-content::after {
  content: none;
  display: none;
}

/* 区切り線ブロック: flex 内で潰れないように、基本表示を保証 */
.entry-content .wp-block-separator,
.single-content .entry-content .wp-block-separator,
.page-content .entry-content .wp-block-separator {
  flex-shrink: 0;
  align-self: stretch;
  border: none;
  height: 2px;
  background: var(--utopia-border, #e2e8f0);
  margin: 1.5em 0;
}