/* ============================================================
   型17 単品サービスの実演型（お墓のクリーニング）／方向A「明るい実演型」
   2026-08-20 新規作成。型3・型15・型16 からの流用は無し。
   見た目の言語:
     型3  … 明朝／角3px／大判写真（施主向け・情景）
     型15 … 太ゴシック／角10px／左に縦帯の見出し／顔写真
     型16 … 直角／罫線のみ／表が主役（同業者向け）
     型17 … 中央揃えの見出し／角20px／ビフォーアフター2枚並びが主役／料金表を最前面
   既知バグの回避: KB-001 / KB-002 / KB-010 / KB-011 / KB-013 / KB-014
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-sky: #eef6fa;
  --bg-deep: #16456b;
  --ink: #1d2a33;
  --ink-soft: #566673;
  --line: #d9e5ec;
  --accent: #2f8fbf;
  --accent-dark: #16608a;
  --accent-tint: #e4f2f9;
  --sans: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --shadow: 0 4px 20px rgba(22, 69, 107, .09);
  --r: 20px;
  --wrap: 1060px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.95; color: var(--ink); background: var(--bg); overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3, h4 { line-height: 1.5; margin: 0; font-weight: 800; }
p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; }
li { margin-bottom: .45em; }

.inner { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }

.demo-bar { background: var(--bg-deep); color: #dceaf3; font-size: 0.8125rem; line-height: 1.7; padding: .55rem 0; }
.demo-bar .inner { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.demo-bar a { color: #a9dcf5; }

/* ヘッダー */
.header { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header-inner { width: min(100% - 1.6rem, 1240px); margin-inline: auto; display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.brand { display: block; text-decoration: none; color: inherit; padding: .5rem 0; min-width: 0; flex-shrink: 1; }
.brand .name { display: block; font-weight: 800; font-size: 1.05rem; }
.brand small { display: block; font-size: 0.75rem; color: var(--ink-soft); line-height: 1.5; }
.gnav ul { display: flex; gap: 1.3rem; list-style: none; margin: 0; padding: 0; }
.gnav a { display: block; text-decoration: none; color: var(--ink); font-size: 0.9375rem; font-weight: 700; padding: .5rem .1rem; border-radius: 999px; }
.gnav a:hover, .gnav a[aria-current="page"] { color: var(--accent-dark); }
.header-actions { display: flex; align-items: center; gap: .7rem; margin-left: auto; }
.tel-link { text-decoration: none; color: var(--ink); text-align: right; line-height: 1.25; }
.tel-link b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--accent-dark); }
.tel-link small { display: block; font-size: 0.75rem; color: var(--ink-soft); }
.btn-head { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-size: 0.875rem; font-weight: 800; padding: .7rem 1.2rem; border-radius: 999px; white-space: nowrap; }
.btn-head:hover { background: var(--accent-dark); }
.nav-toggle { display: none; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; position: relative; }
.nav-toggle::before, .nav-toggle::after, .nav-toggle span { content: ""; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle::before { top: 15px; } .nav-toggle span { top: 21px; } .nav-toggle::after { top: 27px; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

/* ヒーロー（KB-001: 絶対配置なし。文字は通常フロー） */
.hero { background: linear-gradient(180deg, var(--bg-sky) 0%, #ffffff 100%); text-align: center; }
.hero .inner { padding: 3.4rem 0 3rem; }
.hero .kicker { display: inline-block; font-size: 0.8125rem; font-weight: 800; letter-spacing: .1em; color: var(--accent-dark); background: #fff; border-radius: 999px; padding: .35rem 1.1rem; box-shadow: var(--shadow); margin: 0 0 1.2rem; }
.hero h1 { font-size: clamp(1.6rem, 5vw, 2.5rem); margin-bottom: 1rem; }
.hero p.sub { font-size: 1.0625rem; max-width: 40em; margin-inline: auto; margin-bottom: 1.8rem; color: var(--ink-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

.btn { display: inline-block; text-decoration: none; font-weight: 800; font-size: 1rem; padding: .95rem 1.9rem; border-radius: 999px; border: 2px solid transparent; line-height: 1.4; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-line { background: #fff; color: var(--accent-dark); border-color: var(--accent); }
.btn-line:hover { background: var(--accent-tint); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn-ghost:hover { background: rgba(255,255,255,.15); }

/* ビフォーアフター（この型の主役） */
.ba-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.8rem; }
.ba { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; }
.ba-pair figure { margin: 0; position: relative; }
.ba-pair .ph, .ba-pair img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }
.ba-pair .ph { display: flex; align-items: center; justify-content: center; text-align: center; background: var(--bg-sky); color: var(--ink-soft); font-size: 0.8125rem; padding: .8rem; }
.ba-pair figcaption { font-size: 0.75rem; font-weight: 800; letter-spacing: .1em; text-align: center; padding: .35rem; color: #fff; background: #93a5b1; }
.ba-pair figure:last-child figcaption { background: var(--accent); }
.ba-body { padding: 1.2rem 1.3rem 1.4rem; }
.ba-body h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.ba-body p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }
.tagline { display: inline-block; font-size: 0.75rem; font-weight: 800; color: var(--accent-dark); background: var(--accent-tint); border-radius: 999px; padding: .2rem .7rem; margin-bottom: .6rem; }

/* セクション */
.section { padding: 4.2rem 0; }
.section.sky { background: var(--bg-sky); }
.section.deep { background: var(--bg-deep); color: #dceaf3; }
.section.deep h2, .section.deep h3 { color: #fff; }
.section.deep p { color: #bcd4e4; }
.section-head { margin-bottom: 2.4rem; text-align: center; }
.section-head .eyebrow { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: .16em; color: var(--accent); margin-bottom: .5rem; }
.section.deep .section-head .eyebrow { color: #7fc7ea; }
.section-head h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
.section-head p { margin: 1rem auto 0; color: var(--ink-soft); max-width: 44em; }
.section.deep .section-head p { color: #bcd4e4; }

/* カード */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 1.7rem 1.6rem; }
.card h3 { font-size: 1.1rem; margin-bottom: .7rem; color: var(--accent-dark); }
.card p:last-child { margin-bottom: 0; }

/* 料金表（KB-013: 外側で横スクロール） */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); box-shadow: var(--shadow); background: #fff; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: 0.9375rem; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid var(--line); padding: .8rem 1.1rem; text-align: left; vertical-align: top; }
.table-wrap thead th, .table-wrap thead td { background: var(--accent-dark); color: #fff; font-weight: 800; border-bottom: 0; white-space: nowrap; }
.table-wrap tbody th { background: var(--bg-sky); font-weight: 700; white-space: nowrap; width: 12em; }
.table-wrap td.yen { font-weight: 800; color: var(--accent-dark); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }
.table-note { font-size: 0.8125rem; color: var(--ink-soft); margin: .7rem 0 0; }

/* 流れ */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 1rem; }
.steps li { counter-increment: st; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 1.3rem 1.5rem 1.3rem 4.4rem; position: relative; }
.steps li::before { content: counter(st); position: absolute; left: 1.3rem; top: 1.3rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 800; }
.steps h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.steps p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }

/* FAQ */
.faq { display: grid; gap: .8rem; }
.faq details { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 800; padding: 1.15rem 1.4rem; list-style: none; font-size: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q."; color: var(--accent); margin-right: .6rem; }
.faq .a { padding: 0 1.4rem 1.3rem; color: var(--ink-soft); font-size: 0.9375rem; }

.note { background: #fffbf0; border: 1px solid #ecdcb4; border-radius: var(--r); padding: 1.2rem 1.4rem; font-size: 0.9375rem; }
.note h3 { font-size: 1rem; margin-bottom: .5rem; color: #94711a; }
.note p:last-child { margin-bottom: 0; }

.cta { background: var(--bg-deep); color: #dceaf3; text-align: center; }
.cta .inner { padding: 3.8rem 0; }
.cta h2 { font-size: clamp(1.35rem, 4vw, 1.95rem); margin-bottom: .9rem; color: #fff; }
.cta p { max-width: 42em; margin-inline: auto; color: #bcd4e4; }
.cta .hero-cta { margin-top: 1.7rem; }
.cta .btn-primary { background: #fff; color: var(--accent-dark); border-color: #fff; }

/* フォーム */
.form { display: grid; gap: 1.2rem; max-width: 660px; margin-inline: auto; }
.field label { display: block; font-weight: 800; font-size: 0.9375rem; margin-bottom: .35rem; }
.field .req { font-size: 0.75rem; background: var(--accent); color: #fff; padding: .1rem .5rem; border-radius: 999px; margin-left: .5rem; vertical-align: 2px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; padding: .8rem .9rem; border: 1px solid #b7c7d2; border-radius: 12px; background: #fff; color: var(--ink); }
.field textarea { min-height: 8.5em; }
.form-note { font-size: 0.8125rem; color: var(--ink-soft); }

.footer { background: var(--bg-deep); color: #bcd4e4; padding: 3rem 0 1.6rem; font-size: 0.9375rem; }
.footer a { color: #bcd4e4; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.footer h3 { font-size: 1.05rem; margin-bottom: .6rem; color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer-bottom { border-top: 1px solid #2b5d85; margin-top: 2.4rem; padding-top: 1.2rem; font-size: 0.75rem; color: #8fb0c8; }

.sp-bar { display: none; }

@media (max-width: 1040px) {
  .gnav { position: fixed; inset: 60px 0 auto 0; height: calc(100dvh - 60px); background: #fff; padding: 1.2rem 1.2rem 6rem; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; box-shadow: var(--shadow); }
  .gnav.open { opacity: 1; visibility: visible; }
  .gnav ul { flex-direction: column; gap: 0; }
  .gnav a { padding: .95rem .2rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.0625rem; }
  /* KB-002 */
  .header-actions { margin-left: auto; }
  .nav-toggle { display: block; }
  .btn-head { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; line-height: 1.9; }
  .inner { width: calc(100% - 2rem); }
  .section { padding: 3rem 0; }
  .hero .inner { padding: 2.4rem 0 2.2rem; }
  .brand .name { font-size: 0.9375rem; }
  .brand small { display: none; }
  .tel-link b { font-size: 1.1rem; }
  .tel-link small { display: none; }
  .sp-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; box-shadow: 0 -1px 0 var(--line); }
  .sp-bar a { flex: 1; text-align: center; text-decoration: none; font-weight: 800; font-size: 0.9375rem; padding: .95rem .4rem; color: var(--accent-dark); }
  .sp-bar a + a { background: var(--accent); color: #fff; }
  body { padding-bottom: 3.6rem; }
  .footer { padding-bottom: 4.6rem; }
}
/* KB-014 */
@media (max-width: 380px) {
  .header-inner { gap: .5rem; }
  .tel-link { display: none; }
  .brand .name { font-size: 0.875rem; }
}
body.nav-open { overflow: hidden; }

/* grid / flex の子は既定が min-width:auto なので、中に置いた表（.table-wrap の
   min-width:480px）が親を押し広げ、ページ全体が横にはみ出す。
   表を横スクロールにする改修の巻き添えで起きるやつ（layout-check の「ページ横はみ出し」）。 */
.feature, .feature-text, .feature-media,
.split, .split-text, .split-media,
.cards, .card, .works, .work-card, .goods, .good,
.symptoms, .symptom, .cases, .case, .ba-set, .ba,
.reasons, .reason, .shops, .shop, .voices, .voice,
.menu-list, .tiles, .steps, .flow, .form, .field { min-width: 0; }
