/*
 * tool.css — jutaku-tool.com ツール固有スタイル
 * base.css と組み合わせて使用
 */

:root {
  /* プライマリカラー系（Slate Blue） */
  --primary:     #1e3a5f;
  --primary2:    #2a4f7e;
  --primary3:    #3560a0;
  --primary-l:   #e8f0f9;
  --primary-ll:  #f4f8fd;
  --primary-mid: #6b9fd4;

  /* アクセントカラー（固定・変更禁止） */
  --accent:      #c8570a;
  --accent-l:    #fff0e6;
  --accent2:     #e07030;

  /* 背景・サーフェスカラー */
  --bg:          #f7f5f0;
  --bg2:         #edeae3;
  --bg3:         #e0ddd4;
  --surface:     #ffffff;

  /* テキストカラー */
  --ink:         #1a2030;
  --ink2:        #445060;
  --ink3:        #8090a8;

  /* ヘッダー専用 */
  --hdr-bg:      #1e3a5f;
  --hdr-txt:     rgba(255,255,255,0.85);
  --hdr-logo:    #ffffff;
  --hdr-border:  rgba(255,255,255,0.12);

  /* ヒーロー専用 */
  --hero-bg:     #1e3a5f;
  --hero-glow1:  rgba(53,96,160,0.45);
  --hero-glow2:  rgba(200,87,10,0.06);
  --hero-grid:   rgba(255,255,255,0.03);
  --eyebrow-bg:  rgba(107,159,212,0.15);
  --eyebrow-bd:  rgba(107,159,212,0.3);
  --eyebrow-c:   #7ab0e0;

  /* 固定トークン（変更禁止） */
  --white:       #ffffff;
  --r:           10px;
  --r-lg:        18px;
  --r-xl:        28px;
  --r-full:      100px;
  --shadow:      0 4px 24px rgba(0,0,0,0.09);
  --shadow-sm:   0 2px 10px rgba(0,0,0,0.06);

  /* 後方互換エイリアス */
  --cream:        var(--bg);
  --border:       var(--bg3);
  --border2:      var(--bg3);
  --accent-light: var(--accent-l);
  --accent-hover: #a84308;
  --green:        #2a6b3c;
  --green-light:  #e8f5ec;
  --green-hover:  #1e5230;
  --shadow-md:    var(--shadow);

  /* フォント変数 */
  --font-display: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
  --font-d:       'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
  --font-body:    'Noto Sans JP', sans-serif;
  --font-b:       'Noto Sans JP', sans-serif;
  --font-mono:    'Noto Sans JP', sans-serif;
  --font-m:       'Noto Sans JP', sans-serif;
  --font-serif:   'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
}



/* ── ヒーローセクション ── */
.hero {
  background: var(--hero-bg);
  padding: 36px 24px 32px;
  border-bottom: 1px solid var(--hdr-border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, var(--hero-glow1), transparent 60%),
    radial-gradient(ellipse at 80% 70%, var(--hero-glow2), transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* シンプルヒーロー（単色背景・装飾なし） */
.hero--simple { background: var(--primary, #1e3a5f); padding: 28px 24px 24px; border-bottom: none; }
.hero--simple::before,
.hero--simple::after { display: none; }

.hero-inner { max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--white);
  font-size: clamp(24px, 5vw, 38px);
  line-height: 1.12;
  text-wrap: balance;
  word-break: auto-phrase;
  margin-bottom: 12px;
  letter-spacing: -.045em;
}

.hero-title em,
.hero-title .acc { color: var(--primary-mid); font-style: normal; }

.hero-sub { color: rgba(255,255,255,0.85); font-size: 14px; line-height: 1.75; margin: 0 auto 18px;
  max-width: 640px; text-wrap: balance; word-break: auto-phrase; }

.bc {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 24px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink3);
}
.bc a { color: var(--ink3); text-decoration: none; }
.bc a:hover { color: var(--primary3); }

/* ── メインコンテナ ── */
.container { max-width: 720px; margin: 0 auto; padding: 28px 14px 80px; }
.main { max-width: 820px; margin: 0 auto; padding: 24px 24px 80px; display: flex; flex-direction: column; gap: 14px; }

@media (min-width: 660px) {
  .container { padding: 36px 16px 100px; }
}

/* ── セクションヘッダー ── */
.sec-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sec-bar {
  width: 4px; height: 22px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.sec-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.03em;
  color: var(--ink);
}
/* ── セクションラベル（旧） ── */
.sec-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--bg3); }

/* ── フィーチャーカード (.fc) ── */
.fc {
  background: var(--surface);
  border: 2px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 12px;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
}
@media (min-width: 520px) { .fc { padding: 20px; } }
.fc:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ── カード ── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  margin-bottom: 0;
  transition: box-shadow .2s;
}

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }

.card-icon {
  width: 38px; height: 38px;
  background: var(--accent-l);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.card-desc  { font-size: 12px; color: var(--ink3); margin-top: 2px; }

/* ── フォーム要素 ── */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 7px;
}

.req-badge {
  display: inline-block;
  background: var(--accent-l);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
  letter-spacing: .04em;
}

.field-input,
.field-select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  color: var(--ink);
  font-size: 16px;
  padding: 12px 16px;
  font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

@media (min-width: 660px) {
  .field-input, .field-select { font-size: 15px; }
}

.field-input:focus,
.field-select:focus {
  border-color: var(--primary3);
  box-shadow: 0 0 0 3px var(--primary-l);
  background: var(--white);
}

.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238090a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 40px;
  cursor: pointer;
}

.field-input:disabled,
.field-select:disabled,
.form-input:disabled,
.form-select:disabled { opacity: .5; cursor: not-allowed; background: var(--bg2); }

.field-error { font-size: 12px; color: var(--accent); margin-top: 5px; display: none; }
.field-error.show { display: block; }

/* ── グリッド ── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 520px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ── 塗料選択 ── */
.paint-card {
  border: 2px solid var(--bg3);
  border-radius: var(--r);
  padding: 15px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
  display: block;
}
.paint-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
@media (min-width: 520px) { .paint-cards { grid-template-columns: repeat(4, 1fr); } }

