:root {
  --bg: oklch(0.985 0.003 155);
  --surface: oklch(1 0 0);
  --ink: oklch(0.32 0.075 158);
  --action: oklch(0.61 0.16 158);
  --text: oklch(0.27 0.015 165);
  --muted: oklch(0.5 0.015 165);
  --divider: oklch(0.89 0.008 230);
  --soft: oklch(0.955 0.012 158);

  --good: oklch(0.57 0.12 142);
  --good-bg: oklch(0.92 0.06 142);
  --mixed: oklch(0.62 0.11 85);
  --mixed-bg: oklch(0.94 0.07 90);
  --bad: oklch(0.54 0.13 24);
  --bad-bg: oklch(0.93 0.04 24);
  --std-bg: oklch(0.95 0.005 230);
  --premium: oklch(0.45 0.07 280);
  --premium-bg: oklch(0.92 0.03 280);

  --r: 10px;
  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--ink); }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- 頂部 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--ink);
  color: #fff;
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 16px; white-space: nowrap; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  color: oklch(0.9 0.03 158); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px; white-space: nowrap;
  transition: background-color .18s, color .18s;
}
.topnav a:hover { background: oklch(0.38 0.075 158); }
.topnav a[aria-current="page"] { background: oklch(0.42 0.08 158); color: #fff; }

/* ---------- 首頁 ---------- */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 26px; margin: 0 0 4px; color: var(--ink); }
.hero .slogan { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--accent, #9c8248); letter-spacing: .02em; }
.lead { margin: 0 0 16px; color: var(--muted); }
.filters { display: flex; flex-direction: column; gap: 12px; }
.filters input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--divider); border-radius: var(--r);
  background: var(--surface); font: inherit; color: var(--text);
}
.filters input:focus { outline: 2px solid var(--action); outline-offset: 1px; border-color: transparent; }

.seg {
  display: inline-flex; background: var(--soft); border-radius: var(--r); padding: 4px; gap: 4px; align-self: flex-start;
}
.seg button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; cursor: pointer; min-height: 36px;
  font-size: 14px; color: var(--muted); transition: background-color .18s, color .18s;
}
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px oklch(0 0 0 / .08); }
.seg-inline { margin: 0 0 12px; }

.region { margin: 24px 0; }
.region-title { font-size: 17px; margin: 0 0 8px; color: var(--ink); display: flex; align-items: baseline; gap: 8px; }
.count { font-size: 13px; color: var(--muted); font-weight: 400; }
.airline-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }

.airline-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r);
  padding: 12px; text-decoration: none; color: var(--text);
  transition: border-color .18s, transform .18s;
}
.airline-card:hover { border-color: var(--action); transform: translateY(-1px); }
.ac-body { display: flex; flex-direction: column; min-width: 0; }
.ac-name { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ac-en { font-size: 12px; color: var(--muted); }
.ac-models { font-size: 13px; color: var(--ink); margin-top: 4px; }

.code {
  --ac: var(--ink);
  flex: none; width: 44px; height: 44px; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: .02em;
  color: var(--ac); background: color-mix(in oklch, var(--ac) 12%, white);
  border: 1px solid color-mix(in oklch, var(--ac) 30%, white);
}
.code-lg { width: 56px; height: 56px; font-size: 18px; }

.tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.tag-lcc { background: var(--mixed-bg); color: oklch(0.42 0.08 75); }
.tag-fsc { background: var(--soft); color: var(--ink); }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: var(--r); border: 0; background: var(--action); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
}

/* ---------- 共用頁頭 ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { opacity: .5; }
.page-head { display: flex; gap: 12px; align-items: center; padding: 12px 0 16px; }
.page-head h1 { font-size: 22px; margin: 0; color: var(--ink); line-height: 1.3; }
.page-head .sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.notice {
  background: var(--mixed-bg); border-radius: var(--r); padding: 10px 14px; margin: 0 0 16px; font-size: 14px;
  color: oklch(0.36 0.06 75);
}
.notice b { color: oklch(0.42 0.1 70); }
.notice.small { font-size: 13px; margin-top: 12px; }

/* ---------- 航空公司頁 ---------- */
.model-list { display: grid; grid-template-columns: 1fr; gap: 12px; padding-bottom: 24px; }
.model-card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); padding: 16px;
  text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 8px;
  transition: border-color .18s, transform .18s;
}
.model-card:hover { border-color: var(--action); transform: translateY(-1px); }
.mc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mc-model { font-size: 18px; font-weight: 700; color: var(--ink); }
.badge-pending { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--mixed-bg); color: oklch(0.42 0.1 70); white-space: nowrap; }
.mc-seats { color: var(--muted); }
.mc-seats b { font-size: 22px; color: var(--text); }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--std-bg); }
.chip-J, .chip-F { background: var(--premium-bg); color: var(--premium); }
.chip-W { background: var(--soft); color: var(--ink); }
.mc-meta { display: flex; gap: 24px; margin: 0; }
.mc-meta div { display: flex; flex-direction: column; }
.mc-meta dt { font-size: 12px; color: var(--muted); }
.mc-meta dd { margin: 0; font-weight: 600; }
.mc-routes { margin: 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--divider); padding-top: 8px; }

/* ---------- 座位圖頁 ---------- */
.sm-layout { display: flex; flex-direction: column-reverse; gap: 16px; padding-bottom: 32px; }
.sm-side { display: flex; flex-direction: column; gap: 16px; }

.cabin-list { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); padding: 12px 14px; }
.cabin-list h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.cl-item + .cl-item { border-top: 1px solid var(--divider); margin-top: 8px; padding-top: 8px; }
.cl-item h4 { margin: 0 0 4px; font-size: 16px; color: var(--ink); display: flex; align-items: center; }
.cl-item ul { list-style: none; margin: 0; padding: 0; }
.cl-item li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 16px; }
.cl-item li span { color: var(--muted); }
.cl-item li b { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--muted); }
.dot-F, .dot-J { background: var(--premium); }
.dot-W { background: var(--action); }
.dot-Y { background: oklch(0.7 0.01 230); }

.seat-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--divider); }
.exit-swatch { font-size: 10px; font-weight: 700; color: var(--bad); border: 1px solid var(--bad); border-radius: 3px; padding: 0 3px; }

.seat-detail { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); padding: 12px 14px; min-height: 72px; transition: border-color .18s; }
.seat-detail.on { border-color: var(--ink); }
.seat-detail { position: relative; }
.seat-detail .hint { margin: 0; color: var(--muted); font-size: 16px; }
.seat-detail:not(.on) { display: none; }
.seat-hint { margin: 0 0 6px; color: var(--muted); font-size: 14px; text-align: center; }
.sd-close { position: absolute; top: 8px; right: 8px; }
.sd-big { font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--ink); letter-spacing: .02em; margin: 0 0 4px; }
.sd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.sd-tags span { font-size: 14px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--ink); }
.sd-h { margin: 12px 0 4px; font-size: 16px; }
.sd-h.pro { color: oklch(0.4 0.1 142); }
.sd-h.con { color: var(--bad); }
.sd-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 16px; }
.sd-list li { position: relative; padding-left: 22px; margin: 3px 0; }
.sd-list li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.sd-list.pro li::before { content: "✓"; color: oklch(0.45 0.12 142); }
.sd-list.con li::before { content: "✕"; color: var(--bad); }
.sd-list.info li::before { content: "•"; color: var(--muted); left: 4px; }
.sd-none { margin: 0; font-size: 15px; color: var(--muted); }
.sd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sd-id { font-size: 20px; font-weight: 700; color: var(--ink); }
.sd-meta { color: var(--muted); font-size: 15px; }
.sd-rating { font-size: 14px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.r-good { background: var(--good-bg); color: oklch(0.4 0.1 142); }
.r-mixed { background: var(--mixed-bg); color: oklch(0.42 0.1 70); }
.r-bad { background: var(--bad-bg); color: var(--bad); }
.r-std { background: var(--std-bg); color: var(--muted); }
.r-premium { background: var(--premium-bg); color: var(--premium); }
.sd-zone { background: var(--soft); color: var(--ink); }
.sd-spec { margin: 10px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }

.tips { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); padding: 12px 14px; }
.tips h2 { font-size: 15px; margin: 0 0 4px; color: var(--ink); }
.tips ul { margin: 0; padding-left: 18px; font-size: 16px; }
.tips li + li { margin-top: 4px; }

/* 機身 */
.plane-wrap { --wing-span: clamp(18px, 8vw - 28px, 72px); overflow-x: auto; padding: 4px var(--wing-span) 8px; }
.plane {
  --inch: 1.56px;
  --hull: oklch(0.8 0.026 244);
  --metal: oklch(0.89 0.021 244);
  --nose-depth: 110px;
  --tail-depth: 95px;
  position: relative; box-sizing: border-box; width: max-content; margin: 0 auto;
  scroll-margin-top: 64px;
  isolation: isolate;
  background: var(--surface); border-inline: 2px solid var(--hull);
  border-radius: 49% 49% 31% 31% / var(--nose-depth) var(--nose-depth) var(--tail-depth) var(--tail-depth);
  padding: var(--nose-depth) 6px var(--tail-depth);
  display: flex; flex-direction: column; align-items: center;
}
.plane[data-airframe="wide"], .plane[data-airframe="raked"], .plane[data-airframe="double"], .plane[data-airframe="four"] {
  --nose-depth: 128px; --tail-depth: 112px;
}
.plane[data-airframe="737"] { --nose-depth: 120px; }
.plane[data-airframe="stretched"] { --tail-depth: 105px; }
.plane[data-airframe="turboprop"] { --nose-depth: 82px; --tail-depth: 74px; }
.nose, .tail { position: absolute; inset-inline: 0; font-size: 12px; color: var(--muted); text-align: center; }
.nose {
  top: 0; height: var(--nose-depth); border: solid var(--hull); border-width: 2px 0 0;
  border-radius: 49% 49% 0 0 / 100% 100% 0 0;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.cockpit { display: flex; gap: 2px; }
.cockpit i { width: 14px; height: 8px; background: oklch(0.49 0.055 246); border-radius: 3px 3px 2px 2px; }
.cockpit i:first-child { transform: translateY(3px) skewY(-19deg); }
.cockpit i:last-child { transform: translateY(3px) skewY(19deg); }
.tail { bottom: 0; height: var(--tail-depth); border-bottom: 2px solid var(--hull); border-radius: 0 0 31% 31% / 0 0 100% 100%; }
.tail::before {
  content: ""; position: absolute; inset: 18% -3% 4%; z-index: -1;
  background: var(--metal); clip-path: polygon(50% 0, 100% 55%, 100% 76%, 60% 57%, 50% 100%, 40% 57%, 0 76%, 0 55%);
}
.tail i {
  display: block; width: 10px; height: 52%; margin: 8px auto 2px;
  background: var(--hull); border-radius: 55% 55% 35% 35%;
  clip-path: polygon(50% 0, 100% 85%, 80% 100%, 20% 100%, 0 85%);
}
.wing { display: none; position: absolute; width: var(--wing-span); pointer-events: none; z-index: 0; }
.wing-l { right: 100%; transform: scaleX(-1); }
.wing-r { left: 100%; }
.wing::before, .wing::after { content: ""; position: absolute; inset: 0; clip-path: var(--wing-edge); }
.wing::before { background: var(--hull); }
.wing::after { inset: 1px 1px 2px 0; background: var(--metal); }
.plane { --wing-edge: polygon(0 0, 94% 64%, 100% 62%, 98% 78%, 0 100%); }
.plane[data-airframe="raked"] { --wing-edge: polygon(0 0, 88% 57%, 100% 66%, 91% 74%, 0 100%); }
.plane[data-airframe="turboprop"] { --wing-edge: polygon(0 0, 90% 20%, 100% 29%, 100% 53%, 87% 67%, 0 100%); }
.nacelle {
  position: absolute; z-index: 1; left: 10%; top: 13%; width: 29%; height: clamp(13px, 25%, 48px);
  border: 1px solid var(--hull); border-top: 3px solid oklch(0.52 0.045 245);
  border-radius: 36% 36% 43% 43%; background: oklch(0.96 0.012 240);
}
.nacelle.outboard { display: none; left: 49%; top: 45%; width: 22%; }
.plane[data-airframe="double"] .outboard, .plane[data-airframe="four"] .outboard { display: block; }
.plane[data-airframe="turboprop"] .nacelle { left: 31%; top: 6%; }
.plane[data-airframe="turboprop"] .nacelle::before {
  content: ""; position: absolute; width: 175%; height: 2px; top: 0; left: -38%;
  background: var(--muted); border-radius: 2px;
}
.seat-hint span { display: block; font-size: 12px; }
.wing-jump { display: block; margin: 2px auto 0; padding: 5px 8px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); text-decoration: underline; cursor: pointer; }
.plane-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.6; text-align: center; }
.deck-title { margin: 18px 0 8px; font-size: 15px; text-align: center; }
.plane + .deck-title { margin-top: 28px; }

