/* 快點趣 v2「一張要出發的票」。
   換皮：只動 :root 的 token（色彩、字級、間距、圓角、陰影）；版面規則集中在「版面」一節。
   JS 只輸出 class 名與結構，元件清單見 README。
   頁底冷灰白；票券永遠深色；青綠色強調；字型只有 Noto Sans TC。 */

:root {
  color-scheme: light;

  /* 色彩 */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #15202B;
  --muted: #5B6672;
  --line: #D5DAE0;
  --brand: #0F766E;
  --brand-ink: #0F766E;
  --warn-fg: #B45309;
  --focus: #0F766E;

  /* 票券（兩種模式共用深色）*/
  --ticket-bg: #15202B;
  --ticket-fg: #FFFFFF;
  --ticket-muted: #B8C2CC;
  --ticket-line: rgb(255 255 255 / 0.28);
  --ticket-brand: #2DD4BF;
  --on-ticket-brand: #0E1317;
  --focus-ticket: #5EEAD4;
  --scrim: linear-gradient(180deg, rgb(21 32 43 / 0.10) 0%, rgb(21 32 43 / 0.85) 60%, rgb(21 32 43 / 0.92) 100%);
  --sun: #FF6B3D;
  --on-sun: #15202B;
  --price-fg: #FFD166;
  --scrim-text: rgb(21 32 43 / 0.46);

  /* 日期三態：票內 / 清單 */
  --day-off: #2DD4BF;
  --day-off-ink: #0E1317;
  --day-leave: #FBBF24;
  --day-leave-ink: #0E1317;
  --day-work: #3B4653;
  --day-work-ink: #ECEFF3;
  --list-off: #0F766E;

  /* 字型與字級 */
  --font: 'Noto Sans TC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-hero: clamp(2.5rem, 1.6rem + 3vw, 4rem);
  --fs-h2: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-num: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-base: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;

  /* 間距（4 進位）、圓角、陰影 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-ticket: 0 12px 32px rgb(21 32 43 / 0.18);

  /* 版面尺寸 */
  --topbar-h: 56px;
  --controlbar-h: 48px;
  --touch: 44px;
  --content-w: 1120px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E1317;
    --surface: #171C22;
    --ink: #ECEFF3;
    --muted: #9AA5B1;
    --line: #2A323B;
    --brand: #2DD4BF;
    --brand-ink: #5EEAD4;
    --warn-fg: #FCD34D;
    --focus: #5EEAD4;
    --ticket-bg: #1C2630;
    --scrim: linear-gradient(180deg, rgb(21 32 43 / 0.10) 0%, rgb(21 32 43 / 0.85) 60%, rgb(21 32 43 / 0.95) 100%);
    --list-off: #2DD4BF;
    --shadow-ticket: none;
  }
}

/* 與上面的 dark 區塊內容必須一致（手動選深色）*/
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1317;
  --surface: #171C22;
  --ink: #ECEFF3;
  --muted: #9AA5B1;
  --line: #2A323B;
  --brand: #2DD4BF;
  --brand-ink: #5EEAD4;
  --warn-fg: #FCD34D;
  --focus: #5EEAD4;
  --ticket-bg: #1C2630;
  --scrim: linear-gradient(180deg, rgb(21 32 43 / 0.10) 0%, rgb(21 32 43 / 0.85) 60%, rgb(21 32 43 / 0.95) 100%);
  --list-off: #2DD4BF;
  --shadow-ticket: none;
}

