/* =========================================================
   シバとクロの家づくりノート 共通スタイル
   配色: 緑(8割) / 白(2割) を基調
   ========================================================= */

:root {
  /* 緑系（メイン） */
  --green-900: #14401a;
  --green-800: #1b5e20;
  --green-700: #2e7d32;
  --green-600: #388e3c;
  --green-500: #43a047;
  --green-400: #66bb6a;
  --green-300: #a5d6a7;
  --green-100: #e3f1e4;
  --green-50:  #f0f7f0;
  /* 白・グレー（アクセント） */
  --white: #ffffff;
  --cream: #f7faf5;
  --ink: #1f2d22;
  --muted: #5d6f60;
  /* アクセント（キャラ由来） */
  --accent-red: #d8453c;
  --accent-yellow: #ffd54f;
  --shiba: #cf7f33;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(20, 64, 26, 0.08);
  --shadow: 0 10px 30px rgba(20, 64, 26, 0.12);
  --shadow-lg: 0 20px 50px rgba(20, 64, 26, 0.18);
  --maxw: 1120px;
  --header-h: 70px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Zen Maru Gothic", "M PLUS Rounded 1c",
    "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green-700); }
h1, h2, h3, h4 { line-height: 1.4; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--green-100);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green-800);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.12rem;
}
.brand .mascots { display: flex; align-items: flex-end; }
.brand .mascots img { width: 38px; height: auto; }
.brand .mascots img:nth-child(2) { margin-left: -10px; }

.nav-toggle {
  display: none;
  background: var(--green-100);
  border: 0;
  color: var(--green-800);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 10px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  color: var(--green-800);
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--green-100); }
.site-nav a[aria-current="page"] { background: var(--green-700); color: #fff; }
.site-nav .nav-cta a {
  background: var(--accent-yellow);
  color: var(--green-900);
}
.site-nav .nav-cta a:hover { filter: brightness(0.96); }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 120% at 85% 10%, #4caf50 0%, transparent 55%),
    linear-gradient(155deg, var(--green-700), var(--green-900));
  color: #fff;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.hero::before { width: 260px; height: 260px; top: -80px; left: -60px; }
.hero::after { width: 180px; height: 180px; bottom: 40px; right: 8%; }
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  align-items: center;
  padding-block: 44px 64px;
}
.hero .eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.hero h1 .accent { color: var(--accent-yellow); }
.hero p { font-size: 1.06rem; margin: 0 0 28px; opacity: 0.95; max-width: 36ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .house {
  width: clamp(220px, 32vw, 320px);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.25));
}
.hero-art .mascot {
  position: absolute;
  bottom: -6px;
  width: clamp(74px, 11vw, 104px);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
}
.hero-art .mascot.shiba { left: -6%; }
.hero-art .mascot.cat { right: -2%; bottom: 2px; }

/* 波形の区切り */
.wave {
  display: block;
  width: 100%;
  margin-top: -1px;
  line-height: 0;
}
.hero .wave { position: absolute; bottom: -1px; left: 0; z-index: 1; }