/* 廁所、廚房 */
.fac-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 3px 0; padding: 0 12px; contain: inline-size; }
.row .fac-band { position: absolute; inset: 0 3px; align-items: center; pointer-events: none; }
.fac-slot { display: flex; flex-wrap: wrap; align-content: center; gap: 3px; }
.fac-L { justify-content: flex-start; } .fac-C { justify-content: center; } .fac-R { justify-content: flex-end; }
.fac { display: inline-grid; place-items: center; font-size: 10px; font-weight: 600; padding: 3px 5px; border-radius: 3px; border: 1px solid; white-space: nowrap; line-height: 1; }
.fac-lav { background: oklch(0.95 0.025 240); border-color: oklch(0.78 0.05 240); color: oklch(0.42 0.08 240); }
.fac-galley { background: oklch(0.95 0.025 60); border-color: oklch(0.8 0.06 60); color: oklch(0.45 0.08 60); }

/* 嬰兒搖籃 */
.has-bassinet { position: relative; }
.has-bassinet::after {
  content: ""; position: absolute; top: -5px; left: 20%; right: 20%; height: 3px;
  border-radius: 2px; background: var(--bassinet, oklch(0.45 0.015 250)); z-index: 3;
}
.seat-swatch.has-bassinet::after { top: -4px; height: 2px; }
.cabin {
  --seat: calc(var(--seat-width, var(--typical-width, 17.5)) * var(--inch));
  --pitch: calc(var(--seat-pitch, var(--typical-pitch, 31)) * var(--inch));
  --seat-depth: calc(var(--pitch) * 0.65);
  align-self: stretch; margin: 6px 0 10px; position: relative; z-index: 1;
  border-radius: 12px; padding: 8px 0 10px; background: var(--cabin-bg, transparent);
}
.cabin-W { --typical-width: 19; --typical-pitch: 38; }
.cabin-J { --typical-width: 22; --typical-pitch: 45; }
.cabin-F { --typical-width: 24; --typical-pitch: 53; }
.cabin-wide.cabin-W { --typical-width: 17.5; }
.cabin-wide.cabin-J { --typical-width: 19; }
.cabin-F, .cabin-J { --cabin-bg: color-mix(in oklch, var(--premium) 7%, var(--surface)); }
.cabin-W { --cabin-bg: color-mix(in oklch, var(--action) 7%, var(--surface)); }
.cabin-Y { --cabin-bg: oklch(0.975 0.004 230); }
.cabin + .cabin { margin-top: 4px; }
.cabin-title { font-size: 13px; margin: 0 0 6px; width: 0; min-width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; color: var(--ink); text-align: center; }
.cabin-title span:last-child { color: var(--muted); font-weight: 400; margin-left: 6px; }
.cabin-body { display: flex; flex-direction: column; }

.row { display: flex; align-items: center; justify-content: center; gap: 3px; position: relative; padding: 0 14px; }
.row:not(.row-head) { min-height: var(--pitch); }
.row-head { min-height: 18px; }
.row-head .col { width: var(--seat); text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; }
.aisle { width: calc(17 * var(--inch)); flex: none; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-head .aisle { height: 1px; }
.row-exit { margin: 8px 0; }
.cabin-body { isolation: isolate; }
.exit-arr { font-weight: inherit; }
.exit { position: absolute; top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 700; line-height: 1; color: #fff; background: var(--bad); border-radius: 3px; padding: 3px 4px; white-space: nowrap; }
.exit-l { right: calc(100% - 12px); }
.exit-r { left: calc(100% - 12px); }
.win { position: absolute; top: 50%; width: 8px; height: 14px; margin-top: -7px; border-radius: 4px; background: oklch(0.8 0.05 240); border: 1px solid oklch(0.68 0.06 240); }
.win-l { left: 2px; } .win-r { right: 2px; }
/* 有逐排資料：依實際位置畫，一排可能沒有或有多扇 */
.win.win-pos { top: calc(var(--wy) * 10%); height: 10px; margin-top: -5px; }
.win-swatch { display: inline-block; width: 6px; height: 12px; border-radius: 3px; background: oklch(0.8 0.05 240); border: 1px solid oklch(0.68 0.06 240); }
.spec-card { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--divider); border: 1px solid var(--divider); border-radius: var(--r); overflow: hidden; }
.spec-card > div { background: var(--surface); padding: 10px 12px; }
.spec-card dt { font-size: 12px; color: var(--muted); margin: 0 0 2px; }
.spec-card dd { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.spec-ill { display: block; width: 100%; max-width: 120px; height: auto; margin: 4px 0 6px; }
.spec-ill .ill-seat { fill: var(--soft); stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; }
.spec-ill .ill-arm { fill: var(--std-bg); stroke: var(--muted); stroke-width: 1.5; }
.spec-ill .ill-leg, .spec-ill .ill-tick { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; }
.spec-ill .ill-tick { stroke-dasharray: 2 2; }
.spec-ill .ill-dim { fill: none; stroke: var(--action); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.amen { margin-top: 10px; border: 1px solid var(--divider); border-radius: var(--r); background: var(--surface); padding: 10px 12px; }
.amen h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.amen-cabin + .amen-cabin { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--divider); }
.amen-cabin h4 { margin: 0 0 4px; font-size: 16px; color: var(--ink); display: flex; align-items: center; }
.amen-none { margin: 0; font-size: 15px; }
.amen h3 span { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--muted); }
.amen ul { list-style: none; margin: 0; padding: 0; }
.amen li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--divider); }
.amen li:first-child { border-top: 0; }
.am-label { flex: 0 0 108px; font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.am-label svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.am-val { font-size: 16px; color: var(--ink); }
.am-val small { display: block; font-size: 14px; color: var(--muted); }
.am-yes { color: var(--good, var(--ink)); }
.am-no { color: var(--bad); }
.amen .muted { color: var(--muted); }
.amen-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.spec-card dd.muted { color: var(--muted); font-size: 15px; font-weight: 600; }

.seat {
  width: var(--seat); height: var(--seat-depth); flex: none;
  border-radius: 5px 5px 8px 8px; border: 1px solid transparent;
  font-size: 11px; font-weight: 600; cursor: pointer; padding: 0 0 3px; position: relative;
  transition: transform .15s, outline-color .15s;
}
/* 機頭朝上。椅背在座墊後方，與扶手有各自的輪廓。 */
.seat:not(.seat-empty)::before {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 1px; height: 5px;
  border-radius: 2px 2px 4px 4px; background: var(--tone); pointer-events: none;
}
.seat-swatch::before { display: none; }
.seat:hover { transform: translateY(-1px); }
.seat:focus-visible, .seat.active { outline: 2px solid var(--ink); outline-offset: 1px; }
.seat-empty { background: transparent; cursor: default; }
.s-good { background: var(--good-bg); border-color: var(--good); color: oklch(0.38 0.1 142); }
.s-mixed { background: var(--mixed-bg); border-color: var(--mixed); color: oklch(0.42 0.1 70); }
.s-bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.s-std { background: var(--std-bg); border-color: oklch(0.82 0.008 230); color: var(--muted); }
.s-premium { background: var(--premium-bg); border-color: var(--premium); color: var(--premium); }
.cabin-wide .seat { font-size: 10px; }

/* ---------- 比較頁 ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.compare th { font-size: 12px; color: var(--muted); background: var(--soft); position: sticky; top: 0; }
.compare tr:last-child td { border-bottom: 0; }
.compare tbody tr:hover { background: var(--soft); }
.compare td a { font-weight: 600; text-decoration: none; }
.bar { display: inline-block; width: 48px; height: 6px; border-radius: 3px; background: var(--std-bg); margin-right: 8px; vertical-align: middle; position: relative; overflow: hidden; }
.bar::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--action); border-radius: 3px; }

.footer { color: var(--muted); font-size: 14px; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--divider); margin-top: 16px; }
.footer p { margin: 0 0 4px; }

/* ---------- 座位說明：浮在畫面上（桌機由 app.js 貼到被點座位旁，手機在底部） ---------- */
.seat-detail.on {
  position: fixed; right: 24px; bottom: 24px; width: 340px; z-index: 20;
  box-shadow: 0 8px 28px oklch(0 0 0 / .18);
  max-height: 60vh; overflow-y: auto;
}
.seat-detail .sd-close { display: inline-flex; }
@media (max-width: 999px) {
  .seat-detail.on { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 45vh; }
}
@media (max-width: 540px) {
  .brand { font-size: 14px; }
  .topnav { gap: 0; }
  .topnav a { padding: 8px 7px; font-size: 13px; }
  .row { gap: 2px; padding-inline: 12px; }
  .plane-wrap { --wing-span: 18px; }
  .plane[data-airframe] { --inch: 1.24px; --nose-depth: 75px; --tail-depth: 62px; padding-inline: 4px; }
  .plane[data-airframe="turboprop"] { --nose-depth: 57px; --tail-depth: 58px; }
  .nacelle { border-top-width: 2px; width: 42%; }
  /* 手機：出口改直書小標，放在機身外框與窗邊座位之間，不超出畫面 */
  .exit { font-size: 9px; padding: 3px 1px; writing-mode: vertical-rl; letter-spacing: .1em; } .exit-arr { display: none; }
  .exit-l { left: -5px; right: auto; } .exit-r { right: -5px; left: auto; }
  .win-l { left: 2px; } .win-r { right: 2px; }
  .fac-band { padding: 0 12px; }
}
.sd-close {
  display: none; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--soft); cursor: pointer; font-size: 16px; line-height: 1;
}

/* ---------- 桌面 ---------- */
@media (min-width: 720px) {
  .hero h1 { font-size: 32px; }
  .filters { flex-direction: row; align-items: center; }
  .filters input { flex: 1; }
  .seg { align-self: auto; }
  .airline-grid { grid-template-columns: repeat(2, 1fr); }
  .model-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .airline-grid { grid-template-columns: repeat(3, 1fr); }
  .model-list { grid-template-columns: repeat(3, 1fr); }
  .sm-layout { flex-direction: row-reverse; align-items: flex-start; }
  .plane-wrap { flex: 1; min-width: 0; }
  .sm-side { width: 360px; flex: none; position: sticky; top: 68px; max-height: calc(100vh - 84px); overflow-y: auto; }
}

