/* 2026 金門・廈門・漳州 — 編輯式排版、大量留白、照顧長輩閱讀。全部字型用系統字，不連外部 CDN（中國大陸可用）。 */
:root {
  --ivory: #F8F7F4;
  --paper: #FFFFFF;
  --ink: #242424;
  --slate: #6A6A6A;      /* 比 #747474 深一階，ivory 底上對比 ≥ 4.9:1 */
  --ocean: #153B50;
  --ocean-2: #1E5470;
  --terracotta: #A66A52;
  --gold: #B7A184;
  --line: #E4E1DA;
  --soft: #EFECE6;
  --ok: #2F6B4F;
  --warn: #8A5A12;
  --danger: #9B3B2E;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 30, 40, .04), 0 8px 24px rgba(20, 30, 40, .06);
  --serif: "Songti TC", "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --fs: 18px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  color-scheme: light;
}
html[data-font="1"] { --fs: 20px; }
html[data-font="2"] { --fs: 23px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font: 400 var(--fs)/1.75 var(--sans); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: var(--ocean); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ocean-2); }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ocean); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
main:focus { outline: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.muted { color: var(--slate); }
.small { font-size: .86em; }
.inline { display: inline; }

/* 字級 */
.display { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 6.4vw, 4.6rem); line-height: 1.18; letter-spacing: .04em; margin: 0; }
.h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.25; letter-spacing: .03em; margin: .2em 0; }
.h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.55rem, 3.4vw, 2.3rem); line-height: 1.3; letter-spacing: .03em; margin: .2em 0 .6em; }
.h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.2rem, 2.3vw, 1.5rem); line-height: 1.4; margin: 0 0 .5em; }
.eyebrow { font-size: .72em; letter-spacing: .22em; text-transform: uppercase; color: var(--terracotta); margin: 0 0 .6em; font-weight: 600; }
.lead { font-size: 1.08em; color: #3A3A3A; line-height: 1.85; }

/* 按鈕：觸控區 ≥ 44px */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--ocean);
  background: transparent; color: var(--ocean); text-decoration: none; font-weight: 600; cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--ocean); color: #fff; }
