/* ============================================================================
   包包找美食｜現在吃哪攤：夜市絹印海報風（經典版）
   兩色套印：墨藍 + 燈籠紅，紙色偏青灰（刻意避開米色底）。唯一的重點動作：標題「套印對位」。
   CSP 限制：本檔與 HTML 都不使用 inline style；動態值一律透過 CSS 變數（--i / --x / --w）。
   ============================================================================ */
:root {
  --paper: #E4EBE2;
  --paper-2: #D3DDD2;
  --steam: #FAFCF7;
  --ink: #14304A;
  --ink-soft: #3A556E;
  --muted: #566B7B;
  --lantern: #D2331F;
  --lantern-soft: #F6D8D1;
  --neon: #FFC933;
  --note: #FFF1B8;
  --line: #06C755;
  --ok: #1B7F52;
  --rule: #B4C3B8;
  --serif: "Huninn", "jf-openhuninn", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --sans: "Huninn", "jf-openhuninn", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --print: 5px 5px 0 var(--ink);
  --ease: cubic-bezier(.2, .9, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 48, 74, .10) 1.2px, transparent 1.5px);
  background-size: 14px 14px;
}
body.modal-open { overflow: hidden; }
/*
 * 啟動畫面（像 App 的 splash）：資料還沒回來前只顯示中間一顆包包，其他東西都先藏起來，
 * 不會先冒出語言按鈕、頁尾連結這些半成品。JS 決定好畫面後拿掉 body.booting。
 * 保險：JS 出錯沒拿掉時，8 秒後自己顯示，不會永遠空白。
 */
@keyframes boot-show { to { visibility: visible; } }
body.booting > :not(.sprite):not(.splash) { visibility: hidden; animation: boot-show 0s 8s forwards; }
.splash {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
body:not(.booting):not(.view-loading) .splash { opacity: 0; visibility: hidden; }
/* 分頁第一次載資料：分頁列留著（像 App），內容先藏起來，只顯示包包動畫 */
body.view-loading #main { visibility: hidden; animation: boot-show 0s 8s forwards; }
body.view-loading:not(.booting) .splash { animation: boot-hide 0s 8s forwards; }
body.booting .splash { animation: boot-hide 0s 8s forwards; }
@keyframes boot-hide { to { opacity: 0; visibility: hidden; } }
.splash-bun { width: 88px; height: 88px; }
@media (prefers-reduced-motion: no-preference) {
  .splash-bun { animation: splash-bob 1.1s ease-in-out infinite; }
  @keyframes splash-bob { 50% { transform: translateY(-8px); } }
}
/* 按鈕連點：不要反白選到文字、手機上不要兩下放大、不要閃藍色點擊框（像 App 一樣） */
button, .btn, .tab, [data-action], [data-stamp-id], .plan-opt, .chip {
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--neon); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

/* ---------- 頂欄 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100vw - 1120px) / 2));
  background: var(--ink); color: var(--steam);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--lantern); color: var(--steam); border: 2px solid var(--steam); border-radius: 4px;
  font-family: var(--serif); font-weight: 900; font-size: 20px; transform: rotate(-4deg);
}
.brand-name { font-family: var(--serif); font-weight: 900; font-size: 20px; letter-spacing: .04em; }
.lang-switch { margin-left: auto; }
.lang-switch select {
  font: inherit; font-size: 14px; color: var(--steam); background: transparent;
  border: 2px solid var(--steam); border-radius: 6px; padding: 5px 8px; cursor: pointer;
}
.lang-switch select option { color: var(--ink); background: #fff; }
.lang-switch select:focus-visible { outline: 3px solid var(--lantern); outline-offset: 2px; }
.lang-switch .cs-btn { color: var(--steam); font-size: 14px; }

/* ---------- 可愛下拉選單（cute-select.js）：圓圓的按鈕＋彈出來的選項泡泡 ---------- */
.cute-select { position: relative; display: inline-block; }
.cs-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cs-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 6px 4px 14px;
  border: 2px solid currentColor; border-radius: 999px; background: transparent; color: inherit;
  font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; transition: transform .15s var(--ease);
}
.cs-btn:hover { transform: translateY(-1px); }
.cs-btn:active { transform: translateY(1px) scale(.98); }
.cs-btn:focus-visible { outline: 3px solid var(--lantern); outline-offset: 2px; }
.cs-btn:disabled { opacity: .5; cursor: default; transform: none; }
.cs-caret { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--lantern); transition: transform .25s var(--ease); }
.cs-caret::after {
  content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 6px;
  border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(45deg);
}
.cs-open .cs-caret { transform: rotate(180deg); }
.cs-list {
  /* 固定在畫面上（位置由 cute-select.js 算）：不會被外層的 overflow: hidden 或很矮的區塊切掉 */
  position: fixed; z-index: 120; top: 0; left: 0; max-height: 264px; overflow: auto;
  margin: 0; padding: 6px; list-style: none; background: #fff; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink);
  display: none; transform-origin: top center;
}
.cs-list:focus { outline: none; }
/* 關著的時候 display: none，才不會在畫面邊緣撐出橫向捲軸；打開時從按鈕下方「啵」一下彈出來 */
.cs-list.cs-show { display: block; animation: cs-pop .22s var(--ease); }
.cs-list.cs-up { transform-origin: bottom center; }
@keyframes cs-pop { from { opacity: 0; transform: translateY(-6px) scale(.94); } to { opacity: 1; transform: none; } }
.cs-opt { position: relative; padding: 8px 14px 8px 32px; border-radius: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cs-opt.cs-active { background: #FFF1D6; }
.cs-opt.cs-off { color: #C9B8C1; font-weight: 500; cursor: not-allowed; text-decoration: line-through; }
.cs-opt.cs-off.cs-active { background: transparent; }
.cs-opt[aria-selected="true"] { color: var(--lantern); font-weight: 800; }
.cs-opt[aria-selected="true"]::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px;
  border: 2px solid var(--ink); border-radius: 50% 50% 45% 45%; background: #fff; box-shadow: inset 0 -3px 0 #FFE1E7;
}
@media (prefers-reduced-motion: reduce) { .cs-btn, .cs-caret { transition: none; } .cs-list.cs-show { animation: none; } }
.user-box { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.user-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--steam); background: var(--ink-soft); }
.avatar-text { display: grid; place-items: center; font-weight: 700; }


main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 96px; }

/* ---------- 海報標題（套印） ---------- */
.poster-title { font-family: var(--serif); font-weight: 900; line-height: 1.08; letter-spacing: .02em; color: var(--ink); }
.poster-title .ink-b { display: block; text-shadow: 3px 3px 0 var(--lantern); }
.view-title { font-size: clamp(28px, 5vw, 40px); margin-bottom: 20px; }
/* 開場：紅色那一版先錯位，再對位到定位 */
.intro .poster-title .ink-b { animation: register 1.1s var(--ease) backwards; }
.intro .guest .poster-title .ink-b:nth-child(2) { animation-delay: .18s; }
@keyframes register {
  0% { opacity: 0; transform: translateY(18px); text-shadow: 22px 14px 0 var(--lantern); letter-spacing: .12em; }
  45% { opacity: 1; }
  100% { transform: none; text-shadow: 3px 3px 0 var(--lantern); letter-spacing: .02em; }
}

/* ---------- 未登入：App 開場畫面在檔案最後面（「首頁（未登入）」） ---------- */

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--ink); background: var(--steam);
  transition: transform .12s, box-shadow .12s, background-color .2s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 17px; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn-icon { padding: 0; width: 44px; flex: none; }
.btn-lantern { background: var(--lantern); color: var(--steam); box-shadow: 3px 3px 0 var(--ink); }
.btn-lantern:hover:not(:disabled) { background: #BC2B19; }
.btn-lantern:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--steam); }
.btn-ink:hover { background: var(--ink-soft); }
.btn-ghost { background: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--steam); }
.btn-line { background: var(--line); color: #04290F; box-shadow: 3px 3px 0 var(--ink); }
.btn-line:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.topbar .btn-ghost { color: var(--steam); border-color: var(--steam); }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.ico { flex: none; }

/* ---------- 表單 ---------- */
.order-sheet {
  background: var(--steam); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 var(--ink);
  padding: 22px; display: grid; gap: 20px; margin-bottom: 30px;
}
.where { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-bottom: 20px; border-bottom: 2px dashed var(--rule); }
.thresholds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px 24px; align-items: start; }
.field { display: grid; gap: 6px; align-content: start; }
.field-note { font-size: 12px; line-height: 1.5; color: var(--ink-soft); overflow-wrap: anywhere; }
.field.grow { min-width: 0; }
label, legend { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input:not([type]) {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 2px solid var(--rule); border-radius: 6px; transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--neon); }
input::placeholder { color: #8397A5; }
.row { display: flex; gap: 8px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill input, .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-block; padding: 6px 16px; border: 2px solid var(--ink); border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--ink); background: #fff; cursor: pointer; transition: background-color .15s, color .15s, transform .15s;
}
.pill:hover span { background: var(--paper); }
.pill input:checked + span { background: var(--ink); color: var(--steam); transform: translateY(-1px); }
.pill input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--neon); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }

.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.seg label { position: relative; display: block; }
.seg label + label { border-left: 2px solid var(--ink); }
.seg span { display: block; padding: 8px 14px; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s; }
.seg input:checked + span { background: var(--ink); color: var(--steam); }
.seg-wide { display: flex; }
.seg-wide label { flex: 1; text-align: center; }

.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 2px dashed var(--rule); }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 16px; color: var(--ink); font-weight: 700; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 50px; height: 28px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; transition: background-color .2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .25s var(--ease), background-color .2s; }
.switch input:checked + .switch-track { background: var(--neon); }
.switch input:checked + .switch-track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--neon); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }

/* ---------- 排序列 ---------- */
.sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
.sort-label { font-weight: 700; color: var(--ink-soft); margin-right: 4px; }
.chip {
  min-height: 38px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--steam);
  color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .15s, color .15s;
}
.chip:hover { background: #fff; }
.chip.active { background: var(--ink); color: var(--steam); font-weight: 700; }
.chip.active[data-dir="asc"]::after { content: " ↑"; }
.chip.active[data-dir="desc"]::after { content: " ↓"; }
.status { margin-left: auto; color: var(--ink-soft); font-weight: 700; }
.chip small { font-size: 12px; opacity: .7; }

/* ---------- 篩選列（設施 / 付款方式）---------- */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chips .chip { min-height: 34px; padding: 0 12px; font-size: 14px; }
.filter-hint { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.more-wrap .btn { width: auto; min-width: 220px; }


/* ---------- 店家卡片 ---------- */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 30px 24px; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--steam);
  border: 2px solid var(--ink); border-radius: 6px; box-shadow: var(--print);
}
.card.enter { animation: stick .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes stick {
  from { opacity: 0; transform: translateY(18px) rotate(-1.4deg) scale(.97); box-shadow: 0 0 0 var(--ink); }
  to { opacity: 1; transform: none; box-shadow: var(--print); }
}
/* 卡片上的 Google 嵌入地圖（2026-11 取代店家照片）：捲到才載、不能拖動，點卡片開抽屜才有可以操作的地圖。
   Embed 地圖太小時 Google 的店家小卡會擠成一團，所以至少 200px 高 */
.card-map {
  position: relative; flex: none; height: 200px; overflow: hidden; border-radius: 14px;
  background-color: var(--paper-2); background-image: radial-gradient(rgba(20, 48, 74, .16) 1.4px, transparent 1.7px); background-size: 10px 10px;
}
.card-map iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; pointer-events: none; animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; } }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(20, 48, 74, .35); }
.map-empty .art { width: auto; height: 62%; max-width: 46%; }
.has-map .map-empty { display: none; }

.tag { position: absolute; top: 10px; left: 10px; padding: 2px 12px; border: 2px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--steam); }
.tag-open { background: var(--neon); }
.tag-closed { background: var(--paper-2); color: var(--ink-soft); }
.tag-unknown { background: var(--steam); color: var(--muted); font-weight: 500; }

@keyframes hanko {
  0% { transform: scale(1.9) rotate(-24deg); opacity: .2; }
  60% { transform: scale(.9) rotate(4deg); opacity: 1; }
  100% { transform: none; }
}

.stamp {
  position: absolute; left: 14px; bottom: -30px; z-index: 2; display: grid; place-content: center; text-align: center;
  width: 76px; height: 76px; border: 2px solid var(--ink); border-radius: 50%; background: var(--lantern); color: var(--steam);
  transform: rotate(-7deg); line-height: 1.1;
}
.stamp b { font-family: var(--serif); font-weight: 900; font-size: 24px; }
.stamp small { font-size: 12px; font-weight: 500; }

