/* ==========================================================================
   鑫视微商城 V2.1 · 公共样式
   移动端优先，最大宽度 480px，桌面居中
   ========================================================================== */

:root {
  --red: #c8161d;
  --red-deep: #8e0f14;
  --red-dark: #65070b;
  --gold: #c9a45c;
  --gold-light: #f0d9a7;
  --gold-deep: #9c7534;
  --cream: #f7f2e8;
  --cream-2: #fbf8f1;
  --ink: #2b1a12;
  --ink-2: #5b4636;
  --muted: #9a8876;
  --line: #eadfce;
  --blue: #2f7cf6;
  --shadow: 0 8px 24px rgba(83, 42, 24, .10);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .28);
  --serif: "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: #e9e2d6;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 应用容器：桌面端居中，移动端满宽 */
#app, .app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  /* 不在应用容器上裁切：iOS Safari 下 overflow-x:hidden 会破坏
     内部 position:fixed 的底部导航栏，改为在 body 上裁切。 */
  overflow-x: visible;
  box-shadow: 0 0 40px rgba(0, 0, 0, .08);
}

/* 页面底部为 tabbar 预留空间 */
.page { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

/* --------------------------------------------------------------------------
   顶部栏
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 164, 92, .18);
}
.header .title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink);
}
.header .side { width: 36px; display: flex; align-items: center; }
.header .side.right { justify-content: flex-end; }
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-2);
}
.icon-btn:active { background: rgba(0, 0, 0, .05); }
.icon-btn svg { width: 21px; height: 21px; }

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 24px;
  border-radius: 23px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  background: var(--red);
  color: #fff;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn-block { display: flex; width: 100%; }
.btn-gold {
  background: linear-gradient(135deg, #e2bf7c 0%, #c9a45c 45%, #a9823f 100%);
  color: #4a2c12;
  box-shadow: 0 8px 18px rgba(169, 130, 63, .28);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid #d9c8ae;
  color: var(--ink-2);
}
.btn-blue {
  background: linear-gradient(135deg, #4b8df8, #2f6fe0);
  box-shadow: 0 10px 20px rgba(47, 124, 246, .22);
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 17px; }

/* --------------------------------------------------------------------------
   底部 TabBar
   -------------------------------------------------------------------------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: stretch;
  background: rgba(255, 253, 248, .97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(201, 164, 92, .22);
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  color: #a99a8a;
  letter-spacing: .5px;
}
.tab-item svg { width: 22px; height: 22px; stroke-width: 1.7; }
.tab-item.active { color: var(--red); font-weight: 600; }
.tab-item.active svg { stroke-width: 2.1; }

/* --------------------------------------------------------------------------
   通用卡片 / 空状态 / 加载
   -------------------------------------------------------------------------- */
.card {
  background: var(--cream-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty::before {
  content: "";
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #fff, #eadfce);
  border: 1px solid var(--line);
}
.loading {
  padding: 50px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.loading::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid rgba(201, 164, 92, .25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   表单
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid #efe6d7;
}
.field:last-child { border-bottom: none; }
.field-icon {
  width: 22px;
  height: 22px;
  flex: none;
  color: #b6a27f;
}
.field-icon svg { width: 22px; height: 22px; }
.field .control { flex: 1; min-width: 0; }
.field input,
.field select {
  width: 100%;
  height: 34px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
}
.field input::placeholder { color: #bcae9d; font-size: 14px; }
.field select { appearance: none; color: var(--ink); }
.field .suffix { flex: none; display: flex; align-items: center; gap: 8px; }
.field .locked { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.field .eye { color: #b6a27f; display: flex; }

/* --------------------------------------------------------------------------
   身份徽章（金线莲质感，纯 CSS）
   -------------------------------------------------------------------------- */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px 0 6px;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #3a2408;
  background: linear-gradient(135deg, #f7e3b6, #d9b26b 55%, #b48a45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 3px rgba(120, 80, 20, .25);
}
.level-badge .lotus { width: 11px; height: 11px; }
.level-badge.normal { background: linear-gradient(135deg, #f2f0ec, #cfc7bb); color: #5b5248; }
.level-badge.jincao { background: linear-gradient(135deg, #eaf6d8, #a9d07a 55%, #6f9a43); color: #23380f; }
.level-badge.xiancao { background: linear-gradient(135deg, #efe0ff, #c49ae6 55%, #8b5cb5); color: #2c1440; }
.level-badge.jinxi { background: linear-gradient(135deg, #ffe4cf, #ef9c6a 55%, #c05a2e); color: #3d1606; }
.level-badge .name { line-height: 1; }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  max-width: 78%;
  padding: 11px 18px;
  border-radius: 10px;
  background: rgba(38, 26, 18, .88);
  color: #fff;
  font-size: 13px;
  text-align: center;
  z-index: 9999;
  animation: toast-in .18s ease;
  pointer-events: none;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -46%); } }

/* --------------------------------------------------------------------------
   页面通用滚动条隐藏
   -------------------------------------------------------------------------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* --------------------------------------------------------------------------
   海报页（poster.html）公共部分
   -------------------------------------------------------------------------- */
.poster-page {
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% 0%, #6d645a 0%, #4a423b 42%, #2f2a26 100%);
  color: #f5e9d2;
}
.poster-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #f7ead2;
}
.poster-top .title { font-size: 16px; letter-spacing: 3px; }
.poster-wrap { padding: 4px 22px 0; }

/* DOM 降级海报（服务端图片不可用时展示） */
.poster-card {
  position: relative;
  width: 100%;
  aspect-ratio: 750 / 1334;
  background: #f7f1e5;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 10px solid #c9a45c;
}
.poster-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 164, 92, .75);
  pointer-events: none;
}
.poster-inner {
  position: absolute;
  inset: 0;
  padding: 7% 6% 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.poster-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 22%;
  padding: 4% 0 2.4%;
  background: linear-gradient(135deg, #e6c98f, #c9a45c);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  color: #fffdf6;
  font-size: clamp(9px, 2.6vw, 13px);
  line-height: 1.25;
  letter-spacing: 1px;
}
.poster-logo {
  width: 21%;
  aspect-ratio: 1;
  margin-top: 2%;
  border-radius: 50%;
  border: 1px solid rgba(201, 164, 92, .65);
}
.poster-name {
  margin-top: 3.2%;
  font-family: var(--serif);
  font-size: clamp(15px, 4.4vw, 22px);
  color: #4a3626;
  letter-spacing: 2px;
}
.poster-badge-row { margin-top: 1.6%; display: flex; align-items: center; gap: 4px; }
.poster-slogan {
  margin-top: 6%;
  font-family: var(--serif);
  font-size: clamp(15px, 4.5vw, 23px);
  color: #c19a55;
  line-height: 1.7;
  letter-spacing: 2px;
  white-space: pre-line;
}
.poster-qr {
  margin-top: 6%;
  width: 44%;
  aspect-ratio: 1;
  padding: 3%;
  background: #fff;
  border-radius: 2px;
}
.poster-qr img { width: 100%; height: 100%; }
.poster-qr-tip {
  margin-top: 3%;
  font-size: clamp(9px, 2.5vw, 12px);
  color: #b7a58f;
  letter-spacing: 1px;
}
.poster-fingerprint {
  margin-top: auto;
  width: 22%;
  opacity: .65;
}
.poster-actions {
  display: flex;
  gap: 14px;
  padding: 22px 26px calc(24px + env(safe-area-inset-bottom, 0px));
}
.poster-actions .btn { flex: 1; }
.poster-actions .btn-outline { color: #f0dfc2; border-color: rgba(240, 223, 194, .45); }
.poster-slogans {
  padding: 0 22px 4px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.slogan-chip {
  flex: none;
  padding: 7px 13px;
  border-radius: 16px;
  font-size: 11.5px;
  color: #e8d6b8;
  border: 1px solid rgba(232, 214, 184, .28);
  background: rgba(255, 255, 255, .04);
}
.slogan-chip.active { background: rgba(201, 164, 92, .2); border-color: #d9b26b; color: #ffe9c2; }

/* --------------------------------------------------------------------------
   工具类
   -------------------------------------------------------------------------- */
.flex { display: flex; }
.flex-1 { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.serif { font-family: var(--serif); }
.hide { display: none !important; }

/* 桌面预览：给页面一个浅色舞台背景 */
@media (min-width: 560px) {
  body { background: #ded6c8; }
}

/* ==========================================================================
   V2.1 页面通用组件（个人中心 / 订单 / 收银台 / 资产 / 卡券 / 团队 / 看板）
   ========================================================================== */

/* 页面留白 */
.page-wrap { padding: 12px 14px 0; }
.page-gap { height: 10px; }

/* 分节标题 */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px 8px;
}
.section-head .name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
  position: relative;
  padding-left: 10px;
}
.section-head .name::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 14px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
}
.section-head .more { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.section-head .more svg { width: 14px; height: 14px; }

/* 卡片容器与单元格 */
.card-box {
  background: var(--cream-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 2px 14px;
}
.card-box.flush { padding: 0; overflow: hidden; }
.cells { background: var(--cream-2); border-radius: 14px; box-shadow: var(--shadow); padding: 2px 14px; }
.cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 0;
  border-bottom: 1px solid #f0e7d8;
  color: var(--ink);
}
.cell:last-child { border-bottom: none; }
.cell .ic {
  width: 34px; height: 34px;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(160deg, #fdf6e8, #f3e6cf);
  color: var(--gold-deep);
}
.cell .ic svg { width: 18px; height: 18px; }
.cell .label { flex: 1; font-size: 14px; }
.cell .label small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.cell .value { color: var(--muted); font-size: 13px; text-align: right; }
.cell .value.strong { color: var(--ink); font-weight: 600; font-size: 14px; }
.cell .arrow { color: #c9b9a4; display: flex; }
.cell .arrow svg { width: 16px; height: 16px; }
.cell.link:active { background: rgba(201, 164, 92, .07); }

/* 资产九宫格 */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--line);
  gap: 1px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.asset-cell {
  background: var(--cream-2);
  padding: 15px 6px 14px;
  text-align: center;
  position: relative;
}
.asset-cell:active { background: #f8f1e3; }
.asset-cell .num {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.5px;
  line-height: 1.2;
}
.asset-cell .lb { margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.asset-cell .lock {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 9px;
  color: #b99a63;
}

/* 订单卡片 */
.order-card {
  background: var(--cream-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--line);
}
.order-top .no { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-top .status { color: var(--red); font-weight: 600; flex: none; }
.order-type {
  flex: none;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 10px;
  color: #a5762f;
  background: #fbf2e0;
  border: 1px solid #ecd9b4;
}
.order-goods { display: flex; gap: 10px; padding: 10px 0 8px; }
.order-goods img {
  width: 62px; height: 62px;
  flex: none;
  border-radius: 9px;
  object-fit: cover;
  background: #f3ece0;
}
.order-goods .info { flex: 1; min-width: 0; }
.order-goods .name {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.order-goods .spec { margin-top: 4px; font-size: 11px; color: var(--muted); }
.order-goods .price { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
.order-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}
.order-foot .sum { margin-right: auto; font-size: 12px; color: var(--muted); }
.order-foot .sum b { color: var(--red); font-size: 15px; font-family: var(--serif); margin-left: 2px; }
.mini-btn {
  height: 30px;
  padding: 0 13px;
  border-radius: 15px;
  border: 1px solid #d9c8ae;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.mini-btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.mini-btn.gold { background: linear-gradient(135deg, #e2bf7c, #c9a45c); border-color: #c9a45c; color: #4a2c12; }
.mini-btn:disabled { opacity: .5; }

/* 状态标签页 */
.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 14px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 7px 15px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--ink-2);
  background: rgba(255, 253, 248, .7);
  border: 1px solid rgba(201, 164, 92, .22);
  white-space: nowrap;
}
.tab.on {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(200, 22, 29, .22);
}

/* 表单 */
.form-line { padding: 12px 0; border-bottom: 1px solid #f0e7d8; }
.form-line:last-child { border-bottom: none; }
.form-line .key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.form-line .key .hint { color: var(--muted); font-size: 11px; }
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
}
.input, .select { height: 44px; padding: 0 12px; }
.select { appearance: none; }
.textarea { min-height: 78px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--gold); }
.input::placeholder, .textarea::placeholder { color: #bcae9d; }
.form-tip { margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .input { flex: 1; }

/* 金额展示 */
.amount-box { text-align: center; padding: 20px 0 6px; }
.amount-box .lb { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.amount-box .num {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.5px;
  line-height: 1;
}
.amount-box .num small { font-size: 16px; margin-right: 2px; }

/* 底部弹层 / 弹窗 */
.sheet-mask,
.dialog-mask {
  position: fixed;
  inset: 0;
  background: rgba(24, 14, 8, .5);
  z-index: 1000;
  display: flex;
  animation: fade-in .16s ease;
}
.sheet-mask { align-items: flex-end; }
.dialog-mask { align-items: center; justify-content: center; padding: 0 30px; }
@keyframes fade-in { from { opacity: 0; } }
.sheet {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  max-height: 82vh;
  background: var(--cream);
  border-radius: 18px 18px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  flex-direction: column;
  animation: sheet-up .2s ease;
}
@keyframes sheet-up { from { transform: translateY(20px); opacity: .6; } }
.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(201, 164, 92, .16);
}
.sheet-head .title { font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; padding: 10px 16px 14px; }

.shop-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 23, 16, .48);
  backdrop-filter: blur(2px);
}

.shop-dialog {
  width: 100%;
  max-width: 300px;
  background: var(--cream-2);
  border-radius: 16px;
  padding: 20px 18px 14px;
  box-shadow: var(--shadow-lg);
  animation: dialog-in .16s ease;
}
@keyframes dialog-in { from { transform: scale(.94); opacity: .5; } }
.shop-dialog-title { text-align: center; font-size: 15.5px; font-weight: 600; letter-spacing: .5px; }
.shop-dialog-body {
  padding: 12px 2px 18px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
  word-break: break-word;
}
.shop-dialog-actions { display: flex; gap: 10px; }
.shop-dialog-actions .btn { flex: 1; height: 40px; font-size: 14px; border-radius: 20px; }

/* 商品小卡（收藏 / 足迹 / 搜索结果） */
.goods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 0;
}
.mini-card {
  background: var(--cream-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mini-card .cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f3ece0;
}
.mini-card .body { padding: 8px 9px 11px; }
.mini-card .name {
  font-size: 13px;
  line-height: 1.35;
  min-height: 35px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mini-card .sub { margin-top: 3px; font-size: 10.5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-card .bottom { display: flex; align-items: baseline; justify-content: space-between; margin-top: 7px; }
.mini-card .price { color: var(--red); font-weight: 700; font-size: 15px; font-family: var(--serif); }
.mini-card .price small { font-size: 10px; margin-right: 1px; }
.mini-card .tag { font-size: 10px; color: #a5762f; }

/* 空态 / 加载更多 / 页脚 */
.empty-mini { padding: 44px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty-mini .art {
  width: 68px; height: 68px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #fff, #eadfce);
  border: 1px solid var(--line);
}
.load-more { padding: 14px 0 20px; text-align: center; font-size: 12px; color: var(--muted); }
.foot-note {
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: #b3a18d;
  font-size: 10.5px;
  line-height: 1.9;
}
.foot-note a { color: #a9947a; text-decoration: underline; }

/* 头像 / 用户头部 */
.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  background: #f3ece0;
  border: 1px solid rgba(255, 255, 255, .7);
}
.user-head {
  background:
    radial-gradient(120% 90% at 82% 0%, rgba(255, 226, 172, .28), transparent 58%),
    linear-gradient(160deg, #d02128 0%, #b31218 58%, #8e0f14 100%);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 54px;
  border-radius: 0 0 24px 24px;
  color: #fffdf6;
  position: relative;
  overflow: hidden;
}
.user-head::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  border: 1px solid rgba(240, 217, 167, .22);
  box-shadow: 0 0 0 22px rgba(240, 217, 167, .06);
}
.user-head .row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.user-head .name { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.user-head .meta { margin-top: 5px; font-size: 11.5px; opacity: .8; }
.user-head .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; position: relative; z-index: 2; }
.user-head .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 13px;
  font-size: 11px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 236, 200, .32);
}
.user-head .tag.done { background: rgba(201, 164, 92, .3); border-color: rgba(240, 217, 167, .6); }

/* 订单快捷入口 */
.quick-orders {
  /* 我的页面：上方已有 .asset-wrap 上移，订单面板不再重复负边距，避免压住资产栏 */
  margin: 12px 12px 0;
  position: relative;
  z-index: 3;
  background: var(--cream-2);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.quick-orders .q {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 11px;
  color: var(--ink-2);
  position: relative;
}
.quick-orders .q svg { width: 22px; height: 22px; color: #8a6a3a; }
.quick-orders .q .dot {
  position: absolute;
  top: 0; right: 18%;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 9.5px;
  line-height: 15px;
  text-align: center;
}

/* 宫格菜单 */
.grid-menu {
  margin: 12px;
  background: var(--cream-2);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px 6px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 4px;
}
.grid-menu .m {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.grid-menu .m .ic {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #fdf5e6, #f3e5cc);
  color: var(--gold-deep);
}
.grid-menu .m .ic svg { width: 21px; height: 21px; }

/* 看板（青绿渐变） */
.dash-page {
  min-height: 100vh;
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(113, 213, 228, .45), transparent 62%),
    linear-gradient(180deg, #f2fbfd 0%, #eaf5f7 40%, #f6f4ee 100%);
}
.dash-hero {
  margin: 14px;
  border-radius: 20px;
  padding: 18px 16px 16px;
  color: #fff;
  background: linear-gradient(135deg, #6fd3e2 0%, #3fb0c6 55%, #2b93aa 100%);
  box-shadow: 0 16px 30px rgba(43, 147, 170, .28);
  position: relative;
  overflow: hidden;
}
.dash-hero::after {
  content: "";
  position: absolute;
  right: -30px; top: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.dash-hero .who { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.dash-hero .who .name { font-size: 16px; font-weight: 700; }
.dash-hero .who .sub { font-size: 11px; opacity: .82; margin-top: 2px; }
.dash-total { display: flex; margin-top: 16px; position: relative; z-index: 2; }
.dash-total .col { flex: 1; }
.dash-total .col + .col { border-left: 1px solid rgba(255, 255, 255, .22); padding-left: 12px; }
.dash-total .lb { font-size: 10.5px; opacity: .85; letter-spacing: .5px; }
.dash-total .val { margin-top: 5px; font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.dash-grid {
  margin: 0 14px 12px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(63, 176, 198, .16);
  border-radius: 16px;
  padding: 6px 0;
  box-shadow: 0 8px 22px rgba(43, 147, 170, .1);
}
.dash-grid .row { display: flex; padding: 9px 0; }
.dash-grid .row + .row { border-top: 1px dashed rgba(63, 176, 198, .18); }
.dash-grid .item { flex: 1; text-align: center; }
.dash-grid .lb { font-size: 10.5px; color: #7d9aa1; }
.dash-grid .val { margin-top: 4px; font-size: 15px; font-weight: 700; color: #2b7f90; font-family: var(--serif); }
.dash-member {
  margin: 0 14px 9px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(63, 176, 198, .14);
  border-radius: 14px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: 0 6px 16px rgba(43, 147, 170, .08);
}
.dash-member .avatar-img { width: 42px; height: 42px; flex: none; }
.dash-member .body { flex: 1; min-width: 0; }
.dash-member .title { font-size: 13px; font-weight: 600; color: #24505a; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dash-member .meta { margin-top: 4px; font-size: 11px; color: #7d9aa1; }
.dash-member .perf { text-align: right; flex: none; }
.dash-member .perf b { display: block; font-size: 15px; color: #e8892b; font-family: var(--serif); }
.dash-member .perf span { font-size: 10px; color: #9bb3b8; }
.dash-logout { margin: 8px 14px calc(20px + env(safe-area-inset-bottom, 0px)); }

/* 优惠券 / 卡券 */
.coupon-card {
  position: relative;
  margin-bottom: 10px;
  background: linear-gradient(120deg, #fffaf0, #fdf2df);
  border: 1px solid #ecd9b4;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}
.coupon-card::before,
.coupon-card::after {
  content: "";
  position: absolute;
  left: 92px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid #ecd9b4;
}
.coupon-card::before { top: -9px; }
.coupon-card::after { bottom: -9px; }
.coupon-card .face {
  width: 78px;
  flex: none;
  text-align: center;
  border-right: 1px dashed #e0caa4;
  padding-right: 10px;
}
.coupon-card .face b { font-family: var(--serif); font-size: 24px; color: var(--red); }
.coupon-card .face b small { font-size: 12px; }
.coupon-card .face span { display: block; margin-top: 3px; font-size: 10px; color: #a5762f; }
.coupon-card .info { flex: 1; min-width: 0; }
.coupon-card .info .t { font-size: 13.5px; font-weight: 600; }
.coupon-card .info .d { margin-top: 4px; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.coupon-card.used { opacity: .55; }

/* 资产流水 */
.flow-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0e7d8;
}
.flow-item:last-child { border-bottom: none; }
.flow-item .body { flex: 1; min-width: 0; }
.flow-item .t { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-item .d { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.flow-item .amt { flex: none; text-align: right; font-family: var(--serif); font-size: 15px; font-weight: 700; }
.flow-item .amt.in { color: #c0392b; }
.flow-item .amt.out { color: #2f7f6f; }
.flow-item .amt small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* 步骤条（下单成功 / 退款进度） */
.steps { display: flex; padding: 16px 4px; }
.steps .s { flex: 1; text-align: center; position: relative; font-size: 11px; color: var(--muted); }
.steps .s::before {
  content: "";
  display: block;
  width: 18px; height: 18px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #e7dcc9;
  border: 2px solid #f7f2e8;
}
.steps .s.on { color: var(--red); font-weight: 600; }
.steps .s.on::before { background: var(--red); box-shadow: 0 0 0 3px rgba(200, 22, 29, .12); }
.steps .s + .s::after {
  content: "";
  position: absolute;
  top: 9px; left: -50%;
  width: 100%; height: 1px;
  background: #e7dcc9;
  z-index: -1;
}

/* 提示条 */
.notice-line {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fdf6e8;
  border: 1px solid #ecd9b4;
  color: #8a6a3a;
  font-size: 11.5px;
  line-height: 1.65;
}
.notice-line.danger { background: #fdf0ef; border-color: #f3cdca; color: #a5352f; }

/* 徽标点 */
.badge-dot {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* 安全区 */
.safe-bottom { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.fixed-bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 253, 248, .97);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(201, 164, 92, .2);
  z-index: 90;
  display: flex;
  gap: 10px;
}
.fixed-bottom .btn { flex: 1; }
.fixed-bottom .btn-outline { flex: 0 0 auto; }
body.has-fixed-bottom { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }

/* --------------------------------------------------------------------------
   共享：商品行 / 支付方式 / 开关 / 成功提示（收银台、订单、资产页共用）
   -------------------------------------------------------------------------- */
.goods { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px dashed #f0e7d8; }
.goods:last-child { border-bottom: none; }
.goods img {
  width: 64px; height: 64px;
  flex: none;
  border-radius: 9px;
  object-fit: cover;
  background: #f3ece0;
}
.goods .info { flex: 1; min-width: 0; }
.goods .name { font-size: 13.5px; line-height: 1.4; }
.goods .spec { margin-top: 4px; font-size: 11px; color: var(--muted); }
.goods .price { color: var(--red); font-family: var(--serif); font-weight: 700; }
.goods .qty { color: var(--muted); font-size: 12px; }

.pay-item {
  background: var(--cream-2);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
}
.pay-item.on { border-color: var(--gold); box-shadow: 0 8px 24px rgba(201, 164, 92, .22); }
.pay-item.disabled { opacity: .5; }
.pay-item .logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #fdf5e6, #f3e5cc);
  color: var(--gold-deep);
  flex: none;
}
.pay-item .body { flex: 1; min-width: 0; }
.pay-item .t { font-size: 14px; font-weight: 600; }
.pay-item .d { margin-top: 3px; font-size: 11px; color: var(--muted); }
.radio {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1.5px solid #d5c4aa;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.pay-item.on .radio { background: var(--red); border-color: var(--red); }

.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.switch i {
  position: absolute; inset: 0;
  border-radius: 13px;
  background: #ddd0bb;
  transition: background .18s ease;
  pointer-events: none;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .18s ease;
}
.switch input:checked + i { background: linear-gradient(135deg, #e2bf7c, #c9a45c); }
.switch input:checked + i::after { transform: translateX(20px); }

.level-badge .level-icon { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: 4px; }
