/* 小潘的吃吃喝喝 panyfood.com：全站樣式（顏色在 :root） */
:root {
  --main: #0f766e;        /* 主色：茶綠 */
  --main-dark: #115e59;
  --main-soft: #ecfdf5;
  --accent: #f59e0b;      /* 強調：奶茶金 */
  --accent-soft: #fff7e6;
  --ink: #111111;
  --ink-soft: #3e4852;
  --line: #e4e7eb;
  --bg: #fafbfa;
  --card: #ffffff;
  --img-bg: #ececec;
  --gold: #fbbc04;
  --font: "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Noto Sans TC", sans-serif;
  --body-size: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: var(--body-size); line-height: 1.8;
}
main { flex: 1; width: 100%; }
img { max-width: 100%; height: auto; display: block; background: var(--img-bg); }
a { color: var(--main); }
p { text-align: justify; margin: 0 0 1em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ── header ── */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 12px; }
.brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo, .about-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--main); color: #fff;
  display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-size: 24px; font-weight: 700; margin: 0; }
.brand-tagline { font-size: 14px; color: var(--ink-soft); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; font-size: 22px; padding: 2px 10px; cursor: pointer; }
.topnav { background: var(--main); }
.topnav-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 auto; }
.topnav-links a { display: block; color: #fff; text-decoration: none; padding: 9px 14px; font-size: 16px; }
.topnav-links a:hover { background: var(--main-dark); }

/* ── 版面 ── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 16px 0 40px; }
.section { padding: 24px 0 40px; }
.section-title { font-size: 24px; margin: 0 0 16px; padding-left: 10px; border-left: 4px solid var(--main); }
.breadcrumb { font-size: 14px; color: var(--ink-soft); margin: 4px 0 8px; }
.breadcrumb a { color: var(--ink-soft); }

/* ── 卡片 ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgb(0 0 0 / 8%); display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--img-bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { display: grid; place-items: center; height: 100%; font-size: 28px; font-weight: 700; color: var(--main); }
.card-badge { position: absolute; left: 10px; top: 10px; background: var(--main); color: #fff; font-size: 13px; padding: 2px 9px; border-radius: 99px; }
.card-body { padding: 12px 14px 14px; }
.card-title { font-size: 18px; line-height: 1.5; margin: 0 0 6px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-excerpt { font-size: 15px; color: var(--ink-soft); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 13px; color: var(--ink-soft); }
.empty { color: var(--ink-soft); }

/* ── 文章 ── */
.post-title { font-size: 28px; line-height: 1.5; margin: 6px 0 10px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.tag { background: var(--main-soft); color: var(--main-dark); text-decoration: none; padding: 1px 10px; border-radius: 99px; }
.post-cover { margin: 0 0 18px; }
.post-cover img { width: 100%; border-radius: 8px; }
.post-cover figcaption, .credit { font-size: 13px; color: var(--ink-soft); margin-top: 6px; text-align: center; }
.credit a { color: var(--ink-soft); }
.post-lead { border-left: 4px solid var(--accent); padding: 2px 16px; margin-bottom: 18px; }
.post-lead p:last-child { margin-bottom: 0; }

.toc { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 12px 18px; margin: 0 0 24px; font-size: 16px; }
.toc-head { display: flex; align-items: center; gap: 10px; }
.toc-toggle { background: none; border: 0; color: var(--main); cursor: pointer; font-size: 14px; }
.toc-list { margin: 6px 0 0; padding-left: 22px; line-height: 1.9; }
.toc-list ol { padding-left: 20px; font-size: 15px; }
.toc-list a { color: var(--ink); text-decoration: none; }
.toc-list a:hover { color: var(--main); }
.toc-list.is-hidden { display: none; }

.post-section { margin: 0 0 34px; }
.post-section h2 { font-size: 24px; line-height: 1.5; margin: 0 0 14px; padding: 8px 14px; background: var(--main); color: #fff; border-radius: 6px; }
.post-section h3 { font-size: 21px; line-height: 1.5; margin: 22px 0 10px; padding-left: 10px; border-left: 4px solid var(--accent); }
.menu-figure, .promo-figure, .rec-figure { margin: 0 0 14px; }
.menu-figure img, .promo-figure img, .rec-figure img { width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.rec-figure img { max-height: 520px; object-fit: contain; background: #fff; }
.promo-period { font-size: 15px; color: var(--main-dark); font-weight: 700; margin-bottom: 8px; }
.rec-rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; margin-right: 8px; vertical-align: 2px; }

.info-table, .review-table { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--card); margin: 6px 0 10px; }
.info-table th, .info-table td, .review-table th, .review-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.info-table th, .review-table thead th { background: var(--main-soft); width: 110px; white-space: nowrap; }
.review-table thead th { width: auto; }

.faq-item { border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin-bottom: 10px; padding: 0 16px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; }
.faq-item summary::before { content: "Q. "; color: var(--main); }
.faq-item[open] summary { border-bottom: 1px dashed var(--line); margin-bottom: 10px; }

.stars { position: relative; display: inline-block; color: #e0e0e0; letter-spacing: 1px; }
.stars::before { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--pct); overflow: hidden; color: var(--gold); white-space: nowrap; }
.review-points { display: grid; gap: 12px; margin-top: 10px; }
.review-point { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px 16px 4px; }
.review-point h3 { margin-top: 12px; }
.review-good h3 { border-left-color: var(--main); }
.review-bad h3 { border-left-color: #dc2626; }
.review-summary { background: var(--main-soft); border-radius: 8px; padding: 2px 16px 4px; margin-top: 14px; }
.review-summary h3 { margin-top: 12px; }
.note { font-size: 15px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 14px; }

/* ── 側欄 ── */
.sidebar { display: flex; flex-direction: column; gap: 18px; padding-top: 14px; }
.widget { background: var(--card); border-radius: 10px; box-shadow: 0 1px 3px rgb(0 0 0 / 8%); padding: 18px; }
.widget h3 { margin: 0 0 8px; font-size: 18px; }
.widget.about { text-align: center; }
.widget.about .about-avatar { width: 110px; height: 110px; font-size: 48px; margin: 0 auto 10px; border-radius: 50%; }
.widget.about .about-photo { display: block; width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; object-fit: cover; margin: 4px auto 12px; border-radius: 10px; }
.widget.about p { font-size: 15px; color: var(--ink-soft); line-height: 1.75; }
.widget-list { list-style: none; padding: 0; margin: 0; font-size: 16px; }
.widget-list li { border-bottom: 1px dashed var(--line); padding: 6px 0; }
.widget-list a { color: var(--ink); text-decoration: none; }

/* ── footer ── */
.site-footer { background: var(--main-dark); color: #d1fae5; margin-top: 20px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 22px; font-size: 15px; }
.footer-inner p { margin: 4px 0 0; }
.copyright { white-space: nowrap; }
.btn { display: inline-block; background: var(--main); color: #fff; padding: 8px 18px; border-radius: 6px; text-decoration: none; }
.empty-page { text-align: center; padding: 80px 0; }
.scrolltotop { position: fixed; right: 16px; bottom: 16px; width: 42px; height: 42px; border-radius: 50%; background: var(--main); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 20px; opacity: .85; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --body-size: 17px; }
  .container { padding: 0 12px; }
  .nav-toggle { display: block; }
  .topnav-links { display: none; flex-direction: column; padding: 4px 0; }
  .topnav-links.is-open { display: flex; }
  .brand-name { font-size: 21px; }
  .brand-logo { width: 44px; height: 44px; font-size: 22px; }
  .post-title { font-size: 23px; }
  .post-section h2 { font-size: 21px; }
  .post-section h3 { font-size: 19px; }
  .footer-inner { flex-direction: column; }
}
