/* vos_qr — MODERN 皮膚,盡量對齊 vos_kiosk 的實際畫面(Compose)。手機 Compact 版面。 */
:root {
  --red: #C62828; --red-dark: #B71C1C; --brown: #775652; --price: #E65100;
  --red-container: #FFDAD5; --bg: #FFF8F6; --card: #FFFFFF; --green: #4CAF50;
  --divider: #E0E0E0; --ink: #2b2321; --ink-soft: #8a7d78;
  /* 61 = padding 8 + 圓鈕 44 + padding 8 + 底線 1px。.cat-bar 的 top 與 .cat-head 的
     scroll-margin-top 都吃這個值,差 1px 會讓分類標題被 sticky bar 壓掉一線。 */
  --topbar-h: 61px; --catbar-h: 60px; --foot-h: 76px; --shadow: 0 6px 14px rgba(0,0,0,.10);
  /* 語音 orb 霓虹(取自 VoiceFab.kt) */
  --orb-pink: #FFA3D9; --orb-cyan: #A8D8FF; --orb-lav: #C8B6FF;

  /* ── 流體版型:背景滿版、內文置中限寬 ────────────────────────────────
     不用 wrapper 元素,改用左右 gutter 把內容推到中間 —— 這樣固定元素
     (頂欄/分類列/底欄/語音面板)可以維持真正的 position:fixed 橫跨整個視窗,
     內文卻不會在 1920px 上拉得太散。
     ⚠ 曾經的做法是把 #app 收成 480px 並把 fixed 全改 absolute 模擬手機框,
        那會讓 #app 被內容撐到 7000px+、所有「該釘在視窗」的元素釘到文件座標上
        (送出訂單鈕點不到、確認窗看不見、語音面板在視窗外)。別再走回去。
     ⚠ 必須用 100vw 不能用 100%:自訂屬性在計算值階段無法解析百分比,
        max(12px, calc((100% - …) / 2)) 會整條變成無效值 → padding 直接掉成 0(踩過)。
        100vw 含捲軸寬造成的半個捲軸偏移,由下面的 scrollbar-gutter 讓每頁都一致,
        就不會有換頁橫跳。 */
  --content-wide: 1120px;      /* 菜單格這類可以多欄的內容 */
  --content-narrow: 680px;     /* 詳情/購物車/落地頁這類單欄閱讀內容 */
  --gutter-wide: max(12px, calc((100vw - var(--content-wide)) / 2));
  --gutter-narrow: max(16px, calc((100vw - var(--content-narrow)) / 2));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 捲軸永遠佔位:少了它,沒捲軸的頁(詳情/購物車)會比有捲軸的頁寬一個捲軸,換頁就橫跳 */
html { scrollbar-gutter: stable; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh; min-height: 100dvh; }
.hidden { display: none !important; }
/* 菜品圖不給長按 / 拖曳(2026-08-18)。兩個理由:
   ① 語音面板是**非模態**的,手指按在面板附近很容易落到後面的菜品圖上 ——
      長按跳出「儲存圖片」的原生選單,整個點餐流程被打斷(PTT 按住說話時最明顯)。
   ② 店家的菜品照不該被路過的客人一鍵存走。
   ⚠ 這只是擋掉**順手**的操作,不是保護 —— 圖片網址仍然拿得到,真要抓誰都擋不住。
   標題/價錢那些也一併不給選取:這頁是點餐介面,沒有「要複製一段文字」的使用情境,
   而誤觸選取會跳出放大鏡與選取把手,在小螢幕上很干擾。*/
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-drag: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.ic { width: 24px; height: 24px; display: block; }
.ic.sm { width: 20px; height: 20px; }

/* ── 頂欄(白底 + primary 細底線;圓形返回鈕 + 品牌鎖定) ── */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--card);
  border-bottom: 1px solid rgba(198,40,40,.15); box-shadow: 0 2px 6px rgba(0,0,0,.04);
  display: flex; align-items: center; gap: 10px;
  /* 底色滿版、內容**正好**對齊菜單格 —— 以前多加 2px,三條 bar 的內容左緣就對不齊 */
  padding: 8px var(--gutter-wide);
  padding-top: calc(8px + env(safe-area-inset-top)); }
.circle-btn { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(255,218,213,.45); border: 1px solid rgba(198,40,40,.18);
  color: var(--brown); display: flex; align-items: center; justify-content: center; position: relative; }
.circle-btn:active { background: rgba(255,218,213,.8); }
.brand-lockup { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; background: var(--red); overflow: hidden; flex: 0 0 auto; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-texts { min-width: 0; }
.brand-name { font-size: 16px; font-weight: 700; color: var(--brown); line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 掃桌時會變成「餐廳 · 🪑 桌名」,桌名長度不可控 → 一律單行截斷,別把頂欄撐高 */
.brand-sub { font-size: 11px; color: rgba(119,86,82,.65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 掃桌時是「內用 · 🪑 桌名」,桌名長度不可控。flex:0 1 auto + 截斷 ——
   原本 flex:0 0 auto 不肯縮,窄螢幕上文字換行會把整條頂欄從 61px 撐到 195px(實測)。 */
.order-badge { background: var(--red-container); color: var(--red-dark); font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 50px; flex: 0 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; background: var(--red);
  color: #fff; border-radius: 9px; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; padding: 0 4px; }

/* ── 落地頁 ── */
.landing { min-height: 100dvh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #FFF1EE 0%, #FFE0D6 55%, #FFC9B8 100%); }
.landing-head { text-align: center; padding: calc(24px + env(safe-area-inset-top)) 20px 8px; }
.landing-logo { width: 64px; height: 64px; border-radius: 50%; background: var(--red); overflow: hidden; margin: 0 auto 10px; }
.landing-logo img { width: 100%; height: 100%; object-fit: cover; }
.landing-logo.noimg { display: flex; align-items: center; justify-content: center; }
.landing-brand { font-size: 24px; font-weight: 800; color: var(--brown); margin: 0; line-height: 1.2; }
.landing-brandsub { font-size: 14px; color: rgba(119,86,82,.6); margin-top: 4px; }
.landing-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 20px; }
.landing-title { font-size: 20px; font-weight: 600; color: var(--brown); margin: 0 0 18px; }
.landing-cards { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 420px; }
.order-card { height: 120px; border-radius: 28px; box-shadow: var(--shadow); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; }
.order-card.primary { background: var(--red); }
.order-card.secondary { background: var(--brown); }
.order-card:active { transform: scale(.98); filter: brightness(.95); }
.order-card .oc-ic { width: 42px; height: 42px; color: #fff; }
.order-card .oc-label { font-size: 22px; font-weight: 800; }
.order-card .oc-sub { font-size: 12px; opacity: .85; }
.landing-foot { text-align: center; padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); }
.lang-pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; min-height: 44px; border-radius: 50px;
  border: 1.5px solid rgba(119,86,82,.4); color: var(--brown); font-size: 15px; font-weight: 600; background: transparent; opacity: .9; }

/* ── 菜單 ── */
/* sticky 從 .cat-tabs 上移到 .cat-bar —— ▼ 鈕要跟著釘住,且 tabs 自己要能橫向捲。
   左右 gutter 放在 .cat-bar 這一層(而不是 .cat-tabs),▼ 才會跟最右一欄菜品卡切齊 ——
   放在 .cat-tabs 上的話 ▼ 是它的 flex 兄弟、不吃那個 padding,會一路貼到螢幕右緣
   (1920 上離菜單右緣 394px,2560 上 714px)。 */
.cat-bar { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top)); z-index: 15;
  display: flex; align-items: center; padding: 0 var(--gutter-wide);
  background: var(--bg); border-bottom: 1px solid var(--divider); }
.cat-tabs { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0;
  scrollbar-width: none; scroll-behavior: smooth; }
.cat-tabs::-webkit-scrollbar { display: none; }
/* min-height 44:觸控目標下限(WCAG 2.5.5),原本 padding 算出來只有 39px */
.cat-tab { flex: 0 0 auto; padding: 8px 16px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 22px; font-size: 15px; font-weight: 600;
  background: var(--card); color: var(--brown); border: 1.5px solid var(--divider); white-space: nowrap; }
.cat-tab.active { background: var(--red); color: #fff; border-color: var(--red); }
/* ▼ 鈕靠右釘住,左側漸層讓捲動中的 tab 淡出而不是硬切。
   觸控目標 44px(WCAG 2.5.5)—— 大螢幕也不縮,滑鼠點大目標沒有損失。 */
.cat-more { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--brown); background: var(--bg); position: relative; }
.cat-more::before { content: ""; position: absolute; left: -18px; top: 0; bottom: 0; width: 18px;
  background: linear-gradient(to right, transparent, var(--bg)); pointer-events: none; }
/* 分類塞得下時 tabs 不會 overflow,那條淡出漸層就只是憑空多一塊色 —— 收掉 */
@media (min-width: 900px) { .cat-more::before { display: none; } }
.cat-more.open svg { transform: rotate(180deg); }
/* 欄數隨寬度自動增減。min(48%, 170px) 是關鍵:手機可用寬 ~366px 時取 170 → 維持 2 欄;
   寬螢幕取 170 → 內容欄裡排 5–6 張。寫死欄數在大螢幕不是太擠就是太疏。 */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(48%, 170px), 1fr));
  gap: 12px; padding: 12px var(--gutter-wide) calc(var(--foot-h) + 40px); }
/* 分類標題 = 捲動錨點。scroll-margin-top 要扣掉頂欄 + 分類 bar,否則 scrollIntoView
   會把標題塞到 sticky bar 底下看不見。 */
.cat-head { grid-column: 1 / -1; font-size: 17px; font-weight: 800; color: var(--brown);
  padding: 10px 2px 2px;
  /* 頂欄 + 分類 bar + 8px 呼吸,少算就會被 sticky bar 切掉標題上緣 */
  scroll-margin-top: calc(var(--topbar-h) + var(--catbar-h) + 8px + env(safe-area-inset-top)); }
.cat-head:first-child { padding-top: 2px; }
/* 菜單頁的推薦入口:釘在分類列最左、不參與捲動(flex:0 0 auto),用 red-container 跟
   一般分類 tab 區隔 —— 它不是分類,點了會換頁。高度對齊 .cat-tab 的 44px 觸控下限。 */
.cat-rec { flex: 0 0 auto; margin-right: 8px; padding: 8px 14px; min-height: 44px;
  display: inline-flex; align-items: center; border-radius: 22px;
  font-size: 15px; font-weight: 700; white-space: nowrap;
  background: var(--red-container); color: var(--red-dark); border: 1.5px solid transparent; }

/* ── 推薦頁(版面對齊舊 vos_kiosk RecommendScreen,導覽不對齊 —— 見 index.html 檔內註解)── */
/* 頁內標題列,吊在 topbar 下方(top 值與 .cat-bar 同一組定義)。這頁**照常顯示 topbar**,
   返回走頂欄那顆 —— 所以這裡沒有 ✕ 也沒有底部返回鍵,不重複做返回出口。 */
.rec-head { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top)); z-index: 15;
  padding: 14px var(--gutter-wide) 12px; background: var(--bg); border-bottom: 1px solid var(--divider); }
