/* ===== Subsidy page ===== */

/* ====================================================
   サブページ共通：画面幅で行組みを自動調整
   - balance: タイトル系（全行の長さを均等に）
   - pretty:  本文系（最終行の孤児を防ぐ）
   ==================================================== */
.sub-hero__title,
.sub-hero__eyebrow,
.sub-section__title,
.sub-section__sub,
.subsidy-card__title,
.subsidy-card__cat,
.key-point h3,
.service-card__title,
.scope-card__title,
.area-card__name,
.record-item__label,
.contact-info__label,
.contact-info__value,
.home-cta__title {
  text-wrap: balance;
}

.sub-hero__desc,
.sub-section__lead,
.sub-section__caution,
.subsidy-card__body p,
.subsidy-card__note,
.key-point p,
.service-card__desc,
.scope-card__list li,
.scope-card__note,
.about-message p,
.area-card__detail,
.legal-body p,
.legal-body li,
.legal-body__lead,
.disclaimer li,
.home-cta__desc,
.contact-info__note,
.services__note {
  text-wrap: pretty;
}

.sub-breadcrumb {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 13px;
}
.sub-breadcrumb nav a {
  color: var(--text-light);
  text-decoration: none;
}
.sub-breadcrumb nav a:hover { color: var(--accent); }
.sub-breadcrumb .sep { margin: 0 8px; color: var(--text-light); }
.sub-breadcrumb [aria-current="page"] { color: var(--text); }

/* hero */
.sub-hero {
  background: linear-gradient(135deg, #2a2420 0%, #3d342c 100%);
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
}
.sub-hero__eyebrow {
  font-size: 11px;
  letter-spacing: .3em;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 16px;
}
.sub-hero__title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}
.sub-hero__title span {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.7em;
  color: var(--accent-light);
  font-weight: 500;
  letter-spacing: .04em;
}
.sub-hero__desc {
  font-size: 15px;
  line-height: 1.9;
  opacity: .9;
  max-width: 720px;
  margin: 0 auto 20px;
}
.sub-hero__meta {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-top: 20px;
}

/* section */
.sub-section { padding: 64px 0; }
.sub-section--gray { background: var(--bg-light); }
.sub-section--note { background: var(--bg-warm); padding: 48px 0; }

.sub-section__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 16px;
  line-height: 1.5;
}
.sub-section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.sub-section__sub {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  margin-top: 10px;
}
.sub-section__lead {
  max-width: 760px;
  margin: 32px auto 40px;
  text-align: center;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.sub-section__caution {
  max-width: 880px;
  margin: 32px auto 0;
  padding: 18px 24px;
  background: #fff;
  border-left: 3px solid var(--accent);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  border-radius: 2px;
  /* 長文は両端揃え（最終行は左詰め） */
  text-align: justify;
  text-justify: inter-character;
}
/* 注釈内の強調は太字にせず統一 */
.sub-section__caution strong { font-weight: inherit; color: inherit; }
.sub-section--gray .sub-section__caution { background: #fff; }

/* key points */
.key-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.key-point {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.key-point__num {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  opacity: .5;
  display: block;
  margin-bottom: 12px;
  line-height: 1;
}
.key-point h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
}
.key-point p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  /* 各行の幅を揃える（最終行のみ左詰め）。文字間で自然に調整 */
  text-align: justify;
  text-justify: inter-character;
}
/* 強調は色のみ・太字にはしない（統一） */
.key-point p strong { font-weight: inherit; color: inherit; }

/* subsidy cards */
.subsidy-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
.subsidy-card--minor { background: #faf8f5; }

.subsidy-card__head {
  background: var(--primary);
  color: #fff;
  padding: 20px 28px;
}
.subsidy-card--minor .subsidy-card__head { background: var(--text-light); }
.subsidy-card__cat {
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--accent-light);
  margin-bottom: 4px;
}
.subsidy-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.subsidy-card__body {
  padding: 24px 28px 28px;
}
.subsidy-card__body p { font-size: 14.5px; line-height: 1.9; margin-bottom: 16px; text-align: justify; text-justify: inter-character; }

.subsidy-card__list {
  margin: 16px 0;
  padding: 16px 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
  font-size: 14px;
}
.subsidy-card__list dt {
  font-weight: 700;
  color: var(--primary);
  margin-top: 10px;
}
.subsidy-card__list dt:first-child { margin-top: 0; }
.subsidy-card__list dd {
  margin-left: 0;
  margin-top: 2px;
  line-height: 1.7;
  color: var(--text);
}
.subsidy-card__list strong { color: var(--accent-dark); font-weight: 700; }

.subsidy-card__note {
  font-size: 13px;
  color: var(--text-light);
  background: #fffaf3;
  padding: 12px 14px;
  border-radius: 2px;
  border-left: 2px solid var(--accent);
  line-height: 1.7;
  margin-top: 16px !important;
}

.subsidy-card__link {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 2px;
  transition: background .2s;
}
.subsidy-card__link:hover { background: var(--accent-dark); }

/* table */
.subsidy-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
}
.subsidy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
.subsidy-table th,
.subsidy-table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  line-height: 1.6;
}
.subsidy-table th {
  background: var(--bg-light);
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.subsidy-table td:last-child {
  white-space: nowrap;
}

/* external links（上のカードと総幅880pxを揃える） */
.external-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}
.external-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: .2s;
}
.external-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139,111,90,.15);
}
.external-link__name {
  font-size: 15px;
  font-weight: 700;
}
.external-link__url {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: .03em;
}

