:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --ink: #1d1a14;
  --muted: #6f685a;
  --line: #e8e1d0;
  --accent: #e8a200;
  --accent-ink: #2a1f00;
  --accent-soft: #fff3d1;
  --ok: #1f8a4c;
  --ok-soft: #e3f5ea;
  --bad: #c0392b;
  --bad-soft: #fde8e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 45, 10, .06), 0 8px 24px rgba(60, 45, 10, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120d; --surface: #1d1a13; --ink: #f2ecdc; --muted: #a39b87; --line: #33301f;
    --accent: #f2b620; --accent-ink: #1d1500; --accent-soft: #3a2f0d;
    --ok: #4cc27f; --ok-soft: #14301f; --bad: #ff7b6b; --bad-soft: #3a1b17;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: .5px; }
.hex { color: var(--accent); margin-right: 2px; }
nav { display: flex; gap: 4px; }
button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; color: var(--muted); padding: 8px 10px; border-radius: 8px; }
.link:hover { color: var(--ink); background: var(--accent-soft); }
.back { margin: 14px 0 6px -10px; }
.mock { background: var(--accent-soft); color: var(--ink); text-align: center; font-size: 13px; padding: 6px 12px; border-bottom: 1px solid var(--line); }

.hero { padding: 40px 0 12px; }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.2; margin: 0 0 14px; letter-spacing: -.5px; }
.sub { color: var(--muted); margin: 0; max-width: 34em; }
.sub b { color: var(--ink); }
.sec { font-size: 15px; color: var(--muted); font-weight: 600; margin: 32px 0 12px; letter-spacing: .5px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.skeleton { color: var(--muted); padding: 24px 0; }
.price {
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); color: var(--ink); transition: transform .12s, border-color .12s;
  display: flex; flex-direction: column; gap: 4px;
}
.price:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); }
.price:disabled { opacity: .6; cursor: wait; }
.price .name { font-weight: 600; }
.price .amt { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.price .amt small { font-size: 14px; font-weight: 500; color: var(--muted); }
.price .meta { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.price .buy { margin-top: 8px; background: var(--accent); color: var(--accent-ink); text-align: center; font-weight: 600; border-radius: 10px; padding: 8px; }

.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 36px 0 8px; }
.how div { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.how b { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); display: grid; place-items: center; font-size: 13px; }
@media (max-width: 520px) { .how { grid-template-columns: repeat(2, 1fr); } }
.faq { margin: 24px 0 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.faq p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.faq b { color: var(--ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; }
.card h2 { margin: 0 0 4px; font-size: 20px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--muted); font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.row:last-of-type { border-bottom: 0; }
.row b { color: var(--ink); font-weight: 600; }
.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); margin-left: 8px; vertical-align: 2px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

.pay { display: grid; place-items: center; gap: 12px; padding: 16px 0 4px; text-align: center; }
.qr { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); line-height: 0; }
.qr svg { width: 220px; height: 220px; }
.amount { font-size: 32px; font-weight: 800; }
.hint { color: var(--muted); font-size: 14px; }

.phone { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.phone .v { font: 600 20px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; flex: 1; word-break: break-all; }
.codebox { text-align: center; background: var(--ok-soft); border-radius: 12px; padding: 18px; margin: 12px 0; }
.codebox .v { font: 800 40px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 6px; color: var(--ok); }
.codebox .t { color: var(--muted); font-size: 13px; margin-top: 8px; word-break: break-word; }
.waiting { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--accent-soft); border-radius: 12px; margin: 12px 0; }
.spin { width: 18px; height: 18px; border: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: s 0.9s linear infinite; flex: none; }
@keyframes s { to { transform: rotate(360deg); } }
.note { padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); margin: 12px 0; font-size: 14px; }
.note.ok { background: var(--ok-soft); color: var(--ok); }

.btn { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 600; padding: 10px 18px; border-radius: 10px; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 6px 12px; font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.list { display: grid; gap: 10px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; text-align: left; color: var(--ink); width: 100%; }
.item:hover { border-color: var(--accent); }
.item .l { display: flex; flex-direction: column; }
.item .l small { color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

.foot { padding: 24px 16px 48px; color: var(--muted); font-size: 13px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; font-size: 14px; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

table.adm { width: 100%; border-collapse: collapse; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.adm th, .adm td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-wrap { overflow-x: auto; }
.wrap.wide { max-width: 1600px; }              /* 后台：表格列多，放宽页面 */
.adm td.wrap-cell { white-space: normal; min-width: 160px; }  /* 备注较长时换行，避免撑出横向滚动条 */

/* ---- 单品页 ---- */
.product { margin-top: 20px; }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.p-name { font-weight: 700; font-size: 18px; }
.p-price { text-align: right; font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.p-price s { display: block; font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.coupon { display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; }
.coupon > span { color: var(--muted); font-size: 14px; flex: none; }
.coupon input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; text-transform: uppercase; }
.coupon input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint.good { color: var(--ok); }
.hint.bad { color: var(--bad); }
.btn.big { width: 100%; padding: 14px; font-size: 17px; margin-top: 14px; }
.perks { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.perks li { margin: 2px 0; }
.phone .dial { font: 700 18px/1 ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }
