/* 保育園・幼稚園費用計算の共通スタイル。節ごとに担当が分かれる(layout=配置 / a11y=読みやすさ・操作 / ads=広告)。 */

/* === layout === */
/* パソコンでも最初の画面に年収と年齢が入るよう、ヒーローの余白を詰める */
.site-header { padding: 22px 20px 18px; }
#hero-boxes { grid-template-columns: 1fr !important; margin-top: 12px !important; }
#hero-boxes > div { padding: 10px 14px !important; }
#hero-boxes > div:nth-child(2) { display: none !important; }
/* 最初の画面に年収と年齢の入力が入るよう、モバイルではヒーローを畳む(2枚目の「完全無料」ボックスと下段の試算カードは出さない) */
@media (max-width: 820px) {
  #sampleCard { display: none !important; }
  #hero-boxes { margin-top: 10px !important; }
  #hero-boxes > div:first-child { padding: 10px 14px !important; border-width: 2px !important; border-radius: 12px !important; }
  .site-header { padding: 16px 16px 14px !important; }
  .site-header h1 { font-size: 17px !important; margin-bottom: 6px !important; }
  .site-header p { font-size: 12px !important; line-height: 1.6 !important; }
  .site-header p br { display: none; }
  .site-header-badge { margin-bottom: 6px !important; }
}

/* === a11y === */
/* 文字は14px以上。index.html のインライン style は書き換えず、値ごとに引き上げる(.note と small は13pxまで) */
[style*="font-size:10px"],
[style*="font-size: 10px"],
[style*="font-size:11px"],
[style*="font-size: 11px"],
[style*="font-size:12px"],
[style*="font-size: 12px"],
[style*="font-size:13px"],
[style*="font-size: 13px"],
[style*="font-size:.7rem"],
[style*="font-size: .7rem"],
[style*="font-size:.72rem"],
[style*="font-size: .72rem"],
[style*="font-size:.75rem"],
[style*="font-size: .75rem"],
[style*="font-size:.78rem"],
[style*="font-size: .78rem"],
[style*="font-size:.8rem"],
[style*="font-size: .8rem"],
[style*="font-size:.82rem"],
[style*="font-size: .82rem"],
[style*="font-size:.83rem"],
[style*="font-size:.87rem"],
[style*="font-size:.85rem"],
[style*="font-size: .85rem"],
[style*="font-size:0.8rem"],
[style*="font-size: 0.8rem"],
[style*="font-size:0.85rem"],
[style*="font-size: 0.85rem"],
[style*="font-size:11.5px"],
[style*="font-size: 11.5px"],
[style*="font-size:12.5px"],
[style*="font-size: 12.5px"] { font-size: 14px !important; }
small, .note, small[style], .note[style] { font-size: 13px !important; }

/* --- クラスで指定された小さい文字 --- */
.top-nav-links a, .top-nav-cta, .site-header-badge, .share-btn, .fac-btn, .cres-label, .cres-sub, label, th, td, summary, button.tooltip-icon,
.bar-wrap p, .bar-label, .bar-val, .year-graph-title, .site-header p { font-size: 14px !important; }

/* --- タップ対象は44px以上(文中のリンクは除く) --- */
.top-logo, .top-nav-cta, .top-nav-links a, nav[aria-label="パンくずリスト"] a,
footer a, li > a:only-child, #tool-disclaimer a, a[href="/blog/"] {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
}
nav[aria-label="パンくずリスト"] { display: flex; align-items: center; padding-top: 0 !important; padding-bottom: 0 !important; }
nav[aria-label="パンくずリスト"] > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
nav[aria-label="パンくずリスト"] > a, nav[aria-label="パンくずリスト"] > span { flex: 0 0 auto; }
nav[aria-label="パンくずリスト"] > span:last-child { flex: 0 1 auto; }
footer a { justify-content: center; padding: 0 6px; }
footer p { line-height: 1.4; }
button.share-btn, a.share-btn, button.fac-btn { min-height: 44px; }
button.share-btn, a.share-btn { padding: 10px 14px; }
.reset-btn { width: auto !important; min-width: 64px; padding: 9px 14px !important; white-space: nowrap; font-size: 14px !important; }
details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
#facility-desc > summary, #sibling-box > summary { min-height: 44px; }

