:root {
  --bg: #f9f8f4;
  --forest: #2d4628;
  --forest-soft: #3d522b;
  --sage: #a8c69f;
  --gold: #c2a370;
  --gold-deep: #a88b5a;
  --cream: #fdfbf3;
  --white: #ffffff;
  --shadow: 0 8px 32px rgba(45, 70, 40, 0.08);
  --radius: 14px;
  --font-sans: "Noto Sans TC", system-ui, sans-serif;
  --font-serif: "Noto Serif TC", "Songti TC", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--forest);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--forest);
  color: var(--white);
  z-index: 2000;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(249, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(45, 70, 40, 0.08);
}

.brand {
  font-weight: 600;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--forest);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(45, 70, 40, 0.2);
  background: var(--white);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--forest);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  justify-content: flex-end;
  max-height: none;
}

.nav-links a {
  font-size: 0.72rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: var(--forest-soft);
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: rgba(45, 70, 40, 0.15);
  background: var(--white);
}

main {
  padding-bottom: 5.5rem;
}

.panel {
  margin: 0 auto;
  /* 設計稿寬 576 CSS px；圖檔 1152px 對應約 2× 螢幕較清晰 */
  max-width: min(100%, 576px);
}

.panel figure {
  margin: 0;
}

.panel img {
  width: 100%;
  display: block;
  /* 高解析螢幕縮圖時較乾淨（Chrome 等支援） */
  image-rendering: high-quality;
}

.panel figcaption {
  padding: 0.5rem 1rem 1.25rem;
  font-size: 0.7rem;
  color: rgba(45, 70, 40, 0.55);
  text-align: center;
}

.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(249, 248, 244, 0.97) 30%);
  justify-content: center;
}

.cta-bar .btn {
  flex: 1;
  max-width: 280px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #d4bc86, var(--gold));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(194, 163, 112, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-secondary {
  background: var(--white);
  color: var(--forest);
  border: 1px solid rgba(45, 70, 40, 0.2);
}

.btn-secondary:hover {
  border-color: var(--forest);
}

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 6rem;
  font-size: 0.7rem;
  color: rgba(45, 70, 40, 0.45);
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    right: 0.75rem;
    top: calc(100% + 6px);
    flex-direction: column;
    align-items: stretch;
    min-width: 11rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(45, 70, 40, 0.08);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }

  .site-header.nav-open .nav-links {
    max-height: 70vh;
    overflow-y: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    border-radius: 10px;
  }
}

@media (min-width: 641px) {
  .panel {
    max-width: min(100%, 576px);
  }
}
