:root { --accent: #e69334; --ink: #33393d; --quiet: #70797f; --line: #e6e2da; --bg: #fffdf9; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; padding-bottom: 60px; }
img { max-width: 100%; height: auto; display: block; }
a { color: #b96d17; }
h1 { font-size: 26px; line-height: 1.35; margin: 16px 0; }
h2 { font-size: 21px; margin: 32px 0 12px; }
.site-main { max-width: 1040px; margin: 0 auto; padding: 16px; }
.hero .slide + .slide { margin-top: 12px; }
.hero img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; }
.motto { text-align: center; color: var(--quiet); margin: 16px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.card a { color: inherit; text-decoration: none; display: block; }
.card img { width: 100%; height: 170px; object-fit: cover; }
.card-body { padding: 14px 16px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 4px 0; }
.bar { height: 10px; background: #f1ebe0; border-radius: 6px; overflow: hidden; margin-top: 10px; }
.bar span { display: block; height: 100%; background: var(--accent); }
.bar-text { margin: 8px 0 0; }
.bar-sub { color: var(--quiet); font-size: 14px; margin: 2px 0; }
.progress-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 10px 24px; border-radius: 24px; text-decoration: none; font-weight: 700; margin-top: 10px; }
.btn.ghost { background: #fff; color: #b96d17; border: 1px solid var(--accent); }
.btn.line { background: #06c755; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-list time { color: var(--quiet); font-size: 14px; margin-left: 8px; }
.news-list p { margin: 4px 0 0; color: var(--quiet); }
.tag { display: inline-block; font-size: 13px; background: #f6efe3; padding: 0 8px; border-radius: 4px; margin-right: 6px; }
.tag.pin { background: var(--accent); color: #fff; }
.more { text-align: right; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.filter input, .filter select, .filter button { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.filter input { flex: 1; min-width: 140px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
.pager a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.pager a.on { background: var(--accent); color: #fff; }
.article { max-width: 760px; margin: 0 auto; }
.article > time { color: var(--quiet); }
.crumb { color: var(--quiet); font-size: 14px; margin: 0; }
.cover { width: 100%; border-radius: 10px; margin: 14px 0; }
.rich img { border-radius: 6px; margin: 10px 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.update { border-left: 3px solid var(--accent); padding-left: 12px; margin: 14px 0; }
.update h3 { margin: 0; font-size: 17px; }
.update time { color: var(--quiet); font-size: 14px; }
.empty { color: var(--quiet); padding: 16px 0; }
.links-row { display: flex; gap: 12px; margin: 28px 0; }
.links-row a { flex: 1; text-align: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.site-foot { text-align: center; color: var(--quiet); font-size: 14px; padding: 24px 16px; border-top: 1px solid var(--line); }
.quick-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--line); z-index: 10; }
.quick-bar a { flex: 1; text-align: center; padding: 12px 4px; color: var(--ink); text-decoration: none; font-weight: 600; }
.quick-bar a:first-child { background: var(--accent); color: #fff; }
@media (min-width: 768px) { .quick-bar { display: none; } body { padding-bottom: 0; } }

/* 行事曆 */
.cal { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-title { font-size: 19px; min-width: 130px; text-align: center; }
.cal-head button { font: inherit; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 2px 12px; cursor: pointer; color: var(--ink); }
.cal-head .cal-prev, .cal-head .cal-next { font-size: 20px; line-height: 1.3; }
.cal-head .cal-today { margin-left: auto; font-size: 14px; padding: 4px 12px; }
.cal-head button:hover { border-color: var(--accent); color: #b96d17; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid .wd { text-align: center; font-size: 14px; font-weight: 700; color: var(--quiet); padding: 4px 0; }
.cal-grid .wd.we { color: #c4573f; }
.cal-grid .day { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 86px; padding: 6px; border: 1px solid #efebe3; border-radius: 8px; background: #fff; cursor: pointer; overflow: hidden; color: var(--ink); }
.cal-grid .day.we { background: #fdf3ef; }
.cal-grid .day.we .num { color: #c4573f; }
.cal-grid .day:hover { border-color: var(--accent); }
.cal-grid .day.today .num { background: var(--accent); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.cal-grid .day.sel { border: 2px solid var(--accent); padding: 5px; }
.cal-grid .num { font-size: 14px; font-weight: 600; line-height: 26px; }
.cal-grid .ev { display: block; font-size: 12px; line-height: 1.45; background: #fdf1e0; color: #8a5414; border-left: 3px solid var(--accent); border-radius: 3px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-grid .ev.more { background: none; border: 0; color: var(--quiet); padding: 0 4px; }
.cal-legend { font-size: 13px; color: var(--quiet); margin: 10px 0 0; }
.cal-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.cal-legend .lg-we { background: #fdf3ef; border: 1px solid #f0cfc4; }
.cal-legend .lg-ev { background: var(--accent); margin-left: 6px; }
.cal-detail { margin-top: 14px; padding: 14px 16px; background: #fffaf2; border: 1px solid #f3d3a4; border-radius: 10px; }
.cal-detail h3 { margin: 0 0 8px; font-size: 17px; color: #b96d17; }
.cal-list-title { font-size: 17px; margin: 20px 0 6px; }
.ev-item { border-bottom: 1px solid var(--line); }
.ev-item summary { cursor: pointer; padding: 10px 0; list-style: none; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ev-item summary::-webkit-details-marker { display: none; }
.ev-item summary:before { content: '▸'; color: var(--accent); }
.ev-item[open] summary:before { content: '▾'; }
.ev-when { color: #b96d17; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ev-title { font-weight: 700; }
.ev-body { padding: 0 0 12px 18px; }
.ev-body p { margin: 4px 0; }
.ev-meta { color: var(--quiet); font-size: 14px; }
.cal-detail .ev-item:last-child { border-bottom: 0; }
@media (max-width: 640px) {
  .cal { padding: 12px 8px; }
  .cal-grid { gap: 2px; }
  .cal-grid .day { min-height: 50px; padding: 4px 2px; align-items: center; }
  .cal-grid .day.sel { padding: 3px 1px; }
  .cal-grid .ev { display: none; }
  .cal-grid .day.has:after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
}

/* 快速導航 */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 24px; }
.quick-links a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.quick-links a span { font-size: 26px; line-height: 1; }
.quick-links a:hover { border-color: var(--accent); color: #b96d17; }
@media (max-width: 540px) { .quick-links { grid-template-columns: repeat(2, 1fr); } }

/* 會員專區 */
.tabs a.on { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--accent); }
.member-tabs { margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.member-form.narrow { max-width: 460px; }
.form label { display: block; margin: 14px 0 4px; font-weight: 600; }
.form label.radio { font-weight: 400; margin: 6px 0; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=tel], .form input[type=date], .form textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #d9d3c7; border-radius: 8px; background: #fff; }
.form textarea { min-height: 80px; }
.form input:focus, .form textarea:focus { outline: 2px solid #f3c88f; border-color: var(--accent); }
.form h2 { font-size: 18px; margin: 28px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.form button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.hint { color: var(--quiet); font-size: 14px; }
.notice { padding: 10px 14px; border-radius: 8px; margin: 12px 0; background: #e8f5ea; }
.notice.err { background: #fbe6e2; color: #9b2c1f; }
.notice.warn { background: #fdf1d8; }
.badge { display: inline-block; font-size: 14px; padding: 1px 10px; border-radius: 12px; background: #eee; }
.badge.approved { background: #e3f3e6; color: #276b35; }
.badge.pending { background: #fdf1d8; color: #8a5414; }
.badge.rejected, .badge.suspended { background: #fbe6e2; color: #9b2c1f; }
table.kv, table.rights, table.list { border-collapse: collapse; width: 100%; }
table.kv th { text-align: left; width: 110px; color: var(--quiet); font-weight: 500; padding: 4px 0; }
table.kv td { padding: 4px 0; }
table.rights th, table.rights td { border: 1px solid var(--line); padding: 8px; text-align: center; }
table.rights th { background: #faf6ef; }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.doc-list a { font-weight: 600; }
