/* =========================================================
   太平雲梯 官方網站 ─ 主要樣式
   版面：大量留白、細線分隔、左側大標＋英文副標、深色營業時間面板。
   只引用 tokens.css 的 semantic tokens（--c-*），換主題不用改這裡。
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.9;
  letter-spacing: .04em;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { border: 0; }
/* 嵌入 SHOPLINE 時，避免佈景主題的標題、表單字型蓋過本站設定 */
h1, h2, h3, h4, p, li, dt, dd, th, td, button, input, select, textarea { font-family: inherit; }
a { color: inherit; text-underline-offset: 3px; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
small { font-size: inherit; }

:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; padding: .5rem 1rem; background: var(--c-brand); color: #fff; }
.skip-link:focus { top: 1rem; }

.ic { width: 1em; height: 1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
/* SHOPLINE（Bootstrap）的 .container 有 clearfix 偽元素，會在 grid 版面中多佔格子 */
.container::before, .container::after { content: none; display: none; }

/* 標誌：日／夜版本切換，一律等比例 */
.logo-night { display: none !important; }
[data-theme="night"] .logo-day { display: none !important; }
[data-theme="night"] .logo-night { display: block !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 44px; padding: .55rem 1.4rem;
  border: 1px solid transparent; border-radius: 2px;
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--sm { min-height: 36px; padding: .4rem 1rem; font-size: var(--fs-xs); }
.btn--line { border-color: var(--c-line-strong); background: var(--c-surface); color: var(--c-text); }
.btn--line:hover { border-color: var(--c-brand); color: var(--c-brand); }
.btn--solid { background: var(--c-brand); color: var(--c-on-brand); }
.btn--solid:hover { background: var(--c-brand-strong); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--c-line); border-radius: 50%; background: var(--c-surface); color: var(--c-text);
}
.icon-btn:hover { color: var(--c-brand); border-color: var(--c-brand); }
#modeToggle .ic--moon { display: none; }
[data-theme="night"] #modeToggle .ic--sun { display: none; }
[data-theme="night"] #modeToggle .ic--moon { display: block; }

/* ---------- Emergency notice ---------- */
.notice-bar { background: var(--c-danger); color: #fff; font-size: var(--fs-sm); }
.notice-bar[data-level="warning"] { background: var(--c-warn); }
.notice-bar__inner { display: flex; align-items: center; gap: .75rem; min-height: 48px; padding-block: .6rem; }
.notice-bar__text strong { margin-right: .6em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-bg);
  transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--c-line); }
.site-header__inner {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 48px);
  height: var(--header-h); padding-inline: var(--gutter);
}
.brand { display: block; flex-shrink: 0; margin-right: auto; padding-block: var(--logo-clear); }
/* 主標誌圓標（內含「太平雲梯」字樣，旁邊不另打文字）；固定正方形，不變形 */
.brand__logo { width: clamp(52px, 4.6vw, 64px); height: auto; aspect-ratio: 1; object-fit: contain; }

.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }
.site-nav__list {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto);
  column-gap: clamp(20px, 2.6vw, 44px); row-gap: 0;
}
.site-nav__list a {
  display: block; padding: .1rem 0; text-decoration: none;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em;
}
.site-nav__list a:hover, .site-nav__list a[aria-current="true"] { color: var(--c-brand); }
.site-nav__side { display: grid; justify-items: end; gap: .35rem; }
.site-nav__meta { font-size: .7rem; line-height: 1.5; color: var(--c-text-muted); text-align: right; }
.site-nav__btns { display: flex; gap: .5rem; }

.site-header__tools { display: flex; gap: .5rem; }
.nav-toggle { display: none; }
.nav-toggle .ic--close { display: none; }
.nav-open .nav-toggle .ic--open { display: none; }
.nav-open .nav-toggle .ic--close { display: block; }

