/*
 * 宜蘭旅遊景點網｜2026-11-24 美編改版
 * 原則：首頁規劃區是唯一的深色重點（水田亮燈），其餘頁面用明亮紙面，提高可讀性
 * 色票：晨霧白 paper、稻墨 ink、秧綠 paddy、稻穗黃 grain（只標示「已選／本月」）、龜山藍 sea（交通與資訊）、田土 soil（次要文字）
 */
:root {
    --paper: #f5f8f1;
    --surface: #ffffff;
    --ink: #14332a;
    --ink-deep: #0d241d;
    --text: #22382e;
    --paddy: #2f7d4a;
    --paddy-dark: #22603a;
    --sprout: #c8e27c;
    --grain: #f2c230;
    --sea: #2d5f73;
    --soil: #6b5843;
    --mist: #ebf2e4;
    --line: #d8e2d0;
    --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
    --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, ul, ol, dl, dd, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
:focus-visible { outline: 3px solid var(--grain); outline-offset: 2px; }

/* 標題：思源宋體，帶出刊物感 */
h1, .section-title, .trip h2, .months h2, .stay h2, .topics h2, .routes h2, .zone h2, .topic-end h2,
.month-main h2, .spot-section h2, .info-card h2, .near-card h2, .stay-card h2, .sitemap-grid h2 {
    font-family: var(--serif);
    color: var(--ink);
    letter-spacing: .03em;
}

.wrap { width: min(1320px, 100% - 48px); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 40; padding: 8px 16px; background: var(--grain); color: var(--ink-deep); }
.skip-link:focus { top: 8px; }

/* 頁首：明亮、半透明 */
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(245, 248, 241, .94); color: var(--ink); backdrop-filter: saturate(1.2) blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; font-weight: 900; letter-spacing: .06em; text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 6px 14px; border-radius: 99px; font-size: 16px; text-decoration: none; transition: background-color .15s, color .15s; }
.main-nav a:hover { background: var(--mist); color: var(--paddy-dark); }
.main-nav .nav-tel { margin-left: 8px; background: var(--ink); color: #fff; font-weight: 700; }
.main-nav .nav-tel:hover { background: var(--paddy); color: #fff; }
.menu-button { display: none; min-height: 40px; padding: 4px 18px; border: 1px solid var(--ink); border-radius: 99px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.mobile-menu { padding: 6px 24px 22px; border-top: 1px solid var(--line); background: var(--paper); }
.mobile-menu[hidden] { display: none; }
.mobile-menu p { margin-top: 12px; color: var(--soil); font-size: 15px; font-weight: 700; }

/* 膠囊連結（淺色底） */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pills a { padding: 6px 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); text-decoration: none; transition: background-color .15s, border-color .15s; }
.pills a:not([aria-current]):hover { border-color: var(--paddy); background: var(--mist); }
.pills a[aria-current="page"] { border-color: var(--grain); background: var(--grain); color: var(--ink-deep); font-weight: 800; }

.button { display: inline-block; margin-top: 16px; padding: 10px 24px; border-radius: 99px; background: var(--paddy); color: #fff; font-weight: 800; text-decoration: none; transition: background-color .15s, transform .15s; }
.button:hover { background: var(--paddy-dark); }
.button:active { transform: translateY(1px); }
.button-grain { background: var(--grain); color: var(--ink-deep); }
.button-grain:hover { background: #ffd54a; }
.button-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--paddy); }
.button-line:hover { background: var(--mist); }

/* ===== 首頁規劃區：全站唯一的深色重點 ===== */
.planner { padding: 38px 0 42px; background: var(--ink); color: #fff; }
.planner-grid { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 44px; align-items: start; }
.planner h1 { color: #fff; font-size: clamp(36px, 3.5vw, 52px); font-weight: 900; line-height: 1.25; letter-spacing: .04em; }
.planner-lead { margin-top: 14px; color: #d4e4c8; }
#planner { display: grid; gap: 16px; margin-top: 24px; }
legend { padding: 0; margin-bottom: 6px; color: var(--sprout); font-size: 15px; font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: 7px; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choices span { display: block; min-width: 68px; padding: 7px 17px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 99px; text-align: center; transition: background-color .16s, color .16s, border-color .16s; }
.choices label:hover span { border-color: var(--sprout); }
.choices input:checked + span { border-color: var(--grain); background: var(--grain); color: var(--ink-deep); font-weight: 800; }
.choices input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }

.plan-output { min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 62px; grid-auto-flow: dense; gap: 4px; padding: 4px; background: #3f6a4a; }
.plot { position: relative; overflow: hidden; background: var(--ink-deep); cursor: pointer; }
.plot:nth-child(5n+1) { grid-column: span 2; grid-row: span 2; }
.plot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.6); transition: filter .35s var(--ease), transform .35s var(--ease); }
.plot.is-on img { filter: none; }
.plot:hover img { filter: grayscale(.4) brightness(.82); transform: scale(1.03); }
.plot.is-on:hover img { filter: brightness(1.05); }
.plot::after { content: "+"; position: absolute; top: 4px; right: 4px; display: none; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(13, 36, 29, .8); color: #fff; font-size: 18px; font-weight: 800; line-height: 1; }
.plot:hover::after, .plot:focus-visible::after { display: grid; }
.plot.is-on::after { content: "✓"; display: grid; background: var(--grain); color: var(--ink-deep); font-size: 14px; }
.plot:focus-visible { outline: 3px solid var(--grain); outline-offset: -3px; }
/* 名稱一律顯示：沒選的深色半透明底，已選的稻穗黃底 */
.plot .plot-name { position: absolute; left: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 7px; max-width: 100%; padding: 2px 7px; background: rgba(13, 36, 29, .82); color: #e7f0df; font-family: var(--sans); font-size: 13px; font-weight: 700; line-height: 1.35; letter-spacing: 0; transition: background-color .25s, color .25s; }
.plot .plot-name small { display: none; font-size: 13px; font-weight: 400; }
.plot.is-on .plot-name { background: var(--grain); color: var(--ink-deep); font-weight: 800; }
.plan-output .pick-more { display: none; }
html:not(.js) .plot img { filter: none; }

/* 水田亮起：首頁載入與每次改條件時，新亮起的格子依序點亮 */
@keyframes plot-light {
    0% { filter: grayscale(1) brightness(.6); transform: scale(.94); }
    55% { filter: brightness(1.25) saturate(1.15); transform: scale(1.02); }
    100% { filter: none; transform: scale(1); }
}
@keyframes plot-glow {
    0% { box-shadow: inset 0 0 0 0 rgba(242, 194, 48, 0); }
    50% { box-shadow: inset 0 0 0 3px rgba(242, 194, 48, .95); }
    100% { box-shadow: inset 0 0 0 0 rgba(242, 194, 48, 0); }
}
.plot.just-lit { animation: plot-glow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.plot.just-lit img { animation: plot-light .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }

.result { margin-top: 18px; }
.result h2 { color: var(--grain); font-family: var(--serif); font-size: 23px; font-weight: 900; line-height: 1.4; }
#result-list { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 4px; counter-reset: stop; }
#result-list li { color: #fff; font-size: 17px; font-weight: 700; line-height: 1.6; }
#result-list li::before { counter-increment: stop; content: counter(stop) "．"; color: var(--grain); }
.result .button { margin-top: 12px; }
.result .button-line { margin-left: 6px; border: 0; color: #fff; font: inherit; font-weight: 800; box-shadow: inset 0 0 0 2px var(--sprout); cursor: pointer; }
.result .button-line:hover { background: rgba(255, 255, 255, .12); }
.result .button[hidden] { display: none; }
.planner-note { margin-top: 8px; color: #b9cdb0; font-size: 14px; }
html:not(.js) .result { display: none; }

/* ===== 行程表 ===== */
.trip { padding: 48px 0 52px; border-bottom: 1px solid var(--line); background: var(--paper); }
html:not(.js) .trip { display: none; }
.trip-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; }
.trip h2 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 900; line-height: 1.3; }
.trip-summary { margin-top: 2px; color: var(--sea); font-weight: 700; }
.trip-actions { display: flex; gap: 8px; }
.trip-actions .button { margin-top: 0; border: 0; font: inherit; font-weight: 800; cursor: pointer; }
.trip-actions .button[hidden] { display: none; }
.trip-warn { margin-top: 16px; padding: 10px 14px; border-left: 5px solid var(--grain); background: #fff6d2; color: var(--ink-deep); font-weight: 700; }
.trip-warn[hidden] { display: none; }
.trip-days { display: grid; gap: 30px; margin-top: 22px; }
.trip-days.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trip-day h3 { margin: 0 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--paddy), var(--paddy)) left bottom / 48px 3px no-repeat; color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 900; }
.trip-line { display: flex; align-items: stretch; }
.trip-stop { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; }
.trip-time { align-self: flex-start; margin-bottom: 6px; padding: 1px 13px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; }
.trip-card { display: flex; flex: 1; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); transition: border-color .2s; }
.trip-card:hover { border-color: #b7c9ab; }
.trip-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.trip-body { padding: 12px 15px 15px; }
.trip-body h4 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 800; line-height: 1.4; }
.trip-body h4 small { margin-left: 8px; color: var(--soil); font-size: 14px; font-weight: 400; }
.trip-body p { font-size: 16px; line-height: 1.65; }
.trip-body .trip-stay { margin-top: 4px; color: var(--sea); font-size: 15px; font-weight: 700; }
.trip-body .trip-alert { margin-top: 6px; padding-left: 9px; border-left: 3px solid var(--grain); color: var(--soil); font-size: 15px; }
.trip-body .trip-mismatch { border-left-color: #d9822b; }
.trip-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.trip-more { display: inline-block; padding: 3px 15px; border-radius: 99px; background: var(--paddy); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; transition: background-color .15s; }
.trip-more:hover { background: var(--paddy-dark); }
.trip-remove { padding: 3px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--soil); font: inherit; font-size: 15px; cursor: pointer; transition: border-color .15s, color .15s; }
.trip-remove:hover { border-color: #b4482b; color: #b4482b; }
.trip-move, .trip-meal { display: flex; flex: 0 0 118px; flex-direction: column; align-items: center; justify-content: center; padding: 0 10px; font-size: 14px; line-height: 1.5; text-align: center; }
.trip-move { color: var(--sea); }
.trip-move::before { content: "→"; color: var(--sea); font-size: 24px; font-weight: 900; line-height: 1.2; }
.trip-meal { color: var(--ink); font-weight: 700; }
.trip-meal::before { content: ""; width: 26px; height: 4px; margin-bottom: 6px; border-radius: 2px; background: var(--grain); }
.trip-days.is-two .trip-line { flex-direction: column; }
.trip-days.is-two .trip-card { flex-direction: row; }
.trip-days.is-two .trip-card img { flex: 0 0 38%; width: 38%; aspect-ratio: auto; }
.trip-days.is-two .trip-move, .trip-days.is-two .trip-meal { flex: none; flex-direction: row; gap: 8px; justify-content: flex-start; padding: 8px 0 8px 14px; text-align: left; }
.trip-days.is-two .trip-move::before { content: "↓"; font-size: 20px; }
.trip-days.is-two .trip-meal::before { width: 4px; height: 18px; margin: 0 6px 0 4px; }
/* 三天：桌機三欄，卡片改成圖在上 */
.trip-days.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trip-days.is-three .trip-card { flex-direction: column; }
.trip-days.is-three .trip-card img { flex: none; width: 100%; aspect-ratio: 16 / 9; }
.trip-night { margin-top: 12px; padding: 10px 14px; border-radius: 6px; background: var(--ink); color: #fff; }
.trip-night a { color: var(--grain); font-weight: 700; }
.trip-note { margin-top: 18px; color: var(--soil); font-size: 14px; }

/* 行程更新時，各站依序淡入，看得出哪裡變了 */
@keyframes stop-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.trip-enter { animation: stop-in .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* ===== 首頁其他區塊 ===== */
.topics { padding: 26px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.topics-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 40px; align-items: center; }
.topics h2 { font-size: 23px; font-weight: 900; }
.topic-rows { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.topic-rows .switch-row { display: flex; align-items: baseline; gap: 10px; }
.topic-rows h3 { margin: 0; color: var(--sea); font-size: 15px; font-weight: 700; }
.topic-rows .pills { margin-top: 0; gap: 6px; }
.topic-rows .pills a { padding: 3px 15px; background: var(--paper); }

.months { padding: 60px 0; background: var(--mist); }
.months h2, .stay h2 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 900; line-height: 1.3; }
.month-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin-top: 24px; border: 1px solid var(--line); background: var(--line); }
.month-list li { background: var(--surface); line-height: 1.45; }
.month-list a { display: flex; flex-direction: column; height: 100%; min-height: 146px; padding: 14px 16px; text-decoration: none; transition: background-color .15s; }
.month-list a:hover { background: var(--paper); }
.month-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.month-number { color: var(--paddy); font-family: var(--serif); font-size: 36px; font-weight: 900; line-height: 1.1; }
.month-number small { margin-left: 2px; font-size: 15px; font-weight: 700; }
.month-list strong { margin-top: auto; color: var(--ink); font-size: 18px; }
.month-list a > span:last-child { color: var(--soil); font-size: 15px; }
.month-list .is-now, .month-list .is-now a:hover { background: var(--grain); }
.month-list .is-now .month-number, .month-list .is-now a > span:last-child { color: var(--ink-deep); }
.months-note { margin-top: 12px; color: var(--soil); font-size: 15px; }

.stay { padding: 58px 0; background: var(--paper); }
.stay-grid { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.stay-grid p { margin-top: 8px; max-width: 34em; }
.stay-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-left: 4px solid var(--paddy); }
.stay-areas div { padding: 4px 20px; border-right: 1px solid var(--line); }
.stay-areas div:last-child { border-right: 0; }
.stay-areas dt { color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 900; }
.stay-areas dd { color: var(--soil); font-size: 16px; line-height: 1.6; }

/* ===== 內頁主視覺：明亮紙面 ===== */
.topic-hero, .spot-hero { padding: 28px 0 36px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--text); }
.topic-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); gap: 48px; align-items: end; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--soil); font-size: 15px; }
.crumbs a { color: var(--paddy-dark); text-underline-offset: 3px; }
.topic-hero h1 { margin-top: 8px; font-size: clamp(32px, 3.3vw, 48px); font-weight: 900; line-height: 1.25; }
.topic-lead { margin-top: 12px; max-width: 34em; color: var(--text); font-size: 18px; }
.topic-facts { margin-top: 6px; color: var(--sea); font-weight: 700; }
.topic-switch { display: grid; gap: 9px; padding: 16px 18px; border-left: 4px solid var(--paddy); background: var(--paper); }
.topic-switch .switch-row { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.topic-switch h2 { color: var(--sea); font-size: 15px; font-weight: 700; }
.topic-switch .pills { margin-top: 0; gap: 6px; }
.topic-switch .pills a { padding: 3px 15px; font-size: 15px; }

.section-title, .routes h2, .zone h2, .topic-end h2, .month-main h2, .spot-section h2 {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(var(--paddy), var(--paddy)) left bottom / 56px 3px no-repeat;
    font-size: clamp(24px, 2.2vw, 31px);
    font-weight: 900;
    line-height: 1.3;
}
.routes { padding: 38px 0 0; }
.route-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 16px; border: 1px solid var(--line); background: var(--line); }
.route-list li { display: flex; flex-direction: column; padding: 14px 16px; background: var(--surface); line-height: 1.5; }
.route-list strong { color: var(--ink); font-size: 18px; }
.route-list span:nth-child(2) { margin-top: 4px; color: var(--sea); font-weight: 700; }
.route-list span:last-child { color: var(--soil); font-size: 15px; }

.zones { padding: 34px 0 52px; }
.zone + .zone { margin-top: 40px; }
.zone h2 { display: flex; align-items: baseline; gap: 12px; }
.zone h2 small { color: var(--soil); font-family: var(--sans); font-size: 15px; font-weight: 400; letter-spacing: 0; }
.spot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 22px; margin-top: 18px; }
.spot { position: relative; }
.spot img { width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; object-fit: cover; background: var(--mist); transition: transform .35s var(--ease), filter .35s; }
.spot.has-page:hover img { filter: brightness(1.05); transform: translateY(-3px); }
.spot-body { padding-top: 10px; }
.spot h3 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 800; line-height: 1.4; }
.spot h3 a { text-decoration: none; }
.spot h3 a::after { content: ""; position: absolute; inset: 0; }
.spot.has-page:hover h3 a { color: var(--paddy-dark); text-decoration: underline; text-underline-offset: 3px; }
.spot h3 small { margin-left: 8px; color: var(--soil); font-size: 14px; font-weight: 400; }
.spot-body > p { font-size: 16px; line-height: 1.65; }
.spot-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.spot-tags li { padding: 0 10px; border-radius: 99px; background: #e3eef1; color: var(--sea); font-size: 13px; font-weight: 700; line-height: 1.8; }
.spot-body > .spot-note { margin-top: 6px; padding-left: 9px; border-left: 3px solid var(--grain); color: var(--soil); font-size: 15px; }
.spot-more { display: inline-block; margin-top: 8px; padding: 2px 14px; border-radius: 99px; background: var(--paddy); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }

.topic-end { padding: 44px 0 54px; background: var(--mist); }
.topic-end-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); gap: 48px; align-items: start; }
.tips { display: grid; gap: 8px; margin-top: 12px; }
.tips li { position: relative; padding-left: 20px; }
.tips li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 2px; background: var(--paddy); }

