/* =====================================================
   スマホ料金比較ツール  style.css
   ----------------------------------------------------
   - 白ベース・清潔感のあるデザイン
   - スマホ優先のレスポンシブ
   - 表は横スクロール可、見出しは sticky に近い見た目
   ===================================================== */

/* ---------- リセット・基本 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans",
               "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: #1f2933;
  background: #f5f7fa;
  line-height: 1.6;
  font-size: 15px;
}

/* ---------- ヘッダー ---------- */
.page-header {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #eef3f9 100%);
  border-bottom: 1px solid #e4e8ef;
  padding: 24px 20px 20px;
  text-align: center;
}

/* 更新（強制リロード）ボタン：ヘッダー右上に固定配置。子連れスポットと同デザイン */
.force-update-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 19px;
  color: #0b5394;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.6s ease, background 0.2s, color 0.2s;
}
.force-update-btn:active {
  background: #eef3f9;
  color: #4facfe;
}
.force-update-btn.spinning {
  transform: rotate(720deg);
  color: #4facfe;
}

.page-header h1 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: #0b5394;
}

.page-header .subtitle {
  margin: 0;
  color: #52606d;
  font-size: 13px;
}

.data-updated-badge {
  display: inline-block;
  margin: 8px 0 0;
  padding: 3px 10px;
  font-size: 11px;
  color: #0b5394;
  background: #eef3f9;
  border: 1px solid #cbd9ee;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 非ランキング操作宣言（このツール最大の差別化を可視化） */
.no-ranking-badge {
  display: inline-block;
  margin: 6px 0 0;
  padding: 3px 10px;
  font-size: 11px;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* テーブル見出しの補足注記 */
.plans-table thead th .th-note {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  color: #64748b;
  letter-spacing: 0;
}

/* ---------- レイアウト ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* ---------- 条件入力カード ---------- */
.control-card {
  background: #ffffff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.04);
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px dashed #e4e8ef;
}
.control-row:last-child {
  border-bottom: none;
}

.controls-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 4px 0;
}
.controls-inline .control-row {
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: none;
}

.control-label {
  font-weight: 600;
  font-size: 14px;
  color: #334155;
}

.control-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.control-hint--sort {
  margin-top: 4px;
  padding: 8px 10px;
  background: #eef3f9;
  border-left: 3px solid #3a86ff;
  border-radius: 4px;
  color: #334155;
}

/* ---------- テキスト入力 / セレクト ---------- */
.text-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd2d9;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: #1f2933;
  transition: border-color .15s, box-shadow .15s;
}
.text-input:focus {
  outline: none;
  border-color: #3a86ff;
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.15);
}

/* ---------- ギガ数入力（数値） ---------- */
.gig-number-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#gigNumber {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
  color: #0b5394;
  background: #fff;
}
#gigNumber:focus {
  outline: none;
  border-color: #3a86ff;
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.15);
}

.gig-unit {
  font-weight: 700;
  font-size: 14px;
  color: #334155;
}

/* ---------- チェックボックス ---------- */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #e4e8ef;
  border-radius: 999px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 12px;
  color: #334155;
  user-select: none;
  transition: background .15s, border-color .15s;
}
.checkbox:hover {
  background: #eef3f9;
}
.checkbox input {
  margin: 0;
  accent-color: #3a86ff;
}
.checkbox input:checked + span {
  color: #0b5394;
  font-weight: 600;
}

/* ---------- 現在の契約カード ---------- */
.current-plan-card {
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
}

.current-plan-details > summary.card-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 12px 36px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  position: relative;
  background: #fff;
  transition: background .15s;
}
.current-plan-details > summary.card-title:hover {
  background: #f8fafc;
}
.current-plan-details > summary.card-title::-webkit-details-marker { display: none; }
.current-plan-details > summary.card-title::before {
  content: "▶";
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 11px;
  color: #0b5394;
  transition: transform .2s;
}
.current-plan-details[open] > summary.card-title {
  border-bottom: 1px dashed #e4e8ef;
}
.current-plan-details[open] > summary.card-title::before {
  transform: rotate(90deg);
}

.card-title-main {
  font-weight: 700;
  color: #0b5394;
  font-size: 14px;
}
.card-title-hint {
  font-size: 11px;
  color: #64748b;
}