/* ---------- Hero：圓角大圖框 ---------- */
.hero { padding: 0 var(--frame) 0; }
.hero__frame {
  position: relative; overflow: hidden;
  height: clamp(320px, calc(100svh - var(--header-h) - var(--frame) * 2), 820px);
  border-radius: var(--radius-lg);
  background: var(--c-surface-2);
}
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 輪播：目前這張清楚，其他張模糊淡出 */
.hero__photo { opacity: 0; filter: blur(16px); transform: scale(1.05); transition: opacity 1.6s var(--ease), filter 1.6s var(--ease), transform 8s ease-out; }
.hero__photo.is-active.is-loaded { opacity: 1; filter: blur(0); transform: scale(1); }
.hero__photo.is-prev.is-loaded { opacity: 1; filter: none; transform: none; z-index: 0; }
.hero__photo.is-active { z-index: 1; }
.hero__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__dots { position: absolute; right: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px); z-index: 2; display: flex; gap: .5rem; }
.hero__dot { width: 9px; height: 9px; padding: 0; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; background: transparent; box-shadow: 0 0 4px rgba(0,0,0,.35); }
.hero__dot[aria-current="true"] { background: #fff; }
.hero__dot::after { content: ""; position: absolute; inset: -10px; }
.hero__dot { position: relative; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--line { border-top: 1px solid var(--c-line); margin-inline: var(--frame); padding-inline: 0; }
.section--line > .container { padding-inline: calc(var(--gutter) - var(--frame)); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.section__head h2, .panel__title, .calendar__title, .pets h3 {
  font-size: var(--fs-2xl); font-weight: 700; line-height: 1.3; letter-spacing: .12em; color: var(--c-heading);
}
.section__head h2 small, .panel__title small, .calendar__title small, .pets h3 small, .fare__name small {
  display: block; margin-top: .35rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--c-text-muted);
}
.section__head p { margin-top: 1.25rem; max-width: 40em; color: var(--c-text-muted); }
.section__more { margin-top: 2.5rem; text-align: center; }
.small { margin-top: 1.25rem; font-size: var(--fs-xs); color: var(--c-text-muted); }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 7vw, 112px); align-items: end; }
.intro__title { font-size: var(--fs-3xl); font-weight: 700; line-height: 1.5; letter-spacing: .14em; color: var(--c-heading); margin-bottom: 2rem; }
.intro__text p { margin-top: 1rem; max-width: 34em; }
.intro__note { font-size: var(--fs-xs); color: var(--c-text-muted); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--c-line); }
.facts > div { padding: 1.25rem 0; border-bottom: 1px solid var(--c-line); }
.facts > div:nth-child(odd) { padding-right: 1rem; border-right: 1px solid var(--c-line); }
.facts > div:nth-child(even) { padding-left: 1.5rem; }
.facts dt { font-size: var(--fs-xs); color: var(--c-text-muted); }
.facts dd { font-family: var(--font-num); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 300; line-height: 1.3; letter-spacing: .02em; color: var(--c-heading); }
.facts dd small { margin-left: .3rem; font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 400; color: var(--c-text-muted); }

.points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 clamp(20px, 3vw, 40px); margin-top: clamp(56px, 8vw, 96px); }
.points li { padding-top: 1.25rem; border-top: 1px solid var(--c-line-strong); }
.points h3 { font-size: var(--fs-md); font-weight: 700; letter-spacing: .1em; color: var(--c-heading); }
.points p { margin-top: .5rem; font-size: var(--fs-xs); color: var(--c-text-muted); line-height: 1.9; }

/* ---------- News ---------- */
.news { border-top: 1px solid var(--c-line); }
.news li { display: grid; grid-template-columns: 7.5em 4.5em 1fr; gap: .25rem 1rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--c-line); }
.news time { font-family: var(--font-num); font-size: var(--fs-xs); color: var(--c-brand); letter-spacing: .06em; }
.news__tag { justify-self: start; font-size: .68rem; padding: 0 .5rem; border: 1px solid currentColor; color: var(--c-text-muted); line-height: 1.7; }
.news li[data-level="warning"] .news__tag, .news li[data-level="closed"] .news__tag { color: var(--c-danger); }
.news__title { font-size: var(--fs-sm); font-weight: 700; }
.news__body { grid-column: 3; font-size: var(--fs-xs); color: var(--c-text-muted); }

/* ---------- 營業時間：深色面板 ---------- */
.panel {
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--c-panel); color: var(--c-on-panel);
  border: 0; box-shadow: none; margin-bottom: 0; /* 避免 SHOPLINE（Bootstrap）的 .panel 外框 */
}
.panel a { color: inherit; }
.panel__title, .calendar__title { color: var(--c-on-panel); }
.panel__title small, .calendar__title small { color: var(--c-on-panel-muted); }
.panel__grid { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: clamp(28px, 5vw, 72px); }

