/* 給湯器交換の匠 ガイド記事
   レイアウト：読みやすい本文カラム＋右サイドバー（スマホは1カラム＋画面下の固定ボタン）
   表示速度を優先し、Webフォントは使わず端末の日本語フォントを使用 */
:root {
  /* 色・文字は現在のLP（2026-10-20版）に合わせている */
  --navy: #123956;      /* LPの濃い青：見出し・上の帯 */
  --navy-deep: #102132; /* LPのフッター */
  --ink: #162536;       /* 本文 */
  --muted: #66727e;
  --line: #e2e8ed;
  --mist: #f3f7fa;      /* 面の背景 */
  --warm: #faf7f1;
  --paper: #ffffff;
  --flame: #d7262e;     /* LPの赤：電話ボタン */
  --flame-deep: #b91f26;
  --line-green: #06c755;
  --gold: #d49a00;      /* LPの見出しの差し色 */
  --warn-bg: #fff3f3;
  --point-bg: #f3f7fa;
  --radius: 14px;
  --font: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-num: Arial, "Yu Gothic", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  font-feature-settings: "palt" 1;
  letter-spacing: .015em;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: 16px; }

/* ---------- header ---------- */
.topbar { background: var(--navy); color: #fff; font-size: 12px; line-height: 1.3; padding-block: 8px; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; }
@media (max-width: 680px) { .topbar-inner { justify-content: center; text-align: center; } .topbar-hours { display: none; } }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 20px; padding-block: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); min-width: 0; }
.logo img { width: 64px; height: 64px; object-fit: contain; }
.logo span { display: flex; flex-direction: column; line-height: 1.25; }
.logo strong { font-size: 20px; letter-spacing: .04em; }
.logo small { font-size: 11px; color: var(--muted); }
.gnav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; font-weight: 600; }
.gnav a { text-decoration: none; color: var(--ink); }
.gnav a:hover { color: var(--flame); }
.header-tel { display: flex; flex-direction: column; text-decoration: none; text-align: right; line-height: 1.2; color: var(--navy); }
.header-call { flex: none; }
.header-tel small { font-size: 11px; color: var(--muted); }
.header-tel span { font-family: var(--font-num); font-size: 26px; font-weight: 800; letter-spacing: .02em; }
@media (max-width: 860px) {
  .gnav { display: none; }
  .header-inner .header-tel, .header-inner .header-call { display: none; }
  .logo img { width: 48px; height: 48px; }
  .logo strong { font-size: 17px; }
}

/* ---------- breadcrumbs ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding-block: 14px; font-size: 12px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: #a3aebb; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-bottom: 64px; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* ---------- article ---------- */
.article-head h1 { font-size: clamp(24px, 4.2vw, 34px); line-height: 1.4; color: var(--navy); margin: 12px 0 14px; text-wrap: balance; letter-spacing: .01em; }
.cat-chip { display: inline-block; font-size: 12px; font-weight: 700; color: var(--navy); background: var(--point-bg); padding: 4px 12px; border-radius: 999px; text-decoration: none; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.eyecatch { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--mist); }

