/* ===== DK 多功能站 — 明亮神聖風格（The Church of Jesus Christ of Latter-day Saints 風格） ===== */
:root {
  --bg: #fbf9f4;          /* 暖白 */
  --surface: #ffffff;
  --surface-2: #f6f2e9;
  --ink: #2b2f36;         /* 深板岩文字 */
  --muted: #6f7680;
  --primary: #1f4e79;     /* 聖殿藍 */
  --primary-soft: #2d6a9f;
  --gold: #b8912e;        /* 金色點綴 */
  --gold-soft: #d9bd6e;
  --line: #e8e1d2;        /* 暖色邊框 */
  --radius: 12px;
  --shadow: 0 4px 20px rgba(31, 78, 121, 0.08);
  --shadow-lg: 0 10px 34px rgba(31, 78, 121, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

/* 背景：聖林異象照片，固定鋪滿全站 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/images/sacred-grove.webp") no-repeat center center;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}
/* 暖白薄紗 + 頂部天光：維持明亮神聖，同時確保文字清晰可讀 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(58% 42% at 50% 6%, rgba(255, 251, 235, 0.28), rgba(251, 249, 244, 0) 62%),
    linear-gradient(rgba(251, 249, 244, 0.80), rgba(251, 249, 244, 0.88));
  pointer-events: none;
  z-index: 0;
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

h1, h2, h3 { font-family: Georgia, "Noto Serif TC", "PMingLiU", serif; color: var(--primary); font-weight: 700; letter-spacing: 0.01em; }

a { color: var(--primary-soft); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }

/* ===== 頁首 ===== */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(184, 145, 46, 0.15);
}
.site-header nav {
  max-width: 1000px; margin: 0 auto; padding: 0.9rem 1.3rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.brand {
  font-family: Georgia, "Noto Serif TC", serif;
  font-weight: 700; font-size: 1.12rem; color: var(--primary);
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
}
.brand::before { content: "✦"; color: var(--gold); font-size: 1rem; }
.links a { margin-left: 1.3rem; color: var(--muted); font-size: 0.98rem; }
.links a:hover { color: var(--primary); text-decoration: none; }

/* ===== 主內容 ===== */
main { max-width: 1000px; margin: 0 auto; padding: 2.2rem 1.3rem 3rem; }

.hero { text-align: center; padding: 3.4rem 1rem 2.6rem; }
.hero h1 { font-size: 2.6rem; margin: 0 0 0.6rem; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 40rem; margin: 0 auto; }
.hero .verse {
  margin: 1.4rem auto 0; max-width: 34rem; color: var(--gold);
  font-family: Georgia, "Noto Serif TC", serif; font-style: italic; font-size: 1.05rem;
}

/* ===== 卡片 ===== */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.3rem; margin-top: 2rem;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gold-soft); }
.card h3 { margin: 0 0 0.4rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ===== 表單元件 ===== */
.tool-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); margin-top: 1.5rem;
}
textarea, input, select {
  width: 100%; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; padding: 0.7rem 0.85rem;
  font-family: inherit; font-size: 0.98rem;
}
textarea { font-family: ui-monospace, monospace; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary-soft); box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.15); }

button {
  background: var(--primary); color: #fff; border: 0; border-radius: 9px;
  padding: 0.62rem 1.25rem; font-size: 0.96rem; cursor: pointer; margin-top: 0.85rem;
  transition: background 0.15s, transform 0.05s;
}
button:hover { background: var(--primary-soft); }
button:active { transform: translateY(1px); }

.site-footer {
  border-top: 1px solid var(--line); text-align: center; color: var(--muted);
  padding: 1.8rem; font-size: 0.9rem; background: var(--surface-2);
}
.site-footer .verse { display: block; color: var(--gold); font-family: Georgia, serif; font-style: italic; margin-bottom: 0.4rem; }
.note { color: var(--muted); font-size: 0.86rem; margin-top: 0.5rem; }

/* ===== 布告欄：分類/標籤/留言 ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 0.32rem 0.8rem;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--muted); font-size: 0.86rem; cursor: pointer; transition: all 0.15s;
}
.chip:hover { border-color: var(--gold-soft); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.cat-badge {
  display: inline-block; padding: 0.18rem 0.7rem; border-radius: 999px;
  background: var(--surface-2); color: var(--gold); border: 1px solid var(--gold-soft);
  font-size: 0.8rem; font-weight: 600;
}
.tag {
  display: inline-block; padding: 0.14rem 0.6rem; border-radius: 6px;
  background: rgba(31, 78, 121, 0.07); color: var(--primary-soft); font-size: 0.8rem; margin: 2px 4px 2px 0;
}
.tag::before { content: "#"; opacity: 0.6; }

.comments { margin-top: 1rem; border-top: 1px dashed var(--line); padding-top: 0.8rem; }
.comment {
  background: var(--surface-2); border-radius: 9px; padding: 0.6rem 0.85rem; margin: 0.5rem 0;
}
.comment .who { color: var(--primary); font-weight: 600; font-size: 0.88rem; }
.comment .when { color: var(--muted); font-size: 0.78rem; margin-left: 0.4rem; }
.comment .body { margin: 0.25rem 0 0; white-space: pre-wrap; font-size: 0.95rem; }
.comment-form { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.comment-form input { flex: 1; margin: 0; }
.comment-form button { margin: 0; white-space: nowrap; }

.btn-sm { padding: 0.34rem 0.7rem; font-size: 0.82rem; margin-top: 0; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--primary); }
.btn-danger { background: #a23c3c; }
.btn-danger:hover { background: #b84a4a; }
.btn-line { background: #06c755; }
.btn-line:hover { background: #05b34c; }

img { max-width: 100%; }