/* ---------- 找航班／機型 ---------- */
.find-cta { display: block; margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--soft); color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.5; }
.find-cta b { color: var(--ink); white-space: nowrap; }
.find-cta:hover { background: var(--good-bg); }
.find-form { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0 0 16px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
/* iOS 的日期欄有內建最小寬度，會比其他欄寬，關掉原生外觀讓它跟其他欄一樣寬 */
.field input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-height: 46px; text-align: left; line-height: 1.4; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.field input, .field select { font: inherit; font-size: 16px; color: var(--text); padding: 10px 12px; border: 1px solid var(--divider); border-radius: 8px; background: var(--surface); width: 100%; min-width: 0; }
.route-pair { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); grid-template-rows: auto 48px auto; column-gap: 12px; row-gap: 6px; min-width: 0; }
.route-pair .ap-field { display: grid; grid-template-rows: subgrid; grid-row: 1 / 4; }
.route-pair .ap-field:first-child { grid-column: 1; }
.route-pair .ap-field:last-child { grid-column: 3; }
.find-form .field input, .find-form .field select { height: 48px; }
.find-go { align-self: end; }
.find-go .btn { height: 48px; font: inherit; font-weight: 600; }
.ap-field { gap: 6px; }
.combo { position: relative; }
.ap-field .combo-in { font-size: 16px; padding-right: 38px; cursor: pointer; text-overflow: ellipsis; }
.ap-field .combo-in:focus { cursor: text; }
.combo-caret { position: absolute; right: 0; top: 0; bottom: 0; width: 36px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.combo-caret svg { width: 18px; height: 18px; }
.combo-caret:hover { color: var(--accent, var(--text)); }
.combo-pop { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--divider); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.combo-pop [role=option] { padding: 8px 12px; font-size: 15px; color: var(--text); cursor: pointer; }
.combo-pop [role=option][aria-selected=true] { font-weight: 700; }
.combo-pop [role=option].on, .combo-pop [role=option]:hover { background: var(--good-bg); }
.combo-grp { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); position: sticky; top: -4px; background: var(--surface); }
.combo-none { padding: 10px 12px; font-size: 14px; color: var(--muted); }
.ap-hint { min-height: 0; font-size: 12px; color: var(--muted); }
.route-pair .swap-btn { grid-column: 2; grid-row: 2; align-self: center; margin: 0; }
.swap-btn { font: inherit; font-size: 18px; line-height: 1; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--divider); border-radius: 50%; background: var(--surface); color: var(--action); cursor: pointer; }
.swap-btn:hover { border-color: var(--action); }
.swap-btn:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (max-width: 420px) {
  .route-pair { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 8px; }
  .route-pair .ap-field { display: flex; grid-column: 1; grid-row: auto; }
  .route-pair .ap-field:last-child { grid-column: 1; }
  .route-pair .swap-btn { grid-column: 1; grid-row: auto; justify-self: center; transform: rotate(90deg); margin: 0; }
}
.field input:focus, .field select:focus { outline: 2px solid var(--action); outline-offset: 1px; border-color: transparent; }
.find-hint { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.al-chips { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.al-group-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.al-grid button { width: 100%; min-width: 0; justify-content: flex-start; }
.al-chips .al-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.al-chips button { font: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--divider); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.al-chips button[aria-pressed="true"] { border-color: var(--action); background: var(--soft); color: var(--ink); font-weight: 600; }
.al-chips .count { font-size: 12px; color: var(--muted); }
.al-chips .al-code { font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--muted); margin-left: -2px; }
.al-chips .al-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--al, var(--muted)); flex: none; }
.al-chips button[aria-pressed="true"] { border-color: var(--al, var(--action)); box-shadow: inset 0 0 0 1px var(--al, var(--action)); }
.al-chips .tag { font-size: 11px; }
.flight-list { display: grid; grid-template-columns: 1fr; gap: 10px; padding-bottom: 16px; }
.flight-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--divider); border-radius: var(--r); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s; }
.flight-card:hover { border-color: var(--action); }
.flight-card.is-off { opacity: .6; }
.fc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-no { font-size: 17px; color: var(--ink); }
.flight-card { border-left: 4px solid var(--al, var(--divider)); }
.fc-al { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.fc-al .al-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--al, var(--muted)); flex: none; }
.fc-iata { font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1; padding: 3px 6px; border-radius: 5px; color: var(--al, var(--ink)); background: color-mix(in srgb, var(--al, var(--ink)) 12%, white); border: 1px solid color-mix(in srgb, var(--al, var(--ink)) 30%, white); }
.fc-code { font-size: 12px; color: var(--muted); }
.fc-time { font-size: 15px; }
.fc-time .num { font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-arrow { color: var(--muted); }
.fc-model { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fc-go { color: var(--action); font-weight: 600; margin-left: auto; text-decoration: none; padding: 4px 0; }
.fc-go:hover { text-decoration: underline; }
.fc-next { font-size: 11px; color: var(--bad); font-weight: 600; margin-left: 1px; }
.fc-via { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 12px; color: var(--muted); border: 1px solid var(--divider); white-space: nowrap; vertical-align: middle; }
.fc-src { color: var(--muted); }
.badge-off { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--bad-bg); color: var(--bad); }
.mc-al { font-size: 13px; color: var(--muted); }
@media (min-width: 720px) {
  .find-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .find-form .field-wide { grid-column: 1 / -1; max-width: 480px; }
  .find-form .route-pair { grid-column: 1 / -1; max-width: 760px; }
  .flight-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 頂部航班列、底部備註 ---------- */
.flight-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--soft); border: 1px solid var(--divider); }
.fb-no { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: .02em; }
.fb-route { font-size: 18px; font-weight: 600; color: var(--ink); }
.fb-route small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.fb-route i { font-style: normal; color: var(--muted); margin: 0 6px; }
.page-notes { margin: 8px 0 24px; padding-top: 14px; border-top: 1px solid var(--divider); color: var(--muted); }
.page-notes h2 { font-size: 15px; margin: 0 0 6px; color: var(--muted); }
.page-notes ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.page-notes li + li { margin-top: 4px; }

/* ---------- 第一批（2026-11-13）：座位完整編號、結果列排序、設備、版本切換 ---------- */
.seat { font-size: 9px; letter-spacing: -.02em; }
.cabin-wide .seat { font-size: 8px; letter-spacing: -.04em; }
.cabin-J .seat, .cabin-F .seat { font-size: 10px; }
.fl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 10px; }
.fl-count { font-size: 14px; color: var(--muted); }
.fl-count b { color: var(--ink); }
.fl-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.fl-sort select, .al-field select { font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--divider); border-radius: 8px; padding: 7px 10px; min-height: 40px; }
.al-field select { width: 100%; }
.fc-amen { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.fc-amen .fa { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.fc-amen svg { width: 15px; height: 15px; flex: none; fill: none; stroke: oklch(0.42 0.1 142); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 座位圖頁上方：讀者選的航班 */
.flight-bar-card { margin: 12px 0 0; }
.flight-bar-card .flight-card { margin: 0; }
.ver-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 14px; }
.ver-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.ver-pill { font-size: 13px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--divider); background: var(--surface); color: var(--text); text-decoration: none; }
.ver-pill[aria-current="page"] { border-color: var(--action); background: var(--soft); color: var(--ink); font-weight: 600; }
a.ver-pill:hover { border-color: var(--ink); }

/* ---------- 第二批：艙等短評、窗景小卡、條款頁 ---------- */
.cl-review { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--text); background: var(--soft); border-radius: 8px; padding: 6px 10px; }
.view-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); padding: 12px 14px; margin-top: 12px; }
.view-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.vc-item + .vc-item { border-top: 1px solid var(--divider); margin-top: 8px; padding-top: 8px; }
.vc-item h4 { margin: 0 0 4px; font-size: 16px; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vc-item p { margin: 0 0 4px; font-size: 15px; line-height: 1.6; }
.vc-side { font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--std-bg); color: var(--text); }
.vc-side-l, .vc-side-r { background: oklch(0.92 0.05 240); color: oklch(0.38 0.09 240); }
.vc-meta { font-size: 13px !important; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; line-height: 1.5; }
.vc-meta a { color: var(--muted); }
.vc-conf { display: inline-flex; align-items: center; font-size: 12px; line-height: 1.5; padding: 0 6px; border-radius: 4px; border: 1px solid var(--divider); margin-right: 2px; }
.vc-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.plane.view-l .win-l, .plane.view-r .win-r { background: oklch(0.72 0.12 240); border-color: oklch(0.55 0.14 240); box-shadow: 0 0 0 2px oklch(0.88 0.06 240); }

.legal { max-width: 720px; }
.legal h1 { margin: 0 0 4px; color: var(--ink); }
.legal h2 { font-size: 18px; color: var(--ink); margin: 20px 0 6px; }
.legal ul { margin: 0; padding-left: 1.2em; }
.legal li { margin: 4px 0; line-height: 1.7; }
.legal-meta { margin: 0; color: var(--muted); font-size: 14px; }
.legal-draft { margin: 8px 0 0; display: inline-block; font-size: 13px; padding: 2px 8px; border-radius: 6px; background: var(--mixed-bg); color: oklch(0.42 0.09 85); }
.legal-other { margin-top: 24px; font-size: 14px; }
mark.ph { background: oklch(0.93 0.12 95); color: inherit; padding: 0 2px; border-radius: 3px; }
.footer .footer-links { font-size: 13px; margin-top: 6px; }
.footer .footer-links a { color: var(--muted); }

/* 外連按鈕樣式（YouTube 連結使用） */
.ext-link { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--soft); border: 1px solid var(--divider); text-decoration: none; }
.ext-link:hover { border-color: var(--ink); }

/* YouTube 搜尋連結 */
.cl-item ul.cl-video { list-style: disc; margin: 8px 0; padding-left: 20px; }
.cl-item .cl-video li { display: list-item; padding: 3px 0; font-size: 15px; line-height: 1.5; }
.yt-link { color: var(--action); text-decoration: underline; text-underline-offset: 3px; }
.yt-ico { width: 20px; height: 14px; flex: none; }

.cabin .seat {
  --tone: color-mix(in oklch, currentColor 30%, transparent);
  --arm: 2px;
}
.cabin .seat:not(.seat-empty) {
  background-image: linear-gradient(var(--tone), var(--tone)), linear-gradient(var(--tone), var(--tone));
  background-size: var(--arm) 55%;
  background-position: left bottom 3px, right bottom 3px;
  background-repeat: no-repeat;
}
.look-slim .seat:not(.seat-empty)::before { height: 3px; }
.look-premium .seat, .look-recliner .seat { --arm: 4px; }
.look-premium .seat:not(.seat-empty), .look-recliner .seat:not(.seat-empty) { border-radius: 7px 7px 10px 10px; }
.look-premium .seat:not(.seat-empty)::before, .look-recliner .seat:not(.seat-empty)::before { height: 7px; left: 4px; right: 4px; }
.look-bed, .look-angled, .look-pod, .look-suite { --seat-depth: calc(var(--pitch) * 0.81); }
.look-bed .seat:not(.seat-empty), .look-angled .seat:not(.seat-empty), .look-suite .seat:not(.seat-empty) {
  padding-top: 9px; border-radius: 8px 8px 11px 11px;
  box-shadow: inset 3px 0 0 var(--tone), inset -3px 0 0 var(--tone), inset 0 12px 0 -4px var(--tone);
}
.look-bed .seat:not(.seat-empty)::before, .look-angled .seat:not(.seat-empty)::before,
.look-suite .seat:not(.seat-empty)::before { height: 8px; left: 4px; right: 4px; }
.look-pod .seat:not(.seat-empty) {
  border-radius: 12px 6px 12px 6px;
  box-shadow: inset 0 0 0 2px var(--tone), inset 0 10px 0 -4px var(--tone);
  transform: rotate(var(--rot, 0deg));
}
.look-pod .seat:not(.seat-empty):hover { transform: rotate(var(--rot, 0deg)) translateY(-1px); }
.look-pod .seat:not(.seat-empty)::before { height: 7px; left: 4px; right: 4px; bottom: 3px; }
.look-suite .seat:not(.seat-empty) { border-radius: 5px; box-shadow: inset 0 11px 0 -3px var(--tone); }
.look-suite .seat-pod::before { transform: rotate(var(--rot, 0deg)); }
.seat-wall, .seat-divider { position: absolute; pointer-events: none; }
.seat-wall { inset: -1px; border: 2px solid var(--premium); border-radius: inherit; }
.wall-shell.wall-r { border-right-color: transparent; }
.wall-shell.wall-l { border-left-color: transparent; }
.wall-suite::after {
  content: ""; position: absolute; top: 46%; height: 38%; width: 3px;
  border: 1px solid var(--premium); border-radius: 1px; background: var(--premium-bg);
}
.wall-suite.wall-r::after { right: -3px; }
.wall-suite.wall-l::after { left: -3px; }
.seat-divider { right: calc(-3px - var(--divider-gap) * (var(--seat) + 2px)); top: 18%; bottom: 14%; width: 3px; background: var(--premium); border-radius: 2px; z-index: 1; }
.seat > span { position: relative; }