.current-plan-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 14px;
}
.cp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.cp-label {
  font-weight: 600;
  font-size: 14px;
  color: #334155;
  min-width: 130px;
  flex: 0 0 auto;
}
.cp-controls {
  flex: 0 1 auto;
}
.cp-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  padding-left: 8px;
}
.cp-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.cp-result-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.brand-select {
  padding: 6px 8px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  color: #1f2933;
  min-width: 160px;
  cursor: pointer;
}
.brand-select:focus {
  outline: none;
  border-color: #3a86ff;
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.15);
}

.monthly-fees {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.fee-input input {
  width: 92px;
  padding: 6px 8px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #0b5394;
  background: #fff;
}
.fee-input input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  text-align: center;
}
.fee-input input:focus {
  outline: none;
  border-color: #3a86ff;
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.15);
}
.fee-unit {
  font-weight: 700;
  color: #334155;
  font-size: 13px;
}

.current-avg {
  font-weight: 700;
  color: #9ca3af;
  font-size: 14px;
}
.current-avg.has-value {
  color: #e63946;
  font-size: 16px;
}

/* ---------- サマリーバー ---------- */
.summary-bar {
  margin: 16px 0 12px;
  padding: 12px 16px;
  background: #0b5394;
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}
.summary-bar strong {
  font-size: 15px;
  font-weight: 700;
}
.summary-bar .summary-count {
  margin-left: auto;
  background: #fff;
  color: #0b5394;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
}
.summary-bar .summary-chip {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- 結果テーブル ---------- */
.table-wrapper {
  /* 横スクロールのみ内側で行い、縦はページスクロールに委譲（斜めスクロール防止・hotel と統一） */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.04);
}

.plans-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1130px; /* 狭い画面では横スクロール（比較列込み） */
}

.plans-table thead th {
  position: sticky;
  top: 0;
  background: #eef3f9;
  color: #0b5394;
  font-weight: 700;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
  z-index: 2;
}

/* ソート可能な列ヘッダ */
.plans-table thead th[data-sort-key] {
  cursor: pointer;
  user-select: none;
  padding-right: 22px;
  position: sticky;
  top: 0;
  transition: background .15s;
}
.plans-table thead th[data-sort-key]:hover {
  background: #dbe4f0;
}
.plans-table thead th[data-sort-key]::after {
  content: "⇅";
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.35;
  color: #0b5394;
}
.plans-table thead th.is-sort-asc::after {
  content: "▲";
  opacity: 1;
}
.plans-table thead th.is-sort-desc::after {
  content: "▼";
  opacity: 1;
}
.plans-table thead th.is-sort-asc,
.plans-table thead th.is-sort-desc {
  background: #dbe4f0;
  color: #0b3b6b;
}

.plans-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #e4e8ef;
  vertical-align: top;
}

.plans-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.plans-table tbody tr:hover {
  background: #eef3f9;
}

/* 料金を目立たせる */
.plans-table .col-price,
.plans-table td.price {
  white-space: nowrap;
}

/* 年間節約額列 */
.plans-table .col-savings,
.plans-table td.savings-cell {
  min-width: 140px;
  white-space: nowrap;
}
.savings {
  display: inline-block;
  line-height: 1.3;
  font-size: 13px;
}
.savings small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}
.savings--save {
  color: #047857;
  font-weight: 700;
}
.savings--save small {
  color: #059669;
}
.savings--lose {
  color: #be123c;
  font-weight: 700;
}
.savings--lose small {
  color: #e11d48;
}
.savings--neutral {
  color: #9ca3af;
  font-weight: 500;
}

/* 現在契約中のブランドの行を強調 */
.plans-table tbody tr.is-current,
.plans-table tbody tr.is-current:nth-child(even) {
  background: #fef3c7;
}
.plans-table tbody tr.is-current:hover {
  background: #fde68a;
}
.plans-table tbody tr.is-current td:first-child {
  box-shadow: inset 3px 0 0 #fbbf24;
}
.badge--current {
  background: #fbbf24;
  color: #78350f;
  margin-right: 4px;
}
.plans-table td.price {
  font-size: 16px;
  font-weight: 700;
  color: #e63946;
}
.plans-table td.price .price-unit {
  font-size: 11px;
  color: #64748b;
  margin-left: 2px;
  font-weight: 500;
}

/* 備考列はやや広めに */
.plans-table .col-notes,
.plans-table td.notes {
  min-width: 180px;
  color: #52606d;
}

/* 通話料列：複数行の条件を読みやすく */
.plans-table .col-call,
.plans-table td.call-charge {
  min-width: 200px;
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
}