.now { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--c-panel-line); }
.now__label { font-size: .7rem; color: var(--c-on-panel-muted); letter-spacing: .14em; }
.now__state { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-xl); font-weight: 700; letter-spacing: .1em; }
.now__detail { margin-top: .25rem; font-size: var(--fs-xs); color: var(--c-on-panel-muted); }
.now__weather { margin-top: 1rem; font-size: var(--fs-xs); color: var(--c-on-panel-muted); }
.now__advice { margin-top: .5rem; font-size: var(--fs-xs); color: var(--c-warn-on-dark); }

.status-dot { --dot: var(--c-on-panel-muted); width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--dot); }
[data-state="open"] .status-dot { --dot: var(--c-ok); }
[data-state="closing"] .status-dot { --dot: var(--c-warn); }
[data-state="closed"] .status-dot { --dot: var(--c-danger); }

.legend { display: grid; gap: .2rem; margin-top: 1.5rem; font-size: var(--fs-xs); color: var(--c-on-panel-muted); }
.mark { display: inline-block; width: 1.4em; text-align: center; margin-right: .3rem; padding: 0; background: none; } /* 避免 Bootstrap .mark 螢光底色 */
.mark--open { color: var(--c-mark-open); }
.mark--star { color: var(--c-mark-star); }
.mark--special { color: var(--c-mark-special); }
.mark--closed { color: var(--c-on-panel); }

.hours-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.hours-table th, .hours-table td { padding: .9rem .75rem; text-align: left; border-bottom: 1px solid var(--c-panel-line); vertical-align: top; }
.hours-table thead th { padding-block: .45rem; background: var(--c-panel-head); font-size: var(--fs-xs); font-weight: 700; text-align: center; border-bottom: 0; }
.hours-table thead th.is-current { background: var(--c-mark-open); color: var(--c-panel); }
.hours-table tbody th { width: 34%; font-weight: 700; font-size: var(--fs-xs); letter-spacing: .1em; }
.hours-table tbody th small { display: block; font-weight: 400; color: var(--c-on-panel-muted); letter-spacing: .04em; }
.hours-table td { text-align: center; }
.hours-table td b { display: block; font-family: var(--font-num); font-size: var(--fs-lg); font-weight: 500; letter-spacing: .04em; }
.hours-table td small { font-size: .7rem; color: var(--c-on-panel-muted); }
.hours-table td.is-closed b { font-size: var(--fs-xl); }
.panel__note { margin-top: 1.25rem; font-size: var(--fs-xs); color: var(--c-on-panel-muted); }

.calendar { margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--c-panel-line); }
.calendar__months { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 1.5rem; }
.cal__caption { margin-bottom: .6rem; font-size: var(--fs-md); font-weight: 700; letter-spacing: .1em; text-align: center; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-size: var(--fs-xs); }
.cal th { padding: .3rem 0; background: var(--c-panel-head); font-weight: 700; }
.cal th:first-child, .cal th:last-child { color: var(--c-on-panel); }
.cal td { padding: .35rem 0 .45rem; border-bottom: 1px solid var(--c-panel-line); line-height: 1.3; }
.cal td span { display: block; font-family: var(--font-num); }
.cal td i { display: block; font-style: normal; font-size: .9rem; }
.cal td.is-open i { color: var(--c-mark-open); }
.cal td.is-star i { color: var(--c-mark-star); }
.cal td.is-special i { color: var(--c-mark-special); }
.cal td.is-closed i { color: var(--c-on-panel); }
.cal td.is-past { opacity: .35; }
.cal td.is-today span { display: inline-block; min-width: 1.8em; border-radius: 2px; background: var(--c-on-panel); color: var(--c-panel); font-weight: 700; }
.cal td em { display: block; font-style: normal; font-size: .6rem; color: var(--c-mark-special); line-height: 1.2; }

