/* =========================================================
   Hoop Vision - Article Style (AFFINGER + Gutenberg)
   見出しは必ず .wp-block-heading を通す
   ========================================================= */

body.wp-singular main > article .st-post {
  --max-width: 760px;
  --base-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --brand: #164bff;
  --accent: #ff4d6d;
  --border: #e5e7eb;
  --bg: #fff;
  --fg: #222;
  --muted: #666;

  margin: 0 auto;
  max-width: var(--max-width);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--base-font);
  line-height: 1.9;
  font-size: 16px;
  padding: clamp(16px, 3vw, 28px);
}

/* 段落・リンク */
body.wp-singular main > article .st-post p { margin: 1.6em 0; }
body.wp-singular main > article .st-post a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.08em;
  transition: color .2s ease;
}
body.wp-singular main > article .st-post a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ================================================
   見出し（必ず .wp-block-heading 経由）
   AFFINGERの装飾より強くするためセレクタ長を確保
   ================================================ */

body.wp-singular main > article .st-post .wp-block-heading {
  margin: 0; /* 個別で設定 */
  line-height: 1.4;
  letter-spacing: .02em;
}

/* H1：タイトル */
body.wp-singular main > article .st-post h1.wp-block-heading {
  font-size: 1.9rem !important;
  font-weight: 700;
  border-bottom: 3px solid var(--brand);
  padding-bottom: .4em;
  margin: 2.2em 0 1.2em !important;
}

/* H2：章見出し（左線＋淡背景） */
body.wp-singular main > article .st-post h2.wp-block-heading {
  position: relative;
  font-size: 1.6rem !important;
  font-weight: 700;
  line-height: 1.5;
  padding: .6em .8em .6em 1em;
  margin: 2.5em 0 1.2em !important;
  background: #f6f9ff;
  border-left: 6px solid var(--brand);
  border-radius: 4px;
}

/* H3：小見出し（下線） */
body.wp-singular main > article .st-post h3.wp-block-heading {
  font-size: 1.3rem !important;
  font-weight: 700;
  color: #222;
  padding-bottom: .3em;
  margin: 2em 0 1em !important;
  border-bottom: 2px solid var(--brand);
}

/* H4：補助見出し（アクセント左線） */
body.wp-singular main > article .st-post h4.wp-block-heading {
  font-size: 1.1rem !important;
  font-weight: 600;
  color: #333;
  border-left: 3px solid var(--accent);
  padding-left: .6em;
  margin: 1.8em 0 .8em !important;
}

/* H5/H6：控えめ（点線左線） */
body.wp-singular main > article .st-post h5.wp-block-heading,
body.wp-singular main > article .st-post h6.wp-block-heading {
  font-size: 1rem !important;
  font-weight: 600;
  color: var(--muted);
  margin: 1.4em 0 .6em !important;
  border-left: 2px dashed var(--border);
  padding-left: .8em;
}

/* 画像／引用／表など */
body.wp-singular main > article .st-post figure.wp-block-image {
  margin: 2em auto;
  text-align: center;
}
body.wp-singular main > article .st-post figure.wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
}
body.wp-singular main > article .st-post figcaption {
  color: var(--muted);
  font-size: .9em;
  margin-top: .5em;
}

body.wp-singular main > article .st-post blockquote {
  margin: 2em 0;
  padding: 1.2em 1.5em;
  border-left: 4px solid var(--brand);
  background: #f7f9ff;
  border-radius: 8px;
  color: #333;
  font-style: italic;
}
body.wp-singular main > article .st-post blockquote p { margin: 0; }

body.wp-singular main > article .st-post table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  margin: 1.8em 0;
  background: #fff;
}
body.wp-singular main > article .st-post th,
body.wp-singular main > article .st-post td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
body.wp-singular main > article .st-post thead th {
  background: #f2f4f8;
  font-weight: 700;
}

body.wp-singular main > article .st-post code {
  background: #f3f4f6;
  border-radius: 4px;
  padding: .1em .3em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.wp-singular main > article .st-post pre {
  background: #f9fafc;
  color: #333;
  border-radius: 8px;
  padding: 1em;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

body.wp-singular main > article .st-post hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* Gutenbergボタン */
body.wp-singular main > article .st-post .wp-block-button__link {
  background: var(--brand);
  color: #fff;
  padding: .8em 1.6em;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background .2s ease;
}
body.wp-singular main > article .st-post .wp-block-button__link:hover {
  background: var(--accent);
}

/* スマホ */
@media (max-width: 768px) {
  body.wp-singular main > article .st-post { font-size: 15px; padding: 18px; }
  body.wp-singular main > article .st-post h1.wp-block-heading { font-size: 1.6rem !important; }
  body.wp-singular main > article .st-post h2.wp-block-heading { font-size: 1.4rem !important; }
  body.wp-singular main > article .st-post h3.wp-block-heading { font-size: 1.2rem !important; }
  body.wp-singular main > article .st-post h4.wp-block-heading { font-size: 1.05rem !important; }
}
