/* 蝦皮 vs 夏斗市集手續費試算（/merchants/fee-calculator）：只在這一頁載入，不膨脹 site.css。
   跟搬家中心（migrate.css）、推廣方案（promo_upgrade.css）同一套暖紙編輯語彙：色票全用 site.css 的變數（深淺色自動切換）、
   細線、2–4px 直角、黃銅左細線強調；標題與金額用思源宋體，所有數字一律 tabular-nums，數字跳動時不會左右晃。
   不引入外部字體、不用陰影堆層次，靠紙張明暗差與留白。 */

/* ── 版框 ── */
body.is-fee .wrap { max-width: 1120px; }
.fc { overflow-x: clip; padding-bottom: 32px; }
.fc-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fc-num { font-variant-numeric: tabular-nums lining-nums; }
.fc-cur { font-family: var(--font); font-size: .42em; font-weight: 500; letter-spacing: .12em; color: var(--muted); margin-right: .35em; vertical-align: .2em; }
.fc-muted { color: var(--muted); font-weight: 400; }
.fc-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fc [hidden] { display: none !important; }

/* ── 頁頭 ── */
.fc-hero { padding: 8px 0 30px; max-width: 46em; }
.fc-eyebrow { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 16px; color: var(--brass); font-size: 12px; font-weight: 500; letter-spacing: .2em; }
.fc-eyebrow-dot { margin: 0 .5em; }
.fc-title { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.4vw + 16px, 42px); line-height: 1.38; letter-spacing: .04em; text-wrap: balance; }
.fc-br { display: none; }
.fc-lead { margin: 16px 0 0; max-width: 38em; color: var(--ink-2); font-size: 15.5px; line-height: 1.85; }

/* ── 雙欄：左表單、右結果 ── */
.fc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 28px; border-top: 1px solid var(--hair); }
.fc-form { min-width: 0; }
.fc-block { margin: 0; padding: 0; border: 0; min-width: 0; }
.fc-block + .fc-block { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--hair); }
.fc-block-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; padding: 0; font-family: var(--serif); font-size: 18px; font-weight: 400; letter-spacing: .05em; color: var(--ink); }
.fc-block-n { color: var(--brass); font-size: 14px; letter-spacing: .12em; }

/* 情景膠囊：兩欄小卡，選中＝墨線＋黃銅左細線 */
.fc-presets .fc-block-title { margin-bottom: 14px; }
.fc-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fc-pill {
  display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 11px 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 3px; color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.fc-pill:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.fc-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fc-pill.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink), inset 3px 0 0 var(--brass); }
.fc-pill-label { font-family: var(--serif); font-size: 15px; font-weight: 500; letter-spacing: .04em; line-height: 1.45; }
.fc-pill-note { color: var(--muted); font-size: 12px; line-height: 1.5; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* 欄位 */
.fc-field { margin-top: 20px; }
.fc-field:first-of-type { margin-top: 0; }
.fc-field-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.fc-label { display: block; color: var(--ink); font-size: 13.5px; font-weight: 500; letter-spacing: .08em; }
span.fc-label { margin-bottom: 10px; }
.fc-money-input { position: relative; display: inline-flex; align-items: center; flex: 1 1 11em; max-width: 15em; }
.fc-money-input .fc-cur { position: absolute; left: 12px; top: 50%; margin: 0; transform: translateY(-50%); font-size: 11.5px; vertical-align: 0; pointer-events: none; }
.fc-input {
  display: block; width: 100%; min-height: 48px; padding: 8px 14px 8px 46px; font: inherit; font-family: var(--serif); font-size: 19px; color: var(--ink); text-align: right;
  background: var(--field, var(--surface)); border: 1px solid var(--line); border-radius: 2px; box-shadow: none; appearance: none; -moz-appearance: textfield;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fc-input::-webkit-outer-spin-button, .fc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fc-input::placeholder { color: var(--muted); opacity: .7; }
.fc-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
#fc-custom { padding-left: 14px; padding-right: 34px; }
.fc-unit { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.fc-hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* 滑桿：一條細線＋黃銅已填段，圓鈕直角感不突兀 */
.fc-range { display: block; width: 100%; height: 32px; margin: 10px 0 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.fc-range:focus { outline: none; }
.fc-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-range::-webkit-slider-runnable-track { height: 2px; background: var(--line); border-radius: 0; }
.fc-range::-moz-range-track { height: 2px; background: var(--line); border: 0; }
.fc-range::-moz-range-progress { height: 2px; background: var(--brass); }
.fc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--brass); transition: transform .12s ease; }
.fc-range::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--brass); }
.fc-range:active::-webkit-slider-thumb { transform: scale(1.12); }

