/* CONQTRIP｜日本退稅試算 — 與日本制霸地圖同一設計語言（navy／red／gold／米白） */
:root {
  color-scheme: light;
  --navy: #1a1a2e;
  --navy2: #16213e;
  --red: #c0392b;
  --red2: #e74c3c;
  --red-soft: rgba(192, 57, 43, .08);
  --gold: #f5a623;
  --gold-soft: rgba(245, 166, 35, .14);
  --light: #f8f4ef;
  --card: #fff;
  --ink: #2c2c2c;
  --muted: #6b6b6b;
  --line: #ece6dd;
  --ok: #1e8449;
  --ok-soft: #e8f6ee;
  --warn: #9a6200;
  --warn-soft: #fff4dc;
  --bad: #b03a2e;
  --bad-soft: #fdecea;
  --info: #2563b8;
  --info-soft: #e9f1fc;
  --focus: #2563b8;
  --shadow: 0 2px 10px rgba(0, 0, 0, .07);
  --shadow-lg: 0 10px 30px rgba(26, 26, 46, .12);
  --radius: 14px;
  --font: 'Segoe UI', 'Hiragino Sans', 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--light); color: var(--ink); font: 15px/1.7 var(--font); overflow-wrap: break-word; line-break: strict; overflow-x: clip; }
a { color: var(--red); }
a:hover { color: var(--red2); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tr-skip { position: absolute; left: -9999px; }
.tr-skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 200; }
.tr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header（與制霸地圖相同的深藍頂欄） ── */
.tr-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.tr-header-inner { max-width: 1200px; margin: 0 auto; min-height: 56px; padding: 6px 16px; display: flex; align-items: center; gap: 12px; }
.tr-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .12em; font-size: 1.08rem; white-space: nowrap; }
.tr-brand:hover { color: #fff; }
.tr-brand b { color: var(--gold); font-weight: 800; }
.tr-flag { width: 30px; height: 20px; border-radius: 4px; background: #fff radial-gradient(circle at 50% 50%, var(--red) 0 5px, transparent 5.5px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); flex-shrink: 0; }
.tr-header-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.tr-icon-btn { width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; text-decoration: none; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); font-size: 1.05rem; transition: .2s; }
.tr-icon-btn:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.tr-languages { display: flex; gap: 4px; }
.tr-languages a { min-width: 34px; height: 30px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); color: #ddd; text-decoration: none; font-size: .78rem; font-weight: 600; }
.tr-languages a:hover { border-color: var(--gold); color: #fff; }
.tr-languages a[aria-current="page"] { border-color: var(--gold); color: var(--gold); background: rgba(245, 166, 35, .12); }
.tr-lang-short { display: none; }

/* ── 功能分頁列 ── */
.tr-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 56px; z-index: 90; }
.tr-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tr-nav-inner::-webkit-scrollbar { display: none; }
.tr-nav a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 12px 12px 10px; min-height: 44px; color: var(--navy); text-decoration: none; font-size: .88rem; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tr-nav a:hover { color: var(--red); }
.tr-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }
.tr-nav-icon { font-size: 1rem; line-height: 1; }

/* ── 版面 ── */
.tr-main { max-width: 1200px; margin: 0 auto; padding: 14px 16px 56px; }
.tr-crumbs { font-size: .78rem; color: var(--muted); margin: 0 0 6px; }
.tr-crumbs a { color: var(--muted); text-decoration: none; }
.tr-crumbs a:hover { color: var(--red); text-decoration: underline; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.25; color: var(--navy); margin: 8px 0 8px; font-weight: 800; letter-spacing: .01em; }
h1 em { font-style: normal; color: var(--red); }
h2 { font-size: 1.08rem; line-height: 1.4; color: var(--navy); margin: 0 0 12px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
h3 { font-size: .98rem; color: var(--navy); margin: 16px 0 8px; }
.tr-h-icon { font-size: 1.15rem; line-height: 1; }
.tr-lead { color: #555; font-size: .98rem; margin: 0 0 14px; max-width: 760px; }
.tr-muted { color: var(--muted); font-size: .88em; }
.tr-hint { color: var(--muted); font-size: .86rem; margin: 6px 0; }
.tr-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(16px, 2.6vw, 26px); margin: 16px 0; min-width: 0; }
.tr-card > :last-child { margin-bottom: 0; }
.tr-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tr-grid > .tr-card { margin: 0; }
.tr-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 4px; }
.tr-section-title h2 { margin: 0; font-size: 1.2rem; }

/* ── Hero（快速試算首屏，沿用制霸地圖 hero 語彙） ── */
.tr-hero { text-align: center; padding: 22px 0 6px; }
.tr-hero-badge { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 5px 14px; border-radius: 20px; margin-bottom: 8px; }
.tr-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 4px 0 8px; }
.tr-hero .tr-lead { margin: 0 auto 10px; text-align: center; color: var(--muted); }
.tr-stats { display: flex; justify-content: center; gap: clamp(18px, 5vw, 44px); flex-wrap: wrap; margin: 14px 0 6px; }
.tr-stat { text-align: center; }
.tr-stat b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--navy); line-height: 1.15; }
.tr-stat span { font-size: .78rem; color: var(--muted); }

/* 新制四步驟 */
.tr-flow { list-style: none; margin: 18px auto 4px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 980px; counter-reset: flow; }
.tr-flow li { position: relative; background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 14px 12px 12px; text-align: center; counter-increment: flow; }
.tr-flow li::before { content: counter(flow); position: absolute; top: -9px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.tr-flow li:not(:last-child)::after { content: '→'; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: var(--gold); font-weight: 800; z-index: 1; }
.tr-flow-icon { display: block; font-size: 1.6rem; line-height: 1.2; margin-bottom: 2px; }
.tr-flow strong { display: block; color: var(--navy); font-size: .9rem; }
.tr-flow small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.45; }

