:root {
  --bg: #f7f5ef;
  --surface: #fffdf8;
  --text: #25312d;
  --muted: #64716b;
  --line: #dcd8cc;
  --accent: #526c5d;
  --accent-strong: #334a3e;
  --shadow: 0 18px 50px rgba(31, 47, 39, .08);
  --radius: 22px;
}

:root[data-theme="dark"] {
  --bg: #17201c;
  --surface: #202b26;
  --text: #eef4ef;
  --muted: #b8c3bd;
  --line: #39473f;
  --accent: #9ab7a5;
  --accent-strong: #c3d8ca;
  --shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 5%, rgba(137, 166, 147, .18), transparent 27rem),
    var(--bg);
  font-family: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; padding: 1rem 5vw;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: .8rem; align-items: center; }
.brand-mark { font-size: 1.8rem; color: var(--accent); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.nav { display: flex; gap: 1.4rem; font-size: .95rem; }
.nav a:hover { color: var(--accent); }
.header-actions { display: flex; gap: .4rem; }
.icon-button {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer;
}

.hero { padding: 8rem 5vw 7rem; }
.hero-inner { max-width: 980px; margin: auto; text-align: center; }
.eyebrow {
  margin: 0 0 .8rem; color: var(--accent);
  letter-spacing: .18em; font: 700 .78rem/1.4 sans-serif;
}
h1, h2, h3 { line-height: 1.28; }
h1 { font-size: clamp(2.7rem, 7vw, 5.8rem); margin: 0 0 1.5rem; letter-spacing: -.04em; }
.lead { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 1.15rem; }
.hero-actions { margin-top: 2.2rem; display: flex; justify-content: center; gap: .9rem; flex-wrap: wrap; }
.button { display: inline-block; padding: .85rem 1.35rem; border-radius: 999px; border: 1px solid var(--line); }
.button.primary { background: var(--accent-strong); color: white; border-color: var(--accent-strong); }
.button.secondary { background: var(--surface); }

.section { padding: 6rem 5vw; max-width: 1280px; margin: auto; }
.section.alt {
  max-width: none;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  border-block: 1px solid var(--line);
}
.section.alt > * { max-width: 1150px; margin-inline: auto; }
.section-heading { max-width: 700px; margin-bottom: 2rem; }
.section-heading h2, .about h2 { font-size: clamp(2rem, 4vw, 3.3rem); margin: .25rem 0 .6rem; }
.section-heading p { color: var(--muted); }

.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
.collection-card {
  min-height: 290px; display: flex; flex-direction: column;
  padding: 2rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.collection-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.card-icon { color: var(--accent); font-size: 2rem; }
.collection-card h3 { font-size: 1.45rem; margin: 1rem 0 .5rem; }
.collection-card p { color: var(--muted); }
.card-link { margin-top: auto; color: var(--accent); font-weight: 700; }

.progress-list { display: grid; gap: .8rem; }
.progress-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.35rem 1.5rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
}
.progress-item h3, .progress-item p { margin: 0; }
.progress-item p { color: var(--muted); font-size: .93rem; }
.status { white-space: nowrap; padding: .35rem .8rem; border-radius: 999px; background: var(--bg); color: var(--accent); }

.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.timeline article { padding: 1.7rem; border-left: 3px solid var(--accent); background: var(--surface); }
.timeline time { color: var(--accent); font: 700 .82rem sans-serif; }
.timeline h3 { margin: .5rem 0; }
.timeline p { color: var(--muted); }

.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
.about > p { font-size: 1.15rem; color: var(--muted); }

.site-footer { padding: 2rem 5vw; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }

dialog {
  width: min(680px, 92vw); border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(5px); }
.search-panel { padding: .6rem; }
.search-head { display: flex; justify-content: space-between; align-items: center; }
.search-panel input {
  width: 100%; padding: 1rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text);
}
.search-results { margin-top: 1rem; display: grid; gap: .6rem; }
.search-result { padding: .85rem; border: 1px solid var(--line); border-radius: 12px; }

.subpage { max-width: 920px; margin: auto; padding: 7rem 5vw; }
.subpage h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
.notice { padding: 1.2rem 1.4rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }

@media (max-width: 900px) {
  .nav { display: none; }
  .card-grid, .timeline { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 620px) {
  .site-header { padding: .8rem 4vw; }
  .brand small { display: none; }
  .hero { padding-top: 5rem; }
  .card-grid, .timeline { grid-template-columns: 1fr; }
  .progress-item { align-items: flex-start; flex-direction: column; }
}