.paint-card:hover    { border-color: var(--primary-mid); background: var(--primary-ll); transform: translateY(-1px); }
.paint-card.selected { border-color: var(--accent); background: var(--accent-l); }

.paint-check {
  position: absolute;
  top: 11px; right: 13px;
  color: var(--accent);
  font-weight: 700; font-size: 14px;
  opacity: 0; transition: opacity .15s;
}
.paint-card.selected .paint-check { opacity: 1; }
.paint-card input[type="radio"] { display: none; }

.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink2);
  cursor: pointer;
  padding: 8px 10px;
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  transition: border-color .15s, background .15s;
}
.check-label:hover { border-color: var(--primary-mid); background: var(--primary-ll); }
.check-label input { accent-color: var(--accent); }

.paint-name,
.pc-name     { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.paint-range { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 500; }
.paint-life,
.pc-life     { font-size: 12px; color: var(--ink3); margin-top: 3px; }
.pc-price    { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 500; }

/* ── チェックボックスオプション ── */
.opt-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 480px) { .opt-grid { grid-template-columns: 1fr 1fr; } }

.opt-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
  font-size: 13px;
  color: var(--ink2);
  min-height: 48px;
}
.opt-item:hover { border-color: var(--accent); }
.opt-item input[type="checkbox"] { display: none; }

.opt-box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--bg3);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
  font-size: 12px; color: transparent; font-weight: 700;
}

.opt-item.checked,
.opt-item:has(input:checked) { border-color: var(--green); background: var(--green-light); color: var(--ink); }
.opt-item.checked .opt-box,
.opt-item:has(input:checked) .opt-box { background: var(--green); border-color: var(--green); color: var(--white); }

/* ── 計算ボタン ── */
.calc-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  padding: 15px;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: -.02em;
  transition: background .2s, transform .2s, box-shadow .2s;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.calc-btn:hover {
  background: var(--primary2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,87,10,.3);
}
.calc-btn:active { transform: translateY(0); }
.calc-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.calc-btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ── セクションタイトル ── */
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── フォームグループ ── */
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary3);
  box-shadow: 0 0 0 3px var(--primary-l);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238090a8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ── 入力ラッパー（単位付き） ── */
.input-wrap { display: flex; align-items: center; gap: 8px; }
.input-wrap .form-input { flex: 1; }
.input-unit { font-size: 13px; color: var(--ink3); white-space: nowrap; flex-shrink: 0; min-width: 28px; }

/* ── エラーメッセージ ── */
.err-msg { font-size: 12px; color: var(--accent); margin-top: 5px; display: none; }
.err-msg.show { display: block; }

/* ── 結果エリア ── */
.result-area { display: none; margin-top: 0; }
.result-area.show {
  display: block;
  animation: fadeUp .45s cubic-bezier(.16,1,.3,1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 結果ヒーロー共通パターン ── */
.cost-hero, .result-hero, .result-main, .result-green, .res-hero {
  background: var(--primary);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
/* コンパクト版（padding小さめ・margin-bottom あり） */
.res-hero-sm {
  background: var(--primary);
  border-radius: var(--r-lg);
  padding: 22px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.cost-hero::before, .result-hero::before, .result-main::before, .result-green::before, .res-hero::before, .res-hero-sm::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(107,159,212,.25), transparent 70%);
  pointer-events: none;
}

.ch-tag, .rh-l, .rh-label, .rb-label, .result-tag, .result-hero-label,
.th-tag, .tb-label, .rm-label, .rg-label, .rg-l, .res-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 6px;
}

.ch-range, .rh-v, .result-hero-val, .result-hero-val2,
.result-range, .rm-val, .rg-val, .rg-v, .res-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 7vw, 48px);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -.02em;
}

.ch-range em, .rh-v em, .result-range em, .result-unit,
.rm-val em, .rg-val em, .rg-v em, .res-val em {
  color: var(--primary-mid);
  font-style: normal;
  font-size: .55em;
}

.ch-note, .rh-sub, .rb-sub, .result-note,
.tb-sub, .rm-sub, .rg-sub, .rg-s, .res-sub {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}


/* result-green: 補助金系 → 上の結果ヒーロー共通パターンに統合済み */

/* ===== Saving Box (節約額・補助金額の小バナー) ===== */
.saving-box {
  background: var(--primary2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
}
.sb-l, .sb-label { font-size: 11px; color: var(--primary-mid); font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.sb-v   { font-family: var(--font-display); font-weight: 900; font-size: clamp(22px,5vw,36px); color: #fff; }
.sb-v em { color: var(--primary-mid); font-style: normal; font-size: .65em; }
.sb-s   { color: rgba(255,255,255,0.55); font-size: 11px; margin-top: 2px; }

/* ===== Subsidy Badge (補助金バッジ) ===== */
.subsidy-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-light);
  border: 1px solid rgba(42,107,60,.25);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--r-full);
}

/* ===== Warn Box (注意ボックス) ===== */
.warn-box {
  background: var(--accent-light, #fff3ec);
  border: 1px solid rgba(200,87,10,.25);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--accent);
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.result-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }

.result-meta-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r);
  padding: 10px 12px;
}

.result-meta-label { font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,0.35); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.result-meta-value { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: white; }

/* ── 内訳 ── */
.breakdown {
  background: var(--surface);
  border: 1px solid var(--bg3);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 14px;
}
.breakdown-head {
  background: var(--primary-ll);
  border-bottom: 1px solid var(--bg3);
  padding: 11px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (min-width: 660px) { .breakdown-head { padding: 14px 20px; } }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg3);
  transition: background .15s;
  gap: 8px;
}
@media (min-width: 660px) { .breakdown-row { padding: 13px 20px; } }

.breakdown-row:last-child { border-bottom: none; }
.breakdown-row:hover { background: var(--bg); }

