/* Racco Local — 商家頁、關於頁、錯誤頁（擁有者：商家頁模組）
   token 與基本元件（.button、.chip、.text-link、.eyebrow）在 app.css；這裡只用 var(--…)。
   方角、1px 墨線、硬陰影、黃色 hover；手機優先，斷點 620／900；沒有深色模式。
   珊瑚紅（--red）只當底色、上面放墨色字，不當文字顏色放在米色底上（對比不足）。 */

/* 有 display 的元件加上 hidden 屬性時仍要隱藏（.button 是 inline-flex，會蓋過瀏覽器預設） */
.bp [hidden], .about [hidden] { display: none !important; }

/* ───────────── 商家頁：版頭 ───────────── */
.bp-head { padding-top: 18px; padding-bottom: 4px; }
.bp-name { overflow-wrap: anywhere; }
.bp-branch { margin-top: 6px; font-size: 18px; font-weight: 700; line-height: 1.4; }
.bp-alt { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.bp-alt-label { margin-right: 4px; font-size: 12px; font-weight: 700; }
.bp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.bp-chips .chip-disclosure { margin: 0; }

/* 營業狀態提示 */
.bp-notice { margin: 4px 0 18px; padding: 12px 16px; border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.bp-notice strong { display: block; font-size: 18px; line-height: 1.4; }
.bp-notice p { margin-top: 2px; font-size: 15px; line-height: 1.6; }
.bp-notice-closed { background: var(--red); }
.bp-notice-moved { background: var(--blue); }
.bp-notice-temp { background: var(--yellow); }

/* ───────────── 版面：手機單欄（照片＋動作 → 資料 → 地圖）；≥900 左資料、右照片＋動作＋地圖 ───────────── */
.bp-grid { display: grid; grid-template-areas: "side" "main" "map"; gap: 32px; padding-top: 18px; }
.bp-side { grid-area: side; display: grid; align-content: start; gap: 18px; min-width: 0; }
.bp-main { grid-area: main; display: grid; align-content: start; gap: 32px; min-width: 0; }
.bp-map-box { grid-area: map; min-width: 0; }
@media (min-width: 900px) {
  .bp-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "main side" "main map" "main .";
    column-gap: 48px;
    row-gap: 28px;
    align-items: start;
  }
}

.bp-h2 { margin-bottom: 12px; font-size: clamp(21px, 4vw, 27px); }
.bp-h3 { margin: 16px 0 6px; font-family: var(--sans); font-size: 15px; font-weight: 800; }
.bp-note { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.65; }
/* 句子裡的 .text-link 不需要 44px 的點擊高度（app.css 給按鈕列用），否則底線會掉到下一行的位置 */
.bp-note .text-link, .about-section p .text-link, .about-fix .text-link, .err-contact .text-link { min-height: 0; font-size: inherit; }
.bp-muted { color: var(--muted); }

/* 內文連結：底線＋黃色 hover */
.bp-dl a, .bp-note a:not(.text-link), .bp-fact-src a, .bp-source-list a, .bp-evidence a {
  border-bottom: 1px solid currentColor;
  overflow-wrap: anywhere;
}
.bp-dl a:hover, .bp-note a:hover, .bp-fact-src a:hover, .bp-source-list a:hover, .bp-evidence a:hover, .bp-hub-link a:hover { background: var(--yellow); }

/* ───────────── 照片／占位圖 ───────────── */
.bp-media { display: grid; gap: 8px; }
.bp-photo { border: 1px solid var(--ink); background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
.bp-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bp-photo figcaption { padding: 6px 10px; border-top: 1px solid var(--ink); color: var(--muted); font-size: 12px; line-height: 1.5; }
.bp-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bp-photo-thumb { box-shadow: none; }
.bp-photo-thumb figcaption { padding: 4px 6px; font-size: 11px; }

/* 品牌占位圖：CSS 畫的店面＋Racco；明確標示不是店家照片 */
.bp-placeholder { border: 1px solid var(--ink); background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
.bp-ph-art { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--ink); background: var(--blue); }
.bp-ph-art::before { position: absolute; left: 14%; right: 14%; bottom: 0; height: 60%; border: 1px solid var(--ink); border-bottom: 0; background: var(--paper); content: ""; }
.bp-ph-awning { position: absolute; left: 10%; right: 10%; bottom: 56%; height: 15%; border: 1px solid var(--ink); background: repeating-linear-gradient(90deg, var(--red) 0 16px, var(--paper) 16px 32px); }
.bp-ph-window { position: absolute; left: 22%; bottom: 14%; width: 30%; height: 30%; border: 1px solid var(--ink); background: var(--mist); }
.bp-ph-door { position: absolute; right: 24%; bottom: 0; width: 16%; height: 40%; border: 1px solid var(--ink); border-bottom: 0; background: var(--yellow); }
.bp-ph-racco { position: absolute; left: 27%; bottom: 14%; width: 46px; }
.bp-placeholder figcaption { padding: 8px 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (min-width: 620px) { .bp-ph-art { height: 190px; } .bp-ph-racco { width: 58px; } }

/* ───────────── 動作 ───────────── */
.bp-actions { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--ink); background: var(--card); }
.bp-actions .button { width: 100%; }
.bp-phone-num { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.bp-share-status { font-size: 13px; font-weight: 700; }
.bp-share-status:empty { display: none; }
.bp-share-input { width: 100%; padding: 8px 10px; border: 1px solid var(--ink); background: var(--paper); font-family: var(--mono); font-size: 13px; }
.bp-meta-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.bp-meta-links .text-link { font-size: 14px; }
.bp-meta-links .text-link:hover { background: var(--yellow); }
@media (min-width: 620px) and (max-width: 899px) {
  .bp-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-share-status, .bp-share-input, .bp-meta-links { grid-column: 1 / -1; }
}

/* ───────────── 商家資料（定義清單） ───────────── */
.bp-dl { border-top: 1px solid var(--ink); }
.bp-row { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--ink); }
.bp-row dt { color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.5; }
.bp-row dd { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 620px) { .bp-row { grid-template-columns: 9em minmax(0, 1fr); gap: 16px; } .bp-row dt { padding-top: 3px; } }
.bp-basis-list { display: grid; gap: 10px; }
.bp-basis { display: block; font-weight: 700; line-height: 1.5; }
.bp-evidence { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.bp-address { font-style: normal; }
.bp-links { display: grid; gap: 4px; }
.bp-links a { font-weight: 700; }
.bp-host { color: var(--muted); font-size: 13px; }
.bp-price { margin-right: 4px; font-family: var(--mono); font-weight: 500; }

/* ───────────── 營業時間 ───────────── */
.bp-hours { width: 100%; max-width: 30em; border-collapse: collapse; border-top: 1px solid var(--ink); font-size: 15px; }
.bp-hours th, .bp-hours td { padding: 8px; border-bottom: 1px solid rgba(21, 25, 30, .2); text-align: left; vertical-align: top; }
.bp-hours th { width: 7.5em; font-weight: 700; }
.bp-hours tr.is-today { background: var(--yellow); }
.bp-hours-unknown { padding: 12px 14px; border: 1px dashed var(--ink); background: var(--card); font-weight: 700; line-height: 1.6; }

/* ───────────── 介紹、確認過的事實、執照 ───────────── */
.bp-desc-text { display: grid; gap: 10px; max-width: 42em; }
.bp-fact-list { display: grid; gap: 6px; }
.bp-fact-list li { position: relative; padding-left: 18px; }
.bp-fact-list li::before { position: absolute; left: 0; top: .72em; width: 7px; height: 7px; background: var(--ink); content: ""; }
.bp-fact-src { color: var(--muted); font-size: 12px; }
.bp-lic-list { display: grid; gap: 10px; }
.bp-lic-list li { padding: 12px 14px; border: 1px solid var(--ink); background: var(--card); line-height: 1.6; }

/* ───────────── 地圖 ───────────── */
.bp-map-box .bp-h2 { font-size: 20px; }
.bp-map { height: 240px; border: 1px solid var(--ink); background: var(--mist); }
/* 手機上 map.js 先放「顯示地圖」按鈕（is-collapsed），按了才載入；收合時不佔地圖高度 */
.bp-map.is-collapsed { height: auto; min-height: 0; }
.bp-map-addr { margin-top: 8px; color: var(--muted); font-size: 13px; }
@media (min-width: 900px) { .bp-map { height: 300px; } }

/* ───────────── 資料與來源 ───────────── */
.bp-sources { margin-top: var(--pad); }
.bp-sources > * { max-width: 52em; }
.bp-sources .bp-h2 { padding-top: 24px; border-top: 1px solid var(--ink); }
.bp-sources-intro { font-size: 15px; }
.bp-source-list { display: grid; gap: 10px; margin: 14px 0; counter-reset: src; }
.bp-source-list li { position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 46px; border: 1px solid var(--ink); background: var(--card); counter-increment: src; }
.bp-source-list li::before { position: absolute; left: 12px; top: 13px; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--ink); background: var(--yellow); content: counter(src); font-family: var(--mono); font-size: 11px; line-height: 1; }
.bp-source-type { color: var(--muted); font-size: 12px; font-weight: 700; }
.bp-source-list a { font-weight: 700; }
.bp-source-dates { color: var(--muted); font-size: 12px; }
.bp-verified-line { margin-top: 4px; font-weight: 700; }

/* ───────────── 推薦與攻略 ───────────── */
.bp-related, .bp-guides { margin-top: var(--pad); }
.bp-related-grid { display: grid; gap: 14px; margin-top: 4px; }
@media (min-width: 620px) { .bp-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .bp-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 卡片本身的樣式在 app.css；這裡只給「app.css 還沒定義時」的最低外觀（:where 權重為 0，不會蓋過 app.css） */
:where(.bp-related-grid) :where(.biz-card) { display: grid; align-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--ink); background: var(--card); }
.bp-hub-link { margin-top: 16px; }
.bp-guide-list { display: grid; gap: 10px; margin-top: 4px; }
.bp-guide-list a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--ink); background: var(--card); font-weight: 700; line-height: 1.55; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.bp-guide-list a:hover { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); transform: translate(-3px, -3px); }
@media (min-width: 620px) { .bp-guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .bp-guide-list a { transition: none; } .bp-guide-list a:hover { transform: none; } }

