:root {
  --bg: #f3f0ea;
  --bg-elev: #fffcf7;
  --ink: #1c1b19;
  --muted: #5e5b55;
  --line: #e2ddd4;
  --accent: #243a38;
  --accent-hover: #182c2a;
  --note-bg: #efeae2;
  --note-edge: #8d7f6c;
  --shadow: 0 10px 28px rgba(28, 27, 25, 0.06);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang TC", "Hiragino Sans CNS", "Noto Sans TC",
    "Microsoft JhengHei", "Heiti TC", sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--accent); }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 234, 0.92);
  backdrop-filter: blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.site-title {
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.35rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover,
.site-title:hover,
.back a:hover {
  color: var(--ink);
}

nav a[aria-current="page"] {
  color: var(--ink);
}

.hero {
  padding: 4.25rem 0 2.5rem;
}

.hero-compact {
  padding: 2.5rem 0 1.5rem;
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2.15rem, 4.4vw, 3rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lede {
  margin: 0;
  max-width: 22em;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding-bottom: 4.25rem;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(28, 27, 25, 0.08);
}

.card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ddd8cf;
}

.card-image img,
.service-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.35rem 1.45rem 1.55rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h2 {
  margin: 0 0 0.55rem;
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.card-body p {
  margin: 0 0 1.3rem;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.7;
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: var(--accent);
  color: #f8f6f2;
  text-decoration: none;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.btn:hover { background: var(--accent-hover); color: #fff; }

.page-title {
  font-size: 1.7rem;
  margin: 0 0 1.4rem;
}

.post-header {
  margin-bottom: 1.4rem;
}

.post-header h1,
.service h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.post-header time {
  color: var(--muted);
  font-size: 0.9rem;
}

.content p { margin: 0 0 1.05rem; }
.content a { color: var(--accent); }

.service-hero {
  margin: 0 0 1.6rem;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #ddd8cf;
}

.note {
  margin: 2rem 0 0;
  padding: 0.95rem 1.1rem;
  background: var(--note-bg);
  border-left: 3px solid var(--note-edge);
  border-radius: 0 10px 10px 0;
  color: #3b3935;
  font-size: 0.92rem;
  line-height: 1.65;
}

.note p { margin: 0; }

.back {
  margin: 2.4rem 0 0;
  font-size: 0.92rem;
}

.back a { text-decoration: none; color: var(--muted); }

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
}

.post-list time {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.post-list a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  font-size: 1.08rem;
}

.post-list a:hover { color: var(--accent); }

.summary {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.35rem 0 2rem;
}

.site-footer p { margin: 0; }

@media (max-width: 720px) {
  html { font-size: 16px; }

  .hero { padding: 3rem 0 2rem; }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding-bottom: 3.5rem;
  }

  .site-header .wrap { min-height: 3.5rem; }

  .wrap, .prose { padding-left: 1.15rem; padding-right: 1.15rem; }
}

.card-text { color: var(--muted); font-size: 0.97rem; line-height: 1.75; flex: 1; margin-bottom: 1.3rem; }
.card-text p { margin: 0 0 0.75rem; }
.card-text strong { color: var(--ink); }
.card-text .note, .card-text aside { font-size: 0.85rem; margin-top: 0.9rem; }

.about .en { font-size: 0.5em; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; margin-left: 0.4em; }
.about-text { max-width: 40em; color: var(--muted); font-size: 1.05rem; line-height: 1.85; }
.about-text p { margin: 0 0 0.9rem; }
.about-text strong { color: var(--ink); }
.about-more { margin-top: 1.3rem !important; }

.about-more a { display: inline-block; font-size: 1.3rem; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; transition: opacity .2s; }
.about-more a:hover { opacity: .7; }
.about-page .content h3 { margin-top: 2.4rem; }
.about-page .content p { line-height: 1.9; }

/* 背景音樂播放器 */
.music-player { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; align-items: center; gap: 6px; padding: 6px; background: rgba(28,27,25,.88); color: #fff; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.18); backdrop-filter: blur(6px); font-size: .9rem; }
.music-player[hidden] { display: none; }
.mp-btn { appearance: none; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; }
.mp-btn:hover { background: rgba(255,255,255,.12); }
.mp-icon { display: inline-block; width: 1.1em; text-align: center; font-size: .95em; }
.mp-title { max-width: 12em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: .75; font-size: .82rem; }
.mp-title:empty { display: none; }
.music-player.is-playing .mp-icon { animation: mp-pulse 1.6s ease-in-out infinite; }
@keyframes mp-pulse { 50% { opacity: .45; } }
@media (max-width: 600px) { .music-player { right: 12px; bottom: 12px; } .mp-title { max-width: 7em; } }
.mp-btn[hidden] { display: none; }
.mp-title { padding-right: 10px; }
/* 首頁最上方橫幅 */
.top-banner{max-width:1200px;margin:16px auto 0;padding:0 16px}
.top-banner img{display:block;width:100%;height:auto;border-radius:14px;box-shadow:0 6px 24px rgba(0,0,0,.18)}
@media (max-width:640px){.top-banner{margin-top:0;padding:0}.top-banner img{border-radius:0;box-shadow:none}}
/* 關於我內頁排版 */
.about-page .prose{max-width:46rem}
.about-page h1{font-size:clamp(2rem,5vw,2.8rem);margin-bottom:1.4rem}
.about-page .content p{margin:0 0 1rem;line-height:1.95}
.about-page .content .lead{font-size:1.2rem;color:var(--ink);line-height:1.9;margin-bottom:1.4rem}
.about-page .content .tagline{display:inline-block;background:var(--ink);color:#fff;padding:.45rem 1.1rem;border-radius:999px;font-size:.95rem;font-weight:600;letter-spacing:.03em;margin:.2rem 0 1.8rem}
.about-page .content h2{position:relative;font-size:clamp(1.35rem,3.4vw,1.7rem);line-height:1.45;margin:0 0 1.4rem;padding-left:1rem}
.about-page .content h2::before{content:"";position:absolute;left:0;top:.2em;bottom:.2em;width:5px;border-radius:3px;background:linear-gradient(#f5c542,#e8893a)}
.about-page .content hr{border:0;height:auto;margin:3rem 0;text-align:center;color:#c9a35a;letter-spacing:.8em;font-size:1rem}
.about-page .content hr::before{content:"✦ ✦ ✦"}
.about-page .content .hl{background:linear-gradient(135deg,rgba(245,197,66,.16),rgba(232,137,58,.10));border-left:4px solid #e8a33a;border-radius:0 12px 12px 0;padding:.9rem 1.2rem;margin:1.4rem 0;font-size:1.06rem}
.about-page .content .quote{text-align:center;font-size:1.3rem;margin:1.8rem 0;padding:1.2rem;border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12)}
.about-page .content .quote strong{font-weight:800}
.about-closing{margin:3.5rem 0 1rem;padding:2.4rem 1.6rem;border-radius:18px;text-align:center;color:#fff;background:linear-gradient(135deg,#1e3a6b 0%,#3b4f8a 45%,#e8893a 100%);box-shadow:0 10px 30px rgba(30,58,107,.25)}
.about-page .content .about-closing p{margin:0}
.about-closing .closing-title{font-size:clamp(1.5rem,4.5vw,2.1rem);font-weight:800;color:#ffd76a;line-height:1.4;margin-bottom:.8rem !important}
.about-closing .closing-sub{font-size:1.05rem;line-height:1.8;opacity:.95}
@media (max-width:640px){.about-page .content .lead{font-size:1.1rem}.about-page .content .tagline{font-size:.85rem;border-radius:14px}.about-page .content .hl{padding:.8rem 1rem}}
/* 首頁關於我排版 */
.about-text .lead{font-size:1.15rem;color:var(--ink);line-height:1.9}
.about-text .hl{background:linear-gradient(135deg,rgba(245,197,66,.16),rgba(232,137,58,.10));border-left:4px solid #e8a33a;border-radius:0 12px 12px 0;padding:.85rem 1.15rem;margin:1.2rem 0 !important;color:var(--ink)}
.about-text .motto{display:inline-block;background:var(--ink);color:#fff;padding:.5rem 1.1rem;border-radius:14px;font-weight:600;margin-top:.4rem !important}