/* --- ヘルプ(?)。押せる範囲は44px、見た目の丸は小さいまま --- */
.help-row { position: relative; display: flex; align-items: center; flex-wrap: wrap; }
.help-row > label { flex: 0 1 auto; }
.tooltip-wrap { display: inline-flex; align-items: center; margin-top: 12px; }
button.tooltip-icon { all: unset; box-sizing: border-box; position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -10px -6px -10px 0; cursor: pointer; color: #fff; font-size: 14px; font-weight: 700; line-height: 1; text-align: center; }
button.tooltip-icon::before { content: ""; position: absolute; z-index: -1; width: 26px; height: 26px; border-radius: 50%; background: #047857; }
button.tooltip-icon:focus-visible { outline: 3px solid #1d4ed8; outline-offset: -3px; border-radius: 8px; }
.help-row > .tooltip-text { display: none; position: static; flex: 0 0 100%; transform: none; margin-top: 6px; padding: 10px 12px; max-width: none; width: auto;
  white-space: normal; font-size: 14px !important; line-height: 1.7; background: #1f2937; color: #fff; border-radius: 8px; box-shadow: none; }
.help-row > .tooltip-text::after { display: none; }
.help-row.open > .tooltip-text { display: block; }
.help-row .tooltip-text { z-index: auto; }

/* --- 計算ボタンの文字と背景は、どの状態でも4.5:1以上。フォーカス枠は2px以上 --- */
button.btn[onclick="calculate()"] { background: #047857 !important; color: #fff !important; opacity: 1 !important; }
button.btn[onclick="calculate()"]:hover { background: #065f46 !important; opacity: 1 !important; }
button.btn[onclick="calculate()"]:active { background: #064e3b !important; opacity: 1 !important; }
button.btn[onclick="calculate()"]:focus-visible { outline: 3px solid #1d4ed8 !important; outline-offset: 3px; }
button.btn[onclick="calculate()"]:disabled { background: #374151 !important; color: #fff !important; cursor: not-allowed; }

/* --- 結果の見出し(フォーカスの移動先) --- */
#result-heading { scroll-margin-top: 72px; margin-top: 0; }
#result-heading:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 4px; border-radius: 4px; }

/* --- 用語の説明 --- */
.glossary { background: #fff; border-radius: 12px; border: 1px solid #d1fae5; padding: 0 16px; margin-bottom: 16px; scroll-margin-top: 72px; }
.glossary > summary { font-size: 15px; font-weight: 700; color: #065f46; }
.glossary dl { margin: 0 0 12px; }
.glossary dt { font-size: 14px; font-weight: 700; color: #1f2937; margin-top: 12px; }
.glossary dd { margin: 4px 0 0; font-size: 14px; line-height: 1.8; color: #374151; }

/* --- スマホは最初の画面に年収と年齢を入れるため、14pxにした分、ヒーローの説明文(同じ内容は本文とメタにある)を畳み、余白を詰める --- */
@media (max-width: 820px) {
  .site-header p { display: none !important; }
  .site-header { padding-top: 12px !important; padding-bottom: 10px !important; }
  .site-header h1 { margin-bottom: 4px !important; }
}
@media (min-width: 821px) {
  .site-header { padding-top: 14px !important; padding-bottom: 12px !important; }
}
.card > .card-title { margin-bottom: 8px; }
.card > div:has(#step-bar) { margin-bottom: 8px !important; }

/* --- 同意バナー(共有物)が最後の本文を覆わない --- */
body:has(#consent-banner-v2) { padding-bottom: 130px; }

/* --- 横あふれ防止 --- */
#output, .cres-price { overflow-wrap: anywhere; }

/* === ads === */
.ads-block{border-top:2px solid #e5e7eb;padding:20px 16px 24px;background:#f9fafb;color:#1f2937}
.ads-heading{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 4px;font-size:14px;font-weight:700}
.ad-pr{display:inline-block;padding:2px 8px;border:1px solid #6b7280;border-radius:4px;background:#fff;color:#374151;font-size:14px;font-weight:700;line-height:1.4}
.ads-note{margin:0 0 14px;text-align:center;font-size:14px;color:#374151}
.ads-list{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:700px;margin:0 auto}
.ads-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 18px;border-radius:8px;font-size:14px;font-weight:700;color:#fff;text-decoration:none}
.ads-link-1{background:#047857}
.ads-link-2{background:#92400e}
.ads-link:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}