.breakdown-name { font-size: 13px; color: var(--ink); }
.breakdown-val  { font-family: var(--font-mono); font-size: 13px; color: var(--primary3); font-weight: 500; white-space: nowrap; }
.breakdown-label { color: var(--ink2); font-size: 13px; }
.breakdown-row .breakdown-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.breakdown-row.total { background: var(--primary-ll); }
.breakdown-row.total .breakdown-label { color: var(--primary); font-weight: 700; font-family: var(--font-display); }
.breakdown-row.total .breakdown-val { color: var(--accent); font-size: 16px; }

.breakdown-total { background: var(--bg); border-top: 2px solid var(--bg3); }
.breakdown-total .breakdown-name { font-weight: 700; }
.breakdown-total .breakdown-val  { color: var(--accent); font-size: 15px; }

/* ── 解説記事 ── */
.article,
.article-section {
  background: var(--surface);
  border: 1px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 20px 14px;
  margin-bottom: 14px;
}
@media (min-width: 660px) { .article, .article-section { padding: 28px; } }

.article-title,
.article-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg3);
  border-left: none;
  background: transparent;
  border-radius: 0;
  padding: 0 0 10px 0;
  margin: 0 0 16px;
}

.article-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary2);
  margin: 18px 0 8px;
  border-bottom: none;
  padding-bottom: 0;
}

.article-lead {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.85;
  margin-bottom: 16px;
  font-family: var(--font-body);
}

.article-p {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.85;
  margin-bottom: 12px;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 12px;
}
.article-table th {
  background: var(--primary);
  color: white;
  padding: 8px 12px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  border: none;
}
.article-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--bg3);
  color: var(--ink2);
  vertical-align: middle;
  border-left: none;
  border-right: none;
}
.article-table tr:nth-child(even) td { background: var(--primary-ll); }
.article-table tr:last-child td { border-bottom: none; }

@media (max-width: 480px) {
  .article-table { font-size: 0.75rem; }
  .article-table th, .article-table td { padding: 5px 6px; }
}

/* ── CTAブロック ── */
.cta-block, .cta {
  padding: 32px 24px;
}

.cta {
  position: relative;
  background: linear-gradient(135deg, var(--primary-ll) 0%, var(--accent-l) 100%);
  border: 2px solid rgba(200,87,10,0.12);
  border-radius: var(--r-xl);
  text-align: center;
  margin-bottom: 14px;
}

/* ─── ステマ規制対応：PRバッジ 左上角 ─── */
/* #7c4a1a on gradient(primary-ll ~ accent-l ≈ #fef3e2) → ~7.5:1 ✅ */
.cta-pr,
.cta-block::before,
.cta::before {
  content: 'PR';
  position: absolute;
  top: 0; left: 0;
  background: rgba(200,87,10,0.15);
  color: #7c4a1a;
  border-radius: var(--r-xl) 0 6px 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 12px;
  margin: 0;
}

.cta-title,
.cta-h {
  font-family: var(--font-display);
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 8px;
}
.cta-title em, .cta-h em { color: var(--accent); font-style: normal; }

.cta-sub { color: var(--ink2); font-size: 13px; margin-bottom: 16px; }

.cta-points,
.cta-pts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.cta-point,
.cpp {
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  color: var(--ink2);
  border-radius: var(--r);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 14px;
}
.cpp::before { content: '✓'; color: var(--primary2); font-weight: 800; }

.cta-btn {
  background: var(--accent);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: var(--r);
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
  font-family: var(--font-body);
  display: block;
  box-shadow: 0 6px 20px rgba(200,87,10,0.28);
  letter-spacing: -.01em;
  max-width: 380px;
  margin: 0 auto 10px;
  border: none;
  cursor: pointer;
  text-align: center;
  min-height: auto;
}

.cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200,87,10,.3);
  color: var(--white);
}
.cta-btn::after {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  flex-shrink: 0;
  transition: transform .2s;
}
.cta-btn:hover::after {
  transform: rotate(45deg) translateX(3px) translateY(-1px);
}
.cta-btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }

.cta-note { font-size: 12px; color: var(--ink3); margin-top: 12px; }

/* ── ステマ規制対応：アフィリエイト広告開示テキスト ── */
.cta-disclosure,
.cta-dc {
  font-size: 10px;
  color: var(--ink3);
  margin-top: 8px;
  line-height: 1.6;
  text-align: center;
}

/* ── 中盤CTA（mid-cta-block） ── */
.mid-cta-block {
  position: relative;
  background: linear-gradient(135deg, var(--primary-ll) 0%, var(--accent-l) 100%);
  border: 2px solid rgba(200,87,10,0.12);
  border-radius: var(--r-xl);
  text-align: center;
  padding: 28px 24px;
  margin: 28px 0;
}
.mid-cta-block::before {
  content: 'PR';
  position: absolute;
  top: 0; left: 0;
  background: rgba(200,87,10,0.15);
  color: #7c4a1a;
  border-radius: var(--r-xl) 0 6px 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 12px;
  margin: 0;
}
.mid-cta-lead {
  font-family: var(--font-display);
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 16px;
}
.mid-cta-lead strong { color: var(--accent); }
.mid-cta-reassure {
  font-size: 12px;
  color: var(--ink2);
  margin-top: 10px;
  line-height: 1.6;
}

/* ── 関連ツール ── */
.related {
  background: var(--surface);
  border: 1px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 18px 14px;
}
@media (min-width: 660px) { .related { padding: 24px; } }

.related-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--ink); }

.related-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 480px) { .related-grid { grid-template-columns: 1fr 1fr; } }

.related-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  transition: border-color .15s, background .15s, color .15s;
  min-height: 48px;
  justify-content: space-between;
}
.related-link:hover { border-color: var(--primary3); background: var(--primary-ll); color: var(--ink); }
.related-link-arr {
  color: var(--ink3);
  font-size: 14px;
  transition: color .15s, transform .15s;
  flex-shrink: 0;
}
.related-link-arr::after {
  content: '→';
}
.related-link:hover .related-link-arr { color: var(--primary3); transform: translateX(2px); }


