/* 單頁官網共用樣式：顏色由資料檔的 brand 帶入（--brand 主色、--brand-ink 字色、--bg 底色、--soft 淡色區塊） */
/* 字體：內文用系統黑體；標題字體（--font-heading）與英文點綴字體（--font-accent）由資料檔的 fonts 帶入，沒填就沿用內文字體 */
*, *::before, *::after { box-sizing: border-box; }
:root { --font-body: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--brand-ink);
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.75; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(64px + env(safe-area-inset-bottom)); /* 手機版底部聯絡列的空間 */
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
:where(a, summary):focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; box-shadow: 0 0 0 5px #fff; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; font-family: var(--font-heading, var(--font-body)); }
.brand span, .footer-name { font-family: var(--font-heading, var(--font-body)); }
.price, .menu-price, .eyebrow, .facts li { font-family: var(--font-accent, var(--font-body)); font-variant-numeric: lining-nums; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
.note { font-size: .92rem; opacity: .78; margin-top: 18px; }

/* 範例提示 */
.demo-banner { background: #FFF4D6; color: #4A3A0B; font-size: .85rem; text-align: center; padding: 8px 16px; }
.demo-banner a { color: #4A3A0B; font-weight: 600; margin-left: 6px; white-space: nowrap; }

/* 按鈕 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1.5px solid transparent; transition: filter .15s ease, background .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: .92rem; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--soft); }
.btn-line { background: #06C755; color: #03210F; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }

/* 頁首 */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--brand-ink) 10%, transparent); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-ink); font-weight: 700; margin-right: auto; }
.brand small { display: block; font-size: .72rem; font-weight: 500; opacity: .7; line-height: 1.2; }
.brand span { line-height: 1.2; }
.header-nav { display: none; gap: 22px; }
.header-nav a { color: var(--brand-ink); text-decoration: none; font-size: .95rem; }
.header-nav a:hover { color: var(--brand); }

/* 照片佔位（上線時換成實拍照片） */
.photo {
  display: grid; place-items: center; text-align: center; aspect-ratio: 4 / 3; border-radius: 16px;
  background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--brand) 22%, var(--soft)));
  color: color-mix(in srgb, var(--brand-ink) 75%, transparent); font-size: .85rem; padding: 12px;
}

/* 首屏 */
.hero { padding: 36px 0 48px; }
.hero-grid { display: grid; gap: 28px; }
.eyebrow { color: var(--brand); font-weight: 600; font-size: .9rem; letter-spacing: .04em; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); }
.hero h1 span { display: block; font-size: clamp(1.1rem, 2.6vw, 1.45rem); font-weight: 600; margin-top: 8px; color: var(--brand); }
.lead { font-size: 1.05rem; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: #fff; border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent); border-radius: 99px; padding: 4px 12px; font-size: .88rem; }
.photo-hero { aspect-ratio: 5 / 4; font-size: .95rem; }
.photo-hero-img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 16px; display: block; }

