:root{
  --brand:#0e7c66; --brand-dark:#0a5a4a; --brand-light:#e8f5f1;
  --accent:#f6a623; --ink:#1f2a2e; --muted:#7a878c; --line:#ecefef; --bg:#f5f7f7; --red:#d9533b; --blue:#2f6fed;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{font-family:"Microsoft YaHei UI","PingFang SC",sans-serif;background:#dfe6e5;display:flex;justify-content:center;color:var(--ink)}
#phone{width:100%;max-width:430px;min-height:100vh;background:var(--bg);display:flex;flex-direction:column;position:relative;box-shadow:0 0 30px rgba(0,0,0,.12)}
#topbar{height:50px;background:var(--brand-dark);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 16px;font-size:17px;font-weight:700;flex-shrink:0;position:sticky;top:0;z-index:10}
#topRight{font-size:13px;font-weight:500;opacity:.9;cursor:pointer}
#app{flex:1;overflow-y:auto;padding:12px 14px 74px;-webkit-overflow-scrolling:touch}
#app::-webkit-scrollbar{width:0}
#tabbar{height:58px;background:#fff;border-top:1px solid var(--line);display:flex;flex-shrink:0}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;color:var(--muted);cursor:pointer}
.tab .ic{font-size:20px;filter:grayscale(1);opacity:.6}
.tab.active{color:var(--brand)}
.tab.active .ic{filter:none;opacity:1}
/* 通用 */
.search{display:flex;align-items:center;background:#fff;border-radius:20px;padding:9px 14px;color:var(--muted);font-size:13.5px;gap:7px;margin-bottom:11px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.tabs-h{display:flex;gap:8px;overflow-x:auto;margin-bottom:11px;padding-bottom:2px}
.tabs-h::-webkit-scrollbar{height:0}
.chip{white-space:nowrap;background:#fff;border:1px solid var(--line);padding:6px 14px;border-radius:16px;font-size:13px;color:var(--muted);cursor:pointer}
.chip.on{background:var(--brand);color:#fff;border-color:var(--brand)}
.alert{background:#fff3f0;border:1px solid #ffd5cc;color:var(--red);border-radius:10px;padding:9px 12px;font-size:12.5px;margin-bottom:11px}
.alert .row{display:flex;justify-content:space-between;padding:2px 0}
.card{background:#fff;border-radius:13px;padding:12px 13px;margin-bottom:10px;box-shadow:0 1px 4px rgba(0,0,0,.04);cursor:pointer}
.card.quote-card{display:flex;gap:12px;align-items:flex-start}
.card.quote-card .thumb{width:76px;height:76px;object-fit:cover;border-radius:10px;flex-shrink:0;background:var(--bg)}
.card .top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex:1;min-width:0}
.card .name{font-size:15.5px;font-weight:700}
.card .spec{font-size:12px;color:var(--muted);margin-top:2px}
.card .price{font-size:19px;font-weight:800;color:var(--brand-dark);white-space:nowrap}
.card .price small{font-size:11px;font-weight:500;color:var(--muted)}
.card .bot{display:flex;justify-content:space-between;align-items:center;margin-top:9px;padding-top:9px;border-top:1px dashed var(--line)}
.sup{display:flex;align-items:center;gap:5px;font-size:12.5px;color:#445}
.cert{background:var(--brand-light);color:var(--brand);font-size:10.5px;padding:1px 6px;border-radius:5px;font-weight:600}
.follow{background:var(--brand-light);color:var(--brand);font-size:12px;padding:4px 11px;border-radius:13px;font-weight:600;border:none}
.follow.on{background:#eee;color:#999}
.spark{width:64px;height:26px}
.section-t{font-size:14px;font-weight:700;color:var(--brand-dark);margin:4px 2px 9px;display:flex;justify-content:space-between;align-items:center}
.section-t .more{font-size:11.5px;color:var(--muted);font-weight:400}
.empty{text-align:center;color:var(--muted);font-size:13px;padding:40px 0}
/* 表单 / 登录 */
.auth{max-width:340px;margin:40px auto 0;padding:0 8px}
.auth h2{text-align:center;color:var(--brand-dark);font-size:22px;margin-bottom:6px}
.auth .sub{text-align:center;color:var(--muted);font-size:13px;margin-bottom:24px}
.field{margin-bottom:13px}
.field label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
.field input,.field select{width:100%;border:1px solid var(--line);border-radius:10px;padding:12px;font-size:15px;background:#fff;outline:none}
.field input:focus{border-color:var(--brand)}
.seg{display:flex;gap:8px}
.seg .opt{flex:1;text-align:center;padding:11px;border:1px solid var(--line);border-radius:10px;font-size:14px;color:var(--muted);cursor:pointer;background:#fff}
.seg .opt.on{background:var(--brand);color:#fff;border-color:var(--brand)}
/* 商品照片上传 */
.img-pick{display:inline-block;background:var(--brand-light);color:var(--brand);border:1px dashed var(--brand);padding:10px 16px;border-radius:10px;font-size:14px;cursor:pointer;font-weight:600}
.img-del{position:absolute;top:-7px;right:-7px;width:20px;height:20px;background:var(--red);color:#fff;border-radius:50%;text-align:center;line-height:19px;font-size:14px;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.btn{width:100%;background:var(--brand);color:#fff;text-align:center;padding:13px;border-radius:12px;font-size:16px;font-weight:700;border:none;cursor:pointer;margin-top:6px}
.btn.ghost{background:#fff;color:var(--brand);border:1px solid var(--brand)}
.btn.accent{background:var(--accent)}
.link{color:var(--brand);font-size:13px;cursor:pointer;text-align:center;display:block;margin-top:14px}
/* 详情 */
.hero{height:160px;background:linear-gradient(135deg,#bfe3d8,#8fc9b8);border-radius:14px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;margin-bottom:13px;position:relative}
.hero .tag{position:absolute;left:12px;top:12px;background:rgba(0,0,0,.25);padding:3px 9px;border-radius:10px;font-size:11px}
.kv{display:flex;justify-content:space-between;padding:10px 2px;border-bottom:1px solid var(--line);font-size:14.5px}
.kv .k{color:var(--muted)}
.kv .v{font-weight:600}
.section-title{font-size:13px;font-weight:700;color:var(--brand-dark);margin:6px 2px}
.curve-box{background:#fff;border-radius:13px;padding:12px;margin:13px 0;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.bigbtn{position:fixed;left:50%;transform:translateX(-50%);bottom:74px;width:calc(100% - 28px);max-width:402px;background:var(--brand);color:#fff;text-align:center;padding:13px;border-radius:26px;font-size:15.5px;font-weight:700;box-shadow:0 6px 16px rgba(14,124,102,.4);cursor:pointer;z-index:8;border:none}
/* 我的 */
.profile{background:linear-gradient(135deg,var(--brand),var(--brand-dark));border-radius:16px;padding:18px;color:#fff;margin-bottom:13px}
.profile .lv{display:inline-block;background:rgba(255,255,255,.2);padding:3px 11px;border-radius:12px;font-size:12px;margin-bottom:9px}
.profile .nm{font-size:19px;font-weight:800}
.profile .sub{font-size:12px;opacity:.85;margin-top:3px}
.stats{display:flex;background:#fff;border-radius:13px;padding:14px 0;margin-bottom:13px;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.stats div{flex:1;border-right:1px solid var(--line)}
.stats div:last-child{border-right:none}
.stats .n{font-size:18px;font-weight:800;color:var(--brand-dark)}
.stats .l{font-size:11.5px;color:var(--muted);margin-top:2px}
.menu{background:#fff;border-radius:13px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.menu .mi{display:flex;align-items:center;justify-content:space-between;padding:14px;font-size:14.5px;cursor:pointer;border-bottom:1px solid var(--line)}
.menu .mi:last-child{border-bottom:none}
.menu .mi .r{color:var(--muted);font-size:13px}
.fab{position:fixed;right:18px;bottom:74px;width:52px;height:52px;border-radius:50%;background:var(--accent);color:#fff;font-size:26px;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px rgba(246,166,35,.5);cursor:pointer;z-index:8;border:none}
#toast{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.82);color:#fff;padding:11px 18px;border-radius:10px;font-size:13.5px;z-index:99;opacity:0;pointer-events:none;transition:opacity .2s;white-space:nowrap}
#toast.show{opacity:1}
/* 首页排行榜 */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.rank-card{background:#fff;border-radius:13px;padding:11px 12px;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.rank-title{font-size:13px;font-weight:700;color:var(--brand-dark);margin-bottom:9px}
.rank-item{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--line);font-size:12.5px;cursor:pointer}
.rank-item:last-child{border-bottom:none}
.rank-num{width:18px;height:18px;border-radius:50%;background:var(--line);color:var(--muted);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0}
.rank-num.top{background:var(--accent);color:#fff}
.rank-name{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600}
.rank-meta{color:var(--muted);font-size:11px;white-space:nowrap;flex-shrink:0}
.rank-tag{font-size:10px;padding:1px 5px;border-radius:4px;background:var(--brand-light);color:var(--brand);flex-shrink:0}
.rank-tag.buy{background:#e7f1ff;color:#2f6fed}
.rank-tag.sell{background:#e8f5f1;color:var(--brand)}
@media(max-width:360px){.grid-2{grid-template-columns:1fr}}

/* ========== 首页新版响应式排版 ========== */
.home-hero{background:linear-gradient(135deg,var(--brand) 0%,var(--brand-dark) 100%);border-radius:0 0 22px 22px;padding:18px 16px 22px;margin:-12px -14px 14px;color:#fff;position:relative;overflow:hidden}
.home-hero::before{content:'';position:absolute;right:-30px;top:-30px;width:140px;height:140px;background:rgba(255,255,255,.08);border-radius:50%}
.home-hero::after{content:'';position:absolute;left:-20px;bottom:-40px;width:100px;height:100px;background:rgba(255,255,255,.06);border-radius:50%}
.home-hero .title{font-size:20px;font-weight:800;position:relative;z-index:1}
.home-hero .sub{font-size:12.5px;opacity:.86;margin-top:4px;position:relative;z-index:1}
.home-hero .stats-row{display:flex;gap:16px;margin-top:14px;position:relative;z-index:1}
.home-hero .stats-row .item{flex:1;background:rgba(255,255,255,.12);border-radius:12px;padding:10px 12px;text-align:center;backdrop-filter:blur(4px)}
.home-hero .stats-row .num{font-size:20px;font-weight:800}
.home-hero .stats-row .lab{font-size:11px;opacity:.85;margin-top:2px}

.home-search{display:flex;align-items:center;background:#fff;border-radius:24px;padding:4px 4px 4px 16px;margin-bottom:14px;box-shadow:0 4px 12px rgba(14,124,102,.12);gap:6px}
.home-search input{flex:1;border:none;background:transparent;outline:none;font-size:14px;color:var(--ink);min-width:0}
.home-search button{background:var(--brand);color:#fff;border:none;padding:9px 18px;border-radius:20px;font-size:13px;font-weight:700;cursor:pointer;flex-shrink:0}


.home-section{margin-bottom:16px}
.home-section .section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding:0 2px}
.home-section .section-title{font-size:15px;font-weight:800;color:var(--brand-dark);display:flex;align-items:center;gap:6px}
.home-section .more{font-size:12px;color:var(--muted);cursor:pointer}

.rank-swiper{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 12px;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory}
.rank-swiper::-webkit-scrollbar{height:0}
.rank-card-v2{flex:0 0 100%;min-width:0;max-width:none;background:#fff;border-radius:16px;padding:13px 14px;box-shadow:0 2px 8px rgba(0,0,0,.05);scroll-snap-align:start;display:flex;flex-direction:column}
.rank-card-v2 .rank-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.rank-card-v2 .rank-head .icon{font-size:20px}
.rank-card-v2 .rank-head .t{font-size:14px;font-weight:800;color:var(--brand-dark)}
.rank-card-v2 .rank-row{display:flex;align-items:center;gap:10px;padding:7px 0;border-bottom:1px dashed var(--line);font-size:13px;cursor:pointer}
.rank-card-v2 .rank-row:last-child{border-bottom:none}
.rank-card-v2 .rank-row .num{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#fff;background:var(--line);color:var(--muted);flex-shrink:0}
.rank-card-v2 .rank-row .num.top1{background:linear-gradient(135deg,#ffd700,#ffb800)}
.rank-card-v2 .rank-row .num.top2{background:linear-gradient(135deg,#d7d7d7,#b0b0b0)}
.rank-card-v2 .rank-row .num.top3{background:linear-gradient(135deg,#ff9f7a,#f56c3a)}
.rank-card-v2 .rank-row .name{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600;min-width:0}
.rank-card-v2 .rank-row .meta{color:var(--muted);font-size:11px;white-space:nowrap;flex-shrink:0;text-align:right;max-width:70px;overflow:hidden;text-overflow:ellipsis}

.feed-list{display:flex;flex-direction:column;gap:10px}
.feed-item{background:#fff;border-radius:14px;padding:12px 13px;box-shadow:0 1px 4px rgba(0,0,0,.04);cursor:pointer;display:flex;align-items:flex-start;gap:11px}
.feed-item .tag{flex-shrink:0;font-size:11px;padding:3px 7px;border-radius:6px;font-weight:700;background:var(--brand-light);color:var(--brand)}
.feed-item .tag.buy{background:#e7f1ff;color:var(--blue)}
.feed-item .tag.sell{background:#e8f5f1;color:var(--brand)}
.feed-item .tag.product{background:#fff6e6;color:#c77a00}
.feed-item .tag.pending,.card .tag.pending{background:#fff3e0;color:#e08a00}
.feed-item .body{flex:1;min-width:0}
.feed-item .title{font-size:14px;font-weight:700;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feed-item .subtitle{font-size:12px;color:var(--muted);margin-top:3px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.feed-item .subtitle .price{color:var(--brand-dark);font-weight:800;font-size:13px}

/* 小屏优化 */
@media(max-width:360px){
  .home-hero{padding:14px 12px 18px;margin-left:-12px;margin-right:-12px}
  .home-hero .title{font-size:18px}
  .home-hero .stats-row .num{font-size:17px}
  .rank-card-v2{flex:0 0 88%;min-width:230px;padding:11px 12px}
  .feed-item{padding:10px 11px}
  .feed-item .title{font-size:13px}
}
/* 大屏优化（>=400px 双列展示排行榜） */
@media(min-width:400px){
  .rank-card-v2{flex:0 0 calc(50% - 5px);min-width:0}
}
/* 小屏避免 meta 被截断 */
@media(max-width:359px){
  .rank-card-v2 .rank-row .meta{font-size:10px;max-width:54px;overflow:hidden;text-overflow:ellipsis}
}