.btn--primary { background: var(--ocean); color: #fff; }
.btn--primary:hover { background: var(--ocean-2); }
.btn--light { background: #fff; color: var(--ocean); border-color: #fff; }
.btn--light:hover { background: var(--ivory); color: var(--ocean); }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn--ghost-dark { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn--ghost-dark:hover { border-color: var(--ocean); background: var(--paper); color: var(--ocean); }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: .9em; }
.linkbtn { background: none; border: 0; color: var(--ocean); text-decoration: underline; cursor: pointer; min-height: 44px; }
.more { display: inline-block; margin-top: .6em; color: var(--ocean); font-weight: 600; font-size: .92em; }
.more::after { content: " →"; transition: margin .25s; }
a:hover .more::after { margin-left: .25em; }

/* 頂部列 */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 10px var(--gutter); background: rgba(248, 247, 244, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.brand { display: flex; align-items: baseline; gap: .45em; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.05em; min-height: 44px; align-items: center; }
.brand small { color: var(--terracotta); font-family: var(--sans); font-size: .7em; letter-spacing: .12em; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--gold), var(--terracotta)); }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .92em; }
.topnav a[aria-current="page"], .topnav a:hover { background: var(--soft); }
.fontsize { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.fontsize button { border: 0; background: none; min-width: 44px; min-height: 40px; cursor: pointer; color: var(--ink); font-size: 15px; }
.fontsize button[aria-pressed="true"] { background: var(--ocean); color: #fff; }
.fontsize sup { font-size: .65em; }

/* 手機底部導覽 */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; min-height: 60px; text-decoration: none; color: var(--slate); font-size: 13px; }
.bottomnav a[aria-current="page"] { color: var(--ocean); font-weight: 700; }
.ico { width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.ico-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z'/%3E%3C/svg%3E"); }
.ico-today { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3Ccircle cx='12' cy='15' r='1.8' fill='black'/%3E%3C/svg%3E"); }
.ico-days { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12'/%3E%3Ccircle cx='4' cy='6' r='1.2' fill='black'/%3E%3Ccircle cx='4' cy='12' r='1.2' fill='black'/%3E%3Ccircle cx='4' cy='18' r='1.2' fill='black'/%3E%3C/svg%3E"); }
.ico-stories { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10 4.8 7 4.5 3.5 5v13.5c3.5-.5 6.5-.2 8.5 1.5 2-1.7 5-2 8.5-1.5V5C17 4.5 14 4.8 12 6.5zM12 6.5V20'/%3E%3C/svg%3E"); }
.ico-info { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 11v5.5'/%3E%3Ccircle cx='12' cy='7.8' r='1' fill='black'/%3E%3C/svg%3E"); }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  .fontsize { margin-left: 8px; }
}

.preview-bar { background: var(--warn); color: #fff; text-align: center; padding: 8px 16px; font-size: .9em; }
.preview-bar a { color: #fff; margin-left: 1em; }

/* Hero */
.hero { position: relative; min-height: min(92svh, 860px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--ocean); }
.hero--plain { background: linear-gradient(160deg, var(--ocean) 0%, #0E2A3A 100%); }
.hero-media { position: absolute; inset: -6% 0 0; will-change: transform; }
.hero-media img, .dayhero-media img, .placehero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-img { animation: heroIn 1.8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes heroIn { from { transform: scale(1.06); opacity: .4; } to { transform: none; opacity: 1; } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 28, .15) 0%, rgba(10, 20, 28, .05) 35%, rgba(10, 20, 28, .72) 100%); }
.hero-text { position: relative; padding: 0 var(--gutter) clamp(64px, 12vh, 120px); max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero .eyebrow { color: #F1E3D3; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .4em 1.4em; margin: 1.2em 0 1.6em; font-size: 1.02em; color: rgba(255, 255, 255, .92); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-credit { position: absolute; right: 12px; bottom: 8px; margin: 0; font-size: 11px; color: rgba(255, 255, 255, .7); max-width: 60%; text-align: right; line-height: 1.4; }
.scroll-hint { position: absolute; left: 50%; bottom: 18px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: hint 2.2s ease-in-out infinite; }
@keyframes hint { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0; } }

/* 概覽 */
.overview { padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(40px, 6vw, 80px); }
.overview .lead { max-width: 40em; }
.stats { list-style: none; padding: 0; margin: 2.4em 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.stats li { background: var(--paper); padding: 22px 20px; }
.stats strong { display: block; font-family: var(--serif); font-size: 2.1em; font-weight: 600; color: var(--ocean); line-height: 1.2; }
.stats small { font-family: var(--sans); font-size: .42em; color: var(--slate); margin: 0 .3em 0 .15em; font-weight: 500; }
.stats span { color: var(--slate); font-size: .9em; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* 八天卡片：手機橫向滑動，桌機格狀 */
.days-section { padding: clamp(40px, 6vw, 80px) 0; }
.daycards { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 20px; scrollbar-width: none; }
.daycards::-webkit-scrollbar { display: none; }
.daycard { scroll-snap-align: center; }
.daycard-link { display: flex; flex-direction: column; height: 100%; background: var(--paper); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.daycard-link:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(20, 30, 40, .05), 0 18px 40px rgba(20, 30, 40, .1); color: var(--ink); }
.daycard-media { aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; }
.daycard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.daycard-link:hover .daycard-media img { transform: scale(1.04); }
.daycard-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.daycard-day { margin: 0; font-size: .78em; letter-spacing: .16em; color: var(--terracotta); font-weight: 700; display: flex; justify-content: space-between; gap: 1em; }
.daycard-day span { letter-spacing: .02em; color: var(--slate); font-weight: 500; }
.daycard h3 { font-family: var(--serif); font-weight: 600; font-size: 1.28em; line-height: 1.4; margin: .35em 0 .2em; }
.daycard-theme { margin: 0 0 .8em; color: var(--slate); font-size: .9em; }
.daycard-line { margin: .2em 0; font-size: .9em; line-height: 1.6; }
.daycard-line span { display: inline-block; min-width: 2.6em; color: var(--terracotta); font-size: .85em; font-weight: 700; }
.daycard .more { margin-top: auto; padding-top: .8em; }
@media (min-width: 700px) { .daycards { grid-auto-columns: 46%; } }
@media (min-width: 1000px) {
  .daycards { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; max-width: var(--maxw); margin: 0 auto; padding: 4px var(--gutter) 0; }
}

/* 照片待補充 */
.ph { width: 100%; height: 100%; min-height: 160px; display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--soft) 0 14px, #F4F2ED 14px 28px); color: var(--slate); font-size: .85em; }
.ph span { background: rgba(255, 255, 255, .85); padding: 4px 12px; border-radius: 999px; }
.ph--wide { min-height: 220px; border-radius: var(--radius); }
.ph--sm { min-height: 0; aspect-ratio: 1; border-radius: 12px; }

/* 時間軸 */
.timeline-section { padding: clamp(40px, 6vw, 80px) var(--gutter); }
.daytabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); scrollbar-width: none; }
.daytabs::-webkit-scrollbar { display: none; }
.daytabs button { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 56px; padding: 8px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: all .25s; }
.daytabs button[aria-selected="true"] { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.dt-day { font-weight: 700; font-size: .85em; letter-spacing: .08em; }
.dt-date { font-size: .78em; opacity: .85; }
.daypanel { background: var(--paper); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow); margin-top: 12px; animation: fadeUp .45s ease both; }
.js .daypanel[hidden] { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tl { list-style: none; padding: 0; margin: 0 0 1.4em; }
.tl-item { display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--soft); }
.tl-item:last-child { border-bottom: 0; }
.tl-time { color: var(--terracotta); font-weight: 600; font-variant-numeric: tabular-nums; font-size: .92em; }
.tl-body a { font-weight: 600; }
.is-cancelled .tl-body, .is-cancelled .vtl-title { text-decoration: line-through; opacity: .6; }

/* 狀態標籤 */
.badge { display: inline-block; font-size: .72em; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: .5em; vertical-align: .15em; letter-spacing: .04em; }
.badge--pending { background: #FBF0DC; color: var(--warn); }
.badge--planning { background: var(--soft); color: var(--slate); }
.badge--confirmed { background: #E2EFE8; color: var(--ok); }
.badge--booked { background: var(--ok); color: #fff; }
.badge--cancelled { background: #F6E1DD; color: var(--danger); }
.badge--changed { background: #E3ECF2; color: var(--ocean); }
.badge-note { display: block; font-size: .82em; color: var(--warn); margin-top: .2em; }

/* 故事卡 */
.stories-section { padding: clamp(40px, 6vw, 80px) 0; background: #F1EEE8; }
.storycards { display: grid; grid-auto-flow: column; grid-auto-columns: 70%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 20px; scrollbar-width: none; }
.storycards::-webkit-scrollbar { display: none; }
.storycard { scroll-snap-align: start; text-decoration: none; color: var(--ink); }
.storycard-media { aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.storycard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.storycard:hover img { transform: scale(1.04); }
.storycard h3 { font-family: var(--serif); font-weight: 600; font-size: 1.15em; margin: .8em 0 .3em; line-height: 1.45; }
.storycard p { margin: 0; color: var(--slate); font-size: .9em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 700px) { .storycards { grid-auto-columns: 40%; } }
@media (min-width: 1000px) { .storycards { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; max-width: var(--maxw); margin: 0 auto; } }

/* 餐飲 */
.dining-section { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }
.dining { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.dining a { text-decoration: none; color: var(--ink); display: block; }
.dining-media { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.dining-media img { width: 100%; height: 100%; object-fit: cover; }
.dining h3 { font-family: var(--serif); font-weight: 600; font-size: 1.15em; margin: .7em 0 .1em; }
.dining p { margin: .1em 0; }
@media (min-width: 700px) { .dining { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .dining { grid-template-columns: repeat(3, 1fr); } }

.split { display: grid; gap: 16px; padding-bottom: clamp(40px, 6vw, 80px); }
.panel-link { display: block; background: var(--paper); border-radius: var(--radius); padding: 28px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .35s; }
.panel-link:hover { transform: translateY(-3px); color: var(--ink); }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; } }

.closing { background: var(--ocean); color: #fff; text-align: center; padding: clamp(80px, 14vw, 160px) var(--gutter); }
.closing-text { font-family: var(--serif); font-size: clamp(1.4rem, 3.4vw, 2.3rem); line-height: 1.8; letter-spacing: .08em; margin: 0; }

/* 每日頁 */
.daystrip { display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 60px; z-index: 20; }
.daystrip::-webkit-scrollbar { display: none; }
.daystrip a { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 76px; min-height: 52px; padding: 6px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: .8em; font-weight: 700; }
.daystrip a small { font-weight: 400; color: var(--slate); font-size: .9em; }
.daystrip a[aria-current="page"] { background: var(--ocean); color: #fff; }
.daystrip a[aria-current="page"] small { color: rgba(255, 255, 255, .85); }
.dayhero, .placehero { position: relative; min-height: 46svh; display: flex; align-items: flex-end; color: #fff; background: var(--ocean); overflow: hidden; }
.dayhero--plain, .placehero--plain { min-height: 0; padding-top: 48px; background: linear-gradient(160deg, var(--ocean), #0E2A3A); }
.dayhero-media, .placehero-media { position: absolute; inset: 0; }
.dayhero-text, .placehero-text { position: relative; padding-top: 32px; padding-bottom: 36px; width: 100%; }
.dayhero .eyebrow, .placehero .eyebrow { color: #F1E3D3; }
.dayhero-theme { margin: 0; color: rgba(255, 255, 255, .9); }
.placehero-en { margin: 0; color: rgba(255, 255, 255, .85); letter-spacing: .04em; }
.backlink { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration: none; background: rgba(0, 0, 0, .28); padding: 6px 16px; border-radius: 999px; margin-bottom: 14px; font-size: .9em; }
.backlink:hover { color: #fff; background: rgba(0, 0, 0, .4); }

.day-layout, .place-layout { display: grid; gap: 32px; padding-top: 36px; padding-bottom: 48px; }
@media (min-width: 1000px) { .day-layout, .place-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; } .day-aside, .place-aside { position: sticky; top: 140px; align-self: start; } }

.vtl { list-style: none; padding: 0; margin: 0; position: relative; }
.vtl::before { content: ""; position: absolute; left: 4.6em; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.vtl-item { display: grid; grid-template-columns: 4.2em 1fr; gap: 1.4em; padding: 0 0 22px; position: relative; scroll-margin-top: 150px; }
.vtl-item::before { content: ""; position: absolute; left: calc(4.6em - 5px); top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 2px solid var(--terracotta); }
.vtl--meal::before { background: var(--terracotta); }
.vtl--transport::before { border-color: var(--ocean); }
.vtl-time { font-weight: 700; color: var(--terracotta); font-size: .82em; line-height: 1.5; padding-top: 6px; font-variant-numeric: tabular-nums; word-break: keep-all; }
.vtl-card { background: var(--paper); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.is-highlight .vtl-card { box-shadow: inset 3px 0 0 var(--gold), var(--shadow); }
.vtl-media { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.vtl-media img { width: 100%; height: 100%; object-fit: cover; }
.vtl-type { margin: 0; font-size: .72em; letter-spacing: .16em; color: var(--slate); font-weight: 700; }
.vtl-title { font-family: var(--serif); font-weight: 600; font-size: 1.18em; line-height: 1.45; margin: .1em 0 .2em; }
.vtl-title a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 1px no-repeat; }
.vtl-badges { margin: 0 0 .4em; }
.vtl-badges .badge { margin-left: 0; margin-right: .4em; }
.vtl-body p { margin: .4em 0; }
.vtl-meta { font-size: .9em; }
.vtl-meta span { display: inline-block; min-width: 3em; color: var(--slate); font-size: .9em; }
.vtl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .8em !important; }
@media (min-width: 700px) { .vtl-card { grid-template-columns: 200px 1fr; } .vtl-card > .vtl-body:only-child { grid-column: 1 / -1; } .vtl-media { aspect-ratio: 4 / 3; } }

.placelist { list-style: none; padding: 0; margin: 0 0 16px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.placelist li + li { border-top: 1px solid var(--soft); }
.placelist a { display: flex; flex-direction: column; padding: 12px 18px; text-decoration: none; color: var(--ink); min-height: 56px; justify-content: center; }
.placelist a:hover { background: var(--ivory); }
.pl-name { font-weight: 600; }
.pl-cat { font-size: .78em; color: var(--slate); }
.daynav { display: flex; justify-content: space-between; padding-bottom: 48px; }

/* 景點頁 */
.visits { list-style: none; padding: 0; margin: 0 0 1.2em; display: flex; flex-wrap: wrap; gap: 8px; }
.visits a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-size: .86em; color: var(--ink); }
.intro .lead { font-size: 1.12em; }
.story { margin-top: 2.4em; }
.story-head { border-top: 1px solid var(--line); padding-top: 2em; }
.factcheck { display: inline-block; font-size: .78em; padding: 3px 12px; border-radius: 999px; background: var(--soft); color: var(--slate); }
.factcheck--needs_review, .factcheck--insufficient { background: #FBF0DC; color: var(--warn); }
.factcheck--approved { background: #E2EFE8; color: var(--ok); }
.audio-ctl { margin: 1.4em 0 2em; padding: 18px 20px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.audio-label { margin: 0 0 .6em; font-size: .9em; color: var(--slate); }
.story-body { font-size: 1.04em; }
.chapter { margin: 2.2em 0; }
.chapter p { margin: 0 0 1.1em; line-height: 1.95; }
.kind { display: inline-block; font-size: .78em; font-weight: 700; padding: 3px 12px; border-radius: 999px; margin: 0 0 .8em; }
.kind--legend { background: #F5E9E2; color: #7E4A35; }
.kind--interpretation { background: #E3ECF2; color: var(--ocean); }
.chapter--legend, .chapter--interpretation { padding-left: 18px; border-left: 3px solid var(--line); }
.chapter--legend { border-left-color: #E3C7B9; }
.chapter--interpretation { border-left-color: #BCD0DE; }
.s { transition: background .3s, color .3s; border-radius: 4px; }
.s.is-reading { background: #F8E9C9; box-shadow: 0 0 0 3px #F8E9C9; color: #1A1A1A; }
.sources, .credits { margin: 2em 0; background: var(--paper); border-radius: 14px; padding: 4px 18px; box-shadow: var(--shadow); }
.sources summary, .credits summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; }
.sources ol, .credits ul { margin: 0 0 1em; padding-left: 1.4em; font-size: .88em; line-height: 1.7; word-break: break-word; }
.story--empty { background: var(--paper); border-radius: 16px; padding: 24px; }

.gallery { margin-top: 2.4em; }
.gallery-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery-grid li:first-child { grid-column: 1 / -1; }
.gallery-item { display: block; width: 100%; padding: 0; border: 0; background: var(--soft); border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery-grid li:first-child .gallery-item { aspect-ratio: 16 / 9; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.gallery-item:hover img { transform: scale(1.03); }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--paper); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: 5.4em 1fr; gap: 8px 12px; margin: 0 0 1em; font-size: .92em; }
.facts dt { color: var(--slate); }
.facts dd { margin: 0; word-break: break-word; }
.navbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.backdays { display: flex; flex-wrap: wrap; gap: 8px; }

/* 燈箱 */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 16, 20, .94); display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; animation: fadeUp .25s ease both; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100svh; padding: 56px 0 24px; touch-action: pan-y; }
.lightbox img { max-height: 78svh; width: auto; max-width: 100%; border-radius: 8px; }
.lightbox figcaption { color: rgba(255, 255, 255, .85); font-size: .85em; text-align: center; padding: 0 8px; }
.lightbox button { background: rgba(255, 255, 255, .1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; line-height: 1; }
.lb-close { position: absolute; top: 12px; right: 12px; }
.lb-prev { grid-column: 1; justify-self: center; }
.lb-next { grid-column: 3; justify-self: center; }

/* 固定語音播放器 */
.player { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 45; background: rgba(21, 59, 80, .97); color: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadeUp .3s ease both; }
.player[hidden] { display: none; }
@media (min-width: 900px) { .player { left: auto; right: 24px; bottom: 24px; width: 440px; } }
.pl-title { font-size: .86em; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.pl-row { display: flex; align-items: center; gap: 6px; }
.pl-row button, .pl-row select { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; font-size: 15px; }
.pl-row select { padding: 0 6px; }
.pl-row .pl-main { min-width: 52px; min-height: 52px; border-radius: 50%; background: #fff; color: var(--ocean); font-size: 20px; }
.pl-progress { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-progress input[type="range"] { width: 100%; accent-color: var(--gold); min-height: 28px; }
.pl-times { display: flex; justify-content: space-between; font-size: 11px; opacity: .8; font-variant-numeric: tabular-nums; }
.pl-vol { width: 80px; accent-color: var(--gold); }
.pl-close { margin-left: auto; }
.pl-msg { font-size: .8em; margin: 6px 0 0; color: #FCE6C4; }
.pl-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; margin-right: 6px; vertical-align: -2px; }
.pl-bars i { width: 3px; background: var(--gold); border-radius: 1px; height: 4px; }
.is-playing .pl-bars i { animation: bars 1s ease-in-out infinite; }
.is-playing .pl-bars i:nth-child(2) { animation-delay: .2s; }
.is-playing .pl-bars i:nth-child(3) { animation-delay: .4s; }
@keyframes bars { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* 其他頁 */
.pagehead { padding-top: clamp(40px, 7vw, 88px); padding-bottom: 16px; }
.storygroup { margin: 2em 0; }
.storygroup-note { margin: -.2em 0 1em; color: var(--slate); font-size: .95em; line-height: 1.75; }
.storylist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.storylist a { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; background: var(--paper); border-radius: 14px; padding: 10px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); min-height: 96px; }
.storylist h3 { font-family: var(--serif); font-weight: 600; font-size: 1.02em; margin: 0; line-height: 1.45; }
.storylist p { margin: .2em 0 0; }
.sl-media { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; }
.sl-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 800px) { .storylist { grid-template-columns: 1fr 1fr; } }
.mapfig { margin: 0 0 24px; }
.mapfig figcaption { font-size: .85em; color: var(--slate); margin-top: 6px; }
.mapsvg { width: 100%; height: auto; display: block; }
.map-bg { fill: #E7EEF1; }
.map-pin circle { fill: var(--ocean); stroke: #fff; stroke-width: 3; }
.map-pin--restaurant circle, .map-pin--shop circle { fill: var(--terracotta); }
.map-pin text { fill: #fff; font: 700 16px var(--sans); }
.map-pin:hover circle { fill: var(--ocean-2); }
.maplist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.maplist li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--paper); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.maplist-n { width: 32px; height: 32px; border-radius: 50%; background: var(--ocean); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85em; }
.maplist a { font-weight: 600; }
.maplist .small { display: block; }
.maplist .navbtns { margin-top: 6px; }
@media (min-width: 800px) { .maplist { grid-template-columns: 1fr 1fr; } }
.infolist .card p { margin: .5em 0; }
.changes { list-style: none; padding: 0; }
.message { padding-top: 15vh; padding-bottom: 15vh; }
.footer { text-align: center; padding: 40px var(--gutter) 32px; color: var(--slate); font-size: .86em; border-top: 1px solid var(--line); }
.footer p { margin: .3em 0; }

/* 密碼頁 */
.bare { padding-bottom: 0; background: linear-gradient(160deg, #F8F7F4 0%, #EFE9E0 100%); }
.gate { min-height: 100svh; display: grid; place-items: center; padding: 24px var(--gutter); }
.gate-card { width: 100%; max-width: 440px; background: var(--paper); border-radius: 24px; padding: clamp(28px, 6vw, 44px); box-shadow: 0 20px 60px rgba(20, 30, 40, .1); }
.gate-card .display { font-size: clamp(1.8rem, 6vw, 2.4rem); color: var(--ocean); margin-bottom: .5em; }
.gate-form { display: grid; gap: 10px; margin-top: 1.4em; }
.gate-form label { font-weight: 600; }
.gate-form input { font: inherit; min-height: 54px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--ivory); font-size: 1.1em; }
.gate-form input:focus { outline: 3px solid rgba(21, 59, 80, .25); border-color: var(--ocean); }
.form-error { color: var(--danger); margin: 0; font-weight: 600; }

/* 進場動畫：只有 JS 開啟且使用者沒關掉動態時才藏起來 */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .topbar, .bottomnav, .player, .audio-ctl, .daystrip, .hero-cta, .scroll-hint, .footer form { display: none !important; }
  body { background: #fff; padding: 0; }
}
