/* ============================================
   豆拼拼 · 黑白灰设计系统
   Monochrome glass · opacity-layered · silky motion
   ============================================ */
:root {
  --bg: #f2f3f5;
  --ink: #17181c;
  --ink-2: #4c4f58;
  --ink-3: #9a9da6;
  --line: rgba(255, 255, 255, 0.68);
  --line-dark: rgba(23, 24, 28, 0.10);
  --glass: rgba(255, 255, 255, 0.60);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-thin: rgba(255, 255, 255, 0.42);
  --accent: #4a4f5b;
  --accent-2: #4c4f58;
  --accent-grad: linear-gradient(135deg, #eef0f4, #d7dbe4);
  --pink: #4a4f5b;
  --green: #6cbf9d;
  --orange: #d9b36c;
  --danger: #e0798a;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow-card: 0 10px 34px rgba(16, 17, 21, 0.07), 0 2px 8px rgba(16, 17, 21, 0.04);
  --shadow-float: 0 16px 48px rgba(16, 17, 21, 0.12);
  --spring: cubic-bezier(0.34, 1.36, 0.44, 1);
  --ease: cubic-bezier(0.28, 0.9, 0.36, 1);
  --tabbar-h: 100px;
  /* iPhone PWA 安全区（env() 非安全区设备回退 0） */
  --s-top: max(env(safe-area-inset-top), 0px);
  --s-bottom: max(env(safe-area-inset-bottom), 0px);
  /* 动态视口：100vh → 100dvh → JS 覆写精确值（三层兜底） */
  --app-h: 100vh;
  --app-h: 100dvh;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ---- 视口 + iOS 触摸基础：防止双击缩放、安全区留位 ---- */
html, body { height: 100%; height: var(--app-h); }
@supports (height: 1dvh) { html, body { height: var(--app-h); min-height: var(--app-h); } }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;          /* 禁用 iOS 双击缩放 → 也避免双击 tab 页面上移 */
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;         /* 禁用 iOS Safari 弹性整体回弹导致整页跟滑 */
}
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; color: var(--ink); }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* [A] 全局禁止长按选中文本复制（只有 .copyable / 输入框允许选中） */
body { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
input, textarea, select, [contenteditable], .copyable {
  -webkit-touch-callout: default; -webkit-user-select: text; user-select: text;
}

/* ---------- 环境光背景 ---------- */
.ambient { position: fixed; inset: 0; overflow: hidden; z-index: 0; filter: blur(0px); pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.b1 { width: 480px; height: 480px; background: #dcdee3; top: -160px; left: -120px; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 420px; height: 420px; background: #e6e7eb; top: 30%; right: -160px; animation: drift2 32s ease-in-out infinite alternate; }
.b3 { width: 380px; height: 380px; background: #d8dade; bottom: -140px; left: 10%; animation: drift3 30s ease-in-out infinite alternate; }
.b4 { width: 300px; height: 300px; background: #e9eaee; bottom: 20%; right: 15%; animation: drift1 36s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(70px, 50px) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-60px, -40px) scale(0.95); } }
@keyframes drift3 { from { transform: translate(0,0) scale(0.95); } to { transform: translate(50px, -60px) scale(1.12); } }

/* ---------- 手机容器 ---------- */
#phone {
  position: relative; z-index: 1;
  width: min(430px, 100vw); height: var(--app-h);
  margin: 0 auto;
  overflow: hidden;
  display: flex; flex-direction: column;
}
@media (min-width: 480px) and (min-height: 700px) {
  #phone {
    /* 桌面浏览器预览：保持 40px 外边距 */
    height: min(932px, calc(var(--app-h) - 40px));
    margin-top: 20px;
    border-radius: 44px;
    box-shadow: 0 30px 90px rgba(16, 17, 21, 0.18), 0 10px 28px rgba(16, 17, 21, 0.09),
      inset 0 0 0 1px rgba(16, 17, 21, 0.06);
  }
}

/* ---------- 开屏 ---------- */
.splash {
  position: absolute; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(255,255,255,0.9), rgba(238,241,251,0.86));
  backdrop-filter: blur(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.splash-logo { animation: pop 0.9s var(--spring) both 0.1s; }
.logo-beads { width: 104px; height: 104px; filter: drop-shadow(0 14px 28px rgba(16, 17, 21, 0.14)); }
.splash-name { margin-top: 22px; font-size: 30px; font-weight: 800; letter-spacing: 6px; animation: rise 0.8s var(--spring) both 0.25s; }
.splash-slogan { margin-top: 10px; color: var(--ink-3); font-size: 13px; letter-spacing: 2px; animation: rise 0.8s var(--spring) both 0.4s; }
@keyframes pop { from { transform: scale(0.4) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- 玻璃卡 ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.glass-strong { background: var(--glass-strong); }
.glass-thin { background: var(--glass-thin); }

/* ---------- 应用视图 ---------- */
.app { flex: 1; position: relative; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: calc(18px + var(--s-top)) 18px calc(var(--tabbar-h) + 20px + var(--s-bottom));
  scrollbar-width: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.view::-webkit-scrollbar { display: none; }
.view.chat-view { padding: 0 !important; }
.view.push { animation: slideIn 0.42s var(--ease) both; }
.view.tab-anim { animation: fadeUp 0.36s var(--ease) both; }
/* 详情页覆盖层：覆盖整个 app，独立滚动，关闭后不影响底层 tab DOM */
.detail-overlay {
  position: absolute; inset: 0; z-index: 50;
  display: none;
  background: var(--bg);
  animation: slideIn 0.38s var(--ease) both;
}
.detail-overlay .view {
  height: 100%;
}
/* 动画 to 状态用 transform:none：结束时不残留 translateX(0)/translateY(0) 合成层，
   避免 iOS PWA 上滚动后合成层命中测试偏移导致「看得到但点不到」 */
@keyframes slideIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 页头 */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
/* 页面标题 · 拼豆点缀（三颗豆：粉/蓝/黄） */
.page-title {
  font-size: 26px; font-weight: 800; letter-spacing: 1px;
  display: flex; align-items: center; gap: 13px;
}
.page-title::before {
  content: ''; flex-shrink: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ffffff, #d9dde4 72%);
  box-shadow: 7px 2px 0 -1px #cfd3dc, 14px -2px 0 -2px #e2e5eb,
    inset -1.5px -1.5px 3px rgba(16,17,21,0.10), inset 1.5px 1.5px 3px rgba(255,255,255,0.9);
  animation: beadFloat 3.6s var(--ease) infinite;
}
@keyframes beadFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.page-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  transition: transform 0.2s var(--spring), background 0.2s;
}
.icon-btn:active { transform: scale(0.88); }
.icon-btn svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* 搜索框 */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  margin-bottom: 14px;
  transition: box-shadow 0.3s, border 0.3s;
}
.search-bar:focus-within { box-shadow: 0 0 0 3.5px rgba(23, 24, 28, 0.12); border-color: rgba(23, 24, 28, 0.32); }
.search-bar svg { width: 18px; height: 18px; stroke: var(--ink-3); stroke-width: 2; fill: none; flex-shrink: 0; }
.search-bar input { flex: 1; border: none; outline: none; background: none; font-size: 14.5px; }
.search-bar input::placeholder { color: var(--ink-3); }

/* 搜索框 ✕ 清除按钮 */
.search-bar.sb-clear { position: relative; }
.sb-clear-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(23, 24, 28, 0.12); color: var(--ink-3);
  border: none; font-size: 10px; line-height: 1; font-weight: 700;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.sb-clear-btn:active { transform: translateY(-50%) scale(0.85); background: rgba(23, 24, 28, 0.2); }

/* 搜索历史下拉 */
.search-row { display: flex; align-items: flex-start; gap: 9px; position: relative; flex-wrap: wrap; }
.search-row .search-bar { flex: 1; min-width: 0; margin-bottom: 0; }
.sb-history {
  width: 100%; background: var(--glass);
  border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(20px);
  padding: 10px 12px 12px; margin-top: -6px;
  box-shadow: 0 8px 24px rgba(23,24,28,0.12);
  animation: fadeUp 0.25s both;
}
.sb-hist-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.sb-hist-clear { font-size: 11px; color: var(--ink-3); border: none; background: none; cursor: pointer; font-weight: 500; padding: 2px 6px; border-radius: 6px; transition: color 0.2s, background 0.2s; }
.sb-hist-clear:active { color: var(--danger); background: rgba(196,62,62,0.08); }
.sb-hist-list { display: flex; gap: 6px; flex-wrap: wrap; }
.sb-hist-item {
  font-size: 12.5px; padding: 6px 12px; border-radius: 100px;
  background: rgba(23,24,28,0.06); color: var(--ink-2);
  border: 1px solid rgba(23,24,28,0.08); cursor: pointer;
  font-weight: 500; transition: background 0.18s, transform 0.12s;
}
.sb-hist-item:active { transform: scale(0.95); background: rgba(23,24,28,0.1); }
.tag.oc-code {
  font-family: Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0.5px;
  background: rgba(23, 24, 28, 0.06); border: 1px dashed rgba(23, 24, 28, 0.2); color: var(--ink-2);
}

/* 筛选 chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; scroll-snap-type: x proximity; touch-action: pan-x; cursor: grab; }
.chips.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 100px; scroll-snap-align: start;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--glass-thin); border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: all 0.3s var(--spring);
}
.chip.active { background: var(--accent-grad); color: #3c404a; border-color: rgba(23,24,28,0.08); box-shadow: 0 6px 18px rgba(16, 17, 21, 0.08); transform: scale(1.02); }
.chip:active { transform: scale(0.94); }

/* 用户主页统计卡片 tab 切换高亮 */
.user-stat-card.active {
  background: var(--accent-grad) !important;
  box-shadow: 0 4px 14px rgba(16, 17, 21, 0.1);
  transform: scale(1.03);
}

/* 双滑块（色数筛选 min/max） */
.dual-slider-wrap {
  position: relative; height: 44px; margin-top: 8px;
}
.dual-slider-track {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 4px; background: rgba(23,24,28,0.12); border-radius: 4px;
}
.dual-slider-fill {
  position: absolute; top: 0; height: 100%;
  background: linear-gradient(90deg, rgba(16,17,21,0.85), rgba(60,64,74,0.85));
  border-radius: 4px;
}
.dual-slider {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none;
}
.dual-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 2px solid rgba(23,24,28,0.85);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); cursor: pointer;
  margin-top: -10px;
}
.dual-slider::-moz-range-thumb {
  pointer-events: auto;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 2px solid rgba(23,24,28,0.85);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); cursor: pointer;
}
.dual-slider::-webkit-slider-runnable-track { background: transparent; height: 4px; }
.dual-slider::-moz-range-track { background: transparent; height: 4px; }

/* 筛选命中横条（可一键清除） */
.flt-clear {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; margin-bottom: 10px; border-radius: 14px;
  font-size: 12px; color: var(--ink-2);
  background: var(--glass-thin); border: 1px dashed var(--line-dark); backdrop-filter: blur(10px);
}
.flt-clear b { font-size: 12px; color: var(--ink); font-weight: 700; }

/* ---------- 图纸详情互动 ---------- */
.pd-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 12px 14px; }
.pd-act {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 0; border-radius: 16px; font-size: 13px; font-weight: 700; color: var(--ink-2);
  background: var(--glass-thin); border: 1px solid var(--line); backdrop-filter: blur(10px);
  transition: all 0.3s var(--spring);
}
.pd-act i { font-style: normal; font-size: 14px; filter: grayscale(1) opacity(0.55); transition: all 0.3s var(--spring); }
.pd-act.on { color: var(--ink); background: var(--glass-strong); border-color: rgba(23,24,28,0.14); box-shadow: 0 6px 16px rgba(16,17,21,0.08); }
.pd-act.on i { filter: none; }
.pd-act:active { transform: scale(0.93); }
.pd-heart.beat { animation: heartBeat 0.5s var(--spring); display: inline-block; }
@keyframes heartBeat { 0% { transform: scale(1); } 35% { transform: scale(1.55); } 70% { transform: scale(0.9); } 100% { transform: scale(1); } }
.pc-heart { font-style: normal; font-size: 11px; filter: grayscale(1) opacity(0.5); }
.pc-heart.on { filter: none; }

/* 调色板用量 */
.pal-box { margin: 0 12px 14px; padding: 13px 14px; border-radius: 16px; background: var(--glass-thin); border: 1px solid var(--line); }
.pal-title { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 9px; }
.pal-row { display: flex; align-items: center; gap: 9px; padding: 3px 0; }
.pal-dot { width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(23,24,28,0.12); box-shadow: inset -1px -2px 3px rgba(0,0,0,0.18), inset 1px 1px 2px rgba(255,255,255,0.5); }
.pal-track { flex: 1; height: 7px; border-radius: 100px; background: rgba(23,24,28,0.06); overflow: hidden; }
.pal-track i { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, rgba(23,24,28,0.5), rgba(23,24,28,0.28)); transition: width 0.6s var(--ease); }
.pal-n { font-size: 11px; font-weight: 700; color: var(--ink-2); min-width: 34px; text-align: right; }
.pal-more { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }

