/* Approved D / Musashikan composition — scoped to the four Musashikan pages. */
body.biz-d {
  --d-green: #17835f;
  --d-green-deep: #086346;
  --d-cream: #faf8f2;
  --d-yellow: #fff29a;
  --d-mint: #e6f3e7;
  --d-peach: #fbe3d5;
  --d-ink: #28312d;
  background: var(--d-cream);
  color: var(--d-ink);
  font-family: "Noto Sans JP", sans-serif;
}

body.biz-d #main { overflow: hidden; }
body.biz-d #main img { display: block; max-width: 100%; }
body.biz-d #main a { color: inherit; }
body.biz-d .d-hero {
  position: relative;
  padding: clamp(56px, 8vw, 120px) max(5vw, 24px);
  min-height: min(690px, 75vw);
  background: var(--d-cream);
}
body.biz-d .d-hero::before,
body.biz-d .d-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 0 115px 0 0;
}
body.biz-d .d-hero::before { width: min(34vw, 490px); height: 150px; left: -20px; bottom: 0; background: #f8dd61; border-radius: 0 110px 0 0; }
body.biz-d .d-hero::after { width: min(25vw, 380px); height: 170px; right: -30px; bottom: 0; background: #ef714a; }
body.biz-d .d-title-grid {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(220px, .68fr) minmax(400px, 1.32fr);
  align-items: center;
  gap: clamp(30px, 7vw, 120px);
}
body.biz-d .d-title-grid::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  justify-self: stretch;
  align-self: center;
  height: min(31vw, 405px);
  background: var(--d-green);
  transform: translate(42px, -26px);
}
body.biz-d .d-kicker { margin: 0; font: 700 11px/1 "DM Sans", sans-serif; letter-spacing: .16em; color: var(--d-green); grid-column: 1; align-self: end; }
body.biz-d .d-label { display: none; }
body.biz-d .d-heading {
  position: relative; z-index: 2; grid-column: 1; grid-row: 1; margin: 0;
  font-family: "Shippori Mincho B1", serif; font-size: clamp(44px, 6vw, 78px); line-height: 1.2; letter-spacing: .16em;
}
body.biz-d .d-hero + .d-heading { position: absolute; z-index: 2; top: clamp(114px, 16vw, 230px); left: max(8vw, calc((100vw - 1120px)/2)); margin: 0; font-family: "Shippori Mincho B1", serif; font-size: clamp(44px, 6vw, 78px); letter-spacing: .16em; }
body.biz-d .d-visual { position: relative; z-index: 2; width: min(58vw, 700px); margin: -420px max(5vw, calc((100vw - 1120px)/2)) 0 auto; }
body.biz-d .d-hero + .d-heading + .d-visual { margin-top: -160px; }
body.biz-d .d-visual img { width: 100%; height: auto; box-shadow: 0 0 0 5px var(--d-cream); }
body.biz-d .d-intro {
  position: relative; z-index: 3; max-width: 1120px; margin: -156px auto 0;
  padding: 22px 25px; background: var(--d-cream); width: min(40vw, 430px);
}
body.biz-d .d-intro h2, body.biz-d .d-intro p { margin: 0 0 9px; }
body.biz-d .d-intro h2 { font-size: 13px; font-weight: 500; }
body.biz-d .d-intro p { font-size: 15px; line-height: 1.8; }
body.biz-d .d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
body.biz-d .d-button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 10px 18px; border-radius: 999px; font-size: 13px; text-decoration: none; transition: transform .2s ease; }
body.biz-d .d-button:hover { transform: translateY(-2px); }
body.biz-d .d-button-primary { background: var(--d-green); color: #fff !important; }
body.biz-d .d-button-secondary { border: 1px solid var(--d-green); color: var(--d-green) !important; }
body.biz-d .d-shell { max-width: 1120px; margin: 0 auto; }
body.biz-d .d-section, body.biz-d .d-content { padding: clamp(62px, 9vw, 135px) max(5vw, 24px); position: relative; }
body.biz-d .d-section:nth-of-type(odd) { background: var(--d-cream); }
body.biz-d .d-section h2, body.biz-d .d-content h2 { margin: 0 0 28px; color: var(--d-green); font-family: "Shippori Mincho B1", serif; font-size: clamp(27px, 3.4vw, 46px); line-height: 1.45; }
body.biz-d .d-section h3, body.biz-d .d-content h3 { margin: 24px 0 10px; font-size: 18px; }
body.biz-d .d-section p, body.biz-d .d-content p { font-size: 15px; line-height: 2.15; }
body.biz-d .d-copy { max-width: 800px; }
body.biz-d .d-overview { background: var(--d-mint); margin-top: 0; padding-top: clamp(105px, 13vw, 180px); }
body.biz-d .d-overview .d-copy { max-width: 840px; margin: auto; }
body.biz-d .d-overview .d-copy p:first-child { color: var(--d-green); font: 600 clamp(28px, 4vw, 48px)/1.55 "Shippori Mincho B1", serif; }
body.biz-d .d-gallery, body.biz-d .d-result-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; background: var(--d-cream); }
body.biz-d .d-gallery figure, body.biz-d .d-result-photos figure { margin: 0; }
body.biz-d .d-gallery img, body.biz-d .d-result-photos img { width: 100%; height: auto; }
body.biz-d .d-schedule-cards, body.biz-d .d-columns, body.biz-d .d-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 34px; }
body.biz-d .d-schedule-card, body.biz-d .d-columns > div, body.biz-d .d-result-category, body.biz-d .d-coach {
  padding: 27px; background: var(--d-peach); border-radius: 12px;
}
body.biz-d .d-schedule-card:nth-child(even), body.biz-d .d-columns > div:nth-child(even) { background: var(--d-mint); }
body.biz-d .d-schedule-card h3, body.biz-d .d-result-category h3 { color: var(--d-green); margin-top: 0; }
body.biz-d .d-fee-table { width: 100%; margin: 22px 0; border-collapse: collapse; background: #fff; font-size: 14px; }
body.biz-d .d-fee-table th, body.biz-d .d-fee-table td { padding: 15px; border: 1px solid #c9d7ce; text-align: left; vertical-align: top; line-height: 1.8; }
body.biz-d .d-fee-table th { width: 30%; background: #eff6ed; }
body.biz-d .d-list { padding-left: 1.5em; line-height: 2; }
body.biz-d .d-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 38px -5vw 0; background: var(--d-yellow); }
body.biz-d .d-stat { min-height: 160px; padding: 35px 22px; border-right: 1px solid rgba(40,49,45,.16); }
body.biz-d .d-stat strong { display: block; font-size: clamp(24px, 3vw, 40px); }
body.biz-d .d-stat span { display: block; font-size: 12px; line-height: 1.7; margin-top: 9px; }
body.biz-d .d-coach-list { display: grid; gap: 12px; }
body.biz-d .d-coach { background: #fff5d1; }
body.biz-d .d-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.biz-d .d-result-category { background: var(--d-mint); }
body.biz-d .d-result-category ul { padding-left: 1.2em; line-height: 2; }
body.biz-d .d-text-link { color: var(--d-green); text-decoration: underline; text-underline-offset: 5px; }
body.biz-d .d-page-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #b7c7bc; }
body.biz-d .d-page-link { display: block; min-height: 130px; padding: 24px; border-right: 1px solid #b7c7bc; border-bottom: 1px solid #b7c7bc; color: var(--d-green); font-weight: 600; }
body.biz-d .d-page-link small { display: block; margin-bottom: 18px; color: var(--d-ink); }
body.biz-d .d-en { margin: 0 0 11px; color: var(--d-green); font: 600 11px/1.5 "DM Sans", sans-serif; letter-spacing: .13em; text-transform: uppercase; }
body.biz-d .d-news-list, body.biz-d .d-timeline { max-width: 900px; margin: 34px auto 0; }
body.biz-d .d-timeline-row { display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding: 28px 0; border-top: 1px solid #b6cabb; }
body.biz-d .d-timeline-row time { color: var(--d-green); font-weight: 700; }
body.biz-d .d-other { padding: clamp(70px, 10vw, 140px) max(5vw, 64px); background: var(--d-green); color: #fff; }
body.biz-d .d-other .d-section-head h2, body.biz-d .d-other .d-en { color: #fff; }
body.biz-d .d-other-list { border-top: 1px solid rgba(255,255,255,.45); }
body.biz-d .d-other-row { display: grid; grid-template-columns: 50px minmax(150px, .8fr) minmax(220px, 1.4fr) 30px; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.45); text-decoration: none; }
body.biz-d .d-other-number, body.biz-d .d-arrow { color: var(--d-yellow); }
body.biz-d .d-other-copy { font-size: 13px; }
body.biz-d .d-contact { padding: clamp(72px, 9vw, 125px) max(5vw, 24px); background: var(--d-cream); }
body.biz-d .d-contact > h2, body.biz-d .d-contact > .d-en { max-width: 780px; margin-left: auto; margin-right: auto; }
body.biz-d .d-contact > h2 { margin-top: 0; color: var(--d-green); font-family: "Shippori Mincho B1", serif; font-size: clamp(29px, 4vw, 48px); }
body.biz-d .d-contact-form { max-width: 780px; margin: 30px auto 0; padding: clamp(24px, 4vw, 48px); background: var(--d-mint); border-radius: 12px; }
body.biz-d .d-field { display: grid; gap: 7px; margin-bottom: 17px; }
body.biz-d .d-field label { font-size: 14px; font-weight: 600; color: #174c37; }
body.biz-d .d-field input, body.biz-d .d-field select, body.biz-d .d-field textarea { width: 100%; border: 1px solid #6f9d8b; border-radius: 4px; padding: 12px; background: #fff; color: #18241e; font: inherit; }
body.biz-d .d-field select { min-height: 46px; }
body.biz-d .d-field textarea { min-height: 130px; resize: vertical; }
body.biz-d .d-privacy { font-size: 12px; color: #344a3d; }
body.biz-d .d-submit { min-height: 48px; padding: 12px 24px; border: 0; border-radius: 999px; background: var(--d-green); color: #fff; cursor: pointer; font: inherit; }
body.biz-d .d-status { min-height: 1.5em; color: #174c37; }

@media (max-width: 700px) {
  body.biz-d .d-hero { min-height: 440px; padding: 52px 20px 0; }
  body.biz-d .d-title-grid { display: block; min-height: 310px; }
  body.biz-d .d-title-grid::after { display: none; }
  body.biz-d .d-kicker { padding-top: 20px; }
  body.biz-d .d-heading, body.biz-d .d-hero + .d-heading { position: static; margin: 28px 0 0; font-size: 48px; }
  body.biz-d .d-visual, body.biz-d .d-hero + .d-heading + .d-visual { width: 78vw; margin: -105px 20px 0 auto; }
  body.biz-d .d-intro { width: calc(100% - 40px); margin: 25px auto 0; padding: 18px; }
  body.biz-d .d-section, body.biz-d .d-content { padding: 62px 20px; }
  body.biz-d .d-gallery, body.biz-d .d-result-photos { grid-template-columns: 1fr; }
  body.biz-d .d-schedule-cards, body.biz-d .d-columns, body.biz-d .d-result-grid { grid-template-columns: 1fr; }
  body.biz-d .d-stats { grid-template-columns: 1fr 1fr; margin: 30px -20px 0; }
  body.biz-d .d-stat { min-height: 120px; }
  body.biz-d .d-page-list { grid-template-columns: 1fr; }
  body.biz-d .d-page-link { min-height: auto; border-right: 0; }
  body.biz-d .d-timeline-row { grid-template-columns: 1fr; gap: 8px; }
  body.biz-d .d-other { padding: 64px 20px; }
  body.biz-d .d-other-row { grid-template-columns: 35px 1fr 22px; gap: 9px; }
  body.biz-d .d-other-copy { display: none; }
}
/* manual fix 10/21: hero = title block + photo on a green offset panel, nothing positioned by negative margins */
body.biz-d .d-hero2{display:grid;grid-template-columns:minmax(260px,.85fr) minmax(0,1.15fr);gap:clamp(36px,6vw,96px);align-items:center;min-height:0;padding:clamp(64px,7vw,110px) max(5vw,calc((100vw - 1120px)/2)) clamp(110px,11vw,170px)}
body.biz-d .d-hero2-text{position:relative;z-index:2}
body.biz-d .d-hero2 .d-kicker{display:block;margin:0 0 18px}
body.biz-d .d-hero2 .d-heading{position:static;margin:0 0 28px;font-family:"Shippori Mincho B1",serif;font-size:clamp(40px,5vw,72px);line-height:1.25;letter-spacing:.14em}
body.biz-d .d-hero2 .d-intro{position:static;margin:0;width:auto;max-width:430px;padding:0;background:none}
body.biz-d .d-hero2-photo{position:relative;z-index:1;margin:0 42px 26px 0;justify-self:end}
body.biz-d .d-hero2-photo::before{content:"";position:absolute;inset:-26px -42px 26px 42px;background:var(--d-green);z-index:-1}
body.biz-d .d-hero2-photo img{display:block;width:auto;max-width:100%;height:auto;max-height:min(70vh,600px);box-shadow:0 0 0 5px var(--d-cream)}
@media (max-width:720px){
  body.biz-d .d-hero2{grid-template-columns:1fr;gap:34px;padding:40px 22px 120px}
  body.biz-d .d-hero2 .d-heading{font-size:clamp(30px,9vw,40px);letter-spacing:.08em;margin-bottom:20px}
  body.biz-d .d-hero2-photo{margin:0 26px 18px 0;justify-self:start}
  body.biz-d .d-hero2-photo::before{inset:-18px -26px 18px 26px}
  body.biz-d .d-hero2-photo img{max-height:62vh}
}
body.biz-d .nw{display:inline-block}
body.biz-d .d-hero2 .d-intro{display:block}
body.round8.subpage.biz-d main{padding-top:80px}
@media(max-width:720px){body.round8.subpage.biz-d main{padding-top:68px}}
/* manual fix 10/21: form keeps the shared class (WP swaps it for the live form) — style both static and WP forms */
body.biz-d .d-contact form{max-width:780px;margin:30px auto 0;padding:clamp(24px,4vw,48px);background:var(--d-mint);border-radius:12px;text-align:left}
body.biz-d .d-contact form label{display:block;font-size:14px;font-weight:600;color:#174c37}
body.biz-d .d-contact form input:not([type=hidden]):not([type=checkbox]):not([type=radio]),body.biz-d .d-contact form select,body.biz-d .d-contact form textarea{width:100%;border:1px solid #6f9d8b;border-radius:4px;padding:12px;background:#fff;color:#18241e;font:inherit;margin-top:7px}
body.biz-d .d-contact form textarea{min-height:130px}
body.biz-d .d-contact form button,body.biz-d .d-contact form [type=submit]{margin-top:12px;padding:13px 28px;border:0;border-radius:999px;background:var(--d-green);color:#fff;font:inherit;cursor:pointer}
/* 10/21 perfect pass: end buttons centered in the content column */
body.biz-d .d-actions-end{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;max-width:1120px;margin:56px auto 0;padding:0 22px}
/* 写真のバランス: 段ごとに高さをそろえて横幅ぴったり(切り抜きなし)・幅は biz-d.js が実画像の比率から計算 */
@media (min-width:701px){
body.biz-d .d-gallery,body.biz-d .d-result-photos{display:flex;flex-wrap:wrap;gap:16px;max-width:1120px;margin-inline:auto;justify-content:center;background:none}
body.biz-d .d-gallery figure,body.biz-d .d-result-photos figure{flex:0 0 auto;width:calc(33.333% - 11px);min-width:0}
body.biz-d .d-gallery img,body.biz-d .d-result-photos img{display:block;width:100%;height:auto}
body.biz-d .d-hero2{grid-template-columns:minmax(260px,.75fr) minmax(0,1.25fr)}
body.biz-d .d-hero2-photo img{max-height:min(72vh,640px)}
}

/* ROUND12: a single 1080px content edge, including nested sections and galleries. */
body.biz-d{--inquiry-bg:#086346;--inquiry-ink:#fff;--d-content-width:1080px}
body.biz-d .d-shell,body.biz-d .d-content,body.biz-d #main>.d-section,body.biz-d .d-other,body.biz-d #main>.d-gallery{width:min(var(--d-content-width),calc(100% - 80px));max-width:none;margin-inline:auto}
body.biz-d .d-section,body.biz-d .d-content{padding:48px 0}
body.biz-d .d-content .d-section{padding:28px 0}
body.biz-d .d-shell>.d-section{margin-top:0}
body.biz-d .d-copy,body.biz-d .d-overview .d-copy{max-width:800px;margin-left:0;margin-right:0}
body.biz-d .d-overview{padding-top:56px}
body.biz-d .d-hero2{padding:64px max(40px,calc((100% - 1080px)/2)) 80px}
body.biz-d .d-stats{margin:28px 0 0;grid-template-columns:repeat(4,minmax(0,1fr))}
body.biz-d .d-other{padding:48px 0;background:var(--d-green);box-shadow:0 0 0 100vmax var(--d-green);clip-path:inset(0 -100vmax)}
body.biz-d .d-actions-end{justify-content:flex-start;margin:24px 0 0;padding:0}
body.biz-d .d-actions-end .d-button{border:1px solid currentColor;background:none;color:inherit!important}
body.biz-d .d-columns>div,body.biz-d .d-result-category{min-width:0}
@media(max-width:760px){
 body.biz-d .d-shell,body.biz-d .d-content,body.biz-d #main>.d-section,body.biz-d .d-other,body.biz-d #main>.d-gallery{width:calc(100% - 40px)}
 body.biz-d .d-section,body.biz-d .d-content{padding:32px 0}
 body.biz-d .d-hero2{padding:40px 20px 64px}
 body.biz-d .d-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-inline:0}
 body.biz-d .d-columns{gap:20px}
 body.biz-d .d-columns>div{padding:22px}
}

/* ROUND13: remove the offset photo mat; retain the hero and all gallery rows. */
body.biz-d .d-hero2-photo{margin:0;justify-self:stretch}
body.biz-d .d-hero2-photo::before{content:none}
body.biz-d .d-hero2-photo img{margin-inline:auto;box-shadow:none;border-radius:0}
@media(max-width:720px){
 body.biz-d .d-hero2-photo img{width:100%;max-height:none}
}