/* 住宿卡：深色行動呼籲 */
.stay-card { padding: 22px 24px; border-radius: 6px; background: var(--ink); color: #fff; }
.stay-card h2 { color: #fff; font-size: 23px; font-weight: 900; }
.topic-end .stay-card h2 { padding: 0; border: 0; background: none; }
.stay-card p { margin-top: 6px; color: #d4e4c8; }
.stay-card p + p { margin-top: 4px; }
.stay-card .button { background: var(--grain); color: var(--ink-deep); }
.stay-card .button:hover { background: #ffd54a; }

/* 月份頁 */
.month-hero-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 30px; align-items: center; margin-top: 10px; }
.month-big { color: var(--paddy); font-family: var(--serif); font-size: clamp(88px, 9vw, 136px); font-weight: 900; line-height: .9; letter-spacing: -.02em; }
.month-big small { margin-left: 4px; color: var(--ink); font-size: .3em; letter-spacing: 0; }
.month-hero h1 { margin-top: 0; }
.month-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.month-strip a { flex: none; padding: 3px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 15px; white-space: nowrap; text-decoration: none; transition: border-color .15s, background-color .15s; }
.month-strip a:not([aria-current]):hover { border-color: var(--paddy); background: var(--mist); }
.month-strip a[aria-current="page"] { border-color: var(--grain); background: var(--grain); color: var(--ink-deep); font-weight: 800; }
.now-mark { margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--paddy); color: #fff; font-size: 12px; font-weight: 700; }
.month-main { padding: 38px 0 6px; }
.month-main-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); gap: 48px; align-items: start; }
.month-main .stay-card h2 { padding: 0; border: 0; background: none; font-size: 23px; }
.month-more { padding: 38px 0 54px; }
.month-more-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); gap: 48px; align-items: start; }
.month-more .spot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.month-more .topic-rows { margin-top: 14px; }
.month-side { display: grid; gap: 16px; }
.month-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.month-pager a { display: flex; flex-direction: column; padding: 14px 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 18px; font-weight: 800; text-decoration: none; transition: border-color .15s; }
.month-pager a:hover { border-color: var(--paddy); }
.month-pager a:last-child { text-align: right; }
.month-pager small { color: var(--sea); font-size: 14px; font-weight: 700; }

