/* AOB CAKE · 样式预览
 * 方向: 编辑感极简 + 水彩插画(参照 Breadly 面包店点单)。移动端优先, 桌面居中成一列。
 * 字阶 1.25: 13 / 16 / 20 / 25 / 31 · 间距 4px 栅格 · 圆角两档 16 / 999 · 阴影两级 */
:root {
  --bg: #F4F2EE;
  --surface: #FFFEFC;
  --paper: #FFFEFA;
  --ink: #3B2A1F;          /* 取自 logo */
  --ink-2: #6B5D52;
  --ink-3: #74685E;          /* 在页面底上 4.84:1 */
  --line: #E4DED6;
  --accent: #FF6A2A;       /* 取自 logo 的橙, 只做点缀 */
  --on-ink: #FBF8F4;
  --danger: #B3261E;       /* 只用在表单报错 */
  --sh-1: 0 1px 2px rgba(59, 42, 31, .06), 0 4px 12px rgba(59, 42, 31, .05);
  --sh-2: 0 8px 24px rgba(59, 42, 31, .12);
  --r: 16px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* 所有页面只许上下滑，整页不许左右漂（蛋糕卡片条、详情相册、会员卡片这几个是故意横滑的，在它们自己里面滑） */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.locked { position: fixed; left: 0; right: 0; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

/* :where 把优先级压到 0，各处 .xxx svg 的尺寸才能覆盖它 */
svg:where(:not(.cake):not(.tray-art)) {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* 桌面上也只是一列手机宽的店 */
.bar, main { max-width: 480px; margin: 0 auto; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 64px; padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
}
.bar-right { justify-self: end; }
.brand { display: flex; align-items: center; gap: 6px; min-width: 0; text-decoration: none; color: inherit; }
.brand img { display: block; height: 28px; width: auto; flex: none; }
.brand-x { font-size: 14px; color: var(--ink-3); }
.brand .brand-jimi { height: 30px; width: 30px; border-radius: 8px; }
.brand-jimi-t { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.icon-btn {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--sh-1);
}
.icon-btn.sm { width: 32px; height: 32px; box-shadow: none; background: var(--bg); }
.icon-btn.sm svg { width: 16px; height: 16px; }
.bag-dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent); box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- 开头 ---------- */
.intro { padding: 8px 16px 0; text-align: center; }
.intro h1 {
  margin-top: 16px;
  font-size: 31px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em;
}
.lede { margin: 8px auto 0; max-width: 20em; font-size: 16px; color: var(--ink-2); }
.paused {
  display: inline-block; margin-top: 12px; padding: 8px 16px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--sh-1); font-size: 13px; color: var(--ink);
}
/* 分类多了(加了榴莲)一行放不下：「全部」固定在左边，其余横着滑；放得下时整排居中。
 * 右边还有分类时盖一层渐隐 + 箭头告诉顾客能往右滑(10-03 用户要求) */
.cat-bar { position: relative; display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.cat-bar > .chip { flex: none; }
.chips { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips.scrolled { -webkit-mask-image: linear-gradient(to right, transparent, #000 20px); mask-image: linear-gradient(to right, transparent, #000 20px); }
.chips-more {
  position: absolute; right: 0; top: 0; width: 48px; height: 32px;
  display: flex; align-items: center; justify-content: flex-end;
  background: linear-gradient(to right, rgb(244 242 238 / 0), var(--bg) 60%);
}
.chips-more[hidden] { display: none; }
.chips-more svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .chips-more svg { animation: none; } }
.chip {
  flex: none; white-space: nowrap;
  height: 32px; padding: 0 16px; border-radius: 999px;
  font-size: 13px; color: var(--ink-2);
  border: 1px solid transparent;
  transition: background-color .15s ease-out, border-color .15s ease-out;
}
.chip[aria-selected="true"] { background: var(--surface); border-color: var(--ink); color: var(--ink); font-weight: 600; }

/* ---------- 货架 ---------- */
.shelf { margin-top: 16px; }
.rail {
  display: flex; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain;
  /* 不吸附：自动滚动是连续的小步位移，开着 snap 会被一直吸回格子 */
  padding: 12px 16px 28px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.card {
  position: relative; flex: 0 0 128px;
  padding: 12px 8px 28px; border-radius: var(--r);
  background: var(--surface); box-shadow: var(--sh-1);
  text-align: center;
}
.card-art { aspect-ratio: 200 / 160; }
.card-art .cake { width: 100%; height: 100%; display: block; }
/* 后台上传的真图：跟插画同一个画框，整张放进去不裁 */
.cake-img { aspect-ratio: 200 / 160; object-fit: contain; -webkit-user-drag: none; user-select: none; }

/* 货架加载中 / 出错 / 没货 */
.rail-msg {
  flex: 1; display: grid; place-items: center; gap: 12px; min-height: 184px;
  font-size: 16px; color: var(--ink-2); text-align: center;
}
.rail-msg .chip { border-color: var(--line); background: var(--surface); color: var(--ink); }
.card h3 { margin-top: 4px; font-size: 13px; line-height: 1.4; font-weight: 600; }
.price { font-size: 13px; line-height: 1.4; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.price span { margin-left: 4px; color: var(--ink-3); }
.add {
  position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%);
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--sh-2);
  transition: transform .15s ease-out;
}
.add:active { transform: translateX(-50%) scale(.92); }
.add svg { width: 18px; height: 18px; stroke-width: 2; }

.track { position: relative; height: 2px; margin: 4px 16px 0; border-radius: 999px; background: var(--line); }
.thumb {
  position: absolute; left: 0; top: -1px; height: 4px; border-radius: 999px;
  background: var(--ink-2); will-change: transform;
}

/* ---------- 托盘 ---------- */
.tray-wrap { position: relative; margin-top: 32px; padding: 0 16px 28px; }
.tray { position: relative; aspect-ratio: 400 / 170; }
.tray-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.tray-slots {
  position: absolute; left: 9%; right: 9%; top: -14%; height: 88%;
  display: flex; justify-content: center; align-items: flex-end; gap: 0;
}
.slot-item { position: relative; width: 40%; margin: 0 -3%; }
.tray-slots[data-n="1"] .slot-item { width: 48%; }
.slot-item .cake { display: block; width: 100%; height: auto; }
.badge {
  position: absolute; bottom: 10%; right: 8%;
  min-width: 28px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink);
  font-size: 13px; line-height: 22px; font-weight: 600; text-align: center;
  font-variant-numeric: tabular-nums;
}
/* 托盘上每块左上角的 ×：看着 24px，点的范围 44px */
.slot-del {
  position: absolute; top: 8%; right: 6%; z-index: 2;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2); box-shadow: var(--sh-1);
}
.slot-del::before { content: ""; position: absolute; inset: -10px; }
.slot-del svg { width: 14px; height: 14px; stroke-width: 2.25; }
.more {
  position: absolute; right: -4%; top: 4%;
  height: 24px; padding: 0 8px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--sh-1);
  font-size: 13px; line-height: 24px; color: var(--ink-2);
}
.tray-empty {
  position: absolute; left: 12%; right: 12%; top: 45%;
  text-align: center; font-size: 13px; color: var(--ink);
  opacity: .72;
}
.ghost { position: fixed; z-index: 48; pointer-events: none; will-change: transform; }
.ghost .cake { width: 100%; height: 100%; display: block; }

.cta {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink);
  font-size: 16px; font-weight: 600; white-space: nowrap;
  box-shadow: var(--sh-2);
  transition: opacity .15s ease-out;
}
.cta svg { width: 18px; height: 18px; }
.cta:disabled { opacity: .4; box-shadow: none; }
.cta:not(:disabled):active { opacity: .88; }

