/* ============================================================
   俺も クレジットカードポイント最適化シミュレーター
   スタイルシート
============================================================ */

  #ccsim-root {
    --navy: #16202f;
    --navy-2: #2f4560;
    --silver: #a9bdd9;
    --silver-light: #cfdcee;
    --silver-bg: #eef2f8;
    --gold: #eb9b2e;
    --gold-light: #f7c65b;
    --gold-text: #a8650d;
    --gold-bg: #fff3de;
    --blue: #2f6fb0;
    --blue-bg: #eaf2fa;
    --cream: #f8f6ef;
    --white: #ffffff;
    --text: #262420;
    --text-muted: #6b6558;
    --red: #b3392b;
    --red-bg: #fbeae7;
    --border: #e2e4ea;
    --radius: 14px;
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.7;
    max-width: 760px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  #ccsim-root *, #ccsim-root *::before, #ccsim-root *::after { box-sizing: border-box; }

  /* ---------- ヘッダー（中央揃え・シリーズ共通バナー） ---------- */
  .ccsim-header { display: flex; justify-content: center; padding: 0; background: var(--white); border-bottom: 1px solid var(--border); }
  .ccsim-header a { display: block; line-height: 0; width: 100%; }
  .ccsim-header-banner { width: 100%; max-width: 100%; height: auto; display: block; }

  /* ---------- ヒーロー ---------- */
  .ccsim-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 30px 20px 26px; text-align: center; }
  .ccsim-hero-badge { display: inline-block; font-size: 11px; letter-spacing: 0.05em; background: rgba(247,198,91,0.22); border: 1px solid rgba(247,198,91,0.55); color: #ffe4ad; padding: 4px 12px; border-radius: 100px; margin-bottom: 12px; }
  .ccsim-hero h1 { font-size: 21px; margin: 0 0 8px; font-weight: 800; }
  .ccsim-hero p { font-size: 13px; margin: 0; color: rgba(255,255,255,0.82); }

  /* ---------- セクション共通 ---------- */
  .ccsim-section { padding: 24px 16px; }
  .ccsim-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
  .ccsim-card h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
  .ccsim-card h2::before { content: ""; width: 4px; height: 16px; background: var(--gold); border-radius: 2px; display: inline-block; }
  .ccsim-card .ccsim-card-intro { font-size: 12.5px; color: var(--text-muted); margin: -8px 0 16px; }

  /* ---------- ウィザード：進捗バー ---------- */
  .ccsim-progress { margin-bottom: 22px; }
  .ccsim-progress-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
  .ccsim-progress-fill { height: 100%; background: linear-gradient(90deg, var(--silver), var(--gold-light)); border-radius: 3px; width: 25%; transition: width 0.35s ease; }
  .ccsim-progress-labels { display: flex; justify-content: space-between; }
  .ccsim-progress-labels span { font-size: 10.5px; color: var(--text-muted); font-weight: 600; flex: 1; text-align: center; }
  .ccsim-progress-labels span.active { color: var(--navy); }
  .ccsim-progress-labels span:first-child { text-align: left; }
  .ccsim-progress-labels span:last-child { text-align: right; }

  /* ---------- ステップ ---------- */
  .ccsim-step { display: none; }
  .ccsim-step.active { display: block; animation: ccsimSlideIn 0.35s cubic-bezier(.2,.8,.2,1); }
  @keyframes ccsimSlideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
  .ccsim-step-title { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
  .ccsim-step-desc { font-size: 12.5px; color: var(--text-muted); margin-bottom: 20px; }

  /* ---------- 入力：ツールチップ付きシンプル入力 ---------- */
  .ccsim-field { margin-bottom: 24px; }
  .ccsim-field-label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
  .ccsim-field-label { font-size: 13px; font-weight: 700; color: var(--text); }
  .ccsim-tip-icon { width: 16px; height: 16px; border-radius: 50%; background: var(--border); color: var(--text-muted); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; flex-shrink: 0; }
  .ccsim-tip-bubble { display: none; position: absolute; left: 50%; top: 22px; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 11px; font-weight: 400; line-height: 1.5; padding: 8px 12px; border-radius: 8px; width: 220px; z-index: 5; text-align: left; }
  .ccsim-tip-icon.open .ccsim-tip-bubble { display: block; }

  .ccsim-amount-input { display: flex; align-items: baseline; gap: 6px; border-bottom: 2px solid var(--border); padding-bottom: 8px; transition: border-color 0.2s ease; }
  .ccsim-amount-input:focus-within { border-color: var(--navy); }
  .ccsim-amount-input .ccsim-yen { font-size: 18px; font-weight: 700; color: var(--gold-text); }
  .ccsim-amount-input input[type="number"] { border: none; background: transparent; font-size: 26px; font-weight: 800; color: var(--navy); width: 100%; font-family: inherit; padding: 0; -moz-appearance: textfield; transition: color 0.2s ease; }
  .ccsim-amount-input input[type="number"]::-webkit-outer-spin-button, .ccsim-amount-input input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .ccsim-amount-input input[type="number"]:focus { outline: none; }
  .ccsim-amount-input .ccsim-permonth { font-size: 12px; color: var(--text-muted); }

  .ccsim-quick-row { display: flex; gap: 4px; margin-top: 9px; }
  .ccsim-quick-btn { font-size: 10.5px; font-weight: 700; border-radius: 100px; padding: 6px 4px; cursor: pointer; transition: transform 0.1s ease; flex: 1; border: 1px solid transparent; }
  .ccsim-quick-btn.minus { color: var(--red); background: var(--red-bg); border-color: #f0d2ca; }
  .ccsim-quick-btn.plus { color: var(--blue); background: var(--blue-bg); border-color: #cfe0f0; margin-left: 6px; }
  .ccsim-quick-btn:first-child.plus { margin-left: 6px; }
  .ccsim-quick-btn:active { transform: scale(0.92); }

  /* ---------- チップ選択 ---------- */
  .ccsim-chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
  .ccsim-chip-group.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .ccsim-chip { position: relative; }
  .ccsim-chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .ccsim-chip label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--cream); border: 1.5px solid var(--border); padding: 10px 14px; border-radius: 100px; cursor: pointer; transition: all 0.15s ease; }
  .ccsim-chip-group.grid2 label { border-radius: 12px; padding: 12px 14px; }
  .ccsim-chip input:checked + label { background: var(--silver-bg); border-color: var(--navy-2); color: var(--navy); }
  .ccsim-chip input:checked + label::after { content: "✓"; margin-left: auto; color: var(--navy); font-weight: 800; }
  .ccsim-chip .ccsim-chip-emoji { font-size: 15px; }

  /* ---------- ナビゲーション ---------- */
  .ccsim-step-nav { display: flex; gap: 10px; margin-top: 8px; }
  .ccsim-btn { flex: 1; padding: 14px; font-size: 14px; font-weight: 700; border-radius: 100px; cursor: pointer; border: none; font-family: inherit; transition: transform 0.15s ease; }
  .ccsim-btn:active { transform: scale(0.98); }
  .ccsim-btn-primary { color: #fff; background: linear-gradient(135deg, var(--gold), var(--gold-light)); box-shadow: 0 4px 14px rgba(235,155,46,0.35); }
  .ccsim-btn-ghost { background: var(--cream); color: var(--text-muted); border: 1px solid var(--border); flex: 0 0 90px; }

  /* ---------- 結果：共通 ---------- */
  #ccsim-results { display: none; }
  #ccsim-results.show { display: block; }
  .ccsim-result-eyebrow { text-align: center; font-size: 11px; color: var(--gold-text); font-weight: 700; letter-spacing: 0.08em; margin-bottom: 6px; }
  .ccsim-result-heading { text-align: center; font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 22px; }

  /* キャラ診断 */
  .ccsim-char-head { text-align: center; margin-bottom: 6px; }
  .ccsim-char-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--silver-bg); display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 10px; }
  .ccsim-char-icon.pop { animation: ccsimPop 0.55s cubic-bezier(.25,1.6,.5,1); }
  @keyframes ccsimPop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
  .ccsim-char-name { font-size: 20px; font-weight: 800; color: var(--navy); }
  .ccsim-char-rank { display: inline-block; margin-top: 6px; font-size: 11px; padding: 3px 12px; border-radius: 6px; font-weight: 700; }
  .ccsim-rank-s { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #fff; }
  .ccsim-rank-bplus { background: linear-gradient(135deg, var(--silver-light), var(--gold-light)); color: #6b4d0f; }
  .ccsim-rank-b { background: var(--silver-bg); color: var(--navy); }
  .ccsim-rank-c { background: #ece3d4; color: #7a6a4a; }
  .ccsim-char-desc { font-size: 12.5px; color: var(--text); background: var(--cream); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }

  /* ドーナツチャート */
  .ccsim-donut-wrap { display: flex; align-items: center; gap: 20px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
  .ccsim-donut-outer { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
  .ccsim-donut-outer > div { position: absolute; inset: 0; border-radius: 50%; }
  .ccsim-donut-hole { inset: 20px !important; background: var(--white); z-index: 2; }
  .ccsim-donut-mask { z-index: 1; }
  .ccsim-donut-legend { flex: 1; min-width: 160px; }
  .ccsim-legend-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin-bottom: 7px; }
  .ccsim-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
  .ccsim-legend-label { color: var(--text-muted); flex: 1; }
  .ccsim-legend-pct { font-weight: 700; color: var(--navy); }

  /* ポイント獲得力カード（新設） */
  .ccsim-points-box { background: var(--blue-bg); border-radius: 10px; padding: 18px; text-align: center; }
  .ccsim-points-desc { font-size: 12.5px; color: var(--navy); margin-bottom: 8px; }
  .ccsim-points-desc strong { color: var(--blue); }
  .ccsim-points-amount { font-size: 15px; font-weight: 700; color: var(--navy); }
  .ccsim-points-amount span { font-size: 26px; font-weight: 800; color: var(--blue); margin: 0 2px; }

  /* 生涯損失額／お得額 */
  .ccsim-loss-box { background: var(--red-bg); border-radius: 10px; padding: 16px; text-align: center; margin-bottom: 12px; }
  .ccsim-loss-label { font-size: 12px; color: var(--red); margin-bottom: 4px; font-weight: 600; }
  .ccsim-loss-amount { font-size: 30px; font-weight: 800; color: var(--red); }
  .ccsim-gain-box { background: var(--gold-bg); border-radius: 10px; padding: 14px; text-align: center; margin-bottom: 18px; }
  .ccsim-gain-label { font-size: 11px; color: var(--gold-text); font-weight: 700; margin-bottom: 2px; }
  .ccsim-gain-amount { font-size: 22px; font-weight: 800; color: var(--gold-text); }
  .ccsim-gain-suffix { font-size: 12px; font-weight: 600; color: var(--gold-text); }
  .ccsim-glow { animation: ccsimGlow 0.9s ease; }
  @keyframes ccsimGlow { 0% { text-shadow: 0 0 0 rgba(235,155,46,0); } 40% { text-shadow: 0 0 20px rgba(235,155,46,0.9); } 100% { text-shadow: 0 0 0 rgba(235,155,46,0); } }

  /* 比較バーチャート（下揃え＋差額矢印＋バッジ） */
  .ccsim-comparechart { display: flex; align-items: flex-start; justify-content: center; gap: 10px; margin: 26px 0 6px; }
  .ccsim-barchart-item { display: flex; flex-direction: column; align-items: center; width: 96px; position: relative; padding-top: 26px; }
  .ccsim-barchart-value { font-size: 12px; font-weight: 800; color: var(--navy); margin-bottom: 6px; white-space: nowrap; height: 16px; }
  .ccsim-barchart-bar-wrap { width: 100%; height: 118px; display: flex; align-items: flex-end; justify-content: center; }
  .ccsim-barchart-bar { width: 46px; border-radius: 8px 8px 0 0; height: 0%; transition: height 0.9s cubic-bezier(.2,.8,.2,1); }
  .ccsim-barchart-item-label { font-size: 11px; color: var(--text-muted); margin-top: 8px; text-align: center; min-height: 30px; display: flex; align-items: flex-start; justify-content: center; line-height: 1.4; }
  .ccsim-winner-badge {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%) scale(0.6); opacity: 0;
    background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #fff; font-size: 10px; font-weight: 800;
    padding: 4px 10px; border-radius: 100px; white-space: nowrap; box-shadow: 0 3px 8px rgba(235,155,46,0.4);
    transition: transform 0.4s cubic-bezier(.25,1.6,.5,1), opacity 0.4s ease;
  }
  .ccsim-winner-badge.show { transform: translateX(-50%) scale(1); opacity: 1; }
  .ccsim-diff-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 70px; min-width: 56px; }
  .ccsim-diff-icon { font-size: 18px; color: var(--gold-text); line-height: 1; }
  .ccsim-diff-label { font-size: 12px; font-weight: 800; color: var(--gold-text); white-space: nowrap; margin-top: 2px; }

  .ccsim-invest-note { display: flex; gap: 8px; align-items: flex-start; background: var(--cream); border-radius: 10px; padding: 10px 12px; margin-top: 4px; font-size: 11.5px; color: var(--text-muted); }
  .ccsim-invest-note strong { color: var(--gold-text); font-weight: 800; }

  /* 組み合わせ最適化 */
  .ccsim-combo-scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
  .ccsim-scene-card { background: var(--cream); border-radius: 10px; padding: 10px 6px; text-align: center; }
  .ccsim-scene-emoji { font-size: 18px; }
  .ccsim-scene-label { font-size: 10px; color: var(--text-muted); margin: 4px 0 2px; }
  .ccsim-scene-card-name { font-size: 11px; font-weight: 700; color: var(--navy); }
  .ccsim-note-box { display: flex; gap: 8px; align-items: flex-start; background: var(--gold-bg); border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-size: 12px; color: #6b4d0f; font-weight: 600; }
  .ccsim-note-box strong { color: var(--gold-text); }

  .ccsim-caveats { font-size: 11.5px; color: var(--text-muted); }
  .ccsim-caveats li { margin-bottom: 6px; }

  .ccsim-share-row { display: flex; gap: 8px; margin-top: 6px; }
  .ccsim-share-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 8px; font-size: 12.5px; font-weight: 700; border-radius: 100px; cursor: pointer; font-family: inherit; transition: opacity 0.15s ease, transform 0.15s ease; }
  .ccsim-share-btn:active { transform: scale(0.97); }
  .ccsim-share-x { color: #fff; background: #000; border: 1px solid #000; }
  .ccsim-share-copy { color: var(--navy); background: var(--gold-bg); border: 1px solid var(--gold-light); position: relative; }
  .ccsim-share-copy.copied { background: var(--navy); border-color: var(--navy); color: #fff; }
  .ccsim-restart-link { text-align: center; margin-top: 12px; }
  .ccsim-restart-link a { font-size: 11.5px; color: var(--text-muted); text-decoration: underline; cursor: pointer; }

  /* ---------- 広告エリア ---------- */
  .ccsim-ad-section { padding: 8px 16px 24px; }
  .ccsim-ad-eyebrow { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.05em; }
  .ccsim-ad-card { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; text-decoration: none; color: inherit; }
  .ccsim-ad-icon { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; background: var(--silver-bg); display: flex; align-items: center; justify-content: center; font-size: 20px; }
  .ccsim-ad-title { font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
  .ccsim-ad-desc { font-size: 11.5px; color: var(--text-muted); }
  .ccsim-ad-pr { font-size: 9px; color: #fff; background: #b3a591; border-radius: 4px; padding: 1px 6px; margin-left: auto; flex-shrink: 0; align-self: flex-start; }

  /* ---------- フッター ---------- */
  .ccsim-footer { background: var(--navy); color: rgba(255,255,255,0.8); padding: 24px 16px 20px; }
  .ccsim-footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 14px; }
  .ccsim-footer-links a { color: #fff; font-size: 12.5px; text-decoration: none; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.4); padding-bottom: 2px; }
  .ccsim-disclaimer { font-size: 10.5px; line-height: 1.8; color: rgba(255,255,255,0.55); max-width: 600px; margin: 0 auto 14px; text-align: center; }
  .ccsim-copyright { text-align: center; font-size: 10.5px; color: rgba(255,255,255,0.45); }

  @media (max-width: 420px) {
    .ccsim-comparechart { gap: 4px; }
    .ccsim-barchart-item { width: 84px; }
    .ccsim-diff-arrow { min-width: 40px; }
    .ccsim-donut-wrap { flex-direction: column; }
    .ccsim-quick-btn { font-size: 9.5px; padding: 6px 2px; }
  }
