/* ============================================================
   跳蚤市场 · 移动优先样式
   设计语言：暖橙品牌色 + 大圆角卡片 + 柔和阴影 + 玻璃质感
   ============================================================ */
:root {
  --brand: #ff6a00;
  --brand-2: #ff8a3d;
  --brand-ink: #ff5e00;
  --brand-soft: #fff3ea;
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #171a1f;
  --ink-2: #4b5159;
  --muted: #8a9099;
  --faint: #b0b6bf;
  --line: #eef0f3;
  --ok: #00b578;
  --ok-soft: #e8f9f2;
  --info: #3b7cff;
  --danger: #ef4444;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(23, 26, 31, .04);
  --shadow: 0 1px 2px rgba(23, 26, 31, .04), 0 8px 24px rgba(23, 26, 31, .07);
  --shadow-lg: 0 16px 40px rgba(23, 26, 31, .14);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --card-rgb: 255, 255, 255;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

button { font-family: inherit; }

/* ==================== 顶栏 ==================== */
.appbar {
  position: sticky; top: 0; z-index: 40;
  padding: calc(10px + var(--safe-t)) 16px 0;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, #ffb27a 0%, rgba(255, 178, 122, 0) 55%),
    radial-gradient(120% 120% at 0% 0%, #ff7d33 0%, rgba(255, 125, 51, 0) 60%),
    linear-gradient(160deg, #ff7a1a 0%, #ff5e00 100%);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 12px 30px rgba(255, 94, 0, .22);
  overflow: hidden;
}
.appbar::after {
  content: "";
  position: absolute; left: -10%; right: -10%; bottom: -70px; height: 90px;
  background: rgba(255, 255, 255, .06);
  border-radius: 50%;
  pointer-events: none;
}

.bar-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.logo {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.brand-text { min-width: 0; }
.brand-text h1 { font-size: 18px; line-height: 1.25; letter-spacing: .4px; }
.brand-text p { font-size: 11px; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.conn {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 11px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
}
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: #ffd166; transition: background .3s; }
.conn.ok .dot { background: #3dffa4; box-shadow: 0 0 8px #3dffa4; }
.conn.err .dot { background: #ff5b5b; }

/* 搜索 */
.search-row { display: flex; gap: 9px; margin: 10px 0 8px; position: relative; z-index: 1; }
.search-wrap {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px;
  background: #fff; border-radius: 13px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  color: var(--faint);
}
.search-wrap input {
  flex: 1; height: 100%; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--ink);
}
.search-wrap input::placeholder { color: var(--faint); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 13px; border: none;
  background: rgba(255, 255, 255, .2);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .12s;
}
.icon-btn:active { background: rgba(255, 255, 255, .34); transform: scale(.95); }
.icon-btn.on { background: #fff; color: var(--brand-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .16); }
.icon-btn.spin svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 已生效的筛选条件 */
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 2px 12px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: var(--brand-ink); background: var(--brand-soft);
  border: 1px solid rgba(255, 106, 0, .28);
}
.filter-chip:active { transform: scale(.97); }
.filter-chip .x { margin-left: 4px; font-size: 14px; font-weight: 800; opacity: .65; line-height: 1; }
.filter-chip.clear-all {
  background: transparent; color: var(--muted);
  border: 1px dashed var(--line); font-weight: 500;
}

/* 列表上方的醒目刷新条 */
.refresh-bar {
  width: 100%; height: 46px; margin: 0 0 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(255, 106, 0, .28);
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 14px; font-weight: 700; letter-spacing: .5px;
  transition: transform .12s, background .15s;
}
.refresh-bar:active { transform: scale(.98); background: rgba(255, 106, 0, .18); }
.refresh-bar.spin svg { animation: spin .7s linear infinite; }

/* 状态切换（在售 / 已出） */
.status-tabs { display: flex; gap: 3px; padding: 3px; background: var(--bg); border-radius: 11px; }
.status-tabs button {
  height: 30px; padding: 0 14px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-2); font-size: 12.5px; font-weight: 600;
}
.status-tabs button.active { background: var(--card); color: var(--brand-ink); font-weight: 700; box-shadow: var(--shadow-sm); }

/* ==================== 商品网格 ==================== */
.content { padding: 14px 14px calc(28px + var(--safe-b)); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1200px) { .content { max-width: 1200px; margin: 0 auto; width: 100%; } }

.card {
  background: var(--card); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(23, 26, 31, .14); }
.card:active { transform: scale(.985); }

.card-img {
  position: relative; aspect-ratio: 1 / 1; min-height: 110px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: #eef0f2;
  overflow: hidden;
}
.card-img svg { width: 34px; height: 34px; opacity: .82; }
.detail-head-img svg { width: 56px; height: 56px; opacity: .85; }

/* 无图封面：用商品关键词当大字 */
.card-img .ph-word,
.detail-head-img .ph-word {
  font-size: 42px; font-weight: 800; letter-spacing: 3px;
  color: #fff; text-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  line-height: 1.1; padding: 0 6px; text-align: center;
  word-break: break-all;
}
body.size-medium .card-img .ph-word { font-size: 30px; letter-spacing: 1px; }
body.size-compact .card-img .ph-word { font-size: 22px; letter-spacing: 0; }
.rec-img .ph-word { font-size: 18px; letter-spacing: 1px; }
.detail-head-img .ph-word { font-size: 60px; letter-spacing: 4px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.img-0 { background: linear-gradient(140deg, #5b7cff 0%, #9b6bff 100%); }
.img-1 { background: linear-gradient(140deg, #ff9a6c 0%, #ff5f8f 100%); }
.img-2 { background: linear-gradient(140deg, #2fc7a7 0%, #2f9bc7 100%); }
.img-3 { background: linear-gradient(140deg, #f7b733 0%, #fc4a1a 100%); }
.img-4 { background: linear-gradient(140deg, #8fb18f 0%, #4a7c59 100%); }
.img-5 { background: linear-gradient(140deg, #b19cd9 0%, #fbc2eb 100%); }
.img-6 { background: linear-gradient(140deg, #43cea2 0%, #185a9d 100%); }
.img-7 { background: linear-gradient(140deg, #ff9966 0%, #ff5e62 100%); }

.badge {
  position: absolute; top: 9px; left: 9px;
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px;
  background: rgba(0, 0, 0, .42); color: #fff;
  backdrop-filter: blur(6px);
}
.badge.sold { background: rgba(80, 84, 92, .66); }
.badge.reserved { background: rgba(59, 124, 255, .8); }
.badge.new { left: auto; right: 9px; background: #ff4d4f; box-shadow: 0 4px 10px rgba(255, 77, 79, .4); }
.cat-tag {
  position: absolute; bottom: 9px; left: 9px;
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, .94); color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.card-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title {
  font-size: 13.5px; line-height: 1.45; color: var(--ink); font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 39px;
}
.card.sold .card-title { color: var(--muted); text-decoration: line-through; }
.card-price { display: flex; align-items: baseline; gap: 2px; overflow: hidden; }
.price-rmb { font-size: 11px; color: var(--brand); font-weight: 800; }
.price-val { font-size: 19px; color: var(--brand); font-weight: 800; letter-spacing: -.4px; }
.price-free { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.price-text {
  font-size: 10.5px; color: var(--faint); margin-left: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 56%;
}
.card-meta {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  gap: 4px; font-size: 10.5px; color: var(--faint);
  padding-top: 4px; border-top: 1px dashed var(--line);
}
.card-meta .seller { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 66%; }

/* 卡片上的卖家昵称（可点击复制） */
.qq-chip {
  align-self: flex-start; max-width: 100%;
  display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  color: var(--brand-ink); background: var(--brand-soft);
  border: none; border-radius: 6px; padding: 2px 7px;
}
.seller-chip {
  align-self: flex-start; max-width: 100%;
  display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2px;
  color: var(--ink-2); background: rgba(23, 26, 31, .05);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
  transition: background .15s, color .15s;
}
.seller-chip:active { background: var(--brand-soft); color: var(--brand-ink); }
body.size-medium .seller-chip { font-size: 10px; padding: 1px 6px; }
body.size-compact .seller-chip { font-size: 9px; padding: 1px 5px; }
.qq-box .sub { font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 500; }

/* 商品标签 */
.tag-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.tag-pill {
  font-size: 10px; padding: 1px 6px; border-radius: 5px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.size-compact .tag-pills { display: none; }

/* 详情卖家卡 */
.seller-card {
  display: flex; align-items: center; gap: 11px;
  background: var(--bg); border-radius: 16px; padding: 12px 13px;
  margin-top: 12px;
}
.avatar-lg {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #ffb27a, #ff5e00);
  box-shadow: 0 6px 14px rgba(255, 94, 0, .25);
}
.seller-info { flex: 1; min-width: 0; }
.seller-name { font-size: 15px; font-weight: 800; }
.seller-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 详情页提示条 */
.detail-tip {
  margin-top: 12px; padding: 10px 12px;
  font-size: 12px; line-height: 1.6; color: var(--ink-2);
  background: var(--brand-soft); border-radius: 12px;
  border: 1px dashed rgba(255, 106, 0, .35);
}
.detail-tip b { color: var(--brand-ink); }

/* 相似商品 */
.rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.rec-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rec-card:active { transform: scale(.98); }
.rec-img {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, #c895ff, #7a6bff); overflow: hidden;
}
.rec-img img { width: 100%; height: 100%; object-fit: cover; }
.rec-img svg { width: 22px; height: 22px; opacity: .8; }
.rec-title {
  font-size: 11.5px; line-height: 1.4; padding: 6px 7px 2px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rec-price { font-size: 13px; font-weight: 800; color: var(--brand); padding: 0 7px 7px; }

/* 骨架屏 */
.card.skel { animation: none; pointer-events: none; }
.skel-block { background: linear-gradient(90deg, var(--line) 25%, rgba(255,255,255,.6) 37%, var(--line) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.skel-line { height: 12px; margin: 8px 0; }
.skel-line.short { width: 60%; }

/* 新商品闪光 */
.card.flash { box-shadow: 0 0 0 2px var(--brand), 0 12px 30px rgba(255, 94, 0, .25); animation: flashPulse 1.6s ease; }
@keyframes flashPulse { 0% { transform: scale(.98); } 30% { transform: scale(1.01); } 100% { transform: none; } }

/* ==================== 首页 Banner ==================== */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #ff8a3d 0%, #ff4d6a 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(255, 94, 60, .28);
  margin-bottom: 14px;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy h2 { font-size: 21px; letter-spacing: .5px; }
.hero-copy p { font-size: 12px; opacity: .92; margin: 4px 0 12px; }
.hero-stats { display: flex; gap: 8px; }
.hero-stats span {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.hero-stats b { font-size: 14px; margin-right: 2px; }
.hero-art {
  font-size: 54px; line-height: 1; position: relative; z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .18));
  transform: rotate(-6deg);
}

/* ==================== 分类金刚区 ==================== */
.cat-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px; margin-bottom: 14px;
}
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.cat-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 8px 2px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .15s, border-color .15s;
}
.cat-item:active { transform: scale(.94); }
.cat-item.active { border-color: rgba(255, 106, 0, .5); box-shadow: 0 4px 12px rgba(255, 94, 0, .12); }
.cat-ico {
  width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  background: #f5f6f8;
}
.cat-name { font-size: 11px; color: var(--ink); font-weight: 600; line-height: 1.2; }
.cat-count { font-size: 9px; color: var(--faint); line-height: 1.2; }
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.viewbar-label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.size-seg {
  display: flex; gap: 3px; padding: 3px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; box-shadow: var(--shadow-sm);
}
.size-seg button {
  height: 30px; padding: 0 13px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-2);
  font-size: 12.5px; font-weight: 600;
  transition: background .15s, color .15s;
}
.size-seg button.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }

/* 中图模式 */
body.size-medium .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
body.size-medium .card-img { aspect-ratio: 4 / 3; min-height: 74px; }
body.size-medium .card-img svg { width: 24px; height: 24px; }
body.size-medium .card-body { padding: 8px 9px 10px; gap: 4px; }
body.size-medium .card-title { font-size: 12.8px; min-height: 34px; }
body.size-medium .price-val { font-size: 16.5px; }
body.size-medium .price-text { display: none; }
body.size-medium .card-meta { font-size: 10px; padding-top: 3px; }

/* 小图模式 */
body.size-compact .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
body.size-compact .card { border-radius: 12px; }
body.size-compact .card-img { aspect-ratio: 1 / 1; min-height: 52px; }
body.size-compact .card-img svg { width: 18px; height: 18px; }
body.size-compact .card-body { padding: 5px 6px 7px; gap: 2px; }
body.size-compact .card-title { font-size: 11.5px; min-height: 16px; -webkit-line-clamp: 1; }
body.size-compact .price-rmb { font-size: 9px; }
body.size-compact .price-val { font-size: 14px; }
body.size-compact .price-text { display: none; }
body.size-compact .card-meta { display: none; }
body.size-compact .cat-tag { display: none; }
body.size-compact .badge { font-size: 8.5px; padding: 1px 4px; border-radius: 5px; }

@media (min-width: 600px) {
  body.size-large .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.size-medium .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.size-compact .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  body.size-large .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  body.size-medium .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  body.size-compact .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  body.size-compact .card-img { aspect-ratio: 4 / 3; }
}

.more-row { text-align: center; margin-top: 18px; }
.load-more {
  height: 42px; padding: 0 30px; border-radius: 999px;
  border: 1px solid rgba(255, 106, 0, .3); background: var(--card);
  color: var(--brand); font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .15s;
}
.load-more:active { transform: scale(.97); }
.empty { text-align: center; padding: 68px 22px; color: var(--muted); }
.empty-icon { margin-bottom: 12px; color: var(--faint); }
.empty-icon svg { display: inline-block; }
.empty p { font-size: 16px; font-weight: 700; color: var(--ink); }
.empty-tip { font-size: 13px !important; font-weight: 400 !important; color: var(--muted) !important; line-height: 1.9; margin: 8px 0 20px; }
.empty .btn { height: 42px; padding: 0 26px; }

.footer {
  text-align: center; padding: 12px 14px calc(16px + var(--safe-b));
  font-size: 11px; color: var(--faint);
}

/* ==================== 通用按钮 ==================== */
.btn {
  height: 44px; padding: 0 18px; border-radius: 13px; border: none;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .12s, filter .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand-ink));
  color: #fff; box-shadow: 0 8px 20px rgba(255, 94, 0, .28);
}
.btn.ghost { background: var(--brand-soft); color: var(--brand-ink); }

/* ==================== 弹层 ==================== */
.sheet-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 18, 22, .5);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 560px; background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(18px + var(--safe-b));
  max-height: 84vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideup .24s cubic-bezier(.22, .9, .3, 1);
}
.sheet.full {
  max-width: 100%; height: 100%; max-height: 100%;
  border-radius: 0; padding: 0;
  display: flex; flex-direction: column; position: relative;
  animation: slideupfull .22s ease;
}
@keyframes slideup { from { transform: translateY(34px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes slideupfull { from { transform: translateY(46px); opacity: .6; } to { transform: none; opacity: 1; } }

.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-head h3 { font-size: 17px; letter-spacing: .3px; }
.sheet-head .icon-btn { background: var(--bg); color: var(--ink); width: 34px; height: 34px; border-radius: 10px; }

.field { margin-top: 16px; }
.field > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; background: var(--bg); padding: 4px; border-radius: 12px; }
.seg button {
  flex: 1; min-width: 60px; height: 36px; border-radius: 9px;
  border: none; background: transparent;
  font-size: 13.5px; color: var(--ink-2); font-weight: 500;
  transition: background .15s, color .15s;
}
.seg button.active { background: var(--card); color: var(--brand-ink); font-weight: 700; box-shadow: var(--shadow-sm); }
.range { display: flex; align-items: center; gap: 8px; }
.range input {
  flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); padding: 0 13px; font-size: 14px; color: var(--ink); outline: none;
}
.range input:focus { border-color: rgba(255, 106, 0, .5); background: var(--card); }
.range span { color: var(--faint); }
.field select {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); padding: 0 13px; font-size: 14px; color: var(--ink);
}
.sheet-actions { display: flex; gap: 10px; margin-top: 24px; }
.sheet-actions .btn { flex: 1; }

/* ==================== 详情页 ==================== */
.detail-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(var(--card-rgb, 255, 255, 255), .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 3;
}
.detail-topbar span { font-size: 15px; font-weight: 700; }
.detail-topbar .spacer { flex: 1; }
.detail-topbar .icon-btn { background: var(--bg); color: var(--ink); width: 36px; height: 36px; border-radius: 11px; }

.detail-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(96px + var(--safe-b)); }
.detail-thumb { border-radius: 16px; overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.detail-thumb img { display: block; width: 100%; height: 180px; object-fit: cover; }
.detail-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.detail-title { font-size: 21px; font-weight: 800; line-height: 1.4; margin: 6px 0 8px; letter-spacing: -.2px; }
.detail-price { display: flex; align-items: baseline; gap: 7px; margin-bottom: 6px; }
.detail-price .price-rmb { font-size: 16px; }
.detail-price .price-val { font-size: 34px; }

/* 商品简介：详情页最显眼的信息块 */
.summary-card {
  margin: 12px 0 14px; padding: 14px 16px;
  background: linear-gradient(180deg, #fff, #fff8f2);
  border: 1px solid rgba(255, 106, 0, .18);
  border-radius: 16px;
}
.summary-label {
  font-size: 11.5px; font-weight: 700; color: var(--brand-ink);
  letter-spacing: 1px; margin-bottom: 6px;
}
.summary-text { font-size: 15px; line-height: 1.75; color: var(--ink); }

.detail-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  background: var(--bg); border-radius: 16px; padding: 14px;
}
.detail-meta .meta-item { font-size: 12px; color: var(--muted); }
.detail-meta b { display: block; font-size: 14.5px; color: var(--ink); font-weight: 700; margin-top: 3px; word-break: break-all; }

.detail-section { margin-top: 22px; }
.detail-section h3 {
  font-size: 14.5px; margin-bottom: 12px; padding-left: 10px;
  border-left: 3px solid var(--brand); line-height: 1.2;
}
.detail-desc {
  background: var(--bg); border-radius: 14px; padding: 13px 15px;
  font-size: 14px; line-height: 1.8; color: var(--ink-2);
}

.timeline { list-style: none; padding-left: 4px; }
.tl-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; flex-shrink: 0;
  background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
.tl-item.sold .tl-dot { background: #9aa1aa; box-shadow: 0 0 0 4px rgba(154, 161, 170, .18); }
.tl-item.update .tl-dot { background: var(--info); box-shadow: 0 0 0 4px rgba(59, 124, 255, .16); }
.tl-main { font-size: 14px; line-height: 1.55; }
.tl-sub { color: var(--faint); font-size: 11.5px; margin-top: 2px; }

.sources { display: flex; flex-direction: column; gap: 10px; }
.src-item {
  background: var(--bg); border-left: 3px solid var(--line);
  border-radius: 12px; padding: 10px 13px; font-size: 13.5px; line-height: 1.75;
  color: var(--ink-2);
}
.src-meta { color: var(--faint); font-size: 11px; margin-bottom: 3px; }

.detail-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 11px 16px calc(11px + var(--safe-b));
  background: rgba(var(--card-rgb, 255, 255, 255), .92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.detail-foot .btn { flex: 1 1 90px; height: 46px; font-size: 14.5px; }

/* 桌面端：全屏弹层居中成卡片，避免拉伸 */
@media (min-width: 900px) {
  .sheet.full {
    max-width: 760px; height: min(100%, 920px);
    margin: auto; border-radius: 22px;
    box-shadow: var(--shadow-lg);
  }
}

/* ==================== 留言板 ==================== */
.chat-body { flex: 1; overflow-y: auto; padding: 16px 14px 12px; background: var(--bg); }
.chat-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 46px 22px; line-height: 1.9; }
.bubble-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-end; }
.bubble-row.mine { flex-direction: row-reverse; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ffb27a, #ff6a00);
  box-shadow: var(--shadow-sm);
}
.bubble-col { display: flex; flex-direction: column; max-width: 78%; }
.bubble-row.mine .bubble-col { align-items: flex-end; }
.bubble-name { font-size: 11px; color: var(--faint); margin-bottom: 4px; padding: 0 2px; }
.bubble {
  padding: 10px 13px; border-radius: 15px; font-size: 14px; line-height: 1.6;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}
.bubble-row.mine .bubble {
  background: linear-gradient(135deg, var(--brand-2), var(--brand-ink));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 94, 0, .25);
}
.bubble-time { font-size: 10.5px; color: var(--faint); margin-top: 4px; padding: 0 2px; }
.chat-inputbar {
  display: flex; gap: 9px; padding: 10px 12px calc(10px + var(--safe-b));
  background: var(--card); border-top: 1px solid var(--line);
}
.chat-inputbar input {
  flex: 1; height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); padding: 0 17px; font-size: 14px; color: var(--ink); outline: none;
}
.chat-inputbar input:focus { border-color: rgba(255, 106, 0, .5); }
.chat-inputbar .btn { width: 78px; border-radius: 999px; }

/* ==================== 其他 ==================== */
.qq-box {
  display: flex; align-items: center; gap: 9px; margin-top: 12px;
  background: var(--bg); border-radius: 14px; padding: 11px 13px; font-size: 13.5px;
}
.qq-box .label { color: var(--muted); font-size: 12.5px; flex-shrink: 0; }
.qq-box .val { font-weight: 800; color: var(--ink); flex: 1; word-break: break-all; letter-spacing: .5px; }
.copy-btn {
  border: 1px solid rgba(255, 106, 0, .35); background: var(--card); color: var(--brand);
  border-radius: 999px; height: 32px; padding: 0 13px; font-size: 12.5px; font-weight: 700;
}
.copy-btn.primary-copy { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(255, 94, 0, .25); }

.toast {
  position: fixed; left: 50%; bottom: calc(30px + var(--safe-b)); transform: translateX(-50%);
  background: rgba(23, 26, 31, .94); color: #fff;
  padding: 11px 18px; border-radius: 14px; font-size: 13px; font-weight: 500;
  z-index: 120; max-width: 88vw; text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 10px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* 桌面端微调 */
@media (min-width: 900px) {
  .appbar { padding-left: 26px; padding-right: 26px; }
  .bar-top { gap: 18px; }
  .brand-text h1 { font-size: 21px; }
  .brand-text p { font-size: 12px; }
  .detail-body { padding-left: 24px; padding-right: 24px; }
}

/* 页脚公网地址 */
.public-url {
  margin-top: 8px; font-size: 11.5px; color: var(--brand-ink);
  background: var(--brand-soft); border-radius: 8px;
  padding: 6px 10px; display: inline-block;
  word-break: break-all; cursor: pointer;
}

/* 卡片上的群名 / 昵称（各自复制） */
.seller-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.seller-chips .seller-chip { max-width: 100%; }
/* 详情页两个复制按钮 */
.seller-copy { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.seller-copy .copy-btn { font-size: 11.5px; padding: 5px 9px; white-space: nowrap; }