/* 模式切換 */
.tr-mode-nav { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border-radius: 999px; box-shadow: var(--shadow); margin: 14px 0 0; }
.tr-mode-nav a { padding: 8px 18px; border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: .9rem; }
.tr-mode-nav a.tr-mode-current { background: var(--navy); color: #fff; }
.tr-center { text-align: center; }

/* ── 試算版面 ── */
.tr-calculator { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 760px; margin: 16px auto 0; }
.tr-calculator > .tr-card { margin: 0; }
.tr-result { scroll-margin-top: 120px; }
.tr-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.tr-step { counter-increment: s; border-top: 1px dashed var(--line); padding: 18px 0; }
.tr-step:first-child { border-top: 0; padding-top: 0; }
.tr-step > h2::before { content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-size: .8rem; flex-shrink: 0; }
.tr-req { font-size: .7rem; font-weight: 700; color: var(--red); background: var(--red-soft); border-radius: 999px; padding: 2px 8px; }
.tr-opt-tag { font-size: .7rem; font-weight: 700; color: var(--muted); background: #f1ede7; border-radius: 999px; padding: 2px 8px; }
.tr-field { margin: 10px 0; border: 0; padding: 0; min-width: 0; }
.tr-field > label, .tr-field legend, .tr-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--navy); padding: 0; }
input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="date"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid #e4ddd2; border-radius: 10px; background: #fff; font-size: 16px; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(26, 26, 46, .08); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-soft); }
.tr-amount input { font-size: 1.6rem; font-weight: 800; min-height: 60px; letter-spacing: .02em; padding-inline-start: 38px; }
.tr-amount .tr-yen-wrap { position: relative; }
.tr-amount .tr-yen-wrap::before { content: '¥'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 800; color: var(--muted); }
.tr-error { color: var(--bad); font-weight: 700; font-size: .88rem; margin: 6px 0 0; min-height: 0; }
.tr-error:empty { display: none; }
.tr-check { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; margin: 8px 0; }
.tr-check input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--red); }

