:root{
  --bg:#f6f7f9; --card:#fff; --ink:#1a1d21; --muted:#6b7280; --line:#e5e7eb;
  --brand:#2563eb; --brand-dark:#1d4ed8; --ok:#059669; --err:#dc2626; --radius:12px;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--ink)}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}

/* Top bar */
.topbar{display:flex;align-items:center;gap:20px;background:var(--card);border-bottom:1px solid var(--line);padding:12px 20px;position:sticky;top:0;z-index:20}
.nav-toggle{display:none;background:transparent;border:1px solid var(--line);border-radius:8px;font-size:20px;line-height:1;padding:6px 10px;cursor:pointer;color:var(--ink)}
.thread-back{display:none;background:transparent;border:0;font-size:22px;line-height:1;margin-right:8px;cursor:pointer;color:var(--ink)}
.btn-primary,button.btn-primary,.btn-ghost,.btn-danger,.oauth-btn{min-height:44px}
img,video{max-width:100%}
.tabbar{display:none}
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:200;cursor:zoom-out;padding:20px}
.lightbox img{max-width:96vw;max-height:96vh;border-radius:8px;box-shadow:0 10px 40px rgba(0,0,0,.5);cursor:default}
.lb-btn{position:absolute;background:rgba(0,0,0,.5);color:#fff;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;line-height:1;z-index:2}
.lb-btn:hover{background:rgba(0,0,0,.78)}
.lb-close{top:16px;right:16px;width:40px;height:40px;font-size:24px}
.lb-prev,.lb-next{top:50%;transform:translateY(-50%);width:48px;height:48px;font-size:30px}
.lb-prev{left:16px}
.lb-next{right:16px}
.uploads img{cursor:zoom-in}
.mainnav .nav-secondary{display:none}
.brand{font-weight:800;font-size:20px;color:var(--brand);display:inline-flex;align-items:center}
.brand:hover{text-decoration:none}
.brand-logo{height:64px;width:auto;display:block}
.mainnav{display:flex;gap:18px}
.mainnav a{color:var(--ink);font-weight:600}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:14px}
.lang-switch{border:1px solid var(--line);border-radius:999px;padding:4px 12px;color:var(--muted);font-size:13px}
.hello{color:var(--muted);margin-right:6px}
.auth-slot{display:inline-flex;align-items:center;gap:14px}

.container{max-width:1080px;margin:24px auto;padding:0 16px}
/* Admin pages: staff use desktops, so use 90% of the screen width (any size or
   display scaling), leaving a small margin on each side. Overrides each admin
   page's inline max-width on its card. */
body.admin-wide .container{max-width:90vw}
body.admin-wide .form-card{max-width:none !important}

/* Bottom bar (matches the header: white surface, hairline border, centered) */
.site-footer{background:var(--card);border-top:1px solid var(--line);text-align:center;color:var(--muted);font-size:13px;padding:16px}
.footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;margin-bottom:10px}
.footer-links a{color:var(--muted);text-decoration:none}
.footer-links a:hover{color:var(--brand);text-decoration:underline}

