/* 敦親牧鄰民宿 — beige / hinoki. Mobile first. */

:root {
  --bg: #f3eadc;
  --bg-2: #e9dcc8;
  --paper: #fbf6ee;
  --ink: #2c241c;
  --muted: #5e5146;
  --wood: #8a5a32;
  --wood-deep: #5c3a22;
  --bark: #3c2a1e;
  --line: #ddcdba;
  --cream: #fbf6ee;
  --lantern: #9c3b2e;
  --shadow: 0 16px 40px rgba(60, 42, 30, 0.08);
  --header: 4.25rem;
  --wrap: 72rem;
  --serif: "Noto Serif TC", "Source Han Serif TC", "PMingLiU", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "WenQuanYi Micro Hei", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 0% -10%, rgba(196, 165, 116, 0.35), transparent 42%),
    radial-gradient(ellipse at 100% 0%, rgba(138, 90, 50, 0.12), transparent 36%),
    var(--bg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--wood-deep); }
a:hover { color: var(--lantern); }

h1, h2, h3, .brand-name, .kicker, .section-kicker {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

h1 { font-size: clamp(2.1rem, 8vw, 4.2rem); margin: 0.2rem 0 0.6rem; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 0.8rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }

p { margin: 0 0 0.9rem; }

:focus-visible {
  outline: 3px solid var(--wood);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--bark);
  color: var(--cream);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header);
  padding: 0.55rem 1rem;
  background: rgba(251, 246, 238, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--bark);
  line-height: 1.15;
  margin-right: auto;
}
.brand-mark {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--wood);
}
.brand-name {
  font-size: 1.2rem;
  letter-spacing: 0.14em;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--bark);
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}
.nav-btn span,
.nav-btn span::before,
.nav-btn span::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: var(--bark);
  position: relative;
}
.nav-btn span::before,
.nav-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-btn span::before { top: -5px; }
.nav-btn span::after { top: 5px; }

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0.8rem 0.9rem;
  box-shadow: var(--shadow);
}
.site-nav a {
  display: block;
  padding: 0.7rem 0.6rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.site-nav a[aria-current="page"] { color: var(--wood-deep); font-weight: 700; }
.nav-social {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 0.4rem 0.2rem;
}
.nav-social a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.nav-toggle:checked ~ .site-nav { display: block; }

.header-phones { display: none; align-items: center; gap: 0.35rem; flex: none; }
.header-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--bark);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  min-width: 12.5rem;
}
.header-call:hover { color: #fff; background: var(--wood-deep); }
.num { white-space: nowrap; }

.hero { padding-bottom: 0.5rem; }
.hero-media {
  position: relative;
  height: min(68vw, 320px);
  min-height: 220px;
  overflow: hidden;
  background: var(--bark);
}
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0;
  animation: hero-fade 32s infinite;
}
.hero-media img:nth-child(1) { animation-name: hero-fade-first; animation-delay: 0s; }
.hero-media img:nth-child(2) { animation-delay: 8s; }
.hero-media img:nth-child(3) { animation-delay: 16s; }
.hero-media img:nth-child(4) { animation-delay: 24s; }
.hero-copy {
  width: min(100% - 2rem, 44rem);
  margin: 1.35rem auto 0.5rem;
}
.hero h1 { margin: 0.15rem 0 0.45rem; }
.hero-lines { margin-top: 1.15rem; }
.hero-lines-label {
  margin: 0 0 0.45rem;
  color: var(--wood-deep);
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.hero-lines-phones {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.hero-lines-phones .btn { width: 100%; white-space: nowrap; }
.book-block {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.15rem;
}
.book-block-label {
  margin: 0;
  color: var(--wood-deep);
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.book-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.book-row .btn {
  width: 100%;
  min-height: 2.9rem;
  white-space: nowrap;
}
.kicker, .section-kicker {
  margin: 0;
  color: var(--wood-deep);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
}
.hero .lead {
  max-width: 36rem;
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-solid { background: var(--cream); color: var(--bark); }
.btn-solid:hover { background: #fff; color: var(--wood-deep); }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.btn-wood { background: var(--bark); color: var(--cream); }
.btn-wood:hover { background: var(--wood-deep); color: #fff; }
.btn-line {
  background: transparent;
  color: var(--wood-deep);
  border-color: var(--wood);
}
.btn-book {
  background: transparent;
  color: var(--wood-deep);
  border-color: #c4a574;
  font-weight: 600;
}
.btn-book:hover { background: #efe2d0; color: var(--bark); }

.page-hero { padding: 1.5rem 0 0.4rem; }
.page-hero h1 { font-size: clamp(1.85rem, 5vw, 3rem); }
.page-hero p { color: var(--muted); max-width: 42rem; }

.crumbs { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.4rem; }
.crumbs a { color: var(--muted); }

section { padding: 3.2rem 0; }
.lightbox p { color: var(--cream); text-align: center; margin: 0.7rem 0 0; }
.section-head { margin-bottom: 1.3rem; }
.section-head p:last-child { margin-bottom: 0; color: var(--muted); }

.prose { max-width: 44rem; }
.prose strong { font-weight: 700; }

.pull {
  margin: 1.4rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1rem;
}
.pull span { display: block; margin-top: 0.35rem; }

.mosaic {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.4rem;
}
.mosaic img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
}
.mosaic a { display: block; }

.cards {
  display: grid;
  gap: 1.5rem;
}
.room-filter-bar { margin: 0 0 1.35rem; }
.room-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.room-filter-tabs button {
  min-height: 2.75rem;
  padding: 0.4rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.room-filter-tabs button[aria-pressed="true"] {
  background: var(--bark);
  color: var(--cream);
  border-color: var(--bark);
}
.room-filter-select { display: none; }
.room-filter-select select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.45rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
@media (max-width: 759px) {
  .room-filter-tabs { display: none; }
  .room-filter-select { display: block; }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card img { width: 100%; height: 210px; object-fit: cover; }
.card-body { padding: 1rem 1rem 1.15rem; }
.card-body p { color: var(--muted); }
.price-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.7rem 0 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.price-line b { color: var(--wood-deep); font-size: 1.15rem; }

.callout {
  margin-top: 1rem;
  padding: 1.1rem 1.15rem;
  background: #efe2d0;
  border-left: 4px solid var(--wood);
  border-radius: 0 14px 14px 0;
}
.callout p:last-child { margin: 0; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.fact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
}
.fact span {
  display: block;
  color: var(--wood);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}
.fact strong { font-family: var(--serif); font-size: 1.25rem; }

.rate-key {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
}
.rate-key li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
}
.rate-key b {
  display: block;
  font-family: var(--serif);
  color: var(--wood-deep);
  font-size: 1.05rem;
}
.rate-key span {
  color: var(--muted);
  font-size: 0.88rem;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
table.prices {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.prices th,
.prices td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.prices th:first-child,
.prices td:first-child { text-align: left; }
.prices thead th {
  background: #f4eadc;
  font-weight: 700;
  font-size: 0.95rem;
}
.prices tbody tr:last-child th,
.prices tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 759px) {
  .table-scroll {
    overflow: visible;
    border: 0;
    background: transparent;
    border-radius: 0;
  }
  .prices thead { display: none; }
  .prices,
  .prices tbody,
  .prices tr,
  .prices th,
  .prices td { display: block; width: auto; }
  .prices tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin: 0 0 0.7rem;
    padding: 0.75rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .prices th[scope="row"] {
    grid-column: 1 / -1;
    padding: 0.15rem 0.15rem 0.25rem;
    border: 0;
    text-align: left;
    font-family: var(--serif);
    font-size: 1.2rem;
  }
  .prices td {
    text-align: left;
    white-space: nowrap;
    border: 0;
    padding: 0.45rem 0.65rem;
    background: #f4eadc;
    border-radius: 10px;
  }
  .prices td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
  }
}
@media (min-width: 760px) {
  .rate-key { grid-template-columns: repeat(4, 1fr); }
}
.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.room {
  display: grid;
  gap: 1.25rem;
  padding: 1.6rem 0 2.6rem;
  border-top: 1px solid var(--line);
}
.room[hidden],
.card[hidden] { display: none; }
.film {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.3rem;
}
.film a { flex: 0 0 86%; scroll-snap-align: center; }
.film img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.4rem 0 0.8rem; list-style: none; }
.chips li {
  background: #f4eadc;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.92rem;
}
.pgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.pgrid div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
}
.pgrid span { display: block; color: var(--muted); font-size: 0.82rem; }
.pgrid b { font-family: var(--serif); font-size: 1.35rem; color: var(--wood-deep); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
}
.steps em {
  font-style: normal;
  font-family: var(--serif);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bark);
  color: var(--cream);
}

.map-frame {
  border: 0;
  width: 100%;
  min-height: 320px;
  height: 52vw;
  max-height: 460px;
  border-radius: 16px;
  background: var(--bg-2);
}

.places { display: grid; gap: 0.7rem; }
.place {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.place p { margin: 0; color: var(--muted); }
.group-title { margin: 1.6rem 0 0.7rem; }

details.faq {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.2rem 0.9rem;
  margin-bottom: 0.5rem;
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.75rem 0;
}
details.faq p { margin: 0 0 0.8rem; color: var(--muted); }

.policy { padding-left: 1.1rem; }
.policy li { margin: 0.35rem 0; }
.scale { padding-left: 1.2rem; margin: 0.4rem 0 0.9rem; }
.scale li { margin: 0.3rem 0; }
details.faq .scale { color: var(--muted); font-size: 0.94rem; padding-left: 1rem; }

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.gallery a { display: block; }
.gallery img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
}
.gallery figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.25rem 0.1rem 0.4rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(32, 22, 16, 0.92);
  display: none;
  place-items: center;
  z-index: 50;
  padding: 3rem 1rem 1rem;
}
.lightbox:target { display: grid; }
.lightbox img {
  max-height: calc(100svh - 6rem);
  width: auto;
  max-width: min(1100px, 100%);
  margin: 0 auto;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  color: var(--cream);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
}

.site-footer {
  background: var(--bark);
  color: #f3eadc;
  padding: 2.2rem 0 5.4rem;
  margin-top: 1rem;
}
.site-footer a { color: #f0d7b4; }
.foot-grid { display: grid; gap: 1.2rem; }
.license {
  display: inline-block;
  border: 1px solid rgba(243, 234, 220, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
}
.fine { color: #d9c7b2; font-size: 0.9rem; position: relative; z-index: 0; margin: 1rem 0 0; }
.social-links {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
.social-links li { margin: 0; }
.social-links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0;
  position: relative;
  z-index: 1;
}
.book-note .book-line { display: block; }
.nw { white-space: nowrap; }
.pay-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.pay-list li {
  margin: 0;
  line-height: 1.65;
}
.site-footer .pay-list {
  color: #d9c7b2;
  font-size: 0.9rem;
  margin: 1rem 0 0;
}
.fact-phones a {
  display: block;
  color: inherit;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.75rem;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem calc(0.45rem + env(safe-area-inset-bottom));
  background: rgba(251, 246, 238, 0.96);
  border-top: 1px solid var(--line);
}
.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.dock-call {
  background: var(--bark);
  color: var(--cream);
  font-size: 0.68rem;
  padding: 0 0.3rem;
}
.dock-call:hover { color: #fff; }
.dock-ig {
  width: 2.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--bark);
}

@media (min-width: 760px) {
  .nav-btn { display: none; }
  .site-nav {
    display: flex;
    position: static;
    align-items: center;
    gap: 0.15rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .site-nav a {
    border: 0;
    padding: 0.4rem 0.55rem;
    font-size: 0.95rem;
  }
  .nav-social { display: none; }
  .header-phones { display: flex; }
  .hero-lines-phones,
  .book-row { grid-template-columns: 1fr 1fr; }
  .book-row > :only-child { grid-column: 1 / -1; }
  .mosaic { grid-template-columns: 1.4fr 1fr 1fr; }
  .mosaic img { height: 280px; }
  .mosaic a:first-child { grid-row: span 2; }
  .mosaic a:first-child img { height: 100%; min-height: 420px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 1.85rem; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .room { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .film { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .film a { flex: none; }
  .film img { height: 200px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery img { height: 190px; }
  .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .site-footer { padding-bottom: 2.4rem; }
  .dock { display: none; }
  .places { grid-template-columns: 1fr 1fr; }
  section { padding: 4.5rem 0; }
}

@media (min-width: 760px) {
  .hero-media { height: 280px; }
}
@media (min-width: 760px) and (max-width: 1079px) {
  .site-header { flex-wrap: wrap; row-gap: 0.2rem; }
  .site-nav { flex: 1 1 100%; }
}
@media (min-width: 1080px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .hero-media { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none; opacity: 0; }
  .hero-media img:first-child { opacity: 1; }
}

@keyframes hero-fade {
  0% { opacity: 0; }
  3% { opacity: 1; }
  22% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes hero-fade-first {
  0%, 22% { opacity: 1; }
  25%, 97% { opacity: 0; }
  100% { opacity: 1; }
}