/* ブランド列：バッジが改行されないよう幅を確保 */
.plans-table .col-brand,
.plans-table td.col-brand {
  min-width: 130px;
}
.plans-table td.col-brand .parent-carrier {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.plans-table td.col-brand .brand-link {
  color: #1a5eb8;
  font-weight: 600;
  text-decoration: none;
}
.plans-table td.col-brand .brand-link:hover {
  text-decoration: underline;
}


/* ---------- 先頭2列固定（横スクロール中もブランドを見失わない） ---------- */
.plans-table th.col-compare,
.plans-table td.col-compare {
  position: sticky;
  left: 0;
}
.plans-table th.col-brand,
.plans-table td.col-brand {
  position: sticky;
  left: 44px; /* col-compare の幅（border-box） */
  box-shadow: 2px 0 4px -2px rgba(16, 42, 67, 0.22);
}
.plans-table tbody td.col-compare,
.plans-table tbody td.col-brand {
  z-index: 1;
  background: #fff; /* 透過だと下を通る列が透けるため不透明必須 */
}
.plans-table thead th.col-compare,
.plans-table thead th.col-brand {
  z-index: 3; /* 見出し行(z-index:2)より前面 */
}
.plans-table tbody tr:nth-child(even) td.col-compare,
.plans-table tbody tr:nth-child(even) td.col-brand {
  background: #fafbfc;
}
.plans-table tbody tr:hover td.col-compare,
.plans-table tbody tr:hover td.col-brand {
  background: #eef3f9;
}

/* テーブルの横スクロールヒント（狭い画面のみ表示） */
.scroll-hint {
  display: none;
  margin: 0 0 6px;
  font-size: 12px;
  color: #64748b;
  text-align: right;
}
@media (max-width: 1200px) {
  .scroll-hint {
    display: block;
  }
}

/* バッジ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--unlimited {
  background: #fde68a;
  color: #92400e;
  border: 1px solid #fbbf24;
}
.badge--major {
  background: #dbeafe;
  color: #1e40af;
}
.badge--sub {
  background: #dcfce7;
  color: #166534;
}
.badge--mvno {
  background: #ede9fe;
  color: #5b21b6;
}
.badge--restrict {
  margin-top: 4px;
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fda4af;
  white-space: normal;
}

/* ---------- 比較列（チェックボックス） ---------- */
.plans-table .col-compare {
  width: 44px;
  min-width: 44px;
  text-align: center;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.plans-table thead th.col-compare {
  cursor: default;
  font-size: 11px;
}
.plans-table tbody td.col-compare {
  vertical-align: middle;
  text-align: center;
}
.compare-check {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3a86ff;
  margin: 0;
}
.compare-check:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* ---------- 比較リストセクション ---------- */
.compare-section {
  margin-top: 16px;
  padding: 14px 16px 16px;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.04);
}

.compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e4e8ef;
}

.compare-title {
  margin: 0;
  font-size: 15px;
  color: #0b5394;
  font-weight: 700;
}

.compare-count {
  display: inline-block;
  min-width: 24px;
  padding: 2px 8px;
  margin-left: 4px;
  background: #0b5394;
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  text-align: center;
}

.compare-max {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-left: 2px;
}

.compare-clear-btn {
  padding: 6px 12px;
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s;
}
.compare-clear-btn:hover {
  background: #e2e8f0;
}

.compare-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.compare-card {
  position: relative;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.compare-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
}
.compare-card-remove:hover {
  background: #e2e8f0;
  color: #1f2933;
}

.compare-card-brand {
  font-weight: 700;
  color: #0b5394;
  font-size: 14px;
  padding-right: 28px;
}
.compare-card-plan {
  margin: 4px 0 10px;
  color: #1f2933;
  font-weight: 600;
}
.compare-card-price {
  font-size: 22px;
  color: #e63946;
  font-weight: 700;
  margin-bottom: 8px;
}
.compare-card-price .unit {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-left: 2px;
}
.compare-card-savings {
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  font-weight: 700;
}
.compare-card-savings--save {
  background: #d1fae5;
  color: #047857;
}
.compare-card-savings--lose {
  background: #fee2e2;
  color: #be123c;
}
.compare-card-savings--neutral {
  background: #f1f5f9;
  color: #64748b;
}
.compare-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 4px 8px;
  font-size: 12px;
}
.compare-card dt {
  color: #64748b;
  font-weight: 600;
}
.compare-card dd {
  margin: 0;
  color: #1f2933;
  white-space: pre-line;
}

/* ---------- 0件メッセージ ---------- */
.empty-message {
  margin: 24px 0;
  padding: 24px;
  text-align: center;
  color: #64748b;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

/* ---------- 通信速度の目安セクション ---------- */
.speed-reference {
  margin-top: 20px;
}

.speed-details {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.04);
  overflow: hidden;
}