/* 分段選擇（金額類型、稅率） */
.tr-segment { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.tr-segment label { position: relative; cursor: pointer; }
.tr-segment input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tr-segment span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 10px; border: 2px solid #e4ddd2; border-radius: 12px; background: #fff; font-weight: 700; font-size: .9rem; text-align: center; color: var(--navy); transition: .15s; }
.tr-segment small { font-weight: 500; font-size: .74rem; color: var(--muted); }
.tr-segment input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red); box-shadow: 0 2px 8px rgba(192, 57, 43, .12); }
.tr-segment input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.tr-radio { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 8px 12px; border: 2px solid #e4ddd2; border-radius: 12px; margin: 8px 0; cursor: pointer; font-weight: 600; background: #fff; }
.tr-radio:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.tr-radio input { width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }
.tr-radio .tr-method-icon { font-size: 1.2rem; }

/* 提示框：只有退稅金額 → 完整試算 */
.tr-callout { display: flex; gap: 12px; align-items: flex-start; background: var(--gold-soft); border: 1px solid rgba(245, 166, 35, .4); border-radius: 12px; padding: 12px 14px; font-size: .88rem; margin: 12px 0 0; }
.tr-callout-icon { font-size: 1.25rem; line-height: 1.3; }
.tr-callout p { margin: 0; }
.tr-callout a { font-weight: 700; }
.tr-callout.info { background: var(--info-soft); border-color: rgba(37, 99, 184, .25); }

/* ── 商店搜尋下拉（Select2 風格） ── */
.tr-combo { position: relative; }
.tr-combo-control { position: relative; display: flex; align-items: center; }
.tr-combo-control::before { content: '🔍'; position: absolute; left: 14px; font-size: .95rem; opacity: .6; pointer-events: none; }
.tr-combo-control input { padding-inline: 40px 82px; min-height: 52px; font-weight: 600; }
.tr-combo-control.has-value::before { content: none; }
.tr-combo-avatar-slot { position: absolute; left: 9px; pointer-events: none; }
.tr-combo-control.has-value input { padding-inline-start: 50px; }
.tr-combo-toggle, .tr-combo-clear { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; border-radius: 8px; color: var(--muted); font-size: 1.1rem; display: grid; place-items: center; }
.tr-combo-toggle { right: 6px; }
.tr-combo-toggle::after { content: ''; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.tr-combo-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.tr-combo-clear { right: 42px; font-size: 1.35rem; }
.tr-combo-toggle:hover, .tr-combo-clear:hover { background: #f4f0ea; color: var(--navy); }
.tr-listbox { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); max-height: min(440px, 62vh); overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overscroll-behavior: contain; }
.tr-listbox [role="presentation"].tr-group-label { font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; position: sticky; top: -6px; background: #fff; z-index: 1; }
.tr-listbox [role="option"] { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; }
.tr-listbox [role="option"]:hover, .tr-listbox [role="option"].is-active { background: #f7f2ea; }
.tr-listbox [role="option"].is-active { box-shadow: inset 3px 0 0 var(--red); }
.tr-opt-name { font-weight: 800; color: var(--navy); line-height: 1.35; }
.tr-opt-sub { color: var(--muted); font-size: .78rem; margin-inline-start: 6px; font-weight: 500; }
.tr-opt-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.tr-opt-other .tr-avatar { background: var(--navy); }
.tr-listbox-foot { padding: 8px 10px 4px; font-size: .76rem; color: var(--muted); }

/* 頭像（品牌／業者） */
.tr-avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; line-height: 1; background: #f1ede7; flex-shrink: 0; grid-row: span 2; }
.tr-avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: .95rem; }
.tr-avatar.txt { color: #fff; font-weight: 800; font-size: .82rem; letter-spacing: .02em; }

/* 晶片 */
.tr-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; line-height: 1.2; padding: 3px 8px; border-radius: 999px; background: #f1ede7; color: #5a5148; white-space: nowrap; }
.tr-chip.ok { background: var(--ok-soft); color: var(--ok); }
.tr-chip.warn { background: var(--warn-soft); color: var(--warn); }
.tr-chip.bad { background: var(--bad-soft); color: var(--bad); }
.tr-chip.info { background: var(--info-soft); color: var(--info); }
.tr-chip.navy { background: var(--navy); color: #fff; }
.tr-chip.gold { background: var(--gold-soft); color: #8a5a00; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tr-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: #f1ede7; margin: 0; }
.tr-badge.ok { background: var(--ok-soft); color: var(--ok); }
.tr-badge.warn { background: var(--warn-soft); color: var(--warn); }
.tr-badge.bad { background: var(--bad-soft); color: var(--bad); }

/* 選定商店摘要 */
.tr-store-summary { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 12px; align-items: center; margin-top: 12px; padding: 12px; border-radius: 12px; background: #faf7f2; border: 1px solid var(--line); }
.tr-store-summary .tr-avatar { width: 48px; height: 48px; font-size: 1.4rem; }
.tr-store-summary strong { color: var(--navy); }

/* ── 退稅服務商卡 ── */
.tr-provider-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
.tr-provider-head { display: flex; gap: 12px; align-items: center; }
.tr-provider-head a { font-weight: 800; color: var(--navy); text-decoration: none; font-size: 1rem; }
.tr-provider-head a:hover { color: var(--red); text-decoration: underline; }
.tr-provider-card p { margin: 8px 0; font-size: .88rem; color: #555; }
.tr-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 4px; padding: 0; list-style: none; }
.tr-facts li { background: #faf7f2; border-radius: 10px; padding: 8px 10px; font-size: .82rem; line-height: 1.45; }
.tr-facts b { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.tr-channels { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tr-channel { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 10px; font-size: .78rem; font-weight: 700; border: 1.5px solid transparent; }
.tr-channel.verified { background: var(--ok-soft); color: var(--ok); border-color: rgba(30, 132, 73, .25); }
.tr-channel.reported { background: var(--info-soft); color: var(--info); border-color: rgba(37, 99, 184, .2); border-style: dashed; }
.tr-channel.unknown { background: #f4f2ee; color: #8a837a; border-color: #ddd5ca; border-style: dashed; }
.tr-channel.no { background: #f4f2ee; color: #9a948c; text-decoration: line-through; }
.tr-channel-icon { font-size: .95rem; text-decoration: none; display: inline-block; }
.tr-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .74rem; color: var(--muted); margin: 6px 0 0; }
.tr-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 4px; vertical-align: -1px; }
.tr-legend .l-verified::before { background: var(--ok); }
.tr-legend .l-reported::before { background: var(--info); }
.tr-legend .l-unknown::before { background: #c9c1b6; }

/* ── 試算結果（視覺化） ── */
.tr-result { padding: 0; overflow: hidden; }
.tr-result > h2 { padding: 18px 22px 0; }
.tr-result-body { padding: 0 22px 18px; }
.tr-result .tr-fx, .tr-result .tr-share { margin: 0 22px; }
.tr-result .tr-share { margin-bottom: 18px; }
.tr-empty-state { text-align: center; padding: 26px 8px 10px; color: var(--muted); }
.tr-empty-state .tr-empty-icon { font-size: 2.6rem; display: block; margin-bottom: 4px; }
.tr-empty-state p { margin: 4px 0; }
.tr-empty { color: var(--muted); }
.tr-hero-num { margin: 10px 0 14px; padding: 18px 18px 16px; border-radius: 14px; background: linear-gradient(135deg, var(--navy), var(--navy2)); color: #fff; position: relative; overflow: hidden; }
.tr-hero-num::after { content: '¥'; position: absolute; right: 14px; bottom: -26px; font-size: 7rem; font-weight: 800; color: rgba(255, 255, 255, .05); line-height: 1; }
.tr-hero-num .k { font-size: .82rem; color: #c9cbe0; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tr-hero-num .v { display: block; font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; color: var(--gold); line-height: 1.2; margin: 4px 0 2px; letter-spacing: .01em; }
.tr-hero-num .fx { display: block; font-size: .95rem; color: #fff; font-weight: 700; }
.tr-hero-num .p { display: block; font-size: .76rem; color: #a9acc6; margin-top: 4px; }
.tr-big { font-size: 1.6rem; font-weight: 800; margin: 6px 0; }

/* 扣費瀑布條 */
.tr-bar { margin: 6px 0 4px; }
.tr-bar-track { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: #efe9e1; }
.tr-bar-track span { display: block; height: 100%; min-width: 3px; }
.tr-bar .net { background: linear-gradient(90deg, #27ae60, #1e8449); }
.tr-bar .store { background: var(--gold); }
.tr-bar .prov { background: var(--red2); }
.tr-bar .unk { background: repeating-linear-gradient(45deg, #d8d0c4 0 6px, #ece6dd 6px 12px); }
.tr-breakdown { list-style: none; margin: 12px 0 6px; padding: 0; }
.tr-breakdown li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.tr-breakdown li:last-child { border-bottom: 0; }
.tr-breakdown .lbl { display: inline-flex; align-items: center; gap: 8px; color: #444; }
.tr-breakdown .lbl::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--dot, #c9c1b6); flex-shrink: 0; }
.tr-breakdown .val { font-weight: 800; color: var(--navy); text-align: end; white-space: nowrap; }
.tr-breakdown .total { font-size: 1rem; }
.tr-breakdown .total .val { color: var(--ok); }
.tr-breakdown .minus .val { color: var(--bad); }
.tr-breakdown .muted .val { color: var(--muted); font-weight: 700; }
.tr-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0; font-size: .86rem; }
.tr-dl dt { color: var(--muted); }
.tr-dl dd { margin: 0; font-weight: 700; text-align: end; }
.tr-msgs { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.tr-msgs li { background: var(--warn-soft); color: #6d4a00; border-radius: 10px; padding: 8px 12px 8px 34px; font-size: .84rem; position: relative; }
.tr-msgs li::before { content: '⚠️'; position: absolute; left: 10px; top: 8px; font-size: .85rem; }
.tr-next { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: n; }
.tr-next li { counter-increment: n; position: relative; padding: 0 0 14px 38px; font-size: .88rem; }
.tr-next li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: #8a5a00; font-weight: 800; font-size: .78rem; display: grid; place-items: center; }
.tr-next li:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.tr-result-store { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: .86rem; }
.tr-result-store strong { color: var(--navy); }

/* 匯率 */
.tr-fx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.tr-fx label { font-weight: 700; font-size: .84rem; color: var(--navy); display: block; margin-bottom: 4px; }
.tr-fx-value { font-size: 1.15rem; font-weight: 800; color: var(--navy); margin: 0; }
.tr-fx-value:empty { display: none; }
.tr-fx-source { margin: 2px 0 0; font-size: .76rem; }

/* 分享 */
.tr-share { border-top: 1px solid var(--line); padding-top: 14px; }
.tr-share h3 { margin-top: 0; font-size: .9rem; }
.tr-share-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-share-status { font-size: .84rem; color: var(--ok); min-height: 1em; margin: 6px 0 0; }

/* ── 按鈕 ── */
.tr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.tr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 26px; border: 0; border-radius: 10px; background: var(--red); color: #fff; font-weight: 800; font-size: .98rem; cursor: pointer; text-decoration: none; transition: .2s; box-shadow: 0 3px 10px rgba(192, 57, 43, .22); }
.tr-btn:hover { background: var(--red2); color: #fff; transform: translateY(-1px); }
.tr-btn.block { width: 100%; }
.tr-btn-ghost { background: #fff; color: var(--navy); border: 2px solid #e4ddd2; box-shadow: none; min-height: 40px; padding: 8px 14px; font-size: .84rem; font-weight: 700; }
.tr-btn-ghost:hover { background: #fff; color: var(--navy); border-color: var(--navy); }
.tr-btn-navy { background: var(--navy); box-shadow: none; }
.tr-btn-navy:hover { background: var(--navy2); }
.tr-link { font-weight: 700; }

/* 說明摺疊 */
details > summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: .88rem; min-height: 32px; display: flex; align-items: center; gap: 6px; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '›'; display: inline-block; font-size: 1.1rem; transition: transform .15s; color: var(--red); width: 12px; }
details[open] > summary::before { transform: rotate(90deg); }
.tr-help { margin: 8px 0; }
.tr-help p { background: #faf7f2; border-radius: 10px; padding: 10px 12px; margin: 6px 0; font-size: .86rem; }
.tr-adv { border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin: 10px 0; background: #fdfbf8; }
.tr-adv[open] { padding-bottom: 12px; }
.tr-sources { margin-top: 12px; font-size: .84rem; }
.tr-sources ul { margin: 6px 0; padding-inline-start: 18px; }
.tr-sources li { margin: 4px 0; }

/* ── 表格 ── */
.tr-table-wrap { position: relative; overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); margin: 10px 0; }
.tr-table { width: 100%; border-collapse: collapse; font-size: .86rem; background: #fff; }
.tr-table caption { text-align: start; font-weight: 800; color: var(--navy); padding: 10px 12px; }
.tr-table th, .tr-table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.tr-table thead th { background: #faf7f2; font-size: .78rem; color: var(--muted); font-weight: 800; white-space: nowrap; }
.tr-table tbody tr:last-child > * { border-bottom: 0; }
.tr-table tbody tr:hover { background: #fdfaf5; }
.tr-num { text-align: end !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 完整試算明細列 */
.tr-lines { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.tr-lines th { text-align: start; font-size: .76rem; color: var(--muted); font-weight: 800; padding: 0 4px; }
.tr-lines td { padding: 0 4px; vertical-align: middle; }
.tr-lines td:last-child { width: 44px; }
.tr-ab { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.tr-plan { border: 2px solid var(--line) !important; border-radius: 14px; padding: 14px !important; background: #fff; }
.tr-plan legend { font-weight: 800; color: var(--navy); padding: 0 6px !important; }
.tr-manual-fees { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-manual-fees label { font-size: .84rem; font-weight: 700; }

/* ── 資訊頁元件 ── */
.tr-page-head { display: flex; gap: 16px; align-items: center; margin: 10px 0 6px; }
.tr-page-head .tr-avatar { width: 64px; height: 64px; border-radius: 16px; font-size: 1.8rem; }
.tr-page-head h1 { margin: 0; }
.tr-page-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.tr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.tr-kpi { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; }
.tr-kpi b { display: block; font-size: 1.05rem; color: var(--navy); line-height: 1.35; }
.tr-kpi span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.tr-kpi.accent { background: var(--navy); }
.tr-kpi.accent b { color: var(--gold); }
.tr-kpi.accent span { color: #c9cbe0; }

/* 商店目錄 */
.tr-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.tr-filter-bar a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1.5px solid #e4ddd2; font-size: .82rem; font-weight: 700; color: var(--navy); text-decoration: none; }
.tr-filter-bar a:hover { border-color: var(--red); color: var(--red); }
.tr-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 10px 0; }
.tr-store-grid a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 1.5px solid transparent; height: 100%; }
.tr-store-grid a:hover { border-color: var(--gold); transform: translateY(-1px); }
.tr-store-grid strong { color: var(--navy); font-size: .9rem; line-height: 1.3; }
.tr-store-grid .tr-opt-meta { grid-column: 2; }
.tr-group-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 4px; scroll-margin-top: 120px; }
.tr-group-head h2 { margin: 0; }
.tr-count { font-size: .76rem; color: var(--muted); font-weight: 700; }

/* 業者比較卡 */
.tr-op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 12px 0; }
.tr-op-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.tr-op-card h3 { margin: 0; font-size: 1rem; }
.tr-op-card h3 a { color: var(--navy); text-decoration: none; }
.tr-op-card h3 a:hover { color: var(--red); }
.tr-op-card p { margin: 0; font-size: .84rem; color: #555; }
.tr-op-card .tr-op-foot { margin-top: auto; padding-top: 8px; font-size: .78rem; color: var(--muted); }
.tr-matrix th:first-child, .tr-matrix td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 150px; }
.tr-matrix td { text-align: center; }
.tr-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .74rem; font-weight: 800; }
.tr-dot.verified { background: var(--ok-soft); color: var(--ok); }
.tr-dot.reported { background: var(--info-soft); color: var(--info); }
.tr-dot.unknown { background: #f4f2ee; color: #b0a89c; }
.tr-dot.no { background: var(--bad-soft); color: var(--bad); }

/* 手續費比較條 */
.tr-feebars { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.tr-feebars li { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .86rem; }
.tr-feebars .name { font-weight: 700; color: var(--navy); }
.tr-feebars .track { height: 14px; border-radius: 999px; background: #efe9e1; overflow: hidden; display: flex; }
.tr-feebars .track span { display: block; height: 100%; }
.tr-feebars .keep { background: linear-gradient(90deg, #27ae60, #1e8449); }
.tr-feebars .range { background: repeating-linear-gradient(45deg, #9fd3b4 0 6px, #c9ead7 6px 12px); }
.tr-feebars .v { font-weight: 800; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 指南時間軸 */
.tr-timeline { list-style: none; margin: 10px 0; padding: 0; }
.tr-timeline > li { position: relative; padding: 0 0 22px 64px; }
.tr-timeline > li::before { content: ''; position: absolute; left: 23px; top: 50px; bottom: 0; width: 2px; background: var(--line); }
.tr-timeline > li:last-child::before { display: none; }
.tr-tl-icon { position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: #fff; box-shadow: var(--shadow); }
.tr-timeline h2 { margin: 6px 0 6px; }
.tr-timeline .tr-card { margin: 8px 0 0; }
.tr-timeline ul { margin: 0; padding-inline-start: 18px; }
.tr-timeline li li { margin: 4px 0; }

.tr-dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.tr-dl-grid div { background: #faf7f2; border-radius: 10px; padding: 10px 12px; }
.tr-dl-grid dt { font-size: .74rem; color: var(--muted); font-weight: 700; }
.tr-dl-grid dd { margin: 2px 0 0; font-weight: 700; color: var(--navy); }

.tr-history { padding-inline-start: 20px; }
.tr-options { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.tr-opt { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.tr-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tr-prices label { font-size: .84rem; font-weight: 700; }
.tr-storelist { columns: 2 260px; padding-inline-start: 18px; }

/* 勘誤 */
.tr-errata form { display: grid; gap: 10px; max-width: 640px; }
.tr-errata label { display: grid; gap: 4px; font-weight: 700; font-size: .86rem; }
.tr-errata .tr-btn { justify-self: start; }
.tr-errata-status { font-size: .86rem; color: var(--ok); }

/* 頁尾 */
.tr-footer { background: var(--navy); color: #b9bbd0; font-size: .8rem; padding: 26px 16px 34px; }
.tr-footer-inner { max-width: 1200px; margin: 0 auto; }
.tr-footer a { color: #fff; }
.tr-footer .tr-brand { font-size: .95rem; margin-bottom: 8px; }
.tr-footer p { margin: 6px 0; }

/* ── RWD ── */
@media (max-width: 960px) {
  .tr-calculator { grid-template-columns: 1fr; }
  .tr-result { position: static; }
  .tr-flow { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .tr-flow li:nth-child(2)::after { content: none; }
}
@media (max-width: 720px) {
  .tr-languages { display: none; }
  .tr-lang-short { display: block; }
  .tr-lang-short select { min-height: 34px; padding: 4px 8px; font-size: .8rem; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25); width: auto; }
  .tr-lang-short select option { color: var(--ink); }
  .tr-brand { font-size: .98rem; letter-spacing: .08em; }
  .tr-nav { top: 56px; }
  .tr-nav a { padding: 10px 10px 8px; font-size: .84rem; }
  .tr-hero { padding-top: 14px; }
  .tr-feebars li { grid-template-columns: minmax(0, 1fr) auto; }
  .tr-feebars .track { grid-column: 1 / -1; grid-row: 2; }
  .tr-fx { grid-template-columns: 1fr; }
  .tr-lines thead { display: none; }
  .tr-lines tr { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
  .tr-lines td { display: block; padding: 0; }
  .tr-lines td:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
  .tr-lines td:last-child { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .tr-manual-fees { grid-template-columns: 1fr; }
  .tr-page-head .tr-avatar { width: 52px; height: 52px; font-size: 1.5rem; }
  .tr-timeline > li { padding-left: 54px; }
  .tr-tl-icon { width: 42px; height: 42px; font-size: 1.2rem; }
  .tr-timeline > li::before { left: 20px; top: 44px; }
}
@media (max-width: 400px) {
  .tr-segment { grid-template-columns: 1fr 1fr; }
  .tr-header-inner { gap: 8px; padding-inline: 12px; }
  .tr-icon-btn { width: 32px; height: 32px; }
}
@media print {
  .tr-header, .tr-nav, .tr-footer, .tr-quick, .tr-advanced, .tr-share, .tr-fx details, .tr-errata, .tr-mode-nav, .tr-hero, .tr-flow, noscript { display: none !important; }
  body { background: #fff; }
  .tr-calculator { display: block; }
  .tr-card { box-shadow: none; border: 1px solid #ccc; }
  .tr-hero-num { background: #fff; color: #000; border: 2px solid #000; }
  .tr-hero-num .v { color: #000; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 480px) {
  .tr-stats { gap: 6px; display: grid; grid-template-columns: repeat(4, 1fr); }
  .tr-stat b { font-size: 1.35rem; }
  .tr-stat span { font-size: .7rem; line-height: 1.3; display: block; }
}
@media (max-width: 480px) {
  .tr-hero .tr-lead { font-size: .9rem; }
  .tr-flow { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
  .tr-flow li { padding: 12px 4px 8px; border-radius: 10px; }
  .tr-flow li::after { display: none; }
  .tr-flow-icon { font-size: 1.25rem; }
  .tr-flow strong { font-size: .72rem; line-height: 1.3; }
  .tr-flow small { display: none; }
}

/* ───── 2026-11-17 第三輪：版面整理 ───── */
/* 避免一字斷行 */
p, li, dd, dt, small, .tr-lead, .tr-hint, .tr-callout p { text-wrap: pretty; }
h1, h2, h3, legend, .tr-opt-name { text-wrap: balance; }
.tr-muted { color: var(--muted); }
.tr-chip.muted { background: #f1ede7; color: #8a837a; }
.tr-hero-slim { padding: 18px 0 2px; }
.tr-hero-slim h1 { margin: 0 0 4px; }
.tr-hero-slim .tr-lead { margin: 0 auto; }
.tr-segment-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tr-segment-3 span { padding: 8px 6px; }
.tr-segment label[hidden] { display: none !important; }
/* 原生搜尋框的清除鈕隱藏，只保留一個 × */
.tr-combo-control input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.tr-combo-control input::-ms-clear { display: none; }
.tr-provider-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tr-provider-line a { font-weight: 800; color: var(--navy); text-decoration: none; }
.tr-provider-line a:hover { color: var(--red); text-decoration: underline; }
.tr-provider-line .tr-chip { margin-inline-start: auto; }

/* 結果卡內的換算 */
.tr-hero-num .k { flex-wrap: wrap; }
.tr-hero-store { font-weight: 700; color: #fff; background: rgba(255, 255, 255, .1); padding: 2px 10px; border-radius: 999px; }
.tr-hero-num .tr-fx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; padding: 10px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); position: relative; z-index: 1; }
.tr-result:not(.has-result) .tr-fx { display: none; }
.tr-fx-pick select { width: auto; min-height: 34px; padding: 4px 30px 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff; font-size: .82rem; font-weight: 700; }
.tr-fx-pick select option { color: var(--ink); }
.tr-fx-source { margin: 0; font-size: .74rem; color: #a9acc6; flex: 1 1 160px; }
.tr-fx-manual { width: 100%; font-size: .8rem; }
.tr-fx-manual summary { color: #c9cbe0; font-size: .78rem; min-height: 24px; }
.tr-fx-manual summary::before { color: var(--gold); }
.tr-fx-manual label { display: flex; gap: 8px; align-items: center; color: #c9cbe0; margin-top: 6px; }
.tr-fx-manual input { max-width: 140px; min-height: 36px; padding: 6px 10px; font-size: .9rem; }
.tr-result .tr-share { display: flex; flex-wrap: wrap; gap: 8px; border-top: 0; padding: 0 22px 20px; margin: 0; }
.tr-result .tr-share .tr-btn { flex: 1 1 140px; min-height: 46px; }
.tr-result .tr-share .tr-share-status { flex-basis: 100%; }

/* 退稅資訊子分頁 */
.tr-subtabs { display: flex; gap: 6px; margin: 4px 0 10px; overflow-x: auto; scrollbar-width: none; }
.tr-subtabs a { flex-shrink: 0; display: inline-flex; gap: 6px; align-items: center; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1.5px solid #e4ddd2; text-decoration: none; color: var(--navy); font-weight: 700; font-size: .88rem; }
.tr-subtabs a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* 回報按鈕與對話框 */
.tr-report-btn { position: fixed; right: 16px; bottom: 16px; z-index: 80; border: 0; border-radius: 999px; padding: 10px 16px; background: #fff; color: var(--navy); font-weight: 700; font-size: .84rem; box-shadow: var(--shadow-lg); cursor: pointer; }
.tr-report-btn:hover { background: var(--navy); color: #fff; }
.tr-dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-lg); }
.tr-dialog::backdrop { background: rgba(26, 26, 46, .45); }
.tr-dialog form { padding: 20px 22px 22px; display: grid; gap: 10px; }
.tr-dialog-head { display: flex; align-items: center; justify-content: space-between; }
.tr-dialog-head h2 { margin: 0; }
.tr-dialog-close { border: 0; background: #f4f0ea; width: 36px; height: 36px; border-radius: 10px; font-size: 1.3rem; cursor: pointer; }
.tr-dialog label { display: grid; gap: 4px; font-weight: 700; font-size: .86rem; }
.tr-dialog .tr-btn { justify-self: start; }

/* 清單與退款方式 */
.tr-list { margin: 6px 0; padding-inline-start: 20px; }
.tr-list li { margin: 4px 0; }
.tr-methods { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tr-methods li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #faf7f2; }
.tr-methods .tr-method-icon { font-size: 1.3rem; line-height: 1.3; }
.tr-methods small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.tr-method-guide { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.tr-method-guide li { display: grid; grid-template-columns: minmax(170px, 220px) 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #faf7f2; }
.tr-section-h { margin: 28px 0 10px; font-size: 1.2rem; }

/* 指南四步驟 */
.tr-bigsteps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.tr-bigsteps > li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.tr-bigstep-num { width: 48px; height: 48px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 1.3rem; display: grid; place-items: center; }
.tr-bigsteps h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.tr-light { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 800; font-size: .8rem; color: #fff; margin-inline-end: 4px; }
.tr-light.green { background: var(--ok); }
.tr-light.red { background: var(--bad); }
.tr-guide-tool { border: 2px solid var(--gold); }
.tr-guide-form { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.tr-guide-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.tr-guide-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #faf7f2; }
.tr-guide-num { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; }
.tr-guide-steps p { margin: 4px 0 0; font-size: .9rem; }

/* 比較排行 */
.tr-compare-form { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 14px; }
.tr-rank { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.tr-rank > li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: #faf7f2; }
.tr-rank-no { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.tr-rank .tr-rank-no.top { background: var(--gold); color: var(--navy); }
.tr-rank-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tr-rank-head a { font-weight: 800; color: var(--navy); text-decoration: none; }
.tr-rank .track { display: flex; height: 10px; border-radius: 999px; background: #efe9e1; overflow: hidden; margin: 6px 0 2px; }
.tr-rank .track .keep { background: linear-gradient(90deg, #27ae60, #1e8449); }
.tr-rank .track .range { background: repeating-linear-gradient(45deg, #9fd3b4 0 6px, #c9ead7 6px 12px); }
.tr-rank .v { font-weight: 800; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.tr-rank .tr-help { margin: 2px 0 0; }

/* 完整試算手續費 */
.tr-fee-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; }
.tr-cash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.tr-cash-grid > .tr-card { margin: 0; }
@media (max-width: 720px) {
  .tr-method-guide li { grid-template-columns: 1fr; gap: 2px; }
  .tr-bigsteps > li { grid-template-columns: 40px 1fr; padding: 14px; }
  .tr-bigstep-num { width: 36px; height: 36px; font-size: 1rem; }
  .tr-report-btn { right: 10px; bottom: 10px; padding: 8px 12px; font-size: .78rem; }
  .tr-segment-3 small { font-size: .68rem; }
}

/* ── 2026-11-17 Owner 意見（PR #3）：單欄試算、手續費卡、來源標籤、比較店家、新制指南四步驟、現金退稅 ── */
/* 試算改單欄：表單 → 結果，試算後自動捲到結果（手機優先，不再有兩欄各自捲動） */
.tr-calculator .tr-hero-num { scroll-margin-top: 120px; }
.tr-prov { text-decoration: none; }
.tr-prov small { font-weight: 600; opacity: .85; }
.tr-provider-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-provider-line > a:not(.tr-chip) { font-weight: 800; color: var(--navy); text-decoration: none; }
.tr-provider-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tr-store-facts { display: grid; gap: 10px; }
.tr-store-facts .tr-fee-list li { background: none; padding: 0; font-size: .86rem; }
.tr-fee-dl { display: grid; gap: 8px; margin: 8px 0 0; }
.tr-fee-dl > div { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 10px; padding: 10px 12px; background: #faf7f2; border-radius: 10px; }
.tr-fee-dl dt { font-weight: 800; color: var(--navy); font-size: .88rem; line-height: 1.35; }
.tr-fee-dl dt small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
.tr-fee-dl dd { margin: 0; font-size: .88rem; }
.tr-fee-dl strong.ok { color: var(--ok); }
.tr-fee-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tr-fee-list small { color: var(--muted); }
.tr-radio-rich { align-items: flex-start; }
.tr-radio-rich input { margin-top: 3px; }
.tr-radio-text { display: grid; gap: 2px; }
.tr-radio-text small { font-weight: 500; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.tr-breakdown .lbl { flex-wrap: wrap; }
.tr-breakdown .lbl small { flex-basis: 100%; padding-inline-start: 18px; font-size: .74rem; color: var(--muted); line-height: 1.4; }
.tr-check { display: flex; align-items: center; gap: 8px; flex-basis: 100%; font-size: .84rem; color: var(--muted); }
.tr-check input { width: 18px; height: 18px; accent-color: var(--red); }
.tr-callout-inline { background: var(--warn-soft); color: #5c3d00; border-radius: 10px; padding: 8px 12px; font-size: .86rem; margin: 8px 0; }
.tr-listbox-foot a { font-weight: 800; }
.tr-nowrap { white-space: nowrap; }
.tr-sources .tr-list li { font-size: .82rem; }

/* 比較店家 */
.tr-compare-form { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tr-legend .sw { display: inline-block; width: 18px; height: 10px; border-radius: 999px; vertical-align: -1px; }
.tr-legend .sw::before { content: none; }
.tr-legend .sw.keep { background: linear-gradient(90deg, #27ae60, #1e8449); }
.tr-legend .sw.range { background: #b9e3c9; }
.tr-rank .track .range { background: #b9e3c9; }
.tr-rank-fees { margin: 2px 0 0; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.tr-rank > li.is-partial { background: #f4f1ec; }
.tr-rank > li.is-partial .tr-rank-no { background: #c9c1b6; color: #fff; }
.tr-method-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.tr-method-rows li small { grid-column: 1 / -1; color: var(--muted); font-size: .74rem; }
.tr-method-rows li.is-chosen span { font-weight: 800; color: var(--navy); }
.tr-method-rows li.is-muted { color: var(--muted); }
.tr-compare-out h3 { font-size: .95rem; color: var(--navy); margin: 18px 0 4px; }

/* 新制指南：四步驟 */
.tr-g4 { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tr-g4-step { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 14px 14px; border-top: 4px solid var(--red); }
.tr-g4-step:not(:last-child)::after { content: '➜'; position: absolute; right: -14px; top: 34px; color: var(--gold); font-weight: 800; font-size: 1.1rem; z-index: 1; }
.tr-g4-icon { font-size: 2.2rem; line-height: 1; }
.tr-g4-num { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.tr-g4-step h3 { margin: 8px 0 0; color: var(--navy); font-size: 1rem; }
.tr-g4-tag { margin: 0 0 6px; color: var(--red); font-weight: 700; font-size: .78rem; }
.tr-g4-step ul { margin: 0; padding-inline-start: 18px; font-size: .82rem; line-height: 1.55; }
.tr-g4-step li { margin: 3px 0; }

/* 現金退稅與機場 */
.tr-accordion { display: grid; gap: 8px; margin: 10px 0; }
.tr-airport { background: #faf7f2; border-radius: 12px; }
.tr-airport > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.tr-airport > summary::-webkit-details-marker { display: none; }
.tr-airport > summary strong { color: var(--navy); }
.tr-airport-body { padding: 0 14px 12px; font-size: .88rem; }
.tr-loc-list { margin: 0; padding-inline-start: 18px; }
.tr-loc-list li { margin: 2px 0; }
.tr-loc-table .col-airport { min-width: 9em; white-space: nowrap; }
.tr-loc-table .col-hours, .tr-table .col-hours { width: 9.5em; }
.tr-cash-grid h2 .tr-avatar { margin-inline-end: 8px; }
.tr-cash-matrix td { text-align: center; }

@media (max-width: 960px) {
  .tr-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-g4-step:nth-child(2)::after { content: none; }
}
@media (max-width: 560px) {
  .tr-g4 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tr-g4-step:not(:last-child)::after { content: '⬇'; right: auto; left: 50%; top: auto; bottom: -19px; transform: translateX(-50%); }
  .tr-fee-dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.tr-legend-bars { align-items: center; }
.tr-legend-bars span::before { content: none; }
.tr-legend-bars .sw { margin-inline-start: 6px; }
.tr-rank > li > .tr-rank-methods { grid-column: 2 / -1; margin: 0; }
.tr-cash-matrix th[scope="row"] { min-width: 10em; }
@media (max-width: 560px) {
  .tr-loc-table thead { display: none; }
  .tr-loc-table, .tr-loc-table tbody, .tr-loc-table tr, .tr-loc-table td { display: block; width: auto; }
  .tr-loc-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tr-loc-table td { padding: 2px 0; border: 0; }
  .tr-loc-table td.col-airport { font-weight: 800; }
  .tr-loc-table td.col-hours:has(small.tr-muted) { display: none; }
}

/* ── 2026-11-17 第二輪：結果卡與分享改淺色（Owner 1.5：顏色不要那麼重，與全站一致） ── */
.tr-hero-num { background: #f3faf5; color: var(--ink); border: 1.5px solid #cfe8d8; }
.tr-hero-num::after { color: rgba(30, 132, 73, .07); }
.tr-hero-num .k { color: var(--muted); }
.tr-hero-num .v { color: var(--ok); }
.tr-hero-num .fx { color: var(--navy); }
.tr-hero-store { color: var(--navy); background: #fff; border: 1px solid #cfe8d8; }
.tr-hero-num .tr-fx { border-top-color: #cfe8d8; }
.tr-fx-pick select { border-color: #cfe8d8; background: #fff; color: var(--navy); }
.tr-fx-source { color: var(--muted); }
.tr-fx-manual summary, .tr-fx-manual label { color: var(--muted); }
.tr-fx-manual summary::before { color: var(--red); }
.tr-result .tr-share .tr-btn { background: #fff; color: var(--navy); border: 2px solid #e4ddd2; box-shadow: none; font-size: .9rem; }
.tr-result .tr-share .tr-btn:hover { border-color: var(--red); color: var(--red); }
.tr-result-notes { margin: 6px 0 4px; padding: 10px 14px; border-radius: 10px; background: #faf7f2; font-size: .82rem; }
.tr-result-notes strong { display: block; color: var(--navy); margin-bottom: 4px; }
.tr-result-notes ul { margin: 0; padding-inline-start: 18px; color: #555; line-height: 1.6; }
.tr-compare-tools { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-bottom: 6px; }
@media (max-width: 560px) { .tr-compare-tools { grid-template-columns: minmax(0, 1fr); } }

/* 新制指南：直式時間軸（第二輪 4.1～4.2） */
.tr-flow5 { list-style: none; margin: 18px 0 8px; padding: 0; position: relative; }
.tr-flow5 > li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 16px; }
.tr-flow5 > li:not(:last-child)::before { content: ''; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 10px); }
.tr-f5-mark { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; box-shadow: var(--shadow); }
.tr-f5-icon { font-size: 1.6rem; line-height: 1; }
.tr-f5-body { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; }
.tr-f5-body h3 { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 1.05rem; }
.tr-f5-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: .78rem; flex-shrink: 0; }
.tr-f5-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.tr-f5-tags span { font-size: .74rem; font-weight: 700; color: #8a5a00; background: var(--gold-soft); border-radius: 999px; padding: 2px 10px; }
.tr-f5-body ul { margin: 0; padding-inline-start: 20px; font-size: .9rem; line-height: 1.7; }
.tr-f5-body li { margin: 2px 0; }
.tr-link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.tr-link-cards a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 14px 16px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tr-link-cards a:hover { border-color: var(--red); }
.tr-link-cards a > span { grid-row: span 2; font-size: 1.8rem; text-align: center; }
.tr-link-cards strong { color: var(--navy); font-size: 1rem; }
.tr-link-cards strong::after { content: ' →'; color: var(--red); }
.tr-link-cards small { color: var(--muted); font-size: .8rem; }
details.tr-guide-tool > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 1.1rem; font-weight: 800; color: var(--navy); min-height: 44px; }
details.tr-guide-tool > summary small { flex-basis: 100%; padding-inline-start: 18px; font-size: .82rem; font-weight: 500; color: var(--muted); }
details.tr-guide-tool[open] > summary { margin-bottom: 10px; }
@media (max-width: 560px) {
  .tr-flow5 > li { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .tr-f5-mark { width: 40px; height: 40px; }
  .tr-f5-icon { font-size: 1.2rem; }
  .tr-flow5 > li:not(:last-child)::before { left: 19px; top: 40px; }
  .tr-f5-body { padding: 12px 14px; }
}
/* 第二輪 5、6.3：重點數字卡改淺色 */
.tr-kpi.accent { background: #fff; border: 1.5px solid #f3d9a4; }
.tr-kpi.accent b { color: var(--navy); }
.tr-kpi.accent span { color: var(--muted); }
.tr-table td small { display: block; color: var(--muted); font-size: .76rem; }
/* 第二輪 6：各機場改回卡片格，點卡片就地展開 */
.tr-airport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 10px 0; align-items: start; }
.tr-airport-grid .tr-airport { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.tr-airport-grid .tr-airport[open] { border-color: var(--gold); }
.tr-airport-grid .tr-airport > summary { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 10px; padding: 10px 12px; }
.tr-airport-grid .tr-airport > summary::before { content: none; }
.tr-airport-grid .tr-airport > summary > .tr-avatar { grid-row: span 2; }
.tr-airport-grid .tr-airport > summary .tr-opt-meta { grid-column: 2; }
.tr-airport-grid .tr-airport > summary { position: relative; padding-inline-end: 30px; }
.tr-airport-grid .tr-airport > summary::after { content: '▾'; position: absolute; right: 12px; top: 12px; color: var(--muted); }
.tr-airport-grid .tr-airport[open] > summary::after { content: '▴'; }
/* 商店頁退款方式表：手機改成一列一張卡 */
.tr-stack th[scope="row"] { text-align: start; font-weight: 700; color: var(--navy); }
@media (max-width: 560px) {
  .tr-stack thead { display: none; }
  .tr-stack, .tr-stack tbody, .tr-stack tr, .tr-stack th, .tr-stack td { display: block; width: auto; }
  .tr-stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tr-stack th, .tr-stack td { padding: 2px 0; border: 0; text-align: start; }
  .tr-stack td { display: flex; justify-content: space-between; gap: 12px; }
  .tr-stack td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; }
  .tr-stack td small { text-align: end; }
}

/* 第三輪 3：依退款額不能選的方式 */
.tr-radio.is-disabled { opacity: .55; cursor: not-allowed; background: #f6f3ee; }
.tr-radio .tr-blocked { color: var(--bad); font-weight: 700; }

/* 第三輪 9：商店詳情頁只留退款方式表格 */
.tr-store-provider { margin: 8px 0 14px; font-weight: 700; }
.tr-store-provider > a { color: var(--navy); text-decoration: none; }
.tr-store-fee { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 10px 12px; margin: 8px 0 10px; background: #faf7f2; border-radius: 10px; }
.tr-store-fee > small { color: var(--muted); }
.tr-store-fee > :not(strong):not(small) { grid-column: 1 / -1; }
.tr-tier-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: .88rem; }
.tr-tier-list li { white-space: nowrap; }
.tr-stack th[scope="row"] small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.tr-stack tr.is-muted { color: var(--muted); }
@media (max-width: 560px) {
  .tr-stack caption { display: block; width: auto; text-align: start; padding: 10px 12px 0; }
  .tr-stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .tr-stack td::before { flex-shrink: 0; }
  .tr-stack .tr-cell { text-align: end; }
  .tr-stack .tr-cell small { display: block; }
  .tr-stack .tr-tier-list li { white-space: normal; }
}

/* 第三輪 4：避免一字斷行（段落最後一行不會只剩一兩個字；標題兩行長度平均） */
p, li, dd, td, th, small, figcaption, .tr-hint, .tr-lead { text-wrap: pretty; }
h1, h2, h3, summary, .tr-hero-num .k { text-wrap: balance; }
.tr-chip, .tr-badge, .tr-btn, .tr-nav a, .tr-subtabs a { white-space: nowrap; }

/* 第三輪 12：各機場等高等寬資訊卡（不可點選的樣式） */
.tr-airport-cards { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; align-items: stretch; }
.tr-airport-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: #faf7f2; border: 1px solid var(--line); border-radius: 12px; }
.tr-airport-title { display: flex; align-items: center; gap: 10px; }
.tr-airport-title strong { color: var(--navy); }
.tr-airport-tags { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .84rem; color: #444; }
.tr-airport-more { margin-top: auto; font-size: .82rem; font-weight: 700; }
.tr-dates { margin: -8px 0 12px; font-size: .76rem; color: var(--muted); }
/* 第三輪 13：結果明細在窄螢幕（320px）不亂排：標籤吃剩餘寬度、金額不換行 */
.tr-breakdown li { align-items: flex-start; }
.tr-breakdown .lbl { flex: 1 1 auto; min-width: 0; }
.tr-breakdown .val { flex: 0 0 auto; max-width: 48%; white-space: normal; text-align: end; }
.tr-breakdown .lbl { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 8px; align-items: baseline; }
.tr-breakdown .lbl::before { align-self: center; }
.tr-breakdown .lbl small { grid-column: 2; padding-inline-start: 0; }

/* 2026-11-18 第四輪：現金退稅頁 */
/* 機場卡片：標籤自成一列 */
.tr-airport-tags .tr-chip { white-space: normal; }
.tr-airport-svcs { display: flex; flex-wrap: wrap; gap: 6px; }
/* 「哪些退稅服務商可以領現金」✓／— 置中 */
.tr-table.tr-cash-matrix td, .tr-table.tr-cash-matrix thead th:not(:first-child) { text-align: center; vertical-align: middle; }
.tr-table.tr-cash-matrix td .tr-dot { margin: 0 auto; }
/* 重點數字卡：每格至少能放下一行標籤，不再一字斷行 */
.tr-cash-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5em), 1fr)); }
.tr-cash-kpis .tr-kpi span { display: block; text-wrap: balance; word-break: keep-all; }
/* 範例試算 */
.tr-cash-example { margin: 4px 0 12px; padding: 10px 14px; border-radius: 12px; background: #f3faf5; border: 1px solid #cfe8d8; font-size: .86rem; }
.tr-cash-example > strong { display: block; color: var(--navy); margin-bottom: 6px; }
.tr-cash-example ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tr-cash-example li { display: flex; justify-content: space-between; gap: 12px; }
.tr-cash-example li.total { border-top: 1px dashed #cfe8d8; margin-top: 4px; padding-top: 4px; font-size: .95rem; }
.tr-cash-example li.total b { color: var(--ok); }

/* 兩種現金服務哪個比較省（2026-11-18） */
.tr-cash-compare th, .tr-cash-compare td { padding: 8px 10px; }
.tr-cash-compare thead th { white-space: normal; text-align: end; }
.tr-cash-compare thead th:first-child { text-align: start; }
.tr-cash-avail { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.tr-cash-avail > li { border: 1px solid var(--line, #e7e1d6); border-radius: 12px; padding: 12px 14px; }
.tr-cash-avail dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.tr-cash-avail dt { color: var(--muted, #6b6b6b); font-size: .9em; white-space: nowrap; }
.tr-cash-avail dd { margin: 0; }

/* 現金服務介紹卡：範例可收合、比較頁連結、桌機兩欄用 subgrid 對齊（2026-11-18） */
details.tr-cash-example { margin: 4px 0 0; }
details.tr-cash-example > summary { cursor: pointer; font-weight: 700; color: var(--navy); }
details.tr-cash-example[open] > summary { margin-bottom: 6px; }
.tr-cash-compare-link { margin: 8px 0 0; font-weight: 700; }
.tr-cash-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5em), 1fr)); }
.tr-cash-grid > .tr-card > * { margin-block: 0; }
.tr-cash-grid > .tr-card { display: grid; gap: 14px; align-content: start; }
.tr-cash-desc p, .tr-cash-sup p { margin: 0 0 8px; }
@media (min-width: 720px) { .tr-cash-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.tr-loc-table td.col-airport { vertical-align: top; }
@media (max-width: 640px) { .tr-loc-table tr.tr-loc-cont { border-top: 0; padding-top: 0; } }
