/* SHINFU LIFE MAGAZINE — article body (single post).
   Front end only: rules under .bf-entry.post_content (the extra class keeps SWELL's block CSS working
   and the doubled class outranks SWELL's .post_content heading/list styles).
   Front end + editor: block style rules start with `body`, which add_editor_style() rewrites
   to .editor-styles-wrapper. */

.bf-entry{font-size:var(--font-size--l);line-height:1.9;color:var(--text-body)}
.bf-entry.post_content > p{margin:0 0 var(--gutter--l)}
.bf-entry strong{color:var(--text-strong)}

/* H2: Heading variant="secondary" + number */
.bf-entry.post_content h2.bf-h2{display:flex;align-items:center;gap:var(--gutter);margin:var(--gutter--xl) 0 var(--gutter--l);padding:var(--gutter--s) var(--gutter);border:0;border-radius:0;background:var(--color-beige--light);box-shadow:none;font-size:18px;font-weight:500;line-height:1.6;color:var(--text-strong);scroll-margin-top:var(--gutter);overflow-wrap:anywhere}
.bf-entry.post_content h2.bf-h2::before,.bf-entry.post_content h2.bf-h2::after{content:none;display:none}
.bf-h2__n{flex:none;font-family:var(--font-serif);font-size:var(--font-size--xxl);line-height:1;padding-right:var(--gutter);border-right:1px solid var(--color-beige)}
/* 記事 1476: 本文の H2 に <br>・<strong> があると、flex で本文が細い列に分断される（CCA-227）。該当 H2 だけ block にして番号を行内に置く */
body.postid-1476 .bf-entry.post_content h2.bf-h2:has(> br,> strong){display:block}
body.postid-1476 .bf-entry.post_content h2.bf-h2:has(> br,> strong) > .bf-h2__n{display:inline-block;margin-right:var(--gutter);vertical-align:middle}

/* H3: Heading variant="tertiary" */
.bf-entry.post_content h3{margin:var(--gutter--l) 0 var(--gutter);padding:0 0 var(--gutter--s);border:0;border-bottom:1px solid var(--color-beige);border-radius:0;background:none;font-size:var(--font-size--l);font-weight:500;line-height:1.6;color:var(--text-strong)}
.bf-entry.post_content h3::before,.bf-entry.post_content h3::after{content:none;display:none}

/* Images */
.bf-entry.post_content .wp-block-image{margin:var(--gutter--l) 0}
.bf-entry.post_content .wp-block-image img{display:block;width:100%;height:auto;box-shadow:var(--shadow-photo)}
.bf-entry.post_content .wp-block-image figcaption{margin:var(--gutter--s) 0 0;font-size:11px;line-height:2.1;color:var(--text-muted);text-align:center}

/* Buttons: sf-btn (default) and orange primary with white text (client decision) */
.bf-entry.post_content .wp-block-buttons{margin:var(--gutter--l) 0}
.bf-entry.post_content .wp-block-button{width:100%}
body .wp-block-button .wp-block-button__link{position:relative;display:block;width:100%;padding:var(--gutter) var(--gutter--l);border:1px solid var(--color-text--strong);border-radius:0;background:var(--color-white);font-size:14px;line-height:1.65;text-align:center;text-decoration:none;color:var(--color-text--strong)}
body .wp-block-button .wp-block-button__link::before{content:'';position:absolute;top:calc(50% - 4px);right:var(--gutter);width:8px;height:8px;transform:rotate(45deg);border-top:1px solid currentColor;border-right:1px solid currentColor}
body .wp-block-button.is-style-bf-primary .wp-block-button__link{border-color:var(--color-primary);background:var(--color-primary);color:var(--color-white)}
@media (min-width:768px){.bf-entry .wp-block-button__link{transition:opacity var(--duration-hover) var(--easing-standard)}.bf-entry .wp-block-button__link:hover{opacity:var(--opacity-hover)}}

/* チェックリスト (core/list) */
body ul.is-style-bf-check{margin:0 0 var(--gutter--l);padding:var(--gutter) var(--gutter--l);list-style:none;background:var(--surface-block);border:0;border-radius:var(--radius--s);font-size:14px;line-height:1.65}
body ul.is-style-bf-check > li{position:relative;margin:0;padding:4px 0 4px 24px;list-style:none}
body ul.is-style-bf-check > li::before{content:'';position:absolute;left:2px;top:10px;width:10px;height:5px;border:0;border-left:2px solid var(--color-beige);border-bottom:2px solid var(--color-beige);border-radius:0;background:none;transform:rotate(-45deg)}

/* ポイント (core/group) = PointBox */
body .is-style-bf-point{display:flow-root;margin:0 0 var(--gutter--l);padding:var(--gutter--s);border:1px dashed var(--color-beige);background:var(--color-white);font-size:14px;line-height:1.9}
body .is-style-bf-point p{margin:0}

