:root {
  --bg: #fffaf8;
  --surface: #ffffff;
  --ink: #3b3335;
  --muted: #7d7073;
  --accent: #d9788e;
  --accent-soft: #fbe9ed;
  --line: #06c755;
  --border: #f0e2e5;
  --radius: 14px;
  --serif: "Noto Serif TC", serif;
  --sans: "Noto Sans TC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.85; font-size: 17px; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* 頁首與選單 */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: .05em; }
.menu-btn { display: none; font-size: 24px; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px 8px; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; padding: 0 0 10px; margin-block: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a, .sub a { display: block; padding: 6px 10px; color: var(--ink); text-decoration: none; border-radius: 8px; font-size: 15px; }
.nav-item > a:hover, .nav-item > a.active, .sub a:hover, .sub a.active { background: var(--accent-soft); color: var(--accent); }
.sub-toggle { display: none; }
.sub { list-style: none; margin: 0; padding: 6px; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(80, 40, 50, .1); display: none; }
.nav-item:nth-last-child(-n+2) .sub { left: auto; right: 0; }
.nav-item:hover .sub, .nav-item:focus-within .sub { display: block; }

/* 首頁英雄區 */
.hero { background: linear-gradient(135deg, #f6eef0, #fdf6f3); border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 24px; padding: 48px 0 0; }
.hero.no-photo .hero-inner { grid-template-columns: 1fr; text-align: center; padding-bottom: 48px; }
.hero-title { font-family: var(--serif); font-size: clamp(32px, 5vw, 52px); margin: 0 0 6px; letter-spacing: .08em; font-weight: 500; }
.hero-sub { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); margin: 0 0 18px; letter-spacing: .1em; }
.hero-lines { list-style: none; padding: 16px 0 0; margin: 0 0 24px; border-top: 1px solid #d8c9cc; }
.hero.no-photo .hero-lines { display: inline-block; }
.hero-photo img { display: block; max-height: 420px; margin-left: auto; }
.btn-line, .float-line { background: var(--line); color: #fff; text-decoration: none; border-radius: 999px; font-weight: 700; }
.btn-line { display: inline-block; padding: 10px 22px; margin-bottom: 40px; }

/* 內頁 */
.page { padding: 28px 0 56px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.page-title { font-family: var(--serif); font-size: clamp(26px, 4vw, 36px); margin: 0 0 18px; }
.page-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(16px, 4vw, 40px); overflow-wrap: anywhere; }
.page-body h2 { font-family: var(--serif); color: var(--accent); font-size: 1.35em; line-height: 1.5; margin: 1.4em 0 .5em; }
.page-body h3 { font-size: 1.15em; margin: 1.2em 0 .4em; }
.page-body table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.page-body td, .page-body th { border: 1px solid var(--border); padding: 6px 10px; }
.page-body img { border-radius: 10px; }
.loading { color: var(--muted); text-align: center; }
.children { margin-top: 28px; }
.children h2 { font-family: var(--serif); font-size: 22px; }
.child-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.child-list a { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--ink); }
.child-list a:hover { border-color: var(--accent); color: var(--accent); }

.site-footer { border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 14px; padding: 24px 0 80px; }
.float-line { position: fixed; right: 16px; bottom: 16px; padding: 12px 18px; box-shadow: 0 6px 18px rgba(6, 199, 85, .35); z-index: 30; }

/* 手機版 */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .menu-btn { display: block; }
  .site-nav { display: none; border-top: 1px solid var(--border); max-height: calc(100vh - 60px); overflow-y: auto; }
  body.nav-open .site-nav { display: block; }
  .nav-list { flex-direction: column; padding: 8px 0; }
  .nav-item { flex-wrap: wrap; }
  .nav-item > a { flex: 1; }
  .sub-toggle { display: block; background: none; border: 0; font-size: 18px; padding: 4px 12px; color: var(--muted); }
  .sub, .nav-item:nth-last-child(-n+2) .sub { position: static; display: none; box-shadow: none; border: 0; width: 100%; padding: 0 0 0 14px; }
  .nav-item:hover .sub, .nav-item:focus-within .sub { display: none; }
  .nav-item.open .sub { display: block; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 32px; }
  .hero-lines { display: inline-block; }
  .hero-photo img { margin: 0 auto; max-height: 300px; }
}
