* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #0f0d0b;
  --card: #1a1613;
  --line: #2c2620;
  --gold: #c8a24a;
  --text: #f2ece1;
  --dim: #a49a89;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.top {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #1d1712, #0f0d0b);
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: var(--gold); }
.sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
main { padding: 14px 14px 120px; max-width: 640px; margin: 0 auto; }
.tip { font-size: 12px; color: var(--dim); margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.p-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.p-sym {
  width: 46px; height: 46px; flex: 0 0 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; border-radius: 10px; background: #241d16;
}
.p-main { flex: 1; min-width: 0; }
.p-name { font-weight: 600; }
.p-desc { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-price { color: var(--gold); font-weight: 700; margin-top: 2px; }
.p-ctl { display: flex; align-items: center; gap: 8px; }
.p-ctl button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gold); background: transparent; color: var(--gold);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.p-ctl button:disabled { opacity: .3; border-color: var(--line); color: var(--dim); }
.p-qty { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.cart {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(20, 16, 12, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.cart-left { flex: 1; }
.cart-total { font-size: 13px; color: var(--dim); }
.cart-total b { font-size: 20px; color: var(--gold); }
.cart-count { font-size: 12px; color: var(--dim); }
.btn {
  border: 0; border-radius: 10px; padding: 12px 18px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn.primary { background: linear-gradient(135deg, #d8b45c, #a8823a); color: #201a10; }
.btn.primary:disabled { background: #2b2419; color: #6a6152; }
.btn.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); }
.btn.block { width: 100%; margin-top: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 16px; margin-bottom: 14px;
}
.pay-title { text-align: center; color: var(--dim); font-size: 13px; }
.pay-amount { text-align: center; font-size: 34px; font-weight: 700; color: var(--gold); margin: 4px 0 8px; }
.pay-no { text-align: center; font-size: 12px; color: var(--dim); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.qr-wrap { display: flex; justify-content: center; margin: 6px 0 14px; }
.qr-wrap img { width: 220px; max-width: 72vw; border-radius: 10px; background: #fff; padding: 8px; }
.qr-empty {
  width: 100%; padding: 22px; text-align: center; font-size: 13px;
  color: var(--dim); border: 1px dashed var(--line); border-radius: 10px;
}
.pay-tips { font-size: 12px; color: var(--dim); line-height: 1.7; margin-bottom: 6px; }
.wait-title { font-weight: 600; color: var(--gold); }
.wait-sub { font-size: 12px; color: var(--dim); margin-top: 4px; }
.wait-code { margin-top: 10px; font-size: 26px; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.foot { text-align: center; font-size: 12px; color: var(--dim); padding-bottom: 40px; }
.hidden { display: none !important; }
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, .85); color: #fff; padding: 10px 16px;
  border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s; max-width: 80vw; text-align: center; z-index: 99;
}
.toast.show { opacity: 1; }
