/* =============================================================
 * bond-calc base.css
 * 金融計算サイト向け：信頼感のある落ち着いた配色、可読性最優先
 * ============================================================= */

:root {
  /* カラー */
  --c-bg: #ffffff;
  --c-bg-alt: #f7f9fc;
  --c-text: #1a2332;
  --c-text-sub: #4a5568;
  --c-muted: #7b8794;
  --c-border: #e2e8f0;
  --c-accent: #0b5fa3;          /* 紺寄りの青：金融機関で多用される色 */
  --c-accent-dark: #084a82;
  --c-accent-light: #e8f0f8;
  --c-positive: #2c8c5a;
  --c-negative: #c0392b;
  --c-warning: #b76b00;

  /* タイポ */
  --ff-base: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  --ff-num: "SF Mono", "Menlo", Consolas, "Liberation Mono", monospace;

  /* レイアウト */
  --container: 1080px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  font-feature-settings: "palt" 1;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- 見出し ---- */
h1, h2, h3, h4 { line-height: 1.4; color: var(--c-text); }
h1 {
  /* スマホで最長 19文字（「ざっくり 個人向け日本国債 シミュレーター」）が
     1行に収まるよう、viewport から container padding(40px)+余裕(30px)
     合計70pxを引き、20で割る（19文字+スペースの幅安全マージン）。
     PC は max 2.2rem まで通常サイズ。 */
  font-size: clamp(0.9rem, calc((100vw - 70px) / 20), 2.2rem);
  margin: 0.5em 0 0.7em;
  border-bottom: 3px solid var(--c-accent);
  padding-bottom: 0.4em;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin: 1.8em 0 0.6em;
  padding-left: 0.6em;
  border-left: 5px solid var(--c-accent);
}
h3 {
  font-size: 1.15rem;
  margin: 1.4em 0 0.5em;
  color: var(--c-accent-dark);
}
p { margin: 0 0 1em; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.3em; }

/* ---- ヘッダ ---- */
.site-header {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-text);
}
.site-logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.4em;
}
/* 全ナビ項目: 黒背景・白文字・統一デザイン（2026-06-08 シニア向け視認性UP） */
.site-nav a {
  color: #fff;
  background: #1a202c;
  border: 1px solid #1a202c;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.45em 0.95em;
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.site-nav a:hover {
  color: #fff;
  background: #2d3748;
  border-color: #4a5568;
  text-decoration: none;
}
.site-nav a:active { transform: translateY(1px); }

@media (max-width: 720px) {
  /* モバイル: ヘッダーを2段構造に
     [上段] ロゴ ¥ + 「国債計算ドットコム」（ブランド認知度UP）
     [下段] ナビ（横スクロール対応・シニア向け大きい項目） */
  .header-inner {
    flex-direction: column;
    height: auto;
    align-items: stretch;
    gap: 0.4em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
  }
  .site-logo {
    align-self: flex-start;
    font-size: 1.05rem;
  }
  .logo-text {
    display: inline;
    font-weight: 800;
  }
  .logo-mark {
    width: 30px;
    height: 30px;
  }
  .site-nav {
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .site-nav::-webkit-scrollbar { display: none; } /* Chrome/Safari */
  .site-nav ul {
    gap: 0.4em;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-right: 1em; /* 右端でも最後の項目が見切れない */
  }
  .site-nav a {
    font-size: 0.85rem;     /* シニアでも読める大きさ */
    padding: 0.6em 0.85em;  /* タップ領域を確実に確保 */
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
}
@media (max-width: 480px) {
  .site-nav ul { gap: 0.3em; padding-right: 0.8em; }
  .site-nav a {
    font-size: 0.82rem;
    padding: 0.55em 0.75em;
  }
}
@media (max-width: 380px) {
  .site-nav a {
    font-size: 0.78rem;
    padding: 0.5em 0.65em;
  }
}

/* ---- リーガル・情報ページ共通 ---- */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
}
.legal-page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.3em;
  border-bottom: 3px solid var(--c-accent);
  padding-bottom: 0.4em;
}
.legal-page .legal-updated {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin: 0 0 2em;
}
.legal-page h2 {
  font-size: 1.2rem;
  margin: 2em 0 0.6em;
  padding: 0.5em 0.9em;
  background: #f7f9fc;
  border-left: 4px solid var(--c-accent);
  border-bottom: none;
}
.legal-page h3 {
  font-size: 1rem;
  margin: 1.5em 0 0.5em;
  color: var(--c-accent-dark);
}
.legal-page p,
.legal-page li {
  line-height: 1.85;
  color: var(--c-text);
  font-size: 0.95rem;
}
.legal-page ul,
.legal-page ol {
  padding-left: 1.4em;
}
.legal-page li {
  margin-bottom: 0.35em;
}
.legal-page dl {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 0.6em 1.2em;
  margin: 1em 0;
  font-size: 0.95rem;
}
.legal-page dt {
  font-weight: 700;
  color: var(--c-text-sub);
}
.legal-page dd { margin: 0; }
@media (max-width: 540px) {
  .legal-page dl { grid-template-columns: 1fr; gap: 0.2em; }
  .legal-page dd { margin-bottom: 0.8em; }
}
.legal-page .legal-note {
  margin: 1.4em 0;
  padding: 1em 1.2em;
  background: #fef9c3;
  border-left: 4px solid #ca8a04;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
}
.legal-page .legal-contact-card {
  margin: 1.5em 0;
  padding: 1.2em 1.4em;
  background: var(--c-accent-light);
  border-radius: 10px;
  text-align: center;
}
.legal-page .legal-contact-card a {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--ff-num);
}