/* ===== 判断ブロック（judgment-block） ===== */
.judgment-block {
  background: var(--accent-l);
  border: 1.5px solid rgba(200,87,10,0.15);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 0;
  display: none;
}
.judgment-block.show { display: block; }
.judgment-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.judgment-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.judgment-title-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  display: block;
  margin-bottom: 3px;
}
.judgment-title .judgment-verdict {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  display: block;
}
.judgment-body {
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.7;
  margin-bottom: 14px;
}
.judgment-checklist {
  border-top: 1px solid rgba(200,87,10,0.1);
  padding-top: 14px;
  background: transparent;
  border-radius: 0;
}
.judgment-checklist-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: -.02em;
  font-family: var(--font-display);
  margin-bottom: 8px;
}
.judgment-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  font-size: 13px;
  color: var(--ink2);
  border-bottom: 1px solid rgba(200,87,10,0.07);
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
}
.judgment-check-item:hover { background: rgba(200,87,10,0.04); }
.judgment-check-item:last-child { border-bottom: none; margin-bottom: 0; }
.judgment-check-item .check-icon {
  width: 20px; height: 20px;
  border: 1.5px solid var(--bg3);
  border-radius: 4px;
  background: white;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--accent);
  font-weight: 800;
  transition: background .15s, border-color .15s;
}
.judgment-check-item.checked .check-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  font-size: 12px;
}
.judgment-check-item.checked span { color: var(--ink); font-weight: 600; }
/* ── チェック結果サマリー ── */
.jc-summary {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  display: none;
}
.jc-summary.show { display: block; }
.jc-summary.level-ok   { background: #e8f5e9; color: #2e7d32; }
.jc-summary.level-warn { background: #fff3e0; color: #e65100; }
.jc-summary.level-danger { background: #fbe9e7; color: #c62828; }
.jc-summary strong { font-weight: 700; }
.judgment-cta-hint {
  font-size: 13px;
  color: var(--ink3);
  margin: 12px 0 10px;
  line-height: 1.7;
}
.judgment-cta-hint strong { color: var(--accent); }

/* ── judgment-block 内 CTAボタン ── */
.judgment-cta-action { display: none; margin-top: 14px; }
.judgment-cta-action.show { display: block; }
.judgment-cta-btn {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  border-radius: var(--r);
  padding: 13px 20px;
  text-decoration: none;
  transition: background .15s, transform .15s;
  box-shadow: 0 4px 14px rgba(200,87,10,0.25);
  min-height: auto;
  width: 100%;
  margin-top: 12px;
}
.judgment-cta-btn:hover { background: var(--accent-hover); transform: translateY(-1px); color: var(--white); }
.judgment-cta-btn::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-top: 2px solid var(--white); border-right: 2px solid var(--white);
  transform: rotate(45deg);
  margin-left: 4px; flex-shrink: 0;
}

/* ===== ミニ比較カード（judgment直後・v3新設）===== */
.mini-compare,
.mini-compare-cards {
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 16px;
  display: none;
}
.mini-compare.show,
.mini-compare-cards.show { display: block; }
.mini-compare-eyebrow {
  background: var(--primary);
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(255,255,255,0.6);
}
.mini-compare-eyebrow strong { color: white; }
.mini-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--bg3);
}
.mini-card {
  background: var(--surface);
  padding: 14px;
  text-decoration: none;
  transition: background .15s;
  display: block;
  color: var(--ink);
}
.mini-card:hover { background: var(--primary-ll); }
.mini-card--primary { background: var(--primary-ll); }
.mini-card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--ink3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.mini-card-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 6px;
}
.mini-card-points { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.mini-card-points span {
  font-size: 11px;
  color: var(--ink2);
}
.mini-card-points span::before { content: '✓ '; color: var(--primary2); font-weight: 700; }
.mini-card-btn {
  background: var(--accent);
  color: white;
  padding: 8px 14px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
.mini-compare-detail,
.mini-compare-detail-link {
  display: block;
  padding: 11px 16px;
  font-size: 12px;
  color: var(--primary3);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid var(--bg3);
  transition: background .15s;
}
.mini-compare-detail::before,
.mini-compare-detail-link::before {
  content: '→';
  margin-right: .35em;
  display: inline-block;
  transition: transform .15s;
}
.mini-compare-detail:hover,
.mini-compare-detail-link:hover { background: var(--primary-ll); }
.mini-compare-detail:hover::before,
.mini-compare-detail-link:hover::before {
  transform: translateX(2px);
}

/* CVページ用コンポーネントは cv-common.css に移動済み */

/* ===== result内ミニCTAバナー ===== */
.result-mini-cta { display: none; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: var(--r-lg); padding: 16px; margin-top: 16px; text-align: center; }
.result-mini-cta.show { display: block; }
.result-mini-cta-title { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 10px; line-height: 1.4; }
.result-mini-cta .cta-btn { background: var(--white); color: var(--accent); font-size: 13px; padding: 12px 20px; display: inline-block; border-radius: var(--r-full); font-weight: 700; text-decoration: none; transition: all .15s; }
.result-mini-cta .cta-btn:hover { background: #fff3ed; transform: translateY(-1px); }
.result-mini-cta .cta-btn::after { border-top-color: var(--accent); border-right-color: var(--accent); }

/* ===== 第2CTA ===== */
.cta-block2 { background: var(--bg); border: 1.5px solid var(--bg3); border-radius: var(--r-lg); padding: 20px 16px; margin-bottom: 14px; text-align: center; }
.cta-block2 .cta-title { font-family: var(--font-display); font-size: clamp(14px,3.5vw,18px); font-weight: 700; color: var(--ink); line-height: 1.4; margin-bottom: 8px; }
.cta-block2 .cta-sub { font-size: 12px; color: var(--ink3); margin-bottom: 14px; line-height: 1.6; }
.cta-block2 .cta-btn2 { display: inline-block; background: transparent; color: var(--accent); border: 2px solid var(--accent); font-weight: 700; font-size: 13px; padding: 12px 24px; border-radius: var(--r-full); text-decoration: none; transition: all .15s; }
.cta-block2 .cta-btn2::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  transition: transform .15s;
}
.cta-block2 .cta-btn2:hover::after { transform: rotate(45deg) translateX(2px); }
.cta-block2 .cta-btn2:hover { background: var(--accent); color: var(--white); }

/* ===== テーブル横スクロール ===== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.table-scroll table { min-width: 460px; }

/* ===== Utility classes ===== */
.txt-xs-muted,
.txt-sm-muted { font-size: 12px; color: var(--ink3); }
.txt-sm-body  { font-size: 13px; color: var(--ink2); line-height: 1.7; }
.txt-sm-bold-pointer { font-size: 13px; font-weight: 700; cursor: pointer; }
.txt-sm-subtle { font-size: 12px; color: rgba(255,255,255,0.55); }
.txt-xs   { font-size: 12px; }
.txt-green { color: var(--green); }
.txt-error { color: #c00; font-weight: 700; }
.txt-danger { color: #c00; }
.txt-xs-muted.mt-3 { margin-top: 3px; }
.txt-xs-muted.mt-4 { margin-top: 4px; }
.txt-xs-muted.mt-8 { margin-top: 8px; }
.txt-accent-bold { color: var(--accent); font-weight: 700; }
.txt-accent { color: var(--accent); }
.txt-warn { color: #d4900a; }
.txt-caution { color: #c07000; font-weight: 700; }
.txt-ink2 { color: var(--ink2); }
.txt-em { font-size: .5em; }
.txt-fs28 { font-size: 28px; }
.mono-val { font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.mono-green { font-family: var(--font-mono); color: var(--green); }
.mono-accent { font-family: var(--font-mono); color: var(--accent); }
.mono-val-lg { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--green); }
.mono-val-green { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--green); }
.result-hero-label { font-size: 11px; color: var(--primary-mid); font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.result-hero-bg { background: linear-gradient(135deg, var(--primary), var(--primary2)); border-radius: var(--r-lg); padding: 22px 16px; margin-bottom: 14px; position: relative; overflow: hidden; }
.section-label { font-size: 13px; font-weight: 700; color: var(--ink2); padding: 10px 0 6px; border-bottom: 1px solid var(--bg3); }
.section-label2 { font-size: 12px; font-weight: 700; color: var(--ink2); margin-bottom: 8px; }
.txt-sm-muted.mb-3  { margin-bottom: 3px; }
.txt-sm-muted.mb-12 { margin-bottom: 12px; }
.txt-sm-muted.mb-16 { margin-bottom: 16px; }
.txt-sm-note { font-size: 13px; color: var(--ink2); line-height: 1.8; }
.txt-sm-note2 { font-size: 13px; color: var(--ink2); margin-top: 12px; line-height: 1.7; }
.txt-xs-muted-lh { font-size: 12px; color: var(--ink3); margin-top: 8px; line-height: 1.6; }
.txt-green-bold { color: var(--green); font-weight: 700; }
.fw-bold { font-weight: 700; }
.mt-0  { margin-top: 0; }
.mt-3  { margin-top: 3px; }
.mt-4  { margin-top: 4px; }
.mt-6  { margin-top: 6px; }
.mt-8  { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.h-full { height: 100%; }
.flex-center-8 { display: flex; align-items: center; gap: 8px; }
.flex-center-8-mb8 { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin-bottom: 8px; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-between-mb16 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.flex-row-sm { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); margin-bottom: 4px; }
.grid-2col    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-2col-8  { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-cost-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--bg3); }
.text-right   { text-align: right; }
.w-28 { width: 28px; }
.w-120 { width: 120px; }
.borderless { border: none; padding: 0; }
.overflow-x, .overflow-touch { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kpi-box { background: var(--surface); border: 1px solid var(--bg3); border-radius: var(--r); padding: 12px; text-align: center; }
.kpi-l { font-size: 12px; color: var(--ink3); margin-bottom: 3px; }
.kpi-v { font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--ink); }
.kpi3, .kpi4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 480px) { .kpi3 { grid-template-columns: repeat(3,1fr); } .kpi4 { grid-template-columns: repeat(4,1fr); } }
.btn-success { background: var(--green) !important; border-color: var(--green) !important; color: var(--white) !important; }
.progress-bar-wrap { height: 16px; background: var(--bg3); border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.js-hidden { display: none; }
.hidden-mt16 { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--bg3); }
.hidden-mt12, .mt-12-hidden { display: none; margin-top: 12px; }
.bg-border2 { background: var(--bg3); }
.bg-accent  { background: var(--accent); }
.bg-green-60 { background: var(--green); opacity: .6; }
.bg-green { background: var(--green); }
.bg-light { background: var(--bg); }
.selected { background: var(--accent-l); border-color: var(--accent); }
.active { background: var(--accent-l); border-color: var(--accent); color: var(--accent); }
.grade-name { color: var(--ink); font-size: 12px; font-weight: 700; }
.del-btn:hover { background: #fff0f0; border-color: #c00; color: #c00; }
.green { color: var(--green); font-weight: 700; }
.pc-icon { font-size: 22px; margin-bottom: 4px; }
.mc-icon { font-size: 24px; margin-bottom: 6px; }

.map-link { display: inline-flex; align-items: center; gap: 8px; }
.map-link::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  flex-shrink: 0;
  transition: transform .15s;
}
.map-link:hover::after { transform: rotate(45deg) translateX(3px) translateY(-1px); }

/* ===== コスパ比較バー ===== */
.pc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pc-row-name { font-size: 12px; font-weight: 700; color: var(--ink); min-width: 70px; flex-shrink: 0; }
.pc-bar-wrap { flex: 1; height: 20px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.pc-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary3)); border-radius: 4px; transition: width .4s ease; }
.pc-val { font-family: var(--font-mono); font-size: 12px; color: var(--ink); min-width: 100px; text-align: right; flex-shrink: 0; }
.pc-life-badge { font-size: 10px; color: var(--ink3); background: var(--bg2); padding: 2px 8px; border-radius: var(--r-full); flex-shrink: 0; }

/* ===== 印刷スタイル ===== */
@media print {
  .site-header, .site-footer, .cta-block, .cta-block2,
  .related-links-block,
  .result-mini-cta, .calc-btn, .judgment-block, .mini-compare-cards,
  nav { display: none !important; }

  body { font-size: 11pt; color: #000; background: #fff; }
  .container, .main { max-width: 100%; padding: 0; margin: 0; }
  .result-area { display: block !important; }
  .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .breakdown { break-inside: avoid; }
  .article-block { display: none; }

  body::before {
    content: "住宅ツール.com — " attr(data-tool-title);
    display: block;
    font-size: 10pt;
    color: #666;
    margin-bottom: 8pt;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4pt;
  }
  body::after {
    content: "※この計算結果は概算です。実際の費用は契約内容や地域によって異なります。 jutaku-tool.com";
    display: block;
    font-size: 8pt;
    color: #999;
    margin-top: 12pt;
    border-top: 1px solid #eee;
    padding-top: 4pt;
  }
}

:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

nav a, .hdr a, .footer a, .footer-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer a {
  padding: 12px 8px;
}

/* ===== Breadcrumb (可視パンくずリスト) ===== */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.6;
}
.breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: #c8570a;
  text-decoration: underline;
}
@media (max-width: 640px) {
  .breadcrumb {
    padding: 12px 16px 0;
    font-size: 12px;
    gap: 6px;
  }
}

/* ===== Shared Selection Card Pattern ===== */
/* 2カラムフォームレイアウト */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 599px) {
  .form-row-2col { grid-template-columns: 1fr; }
}

/* 共通カード選択UI — 各ツールページの <label class="sel-card"> で利用 */

/* グリッド: デフォルト2列、520px以上で4列 */
.sel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 520px) { .sel-grid { grid-template-columns: repeat(4, 1fr); } }
/* 3列バリエーション */
.sel-grid-3 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 480px) { .sel-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .sel-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* カード本体 */
.sel-card {
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 14px 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
  display: block;
  text-align: center;
  background: #fafaf8;
}
.sel-card:hover    { border-color: var(--accent); background: var(--accent-light, #fff3ec); }
.sel-card.selected { border-color: var(--accent); background: var(--accent-light, #fff3ec); }
.sel-card.selected.sel-shadow { box-shadow: 0 0 0 1px var(--accent); }
.sel-card input[type="radio"],
.sel-card input[type="checkbox"] { display: none; }
/* 2行レイアウト: メインテキスト + サブテキスト */
.sel-card-body {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.sel-card-body strong { font-size: 15px; line-height: 1.3; }
.sel-card-body small  { font-size: 12px; color: var(--sub); line-height: 1.3; }

/* チェックマーク */
.sel-check {
  position: absolute;
  top: 8px; right: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  opacity: 0;
  transition: opacity .15s;
}
.sel-card.selected .sel-check { opacity: 1; }

/* サブ要素 */
.sel-icon  { font-size: 22px; margin-bottom: 4px; }
.sel-name  { font-size: 13px; font-weight: 700; color: var(--ink); }
.sel-price { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 2px; }
.sel-note  { font-size: 11px; color: var(--ink3); margin-top: 2px; }
.sel-card.selected .sel-name-hl { color: var(--accent); }

/* ===== Shared Grade Button Pattern ===== */
/* 共通グレード/スコープ選択ボタン */
.grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grade-card {
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: #fafaf8;
}
.grade-card:hover    { border-color: var(--accent); }
.grade-card.selected { border-color: var(--accent); background: var(--accent-light, #fff3ec); box-shadow: 0 0 0 1px var(--accent); }
.grade-card input[type="radio"] { display: none; }
.grade-icon { font-size: 18px; margin-bottom: 4px; }
.grade-name { font-size: 12px; font-weight: 700; color: var(--ink); }
.grade-card.selected .grade-name { color: var(--accent); }
.grade-sub  { font-size: 11px; color: var(--ink3); margin-top: 2px; }
.grade-price { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 2px; }

/* ===== Shared Counter Button Pattern ===== */
/* 共通 +/- カウンター行 */
.count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.count-row:last-child { border-bottom: none; }
.cr-info { flex: 1; }
.cr-name { font-size: 13px; color: var(--ink); }
.cr-price { font-size: 11px; color: var(--accent); font-family: var(--font-mono); }
.cr-ctrl { display: flex; align-items: center; gap: 6px; }
.c-btn {
  width: 28px; height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #fafaf8;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  font-family: inherit;
}
.c-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.c-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

/* ===== Shared Tab Bar ===== */
/* 共通タブ切替バー */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 4px;
}
.tab-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: calc(var(--r) - 2px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink3);
  transition: all .15s;
}
.tab-btn.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ===== Shared Check Item ===== */
/* 共通チェックリスト項目（施工チェック、相続チェック等） */
.check-section { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.cs-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.check-item:last-child { border-bottom: none; }
.ci-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: all .15s;
}
.check-item.checked .ci-check,
.check-item.done .ci-check { background: var(--green); border-color: var(--green); color: #fff; }
.check-item.red.checked .ci-check { background: #ef4444; border-color: #ef4444; color: #fff; }
.check-item.done .ci-title { color: var(--ink3); text-decoration: line-through; }
.ci-content { flex: 1; }
.ci-title { font-size: 13px; color: var(--ink); font-weight: 500; }

/* ===== Shared Progress Bar ===== */
.progress-bar { height: 8px; background: var(--border); border-radius: 4px; margin: 8px 0; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s; }

/* ── FAQ Section ── */
.faq-section {
  margin: 32px 0;
}
.faq-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: var(--lh-heading);
  color: var(--color-text);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}
.faq-item[open] {
  border-color: #ff7a00;
}
.faq-q {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::before {
  content: "Q";
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ff7a00;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.faq-q::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.2s;
}
.faq-item[open] .faq-q::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq-a {
  padding: 0 16px 16px 54px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-sub);
}
.faq-a p {
  margin: 0;
}
@media (max-width: 480px) {
  .faq-q { font-size: 14px; padding: 12px 14px; }
  .faq-a { padding: 0 14px 14px 46px; font-size: 14px; }
}
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   住宅ツール.com — CVページ共通CSS
   設計書v3準拠
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━ MAIN ━━ */
.cv-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 24px 80px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ━━ 層① 費用スコアカード ━━ */
.context-card {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(200,87,10,0.12);
}
.context-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.context-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.context-row--highlight {
  background: var(--accent-l);
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.context-label {
  font-size: 12px;
  color: var(--ink3);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  flex-shrink: 0;
}
.context-value--big {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.04em;
  color: var(--accent);
}
.context-loss-warning {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.7;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}
.context-loss-warning strong { color: var(--accent); }

/* ━━ 層② 結論ブロック ━━ */
.conclusion-block {
  background: var(--primary);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}
.conclusion-block::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(53,96,160,0.5) 0%, transparent 60%);
  pointer-events: none;
}
/* ── PR badge（ステマ規制対応） ── */
/* 結論ブロック: 白背景 + 濃紺文字 on #1565c0 → 12.3:1 ✅ */
.cv-pr-badge {
  position: absolute; top: 0; right: 0; z-index: 2;
  background: rgba(255,255,255,0.92);
  color: #1a3a5c;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 5px 12px;
  border-radius: 0 var(--r-lg) 0 6px;
}
/* サービスカード: 濃グレー背景 + 白文字 on #fff → 4.6:1 ✅ */
.cv-pr-badge--card {
  background: #6b7280;
  color: #fff;
  border-radius: 0 var(--r-lg) 0 6px;
}
.conclusion-inner { position: relative; z-index: 1; }
.conclusion-label {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 3px;
  margin-bottom: 12px;
}
.conclusion-headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 3.5vw, 22px);
  letter-spacing: -.04em;
  color: white;
  margin-bottom: 14px;
  line-height: 1.3;
}
.conclusion-headline strong { color: var(--primary-mid); }
.conclusion-reasons {
  list-style: none;
  display: flex; flex-direction: column; gap: 7px;
  margin-bottom: 20px;
  padding: 0;
}
.conclusion-reasons li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
}
.conclusion-reasons li::before {
  content: '✓';
  width: 18px; height: 18px; flex-shrink: 0;
  background: rgba(107,159,212,0.2);
  border: 1px solid rgba(107,159,212,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--primary-mid);
  font-weight: 800;
}
.conclusion-cta {
  display: flex;
  align-items: center; justify-content: center;
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 18px 24px;
  border-radius: var(--r);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  min-height: 56px;
  transition: background .2s, transform .1s;
  box-shadow: 0 6px 24px rgba(200,87,10,0.35);
  letter-spacing: -.01em;
  margin-bottom: 10px;
}
.conclusion-cta::after {
  content: '→';
  margin-left: .4em;
  display: inline-block;
  transition: transform .15s;
}
.conclusion-cta:hover::after { transform: translateX(3px); }
.conclusion-cta:hover { background: #a84308; transform: translateY(-1px); }
.conclusion-microcopy {
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.conclusion-basis {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
}

/* ━━ セクションヘッダー ━━ */
.sec-hd {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.sec-bar {
  width: 4px; height: 22px;
  background: var(--primary); border-radius: 2px; flex-shrink: 0;
}
.sec-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 16px; letter-spacing: -.03em; color: var(--ink);
}

/* ━━ PR表記 ━━ */
.pr-notice {
  background: var(--accent-l);
  border: 1px solid rgba(200,87,10,0.15);
  border-radius: var(--r);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.6;
  margin-bottom: 12px;
}
.pr-notice strong { color: var(--accent); }

/* ━━ 層③ 業者カード ━━ */
.cards-wrap { display: flex; flex-direction: column; gap: 12px; }

.service-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: box-shadow .2s;
}
.service-card:hover { box-shadow: var(--shadow); }
.service-card--featured {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(200,87,10,0.1);
}
.card-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 3px;
  margin-bottom: 10px;
}
.card-badge--sub {
  background: var(--primary-l);
  color: var(--primary2);
}
.card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 20px; letter-spacing: -.03em;
  color: var(--ink); margin-bottom: 4px;
}
.card-tagline {
  font-size: 12px; color: var(--ink3); margin-bottom: 12px;
}
.card-points {
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
  padding: 0;
}
.card-points li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink2);
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500;
}
.card-points li::before {
  content: '✓';
  color: var(--primary2); font-weight: 800; font-size: 12px; flex-shrink: 0;
}
.card-specs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.card-specs span {
  background: var(--bg);
  border: 1px solid var(--bg3);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px; color: var(--ink2);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.card-specs span strong { color: var(--primary); }
.card-cta {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px;
  background: var(--primary-l);
  color: var(--primary);
  text-decoration: none;
  padding: 14px 20px;
  border-radius: var(--r);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 14px;
  transition: background .2s, transform .1s;
  margin-bottom: 8px;
  text-align: center;
}
.card-cta::after {
  content: '→';
  margin-left: .4em;
  display: inline-block;
  transition: transform .15s;
}
.card-cta:hover::after { transform: translateX(3px); }
.card-cta:hover { background: var(--primary-ll); transform: translateY(-1px); }
.card-cta--primary {
  background: var(--accent); color: white;
  min-height: 56px;
  box-shadow: 0 4px 16px rgba(200,87,10,0.25);
}
.card-cta--primary:hover { background: #a84308; }
.card-microcopy {
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: var(--ink3); letter-spacing: .05em;
}

/* ━━ 層④ 比較テーブル ━━ */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cv-compare-table {
  width: 100%; min-width: 540px;
  border-collapse: collapse;
  font-size: 13px;
}
.cv-compare-table th {
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 12px;
  text-align: center; white-space: nowrap;
}
.cv-compare-table th.col-sticky {
  text-align: left;
  background: var(--ink);
}
.cv-compare-table .col-sticky {
  position: sticky; left: 0;
  background: var(--surface);
  z-index: 1;
  min-width: 90px;
  font-size: 12px; font-weight: 700;
  color: var(--ink2);
  box-shadow: 2px 0 6px rgba(0,0,0,0.06);
  padding: 10px 12px;
  border-bottom: 1px solid var(--bg3);
}
/* ★ v3.1: th/td分離 — ヘッダーはアクセント濃色、データセルは薄オレンジ */
.cv-compare-table th.col--featured {
  background: var(--accent) !important;
  color: white !important;
}
.cv-compare-table td.col--featured {
  background: var(--accent-l) !important;
  font-weight: 700;
}
.cv-compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--bg3);
  text-align: center;
  color: var(--ink2);
  vertical-align: middle;
}
.cv-compare-table tr:last-child td { border-bottom: none; }
.cv-compare-table tr:last-child .col-sticky { border-bottom: none; }
.val--good { color: var(--green); font-weight: 700; }
.table-card {
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.table-note {
  font-size: 11px; color: var(--ink3);
  padding: 8px 14px;
  background: var(--bg);
  border-top: 1px solid var(--bg3);
}

/* ━━ 層⑤ 選び方ガイド ━━ */
.guide-wrap { display: flex; flex-direction: column; gap: 8px; }
.guide-item {
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s, background .15s;
}
.guide-item:hover { border-color: var(--primary3); background: var(--primary-ll); }
.guide-item--default { border-color: var(--accent); background: var(--accent-l); }
.guide-type {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 13px; color: var(--ink);
}
.guide-rec {
  font-size: 13px; color: var(--ink2);
}
.guide-rec strong { color: var(--primary2); }
.guide-item--default .guide-rec strong { color: var(--accent); }

/* ━━ 層⑥ FAQ ━━ */
.faq-wrap { display: flex; flex-direction: column; gap: 8px; }
.cv-main details {
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  overflow: hidden;
}
.cv-main details[open] { border-color: var(--primary3); }
.cv-main summary {
  padding: 14px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 13px; color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.cv-main summary::after {
  content: '＋';
  color: var(--primary-mid);
  font-size: 16px; font-weight: 400; flex-shrink: 0;
}
.cv-main details[open] summary::after { content: '－'; }
.cv-main summary::-webkit-details-marker { display: none; }
.faq-body {
  padding: 0 16px 14px;
  font-size: 13px; color: var(--ink2); line-height: 1.8;
  border-top: 1px solid var(--bg3);
  padding-top: 12px;
}

/* ━━ 戻るリンク ━━ */
.cv-back-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r);
  padding: 14px 18px;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600; font-size: 13px; color: var(--primary3);
  transition: border-color .15s, background .15s;
}
.cv-back-link:hover { border-color: var(--primary3); background: var(--primary-ll); }
.cv-back-link::before { content: '←'; font-size: 16px; }

