/* Single (投稿詳細/お知らせ詳細) layout lock
   - WordPressの body class は single-post / singular などが付くため、両方をカバー
   - コンテンツ幅だけを制御し、ヘッダー/フッターは 100% のままにする
*/
:root{
  /* common.css 側に定義が無い場合の保険 */
  --maxw: 1100px;
  --inner-pad: 20px;
}

/* main の中身（.page だけ）を中央寄せ＋最大幅に固定 */
body.single #main > .page,
body.single-post #main > .page,
body.singular #main > .page,
body.single-news #main > .page,
body.post-type-news #main > .page{
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--inner-pad);
  padding-right: var(--inner-pad);
  display:block;
}

/* Gutenberg / the_content() での崩れ防止（single.htmlに寄せる） */
body.single .entry-content > *,
body.single-post .entry-content > *,
body.singular .entry-content > *,
body.single-news .entry-content > *,
body.post-type-news .entry-content > *{
  max-width: 100%;
}

body.single .entry-content img,
body.single-post .entry-content img,
body.singular .entry-content img,
body.single-news .entry-content img,
body.post-type-news .entry-content img{
  max-width: 100%;
  height: auto;
}

body.single .entry-content table,
body.single-post .entry-content table,
body.singular .entry-content table,
body.single-news .entry-content table,
body.post-type-news .entry-content table{
  width: 100%;
  max-width: 100%;
}

/* alignfull/alignwide が付いた場合に横はみ出しを抑制（必要最低限） */
body.single .entry-content .alignfull,
body.single-post .entry-content .alignfull,
body.singular .entry-content .alignfull,
body.single-news .entry-content .alignfull,
body.post-type-news .entry-content .alignfull{
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}


/* --- spacing tweaks for single pages --- */
body.single-post .breadcrumb,
body.single-news .breadcrumb{
  margin-bottom: clamp(16px, 2vw, 28px);
}

body.single-post #main,
body.single-news #main{
  padding-bottom: clamp(40px, 5vw, 80px);
}