/* ---------- 信頼バー（統計） ---------- */
.stats {
  background: var(--white);
  border-bottom: 1px solid var(--green-100);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-block: 26px;
  text-align: center;
}
.stats .num {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--green-700);
}
.stats .label { color: var(--muted); font-size: 0.9rem; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-yellow);
  color: var(--green-900);
  text-decoration: none;
  font-weight: 800;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-green { background: var(--green-600); color: #fff; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: none;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- セクション ---------- */
.section { padding-block: 48px; }
.section-alt { background: var(--green-50); }
.section-green { background: var(--green-800); color: #fff; }

.section-head { text-align: center; margin-bottom: 28px; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--green-600);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  margin: 0 0 10px;
  color: var(--green-900);
}
.section-green .section-head h2 { color: #fff; }
.section-head p { color: var(--muted); margin: 0; }
.section-green .section-head p { color: rgba(255,255,255,0.85); }

/* ---------- カードグリッド ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
/* カード全体をクリック可能にする（リンクをカード全面に広げる） */
.card:has(.card-link) { cursor: pointer; }
.card .card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card .card-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card .tag {
  align-self: flex-start;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}
.card .tag.soon { background: #fff3d6; color: #a07400; }
.card .tag.idea { background: #e9eef3; color: #5c6f7e; }
.card h3 { margin: 0; font-size: 1.18rem; color: var(--green-900); }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .card-link {
  margin-top: auto;
  font-weight: 800;
  text-decoration: none;
  color: var(--green-600);
}
.card .card-link:hover { color: var(--green-800); }

.card-thumb {
  background:
    radial-gradient(circle at 30% 30%, var(--green-100), var(--green-50));
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb img { width: auto; height: 108px; }

/* 番号付きステップ風ブログカード */
.card.blog-card { border-top: 4px solid var(--green-400); }
.card.blog-card .tag { background: var(--green-700); color: #fff; }

/* ---------- 注目ツール（大きな訴求） ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--green-100);
}
.feature-body { padding: 44px; display: flex; flex-direction: column; gap: 16px; }
.feature-body .eyebrow {
  color: var(--green-600); font-weight: 800; letter-spacing: 0.12em; font-size: 0.8rem;
}
.feature-body h3 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--green-900); }
.feature-body ul { margin: 4px 0 8px; padding-left: 1.2em; color: var(--muted); }
.feature-body li { margin-bottom: 4px; }
.feature-visual {
  background: linear-gradient(155deg, var(--green-600), var(--green-900));
  display: flex; align-items: center; justify-content: center; padding: 30px;
  position: relative;
}
.feature-visual img { width: clamp(140px, 18vw, 190px); }

/* ---------- キャラ紹介 ---------- */
.cast { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 760px; margin-inline: auto; }
.cast-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--green-100);
  padding: 26px;
  text-align: center;
}
.cast-card img { width: 120px; height: auto; margin: 0 auto 8px; }
.cast-card h3 { margin: 0 0 6px; color: var(--green-800); }
.cast-card .role { display: inline-block; font-size: 0.78rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; margin-bottom: 8px; }
.cast-card.shiba .role { background: #fbe7cf; color: #9c5a13; }
.cast-card.cat .role { background: #fcdada; color: #b0322b; }
.cast-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- CTA バンド ---------- */
.cta-band { text-align: center; }
.cta-band .container { padding-block: 60px; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 12px; }
.cta-band p { margin: 0 0 26px; opacity: 0.9; }

/* ---------- 広告枠プレースホルダー ---------- */
.ad-slot {
  margin: 40px auto 0;
  max-width: 728px;
  min-height: 100px;
  border: 2px dashed var(--green-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- パンくず ---------- */
.breadcrumb { background: var(--green-50); border-bottom: 1px solid var(--green-100); }
.breadcrumb .container { padding-block: 12px; font-size: 0.85rem; color: var(--muted); }
.breadcrumb a { color: var(--green-700); text-decoration: none; }
.breadcrumb span { margin: 0 6px; }

/* ---------- フォーム（ツール） ---------- */
.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--green-900); font-size: 0.95rem; }
.field .unit { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--green-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--white);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.18);
}
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--green-100);
  padding: 28px;
}

/* スライダー＋手入力のセット */
.slider-row { display: flex; align-items: center; gap: 16px; }
.slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 16px;            /* 当たり判定の高さ（見た目の棒は細い） */
  background: transparent;
  cursor: pointer;
}
/* 一本の細い棒（トラック） */
.slider-row input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: var(--green-300);
}
.slider-row input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: var(--green-300);
}
.slider-row input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: var(--green-600);
}
/* 丸い点（ツマミ） */
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6.5px;       /* (3 - 16) / 2 で棒の中央に合わせる */
  border-radius: 50%;
  background: var(--green-600);
  border: none;
  box-shadow: 0 1px 3px rgba(20, 64, 26, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-600);
  border: none;
  box-shadow: 0 1px 3px rgba(20, 64, 26, 0.3);
}
.slider-row input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}
.slider-row input[type="range"]:active::-webkit-slider-thumb,
.slider-row input[type="range"]:focus-visible::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(67, 160, 71, 0.18);
}
.slider-row input[type="range"]:focus { outline: none; }
.slider-row .num-input {
  width: 120px;
  flex: none;
  text-align: right;
}
.panel-result {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: linear-gradient(160deg, var(--green-50), var(--white));
}
/* 内訳ドーナツグラフ */
.chart-block {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--green-100);
  flex-wrap: wrap;
  justify-content: center;
}
.donut { width: 150px; height: 150px; flex: none; }
.donut circle { transition: stroke-dasharray 0.5s ease, stroke-dashoffset 0.5s ease; }
.donut-cap { font-size: 11px; fill: var(--muted); }
.donut-val { font-size: 17px; font-weight: 800; fill: var(--green-800); }
.chart-legend { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.chart-legend li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--muted); }
.chart-legend b { color: var(--ink); margin-left: auto; padding-left: 10px; }
.chart-legend .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