/* スタッフの声 (core/group) = StaffVoice (same inner-container handling as the product card) */
body .is-style-bf-staff{display:flow-root;margin:0 0 var(--gutter--l);padding:var(--gutter--s);border:1px dotted var(--color-beige);border-radius:var(--radius--m);background:var(--color-beige--thin);font-size:14px;line-height:1.9}
body :is(.is-style-bf-staff:not(:has(> .wp-block-group__inner-container)),.is-style-bf-staff > .wp-block-group__inner-container) > .wp-block-image:first-child{float:left;width:56px;margin:0 var(--gutter--s) 0 0}
body :is(.is-style-bf-staff:not(:has(> .wp-block-group__inner-container)),.is-style-bf-staff > .wp-block-group__inner-container) > .wp-block-image:first-child img{display:block;width:100%;height:auto;box-shadow:none}
body .is-style-bf-staff h4,body .is-style-bf-staff h5{border:0;padding:0;background:none}
body .is-style-bf-staff h4::before,body .is-style-bf-staff h4::after,body .is-style-bf-staff h5::before,body .is-style-bf-staff h5::after{content:none;display:none}
body .is-style-bf-staff h4{display:inline-block;margin:0;font-size:16px;font-weight:500;line-height:1.65;vertical-align:middle;color:var(--color-brown)}
body .is-style-bf-staff h5{margin:0 0 var(--gutter--s);font-size:14px;font-weight:500;line-height:1.65}
body .is-style-bf-staff p{margin:var(--gutter--s)}

/* 商品カード (core/group). Classic themes wrap group content in .wp-block-group__inner-container; the :is() covers both. */
body .is-style-bf-product{margin:0 0 var(--gutter);padding:var(--gutter);border:1px solid var(--color-gray);border-radius:var(--radius--s)}
body :is(.is-style-bf-product:not(:has(> .wp-block-group__inner-container)),.is-style-bf-product > .wp-block-group__inner-container){display:grid;grid-template-columns:200px minmax(0,1fr);gap:var(--gutter--l)}
body :not(.is-style-bf-product) + .is-style-bf-product{margin-top:var(--gutter--l)}
body .is-style-bf-product:not(:has(+ .is-style-bf-product)){margin-bottom:var(--gutter--l)}
body :is(.is-style-bf-product:not(:has(> .wp-block-group__inner-container)),.is-style-bf-product > .wp-block-group__inner-container) > .wp-block-image{margin:0;aspect-ratio:1/1;overflow:hidden;background:var(--color-white)}
body :is(.is-style-bf-product:not(:has(> .wp-block-group__inner-container)),.is-style-bf-product > .wp-block-group__inner-container) > .wp-block-image a{display:block;height:100%}
body :is(.is-style-bf-product:not(:has(> .wp-block-group__inner-container)),.is-style-bf-product > .wp-block-group__inner-container) > .wp-block-image img{display:block;width:100%;height:100%;object-fit:cover;box-shadow:none}
body :is(.is-style-bf-product:not(:has(> .wp-block-group__inner-container)),.is-style-bf-product > .wp-block-group__inner-container) > .wp-block-group *{margin-top:0}
body .is-style-bf-product .bf-prod__brand{margin:0;font-family:var(--font-serif);font-size:12px;letter-spacing:.14em;line-height:1.65;color:var(--text-muted)}
body .is-style-bf-product .bf-prod__copy{margin:0;font-size:12px;line-height:1.65;color:var(--text-muted)}
body .is-style-bf-product h3.bf-prod__name{margin:0 0 var(--gutter--s);padding:0;border:0;background:none;font-size:16px;font-weight:bold;line-height:1.65;color:var(--text-strong)}
body .is-style-bf-product .bf-prod__text{margin:0 0 var(--gutter--s);font-size:13px;line-height:1.9}
body .is-style-bf-product .bf-prod__price{margin:0 0 var(--gutter);font-size:12px;line-height:1.4;color:var(--text-body)}
body .is-style-bf-product .bf-prod__price strong{margin-right:4px;font-size:var(--font-size--xxl);font-weight:bold;color:var(--text-price)}
body .is-style-bf-product .wp-block-buttons{margin:0}

@media (max-width:767px){
.bf-entry{font-size:15px}
.bf-h2__n{font-size:20px}
body ul.is-style-bf-check{padding:var(--gutter)}
body :is(.is-style-bf-product:not(:has(> .wp-block-group__inner-container)),.is-style-bf-product > .wp-block-group__inner-container){grid-template-columns:minmax(0,1fr);gap:var(--gutter)}
}
