:root {
  --paper: #f4efe4;
  --paper-2: #ebe4d4;
  --ink: #1f1c18;
  --ink-soft: #5b544a;
  --line: #d8cfbc;
  --seal: #a8241b;
  --wa: #1f7a4d;
  --serif: "Songti TC", "Noto Serif TC", "Source Han Serif TC", "PMingLiU", serif;
  --sans: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 60%;
  opacity: .9;
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, transparent 42%, #000 82%);
          mask-image: linear-gradient(100deg, transparent 0%, transparent 42%, #000 82%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 64px clamp(16px, 6vw, 96px);
  max-width: 640px;
}
.seal {
  display: inline-block;
  margin: 0 0 28px;
  padding: 6px 8px;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.1;
  color: var(--paper);
  background: var(--seal);
  border-radius: 3px;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 96px);
  letter-spacing: .12em;
  line-height: 1.1;
}
.lede {
  margin: 20px 0 32px;
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--ink-soft);
}
.hero-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-nav a {
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  background: rgba(244, 239, 228, .75);
  transition: background .2s, color .2s;
}
.hero-nav a:first-child, .hero-nav a:hover { background: var(--ink); color: var(--paper); }

/* ---------- sections ---------- */
section { padding: 72px clamp(16px, 5vw, 64px); }
h2 {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: .08em;
}
h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 12px;
  background: var(--seal);
}

/* ---------- filters ---------- */
.f-in { position: absolute; opacity: 0; pointer-events: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters label {
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  user-select: none;
  transition: background .2s, border-color .2s;
}
.filters label:hover { border-color: var(--ink); }
#f-all:checked ~ .filters [for="f-all"],
#f-flower:checked ~ .filters [for="f-flower"],
#f-landscape:checked ~ .filters [for="f-landscape"],
#f-figure:checked ~ .filters [for="f-figure"],
#f-callig:checked ~ .filters [for="f-callig"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.f-in:focus-visible + .f-in, .f-in:focus-visible ~ .filters { outline: none; }
#f-all:focus-visible ~ .filters [for="f-all"],
#f-flower:focus-visible ~ .filters [for="f-flower"],
#f-landscape:focus-visible ~ .filters [for="f-landscape"],
#f-figure:focus-visible ~ .filters [for="f-figure"],
#f-callig:focus-visible ~ .filters [for="f-callig"] { outline: 2px solid var(--seal); outline-offset: 2px; }

#f-flower:checked ~ .gallery .item:not(.c-flower),
#f-landscape:checked ~ .gallery .item:not(.c-landscape),
#f-figure:checked ~ .gallery .item:not(.c-figure),
#f-callig:checked ~ .gallery .item:not(.c-callig) { display: none; }

/* ---------- gallery ---------- */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3 300px;
  column-gap: 20px;
}
.item { break-inside: avoid; margin-bottom: 20px; }
.item a {
  display: block;
  text-decoration: none;
  background: #fff;
  padding: 10px 10px 0;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(31, 28, 24, .05);
  transition: transform .25s, box-shadow .25s;
}
.item a:hover, .item a:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31, 28, 24, .12);
}
.item img { width: 100%; background: var(--paper-2); }
.cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 2px 14px;
}
.name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.tag { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

/* ---------- info ---------- */
.info { max-width: 880px; margin: 0 auto; }
.info p { font-size: 17px; margin: 0 0 12px; }
.custom { border-top: 1px solid var(--line); }
.buy { border-top: 1px solid var(--line); }
.chips { list-style: none; padding: 0; margin: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  font-family: var(--serif);
  font-size: 20px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--line);
}
.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { filter: brightness(1.1); }
.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.faq > div { background: #fff; border: 1px solid var(--line); padding: 20px; }
.faq h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 19px; }
.faq p { font-size: 15px; color: var(--ink-soft); margin: 0; }