.result-row { padding: 12px 0; border-bottom: 1px dashed var(--green-100); }
.result-row:last-of-type { border-bottom: 0; }
.result-row .result-label { color: var(--muted); font-size: 0.9rem; margin: 0; }
.result-figure { font-size: 2.2rem; font-weight: 800; color: var(--green-700); margin: 2px 0 0; }
.result-figure.sub { font-size: 1.4rem; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.85);
  padding-block: 48px 28px;
  margin-top: 0;
}
.site-footer a { color: var(--green-300); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #fff; font-size: 1.05rem; margin-bottom: 10px; }
.footer-brand img { width: 36px; height: auto; }
.footer-grid h4 { margin: 0 0 12px; font-size: 1rem; color: #fff; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
  opacity: 0.85;
  text-align: center;
}
.footer-bottom p { margin: 4px 0; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 880px) {
  .feature { grid-template-columns: 1fr; }
  .feature-visual { order: -1; padding: 24px; }
  .feature-body { padding: 30px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--green-100);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: 380px; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 10px 14px 18px; }
  .site-nav a { padding: 13px 16px; }
  .site-nav .nav-cta a { text-align: center; }

  .hero .container { grid-template-columns: 1fr; text-align: center; padding-block: 32px 60px; }
  .hero p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { margin-top: 24px; }

  .stats .container { grid-template-columns: 1fr; gap: 18px; }
  .stats .container > div { display: flex; align-items: baseline; justify-content: center; gap: 10px; }

  .tool-layout { grid-template-columns: 1fr; }
  .panel-result { position: static; }
  .cast { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }

  .section { padding-block: 32px; }
}

/* =========================================================
   情報密度を上げたホーム用ハブ ＆ 各種ユーティリティ
   ========================================================= */
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-100);
}
.block-head h2 { margin: 0; font-size: 1.3rem; color: var(--green-900); }
.block-head .more { font-weight: 800; font-size: .85rem; text-decoration: none; color: var(--green-600); white-space: nowrap; }
.block-head .more:hover { color: var(--green-800); }

.home-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 30px; }
.card-grid.two { grid-template-columns: 1fr 1fr; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
/* ホームの便利ツールカードはコンパクトに（サムネ・余白を圧縮） */
.card-grid.three .card-thumb { aspect-ratio: auto; height: 84px; }
.card-grid.three .card-thumb img { height: 58px; }
.card-grid.three .card-body { padding: 15px 18px; gap: 7px; }
.card-grid.three .card h3 { font-size: 1.04rem; }
.card-grid.three .card p { font-size: 0.86rem; }
/* 体験ブログ＋おすすめを左右均等に並べる */
.home-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; margin-top: 44px; }

