/*
 * 窓口のトップ（種類 top。/souzoku/）の見た目。髙橋さんの試作 top.html（会社フォルダ 39 の ⑤_トップの作り直し\試作）の <main> の中と同じ並び・同じ見た目。
 * 色・大きさの変数（--ms-color-* など）は ms-shell.css で決める。ここでは決めない。名前は全部 ms-top- で始める。書体はゴシックだけ（var(--ms-font-family-base)）。
 * ボタン（.ms-btn）と道順のボタン（.ms-route）は ms-shell.css の物。
 * 字と押す所の決まり（11/25 髙橋さん）：本文 16px 以上。16px 未満は 14px だけで、使うのは写真の説明（figcaption）だけ。15px は使わない。押す所は高さ 44px 以上（文の中のリンクは除く）
 */

/* ===== 土台（この型の中だけ） ===== */
.ms-top{font-family:var(--ms-font-family-base);font-size:16px;line-height:1.9;color:var(--ms-color-font-base);background:var(--ms-color-bg-white)}
.ms-top *,.ms-top *::before,.ms-top *::after{box-sizing:border-box}
/* 色と画像の土台は :where で強さ 0,0,1 にする。入れ物の名前を数えると、ボタンや色付きの字（強さ 0,1,0）に勝って字の色が白・茶に戻る（11/25 検査係） */
:where(.ms-top) img{max-width:100%;height:auto;display:block}
:where(.ms-top) a{color:inherit}
.ms-top h1,.ms-top h2,.ms-top h3{word-break:auto-phrase;text-wrap:balance;font-family:var(--ms-font-family-heading);font-weight:700;line-height:1.4}
.ms-top p,.ms-top ul,.ms-top ol,.ms-top h1,.ms-top h2,.ms-top h3,.ms-top figure{margin:0;padding:0}
.ms-top ul,.ms-top ol{list-style:none}
.ms-top a:focus-visible,.ms-top summary:focus-visible{outline:3px solid var(--ms-color-deep);outline-offset:2px}
.ms-top-wrap{width:min(92%,var(--ms-width-content));margin-inline:auto}
.ms-top-nw{display:inline-block}
.ms-top-kari{background:#ffe9a8;color:#6b4300;font-weight:700;padding:0 4px;border-radius:3px}
.ms-top-sec{padding:64px 0}
.ms-top-sec--base{background:var(--ms-color-bg-base)}
.ms-top-sec--flow{padding:64px 0 56px}
.ms-top-sec h2{font-size:30px;padding-left:20px;border-left:6px solid var(--ms-color-accent);margin-bottom:28px}

/* ===== 最初の画面 ===== */
.ms-top-hero{background:var(--ms-color-bg-base);padding:30px 0 0}
.ms-top-hero-grid{width:min(92%,var(--ms-width-content));margin-inline:auto;display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);grid-template-areas:"text photo" "sub photo" "cards cards" "note note";column-gap:36px;align-items:start}
.ms-top-hero-text{grid-area:text}
.ms-top-hero h1{font-size:44px;line-height:1.35;padding-left:22px;border-left:6px solid var(--ms-color-accent);margin-bottom:16px}
.ms-top-facts{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px}
.ms-top-facts li{background:#fff;border:1px solid var(--ms-color-border-warm);border-radius:6px;padding:8px 14px;font-weight:700;line-height:1.5}
.ms-top-facts li.ms-top-station{display:flex;flex-direction:column;padding:10px 24px;background:var(--ms-color-deep);border-color:var(--ms-color-deep);color:#fff;line-height:1.3}
.ms-top-st-line{font-size:16px;font-weight:700;color:rgba(255,255,255,.86);letter-spacing:.03em}
.ms-top-st-main{font-size:26px;font-weight:700;letter-spacing:.04em;line-height:1.15;margin-top:2px}
.ms-top-st-main b{font-family:var(--ms-font-family-heading);font-size:50px;font-weight:700;color:var(--ms-color-accent);margin:0 3px 0 5px;line-height:1;vertical-align:-4px}
.ms-top-facts .ms-top-jisseki-sp{display:none;background:#fff8e6;border-color:var(--ms-color-accent-deep)}
.ms-top-facts .ms-top-jisseki-sp b{font-family:var(--ms-font-family-heading);font-size:23px;color:var(--ms-color-deep);margin:0 2px;line-height:1}
.ms-top-facts .ms-top-free{display:none}
.ms-top-fn{margin:6px 0 0;font-size:16px}
.ms-top-hero-sub .ms-top-fn{font-size:16px;margin:8px 0 0} /* 「初回のご相談は無料です。」の下（11/27 チェック表 11）。.ms-top-hero-sub p の 18px に負けないように */
.ms-top-photo{grid-area:photo;align-self:center;position:relative;z-index:1;aspect-ratio:3/2}
/* 土台の img{height:auto} は :where で 0,0,1 なので、入れ物の名前だけで勝てる（スマホの 50% 24% も効く） */
.ms-top-photo img{width:100%;height:100%;object-fit:cover;object-position:50% 30%;border-radius:4px}
.ms-top-jisseki{position:absolute;left:-28px;bottom:22px;z-index:3;width:150px;height:150px;border-radius:50%;background:#fff;border:3px solid var(--ms-color-accent-deep);box-shadow:0 0 0 6px rgba(255,255,255,.9),0 8px 20px rgba(74,59,50,.22);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;line-height:1.25;color:var(--ms-color-font-base)}
.ms-top-jisseki .j1,.ms-top-jisseki .j0{font-size:16px;font-weight:700}
.ms-top-jisseki .j0{margin-top:2px}
.ms-top-jisseki .j2{font-family:var(--ms-font-family-heading);font-size:30px;font-weight:700;color:var(--ms-color-deep);line-height:1.1}
.ms-top-jisseki .j2 small{display:block;font-family:var(--ms-font-family-base);font-size:16px;font-weight:700;line-height:1.3;color:var(--ms-color-font-base)} /* 「件以上※」は数の下の行（5けたの数と並べると丸い印に入らない。11/27 髙橋さん「以上」） */
.ms-top-hero-sub{grid-area:sub;padding-top:8px}
.ms-top-hero-sub p{font-size:18px}
.ms-top-hero-cards{grid-area:cards;position:relative;z-index:2;margin-top:28px}
.ms-top-picks{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.ms-top-picks li{display:flex}
.ms-top-pick{position:relative;width:100%;display:flex;flex-direction:column;justify-content:space-between;gap:14px;min-height:186px;padding:30px 24px 10px;background:#fff;border:1px solid var(--ms-color-border-warm);border-top:6px solid var(--ms-color-deep);border-radius:4px;text-decoration:none;box-shadow:0 6px 18px rgba(74,59,50,.12)}
.ms-top-pick:hover{border-top-color:var(--ms-color-accent-deep);box-shadow:0 8px 22px rgba(74,59,50,.2)}
.ms-top-pick-tag{position:absolute;top:-17px;left:20px;background:var(--ms-color-accent);padding:3px 16px;border-radius:999px;font-weight:700;font-size:16px;line-height:1.6}
.ms-top-pick-q{font-family:var(--ms-font-family-heading);font-size:23px;font-weight:700;line-height:1.5;word-break:auto-phrase;line-break:strict;text-wrap:balance;text-wrap:pretty} /* 言葉の切れ目の折れは、HTML の側でも塊（.ms-top-nw）にしている（auto-phrase が効かない Safari で「相／続登記」と割れたため。11/27 チェック表 18） */
.ms-top-fit{font-size:max(16px,.9em);font-feature-settings:"palt";letter-spacing:-.02em} /* 12字以上の塊は、字を少し詰めて1行に収める（11/27 髙橋さん「ここ、改行入れなくていいかも」。16px 以上は守る） */
.ms-top-pick-go{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:44px;font-weight:700;font-size:16px;color:var(--ms-color-deep)}
.ms-top-pick-go::after{content:"";width:8px;height:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg)}
.ms-top-hero-note{grid-area:note;padding:6px 0 20px;text-align:center}
.ms-top-hero-note a{display:inline-flex;align-items:center;min-height:44px;font-weight:700;text-decoration:underline;text-underline-offset:4px}

/* ===== 期限の横長のバナー ===== */
.ms-top-kg{background:#fff;padding:36px 0 8px}
.ms-top-kg-in{width:min(92%,var(--ms-width-content));margin-inline:auto;background:var(--ms-color-deep);color:#fff;border-left:6px solid var(--ms-color-accent);border-radius:6px;overflow:hidden;display:grid;grid-template-columns:240px minmax(0,1fr);align-items:stretch}
.ms-top-kg-pic{position:relative;min-height:170px}
.ms-top-kg-pic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ms-top-kg-body{padding:26px 32px}
.ms-top-kg-body h2{font-size:28px;line-height:1.5;color:#fff;margin:0 0 8px;padding:0;border:0}
.ms-top-kg-body p{line-height:1.8}
.ms-top-kg-body .ms-top-kg-fn{font-size:16px;line-height:1.6;margin-top:6px;color:rgba(255,255,255,.86)} /* 注（※2024年3月31日までに起きた相続の場合です。）：ほかの注と同じ 16px。深緑の地の上でも読める白寄りの色（11/27 髙橋さん） */
.ms-top-kg-body .ms-btn{margin-top:16px}

/* ===== 選ばれる理由 ===== */
.ms-top-reasons{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;counter-reset:r}
.ms-top-reasons li{counter-increment:r;background:#fff;border:1px solid var(--ms-color-border-warm);border-radius:4px;overflow:hidden;display:flex;flex-direction:column}
.ms-top-reasons img{width:100%;aspect-ratio:16/9;object-fit:cover}
.ms-top-rb{padding:18px 20px 22px}
.ms-top-reasons h3{font-size:20px;margin-bottom:8px;display:flex;gap:12px;align-items:flex-start}
.ms-top-reasons h3::before{content:counter(r);flex:none;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:var(--ms-color-deep);color:#fff;font-size:18px}
.ms-top-reasons p{line-height:1.8}

/* ===== サービスと料金 ===== */
.ms-top-svc{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.ms-top-svc li{background:#fff;border:1px solid var(--ms-color-border-warm);border-top:6px solid var(--ms-color-deep);border-radius:4px;overflow:hidden;display:flex;flex-direction:column}
.ms-top-svc img{width:100%;aspect-ratio:16/9;object-fit:cover}
.ms-top-sb{padding:18px 20px 8px;flex:1}
.ms-top-svc h3{font-size:22px}
.ms-top-price{display:block;font-family:var(--ms-font-family-heading);font-weight:700;color:var(--ms-color-deep);line-height:1.4;margin:4px 0 8px}
.ms-top-price b{font-size:28px}
.ms-top-price small{font-size:16px;margin-left:2px}
.ms-top-price .ms-top-price-tax{display:block;font-size:16px;font-weight:700;line-height:1.5;margin-top:2px} /* 相続登記：税抜を大きく、税込を小さく（11/27 チェック表 7。地域ページと同じ形） */
.ms-top-sb p{line-height:1.8}
.ms-top-go{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:48px;margin:0 20px 8px;font-weight:700;color:var(--ms-color-deep);text-decoration:none}
.ms-top-go::after{content:"";width:8px;height:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg)}
.ms-top-svc-note{margin-top:20px;max-width:820px}

/* ===== 相談員 ===== */
.ms-top-staff3{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.ms-top-staff3 img{width:100%;aspect-ratio:1/1;object-fit:cover;object-position:50% 0;border-radius:4px;background:var(--ms-color-bg-base)}
.ms-top-staff3 h3{font-size:20px;margin:12px 0 4px}
.ms-top-staff-lic,.ms-top-staff-name{display:inline-block}
.ms-top-staff-lic{font-size:16px;color:var(--ms-color-deep);margin-right:8px} /* 名前の前の資格（値がある人だけ。11/27 チェック表 17） */
.ms-top-staff3 p{line-height:1.8}
.ms-top-more{margin-top:28px}

/* ===== ご相談の流れ ===== */
.ms-top-flow{display:grid;grid-template-columns:repeat(5,1fr);counter-reset:s;margin-top:8px}
.ms-top-flow li{position:relative;padding:0 18px 0 0;counter-increment:s}
.ms-top-flow li::before{content:counter(s);display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--ms-color-deep);color:#fff;font-family:var(--ms-font-family-heading);font-size:24px;font-weight:700;margin-bottom:14px;position:relative;z-index:1}
.ms-top-flow li::after{content:"";position:absolute;top:23px;left:48px;right:0;height:2px;background:var(--ms-color-accent)}
.ms-top-flow li:last-child::after{display:none}
.ms-top-flow h3{margin:0 0 6px;font-size:19px}
.ms-top-flow p{line-height:1.7}

/* ===== よくあるご質問・辞典の入口 ===== */
.ms-top-faq{max-width:900px}
.ms-top-faq details{background:#fff;border:1px solid var(--ms-color-border-warm);border-radius:4px;margin-bottom:12px}
.ms-top-faq summary{list-style:none;cursor:pointer;display:flex;gap:12px;align-items:flex-start;min-height:56px;padding:14px 48px 14px 18px;position:relative;font-weight:700;font-size:18px;line-height:1.6;font-family:var(--ms-font-family-heading)}
.ms-top-faq summary::-webkit-details-marker{display:none}
.ms-top-faq summary::after{content:"";position:absolute;right:20px;top:24px;width:10px;height:10px;border-right:2px solid var(--ms-color-deep);border-bottom:2px solid var(--ms-color-deep);transform:rotate(45deg)}
.ms-top-faq details[open] summary::after{transform:rotate(-135deg);top:28px}
.ms-top-qa{flex:none;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:var(--ms-color-deep);color:#fff;font-size:16px;line-height:1}
.ms-top-a{display:flex;gap:12px;padding:4px 18px 18px;line-height:1.9}
.ms-top-a .ms-top-qa{background:var(--ms-color-accent);color:var(--ms-color-font-base)}
.ms-top-faq-links{display:flex;flex-wrap:wrap;gap:12px 28px;align-items:center;margin-top:24px}
.ms-top-sec--dict{padding-top:0} /* よくあるご質問と同じ帯の続き（11/27 チェック表 16） */
.ms-top-dict-text{max-width:820px}
.ms-top-sec--dict .ms-top-faq-links{margin-top:20px}
/* 言葉の札（11/27 髙橋さん）：小さめの白い枠。PC もスマホも横に流れて折り返す。押す所は高さ44px 以上 */
.ms-top .ms-top-dict-h{font-size:18px;margin:22px 0 10px} /* .ms-top h3{margin:0}（強さ 0,1,1）に負けないよう入れ物の名前を付ける */
.ms-top-dict-terms{display:flex;flex-wrap:wrap;gap:10px}
.ms-top-dict-terms a{display:inline-flex;align-items:center;min-height:44px;padding:6px 16px;background:#fff;border:1px solid var(--ms-color-border-warm);border-radius:6px;font-weight:700;text-decoration:none}
.ms-top-dict-terms a:hover{background:var(--ms-color-bg-base);border-color:var(--ms-color-accent-deep)}

/* ===== お住まいの市のご相談 ===== */
.ms-top-cities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;gap:20px} /* 段ごとでなく、全部の箱を同じ高さに（市の名前が2行になる箱があっても、2段目だけ高くならない。11/27 検査係 C8） */
.ms-top-cities a{display:flex;flex-direction:column;justify-content:space-between;gap:6px;height:100%;min-height:104px;padding:18px 22px 6px;background:#fff;border:1px solid var(--ms-color-border-warm);border-left:6px solid var(--ms-color-accent);border-radius:4px;text-decoration:none}
.ms-top-cities a:hover{border-left-color:var(--ms-color-accent-deep)}
.ms-top-cities b{font-family:var(--ms-font-family-heading);font-size:20px;line-height:1.5;word-break:auto-phrase;text-wrap:balance;line-break:strict}
.ms-top-cities i{font-style:normal;display:flex;justify-content:flex-end;align-items:center;gap:8px;min-height:44px;font-weight:700;color:var(--ms-color-deep)}
.ms-top-cities i::after{content:"";width:8px;height:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg)}

/* ===== 事務所のご案内 ===== */
.ms-top-office-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;align-items:start}
.ms-top-addr{font-size:18px;line-height:1.9;margin-bottom:6px}
.ms-top-addr b{font-family:var(--ms-font-family-heading)}
.ms-top-way{font-size:18px;margin-bottom:8px}
.ms-top-tels a{display:inline-flex;align-items:center;min-height:44px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.ms-top-office-photos{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.ms-top-office-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:4px}
.ms-top-office-photos figcaption{font-size:14px;margin-top:8px;line-height:1.6}

/* ===== 予約の文言 ===== */
.ms-top-reserve{background:var(--ms-color-deep);color:#fff;padding:56px 0;text-align:center}
.ms-top-reserve .ms-reservation{font-family:var(--ms-font-family-heading);font-size:26px;font-weight:700;line-height:1.7}
.ms-top-reserve .ms-reservation a{display:inline-block;min-height:48px;padding:4px 18px;margin:4px 0;border:2px solid #fff;border-radius:6px;color:#fff;text-decoration:none;line-height:1.7}
.ms-top-reserve .ms-reservation a:hover{background:rgba(255,255,255,.15)}
.ms-top-reserve-note{font-size:16px;font-weight:700;margin-top:16px}
.ms-top-reserve .ms-btn{margin-top:20px}

/* ===== 幅が狭い時 ===== */
@media (min-width:900px) and (max-width:1199.98px){
	.ms-top-hero-grid{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)}
}
@media (max-width:1100px){
	.ms-top-hero h1{font-size:38px}
	.ms-top-pick-q{font-size:20px}
	.ms-top-pick{padding:28px 16px 12px}
	.ms-top-flow{grid-template-columns:repeat(3,1fr);row-gap:32px}
	.ms-top-flow li:nth-child(3)::after{display:none}
	.ms-top-reasons,.ms-top-svc,.ms-top-staff3{grid-template-columns:1fr}
	.ms-top-reasons li,.ms-top-svc li{flex-direction:row}
	.ms-top-reasons img,.ms-top-svc img{width:38%;aspect-ratio:auto;height:auto;flex:none}
	.ms-top-svc li{flex-wrap:wrap}
	.ms-top-sb{flex:1 1 55%}
	.ms-top-go{flex:1 1 100%;margin:0 20px 8px}
	.ms-top-staff3 figure{display:grid;grid-template-columns:150px 1fr;gap:6px 20px;align-items:start}
	.ms-top-staff3 img{grid-row:1 / span 2;aspect-ratio:3/4}
	.ms-top-staff3 h3{margin-top:0;align-self:end}
	.ms-top-cities a{min-height:0}
}
@media (max-width:899px){
	.ms-top-cities{gap:14px}
	.ms-top-cities a{padding:14px 14px 4px}
	.ms-top-cities b{font-size:18px}
}
@media (max-width:699px){
	.ms-top-cities{grid-template-columns:1fr;grid-auto-rows:auto;gap:12px}
	.ms-top-cities a{padding:18px 22px 6px}
	.ms-top-cities b{font-size:20px}
}
@media (max-width:899px){
	.ms-top-hero{padding-top:24px}
	.ms-top-hero-grid{grid-template-columns:1fr;grid-template-areas:"text" "photo" "cards" "note" "sub";column-gap:0}
	.ms-top-photo{aspect-ratio:auto;height:200px;margin-top:20px}
	.ms-top-jisseki{display:none}
	.ms-top-facts .ms-top-jisseki-sp{display:block}
	.ms-top-picks{grid-template-columns:1fr;gap:26px}
	.ms-top-pick{min-height:0;padding:26px 18px 6px}
	.ms-top-hero-sub{padding:12px 0 40px}
	.ms-top-kg-in{grid-template-columns:1fr;border-left:0;border-top:6px solid var(--ms-color-accent)}
	.ms-top-kg-pic{min-height:0;height:120px}
	.ms-top-office-grid{grid-template-columns:1fr;gap:28px}
}
@media (max-width:767px){
	.ms-top-hero{padding-top:14px}
	.ms-top-hero h1{font-size:29px;padding-left:14px;border-left-width:5px;margin-bottom:10px}
	.ms-top-facts{gap:6px}
	.ms-top-facts li{padding-top:4px;padding-bottom:4px}
	.ms-top-facts li.ms-top-station{padding:4px 20px}
	.ms-top-facts .ms-top-free{display:block}
	.ms-top-st-main{font-size:22px}
	.ms-top-st-main b{font-size:34px;vertical-align:-2px}
	.ms-top-photo{height:84px;margin-top:12px}
	.ms-top-photo img{object-position:50% 24%}
	.ms-top-hero-cards{margin-top:14px}
	.ms-top-pick{padding-top:18px}
	.ms-top-pick-q{font-size:20px}
	.ms-top-hero-note{padding:6px 0 8px}
	.ms-top-kg{padding:28px 0 4px}
	.ms-top-kg-body{padding:20px 18px 22px}
	.ms-top-kg-body h2{font-size:22px}
	.ms-top-kg-body .ms-btn{width:100%}
	.ms-top-sec{padding:44px 0}
	.ms-top-sec--dict{padding-top:0} /* 上の「よくあるご質問」と同じ帯の続き。上の行の padding に負けないよう、ここにも（11/27 検査係 B9） */
	.ms-top-sec--flow{padding:44px 0 36px}
	.ms-top-sec h2{font-size:25px;padding-left:14px;border-left-width:5px}
	.ms-top-reasons li,.ms-top-svc li{display:block}
	.ms-top-reasons img,.ms-top-svc img{width:100%;aspect-ratio:16/9}
	.ms-top-price b{font-size:26px}
	.ms-top-staff3 figure{grid-template-columns:104px 1fr;gap:4px 14px}
	.ms-top-staff3 h3{font-size:18px}
	.ms-top-flow{grid-template-columns:1fr;row-gap:0}
	.ms-top-flow li{padding:0 0 28px 64px;min-height:76px}
	.ms-top-flow li::before{position:absolute;left:0;top:0;margin:0}
	.ms-top-flow li::after{top:48px;bottom:0;left:23px;right:auto;width:2px;height:auto}
	.ms-top-flow li:nth-child(3)::after{display:block}
	.ms-top-flow li:last-child{padding-bottom:0}
	.ms-top-faq summary{font-size:17px;padding:12px 40px 12px 14px}
	.ms-top-faq summary::after{right:16px}
	.ms-top-a{padding:2px 14px 16px}
	.ms-top-faq-links .ms-btn{width:100%}
	.ms-top-addr,.ms-top-way{font-size:16px}
	.ms-top-office-photos{grid-template-columns:1fr}
	.ms-top-reserve{padding:40px 0}
	.ms-top-reserve .ms-reservation{font-size:21px}
	.ms-top-reserve .ms-btn{width:100%}
}

/* 相談員の紹介：相談の場面の写真（横長）を切らずに出す（11/26 髙橋さん「写真はコッチ。」）。スマホは写真の下に名前と一言 */
/* 3枚とも同じ 4:3 の枠に（写真ごとに縦横の比が違い、左右に空きが出たため。端が少しだけ切れる）。auto だけにすると、WordPress の「読み込み前は 3000×1500」の決まりで高さ1500pxになった（11/26） */
.ms-top .ms-top-staff3 .ms-top-staff-scene img{aspect-ratio:4 / 3;height:auto;object-fit:cover;object-position:50% 35%}
@media (max-width:1100px){
  .ms-top .ms-top-staff3 .ms-top-staff-scene{grid-template-columns:minmax(0,40%) 1fr}
  .ms-top .ms-top-staff3 .ms-top-staff-scene img{aspect-ratio:4 / 3;align-self:start}
  .ms-top .ms-top-staff3 .ms-top-staff-scene :is(h3,p){grid-column:2}
}
@media (max-width:767px){
  .ms-top .ms-top-staff3 .ms-top-staff-scene{display:block}
  .ms-top .ms-top-staff3 .ms-top-staff-scene h3{margin:12px 0 4px}
}

/* ===== スマホの最初の画面（767px 以下）：案C「駅前を大きく」（11/26 髙橋さん「C案が好き見やすい」「C案でもう少し営業時間とかを大きく」）。
   深緑の地に駅と徒歩1分を大きく、写真は角丸、実績は丸い印で重ねる。受付時間は時刻を大きく。悩みの入口は白い札。
   今の並びの決まり（名前の付いた区切り）を外して、上から1列に並べ直す。タブレットと PC は今のまま。案の比べは会社フォルダ 39 の 2026-11-26_トップのスマホの最初の画面の案 ===== */
@media (max-width:767px){
  .ms-top-hero{padding:0 0 22px;background:var(--ms-color-deep,#004a3a);color:#fff}
  .ms-top-hero .ms-top-hero-grid{display:grid;grid-template-columns:1fr;grid-template-areas:none;grid-template-rows:none;gap:0;width:100%;max-width:none;padding:0;margin:0}
  .ms-top-hero .ms-top-hero-text{display:contents}
  .ms-top-hero .ms-top-hero-grid > *,.ms-top-hero .ms-top-hero-text > *,.ms-top-hero .ms-top-facts > li{grid-column:1}
  .ms-top-hero .ms-top-photo{height:auto}

  /* 1 駅と徒歩1分を、いちばん大きな字で */
  .ms-top-hero .ms-top-facts{display:contents}
  .ms-top-hero .ms-top-facts .ms-top-station{grid-row:1;margin:18px 18px 0;padding:0;background:none;border:0;display:flex;flex-direction:column;align-items:flex-start;color:#fff}
  .ms-top-hero .ms-top-facts .ms-top-station .ms-top-st-line{font-size:16px;color:rgba(255,255,255,.85);margin:0}
  .ms-top-hero .ms-top-facts .ms-top-station .ms-top-st-main{font-size:30px;line-height:1.1;margin:2px 0 0;color:#fff}
  .ms-top-hero .ms-top-facts .ms-top-station .ms-top-st-main b{font-size:56px;line-height:.9;vertical-align:-6px;color:var(--ms-color-accent,#f2c35b)}
  .ms-top-hero h1{grid-row:2;margin:10px 18px 0;padding:0;border:0;color:#fff;font-size:24px;line-height:1.4}
  .ms-top-hero h1::before,.ms-top-hero h1::after{display:none}

  /* 2 写真（角丸）と、実績の丸い印 */
  .ms-top-hero .ms-top-photo{grid-row:3;position:relative;margin:16px 18px 0}
  .ms-top-hero .ms-top-photo img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:cover;object-position:50% 35%;border-radius:14px}
  .ms-top-hero .ms-top-photo .ms-top-jisseki{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;left:auto;top:auto;right:-6px;bottom:-26px;width:124px;height:124px;margin:0;border-radius:50%;background:#fff;color:var(--ms-color-font-base,#4a3b32);border:3px solid var(--ms-color-accent,#f2c35b);box-shadow:0 4px 12px rgba(0,0,0,.2);line-height:1.2;text-align:center}
  .ms-top-hero .ms-top-photo .ms-top-jisseki .j1,.ms-top-hero .ms-top-photo .ms-top-jisseki .j0{font-size:16px;font-weight:700;letter-spacing:-.02em}
  .ms-top-hero .ms-top-photo .ms-top-jisseki .j2{font-size:22px;font-weight:700;color:var(--ms-color-deep,#004a3a);line-height:1.1}
  .ms-top-hero .ms-top-photo .ms-top-jisseki .j2 small{font-size:16px}
  .ms-top-hero .ms-top-facts .ms-top-jisseki-sp{display:none}

  /* 3 受付時間を大きく（11/26 髙橋さん「C案でもう少し営業時間とかを大きく」）。無料はその下に */
  .ms-top-hero .ms-top-facts .ms-top-hours{grid-row:4;margin:34px 18px 0;padding:8px 14px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.35);border-radius:10px;color:#fff;font-size:16px;font-weight:700;line-height:1.35}
  .ms-top-hero .ms-top-facts .ms-top-hours .ms-top-nw{display:inline-block}
  .ms-top-hero .ms-top-facts .ms-top-hours .ms-top-hours-main{font-size:28px;letter-spacing:.02em;margin-left:4px}
  .ms-top-hero .ms-top-facts .ms-top-hours .ms-top-nw:not(.ms-top-hours-main){font-size:18px}
  .ms-top-hero .ms-top-facts .ms-top-free{grid-row:5;margin:8px 18px 0;padding:0;background:none;border:0;color:var(--ms-color-accent,#f2c35b);font-weight:700;font-size:20px}
  .ms-top-hero .ms-top-hero-sub .ms-top-fn{margin:4px 0 0;font-size:16px;line-height:1.5;color:rgba(255,255,255,.8)} /* 注は「初回のご相談は無料です。」の下（11/27 チェック表 11） */

  /* 4 悩みの入口：白い札を3つ */
  .ms-top-hero .ms-top-hero-cards{grid-row:7;margin:14px 18px 0}
  .ms-top-hero .ms-top-picks{display:grid;gap:8px;margin:0;padding:0}
  .ms-top-hero .ms-top-picks li{margin:0}
  .ms-top-hero .ms-top-pick{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;column-gap:10px;row-gap:2px;align-items:center;min-height:60px;padding:10px 14px;border:0;border-radius:10px;background:#fff;color:var(--ms-color-font-base,#4a3b32);box-shadow:none}
  .ms-top-hero .ms-top-pick::before{display:none}
  .ms-top-hero .ms-top-pick-tag{grid-column:1;grid-row:1;position:static;transform:none;justify-self:start;margin:0;padding:1px 10px;font-size:16px;border-radius:999px}
  .ms-top-hero .ms-top-pick-q{grid-column:1;grid-row:2;margin:0;font-size:16px;line-height:1.4;font-weight:700}
  /* 「○○のご案内」の字は見せずに残す（読み上げ用。font-size:0 にすると16px未満の字と数えられるため。11/26 検査係） */
  .ms-top-hero .ms-top-pick-go{grid-column:2;grid-row:1/3;margin:0;width:22px;min-height:44px;overflow:hidden;white-space:nowrap;color:transparent;justify-content:flex-start;padding-left:6px;box-sizing:border-box}
  .ms-top-hero .ms-top-pick-go::after{flex:none;order:-1;border-color:var(--ms-color-deep,#004a3a)}
  .ms-top-hero .ms-top-hero-note{grid-row:8;margin:10px 18px 0}
  .ms-top-hero .ms-top-hero-note a{color:#fff}
  .ms-top-hero .ms-top-hero-sub{grid-row:9;margin:12px 18px 0;color:#fff}
  /* 背の低いスマホ（375×667・360×740 など。360×740 は余白が1pxしかなかったので 760px まで。11/26 検査係）：駅を1行に・写真を細く・丸い印を小さくして、悩みの入口の1つ目を下の帯より上に出す（11/25 の決め） */
  @media (max-height:760px){
    .ms-top-hero .ms-top-facts .ms-top-station{flex-direction:row;align-items:baseline;flex-wrap:wrap;column-gap:10px;margin-top:8px}
    .ms-top-hero .ms-top-facts .ms-top-station .ms-top-st-main{font-size:22px}
    .ms-top-hero .ms-top-facts .ms-top-station .ms-top-st-main b{font-size:40px;vertical-align:-4px}
    .ms-top-hero h1{margin-top:4px;font-size:22px}
    .ms-top-hero .ms-top-photo{margin-top:10px}
    .ms-top-hero .ms-top-photo img{aspect-ratio:5/2}
    /* 丸い印は写真の下へ出し、受付時間の横に置く（写真の人の顔にかからないように） */
    .ms-top-hero .ms-top-photo .ms-top-jisseki{width:118px;height:118px;right:0;bottom:-130px}
    .ms-top-hero .ms-top-facts .ms-top-hours{margin:12px 140px 0 18px;padding:12px 10px;min-height:118px;box-sizing:border-box;display:block}
    .ms-top-hero .ms-top-facts .ms-top-hours .ms-top-hours-main{font-size:24px}
    .ms-top-hero .ms-top-hero-cards{margin-top:8px}
    .ms-top-hero .ms-top-hero-sub .ms-top-fn{margin-top:2px}
  }
}