/* disclaimer */
.disclaimer {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.disclaimer h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
  text-align: center;
}
.disclaimer ul {
  list-style: disc;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text);
}
.disclaimer li { margin-bottom: 8px; text-align: justify; text-justify: inter-character; }
.disclaimer li strong { font-weight: inherit; color: inherit; }

/* responsive */
@media (max-width: 768px) {
  /* スマホでは両端揃えだと字間が間延びするため左詰めにする */
  .key-point p,
  .sub-section__caution,
  .subsidy-card__body p,
  .service-card__desc,
  .about-message p,
  .disclaimer li { text-align: left; text-justify: auto; }
  .key-points { grid-template-columns: minmax(0, 1fr); }
  .external-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-section { padding: 48px 0; }
  .sub-hero { padding: 48px 0 40px; }
  .subsidy-card__head { padding: 16px 20px; }
  .subsidy-card__body { padding: 20px 20px 24px; }
  .subsidy-card__title { font-size: 18px; }
  .subsidy-table th,
  .subsidy-table td { padding: 10px 12px; font-size: 13px; }
  /* スマホでは金額列も折り返し、表が横スクロールしないようにする */
  .subsidy-table td:last-child { white-space: normal; }
  .disclaimer { padding: 20px 22px; }
}

/* ====================================================
   services.html — 対応工事カード
   ==================================================== */
.service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
}
.service-card__icon {
  font-size: 36px;
  margin-bottom: 12px;
  line-height: 1;
}
.service-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.service-card__desc {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 16px;
  text-align: justify;
  text-justify: inter-character;
}
.service-card__meta {
  margin-top: auto;
  padding: 16px 18px;
  background: var(--bg-light);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.8;
}
.service-card__meta dt {
  font-weight: 700;
  color: var(--primary);
  margin-top: 6px;
}
.service-card__meta dt:first-child { margin-top: 0; }
.service-card__meta dd {
  margin-left: 0;
  color: var(--text);
  /* 各工事名は <span class="nw"> で囲んで途中改行を防ぐ。区切りの「／」位置でのみ折り返す。
     （keep-all は iOS Safari が全角「／」で折り返さず枠からはみ出すため使わない） */
  word-break: normal;
}
.services__notes {
  max-width: 760px;
  margin: 24px auto 0;
}
.services__note {
  margin-top: 12px;
  /* ※始まりの注釈：左詰め＋2行目以降を※の分だけ字下げ */
  text-align: left;
  padding-left: 1.3em;
  text-indent: -1.3em;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ====================================================
   about.html — 運営者情報
   ==================================================== */
.record-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}
.record-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}
.record-item__num {
  display: block;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  /* 「60〜80件/年」が「件/」「年」とバラけて折り返さないよう1行に固定 */
  white-space: nowrap;
}
.record-item__num small {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--text);
  margin-left: 4px;
}
.record-item__label {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  text-wrap: balance;
}