/* ---------- 家づくりスケジュール（固定の時間軸＋点・スパン／ラベルは出来事の位置に） ---------- */
.gantt-wrap { overflow-x: auto; margin-top: 22px; padding-bottom: 4px; }
.gantt { --now: 21.875%; min-width: 720px; }
.g-track { position: relative; padding-top: 22px; }
.g-now { position: absolute; top: 0; left: var(--now); transform: translateX(-50%); background: #f97316; color: #fff; font-size: .68rem; font-weight: 800; padding: 1px 9px; border-radius: 999px; white-space: nowrap; z-index: 5; }
.g-years { display: flex; }
.g-years span { font-weight: 800; font-size: .78rem; color: var(--green-800); padding: 0 0 4px 6px; border-left: 2px solid var(--green-300); }
.g-months { display: flex; }
.g-months span { flex: 1; text-align: center; font-size: .68rem; font-weight: 700; color: var(--muted); padding: 3px 0; }
.gantt-row { position: relative; }
.gantt-row + .gantt-row { border-top: 1px dashed var(--green-100); }
.gr-track { position: relative; height: 50px; }
/* 現在ライン（各トラックに縦線。積み重なって1本に見える） */
.g-track::after, .gr-track::after { content: ""; position: absolute; left: var(--now); width: 2px; background: rgba(249,115,22,.55); z-index: 1; }
.g-track::after { top: 18px; bottom: 0; }
.gr-track::after { top: 0; bottom: 0; }
/* 出来事名（点・スパンの位置に表示） */
.gr-name { position: absolute; top: 5px; font-size: .78rem; font-weight: 700; color: var(--ink); white-space: nowrap; z-index: 4; }
.gr-name.nm-point { padding-left: 14px; }
.gr-name.nm-span { padding-left: 6px; }
.gantt-row.is-current .gr-name { color: #c2570f; font-weight: 800; }
/* スパン（期間バー）と点（単発の出来事） */
.bar { position: absolute; z-index: 2; }
.bar.span { top: 30px; height: 15px; border-radius: 999px; }
.bar.point { top: 37px; width: 15px; height: 15px; border-radius: 50%; transform: translate(-50%, -50%); }
.bar.is-done { background: var(--green-600); }
.bar.point.is-done::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 900; }
.bar.span.is-current { background: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.16); }
.bar.point.is-current { background: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.16); }
.bar.span.is-todo { background: #c3e6c7; }
.bar.point.is-todo { background: #fff; border: 2px solid var(--green-300); }

/* コンパクトなリンクリスト（サイドのブログ・おすすめ） */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { border-bottom: 1px dashed var(--green-100); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a {
  position: relative;
  display: block;
  padding: 11px 26px 11px 4px;
  text-decoration: none;
  color: var(--ink);
  transition: color .15s ease, padding .15s ease;
}
.mini-list a::after {
  content: "›";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green-400);
  font-weight: 800;
}
.mini-list a:hover { color: var(--green-700); padding-left: 8px; }
.mini-list .mini-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  color: var(--green-700);
  background: var(--green-100);
  padding: 2px 9px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
}
.mini-list .mini-title { font-weight: 700; font-size: .95rem; }

/* コンパクトなツールカード（横並びアイコン＋本文） */
.tool-row {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tool-row:hover { transform: translateY(-3px); box-shadow: var(--shadow); cursor: pointer; }
.tool-row .icon {
  flex: none;
  width: 70px; height: 70px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, var(--green-100), var(--green-50));
  display: flex; align-items: center; justify-content: center;
}
.tool-row .icon img { width: 52px; height: 52px; }
.tool-row h3 { margin: 0 0 4px; font-size: 1.08rem; color: var(--green-900); }
.tool-row p { margin: 0; font-size: .88rem; color: var(--muted); }
.tool-row .tag { display: inline-block; font-size: .7rem; font-weight: 800; color: var(--green-700); background: var(--green-100); padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.tool-row a.stretch::after { content: ""; position: absolute; inset: 0; }

/* CTA バンドのコンパクト版 */
.cta-band.compact .container { padding-block: 38px; }

/* =========================================================
   シミュレーター：結果を追従させる2カラム
   ========================================================= */
.solar-top { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: start; }
.solar-summary { position: sticky; top: calc(var(--header-h) + 14px); }
.solar-summary .sum-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.solar-summary .sum-box { padding: 14px; }
.solar-summary .sum-box .big { font-size: 1.35rem; }
.solar-summary .sum-box .lbl { font-size: .76rem; }
.solar-top .input-grid { grid-template-columns: 1fr; }
.summary-subhead { margin: 4px 0 6px; color: var(--green-900); font-size: 1rem; }
.solar-summary .note-banner { margin: 0 0 14px; padding: 12px 14px; font-size: .85rem; }
.solar-summary .breakdown { margin: 0; }
.solar-summary .breakdown td { padding: 9px 4px; font-size: .9rem; }

@media (max-width: 880px) {
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-grid.three { grid-template-columns: 1fr 1fr; }
  .home-duo { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }
  .solar-top { grid-template-columns: 1fr; }
  .solar-summary { position: static; }
  .solar-summary .sum-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .card-grid.two { grid-template-columns: 1fr; }
  .card-grid.three { grid-template-columns: 1fr; }
}

/* =========================================================
   シミュレーター：上部固定フィルター ＋ 下スクロール結果
   ========================================================= */
.sim-controls {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: var(--white);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 18px;
  margin-bottom: 24px;
}
.controls-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.controls-head .ttl { font-weight: 800; color: var(--green-900); font-size: .95rem; }
.controls-head .mini-results {
  display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted);
}
.controls-head .mini-results b { color: var(--green-700); font-size: 1.05rem; margin-left: 5px; }
.controls-head .mini-results .neg b { color: var(--accent-red); }
.controls-toggle {
  background: var(--green-100); border: 0; color: var(--green-800);
  font-weight: 800; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: .82rem;
}
.controls-toggle:hover { background: var(--green-300); }
.controls-body { margin-top: 14px; }
.controls-body.collapsed { display: none; }
/* 2列にして1本あたりのスライダーを長く */
.controls-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 40px; }
.controls-grid .sub-head { grid-column: 1 / -1; margin: 10px 0 2px; font-size: .8rem; }
.controls-grid .field { margin-bottom: 10px; }
.controls-grid .field label { font-size: .88rem; margin-bottom: 4px; }
.controls-grid .slider-row { gap: 18px; }
.controls-grid .num-input { width: 88px; }
/* スライダーのつまみを少し大きく＝つかみやすく */
.controls-grid input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7.5px; }
.controls-grid input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; }