.note { margin: 24px 16px 48px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- 小票 ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.scrim {
  position: absolute; inset: 0;
  background: rgba(59, 42, 31, .32);
  opacity: 0; transition: opacity .2s ease-out;
}
.receipt-box {
  position: absolute; left: 16px; right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 400px; margin: 0 auto;
}
.slot {
  position: relative; z-index: 1;
  height: 16px; margin: 0 -8px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--sh-2), inset 0 -6px 0 -3px #D9D2C8;
}
.paper-clip {
  margin-top: -8px; padding: 0 0 16px;
  overflow: hidden;
  filter: drop-shadow(0 8px 16px rgba(59, 42, 31, .14));
}
/* 小票高度固定：标题、合计、结算按钮不随品种多少移动，品种多了只在中间列表里上下滑 */
.paper {
  display: flex; flex-direction: column;
  height: min(540px, calc(100dvh - 96px));
  padding: 24px 20px 32px;
  background: var(--paper);
  transform: translateY(-101%);
  transition: transform .26s var(--ease-out);
  /* 撕纸锯齿边 */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat,
                conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat,
                conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x;
}
.sheet.open .scrim { opacity: 1; }
.sheet.open .paper { transform: none; }

.paper-head { display: flex; align-items: center; gap: 8px; flex: none; }
.paper-head h2 { flex: 1; font-size: 20px; line-height: 1.25; font-weight: 700; outline: none; }