/* 景點介紹頁 */
.spot-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: center; margin-top: 14px; }
.spot-town { color: var(--sea); font-weight: 700; }
.spot-hero h1 { font-size: clamp(36px, 3.8vw, 56px); font-weight: 900; line-height: 1.2; }
.spot-lead { margin-top: 14px; color: var(--text); font-size: 18px; }
.spot-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.spot-chips li { padding: 3px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 15px; }
.spot-chips li:first-child { border-color: var(--grain); background: var(--grain); color: var(--ink-deep); font-weight: 800; }
.spot-alert { margin-top: 16px; padding: 9px 13px; border-left: 4px solid var(--grain); background: #fff6d2; color: var(--ink-deep); font-size: 15px; }
.gallery { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 5px; overflow: hidden; border-radius: 8px; aspect-ratio: 16 / 9; }
.gallery-item { display: block; overflow: hidden; background: var(--ink-deep); }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery[data-count="1"] .gallery-item { grid-column: 1 / -1; grid-row: 1 / -1; }
.gallery[data-count="2"] .gallery-item, .gallery[data-count="3"] .gallery-item:not(:first-child) { grid-column: span 2; }
.gallery[data-count="2"] .gallery-item { grid-row: span 2; }
.gallery-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 11px; border-radius: 99px; background: rgba(13, 36, 29, .82); color: #fff; font-size: 13px; pointer-events: none; }

.spot-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); gap: 52px; align-items: start; padding: 40px 0 54px; }
.spot-section + .spot-section { margin-top: 40px; }
.spot-section > p { margin-top: 14px; max-width: 38em; }
.highlight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin-top: 16px; }
.highlight-grid li { padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid var(--paddy); border-radius: 0 6px 6px 0; background: var(--surface); }
.highlight-grid h3 { margin: 0; color: var(--ink); font-size: 18px; font-weight: 800; }
.highlight-grid p { margin-top: 4px; font-size: 16px; line-height: 1.7; }
.spot-dl { display: grid; gap: 12px; margin: 16px 0 0; }
.spot-dl div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
.spot-dl dt { color: var(--sea); font-weight: 800; }
.spot-dl dd { margin: 0; }
.spot-section .tips { margin-top: 14px; }
.faq { display: grid; gap: 8px; margin-top: 16px; }
.faq details { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.faq summary { position: relative; padding: 12px 44px 12px 16px; color: var(--ink); font-weight: 800; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; top: 50%; right: 16px; color: var(--paddy); font-size: 22px; font-weight: 700; line-height: 1; transform: translateY(-50%); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding: 12px 16px 14px; }
.faq details[open] p { animation: stop-in .3s var(--ease) both; }
.spot-aside { position: sticky; top: 84px; display: grid; gap: 18px; }
.info-card { padding: 20px 22px 22px; border: 1px solid var(--line); border-top: 4px solid var(--paddy); border-radius: 6px; background: var(--surface); }
.info-card h2, .near-card h2 { font-size: 22px; font-weight: 900; }
.info-card dl { display: grid; gap: 9px; margin: 12px 0 0; }
.info-card dl div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.65; }
.info-card dt { color: var(--sea); font-weight: 700; }
.info-card dd { margin: 0; }
.info-link { display: block; margin-top: 10px; color: var(--paddy-dark); font-size: 15px; text-underline-offset: 3px; }
.info-checked { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--soil); font-size: 13px; }
.near-card { padding: 18px 22px; border-radius: 6px; background: var(--mist); }
.near-card ul { display: grid; gap: 10px; margin-top: 8px; }
.near-card li { display: flex; flex-direction: column; line-height: 1.5; }
.near-card a { color: var(--paddy-dark); font-weight: 800; text-underline-offset: 3px; }
.near-card strong { color: var(--ink); }
.near-card span { color: var(--soil); font-size: 14px; }
.near-card .near-all { display: inline-block; margin-top: 12px; color: var(--paddy-dark); font-weight: 700; text-underline-offset: 3px; }

.viewer { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 20, 15, .96); color: #fff; }
.viewer[open] { animation: viewer-in .25s var(--ease) both; }
@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }
.viewer::backdrop { background: rgba(8, 20, 15, .9); }
.viewer figure { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; margin: 0; padding: 48px 64px 20px; }
.viewer img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.viewer figcaption { margin-top: 10px; font-size: 15px; }
.viewer button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background-color .15s; }
.viewer button:hover { background: var(--grain); color: var(--ink-deep); }
.viewer-close { top: 12px; right: 12px; }
.viewer-prev { top: 50%; left: 12px; transform: translateY(-50%); }
.viewer-next { top: 50%; right: 12px; transform: translateY(-50%); }

.error-hero { display: flex; align-items: center; min-height: calc(100vh - 64px - 220px); }
.error-hero .wrap { width: min(1320px, 100% - 48px); }
.sitemap-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px 32px; padding: 38px 0 54px; }
.sitemap-grid h2 { padding-bottom: 6px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--paddy), var(--paddy)) left bottom / 40px 3px no-repeat; font-size: 20px; font-weight: 900; }
.sitemap-grid ul { display: grid; gap: 4px; margin-top: 10px; }
.sitemap-grid a { text-underline-offset: 3px; }
.sitemap-grid a:hover { color: var(--paddy-dark); }
.sitemap-wide { grid-column: 1 / -1; }
.sitemap-wide ul { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px 24px; }