/* ---------- 票價 ---------- */
.fares { border-top: 1px solid var(--c-line-strong); }
.fare {
  display: grid; grid-template-columns: 13em 1fr auto; gap: .5rem 2rem; align-items: start;
  padding: 1.5rem 0; border-bottom: 1px solid var(--c-line);
}
.fare__name { position: relative; padding-left: 1.1rem; font-size: var(--fs-lg); font-weight: 700; letter-spacing: .14em; color: var(--c-heading); line-height: 1.4; }
.fare__name::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; background: var(--tier); }
.fare__name small { letter-spacing: .06em; }
.fare__who { display: grid; gap: .6rem; }
.fare__who li { font-weight: 700; line-height: 1.6; }
.fare__who span { display: block; font-size: .72rem; font-weight: 400; color: var(--c-text-muted); }
.fare__price { font-family: var(--font-num); font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem); font-weight: 300; line-height: 1.1; color: var(--c-heading); white-space: nowrap; }
.fare__price small { margin-left: .2rem; font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--c-text-muted); }
.fare__price--free { font-family: var(--font-sans); font-size: var(--fs-lg); font-weight: 700; padding-top: .3rem; }

.tickets-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2rem; }
.tickets-foot p { font-size: var(--fs-xs); color: var(--c-text-muted); }

.pets { margin-top: clamp(48px, 7vw, 88px); padding: clamp(24px, 4vw, 48px); border-radius: var(--radius-lg); background: var(--c-surface-2); }
.pets h3 { font-size: var(--fs-xl); }
.pets ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem 3rem; margin-top: 1.5rem; counter-reset: pet; }
.pets li { counter-increment: pet; display: grid; grid-template-columns: 2.2em 1fr; font-size: var(--fs-xs); color: var(--c-text-muted); }
.pets li::before { content: counter(pet, decimal-leading-zero); grid-row: span 2; font-family: var(--font-num); font-size: var(--fs-md); color: var(--c-brand); line-height: 1.6; }
.pets strong { display: block; font-size: var(--fs-sm); color: var(--c-text); }

/* ---------- 交通 ---------- */
.tabs__list { display: inline-flex; margin-bottom: 2.5rem; border: 1px solid var(--c-heading); }
.tabs__tab { min-height: 42px; padding: .4rem 1.6rem; border: 0; background: var(--c-surface); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; }
.tabs__tab + .tabs__tab { border-left: 1px solid var(--c-heading); }
.tabs__tab[aria-selected="true"] { background: var(--c-heading); color: var(--c-bg); }

.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 72px); }
.steps { counter-reset: step; border-top: 1px solid var(--c-line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; padding: 1rem 0; border-bottom: 1px solid var(--c-line); }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--font-num); color: var(--c-brand); }
.steps strong { font-weight: 700; }
.steps span { font-size: var(--fs-xs); color: var(--c-text-muted); }
.kv { border-top: 1px solid var(--c-line); }
.kv > div { padding: 1rem 0; border-bottom: 1px solid var(--c-line); }
.kv dt { font-weight: 700; }
.kv dd { font-size: var(--fs-xs); color: var(--c-text-muted); }

