/* ===== 色・文字の設定(ここを変えると全体が変わる) ===== */
:root {
  --main: #1f3a5f;      /* メイン:紺 */
  --sub: #f3f5f8;       /* サブ:薄いグレー */
  --accent: #e8751a;    /* アクセント:オレンジ(ボタン専用) */
  --text: #222;
  --white: #fff;
  --font: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

/* ===== 基本 ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  padding-bottom: 72px; /* 下の固定ボタンに隠れない余白 */
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ===== 提案用デモの帯 ===== */
.demo-bar {
  background: #333;
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 6px 12px;
  line-height: 1.5;
}

/* ===== ヘッダー ===== */
.header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: 1px solid #e3e6ea;
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo { text-decoration: none; font-weight: 700; font-size: 20px; color: var(--main); line-height: 1.2; }
.logo small { display: block; font-size: 11px; font-weight: 400; color: #666; }
.header-tel {
  text-decoration: none;
  background: var(--main);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ===== ボタン ===== */
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  line-height: 52px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  margin-top: 12px;
}
.btn-main { background: var(--accent); color: var(--white); }
.btn-sub { background: var(--white); color: var(--main); border: 2px solid var(--white); }

/* ===== ファーストビュー ===== */
.hero {
  background: var(--main);
  color: var(--white);
  padding: 36px 16px 32px;
  position: relative;
  overflow: hidden;
}
/* 背景写真:上に紺色をかけて、文字を読みやすくする */
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.hero-inner { max-width: 560px; margin: 0 auto; position: relative; }
.hero-label { font-size: 12px; opacity: .85; margin-bottom: 10px; }
.hero h1 { font-size: 28px; line-height: 1.5; margin-bottom: 14px; }
.hero-sub { font-size: 15px; margin-bottom: 18px; opacity: .95; }
.hero-note { font-size: 12px; text-align: center; margin-top: 8px; opacity: .8; }

/* ===== 実績の数字 ===== */
.numbers { background: var(--white); padding: 20px 16px; border-bottom: 1px solid #e3e6ea; }
.numbers ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; margin: 0 auto; }
.numbers li { text-align: center; background: var(--sub); border-radius: 10px; padding: 12px 6px; }
.numbers b { display: block; font-size: 22px; color: var(--main); line-height: 1.3; }
.numbers b small { font-size: 12px; margin-left: 2px; }
.numbers span { font-size: 12px; color: #555; }

/* ===== セクション共通 ===== */
.section { padding: 44px 16px; }
.section > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.section-gray { background: var(--sub); }
.section h2 {
  font-size: 22px;
  color: var(--main);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}
.section h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 10px auto 0;
}
.lead { text-align: center; margin-bottom: 16px; }
.small { font-size: 13px; color: #555; margin-top: 8px; }

/* ===== 選ばれる理由 ===== */
.reasons li { background: var(--white); border: 1px solid #e3e6ea; border-radius: 12px; padding: 18px 16px 16px 60px; margin-bottom: 14px; position: relative; }
.reasons .num {
  position: absolute; left: 16px; top: 18px;
  width: 32px; height: 32px; line-height: 32px;
  text-align: center; border-radius: 50%;
  background: var(--main); color: var(--white); font-weight: 700;
}
.reasons h3 { font-size: 17px; color: var(--main); line-height: 1.5; margin-bottom: 4px; }
.reasons p { font-size: 15px; }

/* ===== 施工事例(仮の写真枠) ===== */
.work { margin-bottom: 24px; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ph {
  background: repeating-linear-gradient(45deg, #d9dee5, #d9dee5 10px, #e6eaef 10px, #e6eaef 20px);
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: #555; font-weight: 700; font-size: 13px; text-align: center; padding: 8px;
}
.ph-after { background: repeating-linear-gradient(45deg, #cfdcea, #cfdcea 10px, #dde8f3 10px, #dde8f3 20px); }
.ph-wide { aspect-ratio: 16 / 7; margin-bottom: 16px; }
.work img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; border-radius: 10px; }
.work-title { font-weight: 700; margin-top: 8px; }
.work-meta { font-size: 13px; color: #555; }

/* ===== 料金 ===== */
.price-card { background: var(--white); border: 2px solid var(--main); border-radius: 12px; text-align: center; padding: 20px 12px; }
.price-name { font-weight: 700; color: var(--main); }
.price-num { font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1.3; }
.price-num small { font-size: 16px; margin-left: 4px; }
.price-note { font-size: 12px; color: #555; }
.price-points { margin-top: 16px; }
.price-points li { padding: 6px 0 6px 28px; position: relative; }
.price-points li::before { content: "✔"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* ===== 工事の流れ ===== */
.flow li { background: var(--white); border-radius: 10px; padding: 12px 14px 12px 52px; margin-bottom: 10px; position: relative; counter-increment: step; }
.flow { counter-reset: step; }
.flow li::before {
  content: counter(step);
  position: absolute; left: 14px; top: 12px;
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  background: var(--main); color: var(--white); border-radius: 50%; font-weight: 700; font-size: 14px;
}
.flow b { display: block; color: var(--main); }
.flow span { font-size: 14px; color: #555; }

/* ===== 資格 ===== */
.qual li { padding: 4px 0 4px 22px; position: relative; font-size: 15px; }
.qual li::before { content: "●"; position: absolute; left: 0; color: var(--main); font-size: 10px; top: 9px; }

/* ===== 問い合わせフォーム ===== */
.contact { background: var(--white); }
.form { margin-top: 24px; }
.form label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.form input, .form textarea {
  display: block; width: 100%; margin-top: 6px;
  font-size: 16px; /* 16px未満だとiPhoneで勝手に拡大される */
  padding: 12px; border: 1px solid #b9c0ca; border-radius: 8px; font-family: var(--font);
}
.demo-msg { background: #fff4e5; border: 1px solid var(--accent); padding: 10px; border-radius: 8px; margin-top: 12px; font-size: 14px; }

/* ===== フッター ===== */
.footer { background: var(--main); color: var(--white); text-align: center; padding: 28px 16px; font-size: 13px; line-height: 1.9; }
.f-name { font-size: 17px; font-weight: 700; }
.copy { opacity: .7; margin-top: 8px; }

/* ===== 画面下に固定するボタン(スマホ) ===== */
.fixed-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid #d5dae0;
}
.fixed-cta a { text-align: center; text-decoration: none; font-weight: 700; border-radius: 10px; min-height: 48px; line-height: 48px; }
.fc-tel { background: var(--main); color: var(--white); }
.fc-form { background: var(--accent); color: var(--white); }

/* ===== パソコンで見たとき(スマホ優先なので最小限) ===== */
@media (min-width: 768px) {
  .hero h1 { font-size: 36px; }
  .numbers ul { grid-template-columns: repeat(4, 1fr); max-width: 760px; }
  .section > * { max-width: 680px; }
  .hero-inner { max-width: 680px; }
  .fixed-cta { display: none; }
  body { padding-bottom: 0; }
}

/* ===== ページ内メニュー ===== */
.menu {
  width: calc(100% + 32px);
  margin: 8px -16px -10px;
  padding: 0 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid #e3e6ea;
  background: var(--sub);
}
.menu a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--main);
  font-weight: 700;
  font-size: 15px;
  padding: 0 12px;
  min-height: 44px;
  line-height: 44px;
  white-space: nowrap;
}
/* ジャンプしたとき、固定ヘッダーに見出しが隠れないようにする */
section[id] { scroll-margin-top: 112px; }

@media (min-width: 768px) {
  .menu { width: auto; margin: 0; padding: 0; border: 0; background: none; order: 3; flex: 1 1 100%; justify-content: center; }
  section[id] { scroll-margin-top: 120px; }
}

/* ===== 2ページ目以降の共通 ===== */
.menu a.on { background: var(--main); color: var(--white); border-radius: 6px; }
.page-title { background: var(--sub); padding: 24px 16px 20px; border-bottom: 1px solid #e3e6ea; }
.page-title > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.page-title h1 { font-size: 26px; color: var(--main); line-height: 1.4; margin: 6px auto 4px; }
.crumb { font-size: 12px; color: #666; }
.crumb a { color: #666; }
.more { display: block; text-align: center; font-weight: 700; color: var(--main); text-decoration: none; padding: 12px 0; min-height: 48px; }
.btn-tel { background: var(--white); color: var(--main); border: 2px solid var(--main); line-height: 48px; }
.cta-block { text-align: center; }

/* 会社情報の表 */
.info-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.info-table th, .info-table td { display: block; text-align: left; padding: 0; }
.info-table th { background: var(--sub); color: var(--main); padding: 8px 12px; font-size: 14px; margin-top: 10px; border-radius: 6px 6px 0 0; }
.info-table td { padding: 8px 12px 12px; border: 1px solid #e3e6ea; border-top: 0; border-radius: 0 0 6px 6px; }
.sign { text-align: right; margin-top: 12px; font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts li { text-align: center; background: var(--white); border-radius: 10px; padding: 12px 6px; }
.facts b { display: block; font-size: 20px; color: var(--main); }
.facts span { font-size: 12px; color: #555; }

/* 料金 */
.price-list .price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--white); border: 2px solid var(--main); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.price-cond { font-size: 12px; color: #555; line-height: 1.5; }
.price-yen { font-size: 26px; font-weight: 700; color: var(--accent); text-align: right; line-height: 1.3; white-space: nowrap; }
.price-yen small { display: block; font-size: 12px; color: #555; font-weight: 400; }
.plain li { padding: 10px 0; border-bottom: 1px solid #dde1e7; }
.plain b { display: block; color: var(--main); }
.plain span { font-size: 14px; color: #555; }
.section p + p { margin-top: 10px; }

/* 施工事例 */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; position: sticky; top: 100px; background: var(--white); z-index: 5; border-bottom: 1px solid #e3e6ea; }
.tabs a { flex: 0 0 auto; text-decoration: none; padding: 0 14px; min-height: 40px; line-height: 40px; border: 1px solid var(--main); border-radius: 20px; color: var(--main); font-weight: 700; font-size: 14px; white-space: nowrap; }
.work .ph { aspect-ratio: 3 / 2; }

/* 工事の流れ(9工程) */
.steps li { padding-right: 14px; }

/* 事業所 */
.office { background: var(--white); border: 1px solid #e3e6ea; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.office h3 { color: var(--main); font-size: 17px; margin-bottom: 4px; }
.tel-link { font-weight: 700; color: var(--main); }
.ph-office { aspect-ratio: 16 / 7; margin-top: 10px; }

@media (min-width: 768px) {
  .page-title > * { max-width: 680px; }
  .tabs { justify-content: center; top: 140px; }
}

/* ===== 予約フォーム(追加分) ===== */
.btn-sub-line { background: var(--white); color: var(--main); border: 2px solid var(--main); line-height: 48px; }
.form select { display: block; width: 100%; margin-top: 6px; font-size: 16px; padding: 12px; border: 1px solid #b9c0ca; border-radius: 8px; background: var(--white); font-family: var(--font); }
.form fieldset { border: 1px solid #b9c0ca; border-radius: 8px; padding: 10px 12px 4px; margin: 0 0 14px; }
.form legend { font-weight: 700; font-size: 15px; padding: 0 6px; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; min-height: 44px; margin-bottom: 0; }
.form .check input { display: inline-block; width: 22px; height: 22px; margin: 0; flex: 0 0 auto; }

/* ===== 料金ページ(本家にならった構成) ===== */
.center { text-align: center; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.badges li { background: var(--main); color: var(--white); border-radius: 10px; padding: 10px 8px; text-align: center; font-weight: 700; font-size: 13px; line-height: 1.5; }
.badges small { font-weight: 400; opacity: .9; font-size: 12px; }
.unit-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.unit { background: var(--white); border: 2px solid var(--main); border-radius: 12px; overflow: hidden; text-align: center; }
.unit-label { display: block; background: var(--main); color: var(--white); font-weight: 700; font-size: 14px; padding: 4px 0; }
.unit-num { display: block; font-size: 34px; font-weight: 700; color: var(--accent); line-height: 1.5; }
.unit-num small { font-size: 14px; color: var(--main); margin-left: 2px; }
.est { width: 100%; border-collapse: collapse; background: var(--white); font-size: 13px; line-height: 1.5; }
.est th, .est td { border: 1px solid #d5dae0; padding: 8px 6px; }
.est thead th { background: var(--main); color: var(--white); font-weight: 700; }
.est tbody th { text-align: left; font-weight: 400; }
.est td { text-align: right; white-space: nowrap; }
.est tfoot th { text-align: right; background: var(--sub); }
.est tfoot td { background: var(--sub); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.cmp { width: 100%; min-width: 360px; border-collapse: collapse; background: var(--white); font-size: 13px; text-align: center; }
.cmp th, .cmp td { border: 1px solid #d5dae0; padding: 8px 4px; }
.cmp thead th { background: var(--sub); color: var(--main); line-height: 1.4; }
.cmp tbody th { background: var(--sub); text-align: left; padding-left: 8px; font-weight: 700; }
.cmp .us { background: #fff4e5; font-weight: 700; }
.cmp thead .us { background: var(--accent); color: var(--white); }