/* JAL SKY SUITE / Apex：坐墊與外殼分開，窗邊座前移。 */
.look-apex { --seat-depth: calc(var(--pitch) * .94); }
.look-apex .row:not(.row-head) { padding-top: calc(var(--pitch) * .2); }
.look-apex .seat:not(.seat-empty) {
  background-image: none;
  border-radius: 4px;
  box-shadow: none;
  overflow: visible;
}
.look-apex .seat-forward { transform: translateY(calc(var(--pitch) * -.23)); }
.look-apex .seat-forward:hover { transform: translateY(calc(var(--pitch) * -.23)); }
.look-apex .seat::before { display: none; }
.look-apex .seat-wall { border-radius: 2px; border-width: 1px; }
.look-apex .seat-cushion {
  position: absolute; left: 12%; right: 12%; top: 55%; bottom: 12%;
  background: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface));
  border: 1px solid var(--tone); border-radius: 4px 4px 5px 5px;
}
.look-apex .seat-backrest {
  position: absolute; left: 1px; right: 1px; height: 6px; bottom: 1px;
  background: var(--tone); border-radius: 2px 2px 3px 3px;
}
.look-apex .seat-arm { display: none; }
.look-apex .seat-ottoman {
  position: absolute; left: 22%; right: 22%; top: 8%; height: 12%;
  background: var(--tone); border-radius: 3px;
}
.look-apex .seat > span { position: absolute; top: 58%; left: 0; right: 0; font-size: 9px; line-height: 1.5; }
.look-apex .seat-divider { top: 12%; bottom: 6%; width: 2px; }
.apex-note { max-width: 280px; margin: 12px auto 0; padding: 0 10px; font-size: 12px; color: var(--muted); line-height: 1.6; }


/* 統一畫風（2026-11-18）：所有艙等沿用經濟艙那套——淺色評等底、細框、底部椅背色條、
   兩側扶手淡線、號碼用評等色。各艙等只換外型（殼、斜放、錯位），不換配色語言。 */
.s-good { --seat-fill: var(--good-bg); --seat-line: var(--good); }
.s-mixed { --seat-fill: var(--mixed-bg); --seat-line: var(--mixed); }
.s-bad { --seat-fill: var(--bad-bg); --seat-line: var(--bad); }
.s-std { --seat-fill: var(--std-bg); --seat-line: oklch(0.82 0.008 230); }
.s-premium { --seat-fill: var(--premium-bg); --seat-line: var(--premium); }
.seat-cushion, .seat-backrest, .seat-arm, .seat-ottoman { pointer-events: none; }
/* 一般 HTML 座位：不另畫坐墊零件，外框＋椅背色條＋扶手就是座椅。 */
.cabin:not(.look-apex) .seat-cushion { display: none; }
.cabin:not(.look-apex) .seat-ottoman {
  position: absolute; left: 26%; right: 26%; top: 8%; height: 12%;
  background: var(--tone); border-radius: 3px;
}
.look-suite .seat-ottoman { transform: rotate(var(--rot, 0deg)); }

/* Keep the clickable cell upright; draw the entire angled envelope inside it. */
.cabin .pod-footprint[data-id], .cabin .pod-footprint[data-id]:hover {
  background: transparent; border-color: transparent; border-radius: 3px;
  transform: none; box-shadow: none;
}
.pod-footprint > .seat-cushion, .pod-footprint > .seat-ottoman { display: none; }
/* 反魚骨套房（2026-11-18）：實際套房長度約等於排距，前後排互相嵌合；格子改成接近套房實際比例，不再是細長格配小方圖。 */
.cabin:has(.pod-footprint) { --seat: calc(var(--pitch) * .9); --seat-depth: calc(var(--pitch) * .9); }
.pod-drawing { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pod-floor { fill: var(--seat-fill, var(--premium-bg)); }
.pod-console { fill: color-mix(in oklch, currentColor 14%, transparent); stroke: none; }
.pod-bedwell { fill: var(--surface); stroke: var(--tone); stroke-width: 1; }
.pod-shell { fill: none; stroke: var(--seat-line, currentColor); stroke-width: 1.5; stroke-linejoin: round; }
.pod-door { fill: none; stroke: var(--seat-line, currentColor); stroke-width: 2.5; stroke-linecap: round; }
.pod-cushion { fill: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface)); stroke: var(--tone); stroke-width: 1.2; }
.pod-back { fill: var(--tone); stroke: none; }
.pod-foot { fill: var(--tone); stroke: none; }
.pod-arm { stroke: var(--tone); stroke-width: 3; stroke-linecap: round; }
.cabin .pod-footprint > span { top: 59%; }
/* 經濟艙／豪經艙簡化版（2026-11-18）：只留圓角方塊＋號碼，不畫扶手、椅背條與坐墊零件。
   評等仍用底色與細框表示；豪經座位稍大、圓角較圓，靠尺寸區分。 */
.cabin-Y .seat-cushion, .cabin-Y .seat-ottoman,
.cabin-W .seat-cushion, .cabin-W .seat-ottoman { display: none; }
.cabin:is(.cabin-Y,.cabin-W) .seat[data-id] {
  background-image: none; box-shadow: none; border-width: 1px;
  border-radius: 6px; padding: 0;
}
.cabin-W .seat[data-id] { border-radius: 8px; }
.cabin:is(.cabin-Y,.cabin-W) .seat[data-id]::before { display: none !important; }
.cabin:is(.cabin-Y,.cabin-W) .s-std[data-id] { background: var(--surface); border-color: color-mix(in oklch, var(--text) 16%, transparent); }
.cabin-Y .seat[data-id] > span, .cabin-W .seat[data-id] > span { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; line-height: 1; white-space: nowrap; }
.win[hidden] { display: none; }
.win.win-pos { height: 6px; margin-top: -3px; }

@media (max-width: 719px) { .find-go .btn { width: 100%; } }

.config-choice { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 8px 0; }

