:root {
  --bg: #0c0c0c;
  --paper: #171717;
  --ink: #f4f1ea;
  --muted: #a39e94;
  --line: #2c2c2c;
  --orange: #e0b56a;
  --yellow: #c9a36a;
  --soft: #2a241c;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #070707;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.page {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: 64px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
  position: relative;
}
.backdrop {
  display: none;
}
.backdrop.show {
  display: block;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(480px, 100%);
  transform: translateX(-50%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}
.page > :not(.backdrop):not(.tabbar):not(.dock):not(.composer) { position: relative; z-index: 1; }
img.shop-logo { object-fit: cover; padding: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.letter { display: grid; place-items: center; background: var(--orange); color: #1a1208; font-size: 12px; }
.bubble-row { display: flex; align-items: flex-end; gap: 8px; }
.bubble-row.mine { justify-content: flex-end; }
.auth-mask { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 20; display: grid; place-items: center; padding: 16px; }
.auth-card { width: min(360px, 100%); background: #171717; color: var(--ink); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.auth-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-card input, .auth-file { background: #222; border: 1px solid #333; color: inherit; border-radius: 8px; padding: 10px; }
.auth-avatar { width: 64px; height: 64px; border-radius: 50%; background: #222; display: grid; place-items: center; overflow: hidden; }
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-file { display: inline-block; width: fit-content; cursor: pointer; }
.auth-file input { display: none; }
.auth-actions { display: flex; gap: 8px; justify-content: flex-end; }
.auth-card .btn.ghost { background: transparent; color: var(--muted); border: 1px solid #444; }
.zone-title {
  margin: 16px 12px 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f6f1e7;
}
.searchbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--paper); position: sticky; top: 0; z-index: 2; }
.searchbar .search { margin: 0; background: #222; color: var(--ink); }
.cart-link { color: var(--muted); font-size: 13px; white-space: nowrap; background: transparent; border: 0; padding: 0; }
.shop-card { display: flex; flex-direction: column; gap: 10px; align-items: stretch; margin: 8px; padding: 12px; background: var(--paper); border-radius: 8px; }
.shop-top { display: flex; gap: 10px; align-items: center; }
.shop-logo { width: 44px; height: 44px; border-radius: 8px; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.shop-name { font-weight: 700; }
.shop-score { color: var(--orange); font-size: 13px; margin-top: 2px; }
.shop-score b { font-size: 16px; }
.shop-metrics { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
.shop-metrics div { background: #fafafa; border-radius: 6px; padding: 8px; font-size: 12px; color: #666; }
.shop-metrics b { display: block; color: #111; font-size: 16px; }
.shop-metrics .ok-line { color: #0a9b55; }
.follow { border: 1px solid var(--orange); color: var(--orange); background: var(--paper); border-radius: 14px; padding: 4px 10px; font-size: 13px; }
.follow.on { background: var(--soft); }
.nav-tabs { display: flex; flex: 1; }
.nav-tabs button { flex: 1; border: 0; background: transparent; padding: 8px 0; color: #666; }
.nav-tabs button.on { color: #111; font-weight: 700; }
.review { padding: 12px 0; border-top: 1px solid #f5f5f5; }
.review-photos { display: flex; gap: 6px; margin-top: 8px; }
.review-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; }
.stars, .star-pick button.on { color: var(--orange); }
.star-pick button { border: 0; background: transparent; font-size: 22px; color: #ddd; padding: 0 2px; }
.review-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.review-form input, .review-form textarea, .review-form select { border: 1px solid #eee; border-radius: 4px; padding: 8px; background: #fafafa; }
.dock-icon { border: 0; background: transparent; }
.section-title { padding: 4px 12px; font-weight: 700; }
.seg { display: flex; background: var(--paper); }
.seg-btn, .sort { flex: 1; border: 0; background: var(--paper); padding: 12px 0; color: #666; }
.seg-btn.on { color: #111; font-weight: 700; box-shadow: inset 0 -2px 0 #111; }
.sorts { display: flex; background: var(--paper); border-top: 1px solid #f5f5f5; }
.sort.on { color: var(--orange); font-weight: 700; }
.goods-row { display: flex; gap: 10px; padding: 12px; background: var(--paper); border-top: 1px solid #f6f6f6; }
.goods-cover, .goods-row .ph { width: 92px; height: 92px; flex: none; }
.goods-row .title { height: auto; min-height: 0; margin: 0; }
.row-price { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.cate-layout { display: flex; background: var(--paper); min-height: 360px; }
.cate-side { width: 92px; background: #f7f7f7; }
.cate { display: block; width: 100%; border: 0; background: transparent; padding: 14px 8px; text-align: left; color: #666; }
.cate.on { background: var(--paper); color: var(--orange); font-weight: 700; }
.cate-main { flex: 1; }
.chat-list { min-height: calc(100vh - 150px); padding: 12px 12px 72px; }
.bubble { max-width: 76%; margin: 8px 0; padding: 10px 12px; border-radius: 12px; line-height: 1.5; white-space: pre-wrap; }
.bubble.shop { background: var(--paper); }
.bubble.mine { margin-left: auto; background: #ffefe8; }
.chat-empty { color: #999; text-align: center; padding: 48px 16px; }
.composer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 50px; width: min(480px, 100%); display: flex; gap: 8px; padding: 8px; background: var(--paper); border-top: 1px solid #eee; }
.chat-input { flex: 1; border: 0; background: #f5f5f5; border-radius: 16px; padding: 10px 12px; }
.send { border: 0; background: var(--orange); color: #fff; border-radius: 16px; padding: 0 14px; }
.topbar { background: var(--orange); color: #fff; padding: 12px 12px 10px; }
.brand { font-size: 18px; font-weight: 700; }
.sub { display: none; }
.search {
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: #333;
  padding: 8px 14px;
  outline: none;
}
.chips { display: flex; gap: 8px; overflow: auto; padding: 10px 10px 0; background: var(--paper); }
.chip {
  border: 0;
  background: #f5f5f5;
  color: #333;
  border-radius: 14px;
  padding: 6px 12px;
  white-space: nowrap;
}
.chip.on { background: var(--soft); color: var(--orange); font-weight: 700; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
.card { display: block; background: var(--paper); border-radius: 8px; overflow: hidden; }
.cover, .ph {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
  background: #f7f7f7;
  object-fit: cover;
}
.ph { display: grid; place-items: center; color: #ccc; }
.card .title { margin: 8px 8px 0; font-size: 13px; line-height: 1.4; height: 2.8em; overflow: hidden; }
.card .price { margin: 4px 8px 8px; }
.price { color: var(--orange); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; }
.price i { font-style: normal; font-size: 0.72em; }
.price.lg { font-size: 28px; }
.old { margin-right: 6px; color: #8a8580; text-decoration: line-through; font-weight: 400; font-size: 13px; }
.meta { color: var(--muted); font-size: 12px; }
.nav {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 8px;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 2;
}
.back { color: #333; font-size: 15px; padding: 8px; }
.nav-title { flex: 1; text-align: center; font-size: 16px; margin-right: 48px; }
.gallery { background: #111; }
.gallery img, .gallery .ph, .gallery video { width: 100%; aspect-ratio: 1; background: #f7f7f7; object-fit: contain; }
.thumb.video-thumb { display: grid; place-items: center; background: #111; color: #fff; font-size: 12px; }
.thumbs { display: flex; gap: 8px; padding: 8px 12px; background: var(--paper); }
.thumb { width: 52px; height: 52px; object-fit: cover; border: 1px solid transparent; }
.thumb.on { border-color: var(--orange); }
.sheet { background: var(--paper); margin-top: 8px; padding: 12px; }
.price-row { display: flex; align-items: baseline; }
.product-title { font-size: 16px; font-weight: 600; line-height: 1.45; margin: 8px 0 0; }
.facts { display: flex; gap: 14px; margin-top: 10px; color: #888; font-size: 12px; }
.sku-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sku {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #eee;
  background: #f7f7f7;
  border-radius: 4px;
  padding: 7px 12px;
}
.sku img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }
.sku.on { border-color: var(--orange); background: var(--soft); color: var(--orange); }
.stepper { display: flex; align-items: center; gap: 0; margin-top: 8px; }
.stepper button {
  width: 28px; height: 28px; border: 1px solid #eee; background: #f7f7f7;
}
.stepper strong { min-width: 36px; text-align: center; font-weight: 500; }
.detail { white-space: pre-wrap; line-height: 1.7; color: #333; font-size: 14px; margin-top: 8px; }
.detail-images { margin: 8px -12px 0; }
.detail-image { width: 100%; display: block; }
.section-label { font-size: 14px; font-weight: 600; }
.detail-layout { display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .page, .backdrop.show { width: min(1100px, calc(100% - 48px)); }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px; }
  .dock, .tabbar { width: min(1100px, calc(100% - 48px)); }
  .detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin: 12px 12px 0;
  }
  .detail-main, .detail-side { display: flex; flex-direction: column; gap: 8px; }
  .detail-layout .sheet,
  .detail-layout .thumbs { margin-top: 0; }
  .detail-below { margin: 12px; }
}
.dock, .tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  display: flex;
  align-items: center;
  background: var(--paper);
  border-top: 1px solid #eee;
  z-index: 5;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar { justify-content: space-around; height: 50px; }
.tab { color: #666; font-size: 12px; text-align: center; position: relative; }
.tab.on { color: var(--orange); font-weight: 700; }
.dock { height: 54px; padding: 6px 8px; gap: 8px; }
.dock.above-tab { bottom: calc(50px + env(safe-area-inset-bottom)); z-index: 6; }
.page:has(.tabbar):has(.dock) { padding-bottom: calc(116px + env(safe-area-inset-bottom)); }
.dock .btn.buy { margin-left: auto; min-width: 120px; height: 40px; border-radius: 20px; }
.dock-icon { width: 42px; font-size: 11px; color: #666; text-align: center; position: relative; padding: 0; }
.dock-icon.on { color: var(--orange); font-weight: 700; }
.badge {
  position: absolute;
  top: -6px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
}
.dock-actions { flex: 1; display: flex; height: 40px; }
.dock-actions .btn { flex: 1; border: 0; color: #fff; font-size: 15px; font-weight: 600; }
.dock-actions .btn.ghost { background: var(--yellow); border-radius: 20px 0 0 20px; }
.dock-actions .btn.buy { background: var(--orange); border-radius: 0 20px 20px 0; }
.btn {
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: var(--orange);
  color: #fff;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
  text-align: center;
}
.btn.buy { background: var(--orange); color: #fff; }
.btn:disabled { opacity: 0.45; }
.line { display: flex; gap: 10px; padding: 12px; background: var(--paper); margin-top: 8px; }
.line img, .line .ph { width: 84px; height: 84px; aspect-ratio: auto; flex: none; }
.grow { flex: 1; min-width: 0; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel { padding: 0 0 12px; }
.hero { padding: 14px 12px 0; background: var(--paper); }
.hero .brand { color: #111; font-size: 18px; }
.addr { display: block; margin: 8px 12px 0; padding: 14px 12px; background: var(--paper); color: inherit; text-decoration: none; }
.addr strong, .addr p, .addr span { display: block; }
.addr p, .addr span { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.tag { display: inline-block; margin-left: 8px; padding: 0 6px; border: 1px solid #e0b56a; color: #e0b56a; border-radius: 8px; font-size: 12px; font-weight: 400; }
.field { display: block; margin: 8px 12px 0; font-size: 14px; background: var(--paper); padding: 10px 12px; }
.field span { display: block; margin-bottom: 6px; color: #666; }
.field input, .field textarea, .field select, .search.plain {
  width: 100%;
  border: 1px solid #eee;
  background: #fafafa;
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
}
.pay-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { border: 1px solid #eee; border-radius: 4px; padding: 12px 8px; background: var(--paper); text-align: center; }
.choice.on { border-color: var(--orange); color: var(--orange); background: var(--soft); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 12px; color: #666; font-size: 13px; }
.deal { margin: 8px; display: flex; flex-direction: column; gap: 8px; }
.deal h1 { margin: 8px 4px; font-size: 22px; }
.deal-banner, .deal-shop, .deal-items, .deal-sheet { background: var(--paper); border-radius: 8px; padding: 12px; }
.deal-banner p, .deal-account { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.deal-item { display: flex; gap: 10px; padding: 8px 0; }
.deal-cover, .deal-item .ph { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex: none; background: #222; }
.deal-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.deal-row span { color: var(--muted); }
.deal-row strong { font-weight: 500; text-align: right; }
.deal-row b { font-weight: 700; }
.text-btn { border: 0; background: transparent; color: var(--orange); margin-left: 8px; }
.deal-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 4px 0 24px; }
.deal-actions a, .deal-actions button { border: 1px solid #444; background: transparent; color: var(--ink); border-radius: 16px; padding: 8px 14px; }
.deal-actions .solid { background: var(--orange); color: #1a1208; border-color: transparent; }
.order-hub { display: grid; grid-template-columns: repeat(5, 1fr); margin: 8px; background: var(--paper); border-radius: 8px; padding: 12px 4px; }
.order-hub a { color: var(--muted); font-size: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.order-hub a.on { color: var(--orange); }
.hub-icon { width: 28px; height: 28px; border: 1.5px solid currentColor; border-radius: 8px; display: grid; place-items: center; position: relative; }
.hub-badge { position: absolute; top: -7px; right: -8px; background: #c4533a; color: #fff; border-radius: 8px; font-size: 10px; font-style: normal; line-height: 16px; min-width: 16px; padding: 0 4px; }
.me-strip { display: flex; gap: 10px; align-items: center; margin: 8px; padding: 12px; background: var(--paper); border-radius: 8px; }
.order-card { align-items: center; text-decoration: none; color: inherit; }
.notice { background: #2a2418; color: #f0e2c4; }
.ok { background: #163024; color: #d7f5e4; }
.qr { width: 220px; height: 220px; margin: 16px auto; background: var(--paper); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); line-height: 1.6; }
.grid .empty { padding: 28px 12px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  z-index: 9;
  border: 0;
  cursor: pointer;
}
.sum { font-size: 18px; color: var(--orange); font-weight: 700; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.check-item + .check-item { border-top: 1px solid #2a2a2a; }
.check-item img, .check-item .ph { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: #222; }
.check-item .price { margin-left: auto; }
.remove { border: 0; background: #f5f5f5; width: 26px; height: 26px; }
.sheet .btn.buy, .panel .btn.buy, form .btn.buy, a.btn.buy {
  width: calc(100% - 24px);
  margin: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 900px) {
  .dock, .tabbar, .composer { width: min(1100px, calc(100% - 48px)); }
}
.search, .chat-input, .field input, .field textarea, .field select, .review-form input, .review-form textarea, .review-form select {
  background: #222;
  color: var(--ink);
  border-color: #333;
}
.cart-link, .nav-tabs button, .seg-btn, .sort, .cate, .tab, .dock-icon, .field span, .check, .back { color: var(--muted); }
.nav-tabs button.on, .seg-btn.on, .hero .brand, .shop-metrics b, .detail { color: var(--ink); }
.seg-btn.on { box-shadow: inset 0 -2px 0 var(--orange); }
.shop-metrics div, .cate-side, .cover, .ph, .gallery img, .gallery .ph, .gallery video, .sku, .stepper button, .remove {
  background: #222;
  color: var(--muted);
}
.shop-metrics div { background: rgba(255, 255, 255, 0.06); }
.sku { border-color: #333; }
.sku-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sku { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 6px 8px; border-radius: 8px; text-align: left; }
.sku img, .sku-ph { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: #111; display: grid; place-items: center; font-size: 12px; }
.sku-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.sku-name { color: var(--ink); font-size: 13px; line-height: 1.3; }
.sku-price { color: var(--orange); font-size: 13px; }
.sku.on { border-color: var(--orange); background: var(--soft); }
.sku.off { opacity: 0.45; }
.cate.on { background: var(--paper); }
.bubble.mine { background: #3a3124; }
.btn, .send, .dock-actions .btn, .btn.buy, .shop-logo { color: #1a1208; }
.goods-row, .review, .sorts, .composer, .dock, .tabbar { border-color: var(--line); }