/* ---- お問い合わせフォーム ---- */
.contact-form {
  margin: 1.5em 0 2em;
  padding: 1.5em 1.5em 1.2em;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 10px;
}
.contact-field {
  margin-bottom: 1.1em;
}
.contact-field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.35em;
}
.cf-required {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.1em 0.55em;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.cf-optional {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.1em 0.55em;
  background: #cbd5e1;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.contact-field input[type="text"],
.contact-field input[type="email"],
.contact-field input[type="url"],
.contact-field select,
.contact-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65em 0.8em;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--c-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-light);
}
.cf-hint {
  margin: 0.35em 0 0;
  font-size: 0.78rem;
  color: var(--c-muted);
}
.contact-agree {
  display: flex;
  align-items: center;
}
.contact-agree label {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}
.contact-agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.contact-submit {
  display: block;
  width: 100%;
  padding: 0.85em 1.5em;
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.contact-submit:hover:not(:disabled) {
  background: var(--c-accent-dark);
  transform: translateY(-1px);
}
.contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.cf-status {
  margin-top: 1em;
  padding: 0.9em 1.1em;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
}
.cf-status-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.cf-status-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ---- フッタ ---- */
.site-footer {
  margin-top: 4em;
  padding: 2.5em 0 1.5em;
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  color: var(--c-text-sub);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2em;
  margin-bottom: 2em;
}
.footer-col h3 { font-size: 1.1rem; margin: 0 0 0.4em; }
.footer-col h4 { font-size: 0.95rem; margin: 0 0 0.5em; color: var(--c-text); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.4em; }
.footer-col a { color: var(--c-text-sub); }
.footer-tagline { color: var(--c-muted); font-size: 0.9rem; }
.footer-copy { text-align: center; margin: 1.5em 0 0.5em; font-size: 0.85rem; }
.footer-notice {
  text-align: center;
  font-size: 0.78rem;
  color: var(--c-muted);
  border-top: 1px solid var(--c-border);
  padding-top: 1em;
  max-width: 720px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.4em; }
}

/* ---- 計算機UI（共通） ---- */
.calc {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5em;
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}
.calc-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em 1.2em;
}
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}
.calc-field label {
  font-size: 0.88rem;
  color: var(--c-text-sub);
  font-weight: 500;
}
.calc-field input,
.calc-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.6em 0.8em;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--ff-num);
  background: #fff;
  transition: border-color 0.15s;
}
.calc-field { min-width: 0; }
.calc-form { min-width: 0; }
@media (max-width: 480px) {
  .calc-field input,
  .calc-field select {
    font-size: 16px;
    padding: 0.55em 0.55em;
  }
}
.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-light);
}
.calc-field .hint {
  font-size: 0.78rem;
  color: var(--c-muted);
}

/* ---- 通貨選択ボタン（高金利通貨建てページ用） ---- */
.currency-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85em;
  margin: 0.5em 0 0;
}

/* ボタン本体 = 国旗パターンの背景（枠全体が国旗） */
.currency-btn {
  position: relative;
  padding: 8px;             /* 国旗カラーが見える枠の太さ */
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.2s ease;
  /* デフォは控えめな彩度 */
  filter: saturate(0.65);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  /* 通貨別 background は下の data-currency セレクタで個別指定 */
}

