/* 共用樣式：顏色由 build.py 從店家設定寫進 <style> 的 :root，這裡只用變數 */
*, *::before, *::after { box-sizing: border-box; }

:root {
  color-scheme: light;
  --wrap: 1040px;
  --top-h: 60px;      /* 頁首高度，site.js 會量實際值寫回來 */
  --gut: 16px;
  --r: 14px;
  --shadow: 0 1px 2px rgba(18, 16, 14, .06), 0 8px 24px -12px rgba(18, 16, 14, .18);
  --hair: color-mix(in srgb, var(--brand) 16%, transparent);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.75 var(--font, "Noto Sans TC", "PingFang TC", "Hiragino Sans TC", "Microsoft JhengHei", system-ui, sans-serif);
  letter-spacing: .01em;
  overflow-wrap: break-word;
}

h1, h2, h3 { line-height: 1.3; letter-spacing: -.01em; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ── 頁首 ───────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--brand); color: var(--on-brand);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.top-in { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { font-size: 18px; font-weight: 700; display: block; }
.brand small { display: block; font-family: var(--font-latin, inherit); font-size: 10px; letter-spacing: .18em; opacity: .7; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 15px; padding: 7px 10px; border-radius: 9px;
  opacity: .85;
}
.nav a:hover, .nav a[aria-current] { opacity: 1; background: rgba(255, 255, 255, .13); }
.top .btn { padding: 9px 15px; font-size: 15px; }

/* ── 按鈕 ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-line { background: #06c755; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── 第一屏 ─────────────────────────────────────────── */
.hero { background: var(--brand); color: var(--on-brand); position: relative; overflow: hidden; }
.hero-in { padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 72px); position: relative; z-index: 1; max-width: 720px; }
.hero h1 { font-size: clamp(31px, 7.6vw, 54px); letter-spacing: -.02em; }
.hero .lead { margin-top: 18px; font-size: clamp(16px, 2.2vw, 19px); opacity: .88; max-width: 34em; }
.hero .btn-row { margin-top: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 32px; font-size: 14px; opacity: .8; }
.hero-facts li { display: flex; align-items: center; gap: 7px; }
.hero-facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
/* 還沒有照片時用這個圖形撐版面 */
.hero-art { position: absolute; inset-block: 0; right: -14%; width: min(560px, 62%); opacity: .13; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; }
.hero-photo { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; opacity: .34; }

/* ── 區塊 ───────────────────────────────────────────── */
.sec { padding: clamp(44px, 7vw, 76px) 0; scroll-margin-top: calc(var(--top-h) + 10px); }
.sec + .sec { border-top: 1px solid var(--hair); }
.sec-head { max-width: 46em; margin-bottom: 26px; }
.eyebrow { font-size: 12px; font-family: var(--font-latin, inherit); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.sec h2 { font-size: clamp(23px, 3.6vw, 31px); margin-top: 6px; }
.sec-head .lead { margin-top: 12px; color: var(--muted); }

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--surface); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 15px; color: var(--accent); letter-spacing: .02em; }
.card p { margin-top: 6px; }
.card .big { font-size: 20px; font-weight: 700; }
.card .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.card .plist { margin-top: 14px; font-size: 15px; }
.card .plist li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair); }
.card .plist b { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }

.rows { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.rows li { display: grid; grid-template-columns: 7.5em 1fr; gap: 4px 16px; padding: 15px 20px; }
.rows li + li { border-top: 1px solid var(--hair); }
.rows dt, .rows .k { font-weight: 700; color: var(--accent); font-size: 15px; }
.rows .v { min-width: 0; }

.ticks { margin-top: 16px; display: grid; gap: 9px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: 700; flex: none; }

.note { font-size: 14.5px; color: var(--muted); margin-top: 14px; }
/* 第一屏是深色底：--muted 在這裡會看不見 */
.hero .note { color: inherit; opacity: .8; }

/* ── Google 評分 ────────────────────────────────────── */
.rating { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.rating .score { font-size: 38px; font-weight: 700; line-height: 1; }
.rating .stars { color: var(--accent); font-size: 18px; letter-spacing: .12em; }
.rating .meta { font-size: 14px; color: var(--muted); }
.rating a { margin-left: auto; }

/* ── 菜單摘要（首頁） ────────────────────────────────── */
.menu-sum { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.menu-sum a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  background: var(--surface); border-radius: var(--r); padding: 16px 18px;
  text-decoration: none; box-shadow: var(--shadow);
}
.menu-sum b { font-size: 17px; }
.menu-sum span { font-size: 14px; color: var(--muted); white-space: nowrap; }

/* ── 地圖 ───────────────────────────────────────────── */
.map { margin-top: 18px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.map iframe { display: block; width: 100%; height: 320px; border: 0; }

/* ── 相簿（之後有照片才會出現） ──────────────────────── */
.gal { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.gal figure { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.gal img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gal figcaption { font-size: 13px; color: var(--muted); padding: 9px 12px; }

/* ── 頁尾 ───────────────────────────────────────────── */
.foot { background: var(--brand); color: var(--on-brand); padding: 44px 0 32px; margin-top: 0; }
.foot-in { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.foot h3 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; opacity: .62; margin-bottom: 10px; }
.foot a { text-decoration: none; opacity: .9; }
.foot a:hover { opacity: 1; text-decoration: underline; }
.foot li + li { margin-top: 6px; }
.foot .fine { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .17); font-size: 13px; opacity: .62; display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ── 菜單頁 ─────────────────────────────────────────── */
.page-head { background: var(--brand); color: var(--on-brand); padding: clamp(34px, 6vw, 60px) 0 clamp(28px, 5vw, 44px); }
.page-head h1 { font-size: clamp(27px, 5.2vw, 40px); }
.page-head .lead { margin-top: 12px; opacity: .85; max-width: 40em; }

.catnav { position: sticky; top: var(--top-h); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--hair); }
.catnav ul { display: flex; gap: 7px; overflow-x: auto; padding: 11px var(--gut); scrollbar-width: none; max-width: var(--wrap); margin-inline: auto; }
.catnav ul::-webkit-scrollbar { display: none; }
.catnav a {
  white-space: nowrap; text-decoration: none; font-size: 14.5px; font-weight: 700;
  padding: 7px 14px; border-radius: 999px; background: var(--surface); color: var(--muted);
  border: 1px solid var(--hair);
}
.catnav a.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.mcat { padding: clamp(32px, 5vw, 52px) 0 0; scroll-margin-top: calc(var(--top-h) + 58px); }
.mcat > h2 { font-size: clamp(21px, 3.2vw, 28px); }
.ihead { display: flex; align-items: center; gap: 13px; --ico: 40px; }
.ihead .ico { width: var(--ico); height: var(--ico); flex: none; color: var(--accent); }
.ihead .ico svg { width: 100%; height: 100%; display: block; }
/* 標題被插圖推右了，底下的說明也要跟著對齊，不然會變階梯 */
.sec-head:has(.ihead) .lead,
.mcat:has(.ihead .ico) .cat-note,
.mcat:has(.ihead .ico) .price-note { margin-left: 53px; }
.mcat .en { font-size: 12px; font-family: var(--font-latin, inherit); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.mcat .cat-note { margin-top: 10px; font-size: 14.5px; color: var(--muted); max-width: 44em; }
.mcat .price-note { display: inline-block; margin-top: 10px; font-weight: 700; background: var(--surface); border-radius: 999px; padding: 4px 13px; font-size: 15px; box-shadow: var(--shadow); }

.mgroup { margin-top: 20px; }
.mgroup > h3 { font-size: 14px; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.items { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.items li { display: flex; gap: 14px; align-items: baseline; padding: 14px 18px; }
.items li + li { border-top: 1px solid var(--hair); }
.items .nm { min-width: 0; flex: 1; }
.items .nm b { font-weight: 700; font-size: 16.5px; }
.items .star { color: var(--accent); margin-left: 4px; }
.items .sub { display: block; font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.items .pr { font-weight: 700; white-space: nowrap; font-size: 15.5px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-left: 7px; vertical-align: middle; }
.chip { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }

.fine-print { margin-top: 36px; background: var(--surface); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); font-size: 14.5px; color: var(--muted); }
.fine-print li { display: flex; gap: 9px; }
.fine-print li + li { margin-top: 7px; }
.fine-print li::before { content: "・"; flex: none; }

/* ── 手機 ───────────────────────────────────────────── */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top-in { flex-wrap: wrap; padding-block: 8px; gap: 8px 10px; min-height: 0; }
  .brand { order: 1; }
  .top .btn { order: 2; padding: 8px 14px; font-size: 14px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 9px; font-size: 14px; }
  .hero-art { right: -30%; width: 88%; opacity: .1; }
  .ihead { --ico: 32px; gap: 10px; }
  .sec-head:has(.ihead) .lead,
  .mcat:has(.ihead .ico) .cat-note,
  .mcat:has(.ihead .ico) .price-note { margin-left: 0; }
  .rows li { grid-template-columns: 1fr; }
  .rating .score { font-size: 32px; }
  .rating a { margin-left: 0; flex-basis: 100%; }
  .btn-row .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