/* ---- 基礎 ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ticket :focus-visible, .bottom-bar :focus-visible { outline-color: var(--focus-ticket); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--sp-3); top: -100px; z-index: 50; padding: var(--sp-2) var(--sp-3); background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
.skip-link:focus { top: var(--sp-2); }

/* ---- 頁首 ---- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--content-w); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.brand { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; color: inherit; text-decoration: none; }
.brand-word { display: flex; flex-direction: column; align-items: flex-start; font-size: 1.375rem; font-weight: 900; line-height: 1.1; letter-spacing: 0.02em; }
.brand-accent { color: var(--brand); }
.brand-line { display: block; margin-top: 2px; color: var(--brand); }
.brand-tagline { display: none; font-size: var(--fs-sm); color: var(--muted); }
.topbar-controls { display: flex; align-items: center; gap: var(--sp-2); }
.lang-seg { display: inline-flex; box-shadow: 0 0 0 1px var(--line); border-radius: var(--r-pill); overflow: hidden; }
.lang-btn { min-width: var(--touch); min-height: var(--touch); padding: 0 var(--sp-2); border: 0; background: transparent; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.lang-btn + .lang-btn { border-left: 1px solid var(--line); }
.lang-btn[aria-pressed="true"] { background: var(--brand); color: var(--on-ticket-brand); font-weight: 700; }
.theme-btn { width: var(--touch); height: var(--touch); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: 1.125rem; line-height: 1; }

/* ---- 控制列 ---- */
.controlbar { border-bottom: 1px solid var(--line); background: var(--bg); }
.controlbar-inner { max-width: var(--content-w); min-height: var(--controlbar-h); margin: 0 auto; padding: var(--sp-1) var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-3); }
.control { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.control-origin, .control-people { flex: 1 1 0; }
.control-leave { flex: 1 1 100%; flex-direction: column; align-items: flex-start; gap: 0; }
.control-leave-row { display: flex; align-items: center; gap: var(--sp-1); }
.control-label { font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.control-unit { font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.control-hint { padding-bottom: var(--sp-1); font-size: var(--fs-xs); color: var(--muted); }
.control-select { flex: 1 1 auto; min-width: 0; min-height: var(--touch); padding: 0 var(--sp-5) 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background-color: var(--surface); font-size: var(--fs-sm); font-weight: 500; text-overflow: ellipsis; -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.stepper { display: inline-flex; align-items: center; }
.stepper-btn { width: var(--touch); height: var(--touch); border: 0; border-radius: var(--r-md); background: transparent; font-size: 1.375rem; line-height: 1; color: var(--brand-ink); }
.stepper-btn[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.stepper-value { min-width: 2ch; text-align: center; font-size: var(--fs-num); font-weight: 900; line-height: 1; }

/* ---- 版面 ---- */
.layout { max-width: var(--content-w); margin: 0 auto; padding: var(--sp-4) var(--gutter) var(--sp-6); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.layout-ticket { min-width: 0; scroll-margin-top: calc(var(--topbar-h) + var(--sp-2)); }
.layout-list { min-width: 0; }
.hero-slot { scroll-margin-top: calc(var(--topbar-h) + var(--sp-2)); transition: opacity 80ms linear; }
.hero-slot.is-swapping { opacity: 0; }

/* ---- 票券 ---- */
.ticket { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--ticket-bg); color: var(--ticket-fg); box-shadow: var(--shadow-ticket); }
.ticket-top { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: flex-end; }
.dest-media { position: absolute; inset: 0; overflow: hidden; }
.dest-art { display: block; width: 100%; height: 100%; }
.dest-photo, .dest-photo-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.scrim { position: absolute; inset: 0; background: var(--scrim); pointer-events: none; }
.ticket-text { position: relative; z-index: 1; width: 100%; padding: 88px var(--sp-4) var(--sp-4);
  /* 文字區自己再加一層由上往下變深的遮罩：照片有亮天空時，小字也能維持 4.5:1 以上對比 */
  background: linear-gradient(180deg, rgb(21 32 43 / 0) 0, var(--scrim-text) 80px); display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); min-width: 0; }
.ticket-eyebrow { font-size: var(--fs-xs); font-weight: 700; color: var(--ticket-fg); letter-spacing: 0.04em; text-shadow: 0 1px 2px rgb(0 0 0 / 0.55); }
.ticket-flag { padding: 2px var(--sp-3); border-radius: var(--r-pill); background: var(--sun); color: var(--on-sun); font-size: var(--fs-xs); font-weight: 700; line-height: 1.6; }
.ticket-title { text-wrap: balance; font-size: var(--fs-hero); font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; }
.ticket-title:focus { outline: none; }
.ticket-sub { font-size: var(--fs-sm); color: var(--ticket-muted); }
.ticket-hook { font-size: var(--fs-base); font-weight: 500; }

.strip { display: flex; gap: 4px; width: 100%; padding: 2px; margin: 0 -2px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-day { flex: 1 1 0; min-width: 28px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--r-sm); scroll-snap-align: start; line-height: 1.2; }
.strip.is-long .strip-day { flex: 0 0 24px; min-width: 24px; }
.strip-week { font-size: var(--fs-xs); }
.strip.is-long .strip-week { font-size: 0.6875rem; }
.strip-date { font-size: var(--fs-base); font-weight: 700; }
.strip-day.is-off { background: var(--day-off); color: var(--day-off-ink); }
.strip-day.is-leave { background: var(--day-leave); color: var(--day-leave-ink); }
.strip-day.is-work { background: var(--day-work); color: var(--day-work-ink); }
.strip-day.is-today { box-shadow: 0 0 0 2px #fff; }
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--ticket-muted); }
.legend-item::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.legend-item.is-off::before { background: var(--day-off); }
.legend-item.is-leave::before { background: var(--day-leave); }
.legend-item.is-work::before { background: var(--day-work); }

/* 撕線：兩側半圓用頁底色挖出來 */
.ticket-tear { position: relative; height: 24px;
  background:
    radial-gradient(circle 12px at 0 50%, var(--bg) 11px, transparent 12px),
    radial-gradient(circle 12px at 100% 50%, var(--bg) 11px, transparent 12px); }
.ticket-tear::before { content: ''; position: absolute; left: var(--sp-5); right: var(--sp-5); top: 50%; border-top: 2px dashed var(--ticket-line); }
.ticket-stub { padding: var(--sp-2) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }

.dest-picker { display: flex; gap: var(--sp-2); padding: 6px 2px; margin: 0 -2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.dest-picker::-webkit-scrollbar { display: none; }
.dest-card { position: relative; flex: 0 0 64px; height: 80px; padding: var(--sp-1) 0; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; border-radius: var(--r-md); background: rgb(255 255 255 / 0.07); color: var(--ticket-fg); scroll-snap-align: start; }
.dest-card[aria-checked="true"] { outline: 2px solid var(--ticket-brand); outline-offset: -2px; background: rgb(45 212 191 / 0.12); }
.dest-thumb { position: relative; width: 48px; height: 48px; border-radius: var(--r-md); overflow: hidden; }
.dest-card-name { max-width: 100%; padding: 0 2px; font-size: var(--fs-xs); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dest-check { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ticket-brand); color: var(--on-ticket-brand); font-size: 0.6875rem; font-weight: 900; line-height: 16px; text-align: center; }

.ticket-price { font-size: var(--fs-sm); font-weight: 700; color: var(--price-fg); }
.ticket-actions { display: flex; flex-direction: column; gap: var(--sp-2); }
.btn-primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 var(--sp-4); border: 0; border-radius: var(--r-md); background: var(--ticket-brand); color: var(--on-ticket-brand); font-size: var(--fs-base); font-weight: 700; text-align: center; text-decoration: none; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--touch); padding: 0 var(--sp-4); border: 1px solid rgb(255 255 255 / 0.7); border-radius: var(--r-md); background: transparent; color: var(--ticket-fg); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
.btn-secondary:hover { background: rgb(255 255 255 / 0.08); }
.ticket-direct-note { font-size: var(--fs-xs); color: var(--ticket-muted); }
.ticket-affiliate, .ticket-note { font-size: var(--fs-xs); color: var(--ticket-muted); }
.ticket-also > summary { display: flex; align-items: center; min-height: var(--touch); font-size: var(--fs-sm); color: var(--ticket-muted); cursor: pointer; }
.also-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.also-link { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--sp-3); border: 1px solid var(--ticket-line); border-radius: var(--r-md); color: var(--ticket-fg); font-size: var(--fs-sm); text-decoration: none; }
.ticket-empty { padding: var(--sp-6) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.ticket-empty-text { font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; }
.btn-retry { width: auto; align-self: flex-start; }

/* ---- 載入骨架 ---- */
.skeleton-ticket { aspect-ratio: 4 / 5; border-radius: var(--r-lg); background: var(--ticket-bg); opacity: 0.9; animation: pulse 1.4s ease-in-out infinite; }
.loading-text { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--muted); text-align: center; }
.slot.is-skeleton { min-height: 72px; margin-bottom: var(--sp-2); background: var(--line); opacity: 0.4; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* ---- 時機名單 ---- */
.list-title { font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; }
.list-sub { margin-bottom: var(--sp-3); font-size: var(--fs-sm); color: var(--muted); }
.slot-list { list-style: none; border-top: 1px solid var(--line); padding-right: 4px; /* 留給 hover 右移 4px，不被切到也不產生橫向捲軸 */ }
.slot { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-3); align-items: start; min-height: 72px; padding: var(--sp-3) var(--sp-2) var(--sp-3) 15px; border-bottom: 1px solid var(--line); position: relative; transition: transform 180ms ease-out, background-color 180ms ease-out; }
/* 左緣色條：用偽元素 + transform，hover 時加粗（3px → 5px）不會推動版面 */
.slot::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dest, var(--line)); transform-origin: left center; transition: transform 180ms ease-out, background-color 180ms ease-out; pointer-events: none; }
.slot.is-selected { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.slot.is-selected::before { background: var(--brand); }
.slot.is-skeleton::before { background: var(--line); }
.slot.is-past { opacity: 0.5; }
.slot-thumb { position: relative; width: 40px; height: 40px; border-radius: var(--r-sm); overflow: hidden; }
.slot-thumb .dest-media { transition: transform 180ms ease-out; }
.slot-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.slot-holiday { font-size: var(--fs-sm); color: var(--muted); line-height: 1.3; }
.slot-date { font-size: var(--fs-base); font-weight: 700; line-height: 1.3; }
.slot-story { font-size: var(--fs-sm); line-height: 1.4; }
.slot-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); }
.slot-ratio { font-size: var(--fs-base); font-weight: 900; white-space: nowrap; }
.slot-take { color: var(--warn-fg); }
.slot-get { color: var(--brand-ink); }
.slot-pick { min-width: 88px; min-height: var(--touch); padding: 0 var(--sp-3); border: 1px solid var(--brand); border-radius: var(--r-md); background: transparent; color: var(--brand-ink); font-size: var(--fs-sm); font-weight: 700; transition: transform 180ms ease-out, background-color 180ms ease-out; }
.slot-pick[aria-pressed="true"] { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.list-note { margin-bottom: var(--sp-3); font-size: var(--fs-xs); color: var(--muted); }
.slot-book { display: inline-block; margin-left: var(--sp-1); padding: 0 var(--sp-2); border-radius: var(--r-pill); background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-ink); font-size: var(--fs-xs); font-weight: 700; }
.ticket-eyebrow.is-book::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--ticket-brand); }
.past-group { margin-top: var(--sp-4); }
.past-summary { display: flex; align-items: center; min-height: var(--touch); font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.is-past-list { border-top: 0; }
.slot-pasttag { font-size: var(--fs-xs); color: var(--muted); }
.slot-alts { grid-column: 2 / -1; display: flex; flex-direction: column; align-items: flex-start; }
.slot-alt { min-height: var(--touch); padding: 0; border: 0; background: none; color: var(--brand-ink); font-size: var(--fs-sm); text-align: left; text-decoration: underline; }
.minibar { display: flex; gap: 2px; height: 8px; margin-top: var(--sp-1); }
.minibar-seg { flex: 1 1 0; border-radius: 2px; transition: filter 180ms ease-out; }
.minibar-seg.is-off { background: var(--list-off); }
.minibar-seg.is-leave { background: var(--day-leave); }
.minibar-seg.is-work { box-shadow: inset 0 0 0 1px var(--muted); }

/* ---- 名單列 hover／鍵盤 focus 動畫 ----
   只用 transform / 顏色 / filter，不改 width、height、margin，所以不會推動版面。
   已過期列與骨架列不套用；選中列維持原本的色條與底色（只多位移與縮放）。
   hover 只在有滑鼠的裝置啟用（避免觸控裝置黏住 hover）；鍵盤 focus-visible 在任何裝置都有同等效果。
   reduced-motion：不位移、不縮放；顏色變化保留，且（見檔尾）沒有過渡。
   :hover 與 :has(:focus-visible) 分開寫，避免舊瀏覽器不支援 :has 時整條規則失效。 */
@media (hover: hover) and (pointer: fine) {
  .slot:not(.is-past):not(.is-skeleton):not(.is-selected):hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
  .slot:not(.is-past):not(.is-skeleton):hover .minibar-seg { filter: brightness(1.18); }
  .slot:not(.is-past):not(.is-skeleton):hover .slot-pick[aria-pressed="false"] { background: color-mix(in srgb, var(--brand) 12%, transparent); }
}
.slot:not(.is-past):not(.is-skeleton):not(.is-selected):has(:focus-visible) { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.slot:not(.is-past):not(.is-skeleton):has(:focus-visible) .minibar-seg { filter: brightness(1.18); }
.slot:not(.is-past):not(.is-skeleton):has(:focus-visible) .slot-pick[aria-pressed="false"] { background: color-mix(in srgb, var(--brand) 12%, transparent); }

@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) and (pointer: fine) {
    .slot:not(.is-past):not(.is-skeleton):hover { transform: translateX(4px); }
    .slot:not(.is-past):not(.is-skeleton):hover::before { transform: scaleX(1.6667); }
    .slot:not(.is-past):not(.is-skeleton):hover .slot-thumb .dest-media { transform: scale(1.06); }
    .slot:not(.is-past):not(.is-skeleton):hover .slot-pick { transform: translateX(2px); }
  }
  .slot:not(.is-past):not(.is-skeleton):has(:focus-visible) { transform: translateX(4px); }
  .slot:not(.is-past):not(.is-skeleton):has(:focus-visible)::before { transform: scaleX(1.6667); }
  .slot:not(.is-past):not(.is-skeleton):has(:focus-visible) .slot-thumb .dest-media { transform: scale(1.06); }
  .slot:not(.is-past):not(.is-skeleton):has(:focus-visible) .slot-pick { transform: translateX(2px); }
}