.card-body { display: flex; flex-direction: column; gap: 10px; padding: 40px 16px 14px; flex: 1; }
.card-name { font-family: var(--serif); font-weight: 900; font-size: 21px; line-height: 1.25; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-soft); font-size: 14px; }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.ftags { display: flex; flex-wrap: wrap; gap: 6px; }
.ftag { padding: 1px 10px; border: 1.5px solid var(--rule); border-radius: 999px; font-size: 12.5px; color: var(--ink-soft); background: #fff; }
.ftag-warn { border-color: #B7791F; color: #8A5A12; background: #FFF4DC; }
.note { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.note .ico { margin-top: 4px; }


.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 16px; }

.card.skeleton { box-shadow: var(--print); }
.skeleton .card-map { animation: pulse 1.4s ease-in-out infinite; }
.skeleton .card-body { padding-top: 22px; }
.sk-line { height: 14px; border-radius: 7px; background: var(--paper-2); animation: pulse 1.4s ease-in-out infinite; }
.sk-line.w70 { width: 70%; } .sk-line.w40 { width: 40%; } .sk-line.w90 { width: 90%; }
@keyframes pulse { 50% { opacity: .45; } }

.empty { grid-column: 1 / -1; display: grid; gap: 6px; justify-items: center; text-align: center; padding: 52px 20px; border: 2px dashed var(--ink-soft); border-radius: 6px; color: var(--ink-soft); background: rgba(250, 252, 247, .6); }
.empty strong { font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--ink); }
.list:empty { display: none; }

/* ---------- 歷史 / 用量 ---------- */
.panel { background: var(--steam); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink); padding: 16px; margin-bottom: 20px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-form input { flex: 1; width: auto; min-width: 140px; }
.to-sep { color: var(--ink-soft); font-weight: 700; }
.usage-total { display: grid; margin-bottom: 20px; }
.usage-num { font-family: var(--serif); font-weight: 900; font-size: clamp(44px, 9vw, 72px); line-height: 1.1; text-shadow: 3px 3px 0 var(--lantern); }
.usage-cap { color: var(--ink-soft); }
.usage-h { margin: 18px 0 8px; font-size: 16px; }
/* 全站兩個金額並排：直接計算、扣掉免費額度後（實際要付用綠色） */
.usage-two { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 14px; }
.usage-two > div { display: grid; min-width: 0; }
.usage-two .usage-num { font-size: clamp(30px, 6vw, 44px); text-shadow: none; }
.usage-two .is-net .usage-num { color: var(--ok); }
#usageFree { min-width: 640px; }
.table-wrap { overflow-x: auto; }
/* API 用量表只有 4 欄：手機上讓項目名稱換行，不用左右捲 */
#usageTable th, #usageTable td { white-space: normal; }
#usageTable th:first-child, #usageTable td:first-child { text-align: left; }
@media (max-width: 480px) { #usageTable th, #usageTable td { padding: 8px 4px; font-size: 13px; } }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--ink-soft); font-weight: 700; font-size: 14px; border-bottom: 2px solid var(--ink); }
tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
.hint { font-size: 14px; color: var(--muted); }

/* ---------- 對話框（登入 / 選這家） ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(20, 48, 74, .62); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
}
.modal-bg.show { opacity: 1; visibility: visible; transition: opacity .2s; }
.modal {
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; background: var(--steam);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 8px 8px 0 var(--ink);
  transform: translateY(24px) scale(.97); transition: transform .35s var(--ease);
}
.modal-bg.show .modal { transform: none; }
.modal-in { display: grid; gap: 14px; padding: 20px; }
.modal-title { font-family: var(--serif); font-weight: 900; font-size: 26px; line-height: 1.25; }
.stack { display: grid; gap: 14px; }
.form-error { min-height: 20px; color: #B42318; font-size: 14px; font-weight: 700; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 2px dashed var(--rule); }
.fact-rate { font-weight: 700; color: var(--ink); }
.fact-rate .star { color: var(--lantern); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; max-width: calc(100vw - 32px);
  padding: 10px 20px; border: 2px solid var(--steam); border-radius: 999px; background: var(--ink); color: var(--steam); font-weight: 700;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s, transform .35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 手機 ---------- */
@media (max-width: 640px) {
  main { padding-top: 18px; }
  .order-sheet { padding: 16px; box-shadow: 5px 5px 0 var(--ink); }
  .brand-name { font-size: 17px; white-space: nowrap; }
  .topbar { gap: 8px; flex-wrap: wrap; row-gap: 6px; }
  .topbar .btn { white-space: nowrap; }
  /* 窄螢幕（尤其英文字比較長）：會員區放不下就換到第二行靠右，不要把整頁撐寬 */
  .user-box { flex-wrap: wrap; justify-content: flex-end; gap: 6px 8px; margin-left: auto; }
  .lang-switch select { font-size: 13px; padding: 4px 6px; }
  .lang-switch .cs-btn { font-size: 13px; min-height: 32px; gap: 4px; padding: 2px 4px 2px 10px; }
  .lang-switch .cs-caret { width: 18px; height: 18px; }
  .lang-switch .cs-caret::after { left: 5px; top: 3px; }
  .user-name { display: none; }
  .status { width: 100%; margin-left: 0; }
  .seg span { padding: 8px 11px; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: none; transform: translateY(100%); }
  /* 升級 PRO：手機上是畫面正中間的圓角長方形（不滿版、不貼底），內容超過就在卡片裡上下捲 */
  #upgradeBg { align-items: center; justify-content: center; padding: 20px; }
  #upgradeBg .modal.upgrade { width: min(340px, 100%); max-height: min(78dvh, 640px); border-bottom: 2px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); transform: translateY(24px) scale(.97); }
  #upgradeBg.show .modal.upgrade { transform: none; }
  .submit-row .btn { width: 100%; }
}

/* ---------- 減少動態：尊重使用者系統設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
}

/* ---------- 頂欄連結（管理員才看得到「審核櫃台」） ---------- */
.user-box .nav-link { color: var(--steam); font-size: 14px; font-weight: 700; text-decoration: none; padding: 6px 10px; border: 2px solid transparent; border-radius: 6px; }
.user-box .nav-link:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }

/* ---------- Email 驗證碼 / Google 登入 ---------- */
.form-notice { min-height: 0; color: var(--ok); font-size: 14px; font-weight: 700; }
.form-notice:empty { display: none; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
/* Google 按鈕小頁的 iframe：高度由小頁回報（app.js 用 CSSOM 設），寬度跟按鈕一樣 */
/* 小頁還沒回報高度前先收合（不用 display: none，iframe 裡才量得到按鈕大小） */
.google-btn.gsi-wait { min-height: 0; height: 0; overflow: hidden; }
.google-frame { display: block; width: 300px; max-width: 100%; height: 44px; border: 0; background: transparent; color-scheme: normal; }
.code-input {
  text-align: center; font-family: var(--serif); font-weight: 900; font-size: 30px; letter-spacing: .45em;
  padding-left: .45em; background: var(--note);
}
.code-input::placeholder { color: rgba(20, 48, 74, .3); letter-spacing: .3em; }
.mail-art { display: grid; place-items: center; padding-top: 6px; }
.mail-art svg { width: 128px; height: auto; overflow: visible; }
.mail-art .env { fill: var(--paper-2); stroke: var(--ink); stroke-width: 3; }
.mail-art .flap { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.mail-art .paper { fill: var(--steam); stroke: var(--ink); stroke-width: 3; transform-box: fill-box; transform-origin: 50% 100%; animation: slide-out .9s var(--ease) .15s backwards; }
.mail-art .lines { fill: none; stroke: var(--lantern); stroke-width: 3; stroke-linecap: round; animation: slide-out .9s var(--ease) .15s backwards; }
.mail-art .dot { fill: var(--lantern); stroke: var(--ink); stroke-width: 3; }
@keyframes slide-out { from { transform: translateY(26px); opacity: 0; } }

/* ---------- 文字連結樣式的按鈕（忘記密碼） ---------- */
.link-btn { justify-self: start; padding: 2px 0; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--lantern); }

/* ---------- 隨機選一家：排序列上的骰子按鈕 ---------- */
.btn-dice {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 4px;
  padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--lantern); color: var(--steam); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.btn-dice:hover svg { animation: dice-wobble .5s var(--ease); }
.btn-dice:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-dice[hidden] { display: none; }
@keyframes dice-wobble { 30% { transform: rotate(-18deg); } 65% { transform: rotate(12deg); } }

/* ---------- 抽籤轉輪：三格高的小窗，中間那格是結果 ---------- */
.roll { max-width: 400px; text-align: center; }
.roll .modal-title { text-align: center; }
.roll-exclude { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.roll-exclude .agree { align-items: center; }
.roll-exclude select { min-height: 32px; padding: 0 6px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.roll-note { min-height: 1.5em; margin: 4px 0 0; text-align: center; font-size: 13px; }
.reel-window {
  position: relative; height: 192px; overflow: hidden; border: 2px solid var(--ink); border-radius: 8px;
  background: var(--paper);
  /* 上下淡出，像轉輪的弧面 */
  -webkit-mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
  mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
}
/* 中間那格的框 */
.reel-window::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: 64px; height: 64px; pointer-events: none;
  border-top: 2px solid var(--lantern); border-bottom: 2px solid var(--lantern);
}
.reel { list-style: none; margin: 0; padding: 0; will-change: transform; }
.reel li { height: 64px; display: grid; align-content: center; gap: 2px; padding: 0 16px; }
.reel-name { font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-meta { font-size: 13px; color: var(--ink-soft); min-height: 1em; }
.roll-result { min-height: 1.6em; font-weight: 700; font-size: 18px; color: var(--lantern); }
.roll-actions { display: grid; gap: 10px; }
.roll-actions[hidden] { display: none; }
/* 停下來：中間那格彈一下、框變粗 */
.roll.landed .reel-window::after { border-width: 4px; animation: reel-lock .45s var(--ease); }
.roll.landed .roll-result { animation: reel-pop .5s var(--ease); }
@keyframes reel-lock { 0% { transform: scaleY(1.25); } 100% { transform: none; } }
@keyframes reel-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }

/* 「在清單裡看」：被抽中的卡片閃兩下燈籠紅外框 */
.card.lucky { animation: lucky 1.6s var(--ease); }
@keyframes lucky { 0%, 40%, 80% { box-shadow: 0 0 0 5px var(--lantern), var(--print); } 20%, 60%, 100% { box-shadow: var(--print); } }

@media (prefers-reduced-motion: reduce) {
  .btn-dice:hover svg, .roll.landed .reel-window::after, .roll.landed .roll-result, .card.lucky { animation: none !important; }
  .card.lucky { outline: 4px solid var(--lantern); }
}


/* ---------- 本月額度列：大數字 = 剩幾次；剩 2 次以內變提醒色，用完變紅 ---------- */
.quota-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; padding: 12px 16px; background: var(--steam); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink); }
.quota-bar.hidden { display: none; }
.q-count { display: grid; justify-items: center; min-width: 84px; }
.q-num { font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.q-label { font-size: 12px; color: var(--muted); }
.q-detail { display: grid; gap: 2px; font-size: 14px; flex: 1; min-width: 220px; }
.q-plan { font-weight: 700; }
.q-plan.is-pro { color: var(--lantern); }
.q-used { color: var(--ink-soft); }
.q-alert { color: var(--lantern); font-size: 15px; }
.q-tip { color: var(--ink-soft); }
.quota-bar.q-warn { background: #FFF4CC; border-color: #B7791F; box-shadow: 3px 3px 0 #B7791F; }
.quota-bar.q-warn .q-num { color: #B7791F; }
.quota-bar.q-out { background: #FDE7E3; border-color: var(--lantern); box-shadow: 3px 3px 0 var(--lantern); }
.quota-bar.q-out .q-num { color: var(--lantern); }
.quota-bar.q-warn, .quota-bar.q-out { animation: quota-nudge .6s var(--ease); }
@keyframes quota-nudge { 30% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .quota-bar.q-warn, .quota-bar.q-out { animation: none; } }

/* ---------- LOGO 與吉祥物（可愛版主題才顯示，經典版維持「攤」字方章） ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.bm-logo, .mascot { display: none; }

/* ---------- 店名：主名「包包找美食」+ 小字「現在吃哪攤」 ---------- */
.brand-sub { margin-left: 8px; font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .02em; opacity: .75; }

@media (max-width: 640px) {
  .brand-sub { display: none; }
}

/* ---------- 升級 PRO ---------- */
.q-upgrade { flex: none; align-self: center; }
.upgrade { max-width: 460px; text-align: center; }
.upgrade .modal-in { justify-items: stretch; }
/* 升級視窗內容很長：外框不捲（四個角永遠是圓角、不會被捲軸切成直角），只捲裡面；捲軸細細的、縮在圓角裡 */
.modal.upgrade { display: flex; flex-direction: column; overflow: hidden; max-height: min(92vh, 92dvh); }
.modal.upgrade > .modal-in {
  min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  margin: 8px 6px 8px 0; padding-top: 12px; padding-bottom: 12px; border-radius: inherit;
  scrollbar-width: thin; scrollbar-color: rgba(59, 44, 53, .35) transparent;
}
.modal.upgrade > .modal-in::-webkit-scrollbar { width: 6px; }
.modal.upgrade > .modal-in::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(59, 44, 53, .35); }
.modal.upgrade > .modal-in::-webkit-scrollbar-track { background: transparent; }
.upgrade .modal-in > * { min-width: 0; }
.upgrade .plan-compare { table-layout: fixed; }
.upgrade .plan-compare th, .upgrade .plan-compare td { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.up-bun { display: block; width: 72px; height: 72px; margin: 0 auto -4px; }
.plan-compare { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; }
.plan-compare th, .plan-compare td { padding: 8px 6px; border-bottom: 1px solid var(--rule); white-space: normal; text-align: center; }
.plan-compare tbody th { text-align: left; font-weight: 500; color: var(--ink-soft); }
.plan-compare thead th { font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--ink); }
.plan-compare .is-pro { color: var(--lantern); font-weight: 700; }
.plan-compare td { white-space: nowrap; }
/* 英文比較長（「150 every 30 days」）：不換行會把整個表格撐寬、視窗右邊被切掉，所以英文允許換行 */
html[lang="en"] .plan-compare td { white-space: normal; }
html[lang="en"] .plan-compare tbody th { width: 34%; }
.plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.plan-opt, .plan-opt span, .plan-opt span > * { min-width: 0; }
.plan-opt span { grid-template-columns: minmax(0, 1fr); }
.plan-opt b, .plan-opt small { overflow-wrap: anywhere; }
/* 很窄的手機（約 360px 以下）：價格（NT$1,539）放兩欄會被擠出框，改成一欄 */
@media (max-width: 360px) { .plan-options { grid-template-columns: minmax(0, 1fr); } }
.plan-best span { border-color: var(--neon); background: #FFFBEA; }
.plan-opt { position: relative; cursor: pointer; }
.plan-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan-opt span { display: grid; gap: 2px; padding: 12px 8px; border: 2px solid var(--rule); border-radius: 14px; background: #fff; transition: border-color .15s, transform .15s; }
.plan-opt b { font-size: 16px; }
.plan-opt em { font-style: normal; font-family: var(--serif); font-weight: 900; font-size: 24px; color: var(--ink); }
.plan-opt small { font-size: 12px; color: var(--lantern); font-weight: 700; min-height: 1em; }
.plan-opt input:checked + span { border-color: var(--lantern); box-shadow: 0 4px 0 var(--lantern); transform: translateY(-2px); }
.plan-opt input:focus-visible + span { outline: 3px solid var(--neon); outline-offset: 2px; }
.checkout-note:empty { display: none; }

/* ---------- 同意條款（註冊、升級 PRO） ---------- */
.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--ink-soft); text-align: left; cursor: pointer; }
.agree input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--lantern); cursor: pointer; }
.agree input:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }
.agree a { color: var(--lantern); font-weight: 700; }

/* ---------- 頁尾：條款與政策 ---------- */
.site-footer { padding: 0 16px 32px; text-align: center; font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--lantern); }
/* 頁尾客服信箱（綠界收款審核要求網站上看得到聯絡 Email） */
.foot-contact { margin: 8px 0 0; color: var(--ink-soft); }