.speed-details > summary {
  cursor: pointer;
  padding: 14px 18px;
  background: #eef3f9;
  color: #0b5394;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  user-select: none;
}
.speed-details > summary::-webkit-details-marker { display: none; }
.speed-details > summary::before {
  content: "▶";
  font-size: 11px;
  margin-right: 8px;
  transition: transform .2s;
  color: #0b5394;
}
.speed-details[open] > summary::before {
  transform: rotate(90deg);
}
.speed-summary-title {
  font-size: 15px;
  flex: 1;
}
.speed-summary-hint {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.speed-note {
  margin: 14px 18px 0;
  padding: 10px 12px;
  background: #fff8e1;
  border-left: 3px solid #fbbf24;
  border-radius: 4px;
  font-size: 12px;
  color: #52606d;
}

.speed-section-title {
  margin: 18px 18px 8px;
  font-size: 14px;
  color: #0b5394;
  border-left: 4px solid #3a86ff;
  padding-left: 8px;
}

.speed-table-wrap {
  margin: 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.speed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 640px;
}

.speed-table thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

.speed-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #e4e8ef;
  vertical-align: top;
  line-height: 1.5;
}

.speed-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.speed-table small {
  color: #64748b;
  font-weight: 400;
}

.speed-table--usage {
  min-width: 360px;
}

.speed-tips {
  padding-bottom: 18px;
}

.speed-tips-list {
  margin: 0 18px;
  padding-left: 20px;
  font-size: 13px;
  color: #334155;
}
.speed-tips-list li {
  margin-bottom: 6px;
}

@media (min-width: 640px) {
  .speed-table { font-size: 13px; }
  .speed-summary-title { font-size: 16px; }
}

/* ---------- フッター ---------- */
.page-footer {
  text-align: center;
  padding: 16px;
  color: #64748b;
}

/* =====================================================
   レスポンシブ（スマホ以外で見やすく広げる）
   ===================================================== */
@media (min-width: 640px) {
  body {
    font-size: 16px;
  }
  .page-header h1 {
    font-size: 26px;
  }
  .control-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .control-label {
    flex: 0 0 auto;
  }
  .controls-inline .control-label {
    flex: 0 0 auto;
  }
  .plans-table {
    font-size: 14px;
  }
}

@media (min-width: 960px) {
  .container {
    padding: 28px 24px 64px;
  }
  .plans-table thead th {
    padding: 12px 12px;
  }
  .plans-table tbody td {
    padding: 10px 12px;
  }
}

/* 申し込みボタン */
.col-signup { text-align: center; white-space: nowrap; }
.signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* タップターゲット推奨サイズ */
  padding: 5px 14px;
  background: #2c5282;
  color: #fff !important;
  border-radius: 5px;
  font-size: 0.82em;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.signup-btn:hover { background: #1e3a5f; text-decoration: none; }
.signup-btn--aff {
  background: #bf0000;
  box-shadow: 0 1px 3px rgba(191, 0, 0, 0.25);
}
.signup-btn--aff:hover { background: #a00000; box-shadow: 0 2px 5px rgba(191, 0, 0, 0.35); }

/* 追従CTA: 条件入力へ戻る（モバイル時のみ） */
.back-to-search {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(44, 82, 130, 0.94);
  color: #fff;
  border-radius: 24px;
  font-size: 0.85em;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, background 0.15s;
  pointer-events: none;
}
.back-to-search--visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-search:hover { background: #1e3a5f; text-decoration: none; }
.back-to-search__arrow { font-size: 1.1em; line-height: 1; }
@media (max-width: 768px) {
  .back-to-search { display: inline-flex; }
}

/* ============================================
   旅行・短期向け SIM セクション
   ============================================ */
.travel-sim-section {
  margin-top: 20px;
}

.travel-sim-details {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.04);
  overflow: hidden;
}

.travel-sim-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #f0f3f7;
}
.travel-sim-details > summary::-webkit-details-marker { display: none; }
.travel-sim-details > summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.2s;
  color: #999;
  font-size: 0.78em;
}
.travel-sim-details[open] > summary::before {
  transform: rotate(90deg);
}

.travel-sim-summary-title {
  font-weight: 700;
  font-size: 1.02em;
  color: #1a2233;
  flex: 1 1 auto;
}
.travel-sim-summary-hint {
  font-size: 0.78em;
  color: #888;
}

