:root {
  --brand: #ff6a3d;
  --brand-dark: #e04f22;
  --brand-soft: #fff2ed;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1a1d22;
  --text-2: #4a505a;
  --muted: #939aa4;
  --faint: #b6bcc4;
  --line: #eef0f3;
  --line-2: #e4e7eb;
  --ok: #17a06b;
  --warn: #d98200;
  --info: #2f6feb;
  --danger: #e5484d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 30, .05);
  --shadow: 0 2px 8px rgba(20, 24, 30, .06), 0 1px 2px rgba(20, 24, 30, .04);
  --shadow-lg: 0 8px 28px rgba(20, 24, 30, .14);
  --topbar-h: 80px;
  --ease: cubic-bezier(.22, .68, .36, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============ 顶部栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #ff8052 0%, #ff6a3d 45%, #f5561f 100%);
  color: #fff; padding: 15px 16px 16px;
  min-height: var(--topbar-h);
  box-shadow: 0 2px 14px rgba(224, 79, 34, .22);
  overflow: hidden;
}
/* 极克制的光晕装饰，增加层次而非花哨 */
.topbar::after {
  content: ''; position: absolute; right: -34px; top: -52px;
  width: 132px; height: 132px; border-radius: 50%;
  background: rgba(255, 255, 255, .09); pointer-events: none;
}
.topbar h1 {
  font-size: 19px; margin: 0; font-weight: 600;
  letter-spacing: .3px; position: relative;
}
.topbar .sub {
  font-size: 12px; margin-top: 3px; position: relative;
  color: rgba(255, 255, 255, .82); letter-spacing: .2px;
}
.topbar .right { position: absolute; right: 14px; top: 16px; z-index: 2; }
.topbar .right a {
  color: #fff; font-size: 13px; font-weight: 500;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .26);
  padding: 6px 13px; border-radius: 999px;
  display: inline-block; transition: background .18s var(--ease);
  backdrop-filter: saturate(140%) blur(4px);
}
.topbar .right a:active { background: rgba(255, 255, 255, .3); }

/* ============ 左侧分类栏 + 右侧菜品 ============ */
.menu-body { display: flex; align-items: flex-start; }
.catbar {
  flex: 0 0 88px; background: #f4f5f7;
  position: sticky; top: var(--topbar-h); z-index: 15;
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 4px 0 96px;
}
.catbar::-webkit-scrollbar { display: none; }
.cat {
  position: relative; padding: 16px 8px; font-size: 13px; line-height: 1.35;
  text-align: center; color: #6a7079; word-break: break-all;
  transition: color .18s var(--ease), background .18s var(--ease);
  letter-spacing: .2px;
}
.cat:active { background: rgba(0, 0, 0, .03); }
.cat.active {
  background: #fff; color: var(--text); font-weight: 600;
}
.cat.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; background: var(--brand); border-radius: 0 3px 3px 0;
}
.cat .dot {
  position: absolute; top: 8px; right: 7px;
  background: var(--brand); color: #fff;
  font-size: 10px; font-style: normal; font-weight: 600;
  min-width: 16px; height: 16px; line-height: 16px;
  border-radius: 8px; padding: 0 4px; text-align: center;
  box-shadow: 0 0 0 2px #f4f5f7;
  font-variant-numeric: tabular-nums;
}
.cat.active .dot { box-shadow: 0 0 0 2px #fff; }

.dish-wrap {
  flex: 1; min-width: 0; background: #fff;
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100dvh - var(--topbar-h));
  padding-bottom: 96px;
}