.about-message {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
}
.about-message p {
  font-size: 15px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 18px;
  text-align: justify;
  text-justify: inter-character;
}
.about-message p:last-child { margin-bottom: 0; }

.scope-grid {
  display: grid;
  grid-template-columns: 2fr minmax(0, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.scope-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.scope-card--ok { border-top: 3px solid var(--accent); }
.scope-card--ng { border-top: 3px solid var(--text-light); background: #faf8f5; }
.scope-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}
.scope-card__list {
  list-style: none;
  padding: 0;
}
.scope-card__list li {
  position: relative;
  padding-left: 22px;
  padding-bottom: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.scope-card--ok .scope-card__list li::before {
  content: '○';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}
.scope-card--ng .scope-card__list li::before {
  content: '×';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-light);
  font-weight: 700;
}
.scope-card__note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.7;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}
.area-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.area-card__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.area-card__detail {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.7;
}

.info-table-wrap {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.info-table th,
.info-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  line-height: 1.7;
}
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: none; }
.info-table th {
  background: var(--bg-light);
  font-weight: 700;
  color: var(--primary);
  width: 30%;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .service-cards { grid-template-columns: minmax(0, 1fr); }
  .service-card { padding: 22px 22px 20px; }

  .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-message { padding: 24px 22px; }
  .about-message p { font-size: 14.5px; line-height: 1.95; }

  .scope-grid { grid-template-columns: minmax(0, 1fr); }
  .scope-card { padding: 22px 22px; }

  .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .info-table th { width: 35%; padding: 12px 14px; font-size: 13px; }
  .info-table td { padding: 12px 14px; font-size: 13px; }
}

/* ====================================================
   contact.html — お問い合わせ
   ==================================================== */
.contact-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-info__item {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-info__label {
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--text-light);
}
.contact-info__value {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
}
.contact-info__note {
  font-size: 12px;
  color: var(--text-light);
}

.contact-form-wrap {
  max-width: 680px;
  margin: 0 auto;
}
.contact-form-wrap .contact__form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

/* ====================================================
   ホーム最下部のCTAブロック（フォーム削除版）
   ==================================================== */
.home-cta {
  background: var(--primary);
  background-image: url('images/03/after/2A69513A-6EEA-4323-BF3D-17EF35C8DA85_0.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 80px 0;
}
.home-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30,20,14,.82);
}
.home-cta > .container {
  position: relative;
  z-index: 1;
  text-align: center;
}
.home-cta__title {
  color: #fff;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 16px;
  position: relative;
}
.home-cta__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.home-cta__desc {
  color: rgba(255,255,255,.85);
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .contact-info { grid-template-columns: minmax(0, 1fr); }
  .contact-form-wrap .contact__form { padding: 24px 22px; }
  .home-cta { padding: 56px 0; }
}

/* ====================================================
   privacy.html / 法務文書共通
   ==================================================== */
.legal-body {
  max-width: 760px;
  margin: 0 auto;
}
.legal-body__lead {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.95;
  margin-bottom: 40px;
}
.legal-body h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.95;
  margin-bottom: 12px;
}
.legal-body ul {
  padding-left: 1.5em;
  margin: 8px 0 16px;
}
.legal-body li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.95;
  margin-bottom: 4px;
}
.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}
.legal-body .meta {
  margin-top: 48px;
  font-size: 13px;
  color: var(--text-light);
}

/* スマホでの本文は両端揃え（justify）をやめ左詰めで自然に折り返す。
   このブロックはファイル末尾に置き、上方の base な justify 指定（.about-message p / .service-card__desc 等）に
   ソース順で確実に勝たせる（同詳細度・後勝ち）。 */
@media (max-width: 768px) {
  .key-point p,
  .sub-section__caution,
  .subsidy-card__body p,
  .service-card__desc,
  .about-message p,
  .sub-section__lead,
  .disclaimer li {
    text-align: left;
    text-justify: auto;
  }
}