.travel-sim-note {
  padding: 14px 18px 4px;
  margin: 0;
  font-size: 0.85em;
  color: #555;
  line-height: 1.7;
}

.travel-sim-grid {
  padding: 14px 18px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.travel-sim-card {
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  padding: 14px 14px 16px;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  position: relative;
}
.travel-sim-card::before {
  content: "PR";
  position: absolute;
  top: 8px;
  right: 8px;
  background: #bf0000;
  color: #fff;
  font-size: 0.7em;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  line-height: 1;
}
.travel-sim-card__title {
  font-size: 1.0em;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1a2233;
}
.travel-sim-card__tag {
  font-size: 0.74em;
  color: #888;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.travel-sim-card__desc {
  font-size: 0.84em;
  color: #444;
  line-height: 1.65;
  margin: 0 0 12px;
  flex: 1 1 auto;
}
.travel-sim-card__btn {
  display: inline-block;
  padding: 8px 14px;
  background: #bf0000;
  color: #fff !important;
  border-radius: 5px;
  font-size: 0.84em;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s;
  align-self: stretch;
}
.travel-sim-card__btn:hover {
  background: #a00;
  text-decoration: none;
}


/* ===== Article Disclaimer (共通) ===== */
.article-disclaimer {
  margin: 16px 0 28px;
  padding: 12px 16px;
  background: #f0f7ff;
  border-left: 3px solid #4a90e2;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}
.article-disclaimer a {
  color: #1d6fb4;
  text-decoration: underline;
}
.article-disclaimer strong {
  color: #222;
}


/* ===== breadcrumb (injected) ===== */
.breadcrumb{font-size:.8rem;line-height:1.4}
.breadcrumb-inner{list-style:none;margin:0 auto;padding:6px 16px 0;max-width:880px;display:flex;flex-wrap:wrap;align-items:center;gap:2px 0}
.breadcrumb-item{display:inline-flex;align-items:center;min-width:0}
.breadcrumb--top{padding-top:4px}
.breadcrumb--bottom{margin-top:10px;border-top:1px solid #e8e4dc}
.breadcrumb--bottom .breadcrumb-inner{padding:10px 16px}
.breadcrumb a{color:#6b6b6b;text-decoration:none;white-space:nowrap}
.breadcrumb a:hover{color:#4facfe;text-decoration:underline}
.breadcrumb .sep{margin:0 8px;color:#9a9a9a}
.breadcrumb .current{color:#1a1a1a;font-weight:600;max-width:60vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ===== 共通サイトヘッダー（記事ページ assets/style.css と統一・#22 2026-07-03） ===== */
.site-header{background:#faf8f5;color:#1a1a1a;padding:16px;position:sticky;top:0;z-index:100;border-bottom:1px solid #e8e4dc;backdrop-filter:saturate(180%) blur(8px);-webkit-backdrop-filter:saturate(180%) blur(8px)}
.site-header-inner{max-width:1100px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px}
.site-logo{font-weight:700;font-size:1.2rem;color:#1a1a1a;text-decoration:none;letter-spacing:-0.01em;white-space:nowrap}
.site-logo:hover{color:#1a1a1a}
.site-nav{display:flex;gap:24px}
.site-nav a{color:#6b6b6b;text-decoration:none;font-size:.95rem;font-weight:500;white-space:nowrap}
.site-nav a:hover{color:#1a1a1a}
@media (max-width:600px){.site-header-inner{flex-direction:column;align-items:flex-start;gap:8px}.site-nav{gap:10px 14px;width:100%;flex-wrap:wrap}.site-nav a{font-size:.85rem}}

/* ===== 診断ディープリンクのプランハイライト＋案内バナー（#59 2026-07-03） ===== */
.plan-highlight td{background:#fff7d6 !important}
.plan-highlight td:first-child{box-shadow:inset 4px 0 0 #f5b301}
.plan-highlight{animation:planHl 1.4s ease 1}
@keyframes planHl{0%{background:#ffe89a}60%{background:#ffe89a}100%{background:transparent}}
.deeplink-banner{max-width:1100px;margin:14px auto 0;background:#fff7d6;border:1px solid #f0d478;border-radius:8px;padding:10px 14px;font-size:.9rem;color:#5a4a10;display:flex;align-items:center;gap:8px;justify-content:space-between;line-height:1.5}
.deeplink-banner b{color:#8a6d00}
.deeplink-banner-x{background:none;border:none;font-size:1.2rem;cursor:pointer;color:#8a7420;line-height:1;padding:0 2px;flex:0 0 auto}
.deeplink-banner-x:hover{color:#5a4a10}
