/* 滦享二手 · 基础样式与设计令牌 */

:root {
  --ink: #14110F;
  --ink-2: #4A443E;
  --ink-3: #8B837A;
  --paper: #FAF9F6;
  --white: #FFFFFF;
  --line: #E8E4DD;
  --brand: #C75A2E;
  --brand-soft: #FCEBE2;
  --accent: #E8532A;
  --accent-soft: #FCE4DB;
  --ok: #3F7D5A;
  --ok-soft: #E7F2EA;
  --warn: #A9761C;
  --warn-soft: #FAF0DA;
  --radius: 10px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 17, 15, .04), 0 10px 28px -16px rgba(20, 17, 15, .22);
}

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

html, body { height: 100%; }

body {
  background: #EDEAE4;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
}

/* 下拉刷新 */
.ptr {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  display: flex; align-items: flex-end; justify-content: center;
  transform: translateY(-56px); opacity: 0; pointer-events: none;
  z-index: 60; transition: transform .2s ease, opacity .2s ease;
}
.ptr-inner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 132px; height: 44px; padding: 0 18px;
  background: #fff; color: #7A6A5E; font-size: 13px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .45);
}
.ptr-spin {
  display: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(199, 90, 46, .22); border-top-color: var(--brand, #C75A2E);
}
.ptr.loading .ptr-spin { display: block; animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

#app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  padding-bottom: 72px;
  box-shadow: 0 0 40px rgba(20, 17, 15, .06);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; }
/* 触摸/鼠标点击不留焦点方框，键盘导航仍保留 */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }
img { display: block; }

/* ---------- 顶部 ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 66px; height: 38px; border-radius: 8px; background: var(--brand-soft);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { display: block; width: 46px; height: 26px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .12em; margin-right: -.12em; line-height: 1.15; color: var(--brand); padding-bottom: 1px; border-bottom: 1px solid rgba(199, 90, 46, .22); }
.brand-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.loc {
  display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--brand);
  font-weight: 600; padding: 5px 10px; background: rgba(199, 90, 46, .08); border-radius: 999px;
}
.loc svg { display: block; flex: 0 0 auto; }
.caret { width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4px solid currentColor; opacity: .7; }

/* ---------- 首页 ---------- */
.search {
  margin: 12px 20px 0; height: 42px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); display: flex; align-items: center; gap: 9px; padding: 0 14px;
}
.search input { flex: 1; border: none; outline: none; background: none; font-size: 13px; }
.search input::placeholder { color: var(--ink-3); }
.search .clear { color: var(--ink-3); font-size: 12px; padding: 4px; }

