/* 卓衣诗佳人 · 服装销售管理台 */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #EDE8E1; color: #23201C;
  font-size: 14px; line-height: 1.5; letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 手机外壳 ---------- */
/* 小屏：整页不滚动，顶栏与底栏固定，仅中间 .view 区域滚动 */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.phone {
  position: relative; width: 100%; max-width: 480px;
  height: 100vh; height: 100dvh; min-height: 0; margin: 0 auto;
  background: #F7F4EF; display: flex; flex-direction: column; overflow: hidden;
}
.topbar {
  position: relative; flex: 0 0 auto; z-index: 20; min-height: 52px; padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(247,244,239,.92); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.topbar h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: .04em; }
.topbar .top-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.topbar .act { font-size: 13px; color: #A8763F; padding: 4px 8px; border-radius: 8px; }
.topbar .act:active { background: rgba(168,118,63,.1); }
/* 小屏右上角购物车入口（带数量角标） */
.topbar .act.cart-act { display: inline-flex; align-items: center; gap: 4px; position: relative; }
.topbar .act.cart-act svg { width: 15px; height: 15px; }
.topbar .act.cart-act .dot {
  position: absolute; top: -1px; right: 0; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 9px; background: #E5484D; color: #fff; font-size: 10px; font-style: normal;
  line-height: 15px; text-align: center;
}
.topbar .apk-act { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.topbar .apk-act svg { width: 15px; height: 15px; }

.view { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 14px 24px; -webkit-overflow-scrolling: touch; }

.tabbar {
  position: relative; flex: 0 0 auto; z-index: 20; height: 58px; display: flex;
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: 0; background: none; color: #9C948A; font-size: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: inherit; padding: 0; transition: color .18s;
}
.tab svg { width: 21px; height: 21px; }
.tab.on { color: #23201C; font-weight: 600; }

/* ---------- 通用 ---------- */
.sec { margin-bottom: 6px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 9px; }
.sec-head h2 { font-size: 14px; font-weight: 600; margin: 0; letter-spacing: .02em; }
.sec-head .more { font-size: 12px; color: #9C948A; display: inline-flex; align-items: center; gap: 2px; }
.sec-head .more svg { width: 13px; height: 13px; }
.card { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(35,32,28,.05); overflow: hidden; }
.empty { padding: 26px 14px; text-align: center; color: #A9A199; font-size: 13px; }
.tiny { font-size: 11.5px; }
.muted { color: #9C948A; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: #9C948A; padding: 4px 2px; }
.hint.warn { color: #B5713F; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.tag { display: inline-block; font-size: 10.5px; padding: 1.5px 7px; border-radius: 20px; line-height: 1.6; white-space: nowrap; }
.tag.pink { background: #FBEAE7; color: #B44A3A; }
.tag.amber { background: #FBF0DF; color: #A2743A; }
.tag.blue { background: #E8EEF6; color: #3D5A80; }
.tag.gray { background: #F0EDE8; color: #8B8378; }
.tag.green { background: #E6F3EC; color: #2F8F5B; }

.btn {
  width: 100%; border: 0; border-radius: 12px; padding: 13px 16px; font-size: 15px;
  font-family: inherit; font-weight: 600; letter-spacing: .06em;
  background: #23201C; color: #fff; display: inline-flex; align-items: center;
  justify-content: center; gap: 7px; transition: transform .12s, opacity .18s;
}
.btn:active { transform: scale(.985); opacity: .9; }
.btn[disabled] { opacity: .4; }
.btn svg { width: 18px; height: 18px; letter-spacing: 0; }
.btn.ghost { background: #F2EEE8; color: #23201C; }
.btn.danger { background: #FFF3F1; color: #C0432F; }
.btn.sm { width: auto; padding: 6px 11px; font-size: 12.5px; border-radius: 9px; font-weight: 500; letter-spacing: .02em; }
.btn.sm svg { width: 15px; height: 15px; }

/* ---------- 首页功能宫格 ---------- */
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-btn {
  border: 0; font-family: inherit; background: #fff; border-radius: 15px; padding: 16px 14px;
  display: flex; align-items: center; gap: 11px; text-align: left;
  box-shadow: 0 1px 2px rgba(35,32,28,.05); transition: transform .12s;
}
.hero-btn:active { transform: scale(.98); }
.hero-btn.wide { grid-column: 1 / -1; justify-content: center; }
.hero-btn .ic {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: #F7F1E8; color: #A8763F; flex: 0 0 auto;
}
.hero-btn .ic svg { width: 18px; height: 18px; }
.hero-btn .lb { font-size: 14.5px; font-weight: 600; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 14px 0 0; background: rgba(0,0,0,.05); border-radius: 14px; overflow: hidden; }
.kpi { background: #fff; padding: 12px 6px; text-align: center; }
.kpi .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .k { font-size: 10.5px; color: #9C948A; margin-top: 2px; }

/* ---------- 人员行 ---------- */
.p-row { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid #F4F0EA; }
.p-row:last-child { border-bottom: 0; }
.p-row:active { background: #FAF7F2; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: #F2EADF; color: #A8763F; font-weight: 600; font-size: 15px;
}
.p-main { flex: 1; min-width: 0; }
.p-name { font-size: 13.5px; font-weight: 600; }
.p-sub { font-size: 11.5px; color: #9C948A; margin-top: 1px; }
.bar { height: 4px; border-radius: 4px; background: #F0ECE5; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #A8763F; border-radius: 4px; }
.p-nums { display: flex; gap: 12px; text-align: right; }
.p-nums .n { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.p-nums .n.green { color: #2F8F5B; }
.p-nums .t { font-size: 10.5px; color: #9C948A; }

.pending-row { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid #F4F0EA; }
.pending-row:last-child { border-bottom: 0; }
.pending-row .txt { flex: 1; font-size: 12.5px; }
.pending-row .go { font-size: 12px; color: #A8763F; }

/* ---------- 搜索 / 筛选 ---------- */
.search {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px;
  padding: 10px 12px; margin-top: 2px; box-shadow: 0 1px 2px rgba(35,32,28,.05);
}
.search svg { width: 17px; height: 17px; color: #B3ABA1; flex: 0 0 auto; }
.search input { flex: 1; border: 0; outline: none; font-size: 14px; font-family: inherit; background: none; color: #23201C; min-width: 0; }
.search input::placeholder { color: #B3ABA1; }

.chips { display: flex; gap: 7px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; font-family: inherit; font-size: 12.5px; padding: 7px 13px; border-radius: 20px;
  background: #fff; color: #6E675E; white-space: nowrap; box-shadow: 0 1px 2px rgba(35,32,28,.04);
}
.chip.on { background: #23201C; color: #fff; font-weight: 500; }

/* ---------- 表格 ---------- */
.tbl-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; font-weight: 500; color: #9C948A; font-size: 11px; padding: 10px 8px; background: #FCFAF7; }
th:first-child, td:first-child { padding-left: 13px; }
th:last-child, td:last-child { padding-right: 13px; }
td { padding: 10px 8px; border-top: 1px solid #F6F2EC; vertical-align: middle; }
tbody tr:active { background: #FAF7F2; }
tfoot td { background: #FCFAF7; font-size: 12px; color: #6E675E; padding: 9px 8px; }

/* ---------- 表单 ---------- */
.form-card { background: #fff; border-radius: 14px; padding: 2px 14px; margin: 10px 0; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.field { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #F6F2EC; }
.field:last-child { border-bottom: 0; }
.field.col { display: block; }
.field.col > label { display: block; margin-bottom: 8px; }
.field label { width: 68px; flex: 0 0 auto; font-size: 13px; color: #6E675E; }
.field input, .field select {
  flex: 1; border: 0; outline: none; font-size: 14px; font-family: inherit;
  background: none; color: #23201C; text-align: right; min-width: 0;
}
.field.col input { text-align: left; border: 1px solid #EDE8E0; border-radius: 9px; padding: 9px 11px; background: #FCFAF7; }
.field select { text-align-last: right; }
.field input::placeholder { color: #BEB6AC; }
.field .suffix { font-size: 12.5px; color: #9C948A; flex: 0 0 auto; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-item { background: #fff; border-radius: 13px; padding: 13px; text-align: center; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.stat-item .v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-item .k { font-size: 11px; color: #9C948A; margin-top: 3px; }

/* ---------- 我的 ---------- */
.me-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 15px; padding: 16px 15px; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.me-card .avatar { width: 46px; height: 46px; font-size: 19px; }
.me-name { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.me-sub { font-size: 11.5px; color: #9C948A; margin-top: 3px; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 14px; margin-top: 12px; padding: 13px 0; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.stat-strip .s { text-align: center; border-right: 1px solid #F4F0EA; }
.stat-strip .s:last-child { border-right: 0; }
.stat-strip .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-strip .k { font-size: 10.5px; color: #9C948A; margin-top: 2px; }

.menu-card { background: #fff; border-radius: 14px; margin-top: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid #F6F2EC; }
.menu-row:last-child { border-bottom: 0; }
.menu-row:active { background: #FAF7F2; }
.mi { width: 30px; height: 30px; border-radius: 9px; background: #F7F1E8; color: #A8763F; display: grid; place-items: center; flex: 0 0 auto; }
.mi svg { width: 16px; height: 16px; }
.mt { flex: 1; font-size: 13.5px; font-weight: 500; }
.ms { font-size: 11px; color: #9C948A; font-weight: 400; margin-top: 1px; }
.ch { width: 15px; height: 15px; color: #C9C1B7; }

/* ---------- 弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(30,26,22,.35); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.sheet-mask.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88%;
  background: #F7F4EF; border-radius: 20px 20px 0 0; display: none; flex-direction: column;
  box-shadow: 0 -8px 30px rgba(30,26,22,.16); animation: sheetUp .26s cubic-bezier(.32,.72,0,1);
}
.sheet.on { display: flex; }
@keyframes sheetUp { from { transform: translateY(26px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.sheet-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.sheet-head .x { border: 0; background: #EEEAE3; color: #6E675E; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.sheet-head .x svg { width: 15px; height: 15px; }
.sheet-body { padding: 4px 16px 12px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(0,0,0,.05); background: #F7F4EF; display: flex; gap: 10px; }
.sheet-foot > * { flex: 1; }

/* ---------- 选择列表 ---------- */
.pick-list { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow-y: auto; padding: 2px 0; }
.pick-item { background: #fff; border-radius: 12px; padding: 11px 13px; border: 1.5px solid transparent; }
.pick-item.on { border-color: #23201C; background: #FDFBF8; }
.pick-item .meta { font-size: 11.5px; color: #9C948A; margin-top: 3px; }
.check {
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #D9D2C8; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; color: transparent;
}
.check.on { background: #23201C; border-color: #23201C; color: #fff; }

/* ---------- 缩略图 ---------- */
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.thumb { width: 52px; height: 52px; border-radius: 9px; overflow: hidden; background: #F0ECE5; box-shadow: 0 1px 2px rgba(35,32,28,.08); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 登录 ---------- */
.login {
  position: absolute; inset: 0; z-index: 60; background: #F7F4EF;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  transition: opacity .2s, visibility .2s;
}
.login.off { opacity: 0; visibility: hidden; pointer-events: none; }
.login-card { width: 100%; max-width: 330px; text-align: center; }
.login-logo {
  width: 58px; height: 58px; border-radius: 17px; margin: 0 auto 14px; background: #23201C;
  color: #F7F4EF; font-size: 26px; display: grid; place-items: center; font-weight: 300;
  box-shadow: 0 6px 18px rgba(35,32,28,.18); overflow: hidden; padding: 0;
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.login-card h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: .08em; }
.login-card > p { margin: 4px 0 0; font-size: 12.5px; color: #9C948A; letter-spacing: .12em; }

/* ---------- 图片查看器 ---------- */
.viewer {
  /* 固定定位：相对视口铺满，避免被 .phone 随内容撑高后把大图推出屏幕 */
  position: fixed; inset: 0; z-index: 70; background: rgba(18,16,14,.96);
  width: 100%; max-width: 480px; margin: 0 auto;
  display: none; flex-direction: column;
}
.viewer.on { display: flex; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; color: #EDE8E1; font-size: 13px; }
.viewer-bar button { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.viewer-stage { flex: 1; display: grid; place-items: center; padding: 0 12px; overflow: hidden; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.viewer-foot { display: flex; gap: 12px; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
.viewer-nav { flex: 1; border: 0; background: rgba(255,255,255,.12); color: #fff; font-family: inherit; font-size: 13.5px; padding: 12px; border-radius: 11px; }

/* ---------- 加载 / 提示 ---------- */
.loading {
  position: absolute; inset: 0; z-index: 61; display: grid; place-items: center;
  background: #F7F4EF; color: #9C948A; font-size: 13px; transition: opacity .2s;
}
.loading.off { opacity: 0; pointer-events: none; }
.toast {
  position: absolute; left: 50%; bottom: 84px; transform: translate(-50%, 10px); z-index: 80;
  background: rgba(35,32,28,.92); color: #fff; font-size: 13px; padding: 10px 16px;
  border-radius: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 82%; text-align: center; line-height: 1.45;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 520px) {
  body { padding: 16px 0; background: #E6E1D9; }
  .phone { height: calc(100vh - 32px); height: calc(100dvh - 32px); min-height: 0; border-radius: 22px; box-shadow: 0 10px 40px rgba(35,32,28,.14); }
  .tabbar { border-radius: 0 0 22px 22px; }
}

/* 小屏：详情 / 购物车底部有固定结算条，滚动区多留出空间（大屏不受影响） */
@media (max-width: 1023px) {
  #view[data-route="detail"], #view[data-route="cart"] { padding-bottom: 104px; }
  /* 小屏顶栏右上角购物车：只留图标与数量角标，避免与「管理 / 安卓版」挤成换行 */
  .topbar .top-acts { flex-wrap: nowrap; }
  .topbar .top-acts .act.cart-act { padding: 5px 7px; }
  .topbar .top-acts .act.cart-act > span { display: none; }
  .topbar .top-acts .act.cart-act svg { width: 18px; height: 18px; }
  .topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- 商品：列表 / 详情 / 购物车 / 订单 ---------- */
.chips.cats { gap: 8px; padding: 6px 0 10px; margin: 2px 0 2px; }
.chips.cats .chip { flex: 0 0 auto; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pcard { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(35,32,28,.07); }
.pcard:active { transform: scale(.99); }
.pcard-img { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #F2EEE8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-img .soldout { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(35,32,28,.62); color: #fff; font-size: 11px; text-align: center; padding: 3px 0; }
.pcard-body { padding: 8px 9px 10px; }
.pcard-t { font-size: 13px; font-weight: 600; line-height: 1.35; color: #23201C; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-m { font-size: 11.5px; color: #9C948A; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-b { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 7px; }
.price { color: #E5484D; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.price.big { font-size: 21px; }
.sold { font-size: 11px; color: #9C948A; white-space: nowrap; }
.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #CFC7BC; }
.ph svg { width: 30px; height: 30px; }
.ph.big svg { width: 46px; height: 46px; }

.detail { margin: -4px -2px 0; }
.d-gallery { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #F2EEE8; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.d-gallery img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.d-count { position: absolute; right: 10px; bottom: 10px; background: rgba(35,32,28,.55); color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 20px; }
.d-price { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 4px 4px; }
.d-card { background: #fff; border-radius: 14px; padding: 12px 13px; margin-top: 10px; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.d-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.d-meta { font-size: 12px; color: #9C948A; margin-top: 5px; line-height: 1.6; }
.d-label { font-size: 12px; color: #9C948A; margin-bottom: 7px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 4px 0; }
.kv span { color: #9C948A; flex: 0 0 auto; }
.kv b { font-weight: 500; text-align: right; word-break: break-all; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #E8E2D9; border-radius: 9px; overflow: hidden; background: #fff; }
.stepper button { width: 34px; height: 32px; border: 0; background: #F7F4EF; color: #23201C; font-size: 17px; line-height: 1; font-family: inherit; }
.stepper button:active { background: #EFE9E0; }
.stepper input { width: 46px; height: 32px; border: 0; text-align: center; font-size: 14px; font-family: inherit; color: #23201C; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.sm button { width: 28px; height: 26px; font-size: 15px; }
.stepper.sm .qv { min-width: 30px; height: 26px; line-height: 26px; text-align: center; font-size: 13px; }

.buybar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid rgba(0,0,0,.06); }
.bb-ic { position: relative; flex: 0 0 auto; width: 48px; border: 0; background: none; color: #6B6257; font-size: 10.5px; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bb-ic svg { width: 21px; height: 21px; }
.bb-ic .dot { position: absolute; top: -2px; right: 4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 9px;
  background: #E5484D; color: #fff; font-size: 10px; font-style: normal; line-height: 15px; text-align: center; }
.bb-btn { flex: 1; height: 42px; border: 0; border-radius: 21px; background: #2F6BFF; color: #fff; font-size: 14.5px; font-weight: 600;
  font-family: inherit; letter-spacing: .04em; }
.bb-btn:active { opacity: .9; }
.bb-btn[disabled] { opacity: .45; }
.bb-btn.ghost { background: #EAF0FF; color: #2F6BFF; }

.row-card { position: relative; display: flex; gap: 11px; background: #fff; border-radius: 14px; padding: 11px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.rc-img { flex: 0 0 auto; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; background: #F2EEE8; display: flex; align-items: center; justify-content: center; }
.rc-img img { width: 100%; height: 100%; object-fit: cover; }
.rc-main { flex: 1; min-width: 0; padding-right: 22px; }
.rc-del { position: absolute; right: 8px; top: 8px; border: 0; background: none; color: #B3ABA1; padding: 4px; }
.rc-del svg { width: 16px; height: 16px; }
.cartfoot { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid rgba(0,0,0,.06); }
.cf-sum { display: flex; align-items: baseline; gap: 8px; }
.cartfoot .bb-btn { flex: 0 0 132px; }

.order-card { background: #fff; border-radius: 14px; padding: 12px 13px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.oc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px dashed #EFEAE3; }
.oc-no { font-size: 12px; color: #9C948A; font-variant-numeric: tabular-nums; }
.oc-items { padding: 8px 0 4px; }
.oi-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.oi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oi-q { color: #9C948A; flex: 0 0 auto; }
.oi-p { flex: 0 0 auto; color: #23201C; font-variant-numeric: tabular-nums; }
.oc-addr { background: #FAF7F2; border-radius: 10px; padding: 9px 10px; font-size: 12.5px; line-height: 1.65; }
.oc-foot { display: flex; align-items: baseline; justify-content: space-between; padding-top: 9px; }
.oc-acts { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; }

/* ---------- 顶栏返回 / 导航角标 / 我的订单条 ---------- */
.topbar .back { border: 0; background: none; padding: 2px 2px 2px 0; margin-right: -2px; color: #23201C; display: flex; align-items: center; }
.topbar .back svg { width: 20px; height: 20px; transform: rotate(180deg); }
.tab { position: relative; }
.tab .dot { position: absolute; top: 6px; left: 50%; margin-left: 6px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 9px;
  background: #E5484D; color: #fff; font-size: 10px; font-style: normal; line-height: 15px; text-align: center; }

.order-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: #fff; border-radius: 14px;
  padding: 12px 6px; margin: 10px 0 0; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.ostrip { text-align: center; padding: 2px 0; border-radius: 10px; }
.ostrip:active { background: #F7F4EF; }
.ostrip .n { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ostrip .k { font-size: 11.5px; color: #9C948A; margin-top: 2px; }
.person-list .p-row { }
.wh-name { border: 1px solid #E8E2D9; border-radius: 9px; padding: 7px 9px; font-size: 13.5px; font-family: inherit; color: #23201C; outline: none; background: #fff; }

/* ---------- 收款码 / 扫码付款 ---------- */
.pay-box { text-align: center; padding: 6px 0 2px; }
.pay-amt { font-size: 26px; font-weight: 700; color: #23201C; font-variant-numeric: tabular-nums; }
.pay-qr { display: block; width: 200px; height: 200px; margin: 14px auto 10px; object-fit: contain;
  background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(35,32,28,.08); padding: 6px; }
.pay-to { font-size: 14px; color: #23201C; margin-top: 2px; }

/* ---------- 客服对话 ---------- */
.avatar.sm { width: 28px; height: 28px; font-size: 12px; align-self: flex-end; }
.menu-row .mt { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.menu-row .ms { font-size: 11.5px; color: #9C948A; font-weight: 400; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-row .ch { width: 15px; height: 15px; color: #C8C0B6; flex: 0 0 auto; }
.badge { position: static; flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #D9463C;
  color: #fff; font-size: 11px; font-style: normal; line-height: 18px; text-align: center; }
.chat-wrap { display: flex; flex-direction: column; min-height: calc(100vh - 132px); }
.chat-head { background: #fff; border-radius: 14px; padding: 11px 13px; font-size: 13px; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.chat-ord { margin-top: 8px; font-size: 12px; color: #6E665D; background: #FBF7F1; border-radius: 11px; padding: 9px 12px; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 2px 8px; display: flex; flex-direction: column; gap: 12px; }
.msg-row { display: flex; gap: 7px; align-items: flex-end; }
.msg-row.me { flex-direction: row-reverse; }
.msg-wrap { max-width: 74%; display: flex; flex-direction: column; gap: 3px; }
.msg-row.me .msg-wrap { align-items: flex-end; }
.msg { background: #fff; border-radius: 13px; padding: 9px 12px; font-size: 13.5px; line-height: 1.5;
  color: #23201C; word-break: break-word; white-space: pre-wrap; box-shadow: 0 1px 2px rgba(35,32,28,.06); }
.msg.me { background: #2F6BFF; color: #fff; }
.msg.sys { background: #FDF1E7; color: #9A5A21; }
.msg.ok { background: #EAF7EF; color: #1D7A46; font-weight: 600; }
.msg-time { font-size: 10px; color: #B3ABA1; padding: 0 3px; }
.chat-tip { margin: 6px 2px 0; font-size: 12px; color: #9C948A; background: #FBF7F1; border-radius: 11px; padding: 9px 12px; }
.chat-tip.ok { color: #1D7A46; background: #EAF7EF; font-weight: 600; }
.chat-acts { margin-top: 10px; }
.chat-acts .btn { width: 100%; }
.chat-foot { display: flex; gap: 9px; align-items: center; padding: 10px 0 4px; position: sticky; bottom: 0;
  background: linear-gradient(180deg, rgba(250,247,242,0), #FAF7F2 34%); }
.chat-foot input { flex: 1; height: 42px; border: 1px solid #EAE3D9; border-radius: 21px; padding: 0 15px;
  font-size: 14px; font-family: inherit; background: #fff; outline: none; color: #23201C; min-width: 0; }
.chat-foot input:focus { border-color: #2F6BFF; }
.chat-foot .bb-btn { flex: 0 0 78px; }

/* ==========================================================================
   V2 视觉体系 · 奶油白浅底 + 暖调金主色 + 超大圆角 + 22/18/16/14/12 字号层级
   （本段位于原样式之后，用于统一覆盖，移动端布局结构不变）
   ========================================================================== */

body { background: #F3EDE2; }
.phone { background: #FBF8F3; color: #23201C; }

/* ---------- 顶栏 / 底栏 ---------- */
.topbar {
  height: 56px;
  background: rgba(251, 248, 243, .94);
  border-bottom: 1px solid rgba(35, 32, 28, .06);
}
.topbar h1 { font-size: 22px; font-weight: 700; letter-spacing: .01em; color: #23201C; }
.topbar .act { font-size: 14px; border-radius: 12px; background: #F5EFE4; color: #AD7B2F; }
.tabbar { background: rgba(255, 255, 255, .96); border-top: 1px solid rgba(35, 32, 28, .06); }
.tab { font-size: 12px; color: #9A9387; }
.tab.on, .tab.active { color: #C0973F; }
.tab .dot { background: #C0432F; }

/* ---------- 卡片：主卡 24px / 列表小卡 16px ---------- */
.card, .pcard, .d-card, .form-card, .menu-card, .me-card, .tbl-card,
.stat-strip, .order-strip, .chat-head, .pay-box, .order-card, .row-card {
  background: #fff;
  box-shadow: 0 2px 10px rgba(35, 32, 28, .05);
}
.card { border-radius: 24px; padding: 18px; }
.pcard { border-radius: 24px; }
.d-card { border-radius: 24px; }
.form-card { border-radius: 24px; }
.menu-card { border-radius: 24px; }
.me-card { border-radius: 26px; }
.tbl-card { border-radius: 24px; }
.stat-strip { border-radius: 24px; }
.order-strip { border-radius: 24px; }
.chat-head { border-radius: 20px; }
.order-card { border-radius: 16px; }
.row-card { border-radius: 16px; }
.stat-item { border-radius: 20px; }
.pick-item { border-radius: 18px; }
.hero-btn { border-radius: 22px; }
.hero-btn .ic { border-radius: 14px; background: #F8EEDC; color: #C0973F; }
.rc-img { border-radius: 14px; }
.thumb { border-radius: 14px; }
.oc-addr { border-radius: 14px; }
.ostrip { border-radius: 16px; }
.d-gallery { border-radius: 24px; background: #F5EFE4; }
.pay-qr { border-radius: 20px; }
.d-count { border-radius: 20px; }
.login-card { border-radius: 28px; }

/* ---------- 主色：暖调金 ---------- */
.btn { background: #C0973F; color: #fff; border-radius: 18px; font-size: 16px; }
.btn.ghost { background: #F5EFE4; color: #7A6A52; }
.btn.danger { background: #FBEDE8; color: #C0432F; }
.btn.sm { font-size: 14px; border-radius: 14px; }
.chip { background: #fff; color: #6E675E; border-radius: 20px; font-size: 14px; }
.chip.on { background: #C0973F; color: #fff; }
.search { background: #fff; border-radius: 16px; }
.bb-btn { background: #C0973F; color: #fff; border-radius: 24px; font-size: 16px; }
.login-logo { background: linear-gradient(150deg, #E3C785, #C0973F); color: #fff; border-radius: 20px; }
.badge { background: #C0432F; }
.msg { border-radius: 16px; }
.stepper { border-radius: 14px; }
.sheet { border-radius: 28px 28px 0 0; }
.toast { border-radius: 16px; }
.viewer-nav { border-radius: 14px; }

/* ---------- 字号层级 22 / 18 / 16 / 14 / 12 ---------- */
body { font-size: 14px; }
.sec-head h2 { font-size: 18px; font-weight: 700; }
.sec-head .more { font-size: 12px; }
.d-title { font-size: 22px; font-weight: 700; }
.d-meta, .d-label, .kv { font-size: 14px; }
.pcard-t { font-size: 16px; font-weight: 600; }
.pcard-m { font-size: 12px; }
.price { font-size: 18px; }
.price.big { font-size: 22px; }
.sold { font-size: 12px; }
.sheet-head h3 { font-size: 18px; }
.me-name { font-size: 18px; }
.me-sub { font-size: 12px; }
.mt, .menu-row .mt { font-size: 16px; }
.ms, .menu-row .ms { font-size: 12px; }
.mi { font-size: 16px; }
.stat-strip .v, .stat-item .v, .kpi .v, .ostrip .n, .p-nums .n { font-size: 18px; }
.stat-strip .k, .stat-item .k, .kpi .k, .ostrip .k, .p-nums .t { font-size: 12px; }
.p-name { font-size: 16px; }
.p-sub { font-size: 12px; }
.hero-btn .lb { font-size: 16px; }
.pending-row .txt { font-size: 14px; }
.pending-row .go { font-size: 12px; }
.search input, .field input, .field select, .stepper input, .chat-foot input { font-size: 16px; }
.field label { font-size: 14px; }
.field .suffix { font-size: 12px; }
table { font-size: 14px; }
th { font-size: 12px; }
tfoot td { font-size: 12px; }
.oc-no { font-size: 12px; }
.oi-row, .oc-addr { font-size: 14px; }
.wh-name { font-size: 14px; }
.pay-to { font-size: 16px; }
.pay-amt { font-size: 22px; }
.tag { font-size: 12px; }
.empty, .loading, .toast { font-size: 14px; }
.hint { font-size: 12px; }
.tiny { font-size: 12px; }
.chat-ord, .chat-tip, .msg-time { font-size: 12px; }
.msg { font-size: 14px; }
.login-card h2 { font-size: 22px; }
.login-card > p { font-size: 12px; }

/* ==========================================================================
   电脑大屏模式（≥1024px）：典型购物网站布局，移动端 ≤1023px 完全不变
   ========================================================================== */

/* 桌面顶部导航条：默认隐藏，仅大屏显示 */
.deskbar { display: none; }

@media (min-width: 1024px) {

  /* ---------- 外壳 ---------- */
  body { background: #EFE8DC; padding: 0; overflow: auto; overscroll-behavior: auto; }
  .phone {
    max-width: none;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    background: #FBF8F3;
  }
  .deskbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(251, 248, 243, .94);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(35, 32, 28, .07);
  }
  .deskbar-in {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 32px;
    height: 86px;
    display: flex;
    align-items: center;
    gap: 28px;
  }
  .db-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
  .db-logo {
    width: 40px; height: 40px; border-radius: 14px;
    background: linear-gradient(150deg, #E3C785, #C0973F);
    color: #fff; display: grid; place-items: center;
    font-size: 18px; font-weight: 700; letter-spacing: .02em;
    overflow: hidden; padding: 0; flex: 0 0 auto;
  }
  .db-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
  .db-name { display: flex; flex-direction: column; line-height: 1.2; font-size: 16px; font-weight: 700; color: #23201C; }
  .db-name em { font-style: normal; font-size: 12px; font-weight: 500; color: #8C8579; }
  .db-search {
    flex: 1 1 auto; max-width: 460px;
    display: flex; align-items: center; gap: 8px;
    height: 46px; padding: 0 6px 0 18px;
    background: #fff; border-radius: 24px;
    box-shadow: 0 2px 8px rgba(35, 32, 28, .06);
  }
  .db-search input {
    flex: 1; min-width: 0; border: 0; outline: none; background: none;
    font-family: inherit; font-size: 16px; color: #23201C;
  }
  .db-search input::placeholder { color: #B6ADA0; }
  .db-search button {
    width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 50%;
    background: #C0973F; color: #fff; display: grid; place-items: center; cursor: pointer;
    transition: transform .12s, opacity .18s;
  }
  .db-search button:hover { opacity: .92; }
  .db-search button:active { transform: scale(.94); }
  .db-search button svg { width: 17px; height: 17px; }
  .db-nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }
  .db-nav > button,
  .db-nav > a.db-apk {
    width: 58px; height: 58px; border-radius: 20px; cursor: pointer; padding: 0;
    border: 1px solid #EDE5D6; background: #fff; color: #23201C;
    display: grid; place-items: center; transition: background .16s, color .16s, border-color .16s, transform .12s;
  }
  .db-nav > button:hover,
  .db-nav > a.db-apk:hover { background: #F5EFE4; }
  .db-nav > button:active,
  .db-nav > a.db-apk:active { transform: scale(.95); }
  .db-nav > button.on { background: #C0973F; color: #fff; border-color: #C0973F; }
  .db-nav svg { width: 26px; height: 26px; }
  /* 安卓端下载：用墨绿区分于普通导航，紧贴「我的」右侧 */
  .db-nav > a.db-apk { color: #2E8D63; border-color: #CFE4D8; text-decoration: none; }
  .db-nav > a.db-apk:hover { background: #EAF5EE; }
  .db-nav > a.db-apk svg { width: 28px; height: 28px; }
  /* 超级管理员：购物袋左侧「新增商品」按钮 */
  .db-nav > button.db-add {
    width: auto; min-width: 74px; height: 58px; padding: 0 20px;
    border-color: #C0973F; background: #C0973F; color: #fff;
    font-size: 16px; font-weight: 600; letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(192,151,63,.26);
  }
  .db-nav > button.db-add:hover { background: #B08A38; border-color: #B08A38; color: #fff; }
  .db-actions { display: flex; gap: 8px; }
  .db-actions button {
    width: 44px; height: 44px; border-radius: 16px; cursor: pointer;
    border: 1px solid #EDE5D6; background: #fff; color: #23201C;
    display: grid; place-items: center; transition: background .16s;
  }
  .db-actions button:hover { background: #F5EFE4; }
  .db-actions button svg { width: 19px; height: 19px; }

  /* ---------- 页面骨架 ---------- */
  .topbar {
    position: static;
    height: auto;
    max-width: 1320px;
    margin: 0 auto;
    padding: 22px 32px 6px;
    background: none;
    backdrop-filter: none;
    border-bottom: 0;
  }
  .topbar h1 { font-size: 22px; }
  .topbar .act { font-size: 14px; padding: 8px 16px; }
  .view {
    flex: none;
    overflow: visible;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 8px 32px 56px;
  }
  .tabbar { display: none; }
  .phone > .loading { position: fixed; }

  /* 底部固定条 → 宽屏内联块 */
  .buybar, .cartfoot {
    position: static;
    max-width: none;
    margin: 16px 0 0;
    padding: 14px 18px;
    border: 1px solid #EDE5D6;
    border-radius: 24px;
    background: #fff;
    backdrop-filter: none;
    box-shadow: 0 2px 10px rgba(35, 32, 28, .05);
  }

  /* ---------- 首页：宫格 + KPI ---------- */
  .hero-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .hero-btn { padding: 20px 18px; }
  .hero-btn.wide { grid-column: span 2; }
  .kpis { grid-template-columns: repeat(4, 1fr); gap: 16px; background: none; border-radius: 0; overflow: visible; margin: 18px 0 0; }
  .kpis > .kpi { background: #fff; border-radius: 20px; box-shadow: 0 2px 10px rgba(35, 32, 28, .05); padding: 16px 18px; }
  .kpi .v { font-size: 22px; }

  /* ---------- 商品列表：分类横条 + 多列网格 ---------- */
  .chips { overflow: visible; flex-wrap: wrap; gap: 10px; padding: 6px 0 12px; }
  .chips.cats { gap: 10px; padding: 8px 0 16px; }
  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 22px;
    margin-top: 14px;
  }
  .pcard { transition: transform .16s, box-shadow .16s; }
  .pcard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(35, 32, 28, .1); }
  .pcard-img { aspect-ratio: 4 / 5; }
  .search { max-width: 520px; margin-bottom: 4px; }

  /* ---------- 商品详情：左图右信息 ---------- */
  .view[data-route="detail"], #view[data-route="detail"] { }
  .detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 480px;
    gap: 32px;
    align-items: start;
    margin: 0;
  }
  .detail > .d-gallery {
    grid-column: 1;
    grid-row: 1 / span 24;
    position: sticky;
    top: 104px;
    aspect-ratio: 4 / 5;
  }
  .detail > *:not(.d-gallery) { grid-column: 2; }
  .detail > .d-title, .detail .d-price { margin-bottom: 4px; }
  .detail > .d-card { padding: 20px 22px; }
  .d-gallery img { object-fit: contain; background: #F5EFE4; }

  /* ---------- 购物袋：列表 + 右侧结算栏 ---------- */
  #view[data-route="cart"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
  }
  #view[data-route="cart"] > .row-card { grid-column: 1; margin-bottom: 14px; }
  #view[data-route="cart"] > .cartfoot {
    grid-column: 2;
    grid-row: 1 / span 40;
    position: sticky;
    top: 104px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin: 0;
    padding: 22px;
  }
  #view[data-route="cart"] > .cartfoot .bb-btn { width: 100%; flex: none; height: 48px; }
  #view[data-route="cart"] > .cartfoot .cf-sum { display: flex; flex-direction: column; gap: 4px; }

  /* ---------- 我的订单：两列卡片 ---------- */
  #view[data-route="orders"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    align-items: start;
  }
  #view[data-route="orders"] > .chips,
  #view[data-route="orders"] > .hint,
  #view[data-route="orders"] > .order-strip,
  #view[data-route="orders"] > .empty { grid-column: 1 / -1; }
  #view[data-route="orders"] > .order-card { margin-bottom: 0; padding: 18px 20px; }

  /* ---------- 我的 / 表单 / 表格：内容居中加宽 ---------- */
  .me-card, .stat-strip, .menu-card, .form-card, .tbl-card { max-width: 1080px; }
  .me-card { padding: 24px; }
  .menu-card { padding: 8px; }
  .menu-row { padding: 14px 16px; border-radius: 16px; }
  .form-card { padding: 22px 24px; }
  .tbl-card { padding: 8px 10px; }
  table th, table td { padding: 12px 14px; }

  /* ---------- 客服对话 ---------- */
  #view[data-route="chat"] { max-width: 900px; margin: 0 auto; }
  .chat-foot { position: sticky; bottom: 12px; max-width: none; margin-top: 16px; border: 1px solid #EDE5D6; border-radius: 24px; background: #fff; }
  .chat-foot input { border-radius: 20px; }

  /* ---------- 弹层：居中对话框 ---------- */
  .sheet-mask { position: fixed; }
  .sheet {
    position: fixed;
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(680px, 92vw);
    max-height: 82vh;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(30, 26, 22, .24);
  }
  .sheet-mask.on { background: rgba(30, 26, 22, .38); }
  /* 桌面端入场只做淡入：避免 sheetUp 的 transform 覆盖居中位移 */
  .sheet.on { animation: sheetFade .22s ease; }
  @keyframes sheetFade { from { opacity: .3; } to { opacity: 1; } }
  /* 桌面端弹层可拖动：按住标题栏移动 */
  .sheet .sheet-head { cursor: move; user-select: none; touch-action: none; }
  .sheet.dragging { transition: none !important; will-change: left, top; }

  /* ---------- 登录页 ---------- */
  .login { background: linear-gradient(160deg, #FBF8F3 0%, #F1E8D9 100%); }
  .login-card { width: 480px; max-width: 480px; padding: 34px 32px; box-shadow: 0 18px 46px rgba(35, 32, 28, .12); }

  /* ---------- 图片查看器 ---------- */
  .viewer-stage img { max-width: 82vw; max-height: 74vh; }
}

/* 超宽屏：商品五列更舒展 */
@media (min-width: 1440px) {
  .deskbar-in, .topbar, .view { max-width: 1440px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
}

/* 右上角安卓端下载入口（a 标签沿用 .act 样式，去掉下划线） */
a.topbar-act, .topbar a.act { text-decoration: none; display: inline-block; }


/* ---------- 登录页浮动标签输入框（不使用 placeholder） ---------- */
.field.float { position: relative; display: block; padding: 2px 0; border-bottom: 0; }
.field.float > input {
  width: 100%; min-width: 0; text-align: left; font-size: 16px;
  padding: 20px 0 8px; border: 0; border-bottom: 1px solid #E8E2D9;
  border-radius: 0; background: none; color: #23201C; line-height: 1.4;
  transition: border-color .16s ease;
}
.field.float > input:focus { border-bottom-color: #A8763F; }
.field.float > label {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: auto; margin: 0; font-size: 15px; line-height: 1; color: #9C948A;
  pointer-events: none; letter-spacing: 0;
  transition: top .16s ease, transform .16s ease, font-size .16s ease, color .16s ease;
}
.field.float:focus-within > label,
.field.float.filled > label {
  top: 4px; transform: none; font-size: 11.5px; color: #A8763F; letter-spacing: .06em;
}
.field.float > input::placeholder { color: transparent; }
@media (min-width: 1024px) {
  .field.float > input { font-size: 15.5px; padding: 22px 0 9px; }
  .field.float > label { font-size: 15.5px; }
  .field.float:focus-within > label,
  .field.float.filled > label { font-size: 12px; }
}


/* ============================================================
   小屏（≤1023px）安卓端对齐版式
   与安卓版 ShopPage / StockPage / SalesPage / ManagePage / MinePage 一一对应
   仅首页右上角比安卓多一个「安卓版」下载入口，其余结构、层级、文案保持一致
   ============================================================ */
#view.m-small { padding: 0; }
#view.m-small::-webkit-scrollbar { width: 0; }

.m-head { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 8px; background: rgba(251, 248, 243, .97); backdrop-filter: blur(10px); }
.m-head .m-ht { min-width: 0; flex: 1 1 auto; }
.m-title { font-size: 22px; font-weight: 700; color: #23201C; line-height: 1.2; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-sub { font-size: 12px; color: #9C948A; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-acts { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.m-act { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px;
  border: 0; border-radius: 12px; background: #F5EFE4; color: #AD7B2F; font-family: inherit;
  font-size: 13px; line-height: 1; text-decoration: none; cursor: pointer; }
.m-act:active { background: #EFE6D6; }
.m-act svg { width: 16px; height: 16px; }
.m-act.primary { background: #A8763F; color: #fff; font-weight: 600; padding: 8px 13px; }
.m-act .dot { position: absolute; top: -4px; right: -2px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 9px; background: #E5484D; color: #fff; font-size: 10px; font-style: normal;
  line-height: 15px; text-align: center; }

.m-body { padding: 0 14px 26px; }
.m-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px;
  padding: 9px 12px; margin: 2px 0 8px; box-shadow: 0 1px 2px rgba(35, 32, 28, .04); }
.m-search svg { width: 16px; height: 16px; color: #B7AFA4; flex: 0 0 auto; }
.m-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 13.5px; color: #23201C; }
.m-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip { flex: 0 0 auto; padding: 5px 11px; border: 1px solid rgba(35, 32, 28, .07); border-radius: 14px;
  background: #fff; color: #5D574F; font-family: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; }
.m-chip.on { background: #F3E4CE; border-color: #E7D3B4; color: #8A5B22; font-weight: 600; }

.m-kpi { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.m-kpi::-webkit-scrollbar { display: none; }
.m-kpi-i { flex: 0 0 auto; min-width: 80px; padding: 8px 11px; border-radius: 12px;
  background: #fff; box-shadow: 0 1px 2px rgba(35, 32, 28, .05); }
.m-kpi-v { font-size: 17px; font-weight: 700; color: #23201C; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-kpi-l { font-size: 11px; color: #9C948A; margin-top: 2px; white-space: nowrap; }
.m-quick2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.m-quick2 .m-kpi-i { min-width: 0; }

.m-card { margin-top: 10px; padding: 0 12px; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 3px rgba(35, 32, 28, .06); }
.m-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0 8px; }
.m-card-h .t { font-size: 15px; font-weight: 600; color: #23201C; }
.m-card-h .a { font-size: 12px; color: #A8763F; }
.m-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(35, 32, 28, .05); }
.m-row:first-child { border-top: 0; }
.m-row .m-main { flex: 1 1 auto; min-width: 0; }
.m-row .m-t { display: flex; align-items: center; font-size: 14px; font-weight: 600; color: #23201C;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row .m-s { font-size: 11.5px; color: #9C948A; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row .m-r { flex: 0 0 auto; text-align: right; }
.m-num { font-size: 16px; font-weight: 700; color: #23201C; font-variant-numeric: tabular-nums; }
.m-tiny { font-size: 11px; color: #9C948A; white-space: nowrap; }
.m-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px;
  background: #F3E4CE; color: #8A5B22; font-size: 10px; font-weight: 400; }
.m-tag.pink { background: #FCE9EA; color: #D4383D; }

.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.m-pc { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(35, 32, 28, .07); }
.m-pc:active { transform: scale(.99); }
.m-pc .img { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #F2EEE8;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.m-pc .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-pc .img .ph { font-size: 11px; color: #C9C1B6; }
.m-pc .bd { padding: 8px 10px 10px; }
.m-pc .tt { font-size: 13px; font-weight: 600; color: #23201C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-pc .mt { font-size: 11px; color: #9C948A; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-pc .pr { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 6px; }
.m-pc .price { font-size: 16px; font-weight: 700; color: #E5484D; white-space: nowrap; }
.m-pc .st { font-size: 11px; color: #2E9E5B; white-space: nowrap; }
.m-pc .st.off { color: #9C948A; }

.m-me { display: flex; align-items: center; gap: 12px; padding: 16px 14px 12px; }
.m-avatar { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 22px; background: #F3E4CE;
  color: #8A5B22; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.m-me .n { font-size: 17px; font-weight: 700; color: #23201C; }
.m-me .r { font-size: 11.5px; color: #9C948A; margin-top: 2px; }
.m-quick { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 14px; padding: 12px 4px;
  border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(35, 32, 28, .06); }
.m-quick .q { text-align: center; }
.m-quick .v { font-size: 17px; font-weight: 700; color: #23201C; font-variant-numeric: tabular-nums; }
.m-quick .k { font-size: 11px; color: #9C948A; margin-top: 2px; }
.m-menu { margin: 10px 14px 0; padding: 0 12px; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 3px rgba(35, 32, 28, .06); }
.m-mi { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid rgba(35, 32, 28, .05); }
.m-mi:first-child { border-top: 0; }
.m-mi .m-main { flex: 1 1 auto; min-width: 0; }
.m-mi .t { font-size: 14px; font-weight: 500; color: #23201C; }
.m-mi .s { font-size: 11px; color: #9C948A; margin-top: 2px; }
.m-mi .g { flex: 0 0 auto; width: 16px; height: 16px; color: #CFC7BC; }

.m-pend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 2px 0 12px; }
.m-pend .p { padding: 10px 6px; border-radius: 12px; background: #FBF6EE; text-align: center; cursor: pointer; }
.m-pend .v { font-size: 19px; font-weight: 700; color: #23201C; }
.m-pend .k { font-size: 11px; color: #9C948A; margin-top: 2px; }
.m-qbtn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.m-qbtn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 8px;
  border-radius: 14px; background: #fff; color: #23201C; font-family: inherit; font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 3px rgba(35, 32, 28, .06); cursor: pointer; }
.m-qbtn svg { width: 18px; height: 18px; color: #A8763F; }
.m-empty { padding: 26px 0; text-align: center; font-size: 13px; color: #9C948A; }
.m-hint { padding: 12px 0; text-align: center; font-size: 11px; color: #9C948A; }


/* ---------- 商品编辑：小屏全屏页（对齐安卓）/ 大屏桌面双列表单 ---------- */
.ep { display: block; }
.ep-card { background: #fff; border-radius: 14px; padding: 14px; margin: 10px 0; box-shadow: 0 1px 2px rgba(35,32,28,.05); }
.ep-card .ep-h { font-size: 15px; font-weight: 600; color: #23201C; }
.ep-sub { font-size: 12px; color: #9C948A; margin-top: 4px; }
.ep-rows { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; }
.ep-row { flex: 0 0 auto; border: 0; background: #F5EFE4; color: #6E675E; font-family: inherit;
  font-size: 14px; padding: 8px 18px; border-radius: 16px; cursor: pointer; }
.ep-row.on { background: #A8763F; color: #fff; }
.ep-imgs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; align-items: center; }
.ep-img { position: relative; flex: 0 0 auto; width: 88px; height: 88px; border-radius: 12px;
  overflow: hidden; background: #F5EFE4; }
.ep-img img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.ep-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; padding: 0;
  border-radius: 10px; background: rgba(0,0,0,.62); color: #fff; font-size: 14px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; font-family: inherit; }
.ep-add { flex: 0 0 auto; width: 88px; height: 88px; border: 0; border-radius: 12px; background: #F5EFE4;
  color: #B6ADA0; font-size: 26px; line-height: 1; cursor: pointer; font-family: inherit; }
.ep-fields { margin-top: 6px; }
.ep-field { padding: 10px 0; border-bottom: 1px solid #F6F2EC; }
.ep-field:last-child { border-bottom: 0; }
.ep-field > label { display: block; font-size: 13px; color: #6E675E; margin-bottom: 6px; }
.ep-field > input, .ep-field > select { width: 100%; box-sizing: border-box; border: 1px solid #EDE8E0; border-radius: 9px;
  padding: 10px 11px; background: #FCFAF7; font-family: inherit; font-size: 15px; color: #23201C; }
.ep-field > input:focus, .ep-field > select:focus { outline: none; border-color: #A8763F; background: #fff; }
.ep-field > select { height: 42px; padding: 0 9px; }

@media (max-width: 1023px) {
  /* 小屏：编辑商品直接铺满全屏，等同安卓独立页 */
  .sheet.ep-sheet {
    top: 0; bottom: 0; left: 0; right: 0; height: 100%; max-height: 100%;
    border-radius: 0; box-shadow: none;
  }
  .sheet.ep-sheet .sheet-head { padding: 16px 16px 8px; }
  .sheet.ep-sheet .sheet-body { padding: 4px 14px 18px; }
}

@media (min-width: 1024px) {
  /* 大屏：编辑商品加宽为桌面表单，字段两列排布 */
  .sheet.ep-sheet { width: min(1040px, 94vw); max-height: 86vh; }
  .ep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; align-items: start; }
  .ep-card { margin: 8px 0; padding: 18px 20px; border-radius: 20px; }
  .ep-card:first-child, .ep-card.wide, .ep > .hint { grid-column: 1 / -1; }
  .ep-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .ep-fields > .ep-field.wide2 { grid-column: 1 / -1; }
  .ep-imgs { gap: 12px; }
  .ep-img, .ep-add { width: 76px; height: 76px; border-radius: 14px; }
  .ep-del { width: 22px; height: 22px; font-size: 15px; }
  .sheet.ep-sheet .sheet-body { padding: 6px 20px 16px; }
  .sheet.ep-sheet .sheet-foot { padding: 12px 20px 16px; }
  .sheet.ep-sheet .sheet-foot > .btn { flex: 0 0 220px; margin-left: auto; }
}

/* 大屏商品详情：主图尺寸减半（宽高各为原来的一半） */
@media (min-width: 1024px) {
  .detail > .d-gallery { width: 50%; }
}


/* ---------- 大屏商品详情页重排：左图（含缩略图）+ 右信息列 ---------- */
/* 小屏详情也要有缩略图入口：默认显示为一条横向缩略条 */
.d-thumbs { display: flex; flex-wrap: nowrap; gap: 8px; width: 100%; justify-content: center;
  margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.d-thumbs img { width: 46px; height: 46px; flex: 0 0 auto; object-fit: cover; border-radius: 10px;
  border: 2px solid transparent; background: #F2EEE8; }
.d-thumbs img.on { border-color: #C0973F; }
@media (min-width: 1024px) {
  .detail { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 470px);
    justify-content: center; column-gap: 56px; row-gap: 14px; align-items: start; }
  .detail > .d-media { grid-column: 1; position: sticky; top: 96px;
    display: flex; flex-direction: column; align-items: center; gap: 16px; }
  .detail .d-media .d-gallery { width: 100%; aspect-ratio: 4 / 5; border-radius: 24px; }
  .detail .d-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
  .detail .d-thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 12px;
    border: 2px solid transparent; background: #F5EFE4; cursor: pointer; transition: border-color .16s; }
  .detail .d-thumbs img:hover { border-color: #E3D5BC; }
  .detail .d-thumbs img.on { border-color: #C0973F; }
  .detail > .d-info { grid-column: 2; min-width: 0;
    display: flex; flex-direction: column; gap: 14px; }
  .detail > .d-info > * { margin-top: 0; }
  .detail > .d-info > .d-price { padding: 0 6px 12px; border-bottom: 1px dashed #EFE8DC; margin-bottom: 0; }
  .detail > .d-info > .d-card { padding: 20px 22px; margin-top: 0; }
  .detail .kvlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .detail .kvlist .kv { padding: 6px 0; border-bottom: 1px solid #F6F2EC; }
  .detail .kvlist .kv b { font-weight: 600; }
  .detail .d-info > div[style*="height:76px"] { display: none; }
  /* 购买栏：整行卡片，按钮靠右不拉伸 */
  .buybar { justify-content: flex-end; gap: 12px; width: min(996px, 100%); max-width: none; margin: 18px auto 0; }
  .buybar .bb-ic { margin-right: auto; }
  .buybar .bb-btn { flex: 0 0 190px; }
}

/* ------------------------------------------------------------ 关于页（网页端与安卓端文案一致） */
.ab { font-size: 13px; color: #5D574F; }
.ab-head { display: flex; align-items: center; gap: 12px; padding: 4px 2px 14px; }
.ab-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: #F1EBE1; }
.ab-name { font-size: 17px; font-weight: 700; color: #2E2A24; letter-spacing: 1px; }
.ab-sub { font-size: 12px; color: #9A9084; margin-top: 3px; }
.ab-card { background: #FBF8F3; border: 1px solid #EFE7DA; border-radius: 12px; padding: 6px 12px; margin-bottom: 12px; }
.ab-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #EFE7DA; line-height: 1.6; }
.ab-row:last-child { border-bottom: 0; }
.ab-k { flex: 0 0 68px; color: #9A9084; }
.ab-v { flex: 1; color: #2E2A24; word-break: break-all; }
.ab-link { color: #B4772F; text-decoration: none; border-bottom: 1px solid rgba(180,119,47,.35); }
.ab-title { font-size: 12px; color: #9A9084; margin: 2px 2px 6px; letter-spacing: 1px; }
.ab-feat { display: flex; gap: 8px; padding: 7px 0; line-height: 1.65; border-bottom: 1px dashed #EFE7DA; }
.ab-feat:last-child { border-bottom: 0; }
.ab-tag { flex: 0 0 auto; height: 20px; line-height: 20px; padding: 0 8px; border-radius: 6px; background: rgba(180,119,47,.12); color: #B4772F; font-size: 12px; }
.ab-desc { flex: 1; }
.ab-word { line-height: 2; color: #5D574F; }
.ab-sign { text-align: right; color: #9A9084; margin-top: 6px; }
.ab-foot { text-align: center; color: #B0A695; font-size: 12px; padding: 8px 0 4px; }

/* ------------------------------------------------------------ 下拉刷新（脚本驱动，顶部提示条） */
/* 关闭浏览器原生下拉刷新，避免与页内提示条重复触发 */
html, body { overscroll-behavior-y: contain; }
#pullTip {
  position: fixed; left: 0; right: 0; top: 0; height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #8B7A5E; background: #FFFFFF;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05); z-index: 90;
  transition: height .12s ease;
  padding-top: env(safe-area-inset-top, 0);
}

/* ------------------------------------------------------------ 库存页分仓总览（库存 / 卖出 / 剩余） */
.whsum, .m-whsum { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.whsum::-webkit-scrollbar, .m-whsum::-webkit-scrollbar { display: none; }
.whsum { padding: 2px 0 10px; }
.m-whsum { padding: 0 0 10px; }
.ws-i, .m-ws-i {
  flex: 0 0 auto; text-align: left; font: inherit; cursor: pointer;
  background: #FFFFFF; border: 1px solid rgba(35, 32, 28, .08);
}
.ws-i { min-width: 158px; border-radius: 14px; padding: 9px 12px; }
.m-ws-i { min-width: 150px; border-radius: 12px; padding: 8px 11px; }
.ws-i.on { border-color: #C0973F; background: #FDF8EF; box-shadow: 0 0 0 1px rgba(192, 151, 63, .35) inset; }
.m-ws-i.on { border-color: #E7D3B4; background: #FBF5EA; }
.ws-n { font-size: 13px; font-weight: 600; color: #23201C; white-space: nowrap; }
.ws-v { margin-top: 3px; font-size: 12px; color: #7A7268; white-space: nowrap; }
.ws-v b { color: #23201C; font-weight: 600; font-variant-numeric: tabular-nums; }