/* 賣場類型：分段切換 */
.fc-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 3px; gap: 3px; border: 1px solid var(--hair); border-radius: 3px; background: var(--surface-2); }
.fc-seg-opt { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fc-seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fc-seg-opt span {
  display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 56px; padding: 8px 6px;
  border-radius: 2px; color: var(--ink-2); font-size: 14px; line-height: 1.35; text-align: center; letter-spacing: .03em;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.fc-seg-opt small { margin-top: 3px; color: var(--muted); font-size: 11.5px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.fc-seg-opt:hover span { color: var(--ink); }
.fc-seg-opt input:checked + span { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--ink); }
.fc-seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 活動開關 */
.fc-toggle { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--hair); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fc-toggle:first-of-type { border-top: 1px solid var(--hair); }
.fc-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fc-toggle-track { position: relative; flex: none; width: 36px; height: 20px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .18s ease, box-shadow .18s ease; }
.fc-toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s cubic-bezier(.2, .7, .2, 1), background-color .18s ease; }
.fc-toggle input:checked + .fc-toggle-track { background: var(--accent); box-shadow: none; }
.fc-toggle input:checked + .fc-toggle-track::after { transform: translateX(16px); background: var(--accent-ink); }
.fc-toggle input:focus-visible + .fc-toggle-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.fc-toggle-text { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; flex: 1 1 auto; color: var(--ink); font-size: 14.5px; letter-spacing: .03em; }
.fc-toggle-text small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* 進階：自訂總抽成 */
.fc-advanced { margin-top: 22px; border: 1px solid var(--hair); border-radius: 3px; background: var(--surface); }
.fc-advanced > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; color: var(--ink-2); font-size: 13.5px; letter-spacing: .06em; cursor: pointer; list-style: none; }
.fc-advanced > summary::-webkit-details-marker { display: none; }
.fc-advanced > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-top: -4px; border-right: 1.4px solid var(--ink-2); border-bottom: 1.4px solid var(--ink-2); transform: rotate(45deg); transition: transform .18s ease; }
.fc-advanced[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.fc-advanced > summary:hover { color: var(--ink); }
.fc-advanced > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-advanced .fc-field { margin: 0; padding: 4px 16px 16px; }

.fc-disclaimer { display: flex; gap: 8px; align-items: flex-start; margin: 20px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.fc-disclaimer .fc-icon { width: 16px; height: 16px; margin-top: 3px; color: var(--brass); }
.fc-submit { margin-top: 16px; width: 100%; }

/* ── 結果：兩張對照卡＋省下金額 ── */
.fc-result { position: relative; min-width: 0; }
.fc-compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.fc-card { min-width: 0; padding: 22px 20px 20px; background: var(--surface); border: 1px solid var(--hair); border-radius: 3px; }
.fc-card.is-them { box-shadow: inset 0 2px 0 var(--line); }
.fc-card.is-us { box-shadow: inset 0 2px 0 var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.fc-card-kicker { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .16em; }
.fc-card.is-us .fc-card-kicker { color: var(--accent); }
.fc-amount { margin: 10px 0 0; font-family: var(--serif); font-size: clamp(32px, 2vw + 24px, 40px); font-weight: 400; line-height: 1.1; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.fc-card.is-them .fc-amount { color: var(--ink-2); }
.fc-card.is-us .fc-amount { color: var(--accent); }
.fc-card-meta { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.65; }
.fc-lines { margin: 14px 0 0; border-top: 1px solid var(--hair); }
.fc-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.fc-lines dt { min-width: 0; color: var(--ink-2); letter-spacing: .04em; }
.fc-lines dd { margin: 0; flex: none; color: var(--ink); text-align: right; white-space: nowrap; }
.fc-us-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--hair); }
.fc-us-list li { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.fc-us-list .fc-icon { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); stroke-width: 1.6; }

.fc-save { margin-top: 18px; padding: 22px 20px 20px; border: 1px solid var(--hair); border-radius: 4px; background: color-mix(in srgb, var(--brass) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--brass); }
.fc-save-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0; }
.fc-save-row + .fc-save-row { margin-top: 12px; padding-top: 14px; border-top: 1px dashed color-mix(in srgb, var(--brass) 35%, var(--line)); }
.fc-save-label { color: var(--ink-2); font-size: 13.5px; letter-spacing: .1em; }
.fc-save-value { font-family: var(--serif); font-size: 26px; line-height: 1.1; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.fc-save-row.is-year .fc-save-label { color: var(--brass); font-weight: 500; }
.fc-save-row.is-year .fc-save-value { font-size: clamp(36px, 3vw + 24px, 50px); color: var(--brass); }
.fc-analogy { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--hair); }
.fc-analogy li { position: relative; padding-left: 16px; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.fc-analogy li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 5px; height: 1px; background: var(--brass); }
.fc-analogy strong { color: var(--ink); font-family: var(--serif); font-size: 15.5px; font-weight: 500; }

.fc-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.fc-cta { gap: 8px; min-height: 50px; padding: 0 22px; letter-spacing: .06em; text-align: center; }
.fc-cta .fc-icon { width: 17px; height: 17px; transition: transform .18s ease; }
.fc-cta:hover .fc-icon { transform: translateX(3px); }
.fc-result-foot { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; text-align: center; }

/* ── 下方區塊：費率表、FAQ ── */
.fc-section { margin-top: 40px; padding: 40px 0 8px; border-top: 1px solid var(--hair); }
.fc-section-head { max-width: 44em; margin-bottom: 22px; }
.fc-section-n { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; color: var(--brass); font-size: 12.5px; letter-spacing: .2em; }
.fc-section-n .fc-num { font-family: var(--serif); font-size: 15px; letter-spacing: .1em; }
.fc-section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 1vw + 17px, 27px); line-height: 1.45; letter-spacing: .04em; text-wrap: balance; }
.fc-section-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.fc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.fc-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-table { width: 100%; min-width: 22em; border-collapse: collapse; font-size: 14px; }
.fc-table th, .fc-table td { padding: 12px 10px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; line-height: 1.6; }
.fc-table thead th { padding-top: 8px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .14em; white-space: nowrap; }
.fc-table tbody th { color: var(--ink); font-weight: 400; }
.fc-table td { color: var(--ink-2); }
.fc-table th:first-child, .fc-table td:first-child { padding-left: 0; }
.fc-table th:last-child, .fc-table td:last-child { padding-right: 0; }
.fc-table .is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.fc-table tbody td:last-child { color: var(--accent); }
.fc-table tbody tr { transition: background-color .15s ease; }
.fc-table tbody tr:hover { background: color-mix(in srgb, var(--brass) 4%, transparent); }