.buses { display: grid; gap: 0; border-top: 1px solid var(--c-line); }
.bus { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 1rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--c-line); }
.bus h3 { font-size: var(--fs-md); font-weight: 700; letter-spacing: .06em; line-height: 1.6; }
.bus h3 small { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--c-text-muted); }
.bus__no { display: inline-block; min-width: 3.2em; margin-right: .6rem; padding: 0 .4rem; border: 1px solid var(--c-heading); font-family: var(--font-num); font-size: var(--fs-sm); text-align: center; }
.bus__times { display: grid; gap: .6rem; }
.bus__times > div { display: grid; grid-template-columns: 3.5em 1fr; align-items: baseline; }
.bus__times dt { font-size: var(--fs-xs); color: var(--c-text-muted); }
.times { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.times li.is-next { color: var(--c-brand); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.plan { padding-top: 1.25rem; border-top: 1px solid var(--c-line-strong); }
.plan h3 { font-size: var(--fs-md); font-weight: 700; letter-spacing: .08em; }
.plan p { margin-top: .5rem; font-size: var(--fs-xs); color: var(--c-text-muted); }

/* ---------- 一日遊 ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.6vw, 20px); }
.flow li { padding: 0 1.1rem 1.5rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
.flow__img { display: block; width: calc(100% + 2.2rem); max-width: none; height: auto; aspect-ratio: 4 / 3; margin: 0 -1.1rem 1.1rem; object-fit: cover; background: var(--c-line); }
.flow__no { display: block; font-family: var(--font-num); font-size: var(--fs-xs); color: var(--c-brand); }
.flow time { display: block; margin-top: .9rem; font-family: var(--font-num); font-size: var(--fs-xs); color: var(--c-text-muted); }
.flow h3 { margin-top: .2rem; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em; color: var(--c-heading); }
.flow p { margin-top: .5rem; font-size: .75rem; color: var(--c-text-muted); line-height: 1.8; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--c-line); }
.faq__item { border-bottom: 1px solid var(--c-line); }
.faq__item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1.25rem 2.5rem 1.25rem 2.2rem; font-weight: 700;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before { content: "Q"; position: absolute; left: 0; font-family: var(--font-num); color: var(--c-brand); }
.faq__item summary::after { content: "+"; position: absolute; right: .25rem; font-size: 1.2rem; font-weight: 300; line-height: 1.5; color: var(--c-text-muted); }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { padding: 0 2.5rem 1.5rem 2.2rem; font-size: var(--fs-xs); color: var(--c-text-muted); }
.faq__item p a { color: var(--c-brand); }

/* ---------- Footer：地圖＋聯絡資訊 ---------- */
.site-footer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  margin: var(--section-y) var(--frame) var(--frame);
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-line);
}
.site-footer__map { min-height: 460px; background: var(--c-surface-2); }
.site-footer__map iframe { display: block; width: 100%; height: 100%; min-height: 460px; border: 0; }
.site-footer__info { display: flex; flex-direction: column; gap: 1.25rem; padding: clamp(28px, 5vw, 64px); }
.site-footer__logo { width: min(300px, 100%); height: auto; aspect-ratio: 1200 / 315; object-fit: contain; margin: var(--logo-clear) 0; }
.site-footer address { font-style: normal; font-size: var(--fs-xs); color: var(--c-text-muted); }
.site-footer__btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.site-footer__tel small { display: block; font-size: .7rem; color: var(--c-text-muted); }
.site-footer__tel a { font-family: var(--font-num); font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); font-weight: 500; letter-spacing: .04em; text-decoration: none; color: var(--c-heading); }
.site-footer__copy { margin-top: auto; font-size: .7rem; color: var(--c-text-muted); }

/* ---------- 浮動資訊列 ---------- */
.dock {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45;
  transform: translateX(-50%);
  display: flex; align-items: center;
  padding: .35rem .35rem .35rem 1rem; border-radius: var(--radius-pill);
  background: var(--c-surface); box-shadow: 0 6px 28px rgba(0, 0, 0, .14);
  font-size: var(--fs-xs); white-space: nowrap;
}
.dock__item { display: flex; align-items: center; gap: .45rem; padding: .35rem .9rem; text-decoration: none; font-weight: 700; }
.dock__item + .dock__item { border-left: 1px solid var(--c-line); }
.dock__item:hover { color: var(--c-brand); }
.dock__tel { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; font-family: var(--font-num); font-size: 1.15rem; letter-spacing: .04em; }
.dock__tel small { font-family: var(--font-sans); font-size: .62rem; color: var(--c-text-muted); font-weight: 400; }
.dock__tel-sm { display: none; }
.dock__buy { margin-left: .4rem; padding: .55rem 1.3rem; border-radius: var(--radius-pill); background: var(--c-brand); color: var(--c-on-brand); border-left: 0 !important; }
.dock__buy:hover { color: var(--c-on-brand); background: var(--c-brand-strong); }

.to-top {
  position: fixed; right: var(--frame); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--c-line-strong); border-radius: 2px; background: var(--c-surface); color: var(--c-text);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- Reveal：只做淡入 ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   RWD
   ========================================================= */