/* 入力ゾーン（色付きで明確に区別） */
.sim-controls { background: var(--green-50); }

/* 出力（結果）ゾーンの見出しバンド */
.sim-results { scroll-margin-top: calc(var(--header-h) + 16px); }
.results-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 18px;
  background: var(--green-700);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1.15rem;
  font-weight: 800;
}
.results-subhead { color: var(--green-900); margin: 4px 0 8px; }

@media (max-width: 768px) {
  .sim-controls { position: static; }
  .controls-head .mini-results { margin-left: 0; width: 100%; }
  .controls-grid { grid-template-columns: 1fr; }
}

/* フィルター固定型では結果パネルは追従させない（フィルターが固定のため）。幅は全幅で見やすく */
.sim-results .panel-result { position: static; top: auto; }

/* 結果を2カラム（ドーナツ＋数値）で大きく見せる */
.result-2col {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: center;
}
.result-2col .chart-block { padding-bottom: 0; border-bottom: 0; margin-bottom: 0; flex-direction: column; text-align: center; gap: 12px; }
.result-2col .donut { width: 240px; height: 240px; }
.result-2col .chart-legend { width: 100%; font-size: 1rem; }
.result-figures .result-row { padding: 14px 0; }
.result-figures .result-figure { font-size: 2.4rem; }
.result-figures .result-figure.sub { font-size: 1.6rem; }
@media (max-width: 768px) {
  .result-2col { grid-template-columns: 1fr; gap: 8px; }
  .result-2col .donut { width: 200px; height: 200px; }
}

/* =========================================================
   シミュレーター 王道UI：左=入力 / 右=結果（結果は追従）
   ========================================================= */
.sim-2col {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}
.sim-inputs { background: var(--green-50); }
.sim-inputs h3 { margin-top: 0; color: var(--green-900); }
.sim-inputs .field { margin-bottom: 16px; }
.sim-inputs .field:last-child { margin-bottom: 0; }
.sim-inputs .sub-head { font-weight: 800; color: var(--green-700); font-size: .82rem; letter-spacing: .04em; margin: 18px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--green-100); }
.sim-inputs .sub-head:first-of-type { margin-top: 4px; }
.sim-inputs .num-input { width: 92px; }

.sim-output { position: sticky; top: calc(var(--header-h) + 16px); }
.sim-output .results-banner { margin-top: 0; }
.sim-output .sum-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }

@media (max-width: 900px) {
  .sim-2col { grid-template-columns: 1fr; }
  .sim-output { position: static; }
}

/* =========================================================
   体験談 記事 共通レイアウト ＆ パーツ
   ========================================================= */