.pane {
  flex: 1; min-height: 0; margin-top: 12px;
  /* 只许上下滑：不写 overflow-x 的话会跟着变成 auto，里面宽一点就能左右晃 */
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--line);
}
/* 能滑的方向边缘淡出，提示上面/下面还有 */
.pane.more-up   { -webkit-mask: linear-gradient(transparent, #000 24px); mask: linear-gradient(transparent, #000 24px); }
.pane.more-down { -webkit-mask: linear-gradient(#000 calc(100% - 32px), transparent); mask: linear-gradient(#000 calc(100% - 32px), transparent); }
.pane.more-up.more-down { -webkit-mask: linear-gradient(transparent, #000 24px, #000 calc(100% - 32px), transparent); mask: linear-gradient(transparent, #000 24px, #000 calc(100% - 32px), transparent); }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li:last-child { border-bottom: 0; }
.lines li {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n s" "p s";
  column-gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.ln-name { grid-area: n; font-size: 16px; line-height: 1.4; font-weight: 600; }
.ln-name span { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.ln-price { grid-area: p; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stepper { grid-area: s; display: flex; align-items: center; gap: 4px; }
.stepper button {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--line);
}
.stepper button svg { width: 14px; height: 14px; stroke-width: 2; }
.stepper output { min-width: 24px; text-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lines-empty { display: grid; place-items: center; height: 100%; min-height: 80px; font-size: 16px; color: var(--ink-2); }

.sum { flex: none; margin: 12px 0 0; }
.sum div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 16px; }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.sum .muted { color: var(--ink-3); font-size: 13px; line-height: 25.6px; }
.sum .total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 20px; font-weight: 700; }
.sum .total dt { color: var(--ink); }


.cta-inline { position: static; transform: none; width: 100%; margin-top: 24px; flex: none; }
.cta-inline[aria-busy="true"] { opacity: .7; }

/* ---------- 结算 ---------- */
.ck { padding-bottom: 16px; }
.field { margin-top: 20px; }
.field:first-child { margin-top: 4px; }
/* 联系人 + 手机号并排；报错字各在各的格子下面 */
.field-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; margin-top: 20px; align-items: start; }
.field-row > .field { min-width: 0; margin-top: 0; }
.field-label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.field-label span { margin-left: 4px; color: var(--ink-3); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.seg button { height: 40px; border-radius: 999px; font-size: 16px; color: var(--ink-2); transition: background-color .15s ease-out; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1); }
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 12px 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); text-align: left;
}
.opt b { display: block; font-size: 16px; font-weight: 600; }
.opt small { display: block; font-size: 13px; color: var(--ink-3); }
.opt svg { opacity: 0; width: 18px; height: 18px; stroke-width: 2.25; }
.opt[aria-checked="true"] { border-color: var(--ink); }
.opt[aria-checked="true"] svg { opacity: 1; }
/* 收货地址：搜索 + 定位 + 联想列表 + 选中卡片 + 门牌号 */
.place-row { display: flex; gap: 8px; }
.place-row .input { flex: 1; min-width: 0; }
.loc {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  height: 48px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; color: var(--ink);
}
.loc svg { width: 16px; height: 16px; }
.loc[aria-busy="true"] { opacity: .6; }
.sugs { list-style: none; margin: 8px 0 0; padding: 4px 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.sugs li + li { border-top: 1px dashed var(--line); }
.sugs button { display: block; width: 100%; padding: 8px 12px; text-align: left; }
.sugs b { display: block; font-size: 16px; font-weight: 600; }
.sugs small, .sug-head { display: block; font-size: 13px; color: var(--ink-3); }
.sug-head { padding: 4px 12px; }
.picked {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--ink); background: var(--surface);
}
.picked span { min-width: 0; }
.picked b { display: block; font-size: 16px; font-weight: 600; }
.picked small { display: block; font-size: 13px; color: var(--ink-3); }
.picked button { flex: none; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.door { margin-top: 8px; }
.lead { margin-bottom: 8px; padding: 8px 12px; border-radius: var(--r); background: var(--bg); font-size: 13px; color: var(--ink); }
/* 日期不横滑(9-26 老板要求页面不许左右漂)：放不下就换行 */
.dates {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px;
  padding: 2px 0 4px;
}
.date {
  min-width: 0; padding: 8px 0; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); text-align: center;
}
.date b { display: block; font-size: 13px; font-weight: 600; }
.date small { display: block; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.date[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.date[aria-checked="true"] small { color: var(--on-ink); opacity: .8; }
.date:disabled, .slot2:disabled { opacity: .38; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.slot2 {
  height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.slot2[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); font-weight: 600; }
.input {
  display: block; width: 100%; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  font: inherit; font-size: 16px; line-height: 1.5; color: var(--ink);   /* ≥16px, iOS 点进去不会整页放大 */
  resize: none; transition: border-color .15s ease-out;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--ink); }
.err { margin-top: 4px; font-size: 13px; color: var(--danger); }
.field.invalid .input, .field.invalid .opt, .field.invalid .slot2:not(:disabled), .field.invalid .date:not(:disabled) { border-color: var(--danger); }
.ck-note { margin-top: 20px; font-size: 13px; color: var(--ink-3); }

.done { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 8px; }
.done-icon { width: 40px; height: 40px; stroke-width: 1.5; }
.done-title { margin-top: 8px; font-size: 20px; font-weight: 700; }
.done-status { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.done[data-status="cancelled"] .done-code { color: var(--ink-3); text-decoration: line-through; }

/* ---------- 我下过的单 ---------- */
.mine-list { list-style: none; margin: 0; padding: 0; }
.mine-list li { border-bottom: 1px dashed var(--line); }
.mine-list li:last-child { border-bottom: 0; }
.mine-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 64px; padding: 12px 0; text-align: left;
}
.mine-main { flex: 1; min-width: 0; }
.mine-thumb { width: 44px; height: 44px; }
.mine-main b { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mine-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-3); }
.mine-side { flex: none; text-align: right; }
.mine-side em { display: block; font-style: normal; font-size: 13px; font-weight: 600; }
.mine-side em[data-status="cancelled"], .mine-side em[data-status="done"] { font-weight: 400; color: var(--ink-3); }
.mine-side small { display: block; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mine-row.is-gone { color: var(--ink-3); }
.mine-row.is-loading span { display: block; width: 60%; height: 16px; border-radius: 999px; background: var(--bg); }
.done-code-label { margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.done-code { font-size: 39px; line-height: 1.2; font-weight: 700; letter-spacing: .2em; font-variant-numeric: tabular-nums; padding-left: .2em; }
.done-info { align-self: stretch; margin: 16px 0 0; border-top: 1px dashed var(--line); text-align: left; }
.done-info div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.done-info dt { flex: none; color: var(--ink-3); }
.done-info dd { margin: 0; text-align: right; }

/* ---------- 蛋糕详情 ----------
 * det-bg 是一块纯白底板，从卡片的位置和大小 scale 到全屏(只动 transform，里面没内容所以不会被拉变形)；
 * 蛋糕图单独从卡片图的位置飞到顶部；文字和底栏等底板铺开后再淡入。 */
.card { cursor: pointer; }
.card:active { transform: scale(.98); }
.card { transition: transform .15s ease-out; }
.detail { position: fixed; inset: 0; z-index: 45; }
.det-scrim { position: absolute; inset: 0; background: rgba(59, 42, 31, .18); opacity: 0; transition: opacity .3s ease-out; }
.det-bg {
  position: absolute; left: 0; top: 0; width: 100vw; height: 100vh;
  background: var(--surface); transform-origin: 0 0; will-change: transform;
}
.det-page { position: absolute; inset: 0; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; }
.det-top {
  position: absolute; z-index: 2; left: 0; right: 0;
  top: env(safe-area-inset-top); height: 64px; padding: 0 16px;
  display: flex; align-items: center;
}
.det-top .icon-btn { opacity: 0; transition: opacity .2s ease-out; }
.det-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-top: calc(64px + env(safe-area-inset-top)); }
.det-hero { display: grid; place-items: center; padding: 8px 16px 0; }
.det-art { width: min(84vw, 360px); aspect-ratio: 200 / 160; }
.det-art .cake { display: block; width: 100%; height: 100%; }
/* 多图相册：横向一张一张吸住，不露滚动条 */
.gal {
  display: flex; width: 100%; height: 100%;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; border-radius: var(--r);
}
.gal::-webkit-scrollbar { display: none; }
.gal .cake { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.gal-dots { display: flex; justify-content: center; gap: 6px; height: 16px; padding-top: 10px; }
.gal-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: background-color .15s ease-out; }
.gal-dots i.on { background: var(--ink); }
.det-text { padding: 24px 24px 32px; }
.det-cat {
  display: inline-block; height: 24px; padding: 0 8px; border-radius: 999px;
  background: var(--bg); font-size: 13px; line-height: 24px; color: var(--ink-2);
}
.det-text h2 { margin-top: 12px; font-size: 31px; line-height: 1.2; font-weight: 700; }
.det-price { margin-top: 8px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.det-price span { margin-left: 8px; font-size: 16px; font-weight: 400; color: var(--ink-3); }
.det-desc { margin-top: 16px; font-size: 16px; line-height: 1.75; color: var(--ink-2); max-width: 34em; }
.det-info { margin: 24px 0 0; border-top: 1px dashed var(--line); }
.det-info div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 16px; }
.det-info dt { color: var(--ink-3); flex: none; }
.det-info dd { margin: 0; text-align: right; }
.det-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); box-shadow: 0 -1px 0 var(--line);
}
.det-bar .stepper button { width: 44px; height: 44px; }
/* 按个卖(榴莲)：选具体哪一个果，不要数量加减 */
.det-units { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.by-unit .det-units { display: grid; }
.by-unit .det-bar .stepper { display: none; }
.det-unit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); text-align: left; }
.det-unit b { font-size: 15px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det-unit span { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.det-unit[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.det-unit[aria-checked="true"] span { color: var(--on-ink); opacity: .8; }
.det-unit:disabled { opacity: .45; }
.det-add:disabled { opacity: .5; }
.det-add { flex: 1; min-width: 0; margin-top: 0; padding: 0 12px; overflow: hidden; text-overflow: ellipsis; }   /* 320 宽时别把底栏撑出屏幕 */
.fade { opacity: 0; transform: translateY(16px); transition: opacity .2s ease-in, transform .2s ease-in; }
.detail.open .det-scrim, .detail.open .det-top .icon-btn { opacity: 1; }
.detail.open .fade { opacity: 1; transform: none; transition: opacity .24s ease-out .14s, transform .3s var(--ease-out) .14s; }
.detail.closing .fade, .detail.closing .det-top .icon-btn { opacity: 0; transform: none; transition: opacity .09s ease-in; }
.det-page:focus { outline: none; }

/* 卡片整张可点：名字是真按钮(键盘能到)，::after 撑满整张卡；+ 号压在上面单独响应 */
.card h3 { position: static; }
.card-open { font-weight: inherit; }
.card-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.card-open:focus-visible { outline: none; }
.card-open:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; }
.add { z-index: 1; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 8px);
  padding: 8px 16px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink); font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (hover: hover) {
  .icon-btn:hover, .add:hover { box-shadow: var(--sh-2); }
  .chip:hover { border-color: var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

@media (min-width: 420px) {
  .card { flex-basis: 136px; }
}

/* ---------- 积分抵扣开关 / 常用地址 ---------- */
.sw { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); transition: background-color .15s ease-out; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: var(--sh-1); transition: transform .15s ease-out; }
.sw[aria-checked="true"] { background: var(--ink); }
.sw[aria-checked="true"]::after { transform: translateX(20px); }
.pts-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 16px; }
.sum .off { display: block; font-size: 13px; font-weight: 400; color: var(--ink-3); text-align: right; line-height: 1.2; }
.book { margin-bottom: 8px; }
.book + #ckPicker { margin-top: 8px; }

/* ---------- 我的 ---------- */
.me { position: fixed; inset: 0; z-index: 45; }
.me-page {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); outline: none;
  transform: translateX(-100%); transition: transform .24s var(--ease-out);
}
.me.open .me-page { transform: none; }
.me-top { flex: none; display: flex; align-items: center; gap: 4px; height: 64px; padding: 0 12px; padding-top: env(safe-area-inset-top); }
.me-top h2 { font-size: 20px; font-weight: 700; }
.me-body { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); max-width: 480px; width: 100%; margin: 0 auto; }
.me-head { display: flex; align-items: center; gap: 12px; padding: 8px 0 16px; }
.me-av { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); object-fit: cover; color: var(--ink-3); }
.me-av svg { width: 28px; height: 28px; }
.me-who { min-width: 0; }
.me-who b { display: block; font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who small { display: block; font-size: 13px; color: var(--ink-3); }
.me-hint { margin-bottom: 16px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.me-login { margin: 0 0 16px; }
.me-card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border-radius: var(--r);
  background: var(--surface); box-shadow: var(--sh-1); text-align: left;
}
.me-card.flat { margin-bottom: 16px; }
.me-pts { flex: 1; }
.me-pts small { display: block; font-size: 13px; color: var(--ink-3); }
.me-pts b { display: block; font-size: 31px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.me-rule { font-size: 13px; line-height: 1.6; color: var(--ink-3); text-align: right; }
.chev { width: 18px; height: 18px; color: var(--ink-3); }
.me-list { margin-top: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; }
.me-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; font-size: 16px; text-align: left; }
.me-list button + button { border-top: 1px solid var(--line); }
.me-list span { flex: 1; }
.me-list em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.me-logout { display: block; margin: 32px auto 0; padding: 12px; font-size: 13px; color: var(--ink-3); }
.me-empty { padding: 32px 0; text-align: center; font-size: 16px; color: var(--ink-2); }
.me-empty .me-login { margin-top: 16px; }
.me-ledger { list-style: none; margin: 0; padding: 0 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.me-ledger li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.me-ledger li + li { border-top: 1px dashed var(--line); }
.me-ledger b { display: block; font-size: 16px; font-weight: 600; }
.me-ledger small { display: block; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.me-ledger em { font-style: normal; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.me-ledger em.plus { color: var(--accent); }
/* 「我的」首页(10-03 改宫格)：资产三格一张卡 + 我的订单 / 常用功能两块图标宫格，一排四个 */
.me-assets { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 12px 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.me-asset { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 4px 8px; }
.me-asset + .me-asset { border-left: 1px solid var(--line); }
.me-asset b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; line-height: 1.25; font-weight: 700; font-variant-numeric: tabular-nums; }
.me-asset small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-3); }
.me-panel { margin-top: 12px; padding: 16px 4px 4px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.me-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px; }
.me-panel-head b { font-size: 16px; font-weight: 600; }
.me-panel-head button { display: inline-flex; align-items: center; gap: 2px; padding: 4px 0; font-size: 13px; color: var(--ink-3); }
.me-panel-head .chev { width: 16px; height: 16px; }
.me-icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.me-ic { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 8px 0 12px; border-radius: 12px; }
.me-ic-i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #F6EEE7; color: var(--ink); }
.me-ic-i svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.me-ic-t { font-size: 13px; line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.me-ic small { margin-top: -6px; font-size: 13px; line-height: 1.3; color: #B8430F; white-space: nowrap; }
.me-ic.hot .me-ic-i { background: #FFE6D9; color: #B8430F; }
.me-badge { position: absolute; top: 2px; left: calc(50% + 12px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; font-size: 13px; line-height: 20px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.me-badge[hidden] { display: none; }
@media (hover: hover) { .me-ic:hover .me-ic-i, .me-asset:hover b { filter: brightness(.97); } }
/* 余额(10-03)：「我的」里积分卡下面一张；余额页充值档位一排三个 */
.rc-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rc-plan { padding: 12px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.rc-plan b { display: block; font-size: 20px; line-height: 1.3; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-plan small { display: block; font-size: 13px; color: #B8430F; }
.rc-plan[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rc-go { margin-top: 16px; }
.rc-fine { margin: 8px 4px 0; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.me-addrs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.me-addr { padding: 12px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.me-addr b { display: block; font-size: 16px; font-weight: 600; }
.me-addr small { display: block; font-size: 13px; color: var(--ink-3); }
.me-addr-ops { display: flex; align-items: center; gap: 16px; margin-top: 8px; font-size: 13px; }
.me-addr-ops button { padding: 4px 0; color: var(--ink-2); }
.me-addr-ops .tag { padding: 0 8px; border-radius: 999px; background: var(--ink); color: var(--on-ink); line-height: 22px; }
.me-form .cta-inline { margin-top: 24px; }
.me-check { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 16px; }
.me-check input { width: 20px; height: 20px; accent-color: var(--ink); }

/* 个人中心 · 我的订单 */
.me-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.me-chips::-webkit-scrollbar { display: none; }
.me-chips .chip { flex: none; border: 1px solid var(--line); background: var(--surface); }
.me-chips .chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.me-orders { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.me-order { display: block; width: 100%; padding: 12px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); text-align: left; }
.mo-top, .mo-bot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mo-top b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mo-top em { flex: none; font-style: normal; font-size: 13px; font-weight: 600; }
.mo-top em[data-status="done"], .mo-top em[data-status="cancelled"] { font-weight: 400; color: var(--ink-3); }
/* 订单商品图: 方块里放商品封面(裁满)或手绘蛋糕 */
.mo-thumb { position: relative; flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--bg); overflow: hidden; }
.mo-thumb .cake { width: 100%; height: 100%; }
.mo-thumb .cake-img { object-fit: cover; }
.mo-thumb i { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 999px; background: rgba(59, 42, 31, .78); color: #fff; font-style: normal; font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; }
.mo-thumbs { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.mo-more { font-size: 13px; color: var(--ink-3); }
.mo-list { list-style: none; margin: 12px 0 0; padding: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.mo-list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.mo-list li + li { border-top: 1px dashed var(--line); }
.mo-name { flex: 1; min-width: 0; }
.mo-name b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-name small, .mo-qty small { display: block; font-size: 13px; color: var(--ink-3); }
.mo-qty { flex: none; text-align: right; }
.mo-qty b { font-size: 15px; font-variant-numeric: tabular-nums; }
.mo-items { display: block; margin: 4px 0; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-bot small { font-size: 13px; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-bot b { flex: none; font-size: 16px; font-variant-numeric: tabular-nums; }
.mo-hero .me-pts b { font-size: 25px; }
.mo-code { text-align: right; }
.mo-code small { display: block; font-size: 13px; color: var(--ink-3); }
.mo-code b { display: block; font-size: 31px; line-height: 1.2; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.mo-hero[data-status="cancelled"] .mo-code b { color: var(--ink-3); text-decoration: line-through; }
.me-dl { margin-top: 12px; padding: 0 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); border-top: 0; }
.me-dl div:last-child { border-bottom: 0; }
.me-sum { margin: 12px 0 0; padding: 8px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.me-sum div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 16px; }
.me-sum dt { color: var(--ink-2); }
.me-sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.me-sum .total { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; font-size: 20px; }
.me-sum .total dt { color: var(--ink); }

/* 个人信息 */
.pf-wx { gap: 12px; }
.pf-wx .me-who small { font-size: 13px; color: var(--ink-3); }
.pf-wx .me-who b { font-size: 16px; }
.pf-from { flex: none; margin-left: auto; font-size: 13px; color: var(--ink-3); }
.bd-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr); gap: 8px; }
.bd-row select.input { padding-left: 12px; padding-right: 28px; background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; }
/* 「我的」页面底部固定按钮(个人信息的保存) */
.me-foot { flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.me-foot .cta-inline { margin: 0 auto; max-width: 448px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.pf-sec { margin-top: 32px; }
.pf-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pf-sec-head b { font-size: 16px; font-weight: 700; }
.pf-sec-head button { display: inline-flex; align-items: center; gap: 2px; padding: 8px 0; font-size: 13px; color: var(--ink-2); }
.pf-none { padding: 16px; border-radius: var(--r); background: var(--surface); font-size: 13px; color: var(--ink-3); }

/* ---------- 会员中心 ----------
 * 四个等级用品牌深棕的深浅区分(普通最浅、黑卡就是品牌深棕)，不另加颜色 */
.lv-0 { --lv-bg: var(--surface); --lv-fg: var(--ink); --lv-sub: var(--ink-3); }
.lv-1 { --lv-bg: #E9E3DB; --lv-fg: var(--ink); --lv-sub: var(--ink-2); }
.lv-2 { --lv-bg: #C9A77C; --lv-fg: #2A1D15; --lv-sub: #4A3A2E; }
.lv-3 { --lv-bg: var(--ink); --lv-fg: var(--on-ink); --lv-sub: #CDBFB3; }
.mb-mini {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; padding: 16px; border-radius: var(--r);
  background: var(--lv-bg); color: var(--lv-fg); box-shadow: var(--sh-1); text-align: left;
}
.mb-mini span:first-child { flex: none; }
.mb-mini small { display: block; font-size: 13px; color: var(--lv-sub); }
.mb-mini b { display: block; font-size: 20px; font-weight: 700; }
.mb-mini-next { flex: 1; min-width: 0; font-size: 13px; color: var(--lv-sub); text-align: right; }
.mb-mini .chev { color: var(--lv-sub); }
/* 等级标签 + 左右滑的卡片(露出下一张一角，提示能滑) */
.mb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.mb-tabs::-webkit-scrollbar { display: none; }
.mb-tabs .chip { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); }
.mb-tabs .chip[aria-selected="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.mb-tabs .chip i { font-style: normal; padding: 0 5px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 11px; line-height: 16px; font-weight: 400; }
.mb-cards {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 4px 16px 16px; scroll-padding: 0 16px; scrollbar-width: none;
}
.mb-cards::-webkit-scrollbar { display: none; }
.mb-cards .mb-card { flex: 0 0 86%; scroll-snap-align: center; }
.mb-h small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.mb-card {
  position: relative; overflow: hidden; padding: 20px; border-radius: 16px; aspect-ratio: 1.7;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--lv-bg); color: var(--lv-fg); box-shadow: var(--sh-2);
}
.mb-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 999px; border: 1px solid currentColor; opacity: .12; }
.mb-top { display: flex; justify-content: space-between; align-items: baseline; }
.mb-brand { font-size: 13px; letter-spacing: .08em; color: var(--lv-sub); }
.mb-name { font-size: 25px; font-weight: 700; }
.mb-mid b { display: block; font-size: 20px; font-weight: 700; }
.mb-mid small { display: block; font-size: 13px; color: var(--lv-sub); font-variant-numeric: tabular-nums; }
.mb-bar { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--lv-fg) 15%, transparent); overflow: hidden; }
.mb-bar i { display: block; height: 100%; border-radius: 999px; background: var(--lv-fg); }
.mb-next { font-size: 13px; color: var(--lv-sub); }
.mb-next b { color: var(--lv-fg); font-variant-numeric: tabular-nums; }
.mb-h { margin: 24px 0 8px; font-size: 16px; font-weight: 700; }
.mb-perks, .mb-levels, .mb-rules { list-style: none; margin: 0; padding: 0; }
.mb-perks { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-perks li { padding: 8px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); font-size: 13px; font-weight: 600; }
.mb-levels { border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; }
.mb-levels li { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "lv need" "lv perk"; column-gap: 12px; align-items: center; padding: 12px 16px; }
.mb-levels li + li { border-top: 1px dashed var(--line); }
.mb-levels li.is-cur { background: var(--bg); }
.mb-lv { grid-area: lv; min-width: 72px; padding: 4px 10px; border-radius: 999px; background: var(--lv-bg); color: var(--lv-fg); font-size: 13px; font-weight: 700; text-align: center; box-shadow: inset 0 0 0 1px var(--line); }
.mb-lv-need { grid-area: need; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mb-lv-perk { grid-area: perk; font-size: 13px; color: var(--ink-3); }
.mb-levels li.is-cur .mb-lv-need::after { content: "当前"; margin-left: 8px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 400; }
.mb-rules { padding: 12px 16px; border-radius: var(--r); background: var(--surface); }
.mb-rules li { position: relative; padding-left: 14px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.mb-rules li + li { margin-top: 6px; }
.mb-rules li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 999px; background: var(--ink-3); }
.pf-bd { padding: 12px 16px; border-radius: var(--r); background: var(--surface); font-size: 16px; }
.pf-bd small { display: block; font-size: 13px; color: var(--ink-3); }

/* 会员权益宫格 */
.mb-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mb-grid li {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 4px 12px;
  border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); text-align: center;
}
.mb-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--bg); color: var(--ink); }
.mb-ic svg { width: 22px; height: 22px; stroke-width: 1.75; }
.mb-grid li.hi .mb-ic { background: var(--ink); color: var(--on-ink); }
.mb-grid b { font-size: 16px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.mb-grid small { font-size: 13px; color: var(--ink-3); }
.mb-grid li.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.mb-grid li.off .mb-ic { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.mb-grid li.off b { font-size: 13px; font-weight: 600; color: var(--ink-3); }
/* 升级路线 */
.mb-road { position: relative; height: 84px; margin: 8px 28px 0; }
.mb-road-line { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 999px; background: var(--line); }
.mb-road-line i { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.mb-road-node { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 72px; text-align: center; }
.mb-road-node .dot { width: 24px; height: 24px; border-radius: 999px; background: var(--lv-bg); box-shadow: 0 0 0 3px var(--bg), inset 0 0 0 1px var(--line); }
.mb-road-node.on .dot { box-shadow: 0 0 0 3px var(--bg), inset 0 0 0 2px var(--ink); }
.mb-road-node.cur .dot { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.mb-road-node b { margin-top: 8px; font-size: 13px; font-weight: 700; }
.mb-road-node small { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mb-road-node:not(.on) b { color: var(--ink-3); font-weight: 400; }
/* 怎么升级：三步 */
.mb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; counter-reset: st; }
.mb-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; text-align: center; }
.mb-steps li + li::before { content: ""; position: absolute; left: -12px; top: 32px; width: 16px; height: 2px; background: var(--line); }
.mb-steps .mb-ic { background: var(--surface); box-shadow: var(--sh-1); }
.mb-steps b { font-size: 13px; font-weight: 700; }
.mb-steps small { font-size: 13px; color: var(--ink-3); }
.mb-fine { margin-top: 4px; font-size: 13px; line-height: 1.7; color: var(--ink-3); }

/* ---------- 客服浮动按钮 ---------- */
.kf { position: fixed; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (min-width: 520px) { .kf { right: calc(50% - 240px + 16px); } }
.kf-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 56px; height: 56px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-2);
}
.kf-btn svg { width: 22px; height: 22px; }
.kf-btn span { font-size: 11px; line-height: 1; font-weight: 600; }
.kf-btn[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); }
.kf-menu { min-width: 200px; padding: 4px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-2); }
.kf-menu a, .kf-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 0; color: var(--ink); text-decoration: none; text-align: left; }
.kf-menu > * + * { border-top: 1px dashed var(--line); }
.kf-menu svg { width: 20px; height: 20px; flex: none; }
.kf-menu b { display: block; font-size: 16px; font-weight: 600; }
.kf-menu small { display: block; font-size: 13px; color: var(--ink-3); }
body.locked .kf { display: none; }
.kf-btn { position: relative; }
.kf-dot { position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- 在线客服聊天 ---------- */
.kfc .me-page { transform: translateX(100%); background: var(--wx-bg); }
.kfc { --wx-bg: #EDEDED; --wx-bar: #F7F7F7; --wx-green: #95EC69; --wx-green-on: #191919; }
.kfc.open .me-page { transform: none; }
.kfc-list {
  flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 12px 16px; max-width: 480px; width: 100%; margin: 0 auto;
}
.kfc-time { align-self: center; margin: 8px 0 0; font-size: 12px; color: #6E6E6E; }
/* 照微信：头像 40 方圆角，气泡小尖角朝头像，自己的绿色 */
.kfc-row { display: flex; align-items: flex-start; gap: 10px; }
.kfc-row.mine { justify-content: flex-end; }
.kfc-row.sending .kfc-msg { opacity: .55; }
.kfc-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; overflow: hidden; background: #fff; }
.kfc-av-shop { background: var(--surface); }
.kfc-av-shop img { width: 32px; height: auto; }
.kfc-av-me { background: #D9D9D9; color: #fff; }
.kfc-av-me svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.kfc-col { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: calc(100% - 80px); }
.kfc-row.mine .kfc-col { align-items: flex-end; }
.kfc-name { margin-bottom: -2px; font-size: 12px; line-height: 1.3; color: #7F7F7F; }
.kfc-msg { position: relative; max-width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 6px; font-size: 16px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.kfc-msg::before { content: ""; position: absolute; top: 14px; width: 0; height: 0; border: 6px solid transparent; }
.kfc-msg.shop { background: #fff; color: #191919; }
.kfc-msg.shop::before { left: -11px; border-right-color: #fff; }
.kfc-name + .kfc-msg.shop::before { top: 14px; }
.kfc-msg.mine { background: var(--wx-green); color: var(--wx-green-on); }
.kfc-msg.mine::before { right: -11px; border-left-color: var(--wx-green); }
.kfc-msg.kfc-typing { display: flex; gap: 6px; align-items: center; min-height: 40px; color: #7F7F7F; }
.kfc-typing span { display: flex; gap: 3px; align-items: center; }
.kfc-typing i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .35; animation: kfcDot 1s infinite ease-in-out; }
.kfc-typing i:nth-child(2) { animation-delay: .15s; } .kfc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes kfcDot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: .8; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .kfc-typing i { animation: none; } }
.kfc-card { display: flex; align-items: center; gap: 12px; width: min(100%, 260px); padding: 8px 12px 8px 8px; border-radius: 6px; background: #fff; text-align: left; }
.kfc-card-art { flex: none; width: 64px; height: 52px; border-radius: 10px; background: var(--bg); overflow: hidden; }
.kfc-card-art .cake { width: 100%; height: 100%; display: block; object-fit: contain; }
.kfc-card-main { flex: 1; min-width: 0; }
.kfc-card-main b { display: block; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfc-card-main small { display: block; font-size: 13px; color: var(--ink-2, #6B5D52); }
@media (max-width: 359px) { .kfc-card-go { display: none; } }
.kfc-card-go { flex: none; font-size: 13px; color: var(--accent); font-weight: 600; }
.kfc-note { align-self: center; max-width: 280px; margin-top: 4px; font-size: 12px; line-height: 1.5; color: #6E6E6E; text-align: center; }
.kfc-bar {
  flex: none; display: flex; align-items: flex-end; gap: 8px;
  width: 100%;
  padding: 8px max(12px, calc((100% - 456px) / 2)) calc(8px + env(safe-area-inset-bottom));
  background: var(--wx-bar); border-top: 1px solid #E0E0E0;
}
.kfc-bar textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 120px; resize: none;
  padding: 9px 12px; border: 0; border-radius: 6px; background: #fff;
  font: inherit; font-size: 16px; line-height: 22px; color: #191919;
}
.kfc-bar textarea { caret-color: #07C160; }
.kfc-bar textarea:focus-visible { outline: none; }
.kfc-send { flex: none; display: grid; place-items: center; height: 40px; padding: 0 14px; border-radius: 6px; background: #07C160; color: #fff; font-size: 16px; font-weight: 600; }
.kfc-send:disabled { background: #E1E1E1; color: #A9A9A9; }

/* ---------- 纪念日 ----------
 * 每种类型一个柔和底色(低饱和，跟暖棕系搭)，图标用同色系深一档 */
.k-birthday { --k-bg: #F6DDD8; --k-fg: #9A4A3E; }
.k-wedding  { --k-bg: #F1E3C4; --k-fg: #8A6420; }
.k-love     { --k-bg: #F4D9DE; --k-fg: #A23D55; }
.k-festival { --k-bg: #DCE8D6; --k-fg: #4C6B3E; }
.k-other    { --k-bg: #E7E1DA; --k-fg: #6B5D52; }
.dt-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--k-bg); color: var(--k-fg); }
.dt-ic svg { width: 22px; height: 22px; }
.dt-hero {
  display: flex; align-items: center; gap: 12px; padding: 20px 16px; border-radius: 16px;
  background: var(--k-bg); color: #2A1D15; box-shadow: var(--sh-1);
}
.dt-hero-ic { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: rgba(255, 255, 255, .6); color: var(--k-fg); }
.dt-hero-ic svg { width: 28px; height: 28px; }
.dt-hero-main { flex: 1; min-width: 0; }
.dt-hero-main small { display: block; font-size: 13px; color: var(--k-fg); }
.dt-hero-main b { display: block; font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-hero-main span { display: block; font-size: 13px; color: #4A3A2E; }
.dt-hero-left { flex: none; text-align: center; }
.dt-hero-left small { display: block; font-size: 13px; color: var(--k-fg); }
.dt-hero-left b { display: block; font-size: 39px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--k-fg); }
.dt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dt-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); text-align: left; }
.dt-main { flex: 1; min-width: 0; }
.dt-main b { display: block; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-main small { display: block; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-left { flex: none; min-width: 48px; text-align: right; }
.dt-left b { display: block; font-size: 20px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.dt-left small { display: block; font-size: 13px; color: var(--ink-3); }
.dt-left.today b { font-size: 16px; color: var(--accent); }
.dt-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; text-align: center; }
.dt-empty .dt-ic { width: 64px; height: 64px; border-radius: 20px; }
.dt-empty .dt-ic svg { width: 30px; height: 30px; }
.dt-empty b { font-size: 20px; }
.dt-empty p { font-size: 13px; line-height: 1.7; color: var(--ink-3); }
.dt-kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.dt-kinds button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--r); border: 1px solid transparent; font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.dt-kinds button[aria-checked="true"] { border-color: var(--ink); background: var(--surface); color: var(--ink); font-weight: 600; }
.me-foot .cta-inline svg { width: 18px; height: 18px; }

/* ---------- 商品海报 ---------- */
.det-share { margin-left: auto; }
.pst { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: rgba(38, 27, 20, .88); }
.pst-box { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 400px; max-height: 100%; outline: none; }
.pst-img { position: relative; flex: 0 1 auto; min-height: 0; display: grid; place-items: center; width: 100%; }
/* 海报 2:3，按可视高度收，底下留出提示和按钮 */
.pst-img img { display: block; width: auto; max-width: 100%; max-height: calc(100dvh - 200px); aspect-ratio: 2 / 3; border-radius: 12px; background: var(--bg); box-shadow: var(--sh-2); -webkit-touch-callout: default; }
.pst-img img:not([src]) { width: min(100%, calc((100dvh - 200px) * 2 / 3)); }
.pst-wait { position: absolute; font-size: 14px; color: var(--ink-3); }
.pst-tip { max-width: 320px; font-size: 14px; line-height: 1.5; color: #FBF8F4; text-align: center; }
.pst-acts { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 320px; }
.pst-acts .cta-inline { margin-top: 0; flex: 1; text-decoration: none; }
.pst-close { flex: none; min-height: 48px; padding: 0 20px; border-radius: 999px; color: #FBF8F4; font-size: 16px; border: 1px solid rgba(251, 248, 244, .5); }
.pst-acts .pst-close:only-child, .pst-acts [hidden] + .pst-close { flex: 1; }

/* 电话微信弹窗 */
.kfd { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; background: rgba(38, 27, 20, .56); }
.kfd-box { width: 100%; max-width: 320px; padding: 24px 20px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-2); text-align: center; outline: none; }
.kfd-box h2 { font-size: 18px; font-weight: 700; }
.kfd-box p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.kfd-box p b { color: var(--ink); font-variant-numeric: tabular-nums; }
.kfd-acts { display: flex; gap: 12px; margin-top: 20px; }
.kfd-acts > * { flex: 1; display: grid; place-items: center; min-height: 48px; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; }
.kfd-ok { border: 1px solid var(--line); color: var(--ink); }
.kfd-call { background: var(--ink); color: var(--on-ink); }

/* ---------- 广告卡(首页滑动卡片里) ---------- */
.card.ad { flex-basis: 268px; padding: 0; overflow: hidden; text-align: left; background: var(--ad-bg); color: var(--ad-fg); }
.card.ad:not([data-goto]) { cursor: default; }
.card.ad:not([data-goto]):active { transform: none; }
.ad-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.ad-tag { position: absolute; left: 12px; top: 12px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; background: var(--ad-fg); color: var(--ad-bg); }
.card.ad.has-img .ad-tag { background: rgba(255, 254, 252, .92); color: var(--ink); }
.ad-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 14px 14px; }
.card.ad.has-img .ad-text { color: #FFFEFC; background: linear-gradient(to top, rgba(38, 27, 20, .72), rgba(38, 27, 20, 0)); }
.ad-text h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }
.ad-text p { margin-top: 2px; font-size: 13px; line-height: 1.4; opacity: .9; }
.ad-go { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; }

/* ---------- 活动页 ---------- */
.ev .me-page { transform: translateX(100%); }
.ev.open .me-page { transform: none; }
.ev-cover { position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: var(--accent); }
.ev-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-cover.no-img { background: linear-gradient(135deg, var(--accent), #FF9A5C); }
.ev-tag { position: absolute; left: 12px; top: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(59, 42, 31, .82); color: #fff; font-size: 13px; line-height: 22px; }
.ev-h { margin-top: 16px; font-size: 25px; line-height: 1.3; font-weight: 700; }
.ev-sub { margin-top: 4px; font-size: 16px; color: var(--ink-2); }
.ev-facts { margin: 16px 0 0; padding: 4px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.ev-facts div { display: grid; grid-template-columns: 20px 40px minmax(0, 1fr); gap: 8px; align-items: start; padding: 10px 0; }
.ev-facts div + div { border-top: 1px solid var(--line); }
.ev-facts svg { width: 18px; height: 18px; margin-top: 3px; color: var(--ink-2); }
.ev-facts dt { font-size: 13px; line-height: 24px; color: var(--ink-3); }
.ev-facts dd { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.ev-facts dd b { color: var(--accent); }
.ev-end { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.ev-body { margin-top: 20px; font-size: 16px; line-height: 1.75; }
.ev-body p + p { margin-top: 12px; }
.ev-mine { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding: 12px 16px; border-radius: var(--r); background: #E8EFE4; color: #3F6B3A; font-size: 16px; }
.ev-mine svg { width: 18px; height: 18px; flex: none; }
.ev-mini { padding: 12px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.ev-mini b { display: block; font-size: 16px; }
.ev-mini small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.ev-step { margin-top: 4px; }
.ev-step button { width: 44px; height: 44px; }
.ev-step button:disabled { opacity: .35; }
.ev-done { display: flex; flex-direction: column; align-items: center; padding: 32px 0 24px; text-align: center; }
.ev-done svg { width: 56px; height: 56px; padding: 12px; border-radius: 999px; background: #E8EFE4; color: #3F6B3A; stroke-width: 2.5; }
.ev-done h1 { margin-top: 12px; font-size: 25px; font-weight: 700; }
.ev-done p { margin-top: 4px; color: var(--ink-2); }

/* 奥比问好下面的快捷问题 */
.kfc-quick { display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 80px); margin-left: 50px; }
/* 快捷问题做成橙色描边的按钮，跟白色的聊天气泡分开，一看就是能点的 */
.kfc-quick small { flex-basis: 100%; font-size: 12px; color: #7F7F7F; }
.kfc-quick button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; font-size: 14px; color: #B8430F; }
.kfc-quick button:active { background: rgba(255, 106, 42, .1); }
.kfc-ev-art { display: grid; place-items: center; background: #FFE9DE; color: var(--accent); }
.kfc-ev-art svg { width: 26px; height: 26px; }

/* 进店问好的小气泡：客服按钮上方 */
.kf-hi { position: relative; display: flex; align-items: flex-start; max-width: min(240px, calc(100vw - 32px)); padding: 10px 8px 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--surface); box-shadow: var(--sh-2); animation: kfHi .24s var(--ease-out) both; }
.kf-hi.out { opacity: 0; transform: translateY(4px); transition: opacity .2s ease-out, transform .2s ease-out; }
.kf-hi-main { flex: 1; text-align: left; font-size: 13px; line-height: 1.5; color: var(--ink); }
.kf-hi-main b { display: block; font-size: 13px; color: var(--accent); }
.kf-hi-x { flex: none; width: 28px; height: 28px; margin: -4px -2px 0 4px; border-radius: 999px; color: var(--ink-3); font-size: 18px; line-height: 1; }
@keyframes kfHi { from { opacity: 0; transform: translateY(6px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .kf-hi { animation: none; } }

/* ---------- 首页大卡(新品/招牌)：跟广告卡一样宽，+ 放在右下角里面 ---------- */
.card.hero { flex-basis: 268px; padding: 0; text-align: left; }
.card.hero:not(.has-img) { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 10px; padding: 36px 14px 20px 10px; }
.card.hero .add { left: auto; right: 12px; bottom: 12px; transform: none; width: 36px; height: 36px; }
.hero-tag { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; background: var(--accent); color: #fff; }
.hero-text { min-width: 0; padding-right: 36px; }
.card.hero h3 { margin-top: 0; font-size: 16px; line-height: 1.35; font-weight: 700; }
.hero-desc { margin-top: 2px; font-size: 12px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.hero .price { margin-top: 4px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); -webkit-user-drag: none; user-select: none; }
.card.hero.has-img { min-height: 170px; }
.card.hero.has-img .hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 60px 14px 14px; border-radius: 0 0 var(--r) var(--r); color: #FFFEFC; background: linear-gradient(to top, rgba(38, 27, 20, .72), rgba(38, 27, 20, 0)); }
.card.hero.has-img .price, .card.hero.has-img .price span { color: rgba(255, 254, 252, .9); }
.hero-fly { position: absolute; left: 50%; top: 50%; width: 112px; transform: translate(-50%, -50%); visibility: hidden; pointer-events: none; }

/* ---------- 首页弹窗：一张就居中大图；多张并排一排连续往左走。图都是 3:4 框 ---------- */
.pop { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px 0 calc(20px + env(safe-area-inset-bottom)); background: rgba(20, 13, 8, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .2s ease-out; }
.pop.open { opacity: 1; }
.pop-in { --pw: min(88vw, 400px, calc((100dvh - 130px) * .75)); width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; transform: scale(.94); transition: transform .24s var(--ease-out); }
.pop.is-row .pop-in { --pw: min(64vw, 300px, calc((100dvh - 130px) * .75)); }
.pop.open .pop-in { transform: none; }
.pop-track { width: 100%; min-width: 0; overflow: hidden; padding: 8px 0 16px; }
.pop.is-row .pop-track { touch-action: none; cursor: grab; }
.pop-strip { display: flex; justify-content: center; gap: 12px; }
.pop.is-row .pop-strip { justify-content: flex-start; width: max-content; will-change: transform; }
.pop-img { flex: 0 0 var(--pw); aspect-ratio: 3 / 4; display: block; padding: 0; border: 0; background: transparent; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); -webkit-tap-highlight-color: transparent; transform: translateZ(0); }
.pop-img img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.pop-x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .2); color: #fff; }
.pop-x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (prefers-reduced-motion: reduce) { .pop, .pop-in { transition: none; } }
.pop-x:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- 结算：支付方式 ---------- */
.pays { display: grid; gap: 8px; }
.pay { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; color: var(--ink); }
.pay[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay:disabled { opacity: 1; background: var(--bg); color: var(--ink-3); cursor: not-allowed; }
.pay-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #fff; }
.pay-ic svg { width: 20px; height: 20px; }
.pay-wechat { background: #07C160; } .pay-wechat svg { fill: currentColor; stroke: none; }
.pay-alipay { background: #1677FF; } .pay-alipay b { font-size: 17px; font-weight: 700; line-height: 1; }
.pay-offline { background: var(--ink); } .pay-offline svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pay:disabled .pay-ic { filter: grayscale(1); opacity: .45; }
.pay-name { flex: 1; min-width: 0; }
.pay-name b { display: block; font-size: 16px; font-weight: 600; }
.pay-name small { display: block; font-size: 13px; color: var(--ink-3); }
.pay-dot { flex: none; width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--line); }
.pay[aria-checked="true"] .pay-dot { border: 6px solid var(--ink); }
.pay:disabled .pay-dot { visibility: hidden; }

/* ---------- 付款这一步(测试流程) ---------- */
.paying { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 16px; }
.pay-big { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 8px; }
.pay-big svg { width: 34px; height: 34px; }
.pay-big b { font-size: 28px; }
.pay-amt { margin-top: 4px; font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-order { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.pay-test { margin-top: 16px; padding: 8px 12px; border-radius: 10px; background: var(--bg); font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* 优惠券：结算里一张张可选；「我的 → 优惠券」里同一个样子 */
.cpns { display: grid; gap: 8px; }
.cpn { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; }
.cpn > b { flex: none; font-size: 20px; color: var(--accent, #FF6A2A); font-variant-numeric: tabular-nums; }
.cpn > span { display: flex; flex-direction: column; min-width: 0; font-size: 15px; font-weight: 600; }
.cpn > span small { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.cpn[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cpn:disabled, .cpn.off { opacity: .45; }
.cpn-none { justify-content: center; color: var(--ink-2); font-size: 14px; }
.cpn-card { margin-bottom: 8px; }
.cpn-claim { margin-left: auto; flex: none; }
.me-sub { margin: 16px 4px 8px; font-size: 13px; color: var(--ink-2); }

/* 拼团：每人多少钱那一行 */
.gb-price { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.gb-price b { font-size: 24px; color: var(--accent); margin: 0 2px; }
.gb-price small { margin-left: 10px; font-size: 13px; color: var(--ink-3); }

/* 我的 → 邀请有礼 */
.inv-how b { display: block; margin-bottom: 4px; font-size: 16px; color: var(--ink); }
.inv-how ol { margin: 0 0 8px; padding-left: 20px; line-height: 1.7; }
.inv-how small { display: block; font-size: 13px; color: var(--ink-3); }
.inv-how .chip { margin-top: 12px; }
.me-ledger em.inv-st { flex: none; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.me-ledger em.inv-st.plus { color: var(--accent); }

/* 送礼：结算页开关和填法、下单成功页的礼物链接、收礼人的礼物页 */
#fGift .pts-row span { display: flex; flex-direction: column; min-width: 0; }
#fGift .pts-row b { font-weight: 600; }
#fGift .pts-row small { font-size: 13px; color: var(--ink-3); }
.gift-mode { margin-top: 12px; }
#giftNote { margin: 8px 0 0; }
.gift-from-l { margin-top: 12px; }
.gift-link { align-self: stretch; margin-top: 16px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); font-size: 13px; line-height: 1.6; color: var(--ink-2); text-align: left; }
.gift-link .chip { margin-top: 8px; }
.me-gift { margin-top: 16px; }
.gf-card { position: relative; padding: 24px 20px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--sh-1); }
.gf-card small { display: block; font-size: 13px; opacity: .85; }
.gf-card b { display: block; margin-top: 2px; color: var(--accent); font-size: 25px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.gf-card p { margin-top: 12px; font-size: 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.gf-card .gf-nomsg { opacity: .85; }
.gf-items { margin-top: 16px; }
.gf-when { margin: 12px 4px 0; font-size: 13px; color: var(--ink-2); }
.gf-ok { margin-top: 16px; }