@media (max-width: 1100px) {
  .site-nav__side { display: none; }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .points { grid-template-columns: repeat(2, 1fr); gap: 2rem clamp(20px, 3vw, 40px); }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch;
    padding: .5rem var(--gutter) 2rem;
    background: var(--c-bg); border-bottom: 1px solid var(--c-line);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
  .site-nav__list { grid-auto-flow: row; grid-template-rows: none; }
  .site-nav__list a { padding: .9rem 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-sm); }
  .site-nav__side { display: grid; justify-items: start; margin-top: 1rem; }
  .site-nav__meta { text-align: left; }

  .intro, .panel__grid, .cols, .bus { grid-template-columns: 1fr; }
  .calendar__months { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer__map, .site-footer__map iframe { min-height: 320px; }
  .fare { grid-template-columns: 1fr auto; }
  .fare__who { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 640px) {
  .points, .pets ol { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .news li { grid-template-columns: auto 1fr; }
  .news__title, .news__body { grid-column: 1 / -1; }
  .hero__frame { height: auto; aspect-ratio: 4 / 3; }
  .hero__dots { top: 12px; bottom: auto; }
  .hours-table th, .hours-table td { padding: .75rem .3rem; }
  .hours-table tbody th { width: 30%; }
  .hours-table tbody th small { display: none; }
  .hours-table td b { font-size: .95rem; white-space: nowrap; letter-spacing: 0; }
  .hours-table td small { white-space: nowrap; font-size: .62rem; }
  .tabs__list { display: flex; max-width: 100%; overflow-x: auto; }
  .tabs__tab { flex: 1 0 auto; white-space: nowrap; padding-inline: 1rem; }
  .dock { left: 12px; right: 12px; transform: none; justify-content: space-between; padding-left: .6rem; }
  .dock__hide-sm, .dock__tel { display: none; }
  .dock__tel-sm { display: flex; }
  body { padding-bottom: 76px; }
  .to-top { bottom: 84px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .notice-bar, .dock, .to-top, .hero, .site-footer__map { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .panel { background: none; color: #000; }
}

/* =========================================================
   子頁面（交通、商圈）
   ========================================================= */
.page-head { padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 5vw, 64px); }
.crumbs { display: flex; gap: .6rem; font-size: var(--fs-xs); color: var(--c-text-muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--c-brand); }
.page-head__title { margin-top: 1.5rem; font-size: var(--fs-3xl); font-weight: 700; line-height: 1.4; letter-spacing: .12em; color: var(--c-heading); }
.page-head__title small { display: block; margin-top: .4rem; font-size: .75rem; font-weight: 700; letter-spacing: .1em; color: var(--c-text-muted); }
.page-head__lead { margin-top: 1.5rem; max-width: 42em; }

.today-bus {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 2rem;
  margin-top: 2rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: var(--c-surface-2);
}
.today-bus__date { font-family: var(--font-num); font-size: var(--fs-xs); color: var(--c-text-muted); }
.today-bus__pick { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--c-heading); }
.today-bus__park { margin-left: auto; font-size: var(--fs-xs); color: var(--c-text-muted); }

.section__more--left { text-align: left; margin-top: 1.5rem; }
.cols--even { grid-template-columns: 1fr 1fr; }
.points--3 { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.points a { color: var(--c-brand); }

.route { display: block; padding: 0; border: 0; }
.route__head h3 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: .06em; color: var(--c-heading); }
.route__meta { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: .5rem; font-size: var(--fs-xs); color: var(--c-text-muted); }
.route__meta li::before { content: "・"; color: var(--c-brand); }
.route__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem clamp(24px, 5vw, 64px); margin-top: 2rem; }
.tt h4 { padding-bottom: .6rem; margin-bottom: .9rem; border-bottom: 1px solid var(--c-line-strong); font-size: var(--fs-sm); font-weight: 700; letter-spacing: .1em; }
.tt h4 small { margin-left: .6rem; font-weight: 400; font-size: var(--fs-xs); color: var(--c-text-muted); letter-spacing: .04em; }
.tt .times { font-size: var(--fs-lg); gap: .4rem 1.5rem; }
.tt__note { margin-top: .8rem; font-size: var(--fs-xs); color: var(--c-text-muted); }
.times li.is-past { color: var(--c-line-strong); }

.stops { display: flex; margin-top: 2rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.stops li {
  position: relative; flex: 1 0 6.5em; padding-top: 1.4rem;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; text-align: center;
}
.stops li::before { content: ""; position: absolute; top: .35rem; left: 0; right: 0; border-top: 1px solid var(--c-line-strong); }
.stops li:first-child::before { left: 50%; }
.stops li:last-child::before { right: 50%; }
.stops li::after { content: ""; position: absolute; top: 0; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-text-muted); }
.stops li.is-dest::after { background: var(--c-brand); border-color: var(--c-brand); }
.stops li.is-dest { color: var(--c-brand); }
.stops small { display: block; font-weight: 400; color: var(--c-text-muted); }

.fare-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 2rem; border-top: 1px solid var(--c-line); }
.fare-list > div { padding: .9rem 1rem .9rem 0; border-bottom: 1px solid var(--c-line); }
.fare-list dt { font-size: var(--fs-xs); color: var(--c-text-muted); }
.fare-list dd { font-weight: 700; }
.fare-table { width: 100%; max-width: 520px; margin-top: 2rem; border-collapse: collapse; font-size: var(--fs-sm); }
.fare-table th, .fare-table td { padding: .7rem .5rem; border-bottom: 1px solid var(--c-line); text-align: left; }
.fare-table thead th { font-size: var(--fs-xs); font-weight: 700; color: var(--c-text-muted); border-bottom-color: var(--c-line-strong); }
.fare-table td { font-family: var(--font-num); font-weight: 700; }

@media (max-width: 900px) {
  .cols--even, .points--3 { grid-template-columns: 1fr; gap: 2rem; }
  .route__grid { grid-template-columns: 1fr; }
  .today-bus__park { margin-left: 0; }
}

/* ---------- 商圈店家目錄 ---------- */
.shop-filter { position: sticky; top: var(--header-h); z-index: 5; padding: 1rem 0; margin-bottom: 1.5rem; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.shop-filter__cats { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { min-height: 34px; padding: .25rem 1rem; border: 1px solid var(--c-line-strong); border-radius: var(--radius-pill); background: var(--c-surface); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; }
.chip[aria-pressed="true"] { background: var(--c-heading); border-color: var(--c-heading); color: var(--c-bg); }
.shop-filter__row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .75rem; }
.field { min-height: 38px; padding: .3rem .8rem; border: 1px solid var(--c-line-strong); border-radius: 2px; background: var(--c-surface); color: var(--c-text); font: inherit; font-size: var(--fs-xs); }
.field--grow { flex: 1 1 220px; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-xs); font-weight: 700; }
.shop-filter__count { margin-left: auto; font-size: var(--fs-xs); color: var(--c-text-muted); }
.shop-group + .shop-group { margin-top: 3rem; }
.shop-group__more { margin-top: 1.25rem; text-align: center; }
.shop-group__title { display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1rem; font-size: var(--fs-lg); font-weight: 700; letter-spacing: .12em; color: var(--c-heading); }
.shop-group__title small { font-size: var(--fs-xs); font-weight: 400; color: var(--c-text-muted); letter-spacing: .04em; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 24px); }
.shop__open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.shop__img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--c-surface-2); }
.shop__img--empty { display: grid; place-items: center; font-size: var(--fs-xs); color: var(--c-text-muted); letter-spacing: .1em; }
.shop__body { display: grid; gap: .15rem; padding: .75rem .1rem 0; }
.shop__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; font-size: .72rem; color: var(--c-text-muted); }
.shop__state { padding: 0 .45rem; border: 1px solid currentColor; line-height: 1.6; }
.shop__state--open { color: var(--c-ok); }
.shop__state--closing { color: var(--c-warn); }
.shop__state--closed { color: var(--c-text-muted); }
.shop__state--appt { color: var(--c-brand); }
.shop__name { font-size: var(--fs-md); font-weight: 700; letter-spacing: .06em; color: var(--c-heading); }
.shop__open:hover .shop__name { color: var(--c-brand); }
.shop__addr { font-size: .75rem; color: var(--c-text-muted); }
.shop-empty { padding: 3rem 0; text-align: center; color: var(--c-text-muted); }