/* 评论区 */
.cmt-box { margin-top: 14px; border-top: 1px solid var(--line-dark); padding-top: 12px; }
.cmt-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.cmt-item { display: flex; gap: 9px; padding: 7px 0; align-items: flex-start; }
.cmt-name { font-size: 12px; font-weight: 700; color: var(--ink); }
.cmt-time { font-size: 10.5px; color: var(--ink-3); font-weight: 400; margin-left: 7px; }
.cmt-text { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin-top: 2px; word-break: break-word; }
.cmt-empty { font-size: 12px; color: var(--ink-3); text-align: center; padding: 12px 0; }
.cmt-input-row { display: flex; gap: 8px; margin-top: 10px; }
.cmt-input-row .input { flex: 1; }

/* 快捷发布预填提示 */
.prefill-note { padding: 11px 15px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; border: 1px dashed var(--line-dark); }

/* ---------- 我的互动（pat-card 网格，与「我的图纸」同款卡片） ---------- */
.mi-fav-group { margin-bottom: 20px; }
.mi-fav-group:last-child { margin-bottom: 0; }
.mi-fav-group .mig-head { margin: 2px 2px 10px; }
.mi-card-acts { margin-top: 9px; display: flex; justify-content: flex-end; }
.mi-quote {
  font-size: 11.5px; color: var(--ink-2); margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mig-head { display: flex; align-items: center; gap: 8px; }
.mig-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink); }
.mig-n { font-size: 11px; color: var(--ink-3); }
.mig-act {
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  padding: 5px 10px; border-radius: 100px;
  background: rgba(23,24,28,0.05); border: 1px solid var(--line-dark);
}
.vis-toggle {
  position: relative;
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  padding: 5px 9px 5px 10px; border-radius: 100px;
  background: rgba(255,255,255,0.5); border: 1px solid var(--line-dark);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
}
.vis-toggle:active { transform: scale(0.94); }
.vis-toggle .vt-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg,#9ed4ba,#58b38a);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
}
.vis-toggle.friends .vt-dot { background: linear-gradient(135deg,#f3d59a,#d8a24d); }
.vis-toggle.private .vt-dot { background: linear-gradient(135deg,#eab0b9,#d56678); }
.vis-menu {
  padding: 8px; border-radius: 18px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(24px);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 18px 40px rgba(0,0,0,0.14);
  min-width: 170px;
}
.vis-menu .vm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  cursor: pointer;
}
.vis-menu .vm-item + .vm-item { margin-top: 2px; }
.vis-menu .vm-item:hover, .vis-menu .vm-item.on { background: rgba(16,17,21,0.05); }
.vis-menu .vm-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.vis-menu .vm-check { margin-left: auto; color: var(--accent); font-weight: 900; }

/* 公测公告条 · 免费声明 */
.beta-note {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--ink-2); line-height: 1.5;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(23, 24, 28, 0.07);
  border-radius: 14px; padding: 8px 12px; margin-bottom: 11px;
  backdrop-filter: blur(10px);
}

/* ---------- 订单卡片 ---------- */
.order-card {
  position: relative; overflow: hidden;
  margin-bottom: 14px; padding: 14px;
  display: grid; grid-template-columns: 86px 1fr; gap: 14px;
  transition: transform 0.25s var(--spring), box-shadow 0.3s;
  animation: fadeUp 0.5s var(--ease) both;
}
.order-card:active { transform: scale(0.975); }
.order-card img.cover { width: 86px; height: 86px; object-fit: cover; border-radius: 16px; border: 1px solid rgba(255,255,255,0.7); }
.order-card .oc-title { font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 64px; }
.oc-meta { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.tag {
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 100px;
  background: rgba(23, 24, 28, 0.07); color: #3a3c44;
}
.tag.pink { background: rgba(23, 24, 28, 0.09); color: #3a3c44; }
.tag.green { background: rgba(108, 191, 157, 0.14); color: #527a68; }
.tag.orange { background: rgba(217, 179, 108, 0.13); color: #8f825f; }
.tag.gray { background: rgba(120, 128, 165, 0.12); color: var(--ink-2); }
.tag.blue { background: rgba(95, 140, 232, 0.14); color: #4264b8; }
.oc-bottom { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.oc-price { font-size: 15px; font-weight: 800; color: var(--pink); }
.oc-price small { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.oc-user { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.status-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 100px;
  background: var(--accent-grad); color: #3c404a;
  box-shadow: 0 4px 12px rgba(16, 17, 21, 0.10), inset 0 1px 1px rgba(255, 255, 255, 0.85);
}
.status-badge.s-open { background: linear-gradient(135deg, #eceef3, #d3d8e1); }
.status-badge.s-working { background: linear-gradient(135deg, #e8edf5, #cdd9ea); }
.status-badge.s-shipping { background: linear-gradient(135deg, #e2efe9, #c8e2d6); }
.status-badge.s-done { background: linear-gradient(135deg, #d9dde6, #bcc4d2); }
.status-badge.s-pink { background: linear-gradient(135deg, #eef0f4, #d7dbe4); }

/* ---------- 图纸网格 ---------- */
.pat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.pat-card { overflow: hidden; transition: transform 0.25s var(--spring); animation: fadeUp 0.5s var(--ease) both; }
.pat-card:active { transform: scale(0.965); }
.pat-card .pc-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid rgba(255,255,255,0.5); }
.pat-card .pc-body { padding: 11px 13px 13px; }
.pat-card .pc-title { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pat-card .pc-meta { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11px; color: var(--ink-3); }
.pat-card .pc-dl { display: flex; align-items: center; gap: 3px; color: #7b8290; font-weight: 700; }
.pat-card .pc-dl svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; fill: none; }
/* 我的图纸卡片操作区：按钮永不换行竖排；删除统一为方形图标按钮 */
.mp-acts { margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.mp-acts .btn-sm { white-space: nowrap; }
.mp-acts .mp-main { flex: 1 1 auto; min-width: 0; padding-left: 8px; padding-right: 8px; gap: 5px; font-size: 12.5px; }
.mp-icon-btn {
  flex: none; width: 36px; height: 36px; padding: 0; margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(255,255,255,0.55);
  border: 1px solid rgba(231,76,60,.28); color: #e74c3c;
  cursor: pointer; transition: transform 0.2s var(--spring);
}
.mp-icon-btn:active { transform: scale(0.92); }
/* 我的图纸卡片：内容贴底分布（空白留在图片与按钮之间，而不是按钮下方）；查看详情提示悬浮在图片角上 */
.pat-card[data-pid] { display: flex; flex-direction: column; }
.pat-card[data-pid] .pc-imgwrap { position: relative; }
.pat-card[data-pid] .pc-imgwrap .pc-img { display: block; }
.pat-card[data-pid] .pc-view-hint {
  position: absolute; right: 8px; bottom: 8px; pointer-events: none;
  font-size: 10.5px; color: var(--ink-2); white-space: nowrap;
  padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.6);
  background: rgba(252,253,255,0.88); backdrop-filter: blur(8px);
}
.pat-card[data-pid] .pc-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pat-card[data-pid] .pc-body .mp-acts:last-child { margin-top: auto; padding-top: 9px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 16px;
  font-size: 14.5px; font-weight: 700; letter-spacing: 0.5px;
  transition: transform 0.22s var(--spring), box-shadow 0.3s, opacity 0.2s;
  user-select: none;
}
.btn:active { transform: scale(0.95); }
.btn-primary {
  background: var(--accent-grad); background-size: 190% 190%; color: #3c404a;
  box-shadow: 0 8px 22px rgba(16, 17, 21, 0.10), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: transform 0.22s var(--spring), box-shadow 0.3s, background-position 0.5s var(--ease);
}
.btn-primary:active { background-position: 100% 50%; }
.btn-pink { background: linear-gradient(135deg, #eef0f4, #dde1e9); color: #3c404a; box-shadow: 0 8px 22px rgba(16, 17, 21, 0.08); }
.btn-green { background: linear-gradient(135deg, #e6f2ec, #d0e5da); color: #3c5a4b; box-shadow: 0 8px 22px rgba(16, 17, 21, 0.06); }
.btn-ghost { background: var(--glass); border: 1px solid var(--line-dark); color: var(--ink); backdrop-filter: blur(12px); }
.btn-danger { background: rgba(224, 121, 138, 0.10); color: var(--danger); border: 1px solid rgba(224, 121, 138, 0.24); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 13px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- 统一内联 SVG 图标（替换 emoji 后的矢量图标样式） ---------- */
/* 全局兜底：所有线性图标默认按字号缩放 + 描边当前色，防止未设尺寸时 SVG 撑大布局。
   元素级选择器优先级最低，各专用容器（.mr-icon/.em-icon/.btn/.icon-btn 等）的
   class 规则会覆盖尺寸/颜色；starRows 星级用内联 style 设填充，也不受影响。 */
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; width: 1.06em; height: 1.06em; vertical-align: -0.16em; }
/* 通用：未单独指定尺寸的内联 svg 默认跟随字体大小、描边当前色 */
.mr-icon svg, .ntf-ico svg, .st-tool-ico svg, .em-icon svg, .ci-tag svg,
.pc-meta svg, .pd-act svg, .me-row svg, .empty svg, .tag svg, .seg svg {
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.mr-icon svg { width: 19px; height: 19px; stroke: var(--ink-2); }
.ntf-ico svg { width: 18px; height: 18px; stroke: var(--ink-2); }
.st-tool-ico svg { width: 21px; height: 21px; }
.em-icon svg { width: 40px; height: 40px; stroke: var(--ink-3); stroke-width: 1.6; opacity: .75; }
.ci-tag svg { width: 12px; height: 12px; }
.b-icon svg { width: 26px; height: 26px; stroke: var(--accent); stroke-width: 1.8; }
.vm-icon svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 2; }
.pd-act svg { width: 18px; height: 18px; }
/* 图标+文字横排容器 */
.ih { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.ih svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ih-lg svg { width: 19px; height: 19px; }
/* 内联于文字/分段按钮/筛选 chip 的图标：跟随字号缩放 */
.seg svg, .chip svg, .crt-feats span svg, .beta-note svg,
.me-row .mr-label svg, .pd-download svg, .sheet svg.inline-ic,
.pc-body svg, .me-stats span svg, .ast-official svg {
  height: 1.08em; width: 1.08em; flex-shrink: 0;
}
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; }
.crt-feats span { display: inline-flex; align-items: center; gap: 5px; }
.crt-feats span svg { stroke: currentColor; stroke-width: 1.9; fill: none; }

/* 图纸详情 · 轻量下载按钮 */
.pd-dl {
  width: 100%; margin-top: 12px; padding: 11px 16px;
  font-size: 13.5px; border-radius: 100px; height: auto;
}

/* 审核中心 · 行内驳回面板 */
.reject-panel {
  margin-top: 10px; padding: 11px;
  border-radius: 14px; background: rgba(224, 121, 138, 0.07);
  border: 1px solid rgba(224, 121, 138, 0.18);
  animation: fadeUp 0.3s var(--ease) both;
}
.reject-panel .rp-input {
  width: 100%; padding: 10px 13px; border-radius: 11px;
  border: 1px solid rgba(224, 121, 138, 0.24); outline: none;
  background: rgba(255, 255, 255, 0.8); font-size: 13px;
  transition: border 0.25s, box-shadow 0.25s;
}
.reject-panel .rp-input:focus { border-color: rgba(224, 121, 138, 0.45); box-shadow: 0 0 0 3.5px rgba(224, 121, 138, 0.12); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; letter-spacing: 0.5px; }
.input, .textarea, .select {
  width: 100%; padding: 13px 15px; border-radius: 15px;
  background: var(--glass); border: 1px solid var(--line-dark);
  backdrop-filter: blur(12px);
  font-size: 14.5px; outline: none;
  transition: border 0.25s, box-shadow 0.25s;
}
.input:focus, .textarea:focus, .select:focus { border-color: rgba(23, 24, 28, 0.38); box-shadow: 0 0 0 3.5px rgba(23, 24, 28, 0.10); }
.textarea { min-height: 90px; resize: none; line-height: 1.6; }
.seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; background: rgba(120,128,165,0.08); padding: 5px; border-radius: 15px; }
.seg button { padding: 10px 4px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: all 0.3s var(--spring); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(63,74,129,0.14); transform: scale(1.02); }
.seg.tab-seg { margin: 0 4px 14px; grid-template-columns: 1fr 1fr; }
.seg.tab-seg button { padding: 9px 2px; font-size: 12.5px; }
/* 好友页四等分标签（无切换动画） */
.seg.fr-tabs { margin: 0 4px 14px; grid-template-columns: repeat(4, 1fr); }
.seg.fr-tabs button { padding: 9px 2px; font-size: 12px; transition: none; }
.seg.sub-seg { margin: -8px 4px 14px; grid-template-columns: 1fr 1fr; background: rgba(120,128,165,0.05); padding: 4px; }
.seg.sub-seg button { padding: 7px 4px; font-size: 12px; border-radius: 10px; color: var(--ink-3); }
.seg.sub-seg button.active { color: var(--ink); font-weight: 700; }

/* 红点小标签（好友申请等） */
.red-dot-tag {
  display: inline-block;
  background: var(--danger-grad, linear-gradient(135deg,#E35D6A,#C43E3E));
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 100px;
}

.me-group .red-dot-tag { margin-left: 0; }

/* 好友申请历史的状态标签 */
.status-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 100px; margin-left: 6px; vertical-align: 1px; }
.status-tag.s-pend { background: rgba(76,125,255,0.14); color: #2e62ef; }
.status-tag.s-ok   { background: rgba(50,172,90,0.14); color: #2c9758; }
.status-tag.s-err  { background: rgba(196,62,62,0.12); color: #b53c3c; }
.status-tag.s-gray { background: rgba(114,118,135,0.14); color: #6b7180; }

/* 申请/发出撤回 fr-item 按钮在右柱 */
.fr-item .btn-sm { padding: 6.5px 12px; }

/* 图片上传九宫格 */
.up-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.up-item { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; animation: pop 0.4s var(--spring) both; }
.up-item img { width: 100%; height: 100%; object-fit: cover; }
.up-item .rm { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(20,22,31,0.55); color: #fff; font-size: 11px; display: grid; place-items: center; backdrop-filter: blur(6px); }
.up-add {
  aspect-ratio: 1; border-radius: 14px; border: 1.6px dashed rgba(120,128,165,0.4);
  display: grid; place-items: center; color: var(--ink-3); font-size: 24px; font-weight: 300;
  background: rgba(255,255,255,0.35); transition: all 0.25s;
}
.up-add:active { transform: scale(0.94); border-color: var(--accent); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty .em-icon { font-size: 44px; margin-bottom: 12px; opacity: 0.75; }
.empty p { font-size: 13.5px; line-height: 1.7; }

/* ---------- 创作入口统一页 ---------- */
.crt-hero { display: flex; align-items: center; gap: 16px; padding: 20px 18px; margin-bottom: 16px; }
.crt-hero-bd { display: flex; gap: 8px; flex-shrink: 0; }
.crt-hero-bd i { width: 26px; height: 26px; border-radius: 50%; display: block; box-shadow: inset 0 -4px 6px rgba(0,0,0,.18), inset 0 4px 5px rgba(255,255,255,.5); }
.crt-hero-bd i:nth-child(1) { background: linear-gradient(180deg,#ff8a9b,#e0607a); }
.crt-hero-bd i:nth-child(2) { background: linear-gradient(180deg,#7bc4ff,#4f9fe8); transform: translateY(-5px); }
.crt-hero-bd i:nth-child(3) { background: linear-gradient(180deg,#9be89b,#6cc66c); }
.crt-hero-txt b { font-size: 15.5px; font-weight: 700; color: var(--ink); display: block; margin-bottom: 4px; }
.crt-hero-txt p { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.crt-grid { display: flex; flex-direction: column; gap: 12px; }
.crt-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 0; background: var(--glass); width: 100%; cursor: pointer; text-align: left; transition: transform .18s var(--ease); }
.crt-card:active { transform: scale(0.97); }
.crt-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; }
.crt-ico svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.crt-ico-studio { background: linear-gradient(135deg, #7c83ff, #5a62e8); }
.crt-ico-img { background: linear-gradient(135deg, #ff8a9b, #e0607a); }
.crt-ico-photo { background: linear-gradient(135deg, #4ad0c8, #2e9e96); }
.crt-ico-order { background: linear-gradient(135deg, #ffb56b, #e88a35); }
.crt-body { flex: 1; min-width: 0; }
.crt-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.crt-desc { font-size: 12px; color: var(--ink-3); line-height: 1.55; }
.crt-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 8px; margin-left: 5px; vertical-align: middle; }
.crt-tag-new { background: rgba(122, 131, 255, 0.14); color: #5a62e8; }
.crt-go { font-size: 22px; color: var(--ink-3); font-weight: 300; flex-shrink: 0; line-height: 1; }
.crt-tip { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 18px; line-height: 1.6; }

/* ---------- 步骤指示器（向导流程） ---------- */
.wiz-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.wiz-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.wiz-step::before { content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.wiz-step:first-child::before { display: none; }
.wiz-step.done::before { background: var(--accent); }
.wiz-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--glass); border: 1px solid var(--line); color: var(--ink-3); z-index: 1; position: relative; }
.wiz-step.active .wiz-dot, .wiz-step.done .wiz-dot { background: var(--accent-grad); border-color: transparent; color: #3c404a; }
.wiz-step.active .wiz-dot { box-shadow: 0 0 0 4px rgba(122,131,255,0.18); }
.wiz-label { font-size: 11px; color: var(--ink-3); }
.wiz-step.active .wiz-label, .wiz-step.done .wiz-label { color: var(--ink); font-weight: 600; }

/* 拖拽上传区 */
.up-dropzone { border: 2px dashed var(--line); border-radius: var(--r-lg); padding: 36px 16px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; background: rgba(122,131,255,0.03); }
.up-dropzone:hover, .up-dropzone.drag { border-color: var(--accent); background: rgba(122,131,255,0.1); }
.up-dropzone-ico { font-size: 36px; margin-bottom: 10px; opacity: 0.7; }
.up-dropzone-tx { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.up-dropzone-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

/* 裁剪预览区 */
.crop-area { position: relative; width: 100%; max-width: 280px; margin: 0 auto 16px; aspect-ratio: 1; background: var(--glass); border-radius: var(--r-lg); overflow: hidden; }
.crop-area canvas, .crop-area img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- 标签栏 · 全局半透明磨砂 / 大厅页 .liquid 液态玻璃 ---------- */
.tabbar {
  position: absolute; left: 14px; right: 14px; bottom: calc(14px + var(--s-bottom)); z-index: 30;
  height: 66px; border-radius: 26px;
  display: grid; grid-template-columns: 1fr 1fr 64px 1fr 1fr; align-items: center;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 34px rgba(16, 17, 21, 0.10),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
  padding: 0 6px;
  transform: translate3d(0, 0, 0);
  /* backwards：动画结束后不锁定 transform，键盘弹出时 kbd-open 类才能正常下移隐藏 */
  animation: tabIn 0.6s var(--spring) backwards;
  /* [A+C v2] 用户反馈"闪一下"（太快太跳）：
       - 时⻓ 0.22s → 0.38s（慢 70%，给足眼睛过渡感知）
       - 曲线 cubic-bezier(.2,.7,.2,1) → ease-out(.4,0,.2,1)（起步快、末尾柔，移动端主流手感）
       - 位移 10px → 0px（只淡入不移动，消除"跳一下"的突兀感）
       - opacity 起始从 0.2 → 0（完全透明→完全不透明，避免半透明 ghost 态闪）
     background/box-shadow/border 仍不做过渡，减少 liquid 类切换时同帧合成层压力。 */
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}
/* [A v2] 详情页隐藏 tabbar：opacity 0 + 无位移（纯柔和淡入淡出，避免上下抖动"闪一下"）。
   不走全局 .hidden { display:none }——display 不能过渡会导致突然出现/消失。 */
.tabbar.hidden {
  display: grid !important; /* 覆盖全局 .hidden { display:none } */
  opacity: 0;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}
/* 键盘弹起：底栏整体下滑隐藏（文档高度不再收缩，底栏不会悬在屏幕中部）——优先级比 .hidden 高 */
body.kbd-open .tabbar {
  transform: translate3d(0, calc(100% + 40px + var(--s-bottom)), 0);
  opacity: 0;
  pointer-events: none;
}
/* 4 Tab 版：左 2 · FAB 空槽 · 右 2 */
.tabbar.tabbar-4 {
  grid-template-columns: repeat(2, 1fr) 76px repeat(2, 1fr);
  height: 72px;
  border-radius: 30px;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--s-bottom));
}
.tabbar.tabbar-4 .tab-btn svg { width: 23px; height: 23px; stroke-width: 1.95; }
.tabbar.tabbar-4 .tab-btn span { font-size: 11px; font-weight: 700; letter-spacing: -0.1px; }
.tabbar.tabbar-4 .tab-btn { gap: 3px; padding-top: 6px; }
/* 4 Tab 分列：1:首页 / 2:订单 / 4:消息 / 5:我的  (第3列 76px 空槽给 FAB 上浮) */
.tabbar.tabbar-4 .tab-btn:nth-child(1) { grid-column: 1; }
.tabbar.tabbar-4 .tab-btn:nth-child(2) { grid-column: 2; }
.tabbar.tabbar-4 .tab-btn:nth-child(3) { grid-column: 4; }
.tabbar.tabbar-4 .tab-btn:nth-child(4) { grid-column: 5; }
/* 4 Tab 版 FAB 悬浮在 tabbar 顶部上方（不再被裁切） */
.tabbar.tabbar-4 .fab {
  top: -12px;
  left: 50%;
  transform: translate(-50%, 0);
  width: 62px; height: 62px;
  transition: transform 0.35s var(--spring), box-shadow 0.3s;
}
.tabbar.tabbar-4 .fab:active {
  transform: translate(-50%, 0) scale(0.88) rotate(90deg);
  transition: transform 0.12s ease-out, box-shadow 0.12s;
}
.tabbar.tabbar-4 .fab:active::after {
  transform: translate(-50%, -50%) scale(0.8);
  transition: transform 0.12s ease-out;
}
/* 液态玻璃：取消 overflow: hidden 防止裁切上浮 FAB；高光层用 clip-path 保圆角 */
.tabbar.liquid {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.32) 48%, rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(42px) saturate(1.6) brightness(1.05);
  -webkit-backdrop-filter: blur(42px) saturate(1.6) brightness(1.05);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.95),
    inset 0 -10px 24px rgba(255, 255, 255, 0.28),
    inset 10px 0 18px rgba(255, 255, 255, 0.18),
    inset -10px 0 18px rgba(255, 255, 255, 0.18);
  overflow: visible;
}
.tabbar.liquid::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95) 30%, rgba(255, 255, 255, 0.95) 70%, transparent);
  border-radius: 100px;
  clip-path: inset(0 round 30px);
}
.tabbar.liquid::after {
  content: ''; position: absolute; top: -46px; left: 18%; width: 64%; height: 64px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.5), transparent 68%);
  pointer-events: none;
  clip-path: inset(0 round 30px 30px 0 0);
}
@keyframes tabIn { from { transform: translateY(90px); } to { transform: translateY(0); } }
.tab-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-3); padding-top: 4px;
  transition: color 0.25s, transform 0.2s var(--spring);
}
.tab-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--spring); }
.tab-btn span { font-size: 10px; font-weight: 600; }
.tab-btn.active { color: var(--ink); }
.tab-btn.active svg { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.22)); }
.tab-btn:active svg { transform: scale(0.85); }
.tab-badge {
  position: absolute; top: -2px; right: calc(50% - 20px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 100px;
  background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 800; font-style: normal;
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(224, 121, 138, 0.32);
}
.tab-fab-space { position: relative; }
/* FAB · 拼豆原型：中空圆柱体俯视 —— 浅珍珠豆壁 + 贯通圆孔 + 内壁厚度阴影 */
.fab {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0) 44%, rgba(16, 17, 21, 0.02) 46%, rgba(16, 17, 21, 0.05) 55%, rgba(16, 17, 21, 0.02) 72%, rgba(16, 17, 21, 0.06) 100%),
    radial-gradient(circle at 34% 28%, #ffffff, #f0f2f6 36%, #e0e3ea 66%, #ced3dd 100%);
  display: grid; place-items: center;
  box-shadow:
    0 12px 26px rgba(16, 17, 21, 0.16), 0 2px 6px rgba(16, 17, 21, 0.06),
    0 0 0 5px rgba(255, 255, 255, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    inset 0 -3px 6px rgba(16, 17, 21, 0.08);
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
  z-index: 2;
}
/* 中央贯通孔：半透明磨砂模拟"空心看穿"，内壁上缘背光 */
.fab::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 30%, rgba(16, 17, 21, 0.10), rgba(16, 17, 21, 0.02) 58%),
    rgba(242, 243, 245, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow:
    inset 0 2.5px 4px rgba(16, 17, 21, 0.22),
    inset 0 -1px 2px rgba(255, 255, 255, 0.85),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 1px 1px rgba(255, 255, 255, 0.65);
  transition: transform 0.5s var(--spring);
}
.fab svg { width: 17px; height: 17px; stroke: #4a4f5b; stroke-width: 2.3; stroke-linecap: round; position: relative; z-index: 1; }
.fab:active { transform: translate(-50%, -50%) scale(0.88) rotate(90deg); }
.fab:active::after { transform: translate(-50%, -50%) scale(0.8); }

/* 空状态 · 拼豆装饰（三颗灰阶豆，中心带孔） */
.bead-cluster { display: flex; gap: 9px; justify-content: center; margin-bottom: 14px; }
.bead-cluster i {
  width: 22px; height: 22px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 34% 30%, var(--bc1, #fff), var(--bc2, #d8dbe2) 62%, #b9bdc9 108%);
  box-shadow: inset -2px -3px 5px rgba(16, 17, 21, 0.14), inset 1px 2px 3px rgba(255, 255, 255, 0.9),
    0 3px 8px rgba(16, 17, 21, 0.10);
}
.bead-cluster i::after {
  content: ''; position: absolute; inset: 32%; border-radius: 50%;
  background: rgba(16, 17, 21, 0.16);
  box-shadow: inset 0 1px 2px rgba(16, 17, 21, 0.2);
}
.bead-cluster i:nth-child(2) { --bc1: #f0f1f4; --bc2: #c9ccd6; transform: translateY(-7px); }
.bead-cluster i:nth-child(3) { --bc1: #dcdfe5; --bc2: #aeb2bf; }

/* ---------- 底部抽屉（全局 fixed，覆盖所有 view 与 overlay）---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 160;
  background: rgba(24, 28, 44, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.32s var(--ease);
  overscroll-behavior: contain;  /* 阻止 iOS 滚动穿透到父层 */
  touch-action: none;            /* mask 不响应触摸，避免 sheet 滑动连带整页 */
}
.sheet-mask.show { opacity: 1; }
.sheet {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--s-bottom)); z-index: 161;
  max-height: 82%;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(36px) saturate(1.8);
  -webkit-backdrop-filter: blur(36px) saturate(1.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  padding: 14px 20px calc(20px + var(--s-bottom));
  transform: translateY(120%);
  transition: transform 0.46s var(--spring);
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.sheet.show { transform: translateY(var(--sheet-kb, 0px)); touch-action: pan-y; }
.sheet::-webkit-scrollbar { display: none; }
.sheet-handle { width: 40px; height: 4.5px; border-radius: 4px; background: rgba(120,128,165,0.3); margin: 0 auto 14px; }
.sheet-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; top: calc(34px + var(--s-top)); left: 0; right: 0; z-index: 170; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  padding: 11px 20px; border-radius: 100px;
  background: rgba(28, 31, 46, 0.82);
  backdrop-filter: blur(14px);
  color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-float);
  animation: toastIn 0.45s var(--spring) both;
  max-width: 86%;
}
.toast.out { animation: toastOut 0.35s var(--ease) both; }
.toast.ok::before { content: "✓ "; color: #9ed4ba; }
.toast.err::before { content: "✕ "; color: #e0a3ac; }
@keyframes toastIn { from { transform: translateY(-24px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-18px) scale(0.94); opacity: 0; } }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-start; padding: 30px 26px 40px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.auth-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 28px; }
.auth-logo .logo-beads { width: 84px; height: 84px; }
.auth-logo h1 { font-size: 24px; font-weight: 800; letter-spacing: 4px; margin-top: 14px; }
.auth-logo p { color: var(--ink-3); font-size: 12px; margin-top: 6px; letter-spacing: 1px; }
.auth-card { padding: 24px 20px; }
.demo-accounts { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.demo-chip { font-size: 11.5px; padding: 7px 13px; border-radius: 100px; background: rgba(23,24,28,0.06); color: #3a3c44; border: 1px solid rgba(23,24,28,0.12); transition: all 0.25s; }
.demo-chip:active { transform: scale(0.93); }

/* 注册 4 步流程 */
.auth-tabs { display: flex; gap: 4px; background: rgba(18,20,26,0.04); padding: 4px; border-radius: 14px; margin-bottom: 18px; }
.auth-tabs .at-tab {
  flex: 1; padding: 8px 0; border-radius: 11px; text-align: center; font-size: 12.5px; font-weight: 700;
  color: var(--ink-3); cursor: pointer; transition: all 0.25s var(--ease);
}
.auth-tabs .at-tab.on { background: var(--glass); color: var(--ink); box-shadow: var(--shadow-card); border: 1px solid var(--line-dark); }

.reg-step { animation: stepIn 0.35s var(--spring) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px) scale(0.98); } to { opacity: 1; transform: none; } }

.step-bar { display: flex; gap: 8px; margin: 2px 0 18px; }
.step-bar .sb-dot {
  flex: 1; height: 6px; border-radius: 999px;
  background: rgba(18,20,26,0.08); overflow: hidden; position: relative;
}
.step-bar .sb-dot.on::before {
  content: ""; position: absolute; inset: 0; background: var(--accent-grad);
  animation: dotGrow 0.4s var(--spring) both;
}
.step-bar .sb-dot.done::before {
  content: ""; position: absolute; inset: 0; background: var(--accent-grad); opacity: 0.55;
}
@keyframes dotGrow { from { transform: translateX(-100%); } to { transform: none; } }

.step-hint { font-size: 11.5px; color: var(--ink-3); margin: -8px 0 14px; }
.captcha-row { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; }
.captcha-row .input { flex: 1; }
.captcha-img {
  flex-shrink: 0; width: 130px; height: 48px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-dark); background: #f7f8fc; cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.2s;
}
.captcha-img:active { transform: scale(0.96); }
.captcha-img svg { display: block; width: 100%; height: 100%; }
/* 找回密码弹层内的图形验证码：SVG 自适应容器（修复显示不全/溢出） */
#fg-cap-img { display: flex; align-items: center; justify-content: center; overflow: hidden; }
#fg-cap-img svg { display: block; width: 100%; height: 100%; }

.sms-row { display: flex; gap: 10px; margin-bottom: 15px; }
.sms-row .input { flex: 1; }
.sms-btn {
  flex-shrink: 0; min-width: 126px; padding: 12px 14px;
  border-radius: 14px; font-size: 13px; font-weight: 800;
  background: linear-gradient(135deg,#f1f3f8,#e4e7ee); color: #3c404a;
  border: 1px solid var(--line-dark);
  transition: transform 0.2s, background 0.3s;
}
.sms-btn:active { transform: scale(0.96); }
.sms-btn[disabled] { opacity: 0.55; }

.pwd-score { display: flex; gap: 4px; margin: -6px 0 12px; }
.pwd-score span { flex: 1; height: 5px; border-radius: 999px; background: rgba(18,20,26,0.08); transition: all 0.3s; }
.pwd-score.s1 span:nth-child(-n+1) { background: #e9a3ac; }
.pwd-score.s2 span:nth-child(-n+2) { background: linear-gradient(90deg,#f3cfa3,#e9c863); }
.pwd-score.s3 span:nth-child(-n+3) { background: linear-gradient(90deg,#c8e3c0,#9ed4ba); }

.auth-nav { display: flex; gap: 8px; margin-top: 6px; }
.auth-nav .btn { flex: 1; }

/* 模拟短信弹层大卡 */
.sms-card {
  padding: 26px 22px; border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,244,255,0.85));
  backdrop-filter: blur(28px); border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 18px 48px rgba(0,0,0,0.18);
  text-align: center;
}
.sms-card .sc-top {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: rgba(16,180,130,0.12); color: #0e8c65; margin-bottom: 14px;
  letter-spacing: 1px;
}
.sms-card h4 { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; font-weight: 600; }
.sms-card .sc-code {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 16px 24px; border-radius: 16px;
  background: linear-gradient(135deg, #2a2d36, #3c404a); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 24px rgba(0,0,0,0.18);
  margin-bottom: 10px;
}
.sms-card .sc-code b {
  font-size: 30px; font-weight: 900; letter-spacing: 6px;
  background: linear-gradient(135deg,#f5c6a0,#e7a7c8,#b6c0ea);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: "DIN Alternate", Menlo, monospace;
}
.sms-card .sc-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.sms-card .sc-copy {
  margin-top: 18px; padding: 11px 18px; border-radius: 999px;
  background: var(--accent-grad); font-weight: 800; font-size: 13.5px;
  box-shadow: 0 8px 22px rgba(16,17,21,0.10);
}

/* ---------- 订单详情 ---------- */
.hero-img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.stepper { display: flex; align-items: flex-start; margin: 20px 4px 6px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step .dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(120,128,165,0.15); color: var(--ink-3);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  border: 2px solid transparent; z-index: 1;
  transition: all 0.4s var(--spring);
}
.step .dot.done { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.25); transform: scale(1.08); }
.step .lbl { font-size: 10px; color: var(--ink-3); margin-top: 7px; font-weight: 600; white-space: nowrap; }
.step.on .lbl { color: var(--accent); }
.step::before {
  content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px;
  background: rgba(120,128,165,0.15); border-radius: 3px;
}
.step.done::before { background: var(--accent-grad); }
.step:first-child::before { display: none; }

.info-card { padding: 16px 18px; margin-bottom: 14px; }
.info-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; font-size: 13.5px; }
.info-row .k { color: var(--ink-3); flex-shrink: 0; margin-right: 14px; }
.info-row .v { text-align: right; font-weight: 600; line-height: 1.5; }

/* 时间线 */
.timeline { padding: 6px 2px; }
.tl-item { position: relative; padding: 0 0 20px 26px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-item::before {
  content: ""; position: absolute; left: 7px; top: 16px; bottom: 0;
  width: 2px; background: rgba(120,128,165,0.15);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  position: absolute; left: 0; top: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 4.5px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}
.tl-item.gray .tl-dot { border-color: rgba(120,128,165,0.35); box-shadow: none; }
.tl-title { font-size: 13.5px; font-weight: 700; }
.tl-detail { font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.55; }
.tl-time { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }

/* 物流地图 */
.map-card { overflow: hidden; padding: 0; margin-bottom: 14px; }
.map-box { position: relative; aspect-ratio: 10 / 9; }
.map-box svg { width: 100%; height: 100%; }
.map-truck {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  display: grid; place-items: center; font-size: 18px;
  background: rgba(255,255,255,0.92); border-radius: 50%;
  box-shadow: 0 6px 18px rgba(20,160,106,0.35), 0 0 0 4px rgba(52, 201, 142, 0.25);
  transition: left 2.6s linear, top 2.6s linear;
  z-index: 2;
}
.map-pill {
  position: absolute; left: 12px; top: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 15px;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 700; z-index: 3;
}
.map-pill .live { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 11px; }
.map-pill .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.6s infinite; }
@keyframes blink { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.4; transform: scale(0.7);} }

/* ---------- 聊天 ---------- */
.chat-view { display: flex; flex-direction: column; padding: 0 !important; }
.chat-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 11px;
  padding: calc(14px + var(--s-top)) 16px 14px;
  background: rgba(238,241,251,0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.5);
}
.chat-body { flex: 1; overflow-y: auto; padding: 16px 14px 12px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.chat-body::-webkit-scrollbar { display: none; }
.msg-row { display: flex; gap: 9px; margin-bottom: 15px; animation: msgIn 0.4s var(--spring) both; }
@keyframes msgIn { from { transform: translateY(14px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.msg-row.me { flex-direction: row-reverse; }
.avatar {
  width: 38px; height: 38px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 800;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 10px rgba(63,74,129,0.14);
}
.bubble {
  max-width: 72%; padding: 11px 15px;
  border-radius: 20px; font-size: 14.5px; line-height: 1.55;
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-top-left-radius: 7px;
  box-shadow: 0 3px 12px rgba(63,74,129,0.08);
  word-break: break-word;
}
.msg-row.me .bubble {
  background: var(--accent-grad); color: #fff;
  border: none; border-top-right-radius: 7px; border-top-left-radius: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.26);
}
.bubble img { max-width: 200px; border-radius: 14px; margin: -3px -7px; }
.msg-sys { text-align: center; margin: 14px 0; animation: fadeUp 0.4s both; }
.msg-sys span {
  display: inline-block; font-size: 11px; color: var(--ink-2);
  background: rgba(120,128,165,0.12); padding: 6px 14px; border-radius: 100px;
}
/* 驳回通知：胶囊下方附「编辑重投」直达按钮 */
.msg-sys.with-act { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.msg-sys.with-act span {
  border-radius: 16px; line-height: 1.7; max-width: 86%;
  border: 1px solid rgba(224, 121, 138, 0.18);
  background: rgba(224, 121, 138, 0.07); color: var(--ink-2);
}
.msg-sys.with-act .btn { min-width: 132px; }

/* 订单状态通知卡片（聊天内 structured system message, action=open_order） */
.msg-sys.order-state-card {
  max-width: 88%;
  margin: 14px auto;
  padding: 12px 12px 11px;
  text-align: left;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(22,28,45,0.08);
  box-shadow: 0 6px 20px rgba(20,24,40,0.08);
  display: block;
}
.msg-sys.order-state-card .osc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.msg-sys.order-state-card .osc-title {
  font-weight: 800; font-size: 13.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.msg-sys.order-state-card .osc-tag {
  flex: none;
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 100px; letter-spacing: 0.2px;
}
.msg-sys.order-state-card .osc-hint {
  margin-top: 7px;
  font-size: 12px; color: var(--ink-2); line-height: 1.55;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(140,148,175,0.08);
  border: 1px solid rgba(140,148,175,0.1);
}
.msg-sys.order-state-card .osc-cta {
  margin-top: 9px;
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.msg-sys.order-state-card.tone-info .osc-hint {
  background: rgba(52,120,246,0.07); border-color: rgba(52,120,246,0.16);
}
.msg-sys.order-state-card.tone-success .osc-hint {
  background: rgba(31,122,60,0.07); border-color: rgba(31,122,60,0.16);
}
.msg-sys.order-state-card.tone-warn .osc-hint {
  background: rgba(196,138,0,0.07); border-color: rgba(196,138,0,0.18);
}
.msg-sys.order-state-card.tone-danger .osc-hint {
  background: rgba(196,62,62,0.07); border-color: rgba(196,62,62,0.18);
}

/* ============ 聊天-分享订单卡片 · 方案 A（苹果极简 + 拼豆元素） ============ */
/* 整卡白底 + 左侧状态色竖条 + 豆形状态徽章 + 业务信息行，整卡可点 */
.order-card-msg {
  display: flex;
  max-width: 88%;
  margin: 4px 0 14px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23,24,28,0.04), 0 4px 16px rgba(23,24,28,0.08);
  animation: fadeUp 0.42s both;
  cursor: pointer;
  transition: transform 0.18s var(--spring), box-shadow 0.18s ease;
}
.order-card-msg:active { transform: scale(0.985); box-shadow: 0 1px 2px rgba(23,24,28,0.06), 0 2px 8px rgba(23,24,28,0.10); }
.order-card-msg.oc-mine { margin-left: auto; border: 1px solid rgba(52,120,246,0.10); }
.order-card-msg.oc-peer { margin-right: auto; border: 1px solid rgba(23,24,28,0.06); }
/* 左侧 4px 状态色竖条 */
.order-card-msg .ocm-bar { width: 4px; flex: 0 0 4px; }
/* 主体 */
.order-card-msg .ocm-main { flex: 1; min-width: 0; padding: 11px 14px 13px; }
/* 头部：豆形徽章 + 状态文字 + 右侧箭头 */
.order-card-msg .ocm-head { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
/* 豆形状态徽章：圆形 + 内高光，体现拼豆元素 */
.order-card-msg .ocm-bead {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bc, #3478F6);
  box-shadow: inset 0 1px 1.5px rgba(255,255,255,0.7), inset 0 -1px 1px rgba(0,0,0,0.08), 0 0 0 2px rgba(255,255,255,0.5);
}
.order-card-msg .ocm-status { font-size: 12.5px; font-weight: 700; letter-spacing: 0.2px; }
.order-card-msg .ocm-arrow { margin-left: auto; stroke: var(--ink-3); opacity: 0.55; }
/* 标题：粗黑，2 行截断（比单行省略号信息多） */
.order-card-msg .ocm-title {
  font-size: 15px; font-weight: 700; color: var(--ink);
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
  word-break: break-word;
}
/* 编号：细灰等宽 */
.order-card-msg .ocm-code {
  font-size: 11px; color: var(--ink-3); font-weight: 500;
  letter-spacing: 0.5px; margin-top: 3px;
  font-family: Menlo, Consolas, monospace;
}
/* 业务信息行：估价/预算 + 规格 + 难度 + 色数（与大厅列表 tag 风格统一） */
.order-card-msg .ocm-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  margin-top: 9px;
}
.order-card-msg .ocm-price {
  font-size: 13.5px; font-weight: 800; color: var(--pink);
  margin-right: 2px;
}
.order-card-msg .ocm-price small {
  font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  margin-left: 4px;
}

.chat-foot {
  display: flex; align-items: flex-end; gap: 9px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.66);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,0.6);
}
.chat-foot input {
  flex: 1; padding: 12px 16px; border-radius: 100px;
  border: 1px solid var(--line-dark); outline: none; background: rgba(255,255,255,0.8);
  font-size: 14px; transition: border 0.25s, box-shadow 0.25s;
}
.chat-foot input:focus { border-color: rgba(23,24,28,0.38); box-shadow: 0 0 0 3.5px rgba(23,24,28,0.10); }
.cf-btn {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(120,128,165,0.1); border: 1px solid var(--line-dark);
  transition: transform 0.2s var(--spring);
}
.cf-btn:active { transform: scale(0.86); }
.cf-btn svg { width: 19px; height: 19px; stroke: var(--ink-2); stroke-width: 2; fill: none; stroke-linecap: round; }
.cf-send {
  background: linear-gradient(135deg, #3a3f48 0%, #1f232b 100%);
  border: none;
  box-shadow: 0 6px 16px rgba(31, 35, 43, 0.28), inset 0 1px 0 rgba(255,255,255,0.12);
}
.cf-send svg { stroke: #fff; }
.cf-send:active { box-shadow: 0 3px 9px rgba(31, 35, 43, 0.34), inset 0 1px 0 rgba(255,255,255,0.1); }

/* 好友申请：接受更明亮（蓝绿系主行动）、拒绝更柔和（低饱和灰） */
.btn-accept {
  background: linear-gradient(135deg, #4c7dff 0%, #2e62ef 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(46, 98, 239, 0.30), inset 0 1px 0 rgba(255,255,255,0.16);
  border: none;
}
.btn-accept:active { box-shadow: 0 3px 8px rgba(46, 98, 239, 0.36); }
.btn-reject {
  background: rgba(23, 24, 28, 0.05);
  color: #5e6677;
  border: 1px solid rgba(23, 24, 28, 0.10);
  backdrop-filter: blur(10px);
}

/* ---------- 会话列表 ---------- */
.conv-item { display: flex; align-items: center; gap: 13px; padding: 14px 16px; margin-bottom: 10px; transition: transform 0.22s var(--spring); animation: fadeUp 0.45s var(--ease) both; }
.conv-item:active { transform: scale(0.977); }
.conv-item .ci-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.conv-item .ci-tag { font-size: 10px; padding: 2px 8px; border-radius: 100px; background: rgba(23,24,28,0.07); color: #3a3c44; font-weight: 600; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .ci-last { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.conv-item .ci-right { margin-left: auto; flex-shrink: 0; align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; gap: 7px; }
.conv-item .ci-time { font-size: 10.5px; color: var(--ink-3); padding-top: 2px; }
.conv-item .ci-order-cta {
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg,#5A8CFF,#3478F6);
  padding: 4.5px 10px; border-radius: 100px;
  border: none; letter-spacing: 0.2px;
  box-shadow: 0 3px 8px rgba(52,120,246,0.28);
}
.conv-item .ci-order-cta:active { transform: scale(0.94); }

/* ---------- 豆拼拼小助手（官方通知） ---------- */
.assistant-card { border: 1px solid rgba(224, 96, 122, 0.16); margin-bottom: 12px; }
.ast-official {
  font-size: 9px; font-weight: 700; color: #d95a74;
  background: rgba(224, 96, 122, 0.12);
  border-radius: 6px; padding: 1.5px 6px; margin-left: 6px; vertical-align: 2px;
  flex-shrink: 0; white-space: nowrap;
}
.ntf-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.ntf-item:active { transform: scale(0.985); }
.ntf-ico {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16px; flex-shrink: 0;
  background: radial-gradient(circle at 34% 30%, #f7f8fa, #e0e4eb 58%, #ccd2dd);
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.10), inset 0 3px 4px rgba(255, 255, 255, 0.65);
}
.ntf-title { font-weight: 700; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; min-width: 0; }
.ntf-item.unread .ntf-title { color: var(--ink); }
.ntf-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0607a; display: inline-block; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(224,96,122,0.15); }
.ntf-content {
  font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.55; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 下拉刷新指示器 ---------- */
.ptr-ind {
  position: fixed; top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-radius: 0 0 20px 20px;
  padding: 10px 18px;
  box-shadow: 0 8px 24px rgba(23, 24, 28, 0.14);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  opacity: 0;
}
.ptr-ind.anim { transition: transform 0.32s var(--ease), opacity 0.25s; }
.ptr-beads { display: flex; gap: 4px; }
.ptr-beads i {
  width: 9px; height: 9px; border-radius: 50%; display: block;
  background: radial-gradient(circle at 34% 30%, #f7f8fa, #e0e4eb 58%, #ccd2dd);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.12), inset 0 2px 2px rgba(255,255,255,.7);
}
.ptr-beads i:nth-child(1) { background: radial-gradient(circle at 34% 30%, #ffa9b8, #d95a74); }
.ptr-beads i:nth-child(2) { background: radial-gradient(circle at 34% 30%, #9ed3ff, #4f9fe8); transform: translateY(-3px); }
.ptr-beads i:nth-child(3) { background: radial-gradient(circle at 34% 30%, #b4edb4, #6cc66c); }
.ptr-ind.loading .ptr-beads { animation: ptrBounce 0.7s var(--ease) infinite; }
.ptr-ind.loading .ptr-beads i:nth-child(2) { animation: ptrBounce2 0.7s var(--ease) infinite; }
@keyframes ptrBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ptrBounce2 { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(1px); } }

/* ---------- 我的 ---------- */
.me-head { display: flex; align-items: center; gap: 16px; padding: 22px 20px; margin-bottom: 14px; }
.me-head .avatar { width: 62px; height: 62px; border-radius: 21px; font-size: 24px; }
.me-head h2 { font-size: 19px; font-weight: 800; }
.me-head p { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.me-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat-card { padding: 15px 8px; text-align: center; }
.stat-card b { font-size: 21px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 4px; font-weight: 600; }
.me-group { padding: 6px 4px; margin-bottom: 14px; }
.me-row { display: flex; align-items: center; gap: 13px; padding: 14px 14px; border-radius: 16px; transition: background 0.2s; width: 100%; text-align: left; }
.me-row:active { background: rgba(120,128,165,0.08); }
.me-row .mr-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.me-row .mr-label { font-size: 14px; font-weight: 600; flex: 1; }
.me-row .mr-extra { font-size: 12px; color: var(--ink-3); }
.me-row .mr-arrow { color: var(--ink-3); font-size: 15px; }
.me-divider { height: 1px; background: var(--line-dark); margin: 2px 14px; }

/* 审核卡片 */
.review-actions { display: flex; gap: 9px; margin-top: 11px; }

/* 发布页实时估价 */
.est-card { padding: 18px 20px; margin: 4px 0 16px; position: relative; overflow: hidden; }
.est-card::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(138,91,255,0.14), transparent 70%);
}
.est-price { font-size: 26px; font-weight: 800; color: var(--pink); letter-spacing: 0.5px; }
.est-price small { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-left: 6px; }
.est-meta { display: flex; gap: 14px; margin-top: 9px; font-size: 11.5px; color: var(--ink-2); }
.est-meta b { color: var(--ink); }
.est-hint { margin-top: 10px; font-size: 10.5px; color: var(--ink-3); line-height: 1.6; }

/* 骨架屏 */
.skel { border-radius: var(--r-lg); background: linear-gradient(100deg, rgba(255,255,255,0.5) 40%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0.5) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { height: 116px; margin-bottom: 14px; }

/* 确认弹层按钮组 */
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }

/* 图纸下载弹层：强制 iOS WKWebView/PWA 长按弹出系统"存储图像"菜单 */
.dl-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  /* 不自身滚动：交给外层 sheet 滚动，避免长按保存时手指微移被识别成滑动导致长按失效 */
  -webkit-overflow-scrolling: touch;
  /* 关键：不能有 user-select:none / pointer-events:none 的级联拦截触摸 */
  pointer-events: auto;
}
.dl-wrap img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: auto !important;
  -webkit-touch-callout: default !important;
  -webkit-user-drag: element !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  /* auto 允许 iOS 原生长按弹出「存储图像」菜单；manipulation 会偶发拦截长按 */
  touch-action: auto;
}
/* 下载指引 */
.dl-tip {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-2);
  margin: -4px 0 12px;
  line-height: 1.8;
}
.dl-tip b { color: var(--ink); font-weight: 700; }
.dl-tip .tip-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.dl-tip .tip-actions .btn {
  flex: 1; padding: 9px 10px; font-size: 12.5px;
}

/* 图片灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(18, 20, 30, 0.92); backdrop-filter: blur(10px);
  display: grid; place-items: center;
  animation: fadeUp 0.2s both;
  overflow: hidden;
}
.lightbox img {
  max-width: 96vw; max-height: 86vh;
  border-radius: 14px; box-shadow: var(--shadow-float);
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  will-change: transform;
  user-select: none; -webkit-user-drag: none;
  touch-action: none;
}
.lightbox .lb-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  border: none; color: #fff; font-size: 20px; font-weight: 700;
  display: grid; place-items: center; cursor: pointer; z-index: 2;
}
.lightbox .lb-dl {
  position: absolute; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.14); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff; font-size: 20px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; z-index: 2;
  transition: transform 0.15s ease-out, background 0.15s;
}
.lightbox .lb-dl:active { transform: scale(0.92); background: rgba(255,255,255,0.24); }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============ 像素画板 ============ */
.st-board-wrap { padding: 12px; margin-bottom: 12px; }
.st-board {
  --st-n: 48;
  display: grid;
  grid-template-columns: repeat(var(--st-n), 1fr);
  gap: 1px;
  aspect-ratio: 1;
  background: rgba(120, 128, 165, 0.16);
  padding: 5px;
  border-radius: 14px;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  overflow: hidden;
}
.st-cell { border-radius: 2px; background: transparent; cursor: crosshair; min-width: 0; min-height: 0; transition: background 0.06s linear; }
.st-cell:hover { box-shadow: inset 0 0 0 1.5px rgba(23, 24, 28, 0.65); z-index: 1; }

.st-tools { padding: 12px 14px; margin-bottom: 12px; }
.st-tool-row { display: flex; align-items: center; gap: 8px; }
.st-tools-l { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.st-tool {
  min-width: 48px; padding: 6px 6px 5px; border-radius: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(120, 128, 165, 0.08); border: 1px solid transparent;
  transition: all 0.3s var(--spring);
}
.st-tool-ico { font-size: 17px; line-height: 1; }
.st-tool-name { font-size: 10px; color: var(--ink-3); font-weight: 600; line-height: 1; }
.st-tool:active { transform: scale(0.88); }
.st-tool.active { background: var(--accent-grad); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); transform: scale(1.04); }
.st-tool.active .st-tool-name { color: #fff; }
.st-action-row { display: flex; gap: 8px; margin-top: 10px; }
.st-action-row .btn { flex: 1; }
.st-zoom-hint { text-align: center; font-size: 10.5px; color: var(--ink-3); margin-top: 8px; opacity: 0.7; }
.pc-draft-ico { width: 86px; height: 86px; border-radius: 16px; background: linear-gradient(135deg,#8a93a8,#5b6378); display: grid; place-items: center; font-size: 34px; color: #fff; flex-shrink: 0; }

/* 宽屏 / 横屏自适应：画板放大、工具栏转横向两列 */
@media (min-width: 768px), (orientation: landscape) and (min-width: 600px) {
  .st-board-wrap { padding: 18px; }
  .st-board { max-width: 640px; margin: 0 auto; }
  .st-tools .st-tool-row { flex-wrap: nowrap; }
  /* 色卡：面板保持单列，色块行两列并排减少纵向滚动；避免切换按钮被网格拉伸成竖长条 */
  .st-pal-tabs { grid-column: 1 / -1; }
  #st-pal-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; align-content: start; }
  .st-pal-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
.st-cur { width: 34px; height: 34px; border-radius: 11px; border: 2.5px solid #fff; box-shadow: 0 0 0 1px var(--line-dark), 0 4px 12px rgba(63, 74, 129, 0.18); transition: background 0.25s; }
.st-size-row { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.st-size-row .chip { padding: 6px 12px; }
.st-count { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 700; }

.st-palette { padding: 12px; display: grid; gap: 7px; }
/* minmax(0,1fr)：允许列收缩，长色号（如 Perler 80-15179）不再把网格撑出容器 */
.st-pal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.st-swatch {
  aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.07);
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
  box-shadow: inset -2px -3px 5px rgba(0, 0, 0, 0.14), inset 2px 3px 4px rgba(255, 255, 255, 0.55);
}
.st-swatch:hover { transform: scale(1.08); }
.st-swatch:active { transform: scale(0.9); }

/* ============ 画板 v2：厂商色卡 / 小地图 / 手势修复 ============ */
/* 板区固定为视口高度（不再被竖长图纸撑成超长页面导致整页无法滚动）：
   板在框内居中，靠双指缩放/平移浏览；框外区域可正常滚动页面 */
.st-board-wrap {
  position: relative; overflow: hidden;
  height: clamp(340px, 52vh, 520px);
  display: flex; align-items: center; justify-content: center;
}
.st-board { width: 100%; flex: 0 0 auto; }
.st-zoom-hint {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  margin: 0; z-index: 6; white-space: nowrap;
  background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 3px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(16,17,21,.1);
}
/* 色板区限高内部滚动：避免 221 色把页面拉得过长 */
#st-pal-rows { max-height: 34vh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 2px; }
.st-swatch { display: flex; flex-direction: column; align-items: center; gap: 2px; background: transparent; border: none; box-shadow: none; aspect-ratio: auto; border-radius: 10px; padding: 2px 0 1px; }
.st-swatch i { display: block; width: 100%; max-width: 30px; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.07); box-shadow: inset -2px -3px 5px rgba(0, 0, 0, 0.14), inset 2px 3px 4px rgba(255, 255, 255, 0.55); }
.st-swatch em { font-style: normal; font-size: 8px; line-height: 1.1; color: var(--ink-3); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.st-swatch.sel i { outline: 2px solid var(--accent, #5b6cff); outline-offset: 1.5px; }
.st-pal-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.st-pal-tabs .chip { padding: 5px 10px; font-size: 11px; }
.st-cur-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.st-cur-code { font-size: 9px; line-height: 1; color: var(--ink-3); font-weight: 700; max-width: 64px; text-align: center; white-space: nowrap; }
.st-mini { position: absolute; top: 10px; right: 10px; width: 78px; height: 78px; border-radius: 14px; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: 0 4px 14px rgba(16, 17, 21, 0.14); display: none; z-index: 6; padding: 4px; }
.st-mini-box { position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background: #fff; }
.st-mini-box svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-mini-rect { position: absolute; border: 1.5px solid #ff4d6d; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7); pointer-events: none; }
.st-size-row > span { white-space: nowrap; }
.st-count { white-space: nowrap; }

/* ---- 画板C方案：格线覆盖层 + 屏幕空间标尺 + 缩放控件 + 移动工具导航态 ---- */
.st-board { position: relative; }
.st-board.tool-move .st-cell { cursor: grab; }
.st-board.tool-move .st-cell:hover { box-shadow: none; }
/* 方格线：贴合格子区（board 自带 5px padding），缩放时线宽恒定 */
.st-grid {
  position: absolute; left: 5px; top: 5px;
  width: calc(100% - 10px); height: calc(100% - 10px);
  pointer-events: none; z-index: 2; display: block;
}
/* 格子数量标尺：屏幕空间渲染，字号不随 zoom 变化；列标贴板顶、行标贴板左 */
.st-ruler { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.st-ruler i {
  position: absolute; left: 0; top: 0; font-style: normal;
  font-size: 9px; font-weight: 800; line-height: 1; color: rgba(23, 24, 28, 0.52);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 2px 4px; border-radius: 6px;
  border: 1px solid rgba(23, 24, 28, 0.06);
  box-shadow: 0 1px 4px rgba(16, 17, 21, 0.06);
  will-change: transform;
}
/* 左下角缩放控件：− / 百分比(点击复位) / ＋ */
.st-zoom-ctl { position: absolute; left: 10px; bottom: 10px; z-index: 6; display: flex; flex-direction: column; gap: 6px; }
.st-zoom-ctl button {
  width: 36px; height: 36px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 3px 10px rgba(16, 17, 21, 0.12);
  font-size: 17px; font-weight: 800; color: var(--ink-2);
  display: grid; place-items: center;
  transition: transform 0.25s var(--spring);
}
.st-zoom-ctl button:active { transform: scale(0.88); }
.st-zoom-ctl #st-zreset { font-size: 9.5px; letter-spacing: -0.2px; }
/* FAB 下调：与导航栏整体更协调（原 -12px 偏上） */
.tabbar.tabbar-4 .fab { top: -4px; }

/* ============ 画板 v3：宽高滑条 / 笔刷 ============ */
.st-dim-row { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.st-dim-lab { font-size: 11.5px; color: var(--ink-3); width: 28px; flex-shrink: 0; font-weight: 700; }
.st-dim-row input[type="range"] { flex: 1; min-width: 0; accent-color: #5b6cff; height: 26px; }
.st-dim-val { font-size: 12px; font-weight: 700; color: var(--accent); width: 34px; text-align: right; flex-shrink: 0; }
.st-brush-row { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.st-brush-row .seg { flex: 1; }
.st-brush-row .seg button { padding: 6px 0; font-size: 11.5px; }
.st-dim-summary { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.st-dim-summary b { font-size: 12.5px; color: var(--accent); }

/* ============ 创作页：双入口卡 ============ */
.crt-card { padding: 18px 16px; }
.crt-feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.crt-feats span {
  font-size: 10.5px; font-weight: 600; color: var(--ink-2);
  background: rgba(120, 128, 165, 0.08); border: 1px solid rgba(120, 128, 165, 0.10);
  padding: 3px 10px; border-radius: 999px;
}

.crt-way { text-align: left; }

/* ============ 录制视频 ============ */
.rec-wrap {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  background: rgba(96, 102, 114, 0.45); margin-bottom: 4px;
}
.rec-wrap video { width: 100%; height: 100%; object-fit: cover; }
.rec-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.92); font-size: 13px; }
.rec-dot {
  position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 6px;
  background: rgba(84, 89, 100, 0.55); backdrop-filter: blur(8px);
  border-radius: 999px; padding: 4px 11px; color: #fff; font-size: 12px;
}
.rec-dot i { width: 8px; height: 8px; border-radius: 50%; background: #e0798a; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.btn.recording { background: linear-gradient(135deg, #e897a2, #d97f8e) !important; color: #fff !important; box-shadow: 0 8px 22px rgba(224, 121, 138, 0.30) !important; }

/* 聊天视频 / 验收视频 */
.bubble .msg-video { max-width: 210px; border-radius: 14px; margin: -3px -7px; display: block; background: #2b2f38; }
.check-video { border-radius: 13px; aspect-ratio: 1; object-fit: cover; width: 100%; background: rgba(24, 27, 40, 0.08); }
.up-item video { width: 100%; height: 100%; object-fit: cover; }
.up-vid-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 15px; pointer-events: none;
  background: rgba(18, 20, 30, 0.28); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ============ 评价 ============ */
.star-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line-dark); }
.star-row:last-of-type { border-bottom: none; }
.star-picker { display: flex; gap: 3px; }
.star-picker button { font-size: 22px; color: #dfe2ec; transition: transform 0.25s var(--spring), color 0.2s; }
.star-picker button.on { color: #7b8290; transform: scale(1.12); }
.star-picker button:active { transform: scale(0.8); }
.review-dims { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.review-dims span, .us-review-stars, .us-rep-dims { letter-spacing: 1px; }
.review-dims span b { color: var(--ink); }
.review-dims i, .us-review-stars i, .us-rep-dims i { color: #dfe2ec; font-style: normal; }
.review-dims, .us-review-stars, .us-rep-dims { color: #7b8290; }
.info-row .v.link { cursor: pointer; color: var(--accent); font-weight: 700; }
.info-row .v.link:active { opacity: 0.6; }

/* ============ 用户主页抽屉 ============ */
.us-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.us-avatar { width: 56px; height: 56px; font-size: 22px; }
.us-rep {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(23, 24, 28, 0.045), rgba(120, 128, 165, 0.06));
  border: 1px solid rgba(23, 24, 28, 0.08);
  border-radius: 18px; padding: 14px 16px; margin-bottom: 12px;
}
.us-rep-score { text-align: center; flex-shrink: 0; }
.us-rep-score b {
  display: block; font-size: 30px; font-weight: 800; line-height: 1.1;
  background: linear-gradient(135deg, #6a7080, #3c404a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.us-rep-score span { font-size: 10.5px; color: var(--ink-3); font-weight: 700; }
.us-rep-dims { flex: 1; display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.us-rep-dims b { margin: 0 4px; color: var(--ink); }
.us-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.us-stats > div { background: var(--glass-thin, rgba(120, 128, 165, 0.07)); border-radius: 14px; padding: 11px 4px; }
.us-stats b { display: block; font-size: 17px; font-weight: 800; color: var(--ink); }
.us-stats span { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.us-review { border-bottom: 1px solid var(--line-dark); padding: 12px 2px; }
.us-review:last-child { border-bottom: none; }
.us-review-top { display: flex; align-items: center; gap: 9px; }
.us-review-top .avatar { width: 32px; height: 32px; font-size: 13px; }
.us-review-stars { font-size: 13px; flex-shrink: 0; }

/* 主页抽屉 · TA 的图纸横滑 */
.us-pats {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.us-pats::-webkit-scrollbar { display: none; }
.us-pat { flex: 0 0 104px; cursor: pointer; scroll-snap-align: start; }
.us-pat img {
  width: 104px; height: 104px; object-fit: cover; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(63, 74, 129, 0.10);
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
}
.us-pat:active img { transform: scale(0.93); }
.us-pat-t { font-size: 12px; font-weight: 700; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.us-pat-m { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }

/* 图纸详情 · 上传者小头像 */
.pd-avatar { width: 24px !important; height: 24px !important; font-size: 11px !important; }

/* 管理端统计占位 */
.skel-inline { color: var(--ink-3); animation: blink 1.4s infinite; }

/* ===== 信誉与评价详情页 ===== */
.rep-head { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 14px; }
.rep-head .avatar { width: 60px; height: 60px; border-radius: 20px; font-size: 23px; }

.rep-score {
  display: flex; gap: 20px; padding: 20px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(76,125,255,0.10), rgba(245,166,35,0.08));
  border: 1px solid rgba(76,125,255,0.10);
}
.rep-score-left { flex: 1; }
.rep-score-right { display: flex; gap: 14px; align-items: center; }
.rs-label { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.5px; }
.rs-num { font-size: 42px; font-weight: 800; line-height: 1.1; margin-top: 6px; background: linear-gradient(135deg, #4c7dff, #f5a623); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rs-total { font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.rs-stat { text-align: center; min-width: 42px; }
.rs-stat b { display: block; font-size: 17px; font-weight: 800; color: var(--ink); }
.rs-stat span { font-size: 10px; color: var(--ink-3); font-weight: 600; }

.rep-block { padding: 18px 18px 20px; margin-bottom: 14px; }
.block-title {
  font-size: 13.5px; font-weight: 800; letter-spacing: 3px; color: var(--ink-2);
  padding: 0 0 10px 2px; margin-bottom: 14px;
  border-bottom: 1px dashed rgba(23,24,28,0.08);
}

/* 条形图 */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.bar-label { width: 70px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; flex-shrink: 0; }
.bar-track { flex: 1; height: 10px; background: rgba(23,24,28,0.06); border-radius: 100px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 100px; transition: width 0.6s var(--spring); min-width: 3px; }
.bar-val { width: 32px; text-align: right; font-size: 13px; font-weight: 800; color: var(--ink); }

/* 徽章墙 */
.badge-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-item {
  padding: 12px 6px 10px; text-align: center;
  background: rgba(23,24,28,0.04); border-radius: 14px;
  border: 1px solid rgba(23,24,28,0.04);
}
.b-icon { font-size: 26px; line-height: 1; }
.b-name { font-size: 11.5px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.b-desc { font-size: 9.5px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; padding: 0 2px; }

/* 评价列表 */
.review-item { padding: 12px 0; border-bottom: 1px solid rgba(23,24,28,0.06); }
.review-item:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-head .avatar { width: 34px; height: 34px; font-size: 13px; border-radius: 12px; }
.r-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.r-star { color: #f5a623; font-size: 11px; letter-spacing: 1px; margin-left: 4px; vertical-align: 1px; }
.r-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.6; }
.r-order { font-size: 11.5px; color: #2e62ef; margin: 8px 44px 0; background: rgba(76,125,255,0.08); padding: 5px 10px; border-radius: 9px; }
.r-content { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin: 8px 44px 0; }
.r-imgs { margin: 9px 44px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.r-imgs img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; background: #fff; }

@media (max-width: 340px) {
  .badge-wall { grid-template-columns: repeat(2, 1fr); }
  .rs-num { font-size: 36px; }
  .rep-score { flex-direction: column; }
}

/* ===== 订单修改记录 / 申请 ===== */
.mod-item {
  background: rgba(23,24,28,0.04);
  border-radius: 13px;
  padding: 12px 13px;
  margin: 10px 0 0;
  border: 1px solid rgba(23,24,28,0.05);
}
.mod-item:first-child { margin-top: 0; }
.mod-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-2); font-weight: 600;
}
.mod-who .status-tag { margin-left: 6px; }
.mod-time { font-size: 10.5px; color: var(--ink-3); font-weight: 500; }
.mod-list {
  list-style: none; margin: 8px 0 0; padding: 4px 10px;
  background: #fff; border-radius: 10px;
  font-size: 12px; color: var(--ink-2); line-height: 1.85;
}
.mod-list li { padding-left: 12px; position: relative; }
.mod-list li::before {
  content: '▸'; position: absolute; left: 0; color: #4c7dff; font-weight: 700;
}
.mod-note { margin-top: 8px; font-size: 11.5px; color: var(--ink-2); line-height: 1.7; padding: 5px 9px; background: rgba(76,125,255,0.06); border-radius: 8px; }

/* 聊天内修改系统卡片 */
.mod-card {
  max-width: 90% !important;
  margin: 6px auto !important;
  padding: 13px 14px !important;
  background: linear-gradient(135deg, rgba(76,125,255,0.07), rgba(118,90,255,0.05)) !important;
  border: 1px solid rgba(76,125,255,0.12) !important;
  border-radius: 16px !important;
  text-align: left !important;
  color: var(--ink) !important;
}
.mod-card.mc-ok   { background: linear-gradient(135deg, rgba(61,175,112,0.09), rgba(76,200,140,0.05)) !important; border-color: rgba(61,175,112,0.18) !important; }
.mod-card.mc-err  { background: linear-gradient(135deg, rgba(196,62,62,0.08), rgba(230,130,130,0.04)) !important; border-color: rgba(196,62,62,0.18) !important; }
.mod-card.mc-gray { background: linear-gradient(135deg, rgba(114,118,135,0.08), rgba(170,175,190,0.05)) !important; border-color: rgba(114,118,135,0.15) !important; }
.mc-title { font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.mc-diff  { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; }
.mc-reason { margin-top: 6px; font-size: 11.5px; color: var(--ink-2); line-height: 1.7; padding: 5px 9px; background: rgba(255,255,255,0.6); border-radius: 8px; }

/* ===== 本轮追加样式 ===== */

/* 1. 画板顶栏：豆数 · 色数 胶囊统计（用户反映左下看不见，移到顶栏显眼） */
.st-head-count {
  margin-left: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(23,24,28,.05);
  border: 1px solid rgba(23,24,28,.08);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: .3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.st-head-count b { color: var(--ink); font-weight: 800; }

/* 画板顶栏：标题区防竖排挤压（统计胶囊并入标题行，副标题最多两行） */
.st-head .page-title { font-size: 22px; }
.st-head .st-head-count { vertical-align: middle; }
.st-sub {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.45;
}

/* 2. 首页搜索框：强制 iOS 长按粘贴（解决 user-select:none 导致粘贴不可用） */
#home-q {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
  touch-callout: default;
}
#home-q:focus { -webkit-user-select: text; user-select: text; }

/* 3. 订单发布：订单类型 seg 右侧空隙填满：按钮撑满 + 内部字距更均匀 */
#pb-vis {
  width: 100% !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  padding: 6px !important;
  background: rgba(23,24,28,.05) !important;
  border-radius: 16px !important;
}
#pb-vis button {
  width: 100%;
  padding: 12px 8px !important;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  margin: 0;
  border-radius: 12px !important;
}

/* 4. 我的页：3 列统计卡（合并完成+进行中→「我的订单」） */
#me-stats {
  grid-template-columns: repeat(3, 1fr) !important;
}
#me-stats > div { padding: 14px 4px; }
.me-row.me-account {
  border-bottom: none !important;
  margin-bottom: 14px;
}
.me-row.me-account .me-account-bind {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 3px;
}

/* 5. 聊天页：键盘异常防护（iOS PWA 防止输入条被「完成」辅助条盖住） */
.chat-foot {
  position: relative;
  z-index: 60;
  will-change: transform;
  transition: transform .28s var(--ease), background .28s var(--ease);
  background: #fff;
  padding-bottom: max(8px, var(--s-bottom));
  border-top: 1px solid var(--line-dark);
}
/* kbd-open 时把输入条的「贴紧状态」再上移 8px（避开上下箭头/完成 辅助窄条高度） */
body.kbd-open .chat-foot {
  padding-bottom: 6px;
  background: #fff !important;
}
body.kbd-open .chat-foot #chat-input {
  height: 40px;
  font-size: 14.5px;
  line-height: 1.35;
  padding: 9px 12px;
  padding-bottom: 9px;
}
/* 头部在顶起时仍保持可点击、不遮挡下方聊天 */
.chat-head {
  will-change: transform;
  transition: transform .26s var(--ease);
  z-index: 30;
  position: relative;
}

/* 6. 图纸评论：多图布局 + 点击放大 */
.cmt-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.cmt-imgs:empty { display: none; }
.cmt-imgs img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.cmt-imgs-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 7. 通用 btn-outline（用户页「已关注·取关」） */
.btn.btn-outline {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid rgba(23,24,28,0.18);
}
.btn.btn-outline:active { background: rgba(23,24,28,.06); }

/* 8. 搜索：统一修正所有搜索框 iOS 粘贴 */
.search-bar input,
input.input[type="search"],
input[placeholder*="搜索"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
  touch-callout: default;
}

/* ---------- 返回顶部按钮（长列表右下） ---------- */
.back-top {
  position: fixed;
  right: 18px;
  bottom: calc(110px + var(--s-bottom));
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(23, 24, 28, 0.08);
  box-shadow: 0 6px 20px rgba(23, 24, 28, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 35; /* > tabbar 30，保证在 tabbar 之上可见；< overlay 50 / sheet 160 */
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--spring);
  cursor: pointer;
}
.back-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-top:active { transform: scale(0.9); }
.back-top svg {
  width: 20px; height: 20px;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ============ 法律文档（隐私政策 / 用户协议 · 上架合规） ============ */
.legal-doc {
  padding: 4px 18px 28px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.75;
  max-height: calc(100% - 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.legal-doc h2 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
  margin: 18px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  line-height: 1.4;
}
.legal-doc h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 12px 0 4px;
}
.legal-doc p {
  margin: 4px 0;
  word-break: break-word;
}
/* sheet 内的协议文档：高度受 sheet 限制，可独立滚动 */
.legal-doc-sheet {
  max-height: 60vh;
  padding: 4px 8px 16px;
  font-size: 13px;
}