/* ───────────── 關於頁 ───────────── */
.about-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 20px; }
.about-hero-text { max-width: 44em; }
.about-hero-racco { display: none; flex: none; width: 120px; }
@media (min-width: 620px) { .about-hero-racco { display: block; } }
.about-toc ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.about-toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 12px; border: 1px solid var(--ink); background: var(--card); font-size: 13px; font-weight: 700; line-height: 1.4; }
.about-toc a:hover { background: var(--yellow); }
.about-section { max-width: 46em; padding: 36px 0; border-bottom: 1px solid var(--ink); scroll-margin-top: calc(var(--header) + 12px); }
.about-section:last-child { border-bottom: 0; }
.about-section h2 { margin-bottom: 14px; }
.about-section h3 { margin: 26px 0 8px; font-family: var(--sans); font-size: 18px; font-weight: 800; }
.about-section p + p { margin-top: 12px; }
.about-section a.text-link:hover { background: var(--yellow); }
.about-three { display: grid; gap: 10px; margin-top: 14px; }
.about-three-item { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--ink); background: var(--card); }
.about-three-item dt .chip, .about-basis-label .chip { white-space: normal; }
.about-basis { display: grid; gap: 10px; margin-top: 16px; }
.about-basis li { padding: 14px; border: 1px solid var(--ink); background: var(--card); }
.about-basis-label { margin-bottom: 6px; }
.about-note { margin-top: 16px; padding: 12px 14px; border-left: 4px solid var(--ink); background: var(--mist); }
.about-notcount { display: grid; gap: 6px; margin: 10px 0 16px; }
.about-notcount li { position: relative; padding-left: 28px; }
.about-notcount li::before { position: absolute; left: 0; top: .3em; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--ink); background: var(--paper); content: "×"; font-size: 13px; font-weight: 800; line-height: 1; }
.about-steps { display: grid; margin: 18px 0 16px 6px; border-left: 2px solid var(--ink); }
.about-steps li { position: relative; padding: 0 0 18px 22px; }
.about-steps li:last-child { padding-bottom: 0; }
.about-steps li::before { position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border: 1px solid var(--ink); background: var(--yellow); content: ""; }
.about-step-name { margin-bottom: 2px; font-size: 15px; }
.about-step-n { color: var(--muted); font-size: 12px; }
.about-fix { display: grid; gap: 10px; }
.about-fix li { padding: 14px; border: 1px solid var(--ink); background: var(--card); }
.about-contact { display: flex; align-items: flex-start; gap: 18px; }
.about-contact > img { flex: none; width: 64px; }
.about-contact .actions { margin-top: 16px; }

/* ───────────── 錯誤頁 ───────────── */
.err-page { display: grid; align-items: center; gap: 24px; padding-top: clamp(32px, 8vw, 80px); padding-bottom: clamp(32px, 8vw, 80px); }
.err-art img { width: 130px; }
.err-actions { margin-top: 22px; }
.err-contact { margin-top: 18px; color: var(--muted); font-size: 14px; }
.err-contact a:hover { background: var(--yellow); }
.err-minimal { display: block; }
@media (min-width: 620px) {
  .err-page { grid-template-columns: auto minmax(0, 1fr); gap: 40px; }
  .err-art img { width: 170px; }
}
