/* 咖啡点单 H5 · 白底高级黑 · 移动端优先 */
/* touch-action: manipulation —— 去掉移动端 300ms 点击延迟，同时禁掉双击缩放；
   双指缩放仍然保留（manipulation 只禁 double-tap to zoom）。 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  background: #ffffff;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
  /* iOS：100vh 是「地址栏收起时的最大视口」，地址栏展开后页面底部会露白/截断。
     同一属性写两遍：不认识 dvh 的老 Safari 自动忽略第二行，继续用 vh。 */
  min-height: 100vh;
  min-height: 100dvh;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; }
/* iOS Safari：input/textarea/select 的 font-size < 16px 时，聚焦会自动放大整页，
   而且不会跟着缩回去（iOS 上最常见的「点一下输入框页面就废了」）。统一提到 16px。
   视觉代价：输入框里的字比正文大 1px，其余布局不变。
   outline:none 只针对「鼠标点进来」；键盘 Tab 进来时由 :focus-visible 画焦点环（见文件末尾）。 */
input, textarea, select { font-family: inherit; font-size: 16px; outline: none; }

/* 我的订单入口 */
/* 浅灰 #9b9b9b 对白底只有 2.8:1（低于 WCAG AA 的 4.5:1），这是入口链接的真实文字 → 调深 */
.order-link { position: absolute; right: 16px; top: 22px; font-size: 12px; color: #767676; text-decoration: none; border: 1px solid #e5e5e5; border-radius: 999px; padding: 4px 12px; }
.shop-head { position: relative; }
.qbtn { background: #111; color: #fff; border-radius: 999px; font-size: 13px; font-weight: 700; padding: 8px 18px; flex-shrink: 0; }
.qbtn.ghost { background: #fff; color: #111; border: 1px solid #e5e5e5; }

/* 到店自取：只隐藏「小区 / 楼栋房号」，称呼和手机号仍然要填 */
.form-card.pickup-mode .addr-only { display: none; }

/* 店铺头部 */
/* 刘海屏 / 灵动岛：viewport-fit=cover 之后内容会顶到刘海下面，顶部内边距加上安全区 */
.shop-head { padding: calc(18px + env(safe-area-inset-top)) 16px 14px; border-bottom: 1px solid #f5f5f5; }
.shop-name { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.shop-meta { margin-top: 6px; font-size: 12px; color: #767676; display: flex; align-items: center; gap: 6px; }
.shop-meta::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #111; }

/* 主体双栏 */
/* 100dvh = 地址栏展开/收起时的真实视口高度，老 Safari 不认识会回落到上一行的 vh */
.menu-wrap { display: flex; height: calc(100vh - 108px); height: calc(100dvh - 108px); overflow: hidden; }
/* -webkit-overflow-scrolling: touch = 老 iOS 惯性滚动；overscroll-behavior: contain = 防止下拉整页刷新/橡皮筋 */
.cat-rail { width: 88px; background: #f7f7f7; overflow-y: auto; flex-shrink: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cat-item { padding: 17px 8px; font-size: 13px; color: #666; text-align: center; position: relative; }
.cat-item.active { background: #fff; color: #111; font-weight: 700; }
/* 旧版竖排分类条的激活态竖条规则已删除：
   顾客端在 index.html 里把分类改成了顶部横排 chips，激活态改成「深底白字 + 底部横杠」，
   那道竖条规则留在共用样式表里会和页内规则同名冲突（top:50% 残留 → 横杠压到文字中间）。
   顾客端激活态样式现在只由 index.html 的 .cat-item.active::before 一处负责。 */
.prod-list { flex: 1; overflow-y: auto; padding: 0 12px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sec-title { font-size: 15px; font-weight: 800; padding: 15px 2px 10px; }

/* 商品卡 */
.prod-card { display: flex; margin-bottom: 14px; }
.prod-thumb {
  width: 82px; height: 82px; border-radius: 10px; flex-shrink: 0;
  position: relative; overflow: hidden;
  background: #f3ece0;              /* 与海报米色底一致 */
  display: flex; align-items: center; justify-content: center;
}
/* 按原图比例完整显示，不裁切 */
.prod-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prod-thumb-empty { font-size: 26px; opacity: .35; }
.soldout-mask { position: absolute; inset: 0; background: rgba(255,255,255,.78); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; letter-spacing: 2px; }
.prod-card.soldout .prod-name { color: #b8b8b8; }
.prod-info { flex: 1; margin-left: 11px; display: flex; flex-direction: column; min-width: 0; }
.prod-name { font-size: 15px; font-weight: 700; }
.prod-desc { font-size: 11px; color: #9b9b9b; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.prod-price { font-weight: 800; }
.prod-price .cur { font-size: 12px; }
.quick-add { width: 26px; height: 26px; line-height: 24px; border-radius: 50%; background: #111; color: #fff; font-size: 18px; font-weight: 600; text-align: center; }
.quick-add.disabled { background: #d8d8d8; }

/* 底部购物车栏 */
.cart-bar {
  /* translateZ(0) 提升合成层：iOS 上 fixed 底栏滚动时不再整条重绘抖动 */
  position: fixed; left: 50%; transform: translateX(-50%) translateZ(0);
  width: 100%; max-width: 560px;            /* 与 body 对齐，避免左右各差 16px */
  /* 底部安全区（home indicator）：栏本身长高一点，内容不被压到小白条上 */
  bottom: 0; height: 58px; height: calc(58px + env(safe-area-inset-bottom));
  background: #111;
  border-radius: 16px 16px 0 0;             /* 不用 999px：会在 58px 高度上塌成大圆角，
                                              右侧按钮会顶在弧线上，看起来像"掉出去" */
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px env(safe-area-inset-bottom) 16px;
  z-index: 50; box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
}
.cart-left { display: flex; align-items: center; gap: 10px; flex: 1; color: #fff; }
.cart-icon { position: relative; font-size: 20px; }
.cart-badge { position: absolute; top: -8px; right: -12px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: #fff; color: #111; font-size: 10px; font-weight: 700; text-align: center; padding: 0 4px; }
.cart-tip { font-size: 12px; color: rgba(255,255,255,.6); }
.cart-go { background: #fff; color: #111; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 10px 24px; flex-shrink: 0; white-space: nowrap; }
.cart-go.disabled { color: #c4c4c4; }

/* 遮罩与弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; }
/* 底部安全区已经在 padding 里（calc(18px + env(safe-area-inset-bottom))）；
   max-height 用 dvh 兜住地址栏收起/展开；translateZ(0) 提升合成层减少 iOS 重绘抖动 */
.sheet { position: fixed; left: 50%; transform: translateX(-50%) translateZ(0); width: 100%; max-width: 560px; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; z-index: 70; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 82vh; max-height: 82dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-title { font-size: 18px; font-weight: 800; }
.sheet-close { font-size: 16px; color: #767676; padding: 4px 8px; }
.spec-price { margin: 10px 0 4px; font-weight: 800; font-size: 17px; }
.spec-label { font-size: 12px; color: #767676; margin: 16px 0 9px; }
.spec-opts { display: flex; flex-wrap: wrap; gap: 16px 14px; align-items: center; }
.spec-opt {
  padding: 8px 18px; border-radius: 999px; border: 1px solid #e5e5e5;
  font-size: 13px; color: #333; position: relative;
  display: inline-flex; align-items: center; line-height: 1.2;
}
.spec-opt.on { background: #111; border-color: #111; color: #fff; font-weight: 600; }

/* 糖度「推荐」角标
   - .spec-opts 用 align-items:center 统一垂直居中
   - 角标改为「右上角内贴」，不再用负偏移，避免顶到下一个选项
   - .rec 选项上下留出空间，文字仍处于视觉中心 */
.spec-opt.rec { padding-top: 14px; padding-bottom: 12px; }
.spec-opt .rec-badge {
  position: absolute; top: -7px; right: 8px;
  background: #111; color: #fff; font-style: normal;
  font-size: 9px; line-height: 1; padding: 3px 5px;
  border-radius: 4px; letter-spacing: .5px; pointer-events: none;
}
.spec-opt.on .rec-badge { background: #fff; color: #111; }
.spec-opt-extra { margin-left: 5px; font-size: 11px; opacity: .75; }

/* 商品列表里的英文名 */
.prod-en { font-size: 10px; font-weight: 400; color: #b8b8b8; margin-left: 6px; }
/* 「起」是价格的一部分 → 承载真实信息，浅灰不够（#b8b8b8 只有 2.1:1） */
.prod-add { font-size: 11px; font-weight: 400; color: #767676; margin-left: 3px; }

/* 规格弹窗补充 */
.sheet-en { margin-top: 3px; font-size: 11px; color: #b8b8b8; }
/* 商品描述：装饰性次要信息，保持浅灰 */
.spec-desc { margin-top: 6px; font-size: 12px; color: #9b9b9b; }
/* 「含加浓 +¥2」是加价金额 → 真实信息；同时把上一条的 opacity:.75 抵消掉，
   否则 75% 透明度会把深色又洗回浅灰（实际不足 3:1） */
.spec-extra { margin-left: 8px; font-size: 11px; color: #767676; font-weight: 400; opacity: 1; }
.btn-black { display: block; width: 100%; background: #111; color: #fff; border-radius: 999px; font-weight: 700; text-align: center; padding: 13px 0; font-size: 15px; }
.btn-black.disabled { background: #d8d8d8; }

/* 规格弹窗 · 「已选」摘要（第八批 · 规格全自定义）
   ⚠ 组数不固定了（店主可以加「奶品」组），面板会长到要滚 ——
     摘要钉在顶栏，滚到哪儿都看得见自己选了什么。
   ⚠ .sheet 本身已经可滚（max-height: 82dvh; overflow-y: auto）——
     sticky 是相对**滚动容器**（.sheet）生效的，不用改 .sheet。 */
.spec-summary {
  position: sticky; top: 0; z-index: 2;
  margin: 8px 0 0; padding: 8px 0 6px;
  background: #fff; border-bottom: 1px solid #eee;
  font-size: 12px; color: #767676; line-height: 1.5;
}
/* 「还没选完 / 规格配置坏了」—— 顾客必须知道为什么按钮点不动 */
.spec-need {
  margin-top: 6px; padding: 8px 10px; border-radius: 8px;
  background: #fff4e5; color: #8a5a00; font-size: 12px; line-height: 1.5;
}
/* 规格弹窗 · 「加入购物车」钉在底栏
   ⚠ 组多了按钮会滚出视野 → 钉住。
   ⚠ margin-bottom 留一点：钉住时别压到手机的 home 条。 */
.spec-add {
  margin-top: 22px;
  position: sticky; bottom: 0; z-index: 3;
  margin-bottom: calc(6px + env(safe-area-inset-bottom));
}

/* 规格弹窗 · 数量步进 */
.qty-row { display: flex; align-items: center; gap: 14px; }
.qty-btn { width: 30px; height: 30px; line-height: 28px; text-align: center; border-radius: 50%; border: 1px solid #111; font-size: 18px; font-weight: 600; flex-shrink: 0; user-select: none; }
.qty-btn.off { border-color: #e0e0e0; color: #cfcfcf; }
.qty-num { min-width: 40px; text-align: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.qty-exist { font-size: 11px; color: #767676; margin-left: 4px; }

/* 购物车面板 */
.cart-panel-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; padding-bottom: 8px; }
/* 「清空」是按钮文字 → 真实信息，调深 */
.clear-btn { font-size: 12px; color: #767676; font-weight: 400; }
.cart-row { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.cart-row-info { flex: 1; min-width: 0; }
.cart-row-name { font-size: 14px; font-weight: 600; }
.cart-row-spec { font-size: 11px; color: #767676; margin-top: 3px; }
.cart-row-price { width: 56px; text-align: right; font-weight: 700; font-size: 14px; }
.stepper { display: flex; align-items: center; margin-left: 10px; }
.step-btn { width: 22px; height: 22px; line-height: 20px; text-align: center; border-radius: 50%; border: 1px solid #111; font-size: 14px; }
.step-num { min-width: 28px; text-align: center; font-size: 13px; }

/* 确认下单页 */
.page-pad { padding: 16px; }
.card { border: 1px solid #f2f2f2; border-radius: 12px; padding: 4px 14px; margin-bottom: 12px; }
.form-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f5f5f5; }
.form-row:last-child { border-bottom: none; }
/* 表单 label 是必填指引 → 真实信息，不能用 2.8:1 的浅灰 */
.form-label { width: 80px; font-size: 13px; color: #767676; flex-shrink: 0; }
.form-input { flex: 1; border: none; width: 100%; }
.form-label .req { color: #c8332a; margin-left: 3px; font-weight: 700; }

/* 小区选择行 */
.form-pick {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 2px 0; cursor: pointer; min-height: 22px;
}
.form-pick:active { opacity: .6; }
.pick-val { font-weight: 700; }
/* 占位文字 / 装饰箭头：非活跃语义，保持浅色 */
.pick-ph { color: #c4c4c4; }
.pick-arrow { color: #c4c4c4; font-size: 18px; line-height: 1; }

/* 小区选择弹层 */
.cty-list { margin-top: 8px; max-height: 52vh; max-height: 52dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cty-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; font-size: 15px; border-bottom: 1px solid #f5f5f5;
}
.cty-item:active { background: #f7f7f7; }
.cty-item.on { font-weight: 700; }
.cty-check { font-style: normal; font-weight: 700; }
.cty-empty { padding: 40px 0; text-align: center; color: #767676; font-size: 13px; }
.cty-foot { margin-top: 14px; text-align: center; font-size: 13px; color: #767676; padding: 8px 0; }
.item-row { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.item-row:last-child { border-bottom: none; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 14px; font-weight: 600; }
.item-spec { font-size: 11px; color: #767676; margin-top: 3px; }
.item-price { width: 56px; text-align: right; font-weight: 700; font-size: 14px; }
.step-mini { min-width: 32px; text-align: center; font-size: 12px; color: #666; }
/* 底部结算栏：安全区已经在 padding 里（calc(10px + env(safe-area-inset-bottom))）；
   translateZ(0) 提升合成层，键盘弹起/收起时 iOS 上不会整条重绘抖动 */
.submit-bar { position: fixed; left: 50%; transform: translateX(-50%) translateZ(0); width: 100%; max-width: 560px; bottom: var(--kb, 0px); background: #fff; border-top: 1px solid #f2f2f2; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 50; }
/* 键盘弹起时（--kb 由 JS 监听 visualViewport 写入）底栏抬到键盘上方，
   否则 iOS 上键盘会把「提交订单」按钮整个盖住。
   用 bottom 而不是 transform —— transform 已经被 translateX(-50%) 占了，
   再叠 translateY 容易和居中打架。 */
.submit-total-label { font-size: 12px; color: #767676; }
.submit-total-num { font-weight: 800; font-size: 18px; }
.submit-btn { background: #111; color: #fff; border-radius: 999px; font-weight: 700; font-size: 14px; padding: 12px 26px; }
.submit-btn.disabled { background: #d8d8d8; }
.page-bottom-pad { height: 90px; }

/* 取餐结果 */
.code-card { margin: 24px 16px 0; background: #111; color: #fff; border-radius: 16px; padding: 32px 0 26px; text-align: center; }
.code-card.ready { background: #fff; color: #111; border: 2px solid #111; }
.code-label { font-size: 13px; opacity: .7; letter-spacing: 3px; }
.code-num { font-size: 64px; font-weight: 800; letter-spacing: 4px; line-height: 1.3; }
.code-status { display: inline-block; font-size: 12px; padding: 5px 16px; border-radius: 999px; background: rgba(255,255,255,.14); letter-spacing: 1px; }
.code-card.ready .code-status { background: #111; color: #fff; }
.code-remind { margin-top: 12px; font-size: 11px; opacity: .55; }
.success-tip { margin: 16px 16px 0; background: #f7f7f7; border-radius: 10px; padding: 12px; font-size: 12px; color: #666; text-align: center; }
.detail-card { margin: 12px 16px 0; border: 1px solid #f2f2f2; border-radius: 12px; padding: 4px 14px 14px; }
.detail-row { display: flex; align-items: center; padding: 12px 0; }
.detail-info { flex: 1; min-width: 0; }
.detail-name { font-size: 14px; font-weight: 600; }
.detail-spec { font-size: 11px; color: #767676; margin-top: 3px; }
.detail-price { font-weight: 700; font-size: 14px; }
.detail-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid #f5f5f5; font-size: 14px; }
.kv-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 12px; }
.kv-key { color: #767676; flex-shrink: 0; }
.kv-val { color: #333; text-align: right; word-break: break-all; max-width: 250px; }
/* 时间类（带年份+秒）不折行，字号略缩避免顶到边 */
/* 空值/弱化值：非活跃语义，保持浅色 */
.kv-muted { color: #c4c4c4; }
.kv-time {
  font-variant-numeric: tabular-nums; letter-spacing: 0;
  white-space: nowrap; word-break: keep-all;
  font-size: 11px; line-height: 1.6;
}
.back-btn { margin: 20px 16px 30px; border: 1px solid #111; color: #111; border-radius: 999px; text-align: center; padding: 12px 0; font-size: 14px; font-weight: 600; }
/* 底部链接也是可点的真实信息 → 调深 */
.btn-link { display: block; text-align: center; color: #767676; font-size: 13px; padding: 14px 0 30px; text-decoration: none; }

/* 订单列表 */
.order-card { border: 1px solid #f2f2f2; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.order-top { display: flex; justify-content: space-between; align-items: center; }
.order-code { font-size: 15px; font-weight: 800; }
.order-status { font-size: 12px; padding: 4px 12px; border-radius: 999px; background: #f5f5f5; color: #666; }
.order-status.hot { background: #111; color: #fff; }
.order-names { margin-top: 8px; font-size: 13px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-bottom { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; }
.order-time { font-size: 11px; color: #b8b8b8; }
.order-total { font-size: 15px; font-weight: 800; }
.empty { padding: 80px 30px; text-align: center; color: #767676; }
.empty-icon { font-size: 44px; margin-bottom: 14px; }
/* 收款码弹层 */
.pay-mask { background: rgba(17,17,17,.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
.pay-panel { width: 100%; max-width: 360px; background: #fff; border-radius: 18px; padding: 26px 24px 20px; text-align: center; max-height: 92vh; max-height: 92dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pay-title { font-size: 19px; font-weight: 800; letter-spacing: 1px; }
.pay-sub { margin-top: 5px; font-size: 11px; color: #767676; }
.pay-amount-label { margin-top: 18px; font-size: 11px; color: #767676; letter-spacing: 3px; }
.pay-amount { margin-top: 2px; font-size: 40px; font-weight: 800; line-height: 1.15; }
.pay-amount .pay-cur { font-size: 20px; font-weight: 700; }
.pay-qr-wrap { position: relative; margin: 18px auto 0; width: 220px; height: 220px; border: 1px solid #f0f0f0; border-radius: 12px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.pay-qr-wrap img { width: 100%; height: 100%; object-fit: contain; }
.pay-qr-hint { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(17,17,17,.62); color: #fff; font-size: 10px; padding: 4px 0; letter-spacing: 1px; }
/* 「未配置收款码」是状态提示 → 真实信息，不能用 1.7:1 的浅灰 */
.pay-qr-missing { font-size: 13px; color: #767676; }
.pay-tip { margin-top: 14px; font-size: 12px; color: #555; line-height: 1.6; }
.pay-code { margin-top: 6px; font-size: 12px; color: #767676; letter-spacing: 1px; }
/* 收款码双框（微信 / 支付宝 并排） */
.pay-qr-boxes { display: flex; gap: 12px; margin-top: 20px; }
.pay-qr-box {
  flex: 1; min-width: 0; border: 1px solid #eee; border-radius: 12px;
  padding: 10px 8px 8px; cursor: pointer; background: #fff;
}
.pay-qr-box:active { background: #f7f7f7; }
.pay-qr-label {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 12px; font-weight: 600; margin-bottom: 8px;
}
.pay-qr-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pay-qr-dot.wx { background: #07c160; }
.pay-qr-dot.ali { background: #1677ff; }
.pay-qr-dot.qr { background: #111; }
.pay-qr-img { width: 100%; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; border-radius: 6px; }
.pay-qr-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pay-qr-tip { margin-top: 7px; text-align: center; font-size: 11px; color: #767676; }
.pay-qr-hintline { margin-top: 12px; text-align: center; font-size: 11px; color: #767676; }
.pay-qr-missing { margin-top: 20px; padding: 30px 0; text-align: center; font-size: 13px; color: #767676; }

.pay-btn { margin-top: 20px; }
.pay-back { margin-top: 14px; font-size: 12px; color: #767676; text-decoration: underline; }

/* 收款码保存按钮 */
.pay-save-btn { margin-top: 12px; padding: 11px 0; border: 1px solid #111; border-radius: 999px; font-size: 13px; font-weight: 600; color: #111; text-align: center; }
.pay-save-btn:active { background: #111; color: #fff; }

/* 收款码放大保存页 */
/* 底部安全区：关闭按钮别被 home indicator 压住 */
.qr-saver { position: fixed; inset: 0; background: #111; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.qr-save-inner { width: 100%; max-width: 340px; text-align: center; max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.qr-save-title { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.qr-save-img { width: 100%; background: #fff; border-radius: 12px; padding: 8px; box-sizing: border-box; }.qr-save-steps { color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.7; margin-top: 16px; }
.qr-save-dl { color: rgba(255,255,255,.45); font-size: 11px; margin-top: 14px; text-decoration: underline; }
.qr-save-close { margin-top: 18px; padding: 12px 0; border-radius: 999px; background: #fff; color: #111; font-weight: 700; font-size: 14px; }

/* 确认页补充 */
.pay-flow { font-size: 11px; color: #767676; padding-bottom: 12px; line-height: 1.5; }
.closed-bar { margin: 0 0 12px; background: #fff6ec; border: 1px solid #ffd8ac; border-radius: 10px; padding: 10px 14px; font-size: 12px; color: #a35a00; text-align: center; }
.quick-card { padding: 12px 14px; }
.quick-head { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.quick-sub { font-size: 11px; color: #767676; font-weight: 400; margin-left: 8px; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-tag { padding: 6px 14px; border-radius: 999px; border: 1px solid #e5e5e5; font-size: 12px; color: #555; background: #fff; }
.quick-tag.on { background: #111; border-color: #111; color: #fff; }

/* 结果页补充 */
.success-tip.paid-tip { background: #f0f7f0; color: #2f7a2f; }
/* 灰底上的文字要更深：#666 对 #f0f0f0 是 5.0:1（#9b9b9b 只有 2.5:1） */
.code-card.void { background: #f0f0f0; color: #666; }
.code-copy { display: inline-block; margin-top: 10px; font-size: 11px; opacity: .6; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.unpaid-bar { margin: 12px 16px 0; background: #fff6ec; border: 1px solid #ffd8ac; border-radius: 10px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: #a35a00; }
.unpaid-bar > div { background: #111; color: #fff; border-radius: 999px; padding: 6px 16px; font-weight: 700; flex-shrink: 0; }
.pay-status-card { margin: 12px 16px 0; border: 1px solid #f2f2f2; border-radius: 12px; padding: 14px; display: flex; align-items: center; justify-content: space-between; }
.pay-status-title { font-size: 14px; font-weight: 700; }
.pay-status-desc { margin-top: 4px; font-size: 11px; color: #767676; }
.pay-status-badge { padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.pay-status-badge.ok { background: #eaf6ea; color: #2f7a2f; }
.pay-status-badge.no { background: #fdeceb; color: #c8332a; }
/* 已申报付款后的说明条：告诉顾客为什么「取消订单」按钮没了 */
.pay-note { margin: 8px 16px 0; padding: 10px 14px; border-radius: 10px; background: #fff6ec; border: 1px solid #ffd8ac; color: #a35a00; font-size: 12px; line-height: 1.6; }
.act-row { margin: 20px 16px 0; display: flex; gap: 10px; }
.btn-ghost-sm { flex: 1; border: 1px solid #111; border-radius: 999px; text-align: center; padding: 12px 0; font-size: 14px; font-weight: 600; }
.btn-ghost-sm.danger { border-color: #c8332a; color: #c8332a; }

/* 订单列表补充 */
.order-tags { display: flex; align-items: center; gap: 8px; }
.order-pay { font-size: 11px; padding: 4px 10px; border-radius: 999px; }
.order-pay.ok { background: #eaf6ea; color: #2f7a2f; }
.order-pay.no { background: #fdeceb; color: #c8332a; }
.order-room { margin-top: 6px; font-size: 11px; color: #b8b8b8; }

/* 我的订单 · 作用域提示 */
.lookup-tip { padding: 10px 0 2px; font-size: 11px; color: #767676; line-height: 1.5; }
.scope-warn { margin: 0 0 12px; background: #fff6ec; border: 1px solid #ffd8ac; border-radius: 10px; padding: 10px 14px; font-size: 12px; color: #a35a00; }

.toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%,-50%); background: rgba(17,17,17,.92); color: #fff; font-size: 14px; padding: 12px 22px; border-radius: 10px; z-index: 99; max-width: 80%; text-align: center; }

/* 顾客端：低库存提示（店长手动限量后剩不多时显示） */
.prod-left { margin-top: 5px; display: inline-block; font-size: 11px; font-weight: 700; color: #c8332a; background: #fdeceb; padding: 2px 8px; border-radius: 999px; }

/* ── 子页面顶部返回条（结算页 / 取餐号页 / 我的订单页）───────── */
/* 贴顶的返回条同样要让开刘海 / 灵动岛 */
.back-bar {
  position: sticky; top: 0; z-index: 30;
  background: #fff; border-bottom: 1px solid #f0f0f0;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
}
.back-bar-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 600; color: #333; text-decoration: none;
  padding: 6px 14px 6px 10px; border-radius: 999px; background: #f5f5f5;
}
.back-bar-btn:active { background: #e8e8e8; }

/* ── 取货方式选择（送上门 / 到店自取）────────── */
.pick-chips { display: flex; gap: 8px; flex: 1; }
.pick-chip {
  flex: 1; text-align: center; padding: 11px 0; border-radius: 10px;
  border: 1px solid #e0e0e0; font-size: 15px; color: #666; background: #fff;
  transition: all .15s;
}
.pick-chip.on { background: #111; color: #fff; border-color: #111; font-weight: 700; }
.pickup-tip {
  margin: 0 0 12px; padding: 11px 14px; border-radius: 10px;
  background: #eef6ff; color: #33628f; font-size: 13px; line-height: 1.6;
}

/* ── 自取点（商家后台配置的自取地址）────────── */
.pickup-point-box {
  background: #fff; border: 1px solid #f2f2f2; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px;
}
.pickup-point-box.pickable { cursor: pointer; }
.pickup-point-box.pickable:active { background: #fafafa; }
.pp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pp-label { font-size: 13px; color: #767676; }
.pp-arrow { font-size: 18px; color: #ccc; line-height: 1; }
.pp-name { font-size: 15px; font-weight: 700; color: #111; }
.pp-addr { font-size: 13px; color: #666; line-height: 1.6; margin-top: 3px; }
.pp-none { font-size: 14px; color: #767676; }
.pp-item-name { font-size: 15px; font-weight: 700; color: #111; }
.pp-item-addr { font-size: 12px; color: #767676; line-height: 1.5; margin-top: 2px; }

/* ─────────────────────────────────────────────────────────────
   iOS 适配 · 最小点击热区 44×44（iOS HIG）
   只加伪元素扩大热区，不动元素本身的 width/height/padding（会撑破布局）。
   点击伪元素 → 事件冒泡回按钮本身 → 原来的 onclick 照常触发。

   ★ 这里刻意「不写」pointer-events，让伪元素继承宿主元素的取值：
     · 正常态宿主是 auto → 扩大的热区真的可点；
     · 禁用态 JS 给宿主写 style.pointerEvents='none'（禁用三件套之一）
       → 伪元素继承到 none → 扩大的热区一起失效。
     如果这里写死 pointer-events:auto，会覆盖掉宿主的 none，
     售罄商品的加号就会「看起来禁用了但还能点」。

   ★ 相邻热区不能互相吃点击，逐个核对过间距：
     .step-btn 两个相距 50px（22 + 28 数字 + 22），.qty-btn 相距 98px，
     都 > 44px，不会重叠。
   ───────────────────────────────────────────────────────────── */
.quick-add, .step-btn, .qty-btn, .sheet-close, .clear-btn, .back-btn { position: relative; }
.quick-add::after, .step-btn::after, .qty-btn::after, .sheet-close::after,
.back-btn::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 44px; height: 44px;
}
/* 「关闭」「清空」挨得很近（中心相距约 34px），各给一块 44×44 的正方形
   会重叠约 10px —— 靠 DOM 靠后的「清空」会赢，点「闭」字右半边会清空购物车。
   所以这两个只往上往下扩，高度到 44px，宽度不超出文字本身，横向零重叠。 */
.clear-btn::after {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 100%; height: 44px;
}
/* 购物车角标不给热区：角标是计数，不是控件（真正能点的是 .cart-left，本来就很大）。
   给它加 44×44 会有一块区域伸到底栏上方的商品列表上，
   点商品会变成「打开购物车」——把别人的点击吃掉。 */
/* 店员端：.act / .sw 的本体样式写在 staff.html 的页内 <style> 里，
   伪元素补在共享样式表里，两个页面都生效。
   .sw 已经有 ::after（白色滑块），所以这里用 ::before 免得打架。 */
.act { position: relative; }
.act::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 44px; height: 44px;
}
.sw::before, .st-sw-big::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 44px; height: 44px;
}

/* ─────────────────────────────────────────────────────────────
   可访问性 · 焦点可见
   之前全站没有 :focus-visible，input/textarea 又被 outline:none 干掉，
   键盘用户完全看不到焦点在哪。
   鼠标点击不画焦点环（:focus-visible 的默认行为），键盘 Tab 才画。
   对比度：#111 对白底 16.9:1，远超 WCAG AA 的 4.5:1。
   注意：现代浏览器的 outline 会自动跟随元素的 border-radius，
   所以这里不写死 border-radius —— 写死会把胶囊按钮压成方角。
   ───────────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
/* 用 <div> 冒充按钮的元素（正在补 role="button" / tabindex="0" 的那些） */
[role="button"]:focus-visible,
[tabindex]:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
/* 深色底上的元素：黑色焦点环看不见，换成白色 */
.login [role="button"]:focus-visible,
.login input:focus-visible,
.qr-saver [role="button"]:focus-visible,
.qr-save-close:focus-visible,
.code-card:not(.ready) [role="button"]:focus-visible,
.code-card:not(.ready) .code-copy:focus-visible { outline-color: #fff; }
/* staff.html 页内 .fld-i:focus{outline:0} 优先级更高，这里把焦点环补回来 */
input.fld-i:focus-visible, select.fld-i:focus-visible, textarea.fld-i:focus-visible {
  outline: 2px solid #111; outline-offset: 2px;
}

/* ── 动效可关闭（系统里开了「减弱动态效果」）────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 仅供读屏软件读取，视觉上隐藏 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ─────────────────────────────────────────────────────────────
   店员端补充修正
   staff.html 的页内 <style> 排在 <link> 之后，同优先级会盖掉本文件，
   所以这里用 body 前缀提高优先级，补上 iOS / 可访问性缺的几条。
   ───────────────────────────────────────────────────────────── */
/* 登录页满屏：100vh 在 iOS 上是「地址栏收起时的最大视口」 */
body .login { min-height: 100vh; min-height: 100dvh; }
/* 店员端顶栏 / 底部保存条：让开刘海与 home indicator */
body .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
body .save-bar { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
/* 店员端收款弹层：dvh 兜住地址栏 */
body .pay-panel { max-height: 92vh; max-height: 92dvh; }
/* iOS 聚焦缩放：表单控件字号一律不小于 16px（页内 <style> 里有 12~15px 的） */
body input, body textarea, body select { font-size: 16px !important; }
