* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #c94f22; --primary-2: #e2703a; --primary-dark: #9a3714; --primary-soft: #fce9db;
  --gold: #d1a63f; --ink: #2a231c; --muted: #8c8073; --line: #e7ded0;
  --bg: #f4efe4; --card: #fefaf3; --ok: #3f7a52; --warn: #b0431f;
  --shadow: 0 3px 16px rgba(60,45,20,.10); --shadow-lg: 0 18px 44px rgba(45,30,10,.20);
}
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: "PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif;
  color: var(--ink); background: var(--bg); min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden;
}
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -.12em; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 動態水彩背景 */
#wc-bg { position: fixed; top:0; right:0; bottom:0; left:0; inset: 0; z-index: -1; overflow: hidden; filter: blur(64px) saturate(1.05); opacity: .9; }
.wc-ball { position: absolute; top: 50%; left: 50%; width: 62vmax; height: 62vmax; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--color), transparent 68%);
  mix-blend-mode: soft-light; transform: translate(-50%,-50%);
  animation: wc-spin var(--d) linear infinite; }
.wc-ball:nth-child(2) { animation-direction: reverse; }
@keyframes wc-spin { to { transform: translate(-50%,-50%) rotate(360deg) translateX(var(--i)); } }

/* 頂欄 */
.l-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px,5vw,48px); background: linear-gradient(#fffdf9ee,#f6f1e8dd);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 2px solid var(--primary); }
.l-brand { font-weight: 900; font-size: 19px; color: var(--primary-dark); letter-spacing: .02em; }
/* 品牌 LOGO:抬頭小張並排店名,hero 大張置中;未設定時 hidden,版面自動退回純文字 */
.l-brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.l-brand-wrap #top-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.hero #hero-logo { display: block; margin: 0 auto clamp(12px,2.5vw,20px); width: 88px; width: clamp(88px,18vw,148px);
  height: 88px; height: clamp(88px,18vw,148px); object-fit: contain; border-radius: 20px; }
.l-staff { font-size: 13.5px; color: var(--muted); text-decoration: none; padding: 9px 18px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff8; transition: .15s;
  min-height: 40px; display: inline-flex; align-items: center; }
.l-staff:hover { color: var(--primary); border-color: var(--primary); }

.l-main { max-width: 1040px; margin: 0 auto; padding: 28px; padding: clamp(28px,6vw,64px) clamp(16px,5vw,48px) 40px; }

