/* =============================================================
   第二套新增组件样式：
   1) 点单端首页增强：4 格功能区 + 分类分组双列商品
      对齐第一套「26神羔独眼蛇自研」h5/index.php 的 function-grid
      与「分类 › 子分类」商品分组
   2) 多身份（老板端 / 打手端 / 商家端）：切换 · 申请 · 商家工作台 · 后台审核中心
   ============================================================= */

/* ---------- 4 格功能区 ---------- */
.fn-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 10px 10px 0;
  padding: 14px 8px;
  background: #fff; border-radius: var(--r-l);
  box-shadow: var(--shadow-card);
}
.fn-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 4px 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; text-align: center;
}
.fn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  /* 参照图效果：高饱和渐变实底 + 白色图标 + 顶部内高光 + 浮起投影（主色保持蓝） */
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 6px 14px rgba(60, 156, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .38);
  transition: transform .18s ease, box-shadow .18s ease;
}
.fn-item:active .fn-icon { transform: scale(.94); box-shadow: 0 3px 8px rgba(60, 156, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .38); }
.fn-item:hover .fn-icon { box-shadow: 0 8px 18px rgba(60, 156, 255, .42), inset 0 1px 0 rgba(255, 255, 255, .38); }
.fn-icon svg { width: 23px; height: 23px; }
.fn-icon img { width: 23px; height: 23px; object-fit: contain; }
.fn-label { font-size: 12px; color: var(--text-2); line-height: 1.2; }