/* ============ 菜品列表 ============ */
.section-title {
  padding: 14px 14px 8px; font-size: 12px; color: var(--muted);
  font-weight: 600; letter-spacing: 1px;
  position: sticky; top: var(--topbar-h); z-index: 12;
  background: linear-gradient(#fff 74%, rgba(255, 255, 255, 0));
}
.dish {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; position: relative;
  transition: background .16s var(--ease);
}
.dish + .dish::before {
  content: ''; position: absolute; left: 73px; right: 14px; top: 0;
  height: 1px; background: var(--line);
}
.dish:active { background: #fafbfc; }
.dish .thumb {
  width: 52px; height: 52px; border-radius: 11px; flex: 0 0 auto; overflow: hidden;
  background: linear-gradient(140deg, #fff4ef, #ffe9e0);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: inset 0 0 0 1px rgba(26, 29, 34, .05);
}
.dish .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish .info { flex: 1; min-width: 0; padding-right: 4px; }
.dish .name {
  font-weight: 600; font-size: 15px; letter-spacing: .2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dish .desc {
  font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dish .price {
  color: var(--brand-dark); font-weight: 700; margin-top: 5px;
  font-size: 17px; letter-spacing: -.2px;
  font-variant-numeric: tabular-nums;
}
.dish .price small { font-size: 12px; font-weight: 600; margin-right: 1px; }
.dish.off { opacity: .45; }

/* ============ 步进器 ============ */
.stepper { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.stepper button {
  width: 27px; height: 27px; border-radius: 50%; font-size: 16px; line-height: 1;
  background: var(--brand); color: #fff; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 106, 61, .34);
  transition: transform .13s var(--ease), box-shadow .13s var(--ease);
}
.stepper button:active { transform: scale(.86); box-shadow: 0 1px 3px rgba(255, 106, 61, .3); }
.stepper button.minus {
  background: #fff; color: var(--brand);
  border: 1.5px solid var(--brand); box-shadow: none;
  animation: pop .18s var(--ease);
}
.stepper .qty {
  min-width: 18px; text-align: center; font-weight: 600; font-size: 15px;
  font-variant-numeric: tabular-nums; animation: pop .18s var(--ease);
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ 购物车悬浮栏 ============ */
.cartbar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  max-width: 536px; margin: 0 auto;
  background: #23272e; color: #fff;
  display: flex; align-items: center;
  padding: 7px 7px 7px 15px; border-radius: 999px; z-index: 25;
  box-shadow: 0 10px 28px rgba(18, 21, 26, .32), 0 2px 6px rgba(18, 21, 26, .18);
  animation: cartIn .28s var(--ease);
}
@keyframes cartIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.cartbar .icon { position: relative; margin-right: 12px; display: flex; align-items: center; }
.cartbar .icon svg { width: 25px; height: 25px; display: block; }
.cartbar .badge {
  position: absolute; top: -5px; right: -8px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; border-radius: 9px;
  text-align: center; line-height: 18px; padding: 0 5px;
  box-shadow: 0 0 0 2px #23272e; font-variant-numeric: tabular-nums;
}
.cartbar .badge.bump { animation: bump .32s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }
.cartbar .total { flex: 1; line-height: 1.25; }
.cartbar .total b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.cartbar .total span { font-size: 11px; color: rgba(255, 255, 255, .58); display: block; letter-spacing: .3px; }
.cartbar .checkout {
  background: linear-gradient(135deg, #ff7a4d, #f5561f); color: #fff;
  padding: 11px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  box-shadow: 0 3px 10px rgba(245, 86, 31, .42);
  transition: transform .13s var(--ease);
}
.cartbar .checkout:active { transform: scale(.96); }

/* ============ 弹层 ============ */
.mask {
  position: fixed; inset: 0; background: rgba(14, 17, 21, .48); z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s var(--ease);
  backdrop-filter: blur(2px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0;
  padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh; overflow-y: auto;
  animation: up .26s var(--ease);
  box-shadow: 0 -6px 30px rgba(14, 17, 21, .18);
}
@keyframes up { from { transform: translateY(46px); } to { transform: none; } }
.sheet .handle {
  width: 38px; height: 4px; border-radius: 2px; background: var(--line-2);
  margin: 4px auto 12px;
}
.sheet h3 { margin: 0 0 14px; font-size: 17px; font-weight: 650; letter-spacing: .3px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 15px; outline: none; background: #fafbfc; color: var(--text);
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.field input:focus, .field textarea:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 106, 61, .12);
}
.field textarea { resize: vertical; min-height: 62px; line-height: 1.5; }
.btn-primary {
  width: 100%; background: linear-gradient(135deg, #ff7a4d, #f5561f); color: #fff;
  padding: 14px; border-radius: 12px; font-size: 16px; font-weight: 600; margin-top: 8px;
  box-shadow: 0 4px 14px rgba(245, 86, 31, .3);
  transition: transform .13s var(--ease), box-shadow .13s var(--ease);
}
.btn-primary:active { transform: scale(.985); box-shadow: 0 2px 8px rgba(245, 86, 31, .26); }
.btn-primary:disabled { background: #f3c3b2; box-shadow: none; }
.btn-ghost {
  width: 100%; background: #fff; color: var(--text-2); padding: 13px;
  border-radius: 12px; font-size: 15px; margin-top: 10px; border: 1px solid var(--line-2);
}
.btn-ghost:active { background: #f7f8fa; }
.close-x {
  position: absolute; right: 16px; top: 14px;
  font-size: 20px; color: var(--faint); cursor: pointer; line-height: 1;
  width: 28px; height: 28px; border-radius: 50%; background: #f4f5f7;
  display: flex; align-items: center; justify-content: center;
}
.sheet { position: relative; }

/* 结算明细 */
.cart-line {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.cart-line:last-of-type { border-bottom: none; }
.cart-line .n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cart-line > span:last-child { font-variant-numeric: tabular-nums; color: var(--text-2); }
.cart-sum {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 13px; margin-top: 4px; border-top: 1px dashed var(--line-2);
  font-weight: 600;
}
.cart-sum > span:last-child {
  color: var(--brand-dark); font-size: 19px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}

/* ============ Toast ============ */
.toast {
  position: fixed; top: 40%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(20, 23, 28, .88); color: #fff; padding: 12px 20px; border-radius: 12px;
  z-index: 60; font-size: 14px; max-width: 80%; text-align: center;
  box-shadow: var(--shadow-lg); animation: fadeIn .18s var(--ease);
  backdrop-filter: blur(6px);
}

/* ============ 下单成功 ============ */
.success-icon { display: flex; justify-content: center; margin: 10px 0 4px; }
.check-ring { width: 62px; height: 62px; }
.check-ring circle {
  fill: none; stroke: var(--ok); stroke-width: 2.5; opacity: .9;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw .5s var(--ease) forwards;
}
.check-ring path {
  fill: none; stroke: var(--ok); stroke-width: 3.4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: draw .34s var(--ease) .34s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ============ 订单记录 ============ */
.list-tools {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: var(--topbar-h); z-index: 14;
}
.list-tools .count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn-mini {
  background: var(--brand-soft); color: var(--brand-dark); font-size: 13px;
  padding: 6px 15px; border-radius: 999px; font-weight: 600;
  transition: transform .13s var(--ease);
}
.btn-mini:active { transform: scale(.94); }
#orderList { padding: 4px 0 28px; }
.order-card {
  background: #fff; margin: 10px 12px; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid rgba(26, 29, 34, .04);
}
.order-card .hd {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.order-card .hd > span:first-child {
  color: var(--text-2); font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.order-card .bd { padding: 10px 14px 12px; }
.order-card .it {
  display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0;
  color: var(--text-2);
}
.order-card .it > span:last-child { font-variant-numeric: tabular-nums; }
.order-card .meta-line {
  font-size: 12px; color: var(--muted); margin-top: 6px;
  padding-top: 6px; border-top: 1px dashed var(--line);
}
.order-card .ft {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-top: 1px solid var(--line);
  font-weight: 600; background: #fcfcfd;
}
.order-card .ft > span:last-child {
  color: var(--brand-dark); font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}

/* 状态标签 */
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px; line-height: 1.5;
}
.tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.pending { background: #fff6e6; color: var(--warn); }
.tag.accepted { background: #ecf2ff; color: var(--info); }
.tag.done { background: #e8f7f0; color: var(--ok); }
.tag.cancelled { background: #f2f3f5; color: #9aa0a8; }

.empty { text-align: center; color: var(--muted); padding: 58px 20px; font-size: 14px; }
.empty .big { font-size: 40px; margin-bottom: 8px; opacity: .8; }

/* ============ 骨架屏 ============ */
.sk-list { padding: 6px 0; }
.sk-row { display: flex; align-items: center; gap: 11px; padding: 13px 14px; }
.sk {
  background: linear-gradient(100deg, #eef0f3 30%, #f6f7f9 50%, #eef0f3 70%);
  background-size: 220% 100%; border-radius: 6px;
  animation: shimmer 1.3s linear infinite;
}
.sk-thumb { width: 52px; height: 52px; border-radius: 11px; flex: 0 0 auto; }
.sk-b1 { height: 13px; width: 46%; }
.sk-b2 { height: 11px; width: 68%; margin-top: 8px; }
.sk-b3 { height: 14px; width: 28%; margin-top: 10px; }
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (display-mode: standalone) {
  :root { --topbar-h: calc(80px + env(safe-area-inset-top, 0px)); }
  .topbar { padding-top: calc(15px + env(safe-area-inset-top, 0px)); }
  .topbar .right { top: calc(16px + env(safe-area-inset-top, 0px)); }
}

/* ============ 后台 ============ */
.admin-wrap { max-width: 560px; margin: 0 auto; background: var(--bg); min-height: 100vh; }
.login-box { max-width: 380px; margin: 12vh auto 0; background: #fff; padding: 26px 22px; border-radius: 16px; box-shadow: var(--shadow-lg); }
.login-box h2 { margin: 0 0 4px; font-size: 19px; font-weight: 650; }
.login-box .tip { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.admin-tabs { display: flex; background: #fff; position: sticky; top: 0; z-index: 15; border-bottom: 1px solid var(--line); }
.admin-tabs .at { flex: 1; text-align: center; padding: 13px 0; font-size: 14px; color: var(--muted); }
.admin-tabs .at.active { color: var(--brand); border-bottom: 2px solid var(--brand); font-weight: 600; }
.admin-top { display: flex; justify-content: space-between; align-items: center; padding: 14px; }
.admin-top .who { font-size: 13px; color: var(--muted); }
.admin-top .logout { font-size: 13px; color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .v { font-size: 23px; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: flex; align-items: center; gap: 12px; background: #fff; margin: 8px 12px; padding: 12px; border-radius: var(--radius); box-shadow: var(--shadow); }
.row .info { flex: 1; min-width: 0; }
.row .name { font-weight: 600; }
.row .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.row .price { color: var(--brand-dark); font-weight: 600; font-variant-numeric: tabular-nums; }
.row .acts button { background: none; font-size: 13px; color: var(--brand); margin-left: 10px; }
.row .acts .del { color: var(--danger); }
.fab { position: fixed; right: 18px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; }
.fab button { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #ff7a4d, #f5561f); color: #fff; font-size: 28px; box-shadow: 0 6px 18px rgba(245, 86, 31, .42); }
.modal-mask { position: fixed; inset: 0; background: rgba(14, 17, 21, .48); z-index: 40; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal { background: #fff; width: 92%; max-width: 460px; border-radius: 16px; padding: 20px 18px 24px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 14px; font-size: 17px; font-weight: 650; }
.order-detail .it { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-detail .meta-line { font-size: 13px; color: var(--muted); margin: 4px 0; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pill { padding: 7px 14px; border-radius: 999px; background: #f2f3f5; font-size: 13px; color: var(--muted); }
.pill.on { background: var(--brand); color: #fff; }
/* 订单工具条 */
.order-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px 6px; font-size: 13px; color: var(--muted);
}
.order-toolbar .link-danger {
  background: none; border: none; padding: 4px 0;
  color: var(--danger); font-size: 13px; cursor: pointer;
}
/* 订单卡片内的删除按钮 */
.order-card .ft .del-order {
  background: none; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--danger); font-size: 13px; font-weight: 400;
  padding: 4px 13px; cursor: pointer;
}
.order-card .ft .del-order:active { background: #fff1f1; }
.btn-danger {
  width: 100%; background: #fff; color: var(--danger); padding: 13px;
  border-radius: 12px; font-size: 15px; margin-top: 10px;
  border: 1px solid rgba(229, 72, 77, .4);
}

.filters { display: flex; gap: 8px; padding: 12px; flex-wrap: wrap; }
.filters .f { padding: 6px 14px; border-radius: 999px; background: #fff; font-size: 13px; color: var(--muted); box-shadow: var(--shadow-sm); }
.filters .f.on { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(255, 106, 61, .3); }

/* ============ 前台增强：搜索 / 公告 / 营业灯 ============ */
.searchbar {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; padding: 7px 14px; backdrop-filter: blur(4px);
}
.searchbar .si { width: 17px; height: 17px; flex: 0 0 auto; opacity: .92; }
.searchbar input { flex: 1; border: none; background: transparent; color: #fff; font-size: 14px; outline: none; }
.searchbar input::placeholder { color: rgba(255, 255, 255, .72); }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.open-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
.open-dot.on { background: #4ade80; }
.open-dot.off { background: #cbd0d6; }
.announce {
  background: linear-gradient(90deg, #fff7f0, #fff); color: #b5562a;
  font-size: 12.5px; padding: 9px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; letter-spacing: .2px;
}

/* ============ 菜品卡增强 ============ */
.dish { cursor: pointer; }
.dish .thumb { width: 60px; height: 60px; font-size: 27px; }
.dish .name {
  white-space: normal; overflow: visible; text-overflow: clip;
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
}
.dish .price .now { color: var(--brand-dark); font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.dish .price .was { color: var(--faint); text-decoration: line-through; font-size: 12px; font-weight: 400; margin-left: 6px; }
.chip {
  font-style: normal; font-size: 10px; line-height: 1; padding: 2px 6px; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; white-space: nowrap;
}
.dish .sales { font-size: 11px; color: var(--muted); margin-top: 3px; }
.dish .fav { margin-left: auto; color: #d0d4da; font-style: normal; font-size: 15px; transition: transform .14s var(--ease); }
.dish .fav.on { color: var(--brand); }
.dish .fav:active { transform: scale(1.25); }
.dish.sold { opacity: .5; }
.sold-out { font-size: 12px; color: var(--muted); background: #f2f3f5; padding: 4px 10px; border-radius: 999px; }

/* ============ 菜品详情弹层 ============ */
.dish-sheet { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.dish-hero {
  width: 100%; height: 180px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(140deg, #fff4ef, #ffe9e0);
  display: flex; align-items: center; justify-content: center; font-size: 64px;
}
.dish-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dish-desc2 { line-height: 1.5; }
.dish-price2 .now { color: var(--brand-dark); font-weight: 700; font-size: 22px; }
.dish-price2 .was { color: var(--faint); text-decoration: line-through; margin-left: 8px; font-size: 14px; }
.dish-buy { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.stepper.big button { width: 34px; height: 34px; font-size: 20px; }
.stepper.big .qty { font-size: 17px; min-width: 24px; }

/* ============ 购物车明细抽屉 ============ */
.drawer-mask { position: fixed; inset: 0; background: rgba(14, 17, 21, .45); z-index: 28; display: none; }
.drawer {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: #fff; border-radius: 18px 18px 0 0; max-height: 72vh;
  display: flex; flex-direction: column; animation: up .26s var(--ease);
  box-shadow: 0 -6px 30px rgba(14, 17, 21, .18);
}
.drawer-hd { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.clear-cart { background: none; border: none; color: var(--danger); font-size: 13px; }
.drawer-bd { overflow-y: auto; padding: 4px 0; flex: 1; }
.crow { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.crow .thumb { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: linear-gradient(140deg, #fff4ef, #ffe9e0); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto; }
.crow .thumb img { width: 100%; height: 100%; object-fit: cover; }
/* emoji 图标（image 字段为非 http 文本时当作图标显示） */
.thumb .emoji { font-size: 28px; line-height: 1; }
.crow .thumb .emoji { font-size: 22px; }
#dishHero { display: flex; align-items: center; justify-content: center; min-height: 150px; background: linear-gradient(140deg, #fff4ef, #ffe9e0); border-radius: 16px; }
#dishHero .emoji { font-size: 88px; line-height: 1; }
.crow .info { flex: 1; min-width: 0; }
.crow .name { font-weight: 600; font-size: 14px; }
.crow .price { color: var(--brand-dark); font-weight: 600; font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.crow .crow-del { background: none; border: none; color: var(--faint); font-size: 15px; padding: 6px; }
.drawer-ft { display: flex; align-items: center; gap: 14px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #fff; }
.drawer-ft .t { flex: 1; font-size: 13px; color: var(--muted); }
.drawer-ft .t b { display: block; color: var(--brand-dark); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.drawer-ft .btn-primary { width: auto; margin-top: 0; padding: 12px 26px; }

/* ============ 订单进度时间线 ============ */
.tl { display: flex; align-items: center; padding: 10px 14px 4px; flex-wrap: wrap; }
.tl.cancelled { color: #9aa0a8; font-size: 13px; }
.tl.cancelled .dot { background: #cbd0d6; }
.tl-step { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.tl-step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.tl-step.cur { color: var(--brand-dark); font-weight: 600; }
.tl-step.cur .dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tl-step.done { color: var(--ok); }
.tl-step.done .dot { background: var(--ok); }
.tl-line { width: 26px; height: 2px; background: var(--line-2); margin: 0 4px; }
.tl-line.on { background: var(--ok); }

/* ============ 订单概览 ============ */
.overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.ov-stat { background: var(--bg); border-radius: 12px; padding: 12px 8px; text-align: center; }
.ov-stat .v { font-size: 19px; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.ov-stat .l { font-size: 11px; color: var(--muted); margin-top: 3px; }
.ov-chart { grid-column: 1 / -1; background: var(--bg); border-radius: 12px; padding: 8px; height: 150px; }

/* ============ 加购抛物线 ============ */
.fly-dot { position: fixed; z-index: 50; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); pointer-events: none; box-shadow: 0 2px 8px rgba(255, 106, 61, .4); }

/* ============ 顾客端精致可爱主题 ============ */
#view-menu {
  height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; background: #fff9f5;
}
#view-menu .customer-topbar { position: relative; top: auto; flex: 0 0 auto; }
#view-menu .quick-filters, #view-menu .announce { flex: 0 0 auto; }
.customer-topbar {
  min-height: 166px; padding: 18px 18px 16px;
  background: linear-gradient(145deg, #ff9470 0%, #ff7450 52%, #f55b35 100%);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 30px rgba(222, 82, 42, .22);
}
.customer-topbar::before {
  content: ''; position: absolute; left: -34px; bottom: -48px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 224, 197, .15); pointer-events: none;
}
.customer-topbar::after { right: -26px; top: -46px; width: 150px; height: 150px; }
.kitchen-copy { position: relative; z-index: 2; padding-right: 116px; }
.kitchen-copy .welcome {
  display: inline-flex; padding: 3px 9px; margin-bottom: 5px;
  border-radius: 999px; background: rgba(255, 255, 255, .17);
  color: rgba(255, 255, 255, .9); font-size: 10px; letter-spacing: .5px;
}
.customer-topbar h1 { font-size: 25px; font-weight: 750; letter-spacing: .5px; }
.customer-topbar .sub { display: flex; align-items: center; gap: 7px; }
.customer-topbar .sub i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.65); }
.kitchen-mascot {
  position: absolute; z-index: 1; right: 72px; top: 25px;
  width: 68px; height: 68px; border-radius: 24px 24px 30px 30px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(255,241,226,.86));
  box-shadow: 0 9px 22px rgba(161, 57, 27, .18); transform: rotate(5deg);
}
.kitchen-mascot span { font-size: 37px; transform: rotate(-5deg); filter: drop-shadow(0 3px 2px rgba(116,57,34,.12)); }
.customer-topbar .right { top: 22px; right: 16px; }
.customer-topbar .right a {
  width: 48px; height: 48px; padding: 6px 4px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1.25;
}
.customer-topbar .right b { font-size: 10px; font-weight: 500; opacity: .76; }
.customer-topbar .searchbar {
  position: relative; z-index: 2; margin-top: 14px; height: 43px; padding: 5px 6px 5px 14px;
  background: rgba(255,255,255,.94); border: none; border-radius: 15px;
  box-shadow: 0 7px 18px rgba(146, 50, 24, .15); backdrop-filter: none;
}
.customer-topbar .searchbar .si { stroke: #d18b75; }
.customer-topbar .searchbar input { color: #50372f; font-size: 13px; }
.customer-topbar .searchbar input::placeholder { color: #b49a90; }
.surprise-btn {
  flex: 0 0 auto; height: 31px; padding: 0 12px; border-radius: 10px;
  color: #dc5a35; background: #fff0e9; font-size: 11px; font-weight: 650;
}
.customer-topbar .open-dot { margin: 0 6px 0 2px; box-shadow: 0 0 0 3px rgba(255,116,80,.12); }
.quick-filters {
  display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none;
  padding: 14px 14px 12px; background: #fff9f5;
}
.quick-filters::-webkit-scrollbar { display: none; }
.quick-filter {
  flex: 0 0 auto; display: flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 7px 12px; border: 1px solid #f3e6de;
  border-radius: 13px; background: #fff; color: #826b62;
  font-size: 12px; box-shadow: 0 3px 10px rgba(100, 61, 44, .05);
  transition: transform .16s var(--ease), background .16s var(--ease);
}
.quick-filter span { font-size: 14px; }
.quick-filter i {
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: #fff0e9; color: var(--brand); font-style: normal;
  font-size: 9px; line-height: 17px; text-align: center;
}
.quick-filter.on { color: #fff; background: linear-gradient(135deg, #ff8762, #ff6842); border-color: transparent; box-shadow: 0 6px 15px rgba(240, 91, 52, .22); }
.quick-filter.on i { background: rgba(255,255,255,.24); color: #fff; }
.quick-filter:active { transform: scale(.95); }
#view-menu .announce {
  margin: 0 14px 11px; padding: 9px 12px; border: 1px solid #ffe1ca; border-radius: 12px;
  background: linear-gradient(90deg, #fff3df, #fff9f1); color: #a76643;
  box-shadow: 0 3px 12px rgba(134, 83, 48, .05);
}
#view-menu .menu-body {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  gap: 9px; padding: 0 10px; background: #fff9f5;
}
#view-menu .catbar {
  position: relative; top: auto; align-self: stretch;
  flex-basis: 76px; height: auto; overflow-y: hidden;
  padding: 4px 0 90px; background: transparent;
}
#view-menu .cat { margin: 4px 0; padding: 13px 7px; border-radius: 14px; color: #9b8379; font-size: 12px; }
#view-menu .cat.active { color: #e15c37; background: #fff; box-shadow: 0 5px 16px rgba(101,62,44,.08); }
#view-menu .cat.active::before { left: 7px; width: 3px; height: 14px; border-radius: 3px; }
#view-menu .cat .dot { top: 3px; right: 3px; box-shadow: 0 0 0 2px #fff9f5; }
#view-menu .dish-wrap {
  height: 100%; min-height: 0; padding: 0 0 100px;
  background: transparent; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
#view-menu .dish-wrap::-webkit-scrollbar { display: none; }
#view-menu .section-title {
  top: 0; display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 5px; padding: 12px 7px 7px; background: rgba(255,249,245,.94);
  color: #5d453d; font-size: 14px; letter-spacing: .2px; backdrop-filter: blur(8px);
}
#view-menu .section-title em { color: #b0988e; font-size: 10px; font-style: normal; font-weight: 500; }
#view-menu .dish {
  align-items: flex-start; gap: 10px; margin: 0 0 10px; padding: 11px;
  border: 1px solid rgba(238, 222, 214, .8); border-radius: 18px;
  background: rgba(255,255,255,.95); box-shadow: 0 7px 20px rgba(105, 65, 47, .07);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
#view-menu .dish + .dish::before { display: none; }
#view-menu .dish:active { transform: scale(.985); background: #fff; box-shadow: 0 3px 10px rgba(105,65,47,.06); }
#view-menu .dish .thumb {
  width: 72px; height: 72px; border-radius: 16px; font-size: 31px;
  background: linear-gradient(145deg, #fff5eb, #ffe7db);
  box-shadow: inset 0 0 0 1px rgba(139, 79, 48, .05), 0 3px 9px rgba(120,74,51,.08);
}
#view-menu .dish .thumb img { transition: transform .3s var(--ease); }
#view-menu .dish:active .thumb img { transform: scale(1.05); }
#view-menu .dish .info { padding-right: 0; }
#view-menu .dish .name { color: #49342e; font-size: 14px; font-weight: 700; gap: 4px; line-height: 1.35; }
#view-menu .dish .desc { color: #a18b82; margin-top: 4px; font-size: 11px; }
#view-menu .dish .sales { display: inline-block; margin-top: 4px; color: #b2988d; font-size: 9px; }
#view-menu .dish .price { margin-top: 5px; line-height: 1.15; }
#view-menu .dish .price .now { font-size: 16px; }
#view-menu .dish .price .now::before { content: '¥'; font-size: 10px; margin-right: 1px; }
#view-menu .chip { padding: 3px 5px; border-radius: 6px; background: #fff0e8; color: #e56c48; font-size: 8px; }
#view-menu .dish .fav {
  position: absolute; right: 8px; top: 7px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; border-radius: 9px;
  background: rgba(255,255,255,.9); color: #d8c6bf; font-size: 16px;
  box-shadow: 0 2px 8px rgba(99,61,43,.08);
}
#view-menu .dish .fav.on { color: #ff6e68; background: #fff0ef; }
#view-menu .dish > .stepper, #view-menu .dish > .sold-out { align-self: flex-end; margin-left: -56px; }
#view-menu .stepper { gap: 5px; }
#view-menu .stepper button { width: 25px; height: 25px; font-size: 14px; box-shadow: 0 3px 8px rgba(242,91,51,.25); }
#view-menu .stepper .qty { min-width: 14px; font-size: 12px; }
.cute-empty { display: flex; flex-direction: column; align-items: center; padding-top: 70px; }
.cute-empty .big { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; border-radius: 24px; background: #fff0e9; }
.cute-empty b { color: #715b52; font-size: 14px; }
.cute-empty small { margin-top: 5px; color: #aa9389; }
#view-menu .cartbar { background: linear-gradient(135deg, #4e3a34, #342824); border: 1px solid rgba(255,255,255,.08); }
#view-menu .cartbar .checkout { background: linear-gradient(135deg, #ff8b63, #ff6039); }
#view-menu .cartbar .icon { width: 34px; height: 34px; justify-content: center; border-radius: 12px; background: rgba(255,255,255,.09); }
#view-menu .cartbar .icon svg { width: 21px; height: 21px; }
.dish-sheet, #checkoutMask .sheet, #successMask .sheet { border-radius: 28px 28px 0 0; background: #fffdfb; }
.dish-sheet .dish-hero { border-radius: 21px; background: linear-gradient(145deg, #fff5eb, #ffe4d6); }
.dish-sheet #dishTitle { color: #4f3932; font-size: 19px; }
.dish-sheet .btn-ghost { color: #e36048; background: #fff4f0; border-color: #ffe1d7; }
.drawer { border-radius: 26px 26px 0 0; background: #fffdfb; }
.backtop {
  position: fixed; z-index: 24; right: max(17px, calc((100vw - 560px) / 2 + 17px));
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  width: 40px; height: 40px; border-radius: 14px;
  color: #e56543; background: rgba(255,255,255,.94); font-size: 18px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(94,57,40,.16); border: 1px solid #f3e5de;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.backtop.show { opacity: 1; visibility: visible; transform: none; }
#view-orders { min-height: 100vh; background: #fff9f5; }
#view-orders .topbar { border-radius: 0 0 24px 24px; }
#view-orders .order-card { border-radius: 18px; box-shadow: 0 7px 20px rgba(105,65,47,.07); }
#view-orders .overview, #view-orders .list-tools { background: #fffdfb; }
@media (max-width: 380px) {
  .kitchen-mascot { right: 62px; width: 58px; height: 58px; }
  .kitchen-mascot span { font-size: 31px; }
  .kitchen-copy { padding-right: 100px; }
  .quick-filter { padding: 7px 9px; }
  #view-menu .menu-body { gap: 6px; padding-left: 7px; padding-right: 7px; }
  #view-menu .catbar { flex-basis: 68px; }
  #view-menu .dish { padding: 9px; }
  #view-menu .dish .thumb { width: 64px; height: 64px; }
}