/* ---------- 廣告（只有免費會員看得到；PRO 沒有廣告） ---------- */
.ad-banner { position: relative; margin: 28px 0 0; padding: 22px 16px 14px; border: 2px dashed var(--rule); border-radius: 12px; background: rgba(255, 255, 255, .6); }
.ad-label { position: absolute; top: 6px; left: 12px; font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.ad-banner .adsbygoogle { display: block; min-height: 90px; }
.ad-house { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ad-bun { flex: none; width: 52px; height: 52px; }
.ad-copy { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.ad-copy strong { font-size: 16px; }
.ad-copy span { font-size: 13px; color: var(--ink-soft); }
.ad-house .btn { width: auto; }
.ad-full { max-width: 380px; text-align: center; }
.ad-full .modal-in { position: relative; }
.ad-full .modal-title { text-align: center; }
.roll-exclude .pro-tag { margin-left: 2px; }

/* ---------- 收藏頁工具列 / PRO 外觀按鈕 / PRO 徽章 ---------- */
.btn-dice .pro-tag, .btn .pro-tag { margin-left: 4px; }
.look-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border: 2px solid var(--rule);
  border-radius: 999px; background: #fff; color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.look-btn.on { border-color: #C99A00; background: #FFF1C2; color: #6B4E00; }
.pro-badge { padding: 0 7px; border-radius: 999px; background: linear-gradient(135deg, #FFD54A, #E8A100); color: #3B2C35; font-size: 11px; font-weight: 800; line-height: 1.7; }
.modal-title[tabindex="-1"]:focus { outline: none; box-shadow: none; }
@media (max-width: 640px) { .look-btn span { display: none; } }

/* ---------- 小動畫：包包冒煙、輕輕跳；分類插圖冒煙、珍珠滾、櫻桃彈 ---------- */
.bm-logo, .mascot, .up-bun, .ad-bun, .map-empty .art { animation: bun-bob 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.bun-steam, .art-steam { animation: steam-rise 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.bun-steam-r, .art-steam-1 { animation-delay: .8s; }
.art-steam-2 { animation-delay: 1.6s; }
.bun-eyes { animation: bun-blink 5s infinite; transform-box: fill-box; transform-origin: center; }
.art-pearl { animation: pearl-roll 2.6s ease-in-out infinite; transform-box: fill-box; }
.art-pearl-1 { animation-delay: .4s; }
.art-pearl-2 { animation-delay: .8s; }
.art-bounce { animation: cherry-bounce 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bun-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 45% { transform: translateY(-3px) scale(.98, 1.02); } 60% { transform: translateY(0) scale(1.03, .97); } }
@keyframes steam-rise { 0% { transform: translateY(4px) scaleY(.7); opacity: 0; } 35% { opacity: .9; } 100% { transform: translateY(-7px) scaleY(1.1); opacity: 0; } }
@keyframes bun-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pearl-roll { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes cherry-bounce { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-4px) scale(.95, 1.05); } 50% { transform: translateY(0) scale(1.08, .92); } }
@media (prefers-reduced-motion: reduce) {
  .bm-logo, .mascot, .up-bun, .ad-bun, .map-empty .art, .bun-steam, .art-steam, .bun-eyes, .art-pearl, .art-bounce, .buddy-svg, .buddy .bd-body { animation: none !important; }
}

/* ---------- PRO 專屬外觀（PRO 會員自己開關；原版不受影響） ---------- */
/* 包包是用 <use> 引用的圖：外面的「html[...] .xxx」選不到裡面的元素，改用會一路繼承進去的 CSS 變數 */
.bun-crown { opacity: var(--bun-crown, 0); transition: opacity .3s; }
.bun-plate { fill: var(--bun-plate, #fff); }
.bun-steam { display: var(--bun-steam, inline); }
html[data-theme][data-look="pro"] {
  --bun-crown: 1;
  --bun-plate: #F6E2A6;
  --bun-steam: none;
  /* A｜香檳奶霜：黃色減一半，金色只留在線條 */
  --paper: #FFFCF4;
  --paper-2: #FAF2DC;
  --neon: #F3D27A;
  --note: #FDF7E6;
  --rule: #F1DFA8;
}
html[data-theme][data-look="pro"] body { background-color: var(--paper); }
html[data-theme][data-look="pro"] .topbar { border-bottom-color: #E3C77E; box-shadow: 0 3px 0 #F1DFA8; }
html[data-theme][data-look="pro"] .stamp { background: linear-gradient(135deg, #FFF3CF, #F3D88E 55%, #D9B95E); }
html[data-theme][data-look="pro"] .card { box-shadow: 0 5px 0 #D9C27A; }

/* ---------- 揪團投票：卡片上的「加入投票」、底部投票列、我的投票 ---------- */
.vote-pick {
  display: inline-flex; align-items: center; gap: 4px; flex-basis: 100%; justify-content: center; min-height: 34px;
  border: 2px dashed var(--rule); border-radius: 999px; background: transparent; color: var(--ink-soft);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.vote-pick.on { border-style: solid; border-color: var(--ok); background: #E3F6EE; color: var(--ok); }
.card-actions { flex-wrap: wrap; }
.vote-tray {
  position: fixed; left: 50%; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 8px; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px)); padding: 10px 14px; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; box-shadow: 0 4px 0 var(--ink); font-size: 14px; font-weight: 700;
}
.vote-tray span { flex: 1; min-width: 0; }
.vote-tray .btn { width: auto; }
.vote-shops { margin: 0 0 12px; padding-left: 20px; list-style: decimal; color: var(--ink-soft); line-height: 1.7; }
.my-votes { margin: 0 0 20px; padding: 14px 18px; }
.my-votes h3 { font-size: 17px; margin-bottom: 8px; }
.my-vote { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px dashed var(--rule); }
.my-vote:first-child { border-top: 0; }
.my-vote-text { display: grid; gap: 2px; min-width: 0; }
.my-vote-text span { font-size: 13px; color: var(--ink-soft); }
.my-vote-actions { display: flex; gap: 6px; }
.my-vote-actions .btn { width: auto; }

/* ---------- 投票頁（vote.html） ---------- */
.vote-page { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }
.vote-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.vote-head .mascot { flex: none; width: 72px; height: 72px; }
.vote-title { font-family: var(--serif); font-size: clamp(24px, 6vw, 32px); line-height: 1.25; overflow-wrap: anywhere; }
.vote-sub { margin-top: 4px; color: var(--ink-soft); }
.vote-winner { margin: 0 0 16px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--neon); font-size: 20px; font-weight: 800; text-align: center; }
.vote-name { display: grid; gap: 6px; margin-bottom: 16px; padding: 14px 16px; }
.vote-name input { min-height: 44px; padding: 0 12px; border: 2px solid var(--rule); border-radius: 12px; font: inherit; }
.vote-options { display: grid; gap: 14px; }
.vote-option { padding: 14px 16px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--ink); }
.vote-option.mine { border-color: var(--ok); box-shadow: 0 4px 0 var(--ok); }
.vote-option.win { background: #FFF6D6; }
/* 同票：等發起人抽籤 */
.vote-winner.tied { background: #fff; border-style: dashed; color: var(--lantern); }
.vote-option.tie { background: #FFF1F3; }
.my-vote.tied .my-vote-text span { color: var(--lantern); font-weight: 700; }
.vo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.vo-name { font-size: 18px; overflow-wrap: anywhere; }
.vo-count { flex: none; font-weight: 800; color: var(--lantern); }
.vo-meta { margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.vo-bar { height: 10px; margin: 10px 0 6px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.vo-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lantern); transition: width .5s var(--ease); }
.vo-voters { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.vo-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.vo-actions .btn { width: auto; }
.vote-cta { margin-top: 32px; text-align: center; color: var(--ink-soft); }
.vote-cta .btn { display: inline-flex; width: auto; margin-top: 8px; }

/* ---------- 包包集章圖鑑 ---------- */
.stamp-book { display: grid; gap: 18px; }
.stamp-series { position: relative; padding: 16px 18px; border: 2px solid var(--ink); border-radius: 20px; background: #fff; box-shadow: 0 4px 0 var(--ink); }
.stamp-series.monthly { background: linear-gradient(180deg, #FFF6D6, #fff 60%); }
.ss-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ss-head h3 { font-size: 18px; }
.ss-head p { margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.ss-count { flex: none; font-weight: 800; color: var(--lantern); }
.stamp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px 10px; }
.stamp-cell { display: grid; justify-items: center; gap: 2px; text-align: center; }
.stamp-badge { width: 76px; height: 76px; }
/* 章裡的包包一律用原版（配件是照原版畫的）：PRO 外觀的皇冠會跟帽子類配件疊在一起 */
.stamp-badge { --bun-crown: 0; --bun-plate: #fff; --bun-steam: inline; }
.stamp-badge.sb-off use { opacity: .18; }
.stamp-badge.sb-off { filter: grayscale(1); }
.stamp-cell.got .stamp-badge { animation: stamp-wiggle 4s ease-in-out infinite; }
.stamp-name { font-size: 12.5px; font-weight: 700; }
.stamp-cell:not(.got) .stamp-name { color: var(--muted); }
.stamp-place { font-size: 11px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stamp-series.locked .stamp-grid { opacity: .6; }
.ss-unlock { display: inline-flex; width: auto; margin-top: 12px; }
.tab.has-new::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--lantern); vertical-align: top; }
@keyframes stamp-wiggle { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-6deg); } 96% { transform: rotate(5deg); } }

.vote-head .mascot { display: block; }
@media (prefers-reduced-motion: reduce) { .stamp-cell.got .stamp-badge { animation: none; } }
.stamp-btn { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.stamp-btn:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }
.new-tag {
  position: absolute; top: -4px; right: -10px; padding: 1px 7px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--neon); color: var(--ink); font-size: 11px; font-weight: 900; letter-spacing: .04em; transform: rotate(10deg);
  animation: new-pop 1.6s ease-in-out infinite;
}
@keyframes new-pop { 0%, 100% { transform: rotate(10deg) scale(1); } 50% { transform: rotate(10deg) scale(1.15); } }
.steamer-steam { animation: steam-rise 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.btn-checkin { border-style: dashed; }
.stamp-collectors { font-size: 10.5px; color: var(--muted); }
/* 每月限定：年月選單 + 選到的那個月 */
/* 異國探險（待解鎖）：上鎖的蒸籠，輕輕發光，吸引人支持開放 */
.sw-lock { display: inline-block; margin-left: 6px; padding: 1px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--neon); font-size: 12px; font-weight: 900; vertical-align: 3px; animation: sw-wobble 3.2s ease-in-out infinite; }
/* 每個國家一區：幾個地區就幾顆上鎖的小蒸籠，一顆一顆浮出來、輪流發亮 */
.sw-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sw-dot {
  display: grid; place-items: center; aspect-ratio: 1; border: 2px dashed #CDBFB1; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, #F0D6AE 0 45%, #F3EEE8 46%); color: #B88A56; font-weight: 900; font-size: 13px;
  animation: sw-pop .4s var(--ease) both, sw-glow 4s 1.4s ease-in-out infinite;
}
.sw-mini li:nth-child(3n) .sw-dot { animation-duration: .4s, 5s; }
.sw-mini li:nth-child(4n+1) .sw-dot { animation-duration: .4s, 3.4s; }
/* 神秘國度：霧裡的問號，不透露是哪些國家、有幾個 */
.sw-mystery { display: grid; justify-items: center; gap: 6px; padding: 8px 4px 4px; text-align: center; }
.sw-mystery strong { font-size: 16px; }
.sw-mystery span:not(.sw-q) { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.sw-fog { position: relative; display: flex; justify-content: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: linear-gradient(90deg, rgba(255,255,255,.2), rgba(255,255,255,.95), rgba(255,255,255,.2)); background-size: 200% 100%; animation: sw-fog 4s linear infinite; }
.sw-q { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 10px 10px 10px 2px; background: #fff; font-weight: 900; font-size: 18px; filter: blur(.6px); animation: sw-float 3s ease-in-out infinite; }
.sw-q:nth-child(2n) { animation-delay: .6s; background: #FFF1D6; } .sw-q:nth-child(3n) { animation-delay: 1.2s; background: #E8F4FF; }
@keyframes sw-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sw-glow { 0%, 100% { box-shadow: 0 0 0 transparent; } 50% { box-shadow: 0 0 10px rgba(255, 194, 26, .9); } }
@keyframes sw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sw-fog { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes sw-wobble { 0%, 85%, 100% { transform: rotate(0); } 90% { transform: rotate(-6deg); } 95% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .sw-lock, .sw-dot, .sw-q, .sw-fog { animation: none; } }
.sm-empty { display: grid; justify-items: center; gap: 6px; padding: 22px 18px; border: 2px solid var(--ink); border-radius: 20px; background: #fff; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.sm-empty span { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.sm-sad { width: 104px; height: 104px; }
/* 難過的包包：眼淚一滴一滴往下掉、身體抽噎似地縮一下、眉毛皺一下 */
.sad-bun .sb-tear { transform-box: fill-box; transform-origin: 50% 0; animation: sb-tear 2.6s ease-in infinite; }
.sad-bun .sb-tear-2 { animation-delay: 1.3s; }
.sad-bun .sb-body { transform-box: view-box; transform-origin: 60px 100px; animation: sb-sob 2.6s ease-in-out infinite; }
.sad-bun .sb-brows { transform-box: fill-box; transform-origin: 50% 50%; animation: sb-brow 2.6s ease-in-out infinite; }
@keyframes sb-tear {
  0% { transform: translateY(-2px) scale(.4); opacity: 0; }
  15% { transform: translateY(0) scale(1); opacity: 1; }
  70% { transform: translateY(14px) scale(1); opacity: 1; }
  100% { transform: translateY(20px) scale(.7); opacity: 0; }
}
@keyframes sb-sob { 0%, 40%, 100% { transform: none; } 48% { transform: scale(1.03, .96); } 56% { transform: none; } 64% { transform: scale(1.02, .97); } }
@keyframes sb-brow { 0%, 40%, 100% { transform: none; } 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .sad-bun .sb-tear, .sad-bun .sb-body, .sad-bun .sb-brows { animation: none; } .sad-bun .sb-tear-2 { display: none; } }

/* ---------- 蓋章大動畫（正中間） ---------- */
.celebrate { position: relative; max-width: 380px; overflow: visible; text-align: center; }
.celebrate .modal-in { position: relative; }
.cb-map { margin: 10px 0; }
.cb-map:empty { display: none; }
.cb-map .vv-embed { height: 130px; }
.celebrate.cb-has-map { overflow-y: auto; }   /* 放了地圖比較高：小手機要能捲動 */
.cb-art { position: relative; width: 190px; height: 190px; margin: 4px auto 10px; }
.cb-art .stamp-badge { position: relative; z-index: 1; width: 100%; height: 100%; }
.cb-title { font-family: var(--serif); font-size: clamp(22px, 6vw, 28px); line-height: 1.3; }
.cb-text { margin: 6px 0 14px; color: var(--ink-soft); white-space: pre-line; line-height: 1.6; }
/* 蓋到新章 / 集滿 / 放大看：包包從上面掉下來 → 章用力蓋下去 → 之後輕輕晃 */
.cb-earned .cb-art .stamp-badge, .cb-complete .cb-art .stamp-badge, .cb-view .cb-art .stamp-badge {
  animation: cb-drop .55s cubic-bezier(.3, 1.4, .5, 1) both, cb-press .45s .55s var(--ease) both, cb-wiggle 3s 1.2s ease-in-out infinite;
}
@keyframes cb-drop { from { transform: translateY(-160px) rotate(-25deg) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cb-press { 0% { transform: scale(1); } 35% { transform: scale(1.18, .82); } 70% { transform: scale(.94, 1.06); } 100% { transform: none; } }
@keyframes cb-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.cb-earned .cb-title, .cb-complete .cb-title { animation: cb-title-in .5s .8s var(--ease) both; }
@keyframes cb-title-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
/* 四周冒星星 */
.cb-sparkles { position: absolute; inset: 0; pointer-events: none; }
.cb-sparkles i {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; background: var(--neon);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0;
  animation: cb-spark 1s .75s ease-out both;
}
.cb-sparkles i:nth-child(even) { background: var(--lantern); width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.cb-sparkles i:nth-child(1) { --a: 0deg; } .cb-sparkles i:nth-child(2) { --a: 36deg; } .cb-sparkles i:nth-child(3) { --a: 72deg; }
.cb-sparkles i:nth-child(4) { --a: 108deg; } .cb-sparkles i:nth-child(5) { --a: 144deg; } .cb-sparkles i:nth-child(6) { --a: 180deg; }
.cb-sparkles i:nth-child(7) { --a: 216deg; } .cb-sparkles i:nth-child(8) { --a: 252deg; } .cb-sparkles i:nth-child(9) { --a: 288deg; }
.cb-sparkles i:nth-child(10) { --a: 324deg; }
@keyframes cb-spark {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.3); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-125px) scale(1.2); }
}
/* 集滿一整套：彩帶從上面撒下來，標題變大、變色 */
.cb-complete .cb-title { color: var(--lantern); font-size: clamp(26px, 7vw, 34px); }
.cb-confetti { position: absolute; left: -100px; right: -100px; top: -60px; height: 440px; overflow: hidden; pointer-events: none; z-index: 2; }
.cb-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; background: var(--lantern); animation: cb-fall 2.6s ease-in both; }
.cb-confetti i:nth-child(3n) { background: var(--neon); }
.cb-confetti i:nth-child(3n+1) { background: #6BC4A6; width: 8px; height: 8px; border-radius: 50%; }
.cb-confetti i:nth-child(1) { left: 4%; animation-delay: .6s; } .cb-confetti i:nth-child(2) { left: 10%; animation-delay: .9s; }
.cb-confetti i:nth-child(3) { left: 16%; animation-delay: .7s; } .cb-confetti i:nth-child(4) { left: 22%; animation-delay: 1.1s; }
.cb-confetti i:nth-child(5) { left: 28%; animation-delay: .65s; } .cb-confetti i:nth-child(6) { left: 34%; animation-delay: 1s; }
.cb-confetti i:nth-child(7) { left: 40%; animation-delay: .75s; } .cb-confetti i:nth-child(8) { left: 46%; animation-delay: 1.2s; }
.cb-confetti i:nth-child(9) { left: 52%; animation-delay: .6s; } .cb-confetti i:nth-child(10) { left: 58%; animation-delay: .95s; }
.cb-confetti i:nth-child(11) { left: 64%; animation-delay: .7s; } .cb-confetti i:nth-child(12) { left: 70%; animation-delay: 1.05s; }
.cb-confetti i:nth-child(13) { left: 76%; animation-delay: .8s; } .cb-confetti i:nth-child(14) { left: 82%; animation-delay: 1.15s; }
.cb-confetti i:nth-child(15) { left: 88%; animation-delay: .65s; } .cb-confetti i:nth-child(16) { left: 94%; animation-delay: .9s; }
.cb-confetti i:nth-child(17) { left: 31%; animation-delay: 1.3s; } .cb-confetti i:nth-child(18) { left: 67%; animation-delay: 1.35s; }
@keyframes cb-fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(470px) rotate(540deg); opacity: .2; }
}
/* 錯過 PRO 的章：灰色章被鎖住，左右搖一搖，PRO 標彈出來 */
.cb-missed .cb-art .stamp-badge { filter: grayscale(.9) brightness(1.05); animation: cb-shake .7s .2s ease-in-out both, cb-wiggle 3s 1.2s ease-in-out infinite; }
@keyframes cb-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px) rotate(-6deg); } 40% { transform: translateX(10px) rotate(5deg); } 60% { transform: translateX(-7px) rotate(-3deg); } 80% { transform: translateX(4px); } }
.cb-lock {
  position: absolute; right: 2px; bottom: 10px; z-index: 2; padding: 4px 12px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--lantern); color: #fff; font-size: 18px; font-weight: 900; transform: rotate(-10deg);
  animation: cb-title-in .45s .7s var(--ease) both;
}
.cb-missed .cb-title { color: var(--ink); }
/* 難過的事（還不能蓋章、離店太遠）：難過的包包慢慢沉下來、輕輕晃；打卡成功 / 今天蓋過了：包包跳出來 */
.cb-oops .cb-art .stamp-badge { animation: cb-sad-sink .6s var(--ease) both, cb-sad-sway 3.4s .6s ease-in-out infinite; }
@keyframes cb-sad-sink { from { transform: translateY(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cb-sad-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg) translateY(3px); } }
.cb-checked .cb-art .stamp-badge, .cb-info .cb-art .stamp-badge { animation: cb-drop .55s cubic-bezier(.3, 1.4, .5, 1) both; }
.cb-art .stamp-badge.sad-bun, .cb-checked .cb-art .stamp-badge, .cb-info .cb-art .stamp-badge { width: 80%; height: 80%; margin-top: 10%; }
@media (prefers-reduced-motion: reduce) {
  .celebrate *, .new-tag, .steamer-steam { animation: none !important; }
  .cb-sparkles, .cb-confetti { display: none; }
}
.my-vote-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }   /* 每個投票一張獨立的卡片（App 風格），不再連成一個大框 */
.my-vote-list .my-vote {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; border: 2px solid var(--ink); border-top-width: 2px;
  border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--ink);
}
.my-vote-list .my-vote-text strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.my-vote-list .my-vote-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.my-vote-list .my-vote-actions .btn { width: 100%; }
/* PRO 剩 7 天內的小徽章：結果不會消失，只提醒續訂才能再發起 */
.my-vote-pro { justify-self: start; max-width: 100%; padding: 2px 10px; overflow: hidden; border-radius: 999px; background: #FFF3CF; color: #8A6410;
  font-size: 12px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
/* 宣傳卡：固定大小，三條投票長條輪流長高（減少動態的人不播） */
.vote-promo {
  display: grid; justify-items: center; gap: 8px; margin: 0 0 14px; padding: 18px 16px; text-align: center;
  border: 2px solid var(--ink); border-radius: 22px; background: linear-gradient(180deg, #FFF6D6, #fff 70%); box-shadow: 0 4px 0 var(--ink);
}
.vote-promo .btn { width: 100%; max-width: 280px; }
.vp-art { display: flex; align-items: flex-end; gap: 14px; height: 96px; }
.vp-bun { width: 72px; height: 72px; }
.vp-bars { display: flex; align-items: flex-end; gap: 8px; height: 88px; }
.vp-bars span { display: grid; justify-items: center; align-content: end; gap: 2px; width: 34px; height: 100%; }
.vp-bars i { display: block; width: 100%; height: 30%; border: 2px solid var(--ink); border-radius: 8px 8px 4px 4px; background: var(--lantern-soft); }
.vp-bars span:nth-child(2) i { height: 70%; background: var(--lantern); }
.vp-bars span:nth-child(3) i { height: 45%; }
.vp-bars b { font-size: 11px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.vp-title { font-size: 17px; }
.vp-sub { margin: 0; max-width: 34em; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .vp-bars i { transform-origin: bottom; animation: vp-grow 2.4s ease-in-out infinite; }
  .vp-bars span:nth-child(2) i { animation-delay: .3s; }
  .vp-bars span:nth-child(3) i { animation-delay: .6s; }
  .vp-bun { animation: bun-hop 2.4s ease-in-out infinite; }
  @keyframes vp-grow { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
}
/* 看投票的視窗 */
.vote-view .vv-sub { margin: -4px 0 12px; font-size: 13px; color: var(--ink-soft); }
.vv-options { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.vv-opt { display: grid; gap: 4px; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 14px; }
.vv-opt.win { border-color: var(--lantern); background: #FFF6F7; }
.vv-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.vv-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.vv-crown { margin-right: 6px; color: var(--lantern); font-size: 12px; }
.vv-n { flex: none; font-size: 13px; color: var(--ink-soft); }
.vv-bar { height: 6px; overflow: hidden; border-radius: 999px; background: var(--rule); }
.vv-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lantern); }
.vv-who { font-size: 12px; color: var(--muted); }
.vv-embed { display: block; width: 100%; height: 180px; border: 0; border-radius: 12px; background: var(--paper-2); }
.vv-map { justify-self: start; font-size: 12px; color: var(--ink-soft); }
.vv-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.vv-actions .btn { width: 100%; }
.my-vote-list:empty { display: none; }
.my-vote-list .empty { margin: 10px 0; }
.vote-link { width: 100%; min-height: 40px; padding: 0 10px; border: 2px solid var(--rule); border-radius: 10px; font: inherit; font-size: 13px; color: var(--ink-soft); }
#voteStep2 { display: grid; gap: 10px; }
#voteStep2.hidden { display: none; }
/* 發起投票第一步：表單和「取消」也排成一欄，按鈕一樣寬、間距跟其他對話框一致（原本「取消」縮在左邊、貼著「建立投票」的陰影） */
#voteStep1 { display: grid; gap: 14px; }

/* ---------- PRO 到期：提醒框、鎖住的收藏卡片、只剩結果的投票 ---------- */
.pro-notice { margin: 0 0 16px; padding: 12px 16px; border: 2px dashed var(--lantern); border-radius: 8px; background: var(--steam); font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.pro-notice ul { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 2px; }
.pro-notice > span { display: block; margin: 4px 0 10px; color: var(--ink-soft); }
.pro-notice .btn { width: auto; }
.card-locked { opacity: .85; }
.card-locked .card-body { padding-top: 16px; }
.card-locked .card-actions .btn { grid-column: 1 / -1; flex: 1; white-space: nowrap; }
.locked-photo { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--ink-soft); }
.locked-art .ico { width: 40px; height: 40px; }
.locked-label { font-weight: 700; font-size: 14px; }
.locked-hint { font-size: 14px; color: var(--ink-soft); }
.my-vote.locked { opacity: .6; filter: grayscale(1); }
.my-vote-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.my-vote-lock .ico { width: 14px; height: 14px; }
.vote-locked { padding: 14px 16px; border: 2px dashed var(--rule); border-radius: 18px; color: var(--ink-soft); text-align: center; }
.day-one { font-weight: 700; color: var(--ink-soft); }
/* 卡片上的分類選單、轉輪的排除天數：可愛下拉選單（白底、深色框，跟圖鑑的月份選單一致） */
.roll-exclude .cs-btn, #rollDays + .cs-btn { width: 100%; justify-content: space-between; background: #fff; color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
/* PRO 小提醒：一行字＋「小叮嚀」按鈕；細節在畫面中間的小視窗 */
.pro-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.pn-line { font-weight: 700; }
.pro-tip { max-width: 420px; }
.pro-tip .modal-in { text-align: left; }
.pro-tip .modal-title, .pro-tip-end { text-align: center; }
.pro-tip-list { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.pro-tip-list li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--paper); font-size: 14px; line-height: 1.6; }
.pro-tip-list b { color: var(--lantern); }
.pro-tip-end { font-weight: 700; }
#proTipBg .modal.pro-tip { max-height: min(84dvh, 640px); overflow: auto; }
.q-pro-tip { font-size: 13px; }
/* 畫面正中間的提醒卡 */
.center-note {
  position: fixed; left: 50%; top: 50%; z-index: 140; display: flex; align-items: center; gap: 10px;
  width: min(320px, calc(100vw - 40px)); padding: 14px 18px; border: 2px solid var(--ink); border-radius: 20px;
  background: var(--steam); color: var(--ink); box-shadow: 0 6px 0 var(--ink); font-weight: 700; line-height: 1.5;
  opacity: 0; visibility: hidden; transform: translate(-50%, -40%) scale(.92); transition: opacity .2s, transform .25s var(--ease), visibility .2s; cursor: pointer;
}
.center-note.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.cn-bun { flex: none; width: 40px; height: 40px; }
/* 手機上的小視窗也是畫面中間的圓角長方形（跟升級視窗一樣，不貼底） */
@media (max-width: 640px) {
  #proTipBg { align-items: center; justify-content: center; padding: 20px; }
  #proTipBg .modal { width: min(340px, 100%); border-bottom: 2px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); transform: translateY(24px) scale(.97); }
  #proTipBg.show .modal { transform: none; }
}
.pro-notice > .pn-line { display: inline; margin: 0; color: var(--ink); }



/* ===== 所有彈跳視窗：外框不捲（四個角永遠是圓的），只捲裡面；捲軸細細一條、沒有上下三角形箭頭，縮在圓框裡 =====
   Chrome 只要設了 scrollbar-width 就不看 ::-webkit-scrollbar（會畫出有箭頭的系統捲軸），所以支援 webkit 的瀏覽器改回 auto */
.modal:not(.celebrate) { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; max-height: min(88vh, 88dvh); }
.modal:not(.celebrate) > :not(.modal-in) { flex: none; }
.modal:not(.celebrate) > .modal-in { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; margin: 6px 4px 6px 0; }
/* 內容比視窗高時，格線列不可以被壓扁：不然 overflow: hidden 的「登入／註冊」切換鈕會被壓成 4px 高、點不到（註冊回不去登入的原因） */
.modal-in { grid-auto-rows: max-content; }
#proTipBg .modal.pro-tip, #upgradeBg .modal.upgrade { overflow: hidden; }
/* Firefox 沒有 ::-webkit-scrollbar：用細捲軸（Firefox 的捲軸本來就沒有箭頭） */
@supports not selector(::-webkit-scrollbar) {
  .modal-in { scrollbar-width: thin; scrollbar-color: rgba(59, 44, 53, .35) transparent; }
}
@supports selector(::-webkit-scrollbar) {
  .modal .modal-in, .modal.upgrade > .modal-in { scrollbar-width: auto !important; scrollbar-color: auto !important; }
}
.modal-in::-webkit-scrollbar { width: 5px; }
.modal-in::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.modal-in::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(59, 44, 53, .32); }
.modal-in::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
@media (max-width: 640px) {
  /* 手機：每個彈跳視窗都是畫面正中間的圓角卡片（不貼底、不滿版），包含到店蓋章的結果 */
  .modal-bg { align-items: center; justify-content: center; padding: 20px; }
  .modal:not(.celebrate) { width: min(360px, 100%); max-width: none; max-height: min(80dvh, 640px); border-bottom: 2px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); transform: translateY(24px) scale(.97); }
  .celebrate { width: min(340px, 100%); border-radius: 22px; }
  .modal-bg.show .modal { transform: none; }
}

/* ===== 字數超過：輸入框變紅、下面一行紅字 ===== */
.len-hint { display: none; margin: 6px 4px 0; color: #B42318; font-size: 13px; font-weight: 700; }
.len-hint.show { display: block; }
input.over, textarea.over { border-color: #B42318 !important; box-shadow: 0 3px 0 #B42318 !important; }


/* ===== 轉輪（PRO 先選排除再按「開始抽」）：還沒抽時中間那格放「？？？」 ===== */
.reel .reel-wait { margin-top: 64px; opacity: .75; }
#rollStart { justify-self: center; min-width: 180px; }
/* 免費會員：「排除最近 N 天」是 PRO 功能，整排看起來鎖住（淡一點），點哪裡都直接打開 PRO 介紹；PRO 小標籤維持亮的 */
.roll-exclude.locked, .roll-exclude.locked * { cursor: pointer; }
.roll-exclude.locked > :not(.pro-tag) { opacity: .5; }

/* ===== 手機對話框：左右留白一樣寬（原本右邊多留 4px 給捲軸，內容出現捲軸時又再偏一點，按鈕看起來靠左）=====
   兩邊各留同樣的捲軸位置（scrollbar-gutter both-edges），有沒有捲軸，按鈕都正好置中、一樣寬 */
@media (max-width: 640px) {
  .modal:not(.celebrate) > .modal-in, .modal.upgrade > .modal-in { margin-left: 2px; margin-right: 2px; scrollbar-gutter: stable both-edges; }
  .modal-in > .btn, .modal-in .stack > .btn, .roll-actions > .btn, #voteStep1 > .btn, #voteStep2 > .btn { width: 100%; }
}

/* ===== 小資方案（LITE）與加價購 ===== */
.q-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; align-self: center; }
.q-btns:empty { display: none; }
.q-addon small { margin-left: 2px; opacity: .8; font-weight: 700; }
.q-plan.is-lite { color: #C2185B; }
.pro-badge.lite-badge { background: linear-gradient(135deg, #FFE1EA, #FFB3C7); }
.plan-compare .is-lite { color: #C2185B; }
.plan-opt.plan-lite span { border-style: dashed; }
.plan-opt.is-disabled { cursor: not-allowed; }
.plan-opt.is-disabled span { opacity: .45; filter: grayscale(.6); }
.plan-rule { color: var(--lantern); font-weight: 700; }
.addon-modal { max-width: 400px; text-align: center; }
.addon-modal .pro-tip-list { text-align: left; }
.addon-offer { font-size: 16px; line-height: 1.6; }
.addon-offer b { color: var(--lantern); }
.addon-warn { color: #B7791F; font-weight: 700; }
@media (max-width: 640px) {
  .q-btns { width: 100%; }
  .q-btns .btn { flex: 1 1 0; }
  /* 三欄比較表：手機上字小一點、欄寬平均 */
  .upgrade .plan-compare { font-size: 12px; }
  .upgrade .plan-compare th, .upgrade .plan-compare td { padding: 6px 3px; }
}
.plan-opt.plan-lite { grid-column: 1 / -1; }
/* 小資：名稱和價格排成一行（左名稱、右價格） */
.plan-opt.plan-lite span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.q-btns { align-items: stretch; } .q-btns .btn { white-space: nowrap; justify-content: center; }

/* ===== 升級視窗：方案框一樣大、文字置中不超出；「最推薦」小標；怎麼選的提示 ===== */
.plan-options { align-items: stretch; padding-top: 10px; }
.plan-opt { display: grid; }
.plan-opt span { height: 100%; box-sizing: border-box; align-content: center; justify-items: center; text-align: center; }
.plan-opt span > * { max-width: 100%; }
.plan-opt.plan-best span { position: relative; border-color: var(--lantern); background: #FFF5F7; }
.plan-opt.plan-best span::before {
  content: "最推薦"; position: absolute; top: -10px; right: 10px; padding: 0 8px; border-radius: 999px;
  background: var(--lantern); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.7; white-space: nowrap;
}
html[lang="en"] .plan-opt.plan-best span::before { content: "Recommended"; }
html[lang="ja"] .plan-opt.plan-best span::before { content: "おすすめ"; }
.plan-tip { padding: 8px 12px; border-radius: 12px; background: var(--paper); color: var(--ink); text-align: left; line-height: 1.6; }

/* 方案框每一排一樣高（含「最推薦」那排），價格字在窄螢幕縮一點才不會超出框 */
/* 小資那一行（第一排）照內容高度；PRO 各排一樣高 */
.plan-options { grid-auto-rows: 1fr; grid-template-rows: auto; }
@media (max-width: 640px) { .plan-opt em { font-size: 20px; } .plan-opt b { font-size: 15px; } }
/* 揪團投票的截止時間：日期＋幾點：幾分（24 小時制，可愛下拉選單）；窄螢幕日期一排、時間一排 */
.vote-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.vote-when .vw-time { display: inline-flex; align-items: center; gap: 4px; }
.vote-when .vw-colon { font-weight: 900; font-size: 18px; color: var(--ink); }
.vote-when .cute-select { min-width: 0; }
.vote-when .vw-day { min-width: 0; }
.vote-when .cs-btn { background: #fff; color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); font-variant-numeric: tabular-nums; }
.vote-when .vw-time .cs-btn { padding-left: 12px; }
.vote-when-hint { margin: 0; font-size: 13px; color: var(--muted); }
.vote-when-warn { margin: 0; padding: 8px 12px; border: 2px dashed #E0A100; border-radius: 14px; background: #FFF8E1; color: #7A4B00; font-size: 13px; font-weight: 700; line-height: 1.5; }
.vote-when-warn.hidden { display: none; }
@media (max-width: 380px) { .vote-when .cs-btn { font-size: 14px; } }

/* ============================================================================
   App 風格版面（手機像 App：底部分頁列、App bar、大圓角卡片、店家底部抽屜、浮動按鈕）
   寬螢幕（768px 以上）不硬撐開：內容置中、最寬 var(--app-max)，分頁列變成浮在下方的膠囊。
   原本的主題（可愛／經典）、PRO 外觀、包包與蓋章動畫都照舊，只換外框與版面。
   ============================================================================ */
:root { --app-max: 600px; --tabbar-h: 64px; --app-r: 20px; --soft-shadow: 0 6px 18px rgba(20, 48, 74, .10); }
main { max-width: var(--app-max); padding: calc(16px + env(safe-area-inset-top)) 16px calc(var(--tabbar-h) + 104px + env(safe-area-inset-bottom)); }   /* 沒有置頂列：上面留瀏海安全區 */
.topbar { padding: 10px max(16px, calc((100vw - var(--app-max)) / 2 + 16px)); }
.view-title { font-size: clamp(24px, 6vw, 32px); margin-bottom: 14px; }
body.logged-in .site-footer { display: none; }
body.logged-in .topbar .lang-switch { display: none; }      /* 登入後語言在「我的」裡切換 */
.user-box { margin-left: auto; }

/* ---------- 方案徽章：在「我的」會員卡的暱稱旁邊（首頁沒有置頂列） ---------- */
.me-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.me-name-row .pro-badge { flex: none; font-size: 11px; }
@media (max-width: 640px) {
  .lang-switch .cs-value { display: none; }
  .lang-switch .cs-btn::before { content: "中"; font-weight: 800; }
  html[lang="en"] .lang-switch .cs-btn::before { content: "EN"; }
  html[lang="ja"] .lang-switch .cs-btn::before { content: "日"; }
  /* 日文店名「バオバオ・フードファインダー」有 14 個字：縮小字級、不加字距，320 寬也放得下 */
  html[lang="ja"] .brand-name { font-size: 14px; letter-spacing: 0; }
  .topbar { flex-wrap: nowrap; }
  .brand { min-width: 0; }
}

/* ---------- 分頁列：手機固定在底部（圖示＋文字，目前分頁紅色） ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--steam); border-top: 1px solid var(--rule); box-shadow: 0 -4px 16px rgba(20, 48, 74, .06);
}
.tabbar .tab {
  position: relative; display: grid; place-items: center; align-content: center; gap: 2px; min-width: 0; padding: 6px 2px;
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: color .2s;
}
.tabbar .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-ico { width: 24px; height: 24px; transition: transform .25s var(--ease); }
.tabbar .tab:hover { color: var(--ink); }
.tabbar .tab.active { color: var(--lantern); }
.tabbar .tab.active .tab-ico { transform: translateY(-2px) scale(1.08); }
.tabbar .tab:focus-visible { outline-offset: -4px; }
.tabbar .tab-ink {
  position: absolute; top: 0; left: 0; z-index: 2; height: 3px; width: var(--w, 0); border-radius: 0 0 3px 3px;
  background: var(--lantern); transform: translateX(var(--x, 0)); transition: transform .4s var(--ease), width .4s var(--ease);
}
/* 集章有新章：圖示右上角的小紅點 */
.tabbar .tab.has-new::after { position: absolute; top: 8px; left: calc(50% + 6px); margin: 0; }
@media (min-width: 768px) {
  /* 寬螢幕：浮在下方正中間的膠囊，不撐滿整個畫面 */
  .tabbar {
    left: 50%; right: auto; bottom: 16px; width: min(480px, calc(100% - 32px)); height: var(--tabbar-h); padding: 0 6px;
    transform: translateX(-50%); border: 1px solid var(--rule); border-radius: 999px; box-shadow: var(--soft-shadow); overflow: hidden;
  }
  .tabbar .tab { grid-auto-flow: column; gap: 6px; font-size: 14px; }
  .tabbar .tab-ink { top: auto; bottom: 0; border-radius: 3px 3px 0 0; }
  main { padding-bottom: calc(var(--tabbar-h) + 120px); }
}

/* ---------- 浮動按鈕：幫我選一家 ---------- */
.fab {
  position: fixed; z-index: 35; margin: 0; padding: 12px 18px; font-size: 15px;
  right: max(16px, calc((100vw - var(--app-max)) / 2 + 16px)); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  box-shadow: 0 8px 20px rgba(210, 51, 31, .35); transition: bottom .3s var(--ease), transform .15s var(--ease);
}
.fab:not([hidden]) { animation: fab-in .4s var(--ease); }
@keyframes fab-in { from { transform: translateY(16px) scale(.9); opacity: 0; } }
body.has-tray .fab { bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
  .fab { bottom: calc(var(--tabbar-h) + 32px); }
  body.has-tray .fab { bottom: calc(var(--tabbar-h) + 100px); }
}
/* 投票列、底部提示：往上讓開分頁列 */
.vote-tray { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); width: min(var(--app-max), calc(100% - 32px)); }
body.logged-in .toast { bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
  .vote-tray { bottom: calc(var(--tabbar-h) + 28px); }
  body.logged-in .toast { bottom: calc(var(--tabbar-h) + 40px); }
}

/* ---------- 搜尋頁上方的額度（精簡版） ---------- */
.quota-mini {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; padding: 10px 14px;
  border-radius: 16px; background: var(--steam); box-shadow: var(--soft-shadow); font-size: 13px; color: var(--ink-soft);
}
.qm-plan { padding: 1px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-weight: 800; font-size: 12px; }
.qm-plan.is-pro { background: linear-gradient(135deg, #FFD54A, #E8A100); color: #3B2C35; }
.qm-plan.is-lite { background: #FFE1EA; color: #8A1846; }
.qm-item b { margin: 0 1px; color: var(--lantern); font-size: 16px; font-variant-numeric: tabular-nums; }
.qm-alert { flex-basis: 100%; color: var(--lantern); font-size: 14px; }
.qm-btns { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.qm-btns .btn { width: auto; }
.quota-mini.q-warn { background: #FFF4CC; }
.quota-mini.q-out { background: #FDE7E3; }
.qm-loading, .qm-err, .q-loading { color: var(--muted); }

/* ---------- 搜尋表單：類型一排左右滑、進階條件收起來 ---------- */
.order-sheet { margin-bottom: 20px; }
/* 藏起來的 radio 要定位在自己的標籤裡：類型那排可以左右滑時，才不會跑到捲動框外面把整頁撐寬 */
.pill, .pill-row { position: relative; }
@media (max-width: 640px) {
  .pill-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; padding: 4px 6px 6px; }
  .pill-row::-webkit-scrollbar { display: none; }
  .pill span { white-space: nowrap; }
}
.more-filters { padding-top: 14px; border-top: 2px dashed var(--rule); }
.more-filters summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary::before {
  content: "+"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--lantern); color: #fff; font-size: 16px; font-weight: 900; line-height: 1; transition: transform .25s var(--ease);
}
.more-filters[open] summary::before { transform: rotate(45deg); }
.more-filters .thresholds { margin-top: 14px; }

/* ---------- 排序：一排左右滑 ---------- */
.sortbar { flex-wrap: wrap; margin-bottom: 14px; }
.sort-chips { display: flex; gap: 8px; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.sort-chips::-webkit-scrollbar { display: none; }
.sort-chips .chip { flex: none; min-height: 34px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.sortbar .status { flex-basis: 100%; margin-left: 0; font-size: 14px; }
/* 篩選（設施）也是一排左右滑，不要在手機上佔掉半個畫面 */
.filter-chips { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips .chip { flex: none; white-space: nowrap; }

/* ---------- 店家卡片（App 風格：上面地圖、下面文字，整張可以點） ---------- */
.list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.list .card {
  --print: var(--soft-shadow);
  flex-direction: row; align-items: stretch; gap: 12px; min-width: 0; padding: 10px;
  border: 1.5px solid transparent; border-radius: var(--app-r); box-shadow: var(--soft-shadow); cursor: pointer; transition: transform .15s var(--ease), border-color .2s;
}
html[data-theme] .list .card { border-radius: var(--app-r); box-shadow: var(--soft-shadow); border-color: transparent; }
.list .card:hover { transform: translateY(-1px); border-color: var(--rule); }
/*
 * 每張店家卡一樣高（像 App 的清單，卡片不能忽大忽小）：卡片固定 360px，店名最多 2 行，評分距離價位、營業與類型、設施各固定一行（放不下就左右滑），
 * 下面幾排高度固定、不准被壓縮（iPhone 字比較高時營業中那些橢圓曾被擠扁）；店名一行或沒有設施時多出來的高度給地圖，店名下面不留空白。
 */
.list .card { flex-direction: column; gap: 8px; height: 360px; }   /* 載入中的骨架卡片也一樣高，結果出來時不會跳動 */
.list .card:not(.skeleton) .card-body { overflow: hidden; }
.list .facts { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.list .facts li { flex: none; }
.list .facts li.fact-rate { flex: none; }
.list .card-tags { flex-wrap: nowrap; overflow: hidden; }
.list .card-tags > * { flex: 0 1 auto; min-width: 0; }
.list .card-body { flex: none; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 0 4px 2px; }
.list .card-name { font-size: 16px; line-height: 1.3; }
/* 店名最多 2 行：行數限制放在按鈕裡的 span（iPhone Safari 不支援在 button 上限制行數，店名會撐開卡片） */
.card-open {
  display: block; width: 100%;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 6px;
}
.card-open:hover { color: var(--lantern); }
.card-name-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.list .card-map { flex: 1 1 auto; height: auto; min-height: 150px; }
.list .card-body > * { flex: none; }
.list .row-scroll, .list .card-tags { height: 24px; align-items: center; }
.list .row-scroll > ul { height: 100%; align-items: center; }
.list .row-scroll > .facts { overflow-x: auto; overflow-y: hidden; }
.list .facts { gap: 0 10px; font-size: 12.5px; }
.list .facts li { min-width: 0; }
.list .facts .ico { width: 13px; height: 13px; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.card-tags .tag, .sheet-open .tag { position: static; padding: 0 8px; border-width: 1.5px; font-size: 11.5px; }
.cat-tag { max-width: 100%; padding: 0 8px; overflow: hidden; border-radius: 999px; background: var(--note); color: var(--ink-soft); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
/* 設施那一行：左右滑，右邊還有就出現會輕輕晃的小箭頭 */
.row-scroll { position: relative; min-width: 0; }
.row-scroll > ul { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.row-scroll > ul::-webkit-scrollbar { display: none; }
.row-scroll .ftag { flex: none; white-space: nowrap; font-size: 11.5px; padding: 0 8px; }
.sortbar > .row-scroll, .filterbar > .row-scroll { flex: 1 1 0; min-width: 0; }
.hs-btn {
  position: absolute; top: 50%; z-index: 2; display: none; place-items: center; width: 24px; height: 24px; margin-top: -12px; padding: 0;
  border: 1.5px solid var(--rule); border-radius: 50%; background: #fff; color: var(--lantern); font: 900 16px/1 sans-serif;
  box-shadow: 0 2px 6px rgba(59, 44, 53, .18); cursor: pointer;
}
.hs-next { right: 0; }
.hs-prev { left: 0; }
.row-scroll.more > .hs-next, .row-scroll.less > .hs-prev { display: grid; }
.row-scroll.more > .hs-next { animation: swipe-nudge 1.4s ease-in-out infinite; }
.hs-btn:hover { border-color: var(--lantern); }
.hs-btn:focus-visible { outline: 2px solid var(--lantern); outline-offset: 2px; }
@keyframes swipe-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }
/* 選進揪團投票的店：右上角綠色小勾勾 */
.card-check { position: absolute; top: 8px; right: 8px; display: none; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ok); color: #fff; }
.card-check .ico { width: 14px; height: 14px; }
html[data-theme] .list .card.picked { border-color: var(--ok); }
.list .card.picked .card-check { display: grid; }
.list .card.picked .card-body { padding-right: 26px; }
.list .card.skeleton { cursor: default; }
.list .skeleton .card-body { padding-top: 8px; gap: 10px; }
.g-credit { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
html[data-theme][data-look="pro"] .list .card { box-shadow: 0 6px 18px rgba(217, 194, 122, .45); }
@media (prefers-reduced-motion: reduce) { .row-scroll.more > .hs-next, .fab:not([hidden]) { animation: none; } .list .card:hover { transform: none; } }

/* ---------- 店家底部抽屜（bottom sheet） ---------- */
#modalBg.sheet-bg { align-items: flex-end; justify-content: center; padding: 0; }
#modalBg .modal.sheet {
  width: min(560px, 100%); max-width: none; max-height: min(88dvh, 88vh); border: 0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 30px rgba(20, 48, 74, .2); transform: translateY(100%); transition: transform .35s var(--ease);
}
#modalBg.show .modal.sheet { transform: none; }
.sheet-grab { display: block; flex: none; width: 40px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: var(--rule); }
.sheet .modal-in { gap: 10px; padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet .modal-title { font-size: 22px; overflow-wrap: anywhere; }
.sheet .facts { gap: 2px 14px; }
.sheet-open:empty, .sheet-addr:empty, .sheet-feats:empty, .sheet-embed:empty { display: none; }
.sheet-addr { font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.sheet-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.sheet-actions > * { width: 100%; min-width: 0; padding: 0 10px; line-height: 1.25; text-align: center; white-space: normal; }
.sheet-actions .btn-checkin, .sheet-actions .vote-pick { grid-column: 1 / -1; }
.sheet .btn-checkin { border-style: solid; }
.sheet .vote-pick { min-height: 44px; font-size: 15px; }
.sheet .g-credit { margin: 0; }
.vote-pick.stamped { animation: hanko .55s var(--ease); }
@media (max-width: 360px) { .sheet-actions { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 我的 ---------- */
.me-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--app-r); background: var(--steam); box-shadow: var(--soft-shadow); }
.avatar.avatar-lg { width: 52px; height: 52px; font-size: 22px; }
.me-text { display: grid; gap: 2px; min-width: 0; }
.me-text b { font-size: 18px; overflow-wrap: anywhere; }
.me-email { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.me-sec { margin: 22px 2px 8px; font-size: 15px; color: var(--ink); }
.me-hint { margin: -4px 2px 10px; font-size: 13px; color: var(--muted); }
#viewMe .quota-bar { margin: 0; }
.plan-cards { display: grid; gap: 12px; padding-top: 6px; }
.plan-card {
  position: relative; display: grid; gap: 4px; width: 100%; padding: 14px 16px; border: 2px solid transparent; border-radius: 18px;
  background: var(--steam); box-shadow: var(--soft-shadow); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease), border-color .2s;
}
.plan-card:hover { transform: translateY(-1px); border-color: var(--rule); }
.plan-card.plan-best { border-color: var(--lantern); }
.plan-card.plan-best::after {
  content: "最推薦"; position: absolute; top: -10px; right: 14px; padding: 0 8px; border-radius: 999px;
  background: var(--lantern); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.7; white-space: nowrap;
}
html[lang="en"] .plan-card.plan-best::after { content: "Recommended"; }
html[lang="ja"] .plan-card.plan-best::after { content: "おすすめ"; }
.plan-card.is-disabled { opacity: .55; }
.pc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.pc-head b { font-size: 16px; }
.pc-head em { font-family: var(--serif); font-size: 19px; font-style: normal; font-weight: 900; color: var(--lantern); }
.plan-card.plan-lite .pc-head em { color: #C2185B; }
.pc-note { font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.me-settings { padding: 2px 16px; border-radius: var(--app-r); background: var(--steam); box-shadow: var(--soft-shadow); }
.set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.set-row:first-child { border-top: 0; }
.set-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.set-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.set-btn {
  min-height: 36px; padding: 0 14px; border: 2px solid var(--rule); border-radius: 999px; background: #fff;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.set-btn[aria-pressed="true"] { border-color: var(--lantern); background: var(--lantern); color: #fff; }
.me-links { display: flex; flex-wrap: wrap; gap: 8px; }
.me-links .btn { flex: 1 1 140px; }
#viewMe .btn-logout { width: 100%; margin-top: 24px; }
.me-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 18px; font-size: 13px; }
/* 刪除帳號：放在最下面、字小、不搶眼；視窗裡的確認鈕是紅色 */
.me-delete { display: block; margin: 14px auto 0; font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.da-warn { margin: 0 0 10px; color: #A32D2D; font-weight: 700; }
.btn-danger { background: #C0392B; color: #fff; border-color: var(--ink); }
.btn-danger:hover { background: #A93226; }
.me-legal a { color: var(--ink-soft); }
.me-legal a:hover { color: var(--lantern); }
.back-link { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .plan-card:hover { transform: none; } }

/* ---------- 集章圖鑑（App 收藏頁排法）：總進度卡 → 分段切換 → 每一套一列（高度固定） ---------- */
.sb-title { display: flex; align-items: center; gap: 10px; }
.sb-title .view-title { flex: 1; min-width: 0; }
.sb-help {
  flex: none; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink);
  font-weight: 800; font-size: 17px; line-height: 1; box-shadow: 0 3px 0 var(--ink); cursor: pointer;
}
.sb-help:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.sb-summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: 0 4px 0 var(--ink); }
.sb-ring {
  --p: 0; flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: conic-gradient(var(--lantern) calc(var(--p) * 1%), var(--lantern-soft, #FFE1E7) 0);
}
.sb-ring span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #fff; font-weight: 800; font-size: 15px; }
.sb-sum-text { display: grid; gap: 2px; min-width: 0; }
.sb-sum-text strong { font-size: 18px; line-height: 1.3; }
.sb-sum-text small { font-size: 12.5px; color: var(--muted); }
.sb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sb-chips span { padding: 2px 9px; border-radius: 999px; background: var(--paper); color: var(--ink-soft); font-size: 11.5px; white-space: nowrap; }
/* 分段切換：捲動時黏在上面 */
.sb-seg {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  margin: 16px calc(var(--gutter, 16px) * -1) 14px; padding: 8px var(--gutter, 16px); background: var(--paper);
}
.sb-seg button {
  position: relative; min-height: 38px; padding: 6px 2px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
html[lang="en"] .sb-seg button { font-size: 12px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 360px) { html[lang="en"] .sb-seg { gap: 4px; } html[lang="en"] .sb-seg button { padding: 4px 1px; font-size: 11px; letter-spacing: -.2px; } }   /* 英文字比較長：可以換行，不會被切掉 */
.sb-seg button.on { background: var(--lantern); color: #fff; box-shadow: 0 3px 0 var(--ink); }
.sb-seg button.has-new::after { content: ""; position: absolute; top: -3px; right: 6px; width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; background: var(--neon); }
.sb-list { display: grid; gap: 14px; }
.sb-row { min-width: 0; padding: 12px 0 12px 14px; border: 2px solid var(--ink); border-radius: 20px; background: #fff; box-shadow: 0 4px 0 var(--ink); }
.sb-row.sb-now { background: linear-gradient(180deg, #FFF6D6, #fff 70%); }
.sb-row-head {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 0 12px 0 0; border: 0; background: none; color: var(--ink);
  text-align: left; cursor: pointer;
}
.sb-row-head.is-static { cursor: default; }
.sb-row-name { min-width: 0; overflow: hidden; font-size: 16px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.sb-until { flex: none; font-size: 11.5px; color: var(--muted); }
.sb-row-count { flex: none; margin-left: auto; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.sb-row-count b { color: var(--lantern); font-size: 15px; }
button.sb-row-head .sb-row-count::after { content: "›"; margin-left: 6px; font-size: 20px; line-height: 0; color: var(--ink); vertical-align: -2px; }
.sb-bar { height: 6px; margin: 8px 14px 10px 0; overflow: hidden; border-radius: 999px; background: var(--rule, #E6D8DE); }
.sb-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lantern); transition: width .6s var(--ease); }
/* 橫向預覽：固定高度，超過的往右滑（不顯示捲軸） */
.sb-strip {
  display: flex; gap: 10px; margin: 0; padding: 2px 14px 4px 0; overflow-x: auto; overflow-y: hidden; list-style: none;
  scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sb-strip::-webkit-scrollbar { display: none; }
.sb-cell { flex: none; display: grid; justify-items: center; gap: 2px; width: 72px; text-align: center; scroll-snap-align: start; }
.sb-cell .stamp-badge { width: 62px; height: 62px; }
.sb-cell .stamp-name { max-width: 72px; overflow: hidden; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.sb-cell:not(.got) .stamp-name { color: var(--muted); }
.sb-cell.got .stamp-badge { animation: stamp-wiggle 4s ease-in-out infinite; }
.sb-row.locked .sb-strip { opacity: .6; }
.sb-lock-note { margin: 6px 14px 0 0; font-size: 12.5px; color: var(--muted); }
.sb-world-intro { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
/* 地區分頁依國家分組：國家小標題＋那個國家的系列 */
.sb-country-group { display: grid; gap: 12px; min-width: 0; }
.sb-country-name { margin: 4px 2px 0; font-size: 15px; font-weight: 900; color: var(--ink); }
.sb-world-dots { display: flex; flex-wrap: nowrap; overflow: hidden; padding-right: 14px; }
.sb-world-dots li { flex: none; width: 34px; }
.sw-mystery.sb-row { padding: 14px; border-style: dashed; }
/* 整套畫面：從右邊滑進來 */
.sb-detail { animation: sb-slide-in .28s var(--ease) both; }
.sb-back { margin-bottom: 10px; }
@keyframes sb-slide-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sb-detail, .sb-cell.got .stamp-badge { animation: none; } .sb-bar i { transition: none; } }

/* ---------- 揪團投票頁 ---------- */
.vo-card { margin-top: 10px; }
.vo-embed { display: block; width: 100%; height: 220px; border: 0; border-radius: 14px; background: var(--paper-2); }
.vo-maplink { width: 100%; }
@media (max-width: 380px) { .vo-embed { height: 190px; } }

/* 額度按鈕（升級、加價購）：排成整齊的格子，字多時在按鈕裡換行置中，
   不會一顆擠扁、一顆撐長 */
.q-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; width: 100%; align-items: stretch; }
.q-btns .btn { width: 100%; min-width: 0; white-space: normal; text-align: center; justify-content: center; line-height: 1.35; padding-top: 8px; padding-bottom: 8px; }
.q-btns .btn small { white-space: nowrap; }

/* 額度卡（App 風格、固定大小）：上面方案徽章＋「i」，中間兩條進度，一行狀態（放不下就省略），下面按鈕列；細節在明細視窗 */
.quota-bar.quota-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: stretch; padding: 14px 16px; }
.qc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qc-chip { flex: none; padding: 1px 10px; border: 1.5px solid currentColor; border-radius: 999px; font-size: 12.5px; }
.qc-title { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.qc-info {
  flex: none; width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink);
  font: italic 800 14px/1 Georgia, serif; cursor: pointer;
}
.qc-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qc-meter { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--paper); }
.qc-k { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.qc-n { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.qc-n b { font-family: var(--serif); font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.qc-n small { font-size: 12px; color: var(--muted); }
.qc-note { font-size: 11px; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }   /* 照片換成搜尋的張數：可以換行，英文較長也不會撐寬 */
.qc-bar { height: 6px; overflow: hidden; border-radius: 999px; background: var(--rule); }
.qc-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lantern); transition: width .6s var(--ease); }
.q-pro .qc-bar i { background: #D9B95E; }
.qc-status { margin: 0; min-height: 1.5em; overflow: hidden; font-size: 13px; color: var(--ink-soft); white-space: nowrap; text-overflow: ellipsis; }
.qc-status.is-alert { color: var(--lantern); font-weight: 700; }
.quota-info .qi-plan { margin: 0 0 8px; font-weight: 700; }
.quota-info .qi-plan.is-pro { color: var(--lantern); }
.quota-info .qi-list { display: grid; gap: 6px; margin: 0 0 12px; padding-left: 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { .qc-bar i { transition: none; } }

/* ============================================================================
   首頁（未登入）：App 開場畫面
   手機一欄置中：蒸籠包包 → 店名 → 標語 → 兩顆按鈕 → 試用 → 賣點（一張點菜單，一列一項）。
   768px 以上：內容置中、最寬 1080px，上面兩欄（左文案按鈕、右蒸籠包包），賣點點菜單 2×2；1080px 以上排成 4 欄。
   唯一的重點是蒸籠裡的包包；其他保持安靜。
   ============================================================================ */
:root { --bamboo: #F2C66D; --bamboo-deep: #D9A441; }
body:not(.logged-in) main { max-width: 1080px; padding: calc(12px + env(safe-area-inset-top)) 16px 8px; }
.guest { padding: 0 0 8px; }
.wel-hero { display: grid; justify-items: center; text-align: center; }
.wel-copy { display: grid; justify-items: center; width: 100%; container-type: inline-size; }

/* 蒸籠包包（手機放最上面） */
.wel-art { position: relative; order: -1; width: min(250px, 70vw); aspect-ratio: 240 / 200; margin: 6px auto 4px; }
.wel-art::before {
  content: ""; position: absolute; left: 4%; right: 4%; top: 2%; bottom: 6%; border-radius: 50%;
  background: var(--lantern-soft);
}
.wel-steamer { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.wel-steamer use { animation: bun-bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 90%; }
.ws-shadow { fill: rgba(20, 48, 74, .12); }
.ws-back { fill: var(--bamboo-deep); stroke: var(--ink); stroke-width: 5; }
.ws-front { fill: var(--bamboo); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.ws-band, .ws-slat { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.ws-slat { stroke-width: 3; opacity: .45; }
/* 搜尋條件貼紙：斜斜貼在蒸籠旁邊 */
.wel-sticker {
  position: absolute; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--steam);
  color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; box-shadow: 0 3px 0 var(--ink);
}
.wel-st-open { left: -8%; top: 30%; background: #BFF0DF; transform: rotate(-8deg); }
.wel-st-star { right: -8%; top: 8%; background: var(--neon); transform: rotate(7deg); }
.wel-st-near { right: -6%; bottom: 20%; transform: rotate(-4deg); }

/* 店名與標語 */
.wel-title { display: grid; justify-items: center; gap: 4px; margin: 0; }
.wel-name { font-size: clamp(46px, 14vw, 64px); line-height: 1.05; letter-spacing: .04em; }
/*
 * 中文店名「包包找美食」一律一行：不換行，字級最多是左欄（.wel-copy）寬的 1/5.8（5 個字＋字距＋螢光筆左右內距約 5.5 個字寬）。
 * 原本寬度剛好貼齊，字型還沒載完或手機字比較寬時就會被擠成兩行。
 */
.wel-title > .wel-name { white-space: nowrap; font-size: min(clamp(46px, 14vw, 64px), calc(100cqi / 5.8)); }
/* 英文「BaoBao Food Finder」比較長（字寬約 13 個字級）：依可用寬度（畫面寬 − 左右各 16px）算字級，手機上維持一行 */
html[lang="en"] .wel-name { font-size: min(calc((100vw - 32px) / 14), 58px); letter-spacing: .01em; white-space: nowrap; }
/* 日文「バオバオ・フードファインダー」14 個全形字：同樣依可用寬度算字級，維持一行 */
html[lang="ja"] .wel-name { font-size: min(calc((100vw - 32px) / 15), 54px); letter-spacing: 0; white-space: nowrap; }
.wel-sub { font-size: 15px; font-weight: 700; color: var(--lantern); letter-spacing: .08em; }
.wel-tagline { margin-top: 14px; font-family: var(--serif); font-weight: 900; font-size: clamp(19px, 5.4vw, 24px); line-height: 1.4; color: var(--ink); }
.wel-lead { max-width: 26em; margin-top: 6px; font-size: 15px; line-height: 1.7; color: var(--ink-soft); }

/* 按鈕：手機兩顆疊起來、整排寬 */
.wel-cta { display: grid; gap: 10px; width: 100%; max-width: 360px; margin-top: 20px; }
.wel-cta .btn { width: 100%; }
.wel-cta .btn-ghost { border-color: var(--ink); background: var(--steam); }
.wel-trial {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 14px; padding: 5px 14px 5px 5px;
  border-radius: 999px; background: var(--note); color: var(--ink); font-size: 13.5px; font-weight: 700; line-height: 1.45; text-align: left;
}
.wel-trial b { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--steam); font-size: 12px; }

/* 賣點：一張點菜單，項目之間用虛線隔開 */
.wel-points {
  display: grid; width: 100%; max-width: 520px; margin: 28px auto 0; padding: 4px 16px; text-align: left;
  background: var(--steam); border: 2px solid var(--ink); border-radius: var(--app-r); box-shadow: var(--print);
}
.wel-point { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-content: start; padding: 14px 0; border-top: 2px dashed var(--rule); }
.wel-point:first-child { border-top: 0; }
.wp-ico { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); }
.wp-ico svg { width: 22px; height: 22px; }
.wel-point:first-child .wp-ico { background: var(--lantern); color: var(--steam); }
.wp-title { font-family: var(--serif); font-weight: 900; font-size: 16px; line-height: 1.4; }
.wp-text { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }

/* 底部：語言切換＋條款（未登入才有；左下角包包的位置要讓開） */
.site-footer { display: grid; justify-items: center; gap: 12px; padding: 20px 16px calc(84px + env(safe-area-inset-bottom)); }
.foot-lang { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

@media (min-width: 768px) {
  body:not(.logged-in) main { padding: clamp(24px, 6vh, 64px) 32px 8px; }
  /* 直式平板很高：開場內容在畫面中間，條款與語言留在下面 */
  .guest { display: grid; align-content: center; min-height: calc(100dvh - 220px); }
  .wel-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 32px; text-align: left; justify-items: stretch; }
  .wel-copy { justify-items: start; }
  .wel-art { order: 0; width: min(100%, 400px); justify-self: center; margin: 0; }
  .wel-title { justify-items: start; }
  .wel-name { font-size: clamp(64px, 8.5vw, 104px); }
  .wel-title > .wel-name { font-size: min(clamp(64px, 8.5vw, 104px), calc(100cqi / 5.8)); }
  /* 平板以上店名在左欄（約 (main 寬 − 左右內距 64px − 欄距 32px) × 0.55），一樣依欄寬算字級 */
  html[lang="en"] .wel-name { font-size: calc((min(100vw, 1080px) - 96px) * .039); }
  html[lang="ja"] .wel-name { font-size: calc((min(100vw, 1080px) - 96px) * .036); }
  .wel-sub { font-size: 17px; }
  .wel-tagline { font-size: clamp(22px, 2.6vw, 28px); }
  .wel-lead { font-size: 16px; }
  .wel-cta { display: flex; flex-wrap: wrap; max-width: none; }
  .wel-cta .btn { width: auto; }
  .wel-sticker { font-size: 13px; }
  /* 平板：2×2，直的虛線也畫出來 */
  .wel-points { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; padding: 6px 24px; }
  .wel-point:nth-child(2) { border-top: 0; }
  .wel-point:nth-child(odd) { padding-right: 20px; }
  .wel-point:nth-child(even) { padding-left: 20px; border-left: 2px dashed var(--rule); }
  .site-footer { padding-bottom: 32px; }
}
@media (min-width: 1080px) {
  /* 桌面：四項排成一排 */
  .wel-points { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 12px; }
  .wel-point { grid-template-columns: minmax(0, 1fr); row-gap: 6px; padding: 18px 16px; border-top: 0; }
  .wel-point:nth-child(n) { padding-left: 16px; padding-right: 16px; }
  .wel-point + .wel-point { border-left: 2px dashed var(--rule); }
  .wp-ico { grid-row: auto; }
}

/* ============================================================================
   左下角的包包（取代原本置頂列會動的包包）：點一下會笑——眼睛瞇起、嘴巴大笑、臉頰變紅、輕輕彈一下
   未登入貼在畫面左下角；登入後在底部分頁列上方，不擋右下角「幫我選一家」。
   ============================================================================ */
.buddy {
  --bd-ink: var(--ink);
  position: fixed; z-index: 34; left: calc(10px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom));
  width: 60px; height: 60px; margin: 0; padding: 4px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: bottom .3s var(--ease);
}
.buddy:focus-visible { background: var(--steam); }
.buddy-svg { display: block; width: 100%; height: 100%; overflow: visible; animation: bun-bob 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.buddy .bun-steam { fill: none; stroke: var(--lantern); stroke-width: 5; stroke-linecap: round; }
.bd-shadow { fill: rgba(20, 48, 74, .14); }
.bd-skin { fill: #fff; stroke: var(--bd-ink); stroke-width: 6; stroke-linejoin: round; }
.bd-line { fill: none; stroke: var(--bd-ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.bd-eyes circle { fill: var(--bd-ink); }
.bd-mouth-happy { fill: var(--bd-ink); }
.bd-cheek { fill: var(--lantern); opacity: .55; transform-box: fill-box; transform-origin: center; transition: opacity .2s, transform .2s; }
.bd-eyes-happy, .bd-mouth-happy { opacity: 0; }
.bd-eyes, .bd-mouth, .bd-eyes-happy, .bd-mouth-happy { transition: opacity .12s; }
.bd-crown { fill: #FFC21A; stroke: var(--bd-ink); stroke-width: 4.5; stroke-linejoin: round; }
.bd-gem { fill: var(--lantern); }
.buddy.is-happy .bd-eyes, .buddy.is-happy .bd-mouth { opacity: 0; }
.buddy.is-happy .bd-eyes-happy, .buddy.is-happy .bd-mouth-happy { opacity: 1; }
.buddy.is-happy .bd-cheek { opacity: .95; transform: scale(1.35); }
.buddy.is-happy .bd-body { animation: buddy-boing .6s var(--ease); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes buddy-boing {
  0% { transform: none; } 25% { transform: translateY(-10px) scale(.94, 1.08); }
  55% { transform: translateY(0) scale(1.08, .92); } 80% { transform: scale(.98, 1.02); } 100% { transform: none; }
}
body.logged-in .buddy { width: 52px; height: 52px; bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); }
body.logged-in.has-tray .buddy { bottom: calc(var(--tabbar-h) + 86px + env(safe-area-inset-bottom)); }   /* 讓開投票列（約 68px 高） */
@media (min-width: 768px) {
  .buddy { left: calc(20px + env(safe-area-inset-left)); bottom: calc(20px + env(safe-area-inset-bottom)); width: 72px; height: 72px; }
  body.logged-in .buddy { width: 64px; height: 64px; bottom: 16px; }
  body.logged-in.has-tray .buddy { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .wel-steamer use { animation: none; }
  .buddy, .bd-cheek { transition: none; }
}
/* 小資的一句話：名稱與價格那一行的下面，整行寬 */
.plan-opt.plan-lite .lite-tag { flex-basis: 100%; text-align: left; color: var(--ink-soft); font-weight: 500; }




/* 以下是GPT要我寫的，因為LINE登入無法按同意條款框 */
/* 隱藏的慶祝彈窗不可攔截點擊 */
body.modal-open #celebrateBg:not(.show) {
  pointer-events: none !important;
}

/* 提醒卡不可攔截底下連結與按鈕的點擊 */
#centerNote {
  pointer-events: none !important;
}
/* 我的：編輯個人資料、額度紀錄 */
.me-text { min-width: 0; flex: 1; }
.me-edit { flex: none; }
.pf-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.pf-btns { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.quota-log { margin-top: 10px; padding: 10px 14px; border-radius: var(--app-r); background: var(--steam); box-shadow: var(--soft-shadow); }
.quota-log > summary { cursor: pointer; font-weight: 700; color: var(--ink); min-height: 28px; }
.ql-title { margin: 12px 0 6px; font-size: 13px; color: var(--ink-soft); }
.ql-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ql-item { padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-size: 13px; min-width: 0; }
.ql-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ql-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.ql-head time { color: var(--ink-soft); font-size: 12px; }
.ql-detail { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; color: var(--ink-soft); }
/* 異動紀錄一筆一行：內容在左、時間在右；窄螢幕放不下時間就換到下一行 */
.ql-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
.ql-row .ql-detail { margin-top: 0; color: var(--ink); }
.ql-row time { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.ql-empty { font-size: 13px; color: var(--ink-soft); }
.ql-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 10px; }
.ql-pager:empty { display: none; }
.ql-pg { min-width: 36px; height: 36px; padding: 0 8px; border: 2px solid var(--rule); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ql-pg.on { background: var(--ink); border-color: var(--ink); color: #fff; cursor: default; }
.ql-gap { padding: 0 2px; color: var(--ink-soft); }

/* 定位提示（位置欄下面）：黃 = 搜尋前提醒還沒開定位；紅 = 抓不到定位、說原因與怎麼開 */
.geo-hint { display: grid; gap: 4px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--ink);
  background: var(--note); color: var(--ink); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.geo-hint.is-error { background: var(--lantern-soft); }
.geo-hint b { font-weight: 800; }
.geo-hint .gh-safe { font-weight: 700; color: var(--ok); }
.geo-hint .gh-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