/* Forest-green brand with gold accent (same palette as the main site) and lightweight bubble layout. Seat-rating tokens retain their meaning. */
:root {
  color-scheme: only light;
  --bg: #f5f7f3; --surface: #fff; --ink: #2f5d4a; --action: #2f5d4a;
  --text: #263d35; --muted: #5e6f67; --divider: #dde5df; --soft: #eef3ef;
  --r: 16px; --button-text: #fff;
}
:root[data-theme="dark"] {
  color-scheme: only dark;
  --bg: #111a16; --surface: #1b2722; --ink: #9fd4b8; --action: #9fd4b8;
  --text: #e4efe8; --muted: #adc2b7; --divider: #34473e; --soft: #22352c;
  --button-text: #13281f;
}
.topbar { background: var(--bg); color: var(--text); }
.topbar-inner { height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--action); }
/* 網站名稱字型（2026-11-19 選第 4 款）：Quicksand＋Zen Maru Gothic。index.html 載入的字型子集刻意不含「，。」，標點會用系統中文字型，維持置中 */
.brand small { display: block; color: var(--muted); font-family: "Quicksand", var(--font); font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; }
.brand strong { display: block; font-family: "Zen Maru Gothic", var(--font); font-size: 32px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; }
.brand-mark { display: block; flex: none; width: 46px; height: 46px; } /* 網站名稱字高約 32px，跟 LOGO 差不多大 */
/* 手機也同高，不再縮小 */
.theme-toggle { background: var(--surface); color: var(--text); border: 1px solid var(--divider); border-radius: 24px; padding: 8px 16px; min-height: 44px; cursor: pointer; font-size: 14px; }
.btn, .fc-go { color: var(--button-text); background: var(--action); }
.topnav a { color: var(--muted); }
.topnav a:hover, .topnav a[aria-current="page"] { background: var(--soft); color: var(--action); }
.search-bubble { background: var(--surface); border-radius: 16px; padding: 24px; margin-bottom: 24px; }
.search-bubble .find-form { max-width: none; margin-bottom: 0; }
.search-bubble .route-pair { max-width: none; }
.search-bubble .seg { background: transparent; padding: 0; gap: 8px; margin-bottom: 20px; }
.search-bubble .seg button[aria-selected="true"] { background: var(--soft); color: var(--action); box-shadow: none; }
.page-head h1 { color: var(--text); }
.page-head .sub { max-width: 65ch; }
.flight-list { gap: 16px; }
.flight-card { border: 0; border-radius: 16px; padding: 24px; gap: 12px; }
.fc-top { justify-content: space-between; gap: 12px; }
.fc-no { font-size: 22px; color: var(--text); }
.fc-al { color: var(--text); font-size: 15px; gap: 10px; }
.airline-logo-mat { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 2px; }
.airline-logo { width: 40px; height: 40px; object-fit: contain; }
.al-chips .airline-logo-mat { width: 28px; height: 28px; padding: 0; }
.al-chips .airline-logo { width: 26px; height: 26px; }
.fc-time { font-size: 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fc-time .num { font-size: 26px; font-weight: 650; }
.fc-model { padding-top: 4px; gap: 12px; align-items: center; color: var(--muted); }
.fc-go { padding: 10px 16px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: 15px; }
.fc-go:hover { text-decoration: none; filter: brightness(.92); }
.al-chips { padding: 20px; background: var(--surface); border-radius: 16px; }
.al-chips button { border-radius: 10px; }
.al-chips button[aria-pressed="true"] { border-color: var(--action); box-shadow: none; color: var(--action); }
.combo-pop [role=option].on, .combo-pop [role=option]:hover, .find-cta:hover { background: var(--soft); }
.fc-amen svg { stroke: var(--muted); }
.notice { border-radius: 12px; }
:root[data-theme="dark"] .notice { background: #514420; color: #f5dfa0; }
:root[data-theme="dark"] .seat { color-scheme: only light; }
@media (max-width: 719px) {
  .search-bubble { padding: 20px; }
  .flight-card { padding: 20px; }
  .fc-time { gap: 5px; font-size: 14px; }
  .fc-time .num { font-size: 23px; }
  .fc-go { margin: 4px 0 0; width: 100%; }
  .al-chips { padding: 14px; }
}
@media (max-width: 719px) {
  .search-bubble .find-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .search-bubble .route-pair { grid-column: 1 / -1; order: -1; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); grid-template-rows: auto 48px auto; gap: 6px; }
  .search-bubble .route-pair .ap-field { display: grid; grid-template-rows: subgrid; grid-row: 1 / 4; }
  .search-bubble .route-pair .ap-field:first-child { grid-column: 1; }
  .search-bubble .route-pair .ap-field:last-child { grid-column: 3; }
  .search-bubble .route-pair .swap-btn { grid-column: 2; grid-row: 2; transform: none; width: 32px; height: 44px; border: 0; }
  .search-bubble .ap-field .combo-in { padding-left: 8px; padding-right: 30px; }
  .search-bubble .combo-caret { width: 30px; }
  .search-bubble .find-go { grid-column: 1 / -1; }
}

/* Cabin equipment: compact icons, descriptions on hover or keyboard/touch focus. */
.cabin-amenities { display: flex; gap: 6px; margin: 8px 0; }
.cabin-amenity { position: relative; }
.amenity-icon { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 8px; color: var(--action); background: transparent; cursor: pointer; }
.amenity-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.amenity-icon:hover, .amenity-icon:focus-visible { background: var(--soft); }
.amenity-icon:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.amenity-tooltip { display: none; position: absolute; z-index: 5; top: 100%; left: 0; width: max-content; max-width: 210px; padding: 8px 10px; background: var(--surface); color: var(--text); border: 1px solid var(--divider); border-radius: 8px; box-shadow: 0 4px 12px #0002; font-size: 14px; line-height: 1.5; }
.cabin-amenity:hover .amenity-tooltip, .cabin-amenity:focus-within .amenity-tooltip { display: block; }

/* Source-specific BR 787-10 plan. Cushion and console are distinct footprints. */
.plane-spatial .cabin { background: transparent; border-radius: 0; }
.plane-spatial .cabin-J { margin-bottom: 0; padding-bottom: 0; }
.plane-spatial .cabin-Y { margin-top: 0; }
.look-staggered-console .row { display: grid; grid-template-columns: 20% 9% 20% 20% 9% 20%; gap: 0; padding-inline: 10px; }
.look-staggered-console .row .aisle, .look-staggered-console .row .col { width: 100%; }
.look-staggered-console .seat { width: 100%; height: calc(var(--pitch) * .94); border: 0; background: transparent !important; box-shadow: none; padding: 0; }
.look-staggered-console .seat::before, .look-staggered-console .seat::after { display: none; }
.staggered-seat { display: block; width: 100%; height: 100%; overflow: visible; }
.staggered-button { --tone: color-mix(in oklch, currentColor 30%, transparent); }
.stagger-shell { fill: var(--seat-fill, var(--premium-bg)); stroke: var(--seat-line, var(--premium)); stroke-width: 1.5; }
.stagger-console { fill: color-mix(in oklch, currentColor 14%, transparent); stroke: none; }
.stagger-footwell { fill: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface)); stroke: var(--tone); stroke-width: 1; }
.stagger-cushion { fill: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface)); stroke: var(--tone); stroke-width: 1.2; }
.stagger-back { fill: var(--tone); }
.stagger-arm { stroke: var(--tone); stroke-width: 3; }
.cabin.look-staggered-console .seat > span { left: var(--cushion-center); right: auto; top: 60%; transform: translateX(-50%); font-size: 10px; }
.service-zone { display: block; width: calc(100% - 20px); margin: 0 10px; height: auto; overflow: visible; }
.room rect { stroke: var(--divider); stroke-width: 1; }
.room-lav rect { fill: #e7f1f7; stroke: #7796ac; }
.room-galley rect { fill: #f5eee2; stroke: #b6a78c; }
.room text { font-size: 7px; text-anchor: middle; fill: #344854; paint-order: stroke; stroke: #fff9; stroke-width: 2px; }
.room-fixture, .room-door { fill: none; stroke: #7a8791; stroke-width: .8; }
.service-doors path { fill: none; stroke: #b6a78c; stroke-width: 2; }
.service-doors text { font-size: 6px; text-anchor: middle; fill: var(--muted); }
.inline-room { position: absolute; top: 0; bottom: 0; width: 21%; border: 1px solid #7796ac; background: #e7f1f7; color: #344854; border-radius: 5px; display: grid; place-items: center; font-size: 11px; }
.inline-room-l { left: 12px; } .inline-room-r { right: 12px; }

.plane.plane-spatial { width: calc(224 * var(--inch) + 16px); }

/* Each sourced configuration keeps its own seat and service-area coordinates. */
.geometry-cabins { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin: 12px 0; color: var(--ink); font-size: 13px; }
.geometry-cabins > span { display: inline-flex; align-items: center; gap: 5px; }
.geometry-floor { position: relative; width: 100%; isolation: isolate; }
.plane-geometry .cabin, .plane-geometry .cabin-body { display: contents; }
.plane-geometry .row { position: absolute; left: 0; width: 100%; padding: 0; margin: 0; min-height: 0; display: block; background: none; }
.plane-geometry .seat[data-id] { position: absolute; min-width: 0; min-height: 0; margin: 0; font-size: 9px; }
.plane-geometry .seat[data-id] > span { font-size: inherit; }
/* 經濟／豪經號碼（2026-11-18）：一律寫完整編號（20A），依座位實際寬度放到最大，
   最大 14px，左右各留 2px 不壓框；一般排法與幾何排法共用。 */
:is(.cabin-Y,.cabin-W) .seat[data-id] { container-type: inline-size; }
:is(.cabin-Y,.cabin-W) .seat[data-id] > span { font-size: clamp(5px, calc((100cqi - 4px) / 1.95), 14px); font-weight: 600; line-height: 1; }
.sn-r { font-style: normal; }
.plane-geometry .row .exit { font-size: 8px; }
.plane-geometry .seat-divider { display: none; } /* no unmeasured divider bridging an aisle */
.geometry-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.geometry-room { position: absolute; display: flex; justify-content: center; align-items: center; border: 1px solid; border-radius: 3px; font-size: 9px; line-height: 1.1; text-align: center; padding: 1px; }
.geometry-room > span { position: relative; }
.geometry-room > span:not(.room-art) { text-shadow: 0 0 2px var(--surface), 0 0 2px var(--surface); }
.room-art, .geometry-room > .room-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: color-mix(in oklch,var(--ink) 45%,var(--surface)); }
.room-art-lav { display: flex; }
.room-cell { position: relative; flex: 1 1 0; min-width: 0; }
.room-cell + .room-cell { border-left: 1px solid currentColor; }
svg.room-art, .room-art svg { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.room-toilet { position: absolute; top: 50%; left: 50%; height: min(92%, 36px); aspect-ratio: 16/22; transform: translate(-50%,-50%); color: color-mix(in oklch,var(--ink) 70%,var(--surface)); }
.room-door { position: absolute; bottom: 0; height: min(45%, 14px); aspect-ratio: 1; }
.room-door.door-r { right: 0; } .room-door.door-l { left: 0; }
.room-art-galley path { vector-effect: non-scaling-stroke; stroke-width: 1; }
.geometry-lav { background: color-mix(in oklch,var(--surface) 90%,#168ac4); border-color: color-mix(in oklch,var(--ink) 45%,var(--surface)); color: var(--ink); }
.geometry-galley { background: color-mix(in oklch,var(--surface) 90%,#ae9168); border-color: color-mix(in oklch,var(--ink) 40%,var(--surface)); color: var(--ink); }
.geometry-marker { position: absolute; display: flex; justify-content: center; align-items: center; gap: 1px; border: 1px solid; border-radius: 22%; padding: 3px; box-sizing: border-box; z-index: 1; }
.geometry-marker svg { flex: 1 1 0; min-width: 0; height: 100%; max-height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plane-geometry .seat.staggered-button:not(.seat-empty) { background: transparent; border: 0; padding: 0; }
.plane-geometry .staggered-button > span { left: var(--cushion-center); top:60%; transform:translate(-50%,-50%); }
@media (max-width:600px) { .plane-geometry .seat[data-id] { font-size: 8px; } .geometry-room { font-size: 8px; } }
.plane.plane-geometry { width: calc(224 * var(--inch) + 16px); max-width: 100%; }
.plane-geometry .look-apex .seat-forward, .plane-geometry .look-apex .seat-forward:hover { transform: none; }
.plane-geometry .apex-note { display: none; }
.plane-geometry .win-l { left: -5px; }
.plane-geometry .win-r { right: -5px; }
.plane-geometry .exit-l { right: 100%; }
.plane-geometry .exit-r { left: 100%; }

/* Cabin names follow the actual seat region, outside the fuselage. */
.plane-wrap { padding-inline: max(40px, var(--wing-span)); }
.geometry-cabin-side { --k: var(--ink); position: absolute; right: calc(100% + 14px); width: 22px; border-right: 3px solid var(--k); color: var(--k); pointer-events: none; display: flex; align-items: center; justify-content: flex-end; overflow: visible; }
.geometry-cabin-side::before, .geometry-cabin-side::after { content: ""; position: absolute; right: -3px; width: 8px; height: 3px; background: var(--k); }
.geometry-cabin-side::before { top: 0; }
.geometry-cabin-side::after { bottom: 0; }
/* 艙等地板淡色底與前方隔間牆（2026-11-19）：範圍只依該艙座位推出，不畫來源沒有的設施 */
.geometry-deck { position: absolute; left: 2.5%; right: 2.5%; border-radius: 6px; background: color-mix(in oklch, var(--k) 8%, transparent); pointer-events: none; z-index: -1; }
.geometry-wall { position: absolute; left: 2.5%; right: 2.5%; height: 2px; margin-top: -1px; border-radius: 1px; background: color-mix(in oklch, var(--ink) 35%, transparent); pointer-events: none; z-index: -1; }
:is(.geometry-cabin-side,.geometry-deck)[data-k="F"] { --k: oklch(0.55 0.1 75); }
:is(.geometry-cabin-side,.geometry-deck)[data-k="J"] { --k: oklch(0.45 0.09 280); }
:is(.geometry-cabin-side,.geometry-deck)[data-k="W"] { --k: oklch(0.48 0.08 210); }
:is(.geometry-cabin-side,.geometry-deck)[data-k="Y"] { --k: oklch(0.47 0.07 150); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="F"] { --k: oklch(0.8 0.1 80); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="J"] { --k: oklch(0.78 0.08 280); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="W"] { --k: oklch(0.78 0.08 210); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="Y"] { --k: oklch(0.8 0.08 150); }
.cabin-side-normal { top: 8px; bottom: 10px; }
/* 文字放在括號區段正中間，右側留 5px 不碰線 */
.geometry-cabin-side > span { display: block; writing-mode: vertical-rl; text-orientation: mixed; font-size: 12px; font-weight: 600; line-height: 14px; letter-spacing: 2px; margin-right: 5px; white-space: nowrap; }

.plane.plane-elements { width: calc(224 * var(--inch) + 16px); max-width: 100%; }
.elements-floor { position: relative; margin-inline: 8px; isolation: isolate; }
.elements-cabin, .elements-cabin .cabin-body { display: contents; }
.elements-cabin .elements-row { display: block; margin: 0; padding: 0; min-height: 0; background: none; }
.elements-cabin .elements-seat[data-id] { position: absolute; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; background: none; transform: none; }
.elements-drawing { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.elements-seat::before, .elements-seat::after { display: none !important; }
.elements-number rect { fill: none; stroke: none; }
.elements-number text { fill: currentColor; font: 600 16px system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; }
.elements-seat { --tone: color-mix(in oklch, currentColor 30%, transparent); }
.elements-drawing .pod-shell { stroke-width: 2; }
.elements-drawing .pod-door { stroke-width: 3; }
.elements-screen { stroke: var(--ink); stroke-width: 4; }
.elements-cabin .win-l { left: -8px; }
.elements-cabin .win-r { right: -8px; }
.elements-floor { width: 100%; margin-inline: 0; flex: none; }

/* Simplified Elements seats: shell, side table, cushion, backrest, footrest. */
.elements-suite { fill: var(--seat-fill, var(--premium-bg)); stroke: var(--seat-line, currentColor); stroke-width: 1.5; stroke-linecap: round; }
.elements-table { fill: color-mix(in oklch, currentColor 14%, transparent); stroke: none; }
.elements-footrest { fill: var(--tone); stroke: none; }
.elements-upholstery { fill: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface)); stroke: var(--tone); stroke-width: 1.2; }
.elements-backrest { fill: var(--tone); stroke: none; }

/* Shared simplified premium style; keep each layout's orientation and shell. */
.premium-seat-number { fill: currentColor; font: 700 30px system-ui, sans-serif; letter-spacing: -1px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-arm { display: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-cushion { box-shadow: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-backrest { border: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-wall { border-width: 1px; }
.cabin:is(.cabin-J,.cabin-F) .seat > span { background: none; }
.pod-footprint::before, .pod-footprint::after { display: none !important; }

.cabin-amenities { flex-wrap: wrap; gap: 8px; }
.amenity-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; height: auto; min-height: 36px; padding: 6px 11px; border: 1px solid var(--divider); border-radius: 8px; font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.amenity-pill svg { width: 17px; height: 17px; flex: none; }
.amenity-pill.is-present { background: color-mix(in oklch, var(--ink) 7%, var(--surface)); border-color: color-mix(in oklch, var(--ink) 35%, var(--surface)); color: var(--ink); }
.amenity-pill.is-absent { background: var(--surface); border-style: dashed; color: var(--muted); }
.amenity-pill.is-absent svg { opacity: .55; }
.amenity-pill:hover { filter: brightness(.93); }
.amenity-pill:focus-visible { outline-offset: 3px; }

.service-zone { position: relative; }
.service-plan { display: block; width: 100%; height: auto; }
/* Physical exit markers sit outside the hull, without mobile left/right conflicts. */
.plane-geometry .exit-l { left: auto; right: calc(100% + 5px); width: max-content; }
.plane-geometry .exit-r { right: auto; left: calc(100% + 5px); width: max-content; }

/* Contrast fixes (2026-11-18): seats keep their light artwork in dark mode, so they keep light-palette text too. */
:root[data-theme="dark"] .seat { --surface: #fff; --text: #263d35; --muted: #5e6f67; --ink: #2f5d4a; }
:root[data-theme="dark"] { --std-bg: #2b4152; --premium-bg: #3a3457; --premium: #d4cdf7; }
:root[data-theme="dark"] .seat { --std-bg: oklch(0.95 0.005 230); --premium-bg: oklch(0.92 0.03 280); --premium: oklch(0.45 0.07 280); }
:root[data-theme="dark"] .chip { color: var(--text); }
:root[data-theme="dark"] .chip-J, :root[data-theme="dark"] .chip-F { color: var(--premium); }
:root[data-theme="dark"] .sd-h.pro { color: #8fdc9a; }
:root[data-theme="dark"] .sd-h.con { color: #ffa99f; }
:root[data-theme="dark"] .fc-iata { background: color-mix(in srgb, var(--al, var(--ink)) 18%, var(--surface)); color: var(--text); border-color: color-mix(in srgb, var(--al, var(--ink)) 45%, var(--surface)); }
mark.ph { color: var(--text); }
:root[data-theme="dark"] mark.ph { color: #3b3000; }
.search-bubble .seg button[aria-selected="true"] { color: #2f5d4a; }
:root[data-theme="dark"] .search-bubble .seg button[aria-selected="true"] { color: var(--action); }
.s-bad { color: oklch(0.48 0.13 24); }
.al-chips button[aria-pressed="true"] { color: #2f5d4a; }
:root[data-theme="dark"] .al-chips button[aria-pressed="true"] { color: var(--action); }

/* ---------- 01 森林綠・登機證（2026-11-18 定案） ---------- */
:root:not([data-theme="dark"]) {
  --bg: #f3f1e8; --surface: #fffdf6; --ink: #1f4a3a; --action: #b8892f;
  --text: #22362e; --muted: #5d6a62; --divider: #e2dccb; --soft: #ece6d4;
  --premium: #2f5d4a; --premium-bg: #dcebe0; --std-bg: #f1ede2; --button-text: #fff;
}
:root:not([data-theme="dark"]) body { background: radial-gradient(1200px 500px at 100% 0, #e3ecdf, transparent 60%), #f3f1e8; }
:root:not([data-theme="dark"]) .plane { --hull: #b9b08f; --metal: #e4ddc6; }
:root:not([data-theme="dark"]) .cabin-title { color: #1f4a3a; }
.topbar { background: linear-gradient(90deg, #1f4a3a, #2f6b52); color: #fff; }
.topbar .brand, .topbar a { color: #fff; }
.topbar .brand small { color: #cfe2d6; }

/* 座位預設無色：只有好／普通／差評等才上色；艙等不加底色 */
.cabin-F, .cabin-J, .cabin-W, .cabin-Y { --cabin-bg: transparent; }
.s-std, .s-premium {
  --seat-fill: var(--surface); --seat-line: color-mix(in oklch, var(--text) 26%, transparent);
  background: var(--surface); border-color: color-mix(in oklch, var(--text) 26%, transparent); color: var(--muted);
}
.pod-floor, .stagger-shell, .elements-suite { fill: var(--seat-fill, var(--surface)); }
.stagger-shell { stroke: var(--seat-line, color-mix(in oklch, var(--text) 26%, transparent)); }

/* ---------- G1 森林夜航（2026-11-18 定案） ---------- */
:root:not([data-theme="dark"]) { --bg: #f3f0e6; --ink: #1f4a3a; --action: #1f4a3a; --divider: #d9ddd2; }
:root:not([data-theme="dark"]) body { background: linear-gradient(180deg, #f3f0e6, #ecebe1) fixed; }
:root[data-theme="dark"] body { background: linear-gradient(180deg, #101a15, #0c1511) fixed; }
:root[data-theme="dark"] { --surface: #1a2620; --divider: #2c3d34; }
.topbar { overflow: hidden; background: #1f4b3a; }
/* 頁首 4 機窗列（2026-11-19 定案） */
.topbar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2746%27%20height%3D%2780%27%3E%3Crect%20x%3D%2712%27%20y%3D%2720%27%20width%3D%2722%27%20height%3D%2734%27%20rx%3D%2711%27%20fill%3D%27none%27%20stroke%3D%27%23fff%27%20stroke-opacity%3D%27.14%27%20stroke-width%3D%272%27/%3E%3Crect%20x%3D%2717%27%20y%3D%2726%27%20width%3D%2712%27%20height%3D%2722%27%20rx%3D%276%27%20fill%3D%27%23d6c08a%27%20fill-opacity%3D%27.10%27/%3E%3C/svg%3E") right 0 center / 46px 80px repeat-x;
  -webkit-mask: linear-gradient(90deg, transparent 35%, #000 70%); mask: linear-gradient(90deg, transparent 35%, #000 70%);
}
.topbar-inner { position: relative; z-index: 1; }
:root[data-theme="dark"] .topbar { background: #1f4b3a; box-shadow: inset 0 -1px 0 rgba(214,192,138,.35); }
.btn, .fc-go { color: var(--button-text); background: var(--action); }
.topnav a { color: var(--muted); }
.topnav a:hover, .topnav a[aria-current="page"] { background: var(--soft); color: var(--action); }
.search-bubble { background: var(--surface); border-radius: 16px; padding: 24px; margin-bottom: 24px; }
.search-bubble .find-form { max-width: none; margin-bottom: 0; }
.search-bubble .route-pair { max-width: none; }
.search-bubble .seg { background: transparent; padding: 0; gap: 8px; margin-bottom: 20px; }
.search-bubble .seg button[aria-selected="true"] { background: var(--soft); color: var(--action); box-shadow: none; }
.page-head h1 { color: var(--text); }
.page-head .sub { max-width: 65ch; }
.flight-list { gap: 16px; }
.flight-card { border: 0; border-radius: 16px; padding: 24px; gap: 12px; }
.fc-top { justify-content: space-between; gap: 12px; }
.fc-no { font-size: 22px; color: var(--text); }
.fc-al { color: var(--text); font-size: 15px; gap: 10px; }
.airline-logo-mat { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 2px; }
.airline-logo { width: 40px; height: 40px; object-fit: contain; }
.al-chips .airline-logo-mat { width: 28px; height: 28px; padding: 0; }
.al-chips .airline-logo { width: 26px; height: 26px; }
.fc-time { font-size: 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fc-time .num { font-size: 26px; font-weight: 650; }
.fc-model { padding-top: 4px; gap: 12px; align-items: center; color: var(--muted); }
.fc-go { padding: 10px 16px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: 15px; }
.fc-go:hover { text-decoration: none; filter: brightness(.92); }
.al-chips { padding: 20px; background: var(--surface); border-radius: 16px; }
.al-chips button { border-radius: 10px; }
.al-chips button[aria-pressed="true"] { border-color: var(--action); box-shadow: none; color: var(--action); }
.combo-pop [role=option].on, .combo-pop [role=option]:hover, .find-cta:hover { background: var(--soft); }
.fc-amen svg { stroke: var(--muted); }
.notice { border-radius: 12px; }
:root[data-theme="dark"] .notice { background: #514420; color: #f5dfa0; }
:root[data-theme="dark"] .seat { color-scheme: only light; }
@media (max-width: 719px) {
  .search-bubble { padding: 20px; }
  .flight-card { padding: 20px; }
  .fc-time { gap: 5px; font-size: 14px; }
  .fc-time .num { font-size: 23px; }
  .fc-go { margin: 4px 0 0; width: 100%; }
  .al-chips { padding: 14px; }
}
@media (max-width: 719px) {
  .search-bubble .find-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .search-bubble .route-pair { grid-column: 1 / -1; order: -1; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); grid-template-rows: auto 48px auto; gap: 6px; }
  .search-bubble .route-pair .ap-field { display: grid; grid-template-rows: subgrid; grid-row: 1 / 4; }
  .search-bubble .route-pair .ap-field:first-child { grid-column: 1; }
  .search-bubble .route-pair .ap-field:last-child { grid-column: 3; }
  .search-bubble .route-pair .swap-btn { grid-column: 2; grid-row: 2; transform: none; width: 32px; height: 44px; border: 0; }
  .search-bubble .ap-field .combo-in { padding-left: 8px; padding-right: 30px; }
  .search-bubble .combo-caret { width: 30px; }
  .search-bubble .find-go { grid-column: 1 / -1; }
}

/* Cabin equipment: compact icons, descriptions on hover or keyboard/touch focus. */
.cabin-amenities { display: flex; gap: 6px; margin: 8px 0; }
.cabin-amenity { position: relative; }
.amenity-icon { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 8px; color: var(--action); background: transparent; cursor: pointer; }
.amenity-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.amenity-icon:hover, .amenity-icon:focus-visible { background: var(--soft); }
.amenity-icon:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.amenity-tooltip { display: none; position: absolute; z-index: 5; top: 100%; left: 0; width: max-content; max-width: 210px; padding: 8px 10px; background: var(--surface); color: var(--text); border: 1px solid var(--divider); border-radius: 8px; box-shadow: 0 4px 12px #0002; font-size: 14px; line-height: 1.5; }
.cabin-amenity:hover .amenity-tooltip, .cabin-amenity:focus-within .amenity-tooltip { display: block; }

/* Source-specific BR 787-10 plan. Cushion and console are distinct footprints. */
.plane-spatial .cabin { background: transparent; border-radius: 0; }
.plane-spatial .cabin-J { margin-bottom: 0; padding-bottom: 0; }
.plane-spatial .cabin-Y { margin-top: 0; }
.look-staggered-console .row { display: grid; grid-template-columns: 20% 9% 20% 20% 9% 20%; gap: 0; padding-inline: 10px; }
.look-staggered-console .row .aisle, .look-staggered-console .row .col { width: 100%; }
.look-staggered-console .seat { width: 100%; height: calc(var(--pitch) * .94); border: 0; background: transparent !important; box-shadow: none; padding: 0; }
.look-staggered-console .seat::before, .look-staggered-console .seat::after { display: none; }
.staggered-seat { display: block; width: 100%; height: 100%; overflow: visible; }
.staggered-button { --tone: color-mix(in oklch, currentColor 30%, transparent); }
.stagger-shell { fill: var(--seat-fill, var(--premium-bg)); stroke: var(--seat-line, var(--premium)); stroke-width: 1.5; }
.stagger-console { fill: color-mix(in oklch, currentColor 14%, transparent); stroke: none; }
.stagger-footwell { fill: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface)); stroke: var(--tone); stroke-width: 1; }
.stagger-cushion { fill: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface)); stroke: var(--tone); stroke-width: 1.2; }
.stagger-back { fill: var(--tone); }
.stagger-arm { stroke: var(--tone); stroke-width: 3; }
.cabin.look-staggered-console .seat > span { left: var(--cushion-center); right: auto; top: 60%; transform: translateX(-50%); font-size: 10px; }
.service-zone { display: block; width: calc(100% - 20px); margin: 0 10px; height: auto; overflow: visible; }
.room rect { stroke: var(--divider); stroke-width: 1; }
.room-lav rect { fill: #e7f1f7; stroke: #7796ac; }
.room-galley rect { fill: #f5eee2; stroke: #b6a78c; }
.room text { font-size: 7px; text-anchor: middle; fill: #344854; paint-order: stroke; stroke: #fff9; stroke-width: 2px; }
.room-fixture, .room-door { fill: none; stroke: #7a8791; stroke-width: .8; }
.service-doors path { fill: none; stroke: #b6a78c; stroke-width: 2; }
.service-doors text { font-size: 6px; text-anchor: middle; fill: var(--muted); }
.inline-room { position: absolute; top: 0; bottom: 0; width: 21%; border: 1px solid #7796ac; background: #e7f1f7; color: #344854; border-radius: 5px; display: grid; place-items: center; font-size: 11px; }
.inline-room-l { left: 12px; } .inline-room-r { right: 12px; }

.plane.plane-spatial { width: calc(224 * var(--inch) + 16px); }

/* Each sourced configuration keeps its own seat and service-area coordinates. */
.geometry-cabins { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin: 12px 0; color: var(--ink); font-size: 13px; }
.geometry-cabins > span { display: inline-flex; align-items: center; gap: 5px; }
.geometry-floor { position: relative; width: 100%; isolation: isolate; }
.plane-geometry .cabin, .plane-geometry .cabin-body { display: contents; }
.plane-geometry .row { position: absolute; left: 0; width: 100%; padding: 0; margin: 0; min-height: 0; display: block; background: none; }
.plane-geometry .seat[data-id] { position: absolute; min-width: 0; min-height: 0; margin: 0; font-size: 9px; }
.plane-geometry .seat[data-id] > span { font-size: inherit; }
/* 經濟／豪經號碼（2026-11-18）：一律寫完整編號（20A），依座位實際寬度放到最大，
   最大 14px，左右各留 2px 不壓框；一般排法與幾何排法共用。 */
:is(.cabin-Y,.cabin-W) .seat[data-id] { container-type: inline-size; }
:is(.cabin-Y,.cabin-W) .seat[data-id] > span { font-size: clamp(5px, calc((100cqi - 4px) / 1.95), 14px); font-weight: 600; line-height: 1; }
.sn-r { font-style: normal; }
.plane-geometry .row .exit { font-size: 8px; }
.plane-geometry .seat-divider { display: none; } /* no unmeasured divider bridging an aisle */
.geometry-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.geometry-room { position: absolute; display: flex; justify-content: center; align-items: center; border: 1px solid; border-radius: 3px; font-size: 9px; line-height: 1.1; text-align: center; padding: 1px; }
.geometry-room > span { position: relative; }
.geometry-room > span:not(.room-art) { text-shadow: 0 0 2px var(--surface), 0 0 2px var(--surface); }
.room-art, .geometry-room > .room-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: color-mix(in oklch,var(--ink) 45%,var(--surface)); }
.room-art-lav { display: flex; }
.room-cell { position: relative; flex: 1 1 0; min-width: 0; }
.room-cell + .room-cell { border-left: 1px solid currentColor; }
svg.room-art, .room-art svg { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.room-toilet { position: absolute; top: 50%; left: 50%; height: min(92%, 36px); aspect-ratio: 16/22; transform: translate(-50%,-50%); color: color-mix(in oklch,var(--ink) 70%,var(--surface)); }
.room-door { position: absolute; bottom: 0; height: min(45%, 14px); aspect-ratio: 1; }
.room-door.door-r { right: 0; } .room-door.door-l { left: 0; }
.room-art-galley path { vector-effect: non-scaling-stroke; stroke-width: 1; }
.geometry-lav { background: color-mix(in oklch,var(--surface) 90%,#168ac4); border-color: color-mix(in oklch,var(--ink) 45%,var(--surface)); color: var(--ink); }
.geometry-galley { background: color-mix(in oklch,var(--surface) 90%,#ae9168); border-color: color-mix(in oklch,var(--ink) 40%,var(--surface)); color: var(--ink); }
.geometry-marker { position: absolute; display: flex; justify-content: center; align-items: center; gap: 1px; border: 1px solid; border-radius: 22%; padding: 3px; box-sizing: border-box; z-index: 1; }
.geometry-marker svg { flex: 1 1 0; min-width: 0; height: 100%; max-height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plane-geometry .seat.staggered-button:not(.seat-empty) { background: transparent; border: 0; padding: 0; }
.plane-geometry .staggered-button > span { left: var(--cushion-center); top:60%; transform:translate(-50%,-50%); }
@media (max-width:600px) { .plane-geometry .seat[data-id] { font-size: 8px; } .geometry-room { font-size: 8px; } }
.plane.plane-geometry { width: calc(224 * var(--inch) + 16px); max-width: 100%; }
.plane-geometry .look-apex .seat-forward, .plane-geometry .look-apex .seat-forward:hover { transform: none; }
.plane-geometry .apex-note { display: none; }
.plane-geometry .win-l { left: -5px; }
.plane-geometry .win-r { right: -5px; }
.plane-geometry .exit-l { right: 100%; }
.plane-geometry .exit-r { left: 100%; }

/* Cabin names follow the actual seat region, outside the fuselage. */
.plane-wrap { padding-inline: max(40px, var(--wing-span)); }
.geometry-cabin-side { --k: var(--ink); position: absolute; right: calc(100% + 14px); width: 22px; border-right: 3px solid var(--k); color: var(--k); pointer-events: none; display: flex; align-items: center; justify-content: flex-end; overflow: visible; }
.geometry-cabin-side::before, .geometry-cabin-side::after { content: ""; position: absolute; right: -3px; width: 8px; height: 3px; background: var(--k); }
.geometry-cabin-side::before { top: 0; }
.geometry-cabin-side::after { bottom: 0; }
/* 艙等地板淡色底與前方隔間牆（2026-11-19）：範圍只依該艙座位推出，不畫來源沒有的設施 */
.geometry-deck { position: absolute; left: 2.5%; right: 2.5%; border-radius: 6px; background: color-mix(in oklch, var(--k) 8%, transparent); pointer-events: none; z-index: -1; }
.geometry-wall { position: absolute; left: 2.5%; right: 2.5%; height: 2px; margin-top: -1px; border-radius: 1px; background: color-mix(in oklch, var(--ink) 35%, transparent); pointer-events: none; z-index: -1; }
:is(.geometry-cabin-side,.geometry-deck)[data-k="F"] { --k: oklch(0.55 0.1 75); }
:is(.geometry-cabin-side,.geometry-deck)[data-k="J"] { --k: oklch(0.45 0.09 280); }
:is(.geometry-cabin-side,.geometry-deck)[data-k="W"] { --k: oklch(0.48 0.08 210); }
:is(.geometry-cabin-side,.geometry-deck)[data-k="Y"] { --k: oklch(0.47 0.07 150); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="F"] { --k: oklch(0.8 0.1 80); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="J"] { --k: oklch(0.78 0.08 280); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="W"] { --k: oklch(0.78 0.08 210); }
:root[data-theme="dark"] :is(.geometry-cabin-side,.geometry-deck)[data-k="Y"] { --k: oklch(0.8 0.08 150); }
.cabin-side-normal { top: 8px; bottom: 10px; }
/* 文字放在括號區段正中間，右側留 5px 不碰線 */
.geometry-cabin-side > span { display: block; writing-mode: vertical-rl; text-orientation: mixed; font-size: 12px; font-weight: 600; line-height: 14px; letter-spacing: 2px; margin-right: 5px; white-space: nowrap; }

.plane.plane-elements { width: calc(224 * var(--inch) + 16px); max-width: 100%; }
.elements-floor { position: relative; margin-inline: 8px; isolation: isolate; }
.elements-cabin, .elements-cabin .cabin-body { display: contents; }
.elements-cabin .elements-row { display: block; margin: 0; padding: 0; min-height: 0; background: none; }
.elements-cabin .elements-seat[data-id] { position: absolute; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; background: none; transform: none; }
.elements-drawing { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.elements-seat::before, .elements-seat::after { display: none !important; }
.elements-number rect { fill: none; stroke: none; }
.elements-number text { fill: currentColor; font: 600 16px system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; }
.elements-seat { --tone: color-mix(in oklch, currentColor 30%, transparent); }
.elements-drawing .pod-shell { stroke-width: 2; }
.elements-drawing .pod-door { stroke-width: 3; }
.elements-screen { stroke: var(--ink); stroke-width: 4; }
.elements-cabin .win-l { left: -8px; }
.elements-cabin .win-r { right: -8px; }
.elements-floor { width: 100%; margin-inline: 0; flex: none; }

/* Simplified Elements seats: shell, side table, cushion, backrest, footrest. */
.elements-suite { fill: var(--seat-fill, var(--premium-bg)); stroke: var(--seat-line, currentColor); stroke-width: 1.5; stroke-linecap: round; }
.elements-table { fill: color-mix(in oklch, currentColor 14%, transparent); stroke: none; }
.elements-footrest { fill: var(--tone); stroke: none; }
.elements-upholstery { fill: color-mix(in oklch, var(--seat-fill, var(--surface)) 45%, var(--surface)); stroke: var(--tone); stroke-width: 1.2; }
.elements-backrest { fill: var(--tone); stroke: none; }

/* Shared simplified premium style; keep each layout's orientation and shell. */
.premium-seat-number { fill: currentColor; font: 700 30px system-ui, sans-serif; letter-spacing: -1px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-arm { display: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-cushion { box-shadow: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-backrest { border: none; }
.cabin:is(.cabin-J,.cabin-F) .seat-wall { border-width: 1px; }
.cabin:is(.cabin-J,.cabin-F) .seat > span { background: none; }
.pod-footprint::before, .pod-footprint::after { display: none !important; }

.cabin-amenities { flex-wrap: wrap; gap: 8px; }
.amenity-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; height: auto; min-height: 36px; padding: 6px 11px; border: 1px solid var(--divider); border-radius: 8px; font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.amenity-pill svg { width: 17px; height: 17px; flex: none; }
.amenity-pill.is-present { background: color-mix(in oklch, var(--ink) 7%, var(--surface)); border-color: color-mix(in oklch, var(--ink) 35%, var(--surface)); color: var(--ink); }
.amenity-pill.is-absent { background: var(--surface); border-style: dashed; color: var(--muted); }
.amenity-pill.is-absent svg { opacity: .55; }
.amenity-pill:hover { filter: brightness(.93); }
.amenity-pill:focus-visible { outline-offset: 3px; }

.service-zone { position: relative; }
.service-plan { display: block; width: 100%; height: auto; }
/* Physical exit markers sit outside the hull, without mobile left/right conflicts. */
.plane-geometry .exit-l { left: auto; right: calc(100% + 5px); width: max-content; }
.plane-geometry .exit-r { right: auto; left: calc(100% + 5px); width: max-content; }

/* Contrast fixes (2026-11-18): seats keep their light artwork in dark mode, so they keep light-palette text too. */
:root[data-theme="dark"] .seat { --surface: #fff; --text: #263d35; --muted: #5e6f67; --ink: #2f5d4a; }
:root[data-theme="dark"] { --std-bg: #2b4152; --premium-bg: #3a3457; --premium: #d4cdf7; }
:root[data-theme="dark"] .seat { --std-bg: oklch(0.95 0.005 230); --premium-bg: oklch(0.92 0.03 280); --premium: oklch(0.45 0.07 280); }
:root[data-theme="dark"] .chip { color: var(--text); }
:root[data-theme="dark"] .chip-J, :root[data-theme="dark"] .chip-F { color: var(--premium); }
:root[data-theme="dark"] .sd-h.pro { color: #8fdc9a; }
:root[data-theme="dark"] .sd-h.con { color: #ffa99f; }
:root[data-theme="dark"] .fc-iata { background: color-mix(in srgb, var(--al, var(--ink)) 18%, var(--surface)); color: var(--text); border-color: color-mix(in srgb, var(--al, var(--ink)) 45%, var(--surface)); }
mark.ph { color: var(--text); }
:root[data-theme="dark"] mark.ph { color: #3b3000; }
.search-bubble .seg button[aria-selected="true"] { color: #2f5d4a; }
:root[data-theme="dark"] .search-bubble .seg button[aria-selected="true"] { color: var(--action); }
.s-bad { color: oklch(0.48 0.13 24); }
.al-chips button[aria-pressed="true"] { color: #2f5d4a; }
:root[data-theme="dark"] .al-chips button[aria-pressed="true"] { color: var(--action); }

/* ---------- 01 森林綠・登機證（2026-11-18 定案） ---------- */
:root:not([data-theme="dark"]) {
  --bg: #f3f1e8; --surface: #fffdf6; --ink: #1f4a3a; --action: #b8892f;
  --text: #22362e; --muted: #5d6a62; --divider: #e2dccb; --soft: #ece6d4;
  --premium: #2f5d4a; --premium-bg: #dcebe0; --std-bg: #f1ede2; --button-text: #fff;
}
:root:not([data-theme="dark"]) body { background: radial-gradient(1200px 500px at 100% 0, #e3ecdf, transparent 60%), #f3f1e8; }
:root:not([data-theme="dark"]) .plane { --hull: #b9b08f; --metal: #e4ddc6; }
:root:not([data-theme="dark"]) .cabin-title { color: #1f4a3a; }
.topbar { background: linear-gradient(90deg, #1f4a3a, #2f6b52); color: #fff; }
.topbar .brand, .topbar a { color: #fff; }
.topbar .brand small { color: #cfe2d6; }

/* 座位預設無色：只有好／普通／差評等才上色；艙等不加底色 */
.cabin-F, .cabin-J, .cabin-W, .cabin-Y { --cabin-bg: transparent; }
.s-std, .s-premium {
  --seat-fill: var(--surface); --seat-line: color-mix(in oklch, var(--text) 26%, transparent);
  background: var(--surface); border-color: color-mix(in oklch, var(--text) 26%, transparent); color: var(--muted);
}
.pod-floor, .stagger-shell, .elements-suite { fill: var(--seat-fill, var(--surface)); }
.stagger-shell { stroke: var(--seat-line, color-mix(in oklch, var(--text) 26%, transparent)); }

/* ---------- G1 森林夜航（2026-11-18 定案） ---------- */
:root:not([data-theme="dark"]) { --bg: #f3f0e6; --ink: #1f4a3a; --action: #1f4a3a; --divider: #d9ddd2; }
:root:not([data-theme="dark"]) body { background: linear-gradient(180deg, #f3f0e6, #ecebe1) fixed; }
:root[data-theme="dark"] body { background: linear-gradient(180deg, #101a15, #0c1511) fixed; }
:root[data-theme="dark"] { --surface: #1a2620; --divider: #2c3d34; }
.topbar {
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 95% 0%, rgba(214,192,138,.28), transparent 55%),
    radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px) 0 0 / 14px 14px,
    linear-gradient(120deg, #173c30, #2f6b52);
}
.topbar::after {
  content: ""; position: absolute; right: 0; top: 0; width: min(60%, 520px); height: 100%; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 80' preserveAspectRatio='none'%3E%3Cpath d='M10 70 Q150 -10 290 50' stroke='%23d6c08a' stroke-opacity='.45' stroke-width='1.4' stroke-dasharray='4 6' fill='none' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='290' cy='50' r='3' fill='%23d6c08a' fill-opacity='.7'/%3E%3Ccircle cx='10' cy='70' r='2.4' fill='%23fff' fill-opacity='.5'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.topbar-inner { position: relative; z-index: 1; }
:root[data-theme="dark"] .topbar {
  background:
    radial-gradient(120% 140% at 95% 0%, rgba(214,192,138,.18), transparent 55%),
    radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px) 0 0 / 14px 14px,
    linear-gradient(120deg, #173c30, #2f6b52);
  box-shadow: inset 0 -1px 0 rgba(214,192,138,.35);
}
.btn, .fc-go { background: linear-gradient(135deg, #1f4a3a, #3a7a5e); color: #fff; }
:root[data-theme="dark"] .btn, :root[data-theme="dark"] .fc-go { background: linear-gradient(135deg, #d6c08a, #e6d3a3); color: #1b2a22; }
.theme-toggle { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); }
.theme-toggle:hover { background: rgba(255,255,255,.18); }

/* Cabin side labels sit beyond the exit tags so the two never overlap. */
.plane-wrap { padding-inline: max(84px, var(--wing-span)); }
.geometry-cabin-side { right: calc(100% + 52px); }
@media (max-width: 540px) {
  .plane-wrap { padding-inline: 42px; }
  .geometry-cabin-side { right: calc(100% + 19px); width: 20px; }
  .geometry-cabin-side > span { font-size: 11px; margin-right: 4px; }
}
.avg-note { display: block; font-size: 12px; font-weight: 500; margin-top: 2px; color: var(--muted); }
.avg-note.avg-up { color: var(--good); }
.avg-note.avg-down { color: var(--bad); }

/* Lavatory / galley pictograms replace text labels. */
.fac-icon, .room-icons svg, .inline-room svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.geometry-room > .room-icons, .room-icons { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; gap: 3px; height: min(90%, 30px); align-items: center; color: color-mix(in oklch,var(--ink) 70%,var(--surface)); }
.room-icons svg { width: auto; height: 100%; aspect-ratio: 1; background: var(--surface); border-radius: 50%; padding: 1px; }
.room-icon path, .room-icon rect, .room-icon ellipse { fill: none; stroke: #344854; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inline-room svg { width: 18px; height: 18px; }

/* Realistic nose and tail: the hull outline is drawn as one silhouette (ogive nose, tapered tail cone)
   instead of a rounded box. Side hull lines are painted only along the cabin section. */
.plane, .plane[data-airframe] {
  border-inline: 0; border-radius: 0; padding-inline: 8px;
  background:
    linear-gradient(var(--hull), var(--hull)) left top var(--nose-depth) / 2px calc(100% - var(--nose-depth) - var(--tail-depth)) no-repeat,
    linear-gradient(var(--hull), var(--hull)) right top var(--nose-depth) / 2px calc(100% - var(--nose-depth) - var(--tail-depth)) no-repeat,
    linear-gradient(var(--surface), var(--surface)) center top var(--nose-depth) / 100% calc(100% - var(--nose-depth) - var(--tail-depth)) no-repeat;
}
.plane > .nose, .plane > .tail { border: 0; border-radius: 0; background: none; overflow: visible; }
.plane > .nose { height: calc(var(--nose-depth) + 1px); }
.plane > .tail { height: calc(var(--tail-depth) + 1px); }
.plane > .nose::before, .plane > .nose::after, .plane > .tail::after { content: none; }
.nose-shell, .tail-shell { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nose-shell .hull-fill, .tail-shell .hull-fill { fill: var(--surface); stroke: none; }
.nose-shell .hull-line, .tail-shell .hull-line { fill: none; stroke: var(--hull); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.nose-shell .seam { fill: none; stroke: var(--hull); stroke-width: 1px; stroke-dasharray: 3 3; opacity: .55; vector-effect: non-scaling-stroke; }
.windshield { position: absolute; left: 50%; top: 40%; width: 64px; height: 18px; transform: translateX(-50%); }
.windshield path { fill: color-mix(in oklch, var(--hull) 55%, #24394a); stroke: var(--hull); stroke-width: 1; stroke-linejoin: round; }
.nose-label, .tail-label { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.nose-label { bottom: 10%; }
.tail-label { top: 14%; }
.plane > .tail::before {
  content: ""; position: absolute; inset: 30% calc(-0.7 * var(--wing-span)) 6%; z-index: -1;
  background: var(--metal); border: 0;
  clip-path: polygon(50% 0, 100% 68%, 100% 88%, 50% 62%, 0 88%, 0 68%);
}
.plane > .tail .fin { position: absolute; left: 50%; top: 34%; bottom: 3%; width: 3px; margin: 0; transform: translateX(-50%); background: var(--hull); border: 0; border-radius: 2px; }
.plane > .tail .apu { position: absolute; left: 50%; bottom: -3px; width: 6px; height: 6px; transform: translateX(-50%); border-radius: 50%; background: var(--hull); }
.plane > .nose .cockpit { display: none; }
.geometry-marker { border-radius: 3px; }
.geometry-marker .room-toilet { width: auto; height: 100%; margin: auto; display: block; }
@media (max-width: 540px) {
  .plane, .plane[data-airframe] { padding-inline: 6px; }
  .windshield { width: 46px; height: 13px; }
  .nose-label, .tail-label { font-size: 10px; }
}
.plane > .tail .fin, .plane > .tail .apu { clip-path: none; display: block; }
.plane > .tail .fin { height: auto; }
.plane > .nose { display: block; }

/* 頁首右側：語言＋深淺色 */
.top-ctrl { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-pick { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 24px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.lang-pick::before { content: "🌐"; font-size: 14px; }
.lang-pick:hover { background: rgba(255,255,255,.18); }
.lang-pick:focus-within { outline: 2px solid #d6c08a; outline-offset: 2px; }
.lang-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; }
.tt-icon { font-size: 15px; line-height: 1; }
@media (max-width: 540px) {
  .tt-label { display: none; }
  .theme-toggle { padding: 8px 12px; min-width: 44px; justify-content: center; }
  .lang-pick { padding: 0 10px; }
  .top-ctrl { gap: 6px; }
}

/* 首頁標語（2026-11-19）：Seat OK 金色英文＋大字中文 */
.page-head .tagline { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; line-height: 1.3; }
.page-head .tagline .tg-en { font-family: "Quicksand", var(--font); font-weight: 700; font-size: 26px; letter-spacing: .04em; color: var(--mixed); }
.page-head .tagline .tg-zh { font-family: "Zen Maru Gothic", var(--font); font-weight: 700; font-size: 26px; letter-spacing: .06em; color: var(--ink); }
@media (max-width: 540px) { .page-head .tagline .tg-en, .page-head .tagline .tg-zh { font-size: 22px; } }

/* 起降地／班號膠囊切換（配色 2 深綠、小尺寸、置中） */
.search-bubble .seg { display: flex; width: fit-content; margin: 0 auto 18px; background: var(--soft); border-radius: 999px; padding: 3px; gap: 0; }
.search-bubble .seg button { border-radius: 999px; padding: 6px 16px; min-height: 32px; font-size: 14px; color: var(--ink); background: transparent; box-shadow: none; }
.search-bubble .seg button[aria-selected="true"] { background: var(--ink); color: #fff; font-weight: 700; box-shadow: none; }
:root[data-theme="dark"] .search-bubble .seg button { color: var(--text); }
:root[data-theme="dark"] .search-bubble .seg button[aria-selected="true"] { background: var(--action); color: var(--button-text, #fff); }

/* 起降地／班號切換：搜尋鍵下方小字連結（取代膠囊） */
.search-bubble .mode-link { margin: 14px 0 0; text-align: center; }
.search-bubble .mode-link button { background: none; border: 0; box-shadow: none; min-height: 44px; padding: 0 8px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in oklch, currentColor 35%, transparent); cursor: pointer; }
.search-bubble .mode-link button:hover { text-decoration-color: currentColor; }
:root[data-theme="dark"] .search-bubble .mode-link button { color: var(--text); }

/* 手機頁首：網站名稱拆兩行，避免語言／深淺色按鈕被擠出畫面 */
@media (max-width: 540px) {
  .topbar-inner { gap: 8px; }
  .brand { gap: 10px; min-width: 0; }
  .brand strong { font-size: 20px; letter-spacing: .04em; line-height: 1.15; }
  .brand .bt-zh { display: block; }
}
.legal li a { overflow-wrap: anywhere; }