/* Hero */
.hero { text-align: center; padding: 20px; padding: clamp(20px,5vw,56px) 8px clamp(28px,6vw,56px); }
.hero h1 { font-size: 32px; font-size: clamp(32px,7vw,60px); font-weight: 900; letter-spacing: .02em;
  background: linear-gradient(100deg, var(--primary-dark), var(--primary) 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.12; }
.hero .slogan { margin-top: 14px; font-size: 16px; font-size: clamp(16px,3.2vw,22px); font-weight: 700; color: var(--primary); }
.hero .about { margin: 18px auto 0; max-width: 640px; font-size: 15.5px; line-height: 1.85; color: #6b6055; white-space: pre-line; }
/* 精簡 hero:門市選擇要進手機第一屏,識別區壓扁 */
.hero.hero-mini { padding: clamp(14px,3vw,28px) 8px clamp(10px,2vw,20px); }
.hero.hero-mini h1 { font-size: clamp(26px,6vw,44px); }
.hero.hero-mini .slogan { margin-top: 8px; font-size: clamp(14px,2.8vw,18px); }
.hero.hero-mini #hero-logo { width: clamp(64px,13vw,104px); height: clamp(64px,13vw,104px); margin-bottom: clamp(8px,1.6vw,14px); }

/* 定位橫幅 */
.geo-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fffdf6f2, #fdf3e2ee); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 14px; margin-bottom: 14px; font-size: 14px; color: #6b6055;
  box-shadow: var(--shadow); }
.geo-banner .ic { color: var(--primary); font-size: 17px; }
.geo-banner b { color: var(--primary-dark); }
.geo-banner.ok { background: linear-gradient(135deg, #fff9e8f2, #fdeec7ee); border-color: #ecd9a0; }
.geo-banner button { margin-left: auto; border: 1px solid var(--line); background: #fffb; color: var(--primary-dark);
  font: inherit; font-size: 13px; font-weight: 800; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: .15s; }
.geo-banner button:hover { border-color: var(--primary); color: var(--primary); }
.geo-why { font-style: normal; color: var(--muted); font-size: 12.5px; margin-left: 4px; }

/* 最近門市:高亮 + 徽章 + 距離 chip */
.s-card { position: relative; }
.s-card.nearest { border: 2px solid var(--gold); box-shadow: 0 6px 26px rgba(209,166,63,.28); }
.near-badge { position: absolute; top: -11px; left: 14px; background: linear-gradient(120deg, var(--gold), #eab945);
  color: #4a3510; font-size: 12px; font-weight: 900; padding: 3px 11px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(180,140,40,.4); letter-spacing: .04em; }
.head-pills { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.dist { font-size: 12px; font-weight: 800; color: #7b5d27; background: #f7e9c4; padding: 4px 9px;
  border-radius: 999px; white-space: nowrap; }

/* 載入失敗重試 */
.retry-btn { margin-top: 12px; border: 1.5px solid var(--line); background: #fffb; color: var(--primary-dark);
  font: inherit; font-size: 14px; font-weight: 800; padding: 9px 22px; border-radius: 999px; cursor: pointer; transition: .15s; }
.retry-btn:hover { border-color: var(--primary); color: var(--primary); }

/* hidden 修復:作者樣式的 display 宣告(.geo-banner 的 flex、.hero #hero-logo 的 block)
   會贏過 UA 的 [hidden]{display:none},導致載入前先閃出空橫幅/空 logo 框。
   這兩條放檔案最後,specificity 同分時後者勝,把 hidden 語意接回來。 */
.geo-banner[hidden] { display: none; }
.hero #hero-logo[hidden] { display: none; }

/* 門市 */
.sec-title { font-size: 20px; font-weight: 900; color: var(--ink); margin: 8px 0 18px;
  display: flex; align-items: center; gap: 10px; }
.sec-title::before { content: ""; width: 5px; height: 22px; border-radius: 3px; flex: 0 0 auto;
  background: linear-gradient(var(--primary), var(--gold)); }
.sec-title .count { font-size: 14px; font-weight: 700; color: var(--muted); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 16px; }
.loading { color: var(--muted); padding: 30px; text-align: center; grid-column: 1/-1; }

.s-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, box-shadow .15s; animation: card-in .5s ease both;
  animation-delay: calc(var(--i, 0) * 70ms); }
.s-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.s-card.closed { opacity: .82; }
.s-card.closed:hover { opacity: 1; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .s-card { animation: none; } }
.s-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.s-name { font-size: 20px; font-weight: 900; }
.pill { font-size: 12.5px; font-weight: 800; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.pill.open { background: #e7f3ea; color: var(--ok); }
.pill.closed { background: #fbe6de; color: var(--warn); }
.s-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6b6055; text-decoration: none;
  min-height: 40px; padding: 2px 0; }
a.s-row:hover { color: var(--primary); }
.s-row .ic { color: var(--primary); font-size: 15px; }
.s-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn { flex: 1; text-align: center; padding: 12px 10px; border-radius: 12px; font-size: 15px; font-weight: 800;
  text-decoration: none; transition: .15s; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary { background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff;
  box-shadow: 0 6px 16px rgba(201,79,34,.28); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: #fff6; color: var(--primary-dark); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* 區塊間距 */
.about-sec, .sig-sec, .feat-sec, .stores { margin-top: 28px; margin-top: clamp(28px,5vw,48px); }

/* 品牌故事 */
.about { max-width: 720px; font-size: 15.5px; line-height: 1.95; color: #6b6055; white-space: pre-line; }

/* 招牌炸物 */
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 14px; }
.sig-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); animation: card-in .5s ease both; animation-delay: calc(var(--i,0)*55ms);
  transition: transform .15s, box-shadow .15s; }
.sig-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.sig-img { position: relative; aspect-ratio: 1/1; background: radial-gradient(circle at 50% 38%, #fff, var(--primary-soft)); }
.sig-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sig-new { position: absolute; top: 8px; left: 8px; background: linear-gradient(120deg, var(--gold), #eab945);
  color: #4a3510; font-size: 12px; font-weight: 900; padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(180,140,40,.4); }
.sig-name { padding: 10px 12px 0; font-size: 15px; font-weight: 800; }
.sig-price { padding: 2px 12px 12px; font-size: 14px; font-weight: 800; color: var(--primary); }

/* 品牌特色 */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.feat-card { background: linear-gradient(160deg, #fff, var(--primary-soft)); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  animation: card-in .5s ease both; animation-delay: calc(var(--i,0)*60ms); }
.feat-card::before { content: ""; position: absolute; top: -20px; right: -20px; width: 74px; height: 74px;
  border-radius: 50%; background: radial-gradient(circle, var(--gold), transparent 70%); opacity: .35; }
.feat-title { font-size: 17px; font-weight: 900; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; }
.feat-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }
.feat-desc { margin-top: 8px; font-size: 14px; line-height: 1.7; color: #6b6055; }

.l-foot { text-align: center; padding: 28px 16px 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 420px) {
  .store-grid { grid-template-columns: 1fr; }
  .btn { font-size: 14.5px; padding: 12px 6px; }
  .l-brand { font-size: 17px; }
  .l-brand-wrap #top-logo { width: 28px; height: 28px; }
}