/* ---- 手機底部固定條 ---- */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 var(--sp-4) env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); background: var(--ticket-bg); color: var(--ticket-fg); border-top: 1px solid var(--ticket-line); transition: transform 160ms ease; }
.bottom-bar.is-covered { transform: translateY(100%); }
.bottom-price { flex: 1 1 0; min-width: 0; font-size: var(--fs-xs); line-height: 1.35; color: var(--price-fg); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bottom-cta { flex: 0 1 auto; max-width: 62%; min-height: var(--touch); padding: var(--sp-1) var(--sp-3); display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); background: var(--ticket-brand); color: var(--on-ticket-brand); font-size: var(--fs-sm); font-weight: 700; text-align: center; text-decoration: none; }

/* ---- 頁尾 ---- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer-inner { max-width: var(--content-w); margin: 0 auto; padding: var(--sp-5) var(--gutter) calc(var(--sp-7) + 64px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-text { font-size: var(--fs-xs); color: var(--muted); }
.footer-short { display: none; }
.footer-strong { font-weight: 900; }
.footer-link { color: var(--brand-ink); text-decoration: none; }
.footer-link:hover, .footer-link:focus-visible { text-decoration: underline; }
.footer-text .footer-link { display: inline-block; min-height: 24px; }
#footerAbout { text-decoration: underline; text-underline-offset: 3px; }

/* ---- about.html ---- */
.about { max-width: 720px; margin: 0 auto; padding: var(--sp-5) var(--gutter) var(--sp-7); display: flex; flex-direction: column; gap: var(--sp-5); }
.about-back { align-self: flex-start; display: inline-flex; align-items: center; min-height: var(--touch); font-size: var(--fs-sm); font-weight: 700; color: var(--brand-ink); text-decoration: none; }
.about-back:hover { text-decoration: underline; }
.about h1 { font-size: var(--fs-h2); font-weight: 900; }
.about-section { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.about-section h2 { font-size: var(--fs-base); font-weight: 700; }
.about-section p, .about-section li { font-size: var(--fs-sm); line-height: 1.7; }
.about-section ul { padding-left: var(--sp-5); }
.about-links { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); list-style: none; padding-left: 0 !important; }
.about-links a { display: inline-flex; align-items: center; min-height: var(--touch); }
.credit-list li { min-height: 28px; }

