/* ============================================================
   麦当劳点餐助手 · 品牌样式与响应式布局
   品牌色：麦当劳红 #DA291C / 麦当劳黄 #FFC72C
   ============================================================ */

:root {
  --red: #da291c;
  --red-dark: #ae1f14;
  --red-light: #fdeceb;
  --yellow: #ffc72c;
  --yellow-dark: #f5b800;
  --yellow-light: #fff6dd;
  --ink: #1f1f1f;
  --ink-2: #4d4d4d;
  --ink-3: #8a8a8a;
  --line: #ececec;
  --bg: #f5f5f5;
  --card: #ffffff;
  --green: #07c160;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.18);
  --radius: 16px;
  --header-h: 60px;
  --nav-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; }
em { font-style: normal; }

/* 键盘焦点可见性：:focus-visible 仅在键盘导航时触发，不干扰鼠标操作的视觉。
   不覆盖 border-radius——outline 会自动跟随元素自身圆角（如圆形麦克风按钮） */
:focus-visible {
  outline: 2px solid var(--yellow-dark);
  outline-offset: 2px;
}

/* ---------- 顶部导航 ---------- */
.app-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.arches { width: 40px; height: 30px; color: var(--yellow); filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: 0.5px; }
.brand-name em { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }

.store-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--yellow-light); border: 1px solid #ffe9b0;
  color: #7a5b00; font-size: 13px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; max-width: 300px;
  transition: box-shadow .2s;
}
.store-pill:hover { box-shadow: var(--shadow-sm); }
.store-pill-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.store-pill-caret { color: #b98a00; font-size: 10px; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mode-badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff; white-space: nowrap;
}
.mode-badge.live { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.mode-badge.demo { background: #fff7ed; color: #c2410c; border-color: #ffedd5; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; box-shadow: var(--shadow-sm);
  transition: transform .15s, background .2s;
}
.icon-btn:hover { background: var(--red-dark); transform: scale(1.05); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.recording { background: var(--yellow); color: var(--ink); animation: pulse 1.2s infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 199, 44, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(255, 199, 44, 0); }
}

/* ---------- 主体布局 ---------- */
.app-body {
  max-width: 1280px; margin: 0 auto; padding: 16px 16px 96px;
  display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start;
}
.app-main { min-width: 0; }
.cart-rail {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--header-h) - 32px); display: flex; flex-direction: column; overflow: hidden;
}