.article { max-width: 760px; margin-inline: auto; }
.pr-label { display: inline-block; background: var(--green-100); color: var(--muted); font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 6px; letter-spacing: .05em; }
.article h1.article-title { font-size: clamp(1.55rem, 4vw, 2.15rem); color: var(--green-900); line-height: 1.5; margin: 12px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--muted); font-size: .85rem; margin: 0 0 20px; }
.article-meta .chip { background: var(--green-50); border: 1px solid var(--green-100); padding: 3px 11px; border-radius: 999px; }
.eyecatch { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 22px; background: var(--green-100); display: flex; align-items: center; justify-content: center; min-height: 200px; }
.eyecatch img { max-height: 220px; }
.lead { font-size: 1.05rem; background: var(--green-50); border-left: 5px solid var(--green-400); padding: 14px 18px; border-radius: 0 10px 10px 0; margin-bottom: 26px; }

.article h2 { font-size: 1.5rem; color: var(--green-900); border-bottom: 3px solid var(--green-300); padding-bottom: 8px; margin: 44px 0 18px; scroll-margin-top: calc(var(--header-h) + 12px); }
.article h3 { font-size: 1.2rem; color: var(--green-800); margin: 30px 0 12px; padding-left: 12px; border-left: 5px solid var(--green-500); }
.article p { line-height: 1.95; margin: 0 0 18px; }
.article ul, .article ol { line-height: 1.9; margin: 0 0 18px; }

