* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f7;
  color: #222;
  font-size: 14px;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; outline: none; border: none; background: transparent; }
img { display: block; max-width: 100%; }

/* ========== 主容器 ========== */
#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  background: #f5f5f7;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

/* ========== 页面切换 ========== */
.page {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
}
.page.active { display: flex; }

.status-bar {
  flex-shrink: 0;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #FFC107;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 17px;
  position: relative;
}
.page-mine .status-bar,
.page-home .status-bar { background: #FFC107; }
.page-discover .status-bar,
.page-experts .status-bar,
.page-jianbao .status-bar { background: #fff; color: #222; box-shadow: 0 1px 0 rgba(0,0,0,0.04); }

.scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;
}

/* ========== 底部Tabbar ========== */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70px;
  background: #1a1a1a;
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
  z-index: 100;
}
.tab {
  flex: 1;
  text-align: center;
  color: #888;
  padding: 6px 0;
  cursor: pointer;
  position: relative;
}
.tab .tab-icon { font-size: 22px; line-height: 1.2; }
.tab .tab-text { font-size: 11px; margin-top: 2px; }
.tab.active { color: #FFC107; }
.tab-center { position: relative; }
.tab-center-btn {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  background: #FFC107;
  border-radius: 50%;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255,193,7,0.5);
  color: #fff;
}
.tab-center .tab-text { margin-top: 38px; }

/* ========== 首页 - Banner ========== */
.banner-swiper {
  margin: 12px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, #2c3e50, #4a5d75);
}
.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}
.banner-track > * {
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
}
.banner-default {
  background: linear-gradient(135deg, #1d2b3a 0%, #3a516b 100%);
  flex-direction: column;
}
.banner-default .bd-title {
  font-size: 24px;
  margin-bottom: 16px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.banner-default .bd-flow {
  display: flex;
  font-size: 12px;
  font-weight: 500;
}
.banner-default .bd-flow span {
  background: rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 14px;
  margin: 0 4px;
}
.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  text-align: center;
}
.banner-dots i {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  margin: 0 3px;
  font-style: normal;
}
.banner-dots i.active { background: #fff; width: 14px; border-radius: 4px; }

/* ========== 首页 - 快捷入口 ========== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  margin: 0 12px;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
}
.quick-item { cursor: pointer; }
.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}
.icon-q1 { background: linear-gradient(135deg, #FFD54F, #FF9800); }
.icon-q2 { background: linear-gradient(135deg, #FFD54F, #FFA726); }
.icon-q3 { background: linear-gradient(135deg, #FFCA28, #FF8F00); }
.icon-q4 { background: linear-gradient(135deg, #FFD740, #FFAB00); }
.quick-item > div:last-child { font-size: 12px; color: #555; }

/* ========== 分类Tabs ========== */
.cate-tabs {
  display: flex;
  overflow-x: auto;
  background: #fff;
  margin: 12px;
  border-radius: 12px;
  padding: 8px 4px;
  scrollbar-width: none;
}
.cate-tabs::-webkit-scrollbar { display: none; }
.cate-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 14px;
  color: #666;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}
.cate-tab.active { color: #222; font-weight: 700; }
.cate-tab.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px;
  background: #FFC107;
  border-radius: 2px;
}

/* ========== 瀑布流 ========== */
.waterfall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 12px;
}
.wf-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.wf-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #eee;
}
.wf-stamp {
  position: absolute;
  top: 6px; right: 6px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #c00;
  border: 2px solid #c00;
  font-family: "STKaiti","KaiTi",serif;
  transform: rotate(-15deg);
}
.wf-stamp.fake {
  color: #555;
  border-color: #555;
}
.wf-stamp.pending {
  display: none;
}
.wf-info { padding: 8px 10px; }
.wf-user {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #444;
  margin-bottom: 4px;
}
.wf-user img, .wf-user .wf-avatar-default {
  width: 22px; height: 22px;
  border-radius: 50%;
  margin-right: 6px;
  background: #ddd;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
}
.wf-desc {
  font-size: 12px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 32px;
}