/* Buttons + forms */
.btn-primary,button.btn-primary{background:var(--brand);color:#fff;border:0;border-radius:8px;padding:9px 16px;font-weight:600;cursor:pointer}
.btn-primary:hover{background:var(--brand-dark);text-decoration:none}
.btn-link{color:var(--ink);font-weight:600}
.btn-ghost{background:transparent;border:1px solid var(--line);border-radius:8px;padding:8px 14px;cursor:pointer}
.btn-danger{background:var(--err);color:#fff;border:0;border-radius:8px;padding:8px 14px;cursor:pointer}
label{display:block;font-size:13px;color:var(--muted);margin:10px 0 4px}
input,select,textarea{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:16px;font-family:inherit;background:#fff}
textarea{min-height:120px;resize:vertical}
/* Password show/hide eye (added by app.js to every password field) */
.pw-wrap{position:relative;display:block}
.pw-wrap input{padding-right:44px}
.pw-toggle{position:absolute;top:0;right:0;height:100%;width:42px;display:flex;align-items:center;justify-content:center;background:none;border:0;padding:0;color:var(--muted);cursor:pointer}
.pw-toggle:hover{color:var(--ink)}
.pw-toggle .eye-slash{display:none}
.pw-toggle.shown .eye-slash{display:inline}
.form-card{max-width:440px;margin:0 auto;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:28px}
.form-card h1{margin:0 0 4px;font-size:24px}
.form-card .sub{color:var(--muted);margin:0 0 18px}
.form-actions{margin-top:18px}
.row{display:flex;gap:12px}
.row>*{flex:1}
.divider{display:flex;align-items:center;text-align:center;color:var(--muted);font-size:13px;margin:18px 0}
.divider::before,.divider::after{content:"";flex:1;border-top:1px solid var(--line)}
.divider:not(:empty)::before{margin-right:10px}
.divider:not(:empty)::after{margin-left:10px}
.oauth-row{display:flex;gap:10px}
.oauth-btn{flex:1;border:1px solid var(--line);border-radius:8px;padding:9px;text-align:center;background:#fff;cursor:pointer;font-weight:600}
.switch-line{margin-top:16px;text-align:center;color:var(--muted);font-size:14px}

/* Landing slogan */
.hero-slogan{text-align:center;font-size:20px;font-weight:700;color:var(--slogan-color,var(--brand));margin:6px 0 16px;line-height:1.4}
@media (max-width:768px){.hero-slogan{font-size:17px;margin:2px 0 12px}}

/* Search / toolbar */
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:end;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:20px}
.toolbar .grow{flex:1;min-width:200px}
.toolbar label{margin:0 0 4px}

/* Item grid */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:box-shadow .15s;cursor:pointer}
.card:hover{box-shadow:0 6px 18px rgba(0,0,0,.08)}
.card .thumb{width:100%;aspect-ratio:1/1;object-fit:cover;background:#e5e7eb;display:block}
.card .body{padding:10px 12px}
/* Card: bold title (line 1), smaller price (line 2), location (line 3) */
.card .title{font-weight:700;font-size:15px;margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card .price{font-weight:400;font-size:13px;color:var(--ink)}
/* Line 2: price on the left, city/province aligned right */
.card .priceline{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.card .priceline .price{flex:0 0 auto}
.card .priceline .meta{flex:1;min-width:0;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card .meta{color:var(--muted);font-size:12px}
.badge{display:inline-block;background:#eef2ff;color:var(--brand);border-radius:999px;padding:2px 8px;font-size:11px;margin-left:6px}
.badge.sold{background:#fee2e2;color:var(--err)}

.section-title{font-size:15px;color:var(--muted);margin:22px 0 10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.buy-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.search-summary{font-size:12px;font-weight:400;text-transform:none;letter-spacing:0;color:var(--muted);text-decoration:none;cursor:pointer;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70%}
.search-summary:hover{color:var(--brand);text-decoration:underline}
.empty{color:var(--muted);text-align:center;padding:40px}
.admin-table{width:100%;border-collapse:collapse;margin-top:12px;font-size:13px}
.admin-table th,.admin-table td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--line);vertical-align:top}
.admin-table th{color:var(--muted);font-weight:600}
.admin-summary{display:flex;gap:14px;flex-wrap:wrap;margin-top:6px;font-size:13px}
.admin-summary b{font-weight:600}

/* Item detail: category-specific attribute specs */
.item-specs{display:flex;flex-direction:column;gap:6px;margin:14px 0;padding:12px 14px;background:#f8fafc;border:1px solid var(--line);border-radius:10px}
.item-spec{display:flex;justify-content:space-between;gap:12px;font-size:14px}
.item-spec-label{color:var(--muted)}
.item-spec-value{font-weight:600;color:var(--ink);text-align:right}
.price-label{font-size:15px;font-weight:600;color:var(--muted)}
.watch-btn.active{color:var(--brand);border-color:var(--brand)}
/* Message-seller (left) + Watch (right) on one row */
.contact-row{display:flex;align-items:center;gap:10px}
.contact-row .msg-btn{width:auto;flex:0 0 auto}
.contact-row .watch-btn{margin-left:auto;flex:0 0 auto}
.msg-box .contact-row .msg-btn{width:auto}
/* Server maintenance overlay */
.maint-overlay{position:fixed;inset:0;z-index:9999;background:rgba(255,255,255,.98);display:flex;align-items:center;justify-content:center;padding:24px}
.maint-card{max-width:420px;text-align:center}
.maint-logo{width:72px;height:72px;border-radius:16px;margin-bottom:16px}
.maint-card p{font-size:17px;color:var(--ink);line-height:1.6}
/* Promo / holiday splash banner */
.promo-overlay{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.72);display:flex;align-items:center;justify-content:center;padding:24px}
.promo-card{position:relative;max-width:min(92vw,440px);max-height:90vh;display:flex}
.promo-img{display:block;width:100%;height:auto;max-height:90vh;object-fit:contain;border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.4)}
.promo-card a{display:block;line-height:0}
.promo-skip{position:absolute;top:10px;right:10px;z-index:1;border:0;border-radius:16px;padding:6px 14px;font-size:13px;font-weight:600;color:#fff;background:rgba(0,0,0,.55);cursor:pointer}
.promo-skip:hover{background:rgba(0,0,0,.75)}
/* Ads — admin category checkbox grid */
.ad-cat-grid{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:4px}
.ad-cat{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:400}
.ad-cat input{width:auto;margin:0}
/* Ad placeholder on item / news pages */
.ad-slot{display:block;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card);text-decoration:none;color:inherit}
.ad-slot img{display:block;width:100%;height:auto}
.ad-slot .ad-slot-tag{display:block;padding:6px 12px 0;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.ad-slot .ad-slot-text{padding:8px 12px 12px;font-size:14px;color:var(--ink);line-height:1.4}
.ad-slot-wide{position:sticky;top:16px}
.ad-slot-narrow{margin:18px 0}
/* News detail: article + right-rail ad on wide screens */
.news-detail-wrap{display:flex;gap:24px;align-items:flex-start}
.news-detail-wrap .news-article{flex:1;min-width:0}
.news-aside{width:300px;flex:0 0 300px}
/* Rich WeChat share card */
.wx-card{text-align:left;max-width:360px;padding:20px}
/* Push the hero below the top-right close button so it isn't crowded. */
.wx-hero{width:100%;height:200px;object-fit:cover;border-radius:10px;background:#eef1f4;display:block;margin-top:16px}
.wx-save{width:100%;margin-top:14px}
.wx-title{font-size:17px;font-weight:700;color:var(--ink);margin:12px 0 6px;line-height:1.35}
.wx-sub{font-size:14px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.wx-price{display:inline-block;font-weight:700;color:var(--ink);padding:3px 10px;border-radius:6px}
.wx-loc{color:var(--muted);font-size:12px;text-align:right;white-space:nowrap}
.wx-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:12px}
.wx-brand{display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex:1;min-width:0}
.wx-logo{height:60px;width:auto;max-width:220px}
.wx-hint{font-size:13px;color:var(--muted);line-height:1.4}
.wx-qr{width:104px;height:104px;flex:none}
#catFields{margin-bottom:4px}

/* Seller row: rating + joined date */
.seller-name-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.seller-name{font-weight:600;color:var(--ink)}
.seller-rating{color:#f59e0b;font-size:13px;font-weight:600}
.seller-joined{font-size:12px;margin-top:2px}

/* Review button + modal */
.thread-review{margin-left:auto;background:transparent;border:0;font-size:18px;cursor:pointer;color:#f59e0b;padding:4px 6px;flex:none}
.review-stars{text-align:center;font-size:30px;margin:10px 0}
.review-star{cursor:pointer;color:#d1d5db;padding:0 3px}
.review-star.on{color:#f59e0b}
.review-text{width:100%;min-height:84px;margin-top:6px}
.msg-note-deal{display:block;cursor:pointer;color:var(--brand);text-decoration:none}
.msg-note-deal:hover{text-decoration:underline}
.seller-rating{cursor:pointer;text-decoration:none}
.seller-rating:hover{text-decoration:underline}
.reviews-list{max-height:60vh;overflow-y:auto;text-align:left;margin-top:8px}
.review-item{display:flex;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.review-item:first-child{border-top:0}
.review-item-head{display:flex;align-items:center;gap:8px}
.review-item-name{font-weight:600}
.review-item-stars{color:#f59e0b;font-size:13px}

/* Item detail: "Get the app" banner (phones) */
.app-banner{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:16px;text-decoration:none}
.app-banner:hover{text-decoration:none}
.app-banner-logo{width:42px;height:42px;border-radius:9px;flex:0 0 auto}
.app-banner-text{flex:1;min-width:0}
.app-banner-title{font-weight:700;color:var(--ink);font-size:15px}
.app-banner-sub{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-banner-btn{background:var(--brand);color:#fff;border-radius:8px;padding:8px 14px;font-weight:700;white-space:nowrap}

/* Item detail: message-seller box */
.msg-box{margin-top:14px}
.msg-box .msg-input{width:100%;min-height:72px;margin-bottom:8px}
.msg-box .msg-btn{width:100%}

/* Item detail */
.detail{display:grid;grid-template-columns:1.1fr .9fr;gap:24px}
.gallery .main-img{width:100%;border-radius:var(--radius);aspect-ratio:4/3;object-fit:cover;background:#eef1f4}
.thumbs{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
.thumbs img{width:64px;height:64px;object-fit:cover;border-radius:8px;cursor:pointer;border:2px solid transparent}
.thumbs img.active{border-color:var(--brand)}
.gallery .main-video{width:100%;border-radius:var(--radius);aspect-ratio:4/3;background:#000;object-fit:contain;display:block}
.thumb-video{width:64px;height:64px;border-radius:8px;background:#000 center/cover no-repeat;cursor:pointer;border:2px solid transparent;display:flex;align-items:center;justify-content:center}
.thumb-video.active{border-color:var(--brand)}
.thumb-video .play{color:#fff;font-size:18px;line-height:1;background:rgba(0,0,0,.45);width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding-left:2px}
.detail h1{margin:0 0 6px}
.detail .price{font-size:22px;font-weight:400;display:flex;align-items:center;flex-wrap:wrap}
.detail .price .price-loc{margin-left:auto;font-size:14px;color:var(--muted);font-weight:400}
.detail .meta{color:var(--muted);font-size:13px;margin:4px 0}
.detail .description{border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;margin:12px 0;line-height:1.6;white-space:pre-wrap;word-break:break-word;min-height:8em}
.detail .pickup-map{margin-top:14px}
.detail .pickup-map iframe{width:100%;height:220px;border:0;border-radius:var(--radius)}

/* Conversations */
.conv-layout{display:grid;grid-template-columns:320px 1fr;gap:0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;min-height:70vh}
.conv-list{border-right:1px solid var(--line);overflow-y:auto}
.conv-item{display:flex;gap:10px;padding:12px;border-bottom:1px solid var(--line);cursor:pointer}
.conv-item:hover,.conv-item.active{background:#f0f5ff}
.conv-thumb{position:relative;flex:none;width:44px;height:44px}
.conv-thumb>img{width:44px;height:44px;border-radius:8px;object-fit:cover;background:#eef1f4;display:block}
.conv-thumb .conv-av{position:absolute;right:-5px;bottom:-5px;border:2px solid var(--card);box-shadow:0 1px 2px rgba(0,0,0,.15)}
.conv-item .ct{flex:1;min-width:0}
.conv-item .ct .nm{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv-item .ct .who{color:var(--ink);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv-item .ct .lm{color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.unread-dot{width:9px;height:9px;border-radius:50%;background:var(--brand);align-self:center}
.thread{display:flex;flex-direction:column;position:relative}
.new-msg-pill{position:absolute;left:50%;transform:translateX(-50%);bottom:72px;background:var(--brand);color:#fff;border:0;border-radius:999px;padding:7px 15px;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.22);z-index:5}
.new-msg-pill:hover{background:var(--brand-dark)}
.thread-head{padding:12px 16px;border-bottom:1px solid var(--line);font-weight:700;display:flex;align-items:center;gap:8px}
.thread-report{background:none;border:0;cursor:pointer;color:var(--muted);font-size:16px;line-height:1;padding:4px 6px;border-radius:6px;flex:none}
.thread-report:hover{color:var(--err);background:#fef2f2}
.thread-item-link{color:inherit;text-decoration:none;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread-item-link:hover{color:var(--brand);text-decoration:underline}
.messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:8px}
.msg-row{display:flex;align-items:flex-end;gap:8px;max-width:100%}
.msg-row.me{justify-content:flex-end}
.msg-row.them{justify-content:flex-start}
.msg-row .msg-av{width:28px;height:28px;flex:none}
.msg-av-spacer{width:28px;flex:none}
.msg{max-width:70%;padding:9px 13px;border-radius:14px;font-size:14px;line-height:1.4}
.msg.them{background:#eef1f4;border-bottom-left-radius:4px}
.msg.me{background:var(--brand);color:#fff;border-bottom-right-radius:4px}
.msg.note{align-self:center;background:#fff7ed;color:#9a3412;font-size:12px;border:1px solid #fed7aa}
.composer{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line);align-items:center}
.composer input{flex:1}
.composer-attach{flex:none;width:40px;height:40px;border:1px solid var(--line);background:#fff;border-radius:10px;font-size:18px;cursor:pointer;line-height:1}
.composer-attach:hover{background:#f3f4f6}
.composer-uploading{padding:6px 12px;font-size:12px;color:var(--muted);text-align:center}
/* Chat photo/video bubbles */
.msg.msg-media{padding:0;background:none;overflow:visible;max-width:220px}
.chat-media{display:block;border-radius:12px;cursor:pointer}
.chat-media-img{width:100%;max-width:220px;max-height:280px;object-fit:cover;border-radius:12px;background:#eef1f4}
.chat-media-vid{position:relative}
.chat-media-blank{width:220px;height:150px}
.chat-vid-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;padding-left:3px}
.media-gone{padding:10px 13px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);font-size:12px;font-style:italic}
.lightbox{display:flex;align-items:center;justify-content:center}
.lightbox-media{max-width:92vw;max-height:88vh;border-radius:8px;background:#000}
.rc-media{max-width:120px;max-height:120px;border-radius:8px;object-fit:cover;vertical-align:middle}
/* Message actions: reply bar, quote, recall, long-press menu, forward picker */
.msg{cursor:default}
.msg-quote{display:flex;align-items:center;gap:6px;border-left:3px solid rgba(0,0,0,.2);padding:2px 8px;margin-bottom:5px;font-size:12px;opacity:.9;max-width:100%}
.msg.me .msg-quote{border-left-color:rgba(255,255,255,.6)}
.msg-quote-body{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.msg-quote-who{font-weight:600}
.msg-quote.clickable{cursor:pointer}
.quote-thumb-wrap{position:relative;flex:none;width:32px;height:32px}
.quote-thumb{width:32px;height:32px;border-radius:6px;object-fit:cover;display:block;background:#dfe3e8}
.quote-thumb-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:11px;text-shadow:0 0 3px rgba(0,0,0,.7)}
.reply-bar .msg-quote{margin-bottom:0;border-left:0;padding:0;flex:1;min-width:0}
.msg-recalled{font-style:italic;opacity:.7;font-size:13px}
.reply-bar{display:flex;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid var(--line);background:#f8fafc}
.reply-bar-body{flex:1;min-width:0;display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);white-space:nowrap}
.reply-bar-label{font-weight:600;color:var(--brand)}
.reply-bar-x{flex:none;border:0;background:none;font-size:18px;cursor:pointer;color:var(--muted)}
.msg-menu{display:flex;align-items:flex-end;justify-content:center}
.msg-menu-sheet{background:#fff;border-radius:14px 14px 0 0;width:100%;max-width:440px;padding:6px;margin-bottom:0}
@media(min-width:761px){.msg-menu{align-items:center}.msg-menu-sheet{border-radius:14px;margin-bottom:0}}
.msg-menu-item{display:block;width:100%;text-align:center;background:none;border:0;border-bottom:1px solid var(--line);padding:14px;font-size:16px;color:var(--ink);cursor:pointer}
.msg-menu-item:last-child{border-bottom:0;color:var(--muted)}
.msg-menu-item:hover{background:#f3f4f6}
.msg-menu-item.disabled{color:#c0c4cc;cursor:not-allowed}
.forward-list{display:flex;flex-direction:column;gap:2px;max-height:60vh;overflow:auto;margin-top:8px}
.forward-row{display:flex;gap:10px;align-items:center;padding:8px;border:0;background:none;cursor:pointer;text-align:left;border-radius:8px}
.forward-row:hover{background:#f3f4f6}
.forward-thumb{width:40px;height:40px;border-radius:8px;object-fit:cover;background:#eef1f4;flex:none}
.forward-row .nm{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.forward-row .who{font-size:12px;color:var(--muted)}

/* Image upload previews */
.uploads{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.uploads .up{position:relative;width:80px;height:80px}
.uploads img{width:80px;height:80px;object-fit:cover;border-radius:8px}
.uploads .main-tag{position:absolute;top:2px;left:2px;background:var(--brand);color:#fff;font-size:10px;padding:1px 5px;border-radius:5px}
.uploads .x{position:absolute;top:-6px;right:-6px;background:var(--err);color:#fff;border:0;border-radius:50%;width:20px;height:20px;cursor:pointer}
.uploads .set-main{position:absolute;top:2px;left:2px;background:rgba(0,0,0,.55);color:#fff;border:0;border-radius:5px;font-size:12px;line-height:1;padding:2px 5px;cursor:pointer}
.uploads .up{cursor:grab}
.uploads .up.dragging{opacity:.4}
.uploads .up.dragover{outline:2px dashed var(--brand);outline-offset:2px}
.uploads .reorder{position:absolute;bottom:2px;left:2px;right:2px;display:flex;justify-content:space-between;pointer-events:none}
.uploads .reorder button{pointer-events:auto;background:rgba(0,0,0,.6);color:#fff;border:0;border-radius:4px;font-size:13px;line-height:1;padding:2px 6px;cursor:pointer}
.uploadbar{margin:14px 0}
.uploadbar-label{font-size:13px;color:var(--muted);margin-bottom:6px}
.uploadbar-track{height:10px;background:#eef1f4;border-radius:999px;overflow:hidden}
.uploadbar-fill{height:100%;width:0;background:var(--brand);border-radius:999px;transition:width .2s ease}

/* Toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);color:#fff;padding:11px 18px;border-radius:8px;z-index:100;box-shadow:0 6px 20px rgba(0,0,0,.2)}
.toast.ok{background:var(--ok)}
.toast.err{background:var(--err)}

/* ---------------- Responsive / mobile ---------------- */
@media(max-width:760px){
  .container{margin:14px auto;padding:0 12px}

  /* Top bar collapses to brand + controls, with a hamburger for nav links */
  .topbar{flex-wrap:wrap;gap:10px 14px;padding:10px 14px}
  .brand{flex:1;font-size:18px}
  .brand-logo{height:46px}
  body.nav-hamburger .nav-toggle{display:flex;order:3}
  .topbar-right{order:2;margin-left:0;gap:10px}
  .mainnav{display:none;order:10;flex-basis:100%;flex-direction:column;gap:0}
  .topbar.open .mainnav{display:flex}
  .mainnav a{padding:12px 4px;border-top:1px solid var(--line)}
  body.nav-hamburger .topbar-right{display:none}
  .mainnav .nav-secondary{display:flex;flex-direction:column;gap:0}
  .mainnav .nav-secondary .hello{padding:12px 4px 4px;border-top:1px solid var(--line)}
  body.nav-tabbar .mainnav .nav-primary{display:none}

  /* Listings: two compact columns */
  .grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .card .title{font-size:14px}
  .card .price{font-size:12px}
  .section-title{margin:16px 0 8px}

  /* Search toolbar stacks; each control full width */
  .toolbar{padding:10px;gap:8px}
  .toolbar .grow,.toolbar>div,.toolbar input,.toolbar select,.toolbar button{min-width:100%;max-width:100%}
  .toolbar button{width:100%}

  /* Item detail single column */
  .detail{grid-template-columns:1fr;gap:16px}
  .detail h1{font-size:20px}
  .detail .price{font-size:22px}

  /* Seller row: let the action button wrap to its own full-width line */
  .seller-line{flex-wrap:wrap}
  .seller-line .msg-btn{margin-left:0;flex-basis:100%;justify-content:center;min-height:44px}

  /* Forms comfortably full-width */
  .form-card{max-width:100%;padding:20px 16px}
  .row{flex-direction:column;gap:0}

  /* Conversations: one pane at a time, with a back button */
  .conv-layout{grid-template-columns:1fr;min-height:auto}
  .conv-list{border-right:0;max-height:none}
  .thread{display:none;min-height:60vh}
  .conv-layout.show-thread .conv-list{display:none}
  .conv-layout.show-thread .thread{display:flex}
  .thread-back{display:inline-block}
  .messages{max-height:none}
  .msg{max-width:85%}

  /* Bottom tab bar (phones) — enabled via body.nav-tabbar */
  body.nav-tabbar{padding-bottom:64px}
  body.nav-tabbar .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:30;
    background:var(--card);border-top:1px solid var(--line)}
  .tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
    padding:8px 0 9px;font-size:11px;color:var(--muted);text-decoration:none}
  .tabbar a.active{color:var(--brand)}
  .tabbar a:hover{text-decoration:none}
  .tabbar svg{width:22px;height:22px}
}

/* Small phones */
/* ---- notification bell ---- */
.notif-wrap{position:relative;display:inline-flex;align-items:center}
.notif-bell{background:none;border:0;cursor:pointer;color:inherit;padding:6px;line-height:0;position:relative;border-radius:8px}
.notif-bell:hover{background:rgba(0,0,0,.06)}
.notif-bell svg{width:22px;height:22px}
.notif-badge{position:absolute;top:-2px;right:-2px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#e11d48;color:#fff;font-size:11px;line-height:17px;text-align:center;font-weight:700}
.nav-badge{display:inline-block;min-width:17px;height:17px;padding:0 4px;margin-left:5px;border-radius:9px;background:#e11d48;color:#fff;font-size:11px;line-height:17px;text-align:center;font-weight:700;vertical-align:middle}
.notif-panel{position:absolute;top:calc(100% + 8px);right:0;width:320px;max-width:86vw;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.16);z-index:60;overflow:hidden}
.notif-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--line);font-weight:600}
.notif-readall{background:none;border:0;color:#2563eb;font-size:13px;cursor:pointer;padding:0}
.notif-readall:hover{text-decoration:underline}
.notif-list{max-height:60vh;overflow-y:auto}
.notif-empty{padding:22px 14px;text-align:center;color:#9ca3af;font-size:14px}
.notif-item{display:block;padding:10px 14px;border-bottom:1px solid #f1f3f5;text-decoration:none;color:inherit}
.notif-item:last-child{border-bottom:0}
.notif-item:hover{background:#f8fafc}
.notif-item.unread{background:#eff6ff}
.notif-item.unread:hover{background:#e6f0fe}
.notif-item-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.notif-title{font-weight:600;font-size:14px}
.notif-time{color:#9ca3af;font-size:12px;flex:none}
.notif-sub{color:#4b5563;font-size:13px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---- social share bar ---- */
.share-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.share-label{color:var(--muted);font-size:13px;margin-right:2px}
.share-btn{width:38px;height:38px;border:0;border-radius:50%;cursor:pointer;color:#fff;display:inline-flex;align-items:center;justify-content:center;padding:0;transition:transform .1s,filter .1s}
.share-btn:hover{transform:translateY(-2px);filter:brightness(1.08)}
.share-btn svg{width:20px;height:20px}
.share-btn.s-native{background:#6b7280}
.share-btn.s-facebook{background:#1877f2}
.share-btn.s-x{background:#000}
.share-btn.s-linkedin{background:#0a66c2}
.share-btn.s-whatsapp{background:#25d366}
.share-btn.s-telegram{background:#229ed9}
.share-btn.s-wechat{background:#09b83e}
.share-btn.s-instagram{background:radial-gradient(circle at 30% 107%,#fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285AEB 90%)}
.share-btn.s-copy{background:#64748b}
/* WeChat QR modal */
.share-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:200;padding:20px}
.share-modal-card{background:#fff;border-radius:14px;padding:22px 24px;max-width:320px;width:100%;text-align:center;position:relative;box-shadow:0 16px 40px rgba(0,0,0,.25)}
.share-modal-x{position:absolute;top:8px;right:10px;background:none;border:0;font-size:24px;line-height:1;color:var(--muted);cursor:pointer}
.share-modal-title{font-weight:600;margin-bottom:14px}
.share-qr{width:200px;height:200px;image-rendering:pixelated;border:1px solid var(--line);border-radius:8px}
.share-modal-url{margin-top:12px;font-size:12px;color:var(--muted);word-break:break-all}

/* ---- avatars ---- */
.avatar{border-radius:50%;object-fit:cover;background:#e5e7eb;display:inline-block;vertical-align:middle;flex:none}
.hello{display:inline-flex;align-items:center;gap:8px;color:var(--muted)}
.hello .avatar{width:30px;height:30px}
.hello:hover{text-decoration:none}
.avatar-lg{width:88px;height:88px}
.avatar-edit{display:flex;align-items:center;gap:18px}
.avatar-actions{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.avatar-upload-btn{cursor:pointer;display:inline-block}
.avatar-hint{color:var(--muted);font-size:12px;margin:2px 0 0}
.seller-line{display:flex;align-items:center;gap:8px;margin-top:12px}
.seller-line .avatar{width:28px;height:28px}
/* Action button (Message seller / Edit) sits on the same line, matched height */
.seller-line .msg-btn{margin-left:auto;min-height:32px;padding:6px 14px;display:inline-flex;align-items:center;line-height:1}

/* ---- avatar library picker ---- */
.avatar-library-label{margin-top:18px;color:var(--muted);font-size:13px}
.avatar-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:10px;margin-top:10px}
.avatar-tile{padding:0;border:2px solid transparent;border-radius:50%;background:#eef1f4;cursor:pointer;line-height:0;overflow:hidden;aspect-ratio:1/1}
.avatar-tile img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.avatar-tile:hover{border-color:var(--line)}
.avatar-tile.selected{border-color:var(--brand)}

/* WeChat share step-by-step help */
.share-modal-steps{margin-top:12px;text-align:left;color:var(--muted);font-size:12px;line-height:1.6}
.share-modal-steps p{margin:0 0 6px}
.share-modal-steps p:last-child{margin:0}

/* ---- admin sub-navigation tabs ---- */
.admin-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:940px;margin:0 auto 16px;border-bottom:1px solid var(--line)}
/* Admin pages are full width: centre the tabs over the content; wrap instead of spilling right. */
body.admin-wide .admin-tabs{max-width:none}
.admin-tabs a{padding:10px 16px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.admin-tabs a:hover{color:var(--ink);text-decoration:none}
.admin-tabs a.active{color:var(--brand);border-bottom-color:var(--brand)}

/* ---- settings check row ---- */
.check-row{display:flex;align-items:center;gap:10px;margin:6px 0 0;cursor:pointer;color:var(--ink);font-size:14px}
.check-row input{width:auto;min-height:0}

/* chat time divider: small grey label, centred */
.msg-time{text-align:center;color:var(--muted);font-size:11px;font-weight:400;margin:14px 4px 6px}

/* system note in a conversation (item marked sold / available) */
.msg-note{text-align:center;color:var(--muted);font-size:12px;margin:2px 8px 8px;padding:0 8px}

/* previous (struck-through) price on the item page */
.detail .price .was{color:var(--muted);text-decoration:line-through;font-size:.62em;font-weight:400;margin-left:8px;vertical-align:middle}

/* buy page: collapsible search section toggled by a magnifier icon */
/* Search entry in the top-left menu */
.nav-search{display:inline-flex;align-items:center;gap:6px}
.nav-search svg{width:18px;height:18px}
.nav-search.active{color:var(--brand)}
.buy-tools{display:flex;justify-content:flex-end;margin-bottom:10px}
.search-toggle{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);cursor:pointer}
.search-toggle:hover{background:#f0f5ff}
.search-toggle.active{background:var(--brand);border-color:var(--brand);color:#fff}
.search-toggle svg{width:20px;height:20px}
.toolbar.collapsed{display:none}

/* "New" badge on the card image */
.card .thumb-wrap{position:relative}
.new-tag{position:absolute;top:8px;left:8px;background:var(--ok);color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;box-shadow:0 1px 3px rgba(0,0,0,.25);letter-spacing:.02em}
.mine-tag{position:absolute;top:8px;right:8px;background:var(--brand);color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.sold-tag{position:absolute;top:8px;left:8px;background:var(--err);color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;box-shadow:0 1px 3px rgba(0,0,0,.25);letter-spacing:.02em}

/* safety notice at the top of a conversation thread */
.thread-safety{text-align:center;color:var(--muted);font-size:12px;line-height:1.5;padding:8px 16px;border-bottom:1px solid var(--line);background:#fafafa}
.thread-partner{display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid var(--line);text-decoration:none;color:inherit}
.thread-partner:hover{background:#fafafa}
.thread-partner .seller-name{font-weight:600}

/* admin report conversation viewer */
.report-conv{max-height:52vh;overflow-y:auto;margin-top:8px;font-size:13px;line-height:1.5}
.rc-msg{padding:8px 0;display:flex;flex-direction:column}
.rc-head{display:flex;align-items:center;gap:6px;margin-bottom:2px}
.rc-head .avatar{width:22px;height:22px}
.rc-name{font-weight:600;font-size:13px}
.rc-time{color:var(--muted);font-size:11px}
.rc-body{font-size:13px;word-break:break-word;background:#eef1f4;padding:6px 10px;border-radius:10px;display:inline-block;max-width:80%}
.rc-left{align-items:flex-start}
.rc-right{align-items:flex-end}
.rc-right .rc-head{flex-direction:row-reverse}
.rc-right .rc-body{background:var(--brand);color:#fff}
.rc-system{align-items:center;text-align:center;color:var(--muted);font-size:12px}

/* buy-page pagination */
.pager{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;align-items:center;margin:18px 0}
.page-btn{min-width:34px;height:34px;padding:0 8px;border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:8px;cursor:pointer;font-size:13px}
.page-btn:hover:not(:disabled){background:#f0f5ff}
.page-btn.active{background:var(--brand);border-color:var(--brand);color:#fff}
.page-btn:disabled{opacity:.4;cursor:default}
.page-ellipsis{color:var(--muted);padding:0 2px}

/* deleted item shown in recently-viewed (non-clickable) */
.card-deleted{cursor:default;opacity:.85}
/* User Manual: responsive 16:9 YouTube tutorial at the top */
.manual-video{position:relative;width:100%;padding-top:56.25%;margin:0 0 20px;border-radius:12px;overflow:hidden;background:#000}
.manual-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.watch-x{position:absolute;top:6px;right:6px;width:26px;height:26px;border-radius:50%;border:0;background:rgba(0,0,0,.55);color:#fff;font-size:13px;font-weight:700;line-height:26px;padding:0;cursor:pointer}
.card-deleted:hover{box-shadow:none}
.card-suspended{opacity:.55;filter:grayscale(1)}
.suspended-bar{background:#fef2f2;color:var(--err);border-bottom:1px solid var(--err);padding:10px 16px;text-align:center;font-size:13px;font-weight:600}
/* Hot News */
.news-h1{font-size:22px;font-weight:800;margin:4px 0 16px}
.news-list{display:flex;flex-direction:column;gap:14px}
.news-card{display:flex;gap:12px;text-decoration:none;color:inherit;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card,#fff)}
.news-card:hover{box-shadow:0 1px 6px rgba(0,0,0,.08)}
.news-card-cover{width:120px;height:90px;object-fit:cover;flex:0 0 120px;background:var(--line)}
.news-card-nocover{background:var(--line)}
.news-card-body{padding:10px 12px;min-width:0}
.news-card-title{font-weight:700;font-size:15px;margin-bottom:4px}
.news-card-meta{color:var(--muted);font-size:12px;margin-bottom:4px}
.news-card-excerpt{color:var(--muted);font-size:13px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.news-article{max-width:720px;margin:0 auto}
.news-title{font-size:24px;font-weight:800;margin:10px 0 6px;line-height:1.3}
.news-meta{color:var(--muted);font-size:13px;margin-bottom:14px}
.news-disclaimer{color:var(--muted);font-size:12px;font-style:italic;line-height:1.5;margin-bottom:14px}
/* News category tabs + tag */
.news-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 16px}
.news-tab{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 14px;font-size:14px;cursor:pointer;color:var(--ink)}
.news-tab:hover{background:#f3f4f6}
.news-tab.active{background:var(--brand);border-color:var(--brand);color:#fff}
.news-cat-tag{display:inline-block;background:var(--brand);color:#fff;font-size:12px;font-weight:600;padding:2px 10px;border-radius:999px;text-decoration:none;margin-bottom:8px}
.news-cat-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.news-cat-tags .news-cat-tag{margin-bottom:0}
.news-card-cat{display:inline-block;background:#eef1f4;color:var(--brand);font-weight:600;font-size:11px;padding:1px 7px;border-radius:999px;margin-right:6px}
/* News comments */
.news-comments{margin-top:26px;border-top:1px solid var(--line);padding-top:16px}
.news-comments-title{font-size:18px;font-weight:800;margin:0 0 12px}
.comment-composer{display:flex;flex-direction:column;gap:8px;margin-bottom:18px}
.comment-input{width:100%;min-height:70px;resize:vertical}
.comment-composer .btn-primary{align-self:flex-end}
.comment-list{display:flex;flex-direction:column;gap:14px}
.comment-item{display:flex;gap:10px}
.comment-head{display:flex;align-items:center;gap:8px}
.comment-author{font-weight:600;color:var(--ink)}
.comment-time{color:var(--muted);font-size:12px}
.comment-del{margin-left:auto;border:0;background:none;color:var(--muted);font-size:16px;cursor:pointer;line-height:1}
.comment-body{margin-top:2px;white-space:pre-wrap;overflow-wrap:anywhere}
/* Dual-mode news content editor (View / HTML) */
.editor-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:4px 0 0}
.editor-tabs{display:flex;gap:2px}
.editor-tab{border:1px solid var(--line);background:#f3f4f6;padding:5px 12px;cursor:pointer;font-size:13px;border-radius:6px 6px 0 0}
.editor-tab.active{background:#fff;border-bottom-color:#fff;font-weight:600;color:var(--brand)}
.editor-toolbar{display:flex;gap:4px}
.editor-toolbar button{width:30px;height:28px;border:1px solid var(--line);background:#fff;border-radius:6px;cursor:pointer;font-size:14px;line-height:1;padding:0}
.editor-toolbar button:hover{background:#f3f4f6}
.news-editor{min-height:220px;border:1px solid var(--line);border-radius:0 6px 6px 6px;padding:12px;font-size:15px;line-height:1.7;overflow:auto;background:#fff}
.news-editor:focus{outline:none;border-color:var(--brand)}
.news-editor img{max-width:100%;height:auto;border-radius:6px}
/* Source credit line appended to AI-written articles */
.news-attribution{color:var(--muted);font-size:13px;border-top:1px solid var(--line);padding-top:8px;margin-top:16px}
/* Admin news: AI rewrite box + review panel */
.ai-box{border:1px dashed var(--brand);border-radius:10px;padding:10px 14px;margin:0 0 14px;background:#f8faff}
.ai-box summary{cursor:pointer;font-weight:700;color:var(--brand)}
.ai-box textarea{width:100%;min-height:180px}
.ai-panel{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:0 0 14px;background:#fbfbfc}
.ai-status{font-weight:600;margin-bottom:6px}
.ai-badge{display:inline-block;font-size:11px;font-weight:700;padding:2px 7px;border-radius:10px;background:#eef2ff;color:var(--brand);vertical-align:middle}
.ai-badge.ai-review{background:#fff7ed;color:#c2410c}
.ai-badge.ai-failed{background:#fef2f2;color:var(--err)}
.ai-badge.ai-approved{background:#ecfdf5;color:var(--ok)}
.ai-warn{background:#fef2f2;color:var(--err);border-radius:8px;padding:8px 10px;margin:6px 0}
.ai-ok{color:var(--ok);margin:6px 0}
.ai-flags{margin:6px 0;padding-left:18px;color:#b45309}
.ai-flags li{margin:3px 0}
.ai-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.ai-details{margin-top:6px}
/* Item shared into a chat: card in the message bubble */
.item-link-caption{margin-bottom:6px}
.item-link-card{display:flex;align-items:center;gap:10px;min-width:220px;max-width:300px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:10px;color:var(--ink);text-decoration:none}
.item-link-card:hover{border-color:var(--brand)}
.item-link-card.gone{cursor:default}
.item-link-thumb{width:54px;height:54px;border-radius:8px;object-fit:cover;flex:none;display:flex;align-items:center;justify-content:center;background:#eef1f4;font-size:20px}
.item-link-body{min-width:0;flex:1}
.item-link-title{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.item-link-price{color:var(--brand);font-weight:700;font-size:14px;margin-top:2px;display:flex;align-items:center;gap:6px}
.item-link-sold{background:#6b7280;color:#fff;font-size:11px;padding:0 6px;border-radius:4px}
/* Chat picker (send an item to a chat) */
.chat-pick-list{max-height:60vh;overflow:auto}
.chat-pick-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px;background:none;border:0;border-bottom:1px solid var(--line);text-align:left;cursor:pointer;color:var(--ink)}
.chat-pick-row:hover{background:var(--bg)}
.chat-pick-thumb{width:44px;height:44px;border-radius:8px;object-fit:cover;background:#eef1f4;flex:none}
.chat-pick-text{display:flex;flex-direction:column;min-width:0}
.chat-pick-text .meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* "⋮" action menu (admin tables) */
.kebab-btn{background:transparent;border:1px solid transparent;border-radius:8px;width:34px;height:30px;font-size:18px;line-height:1;cursor:pointer;color:var(--muted)}
.kebab-btn:hover,.kebab-btn.open{background:var(--bg);border-color:var(--line);color:var(--ink)}
.kebab-menu{position:fixed;z-index:60;min-width:180px;background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.12);padding:6px 0}
.kebab-item{display:block;width:100%;text-align:left;background:none;border:0;padding:9px 16px;font-size:14px;color:var(--ink);cursor:pointer;white-space:nowrap}
.kebab-item:hover{background:var(--bg)}
.kebab-item.danger{color:var(--err)}
.ai-tr{border-top:1px dashed var(--line);margin-top:12px;padding-top:4px}
.ai-details summary{cursor:pointer;color:var(--muted)}
.ai-details pre{white-space:pre-wrap;word-break:break-word;background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px;max-height:320px;overflow:auto;font-size:13px}
.news-editor:empty::before{content:attr(data-placeholder);color:var(--muted)}
.news-cover{width:100%;border-radius:12px;margin-bottom:16px}
.news-body{font-size:16px;line-height:1.7}
.news-body img{max-width:100%;height:auto;border-radius:8px}
.news-body iframe{max-width:100%;width:100%;aspect-ratio:16/9;border:0;border-radius:8px}
.news-body p{margin:0 0 14px}
.deleted-tag{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.55);color:#fff;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;white-space:nowrap}

/* closed conversation (item deleted) */
.composer-closed{padding:12px 16px;border-top:1px solid var(--line);text-align:center;color:var(--muted);font-size:13px}

/* struck original price on buy cards */
.card .price .was{color:var(--muted);text-decoration:line-through;font-size:.85em;margin-left:6px;font-weight:400}

/* ---- admin statistics ---- */
.stat-cards{display:flex;flex-wrap:wrap;gap:14px;margin-bottom:8px}
.stat-card{flex:1;min-width:180px;background:#f7f8fa;border-radius:12px;padding:14px 16px}
.stat-label{color:var(--muted);font-size:13px}
.stat-value{font-size:26px;font-weight:700;margin:2px 0}
.stat-sub{color:var(--muted);font-size:12px}
.stat-block{margin-top:22px}
.stat-block-title{font-weight:600;font-size:14px;margin-bottom:8px;display:flex;align-items:center;gap:10px}
.stat-block-title .legend{margin-left:auto;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:4px}
.stat-block-title .lg{width:10px;height:10px;border-radius:2px;display:inline-block;margin-left:8px}
.lg-web{background:#2563eb}
.lg-mobile{background:#f59e0b}
.stat-chart-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:10px;padding:10px}
.stat-chart{width:100%;min-width:320px;height:170px;display:block}
.stat-chart .bar-web{fill:#2563eb}
.stat-chart .bar-mobile{fill:#f59e0b}
.stat-chart .bar-label{fill:#9aa3af;font-size:9px}

/* ---- Community (社区) ---- */
.cm-root{max-width:820px;margin:0 auto}
.cm-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:4px 0 14px}
.cm-head-actions{margin-left:auto;display:flex;gap:8px}
.cm-search{display:flex;gap:8px;margin:0 0 14px}
.cm-search-input{flex:1;min-width:0}
.cm-list{display:flex;flex-direction:column;gap:10px}
.cm-card{display:flex;gap:12px;text-decoration:none;color:inherit;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--card,#fff)}
.cm-card:hover{box-shadow:0 1px 6px rgba(0,0,0,.08)}
.cm-card-body{flex:1;min-width:0}
.cm-card-title{font-weight:700;font-size:16px;line-height:1.35;margin-bottom:4px;overflow-wrap:anywhere}
.cm-card-excerpt{color:var(--muted);font-size:13px;line-height:1.45;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cm-card-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;color:var(--muted);font-size:12px}
.cm-card-meta .news-card-cat{margin-right:0}
.cm-card-thumb{width:88px;height:88px;object-fit:cover;border-radius:8px;flex:0 0 88px;background:var(--line)}
.cm-pin{color:#b45309;font-size:12px;font-weight:600;margin-right:6px}
.cm-badge{display:inline-block;font-size:11px;font-weight:600;padding:1px 8px;border-radius:999px;margin-right:6px;vertical-align:middle}
.cm-badge-pending{background:#fef3c7;color:#92400e}
.cm-badge-hidden,.cm-badge-deleted{background:#fee2e2;color:#b91c1c}
.cm-pager{text-align:center;margin:16px 0}
.cm-post{max-width:760px;margin:0 auto}
.cm-post-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px}
.cm-post-tags .news-cat-tag{margin-bottom:0}
.cm-author{display:flex;align-items:center;gap:10px;margin:6px 0 14px}
.cm-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:1.7}
.cm-images{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:14px}
.cm-images img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;cursor:zoom-in;background:var(--line)}
.cm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px}
.cm-staff{margin-left:auto;display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:13px}
.cm-notice{background:#fef3c7;color:#92400e;border-radius:8px;padding:10px 12px;margin:10px 0;font-size:14px}
.cm-notice-err{background:#fee2e2;color:#b91c1c}
.cm-replying{font-size:13px;color:var(--muted);display:flex;align-items:center}
.cm-comment-tools{display:flex;gap:12px;margin-top:4px;font-size:12px}
.cm-comment-tools .btn-link{padding:0;font-size:12px;min-height:0}
.cm-form{max-width:720px;margin:0 auto}
.cm-form textarea{min-height:200px}
.cm-rules{background:#eef6ff;color:#1e3a8a;border-radius:8px;padding:10px 12px;font-size:13px;line-height:1.5}
.cm-photo-grid{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 8px}
.cm-photo{position:relative;width:96px;height:96px}
.cm-photo img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.cm-photo-x{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:50%;border:0;background:#111;color:#fff;cursor:pointer;line-height:1}
@media (max-width:600px){
  .cm-card-thumb{width:72px;height:72px;flex-basis:72px}
  .cm-head-actions{margin-left:0;width:100%}
  .cm-staff{margin-left:0}
}

/* Community rich posts (website editor; HTML cleaned by the server) */
.cm-editor{min-height:260px}
.cm-editor iframe,.cm-html iframe{display:block;width:100%;max-width:640px;aspect-ratio:16/9;border:0;border-radius:8px;margin:8px 0}
.cm-html{white-space:normal}
.cm-html p{margin:0 0 12px}
.cm-html img{max-width:100%;height:auto;border-radius:8px;cursor:zoom-in}
.cm-html h2,.cm-html h3,.cm-html h4{margin:14px 0 8px;line-height:1.35}
.cm-html blockquote{margin:8px 0;padding:6px 12px;border-left:3px solid var(--line);color:var(--muted)}
.cm-html a{color:var(--brand);text-decoration:underline}
.cm-html table{border-collapse:collapse;max-width:100%}
.cm-html td,.cm-html th{border:1px solid var(--line);padding:4px 8px}
.cm-badge-new{background:#fee2e2;color:#b91c1c}

/* Site notice banner (Admin -> Settings), main pages */
.site-notice{display:flex;align-items:flex-start;gap:10px;border-radius:10px;padding:10px 12px;margin:0 0 14px;font-size:14px;line-height:1.5}
.site-notice-info{background:#eff6ff;color:#1e3a8a;border:1px solid #bfdbfe}
.site-notice-warning{background:#fffbeb;color:#92400e;border:1px solid #fcd34d}
.site-notice-icon{font-weight:700;flex:0 0 auto}
.site-notice-text{flex:1;white-space:pre-wrap;overflow-wrap:anywhere}
.site-notice-x{border:0;background:none;color:inherit;font-size:18px;line-height:1;cursor:pointer;padding:0 2px;opacity:.7}
.site-notice-x:hover{opacity:1}