.rec-title { font-size: 20px; font-weight: 800; color: var(--brown); margin: 0; }
.rec-hint { font-size: 14px; color: var(--ink-soft); margin: 4px 0 0; }
/* 沒有推薦時的空狀態(理論上入口會先被收掉,語音路徑仍可能落到這裡) */
.rec-empty { grid-column: 1 / -1; padding: 40px 8px; text-align: center; color: var(--ink-soft); font-size: 15px; }
.item-card { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.item-card:active { transform: scale(.98); }
.item-card .ic-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #f0e9e7; }
.item-card .ic-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.item-card .ic-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.item-card .ic-price { color: var(--price); font-weight: 800; font-size: 15px; }
.item-card.soldout { opacity: .5; } .item-card .ic-sold { font-size: 12px; color: var(--red); }

/* ── 品項詳情 ── */
.detail { display: flex; flex-direction: column; min-height: 100dvh; }
/* 限寬 + 置中:不限的話 1920px 上會變成 1900×1190 的巨圖(它是 .detail 的直接子元素,
   不吃 .detail-body 的 gutter) */
.detail-img { display: block; width: 100%; max-width: var(--content-narrow); margin-inline: auto;
  aspect-ratio: 16/10; object-fit: cover; background: #f0e9e7; }
.detail-body { flex: 1; padding: 16px var(--gutter-narrow) calc(var(--foot-h) + 16px); }
.detail-name { font-size: 22px; margin: 0 0 16px; }
.opt-group { margin-bottom: 20px; }
.opt-group .og-name { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--brown); }
.og-req { color: var(--red); font-size: 12px; margin-left: 6px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.opt-chip { padding: 10px 16px; border-radius: 12px; border: 1.5px solid var(--divider); background: var(--card);
  font-size: 15px; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; }
.opt-chip .oc-price { font-size: 12px; color: var(--price); font-weight: 700; }
.opt-chip.sel { border-color: var(--red); background: var(--red-container); color: var(--red-dark); font-weight: 700; }

.detail-foot, .cart-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; background: var(--card);
  border-top: 1px solid var(--divider);
  padding: 12px var(--gutter-narrow); padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; box-shadow: 0 -2px 12px rgba(0,0,0,.06); }
.qty-stepper { display: flex; align-items: center; gap: 4px; }
.qty-stepper button { width: 40px; height: 40px; border-radius: 50%; background: var(--red-container);
  color: var(--red-dark); font-size: 24px; font-weight: 700; line-height: 1; }
.qty-stepper span { min-width: 32px; text-align: center; font-size: 18px; font-weight: 700; }
/* flex:1 是給底欄那種**橫向** flex row 用的(鈕吃掉剩餘寬度)。
   放在 .done 的 column flex 裡會變成吃掉剩餘**高度** —— 「回首頁」鈕曾是 79×517px
   的巨型色塊,而且手機也一樣壞。所以只在橫向情境給 flex:1。 */
.primary-btn { flex: 0 0 auto; background: var(--red); color: #fff; border-radius: 14px; padding: 14px; font-size: 17px; font-weight: 700; }
.detail-foot .primary-btn, .cart-foot .primary-btn, .confirm-actions .primary-btn,
.qty-fine .primary-btn { flex: 1; }
.primary-btn:active { background: var(--red-dark); } .primary-btn:disabled { opacity: .45; }
.ghost-btn { padding: 12px 18px; border-radius: 14px; border: 1.5px solid var(--divider); color: var(--brown); font-size: 16px; font-weight: 600; }

/* ── 購物車 ── */
.cart { min-height: 100dvh; padding-bottom: calc(var(--foot-h) + 90px); }
.cart-list { list-style: none; margin: 0; padding: 8px var(--gutter-narrow); }
/* 行版型:份數(N ▾) | 品名 + 修改 | 金額 + 垃圾桶 */
.cart-item { display: flex; align-items: flex-start; gap: 10px; background: var(--card); border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
/* 購物車行的三顆操作鈕都補到 44px 觸控下限(WCAG 2.5.5)——
   視覺尺寸不變,靠 min-height/min-width 把可點範圍撐開。 */
.cart-item .ci-qty { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 8px 6px 12px; min-height: 44px;
  border-radius: 12px; background: var(--red-container); color: var(--red-dark); font-size: 17px; font-weight: 800; }
.cart-item .ci-qty svg { width: 18px; height: 18px; }
.cart-item .ci-mid { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 15px; font-weight: 600; }
.cart-item .ci-opts { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
/* 修改鈕做成文字連結感,不搶主要動作(送出訂單)的視覺重量 */
.cart-item .ci-edit { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 8px 12px 8px 10px; min-height: 44px;
  border-radius: 10px; border: 1.5px solid var(--divider); background: transparent; color: var(--brown); font-size: 13px; font-weight: 600; }
.cart-item .ci-edit svg { width: 14px; height: 14px; }
.cart-item .ci-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item .ci-price { color: var(--price); font-weight: 800; font-size: 15px; white-space: nowrap; }
.cart-item .ci-del { color: var(--ink-soft); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cart-item .ci-del:active { background: var(--red-container); color: var(--red); }
.cart-empty { text-align: center; color: var(--ink-soft); padding: 60px 20px; }
.cart-total-row { flex: 1; display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; }
.cart-total { color: var(--price); }

/* ── 結帳成功 ── */
.done { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.done-check { width: 88px; height: 88px; border-radius: 50%; background: var(--green); color: #fff; font-size: 52px; line-height: 88px; }
.done-order { font-size: 20px; } .done-order span { color: var(--red); font-weight: 800; font-size: 28px; }

/* ── 語音 orb FAB(旋轉霓虹漸層球) ── */
/* 靠內容欄右緣而不是視窗右緣 —— 1920px 上貼著螢幕邊會離菜單很遠。
   跟其他容器共用同一個 gutter,所以浮動鈕會跟最右一欄菜品卡切齊。 */
/* right 給下限 22px:.orb-canvas 外擴 22px 畫外圈環帶(見下),gutter 在窄螢幕只有 12px,
   不墊高的話畫布右緣會超出視窗 10px。fixed 元素的溢出理論上不生橫捲軸,但 iOS Safari
   有前科,而代價只是窄螢幕上比菜品卡多縮 10px —— 幾乎看不出來。 */
.voice-fab { position: fixed; right: max(var(--gutter-wide), 22px);
  bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; flex-direction: column; align-items: center; gap: 6px; }
.orb { position: relative; width: 96px; height: 96px; }
/* 2026-08-18:原本這裡有一組 .orb::before/::after 的「藍綠雙環交錯外擴」(haloRec),
   已移除 —— 吸睛的工作改由 aurora.js 的軌道弧 + 漂浮粒子做(跟面板那顆同一套視覺)。
   兩者不能並存:一個是 2.4s 硬邊圓環往外脈動,一個是 12s/16s 反向勻速的軟弧 + 9s 公轉
   的粒子,疊起來會互相打拍子;而且環擴到 scale 1.35(130px)正好落在新弧線(直徑 101px)
   外側,看起來像「弧線之外還有一圈東西在呼吸」。 */
/* 進場引導:進菜單頁時球過衝彈入、標籤跟著浮上來。演一次就摘 class(app.js render 裡管) */
/* 語音故障(voice-off)/ 主機離線(voice-offline):灰掉留在原位、點了才提示(2026-09-03 user 拍板不藏鈕) */
.voice-fab.voice-off, .voice-fab.voice-offline { filter: grayscale(1); opacity: .5; }
.voice-fab.voice-off .orb, .voice-fab.voice-offline .orb, .voice-fab.voice-off .orb-canvas, .voice-fab.voice-offline .orb-canvas { animation: none !important; }
.voice-fab.intro .orb { animation: fabIntro .55s cubic-bezier(.34,1.56,.64,1) both; }
.voice-fab.intro .orb-label { animation: fadeInUp .3s .2s both; }
/* 球體改用 aurora.js 畫(跟面板那顆同一支,視覺一致)。canvas 稍微外擴,
   讓外光暈有地方散出去 —— 同 .aurora 的道理。 */
/* drop-shadow 補回原本 .orb-grad 的 box-shadow —— 少了它,球浮在菜品照片上會糊掉。
   用 filter 而非 box-shadow:canvas 是透明背景的圓球,box-shadow 會畫成方形影子。 */
/* ⚠ 這個 -22px 與 aurora.js 的 `BALL = 0.30` 是**一組**,動一邊球就會變大變小。
   140 = 視覺球 84(= 2 × 0.30 × 140) + 兩側各 28 的環帶。環帶要裝得下軌道弧
   (半徑 0.36×140 = 50.4)與粒子連外光暈(最遠約 53),都在 70 的畫布半徑內。
   舊值 -8px(畫布 112)配舊的 compact BALL=0.40 → 球半徑 45,把弧(40.3)與粒子
   (45.2)整個蓋掉,圖層開了等於沒開。球直徑淨變化 89.6 → 84px(−6%,看不出來)。
   pointer-events:none —— 畫布比 .orb 大 22px,不關掉會多吃一圈點擊(菜品卡就在旁邊);
   FAB 的點擊本來就靠 #voiceFab / .orb / .orb-label 接。 */
.orb-canvas { position: absolute; inset: -22px; width: calc(100% + 44px); height: calc(100% + 44px);
  display: block; pointer-events: none;
  /* 投影跟著環偏藍青(原紫 rgba(140,90,210) 是球心色系,與外圈藍綠環不搭) */
  filter: drop-shadow(0 6px 14px rgba(90,140,220,.5)); }
.orb-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.orb-center .mic { width: 40px; height: 40px; color: #fff; }
/* 菜單改成連續長捲動後,FAB 會浮在菜品照片上 —— 深色照片配棕字整個糊掉。
   給實心膠囊底,不管背後是什麼顏色都讀得到(純靠 text-shadow 描邊擋不住深色底)。 */
.orb-label { font-size: 13px; font-weight: 700; color: var(--brown);
  background: rgba(255,255,255,.94); padding: 3px 12px; border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); white-space: nowrap; }
.orb-wave { display: none; align-items: center; gap: 4px; height: 34px; }
.voice-fab.rec .orb-center .mic { display: none; }
.voice-fab.rec .orb-wave { display: flex; }
.orb-wave i { width: 4px; border-radius: 2px; background: #fff; height: 12px; animation: wave 800ms ease-in-out infinite alternate; }
.orb-wave i:nth-child(2){animation-duration:900ms} .orb-wave i:nth-child(3){animation-duration:1000ms}
.orb-wave i:nth-child(4){animation-duration:820ms} .orb-wave i:nth-child(5){animation-duration:950ms}
/* 面板開著就把 FAB 收掉:大面板時它本來就被蓋住,mini 時它會露出來但點了沒反應
   (openVoice 會因為面板已開直接 return)—— 露一顆點不動的鈕比不露更糟。
   錄音中的球體變化改由 aurora.js 的 setLevel() 驅動(音量連動),不再靠 CSS 動畫。 */
.voice-fab.rec { display: none; }

/* ── 語音面板(自底部滑出的深藍霓虹面板 + 極光球) ── */
/* 版面(user 2026-08-05):雙欄 —— 文字靠左、球絕對定位在右下(結束鈕上方)。
   以前是單欄置中 + .aurora 的 margin-top:auto,標題與球之間吃掉全部餘量,
   高螢幕上是一大片空的漸層 → 改成 texts flex:1 垂直置中,留白平均分配、面板整體縮小。 */
/* min-height 是「內容放得下」的地板 = 頂 14 + 球 + 間距 8 + 控制區 + 底 28 + safe-area。
   **全部從變數推導,不再寫死** —— 以前是寫死的 252(= 球 160 + 78 + 14),那個 78
   假設「底下只有一顆 42px 的結束鈕」,PTT 模式多一顆就錯位(而且沒把 safe-area
   算進去,瀏海機再少 34px)。--vp-controls-h 的 100px 只是首屏 fallback,
   真值由 app.js 的 ResizeObserver 量 #vpControls 回寫。
   --vp-orb-x 是球的水平位置:預設**左側**;加 .orb-right 可切回右側(A/B 用)。 */
.voice-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  /* --vp-controls-h 的 48px 只是首屏 fallback(= 一列 .vp-btn 的高度);
     真值由 ResizeObserver 在第一次 paint 前就回寫好。
     --vp-orb 72px:「工具列」版型的球併在標題列裡(等於 mini 條的展開態,兩態形變最連續)。
     一開始給 52px 太小看不出極光,2026-08-19 放大到 72 —— 畫布跟著到 88(見 .aurora canvas),
     粒子最遠 37.7 對畫布半徑 44,餘裕比 52px 時的 0.8px 寬鬆得多(粒子的絕對尺寸被
     aurora.js 的 K 下限釘住,不會跟著球長大,所以**球愈大反而愈不會切邊**)。 */
  --vp-orb: 72px; --vp-controls-h: 48px; --vp-bar-h: 72px; --vp-orb-x: var(--gutter-wide);
  /* ⚠ 高度是**寫死的**不是內容撐出來的 —— 光改結構不會變矮,這行要跟著改。
     24dvh 在 844px 上約 202px(舊值 34dvh/330px 是 287px)。 */
  height: min(24dvh, 210px);
  /* 地板 = 頂 14 + 標題列 + 間距 8 + 控制列 + 底 28 + safe-area。
     標題列用 --vp-bar-h(量出來的)而不是 --vp-orb:它的高度是 max(球, 標題+模式小字),
     矮螢幕上標題列比球高,拿球去算會少算而讓內容溢出面板頂端。 */
  min-height: calc(14px + var(--vp-bar-h) + 8px + var(--vp-controls-h)
                   + 28px + env(safe-area-inset-bottom));
  /* 2026-08-19:頂端不再從全透明起手。原本 0% 是 alpha 0、6% 才到 .5,展開態的標題
     (白字)整條壓在菜單內容上,「按住下方按鈕說話」幾乎看不清。改成 .88 起跳 ——
     邊界跟 mini 態一樣明確(mini 是同一條漸層被壓進 66px,底部本來就近純色)。
     ⚠ **仍然維持漸層、不可改成純色**:mini 態刻意不覆寫 background,而漸層↔純色
     無法插值,硬切會在高度動畫裡閃一下(舊教訓,見 .voice-panel.mini)。
     hairline + 上方陰影補一道實體邊,讓面板從菜單「浮起來」而不是「疊上去」。 */
  background: linear-gradient(180deg, rgba(10,21,37,.88) 0%, rgba(10,21,37,.94) 14%, rgba(10,21,37,.97) 45%, rgba(10,21,37,.99) 100%);
  border-top: 1px solid rgba(234,246,255,.18);
  box-shadow: 0 -10px 26px rgba(0,0,0,.30);
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end;
  /* 底部 28px:Android 手勢導航條不回報 safe-area,只留 20px 會被它壓到 */
  padding: 14px var(--gutter-wide) calc(28px + env(safe-area-inset-bottom));
  animation: slideUp .32s cubic-bezier(.2,.7,.3,1);
  /* 大↔mini 只過渡 height:兩態都是固定長度才插值得動(height:auto 不行 —— 卡頓教訓) */
  transition: height .28s cubic-bezier(.2,.7,.3,1), min-height .28s cubic-bezier(.2,.7,.3,1); }
/* 工具列版型:整欄不再縮排 —— **只有標題列 .vp-bar 讓位給球**,例句/辨識文字/診斷行
   都走滿版。以前是整個 .vp-texts 縮排 176px,左欄只剩 190px 寬,標題、小字、例句
   三段各自換行,讀起來像清單不像控制面板(2026-08-19 回報「更亂了」的主因)。
   justify-content 從 center 改 flex-start:內容貼齊面板頂端,跟球對齊。 */
.vp-texts { flex: 1; display: flex; flex-direction: column; align-items: stretch;
  justify-content: flex-start; text-align: left; min-width: 0;
  transition: opacity .18s ease, visibility .18s; }
/* 標題列:球(絕對定位在左)+ 狀態 + 模式切換。min-height 對齊球高,文字才會垂直置中在球旁邊。 */
.vp-bar { display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-height: var(--vp-orb); padding-left: calc(var(--vp-orb) + 11px); }
.voice-panel.orb-right .vp-bar { padding-left: 0; padding-right: calc(var(--vp-orb) + 11px); }
/* 22px 在 52px 的球旁邊會壓過球,而且工具列版的標題列高度只有 52px */
/* 22/600:面板一打開最該被看到的就是這行(「正在聆聽…」/「按住下方按鈕說話」)。
   工具列版型當初為了塞進 52px 的標題列砍到 19/500,結果它跟 16px 的例句層級太接近、
   不夠搶眼。球放大到 72 之後標題列本來就有空間,字級跟著回來。 */
.vp-title { color: #fff; font-size: 22px; font-weight: 600; }
/* 收音模式切換:視覺最弱,但「弱」只做在字級/字重/無底無框上,**不做在觸控目標上** ——
   背景全透明,所以 44px 的觸控框看不出來卻按得到(這是 44px 準則與「要最弱」唯一
   不衝突的解法)。底線是「這可以點」最強的既有語彙,舊版那行說明文字就是少了它。
   顏色維持 .62 不再壓低:視覺弱化用尺寸做,不用降對比做(那是可及性問題)。 */
/* ⚠ min-height 44 是觸控目標下限,**不准為了塞進標題列而縮** —— 標題列自己長高就好
   (.vp-bar 的 min-height 是最小值不是固定值)。 */
.vp-mode { align-self: flex-start; padding: 11px 0; min-height: 44px;
  font-size: 13px; line-height: 1; color: rgba(255,255,255,.62);
  text-decoration: underline; text-underline-offset: 3px; }
.vp-mode:active { color: #fff; }
/* 動態省略號(user 2026-08-05:讓人一眼知道正在收音):基底 opacity 1、靠 keyframe 壓暗 ——
   reduced-motion 全域 animation:none 生效時自動落回靜態「...」,不用另寫分支 */
.vp-dots i { display: inline-block; font-style: normal; animation: vpDot 1.4s infinite; }
.vp-dots i:nth-child(2) { animation-delay: .2s; }
.vp-dots i:nth-child(3) { animation-delay: .4s; }
/* 矮螢幕(小手機)先犧牲例句那行、球也縮一號 —— 標題+球+結束鈕是固定成本,
   34dvh 在 667px 高的機器上放不下,不讓位的話結束鈕會被擠到貼著手機底部 bar。 */
/* 門檻 780 而不是 720:橫式平板是 768px 高,原本正好落在縫隙外拿不到小版面,
   結果面板佔畫面 38.8%。 */
/* 第二組條件 (max-height:900) and (min-width:900) 是給橫放的筆電/平板:
   1440×900 開面板後只剩 1 排完整卡片。**刻意加 min-width** —— 少了它,
   手機 390×844 也會命中而把例句那行藏掉,那是迴歸不是改善。 */
@media (max-height: 780px), (max-height: 900px) and (min-width: 900px) {
  /* 只調變數,球尺寸與文字讓位自動跟上 —— 以前要各自覆寫 .aurora 的 width/height/left
     與 .vp-texts 的 padding 四條規則,漏一條就對不齊。min-height 的公式也自己吃到。
     ⚠ 模式切換小字**不藏**:它是唯一的模式入口,藏掉等於客人被鎖在當下的模式。
     矮螢幕的犧牲順序是:例句(藏)→ 主鈕高度 → 球尺寸 → 小字 padding。 */
  .voice-panel:not(.mini) { --vp-orb: 60px; --vp-bar-h: 68px; height: min(26dvh, 190px); }
  .voice-panel:not(.mini) .vp-hint { display: none; }
  .voice-panel:not(.mini) .vp-btn { min-height: 46px; font-size: 15px; }
  .voice-panel:not(.mini) .vp-title { font-size: 19px; }
}
.vp-hint { color: rgba(234,246,255,.92); font-size: 16px; font-weight: 600; text-align: left; }
.vp-heard { color: #fff; font-size: 17px; font-weight: 600; min-height: 24px; margin-top: 4px; text-align: left; }
/* ?vdebug=1 專用的等寬診斷行(正式體驗看不到 —— app.js 只在 VDEBUG 時拿掉 .hidden)。 */
/* 這兩行是**唯二**要能選取的文字:現場除錯時要把聽到的拼音複製回報。
   (body 全域關掉了選取,見檔頭的說明。) */
.vp-debug, .vp-heard { -webkit-user-select: text; user-select: text; }
.vp-debug { color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.45; margin-top: 4px;
  text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all; }
/* ?vdebug=1 的「標註預期句」按鈕(正式體驗看不到)。
   nowrap+ellipsis:武裝後按鈕顯示整句預期句,不截斷會撐出面板黑色區域。 */
.vp-expbtn { display: block; max-width: 100%; margin-top: 6px; padding: 5px 10px;
  font-size: 12px; text-align: left; color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.10); border: 1px dashed rgba(255,255,255,.4);
  border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-expbtn.on { border-style: solid; border-color: #ffd54f; color: #ffd54f;
  background: rgba(255,213,79,.12); }
/* **必須維持正方形** —— aurora.js 的 resize() 拿 getBoundingClientRect().width 同時當寬與高
   (`cv.height = S*dpr`),改成長方形 canvas bitmap 會被 CSS 拉扁變形。
   ⚠ 這是**畫布**尺寸不是球的尺寸:視覺球只佔其中 aurora.js 的 ORB 比例(110/140),
   多出來的一圈是留給漣漪擴散的,不然一放大就撞到 canvas 方形邊界被直角切掉。
   改這裡的值球會等比縮放,但 aurora.js 裡還有幾個絕對像素常數靠 K 係數跟著縮 —— 兩邊要一起看。
   兩態(大面板/mini)都是絕對定位:left/bottom/width/height 全是可插值長度。
   **2026-08-18 球改到左側**:mini 態的球本來就在左下(.vp-mini-bar 的 padding-left
   就是為它讓位),所以移左之後 left 在兩態同值、不再變化 —— 過渡從「斜著橫掃過整個
   面板寬度」變成「原地垂直縮小落進 mini 條」,少一個插值屬性,也消掉舊版收合時球會
   掃過 mini 文字的小瑕疵。left 仍留在 transition 裡,是為了 .orb-right 切換時也順。
   bottom **不再寫死** —— 吃 --vp-controls-h(見 .voice-panel),兩種模式都不會壓到按鈕。 */
/* 工具列版型(2026-08-19):球改**貼齊面板頂端**(標題列那一行),不再吊在控制區上方。
   ⚠ 仍然是絕對定位,不塞進 flex 流 —— mini 態的球是絕對定位在左下角的 44px,
   兩態必須在**同一個屬性**上插值才會是形變而不是跳一下。用 bottom 而不是 top:
   mini 那邊用的就是 bottom,混用 top/bottom 無法插值。
   calc(100% - …) 的 100% 每幀依面板當下高度解析 → 高度過渡期間球自動跟著走。 */
.aurora { position: absolute; width: var(--vp-orb); height: var(--vp-orb); margin: 0;
  left: var(--vp-orb-x);
  bottom: calc(100% - 14px - var(--vp-orb));
  transition: left .28s cubic-bezier(.2,.7,.3,1), bottom .28s cubic-bezier(.2,.7,.3,1),
              width .28s cubic-bezier(.2,.7,.3,1), height .28s cubic-bezier(.2,.7,.3,1); }
/* A/B 開關:在 #voicePanel 上加 .orb-right 就切回舊的右側版面(球移左是實驗,要收得回來) */
.voice-panel.orb-right { --vp-orb-x: calc(100% - var(--gutter-wide) - var(--vp-orb)); }
/* 畫布比版面槽位大一圈(同 FAB 的 .orb-canvas 手法)。⚠ 這個 -8px 與 app.js 給
   panelOrb 的 `compact: true` 是**一組**:compact 的 ORB_R=1 表示畫布邊緣就是視覺邊緣,
   沒有任何外溢空間,而粒子的絕對尺寸受 aurora.js 的 K 下限(0.62)保護不會跟著縮 ——
   52px 槽位配 52px 畫布時,大聲說話的粒子光暈會超出約 3.7px,四角出現直角切痕。
   放大到 68px(52+16)之後:實心球 39–44px(槽位的 75–85%,原本只有 45–51%),
   粒子最遠 33.2 對畫布半徑 34,不切。
   pointer-events:none —— 畫布溢出槽位了,不關掉會在球周圍多吃一圈點擊,
   而球旁邊就是標題與模式切換小字的觸控框。 */
.aurora canvas { position: absolute; inset: -8px;
  width: calc(100% + 16px); height: calc(100% + 16px);
  display: block; pointer-events: none; }

/* 底部控制區。gap 取代原本各鈕的 margin-top;高度由 ResizeObserver 量真值回寫成
   --vp-controls-h,球的 bottom 與面板 min-height 都吃它(單一真源)。 */
/* 工具列版型:控制區改**橫向一列**,內容置中。
   單列 → --vp-controls-h 在兩個模式都是 48px,球的位置不再隨模式變。 */
.vp-controls { flex: none; display: flex; flex-direction: row; align-items: center;
  justify-content: center; gap: 9px;
  transition: opacity .18s ease, visibility .18s; }
/* 主鈕預設**不撐滿**:滿版的結束語音看起來像「這頁最重要的事是離開」,重心錯了。
   min-height 48 而不是 42 —— 按住說話需要準確按到並持續按住。 */
.vp-btn { flex: 0 0 auto; min-height: 48px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 50px;
  transition: opacity .18s ease, visibility .18s, transform .12s ease; }
/* VAD:只有結束語音一顆,置中、約四成寬(360px 上約 151px)。 */
.vp-stop { min-width: 45%; }
/* PTT:視覺重心給點餐不給離開 —— 按住說話吃掉剩下的寬度(360px 上約 220px,
   按壓目標大很多),結束縮成剛好包住文字(約 96px)。
   ⚠ 這是 2026-08-19 對 PARITY.md §2.3.1「結束語音不降級」的**有意收窄**:
   當時否決的是「把它變成沒有邊框的底線小字」(客人點了沒反應的老毛病),
   不是「變窄」。它仍然是同高(48px)、同樣式、同位置的實體按鈕,只是不再等寬。 */
.voice-panel.mode-ptt .vp-ptt { flex: 1 1 auto; min-width: 0; }
.voice-panel.mode-ptt .vp-stop { min-width: 0; }
/* 以前是一行 alpha .55 / weight 300 的說明文字,而且不可點 —— 客人最直覺去點它卻沒反應。
   改成真的按鈕:描邊膠囊、對比拉高、觸控區夠大。 */
.vp-stop { padding: 0 18px; border: 1.5px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.10); color: #fff; font-size: 15px; font-weight: 600; }
.vp-stop:active { background: rgba(255,255,255,.24); }

/* 按住說話(噪音退路)。touch-action:none 必要 —— 不擋的話按住往下拖會被瀏覽器
   當成捲動手勢,pointerup 收不到、錄音永遠停不下來。配合 JS 的 setPointerCapture
   (只掛 pointer 事件一套,不寫 touch/mouse 兩套)。 */
.vp-ptt { padding: 0 14px; background: #fff; color: #111; font-size: 17px; font-weight: 700;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.vp-ptt:disabled { opacity: .4; }
.vp-ptt.holding { transform: scale(.96); background: #ffe8a3; }

/* ── mini 態:收成底部一條,菜單完全露出來 ────────────────────────── */
/* 面板是非模態的狀態列 —— 客人一捲菜單(或點面板外)就讓位,停止捲動不自動彈回。 */
/* 絲滑原則(user 2026-08-05:以前展開/收縮會卡一下):外層永遠是 flex-column,
   mini 條是**常駐的絕對定位覆蓋層**,兩態用透明度淡切 ——
   display / flex-direction 的切換不可過渡,正是以前跳一下的元兇。 */
/* 左 padding 留 54 = 球 44 + 間距 10(球是絕對定位滑過來的,不佔文流);
   其餘跟菜單格對齊,不然 1920px 上球在最左、× 在最右,中間一大片空。 */
.vp-mini-bar { display: flex; position: absolute; inset: 0; align-items: center; gap: 10px;
  padding: 10px var(--gutter-wide) calc(12px + env(safe-area-inset-bottom)) calc(var(--gutter-wide) + 54px);
  opacity: 0; visibility: hidden; pointer-events: none;
  /* 淡入延遲 .08s:等大面板內容先退場一點,交叉的瞬間不會兩層字疊在一起 */
  transition: opacity .18s ease .08s, visibility .26s; }
.vp-mini-texts { flex: 1; min-width: 0; display: flex; flex-direction: column;
  align-items: flex-start; gap: 1px; }
/* PTT 模式多一顆按鈕之後,這一欄從 225px 被壓到約 160px —— 沒有截斷的話
   es/ko 的長標題(Escuchando… / 듣고 있습니다…)會換行,正好撞上下面那條
   「mini-texts 高度預算 ≈43px,多一行就爆」的警告。
   18px/700(user 2026-09-02:長輩看不出還在收音):15px 在菜單照片旁邊太安靜;
   line-height 明寫 1.2,高度預算才算得準(見下方 66px 那段)。
   閃爍點跟大面板標題共用 .vp-dots(app.js setMiniLabel)。 */
.vp-mini-label { color: rgba(234,246,255,.98); font-size: 18px; font-weight: 700; line-height: 1.2;
  text-align: left; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 可供性提示(user 2026-08-05:同事不知道 mini 條能點開):chevron 輕浮 + 一行小字 */
/* nowrap+ellipsis 跟 label 同理:PTT 模式 + es 時文字欄只剩約 40px,「Toca para ampliar」
   會折成三行直接撞破 66px 的高度預算(2026-09-02 實測)。 */
.vp-mini-expand { display: flex; align-items: center; gap: 4px; max-width: 100%;
  font-size: 12px; line-height: 1.2; color: rgba(234,246,255,.55); white-space: nowrap; }
.vp-mini-expand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vp-mini-expand .chev { display: inline-block; font-style: normal;
  animation: chevBob 1.6s ease-in-out infinite; }
/* 「結束語音」膠囊(2026-09-02):以前是 40px 圓底的純圖示 ×,長輩不知道那是結束收音,
   還以為只是關掉這條提示。樣式對齊大面板的 .vp-stop(描邊膠囊),文案走 i18n 的 mini_stop:
   中文放得下就用「結束語音」,西/英文用短字(Parar/Stop)—— 用 stop_talking 的「Terminar voz」
   在 PTT 模式會把標籤擠到 0 並溢出右緣 13px(實測)。
   寬度預算(390px):條內容 312 − 本鈕約 86(zh)− 音波 41 − gap 20 → 標籤剩約 165;
   es/ko 長標題靠 .vp-mini-label 的 nowrap+ellipsis 截斷,不會換行撞高度預算。 */
.vp-mini-close { flex: none; min-height: 44px; padding: 0 14px; border-radius: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255,255,255,.55); background: rgba(255,255,255,.12);
  color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
.vp-mini-close:active { background: rgba(255,255,255,.26); }
/* .orb-wave 基底是 display:none(FAB 只在 .rec 時顯示),mini 條這顆要自己開
  (display 切換沒關係 —— 它在整體淡切的 mini 條容器裡,看不出跳變)
   2026-09-02 接真音量:以前是 3px 白色細條 + 10↔30 的假跳動,跟麥克風無關,
   長輩既看不清也不信。改法:
   - 柱子 5px、綠色,靜音時只做 8↔16 的小幅呼吸(waveMini)—— 「開著」的訊號,但不再假裝有聲音。
   - 真音量走容器的 --lvl(app.js setMiniWave 每幀寫入 0~1),scaleY 最大 2.8 → 16×2.8 ≈ 45px,
     講話時明顯跳起來,仍在 66px 條內。只動 transform,不觸發排版。
   - reduced-motion 全域關 animation/transition 後呼吸停、柱子靜止 8px,但 --lvl 的 scaleY
     仍會隨真音量瞬間變化 —— 那是真實回饋不是裝飾動效,講話時看得到反應,刻意保留。 */
.voice-panel.mini .orb-wave.mini { display: flex; height: 32px; gap: 4px;
  transform: scaleY(calc(1 + var(--lvl, 0) * 1.8)); transform-origin: center;
  transition: transform .09s ease-out; will-change: transform; }
.orb-wave.mini i { width: 5px; background: #7cf2b2; animation-name: waveMini; }

/* ── mini 態的按住說話(2026-08-19)────────────────────────────────────────
   為什麼非有不可:收成 mini 時 .vp-controls 整組被藏掉(見下),PTT 模式等於
   「唯一的輸入方式消失」—— 客人滑一下菜單就得先點開面板才能再講話。
   VAD 模式沒這個問題(mini 態麥克風照聽),所以只在 .mode-ptt 出現。
   取代音波的位置:音波是「正在聆聽」的指示,PTT 只有按住才收音,本來就沒意義。
   寬度預算(390px):條內容 312 − 結束語音鈕約 91(zh)− gap 10×2 = 201,本鈕約 92 → 標籤還剩約 109
  (2026-09-02 之前 close 是 40px 的 ×,標籤有 160);es/ko 長標題靠 ellipsis 截斷。
   高度 44 = mini 條內容高(66 − padding 10 − 12),剛好不撐破那條高度預算。 */
.vp-mini-ptt { display: none; flex: none; min-height: 44px; padding: 0 18px; border-radius: 50px;
  background: #fff; color: #111; font-size: 14px; font-weight: 700; white-space: nowrap;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .12s ease; }
.voice-panel.mini.mode-ptt .vp-mini-ptt { display: inline-flex; align-items: center; justify-content: center; }
.voice-panel.mini.mode-ptt .orb-wave.mini { display: none; }
.vp-mini-ptt:disabled { opacity: .4; }
.vp-mini-ptt.holding { transform: scale(.96); background: #ffe8a3; }
/* 確認中(.confirming = micLocked):音波靜止壓低 —— 視覺誠實,麥克風鎖定沒在聽。
   不用 animation-play-state:paused(會凍在隨機高度,五根不齊反而像當機),
   直接關動畫 + 固定矮高度 = 明確的「停」。reduced-motion 全域關動畫時此規則只是再壓高度。 */
.voice-panel.confirming .orb-wave.mini i { animation: none; height: 6px; opacity: .5; }
/* 鎖麥當下 --lvl 可能還殘留上一幀的值,transform 一起歸零才是真的「停」 */
.voice-panel.confirming .orb-wave.mini { transform: none; }

/* 固定高 66 = 球 44 + 上下 11×2 —— 可插值長度,不能回到 height:auto(見上)。
   ⚠ mini-texts 高度預算:label 18×1.2 + 提示 12×1.2 + gap 1 ≈ 37px < 44px 球高
  (兩者 line-height 都明寫 1.2,別改回 normal),提示文案若增行會爆這個常數,要同步調。
   不再覆蓋 background:66px 高時原漸層的 %-stop 壓縮後底部已近純色,
   漸層↔純色不可插值,硬切會在高度動畫裡閃一下。 */
.voice-panel.mini { height: calc(66px + env(safe-area-inset-bottom)); min-height: 0; cursor: pointer; }
/* 一條規則收掉整個控制區 —— 以前是分三處列舉 .vp-stop / .vp-ptt / .vp-mode-toggle,
   之後每加一顆鈕就要記得回來補一行,漏掉就會在 mini 條上露出來。 */
.voice-panel.mini .vp-texts,
.voice-panel.mini .vp-controls { opacity: 0; visibility: hidden; pointer-events: none; }
.voice-panel.mini .vp-mini-bar { opacity: 1; visibility: visible; pointer-events: auto; }
/* mini 的小球:aurora.js 的幾何全靠容器寬度推導,改尺寸就自動等比 */
.voice-panel.mini .aurora { width: 44px; height: 44px;
  left: var(--gutter-wide); bottom: calc(11px + env(safe-area-inset-bottom)); cursor: pointer; }

/* ── 通用 overlay / 確認框 / toast ── */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 24px; }
/* 浮層開著時鎖背景捲動(class 由 app.js syncScrollLock 加/移,top 也是它設的)。
   position:fixed 是為了 iOS Safari —— 那裡 overflow:hidden 擋不住觸控捲動。 */
body.scroll-lock { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.confirm-box { background: var(--card); border-radius: 22px; width: min(400px, 92vw); padding: 28px 22px; text-align: center; }
.confirm-msg { font-size: 20px; font-weight: 600; margin-bottom: 22px; line-height: 1.4; }
.confirm-actions { display: flex; gap: 12px; }
/* 語音選變體:每個群一列 chips(沿用詳情頁的 .opt-chip 外觀) */
/* overscroll-behavior:捲到選項區盡頭時不把捲動交棒出去(背景鎖之外的第二道) */
.choice-groups { text-align: left; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.choice-groups .opt-group { margin-bottom: 16px; }
.choice-groups .og-name { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
/* 2 個選項並排、≥3 垂直條列(對齊 kiosk 的彈窗版型) */
.opt-chips.pair { display: grid; grid-template-columns: 1fr 1fr; }
.opt-chips.stack { display: flex; flex-direction: column; }
.opt-chips.stack .opt-chip, .opt-chips.pair .opt-chip { justify-content: space-between; }

/* 刪除是不可逆動作 → 主鍵改危險色,避免跟「確認/加入」的紅被當成同一件事 */
.primary-btn.danger { background: var(--red-dark); }

/* ── 份數選擇器(1–9 快選格 + 微調)── */
.qty-box .vc-title { margin-bottom: 18px; }
.qty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qty-cell { height: 56px; border-radius: 14px; border: 1.5px solid var(--divider); background: var(--card);
  color: var(--ink); font-size: 20px; font-weight: 700; }
.qty-cell.sel { border-color: var(--red); background: var(--red-container); color: var(--red-dark); }
.qty-cell:active { transform: scale(.96); }
/* 9 以上才需要微調;與快選格之間拉一條分隔線,語意上是「另一種輸入法」 */
.qty-fine { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--divider); }

/* ── 全分類快選 ── */
.cat-box .vc-title { margin-bottom: 16px; }
.cat-sheet-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.cat-sheet-list .cat-cell { padding: 12px 8px; border-radius: 14px; border: 1.5px solid var(--divider);
  background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.25; }
.cat-sheet-list .cat-cell.sel { border-color: var(--red); background: var(--red-container); color: var(--red-dark); }

/* ── 缺圖佔位 ── */
/* 契約 image 為 null(店家沒設預設圖 / 關了圖片總開關)時不輸出 <img> ——
   空 src 會被瀏覽器當成「重新請求當前頁」,拿到 HTML 才 decode 失敗,onerror 不一定觸發。 */
.img-ph { display: flex; align-items: center; justify-content: center; background: #f0e9e7; color: #c9b8b4; }
.img-ph svg { width: 34%; height: 34%; max-width: 56px; max-height: 56px; }

/* ── 動作確認窗:要刪 / 改的那道菜看得見 ── */
.confirm-target { background: var(--bg); border-radius: 14px; padding: 14px 16px; margin-bottom: 22px; text-align: left; }
.confirm-target .ct-name { font-size: 17px; font-weight: 700; }
.confirm-target .ct-opts { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.confirm-target .ct-qty { font-size: 14px; color: var(--brown); margin-top: 6px; font-weight: 600; }
/* 選行段 chips(改量/刪除同菜多筆):承 .vc-dishes 版面;窗是置中文字,chips 要置左;行多時可捲 */
.confirm-lines { margin-bottom: 22px; max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; }
.confirm-lines .opt-chip { justify-content: space-between; }
.confirm-lines .cl-qty { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
/* 倒數:左鍵讀秒到 0 視為確認 */
.primary-btn .btn-count { font-variant-numeric: tabular-nums; opacity: .85; }

/* ── 每句語音確認窗(版面對齊 kiosk VoiceConfirmDialog:小字標題 → 菜品列(圖左、
   名+單價右)→ 選項群 → 份數列(label 左 stepper 右)→ 按鈕)── */
.vc-box { display: flex; flex-direction: column; max-height: 92vh; padding: 22px 18px 18px; text-align: left; }
.vc-head { flex: none; }
.vc-title { font-size: 14px; color: var(--ink-soft); }
.vc-sub { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
/* 佇列計數「還有 N 筆待確認」:兩個確認窗共用(#vcQueueNote / #cfQueueNote) */
.vc-queue-note { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
/* 菜品列:96px 圖在左,右側直排菜名+單價(kiosk :225-254) */
.vc-item { flex: none; display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.vc-img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; }
.vc-item-info { min-width: 0; }
.vc-name { font-size: 21px; font-weight: 700; line-height: 1.3; }
.vc-price { font-size: 22px; font-weight: 700; color: var(--price); margin-top: 4px; }
.vc-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; margin: 14px 0; }
.vc-body .choice-groups { max-height: none; overflow: visible; }
.vc-dishes { display: flex; flex-direction: column; gap: 10px; text-align: left; }
/* 份數列:label 左、stepper 右(kiosk :319-331 SpaceBetween) */
.vc-foot { flex: none; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.vc-qty-label { font-size: 16px; font-weight: 600; }

/* ── 語言選擇窗(🌐 pill 開啟)── */
.lang-box { text-align: left; }
.lang-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.lang-pill:disabled { opacity: .55; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #1f1b16; color: #fff; padding: 12px 22px; border-radius: 24px; font-size: 15px; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,.3); max-width: 88vw; }

/* ── 動畫 ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinR { to { transform: rotate(-360deg); } }
@keyframes halo { 0%,100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.18); opacity: .28; } }
@keyframes breathe { 0%,100% { transform: scale(.96); } 50% { transform: scale(1.04); } }
@keyframes wave { from { height: 10px; } to { height: 30px; } }
/* mini 條音波的靜音呼吸:幅度刻意小,大幅度交給真音量的 scaleY(見 .orb-wave.mini) */
@keyframes waveMini { from { height: 8px; } to { height: 16px; } }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes vpDot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
@keyframes chevBob { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-2px); } }
@keyframes fabIntro { from { transform: scale(.4) translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeInUp { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
/* animation 之外也要關 transition —— 面板大↔小的形變過渡同樣是動效 */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* 店級碼(無桌碼)的內用引導:內用卡隱藏,改提示掃桌 QR */
.landing-hint { margin-top: 14px; text-align: center; font-size: 14px; color: var(--brown); opacity: .75; }
/* ── 大螢幕(≥1200px)────────────────────────────────────────────────────
   橫向版型由上方的 gutter 變數處理(背景滿版、內文置中限寬),不需要斷點。
   這一段只處理**垂直**的事:大螢幕(尤其電腦螢幕豎放)視窗遠比內容高,
   把主按鈕釘在視窗底會離內容非常遠 —— 實測 1080×1920 的詳情頁內容 y≈683 就結束,
   「加入購物車」卻在 y≈1884(相距 1201px),而且該頁根本不需要捲動;
   購物車 3 品更是相距 1582px。所以大螢幕改成「按鈕接在內容末尾」。

   ⚠ 斷點只看寬度,刻意**不做 pointer 偵測**:Windows 觸控機常回報 pointer:fine,
     接滑鼠維修就翻轉,拿它決定按鈕大小會出事。觸控目標一律 ≥44px 不分裝置 ——
     大螢幕改的是排版不是縮小元件,所以猜錯也不會變難用。
   ⚠ 點餐機不走這頁(它有自己的 /kiosk 入口),這裡只服務「客人拿自己裝置看」。

   條件是「寬 ≥1200 **或** 高 ≥1300」:使用者回報的正是 1080×1920 的電腦螢幕豎放,
   它只有 1080 寬、單看寬度抓不到,但 1920 的高度才是按鈕離內容 1201px 的真正原因。
   高度門檻取 1300 是為了讓手機(最高約 930)與平板直式(iPad 約 1180)維持原本的固定底欄 ——
   那些裝置視窗沒有高到讓固定底欄變成問題。 */
@media (min-width: 1200px), (min-height: 1300px) {
  /* 底欄改成跟著內容走。**同時要解掉撐高** —— .detail/.cart 的 min-height:100dvh
     加上 .detail-body 的 flex:1 會把靜態底欄重新推到 100dvh 的底部,等於白改。 */
  .detail, .cart { min-height: auto; }
  .detail-body { flex: none; padding-bottom: 16px; }
  .cart { padding-bottom: 40px; }
  /* 側邊 padding 歸零:底欄改成靠 max-width + margin auto 置中,
     再留著基礎規則那個 gutter-narrow(1440 時左右各 380px)會把內容框壓成負值,
     按鈕就被擠成 68×128 的直條(踩過)。 */
  .detail-foot, .cart-foot {
    position: static; z-index: auto; box-shadow: none;
    border-top: none; padding: 12px 0;
    max-width: var(--content-narrow); margin: 4px auto 0;
  }
  /* 菜單頁的讓位空間要留著 —— 語音 FAB 仍然是浮動的 */

  /* 落地頁與完成頁在大螢幕只佔約 6% 的畫面,兩張 420px 的卡浮在正中間很空。
     放大是為了讓「這是主要動作」看得出來 —— 觸控目標只准變大不准變小。 */
  .landing-cards { max-width: 560px; gap: 20px; }
  .order-card { height: 156px; }
  .order-card .oc-ic { width: 52px; height: 52px; }
  .order-card .oc-label { font-size: 26px; }
  .landing-brand { font-size: 30px; }
  .landing-title { font-size: 24px; margin-bottom: 24px; }
  .done-check { width: 112px; height: 112px; font-size: 64px; line-height: 112px; }
  .done h2 { font-size: 28px; }
  .done .primary-btn { padding: 16px 40px; font-size: 18px; }
}

/* ── 排隊取號(QUEUE_ORDERING_PLAN v3)────────────────────────────── */
.queue-body { max-width: 420px; margin: 0 auto; padding: 40px 20px; text-align: center;
  display: flex; flex-direction: column; min-height: 80vh; justify-content: center; }
.q-label { font-size: 15px; color: var(--brown); }
.q-no { font-size: 88px; font-weight: 900; line-height: 1.15; color: var(--price); }
.q-meta { font-size: 18px; font-weight: 700; color: var(--ink); min-height: 26px; }
.q-note { margin-top: 14px; font-size: 13px; color: var(--brown); opacity: .8; }
.q-note.q-dim { margin-top: 4px; opacity: .55; }
.q-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.q-actions .full { width: 100%; }
/* called:整張變提示色,大字讓人一眼看到 */
.q-banner { background: var(--red); color: #fff; border-radius: 16px; padding: 16px 14px;
  font-size: 18px; font-weight: 800; margin-bottom: 22px; animation: qPulse 1.6s ease-in-out infinite; }
.q-banner.q-final { background: var(--green); animation: none; }
@keyframes qPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
/* 取號小窗 */
.q-form-row { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 14px 0; font-size: 15px; color: var(--ink); }
.q-phone-input { flex: 1; max-width: 190px; border: 1.5px solid var(--divider);
  border-radius: 10px; padding: 10px; font-size: 16px; }
.q-hint { font-size: 12px; color: var(--brown); opacity: .75; text-align: left; margin-bottom: 6px; }
/* 排隊卡副標(有數字時稍強調) */
#queueCardInfo.live, #takeoutCardInfo.live { opacity: 1; font-weight: 700; }
/* 預點模式:購物車送單鎖定說明 */
.preorder-hint { text-align: center; font-size: 13px; color: var(--price);
  background: #FFF3E0; border-radius: 10px; padding: 8px; margin-bottom: 8px; }

/* ── 頁內掃碼(桌上 QR)── */
.scan-box { padding-bottom: 16px; }
.scan-video { width: 100%; max-height: 55vh; border-radius: 14px; background: #000;
  object-fit: cover; margin: 10px 0 4px; }
.scan-hint { text-align: center; }
.scan-entry { display: block; margin: 14px auto 0; }

/* ── 用餐方式小窗(徽章入口)── */
.order-badge { cursor: pointer; }
.mode-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 6px; }
.mode-btn { border: 1.5px solid var(--divider); border-radius: 14px; padding: 14px;
  font-size: 16px; font-weight: 600; color: var(--ink); background: var(--card); text-align: left; }
.mode-btn:active { background: var(--red-container); }

/* 完成頁:前面幾單 / 餐點好了 */
.done-ahead { margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--price); }

/* ── 桌次丙門票(輸 4 位碼加入) ── */
.ts-code-input { display: block; width: 180px; margin: 14px auto 6px; padding: 12px;
  font-size: 32px; font-weight: 800; letter-spacing: 12px; text-align: center;
  border: 2px solid var(--divider); border-radius: 14px; }
.ts-wrong { color: var(--red); font-size: 14px; font-weight: 700; margin-bottom: 6px; }
