/* 从原型 waimai/index.html 复制过来的样式 */
  :root {
    --brand: #ff6a00;
    --brand-soft: #fff3ea;
    --brand-grad: linear-gradient(135deg, #ffb01f 0%, #ff7a00 55%, #ff4f1a 100%);
    --merchant: #2f6bff;
    --merchant-soft: #edf2ff;
    --merchant-grad: linear-gradient(135deg, #5b8cff 0%, #2f6bff 60%, #1f4fd8 100%);
    --rider: #0e9f6e;
    --rider-soft: #e5f7ef;
    --rider-grad: linear-gradient(135deg, #2fcf8f 0%, #10a571 60%, #08865b 100%);
    --text: #1f2329;
    --sub: #8a8f99;
    --line: #eef0f3;
    --bg: #f4f5f7;
    --card: #fff;
    --red: #f2463d;
    --green: #19a35b;
    --radius: 16px;
    --shadow-sm: 0 1px 2px rgba(20, 30, 50, .04), 0 2px 10px rgba(20, 30, 50, .05);
    --shadow-md: 0 8px 24px rgba(20, 30, 50, .10);
    --shadow-lg: 0 16px 40px rgba(20, 30, 50, .18);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #e9ebef radial-gradient(circle at 20% 0%, #ffe9d6 0, transparent 40%) fixed;
    color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased;
  }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; transition: transform .12s, opacity .2s, background .2s; }
  button:active:not(:disabled) { transform: scale(.96); }
  button:disabled { cursor: not-allowed; }
  input, textarea, select { font: inherit; color: inherit; }
  .app {
    max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg);
    position: relative; padding-bottom: 84px; box-shadow: 0 0 60px rgba(0,0,0,.08);
  }
  .app.enter > * { animation: fadeUp .28s ease both; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.92); } }
  @keyframes fadeIn { from { opacity: 0; } }
  @keyframes slideUp { from { transform: translate(-50%, 100%); } }

  /* ========== 通用 ========== */
  .card { background: var(--card); margin: 12px; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
  .card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
  .navbar {
    display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 52px;
    background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line);
  }
  .navbar .back { width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; display: grid; place-items: center; }
  .navbar .back:hover { background: rgba(0,0,0,.05); }
  .navbar h2 { font-size: 17px; flex: 1; font-weight: 700; }
  .navbar.center h2 { text-align: center; }
  .navbar.m { background: var(--merchant); color: #fff; border: none; }
  .navbar.r { background: var(--rider); color: #fff; border: none; }
  .section-title { padding: 18px 16px 4px; font-weight: 700; font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
  .section-title small { color: var(--sub); font-weight: 400; font-size: 12px; }
  .meta { color: var(--sub); font-size: 12px; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
  .tag { font-size: 11px; color: var(--red); background: #fff0ef; padding: 1px 6px; border-radius: 4px; }
  .tag.g { color: var(--green); background: #eaf8f0; }
  .empty { text-align: center; color: var(--sub); padding: 56px 20px; line-height: 1.9; }
  .empty .big { font-size: 48px; display: block; margin-bottom: 6px; }
  .price { color: var(--red); font-weight: 700; font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif; }
  .price small { font-size: 12px; margin-right: 1px; }
  .demo-note { text-align: center; color: #b4b8bf; font-size: 11px; padding: 14px 0 22px; }
  .field { display: block; margin-bottom: 12px; }
  .field > span { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
  .field input, .field textarea, .field select {
    width: 100%; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; outline: none;
    background: #f5f6f8; transition: .2s;
  }
  .field input:focus, .field textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(255,106,0,.12); }
  .m-page .field input:focus { border-color: var(--merchant); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
  .row2 { display: flex; gap: 10px; }
  .row2 > * { flex: 1; min-width: 0; }
  .kv { display: flex; justify-content: space-between; padding: 6px 0; gap: 12px; }
  .kv > span:last-child { text-align: right; }
  .kv .k { color: var(--sub); flex-shrink: 0; }
  .kv.total { border-top: 1px dashed #e3e5e8; margin-top: 8px; padding-top: 12px; font-weight: 700; align-items: baseline; }
  .discount { color: var(--red); }
  .btn-primary {
    display: block; width: calc(100% - 24px); margin: 16px 12px; padding: 14px; border-radius: 26px;
    background: var(--brand-grad); color: #fff; font-size: 16px; font-weight: 700;
    box-shadow: 0 6px 16px rgba(255,106,0,.3);
  }
  .btn-primary.m { background: var(--merchant-grad); box-shadow: 0 6px 16px rgba(47,107,255,.3); }
  .btn-ghost {
    display: block; width: calc(100% - 24px); margin: 10px 12px; padding: 13px; border-radius: 26px;
    background: var(--card); color: #555; box-shadow: var(--shadow-sm);
  }
  .btn {
    padding: 8px 18px; border-radius: 18px; font-size: 13px; font-weight: 600;
    background: var(--merchant); color: #fff;
  }
  .btn.line { background: #fff; color: #555; box-shadow: inset 0 0 0 1px #dcdfe4; font-weight: 500; }
  .btn.sm { padding: 5px 12px; font-size: 12px; }
  .btn.green { background: var(--green); }
  .btn.r { background: var(--rider); }
  .btn.big { padding: 11px 28px; font-size: 15px; border-radius: 22px; }
  .btn:disabled { background: #d5d8dd; color: #fff; box-shadow: none; }
  .badge {
    position: absolute; top: -5px; right: -7px; background: var(--red); color: #fff; font-size: 10px;
    min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
    font-style: normal; font-weight: 600; box-shadow: 0 0 0 2px #fff; line-height: 1;
  }

  /* ========== 用户端：首页 ========== */
  .home-top { background: var(--brand-grad); color: #fff; padding: 14px 16px 18px; position: relative; overflow: hidden; }
  .home-top::after {
    content: ''; position: absolute; right: -40px; top: -50px; width: 180px; height: 180px; border-radius: 50%;
    background: rgba(255,255,255,.12);
  }
  .brand-row { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
  .logo-mark {
    width: 30px; height: 30px; border-radius: 9px; background: #fff; color: var(--brand);
    display: grid; place-items: center; font-weight: 900; font-size: 17px; box-shadow: 0 3px 8px rgba(0,0,0,.12);
  }
  .brand-row b { font-size: 18px; letter-spacing: 1px; }
  .addr-btn {
    margin-left: auto; font-size: 13px; background: rgba(255,255,255,.2); padding: 5px 10px; border-radius: 14px;
    max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .search-wrap {
    margin-top: 14px; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 22px;
    padding: 0 6px 0 14px; position: relative; z-index: 1; box-shadow: 0 6px 16px rgba(180,60,0,.18);
  }
  .search-wrap input { flex: 1; border: none; outline: none; padding: 11px 0; font-size: 14px; background: none; min-width: 0; }
  .search-wrap .s-btn { background: var(--brand-grad); color: #fff; padding: 6px 14px; border-radius: 16px; font-size: 13px; font-weight: 600; }
  .banners { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 12px 4px; scrollbar-width: none; }
  .banners::-webkit-scrollbar { display: none; }
  .banner {
    flex: 0 0 82%; scroll-snap-align: start; height: 104px; border-radius: var(--radius); padding: 16px 18px;
    color: #fff; position: relative; overflow: hidden; text-align: left; box-shadow: var(--shadow-sm);
  }
  .banner b { font-size: 19px; display: block; }
  .banner span { font-size: 12px; opacity: .92; display: block; margin-top: 4px; }
  .banner i { font-style: normal; display: inline-block; margin-top: 10px; font-size: 12px; background: rgba(255,255,255,.25); padding: 3px 10px; border-radius: 12px; }
  .banner .art { position: absolute; right: 10px; bottom: -6px; font-size: 68px; transform: rotate(-8deg); filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
  .cats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--card); margin: 12px; padding: 14px 6px 10px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
  .cat { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #555; }
  .cat .ico {
    width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
    background: #f5f6f8; transition: .2s;
  }
  .cat.active { color: var(--brand); font-weight: 700; }
  .cat.active .ico { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
  .sorts { display: flex; gap: 8px; padding: 10px 12px 2px; overflow-x: auto; scrollbar-width: none; }
  .sorts button { padding: 6px 14px; border-radius: 16px; font-size: 13px; background: var(--card); color: #555; white-space: nowrap; box-shadow: var(--shadow-sm); }
  .sorts button.active { background: var(--text); color: #fff; }

  .store {
    display: flex; gap: 12px; background: var(--card); margin: 12px; padding: 14px;
    border-radius: var(--radius); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
  }
  .store:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
  .store.closed { filter: grayscale(.7); opacity: .65; }
  .store .pic {
    width: 82px; height: 82px; border-radius: 14px; display: grid; place-items: center;
    font-size: 44px; flex-shrink: 0; position: relative; overflow: hidden;
  }
  .closed-mark {
    position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff;
    font-size: 11px; text-align: center; padding: 3px 0;
  }
  .store .info { flex: 1; min-width: 0; }
  .store .name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rate { color: #ff8a00; font-weight: 700; }
  .eta { margin-left: auto; color: #555; }

  /* ========== 用户端：店铺页 ========== */
  .store-cover { height: 128px; position: relative; overflow: hidden; }
  .store-cover .art { position: absolute; right: -10px; top: -14px; font-size: 130px; opacity: .35; transform: rotate(-12deg); }
  .store-cover .back-fab {
    position: absolute; left: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.9); font-size: 22px; display: grid; place-items: center; box-shadow: var(--shadow-sm);
  }
  .store-info { margin: -54px 12px 0; position: relative; background: var(--card); border-radius: var(--radius); padding: 14px 16px 16px; box-shadow: var(--shadow-md); }
  .store-info .row { display: flex; gap: 12px; align-items: flex-end; }
  .store-info .logo { width: 68px; height: 68px; border-radius: 16px; display: grid; place-items: center; font-size: 38px; margin-top: -34px; border: 3px solid #fff; box-shadow: var(--shadow-sm); flex-shrink: 0; }
  .store-info .nm { font-size: 20px; font-weight: 800; }
  .store-info .facts { display: flex; margin-top: 14px; background: #f8f9fb; border-radius: 12px; padding: 10px 0; }
  .store-info .facts div { flex: 1; text-align: center; font-size: 11px; color: var(--sub); }
  .store-info .facts div + div { border-left: 1px solid #e8eaee; }
  .store-info .facts b { display: block; font-size: 15px; color: var(--text); margin-bottom: 2px; }
  .notice { background: #fff8e6; color: #a86a00; padding: 10px 14px; font-size: 13px; margin: 12px 12px 0; border-radius: 12px; }
  .menu { display: flex; background: var(--card); margin-top: 12px; min-height: 60vh; border-radius: var(--radius) var(--radius) 0 0; overflow: visible; }
  .menu-side { width: 86px; background: #f7f8fa; flex-shrink: 0; position: sticky; top: 0; align-self: flex-start; border-top-left-radius: var(--radius); overflow: hidden; }
  .menu-side button { display: block; width: 100%; padding: 16px 6px; font-size: 13px; text-align: center; color: #666; position: relative; }
  .menu-side button.active { background: var(--card); color: var(--text); font-weight: 700; }
  .menu-side button.active::before { content: ''; position: absolute; left: 0; top: 30%; bottom: 30%; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
  .menu-main { flex: 1; padding: 0 14px 14px; min-width: 0; }
  .group-title { font-size: 13px; color: var(--sub); padding: 14px 0 4px; font-weight: 600; }
  .dish { display: flex; gap: 12px; padding: 12px 0; }
  .dish + .dish { border-top: 1px solid var(--line); }
  .dish.sold { opacity: .45; }
  .dish .pic { width: 76px; height: 76px; border-radius: 12px; display: grid; place-items: center; font-size: 40px; flex-shrink: 0; }
  .dish .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .dish .dname { font-weight: 700; font-size: 15px; }
  .dish .desc { color: var(--sub); font-size: 12px; margin-top: 3px; }
  .dish .row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
  .dish .price { font-size: 17px; }
  .sold-label { font-size: 12px; color: var(--sub); background: #f0f1f3; padding: 3px 10px; border-radius: 10px; }
  .stepper { display: flex; align-items: center; gap: 10px; }
  .stepper button {
    width: 26px; height: 26px; border-radius: 50%; font-size: 18px; line-height: 1; font-weight: 600;
    display: grid; place-items: center;
  }
  .stepper .minus { box-shadow: inset 0 0 0 1.5px #ffb27a; color: var(--brand); }
  .stepper .plus { background: var(--brand-grad); color: #fff; box-shadow: 0 3px 8px rgba(255,106,0,.35); }
  .stepper .num { min-width: 14px; text-align: center; font-weight: 600; }

  /* 购物车条 */
  .cartbar {
    position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
    width: calc(min(480px, 100vw) - 24px); height: 56px; background: #26282c; color: #fff;
    border-radius: 28px; display: flex; align-items: center; padding-left: 76px; z-index: 20; box-shadow: var(--shadow-lg);
  }
  .cartbar .bag {
    position: absolute; left: 12px; top: -14px; width: 56px; height: 56px; border-radius: 50%;
    background: #3a3d42; display: grid; place-items: center; font-size: 26px; border: 4px solid #26282c;
  }
  .cartbar.has .bag { background: var(--brand-grad); box-shadow: 0 4px 12px rgba(255,106,0,.5); }
  .cartbar .badge { box-shadow: none; top: -4px; right: -4px; }
  .cartbar .sum { flex: 1; cursor: pointer; }
  .cartbar .sum b { font-size: 19px; }
  .cartbar .sum div { font-size: 11px; color: #9a9da3; }
  .cartbar .go { height: 100%; padding: 0 24px; border-radius: 0 28px 28px 0; background: #3a3d42; color: #8d9096; font-weight: 700; font-size: 15px; }
  .cartbar .go.ok { background: var(--brand-grad); color: #fff; }

  /* 弹层 */
  .mask { position: fixed; inset: 0; background: rgba(15,20,30,.5); z-index: 15; animation: fadeIn .2s; }
  .sheet {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100vw);
    background: var(--card); border-radius: 20px 20px 0 0; z-index: 16; padding: 0 16px 90px; max-height: 62vh; overflow: auto;
    animation: slideUp .25s ease;
  }
  .sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 12px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
  .sheet-head button { color: var(--sub); font-weight: 400; font-size: 13px; }
  .line-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 10px; }
  .line-item .n { flex: 1; font-weight: 500; }
  .dialog {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(340px, 90vw);
    max-height: 88vh; overflow: auto; animation: pop .22s ease;
    background: var(--card); border-radius: 20px; z-index: 31; padding: 24px 20px 0; line-height: 1.6; box-shadow: var(--shadow-lg);
  }
  .dialog h3 { font-size: 17px; margin-bottom: 14px; text-align: center; }
  .dialog-btns { display: flex; margin: 20px -20px 0; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); }
  .dialog-btns button { flex: 1; padding: 15px 0; color: #555; font-size: 15px; }
  .dialog-btns button.yes { color: var(--brand); font-weight: 700; border-left: 1px solid var(--line); }
  .dialog-btns button.yes.m { color: var(--merchant); }
  .dialog-btns button.yes.danger { color: var(--red); }
  .reasons { display: flex; flex-direction: column; gap: 8px; }
  .reasons button { background: #f5f6f8; border-radius: 10px; padding: 12px; text-align: left; }
  .reasons button:hover { background: #fff0ef; color: var(--red); }
  .roles { display: flex; flex-direction: column; gap: 10px; }
  .roles button { display: flex; align-items: center; gap: 14px; background: #f7f8fa; border-radius: 14px; padding: 14px; text-align: left; box-shadow: inset 0 0 0 2px transparent; }
  .roles button .i { font-size: 26px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
  .roles .u .i { background: var(--brand-grad); } .roles .m .i { background: var(--merchant-grad); } .roles .r .i { background: var(--rider-grad); }
  .roles button b { display: block; font-size: 15px; }
  .roles button span span { font-size: 12px; color: var(--sub); }
  .roles button.cur { background: #fff; }
  .roles .u.cur { box-shadow: inset 0 0 0 2px var(--brand); }
  .roles .m.cur { box-shadow: inset 0 0 0 2px var(--merchant); }
  .roles .r.cur { box-shadow: inset 0 0 0 2px var(--rider); }
  .roles .cur::after { content: '当前'; margin-left: auto; font-size: 11px; color: var(--sub); }
  .emoji-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
  .emoji-pick button { font-size: 20px; width: 36px; height: 36px; border-radius: 8px; background: #f5f6f8; }
  .emoji-pick button:hover { background: var(--merchant-soft); }

  /* ========== 用户端：结算 ========== */
  .addr-card { display: flex; gap: 12px; }
  .addr-card .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
  .addr-card .fields { flex: 1; min-width: 0; }
  .eta-row { display: flex; align-items: center; justify-content: space-between; background: #f8f9fb; border-radius: 10px; padding: 10px 12px; margin-top: 2px; font-size: 13px; }
  .eta-row b { color: var(--brand); }
  .paybar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100vw);
    background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; padding: 10px 12px 10px 18px; gap: 12px; z-index: 20; box-shadow: 0 -4px 20px rgba(0,0,0,.06);
  }
  .paybar .t { flex: 1; }
  .paybar .t .price { font-size: 24px; }
  .paybar .t > small { display: block; font-size: 11px; color: var(--red); }
  .paybar button { background: var(--brand-grad); color: #fff; font-size: 16px; font-weight: 700; padding: 13px 34px; border-radius: 24px; box-shadow: 0 6px 16px rgba(255,106,0,.3); }

  /* ========== 用户端：订单列表 / 详情 ========== */
  .order { background: var(--card); margin: 12px; border-radius: var(--radius); padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
  .order:hover { box-shadow: var(--shadow-md); }
  .order .top { display: flex; align-items: center; gap: 10px; }
  .order .top .lg { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; }
  .order .top b { flex: 1; font-size: 15px; }
  .chip { font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
  .chip.done { background: #f0f1f3; color: var(--sub); }
  .chip.cancel { background: #f0f1f3; color: #aaa; }
  .order .items { color: #666; font-size: 13px; margin: 12px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .order .bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--sub); border-top: 1px solid var(--line); padding-top: 10px; }
  .order .bottom b { color: var(--text); font-size: 15px; }

  .track { background: var(--brand-grad); padding: 0 0 60px; position: relative; }
  .track.cancel { background: linear-gradient(135deg, #b0b4bb, #8a8f99); }
  .map {
    height: 170px; position: relative; overflow: hidden;
    background:
      repeating-linear-gradient(0deg, rgba(255,255,255,.10) 0 1px, transparent 1px 28px),
      repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, transparent 1px 28px);
  }
  .map .road { position: absolute; left: 14%; right: 14%; top: 96px; border-top: 3px dashed rgba(255,255,255,.7); }
  .map .road i { position: absolute; left: 0; top: -3px; height: 3px; background: #fff; border-radius: 2px; transition: width .8s ease; }
  .pin { position: absolute; top: 64px; transform: translateX(-50%); text-align: center; color: #fff; font-size: 11px; font-weight: 600; }
  .pin .p { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: 0 6px 14px rgba(0,0,0,.18); margin-bottom: 4px; }
  .mover { position: absolute; top: 58px; transform: translateX(-50%); transition: left .8s ease; z-index: 2; text-align: center; }
  .mover .p { font-size: 34px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); animation: bob 1s ease-in-out infinite; }
  .mover .tagline { background: #fff; color: var(--brand); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; box-shadow: var(--shadow-sm); }
  @keyframes bob { 50% { transform: translateY(-4px); } }
  .track .back-fab {
    position: absolute; left: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; z-index: 3;
    background: rgba(255,255,255,.9); font-size: 22px; display: grid; place-items: center;
  }
  .status-card { margin: -52px 12px 0; position: relative; background: var(--card); border-radius: var(--radius); padding: 18px 16px 16px; box-shadow: var(--shadow-md); text-align: center; }
  .status-card .ico { font-size: 34px; }
  .status-card .big { font-size: 22px; font-weight: 800; margin-top: 2px; }
  .status-card .small { color: var(--sub); font-size: 13px; margin-top: 4px; }
  .bar { height: 6px; background: #f0f1f3; border-radius: 3px; margin: 14px 4px 0; overflow: hidden; }
  .bar i { display: block; height: 100%; background: var(--brand-grad); border-radius: 3px; transition: width .8s ease; }
  .hint {
    margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; text-align: left;
    display: flex; align-items: center; gap: 8px;
  }
  .hint.m { background: var(--merchant-soft); color: var(--merchant); }
  .hint.r { background: var(--rider-soft); color: var(--rider); }
  .hint button { margin-left: auto; flex-shrink: 0; }
  .rider-card { display: flex; align-items: center; gap: 12px; }
  .rider-card .av { width: 46px; height: 46px; border-radius: 50%; background: var(--rider-soft); display: grid; place-items: center; font-size: 24px; }
  .rider-card .call { margin-left: auto; color: #fff; background: var(--rider); border-radius: 18px; padding: 7px 14px; font-size: 13px; font-weight: 600; }
  .steps { list-style: none; position: relative; }
  .steps li { display: flex; gap: 12px; padding: 7px 0; color: #c0c4cb; align-items: center; position: relative; }
  .steps li::before { content: ''; position: absolute; left: 5px; top: -8px; height: 16px; border-left: 2px solid #e6e8eb; }
  .steps li:first-child::before { display: none; }
  .steps li.on::before { border-color: #ffc59b; }
  .steps li .dot { width: 12px; height: 12px; border-radius: 50%; background: #e6e8eb; flex-shrink: 0; position: relative; z-index: 1; }
  .steps li.on { color: var(--text); }
  .steps li.on .dot { background: var(--brand); }
  .steps li.cur { font-weight: 700; color: var(--brand); }
  .steps li.cur .dot { box-shadow: 0 0 0 4px rgba(255,106,0,.2); }
  .steps li .t { margin-left: auto; font-size: 12px; color: var(--sub); font-weight: 400; }

  /* ========== 商家端 / 骑手端 ========== */
  .w-head { background: var(--merchant-grad); color: #fff; padding: 18px 16px 52px; position: relative; overflow: hidden; }
  .w-head::after { content: ''; position: absolute; right: -50px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.1); }
  .w-head.r { background: var(--rider-grad); }
  .w-head .row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
  .w-head .logo { width: 48px; height: 48px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 28px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
  .w-head.r .logo { border-radius: 50%; }
  .w-head .nm { font-weight: 800; font-size: 18px; }
  .w-head .sub { font-size: 12px; opacity: .85; margin-top: 2px; }
  .open-pill { margin-left: auto; padding: 6px 12px; border-radius: 16px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.2); color: #fff; }
  .open-pill.on::before { content: '● '; color: #8dffc2; }
  .open-pill.off::before { content: '● '; color: #ffb3b3; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); margin: -36px 12px 0; border-radius: var(--radius); padding: 16px 0; position: relative; box-shadow: var(--shadow-md); }
  .stats div { text-align: center; }
  .stats div + div { border-left: 1px solid var(--line); }
  .stats b { display: block; font-size: 22px; font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif; }
  .stats span { font-size: 12px; color: var(--sub); }
  .seg { display: flex; background: #e9ebef; margin: 14px 12px 0; border-radius: 12px; padding: 4px; }
  .seg button { flex: 1; padding: 9px 0; border-radius: 9px; color: #666; position: relative; font-weight: 500; }
  .seg button.active { background: var(--card); color: var(--merchant); font-weight: 700; box-shadow: var(--shadow-sm); }
  .seg .badge { top: 3px; right: 10px; }

  .m-order .top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
  .m-order .seq { font-size: 22px; font-weight: 900; color: var(--merchant); font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif; }
  .m-order .time { color: var(--sub); font-size: 12px; }
  .m-order .st { margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
  .st-new { color: var(--red); background: #fff0ef; }
  .st-doing { color: var(--merchant); background: var(--merchant-soft); }
  .st-done { color: var(--sub); background: #f0f1f3; }
  .m-order .lines { background: #f8f9fb; border-radius: 10px; padding: 6px 12px; margin: 6px 0; }
  .m-order .lines .kv { padding: 5px 0; }
  .m-order .lines .kv b { color: var(--merchant); }
  .rider-line { font-size: 12px; color: var(--rider); background: var(--rider-soft); border-radius: 8px; padding: 7px 10px; margin-top: 10px; }
  .rider-line.wait { color: var(--sub); background: #f5f6f8; }
  .note-box { background: #fff8e6; color: #a86a00; border-radius: 8px; padding: 7px 10px; margin: 8px 0; font-size: 13px; }
  .m-order .cust { font-size: 12px; color: var(--sub); line-height: 1.8; margin-top: 4px; }
  .acts { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; }
  .flash { animation: flash 1.2s ease 2; }
  @keyframes flash { 50% { box-shadow: 0 0 0 3px var(--merchant), var(--shadow-md); } }
  .m-dish { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
  .m-dish + .m-dish { border-top: 1px solid var(--line); }
  .m-dish .pic { font-size: 28px; width: 50px; height: 50px; background: #f5f6f8; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
  .m-dish .info { flex: 1; min-width: 0; }
  .m-dish .info .n { font-weight: 700; }
  .m-dish .ops { display: flex; gap: 6px; }
  .m-dish.sold .info, .m-dish.sold .pic { opacity: .45; }
  .add-fab { background: #fff; color: var(--merchant); padding: 6px 14px; border-radius: 16px; font-size: 13px; font-weight: 700; }
  .toggle { width: 50px; height: 30px; border-radius: 15px; background: #d5d8dd; position: relative; transition: .25s; flex-shrink: 0; }
  .toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .25s; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
  .toggle.on { background: var(--green); }
  .toggle.on::after { left: 23px; }
  .toggle:active:not(:disabled) { transform: none; }
  .pick-store { display: flex; align-items: center; gap: 14px; background: var(--card); margin: 12px; padding: 14px 16px; border-radius: var(--radius); cursor: pointer; box-shadow: var(--shadow-sm); transition: .15s; }
  .pick-store .pic { font-size: 32px; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
  .pick-store:hover { box-shadow: 0 0 0 2px var(--merchant), var(--shadow-md); }
  .pick-store.r:hover { box-shadow: 0 0 0 2px var(--rider), var(--shadow-md); }
  .pick-store.r .pic { border-radius: 50%; background: var(--rider-soft); }
  .login-hero { padding: 34px 20px 26px; color: #fff; text-align: center; }
  .login-hero.m { background: var(--merchant-grad); }
  .login-hero.r { background: var(--rider-grad); }
  .login-hero .ic { font-size: 44px; }
  .login-hero b { display: block; font-size: 22px; margin-top: 6px; }
  .login-hero span { font-size: 13px; opacity: .85; }

  .r-order .head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
  .r-order .pay { font-size: 26px; font-weight: 900; color: var(--rider); font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif; }
  .r-order .pay small { font-size: 14px; }
  .r-order .head .st { margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: var(--rider-soft); color: var(--rider); }
  .r-order .head .st.wait { background: #fff8e6; color: #a86a00; }
  .route { position: relative; padding-left: 32px; }
  .route::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 24px; border-left: 2px dashed #d5d8dd; }
  .route .pt { position: relative; padding: 6px 0; }
  .route .pt .mk {
    position: absolute; left: -32px; top: 8px; width: 24px; height: 24px; border-radius: 8px;
    color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center;
  }
  .route .pt.from .mk { background: var(--brand-grad); }
  .route .pt.to .mk { background: var(--rider-grad); }
  .route .pt b { font-size: 16px; }
  .route .pt div { font-size: 12px; color: var(--sub); margin-top: 2px; }
  .route .pt.done { opacity: .4; }
  .r-order .foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--sub); }
  .r-order .foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .r-order .foot .acts { margin: 0 0 0 auto; flex-shrink: 0; }
  .offline { background: var(--card); color: #777; text-align: center; padding: 34px 16px; margin: 12px; border-radius: var(--radius); line-height: 2; box-shadow: var(--shadow-sm); }
  .offline .big { font-size: 44px; display: block; }

  /* 底部 tab */
  .tabbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100vw);
    height: 62px; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -2px 16px rgba(0,0,0,.05); display: flex; z-index: 9; padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #9a9fa8; gap: 3px; position: relative; }
  .tabbar button .ico { font-size: 22px; filter: grayscale(1); opacity: .55; position: relative; transition: .2s; }
  .tabbar button.active { color: var(--brand); font-weight: 700; }
  .tabbar.m button.active { color: var(--merchant); }
  .tabbar.r button.active { color: var(--rider); }
  .tabbar button.active .ico { filter: none; opacity: 1; transform: translateY(-1px) scale(1.08); }
  .tabbar .switch { color: #666; }
  .tabbar .switch .ico { filter: none; opacity: .9; }

  /* ========== 运营后台 ========== */
  :root { --admin: #5b5bd6; --admin-dark: #4343b8; --admin-soft: #eeeefc; --admin-side: #1c1f2e; }
  .app.wide { max-width: 1320px; padding-bottom: 0; background: #f3f4f8; }
  .admin { display: flex; min-height: 100vh; }
  .a-side {
    width: 220px; background: var(--admin-side); color: #c3c6d4; flex-shrink: 0; position: sticky; top: 0;
    height: 100vh; display: flex; flex-direction: column; padding: 18px 12px;
  }
  .a-logo { display: flex; gap: 10px; align-items: center; padding: 4px 8px 22px; color: #fff; }
  .a-logo b { display: block; font-size: 16px; letter-spacing: 1px; }
  .a-logo small { font-size: 11px; color: #8b8fa3; }
  .a-side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .a-side nav button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; text-align: left; font-size: 14px; }
  .a-side nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
  .a-side nav button.active { background: var(--admin); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(91,91,214,.45); }
  .a-side nav em { margin-left: auto; font-style: normal; font-size: 11px; background: var(--red); color: #fff; border-radius: 9px; padding: 1px 7px; }
  .a-switch { color: #8b8fa3; padding: 10px 12px; text-align: left; border-radius: 10px; font-size: 13px; }
  .a-switch:hover { background: rgba(255,255,255,.06); color: #fff; }
  .a-main { flex: 1; min-width: 0; padding: 0 28px 36px; }
  .a-top { display: flex; align-items: center; gap: 12px; padding: 22px 0 18px; }
  .a-top h1 { font-size: 22px; }
  .a-date { color: var(--sub); font-size: 13px; margin-right: auto; }
  .a-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--admin); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
  .a-btn { padding: 8px 14px; border-radius: 10px; background: var(--admin); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
  .a-btn:hover:not(:disabled) { background: var(--admin-dark); }
  .a-btn.ghost { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px #dfe1e7; font-weight: 500; }
  .a-btn.ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--admin); color: var(--admin); background: #fff; }
  .a-btn.danger-ghost { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1px #f5c2bf; font-weight: 500; }
  .a-btn.danger-ghost:hover { background: #fff3f2; }
  .a-btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
  .a-btn:disabled { opacity: .45; cursor: not-allowed; }
  .a-grid { display: grid; gap: 16px; margin-bottom: 16px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .kpi { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
  .kpi .l { color: var(--sub); font-size: 13px; }
  .kpi b { display: block; font-size: 26px; margin: 6px 0 4px; font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif; }
  .kpi .d { font-size: 12px; color: var(--sub); }
  .kpi .good { color: #0b8a5c; font-style: normal; font-weight: 600; }
  .kpi .bad { color: #d4380d; font-style: normal; font-weight: 600; }
  .live-row { grid-template-columns: repeat(3, 1fr); }
  .live { background: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .live span { color: #555; }
  .live b { font-size: 24px; color: var(--admin); font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif; }
  .live:hover { box-shadow: 0 0 0 2px var(--admin), var(--shadow-sm); }
  .two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .panel { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0; }
  .panel h2 { font-size: 15px; display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
  .panel h2 small { color: var(--sub); font-weight: 400; font-size: 12px; }
  .alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #fff4e5; color: #8a5300; margin-bottom: 16px; font-size: 13px; }
  .alert b { margin-right: 8px; font-size: 14px; }
  .alert .a-btn { margin-left: auto; }
  .alert.ok { background: #e8f7ef; color: #0b7a52; }
  .a-note { color: var(--sub); font-size: 12px; margin: 10px 0 14px; line-height: 1.7; }
  .admin .field input:focus { border-color: var(--admin); box-shadow: 0 0 0 3px rgba(91,91,214,.15); }

  .chart svg { width: 100%; height: auto; display: block; overflow: visible; }
  .chart .grid line { stroke: #eef0f3; }
  .chart .axis text { fill: #9aa0aa; font-size: 11px; }
  .chart .cbar { fill: var(--admin); }
  .chart .col:hover .cbar { fill: var(--admin-dark); }
  .chart .hit { fill: transparent; }
  .chart .col:hover .hit { fill: rgba(91,91,214,.06); }
  .chart .line { fill: none; stroke: var(--admin); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
  .chart .area { fill: url(#ag); }
  .chart .dot { fill: var(--admin); stroke: #fff; stroke-width: 2; }
  .chart .cross { stroke: #c4c6ea; stroke-dasharray: 3 3; opacity: 0; }
  .chart .col:hover .cross { opacity: 1; }
  .chart .col:hover .dot { r: 6; }
  .chart .lbl { fill: var(--text); font-size: 12px; font-weight: 700; }
  .hb { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-radius: 6px; }
  .hb:hover { background: #fafaff; }
  .hb .n { width: 110px; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex-shrink: 0; }
  .hb .hb-bg { flex: 1; height: 12px; }
  .hb .hb-bg i { display: block; height: 100%; background: var(--admin); border-radius: 0 4px 4px 0; min-width: 2px; }
  .hb b { width: 76px; text-align: right; font-size: 13px; flex-shrink: 0; }
  .chart-tip {
    position: fixed; z-index: 60; pointer-events: none; background: var(--admin-side); color: #fff; font-size: 12px;
    padding: 8px 11px; border-radius: 8px; white-space: pre-line; line-height: 1.6; box-shadow: var(--shadow-lg);
    opacity: 0; transition: opacity .1s; left: 0; top: 0;
  }
  .chart-tip.show { opacity: 1; }

  .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
  .filters button { padding: 6px 14px; border-radius: 16px; background: #fff; font-size: 13px; box-shadow: inset 0 0 0 1px #e3e5ea; }
  .filters button.active { background: var(--admin); color: #fff; box-shadow: none; }
  .filters button i { font-style: normal; opacity: .65; margin-left: 5px; }
  .a-search { margin-left: auto; padding: 8px 12px; border-radius: 10px; border: 1px solid #e3e5ea; outline: none; width: 260px; background: #fff; }
  .a-search:focus { border-color: var(--admin); box-shadow: 0 0 0 3px rgba(91,91,214,.15); }
  .table-wrap { overflow-x: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow-sm); }
  .a-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .a-table th { text-align: left; color: var(--sub); font-weight: 500; padding: 11px 14px; background: #f8f9fb; white-space: nowrap; }
  .a-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
  .a-table tr:hover td { background: #fafaff; }
  .a-table tr.warn td { background: #fffaf0; }
  .a-table .sub { color: var(--sub); font-size: 12px; }
  .a-table .ops { white-space: nowrap; }
  .a-table .ops .a-btn + .a-btn { margin-left: 4px; }
  .a-empty { text-align: center; color: var(--sub); padding: 40px 0 !important; }
  .mono { font-family: Consolas, "SF Mono", monospace; font-size: 12px; }
  .a-store { display: flex; align-items: center; gap: 10px; }
  .a-store > span { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
  .pill { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .s-new { background: #fff0ef; color: #d4380d; }
  .s-cooking { background: #fff7e0; color: #ad6800; }
  .s-delivering { background: var(--admin-soft); color: var(--admin); }
  .s-done { background: #e8f7ef; color: #0b7a52; }
  .s-cancelled { background: #f0f1f3; color: #8a8f99; }
  .pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 2px; font-size: 13px; color: var(--sub); }

  .dialog.wide { width: min(580px, 94vw); }
  .a-dlg-title { text-align: left !important; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .a-h4 { font-size: 13px; color: var(--sub); margin: 16px 0 6px; }
  .ad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
  .ad-grid div { background: #f8f9fb; border-radius: 10px; padding: 10px; font-size: 12px; color: #555; line-height: 1.6; min-width: 0; overflow-wrap: anywhere; }
  .ad-grid b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
  .split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
  .split div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
  .split span, .split small { display: block; font-size: 11px; color: var(--sub); }
  .split b { display: block; font-size: 17px; margin: 2px 0; }
  .assign { display: flex; flex-wrap: wrap; gap: 6px; }

  @media (max-width: 900px) {
    .two { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 760px) {
    .admin { flex-direction: column; }
    .a-side { width: auto; height: auto; flex-direction: row; align-items: center; padding: 8px; overflow-x: auto; z-index: 8; }
    .a-logo { display: none; }
    .a-side nav { flex-direction: row; }
    .a-side nav button, .a-switch { white-space: nowrap; padding: 8px 10px; }
    .a-main { padding: 0 12px 24px; }
    .a-top { flex-wrap: wrap; }
    .a-date { display: none; }
    .a-top h1 { margin-right: auto; }
    .a-search { width: 100%; margin-left: 0; }
    .live-row, .ad-grid, .split { grid-template-columns: 1fr; }
  }

  .toast {
    position: fixed; top: 42%; left: 50%; transform: translate(-50%, -50%); background: rgba(30,32,36,.88);
    backdrop-filter: blur(8px); color: #fff; padding: 12px 22px; border-radius: 14px; z-index: 50; font-size: 14px;
    pointer-events: none; animation: pop .2s ease; box-shadow: var(--shadow-lg); max-width: 80vw; text-align: center;
  }