footer {
  padding: 36px 16px 48px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
footer p { margin: 4px 0; }

/* ---------- lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  place-items: center;
  padding: 16px 56px;
}
.lightbox:target { display: grid; }
.lb-bg { position: absolute; inset: 0; background: #14120f; }
.lightbox figure {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
/* width/height:auto = 原圖大小為上限，小圖不會被放大 */
.lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  background: #fff;
}
.lightbox figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding-top: 14px;
  color: var(--paper);
}
.lb-name { font-family: var(--serif); font-size: 18px; }
.lb-tag { font-size: 13px; opacity: .7; }
.lb-ask {
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  text-decoration: none;
}
.lb-nav, .lb-close {
  position: absolute;
  z-index: 1;
  color: var(--paper);
  text-decoration: none;
  line-height: 1;
  opacity: .8;
}
.lb-nav:hover, .lb-close:hover { opacity: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 48px; padding: 12px; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
.lb-close { top: 8px; right: 12px; font-size: 36px; padding: 6px; }

@media (max-width: 640px) {
  .hero { min-height: 0; align-items: end; }
  .hero-art {
    position: relative;
    height: 240px;
    order: -1;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
            mask-image: linear-gradient(180deg, #000 60%, transparent);
  }
  .hero-inner { padding: 8px 16px 48px; }
  .seal { display: none; }
  section { padding: 56px 16px; }
  .gallery { columns: 2; column-gap: 12px; }
  .item { margin-bottom: 12px; }
  .item a { padding: 6px 6px 0; }
  .name { font-size: 15px; }
  .cap { flex-direction: column; gap: 0; padding: 8px 2px 10px; }
  .lightbox { padding: 16px 8px 64px; }
  .lb-nav { top: auto; bottom: 8px; transform: none; font-size: 40px; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
}

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

.buy p a, footer a { white-space: nowrap; }

/* ---------- 洽詢入口 ---------- */
.price-note { margin: -16px 0 28px; font-size: 15px; color: var(--ink-soft); }
.price-note a { color: var(--wa); font-weight: 600; white-space: nowrap; }
.hero-nav a.hero-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.hero-nav a.hero-wa:hover { filter: brightness(1.1); }
.hero-nav a:first-child:not(.hero-wa) { background: transparent; color: inherit; }
.hero-nav a[href="#works"]:hover { background: var(--ink); color: var(--paper); }
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(31, 28, 24, .25);
}
.wa-float:hover { filter: brightness(1.1); }
footer { padding-bottom: 88px; }
.hero-inner .lede, .hero-inner .price-note, .hero h1 { text-shadow: 0 0 6px var(--paper), 0 0 12px var(--paper); }

/* 手機：洽詢按鈕改成底部整條，頁尾留出空間，不再壓住內容 */
@media (max-width: 640px) {
  .wa-float {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    text-align: center;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 14px rgba(31, 28, 24, .15);
  }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  footer { padding-bottom: 36px; }
  .filters { gap: 6px; }
  .filters label { padding: 6px 13px; font-size: 14px; }
}

/* 手機大圖：× 與箭頭各佔一條，不壓畫面 */
@media (max-width: 640px) {
  .lightbox { padding: 56px 8px 64px; }
  .lightbox img { max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); }
  .lb-close { top: 6px; right: 8px; }
}
@media (max-width: 360px) {
  .filters label { padding: 5px 10px; }
}

/* 避免最後一兩個字單獨掉到下一行 */
p, h2, h3, .name { text-wrap: pretty; }
@media (max-width: 640px) {
  .lede { font-size: 16px; }
  .chips { gap: 8px; }
  .chips li { font-size: 17px; padding: 8px 12px; }
}
@media (max-width: 360px) {
  .chips li { font-size: 15px; padding: 7px 9px; }
}
@media (max-width: 640px) {
  .chips { display: grid; grid-template-columns: repeat(4, 1fr) 1.3fr; }
  .chips li { padding: 8px 4px; text-align: center; }
}
