/* ══════════════════════════════════════════════════════════
   豐胸尺寸推薦工具 — /tool/breast-size-finder/ 專屬樣式
   只在這一頁載入。顏色一律沿用 main.css 的 CSS 變數，
   版面盡量重用既有 class（.chips/.chip、.button、.split、
   .tx-body 等），這裡只補工具本身需要的局部樣式。
   ══════════════════════════════════════════════════════════ */

.bsf-tool { max-width: 1080px; margin: 0 auto; }
.bsf-progress, .bsf-form, .bsf-loading { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ── 步驟指示 ─────────────────────────────── */

.bsf-progress {
  display: flex; align-items: center; gap: 10px; margin-bottom: 34px;
  font: 500 11px var(--sans); letter-spacing: .14em; color: var(--muted);
}
.bsf-progress-bar {
  flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden;
}
.bsf-progress-bar::after {
  content: ""; position: absolute; inset: 0; width: 50%;
  background: var(--accent); transition: width .35s ease;
}
.bsf-tool[data-step="2"] .bsf-progress-bar::after { width: 100%; }
.bsf-progress-label { white-space: nowrap; color: var(--accent-dark); }

/* ── 表單 ─────────────────────────────────── */

.bsf-form { background: #fff; border: 1px solid var(--line); padding: clamp(28px, 4vw, 48px); }

.bsf-step[hidden] { display: none; }

.bsf-field { margin-bottom: 30px; }
.bsf-field:last-child { margin-bottom: 0; }
.bsf-field > p.bsf-label {
  margin: 0 0 14px; font: 500 13px var(--sans); letter-spacing: .04em; color: var(--ink);
}
.bsf-hint { margin: 10px 0 0; font: 400 12px/1.7 var(--sans); color: var(--muted); }

.bsf-options { display: flex; flex-wrap: wrap; gap: 10px; }

/* 沿用 .chip 視覺，用 input+label 的 sibling selector 做選取狀態，不需要額外 JS */
.bsf-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bsf-options label.chip { cursor: pointer; }
.bsf-options input:checked + label.chip {
  color: #fff; background: var(--accent); border-color: var(--accent);
}
.bsf-options input:focus-visible + label.chip { outline: 2px solid var(--accent); outline-offset: 2px; }

.bsf-cup-options label.chip { min-width: 56px; text-align: center; font: 500 14px var(--sans); }

.bsf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bsf-field.bsf-half { margin-bottom: 0; }

.bsf-number {
  width: 100%; padding: 13px 16px; border: 1px solid #cabfb2; border-radius: var(--radius);
  font: 400 14px var(--sans); color: var(--ink); background: var(--paper);
}
.bsf-number:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.bsf-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 40px; }
.bsf-actions .button { min-width: 140px; }
.bsf-actions.bsf-actions-end { justify-content: flex-end; }

/* ── 載入動畫 ──────────────────────────────── */

.bsf-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: clamp(60px, 9vw, 96px) 24px; text-align: center;
}
.bsf-loading[hidden] { display: none; }

.bsf-spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent-dark);
  animation: bsf-spin 1s linear infinite;
}
@keyframes bsf-spin { to { transform: rotate(360deg); } }

.bsf-loading-text {
  min-height: 22px; font: 400 14px var(--sans); color: var(--muted);
  letter-spacing: .02em;
}

@media (prefers-reduced-motion: reduce) {
  .bsf-spinner { animation-duration: 2.4s; }
}

/* ── 結果／報告 ───────────────────────────────── */

.bsf-result[hidden] { display: none; }

.bsf-report {
  background: #fff; border: 1px solid var(--line);
  padding: clamp(32px, 4.5vw, 56px); max-width: 780px; margin: 0 auto;
}

