/* ============================================================
   洗车佬 · 代买(网页版) 基础样式
   设计语言沿用小程序: 浅色线框像素风。小程序用 rpx(750 设计稿),
   这里统一按 1rpx = 0.5px 折算, 设计基准 375px 宽。
   ============================================================ */
:root {
  --paper: #f4f4ef;
  --card: #ffffff;
  --ink: #1f1f24;
  --muted: #8a8a94;
  --muted-2: #9a9aa2;
  --line: #1f1f24;
  --line-soft: #e2e2da;
  --shadow: #d9d9d0;
  --shadow-2: #b8b8b0;
  --warn: #b03a5b;
  --orange: #d2691e;
  --ok: #2f6b46;
  --appbar-h: 52px;
  --tabbar-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-pad: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--paper); }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea { -webkit-appearance: none; border-radius: 0; }
[hidden] { display: none !important; }
.mono { font-family: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace; }

/* ---------- 页面骨架 ---------- */
.view {
  max-width: 480px;
  margin: 0 auto;
  padding-top: calc(var(--appbar-h) + var(--safe-top) + 4px);
  padding-bottom: calc(28px + var(--safe-bottom));
  min-height: 100vh;
  position: relative;
}
.view.with-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 22px); }
@media (min-width: 560px) {
  html, body { background: #e7e7df; }
  #appbar, #tabbar { left: 50% !important; right: auto !important; transform: translateX(-50%); width: 480px !important; }
  .view { box-shadow: 0 0 0 1px #d9d9d0; background: var(--paper); }
}

/* ---------- 顶栏 ---------- */
#appbar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 60;
  height: calc(var(--appbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex; align-items: center;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
#appbar .bar-inner { flex: 1; height: var(--appbar-h); display: flex; align-items: center; padding: 0 12px; gap: 8px; }
#appbar .bar-left { width: auto; flex: 0 0 auto; min-width: 40px; display: flex; align-items: center; }
#appbar .bar-title { flex: 1; text-align: center; font-size: 17px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#appbar .bar-right { width: 40px; flex: 0 0 40px; display: flex; justify-content: flex-end; }
#appbar .brand { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
#appbar .brand-main { font-size: 19px; font-weight: 900; letter-spacing: 2px; }
#appbar .brand-main::after { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--ink); margin-left: 5px; vertical-align: 2px; }
#appbar .brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.5px; }
.icon-btn {
  width: 34px; height: 32px; border: 2px solid var(--line); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 2px 2px 0 var(--shadow); cursor: pointer;
}
.icon-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; }
.icon-btn.plain { border: none; background: transparent; box-shadow: none; }
.bar-back { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 13px; cursor: pointer; padding: 4px 2px; white-space: nowrap; flex: 0 0 auto; }
.bar-back svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.4; }

/* ---------- 底栏 ---------- */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--card);
  border-top: 2px solid var(--line);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
}
#tabbar .tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted-2); font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; user-select: none;
}
#tabbar .tab-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#tabbar .tab-item.on { color: var(--ink); background: #fbfbf8; }
#tabbar .tab-item.on svg { stroke-width: 2.3; }