.shop-dialog { margin: auto; width: min(560px, calc(100vw - 32px)); max-height: 88vh; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.shop-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.shop-dialog__close { position: absolute; top: 12px; right: 12px; z-index: 1; }
.shop-dialog__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shop-dialog__fig { position: relative; }
.shop-dialog__fig figcaption { position: absolute; right: .5rem; bottom: .4rem; padding: 0 .4rem; background: rgba(0,0,0,.45); color: #fff; font-size: .65rem; }
.shop-dialog__name small { display: block; font-size: var(--fs-xs); font-weight: 400; letter-spacing: .04em; color: var(--c-text-muted); }
.shop-dialog__desc { margin-bottom: 1rem; font-size: var(--fs-xs); white-space: pre-line; color: var(--c-text); }
.shop-dialog__inner { padding: 1.5rem; }
.shop-dialog__name { margin-top: .3rem; font-size: var(--fs-xl); font-weight: 700; letter-spacing: .08em; color: var(--c-heading); }
.shop-dialog__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 0 1rem; }
.shop-dialog__tags li { padding: 0 .6rem; border: 1px solid var(--c-line-strong); font-size: .72rem; }
.shop-dialog .kv dd { white-space: pre-line; }
.shop-dialog__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }

@media (max-width: 900px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shop-grid { grid-template-columns: 1fr; } .shop-filter { position: static; } }