/* 首屏版型 B：整屏大圖壓字 */
.hero-cover { position: relative; isolation: isolate; padding: 0; background: linear-gradient(135deg, var(--soft), var(--brand)); }
.hero-cover-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-cover-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-ink) 28%, transparent) 0%,
    color-mix(in srgb, var(--brand-ink) 70%, transparent) 62%, color-mix(in srgb, var(--brand-ink) 88%, transparent) 100%);
}
.hero-cover-inner { padding-top: 72px; padding-bottom: 56px; color: #fff; }
.hero-cover-inner > * { max-width: 34em; }
.hero-cover-inner .eyebrow { color: #fff; opacity: .92; }
.hero-cover-inner h1 span { color: #fff; opacity: .92; }
.hero-cover-inner .lead { color: #fff; opacity: .92; }
.hero-cover-inner .facts li { background: color-mix(in srgb, #fff 16%, transparent); border-color: color-mix(in srgb, #fff 45%, transparent); color: #fff; }
.btn-light { background: #fff; color: var(--brand-ink); }

/* 首屏版型 C：純文字＋重點卡（沒有好照片的店家用這版） */
.hero-text-only { padding-bottom: 8px; }
.hero-text-only h1 { max-width: 16em; }
.lead-wide { max-width: 44em; }
.fact-cards { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.fact-cards li {
  background: #fff; border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent);
  border-left: 3px solid var(--brand); border-radius: 12px; padding: 14px 16px; font-size: .95rem;
  font-family: var(--font-accent, var(--font-body)); font-variant-numeric: lining-nums;
}

/* 區塊 */
.section { padding: 56px 0; }
.section-soft { background: var(--soft); }
/* 區塊順序可調，兩個淺底區塊相鄰時合成一段，不要中間出現雙倍留白 */
.section-soft + .section-soft { padding-top: 0; }

/* 房型卡片 */
/* 欄數由項目數決定（見 lib/layout.js），不用 auto-fit，最後一排才不會缺角 */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .cards { grid-template-columns: repeat(var(--cols-sm, 2), 1fr); } }
.card { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--brand-ink) 10%, transparent); }
.card .photo { border-radius: 0; }
.card-body { padding: 18px 20px 20px; }
.card-body p:last-child { margin-bottom: 0; }
.price { font-size: 1.3rem; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.price small { font-size: .85rem; font-weight: 500; color: var(--brand-ink); opacity: .75; }

/* 菜單 */
.menu { display: grid; gap: 28px; }
.menu-section ul { list-style: none; padding: 0; margin: 0; }
.menu-section li { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px dashed color-mix(in srgb, var(--brand-ink) 15%, transparent); }
.menu-dots { flex: 1; }
.menu-price { font-weight: 700; color: var(--brand); white-space: nowrap; }
.menu-name { min-width: 0; overflow-wrap: anywhere; }

/* 為什麼選我們 */
.highlights { display: grid; gap: 16px; margin-bottom: 36px; }
.highlight { background: #fff; border-radius: 14px; padding: 20px; }
.highlight p { margin: 0; }
.host { display: grid; gap: 20px; align-items: center; }
.photo-host { aspect-ratio: 1; max-width: 220px; border-radius: 50%; }
.host-role { color: var(--brand); font-weight: 600; font-size: .9rem; margin-bottom: 2px; }

/* 照片與評價 */
/* 照片：手機橫滑（省直向空間，張數再多也不缺角），平板以上回到格線 */
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px;
  scrollbar-width: thin; overscroll-behavior-x: contain; }
.gallery > * { flex: 0 0 78%; scroll-snap-align: start; }  /* 露出下一張的邊，讓人知道可以滑 */
.gallery:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
@media (min-width: 620px) {
  .gallery { display: grid; overflow: visible; margin-inline: 0; padding-inline: 0;
    grid-template-columns: repeat(var(--cols-sm, 2), 1fr); }
  .gallery > * { flex: none; }
}
.reviews { margin-top: 28px; background: #fff; border-radius: 14px; padding: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.reviews p { margin: 0; }

/* 常見問題 */
.faq details { background: #fff; border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: var(--brand); }
.faq details[open] summary::after { content: "－"; }
.faq details p { margin: 0 0 14px; }
.article-list { margin-top: 36px; }
.article-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.article-list li { background: #fff; border-radius: 12px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent); }
.article-list a { font-weight: 700; text-decoration: none; }
.article-list p { margin: 4px 0 0; font-size: .92rem; opacity: .8; }

/* 交通 */
.loc-grid { display: grid; gap: 28px; }
.info { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px 12px; margin: 0 0 24px; }
.info dt { font-weight: 600; opacity: .75; }
.info dd { margin: 0; }
.info .line { display: block; }
.transport { padding-left: 1.2em; margin: 0; }
.map { display: grid; place-items: center; min-height: 260px; border-radius: 16px; background: var(--soft);
  border: 1px dashed color-mix(in srgb, var(--brand-ink) 25%, transparent); font-size: .9rem; text-align: center; padding: 16px; }

/* 聯絡 */
.contact-card { background: #fff; border-radius: 20px; padding: 32px 24px; text-align: center;
  border: 1px solid color-mix(in srgb, var(--brand-ink) 10%, transparent); }
.contact-card .actions { justify-content: center; }

/* 頁尾 */
.site-footer { padding: 36px 0 28px; font-size: .9rem; border-top: 1px solid color-mix(in srgb, var(--brand-ink) 10%, transparent); }
.site-footer p { margin: 0 0 4px; }
.footer-name { font-weight: 700; }
.footer-small { margin-top: 12px !important; opacity: .7; font-size: .82rem; }

/* 手機底部聯絡列 */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(var(--cta-count, 3), 1fr);
  background: #fff; border-top: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent); }
.sticky-cta a { text-align: center; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); font-weight: 700; text-decoration: none; color: var(--brand); }
.sticky-cta a.is-line { background: #06C755; color: #03210F; }

/* 民宿版：首頁與多頁房型共用 */
.lodging-hero { position: relative; isolation: isolate; min-height: min(720px, calc(100svh - 60px)); display: grid; align-items: end; color: #fff; }
.lodging-hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.lodging-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.76)); }
.lodging-hero-content { padding-top: 44px; padding-bottom: 38px; }
.lodging-hero-content > * { max-width: 700px; }
.lodging-hero .eyebrow, .lodging-hero h1 span { color: #fff; }
.lodging-hero h1 { font-size: clamp(2rem, 7vw, 3.7rem); }
.lodging-hero h1 span { display: block; margin-top: 8px; font-size: clamp(1.05rem, 3vw, 1.5rem); }
.lodging-hero .lead { color: #fff; opacity: .94; }
.lodging-selling-points { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lodging-selling-points li { border: 1px solid rgba(255,255,255,.58); background: rgba(0,0,0,.18); padding: 5px 12px; border-radius: 99px; font-size: .9rem; }
.lodging-hero-actions { margin-bottom: 0; }
.section-kicker { color: var(--brand); font-family: var(--font-accent, var(--font-body)); font-size: .8rem; letter-spacing: .18em; font-weight: 700; margin-bottom: 5px; }
.lodging-room-grid { display: grid; gap: 18px; }
.lodging-room-card { background: #fff; border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent); }
.lodging-room-card > img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.room-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 0 0 12px; font-size: .88rem; opacity: .78; }
.text-link { font-weight: 700; text-decoration: none; }
.story-block { text-align: center; }
.story-block > p:last-child { font-size: 1.08rem; }
.policy-grid { display: grid; gap: 12px; margin: 0; }
.policy-grid > div { background: #fff; border-top: 2px solid var(--brand); padding: 18px; }
.policy-grid dt { color: var(--brand); font-weight: 700; }
.policy-grid dd { margin: 6px 0 0; }
.lodging-copy-grid { display: grid; gap: 20px; }
.lodging-copy-grid ul { padding-left: 1.2em; }
.nearby-grid { display: grid; gap: 14px; margin-bottom: 20px; }
.nearby-grid article, .nearby-list article { background: #fff; border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent); padding: 20px; }
.distance { color: var(--brand); font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.nearby-grid article p:last-child, .nearby-list article p:last-child { margin-bottom: 0; }
.lodging-booking { text-align: center; background: var(--brand-ink); color: #fff; }
.lodging-booking .actions { justify-content: center; }
.lodging-booking .note { color: #fff; }
.lodging-inner { padding: 28px 0 56px; }
.lodging-inner h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.room-title { display: grid; gap: 12px; margin-bottom: 26px; }
.room-price-main { color: var(--brand); font-family: var(--font-accent, var(--font-body)); font-weight: 700; font-size: 1.35rem; white-space: nowrap; }
.room-price-main small { font-size: .85rem; color: var(--brand-ink); font-weight: 500; }
.room-gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding-inline: 16px; }
.room-gallery img { flex: 0 0 88%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: start; }
.room-gallery:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.room-section { margin-top: 48px; }
.room-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.room-specs > div { border-top: 1px solid color-mix(in srgb, var(--brand-ink) 18%, transparent); padding: 12px 0; }
.room-specs dt { font-size: .85rem; opacity: .7; }
.room-specs dd { margin: 2px 0 0; font-weight: 700; }
.amenity-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 24px; padding-left: 1.2em; }
.room-price-section { margin-inline: -16px; padding: 28px 16px; }
.price-table > div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--brand-ink) 15%, transparent); }
.room-booking { margin: 48px -16px -56px; padding: 36px 20px; }
.info-panel { margin: 28px 0 0; padding: 24px; background: var(--soft); }
.route-list { padding-left: 1.4em; }
.route-list li + li { margin-top: 12px; }
.nearby-list { display: grid; gap: 16px; margin-top: 28px; }

@media (max-width: 899px) {
  html { scroll-padding-top: 116px; }
  .header-inner { height: auto; min-height: 60px; flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .header-nav { order: 3; display: flex; flex: 0 0 100%; gap: 16px; overflow-x: auto; scrollbar-width: thin; }
  .header-nav a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 6px 4px; white-space: nowrap; }
  .header-nav a:focus-visible { outline-offset: -3px; box-shadow: none; }
}

@media (max-width: 619px) {
  .lodging-hero .lead { display: none; }
  /* 手機首屏不佔滿整個螢幕：留一段照片，按鈕一定在第一屏、不被底部固定列擋住 */
  .lodging-hero { min-height: 0; }
  .lodging-hero-content { padding-top: 120px; padding-bottom: 28px; }
  .lodging-selling-points { gap: 6px; }
}

/* 文章頁 */
.article { padding: 28px 0 56px; }
.crumbs { font-size: .88rem; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; opacity: .85; }
.crumbs a { text-decoration: none; }
.article h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
.updated { font-size: .85rem; opacity: .7; }
.answer { background: #fff; border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent); border-radius: 10px; padding: 16px 18px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.article-cta { background: var(--soft); border-radius: 16px; padding: 22px; margin: 36px 0; }
.related ul { padding-left: 1.2em; }
.related h2 { font-size: 1.15rem; }

/* 桌機 */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
  .header-nav { display: flex; }
  .wrap { padding: 0 24px; }
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }
  .section { padding: 84px 0; }
  .highlights { grid-template-columns: repeat(3, 1fr); }
  .host { grid-template-columns: 220px 1fr; gap: 32px; }
  .menu { grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
  .loc-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .contact-card { padding: 44px 40px; }
  .cards { grid-template-columns: repeat(var(--cols, 3), 1fr); }
  .gallery { grid-template-columns: repeat(var(--cols, 3), 1fr); }
  .lodging-room-grid { grid-template-columns: repeat(3, 1fr); }
  .policy-grid { grid-template-columns: repeat(4, 1fr); }
  .lodging-copy-grid { grid-template-columns: .8fr 1.2fr; gap: 72px; }
  .nearby-grid { grid-template-columns: repeat(3, 1fr); }
  .room-title { grid-template-columns: 1fr auto; align-items: end; }
  .room-gallery { display: grid; grid-template-columns: 2fr 1fr; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .room-gallery img { width: 100%; height: 100%; }
  .room-gallery img:first-child { grid-row: span 2; }
  /* 照片少於 3 張時不留空格：2 張並排、1 張滿版 */
  .room-gallery:not(:has(img:nth-child(3))) { grid-template-columns: repeat(2, 1fr); }
  .room-gallery:not(:has(img:nth-child(3))) img:first-child { grid-row: auto; }
  .room-gallery:not(:has(img:nth-child(2))) { grid-template-columns: 1fr; }
  .lodging-room-grid:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, 1fr); }
  .nearby-grid:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, 1fr); }
  .room-price-section { margin-inline: 0; padding: 36px; }
  .room-booking { margin: 64px 0 -56px; padding: 44px; }
}