/* ---------- 移动端底部导航 ---------- */
.bottom-nav { display: none; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 700; border-radius: 999px; padding: 10px 20px; font-size: 15px;
  transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(218, 41, 28, 0.35); }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { background: #d9a49f; box-shadow: none; cursor: not-allowed; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-dark); }
.btn-ghost { background: #f2f2f2; color: var(--ink-2); }
.btn-ghost:hover { background: #e8e8e8; }
.btn-outline { border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); }
.btn-outline:hover { border-color: #d5d5d5; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: #f4f4f4; color: var(--ink-2); white-space: nowrap;
}
.chip-red { background: var(--red-light); color: var(--red); }
.chip-yellow { background: var(--yellow-light); color: #8a6100; }
.chip-green { background: #e7f8ee; color: #067647; }

.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- 菜单视图 ---------- */
.menu-hero {
  background: linear-gradient(120deg, var(--red) 0%, #f04331 60%, var(--yellow-dark) 130%);
  border-radius: var(--radius); padding: 22px 24px; color: #fff; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.menu-hero::after {
  content: "🍔"; position: absolute; right: 14px; bottom: -18px; font-size: 92px; opacity: 0.22;
  transform: rotate(-12deg);
}
.menu-hero h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.menu-hero p { font-size: 13px; opacity: 0.92; max-width: 70%; }
.menu-hero .hero-quick { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-quick button {
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(4px); transition: background .2s;
}
.hero-quick button:hover { background: rgba(255, 255, 255, 0.32); }

.search-bar {
  display: flex; align-items: center; gap: 8px; background: var(--card);
  border-radius: 999px; padding: 10px 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px;
  border: 1.5px solid transparent; transition: border-color .2s;
}
.search-bar:focus-within { border-color: var(--yellow); }
.search-bar input { flex: 1; border: none; outline: none; font-size: 15px; font-family: inherit; background: none; min-width: 0; }
.search-bar .search-mic {
  width: 32px; height: 32px; border-radius: 50%; background: var(--yellow-light);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.search-bar .search-mic svg { width: 15px; height: 15px; color: #8a6100; }

.cat-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 6px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--card); color: var(--ink-2); border: 1.5px solid var(--line); transition: all .18s;
}
.cat-chip.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(218,41,28,.3); }

.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.product-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; cursor: pointer; position: relative;
  transition: transform .18s, box-shadow .18s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card .p-img { aspect-ratio: 1; background: #fafafa; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .p-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card .p-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .p-name { font-size: 14px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.product-card .p-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.product-card .p-price-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.p-price { color: var(--red); font-weight: 800; font-size: 17px; }
.p-price small { font-size: 11px; font-weight: 600; }
.p-origin { font-size: 11px; color: var(--ink-3); text-decoration: line-through; }
.p-add {
  width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--ink);
  font-size: 20px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1; transition: transform .15s, background .2s;
}
/* 商品卡 overflow:hidden 会裁剪外凸焦点环，卡内按钮改用内敛偏移 */
.product-card .p-add:focus-visible { outline-offset: -3px; }
.p-add:hover { background: var(--yellow-dark); transform: scale(1.1); }
.p-add:active { transform: scale(0.9); }

.menu-section-title { font-size: 17px; font-weight: 800; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.menu-section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--yellow); }

.empty-state { text-align: center; padding: 48px 16px; color: var(--ink-3); }
.empty-state .empty-emoji { font-size: 44px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

/* ---------- 购物车 ---------- */
.cart-head {
  padding: 16px 16px 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.cart-head h2 { font-size: 16px; font-weight: 800; }
.cart-head .cart-count { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.cart-clear { font-size: 12px; color: var(--ink-3); padding: 4px 8px; border-radius: 8px; }
.cart-clear:hover { color: var(--red); background: var(--red-light); }
.cart-list { flex: 1; overflow-y: auto; padding: 8px 16px; }
.cart-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #fafafa; flex-shrink: 0; }
.cart-item .ci-body { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 14px; font-weight: 700; }
.cart-item .ci-opt { font-size: 11px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.cart-item .ci-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.ci-price { color: var(--red); font-weight: 800; font-size: 15px; }
.qty-ctrl { display: inline-flex; align-items: center; gap: 8px; }
.qty-ctrl button {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--ink-2);
  transition: all .15s; line-height: 1;
}
.qty-ctrl button:hover { border-color: var(--red); color: var(--red); }
.qty-ctrl .qty-num { font-size: 14px; font-weight: 700; min-width: 16px; text-align: center; }
.cart-foot { padding: 14px 16px; border-top: 1px solid var(--line); flex-shrink: 0; background: #fff; }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.cart-summary-row.total { font-size: 15px; font-weight: 800; color: var(--ink); margin: 8px 0 12px; }
.cart-summary-row.total .cart-total-price { color: var(--red); font-size: 20px; }
.cart-hint { font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 8px; }

/* ---------- 弹层（详情 / 门店 / 通用） ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s ease;
}
.modal-box {
  background: var(--card); width: 100%; max-width: 560px; max-height: 92vh;
  border-radius: 20px 20px 0 0; overflow-y: auto; animation: slideUp .22s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }

.detail-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #fafafa; }
.detail-body { padding: 18px 20px 24px; }
.detail-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-price-row { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.detail-price { color: var(--red); font-size: 26px; font-weight: 800; }
.detail-price small { font-size: 14px; }
.detail-origin { color: var(--ink-3); text-decoration: line-through; font-size: 14px; }
.detail-desc { font-size: 13px; color: var(--ink-2); line-height: 1.7; margin: 8px 0 4px; }
.detail-kcal { font-size: 12px; color: #067647; background: #e7f8ee; display: inline-block; padding: 3px 10px; border-radius: 999px; margin-top: 4px; }

.round-group { margin-top: 18px; }
.round-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.round-title .round-badge { font-size: 10px; font-weight: 700; color: #fff; background: var(--ink-3); border-radius: 6px; padding: 2px 6px; }
.round-choices { display: flex; flex-direction: column; gap: 8px; }
.round-choice {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .15s;
}
.round-choice:hover { border-color: #ffd9ad; }
.round-choice.selected { border-color: var(--red); background: var(--red-light); }
.round-choice .rc-radio {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d0d0d0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s;
}
.round-choice.selected .rc-radio { border-color: var(--red); }
.round-choice.selected .rc-radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.round-choice .rc-name { font-size: 14px; font-weight: 600; flex: 1; }
.round-choice .rc-diff { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.round-choice.selected .rc-diff { color: var(--red); }

.mod-group { margin-top: 8px; padding: 10px 12px; background: #fafafa; border-radius: 10px; }
.mod-group .mg-title { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.mod-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-opt {
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); transition: all .15s;
}
.mod-opt.selected { border-color: var(--yellow); background: var(--yellow-light); color: #8a6100; }
.mod-opt:disabled { opacity: .45; cursor: not-allowed; }

.detail-foot {
  position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  display: flex; gap: 12px; align-items: center;
}
.detail-foot .qty-ctrl { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 10px; }
.detail-foot .qty-ctrl button { border: none; }
.detail-foot .btn { flex: 1; }

/* ---------- 结算流程 ---------- */
.checkout-wrap { max-width: 760px; margin: 0 auto; }
.checkout-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 14px; }
.checkout-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.steps { display: flex; margin-bottom: 16px; }
.step { flex: 1; text-align: center; font-size: 12px; color: var(--ink-3); position: relative; padding-top: 26px; }
.step::before {
  content: attr(data-num); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%; background: #e8e8e8; color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step::after {
  content: ""; position: absolute; top: 11px; left: calc(-50% + 14px); right: calc(50% + 14px);
  height: 2px; background: #e8e8e8;
}
.step:first-child::after { display: none; }
.step.active { color: var(--red); font-weight: 700; }
.step.active::before { background: var(--red); }
.step.done { color: var(--green); }
.step.done::before { content: "✓"; background: var(--green); }
.step.active::after, .step.done::after { background: var(--green); }

.co-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.co-item:last-child { border-bottom: none; }
.co-item img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.co-item .coi-name { font-size: 14px; font-weight: 700; }
.co-item .coi-opt { font-size: 11px; color: var(--ink-3); }
.co-item .coi-price { margin-left: auto; font-weight: 800; font-size: 14px; }

.takeway-row { display: flex; gap: 10px; }
.takeway-opt {
  flex: 1; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; text-align: center;
  cursor: pointer; transition: all .15s;
}
.takeway-opt.selected { border-color: var(--red); background: var(--red-light); }
.takeway-opt .tw-title { font-size: 14px; font-weight: 700; }
.takeway-opt .tw-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.coupon-banner {
  background: linear-gradient(120deg, #fff6dd, #ffefc4); border: 1px solid #ffe09a;
  border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.coupon-banner .cb-icon { font-size: 26px; }
.coupon-banner .cb-text { flex: 1; }
.coupon-banner .cb-title { font-size: 14px; font-weight: 800; color: #8a6100; }
.coupon-banner .cb-sub { font-size: 12px; color: #a07c2a; margin-top: 2px; }

.coupon-list { display: flex; flex-direction: column; gap: 10px; }
.coupon-card {
  display: flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: all .15s; background: #fff;
}
.coupon-card:hover { border-color: #ffd9ad; }
.coupon-card.selected { border-color: var(--red); box-shadow: 0 4px 14px rgba(218,41,28,.12); }
.coupon-card.disabled { opacity: .55; cursor: not-allowed; }
.coupon-card .cc-left {
  width: 96px; flex-shrink: 0; background: linear-gradient(160deg, var(--red), #f04331);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 8px; position: relative;
}
.coupon-card .cc-left::after { content: ""; position: absolute; right: -5px; top: 0; bottom: 0; width: 10px;
  background: radial-gradient(circle at 0 5px, transparent 4.5px, #fff 5px) 0 0/10px 10px repeat-y; }
.cc-amount { font-size: 22px; font-weight: 800; line-height: 1.1; }
.cc-amount small { font-size: 12px; }
.cc-desc { font-size: 10px; opacity: .9; margin-top: 3px; text-align: center; }
.coupon-card .cc-body { flex: 1; padding: 12px 14px; min-width: 0; }
.cc-title { font-size: 14px; font-weight: 800; }
.cc-meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }
.cc-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.cc-check { align-self: center; padding-right: 14px; }
.cc-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d0d0d0; display: inline-flex; align-items: center; justify-content: center; }
.coupon-card.selected .cc-radio { border-color: var(--red); }
.coupon-card.selected .cc-radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }

.price-detail { display: flex; flex-direction: column; gap: 8px; }
.price-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.price-line .pl-value { font-weight: 700; color: var(--ink); }
.price-line.discount .pl-value { color: var(--red); }
.price-line.grand { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 15px; font-weight: 800; color: var(--ink); }
.price-line.grand .pl-value { color: var(--red); font-size: 22px; }
.price-note { font-size: 11px; color: var(--ink-3); line-height: 1.6; background: #fafafa; border-radius: 8px; padding: 8px 10px; }

.order-success { text-align: center; padding: 28px 16px; }
.order-success .os-icon { font-size: 56px; margin-bottom: 8px; }
.order-success h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.order-success .os-code { font-size: 30px; font-weight: 800; color: var(--red); letter-spacing: 4px; margin: 12px 0 4px; }
.order-success p { font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.order-success .os-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* ---------- 订单列表 ---------- */
.order-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 12px; }
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-card .oc-store { font-size: 14px; font-weight: 800; }
.order-card .oc-status { font-size: 12px; font-weight: 700; color: var(--green); }
.order-card .oc-status.demo { color: #c2410c; }
.order-card .oc-items { font-size: 12px; color: var(--ink-2); line-height: 1.8; }
.order-card .oc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.order-card .oc-time { font-size: 11px; color: var(--ink-3); }
.order-card .oc-total { color: var(--red); font-weight: 800; font-size: 16px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  background: rgba(31, 31, 31, 0.92); color: #fff; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-md);
  animation: toastIn .25s ease, toastOut .25s ease 2.2s forwards; white-space: nowrap;
}
.toast.success { background: rgba(7, 193, 96, 0.95); }
.toast.error { background: rgba(218, 41, 28, 0.95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* ---------- 语音浮层 ---------- */
.voice-overlay {
  position: fixed; inset: 0; background: rgba(20, 20, 20, 0.72); z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(6px); animation: fadeIn .2s ease;
}
.voice-overlay[hidden] { display: none; }
.voice-panel {
  background: var(--card); border-radius: 24px; padding: 32px 24px 20px; width: 100%; max-width: 400px;
  text-align: center; box-shadow: var(--shadow-lg); animation: slideUp .25s ease;
}
.voice-orb {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(160deg, var(--yellow), var(--yellow-dark));
  display: flex; align-items: center; justify-content: center; font-size: 34px;
  box-shadow: 0 0 0 0 rgba(255, 199, 44, 0.45); animation: orbPulse 1.6s infinite;
}
.voice-orb.thinking { animation: none; background: linear-gradient(160deg, #e8e8e8, #d0d0d0); }
@keyframes orbPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 199, 44, 0.45); }
  70% { box-shadow: 0 0 0 22px rgba(255, 199, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 199, 44, 0); }
}
.voice-status { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.voice-transcript { font-size: 17px; font-weight: 800; margin-top: 10px; min-height: 26px; }
.voice-reply { font-size: 13px; color: var(--ink-2); line-height: 1.7; margin-top: 8px; min-height: 22px; }
.voice-suggest { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.voice-suggest button {
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: var(--yellow-light); color: #8a6100; border: 1px solid #ffe09a;
}
.voice-actions { margin-top: 18px; display: flex; gap: 10px; justify-content: center; }

/* ---------- 骨架屏 ---------- */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 响应式：平板 / 手机 ---------- */
@media (max-width: 1023px) {
  .app-body { grid-template-columns: 1fr; padding: 12px 12px calc(var(--nav-h) + 24px); }
  .cart-rail { display: none; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a, .bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10px; font-weight: 600; color: var(--ink-3);
  }
  .bottom-nav a.active, .bottom-nav a:focus { color: var(--red); }
  .bottom-nav svg { width: 21px; height: 21px; }
  .nav-cart-wrap { position: relative; display: inline-flex; }
  .cart-badge {
    position: absolute; top: -5px; right: -9px; background: var(--red); color: #fff;
    font-size: 9px; font-weight: 800; min-width: 15px; height: 15px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; font-style: normal;
  }
  .brand-name em { display: none; }
  .store-pill { padding: 6px 10px; font-size: 12px; }
  .store-pill-text { max-width: 108px; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .menu-hero { padding: 18px; }
  .menu-hero p { max-width: 100%; }
  .modal-mask { align-items: flex-end; }
  .checkout-card { padding: 16px; }
}

@media (max-width: 400px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 小屏手机：头部紧凑化，防止 brand+门店 pill+模式徽章+麦克风 超出视口导致横向滚动（375px 实测溢出 33px） */
@media (max-width: 480px) {
  .header-inner { padding: 0 8px; gap: 6px; }
  .arches { width: 30px; height: 23px; }
  .brand-name { font-size: 15px; }
  .store-pill { padding: 5px 8px; gap: 4px; }
  .store-pill-icon { font-size: 11px; }
  .store-pill-text { max-width: 56px; }
  .mode-badge { font-size: 10px; padding: 3px 7px; }
  .icon-btn { width: 34px; height: 34px; }
  .store-manual-row { flex-wrap: wrap; }
  #manual-city { max-width: none; flex-basis: 40%; }
  .store-manual-row .btn { flex: 1; }
}

/* 桌面端弹层居中 */
@media (min-width: 1024px) {
  .modal-mask { align-items: center; padding: 24px; }
  .modal-box { border-radius: 20px; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   实时定位 · 门店选择器
   ============================================================ */
.store-picker-body { max-width: 560px; }

.geo-panel { margin-top: 12px; }
.geo-locate-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.geo-hint { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 8px; line-height: 1.6; }
.geo-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.geo-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: geo-spin 0.8s linear infinite; display: inline-block;
}
@keyframes geo-spin { to { transform: rotate(360deg); } }

.geo-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--yellow-light); border: 1px solid #ffe3a3;
  border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600;
}
.geo-chip-label { flex: 1; color: var(--ink); }
.geo-chip-acc { font-size: 11px; font-weight: 500; color: var(--ink-3); }

.geo-alert {
  border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7;
  border: 1px solid; margin-bottom: 4px;
}
.geo-alert.error { background: var(--red-light); border-color: #f6c6c1; color: #8c1a11; }
.geo-alert.warn { background: var(--yellow-light); border-color: #ffe3a3; color: #7a5b00; }
.geo-guide { color: var(--ink-2); }

/* 演示模式等诚实降级说明 */
.geo-note {
  margin-top: 10px; font-size: 12px; line-height: 1.6; color: #7a5b00;
  background: var(--yellow-light); border: 1px dashed #ffe3a3;
  border-radius: 10px; padding: 8px 10px;
}

/* 手动搜索兜底 */
.store-manual {
  margin-top: 14px; padding: 12px; background: #fafafa;
  border: 1px solid var(--line); border-radius: 12px;
}
.store-manual-title { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.store-manual-row { display: flex; gap: 8px; }
.store-input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font-size: 13px; font-family: inherit; background: #fff; color: var(--ink);
}
.store-input:focus { outline: none; border-color: var(--yellow-dark); box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.25); }
#manual-city { max-width: 110px; }

/* 距离雷达 */
.store-radar { margin-top: 14px; }
.store-radar-title { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.store-radar-title span { font-weight: 400; color: var(--ink-3); }
.store-radar svg { width: 100%; max-width: 340px; display: block; margin: 0 auto; }

/* 门店列表距离徽章 */
.store-list { margin-top: 12px; }
.store-dist {
  font-size: 12px; font-weight: 800; color: var(--red);
  background: var(--red-light); border-radius: 999px; padding: 3px 9px;
  flex-shrink: 0; align-self: flex-start;
}
.round-choice.selected .store-dist { background: #fff; }