/* ━━ 運営情報 ━━ */
.cv-editorial-info {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--r);
  padding: 16px;
  font-size: 12px; color: var(--ink3); line-height: 1.8;
}
.cv-editorial-info strong { color: var(--ink2); }
.cv-editorial-info p { margin-bottom: 4px; }
.cv-editorial-info p:last-child { margin-bottom: 0; }

.cta-disclosure {
  font-size: 11px;
  color: var(--ink3);
  text-align: center;
  line-height: 1.6;
}

/* ===== Back-to-top button ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--primary, #1e3a5f);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(30,58,95,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s, background .2s;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--primary2, #2a4f7e);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--primary, #1e3a5f);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .back-to-top { bottom: 16px; right: 14px; width: 40px; height: 40px; }
}

/* ===== Tools Index Page ===== */
.tools-index {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.tools-index-header {
  text-align: center;
  margin-bottom: 28px;
}
.tools-index-title {
  font-family: var(--font-d, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800;
  color: var(--ink, #1a2030);
  margin: 0 0 8px;
}
.tools-index-sub {
  font-size: 14px;
  color: var(--ink2, #445060);
  margin: 0 0 20px;
  line-height: 1.7;
}
.tools-search-wrap {
  max-width: 480px;
  margin: 0 auto 12px;
}
.tools-search {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid var(--bg3, #e0ddd4);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink, #1a2030);
  transition: border-color .2s;
  appearance: none;
}
.tools-search:focus {
  border-color: var(--primary, #1e3a5f);
  outline: none;
}
.tools-count {
  font-size: 13px;
  color: var(--ink3, #8090a8);
  margin: 0;
}

/* カテゴリタブ */
.cat-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}
.cat-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--bg3, #e0ddd4);
  border-radius: 20px;
  background: var(--surface, #fff);
  color: var(--ink2, #445060);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.cat-tab:hover {
  border-color: var(--primary, #1e3a5f);
  color: var(--primary, #1e3a5f);
}
.cat-tab.is-active {
  background: var(--primary, #1e3a5f);
  border-color: var(--primary, #1e3a5f);
  color: #fff;
}

/* カテゴリセクション */
.cat-section {
  margin-bottom: 32px;
}
.cat-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink, #1a2030);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-l, #e8f0f9);
}

/* ツールカードグリッド */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.tool-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.tool-card {
  background: var(--surface, #fff);
  border: 1px solid var(--bg3, #e0ddd4);
  border-radius: 10px;
  padding: 16px;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.tool-card:hover {
  border-color: var(--primary, #1e3a5f);
  box-shadow: 0 2px 12px rgba(30,58,95,.1);
  transform: translateY(-1px);
}
.tool-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #1a2030);
  margin-bottom: 4px;
  line-height: 1.4;
}
.tool-card-desc {
  font-size: 12px;
  color: var(--ink3, #8090a8);
  line-height: 1.5;
}

/* 検索結果なし */
.no-result {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink2, #445060);
  font-size: 15px;
}

@media (max-width: 480px) {
  .tools-index { padding: 20px 14px 40px; }
  .tool-grid { grid-template-columns: 1fr; gap: 8px; }
  .cat-tabs { gap: 4px; }
  .cat-tab { padding: 6px 10px; font-size: 12px; }
}