/* 首頁常見問題 */
.home-faq { padding: 56px 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.home-faq-grid { display: grid; grid-template-columns: minmax(260px, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.home-faq .section-title { font-size: clamp(28px, 2.6vw, 38px); }
.home-faq-lead { margin-top: 14px; color: var(--soil); }
.home-faq .faq { margin-top: 0; }
.home-faq .faq a { color: var(--paddy-dark); font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }

/* 頁尾 */
.site-footer { background: var(--ink-deep); color: #dfe9d8; font-size: 15px; }
.site-footer .brand { color: #fff; }
.footer-main { display: grid; grid-template-columns: minmax(280px, 4fr) minmax(0, 8fr); gap: 48px; padding: 40px 0 28px; }
.footer-brand p { margin-top: 8px; max-width: 32em; }
.footer-rows { display: grid; gap: 12px; align-content: start; }
.footer-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.footer-row h2 { color: var(--sprout); font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.footer-row ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14px; }
.go-top { position: fixed; right: 18px; bottom: 18px; z-index: 25; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 4px 14px rgba(13, 36, 29, .28); transition: background-color .15s, transform .15s; }
.go-top:hover { background: var(--paddy); transform: translateY(-2px); }
.go-top[hidden] { display: none; }

@media (max-width: 1040px) {
    .planner-grid { grid-template-columns: 1fr; gap: 18px; }
    .plan-output { display: flex; flex-direction: column; }
    .result { order: -1; margin: 0 0 14px; padding: 12px 14px; border-left: 5px solid var(--grain); background: var(--ink-deep); }
    .month-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stay-grid, .footer-main { grid-template-columns: 1fr; gap: 26px; }
    .topics-grid, .topic-hero-grid, .topic-end-grid, .month-main-grid, .month-more-grid, .home-faq-grid { grid-template-columns: 1fr; gap: 18px; }
    .trip-days.is-two { grid-template-columns: 1fr; }
    .trip-days.is-three .trip-card { flex-direction: row; }
    .trip-days.is-three .trip-card img { flex: 0 0 38%; width: 38%; aspect-ratio: auto; }
    .spot-hero-grid, .spot-layout { grid-template-columns: 1fr; gap: 22px; }
    .spot-aside { position: static; }
    .main-nav .nav-tel { display: none; }
    .main-nav a { padding-inline: 11px; }
    .spot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sitemap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sitemap-wide ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .route-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    body { font-size: 16px; }
    .wrap { width: calc(100% - 32px); }
    .main-nav { display: none; }
    .menu-button { display: block; }
    .brand { font-size: 19px; }
    .planner { padding-top: 24px; }
    #planner { gap: 9px; margin-top: 14px; }
    legend { margin-bottom: 3px; }
    .choices span { min-width: 62px; padding: 6px 13px; }
    .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 122px; }
    .plot:nth-child(5n+1) { grid-column: auto; grid-row: auto; }
    .js .fields:not(.is-all) .plot:not(.is-on) { display: none; }
    .js .plan-output .pick-more { display: block; width: 100%; margin-top: 10px; border: 0; color: #fff; font: inherit; font-weight: 800; box-shadow: inset 0 0 0 2px var(--sprout); cursor: pointer; }
    .plot:hover img { filter: grayscale(1) brightness(.6); transform: none; }
    .plot.is-on:hover img { filter: none; }
    .plot.is-wide:nth-child(n) { grid-column: span 2; }
    .plot .plot-name { padding: 3px 8px; font-size: 14px; }
    .plot .plot-name small { display: inline; }
    .month-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .month-list a { min-height: 118px; }
    .topic-lead, .spot-lead { font-size: 16px; }
    .gallery { margin-inline: -16px; border-radius: 0; aspect-ratio: 4 / 3; }
    .highlight-grid { grid-template-columns: 1fr; }
    .spot-dl div { grid-template-columns: 1fr; gap: 0; }
    .viewer figure { padding: 56px 8px 16px; }
    .viewer-prev, .viewer-next { top: auto; bottom: 14px; transform: none; }
    .trip { padding: 32px 0 36px; }
    .trip-actions { flex-wrap: wrap; width: 100%; }
    .trip-actions .button { flex: 1; padding-inline: 12px; }
    .trip-line { flex-direction: column; }
    .trip-card, .trip-days.is-two .trip-card { flex-direction: row; }
    .trip-card img, .trip-days.is-two .trip-card img { flex: 0 0 36%; width: 36%; aspect-ratio: auto; }
    .trip-body { padding: 8px 10px 10px; }
    .trip-body h4 { font-size: 17px; }
    .trip-body h4 small { display: block; margin-left: 0; }
    .trip-body p { font-size: 15px; }
    .trip-move, .trip-meal { flex: none; flex-direction: row; gap: 8px; justify-content: flex-start; padding: 8px 0 8px 14px; text-align: left; }
    .trip-move::before { content: "↓"; font-size: 20px; }
    .trip-meal::before { width: 4px; height: 18px; margin: 0 6px 0 4px; }
    .month-hero-grid { grid-template-columns: 1fr; gap: 4px; }
    .month-big { font-size: 64px; }
    .month-strip { flex-wrap: nowrap; margin-inline: -16px; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; }
    .month-strip::-webkit-scrollbar { display: none; }
    .month-pager a { padding: 10px 12px; font-size: 16px; }
    .stay-areas { grid-template-columns: 1fr; gap: 10px; }
    .stay-areas div { border-right: 0; }
    .footer-row { grid-template-columns: 1fr; gap: 2px; }
    .topic-rows { gap: 8px; }
    .topic-hero, .spot-hero { padding-top: 18px; }
    .topic-switch { display: flex; gap: 6px; margin-inline: -16px; padding: 2px 16px 4px; overflow-x: auto; border: 0; background: none; scrollbar-width: none; }
    .topic-switch::-webkit-scrollbar { display: none; }
    .topic-switch .switch-row, .topic-switch .pills { display: contents; }
    .topic-switch h2 { display: none; }
    .topic-switch .pills a { flex: none; white-space: nowrap; }
    .spot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .spot h3 { font-size: 17px; }
    .spot h3 small { display: block; margin-left: 0; }
    .spot-body > p { font-size: 15px; }
    .route-list { grid-template-columns: 1fr; }
    .sitemap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
    .sitemap-wide ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
    .skip-link, .site-header, .planner, .topics, .home-faq, .months, .stay, .site-footer, .go-top, .trip-actions { display: none !important; }
    body { background: #fff; font-size: 14px; }
    .trip { padding: 0; border: 0; }
    .trip-days.is-two { grid-template-columns: 1fr; }
    .trip-line { flex-direction: column; }
    .trip-card { flex-direction: row; break-inside: avoid; }
    .trip-card img { flex: 0 0 28%; width: 28%; aspect-ratio: auto; }
    .trip-move, .trip-meal { flex: none; flex-direction: row; gap: 8px; justify-content: flex-start; padding: 4px 0 4px 14px; }
    .trip-move::before { content: "↓"; font-size: 16px; }
    .trip-more, .trip-remove, .trip-warn { display: none; }
    .trip-enter { animation: none; }
}

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