/* eSIM 比比 · 日本 eSIM 比較。純 CSS，不用框架。 */
:root {
  --bg: #faf7f2;
  --surface: #fff;
  --surface-2: #f8f4ee;
  --line: #ece5db;
  --line-2: #d8cfc2;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #6f6862;
  --brand: #d6452f;
  --action: #c23a25;
  --action-2: #a3301d;
  --action-soft: #fdeee9;
  --accent: #0369a1;
  --accent-2: #075985;
  --accent-soft: #e0f2fe;
  --green: #166534;
  --green-soft: #dcfce7;
  --amber: #92400e;
  --amber-soft: #fef3c7;
  --r: 12px;
  --shadow: none;
  --lift: 0 14px 36px rgb(28 25 23 / .14);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --gutter: 24px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font); }
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.35; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: #fff; padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { left: 16px; }
.ext { width: 13px; height: 13px; flex: none; }

/* ---- 頂欄 ---- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: .02em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; letter-spacing: 0; }
.brand__dest { font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--action-2); background: var(--action-soft); padding: 1px 8px; border-radius: 99px; }
.brand__slogan { font-size: 13px; color: var(--muted); white-space: nowrap; }
.topnav { display: flex; gap: 2px; }
.topnav a { color: var(--ink-2); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.topnav a:hover { background: var(--surface-2); color: var(--action-2); }
.topbar__date { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.toc { display: none; position: relative; margin-left: auto; }
.toc summary { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.toc nav { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; display: grid; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(15 23 42 / .12); }
.toc nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 6px; color: var(--ink); font-size: 15px; text-decoration: none; }
.toc nav a:hover { background: var(--surface-2); }

/* ---- 首屏與選擇器 ---- */
.hero { position: relative; isolation: isolate; background: var(--bg); padding: 0 0 44px; border-bottom: 1px solid var(--line); }
.hero__media { position: absolute; z-index: -1; inset: 0 0 auto; height: 360px; overflow: hidden; background: #2b211c; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(24 16 12 / .86) 0%, rgb(24 16 12 / .70) 45%, rgb(24 16 12 / .42) 100%); }
.hero__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 32px; padding: 36px 0 30px; color: #fff; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #ffcfbf; }
.eyebrow__date { display: none; font-weight: 600; color: rgb(255 255 255 / .78); }
.hero h1 { margin: 0; font-size: clamp(26px, 2.8vw, 36px); font-weight: 700; line-height: 1.35; color: #fff; }
.hero__lead { margin: 8px 0 0; color: rgb(255 255 255 / .9); max-width: 620px; font-size: 16px; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .24); border-radius: 99px; padding: 3px 12px; font-size: 13px; color: rgb(255 255 255 / .9); white-space: nowrap; backdrop-filter: blur(6px); }
.facts b { color: #fff; font-variant-numeric: tabular-nums; }

.tool { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
/* 兩欄時左右卡片等高：用 subgrid 分成「標題／內容／底欄」三列，左邊的符合數和右邊的說明落在同一列 */
@media (min-width: 960px) {
  .tool { grid-template-rows: auto 1fr auto; row-gap: 0; align-items: stretch; }
  .tool > .panel { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; row-gap: 0; }
  .inputs__fields { grid-row: 1 / 3; align-content: start; }
  .fit-sum, .results__foot { grid-row: 3; }
  .results__head { grid-row: 1; }
  .picks, .results > noscript { grid-row: 2; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tool .panel { border-color: transparent; box-shadow: var(--lift); }

.inputs { display: flex; flex-direction: column; overflow: hidden; }
.inputs__fields { padding: 20px; display: grid; gap: 18px; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label, .field > legend { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; margin: 0 0 8px; padding: 0; font-size: 14px; font-weight: 700; }
.field output { font-size: 20px; font-weight: 800; color: var(--action-2); font-variant-numeric: tabular-nums; }
.stepper { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 12px; }
.stepper button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 600 18px/1 var(--font); cursor: pointer; }
.stepper button:hover { border-color: var(--action); color: var(--action); }
input[type=range] { width: 100%; margin: 0; accent-color: var(--action); }
.seg { display: grid; gap: 6px; }
.seg--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg label { position: relative; cursor: pointer; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; flex-direction: column; justify-content: center; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; transition: border-color .15s, background .15s; }
.seg b { font-size: 14px; }
.seg small { font-size: 12px; line-height: 1.4; color: var(--muted); }
.seg label:hover span { border-color: var(--action); }
.seg input:checked + span { border-color: var(--action); background: var(--action-soft); box-shadow: inset 0 0 0 1px var(--action); }
.seg input:checked + span small { color: var(--action-2); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-hint { display: none; margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); font: 15px var(--font); }
.note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; font-size: 13px; background: var(--amber-soft); color: var(--amber); }
.fit-sum { margin: 0; padding: 12px 20px; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-top: 1px solid var(--line); }
.fit-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }

.results { overflow: hidden; }
.results__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.results__head h2 { margin: 0; font-size: 18px; }
.results__head p { margin: 0; font-size: 13px; color: var(--muted); }
.results__foot { margin: 0; padding: 12px 20px; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-top: 1px solid var(--line); }
.picks { list-style: none; margin: 0; padding: 0; container-type: inline-size; } /* 容器放在清單上：放在 .results 會讓它無法當 subgrid */
.pick { display: grid; grid-template-columns: 36px minmax(0, 1fr) 140px 168px; grid-template-areas: "logo head price cta" "logo body body cta"; gap: 6px 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.pick:last-child { border-bottom: 0; }
.pick > .logo { grid-area: logo; }
.pick__head { grid-area: head; min-width: 0; }
.pick__name { margin: 2px 0 0; font-size: 16px; font-weight: 600; }
.pick__name b { font-weight: 700; }
.pick__price { grid-area: price; text-align: right; font-variant-numeric: tabular-nums; }
.pick__price b { display: block; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.pick__price small { display: block; font-size: 12px; color: var(--muted); }
.pick__body { grid-area: body; min-width: 0; }
.pick__why { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.pick__cta { grid-area: cta; display: grid; gap: 6px; align-content: center; }
.picks__empty { padding: 28px 20px; color: var(--ink-2); }
@container (max-width: 699px) {
  .pick { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "logo head price" "body body body" "cta cta cta"; padding: 16px; }
  .pick__cta { grid-template-columns: minmax(0, 1fr) auto; margin-top: 6px; }
  .pick__price b { font-size: 21px; }
}
@container (max-width: 479px) {
  .pick { grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "logo head" "price price" "body body" "cta cta"; }
  .pick__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; text-align: left; margin-top: 4px; }
  .pick__price small { display: inline; }
}

.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.tag--cheap { background: var(--green-soft); color: var(--green); }
.tag--unl { background: var(--accent-soft); color: var(--accent-2); }
.tag--refund { background: var(--amber-soft); color: var(--amber); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chips li { padding: 1px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }

.logo { width: 36px; height: 36px; flex: none; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo--airalo img, .logo--djb img, .logo--klook img { padding: 4px; }
.logo--sm { width: 20px; height: 20px; border-radius: 5px; }
.logo--sm img { padding: 0 !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font: 700 14px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--action); color: #fff; }
.btn--primary:hover { background: var(--action-2); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--action); color: var(--action-2); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn--lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 10px; }
.cur { font-size: .55em; font-weight: 700; margin-right: 2px; letter-spacing: 0; }

/* ---- 區段 ---- */
.section { padding: 56px 0 8px; }
.section:last-of-type { padding-bottom: 56px; }
.section__head { margin-bottom: 18px; }
.section__head h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.4; }
.h-note { margin-left: 6px; font-size: 15px; font-weight: 500; color: var(--muted); }
.section__head p { margin: 6px 0 0; color: var(--ink-2); max-width: 720px; }

/* ---- 全部方案 ---- */
.tbl { container-type: inline-size; overflow: hidden; overflow: clip; }
.funnel { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); }
.funnel__title { margin: 0 0 10px; font-size: 15px; color: var(--ink-2); }
.funnel__title b { color: var(--ink); font-variant-numeric: tabular-nums; }
.funnel__bar { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; }
.funnel__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.funnel__legend li { display: inline-flex; align-items: center; gap: 6px; }
.funnel__legend i { width: 10px; height: 10px; border-radius: 3px; }
.funnel__legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.st-ok { background: #15803d; }
.st-days { background: #94a3b8; }
.st-data { background: #cbd5e1; }
.st-hotspot { background: #f59e0b; }
.st-unknown { background: #e2e8f0; }

.tbl__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.provs { display: flex; flex-wrap: wrap; gap: 6px; }
.provs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 7px; border: 1px solid var(--line-2); border-radius: 99px; background: #fff; color: var(--ink-2); font: 600 13px/1 var(--font); cursor: pointer; }
.provs button.all { padding-left: 11px; }
.provs button:hover { border-color: var(--action); }
.provs button[aria-pressed=true] { border-color: var(--action); background: var(--action-soft); color: var(--action-2); }
.tbl__tools { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tbl__sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tbl__sort select { width: auto; height: 34px; font-size: 14px; }

.thead, .row__main { display: grid; grid-template-columns: 24px minmax(0, 1.8fr) minmax(0, 1.2fr) minmax(0, 1.15fr) 150px 92px 150px; align-items: center; column-gap: 16px; }
.thead { position: sticky; top: 56px; z-index: 5; background: #fff; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.thead span:nth-child(5), .thead span:nth-child(6) { text-align: right; }
.row { border-bottom: 1px solid var(--line); }
.row__main { padding: 14px 20px; }
.row__main:hover { background: #fdfaf6; }
.row__rank { font-size: 14px; font-weight: 800; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.row__plan { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row__plan > div { min-width: 0; }
.row__title { display: block; font-size: 15px; font-weight: 600; }
.row__title b { font-weight: 700; }
.row__sub { display: block; font-size: 12.5px; color: var(--muted); }
.days { display: flex; flex-wrap: wrap; gap: 4px; }
.days span { padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; line-height: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.days span.on { border-color: var(--action); background: var(--action-soft); color: var(--action-2); font-weight: 700; }
.days .range { border: 0; padding: 0; background: none; font-size: 13px; white-space: normal; }
.days-inline { display: none; margin-top: 6px; }
.row__data { font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.row__data span { display: block; }
.row__price { text-align: right; font-variant-numeric: tabular-nums; }
.row__price b { display: block; font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.row__price small { display: block; font-size: 12px; color: var(--muted); }
.row__price .why { display: block; font-size: 13px; color: var(--ink-2); text-align: left; }
.gb-inline { display: none !important; }
.row__gb { text-align: right; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.row__act { display: flex; justify-content: flex-end; gap: 6px; }
.more { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink-2); font: 600 13px/1 var(--font); cursor: pointer; white-space: nowrap; }
.more:hover { border-color: var(--action); color: var(--action-2); }
.more svg { width: 14px; height: 14px; transition: transform .15s; }
.more[aria-expanded=true] svg { transform: rotate(180deg); }
.row.is-out .row__plan, .row.is-out .row__days, .row.is-out .row__data { opacity: .6; }
.row.is-out .row__main { background: #fbf8f4; }
.row__detail { margin: 0 20px 16px; padding: 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; margin: 0; font-size: 13.5px; }
.detail dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.detail dd { margin: 2px 0 0; color: var(--ink-2); }
.detail dd a { display: inline-flex; align-items: center; gap: 3px; }
.detail__wide { grid-column: 1 / -1; }
.variants { display: flex; flex-wrap: wrap; gap: 6px; }
.variants span { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.variants small { color: var(--muted); font-size: 11.5px; }
.detail__note { margin: 8px 0 0; font-size: 12.5px; color: var(--amber); }
.tbl__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 20px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.tbl__empty { padding: 24px 20px; color: var(--ink-2); }
.tbl__foot .show-all { display: none; }
@media (min-width: 720px) {
  #rows.is-long > .row:nth-child(n+21) { display: none; }
  #rows.is-long ~ .tbl__foot .show-all { display: inline-flex; }
}

@container (max-width: 999px) {
  .thead, .row__main { grid-template-columns: 24px minmax(0, 1.7fr) minmax(0, 1fr) 140px 132px; }
  .thead span:nth-child(3), .thead span:nth-child(6), .row__days, .row__gb { display: none; }
  .thead span:nth-child(5) { text-align: right; }
  .days-inline { display: flex; }
  .gb-inline { display: block !important; }
  .detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 639px) {
  .thead { display: none; }
  .row__main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "plan plan" "data price" "act act"; row-gap: 10px; padding: 16px; }
  .row__rank { display: none; }
  .row__plan { grid-area: plan; }
  .row__data { grid-area: data; }
  .row__price { grid-area: price; }
  .row__act { grid-area: act; }
  .row__act .btn { flex: 1; }
  .row__detail { margin: 0 16px 16px; }
  .detail { grid-template-columns: 1fr; }
  .tbl__bar, .funnel, .tbl__foot { padding-left: 16px; padding-right: 16px; }
  .tbl__tools { margin-left: 0; }
}

/* ---- 常見行程 ---- */
.trips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trip { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.trip__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--action-soft); color: var(--action-2); display: grid; place-items: center; }
.trip__icon svg { width: 22px; height: 22px; }
.trip h3 { margin: 0; font-size: 16px; font-weight: 700; }
.trip__cond { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.trip__plan { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trip__plan b { display: block; font-size: 14px; }
.trip__plan span { display: block; font-size: 13px; color: var(--ink-2); }
.trip__price { margin: 0; font-variant-numeric: tabular-nums; }
.trip__price b { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.trip__price small { display: block; font-size: 12px; color: var(--muted); }
.trip .btn { margin-top: auto; }
.trip__plan .tag { display: inline-block; margin-bottom: 4px; }
.trip__alts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trip__alts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.trip__alts .tag { grid-column: 1 / -1; justify-self: start; }
.trip__alts b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- 供應商 ---- */
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable th:first-child, .ptable td:first-child { padding-left: 20px; }
.ptable td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptable td.pcell { min-width: 150px; }
.ptable td:nth-child(5) { min-width: 108px; }
.pname a { white-space: nowrap; }
.pname { display: flex; align-items: center; gap: 10px; }
.pname b { display: block; color: var(--ink); }
.pname a { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; }

/* ---- 問答、機型、方法 ---- */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.qa { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.qa h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.qa p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.devices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.device { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.device__logo { height: 26px; display: flex; align-items: center; }
.device__logo img { height: 26px; width: auto; }
.device__logo img.wordmark { height: 15px; }
.device h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.device p { margin: 0; font-size: 14px; color: var(--ink-2); }
.tip { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); font-size: 14px; }
.tip a { font-weight: 700; color: var(--accent-2); }
.method { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.how { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.how h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.how h3 span { width: 24px; height: 24px; flex: none; border-radius: 99px; background: var(--action-soft); color: var(--action-2); display: grid; place-items: center; font-size: 13px; }
.how p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* ---- 頁尾 ---- */
.foot { border-top: 1px solid var(--line); background: #fff; padding: 28px 0 32px; font-size: 13px; color: var(--muted); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot__brand { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--ink); }
.foot__credits { width: 100%; font-size: 12.5px; color: var(--muted); }
.foot__credits a { color: var(--ink-2); }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-content: flex-start; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--action-2); text-decoration: underline; }
.foot__legal { width: 100%; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }


/* ---- 行情數字 ---- */
.section--tight { padding-top: 40px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.stat__label { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.stat__value { margin: 6px 0 8px; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat__value small { font-size: .5em; font-weight: 700; color: var(--ink-2); }
.stat__sub { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--ink-2); min-width: 0; }
.stat__sub span { min-width: 0; }

/* ---- 吃到飽橫條圖 ---- */
.unl { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 40px; align-items: center; }
.unl__text h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.4; }
.unl__text p { margin: 10px 0 0; color: var(--ink-2); }
.unl__chart { padding: 22px 24px; }
.unl__title { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.unl__bar { display: flex; gap: 3px; height: 16px; border-radius: 99px; overflow: hidden; }
.unl__legend { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; margin: 16px 0 0; padding: 0; }
.unl__legend li { min-width: 0; }
.unl__legend b { display: block; font-size: 28px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.unl__legend span { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.unl__legend span i { width: 10px; height: 10px; flex: none; border-radius: 3px; margin-top: 6px; }
.unl__legend small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.u-free { background: #15803d; }
.u-cap { background: #d97706; }
.u-none { background: #a8a29e; }

/* ---- 結尾品牌橫幅 ---- */
.closing { position: relative; isolation: isolate; overflow: hidden; margin-top: 56px; padding: 88px 0; color: #fff; }
.closing__media { position: absolute; inset: 0; z-index: -1; background: #2b211c; }
.closing__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.closing__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(24 16 12 / .80) 0%, rgb(24 16 12 / .55) 55%, rgb(24 16 12 / .25) 100%); }
.closing__brand { margin: 0; font-size: 14px; font-weight: 700; color: #ffcfbf; }
.closing h2 { margin: 6px 0 8px; font-size: 36px; font-weight: 800; line-height: 1.25; }
.closing p { margin: 0 0 22px; color: rgb(255 255 255 / .9); max-width: 520px; }


/* ---- 目的地切換、首頁 ---- */
.dests { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); }
.dests a { padding: 3px 11px; border-radius: 99px; color: var(--ink-2); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.dests a:hover { color: var(--action-2); }
.dests a[aria-current] { background: var(--action); color: #fff; }
.hub-nav { margin-left: auto; }
.hub-hero { padding: 56px 0 8px; }
.hub-hero .eyebrow { color: var(--action-2); }
.hub-hero h1 { margin: 0; font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; line-height: 1.2; }
.hub-hero__lead { margin: 12px 0 0; max-width: 640px; font-size: 17px; color: var(--ink-2); }
.dest-card__fact { font-size: 14px; }
.dest-card__fact:empty { display: none; }
/* 內容頁：關於、隱私權、使用條款、404 */
.page-head { padding: 56px 0 0; }
.page-head .eyebrow { color: var(--action-2); }
.page-head h1 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.25; }
.page-head__lead { margin: 10px 0 0; max-width: 720px; font-size: 16px; color: var(--ink-2); }
.prose { max-width: 760px; padding-bottom: 64px; }
.prose h2 { margin: 36px 0 8px; font-size: 20px; font-weight: 700; }
.prose > h2:first-child { margin-top: 8px; }
.prose p { margin: 0 0 12px; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 1.4em; color: var(--ink-2); }
.prose li { margin: 6px 0; }
.prose b { color: var(--ink); }
/* 帶行程參數的網址：等 app.js 算完再顯示，免得先閃一下預設的推薦 */
.pending .tool, .pending .tbl { visibility: hidden; }
.dest-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dest-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.dest-card:hover { transform: translateY(-2px); box-shadow: var(--lift); color: var(--ink); }
.dest-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.dest-card__body { display: grid; justify-items: start; gap: 8px; padding: 20px 22px 22px; }
.dest-card h2 { margin: 0; font-size: 24px; font-weight: 700; }
.dest-card p { margin: 0; color: var(--ink-2); }
.dest-card .btn { margin-top: 6px; }

/* ---- 寬度 ---- */
@media (max-width: 1199px) {
  .tool { grid-template-columns: 300px minmax(0, 1fr); }
  .brand__slogan { display: none; }
  .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .trips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unl { grid-template-columns: minmax(0, 1fr); }
  .devices { grid-template-columns: 1fr; }
  .topbar__date { display: none; }
}
@media (max-width: 959px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
  .inputs__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
  .inputs__fields .field--wide { grid-column: 1 / -1; }
  .seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .ptable thead { display: none; }
  .ptable, .ptable tbody, .ptable tr, .ptable td { display: block; width: 100%; }
  .ptable tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .ptable tr:last-child { border-bottom: 0; }
  .ptable td, .ptable td:first-child { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 4px 0; border: 0; }
  .ptable td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); }
  .ptable td.pcell { display: block; padding-bottom: 8px; }
  .ptable td.pcell::before { content: none; }
}
@media (max-width: 719px) {
  :root { --gutter: 16px; }
  .topnav, .topbar__date { display: none; }
  .toc { display: block; }
  .topbar__in { gap: 12px; }
  .hub-hero { padding-top: 32px; }
  .eyebrow__date { display: inline; }
  .hero { padding: 0 0 24px; }
  .hero__media { height: 250px; }
  .hero__head { padding: 20px 0 16px; gap: 10px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat__value { font-size: 24px; }
  .closing { padding: 56px 0; }
  .closing h2 { font-size: 26px; }
  .hero__lead { display: none; }
  .facts li:last-child { display: none; }
  .inputs__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 14px 12px; }
  .fit-sum { padding: 10px 14px; }
  .seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seg--4 span { align-items: center; padding: 0 4px; text-align: center; }
  .seg--4 small { display: none; }
  .seg-hint { display: block; }
  .results__head { padding: 14px 16px; }
  .results__head p { display: none; }
  .section { padding-top: 40px; }
  .section__head h2 { font-size: 21px; }
  .h-note { display: block; margin: 2px 0 0; }
  .faq, .method { grid-template-columns: 1fr; }
  #rows.is-clipped > .row:nth-child(n+9) { display: none; }
  #rows.is-clipped ~ .tbl__foot .show-all { display: inline-flex; }
}
@media (max-width: 359px) {
  .inputs__fields { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse), (max-width: 719px) {
  .btn, .btn--sm, .more, select, .tbl__sort select, .toc summary { height: 44px; }
  .provs { gap: 8px; }
  .provs button { height: 40px; }
  .stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .stepper button { width: 44px; height: 44px; }
  .seg span { min-height: 44px; }
  .pick__cta, .row__act { gap: 10px; }
}
@media (max-width: 559px) {
  .trips { grid-template-columns: 1fr; }
  .dest-cards { grid-template-columns: minmax(0, 1fr); }
  .unl__legend { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
