/* Phase 3 — shared four-option layout, isolated from phase 1/2. */
body.j518 .j518-home-options .wrap { width:min(1120px,calc(100% - 40px)); padding-inline:0; }
body.j518 .j518-options-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
body.j518 .j518-option { border:1px solid var(--line); background:var(--paper2); min-width:0; display:flex; flex-direction:column; }
body.j518 .j518-option-media { height:240px; overflow:hidden; background:var(--paper); }
body.j518 .j518-option-media figure { margin:0; height:100%; }
body.j518 .j518-option-media img { width:100%; height:100%; object-fit:cover; border-radius:0; }
body.j518 .j518-option-copy { padding:24px; display:flex; flex-direction:column; flex:1; }
body.j518 .j518-option-copy h3 { font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-size:25px; font-weight:500; color:var(--green); margin:0 0 14px; line-height:1.6; }
body.j518 .j518-option-copy p { margin:0 0 20px; color:var(--muted); line-height:1.9; }
body.j518 .j518-option-copy>a { margin-top:auto; min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; text-underline-offset:5px; }
body.j518 .j518-media-label { display:flex; flex-direction:column; align-items:center; justify-content:center; height:240px; background:#edf0e9; color:#365342; border:0; }
body.j518 .j518-media-label span { font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-size:34px; letter-spacing:.15em; }
body.j518 .j518-media-label small { font-size:15px; letter-spacing:.28em; margin-top:10px; }
body.j518 .j518-all { margin:26px 0 0; }
body.j518 .memorial-choice-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:28px!important; }
body.j518 .memorial-choice-grid>.wp-block-column { width:auto!important; min-width:0; margin:0!important; flex-basis:auto!important; }
body.j518 .memorial-choice-grid .memorial-choice { height:100%; min-width:0; }
body.j518 .memorial-choice-grid .choice-copy { padding:24px; }
body.j518 .memorial-choice-grid .wp-block-image, body.j518 .j518-option-photo { height:240px; margin:0; overflow:hidden; }
body.j518 .memorial-choice-grid .wp-block-image img, body.j518 .j518-option-photo img { width:100%; height:100%; object-fit:cover; }
body.j518 .j518-seiryu { scroll-margin-top:120px; }
.j518-faq-reset { display:inline-flex; align-items:center; justify-content:center; padding:9px 16px; min-height:44px; font:inherit; cursor:pointer; border:1px solid #b8c3b5; border-radius:3px; background:#fff; color:#263e31; margin-top:10px; }
.j518-faq-reset:focus-visible { outline:2px solid #765622; outline-offset:3px; }
.j518-legacy-context { width:min(960px,calc(100% - 40px)); margin:32px auto!important; }
.j518-legacy-context h2 { font-size:22px; }
.j518-anchor { display:block; scroll-margin-top:120px; }
body.j518 .comparison-table { max-width:100%; overflow-x:auto; }
@media(max-width:700px) {
 body.j518 .j518-options-grid,body.j518 .memorial-choice-grid { grid-template-columns:1fr!important; gap:22px!important; }
 body.j518 .j518-option-copy,body.j518 .memorial-choice-grid .choice-copy { padding:20px; }
 body.j518 .j518-option-copy h3 { font-size:23px; }
 body.j518 .j518-option-media, body.j518 .memorial-choice-grid .wp-block-image, body.j518 .j518-option-photo,body.j518 .j518-media-label { height:210px; }
}

/* Align the existing cemetery text panel with the photo cards. */
body.j518 .memorial-choice-placeholder { display:flex; align-items:center; justify-content:center; height:240px; min-height:240px; font-size:34px; border:0; border-radius:0; margin:0; background:#edf0e9; color:#365342; }
body.j518 .memorial-choice-cemetery .choice-copy { padding-top:24px; }
@media(max-width:700px){body.j518 .memorial-choice-placeholder {height:210px;min-height:210px;}body.j518 .memorial-choice-cemetery .choice-copy {padding-top:20px;}}
/* The browser's default figure margins must not push the comparison outside its container. */
body.j518 .comparison-table { width:100%; max-width:100%; margin-left:0; margin-right:0; }
body.j518 .comparison-table table { width:100%; table-layout:fixed; }
body.j518 .comparison-table th,body.j518 .comparison-table td { overflow-wrap:anywhere; }
body.j518 .memorial-choice-placeholder,body.j518 .j518-media-label { width:100%; aspect-ratio:auto; }