/* ---------- 插畫點綴：取自 A3 公版（assets/img/deco），只當背景裝飾 ---------- */
/* 頁首：左側淡淡的天空漸層與雲朵 */
.site-header { background: var(--c-bg) linear-gradient(90deg, var(--deco-sky, #cfe6ec), var(--c-bg) min(60%, 760px)); }
.site-header::before {
  content: ""; position: absolute; top: 10px; left: calc(var(--gutter) + clamp(72px, 7vw, 96px));
  width: clamp(120px, 14vw, 190px); aspect-ratio: 264 / 90;
  background: url(../img/deco/clouds.svg) no-repeat left top / contain;
  pointer-events: none;
}
.site-header__inner { position: relative; }

/* 分頁標題：右上角的天空、太陽與雲 */
.page-head { position: relative; isolation: isolate; }
.page-head::before {
  content: ""; position: absolute; z-index: -1; top: 0; right: 0;
  width: min(72%, 1040px); aspect-ratio: 1190 / 205;
  background: url(../img/deco/sky.svg) no-repeat left top / 100% auto;
  transform: scaleX(-1);
  pointer-events: none;
}

/* 段落標題：右側一個小插畫 */
.section__head { position: relative; }
:is(#news, #tickets, #transport, #drive, #bus, #around, #spots, #plans, #shops, #tips, #faq) .section__head::after {
  content: ""; position: absolute; right: 0; bottom: 0;
  width: clamp(120px, 16vw, 210px); height: clamp(52px, 6.4vw, 88px);
  background: no-repeat right bottom / contain;
  pointer-events: none;
}
:is(#news, #tips, #shops) .section__head::after { background-image: url(../img/deco/flowers.svg); }
#tickets .section__head::after { background-image: url(../img/deco/bridge.svg); height: clamp(44px, 5vw, 70px); }
:is(#transport, #drive) .section__head::after { background-image: url(../img/deco/car.svg); height: clamp(36px, 4.4vw, 60px); }
#bus .section__head::after { background-image: url(../img/deco/sun.svg); }
:is(#around, #spots, #plans) .section__head::after { background-image: url(../img/deco/trees.svg); }
#faq .section__head::after { background-image: url(../img/deco/bench.svg); }

/* 頁尾：卡片底部的山丘、吊橋與茶園小路 */
.site-footer::after {
  content: ""; grid-column: 1 / -1;
  aspect-ratio: 1190 / 206; min-height: 96px;
  background: url(../img/deco/landscape.svg) no-repeat left bottom / cover;
  pointer-events: none;
}

[data-theme="night"] .site-header::before, [data-theme="night"] .page-head::before,
[data-theme="night"] .section__head::after, [data-theme="night"] .site-footer::after { filter: brightness(.62) saturate(.8); }

@media (max-width: 640px) {
  .site-header::before { top: 6px; width: 104px; }
  .page-head::before { width: 86%; }
  :is(#news, #tickets, #transport, #drive, #bus, #around, #spots, #plans, #shops, #tips, #faq) .section__head::after { top: 0; bottom: auto; width: 96px; height: 44px; background-position: right top; }
  :is(#transport, #drive) .section__head::after { height: 30px; }
}
@media print {
  .page-head::before, .section__head::after, .site-footer::after { display: none; }
}