.fc-faq { max-width: 52em; border-top: 1px solid var(--hair); }
.fc-faq-item { border-bottom: 1px solid var(--hair); }
.fc-faq-item > summary { display: flex; align-items: baseline; gap: 14px; min-height: 52px; padding: 15px 28px 15px 0; position: relative; color: var(--ink); font-family: var(--serif); font-size: 16px; line-height: 1.6; letter-spacing: .03em; cursor: pointer; list-style: none; }
.fc-faq-item > summary::-webkit-details-marker { display: none; }
.fc-faq-item > summary::after { content: ""; position: absolute; right: 6px; top: 22px; width: 7px; height: 7px; border-right: 1.4px solid var(--ink-2); border-bottom: 1.4px solid var(--ink-2); transform: rotate(45deg); transition: transform .18s ease, top .18s ease; }
.fc-faq-item[open] > summary::after { top: 26px; transform: rotate(-135deg); }
.fc-faq-item > summary:hover { color: var(--accent); }
.fc-faq-item > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-faq-n { flex: none; color: var(--brass); font-size: 13.5px; letter-spacing: .1em; }
.fc-faq-item p { margin: 0; padding: 0 28px 18px 2.6em; color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }

/* ── 收尾橫帶 ── */
.fc-band { display: flex; flex-direction: column; gap: 20px; margin-top: 48px; padding: 28px 22px; border: 1px solid var(--hair); border-radius: 4px; background: var(--surface); box-shadow: inset 0 2px 0 var(--brass); }
.fc-band-title { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 1.4vw + 16px, 28px); line-height: 1.45; letter-spacing: .04em; text-wrap: balance; }
.fc-band-title .fc-num { color: var(--brass); }
.fc-band-text { margin: 10px 0 0; max-width: 36em; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.fc-band-actions { display: flex; flex-direction: column; gap: 10px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .fc-pill, .fc-toggle-track, .fc-toggle-track::after, .fc-cta .fc-icon, .fc-faq-item > summary::after, .fc-advanced > summary::after { transition: none; }
}

/* ── 手機（≤ 420）：情景卡改單欄、卡片內距收窄 ── */
@media (max-width: 420px) {
  .fc-pills { grid-template-columns: minmax(0, 1fr); }
  .fc-card, .fc-save { padding: 20px 16px 18px; }
  .fc-money-input { max-width: none; }
  .fc-faq-item p { padding-left: 0; padding-right: 0; }
  .fc-band { padding: 24px 18px; }
}

/* ── 平板以上 ── */
@media (min-width: 640px) {
  .fc-br { display: inline; }
  .fc-pills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fc-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-actions, .fc-band-actions { flex-direction: row; flex-wrap: wrap; }
  .fc-actions .fc-cta { flex: 1 1 14em; }
  .fc-save { padding: 26px 26px 22px; }
  .fc-band { padding: 34px 34px; }
}

/* ── 桌機（≥ 960）：表單左、結果右黏住 ── */
@media (min-width: 960px) {
  .fc-hero { padding: 18px 0 36px; }
  .fc-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 52px; padding-top: 36px; }
  .fc-result { position: sticky; top: 84px; }
  .fc-band { flex-direction: row; align-items: center; justify-content: space-between; gap: 40px; padding: 40px 44px; }
  .fc-band-actions { flex-direction: column; min-width: 17em; }
}