/* ---------- 首页游戏入口（后台「游戏分类管理」维护：图片 + 文字） ---------- */
/* 小图标 + 无外框：不再使用白色圆角面板，图标本身即入口 */
.game-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 8px;
  margin: 12px 10px 0;
}
.game-entry {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; color: inherit;
}
.game-entry-img {
  position: relative; display: block; width: 52px; height: 52px;
  border-radius: 14px; overflow: hidden;
  transition: transform .18s ease;
}
.game-entry-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.game-entry-img i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 19px; font-weight: 800; color: #fff;
  background: var(--grad-main); border-radius: inherit;
}
.game-entry:active .game-entry-img { transform: scale(.92); }
.game-entry-name {
  font-size: 11.5px; color: var(--text-2); line-height: 1.25;
  width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 分类筛选条（全部 + 各游戏）+ 列表标题 ---------- */
.home-cats {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 12px 10px 2px;
}
.home-cats::-webkit-scrollbar { display: none; }
.home-cats > * { flex-shrink: 0; }
.home-cat {
  display: inline-flex; align-items: center;
  padding: 7px 16px; border-radius: var(--r-pill);
  font-size: 13px; color: var(--text-3);
  background: #fff; border: 1px solid rgba(0, 0, 0, .05);
  box-shadow: var(--shadow-card);
  transition: all .22s ease;
}
.home-cat:active { transform: scale(.96); }
.home-cat.on {
  background: var(--grad-modern); color: #fff; font-weight: 700;
  border-color: transparent; box-shadow: 0 4px 12px rgba(43, 133, 228, .35);
}
.home-list-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 2px; }
.home-list-head b { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.home-list-head span { font-size: 12px; color: var(--text-4); }

/* ---------- 分类 › 子分类 分组 ---------- */
.home-group { margin: 0 10px 14px; }
.home-group-head {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 2px 9px;
}
.home-group-bar {
  width: 3px; height: 15px; border-radius: 2px;
  background: var(--grad-modern); flex-shrink: 0;
}
.home-group-title {
  font-size: 14.5px; font-weight: 700; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-group-title .sub { color: var(--text-3); font-weight: 500; }

.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.home-card {
  display: flex; flex-direction: column;
  background: #f8f9fc;
  border: 1px solid rgba(0, 0, 0, .04);
  border-radius: var(--r-m);
  box-shadow: 2px 3px 6px rgba(0, 0, 0, .04), -2px 3px 6px rgba(0, 0, 0, .04);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-card:active { transform: scale(.985); }
/* 商品图统一 1:1（对齐第一套 h5 的 .product-image-wrapper-two），不再裁成横条只剩一点 */
.home-card-img { position: relative; width: 100%; padding-bottom: 100%; overflow: hidden; background: #e9eef5; }
.home-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-card-body { padding: 8px 9px 10px; }
.home-card-title {
  font-size: 13px; font-weight: 600; color: var(--text-strong); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 35px;
}
.home-card-price {
  margin-top: 7px; display: flex; align-items: baseline; gap: 1px;
  font-size: 17px; font-weight: 700; color: var(--price-num);
}
.home-card-price .sym { font-size: 12px; font-weight: 600; color: var(--price-sym); }
.home-card-old { margin-left: 5px; font-size: 11.5px; font-weight: 400; color: var(--text-4); text-decoration: line-through; }
.home-card-tag {
  position: absolute; left: 0; top: 0; z-index: 2;
  padding: 2px 7px; border-radius: 0 0 8px 0;
  font-size: 10.5px; font-weight: 700; color: #fff;
  background: var(--grad-warm);
}
.home-card-sold {
  position: absolute; right: 6px; bottom: 6px; z-index: 2;
  padding: 1px 6px; border-radius: var(--r-pill);
  font-size: 10.5px; color: #fff; background: rgba(0, 0, 0, .42);
}

/* =============================================================
   私信（用户与用户一对一）：会话列表 + 对话页
   ============================================================= */
.dm-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 14px 8px; }
.dm-head-title { font-size: 17px; font-weight: 700; color: var(--text-strong); }
.dm-head-sub { font-size: 12px; color: var(--text-3); }

.dm-list {
  margin: 0 10px 12px; background: #fff;
  border-radius: var(--r-l); box-shadow: var(--shadow-card); overflow: hidden;
}
.dm-item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--divider-soft);
}
.dm-item:last-child { border-bottom: 0; }
.dm-item:active { background: #f7f9fc; }

/* 头像不做 overflow 裁剪，避免右上角未读角标被裁掉 */
.dm-avatar {
  position: relative; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
  background: var(--grad-main);
}
.dm-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.dm-badge {
  position: absolute; top: -5px; right: -5px; z-index: 2;
  min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-style: normal; font-weight: 700;
  box-shadow: 0 0 0 2px #fff;
}

.dm-body { flex: 1; min-width: 0; }
.dm-top { display: flex; align-items: center; gap: 6px; }
.dm-name {
  font-size: 14px; font-weight: 700; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-role {
  flex-shrink: 0; padding: 1px 6px; border-radius: var(--r-pill);
  font-size: 10.5px; color: var(--primary); background: var(--blue-soft-2);
}
.dm-time { margin-left: auto; flex-shrink: 0; font-size: 11px; font-style: normal; color: var(--text-4); }
.dm-preview {
  display: block; margin-top: 4px; font-size: 12.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 对话页（整页通栏：隐藏顶栏与底部导航） ---------- */
.dm-chat {
  display: flex; flex-direction: column;
  min-height: 100vh; max-width: 640px; margin: 0 auto;
  background: #f4f6fa;
}
.dm-chat-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
}
.dm-chat-back { flex-shrink: 0; width: 56px; font-size: 13.5px; color: var(--primary); text-decoration: none; }
.dm-chat-name {
  flex: 1; min-width: 0; text-align: center;
  font-size: 15.5px; font-weight: 700; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-chat-name i { display: block; margin-top: 2px; font-style: normal; font-size: 11px; font-weight: 500; color: var(--text-3); }
.dm-chat-space { flex-shrink: 0; width: 56px; }

.dm-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; }
.dm-empty { padding: 60px 0; text-align: center; font-size: 13px; color: var(--text-3); }
.dm-row { display: flex; align-items: flex-start; gap: 8px; }
.dm-row.me { flex-direction: row-reverse; }
.dm-msg-avatar {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--grad-main);
}
.dm-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-col { display: flex; flex-direction: column; max-width: 74%; }
.dm-row.me .dm-col { align-items: flex-end; }
.dm-bubble {
  padding: 9px 12px; border-radius: 14px;
  background: #fff; color: var(--text-strong);
  font-size: 13.5px; line-height: 1.55; word-break: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.dm-row.me .dm-bubble { background: var(--grad-modern); color: #fff; }
.dm-msg-time { margin-top: 4px; font-size: 10.5px; color: var(--text-4); }

.dm-form {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
}
.dm-input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: #f7f8fa; font-size: 14px; color: var(--text-strong); outline: none;
}
.dm-input:focus { border-color: var(--primary); background: #fff; }
.dm-form .btn-sm { flex-shrink: 0; height: 40px; padding: 0 18px; }

@media (max-width: 360px) {
  .dm-avatar { width: 42px; height: 42px; border-radius: 13px; }
  .dm-col { max-width: 78%; }
}

/* =============================================================
   订单沟通（订单详情内的双方留言）
   ============================================================= */
.ochat {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 420px; overflow-y: auto;
  padding: 12px; margin-bottom: 12px;
  background: #f6f8fb; border-radius: var(--r-m);
}
.ochat-row { display: flex; align-items: flex-start; gap: 8px; }
.ochat-row.me { flex-direction: row-reverse; }
.ochat-col { display: flex; flex-direction: column; max-width: 74%; }
.ochat-row.me .ochat-col { align-items: flex-end; }
.ochat-who { font-size: 11px; color: var(--text-4); margin-bottom: 3px; }
.ochat-bubble {
  padding: 9px 12px; border-radius: 14px; background: #fff; color: var(--text-strong);
  font-size: 13.5px; line-height: 1.55; word-break: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.ochat-row.me .ochat-bubble { background: var(--grad-modern); color: #fff; }
.ochat-form { display: flex; gap: 8px; align-items: center; }
.ochat-form .input { flex: 1; min-width: 0; }

/* =============================================================
   我的订单（顾客端）：卡片式列表，替换原来的宽表格，更适合手机
   ============================================================= */
.ord-list { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px; }
.ord-card {
  display: block; padding: 13px 14px;
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-card, 0 2px 10px rgba(23, 43, 77, .06));
  border: 1px solid rgba(23, 43, 77, .04);
  color: inherit; text-decoration: none;
  transition: transform .12s ease;
}
.ord-card:active { transform: scale(.985); }
.ord-top { display: flex; align-items: flex-start; gap: 11px; }
.ord-thumb {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 13px;
  object-fit: cover; background: #eef1f6;
  display: flex; align-items: center; justify-content: center; color: var(--text-4);
}
.ord-thumb svg { width: 24px; height: 24px; }
.ord-mid { flex: 1; min-width: 0; }
.ord-title {
  font-size: 14px; font-weight: 600; color: var(--text-strong); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ord-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ord-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 6px; background: var(--blue-soft, #eef4ff); color: var(--primary-deep, #2b6cb0); }
.ord-meta { margin-top: 6px; font-size: 11px; color: var(--text-4); }
.ord-bot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 11px; padding-top: 10px; border-top: 1px dashed #eef1f6;
}
.ord-no { font-size: 11.5px; color: var(--text-4); }
.ord-price { margin-left: auto; font-size: 15.5px; font-weight: 800; color: var(--price-num, #e74c3c); }
.ord-acts { display: flex; align-items: center; gap: 8px; margin-top: 11px; justify-content: flex-end; }
.ord-btn {
  font-size: 12.5px; padding: 6px 15px; border-radius: 999px;
  border: 1px solid #e3e8ef; background: #fff; color: var(--text-2);
}
.ord-btn-primary { border-color: transparent; background: var(--grad-modern); color: #fff; font-weight: 600; }

@media (max-width: 360px) {
  .fn-grid { gap: 6px; padding: 12px 4px; }
  .fn-icon { width: 40px; height: 40px; border-radius: 12px; }
  .fn-icon svg, .fn-icon img { width: 20px; height: 20px; }
  .fn-label { font-size: 11px; }
  .game-grid { gap: 4px 6px; }
  .game-entry-img { width: 46px; height: 46px; border-radius: 12px; }
  .game-entry-img i { font-size: 17px; }
  .game-entry-name { font-size: 11px; }
  .home-card-price { font-size: 15px; }
}

/* =============================================================
   多身份：切换 · 申请 · 商家工作台 · 后台审核中心
   ============================================================= */

/* ---------- 「我的」页身份切换 ---------- */
.role-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.role-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: #f2f4f8; border: 1px solid rgba(0, 0, 0, .05);
  text-decoration: none; transition: all .18s ease;
}
.role-pill.on {
  color: #fff; background: var(--grad-modern);
  box-shadow: 0 3px 10px rgba(43, 133, 228, .28);
}
.role-pill.pending { color: #b26a00; background: #fff6e5; border-color: #ffe0a3; }
.role-pill.ghost { color: var(--primary); background: #fff; border: 1px dashed rgba(60, 156, 255, .5); }
.role-tip { margin-top: 10px; font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* ---------- 身份申请 ---------- */
.role-apply-note { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 14px; }
.role-reject-note {
  margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r-s);
  font-size: 12.5px; line-height: 1.6; color: #b02a1f;
  background: rgba(250, 85, 72, .08); border: 1px solid rgba(250, 85, 72, .18);
}

/* ---------- 审核中心：身份申请 / 商家服务卡片 ---------- */
.role-app-list { display: flex; flex-direction: column; gap: 10px; }
.role-app-item {
  padding: 12px 14px; border-radius: var(--r-m);
  background: #f8f9fc; border: 1px solid rgba(0, 0, 0, .05);
}
.role-app-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 7px;
}
.role-app-name { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.role-app-meta { font-size: 12.5px; color: var(--text-3); line-height: 1.8; word-break: break-all; }
.role-app-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.role-app-acts form { display: flex; align-items: center; gap: 8px; margin: 0; }

/* ---------- 商家工作台 ---------- */
.mch-kpi {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 10px 10px 0; padding: 14px 10px;
  background: #fff; border-radius: var(--r-l); box-shadow: var(--shadow-card);
}
.mch-kpi-item { text-align: center; }
.mch-kpi-num { font-size: 16px; font-weight: 700; color: var(--text-strong); }
.mch-kpi-label { margin-top: 4px; font-size: 11.5px; color: var(--text-3); }
.mch-list { display: flex; flex-direction: column; gap: 8px; }
.mch-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-m);
  background: #f8f9fc; border: 1px solid rgba(0, 0, 0, .05);
}
.mch-item-main { min-width: 0; }
.mch-item-title {
  font-size: 13.5px; font-weight: 600; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mch-item-meta { margin-top: 3px; font-size: 12px; color: var(--text-3); }
.mch-state {
  flex-shrink: 0; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 600;
}
.mch-state.ok   { color: #1f9d63; background: rgba(31, 157, 99, .12); }
.mch-state.wait { color: #b26a00; background: #fff6e5; }
.mch-state.off  { color: var(--text-4); background: rgba(0, 0, 0, .06); }

@media (max-width: 360px) {
  .mch-kpi { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* =============================================================
   打手端·接单大厅（布局照搬 26「发单抢单系统」user/index.php）
   公告栏 → 游戏分类导航 → 服务类型筛选 → 订单卡片（订单价 / 到手）
   ============================================================= */

.game-nav { margin: 10px 10px 0; }
.game-nav-grid {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 5px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.game-nav-grid::-webkit-scrollbar { display: none; }
.game-nav-item {
  flex-shrink: 0; padding: 7px 16px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: #fff; border: 1px solid rgba(0, 0, 0, .05);
  text-decoration: none; box-shadow: var(--shadow-card);
  transition: all .18s ease;
}
.game-nav-item.active {
  color: #fff; background: var(--grad-modern);
  border-color: transparent; box-shadow: 0 3px 10px rgba(43, 133, 228, .28);
}

.server-filter {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 8px 10px 0; padding-bottom: 5px; scrollbar-width: none;
}
.server-filter::-webkit-scrollbar { display: none; }
.server-filter-item {
  flex-shrink: 0; padding: 6px 14px; border-radius: var(--r-s);
  font-size: 12.5px; font-weight: 600; color: var(--text-3);
  background: var(--blue-soft); text-decoration: none; transition: all .18s ease;
}
.server-filter-item.active { color: var(--primary); background: rgba(60, 156, 255, .14); }

.order-list { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.order-card {
  position: relative;
  background: #fff; border-radius: var(--r-l);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.order-card .order-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 12px 8px;
}
.order-card .order-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.order-card .user-avatar {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--grad-main);
}
.order-card .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.order-card .user-info { min-width: 0; }
.order-card .user-name {
  font-size: 13.5px; font-weight: 700; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-card .user-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.order-card .user-tag {
  padding: 1px 7px; border-radius: var(--r-pill);
  font-size: 10.5px; color: var(--primary); background: var(--blue-soft-2);
}
.order-card .order-price-box { flex-shrink: 0; text-align: right; }
.order-card .order-price { font-size: 17px; font-weight: 700; color: var(--price-num); }
.order-card .order-gain { margin-top: 3px; font-size: 11.5px; font-weight: 600; color: #1f9d63; }
.order-card .order-body { padding: 0 12px; }
.order-card .order-title { font-size: 14px; font-weight: 600; color: var(--text-strong); line-height: 1.4; }
.order-card .order-remark {
  margin-top: 5px; font-size: 12px; color: var(--text-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.order-card .order-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px 12px; margin-top: 8px;
  border-top: 1px solid var(--divider-soft);
}
.order-card .order-foot-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.order-card .order-time { font-size: 11px; color: var(--text-4); white-space: nowrap; }
.order-card .order-foot-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.order-cta { font-size: 12.5px; font-weight: 600; color: var(--primary); white-space: nowrap; }

/* =============================================================
   打手主页「找 TA 代练」- 选择商品弹窗（对齐第一套：点单 - 选择商品）
   ============================================================= */
.pd-pick-mask {
  position: fixed; inset: 0; z-index: 1100; display: none;
  align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .45);
}
.pd-pick-mask.on { display: flex; }
.pd-pick {
  width: 100%; max-width: 640px; max-height: 82vh;
  display: flex; flex-direction: column;
  padding: 16px 14px calc(14px + env(safe-area-inset-bottom));
  background: #fff; border-radius: 18px 18px 0 0;
  background-image: linear-gradient(180deg, #eef6ff, #ffffff 128px);
  animation: pdPickUp .22s ease;
}
@keyframes pdPickUp { from { transform: translateY(14px); opacity: .4; } to { transform: none; opacity: 1; } }
.pd-pick-head { display: flex; align-items: center; justify-content: center; position: relative; padding-bottom: 12px; }
.pd-pick-title { font-size: 16px; font-weight: 700; color: var(--primary-deep); }
.pd-pick-close {
  position: absolute; right: 0; top: -2px;
  width: 30px; height: 30px; line-height: 1; border: 0; cursor: pointer;
  background: transparent; color: var(--text-4); font-size: 24px;
}
.pd-pick-search { padding-bottom: 10px; }
.pd-pick-input {
  width: 100%; height: 40px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid rgba(60, 156, 255, .18); border-radius: var(--r-pill);
  background: #f1f7ff; font-size: 14px; color: var(--text-strong); outline: none;
}
.pd-pick-input:focus { border-color: var(--primary); background: #fff; }
.pd-pick-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.pd-pick-tab {
  flex-shrink: 0; padding: 5px 14px; border-radius: var(--r-pill);
  background: rgba(60, 156, 255, .1); color: var(--primary-deep); font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.pd-pick-tab.on { background: linear-gradient(135deg, #5cadff, #2b85e4); color: #fff; font-weight: 600; box-shadow: 0 6px 14px -8px rgba(43, 133, 228, .9); }
.pd-pick-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pd-pick-item {
  display: flex; align-items: center; gap: 10px; position: relative;
  padding: 8px 6px; border-radius: var(--r-m); text-decoration: none;
  border-bottom: 1px solid rgba(60, 156, 255, .1);
}
.pd-pick-item:active { background: rgba(60, 156, 255, .08); }
.pd-pick-thumb { flex-shrink: 0; width: 62px; height: 62px; border-radius: var(--r-s); overflow: hidden; background: #e8f2ff; }
.pd-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-pick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pd-pick-name {
  font-size: 14px; font-weight: 600; color: var(--text-strong); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-pick-meta { font-size: 11.5px; color: var(--text-4); }
.pd-pick-price { display: flex; align-items: baseline; gap: 1px; color: var(--price-num); font-weight: 800; font-size: 15px; }
.pd-pick-price i { font-size: 11px; font-style: normal; font-weight: 600; }
.pd-pick-price em { margin-left: 5px; font-size: 11.5px; font-weight: 400; color: var(--text-4); text-decoration: line-through; font-style: normal; }
.pd-pick-sold { flex-shrink: 0; font-size: 11px; color: #fff; background: var(--text-5); border-radius: var(--r-pill); padding: 2px 8px; }
.pd-pick-item.is-sold { opacity: .62; }
.pd-pick-empty { padding: 30px 0; text-align: center; font-size: 13px; color: var(--text-4); }

/* =============================================================
   打手主页「送礼」弹窗：从我的余额转给打手
   ============================================================= */
.pd-gift { max-height: 88vh; }
.pd-gift-bal { padding: 0 2px 12px; font-size: 12.5px; line-height: 1.65; color: var(--text-3); }
.pd-gift-bal b { color: var(--primary-deep); }
.pd-gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 10px; }
.pd-gift-amt {
  padding: 11px 0; text-align: center; border-radius: var(--r-m); cursor: pointer;
  border: 1px solid rgba(60, 156, 255, .2); background: #f4f9ff;
  font-size: 14px; font-weight: 700; color: var(--primary-deep);
  -webkit-tap-highlight-color: transparent;
}
.pd-gift-amt.on { background: linear-gradient(135deg, #5cadff, #2b85e4); border-color: transparent; color: #fff; box-shadow: 0 6px 14px -8px rgba(43, 133, 228, .9); }
.pd-gift-custom { padding-bottom: 12px; }
.pd-gift-tip { padding-top: 9px; font-size: 11.5px; line-height: 1.5; color: var(--text-5); text-align: center; }