/* 結論・まとめ・ポイント・注意 ボックス */
.box { border-radius: var(--radius); padding: 20px 22px; margin: 26px 0; }
.box .box-title { font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 1.08rem; }
.box p:last-child { margin-bottom: 0; }
/* 結論ボックス：上部に「結論」タブを付けて一目で分かるように */
.box-conclusion {
  position: relative;
  background: linear-gradient(160deg, var(--green-50), #fff);
  border: 2px solid var(--green-600);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  margin-top: 38px;
  padding: 30px 24px 22px;
}
.box-conclusion::before {
  content: "結論";
  position: absolute;
  top: -16px;
  left: 22px;
  background: var(--green-700);
  color: #fff;
  font-weight: 900;
  font-size: .92rem;
  letter-spacing: .12em;
  padding: 6px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.box-conclusion .box-title {
  color: var(--green-900);
  font-size: 1.32rem;
  line-height: 1.5;
  align-items: flex-start;
}
.box-conclusion .box-title::before { content: "＞"; color: var(--green-600); font-weight: 900; }

/* まとめボックス：同じく上部に「まとめ」タブ */
.box-summary {
  position: relative;
  background: linear-gradient(160deg, var(--green-50), #fff);
  color: var(--ink);
  border: 2px solid var(--green-300);
  box-shadow: var(--shadow-sm);
  margin-top: 38px;
  padding: 28px 24px 22px;
}
.box-summary::before {
  content: "まとめ";
  position: absolute;
  top: -16px;
  left: 22px;
  background: var(--green-600);
  color: #fff;
  font-weight: 900;
  font-size: .92rem;
  letter-spacing: .1em;
  padding: 6px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.box-summary .box-title { color: var(--green-900); }
.box-summary a { color: var(--green-700); font-weight: 700; }
.box-point { background: #eef7ee; border-left: 5px solid var(--green-500); }
.box-note { background: #fff6e0; border-left: 5px solid #f3c14b; }

/* 図・写真（キャプション付き） */
figure.figure { margin: 24px 0; }
figure.figure .ph { background: var(--green-100); border: 1px dashed var(--green-300); border-radius: 10px; min-height: 180px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
figure.figure img { width: 100%; display: block; border-radius: 10px; }
figure.figure figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* 比較表 */
.compare-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .95rem; }
.compare-table th, .compare-table td { border: 1px solid var(--green-100); padding: 11px 12px; text-align: left; }
.compare-table thead th { background: var(--green-700); color: #fff; }
.compare-table tbody th { background: var(--green-50); }
.compare-table tr:nth-child(even) td { background: var(--green-50); }

/* 商品カード（アフィリエイト） */
.product { display: grid; grid-template-columns: 130px 1fr; gap: 18px; border: 1px solid var(--green-100); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; margin: 24px 0; align-items: center; }
.product .product-img { background: var(--green-50); border-radius: 10px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.product .product-img img { width: 78%; }
.product .product-tag { display: inline-block; font-size: .72rem; font-weight: 800; color: var(--green-700); background: var(--green-100); padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.product h4 { margin: 0 0 6px; color: var(--green-900); font-size: 1.1rem; }
.product .product-desc { margin: 0 0 12px; font-size: .9rem; color: var(--muted); }

/* キャラ吹き出し */
.bubble { display: flex; gap: 14px; margin: 22px 0; align-items: flex-start; }
.bubble .avatar { flex: none; width: 64px; height: auto; }
.bubble .balloon { position: relative; background: #fff; border: 2px solid var(--green-300); border-radius: 14px; padding: 12px 16px; font-size: .95rem; }
.bubble .balloon .name { font-weight: 800; font-size: .78rem; color: var(--green-700); margin-bottom: 3px; }
.bubble .balloon p { margin: 0; }
.bubble .balloon::before { content: ""; position: absolute; left: -10px; top: 20px; border: 8px solid transparent; border-right-color: var(--green-300); }
.bubble .balloon::after { content: ""; position: absolute; left: -7px; top: 20px; border: 8px solid transparent; border-right-color: #fff; }
.bubble.cat { flex-direction: row-reverse; }
.bubble.cat .balloon::before { left: auto; right: -10px; border-right-color: transparent; border-left-color: var(--green-300); }
.bubble.cat .balloon::after { left: auto; right: -7px; border-right-color: transparent; border-left-color: #fff; }

/* 目次 */
.toc { background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius); padding: 18px 22px; margin: 26px 0; }
.toc .toc-title { font-weight: 800; color: var(--green-900); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 6px 0; }
.toc a { color: var(--green-700); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* FAQ */
.faq details { border: 1px solid var(--green-100); border-radius: 10px; margin: 10px 0; padding: 0 16px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; color: var(--green-900); list-style-position: inside; }
.faq details[open] summary { border-bottom: 1px dashed var(--green-100); }
.faq .faq-a { padding: 12px 0; }
.faq .faq-a p { margin: 0; }

/* 関連記事・筆者プロフィール */
.related-list { list-style: none; padding: 0; margin: 14px 0 0; }
.related-list a { display: block; padding: 13px 4px; border-bottom: 1px dashed var(--green-100); text-decoration: none; color: var(--ink); font-weight: 700; }
.related-list a:hover { color: var(--green-700); }
.author-box { display: flex; gap: 16px; align-items: center; background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius); padding: 18px; margin: 30px 0; }
.author-box img { width: 64px; height: auto; }
.author-box h4 { margin: 0 0 4px; color: var(--green-900); }
.author-box p { margin: 0; font-size: .88rem; color: var(--muted); }

@media (max-width: 560px) {
  .product { grid-template-columns: 1fr; text-align: center; }
  .product .product-img { max-width: 160px; margin-inline: auto; }
  .bubble .avatar { width: 52px; }
}

/* 内訳テーブル（大・中・小の階層を視覚化） */
.cost-table th:last-child, .cost-table td:last-child { text-align: right; white-space: nowrap; }
.cost-table tr.mid > th { background: var(--green-100); color: var(--green-900); font-size: 1.03rem; }
.cost-table tr.mid > td { background: var(--green-100); color: var(--green-900); font-weight: 800; }
.cost-table tr.sub > td { color: var(--muted); }
.cost-table tr.sub > td:first-child { padding-left: 38px; font-weight: 500; position: relative; }
.cost-table tr.sub > td:first-child::before { content: "└"; position: absolute; left: 18px; color: var(--green-400); }
.cost-table tr.sub > td:last-child { color: var(--ink); }
.cost-table tr.grand > th, .cost-table tr.grand > td { background: var(--green-700); color: #fff; font-weight: 800; font-size: 1.05rem; }

/* 月々の支払額：半円ゲージ */
.gauge { width: 100%; max-width: 240px; height: auto; display: block; margin: 4px auto 0; }
.gauge .donut-cap { font-size: 10px; fill: var(--muted); }
.gauge .donut-val { font-size: 18px; font-weight: 800; fill: var(--green-700); }

/* 金利タイプ（変動／フラット）セレクタ：金利欄内の選択要素として横並び */
.rate-type { margin-top: 10px; padding: 10px 12px; background: var(--white); border: 1px solid var(--green-100); border-radius: 10px; }
.rate-type .rt-label { display: block; font-weight: 800; color: var(--green-800); font-size: .8rem; margin-bottom: 8px; }
.rate-type .rt-options { display: flex; flex-wrap: wrap; gap: 6px; }
.rate-type .rt-options label {
  flex: 1 1 0;
  min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; white-space: nowrap;
  font-size: .74rem; font-weight: 700;
  padding: 7px 4px; border-radius: 999px;
  border: 1px solid var(--green-100); background: var(--green-50); color: var(--muted);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.rate-type .rt-options label:has(input:checked) { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.rate-type .rt-options input { position: absolute; opacity: 0; width: 0; height: 0; }
.rate-note { margin: 6px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 420px) { .rate-type .rt-options { flex-wrap: wrap; } .rate-type .rt-options label { flex: 1 1 40%; } }

/* セグメント選択（返済方法など・フィールドと同スケール） */
.seg { display: flex; gap: 10px; }
.seg label {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; white-space: nowrap;
  font-weight: 700; font-size: .92rem;
  padding: 11px 8px; border-radius: 10px;
  border: 1.5px solid var(--green-300); background: var(--white); color: var(--ink);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.seg label:has(input:checked) { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }

/* =========================================================
   スマホ最適化（ヘッダー・余白・タイポ）
   ========================================================= */
.brand { line-height: 1.25; }
@media (max-width: 640px) {
  .site-header .container { padding-inline: 16px; }
  .brand { font-size: .98rem; gap: 8px; }
  .brand .mascots img { width: 30px; }
  .breadcrumb .container { font-size: .8rem; }
}
@media (max-width: 412px) {
  .brand { font-size: .86rem; gap: 6px; }
  .brand .mascots img { width: 26px; }
  .brand .mascots img:nth-child(2) { margin-left: -8px; }
  .nav-toggle { font-size: 1.25rem; padding: 7px 10px; }
}
/* 結果カード内のグラフは小画面でやや低めにして見やすく */
@media (max-width: 640px) {
  .sim-output .chart-card .canvas-wrap { height: 260px !important; }
  .cost-table th, .cost-table td { padding: 9px 8px; font-size: .92rem; }
}

/* 入力欄の目安（平均値）ヒント */
.field-hint { margin: 5px 0 0; font-size: .75rem; color: var(--muted); line-height: 1.5; }
.field-hint::before { content: "💡 "; }

/* 月の電気代の目安ボックス（前提条件内） */
.bill-est {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  background: linear-gradient(160deg, var(--green-50), #fff);
  border: 1.5px solid var(--green-300); border-radius: 12px;
  padding: 12px 16px; margin: 4px 0 18px;
}
.bill-est .bill-label { flex-basis: 100%; font-weight: 800; color: var(--green-800); font-size: .82rem; }
.bill-est .bill-val { font-size: 1.05rem; color: var(--ink); }
.bill-est .bill-val b { font-size: 1.5rem; font-weight: 900; color: var(--green-700); }
.bill-est .bill-sub { color: var(--muted); font-size: .85rem; }
.bill-est .bill-sub b { color: var(--green-700); font-weight: 800; }

/* =========================================================
   ブログ一覧：カテゴリ絞り込み・ナンバリング・新着順
   ========================================================= */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.cat-filter button {
  font-weight: 700; font-size: .88rem; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--green-300); background: var(--white); color: var(--green-800);
  cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.cat-filter button:hover { background: var(--green-50); }
.cat-filter button.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }

.post-meta-row { display: flex; align-items: center; gap: 8px; }
.post-no { margin-left: auto; font-size: .72rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.post-badge-soon { font-size: .72rem; font-weight: 800; color: #a07400; background: #fff3d6; padding: 2px 9px; border-radius: 999px; }
.post-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.post-date { font-size: .78rem; color: var(--muted); }
.post-soon { font-size: .85rem; color: var(--muted); font-weight: 700; }
.card.is-draft { opacity: .9; }
