/* =====================================================================
   style.css — 年金の繰上げ・繰下げ受給シミュレーター ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる（結果表示は sg-result）。
   ===================================================================== */

/* 結果値・内訳・表はタブ幅数字で桁を揃える */
.sg-result__value,
.sg-result-row__value,
.pt-table td,
.pt-table th {
  font-variant-numeric: tabular-nums;
}

/* 補助ラベルを入力直下に詰める */
.sg-field .sg-help {
  margin-top: var(--sg-space-1);
}

/* 単位（月額/年額）の切替タブ */
.pt-modes {
  display: flex;
  gap: 8px;
  margin: var(--sg-space-2) 0;
}
.pt-modes label {
  flex: 1 1 0;
  text-align: center;
  padding: 8px 8px;
  border: 1px solid var(--sg-border, #e5e7eb);
  border-radius: var(--sg-radius, 8px);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.pt-modes input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pt-modes label:has(input:checked) {
  border-color: var(--sg-primary, #3b5bdb);
  background: rgba(59, 91, 219, 0.08);
  font-weight: 600;
  color: var(--sg-primary, #3b5bdb);
}

/* 区切り線 */
.sg-hr {
  border: none;
  border-top: 1px solid var(--sg-border, #e5e7eb);
  margin: var(--sg-space-4) 0;
}

/* 表（横スクロール可・狭幅でも崩れない） */
.pt-table-wrap {
  overflow-x: auto;
  margin-top: var(--sg-space-3, 12px);
}
.pt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  white-space: nowrap;
}
.pt-table th,
.pt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--sg-border, #e5e7eb);
  text-align: right;
}
.pt-table thead th {
  font-weight: 600;
  color: var(--sg-muted, #777);
  border-bottom-width: 2px;
}
.pt-table thead th:first-child,
.pt-table tbody th {
  text-align: left;
}
.pt-table tbody th {
  font-weight: 600;
}
/* 選択中の開始年齢の行を強調 */
.pt-table tbody tr.is-selected {
  background: rgba(59, 91, 219, 0.1);
}
.pt-table tbody tr.is-selected th,
.pt-table tbody tr.is-selected td {
  color: var(--sg-primary, #3b5bdb);
  font-weight: 700;
}
/* 累計差の色分け */
.pt-table td.pt-pos {
  color: #1a7f4b;
}
.pt-table td.pt-neg {
  color: #c0392b;
}