.bsf-report-head { padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.bsf-report-head h2 { font-size: clamp(26px, 2.8vw, 36px); margin: 6px 0 14px; }
.bsf-report-meta { margin: 0 0 14px; font: 400 12px var(--sans); color: var(--muted); letter-spacing: .02em; }
.bsf-report-subtitle { margin: 0; font: 400 13px/1.9 var(--sans); color: #6a635a; }

.bsf-report-section { margin-bottom: clamp(32px, 4vw, 46px); }
.bsf-report-section:last-of-type { margin-bottom: 28px; }
.bsf-report-section h3 { font-size: clamp(18px, 1.8vw, 22px); margin-bottom: 6px; }
.bsf-report-lead { margin: 0 0 16px; font: 400 13px/1.8 var(--sans); color: var(--muted); }

.bsf-report-visual h3 { margin-bottom: 16px; }

.bsf-result-visual {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; align-items: center; justify-content: center;
}
.bsf-result-visual svg, .bsf-result-visual img { width: 100%; height: auto; display: block; }

.bsf-result-caption {
  margin: 14px 0 0; font: 400 12px/1.9 var(--sans); color: var(--muted); text-align: center;
}

.bsf-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); margin: 16px 0 0;
}
.bsf-summary-grid > div { background: var(--paper); padding: 16px 18px; }
.bsf-summary-grid dt { margin: 0 0 6px; font: 500 10px var(--sans); letter-spacing: .1em; color: var(--taupe); text-transform: uppercase; }
.bsf-summary-grid dd { margin: 0; font: 500 15px var(--serif); color: var(--ink); }

.bsf-report-list { margin: 0; padding: 0; list-style: none; }
.bsf-report-list li {
  position: relative; padding: 14px 0 14px 24px; border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.9; color: #4f4a43;
}
.bsf-report-list li:first-child { padding-top: 0; }
.bsf-report-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.bsf-report-list li::before {
  content: "✦"; position: absolute; left: 0; top: 14px; font-size: 11px; color: var(--taupe);
}

.bsf-report-checklist { margin: 0; padding: 0; list-style: none; }
.bsf-report-checklist li {
  position: relative; padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.8; color: #4f4a43;
}
.bsf-report-checklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.bsf-report-checklist li::before {
  content: ""; position: absolute; left: 0; top: 14px; width: 15px; height: 15px;
  border: 1.5px solid #c3b3a1; border-radius: 3px;
}

.bsf-report-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 34px 0 22px; }
.bsf-copy-feedback { font: 500 12px var(--sans); color: var(--accent-dark); }

.bsf-restart {
  display: block; margin: 0 auto; font: 400 12px var(--sans); color: var(--muted);
  background: none; border: 0; text-decoration: underline; cursor: pointer;
}
.bsf-restart:hover { color: var(--accent-dark); }

/* ── 植入物比較表（分析完成後隨結果一起顯示） ─────── */

.bsf-implants { max-width: 1080px; margin: clamp(56px, 6vw, 84px) auto 0; padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.bsf-implants h2 { font-size: clamp(24px, 2.4vw, 32px); }
.bsf-implants-lead { max-width: 640px; margin: 16px 0 30px; font-size: 14px; line-height: 2; color: var(--muted); }

.bsf-compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); background: #fff; }
.bsf-compare-table { width: 100%; min-width: 640px; border-collapse: collapse; font: 400 13px/1.7 var(--sans); }
.bsf-compare-table th, .bsf-compare-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.bsf-compare-table thead th {
  font: 500 11px var(--sans); letter-spacing: .08em; color: var(--accent-dark);
  background: var(--cream); white-space: nowrap;
}
.bsf-compare-table tbody tr:last-child td { border-bottom: 0; }
.bsf-compare-table tbody tr:hover td { background: var(--paper); }
.bsf-compare-name { font: 500 14px var(--serif); color: var(--ink); white-space: nowrap; }
.bsf-compare-table td { color: #56514a; }

/* ── 目前主要的豐胸方式（獨立於工具外，寬度與上方 .bsf-tool 對齊） ── */

.bsf-methods { max-width: 1080px; margin: 0 auto; padding: clamp(64px, 9vw, 118px) max(6vw, 24px); }

@media (max-width: 720px) {
  .bsf-row { grid-template-columns: 1fr; gap: 20px; }
  .bsf-actions { flex-wrap: wrap; }
  .bsf-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