.toc { margin: 28px 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; background: var(--mist); }
.toc-title { margin: 0 0 6px; font-weight: 800; color: var(--navy); font-size: 15px; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: 15px; }
.toc li { padding-block: 3px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.prose { max-width: 42em; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 {
  font-size: clamp(22px, 3.2vw, 28px); line-height: 1.45; color: var(--navy); letter-spacing: -.01em;
  margin: 2.4em 0 1em; padding: 0 0 12px; border-bottom: 3px solid var(--line); position: relative; text-wrap: balance; scroll-margin-top: 20px;
}
.prose h2::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 72px; height: 3px; background: var(--flame); }
.prose h3 { font-size: 19px; line-height: 1.5; color: var(--navy); margin: 1.8em 0 .6em; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.prose strong { background: linear-gradient(transparent 66%, #ffe98f 66%); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: .35em; }
.prose figure { margin: 1.6em 0; }
.prose figure img { border-radius: var(--radius); }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
/* 列が多い表（比較表など）はスマホで横スクロールにして、列がつぶれないようにする */
.prose table.wide { min-width: 760px; }
.prose table.wide td { min-width: 7em; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { background: var(--mist); color: var(--navy); font-size: 14px; }
.prose tbody th { color: var(--navy); min-width: 6.5em; }
.prose tbody tr:last-child > * { border-bottom: 0; }

.box { border-radius: var(--radius); padding: 18px 20px; }
.box > * + * { margin-top: .6em; }
.box p { margin: 0; }
.box ul, .box ol { margin: 0; }
.box-title { font-weight: 800; }
.box-point { background: var(--point-bg); }
.box-point .box-title { color: var(--navy); }
.box-warn { background: var(--warn-bg); border: 2px solid #efa9ac; }
.box-warn .box-title { color: var(--flame-deep); }
.box-summary { border: 2px solid var(--navy); }
.box-summary .box-title { color: var(--navy); }

/* 銘板（型番シール）風 */
.plate {
  border-radius: 8px; padding: 0; overflow: hidden;
  background: linear-gradient(135deg, #f7f8fa 0%, #e3e7ec 48%, #f4f6f8 100%);
  border: 1px solid #b9c2cc; box-shadow: inset 0 1px 0 #fff;
}
.plate-title { margin: 0; background: var(--navy); color: #fff; font-weight: 800; padding: 10px 18px; font-size: 15px; letter-spacing: .04em; }
.plate-body { padding: 14px 18px; }
.plate-body > * + * { margin-top: .6em; }
.plate-body ol, .plate-body ul { margin: 0; }
.plate-foot { margin: 0; padding: 8px 18px; border-top: 1px dashed #aab4bf; font-size: 12px; color: var(--muted); letter-spacing: .03em; }

/* FAQ */
.faq { margin-top: 48px; }
.faq h2 { font-size: 22px; color: var(--navy); margin: 0 0 16px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; background: var(--paper); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 44px 14px 18px; position: relative; list-style: none; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; font-family: var(--font-num); color: var(--flame); font-weight: 800; margin-right: 10px; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 16px 18px; }

/* ---------- CTA ---------- */
.cta {
  margin: 48px 0 0; padding: 28px 24px; border-radius: 18px; text-align: center;
  background: var(--navy); color: #fff;
}
.prose .cta { margin-top: 2em; }
.cta-eyebrow { margin: 0; font-size: 13px; font-weight: 700; color: #ffd955; letter-spacing: .06em; }
.cta-title { margin: 6px 0 0; font-size: clamp(19px, 3.4vw, 24px); font-weight: 800; line-height: 1.45; text-wrap: balance; }
.cta-lead { margin: 10px auto 0; max-width: 34em; font-size: 15px; color: #d7e1ef; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.cta-form { margin: 14px 0 0; font-size: 14px; }
.cta-form a { color: #fff; }

.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 260px; min-height: 62px; padding: 12px 28px; border-radius: 999px; text-decoration: none; color: #fff;
  line-height: 1.25; font-weight: 800; letter-spacing: .04em; transition: transform .2s ease, filter .2s ease;
  box-shadow: 0 10px 24px rgba(18, 45, 75, .15);
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-sub { font-size: 11px; font-weight: 600; opacity: .92; }
.btn-main { font-size: 18px; font-family: var(--font-num); letter-spacing: .02em; }
.btn-small { min-width: 0; min-height: 46px; padding: 8px 20px; font-size: 14px; }
.line-mark { display: inline-block; width: 30px; height: 30px; border-radius: 50%; margin-right: 8px; object-fit: contain; }
.btn-line .btn-main { display: inline-flex; align-items: center; font-family: var(--font); font-size: 17px; }
.btn-tel { background: var(--flame); }
.btn-line { background: var(--line-green); }
.btn-block { width: 100%; min-width: 0; }
@media (max-width: 520px) { .btn { min-width: 0; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* 著者 */
.author { display: flex; gap: 16px; align-items: flex-start; margin-top: 40px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.author img { width: 84px; height: 84px; object-fit: contain; flex: none; }
.author p { margin: 0; }
.author-name { color: var(--navy); font-weight: 800; margin-bottom: 4px !important; }

.related { margin-top: 48px; }
.related h2 { font-size: 20px; color: var(--navy); margin: 0 0 16px; }

/* ---------- list ---------- */
.list-head { position: relative; padding: 24px 170px 24px 24px; background: var(--warm); border-radius: var(--radius); overflow: hidden; }
.list-character { position: absolute; right: 12px; bottom: 0; width: 150px; height: 150px; object-fit: contain; }
@media (max-width: 680px) { .list-head { padding: 20px 96px 20px 18px; } .list-character { width: 92px; height: 92px; right: 4px; } }
.list-eyebrow { margin: 0; font-size: 12px; font-weight: 800; color: var(--gold); letter-spacing: .12em; }
.list-head h1 { margin: 6px 0 10px; font-size: clamp(26px, 4.6vw, 36px); color: var(--navy); line-height: 1.35; text-wrap: balance; }
.list-head p { margin: 0; color: var(--muted); max-width: 40em; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; }
.cat-nav a { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--navy); border: 1px solid var(--line); padding: 6px 16px; border-radius: 999px; background: var(--paper); }
.cat-nav a:hover { border-color: var(--navy); }
.cat-nav a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { padding: 28px; background: var(--mist); border-radius: var(--radius); color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: 0 10px 28px rgba(18, 48, 90, .12); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
.card-img { display: block; aspect-ratio: 16 / 9; background: var(--mist); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; min-width: 0; }
.card-cat { font-size: 12px; font-weight: 700; color: var(--flame-deep); }
.card-title { font-size: 17px; font-weight: 800; line-height: 1.5; color: var(--navy); }
.card-desc { font-size: 14px; line-height: 1.7; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card time { margin-top: auto; font-size: 12px; color: var(--muted); }

/* ---------- sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 20px; }
@media (max-width: 960px) { .sidebar { position: static; } }
.side-cta { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 16px; background: var(--warm); border: 1px solid var(--line); }
.side-cta-title { margin: 0; font-weight: 800; color: var(--navy); font-size: 17px; }
.side-cta-text { margin: 0 0 4px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.side-cta .btn-main { font-size: 17px; }
.side-box { border-top: 3px solid var(--navy); padding-top: 12px; }
.side-title { margin: 0 0 8px; font-weight: 800; color: var(--navy); }
.side-cats, .side-posts { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.side-cats a { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.side-cats span { font-family: var(--font-num); color: var(--muted); font-variant-numeric: tabular-nums; }
.side-cats a:hover, .side-posts a:hover { color: var(--flame-deep); }
.side-posts a { display: block; padding: 9px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); line-height: 1.6; }
.side-official p { margin: 0 0 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.side-official a { font-size: 13px; font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #c8d5e2; font-size: 13px; padding-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 32px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 20px; } }
.site-footer p { margin: 0 0 4px; }
.footer-brand { color: #fff; font-size: 17px; font-weight: 800; margin-bottom: 8px !important; }
.footer-head { color: #fff; font-weight: 700; margin-bottom: 8px !important; }
.footer-lic { margin: 0; padding-left: 1.2em; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.copy { text-align: center; padding: 28px 16px 20px; margin: 32px 0 0 !important; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

/* ---------- 画面下の固定ボタン ---------- */
.fixed-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(68px, .8fr) minmax(70px, .85fr); gap: 4px;
  padding: 5px 5px calc(5px + env(safe-area-inset-bottom, 0px));
  background: var(--navy-deep);
  box-shadow: 0 -5px 20px rgba(4, 29, 54, .25);
}
.fixed-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: #fff; border-radius: 14px; min-height: 76px; line-height: 1.2; text-align: center; padding: 6px 4px; }
.fixed-bar small { font-size: 9px; font-weight: 700; }
.fb-promo { background: rgba(255,255,255,.16); border-radius: 999px; padding: 3px 12px; font-weight: 800 !important; }
.fixed-bar svg { width: 25px; height: 25px; }
.fixed-bar img { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; }
.fixed-bar strong { font-size: 13px; white-space: nowrap; }
.fb-tel { background: var(--flame); }
.fb-tel strong { display: flex; align-items: center; gap: 5px; font-family: var(--font-num); font-size: 18px; letter-spacing: -.02em; }
.fb-tel svg { width: 21px; height: 21px; flex: none; }
.fixed-bar .fb-form { background: #fff; color: var(--navy); }
.fb-line { background: var(--line-green); }
/* LPと同じく、固定ボタンはスマホ・タブレットのみ */
@media (min-width: 961px) {
  .fixed-bar { display: none; }
  body { padding-bottom: 0; }
}