/* ---- 桌機 ---- */
@media (max-width: 899px) {
  /* 手機頁尾：兩行（短版來源 / 價格說明） */
  .footer-long, .footer-sep { display: none; }
  .footer-short, .footer-price { display: block; }
}

@media (min-width: 900px) {
  .controlbar-inner { flex-wrap: nowrap; gap: var(--sp-5); }
  .control-origin, .control-people { flex: 0 0 auto; }
  .control-select { min-width: 8.5rem; }
  .control-leave { flex: 1 1 auto; flex-direction: row; align-items: center; gap: var(--sp-3); }
  .control-hint { padding-bottom: 0; }
  .brand-tagline { display: block; }
  .brand-word { font-size: 1.5rem; }
  .layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-6); align-items: start; padding-top: var(--sp-5); }
  .layout-ticket { position: sticky; top: 88px; }
  .ticket-top { aspect-ratio: 16 / 9; }
  .ticket-text { padding: 136px var(--sp-5) var(--sp-5); background: linear-gradient(180deg, rgb(21 32 43 / 0) 0, var(--scrim-text) 128px); }
  .ticket-stub { padding: var(--sp-2) var(--sp-5) var(--sp-5); }
  .strip-day { min-width: 36px; height: 48px; }
  .strip.is-long .strip-day { flex-basis: 24px; min-width: 24px; }
  .ticket-actions { flex-direction: row; }
  .ticket-actions .btn-primary { flex: 2 1 0; }
  .ticket-actions .btn-secondary { flex: 1 1 0; width: auto; min-height: 52px; }
  .bottom-bar { display: none; }
  .site-footer-inner { padding-bottom: var(--sp-7); }
  .skeleton-ticket { aspect-ratio: 16 / 12; }
}

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