/* 想點就點 h5-app 共用樣式 —— 無外部字體/無外部圖標 */
:root {
  --amber: #b8860b; --amber2: #d97706; --bg: #f7f3e8; --ink: #1f2937; --mut: #9ca3af;
  --line: #ece7df; --card: #fff; --red: #dc2626; --green: #16a34a;
  --yellow: #fbd34d; --yellow2: #ffd94f; --dink: #3b2a10; --gold: #f0b429; --gold-ink: #4a2c06;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { font-family: -apple-system, "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55; }
img { display: block; }
button { font: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; }

/* 頂欄（暖黃門頭） */
.hdr { position: sticky; top: 0; z-index: 30; background: linear-gradient(180deg, var(--yellow2), var(--yellow)); padding: 12px 14px 11px; color: var(--dink); }
.hdr .l1 { display: flex; align-items: center; gap: 8px; }
.hdr .store { font-size: 18px; font-weight: 900; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dink); }
.hdr .back { font-size: 22px; line-height: 1; padding: 2px 6px 2px 0; color: var(--dink); font-weight: 700; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.open { background: rgba(255,255,255,.75); color: #166534; font-weight: 600; }
.chip.closed { background: #fff; color: var(--red); font-weight: 600; }
.chip.seat { background: rgba(255,255,255,.65); color: var(--dink); font-weight: 600; }
.info-link { font-size: 12px; color: var(--dink); background: rgba(255,255,255,.55); border-radius: 999px; padding: 4px 10px; white-space: nowrap; font-weight: 600; }
.mode-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 13.5px; font-weight: 800; color: var(--dink); background: rgba(255,255,255,.6); border-radius: 999px; padding: 5px 12px; }
.bigmode { margin-top: 8px; font-size: 25px; font-weight: 900; color: var(--dink); letter-spacing: .02em; }
.bigmode small { display: block; font-size: 12.5px; font-weight: 600; color: #6b5310; margin-top: 2px; }
.hdr .l2 { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.seg { display: flex; background: #f1efe9; border-radius: 10px; padding: 3px; flex: 1; }
.seg button { flex: 1; padding: 7px 0; border-radius: 8px; font-size: 14px; color: #6b7280; }
.seg button.on { background: #fff; color: var(--amber2); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* 提示條 */
.notice { margin: 10px 12px 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.notice.red { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* 主體兩欄 */
.wrap { display: flex; align-items: flex-start; }
.side { width: 96px; flex-shrink: 0; background: #f3eedd; }
.side a { display: block; padding: 12px 6px; font-size: 12.5px; color: #6d6352; text-align: center; text-decoration: none; line-height: 1.3; position: relative; }
.side a .ic { display: block; font-size: 20px; margin-bottom: 3px; }
.side a.on { background: var(--bg); font-weight: 800; color: #92400e; }
.side a.on::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 55%; background: var(--gold); border-radius: 2px; }
.main { flex: 1; min-width: 0; position: relative; padding: 0 10px calc(164px + var(--safe-b)); }

/* 點餐頁：鎖定整頁視口，分類欄與菜品區各自獨立滾動、左欄常駐（2026-09-11） */
body.menu-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.menu-page .hdr { position: static; flex-shrink: 0; }
body.menu-page #notice { flex-shrink: 0; }
body.menu-page .wrap { flex: 1; min-height: 0; align-items: stretch; }
body.menu-page .side { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body.menu-page .main { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sec-h { padding: 14px 4px 6px; font-size: 15px; font-weight: 700; color: #374151; }
.sec-h small { font-weight: 400; font-size: 12px; color: var(--mut); margin-left: 6px; }

/* 菜品卡（單欄大圖卡） */
.img-ph { width: 92px; height: 92px; border-radius: 10px; flex-shrink: 0; background: #f3f0ea; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.bcard { background: #fff; border-radius: 16px; margin-bottom: 12px; overflow: hidden; position: relative; box-shadow: 0 1px 4px rgba(59,42,16,.05); }
.bcard .ph { position: relative; background: #f3f0e8; }
.bcard .pic { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.bcard .img-ph { width: 100%; height: 176px; border-radius: 0; font-size: 46px; }
.bcard .ribbon { position: absolute; left: 0; top: 12px; z-index: 2; background: linear-gradient(90deg, #ef4444, #dc2626); color: #fff; font-size: 11.5px; font-weight: 800; padding: 4px 11px 4px 9px; border-radius: 0 999px 999px 0; box-shadow: 0 2px 6px rgba(220,38,38,.35); }
.bcard .soldtag { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.bcard .maskout { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(246,244,240,.45); }
.bcard .maskout span { width: 66px; height: 66px; border-radius: 50%; border: 2px solid rgba(0,0,0,.3); background: rgba(255,255,255,.92); color: #374151; font-size: 14px; font-weight: 900; display: flex; align-items: center; justify-content: center; transform: rotate(-14deg); }
.bcard.off .ph { filter: grayscale(1); }
.bcard.off .bd { opacity: .72; }
.bcard .bd { padding: 10px 12px 12px; }
.bcard .nm { font-size: 16px; font-weight: 800; }
.bcard .ds { font-size: 12px; color: var(--mut); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard .bt { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { color: #b45309; font-weight: 800; font-size: 17px; }
.price i { font-style: normal; font-size: 12px; margin-right: 1px; }
.price s { color: var(--mut); font-weight: 400; font-size: 12px; margin-left: 6px; }
.badge-out { font-size: 11px; color: #9ca3af; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.badge-time { font-size: 11px; color: #b45309; background: #fff7ed; border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.btn-spec { background: var(--gold); color: var(--gold-ink); font-size: 13px; font-weight: 800; border-radius: 999px; padding: 7px 16px; white-space: nowrap; }

/* 數量步进 */
.stepper { display: flex; align-items: center; gap: 2px; }
.stepper button { width: 26px; height: 26px; border-radius: 50%; font-size: 17px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.stepper .mn { border: 1px solid #d1d5db; color: #6b7280; background: #fff; }
.stepper .pl { background: var(--gold); color: var(--gold-ink); font-weight: 900; }
.stepper .n { min-width: 24px; text-align: center; font-size: 14px; font-weight: 700; }

/* 底部購物車條 */
.cbar { position: fixed; left: 0; right: 0; bottom: calc(74px + var(--safe-b)); z-index: 40; margin: 0 12px;
  background: #292524; color: #fff; border-radius: 999px; display: flex; align-items: center; padding: 8px 8px 8px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cbar .bag { position: relative; font-size: 24px; margin-right: 12px; }
.cbar .bag em { position: absolute; top: -6px; right: -10px; background: var(--red); color: #fff; font-style: normal;
  font-size: 11px; min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.cbar .amt { flex: 1; font-size: 19px; font-weight: 800; }
.cbar .amt small { display: block; font-size: 11px; color: #a8a29e; font-weight: 400; }
.cbar .go { background: var(--amber); color: #fff; font-weight: 700; border-radius: 999px; padding: 10px 22px; font-size: 15px; }
.cbar .go.dis { background: #57534e; color: #a8a29e; }

/* 底部導航（點餐／訂單兩 tab） */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar a { flex: 1; text-align: center; padding: 7px 0 6px; font-size: 11px; color: #9c947f; text-decoration: none; line-height: 1.35; font-weight: 600; }
.tabbar a .ti { display: block; font-size: 22px; line-height: 1.15; }
.tabbar a.on { color: var(--dink); font-weight: 800; }

/* 門店信息抽屜 */
.inforow { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.inforow .k { width: 84px; flex-shrink: 0; color: var(--mut); font-size: 13px; }
.inforow .v { flex: 1; min-width: 0; }

/* 抽屜/彈窗 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: #fff; border-radius: 18px 18px 0 0;
  max-height: 82vh; display: flex; flex-direction: column; padding-bottom: var(--safe-b); }
.sheet .sh { padding: 15px 16px 10px; font-size: 16.5px; font-weight: 700; display: flex; align-items: center; }
.sheet .sh .x { margin-left: auto; color: var(--mut); font-size: 20px; padding: 0 2px; }
.sheet .sb { overflow-y: auto; padding: 0 16px 12px; -webkit-overflow-scrolling: touch; }
.sheet .sf { padding: 12px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.sheet .sf .tp { flex: 1; font-size: 12px; color: var(--mut); }
.sheet .sf .tp b { display: block; font-size: 19px; color: #b45309; }
.big-btn { background: var(--amber); color: #fff; font-weight: 700; border-radius: 999px; padding: 12px 26px; font-size: 15.5px; }
.big-btn.dis { background: #d6d3d1; color: #fff; }

/* 規格 */
.gp { margin-bottom: 16px; }
.gp .gt { font-size: 14.5px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.gp .gt .must { color: var(--red); font-size: 12px; font-weight: 400; }
.gp .gt .lim { color: var(--mut); font-size: 11.5px; font-weight: 400; }
.subgrp { margin-top: 10px; padding: 10px 12px; border-left: 4px solid var(--amber); background: #faf9f7; border-radius: 10px; }
.subgrp .subgt { font-size: 13px; font-weight: 800; color: var(--amber2); margin-bottom: 2px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 8px 13px; font-size: 13.5px; background: #fff; }
.opt.on { border-color: var(--amber); color: var(--amber2); background: #fffbeb; font-weight: 700; }
.opt .px { font-size: 11.5px; color: var(--mut); }
.opt.on .px { color: var(--amber2); }
.opt .qs { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; border: 1px solid #fde68a; border-radius: 9px; padding: 1px 5px; background: #fff; vertical-align: middle; }
.opt .qs b { font-weight: 800; cursor: pointer; padding: 0 3px; color: #b45309; }
.opt .qs .qn { min-width: 14px; text-align: center; color: #92400e; }
.picked { font-size: 12px; color: var(--mut); }

/* 購物車抽屜行 */
.ci { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ci .bd { flex: 1; min-width: 0; }
.ci .nm { font-size: 14.5px; font-weight: 600; }
.ci .sp { font-size: 12px; color: var(--mut); }
.ci .pr { font-size: 12px; color: #b45309; margin-top: 2px; }

/* 表單 */
.card { background: #fff; border-radius: 14px; margin: 12px; padding: 14px 16px; }
.card h4 { font-size: 15px; margin-bottom: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.row .v { color: #57534e; }
.fld { width: 100%; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; font-size: 14.5px; background: #fff; }
.fld:focus { outline: none; border-color: var(--amber); }
textarea.fld { resize: none; min-height: 64px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag-o { border: 1.5px solid #e5e7eb; border-radius: 999px; padding: 6px 13px; font-size: 13px; }
.tag-o.on { border-color: var(--amber); background: #fffbeb; color: var(--amber2); font-weight: 700; }
.times { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.times .opt { flex-shrink: 0; }
.total-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: #57534e; }
.total-line.big { font-size: 16px; color: var(--ink); font-weight: 800; }
.total-line.big .v { color: #b45309; font-size: 20px; }
.hint { font-size: 12px; color: var(--mut); margin-top: 6px; }

/* 訂單列表 */
.tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 13px 0; font-size: 15px; color: #6b7280; position: relative; }
.tabs button.on { color: var(--amber2); font-weight: 700; }
.tabs button.on::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 36px; height: 3px; background: var(--amber2); border-radius: 2px; }
.ocard { background: #fff; border-radius: 14px; margin: 12px; padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.ocard .l1 { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); }
.ocard .l1 .st { margin-left: auto; font-weight: 700; font-size: 13.5px; }
.ocard .st.pending { color: var(--red); } .ocard .st.making { color: var(--amber2); }
.ocard .st.pickup { color: #0891b2; } .ocard .st.done { color: var(--green); } .ocard .st.cancelled { color: var(--mut); }
.ocard .l2 { display: flex; align-items: center; margin-top: 8px; }
.ocard .l2 .tt { flex: 1; font-size: 14px; }
.ocard .l2 .am { font-weight: 800; color: #b45309; }
.empty { text-align: center; padding: 70px 20px; color: var(--mut); }
.empty .ic { font-size: 52px; margin-bottom: 12px; }
.load-tip { text-align: center; color: var(--mut); font-size: 13px; padding: 14px 0 calc(90px + var(--safe-b)); }

/* toast */
.toast { position: fixed; left: 50%; top: 46%; transform: translate(-50%,-50%); z-index: 99;
  background: rgba(17,24,39,.85); color: #fff; padding: 11px 20px; border-radius: 12px; font-size: 14px; max-width: 78vw; text-align: center; }

/* 狀態時間軸 */
.flow { display: flex; align-items: center; gap: 0; padding: 14px 16px; }
.flow .f-step { flex: 1; text-align: center; font-size: 12px; color: var(--mut); position: relative; }
.flow .f-step .dot { width: 10px; height: 10px; border-radius: 50%; background: #e5e7eb; margin: 0 auto 6px; }
.flow .f-step.on { color: var(--amber2); font-weight: 700; }
.flow .f-step.on .dot { background: var(--amber2); }
.flow .f-step.done { color: var(--green); }
.flow .f-step.done .dot { background: var(--green); }
.pill { display: inline-block; font-size: 12px; border-radius: 999px; padding: 3px 10px; background: #f3f4f6; color: #57534e; }
.pill.warn { background: #fef2f2; color: var(--red); }
.pill.ok { background: #ecfdf5; color: var(--green); }
.pill.amber { background: #fff7ed; color: var(--amber2); }

/* 人數選擇 */
.people-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.people-grid button { padding: 14px 0; border: 1.5px solid #e5e7eb; border-radius: 12px; font-size: 17px; font-weight: 700; }
.people-grid button.on { border-color: var(--amber); background: #fffbeb; color: var(--amber2); }
.center-wrap { max-width: 480px; margin: 0 auto; }
.skel { background: linear-gradient(90deg,#f3f0ea 25%,#faf8f5 50%,#f3f0ea 75%); background-size: 200% 100%;
  animation: sk 1.2s infinite; border-radius: 14px; height: 112px; margin: 10px 0; }
@keyframes sk { to { background-position: -200% 0; } }

/* 门店公告跑马灯（setting「門店公告欄」驱动） */
.annbar { overflow: hidden; background: linear-gradient(90deg, #fffbeb, #fef3c7); border-bottom: 1px solid #fde68a; padding: 7px 0; }
.anntrack { display: inline-flex; white-space: nowrap; animation: annmq 16s linear infinite; will-change: transform; }
.anntrack span { padding-right: 100px; font-size: 13px; font-weight: 600; color: #92400e; }
@keyframes annmq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 暂停接单整页 */
.closed { text-align: center; padding: 56px 24px; }
.closed .moon { font-size: 64px; line-height: 1; filter: drop-shadow(0 6px 18px rgba(217,119,6,.25)); }
.closed .ttl { margin-top: 18px; font-size: 21px; font-weight: 800; color: var(--ink); }
.closed .sub { margin-top: 8px; font-size: 13px; color: var(--mut); }
.closed .hrs { margin: 22px auto 0; display: inline-flex; flex-direction: column; gap: 4px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 34px; box-shadow: 0 2px 10px rgba(31,41,55,.05); }
.closed .hrs span { font-size: 12px; color: var(--mut); }
.closed .hrs b { font-size: 17px; color: var(--amber2); letter-spacing: .04em; }
.closed .cann { margin: 22px auto 0; max-width: 420px; text-align: left; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 14px; padding: 12px 14px; font-size: 13px; color: #92400e; line-height: 1.7; }
.closed .cann .cl { font-weight: 800; margin-bottom: 4px; }
.closed .cback { margin: 26px auto 0; display: inline-block; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-weight: 700; font-size: 14px; padding: 10px 26px; border-radius: 999px; cursor: pointer; }