/* ---------- 通用文字/间距 ---------- */
.page { padding: 0 var(--page-pad); }
.title { display: flex; align-items: center; font-size: 16px; font-weight: 800; color: var(--ink); margin: 20px 4px 8px; letter-spacing: 0.5px; }
.title::before { content: ''; width: 7px; height: 7px; background: var(--ink); margin-right: 7px; flex: 0 0 7px; }
.title .title-right, .title-right { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; }
.px-note { margin: 0 4px 10px 18px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: 12px; }
.empty, .b-empty { text-align: center; color: var(--muted-2); padding: 36px 20px; font-size: 13px; line-height: 1.9; }
.section-label { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 1px; margin-bottom: 8px; }
.hr-dash { border: 0; border-top: 1px dashed var(--line-soft); margin: 12px 0; }
.spacer-8 { height: 8px; } .spacer-16 { height: 16px; } .spacer-24 { height: 24px; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- 卡片 ---------- */
.px-card {
  background: var(--card);
  border: 2px solid var(--line);
  box-shadow: 2px 2px 0 var(--shadow);
  padding: 12px;
  margin: 10px 4px;
  max-width: 100%;
}
.px-card.tight { padding: 10px; }
.px-card.flush { margin-left: 0; margin-right: 0; }

/* ---------- 按钮 ---------- */
.px-btn, .b-btn, .mini-btn {
  display: block; width: 100%; text-align: center; cursor: pointer; user-select: none;
  background: transparent; color: var(--ink); font-weight: 800; font-size: 15px;
  padding: 10px 0; margin: 10px 0; border: 2px solid var(--line);
  box-shadow: 2px 2px 0 var(--shadow); line-height: 1.3;
  transition: transform 0.04s linear, box-shadow 0.04s linear;
}
.px-btn:active, .b-btn:active, .mini-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow); }
.px-btn.primary { font-size: 17px; padding: 13px 0; box-shadow: 3px 3px 0 var(--shadow-2); letter-spacing: 1px; }
.px-btn.primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--muted); }
.px-btn.standalone { margin-left: 4px; margin-right: 4px; width: auto; }
.px-btn.solid, .b-btn.solid, .mini-btn.solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.px-btn.ghost, .b-btn.ghost { color: #6a6a74; border-color: var(--shadow-2); box-shadow: none; }
.px-btn.warn, .b-btn.warn { color: var(--warn); border-color: var(--warn); }
.px-btn[disabled], .b-btn[disabled], .mini-btn[disabled], .is-disabled {
  color: var(--shadow-2) !important; border-color: var(--shadow) !important;
  background: #f4f4ef !important; box-shadow: none !important; pointer-events: none;
}
.mini-btn { display: inline-block; width: auto; font-size: 12px; padding: 5px 11px; margin: 0; }
.btn-row { display: flex; gap: 8px; align-items: stretch; }
.btn-row .b-btn, .btn-row .px-btn { flex: 1; width: auto; margin: 8px 0 2px; }
.btn-row .mini-btn { flex: 0 0 auto; }
.link-row { display: flex; justify-content: center; gap: 18px; font-size: 12px; color: var(--muted); margin: 14px 4px; }
.link-row span { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- 标签 ---------- */
.px-tag, .b-tag { display: inline-block; font-size: 11px; padding: 2px 7px; border: 2px solid var(--ink); font-weight: 800; line-height: 1.5; vertical-align: 1px; }
.b-tag { font-size: 10.5px; padding: 1px 6px; border-width: 1.5px; }
.b-tag.solid { background: var(--ink); color: #fff; }
.b-tag.warn { color: var(--warn); border-color: var(--warn); }
.b-tag.orange { color: var(--orange); border-color: var(--orange); }
.b-tag.gray, .px-tag.gray { color: var(--muted-2); border-color: #c8c8c0; }
.px-tag.green { color: var(--ink); border-color: var(--ink); }
.px-tag.yellow { color: var(--muted); border-color: var(--shadow-2); border-style: dashed; }
.b-tag.plain { color: var(--muted); border-color: var(--shadow-2); }
.tag-dot { display: inline-block; width: 6px; height: 6px; background: var(--warn); margin-left: 4px; vertical-align: 1px; border-radius: 50%; }

/* ---------- Tab ---------- */
.tabs { display: flex; margin: 6px 4px 0; border-bottom: 2px solid var(--line); }
.tabs .tab {
  flex: 1; text-align: center; padding: 9px 0; font-size: 15px; font-weight: 800;
  color: var(--muted-2); cursor: pointer; user-select: none; border: 2px solid transparent; border-bottom: none;
}
.tabs .tab.on { color: var(--ink); background: var(--card); border-color: var(--line); margin-bottom: -2px; position: relative; }
.tabs .tab .dot { display: inline-block; width: 6px; height: 6px; background: var(--warn); border-radius: 50%; margin-left: 3px; vertical-align: 2px; }

/* ---------- 表单 ---------- */
.px-input, .px-textarea {
  background: #fbfbf8; color: var(--ink); border: 2px solid var(--line);
  padding: 0 10px; margin: 8px 0; font-size: 14px; width: 100%; min-height: 42px;
  border-radius: 0; outline: none;
}
.px-input { height: 42px; line-height: 42px; display: block; }
.px-textarea { min-height: 96px; padding: 10px; line-height: 1.6; resize: vertical; }
.px-input:focus, .px-textarea:focus { background: #fff; box-shadow: 2px 2px 0 var(--shadow); }
.b-label { font-size: 13px; font-weight: 800; color: var(--ink); margin-top: 14px; }
.b-label .req { color: var(--warn); margin-left: 2px; }
.b-tip { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 5px; }
.b-warn { color: var(--warn); font-size: 12px; line-height: 1.6; margin-top: 6px; }
.form-warn { border: 2px solid var(--warn); color: var(--warn); font-size: 12px; padding: 7px 9px; margin: 10px 0; line-height: 1.6; }
.input-wrap { position: relative; }
.input-suffix { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); }
.field { margin: 10px 0; }
.field-label { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.5px; margin-bottom: 2px; }

/* 选项 chips */
.chips { display: flex; flex-wrap: wrap; margin-top: 4px; }
.chip {
  font-size: 13px; padding: 6px 12px; border: 2px solid var(--line); color: var(--ink);
  margin: 0 7px 7px 0; background: var(--card); cursor: pointer; font-weight: 600;
  max-width: 100%; word-break: break-word;
}
.chip.on { background: var(--ink); color: #fff; font-weight: 800; }

/* 图片选择 */
.b-image-pick {
  width: 92px; height: 92px; border: 2px dashed var(--shadow-2); display: flex;
  align-items: center; justify-content: center; color: var(--muted); font-size: 24px;
  margin-top: 6px; cursor: pointer; background: #fbfbf8;
}
.b-image-wrap { position: relative; display: inline-block; margin-top: 6px; }
.b-image-wrap img { width: 100%; max-width: 220px; border: 2px solid var(--line); display: block; }
.b-image-del {
  position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; background: var(--ink);
  color: #fff; text-align: center; line-height: 26px; font-size: 15px; border-radius: 50%; cursor: pointer;
}
.thumb-160 { width: 80px; height: 80px; border: 2px solid var(--line); background: var(--paper); flex: 0 0 80px; object-fit: cover; }
.thumb-empty {
  width: 80px; height: 80px; border: 2px dashed var(--shadow-2); color: var(--shadow-2);
  display: flex; align-items: center; justify-content: center; font-size: 11px; flex: 0 0 80px;
}

/* ---------- 头像 ---------- */
.avatar { border: 2px solid var(--line); background: var(--paper); object-fit: cover; flex-shrink: 0; }
.avatar-40 { width: 40px; height: 40px; }
.avatar-48 { width: 48px; height: 48px; }
.avatar-56 { width: 56px; height: 56px; }
.avatar-64 { width: 64px; height: 64px; }

/* ---------- 弹层 ---------- */
.b-mask {
  position: fixed; inset: 0; background: rgba(17, 17, 20, 0.55); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-center { align-items: center; padding: 24px; }
.b-sheet {
  width: 100%; max-width: 480px; background: var(--paper); border-top: 3px solid var(--line);
  padding: 16px 14px; padding-bottom: calc(16px + var(--safe-bottom));
  max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: sheetUp 0.16s ease-out;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.b-sheet-title { font-size: 19px; font-weight: 900; color: var(--ink); margin-bottom: 4px; letter-spacing: 0.5px; }
.b-sheet-sub { font-size: 12px; color: var(--muted); line-height: 1.65; margin-bottom: 10px; }
.b-sheet-close { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; }
.dialog {
  width: min(320px, calc(100vw - 48px)); background: var(--paper); border: 3px solid var(--line);
  box-shadow: 4px 4px 0 rgba(17, 17, 20, 0.28); padding: 18px 16px 14px;
}
.dialog-title { font-size: 17px; font-weight: 900; letter-spacing: 0.5px; margin-bottom: 6px; }
.dialog-content { font-size: 13px; color: #4a4a52; line-height: 1.7; }
.dialog .px-input, .dialog .px-textarea { margin-top: 10px; }
.dialog-actions { display: flex; gap: 8px; margin-top: 14px; }
.dialog-actions .b-btn { flex: 1; margin: 0; font-size: 14px; padding: 9px 0; }

/* Toast */
.toast-root { position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: max-content; max-width: 78vw; }
.toast {
  background: rgba(31, 31, 36, 0.94); color: #fff; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border: 2px solid #000; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  animation: toastIn 0.16s ease-out; line-height: 1.5; text-align: center;
}
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 图片放大 */
.img-viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 18px; cursor: zoom-out; }
.img-viewer img { max-width: 100%; max-height: 90vh; border: 3px solid #fff; }

/* 加载 */
.loading-line { text-align: center; color: var(--muted-2); font-size: 12px; padding: 20px; }
.sk-card { background: #fff; border: 2px solid #d9d9d0; margin: 10px 4px; height: 84px; position: relative; overflow: hidden; }
.sk-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.045), transparent);
  animation: sk 1.1s infinite;
}
@keyframes sk { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* 通用行 */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.flex-1 { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-tap { border-bottom: 1px dashed var(--shadow-2); cursor: pointer; }
.chev { width: 9px; height: 9px; border-top: 2px solid #6a6a74; border-right: 2px solid #6a6a74; transform: rotate(45deg); flex: 0 0 9px; }
.b-chev { width: 8px; height: 8px; border-top: 2px solid #6a6a74; border-right: 2px solid #6a6a74; transform: rotate(45deg); flex: 0 0 8px; }

/* 底部固定操作区 */
.fixed-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  max-width: 480px; margin: 0 auto; background: var(--paper);
  border-top: 2px solid var(--line); padding: 10px 12px calc(10px + var(--safe-bottom));
  box-shadow: 0 -2px 0 rgba(217, 217, 208, 0.6);
}
.fixed-cta .b-btn, .fixed-cta .px-btn { margin: 6px 0; }
.cta-tip { text-align: center; font-size: 11px; color: var(--muted); margin-top: 2px; }
.bottom-space { height: 96px; }
.bottom-space-lg { height: 132px; }

/* 页面进入动画: 很轻, 只有卡片轻微上浮 */
.page-enter { animation: pageIn 0.18s ease-out; }
@keyframes pageIn { from { opacity: 0.5; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 主行动文字轻微跳动(和小程序一致, 只动文字) */
.cta-label { display: inline-block; animation: ctaLabel 2.2s steps(3, end) infinite; }
@keyframes ctaLabel {
  0%, 55%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-1.5px) scale(1.04); }
}

/* 群二维码 */
.group-qr { display: block; width: 230px; max-width: 76%; margin: 10px auto; border: 3px solid var(--line); background: #fff; cursor: zoom-in; }
.footer { text-align: center; font-size: 11px; color: var(--muted-2); margin: 16px 8px 6px; line-height: 1.8; }

/* ---------- 图片裁剪(战绩图等需要留关键信息、去掉隐私的场景) ---------- */
.crop-mask { align-items: center; justify-content: center; padding: 10px; }
.crop-dialog {
  width: min(440px, 100%);
  background: var(--paper);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 rgba(17, 17, 20, 0.3);
  padding: 12px;
}
.crop-head { font-size: 17px; font-weight: 900; letter-spacing: 0.5px; }
.crop-tip { font-size: 11.5px; color: #4a4a52; line-height: 1.7; margin: 6px 0 8px; }
.crop-stage {
  position: relative;
  background: #111114;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 54vh;
  padding: 14px;
  touch-action: none;
  user-select: none;
}
.crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 54vh;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.56);
  cursor: move;
  touch-action: none;
  box-sizing: border-box;
}
.crop-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid var(--ink);
  box-sizing: border-box;
}
.crop-handle.tl { left: -10px; top: -10px; cursor: nwse-resize; }
.crop-handle.tr { right: -10px; top: -10px; cursor: nesw-resize; }
.crop-handle.bl { left: -10px; bottom: -10px; cursor: nesw-resize; }
.crop-handle.br { right: -10px; bottom: -10px; cursor: nwse-resize; }
.crop-size {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(17, 17, 20, 0.78);
  color: #fff;
  font-size: 10.5px;
  padding: 2px 7px;
  letter-spacing: 0.5px;
  pointer-events: none;
}
.crop-actions { display: flex; gap: 8px; margin-top: 10px; }
.crop-actions .b-btn { flex: 1; margin: 0; font-size: 13px; padding: 9px 0; }

/* 采购截图(代买已买到) */
.bought-proof-card { padding: 12px; }
.bought-proof-img {
  width: 160px;
  height: 110px;
  object-fit: cover;
  background: #fff;
  border: 2px solid var(--line);
  margin: 6px 0;
  cursor: zoom-in;
}

/* "标为已买到" 弹层里的采购截图选择区: 横条更好点 */
.bought-shot-pick { width: 100%; height: 92px; font-size: 13px; text-align: center; line-height: 1.5; }

/* "战绩 LIST": 采买买到的每一单都是战绩 */
.wins-mark {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
  line-height: 1.4;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.wins-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 4px 2px;
}
.wins-title { font-family: "SFMono-Regular", Menlo, monospace; font-size: 15px; font-weight: 900; letter-spacing: 1px; }
.wins-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.5px; }
.mg-wins-card { position: relative; overflow: hidden; }
.mg-wins-shot-wrap { display: inline-block; margin-top: 8px; }
.mg-wins-shot-label { display: inline-block; font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: 1px; margin-bottom: 4px; }
.mg-wins-shot {
  width: 120px;
  height: 84px;
  object-fit: cover;
  border: 2px solid var(--line);
  background: #fff;
  cursor: zoom-in;
}