/* 分类：浅色圆角图标块 + 文字 */
.cats { display: flex; gap: 8px; margin: 14px 20px 0; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat-item {
  flex: 0 0 auto; width: 64px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; padding: 0;
  outline: none; border: none; background: none;
}
.cat-item:focus,
.cat-item:focus-visible { outline: none; }
.cat-box {
  width: 46px; height: 46px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; color: var(--ink-2);
  box-sizing: border-box; border: 1.5px solid transparent;
  transition: transform .15s, border-color .15s, background .15s, color .15s;
}
.cat-item:active .cat-box { transform: scale(.95); }
.cat-label { font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.cat-box.all { background: #F1EDE7; }
.cat-box.home { background: #FBEAE0; }
.cat-box.appliance { background: #EAF2F5; }
.cat-box.digital { background: #E7EEF7; }
.cat-box.baby { background: #FBE9EC; }
.cat-box.clothes { background: #F7EDF3; }
.cat-box.book { background: #E9F1E8; }
.cat-box.sport { background: #F4F0E4; }
.cat-box.other { background: #EFEEEB; }
.cat-item.on .cat-box {
  background: var(--brand-soft); color: var(--brand);
  border: 1.5px solid var(--brand);
}
.cat-item.on .cat-label { color: var(--brand); font-weight: 600; }

.sortbar { display: flex; gap: 14px; margin: 12px 20px 0; font-size: 12px; color: var(--ink-3); }
.sortbar .on { color: var(--brand); font-weight: 600; }

.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 14px 20px 20px;
}
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.card .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #EFEBE4; }
.card .thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 11px; }
.card .body { padding: 10px 11px 12px; }
.card .t { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.card .p { margin-top: 7px; color: var(--accent); font-size: 17px; font-weight: 700; }
.card .p small { font-size: 11px; font-weight: 600; margin-right: 1px; }
.card .meta { margin-top: 5px; display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }

/* 代发：列表价格后的角标 / 详情说明 */
.proxy-tag {
  display: inline-block; margin-left: 12px; vertical-align: 3px;
  background: rgba(199, 90, 46, .95); color: #fff;
  font-size: 10px; font-weight: 500; line-height: 1; padding: 3px 6px; border-radius: 5px; letter-spacing: 1px;
}
.tag.tag-proxy { background: rgba(199, 90, 46, .12); color: var(--brand); border-color: rgba(199, 90, 46, .35); }
.proxy-note {
  margin-bottom: 14px; padding: 12px 14px;
  background: rgba(199, 90, 46, .08); border: 1px solid rgba(199, 90, 46, .22);
  border-radius: var(--radius); font-size: 12.5px; line-height: 1.7; color: #7A5A48;
}
.proxy-note b { color: var(--brand); margin-right: 6px; }
.proxy-note-h { font-weight: 700; color: var(--brand); margin-bottom: 4px; }

/* ---------- 通用 ---------- */
.page-head {
  position: sticky; top: 0; z-index: 20; background: rgba(250, 249, 246, .94);
  backdrop-filter: blur(8px); display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.page-head .title { font-size: 16px; font-weight: 700; }
.page-head .back {
  flex: 0 0 auto; width: 36px; height: 36px; margin-left: -9px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--ink); transition: background .15s;
}
.page-head .back:hover { background: rgba(20, 17, 15, .06); }
.page-head .back:active { background: rgba(20, 17, 15, .11); }
.page-head .right { margin-left: auto; font-size: 13px; color: var(--brand); font-weight: 600; }

.btn {
  width: 100%; height: 46px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: #B04A20; }
.btn-ghost { background: var(--white); border: 1px solid var(--line); color: var(--ink-2); }
.btn:disabled { opacity: .55; }

.empty { padding: 60px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty .big { font-size: 15px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }

.field { margin-top: 16px; }
.field .label { font-size: 12px; color: var(--ink-3); margin-bottom: 7px; }
.input, .textarea {
  width: 100%; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 13px; font-size: 14px; outline: none;
}
.input:focus, .textarea:focus { border-color: var(--brand); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.price-input { display: flex; align-items: center; gap: 6px; }
.price-input input { flex: 1; border: none; outline: none; background: none; font-size: 16px; font-weight: 600; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.mine-tabs { padding: 12px 14px 2px; }
.seg .s {
  flex: 1; text-align: center; padding: 9px 0; font-size: 13px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--line); color: var(--ink-2);
}
.seg .s.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.seg.mine-tabs .s { flex: 0 0 auto; padding: 8px 13px; }

.tag { display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); }
.tag-gray { background: #F1EEEA; color: var(--ink-3); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.list-tip { margin: 4px 20px 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.mine-item .m .tag { margin-left: 6px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.gray { background: #EFEEEB; color: var(--ink-3); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  display: flex; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 50;
}
.nav-brand { display: none; }
.nav-inner { display: flex; flex: 1; align-items: center; }
.nav-links { display: flex; flex: 1; }
.tabbar .tab { flex: 1; text-align: center; font-size: 11px; color: var(--ink-3); position: relative; }
.tabbar .tab .ico { font-size: 19px; display: block; line-height: 1.3; }
.tabbar .tab.on { color: var(--brand); font-weight: 600; }
.tabbar .tab .badge {
  position: absolute; top: -2px; right: 50%; margin-right: -22px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 10px; line-height: 16px; font-weight: 700;
}

/* ---------- 详情 ---------- */
.gallery { position: relative; background: #EFEBE4; }
.gallery .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .slides::-webkit-scrollbar { display: none; }
.gallery .slides img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: start; }
.gallery .empty-shot { width: 100%; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.gallery .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.gallery .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.gallery .dots i.on { background: #fff; width: 14px; border-radius: 3px; }

/* 缩略图条：仅在 PC 展示，手机上用圆点 + 横滑 */
.gallery .thumbs { display: none; }

.detail-body { padding: 16px 20px 8px; }
.detail-below { padding: 0 20px 8px; }
.detail-reco { padding: 0 20px 100px; }
.detail-left, .detail-right { display: contents; }
#app.detail-page { display: flex; flex-direction: column; }
#app.detail-page .page-head { order: 0; }
#app.detail-page .gallery { order: 1; }
#app.detail-page .detail-body { order: 2; }
#app.detail-page .detail-below { order: 3; }
#app.detail-page .detail-reco { order: 4; }

/* 卖家的其他闲置 */
.other-block { margin-top: 18px; }
.oi-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.oi {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.oi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(60, 40, 28, .08); }
.oi-img { display: block; aspect-ratio: 4 / 3; background: var(--line-soft); }
.oi-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oi-t {
  display: block; padding: 8px 10px 2px; font-size: 13px; line-height: 1.45; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oi-p { display: block; padding: 0 10px 10px; font-size: 15px; font-weight: 700; color: var(--brand); }
.detail-price { color: var(--accent); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.detail-price small { font-size: 14px; margin-right: 2px; }
.detail-origin { font-size: 12px; color: var(--ink-3); text-decoration: line-through; margin-left: 6px; }
.detail-title { margin-top: 8px; font-size: 17px; font-weight: 600; line-height: 1.45; }
.detail-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.detail-meta { margin-top: 10px; font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; }
.block { margin-top: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.block .h { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; letter-spacing: .2px; }
.block .desc { font-size: 13px; color: var(--ink-2); line-height: 1.7; white-space: pre-wrap; }
/* 描述正文单独垫一层浅底，和下面的图片拉开层次 */
.block .desc-box {
  background: #F6F3EE; border-radius: 8px; padding: 10px 12px;
}
/* 描述下方的图片：整幅高清图上下排列，点开可缩放 */
.desc-imgs { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.desc-imgs button { padding: 0; display: block; border-radius: 8px; overflow: hidden; background: #EFEBE4; }
.desc-imgs img { width: 100%; height: auto; display: block; }
.img-viewer {
  position: fixed; inset: 0; z-index: 200; padding: 24px;
  background: rgba(12, 10, 9, .92); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.img-viewer img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px;
  transform-origin: center center; transition: transform .12s ease; cursor: zoom-in;
  touch-action: none; user-select: none; -webkit-user-drag: none;
}
.img-viewer img.zoomed { cursor: grab; transition: none; }
.img-viewer .viewer-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.img-viewer .viewer-zoom {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 5px 8px;
  border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff;
}
.img-viewer .viewer-zoom button {
  width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.img-viewer .viewer-zoom button:active { background: rgba(255, 255, 255, .18); }
.img-viewer .viewer-scale { min-width: 48px; text-align: center; font-size: 12px; opacity: .85; }
.seller { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seller .n { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seller .m { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.cert-inline { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 400; color: var(--brand); }
.cert-inline svg { width: 12px; height: 12px; }
.cert-inline .dot { color: var(--ink-3); margin: 0 2px; }
.seller-stats { display: flex; gap: 14px; align-items: baseline; }
.seller-stats div { display: flex; align-items: baseline; gap: 3px; }
.seller-stats span { font-size: 11.5px; color: var(--ink-3); }
.seller-stats b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.seller-head { display: flex; align-items: center; justify-content: space-between; }
.contact-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13px; border-top: 1px dashed var(--line); }
.contact-row:first-child { border-top: none; }
.contact-row .k { color: var(--ink-3); }
.contact-row .v { color: var(--brand); font-weight: 600; }
.contact-row .copy-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.contact-row .copy-tag { font-size: 11px; font-weight: 500; color: var(--brand); background: var(--brand-soft); padding: 3px 8px; border-radius: 5px; line-height: 1.4; white-space: nowrap; }

.actionbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
}
.actionbar .ico-btn { font-size: 11px; color: var(--ink-2); width: 48px; text-align: center; }
.actionbar .ico-btn .ico { display: block; font-size: 19px; line-height: 1.25; }
.actionbar .ico-btn.on { color: var(--brand); }
.actionbar .btn { flex: 1; height: 44px; }

/* ---------- 发布 ---------- */
.form { padding: 4px 20px 24px; }
.form-actions { margin-top: 24px; }
.col-media .hint { font-size: 12px; margin-top: 10px; }
.nav-user { display: none; }
.quota { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); padding: 12px 0 2px; }
.quota b { color: var(--brand); }
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.up-cell {
  aspect-ratio: 1; border-radius: var(--radius-sm); border: 1px dashed #D8D2C8;
  background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 11px; color: var(--ink-3); position: relative; overflow: hidden;
}
.up-cell img { width: 100%; height: 100%; object-fit: cover; }
.up-cell .del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(20, 17, 15, .55); color: #fff; font-size: 12px; line-height: 20px; text-align: center;
}
.hint { font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.hint-warn { font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 7px 10px; text-align: center; line-height: 1.5; margin-top: 6px; }

/* ---------- 我的 ---------- */
.me-hero { background: linear-gradient(160deg, #FBEADF, #FAF9F6 70%); padding: 22px 20px 18px; }
.me-top { display: flex; align-items: center; gap: 12px; }
.me-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 700;
}
.me-name { font-size: 18px; font-weight: 700; }
.me-sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.me-stats { display: flex; margin-top: 16px; }
.me-stats .stat { flex: 1; text-align: center; }
.me-stats .stat b { font-size: 17px; font-weight: 700; display: block; }
.me-stats .stat span { font-size: 11px; color: var(--ink-3); }
.me-body { padding: 14px 20px 20px; }
.menu-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 11px; padding: 14px; border-top: 1px solid var(--line); }
.menu-row:first-child { border-top: none; }
.menu-row .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.menu-row .mt { font-size: 14px; }
.menu-row .mc { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* ---------- 列表行 ---------- */
.rows { padding: 12px 20px 20px; }
.row {
  display: flex; gap: 11px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px; margin-bottom: 11px; box-shadow: var(--shadow);
}
.row .thumb { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; background: #EFEBE4; flex: 0 0 auto; }
.row .thumb.empty { display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--ink-3); }
.row .info { flex: 1; min-width: 0; }
.row .t { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .p { color: var(--accent); font-weight: 700; font-size: 15px; margin-top: 4px; }
.row .m { font-size: 11px; color: var(--ink-3); margin-top: 5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .ops { display: flex; gap: 8px; margin-top: 8px; }
.mini-btn { font-size: 12px; padding: 4px 11px; border-radius: 7px; border: 1px solid var(--line); color: var(--ink-2); background: var(--white); }
.mini-btn.danger { color: var(--accent); border-color: var(--accent-soft); background: #FFF6F2; }
.reject-note { margin-top: 6px; font-size: 11px; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 5px 8px; }
.notice-bar {
  margin: 0 20px 12px; padding: 9px 12px; font-size: 12px; line-height: 1.5;
  color: var(--ink-2); background: var(--brand-soft); border-radius: 8px;
}
.notif .notif-body { margin-top: 5px; font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.notif .m .tag { margin-left: 6px; padding: 1px 6px; font-size: 10px; }

/* ---------- 登录 ---------- */
.auth { padding: 40px 24px; }
.auth .h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.auth .h2 { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.auth-tabs { display: flex; gap: 18px; margin-top: 26px; border-bottom: 1px solid var(--line); }
.auth-tabs .t { font-size: 14px; color: var(--ink-3); padding: 9px 2px; }
.auth-tabs .t.on { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--brand); }
.auth .btn { margin-top: 22px; }
.sms-row { display: flex; gap: 9px; }
.sms-row .input { flex: 1; }
.sms-row .mini-btn { flex: 0 0 auto; padding: 0 14px; height: 44px; font-size: 12px; }
.agree { display: flex; align-items: flex-start; gap: 7px; margin: 2px 0 14px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.agree input { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand); }
.agree a { color: var(--brand); text-decoration: none; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0; margin: 24px 0 12px; font-size: 13px; }
.legal-links a { color: var(--ink-2); text-decoration: none; padding: 6px; }
.legal-links a + a { position: relative; }
.legal-links a + a::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 12px; margin-top: -6px; background: var(--line); }
.legal-links a:active { color: var(--brand); }
.app-dl { text-align: center; margin: 10px 0 18px; font-size: 12px; }
.app-dl a { color: var(--ink-2); opacity: .7; text-decoration: none; letter-spacing: .5px; }
.form-err { color: var(--accent); font-size: 12px; margin-top: 10px; min-height: 17px; }

/* ---------- 消息 ---------- */
.chat { padding-bottom: 84px; }
/* ---------- 消息列表 ---------- */
.msg-list { padding: 12px 20px 24px; }
.msg-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 12px; margin-bottom: 10px; box-shadow: var(--shadow);
  transition: border-color .15s, transform .12s;
}
.msg-item:active { transform: scale(.995); }
.msg-ava {
  width: 52px; height: 52px; border-radius: 13px; overflow: hidden; flex: 0 0 auto;
  background: #EFEBE4; display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 15px; font-weight: 600;
}
.msg-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-top { display: flex; align-items: baseline; gap: 8px; }
.msg-top b { font-size: 14px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { margin-left: auto; flex: 0 0 auto; font-size: 11px; color: var(--ink-3); }
.msg-item-title {
  margin-top: 3px; font-size: 11px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-last {
  margin-top: 5px; font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-item.unread { border-color: #EBD9CB; }
.msg-item.unread .msg-top b { font-weight: 700; }
.msg-item.unread .msg-last { color: var(--ink); }
.msg-dot {
  flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 聊天页 ---------- */
.chat-head { align-items: center; }
.chat-title { flex: 1; min-width: 0; }
.chat-title .t { font-size: 15px; font-weight: 600; color: var(--ink); }
.chat-title .s {
  display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bubbles { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
/* 底部输入框是 fixed 的，留出空间避免最后一条被挡住 */
#app.chat-page .bubbles { padding-bottom: 88px; }
/* 手机端聊天页、详情页隐藏底部导航：否则会盖住输入框 / 收藏与聊一聊 */
@media (max-width: 899px) {
  #app.chat-page ~ #tabbar,
  #app.detail-page ~ #tabbar { display: none; }
}
.bubble {
  max-width: 76%; padding: 10px 13px; border-radius: 16px; font-size: 14px;
  line-height: 1.5; word-break: break-word; white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(20, 17, 15, .04);
}
.bubble.me { align-self: flex-end; background: linear-gradient(180deg, #D2693B, var(--brand)); color: #fff; border-bottom-right-radius: 6px; }
.bubble.peer { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble .time { display: block; font-size: 10px; opacity: .65; margin-top: 5px; }
.chat-input {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; gap: 9px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); z-index: 40;
  box-shadow: 0 -8px 22px -18px rgba(20, 17, 15, .55);
}
.chat-input textarea {
  flex: 1; min-height: 42px; max-height: 120px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 21px; outline: none;
  background: var(--white); resize: none; overflow-y: auto;
  font-family: inherit; font-size: 14px; line-height: 1.45; color: var(--ink);
  transition: border-color .15s;
}
.chat-input textarea:focus { border-color: var(--brand); }
.chat-input .send { flex: 0 0 auto; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }

/* ---------- 反馈 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: rgba(20, 17, 15, .88); color: #fff; font-size: 13px;
  padding: 9px 16px; border-radius: 999px; z-index: 200; max-width: 80vw; text-align: center;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---------- 添加到桌面提示 ---------- */
.install-tip {
  position: fixed; left: 12px; right: 12px; bottom: 78px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(43, 35, 32, .12);
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.install-tip.show { transform: none; opacity: 1; pointer-events: auto; }
.install-tip .txt { flex: 1; min-width: 0; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.install-tip .txt b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.install-tip .go-btn { flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; }
.install-tip .close { flex: 0 0 auto; width: 24px; height: 24px; font-size: 16px; line-height: 1; color: var(--ink-3); }

.sheet-mask {
  position: fixed; inset: 0; background: rgba(20, 17, 15, .45); z-index: 150;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; background: var(--paper);
  border-radius: 16px 16px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
}
.sheet .sh { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.sheet .sheet-text { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin-bottom: 4px; }
.sheet .textarea { min-height: 80px; }
.sheet .btn { margin-top: 14px; }
.sheet .btn + .btn { margin-top: 9px; }
.qr-view { padding: 24px; text-align: center; }
.qr-view img { max-width: 260px; margin: 0 auto; border-radius: 10px; background: #fff; }

@media (min-width: 520px) {
  body { padding: 24px 0; }
  #app { min-height: calc(100vh - 48px); border-radius: 18px; overflow: hidden; }
}

/* ---------------- PC 端适配（≥900px） ---------------- */
@media (min-width: 900px) {
  body { padding: 0; background: var(--paper); }

  #app {
    max-width: 1180px;
    min-height: auto;
    padding: 60px 0 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  /* 底部导航改为顶部横向导航 */
  .tabbar {
    top: 0; bottom: auto; left: 0; transform: none;
    width: 100%; max-width: none; padding: 0;
    height: 60px; align-items: center;
    border-top: none; border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
  }
  /* 与内容区同宽同边距，保证上下竖向对齐 */
  .nav-inner {
    max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 32px;
    display: flex; align-items: center; gap: 60px;
  }
  .nav-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
  /* 品牌标：浅橘底 + 定位针与水波 */
  .nav-brand .mark {
    width: 66px; height: 48px; border-radius: 10px; background: var(--brand-soft);
    color: var(--brand);
    display: flex; align-items: center; justify-content: center;
  }
  .nav-brand .mark svg { display: block; width: 46px; height: 26px; }
  .nav-brand .brand-copy { display: flex; flex-direction: column; justify-content: center; }
  .nav-brand .brand-text { font-size: 22px; font-weight: 700; letter-spacing: .36em; line-height: 1.2; color: var(--brand); }
  .nav-brand .brand-sub { font-size: 12px; color: var(--ink-2); letter-spacing: .02em; margin-top: 2px; }
  .nav-links { flex: 0 0 auto; display: flex; gap: 2px; }
  .nav-inner .search {
    margin: 0 0 0 auto; height: 38px; flex: 1 1 380px; max-width: 380px;
  }
  .tabbar .tab {
    flex: 0 0 auto; display: flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 8px; font-size: 14px;
  }
  .tabbar .tab .ico { display: inline-flex; font-size: 17px; }
  .tabbar .tab.on { background: var(--brand-soft); }
  .tabbar .tab .badge { position: static; margin: 0 0 0 4px; }

  /* 顶部导航已有品牌，隐藏页面内重复的品牌区 */
  .top { display: none; }
  .search { margin: 14px 32px 0; max-width: 560px; }
  .cats { margin: 0; gap: 14px; overflow: visible; padding-bottom: 8px; }
  /* 分类与排序同一行，排序沉底贴右 */
  .filter-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; margin: 20px 32px 0; padding-bottom: 0;
    border-bottom: 1px solid var(--line);
  }
  .sortbar { margin: 0; padding-bottom: 10px; font-size: 13px; gap: 18px; white-space: nowrap; }

  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px; padding: 18px 32px 40px;
  }
  .card .t { font-size: 14px; }
  .card .p { font-size: 18px; }

  /* 详情：左图右信息 */
  #app.detail-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    grid-template-rows: auto auto auto;
    column-gap: 28px;
    padding-bottom: 24px;
  }
  #app.detail-page .page-head {
    grid-column: 1 / -1; padding-left: 32px; padding-right: 32px;
    position: static;
  }
  #app.detail-page .gallery {
    background: none;
    display: flex; flex-direction: column; gap: 10px;
    align-self: stretch;
  }
  #app.detail-page .detail-left {
    display: flex; flex-direction: column; gap: 18px;
    grid-column: 1; grid-row: 2;
    max-width: 600px; margin: 24px auto 40px;
  }
  #app.detail-page .detail-right {
    display: flex; flex-direction: column;
    grid-column: 2; grid-row: 2;
    padding: 24px 32px 40px 0;
  }
  #app.detail-page .detail-reco { padding: 0; margin-top: 16px; }
  #app.detail-page .detail-below { max-width: none; margin: 0; padding: 0; }
  #app.detail-page .gallery .slides {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #F1EDE7; overflow: hidden;
  }
  #app.detail-page .gallery .slides img,
  #app.detail-page .gallery .empty-shot {
    width: 100%; height: 420px; aspect-ratio: auto;
    object-fit: contain; background: #F1EDE7;
  }
  #app.detail-page .gallery .dots { display: none; }
  #app.detail-page .gallery .thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
  #app.detail-page .gallery .thumbs button {
    width: 72px; height: 72px; padding: 0; border-radius: 8px; overflow: hidden;
    border: 1.5px solid transparent; background: #F1EDE7;
  }
  #app.detail-page .gallery .thumbs button.on { border-color: var(--brand); }
  #app.detail-page .gallery .thumbs img {
    width: 100%; height: 100%; object-fit: cover; display: block;
  }
  #app.detail-page .detail-body { grid-column: auto; grid-row: auto; padding: 0; }
  #app.detail-page .actionbar {
    position: static; left: auto; bottom: auto; transform: none;
    width: auto; max-width: none; margin-top: 16px; padding: 0 0 0;
    background: none; border-top: none; align-self: stretch;
  }

  /* 表单、列表、聊天居中收窄 */
  .form { max-width: 680px; margin: 0 auto; padding: 8px 0 32px; }
  .rows { max-width: 760px; margin: 0 auto; padding: 16px 0 32px; }
  .bubbles { max-width: 760px; margin: 0 auto; }
  .chat-input {
    max-width: 760px; left: 50%; transform: translateX(-50%);
    margin-bottom: 24px; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 18px 40px -32px rgba(20, 17, 15, .6);
  }
  #app.chat-page .bubbles { width: 100%; max-width: 760px; margin: 0 auto; }
  .chat-head { max-width: 760px; margin: 0 auto; width: 100%; }
  .me-hero, .me-body { max-width: 800px; margin-left: auto; margin-right: auto; }

  .auth {
    max-width: 440px; margin: 56px auto; background: var(--white);
    border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 24px 60px -40px rgba(20, 17, 15, .35);
  }

  .page-head { position: static; padding: 14px 32px; background: var(--paper); }

  /* ===== 桌面端细化（第一步：纯样式） ===== */

  /* 页头与内容同轴：内容收窄到 760 / 表单 680，页头仍满宽但文字对齐 */
  #app:not(.detail-page) .page-head {
    padding-left: max(32px, calc((100% - 760px) / 2));
    padding-right: max(32px, calc((100% - 760px) / 2));
  }
  #app:not(.detail-page):has(> .form) .page-head {
    padding-left: max(32px, calc((100% - 680px) / 2));
    padding-right: max(32px, calc((100% - 680px) / 2));
  }

  /* 字号整体上一档 */
  .tabbar .tab { font-size: 15px; }
  .nav-inner .search { height: 42px; }
  .nav-inner .search input { font-size: 15px; }
  .cat-label { font-size: 13px; color: var(--ink-2); }
  .sortbar { font-size: 14px; gap: 20px; }
  .card .body { padding: 12px 14px 14px; }
  .card .t { font-size: 15px; min-height: 44px; }
  .card .p { font-size: 20px; margin-top: 8px; }
  .card .p small { font-size: 13px; }
  .card .meta { font-size: 13px; margin-top: 8px; }
  .row .t { font-size: 15px; }
  .row .p { font-size: 17px; }
  .row .m { font-size: 12.5px; }
  .menu-row { padding: 16px 18px; }
  .menu-row .mt { font-size: 15px; }
  .menu-row .mc { font-size: 13px; }
  .field .label { font-size: 13px; }
  .input, .textarea { font-size: 15px; }
  .empty .big { font-size: 16px; }

  /* 悬停反馈 */
  .card { transition: transform .2s, box-shadow .2s, border-color .2s; }
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(60, 40, 28, .10);
    border-color: #E2D5C7;
  }
  .card .thumb { transition: transform .35s ease; }
  .card:hover .thumb { transform: scale(1.04); }
  .tabbar .tab { transition: background .18s, color .18s; }
  .tabbar .tab:hover { background: var(--brand-soft); color: var(--brand); }
  .row { transition: background .16s; }
  .row:hover { background: #FCF8F3; }
  .menu-row { transition: background .16s; }
  .menu-row:hover { background: #FCF8F3; }
  .btn { transition: background .18s, border-color .18s, color .18s; }
  .btn-primary:hover { background: #B04A20; }
  .btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
  .seg .s { transition: border-color .18s, color .18s, background .18s; }
  .seg .s:hover { border-color: #DCCFC2; }
  .input:hover, .textarea:hover { border-color: #DCCFC2; }
  .search:hover { border-color: #DCCFC2; }
  .search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(199, 90, 46, .10); }

  /* 键盘焦点可见 */
  :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

  /* ===== 桌面端细化（第二步：结构） ===== */

  /* 导航右侧登录 / 头像入口 */
  .nav-user { display: flex; align-items: center; flex: 0 0 auto; }
  .nav-login {
    height: 40px; padding: 0 20px; border-radius: 8px; background: var(--brand); color: #fff;
    font-size: 14px; font-weight: 600; display: inline-flex; align-items: center;
    transition: background .18s;
  }
  .nav-login:hover { background: #B04A20; }
  .nav-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
    border: 1px solid #F3DACB; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: box-shadow .18s;
  }
  .nav-avatar:hover { box-shadow: 0 4px 12px rgba(199, 90, 46, .18); }

  /* 发布 / 编辑：左图上、右表单两栏 */
  .form.form-split { max-width: 1040px; padding: 8px 0 40px; }
  .form-split { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 40px; align-items: start; }
  .form-split .col-media { position: sticky; top: 96px; }
  .form-split .up-cell { border-radius: 10px; }
  .form-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
  .form-actions .btn { width: auto; min-width: 132px; padding: 0 28px; }

  /* 详情：右栏 400，主图按 4:3 铺满 */
  #app.detail-page { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 32px; }
  #app.detail-page .gallery .slides {
    aspect-ratio: 4 / 3; border: none; border-radius: 0; background: none; padding: 0;
    max-width: 600px; margin: 0 auto;
  }
  #app.detail-page .gallery .slides img,
  #app.detail-page .gallery .empty-shot {
    height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 14px;
  }

  /* 页头对齐：表单页跟着 1040 */
  #app:not(.detail-page):has(> .form) .page-head {
    padding-left: max(32px, calc((100% - 1040px) / 2));
    padding-right: max(32px, calc((100% - 1040px) / 2));
  }
}