/* ========== 鉴宝（提交鉴定） ========== */
.form-section {
  background: #fff;
  margin: 12px;
  border-radius: 12px;
  padding: 14px 16px;
}
.form-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}
.form-input {
  width: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f7f7;
  font-size: 14px;
}
.form-textarea { resize: none; height: 90px; }

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.upload-item {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .upload-del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.upload-btn {
  aspect-ratio: 1/1;
  border: 1.5px dashed #d0d0d0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaa;
  cursor: pointer;
  background: #fafafa;
}
.upload-btn span:first-child { font-size: 28px; line-height: 1; margin-bottom: 4px; }
.upload-tip { font-size: 11px; }

.expert-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.expert-pick-item {
  display: flex; align-items: center;
  border: 1.5px solid #eee;
  border-radius: 24px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
}
.expert-pick-item img, .expert-pick-item .epi-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #ccc;
  margin-right: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: #fff;
}
.expert-pick-item .epi-name { font-size: 13px; color: #333; }
.expert-pick-item .epi-price { font-size: 12px; color: #FF6B35; margin-left: 6px; }
.expert-pick-item.active {
  border-color: #FFC107;
  background: #FFF8E1;
}

.submit-bar {
  margin: 16px 12px;
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.submit-info { font-size: 14px; }
.submit-info b { color: #FF6B35; font-size: 18px; }
.btn-primary {
  background: #FFC107;
  color: #1a1a1a;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 22px;
  cursor: pointer;
}
.btn-primary:active { opacity: 0.8; }

/* ========== 专家页 ========== */
.expert-list { padding: 8px 12px; }
.expert-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: start;
}
.expert-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #ddd;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}
.expert-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.expert-name { font-weight: 700; font-size: 16px; }
.expert-tag {
  font-size: 11px;
  color: #2196F3;
  background: #E3F2FD;
  padding: 2px 6px;
  border-radius: 4px;
}
.expert-desc {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.expert-stats {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}
.expert-action { text-align: right; }
.btn-pick {
  background: #29B6F6;
  color: #fff;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
}
.expert-price {
  margin-top: 6px;
  font-size: 14px;
  color: #FF6B35;
  font-weight: 700;
}

/* ========== 我的页 ========== */
.mine-header {
  background: #FFC107;
  padding: 0 20px 20px;
  display: flex;
  align-items: center;
}
.mine-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #aaa;
  margin-right: 14px;
}
.mine-name { font-size: 18px; font-weight: 700; color: #1a1a1a; }
.mine-uid { font-size: 12px; color: #5a4a00; margin-top: 4px; }

.card {
  background: #fff;
  margin: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.order-status-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 18px 0;
}
.order-status-item {
  text-align: center;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  position: relative;
}
.os-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #fff;
  font-weight: 700;
}
.icon-progress { background: #FFC107; }
.icon-done { background: #4CAF50; }
.icon-pay { background: #2196F3; }
.icon-cancel { background: #E91E63; }
.os-badge {
  position: absolute;
  top: -2px; right: 14px;
  background: #f44336;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
}

.wallet-card {
  display: flex;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
}
.wallet-title { font-size: 14px; color: #555; }
.wallet-balance { font-size: 26px; font-weight: 700; margin: 6px 0; color: #222; }
.wallet-sub { font-size: 12px; color: #999; }
.wallet-right { text-align: center; }
.wallet-icon { font-size: 32px; }
.wallet-recharge {
  margin-top: 6px;
  color: #FF6B35;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.menu-card .menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f4f4f4;
  cursor: pointer;
}
.menu-card .menu-item:last-child { border-bottom: none; }
.menu-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  margin-right: 10px;
  flex-shrink: 0;
}
.mi-blue { background: #29B6F6; }
.mi-red { background: #EC407A; }
.mi-green { background: #66BB6A; }
.mi-pink { background: #EC407A; }
.mi-orange { background: #FF7043; }
.menu-text { flex: 1; font-size: 14px; color: #333; }
.menu-extra { font-size: 12px; color: #999; margin-right: 8px; }
.menu-arrow { color: #ccc; font-size: 18px; }

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  max-width: 80%;
  white-space: normal;
  text-align: center;
}
.toast.show { opacity: 1; }

/* ========== Modal ========== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal.show { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-body {
  position: relative;
  background: #fff;
  width: 80%;
  max-width: 360px;
  border-radius: 14px;
  overflow: hidden;
}
.modal-title { padding: 16px; font-weight: 700; font-size: 16px; text-align: center; border-bottom: 1px solid #f4f4f4; }
.modal-content { padding: 20px 16px; font-size: 14px; color: #555; line-height: 1.6; max-height: 60vh; overflow-y: auto; }
.modal-content textarea { width: 100%; min-height: 80px; padding: 8px; border: 1px solid #eee; border-radius: 6px; }
.modal-footer { display: flex; border-top: 1px solid #f4f4f4; }
.modal-footer button {
  flex: 1;
  padding: 14px;
  font-size: 15px;
  cursor: pointer;
}
.modal-btn-cancel { color: #777; border-right: 1px solid #f4f4f4; }
.modal-btn-confirm { color: #FF6B35; font-weight: 700; }

/* 大图查看 */
.img-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 998;
}
.img-viewer.show { display: flex; }
.img-viewer img { max-width: 100%; max-height: 100%; }

/* 全屏面板 */
.full-panel {
  position: absolute;
  inset: 0;
  background: #f5f5f7;
  z-index: 200;
  display: none;
  flex-direction: column;
}
.full-panel.show { display: flex; }
.panel-header {
  flex-shrink: 0;
  height: 50px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #eee;
  position: relative;
}
.panel-back { font-size: 26px; color: #333; cursor: pointer; padding: 0 6px; line-height: 1; }
.panel-title {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  font-size: 16px; font-weight: 600;
}
.panel-body { flex: 1; overflow-y: auto; padding-bottom: 30px; }

/* 订单卡片 */
.order-card {
  background: #fff;
  margin: 10px 12px;
  border-radius: 10px;
  padding: 12px;
}
.order-card-head { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 8px; }
.order-card-status { padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.status-pending { background: #FFF3E0; color: #FF9800; }
.status-processing { background: #FFF3E0; color: #FF9800; }
.status-completed { background: #E8F5E9; color: #4CAF50; }
.status-unpaid { background: #E3F2FD; color: #2196F3; }
.status-cancelled { background: #FFEBEE; color: #F44336; }
.order-card-body { display: flex; gap: 10px; }
.order-thumb {
  width: 70px; height: 70px;
  background: #eee;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.order-meta { flex: 1; font-size: 13px; color: #444; }
.order-meta .om-title { font-weight: 600; margin-bottom: 4px; }
.order-meta .om-desc { color: #888; font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-meta .om-price { color: #FF6B35; font-weight: 700; margin-top: 4px; }
.order-result {
  margin-top: 10px;
  padding: 10px;
  background: #FFF8E1;
  border-radius: 8px;
  font-size: 13px;
  color: #5a4a00;
  line-height: 1.5;
}
.order-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.btn-mini {
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid #ddd;
  font-size: 12px;
  background: #fff;
  cursor: pointer;
}
.btn-mini.primary { background: #FFC107; border-color: #FFC107; }
.btn-mini.danger { color: #f44336; border-color: #f4c0c0; }

/* 藏品详情 */
.detail-img-grid { padding: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.detail-img-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; cursor: pointer; }
.detail-section {
  background: #fff;
  margin: 10px 12px;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}
.detail-section .ds-title { font-weight: 600; margin-bottom: 8px; color: #222; }

.loading-tip, .empty-tip { text-align: center; padding: 30px 0; color: #999; font-size: 13px; }

@media (max-width: 359px) {
  .quick-icon { width: 42px; height: 42px; font-size: 20px; }
  .os-icon { width: 38px; height: 38px; font-size: 18px; }
}