.currency-btn:hover {
  filter: saturate(1);
  transform: translateY(-4px);
  box-shadow:
    0 16px 32px color-mix(in srgb, var(--btn-c1, #94a3b8) 22%, transparent),
    0 4px 10px rgba(15, 23, 42, 0.08);
}
.currency-btn:active { transform: translateY(-1px); }

.currency-btn.active {
  filter: saturate(1.15);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px color-mix(in srgb, var(--btn-c1, #94a3b8) 30%, transparent),
    0 0 0 5px color-mix(in srgb, var(--btn-c1, #94a3b8) 14%, transparent);
}

/* 白地インナーカード */
.currency-btn-inner {
  background: #fff;
  border-radius: 11px;
  padding: 0.9em 0.7em 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* 国名 */
.currency-btn-country {
  font-size: 0.78rem;
  color: var(--c-text-sub);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* 通貨名 */
.currency-btn-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.02em;
  margin-top: 0.05em;
}
.currency-btn-code {
  font-size: 0.72rem;
  color: var(--c-muted);
  font-family: var(--ff-num);
  font-weight: 600;
  margin-left: 0.2em;
  letter-spacing: 0.08em;
}

/* 利率（主役・大きく） */
.currency-btn-rate {
  font-family: var(--ff-num);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--btn-c1, var(--c-accent-dark));
  margin-top: 0.3em;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.currency-btn-rate-pct {
  font-size: 1.05rem;
  font-weight: 800;
  margin-left: 0.05em;
  opacity: 0.85;
}
.currency-btn:hover .currency-btn-rate { transform: scale(1.06); }
.currency-btn.active .currency-btn-rate { transform: scale(1.12); }

/* ─── 通貨別 国旗パターン背景 ─── */

/* 🇧🇷 ブラジル: 緑地に黄色のひし形 + 紺の円（簡略：放射） */
.currency-btn[data-currency="BRL"] {
  --btn-c1: #009c3b;
  background:
    radial-gradient(circle at center, #002776 0 18%, transparent 19%),
    radial-gradient(ellipse 70% 50% at center, #ffdf00 0 50%, transparent 51%),
    #009c3b;
}

/* 🇹🇷 トルコ: 赤地（中央に白い三日月＋星を模す） */
.currency-btn[data-currency="TRY"] {
  --btn-c1: #e30a17;
  background:
    radial-gradient(circle at 32% 50%, transparent 11%, #e30a17 12%),
    radial-gradient(circle at 28% 50%, #ffffff 12%, transparent 13%),
    #e30a17;
}

/* 🇲🇽 メキシコ: 緑・白・赤の縦3色 */
.currency-btn[data-currency="MXN"] {
  --btn-c1: #006847;
  background: linear-gradient(
    to right,
    #006847 0 33.3%,
    #ffffff 33.3% 66.6%,
    #ce1126 66.6% 100%
  );
}

/* 🇿🇦 南アフリカ: 緑・金・赤の横3色（簡略） */
.currency-btn[data-currency="ZAR"] {
  --btn-c1: #007a4d;
  background: linear-gradient(
    to bottom,
    #de3831 0 33.3%,
    #ffffff 33.3% 36.6%,
    #007a4d 36.6% 63.3%,
    #ffffff 63.3% 66.6%,
    #002395 66.6% 100%
  );
}

/* 🇦🇺 オーストラリア: 紺地 + 赤アクセント（簡略） */
.currency-btn[data-currency="AUD"] {
  --btn-c1: #00247d;
  background:
    radial-gradient(circle at 22% 28%, rgba(255,255,255,0.35) 0 14%, transparent 15%),
    radial-gradient(circle at 22% 28%, #cf142b 0 6%, transparent 7%),
    #00247d;
}

/* 🇳🇿 ニュージーランド: 紺地 + 赤星アクセント（簡略） */
.currency-btn[data-currency="NZD"] {
  --btn-c1: #00247d;
  background:
    radial-gradient(circle at 75% 50%, #cf142b 0 5%, transparent 6%),
    radial-gradient(circle at 22% 28%, rgba(255,255,255,0.35) 0 14%, transparent 15%),
    #00247d;
}

/* ---- 日付クイックボタン ---- */
.date-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  margin-top: 0.3em;
}
.btn-shortcut {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.7em;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 5px;
  font-size: 0.82rem;
  color: var(--c-text-sub);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.05s;
  font-family: inherit;
  line-height: 1.3;
  white-space: nowrap;
}
.btn-shortcut:hover {
  background: var(--c-accent-light);
  color: var(--c-accent-dark);
  border-color: var(--c-accent);
}
.btn-shortcut:active,
.btn-shortcut.btn-shortcut-active {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
  transform: translateY(1px);
}
.calc-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.8em;
  margin-top: 0.4em;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 1.4em;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--c-text-sub); border: 1px solid var(--c-border); }

@media (max-width: 640px) {
  .calc-form { grid-template-columns: 1fr; }
}

/* ---- 比較ヒーロー（★本商品 行）モバイル対応 ---- */
@media (max-width: 480px) {
  .compare-hero {
    grid-template-columns: 1fr !important;
    gap: 0.3em !important;
    align-items: flex-start !important;
  }
  .compare-hero-gain {
    font-size: 1.4rem !important;
    text-align: left !important;
  }
  .compare-hero-label {
    font-size: 1rem !important;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
}

/* ---- ページタイトル行（h1 + ざっくり/詳細トグル） ---- */
.page-title-row {
  display: flex;
  align-items: center;
  gap: 0.7em;
  flex-wrap: wrap;
  margin-bottom: 0.5em;
}
.page-title-row h1 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.page-mode-toggle {
  padding: 0.7em 1.6em;
  background: #c0392b;
  border: 3px solid #c0392b;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 8px rgba(192, 57, 43, 0.25);
  transition: all 0.15s ease;
}
.page-mode-toggle:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(192, 57, 43, 0.4);
}
.page-mode-toggle.is-active {
  background: #0b5fa3;
  border-color: #0b5fa3;
  color: #fff;
  box-shadow: 0 3px 8px rgba(11, 95, 163, 0.25);
}
.page-mode-toggle.is-active:hover {
  background: #084a82;
  border-color: #084a82;
  box-shadow: 0 6px 14px rgba(11, 95, 163, 0.4);
}
@media (max-width: 480px) {
  .page-mode-toggle {
    padding: 0.6em 1.3em;
    font-size: 1.05rem;
    border-width: 2.5px;
  }
}

/* ---- JGB ざっくりモードのタイプ選択ボタン ---- */
.jgb-z-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4em;
  margin-bottom: 0.8em;
}
.jgb-z-type {
  padding: 0.65em 0.4em;
  background: #fff;
  border: 2px solid #fecaca;
  border-radius: 8px;
  color: #c0392b;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  min-width: 0;
}
.jgb-z-type:hover {
  background: #fef2f2;
}
.jgb-z-type.is-active {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.25);
}

/* ---- UST ざっくりモードの年限選択ボタン（4年限） ---- */
.ust-z-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35em;
  margin-bottom: 0.8em;
}
.ust-z-type {
  padding: 0.65em 0.3em;
  background: #fff;
  border: 2px solid #bfdbfe;
  border-radius: 8px;
  color: #0b5fa3;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  min-width: 0;
}
.ust-z-type:hover {
  background: #eff6ff;
}
.ust-z-type.is-active {
  background: #0b5fa3;
  color: #fff;
  border-color: #0b5fa3;
  box-shadow: 0 2px 6px rgba(11, 95, 163, 0.25);
}

/* ---- イントロのチェックリスト（h1 直下） ---- */
.intro-checklist {
  margin: 1em 0 1.6em;
}
.intro-checklist-item {
  margin: 0.5em 0;
  padding: 0.7em 1em;
  background: #f7f9fc;
  border-left: 4px solid var(--c-accent);
  border-radius: 0 6px 6px 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--c-text);
}
.intro-checklist-item strong { color: var(--c-accent-dark); }

/* ---- 比較パネル下の免責 ---- */
.compare-disclaimer {
  margin: 0.4em 0 0;
  padding: 0 0.2em;
  font-size: 0.74rem;
  color: var(--c-muted);
  line-height: 1.6;
}

/* ---- 折りたたみセクション ---- */
details.collapsible {
  margin: 1.4em 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
details.collapsible[open] {
  box-shadow: 0 2px 10px rgba(11, 95, 163, 0.05);
}
details.collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85em 1.2em;
  background: #f7f9fc;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.15s ease;
  border-bottom: 1px solid transparent;
}
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary:hover { background: #eef2f7; }
details.collapsible[open] > summary {
  background: #e8f0f8;
  border-bottom-color: var(--c-border);
}
details.collapsible > summary::after {
  content: '＋';
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--c-accent);
  margin-left: 0.6em;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
details.collapsible[open] > summary::after {
  content: '−';
}
details.collapsible > .collapsible-body {
  padding: 1.2em 1.5em;
}
details.collapsible > .collapsible-body > *:first-child {
  margin-top: 0;
}
details.collapsible > .collapsible-body > *:last-child {
  margin-bottom: 0;
}

/* ---- 結果表示 ---- */
.result {
  margin-top: 1.5em;
  padding: 1.2em 1.5em;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5em 0;
  border-bottom: 1px dashed var(--c-border);
}
.result-row:last-child { border-bottom: 0; }
.result-label { color: var(--c-text-sub); font-size: 0.92rem; }
.result-value { font-family: var(--ff-num); font-size: 1.1rem; font-weight: 600; color: var(--c-text); }
.result-value.highlight { color: var(--c-accent); font-size: 1.35rem; }
.result-value.positive { color: var(--c-positive); }
.result-value.negative { color: var(--c-negative); }

/* ---- アフィカード ---- */
.affi-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 1em 1.2em;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin: 1em 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.05s;
}
.affi-card::before {
  content: "PR";
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: #6b7280;
  color: #fff;
  padding: 1px 6px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 3px;
  line-height: 1.4;
  z-index: 2;
}
.affi-card:hover { box-shadow: var(--shadow-md); }
.affi-card:active { transform: translateY(1px); }
.affi-logo {
  flex: 0 0 80px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg-alt);
  border-radius: 4px;
  font-weight: 700;
  color: var(--c-text);
  font-size: 0.85rem;
  overflow: hidden;
}
.affi-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.affi-body { flex: 1; }
.affi-title { font-weight: 600; margin: 0; }
.affi-desc { font-size: 0.88rem; color: var(--c-text-sub); margin: 0.2em 0 0; }
.affi-cta {
  flex: 0 0 auto;
  padding: 0.5em 1em;
  background: var(--c-accent);
  color: #fff;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 600;
}
.affi-cta:hover { background: var(--c-accent-dark); text-decoration: none; }

/* ---- 注意ブロック ---- */
.note {
  padding: 1em 1.2em;
  background: #fff8e8;
  border-left: 4px solid var(--c-warning);
  border-radius: 4px;
  font-size: 0.93rem;
  margin: 1.2em 0;
}
.note-danger {
  background: #fdecea;
  border-left-color: var(--c-negative);
}

/* ---- テーブル（スマホ横スクロール対応） ---- */
table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.94rem;
}
@media (min-width: 720px) {
  table { display: table; }
}
th, td {
  padding: 0.7em 0.9em;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
th {
  background: var(--c-bg-alt);
  font-weight: 600;
  color: var(--c-text-sub);
  white-space: nowrap;
}
td.num { text-align: right; font-family: var(--ff-num); }
/* トップページのbrokers表は元のtable挙動を維持 */
.top-brokers-table { display: table; }
html { scroll-padding-top: 72px; }
@media (max-width: 480px) {
  html { scroll-padding-top: 60px; }
}

/* ---- ヒーロー（トップページ用） ---- */
.hero {
  text-align: center;
  padding: 3em 0 2em;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 2em;
}
.hero h1 {
  border: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 0.4em;
}
.hero .lead {
  font-size: 1.1rem;
  color: var(--c-text-sub);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
 * トップページ 専用スタイル
 * ============================================================ */

/* ── ヒーロー ── */
.top-hero {
  text-align: center;
  padding: 3em 1em 2.4em;
  background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
  border-radius: 0 0 32px 32px;
  margin: -2em -20px 2em;
}
.top-hero-tag {
  display: inline-block;
  padding: 0.4em 1em;
  background: rgba(11, 95, 163, 0.08);
  color: var(--c-accent-dark);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1em;
}
.top-hero-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.4;
  margin: 0 0 0.7em;
  border: none;
  padding: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.top-hero-em {
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-positive) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.top-hero-lead {
  max-width: 640px;
  margin: 0 auto 1.4em;
  font-size: 1rem;
  color: var(--c-text-sub);
}
.top-hero-cta {
  display: flex;
  gap: 0.7em;
  justify-content: center;
  flex-wrap: wrap;
}
.top-hero-btn {
  padding: 0.85em 1.6em;
  font-size: 1rem;
  border-radius: 12px;
}

/* ── 市場ダッシュボード ── */
.top-dashboard {
  margin: 2em 0;
  padding: 1.5em 1.4em;
  background: linear-gradient(135deg, #0b1220 0%, #1e1b4b 100%);
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 12px 32px rgba(11, 18, 32, 0.18);
}
.top-dashboard-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1em;
  flex-wrap: wrap;
  gap: 0.5em;
}
.top-dashboard-head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
  padding: 0;
  border: none;
}
.top-dashboard-source {
  font-size: 0.78rem;
  color: #6cc1ff;
  font-family: var(--ff-num);
}
.top-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85em;
}
.dash-tile {
  display: block;
  padding: 1em 1em 1.1em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.dash-tile:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(108, 193, 255, 0.5);
  transform: translateY(-2px);
  text-decoration: none;
}
.dash-tile-label {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
  margin-bottom: 0.4em;
}
.dash-tile-value {
  font-family: var(--ff-num);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #6cc1ff 0%, #00e5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.dash-tile-unit {
  display: inline;
  font-size: 0.78rem;
  font-family: var(--ff-num);
  color: rgba(255, 255, 255, 0.55);
  margin-left: 0.3em;
}
.dash-tile-cta {
  margin-top: 0.7em;
  font-size: 0.76rem;
  color: rgba(108, 193, 255, 0.9);
  font-weight: 600;
}

/* ── サイト説明セクション ── */
.top-intro {
  margin: 2.5em 0;
  padding: 2em 1.5em;
  background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
  border-radius: 18px;
  text-align: center;
}
.top-intro-tag {
  display: inline-block;
  padding: 0.4em 1em;
  background: rgba(11, 95, 163, 0.08);
  color: var(--c-accent-dark);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1em;
}
.top-intro-title {
  /* 2行目「為替・税金込みで計算する。」(12文字) が1行に収まるよう、
     container(40px) + top-intro padding(48px) + 余裕(20px) = 108px を
     viewport から引いて12で割る */
  font-size: clamp(1rem, calc((100vw - 108px) / 12), 2.2rem);
  line-height: 1.4;
  margin: 0 0 0.8em;
  border: none;
  padding: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}
@media (max-width: 480px) {
  /* モバイル時 top-intro の padding を詰めて見出しを最大化 */
  .top-intro { padding: 1.4em 0.9em; }
}
.top-intro-lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--c-text-sub);
  line-height: 1.8;
}

/* ── 簡易シミュレーター（日米切替） ── */
.quick-calc {
  margin: 1em 0 2em;
  padding: 1.4em 1.4em 1.3em;
  background: linear-gradient(135deg, #fff8f6 0%, #ffeae3 100%);
  border: 2px solid #fecaca;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.07);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
@media (max-width: 480px) {
  /* スマホでは見出しを最大化するため左右パディングを詰める */
  .quick-calc { padding: 1em 0.95em 0.95em; }
}
.quick-calc[data-mode="ust"] {
  background: linear-gradient(135deg, #f6f9ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
  box-shadow: 0 8px 20px rgba(11, 95, 163, 0.08);
}

.quick-calc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  flex-wrap: wrap;
  margin-bottom: 1em;
}
.quick-calc-heading {
  margin: 0 0 0.4em 0;
  /* 14文字「国債・債券でいくらもらえる？」が1行に収まる最大サイズ。
     container padding(40px) + quick-calc padding(~30px) + border(4px)
     + marker padding 安全マージン = 約90px を viewport から引く */
  font-size: clamp(0.95rem, calc((100vw - 90px) / 14), 1.9rem);
  color: #1a202c;
  border: none;
  padding: 0;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
  /* 万一はみ出した時の最終防衛として若干の文字圧縮を許容 */
  text-wrap: balance;
}

/* ---- 黄色マーカー風 見出し装飾 ---- */
.marker-heading {
  background-image: linear-gradient(transparent 55%, #fef08a 55%, #fef08a 95%, transparent 95%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 0.2em;
  /* テキスト幅だけにマーカーがかかるよう inline-block */
  display: inline-block;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  /* デフォルトh1のborder-bottom（青線）を打ち消す */
  border-bottom: none;
  padding-bottom: 0;
}

/* ---- インライン マーカー（テキスト強調用 3色） ---- */
.marker-yellow,
.marker-red,
.marker-blue {
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 0.15em;
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.marker-yellow { background-image: linear-gradient(transparent 55%, #fef08a 55%, #fef08a 95%, transparent 95%); }
.marker-red    { background-image: linear-gradient(transparent 55%, #fecaca 55%, #fecaca 95%, transparent 95%); }
.marker-blue   { background-image: linear-gradient(transparent 55%, #bae6fd 55%, #bae6fd 95%, transparent 95%); }
/* page-title-row 内の h1 はマーカー時にflex内で適切に表示するため */
.page-title-row h1.marker-heading {
  flex: 0 1 auto;
}
.quick-calc-lead {
  margin: 0 0 1.2em 0;
  font-size: 0.94rem;
  color: var(--c-text-sub);
  line-height: 1.65;
}
.quick-calc-subheading {
  margin: 0;
  /* 12文字「日本国債でいくらになる？」が1行に収まる最大サイズ。 */
  font-size: clamp(1.2rem, calc((100vw - 80px) / 12), 2.4rem);
  color: #7c2d12;
  border: none;
  padding: 0;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}
.quick-calc[data-mode="ust"] .quick-calc-subheading { color: #0b3a6f; }

/* モード切替トグル（色は「切り替え先」の色） */
.qc-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.55em 1.1em;
  background: #fff;
  border: 2px solid #0b5fa3;
  border-radius: 999px;
  color: #0b5fa3;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.qc-mode-toggle:hover {
  background: #0b5fa3;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 95, 163, 0.28);
}
.quick-calc[data-mode="ust"] .qc-mode-toggle {
  border-color: #c0392b;
  color: #c0392b;
}
.quick-calc[data-mode="ust"] .qc-mode-toggle:hover {
  background: #c0392b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.28);
}
/* モバイルではトグルボタンを大きく（タップ領域確保＋視認性UP） */
@media (max-width: 768px) {
  .qc-mode-toggle {
    padding: 0.75em 1.4em;
    font-size: 1rem;
    min-height: 48px;
    gap: 0.55em;
  }
}
.qc-mode-toggle-icon {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

/* レイアウト */
.quick-calc-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9em;
}
@media (min-width: 760px) {
  .quick-calc-body {
    grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr);
    align-items: start;
  }
}

/* 投資金額入力 */
.quick-calc-input {
  background: #fff;
  padding: 0.85em 1em 0.95em;
  border-radius: 12px;
  border: 1px solid #fecaca;
  transition: border-color 0.3s ease;
}
.quick-calc[data-mode="ust"] .quick-calc-input { border-color: #bfdbfe; }
.quick-calc-input label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: #7c2d12;
  margin-bottom: 0.45em;
  transition: color 0.3s ease;
}
.quick-calc[data-mode="ust"] .quick-calc-input label { color: #0b3a6f; }
.qc-amount-row {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 0.55em;
}
.qc-amount-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--ff-num);
  font-size: 1.5rem;
  font-weight: 800;
  padding: 0.35em 0.6em;
  border: 2px solid #fecaca;
  border-radius: 8px;
  color: var(--c-text);
  text-align: right;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.qc-amount-row input:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.quick-calc[data-mode="ust"] .qc-amount-row input { border-color: #bfdbfe; }
.quick-calc[data-mode="ust"] .qc-amount-row input:focus {
  border-color: #0b5fa3;
  box-shadow: 0 0 0 3px rgba(11, 95, 163, 0.15);
}
.qc-unit {
  font-size: 1rem;
  font-weight: 700;
  color: #7c2d12;
  transition: color 0.3s ease;
}
.quick-calc[data-mode="ust"] .qc-unit { color: #0b3a6f; }
.qc-amount-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.3em;
}
.qc-amount-presets button {
  padding: 0.34em 0.2em;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #c0392b;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
  min-width: 0;
}
/* モバイルではプリセット5個を3列+2列の二行に分け、各ボタンを大きく */
@media (max-width: 540px) {
  .qc-amount-presets {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45em;
  }
  .qc-amount-presets button {
    font-size: 0.95rem;
    padding: 0.7em 0.3em;
    min-height: 44px;
  }
}
@media (max-width: 380px) {
  .qc-amount-presets button { font-size: 0.88rem; padding: 0.65em 0.2em; }
}
.qc-amount-presets button:hover {
  background: #fef2f2;
  border-color: #c0392b;
}
.quick-calc[data-mode="ust"] .qc-amount-presets button {
  border-color: #bfdbfe;
  color: #0b5fa3;
}
.quick-calc[data-mode="ust"] .qc-amount-presets button:hover {
  background: #eff6ff;
  border-color: #0b5fa3;
}

/* 結果 */
.quick-calc-result {
  background: #fff;
  padding: 0.95em 1em 0.9em;
  border-radius: 12px;
  border: 1px solid #fecaca;
  transition: border-color 0.3s ease;
}
.quick-calc[data-mode="ust"] .quick-calc-result { border-color: #bfdbfe; }
.qc-result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 0.7em;
  padding-bottom: 0.6em;
  border-bottom: 1px dashed #fecaca;
  font-size: 0.86rem;
  color: #7c2d12;
  font-weight: 700;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.quick-calc[data-mode="ust"] .qc-result-meta {
  color: #0b3a6f;
  border-bottom-color: #bfdbfe;
}
.qc-rate-label { color: var(--c-text-sub); font-weight: 500; }
.qc-rate-label strong {
  color: #c0392b;
  font-family: var(--ff-num);
  font-size: 1.05rem;
  font-weight: 800;
  margin-left: 0.15em;
  transition: color 0.3s ease;
}
.quick-calc[data-mode="ust"] .qc-rate-label strong { color: #0b5fa3; }

/* 受取総額メインセル（大型・イラスト付き） */
.qc-cell-main {
  padding: 1.2em 1.2em 1.1em;
  background: linear-gradient(135deg, #c0392b 0%, #dc2626 100%);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.9em;
  transition: background 0.4s ease;
}
.quick-calc[data-mode="ust"] .qc-cell-main {
  background: linear-gradient(135deg, #0b5fa3 0%, #1e6dbd 100%);
}
.qc-cell-main .qc-cell-icon {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
}
.qc-cell-main .qc-cell-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.qc-cell-main .qc-cell-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.4em;
  letter-spacing: 0.01em;
}
.qc-cell-main .qc-cell-value {
  font-family: var(--ff-num);
  font-size: clamp(1.9rem, 6.5vw, 2.9rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
}
.qc-cell-main .qc-cell-unit {
  font-size: 0.42em;
  font-weight: 700;
  margin-left: 0.2em;
}
@media (max-width: 520px) {
  .qc-cell-main {
    /* スマホ: 受取額を上、画像を下に配置（金額にまず注目させる） */
    flex-direction: column-reverse;
    gap: 0.6em;
    padding: 1.1em 1em 1em;
  }
  .qc-cell-main .qc-cell-icon { width: 90px; height: 90px; }
}

/* 注意書き */
.qc-note {
  margin: 0.75em 0 0;
  font-size: 0.76rem;
  color: var(--c-text-sub);
  line-height: 1.6;
}
.qc-note strong { color: #7c2d12; font-weight: 700; }
.quick-calc[data-mode="ust"] .qc-note strong { color: #0b3a6f; }
.qc-note a { font-weight: 700; }

/* ---- 簡易シミュレーター 詳細誘導 CTA ボタン ---- */
.qc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  margin-top: 0.8em;
  padding: 0.95em 1.2em;
  background: linear-gradient(135deg, #c0392b 0%, #dc2626 100%);
  color: #fff !important;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.32);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.qc-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.qc-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(192, 57, 43, 0.45);
  color: #fff !important;
}
.qc-cta:hover::before {
  transform: translateX(100%);
}
.qc-cta-text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.qc-cta-arrow {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  font-weight: 900;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.qc-cta:hover .qc-cta-arrow {
  transform: translateX(4px);
}
.quick-calc[data-mode="ust"] .qc-cta {
  background: linear-gradient(135deg, #0b5fa3 0%, #1e6dbd 100%);
  box-shadow: 0 6px 16px rgba(11, 95, 163, 0.32);
}
.quick-calc[data-mode="ust"] .qc-cta:hover {
  box-shadow: 0 10px 22px rgba(11, 95, 163, 0.45);
}
@media (max-width: 480px) {
  .qc-cta {
    font-size: 0.92rem;
    padding: 0.85em 1em;
  }
  .qc-cta-arrow { font-size: 1.2rem; }
}

/* ── ツールカード（トップ専用 V1改 風） ── */
.top-tools { margin: 2.5em 0; }
.top-tools-first {
  /* 最上部に来る場合のスペーシング調整 */
  margin-top: 1em;
}
.top-tools-heading {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin: 0 0 0.4em;
  border-bottom: 3px solid var(--c-accent);
  padding-bottom: 0.4em;
}
.top-section-lead {
  color: var(--c-text-sub);
  font-size: 0.95rem;
  margin-bottom: 1.2em;
}
.top-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1em;
}
.top-tool-card {
  display: block;
  padding: 1.4em 1.3em 1.3em;
  background: #fff;
  border: 2px solid var(--c-border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--c-text);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.top-tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--tool-accent, var(--c-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.top-tool-card:hover {
  border-color: var(--tool-accent, var(--c-accent));
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(11, 95, 163, 0.14);
  text-decoration: none;
}
.top-tool-card:hover::before { transform: scaleX(1); }
.top-tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7em;
  gap: 0.7em;
}
.top-tool-tag {
  display: inline-block;
  padding: 0.4em 1em;
  background: var(--tool-tag-bg, var(--c-accent-light));
  color: var(--tool-accent, var(--c-accent-dark));
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.top-tool-rate {
  font-family: var(--ff-num);
  font-weight: 900;
  color: var(--tool-accent, var(--c-accent-dark));
  letter-spacing: -0.04em;
  line-height: 1;
}
.top-tool-rate .num { font-size: 1.9rem; }
.top-tool-rate .pct { font-size: 1rem; margin-left: 0.05em; }
.top-tool-card h3 {
  margin: 0 0 0.5em;
  font-size: 1.15rem;
  color: var(--c-text);
}
.top-tool-card p {
  margin: 0 0 1em;
  color: var(--c-text-sub);
  font-size: 0.92rem;
  line-height: 1.6;
}
.top-tool-foot {
  display: flex;
  gap: 0.45em;
  flex-wrap: wrap;
}
.top-tool-feature {
  display: inline-block;
  padding: 0.18em 0.7em;
  background: #f1f5f9;
  color: var(--c-text-sub);
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 500;
}
/* ツールカード別カラー */
.top-tool-jgb { --tool-accent: #c0392b; --tool-tag-bg: #fee2e2; }
.top-tool-strip { --tool-accent: #16a34a; --tool-tag-bg: #d1fae5; }
.top-tool-ust { --tool-accent: #0b5fa3; --tool-tag-bg: #dbeafe; }
.top-tool-em { --tool-accent: #b76b00; --tool-tag-bg: #fef3c7; }

/* ── 比較ガイド ── */
.top-compare { margin: 2.5em 0; }
.top-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1em;
}
.top-compare-card {
  display: block;
  padding: 1.5em;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 60%);
  border: 2px solid #fde68a;
  border-radius: 16px;
  text-decoration: none;
  color: var(--c-text);
  transition: all 0.2s ease;
}
.top-compare-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(251, 191, 36, 0.2);
  border-color: #f59e0b;
  text-decoration: none;
}
.top-compare-icon { font-size: 2rem; margin-bottom: 0.4em; }
.top-compare-card h3 { margin: 0 0 0.5em; color: var(--c-text); }
.top-compare-card p { margin: 0 0 0.7em; color: var(--c-text-sub); font-size: 0.92rem; }
.top-compare-arrow { color: #b45309; font-weight: 700; font-size: 0.92rem; }

/* ── なぜ手取り利回り ── */
.top-why { margin: 2.5em 0; padding: 2em 1.5em; background: #f7f9fc; border-radius: 16px; }
.top-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1em;
  margin: 1.2em 0;
}
.top-why-card {
  padding: 1.2em 1em;
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid var(--c-accent);
}
.top-why-num {
  font-family: var(--ff-serif, "Hiragino Mincho ProN", serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: 0.3em;
}
.top-why-card h3 { margin: 0 0 0.5em; font-size: 1.05rem; color: var(--c-text); }
.top-why-card p { margin: 0; font-size: 0.9rem; color: var(--c-text-sub); line-height: 1.6; }
.top-why-conclusion {
  text-align: center;
  margin: 1.5em 0 0;
  font-size: 0.98rem;
  color: var(--c-text);
}

/* ── 取扱証券会社 ── */
.top-brokers { margin: 2.5em 0; }
.top-brokers-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.top-brokers-table th {
  background: var(--c-text);
  color: #fff;
  text-align: left;
  padding: 0.85em 1em;
  font-size: 0.9rem;
}
.top-brokers-table td {
  padding: 0.85em 1em;
  border-bottom: 1px solid var(--c-border);
}
.top-brokers-table tr:last-child td { border-bottom: none; }
.top-brokers-note {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-top: 0.5em;
}

@media (max-width: 600px) {
  .top-hero { margin: -1em -20px 1.5em; padding: 2em 1em 1.8em; }
  .top-dashboard { padding: 1.2em 1em; }
  .dash-tile-value { font-size: 1.6rem; }
  .top-tool-rate .num { font-size: 1.5rem; }
}

/* ---- ツール一覧カード ---- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2em;
  margin: 1.5em 0;
}
.tool-card {
  display: block;
  padding: 1.4em;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--c-text);
  transition: box-shadow 0.15s, transform 0.05s, border-color 0.15s;
}
.tool-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  border-color: var(--c-accent);
}
.tool-card h3 {
  margin: 0 0 0.4em;
  color: var(--c-accent-dark);
}
.tool-card p {
  margin: 0;
  color: var(--c-text-sub);
  font-size: 0.93rem;
}
.tool-card .tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  background: var(--c-accent-light);
  color: var(--c-accent-dark);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.6em;
}

/* ============ 速報バッジ（緊急記事用・脈動アニメ付き） ============ */
@keyframes badge-sokuho-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  50%      { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}
.badge-sokuho {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  padding: 0.22em 0.65em;
  border-radius: 4px;
  font-size: 0.62em;
  font-weight: 900;
  vertical-align: middle;
  margin-right: 0.45em;
  letter-spacing: 0.08em;
  line-height: 1.2;
  animation: badge-sokuho-pulse 1.8s infinite;
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
/* hover/タップ時に少し縮小して触感を出す */
a:hover .badge-sokuho { transform: scale(0.97); transition: transform 0.15s; }
/* リンク内の白文字に負けないように */
a .badge-sokuho { color: #fff !important; }


/* ============ シニア向け モバイルタップ最適化（2026-06-07） ============ */
/* ユーザー属性で 55歳以上が中心・モバイル98.9% と判明。
   Apple/Google ガイドラインの最小タップ領域 48x48px を全主要ボタンに保証 */
@media (max-width: 768px) {
  /* 汎用ボタン: 最低48px高、文字も微増 */
  .btn {
    min-height: 48px;
    padding: 0.85em 1.6em;
    font-size: 1.05rem;
  }
  /* アフィCTA: 収益直結ボタン・最優先で拡大 */
  .affi-cta {
    min-height: 48px;
    padding: 0.85em 1.4em;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* フォーム入力欄: iOS自動ズーム防止のため16px以上必須 */
  .calc-field select,
  .calc-field input[type="text"],
  .calc-field input[type="number"],
  .contact-field input[type="text"],
  .contact-field input[type="email"],
  .contact-field input[type="url"],
  .contact-field textarea {
    min-height: 48px;
    font-size: 16px; /* iOS Safari の自動ズーム回避 */
    padding: 0.75em 0.9em;
  }
  /* ショートカット小ボタン: 40px最低保証 */
  .btn-shortcut {
    min-height: 40px;
    padding: 0.5em 1em;
    font-size: 0.95rem;
  }
  /* カード型タップ領域: ホームの導線ボタンを拡大 */
  .top-tool-card,
  .top-compare-card,
  .tool-card {
    min-height: 92px;
  }
  /* チェックボックス・ラジオボタン: タップしやすく */
  .contact-agree input[type="checkbox"] {
    min-width: 22px;
    min-height: 22px;
  }
  /* 折りたたみ summary: タップ領域を広く */
  .collapsible > summary {
    min-height: 44px;
    padding: 0.7em 1em;
  }
}
