/* =========================================================
   闲库 · 尾货集市 前台样式（灰色背景 / 白卡 / 中性文字 / 圆角阴影）
   严格对齐定稿效果图
   ========================================================= */

:root {
    --page-bg: #f5f5f5;
    --input-bg: #f0f0f0;
    --bg: var(--page-bg);
    --bg-soft: var(--input-bg);
    --card: #ffffff;
    --ink: #333333;
    --ink-soft: #666666;
    --primary: #ff2442;
    --primary-dark: #e51e3c;
    --orange: #f07d3a;
    --red: #ef2b37;
    --line: #e4e4e4;
    --footer-bg: #171717;
    --footer-bg2: #111111;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .08);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, .06);
    --header-h: 64px;
    --maxw: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--page-bg);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.55;
}

img { max-width: 100%; display: block; }
img[hidden] { display: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* 触摸控件：立即响应点击，禁用双击缩放与旧 WebView 的 300ms 点击延迟，
   避免快速连点被识别成双击缩放而吞掉导航点击（仍保留滚动/捏合缩放）。 */
a, button, input, select, textarea, label, [role="button"] {
    touch-action: manipulation;
}

/* 显隐工具：具体隐藏规则见底部媒体查询，避免被后续 display 覆盖 */

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------------- 吸顶头部 ---------------- */

.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand img {
    width: 42px; height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.desktop-nav { display: none; }

.compact-title {
    flex: 1;
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}
.compact-service { white-space: nowrap; }

.header-search {
    order: 3;
    flex: 1 1 100%;
    position: relative;
    display: flex;
    margin: 0;
}

.header-search input {
    flex: 1;
    border: 1.5px solid var(--line);
    background: var(--bg-soft);
    border-radius: 999px;
    padding: 10px 82px 10px 18px;
    font-size: 15px;
    outline: none;
    min-width: 0;
}
.header-search input:focus { border-color: var(--primary); }

.btn-filter {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 7px 20px;
    border-radius: 999px;
    font-size: 15px;
    white-space: nowrap;
}

/* 返回顶部：右侧悬浮圆形按钮，默认隐藏，滚动后由 JS 加 .show 淡入 */
/* 右侧悬浮工具组容器：固定右侧，纵向排列（电脑端含二维码按钮，所有端含返回顶部） */
.float-tools {
    position: fixed;
    right: 18px;
    bottom: 96px;
    z-index: 180;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* 二维码悬浮项（电脑端显示，手机端隐藏） */
.float-qr-item { position: relative; }
.float-qr-btn {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .72);
    color: var(--ink-soft);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    backdrop-filter: blur(4px);
    transition: box-shadow .2s ease, background .2s ease;
}
.float-qr-btn:hover {
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}
.float-qr-btn svg { width: 24px; height: 24px; }
.float-qr-btn img { width: 26px; height: 26px; object-fit: contain; }

/* hover 弹出的二维码卡片：位于按钮左侧，垂直居中 */
.float-qr-pop {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    width: 168px;
    padding: 12px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.float-qr-item:hover .float-qr-pop,
.float-qr-item:focus-within .float-qr-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
.float-qr-img {
    width: 144px; height: 144px;
    object-fit: contain;
    display: block; margin: 0 auto 8px;
}
.float-qr-pop-label {
    margin: 0; font-size: 13px; font-weight: 600; color: var(--ink);
}

.back-to-top {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .72);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.back-to-top.show {
    opacity: .95;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:active { transform: scale(.92); }
.back-to-top svg { width: 24px; height: 24px; }
.back-to-top img { width: 26px; height: 26px; object-fit: contain; }

.header-user { margin-left: auto; }
.header-phone {
    display: flex; align-items: center; gap: 8px;
    color: var(--ink); font-size: 17px; font-weight: 700;
    white-space: nowrap;
}
.header-phone-icon {
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--primary);
}
.header-phone-icon svg { width: 22px; height: 22px; }
.header-phone-icon img { width: 22px; height: 22px; object-fit: contain; }
.user-link {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--ink);
}
.avatar-dot {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: -webkit-linear-gradient(top left, #f3b183, #e98a4c);
    background: linear-gradient(135deg, #f3b183, #e98a4c);
    color: #fff; font-weight: 600;
}
.avatar-dot.lg { width: 56px; height: 56px; font-size: 22px; }

/* ---------------- 按钮 ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 11px 26px;
    font-size: 15px;
    font-weight: 600;
    border: 1.5px solid transparent;
    white-space: nowrap;
    transition: transform .12s ease, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    background: #fff;
    border-color: #cccccc;
    color: var(--ink);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }

.btn-sm { padding: 7px 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-link { background: none; color: var(--ink-soft); font-weight: 500; }

.btn-submit {
    background: #ff2442;
    color: #fff; padding: 14px;
    box-shadow: 0 8px 20px rgba(255, 36, 66, .28);
}
.btn-submit:hover { background: #e51e3c; }
.btn-purchase {
    background: -webkit-linear-gradient(left, #f53b46, #e01f2b);
    background: linear-gradient(90deg, #f53b46, #e01f2b);
    color: #fff; padding: 14px;
    box-shadow: 0 8px 20px rgba(239, 43, 55, .28);
}

/* ---------------- 闪存 ---------------- */

/* 闪存提示弹窗 */
.flash-modal {
    position: fixed; inset: 0; z-index: 1200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45);
    padding: 32px;
    opacity: 1;
    transition: opacity .25s ease;
}
.flash-modal.hide { opacity: 0; pointer-events: none; }
.flash-modal-card {
    width: 100%; max-width: 300px;
    background: #fff; border-radius: 18px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}
.flash-modal-icon {
    width: 58px; height: 58px; margin: 0 auto 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 700; color: #fff;
}
.flash-modal-icon.is-success { background: var(--primary); }
.flash-modal-icon.is-error { background: #e04646; }
.flash-modal-msg {
    margin: 0 0 6px; font-size: 14.5px; line-height: 1.55;
    color: var(--ink); word-break: break-word;
}
.flash-modal-btn {
    margin-top: 16px;
    width: 100%;
    border: none; border-radius: 12px;
    background: var(--primary); color: #fff;
    font-size: 16px; font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
}
.flash-modal-btn:active { background: var(--primary-dark); }

/* ---------------- 主体留白 ---------------- */

.page-main { padding-top: 20px; padding-bottom: 96px; }

/* ---------------- 列表头 / 时间筛选 ---------------- */

.list-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.list-title { font-size: 20px; margin: 0; font-weight: 700; }

.result-count { color: var(--ink-soft); font-size: 14px; margin: 0; margin-right: auto; white-space: nowrap; }
.result-count[hidden] { display: none; }
.result-count strong { color: var(--primary); }

.range-chips { display: flex; gap: 8px; flex-wrap: nowrap; }
.chip {
    border: 1.5px solid #cccccc;
    background: #fff;
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13.5px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chip.active {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: #fff0f2;
    font-weight: 600;
}

/* ---------------- 首页大容器 ---------------- */

.home-card {
    background: var(--card);
    border-radius: 24px;
    padding: 18px 14px 20px;
    box-shadow: var(--shadow);
}
.home-card .range-chips { margin-bottom: 14px; justify-content: space-between; flex-wrap: nowrap; }
.home-card .chip {
    flex: 1 1 0; min-width: 0;
    padding: 8px 6px;
    overflow: hidden; text-overflow: ellipsis;
}

/* ---------------- 商品网格与卡片 ---------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.product-card {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .2s;
}

.top-badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.45);
    color: #777;
    font-size: 10px;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
    backdrop-filter: blur(2px);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card-img-link { display: block; position: relative; aspect-ratio: 1 / 1; background: #f0f0f0; }
.card-img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.card-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }

.card-desc-link { display: block; }
.card-desc {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--ink);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 2.9em;
    overflow: hidden;
    word-break: break-word;
}
.card-desc-link:hover .card-desc { color: var(--primary-dark); }

.card-actions {
    display: flex; gap: 8px;
    margin-top: 10px;
}
.card-actions .btn {
    flex: 1 1 0;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 13px;
}

/* ---------------- 库存求购信息卡片 ---------------- */

.demand-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.demand-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.pd-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pd-img {
    flex: 0 0 auto;
    width: 72px; height: 72px;
    border-radius: 12px;
    object-fit: cover;
}
.pd-meta { min-width: 0; flex: 1 1 auto; }
.pd-service {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: center;
    white-space: nowrap;
}
.pd-no {
    margin: 0 0 6px;
    font-size: 15px; font-weight: 700; color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-no .pd-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-time {
    margin: 0;
    font-size: 13px; color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-content {
    margin: 14px 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink);
    word-break: break-word;
    /* 固定两行，超出省略号，点击进详情查看全部 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.pd-actions {
    display: flex; gap: 8px;
    margin-top: 12px;
}
.pd-actions .btn {
    /* 不再平分整行撑满，按内容自适应、保持统一最小宽度，左对齐更精致 */
    flex: 0 0 auto;
    min-width: 88px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
}

/* 图片 / 编号 / 描述跳转链接：继承文字样式，无下划线 */
.pd-img-link {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}
.pd-link {
    color: inherit;
    text-decoration: none;
}
.pd-content-link {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.pd-link:hover { color: var(--primary-dark); }

/* ---------------- 加载状态 ---------------- */

.load-state { padding: 48px 4px 16px; }
.list-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
.list-divider.is-clickable { cursor: pointer; }
.list-divider.is-clickable:hover { color: var(--primary); }
.list-divider::before,
.list-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
.list-divider.is-done { cursor: default; }
.list-divider .ld-text { white-space: nowrap; }

/* ---------------- 快速找货 ---------------- */

.quick-find { display: block; }

.condition-panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.cp-head h2 { margin: 0; font-size: 19px; }
.cp-sub { color: var(--ink-soft); font-size: 13px; }
.cp-block { margin-top: 18px; }
.cp-label { font-weight: 600; font-size: 14px; margin: 0 0 10px; }

/* 检索条件三个下拉 */
.cp-select { display: block; margin-bottom: 12px; font-size: 13px; color: #777; font-weight: 500; }
.cp-select select {
    display: block; width: 100%; margin-top: 6px;
    padding: 9px 10px; font-size: 14px; color: #222;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: #fff;
}

/* 货盘检索：三个下拉并排一行、无标题 */
.cp-inline-selects {
    display: flex; gap: 12px; align-items: center;
}
.cp-inline-selects .cp-select { flex: 1; min-width: 0; margin-bottom: 0; }
.cp-inline-selects .cp-select select {
    margin-top: 0; padding: 9px 16px 9px 10px; font-size: 13px;
}

/* 电脑端货盘下拉：现代化版式（自定义箭头、统一高度、悬停聚焦态、选项留白）。
   侧栏仅 380-420px，三个下拉等宽，紧边距保证框内文字完整不被箭头遮挡 */
@media (min-width: 900px) {
    .cp-inline-selects { gap: 10px; }
    .cp-inline-selects .cp-select select {
        height: 42px;
        padding: 0 30px 0 12px;
        font-size: 13px;
        color: #333333;
        border: 1px solid #e2e2e2;
        border-radius: 12px;
        background-color: #ffffff;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        -webkit-appearance: none;
        appearance: none;
        cursor: pointer;
        transition: border-color .15s, box-shadow .15s;
    }
    .cp-inline-selects .cp-select select:hover { border-color: #c9c9c9; }
    .cp-inline-selects .cp-select select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(255, 36, 66, .12);
    }
    .cp-inline-selects .cp-select option {
        padding: 10px 12px;
        min-height: 28px;
        color: #333333;
    }
}

/* 求购条件面板：时间标签的字号、按钮尺寸与快速找货页保持一致 */
.purchase-demands .condition-panel .range-chips {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
}
.purchase-demands .condition-panel .range-chips .chip {
    padding: 7px 14px;
    font-size: 13.5px;
}

.kw-row {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
}
.kw-input {
    flex: 1;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14.5px;
    outline: none;
    background: var(--bg-soft);
    min-width: 0;
}
.kw-input:focus { border-color: var(--primary); }
.kw-clear {
    border: none; background: none; color: var(--ink-soft);
    width: 30px; height: 30px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.kw-clear svg { width: 18px; height: 18px; }

.add-keyword {
    width: 100%;
    border: 1.5px dashed #cccccc;
    background: var(--bg-soft);
    color: #666666;
    border-radius: var(--radius-sm);
    padding: 11px;
    font-size: 14.5px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.add-keyword svg { width: 18px; height: 18px; }
.cp-hint { color: var(--ink-soft); font-size: 13px; margin: 10px 0 0; text-align: center; }
.cp-divider { height: 1px; background: var(--line); margin: 18px 0; }

.order-switch {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: var(--ink-soft);
}
.order-switch select {
    border: 1.5px solid var(--line); border-radius: 999px;
    padding: 7px 12px; background: #fff; color: var(--ink);
    font-size: 13.5px; outline: none;
}

/* ---------------- 发布页 ---------------- */

.publish-banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.publish-banner img { width: 100%; height: auto; }

/* 发布出售：顶部广告图独立一行，原比例自适应（不裁剪、不拉伸） */
.sale-top-banner {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sale-top-banner img { display: block; width: 100%; height: auto; }

/* 手机端横幅：默认显示手机端图、隐藏电脑端顶部图 */
.sale-mobile-banner {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 14px;
}
.sale-mobile-banner img { display: block; width: 100%; height: auto; }
.sale-top-banner { display: none; }
.publish-form { display: flex; flex-direction: column; gap: 14px; }
.sale-col { display: flex; flex-direction: column; gap: 14px; }

.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.card-tag {
    display: inline-flex;
    align-items: center;
    background: #07c160;
    color: #fff;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.card-tag em { color: #ff2442; font-style: normal; margin-left: 6px; line-height: 1; position: relative; top: 2px; }

.form-card textarea,
.form-card input[type="text"],
.form-card input[type="tel"] {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-soft);
    outline: none;
    resize: vertical;
}
.form-card textarea:focus, .form-card input:focus { border-color: var(--primary); }

.desc-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px; gap: 10px;
}
.char-count { text-align: right; color: var(--ink-soft); font-size: 13px; margin: 0; flex: 0 0 auto; }
.field-hint { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.field-error { margin: 6px 0 0; font-size: 12.5px; color: var(--primary); }

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px dashed #cccccc;
    border-radius: var(--radius-sm);
    padding: 34px 16px;
    background: var(--bg-soft);
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
}
.upload-box:hover, .upload-box.dragover {
    border-color: var(--primary);
    background: #fff1f3;
}
.upload-icon { color: var(--ink-soft); }
.upload-icon svg { width: 40px; height: 40px; }
.upload-icon img { width: 40px; height: 40px; object-fit: contain; }
.upload-title { font-size: 17px; font-weight: 600; }
.upload-tip { color: var(--ink-soft); font-size: 13.5px; }
.upload-msg {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--primary-dark);
    text-align: center;
    min-height: 18px;
}
.upload-box.pasted {
    border-color: var(--primary);
    background: #fff0f2;
    box-shadow: 0 0 0 4px rgba(255, 36, 66, .15);
}

/* 批量上传页：Excel 选择框 */
.excel-pick {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border: 1.5px dashed #cccccc;
    border-radius: var(--radius-sm);
    padding: 20px 16px;
    background: var(--bg-soft);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.excel-pick:hover { border-color: var(--primary); background: #fff1f3; }
.excel-pick-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary); color: #fff;
    border-radius: 999px; padding: 9px 18px;
    font-size: 14px; font-weight: 600; white-space: nowrap;
}
.excel-pick-btn svg { width: 18px; height: 18px; }
.excel-pick-name { color: var(--ink-soft); font-size: 13.5px; word-break: break-all; }

/* 批量上传页：顶部留白；方形（1:1）上传框，按钮与描述固定 2 行、整体居中 */
.batch-form .publish-banner { margin-top: 14px; }
.batch-form .excel-pick {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 320px;
    padding: 24px 20px;
}
.batch-form .excel-pick-btn { flex: 0 0 auto; }
.batch-form .excel-pick-name {
    margin: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* 批量上传提交加载遮罩 */
.batch-loading {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45);
    padding: 32px;
}
.batch-loading[hidden] { display: none; }
.batch-loading-card {
    background: #fff; border-radius: 16px;
    padding: 28px 30px; text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
    min-width: 180px;
}
.batch-loading-card p { margin: 14px 0 0; font-size: 14px; color: var(--ink); }
.batch-spinner {
    display: inline-block;
    width: 38px; height: 38px;
    border: 3.5px solid #f0d2d7;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: batchspin .8s linear infinite;
}
@keyframes batchspin { to { transform: rotate(360deg); } }
.form-perm-alert {
    background: #fdeaea; border: 1px solid #f5c2c5; color: #b4232c;
    border-radius: var(--radius-sm);
    padding: 12px 16px; font-size: 14px;
    margin: 0 0 16px;
}
.upload-preview {
    position: absolute; inset: 8px;
    width: calc(100% - 16px); height: calc(100% - 16px);
    object-fit: cover; border-radius: var(--radius-sm);
}

.remark-card { /* 备注独立白卡 */ }
.submit-wrap {
    width: 100%;
    max-width: 620px;
    margin: 28px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.submit-tip { color: var(--ink-soft); font-size: 13.5px; text-align: center; margin: 10px 0 0; width: 100%; }

.agree-check {
    display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; justify-content: center;
    font-size: 14px; color: var(--ink-soft);
    margin: 14px 0 0;
    text-align: center;
    white-space: nowrap;
}
.agree-check input { margin: 0; flex: 0 0 auto; }
.agree-check span { white-space: nowrap; flex: 0 0 auto; }
.agree-check a { color: var(--primary-dark); white-space: nowrap; }

/* 发布成功弹窗 */
.result-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45);
    padding: 32px;
    opacity: 1;
    transition: opacity .25s ease;
}
.result-modal.hide { opacity: 0; pointer-events: none; }
.result-modal-card {
    width: 100%; max-width: 300px;
    background: #fff; border-radius: 18px;
    padding: 30px 24px 26px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}
.result-modal-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
}
.result-modal-icon.is-success { background: var(--primary); }
.result-modal-icon.is-error { background: #f5a623; }
.result-modal-title { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); }
.result-modal-sub { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* 游客登录提示弹窗 */
.guest-modal {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45);
    padding: 32px;
    opacity: 1;
    transition: opacity .25s ease;
}
.guest-modal.hide { opacity: 0; pointer-events: none; }

/* 分享弹窗 */
.share-guide {
    position: fixed; inset: 0; z-index: 1100;
    display: none;
}
.share-guide.show { display: block; }
.sg-mask {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .55);
}
.sg-panel {
    position: absolute; top: 14px; right: 14px;
    display: flex; flex-direction: column; align-items: flex-end;
    max-width: 260px;
}
.sg-arrow {
    width: 96px; height: 96px;
    margin-right: 6px;
}
.sg-bubble {
    background: #fff; border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.sg-text {
    margin: 0; font-size: 14px; line-height: 1.55;
    color: var(--ink); font-weight: 500;
}
.guest-modal-card {
    position: relative;
    width: 100%; max-width: 300px;
    background: #fff; border-radius: 16px;
    padding: 26px 24px 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}
.guest-close {
    position: absolute; top: 8px; right: 12px;
    width: 30px; height: 30px;
    border: none; background: transparent;
    font-size: 24px; line-height: 1; color: #1a1a1a;
    cursor: pointer; padding: 0;
}
.guest-title {
    margin: 0 0 20px;
    font-size: 20px; font-weight: 700; color: #1a1a1a;
    text-align: center;
}
.guest-btn {
    display: block; width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 16px; font-weight: 600;
    text-align: center; line-height: 1.2;
    box-sizing: border-box;
}
.guest-btn-solid {
    background: #ff2442; color: #fff;
    box-shadow: 0 6px 16px rgba(255, 36, 66, .22);
}
.guest-btn-solid:hover { background: #e51e3c; }
.guest-btn-outline {
    margin-top: 14px;
    background: #fff; color: #ff2442;
    border: 1.5px solid #ff2442;
}
.guest-btn-outline:hover { background: #fff0f2; }

/* 咨询/客服统一弹窗 */
.service-modal {
    position: fixed; inset: 0; z-index: 1150;
    display: none; align-items: center; justify-content: center;
    padding: 32px;
}
.service-modal.show { display: flex; }
.service-modal-mask {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .5);
}
.service-modal-card {
    position: relative;
    width: 100%; max-width: 300px;
    background: #fff; border-radius: 18px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}
.service-modal-x {
    position: absolute; top: 8px; right: 12px;
    width: 30px; height: 30px;
    border: none; background: transparent;
    font-size: 24px; line-height: 1; color: var(--ink-soft);
    cursor: pointer; padding: 0;
}
.service-modal-title {
    margin: 0 0 12px;
    font-size: 18px; font-weight: 700;
    color: var(--ink); text-align: center;
}
.service-modal-text.service-modal-text-top { margin-bottom: 14px; color: var(--ink-soft); }
.service-modal-qr {
    width: 180px; height: 180px;
    margin: 0 auto 14px;
    object-fit: contain;
    border-radius: 8px;
}
.service-modal-text {
    margin: 0; font-size: 14px; line-height: 1.6;
    color: var(--ink); text-align: center;
}

/* 求购 */
.purchase-form { display: flex; flex-direction: column; gap: 14px; }
.purchase-col { display: flex; flex-direction: column; gap: 14px; }
.purchase-info-title { margin: 0 0 16px; font-size: 19px; }
.row-card {
    display: flex; align-items: center; gap: 12px;
    padding: 0 0 14px;
}
.row-card + .row-card { border-top: 1px solid var(--line); padding-top: 14px; }
.row-label { font-weight: 600; white-space: nowrap; min-width: 76px; }
.row-card input { flex: 1; }
.text-card textarea { min-height: 180px; }
.info-card .btn-purchase { margin-top: 18px; }

/* ---------------- 详情页 ---------------- */

.detail-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 15px; color: var(--ink-soft);
    margin-bottom: 16px;
    text-decoration: none;
}
.detail-back svg { width: 22px; height: 22px; }
.detail-back img { width: 22px; height: 22px; object-fit: contain; }
.detail-back:hover { color: var(--primary-dark); }

.detail-banner {
    border-radius: var(--radius); overflow: hidden;
    margin-top: 16px;
    margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.status-badge {
    background: #fff7e6; border: 1px solid #f0d9a8;
    color: #9a6b20; border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 14px; margin: 0 0 14px;
}
.status-rejected { background: #fdeaea; border-color: #f5c2c5; color: #b4232c; }

.detail-focus-card { display: none; }

.detail-info { margin-bottom: 16px; }
.detail-desc { font-size: 16.5px; margin: 0 0 14px; }
.detail-divider { height: 1px; background: var(--line); margin-bottom: 14px; }
.detail-meta { margin: 6px 0; color: var(--ink); font-size: 14.5px; }

.detail-image-card { padding: 14px; margin-bottom: 16px; }
.detail-product-img {
    width: 100%; height: auto; display: block;
    border-radius: var(--radius-sm);
}

/* 手机端浮动操作条 */
.detail-actions {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--line);
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 2px;
}
.da-item {
    flex: 0 0 auto;
    width: 50px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: none; border: none;
    color: var(--ink); font-size: 12px;
    padding: 0;
}
.da-item svg { width: 23px; height: 23px; }
.da-item img { width: 23px; height: 23px; object-fit: contain; }
.da-item.on { color: var(--primary); }
.da-cta {
    flex: 1 1 auto;
    display: flex;
    border-radius: 999px;
    overflow: hidden;
    margin-left: 6px;
}
.da-cta-half {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; font-weight: 600;
    padding: 12px 8px;
    line-height: 1;
}
.da-cta-half.is-green { background: #07c160; }
.da-cta-half.is-red { background: var(--primary); }
.da-cta-half:active { opacity: .88; }

/* ---------------- 会员中心 ---------------- */

.member-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    display: flex; flex-direction: column; gap: 12px;
}
.mc-head { display: flex; gap: 14px; align-items: center; }
.mc-avatar {
    width: 56px; height: 56px;
    border-radius: 14px; object-fit: cover;
    background: var(--bg-soft);
}
.mc-id-lines { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mc-line1 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.mc-line2 { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.mc-head h2 { margin: 0; font-size: 19px; }
.level-tag {
    background: #fff1e2; color: #c96a28;
    border-radius: 999px; padding: 2px 10px; font-size: 12px;
    margin-left: 6px;
}
.mc-meta p { margin: 4px 0; font-size: 14px; color: var(--ink-soft); }
.member-card .btn { margin-top: 4px; }

.mp-row {
    display: flex; gap: 12px; align-items: center;
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}
.mp-row img { border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.mp-info { flex: 1; min-width: 0; }
.mp-desc { margin: 0 0 6px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-sub { margin: 0; font-size: 12.5px; color: var(--ink-soft); display: flex; gap: 8px; align-items: center; }
.status-pill { border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.st-approved { background: #fde9ec; color: #c81e30; }
.st-pending { background: #fff7e6; color: #9a6b20; }
.st-rejected { background: #fdeaea; color: #b4232c; }
.st-offline { background: #f0ece6; color: #7a6a55; }
.mp-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.mp-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
.empty-tip { color: var(--ink-soft); font-size: 14px; }
.fav-group-title {
    font-size: 16px; font-weight: 700; color: var(--ink);
    margin: 22px 0 14px;
}

/* ---------------- 认证页 ---------------- */

.auth-page {
    max-width: 440px; margin: 20px auto 0;
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px 22px;
    box-shadow: var(--shadow);
}
.auth-title { margin: 0 0 20px; font-size: 22px; text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .btn-block { margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.optional-tag {
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    color: #999;
}
.field input {
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    padding: 11px 14px; font-size: 15px; font-weight: 400;
    background: var(--bg-soft); outline: none;
}
.field input:focus { border-color: var(--primary); }
.auth-switch { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 4px 0 0; }
.auth-switch a { color: var(--primary-dark); }
.auth-switch .sep { margin: 0 8px; }
.auth-agree { margin-top: 12px; margin-bottom: 2px; }

.cms-page { padding: 24px; }
.cms-content { margin-top: 14px; font-size: 15px; color: var(--ink); }
.page-updated { color: var(--ink-soft); font-size: 13px; margin-top: 18px; }

.not-found { text-align: center; padding: 60px 0; }
.not-found h1 { font-size: 64px; margin: 0; color: var(--primary); }
.not-found p { color: var(--ink-soft); margin: 10px 0 22px; }

/* ---------------- 页脚 ---------------- */

/* ---------------- 底部区域（手机用全局背景 / PC 深色，分版） ---------------- */
.site-footer {
    flex-shrink: 0;
}

/* 手机端底部：沿用全局灰色背景，无黑色块 */
.footer-mobile { padding: 20px 14px 96px; }
.m-footer-links {
    display: flex; flex-wrap: nowrap; justify-content: center;
    gap: 18px; margin: 0 0 10px;
}
.m-footer-links a {
    color: var(--ink-soft);
    font-size: 13px;
    white-space: nowrap;
    flex: 0 0 auto;
}
.m-copyright {
    margin: 0; text-align: center;
    color: #999999;
    font-size: 12px;
}

/* PC 端底部：深色背景仅作用于 PC 板块 */
.footer-pc {
    background: -webkit-linear-gradient(top, var(--footer-bg), var(--footer-bg2));
    background: linear-gradient(180deg, var(--footer-bg), var(--footer-bg2));
    color: rgba(255, 255, 255, .78);
}
.footer-inner { margin: 0 auto; max-width: var(--maxw); padding: 52px 32px 26px; }
.footer-top {
    display: flex; gap: 40px; justify-content: space-between;
    align-items: flex-start;
}
.brand-block { flex: 1; min-width: 0; }
.brand-head { display: flex; align-items: stretch; gap: 14px; }
.logo-wrap {
    align-self: stretch; display: flex; flex-shrink: 0;
}
.footer-logo {
    height: 53px; width: auto; display: block;
    border-radius: 14px;
}
.brand-text {
    display: flex; flex-direction: column; justify-content: space-between;
    min-width: 0; flex: 1;
}
.footer-brand-title {
    color: #fff; font-size: 22px; font-weight: 700; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-desc {
    color: rgba(255, 255, 255, .55); font-size: 15px;
    line-height: 1.4; margin: 6px 0 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-links {
    display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 26px;
}
.brand-links a { color: rgba(255, 255, 255, .72); font-size: 15px; }
.brand-links a:hover { color: #fff; }
.qrcode-grid {
    display: grid; grid-template-columns: repeat(3, minmax(96px, 1fr));
    gap: 22px; flex-shrink: 0;
}
.qrcode-item { text-align: center; }
.qrcode-image {
    background: #fff; border-radius: 12px; display: block;
    width: 96px; height: 96px; object-fit: cover; margin: 0 auto 10px;
}
.qrcode-label { color: rgba(255, 255, 255, .64); font-size: 14px; }
.footer-divider { background: rgba(255, 255, 255, .08); height: 1px; margin: 40px 0 24px; }
.footer-bottom { display: flex; justify-content: center; }
.copyright {
    margin: 0; text-align: center; color: rgba(255, 255, 255, .45); font-size: 14px;
}
.icp-link {
    color: inherit; font-size: inherit; font-weight: inherit;
    text-decoration: none;
}
.icp-link:hover { color: inherit; text-decoration: none; }

/* ---------------- 手机底部导航 ---------------- */

.mobile-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    background: rgba(255, 255, 255, .98);
    border-radius: 0;
    border-top: 1px solid rgba(0, 0, 0, .07);
    box-shadow: 0 -3px 12px rgba(0, 0, 0, .07);
    padding: 9px 6px;
    padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px));
    transition: transform .2s ease;
}
/* 软键盘弹出时导航移出屏幕，不浮动到键盘上方 */
.mobile-nav.keyboard-hidden {
    transform: translateY(110%);
}
.mobile-nav-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    font-size: 12px; color: var(--ink-soft);
    -webkit-tap-highlight-color: transparent;
}
.mobile-nav-item svg { width: 23px; height: 23px; }
.mobile-nav-item img { width: 23px; height: 23px; object-fit: contain; }
.mobile-nav-item.active {
    color: var(--primary);
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}

/* 「发布需求」：红底白色加粗加号，外围白色圆形平台（硬边纯色，边界与导航上边界一致），底部与其他图标齐平、向上凸起，文字同行（参考微信截图） */
.mobile-nav-item.has-icon-plus svg {
    width: 40px; height: 40px;
    padding: 9px;
    margin-top: -17px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 0 9px #fff;
}
.mobile-nav-item.has-icon-plus svg path { stroke-width: 3; }

/* 中间加号若上传自定义图片：保持凸起位置与白色圆形平台，不强制红底，完整显示图标 */
.mobile-nav-item.has-icon-plus img {
    width: 40px; height: 40px;
    margin-top: -17px;
    border-radius: 50%;
    box-shadow: 0 0 0 9px #fff;
    object-fit: contain;
    background: transparent;
}

/* =========================================================
   手机端头部模式
   ========================================================= */

@media (max-width: 899px) {
    /* 手机端隐藏桌面元素（强制，防止被其他 display 覆盖） */
    .desktop-only { display: none !important; }

    /* 首页头部：logo 与搜索同一行，搜索铺满到右边界，筛选按钮内嵌在搜索框中 */
    .topbar { flex-wrap: nowrap; gap: 16px; min-width: 0; }
    .brand { flex: 0 0 auto; }
    .header-search {
        order: 0; flex: 1 1 auto; min-width: 0;
        background: var(--bg-soft);
        border: 1.5px solid var(--line);
        border-radius: 999px;
        padding: 3px 3px 3px 14px;
        gap: 6px;
        overflow: hidden;
    }
    .header-search input {
        flex: 1; min-width: 0;
        border: none; background: transparent;
        border-radius: 0; padding: 7px 4px;
    }
    .header-search input:focus { border-color: transparent; }
    .btn-filter { position: static; transform: none; flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; }
    /* 手机端：工具组上移避让固定底部导航；二维码按钮仅电脑端显示，手机端隐藏 */
    .float-tools {
        right: 14px;
        bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    }
    .float-qr-item { display: none; }
    .back-to-top {
        width: 38px;
        height: 38px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    }
    .back-to-top svg { width: 18px; height: 18px; }
    .back-to-top img { width: 20px; height: 20px; }

    /* 紧凑模式：隐藏全局搜索，显示标题与清空 */
    body.mode-compact .header-search { display: none; }
    body.mode-compact .header-user { display: none; }
    body.mode-compact .topbar { flex-wrap: nowrap; }

    /* 无头部模式：发布页、详情页、认证页手机端不显示吸顶头部 */
    body.mode-bare .site-header,
    body.mode-bare-detail .site-header,
    body.mode-member .site-header,
    body.mode-auth .site-header { display: none; }

    /* 会员中心手机端无顶部导航，子页标题通栏贴顶，像 app 导航栏（突破容器左右 16px 留白） */
    body.mode-member .mc3-sub-bar {
        top: 0; border-radius: 0;
        margin-left: -16px; margin-right: -16px;
        padding-left: 16px; padding-right: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    /* 协议勾选行强制单行：缩小字号与间距，保证 320px 也能放下 */
    .agree-check { font-size: 11px; gap: 4px; }

    /* 注册/登录卡片：收紧间距，保证整屏显示完整、无需滚动 */
    .auth-page {
        margin-top: 12px;
        padding: 18px 16px;
    }
    .auth-title { margin-bottom: 12px; font-size: 20px; }
    .auth-form { gap: 9px; }
    .field { gap: 4px; }
    .field input { padding: 9px 12px; }
    .auth-agree { margin-top: 5px; margin-bottom: 0; }

    /* 详情页用专属操作条，隐藏全局导航 */
    body.mode-bare-detail .mobile-nav { display: none; }
    body.mode-bare-detail .page-main { padding-top: 0; }
    body.mode-bare .page-main,
    body.mode-bare-detail .page-main { padding-top: 0; }
    /* 预览页 bare 模式：为返回键与货盘编号补出顶部间距 */
    body.mode-bare .sheet-preview-page { padding-top: 18px; }
    /* 急售页 bare 模式：手机端顶部广告图与顶部留间隔 */
    body.mode-bare .urgent-page { padding-top: 16px; }

    /* 横幅固定高度，避免按钮遮挡文字 */
    .purchase-col-left .purchase-banner { margin-top: 16px; }
    .purchase-banner img {
        height: auto; object-fit: initial; object-position: initial;
    }
    .detail-banner img { height: auto; }

    /* 快速找货：缩小「发布时间」顶部间距，首块不重复加上边距；清空链接与按钮贴近 */
    .condition-panel .cp-block-first { margin-top: 0; }
    .condition-panel .btn-link[data-role="clear-all"] { margin-top: 2px; }

    /* 货盘三个下拉：固定一行不换行，等宽收缩，紧边距小字号，尽量完整显示文字 */
    .cp-inline-selects { flex-wrap: nowrap; gap: 6px; }
    .cp-inline-selects .cp-select { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
    .cp-inline-selects .cp-select select {
        width: 100%; min-width: 0;
        padding: 8px 4px; font-size: 12px;
        white-space: nowrap;
    }

    /* 时间标签：4 个按钮固定一行（不换行），等宽收缩，文字省略不撑破卡片 */
    .condition-panel .range-chips,
    .home-card .range-chips { flex-wrap: nowrap; gap: 8px; }
    .condition-panel .range-chips .chip,
    .home-card .range-chips .chip {
        flex: 1 1 0; min-width: 0;
        padding-left: 6px; padding-right: 6px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        justify-content: center;
    }

    /* 关键词行：输入框与清除按钮宽度兜底，防止旧内核撑破卡片 */
    .kw-row { flex-wrap: nowrap; gap: 8px; }
    .kw-input { width: 100%; max-width: 100%; min-width: 0; }
    .kw-clear { flex: 0 0 30px; }

    /* 筛选卡片：横向溢出隐藏，避免旧内核把内部元素撑出卡片边界 */
    .condition-panel { max-width: 100%; overflow-x: hidden; }

    /* 旧 X5 内核（百度/QQ/UC）：flex gap 支持不全，用项 margin 兜底间距 */
    .ua-x5 .cp-inline-selects .cp-select,
    .ua-x5 .condition-panel .range-chips .chip { margin: 4px; }
}


/* ---------------- 发布选择页 ---------------- */
.pubc-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
}
/* 手机端：只显示手机端广告图（顶部），电脑端广告图隐藏 */
.pubc-banner-mobile { display: block; margin-bottom: 14px; }
.pubc-banner-desktop { display: none; }
.pubc-banner a { display: block; }
.pubc-banner-mobile img {
    width: 100%; height: auto; display: block;
    border-radius: 18px;
}
.pubc-list {
    display: flex; flex-direction: column; gap: 14px;
}
.pubc-card {
    display: flex; align-items: center; gap: 14px;
    background: #fff;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
    border: 1px solid rgba(0, 0, 0, .03);
    transition: transform .2s, box-shadow .2s;
}
a.pubc-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
a.pubc-card:active { transform: translateY(-1px); }
.pubc-icon {
    flex: 0 0 auto;
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
}
.pubc-text { min-width: 0; }
.pubc-title {
    margin: 0 0 4px;
    font-size: 18px; font-weight: 700; color: var(--ink);
}
.pubc-desc {
    margin: 0; font-size: 13.5px; color: var(--ink-soft);
}

/* 手机端：底部链接与版权居中，位于 4 项卡片与底部导航之间（仅作用于发布选择页） */
@media (max-width: 899px) {
    body.pubc-choice {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        box-sizing: border-box;
        /* 为固定底部导航及中间凸起发布按钮预留空间，避免页脚/版权被遮挡 */
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }
    body.pubc-choice .page-main {
        padding-top: 14px;
        padding-bottom: 0;
        flex: 0 0 auto;
    }
    body.pubc-choice .site-footer {
        margin-top: 40px;        /* 与上方卡片保持固定间距，不再 auto 居中 */
        margin-bottom: 0;
    }
    body.pubc-choice .footer-mobile {
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* 电脑端：左侧广告图 + 右侧 4 项，左右精确等高、上下边界对齐 */
@media (min-width: 900px) {
    .pubc-page {
        max-width: 1000px;
        display: grid;
        grid-template-columns: 1fr 1.05fr;
        gap: 20px;
        align-items: stretch;       /* 行高由右侧列表决定，左侧拉伸到相同高度 */
    }
    .pubc-page.no-desktop-banner {
        grid-template-columns: 1fr;
    }
    .pubc-banner {
        min-width: 0;
        display: flex;              /* flex 容器，高度由网格行决定 */
    }
    .pubc-banner-mobile { display: none; }
    .pubc-banner-desktop {
        display: flex;             /* 覆盖基础 display:none，并作为内部图片的定位容器 */
        flex: 1 1 auto;
        min-width: 0;
        min-height: 0;
        position: relative;
        border-radius: 18px;
        overflow: hidden;
    }
    .pubc-banner-desktop img {
        position: absolute;         /* 绝对定位，不撑高自身，行高完全由右侧决定 */
        inset: 0;
        width: 100%; height: 100%;
        object-fit: cover;          /* 填满等高框，按框裁剪、不拉伸变形 */
    }
    .pubc-list { gap: 16px; }
    .pubc-card { gap: 18px; padding: 20px 22px; }
    .pubc-icon { width: 64px; height: 64px; }
    .pubc-title { font-size: 20px; }
    .pubc-desc { font-size: 14.5px; }
}

/* =========================================================
   桌面端（≥ 900px）
   ========================================================= */

@media (min-width: 900px) {

    :root { --header-h: 70px; }

    .top-badge {
        right: 8px;
        bottom: 8px;
        font-size: 12px;
        padding: 5px 10px;
        border-radius: 6px;
    }

    .mobile-only { display: none !important; }

    .topbar { flex-wrap: nowrap; padding-top: 14px; padding-bottom: 14px; gap: 16px; }
    .desktop-nav {
        display: flex; align-items: center; gap: 22px;
        flex: 1 1 auto; min-width: 0;
    }
    .nav-link {
        display: flex; align-items: center; gap: 6px;
        font-size: 15px; color: var(--ink-soft);
        padding: 6px 2px;
        white-space: nowrap;
        border-bottom: 2px solid transparent;
    }
    .nav-link svg { width: 19px; height: 19px; }
    .nav-link img { width: 19px; height: 19px; object-fit: contain; }
    .nav-link:hover { color: var(--ink); }
    .nav-link.active { color: var(--primary-dark); font-weight: 700; border-bottom-color: var(--primary); }
    /* 「发布需求」：普通灰色加号，无底色无圆框；选中时文字跟随变红 */
    .nav-link.has-icon-plus { color: var(--ink-soft); }
    .nav-link.has-icon-plus svg { background: none; border-radius: 0; box-shadow: none; padding: 0; }
    .nav-link.has-icon-plus.active { color: var(--primary-dark); }

    /* 注册页电脑端：卡片加宽，左右两栏。左=联系人/密码/微信号，右=手机号/确认密码/邮箱；按钮与协议整行 */
    .register-page { max-width: 720px; }
    .register-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
    .register-form .field:nth-of-type(1) { grid-column: 1; grid-row: 1; }
    .register-form .field:nth-of-type(2) { grid-column: 2; grid-row: 1; }
    .register-form .field:nth-of-type(3) { grid-column: 1; grid-row: 3; }
    .register-form .field:nth-of-type(4) { grid-column: 1; grid-row: 2; }
    .register-form .field:nth-of-type(5) { grid-column: 2; grid-row: 2; }
    .register-form .field:nth-of-type(6) { grid-column: 2; grid-row: 3; }
    .register-form input[type="hidden"],
    .register-form .btn-block,
    .register-form .auth-switch,
    .register-form .auth-agree { grid-column: 1 / -1; }

    .header-search { order: initial; flex: 0 1 320px; min-width: 200px; }
    .header-user { margin-left: 0; flex: 0 0 auto; }

    .page-main { padding-top: 30px; padding-bottom: 40px; }

    /* 首页大容器在桌面透明 */
    .home-card {
        background: transparent;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    .card-desc { font-size: 14.5px; }

    /* 快速找货：左右分栏 */
    .quick-find {
        display: grid;
        grid-template-columns: 340px 1fr;
        gap: 28px;
        align-items: start;
    }
    .condition-panel { margin-bottom: 0; position: sticky; top: 96px; }
    .find-results .product-grid { grid-template-columns: repeat(3, 1fr); }

    /* 库存求购信息：左右分栏，右侧求购卡片两列 */
    .purchase-demands {
        display: grid;
        grid-template-columns: 340px 1fr;
        gap: 28px;
        align-items: start;
    }
    .purchase-demands .condition-panel { margin-bottom: 0; position: sticky; top: 96px; }
    .find-results .demand-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

    /* 发布出售：两栏 */
    .publish-page, .purchase-page { max-width: 1080px; margin: 0 auto; }
    .publish-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        align-items: stretch;
    }
    .sale-top-banner { grid-column: 1 / -1; display: block; }
    .sale-mobile-banner { display: none; }
    .sale-col-left { grid-column: 1; }
    .sale-col-right { grid-column: 2; }
    .submit-wrap { grid-column: 1 / -1; max-width: 620; margin: 28px auto 0; }
    .sale-col-left .form-card textarea { min-height: 260px; }

    /* 批量上传页：单栏居中，不套用双列栅格 */
    .batch-page { max-width: 720px; }
    .publish-form.batch-form {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    /* 电脑端：上传背景框改为 3:1（手机端仍为 1:1） */
    .batch-form .excel-pick {
        aspect-ratio: 3 / 1;
        min-height: 220px;
    }
    /* 加大“立即上传”按钮与背景框之间的间距 */
    .batch-form .submit-wrap { max-width: none; margin: 24px 0 0; }

    /* 左右两列等高：右栏产品图框自动撑高，与左栏库存描述总高度一致、上下边界对齐 */
    .sale-col { height: 100%; }
    .sale-col-right > .form-card:first-child {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .sale-col-right > .form-card:first-child .card-tag { align-self: flex-start; }
    .sale-col-right > .form-card:first-child .upload-box { flex: 1 1 auto; }

    /* 左列库存描述卡片撑满列容器，与右列两卡总高度一致、底部对齐，整体方正 */
    .sale-col-left { display: flex; flex-direction: column; min-width: 0; }
    .sale-col-left .form-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .sale-col-left .form-card .card-tag { align-self: flex-start; }
    .sale-col-left .form-card textarea { flex: 1 1 auto; }

    /* 发布求购：两栏 */
    .purchase-form {
        display: grid;
        grid-template-columns: 1.15fr 1fr;
        gap: 18px;
        align-items: stretch;
    }
    .purchase-col { height: 100%; }
    .purchase-col-right .info-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
    }
    .purchase-col-right .info-card .purchase-info-title { margin-bottom: 0; }
    .purchase-col-right .info-card .row-card {
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 16px 18px;
        background: var(--card);
    }
    .purchase-col-right .info-card .row-card + .row-card {
        border-top: 1px solid var(--line);
        padding-top: 16px;
        margin-top: 4px;
    }
    .purchase-col-right .info-card .row-card input {
        background: transparent;
        border: none;
        text-align: right;
        padding: 0;
    }
    .purchase-col-right .info-card .btn-purchase { margin-top: 0; }
    .purchase-col-right .info-card .submit-tip { margin-bottom: 0; }

    /* 详情：居中聚焦卡片 */
    .detail-page { max-width: 1080px; margin: 0 auto; }
    .detail-banner { display: none; }

    .detail-focus-card {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        gap: 32px;
        padding: 30px;
        margin-bottom: 20px;
        align-items: center;
    }
    .detail-focus-card .desktop-img {
        width: 100%; height: auto; display: block;
        border-radius: var(--radius-sm);
    }
    .detail-tag {
        display: inline-block;
        background: var(--primary);
        color: #fff;
        font-size: 13px;
        padding: 5px 14px;
        border-radius: 999px;
        margin-bottom: 14px;
    }
    .detail-meta-box {
        background: var(--bg-soft);
        border-radius: var(--radius-sm);
        padding: 12px 16px;
        margin-bottom: 14px;
    }
    .detail-meta-box .detail-meta { margin: 4px 0; }
    .detail-icon-actions {
        display: flex; gap: 22px;
        margin-bottom: 18px;
    }
    .detail-icon-actions .da-item {
        flex: 0 0 auto; width: auto;
        flex-direction: row;
        font-size: 13.5px;
        gap: 6px; white-space: nowrap;
    }
    .detail-icon-actions .da-item svg { width: 20px; height: 20px; }
    .detail-btn-actions { display: flex; gap: 12px; }
    .detail-btn-actions .btn { flex: 1; }

    .mobile-nav { display: none; }

    /* 会员中心两栏 */
    .member-center { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
    .member-card { margin-bottom: 0; position: sticky; top: 96px; }
    .mp-actions { flex-direction: row; }
}

@media (min-width: 1500px) {
    .product-grid { gap: 24px; }
}

/* ---------------- 分页控件 ---------------- */

.pagination-wrap {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.pg-item {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 14px;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}
.pg-item:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}
.pg-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.pg-item.disabled {
    color: #bbbbbb;
    background: #f7f7f7;
    cursor: not-allowed;
    pointer-events: none;
}
.pg-ellipsis {
    color: #999;
    padding: 0 2px;
}
.no-result-tip {
    text-align: center;
    color: var(--ink-soft);
    font-size: 14px;
    padding: 40px 16px;
}

@media (max-width: 767px) {
    .pagination-wrap { margin-top: 20px; }
    .pagination { gap: 6px; }
    .pg-item {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 13px;
        border-radius: 9px;
    }
    .pg-prev, .pg-next { padding: 0 10px; }
}

/* ---------------- 点击复制 ---------------- */
.copyable { cursor: pointer; transition: color .15s; }
.copyable:hover { color: var(--primary); }
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 88px;
    transform: translateX(-50%) translateY(12px);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
    max-width: 80vw;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== Excel 表格模块 ==================== */

/* ---- 清单页 Hero ---- */
.sheet-hero {
    position: relative;
    overflow: hidden;
    margin-top: -20px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 30px 16px 40px;
    background: -webkit-linear-gradient(top left, #ff2442 0%, #ff4d6d 55%, #ff6b8a 100%);
    background: linear-gradient(135deg, #ff2442 0%, #ff4d6d 55%, #ff6b8a 100%);
    color: #fff;
}
.sheet-hero::before {
    content: ""; position: absolute; border-radius: 50%;
    width: 200px; height: 200px; right: -50px; top: -70px;
    background: rgba(255, 255, 255, .12);
}
.sheet-hero-inner {
    position: relative; z-index: 2;
    max-width: calc(var(--maxw) - 32px);
    margin: 0 auto;
}
.sheet-hero-title { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: 1px; }
.sheet-hero-sub { margin: 8px 0 0; font-size: 13px; color: rgba(255, 255, 255, .85); }

/* ---- 搜索框 ---- */
.sheet-search {
    position: relative; z-index: 2;
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 0 12px; margin-top: 16px;
}
.sheet-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    padding: 12px 0; font-size: 15px; color: var(--ink);
}
.sheet-search-btn {
    border: 0; background: var(--primary); color: #fff;
    border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600;
    white-space: nowrap; cursor: pointer;
}

/* ---- 文件卡片 ---- */
.sheet-list { display: flex; flex-direction: column; gap: 12px; }
.sheet-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 16px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
}
.sheet-card-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.sheet-file-icon {
    width: 46px; height: 46px; flex-shrink: 0;
    border-radius: 10px; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.sheet-file-icon svg { width: 24px; height: 24px; }
.sheet-info { min-width: 0; flex: 1; }
.sheet-name {
    font-size: 15px; font-weight: 600; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sheet-meta-tags {
    display: flex; align-items: center; gap: 6px; margin-top: 6px;
    flex-wrap: nowrap; overflow: hidden;
}
.sheet-tag {
    flex-shrink: 0; font-size: 11.5px; line-height: 1;
    padding: 4px 8px; border-radius: 20px;
    color: #d97b2b; background: #fdf1e4;
}
.sheet-size {
    font-size: 12px; color: var(--ink-soft);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sheet-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 9px 14px; border-radius: 9px;
    font-size: 13px; font-weight: 600; white-space: nowrap;
    text-decoration: none; cursor: pointer;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.sheet-btn svg { width: 15px; height: 15px; }
.sheet-btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.sheet-btn-locked { color: var(--ink-soft); }
.sheet-btn-primary.sheet-btn-locked { background: #f0f0f0; color: var(--ink-soft); border-color: var(--line); }
.sheet-empty { text-align: center; color: var(--ink-soft); padding: 48px 0; font-size: 14px; }
.sheet-sentinel { text-align: center; padding: 18px 0; }
.sheet-loading { font-size: 13px; color: var(--ink-soft); }

/* 条件面板内时间标签：字号、按钮尺寸与快速找货页保持一致 */
.sheet-page .condition-panel .range-chips {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
}
.sheet-page .condition-panel .range-chips .chip {
    padding: 7px 14px;
    font-size: 13.5px;
}

/* 电脑端：Hero 全宽，下方左侧条件面板 + 右侧货盘结果 */
@media (min-width: 900px) {
    .sheet-page {
        display: grid;
        grid-template-columns: 420px 1fr;
        gap: 28px;
        align-items: start;
    }
    .sheet-page .sheet-hero { grid-column: 1 / -1; }
    .sheet-page .condition-panel {
        margin-bottom: 0;
        position: sticky;
        top: 96px;
    }
}

/* ---- 权限弹窗 ---- */
.sheet-gate {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0, 0, 0, .5);
    display: none; align-items: center; justify-content: center; padding: 24px;
}
.sheet-gate.open { display: flex; }
.sheet-gate-card {
    background: #fff; border-radius: 18px; padding: 28px 22px 22px;
    width: 100%; max-width: 340px; text-align: center;
}
.sheet-gate-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 50%; background: rgba(255, 36, 66, .1); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}
.sheet-gate-icon svg { width: 28px; height: 28px; }
.sheet-gate-msg { margin: 0 0 20px; font-size: 15px; color: var(--ink); line-height: 1.6; }
.sheet-gate-actions { display: flex; gap: 10px; }
.sheet-gate-btn {
    flex: 1; text-align: center; padding: 11px 0; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.sheet-gate-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- 预览页 ---- */
.sheet-preview-head {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.sheet-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--ink);
    background: #fff; border: 1px solid var(--line);
    border-radius: 9px; padding: 8px 14px; text-decoration: none;
    flex-shrink: 0;
}
.sheet-preview-id { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.sheet-preview-meta { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.sheet-preview-label { font-size: 15px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.sheet-preview-title {
    margin: 0; font-size: 15px; font-weight: 600; color: var(--ink);
    word-break: break-all; cursor: pointer; line-height: 1.4;
}
.sheet-preview-title:hover { color: var(--primary); }
.sheet-preview-time { font-size: 15px; color: var(--ink); font-weight: 600; }
.sheet-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 16px 0 12px;
}
.sheet-toolbar-search {
    flex: 1; min-width: 200px;
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 10px; padding: 0 12px;
}
.sheet-toolbar-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    padding: 10px 0; font-size: 14px;
}
.sheet-toolbar-dl {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary); color: #fff; border-radius: 10px;
    padding: 10px 16px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.sheet-row-count { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }

.sheet-table-wrap {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-sm); overflow: auto; max-height: 72vh;
}
.sheet-state { padding: 50px 20px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.sheet-state-err { color: var(--primary); }
.sheet-spinner {
    width: 32px; height: 32px; margin: 0 auto 14px;
    border: 3px solid var(--line); border-top-color: var(--primary);
    border-radius: 50%; animation: sheetspin 1s linear infinite;
}
@keyframes sheetspin { to { transform: rotate(360deg); } }

#sheetTable { width: 100%; border-collapse: collapse; min-width: 720px; }
#sheetTable thead th {
    background: var(--primary); color: #fff;
    font-size: 12.5px; letter-spacing: .5px; padding: 12px 10px;
    text-align: left; font-weight: 600; position: sticky; top: 0; z-index: 2;
}
#sheetTable tbody td {
    padding: 10px; border-top: 1px solid var(--line);
    font-size: 13.5px; vertical-align: top; word-break: break-word;
}
#sheetTable tbody tr:nth-child(even) { background: #fafafa; }
#sheetTable td.num, #sheetTable th.num {
    text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace;
}
#sheetTable th.img-cell, #sheetTable td.img-cell { width: 84px; }
.sheet-prod-img {
    width: 64px; height: 64px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--line); background: #fff;
    display: block; cursor: pointer;
}
.sheet-no-img { color: #bbb; }

/* ---- 灯箱 ---- */
.sheet-lightbox {
    position: fixed; inset: 0; z-index: 4000;
    background: rgba(0, 0, 0, .88);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.sheet-lightbox.open { display: flex; }
.sheet-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.sheet-lightbox-close {
    position: absolute; top: 14px; right: 22px;
    color: #fff; font-size: 32px; line-height: 1; cursor: pointer; user-select: none;
}

/* ---- 响应式 ---- */
@media (max-width: 760px) {
    /* 卡片保持单行：图标+名称在左，预览/下载按钮在右，不换行、不堆叠 */
    .sheet-card { flex-direction: row; align-items: center; gap: 10px; padding: 12px; }
    .sheet-card-left { align-items: center; gap: 10px; }
    .sheet-file-icon { width: 38px; height: 38px; }
    .sheet-file-icon svg { width: 20px; height: 20px; }
    .sheet-actions { justify-content: flex-end; gap: 6px; }
    .sheet-btn { padding: 7px 10px; font-size: 12px; gap: 3px; }
    .sheet-btn svg { display: none; }
    .sheet-toolbar { gap: 8px; }
    .sheet-table-wrap { max-height: 68vh; }
    #sheetTable thead th, #sheetTable tbody td { padding: 8px; font-size: 12.5px; }
    .sheet-prod-img { width: 56px; height: 56px; }
    /* 预览头部纵向布局：窄屏收紧间距与字号；手机端不显示返回按钮 */
    .sheet-preview-head { gap: 10px; }
    .sheet-back { display: none; }
    .sheet-preview-label { font-size: 13px; }
    .sheet-preview-title { font-size: 13px; }
    .sheet-preview-time { font-size: 13px; }

    /* 发布求购：手机端求购内容卡片高度增加约三分之一（128 → 170） */
    .purchase-textarea { min-height: 170px; }

    /* 批量上传：手机端上传卡片高度减小约三分之一（320 → 213），取消方形比例 */
    .batch-form .excel-pick { aspect-ratio: auto; min-height: 213px; }
}
@media (min-width: 900px) {
    .sheet-hero { padding: 38px 24px 48px; }
    .sheet-hero-inner { max-width: calc(var(--maxw) - 48px); }
    .sheet-hero-title { font-size: 30px; }
    .sheet-hero-sub { font-size: 14px; }
}

/* ---------------- 发布寄样急售 ---------------- */

.urgent-page {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 24px;
}
.urgent-banner {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}
.urgent-banner img { display: block; width: 100%; height: auto; }

.u-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.u-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}
.u-label em, .u-upload-title em { color: var(--primary); font-style: normal; margin-left: 2px; }

.u-field { display: block; margin-bottom: 14px; }
.u-field:last-child { margin-bottom: 0; }
.u-field .u-label { display: block; margin-bottom: 10px; }
.u-field input {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    padding: 11px 14px;
    font-size: 15px;
    outline: none;
}
.u-field input:focus { border-color: var(--primary); }

.u-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.u-row:first-child { padding-top: 4px; }
.u-row:last-child { border-bottom: none; padding-bottom: 4px; }
.u-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    text-align: right;
    font-size: 15px;
    color: var(--ink);
    outline: none;
}
.u-right {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    flex: 1 1 auto;
}
.u-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13.5px;
    color: var(--ink-soft);
    white-space: nowrap;
}
.u-date {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    padding: 8px 10px;
    font-size: 14px;
    color: var(--ink);
    outline: none;
}
.u-date:disabled { opacity: .5; }

/* 年月选择、提货地区下拉 */
.u-ym, .u-region { display: flex; align-items: center; gap: 8px; }
.u-sel {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    padding: 8px 10px;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    cursor: pointer;
    min-width: 0;
}
.u-sel:focus { border-color: var(--primary); }
.u-sel:disabled { opacity: .5; cursor: default; }
.u-region .u-sel { max-width: 150px; }

.u-card textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    margin-top: 10px;
}
.u-card textarea:focus { border-color: var(--primary); }
.desc-foot { display: flex; justify-content: flex-end; margin-top: 6px; }
.char-count { margin: 0; font-size: 13px; color: var(--ink-soft); }

.u-upload-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.u-count { font-size: 13.5px; font-weight: 400; color: var(--ink-soft); margin-left: 4px; }

.u-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.u-upload-box {
    width: 84px; height: 84px;
    border: 1.5px dashed #c9c9c9;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-soft);
    cursor: pointer;
    flex: 0 0 auto;
}
.u-plus { font-size: 34px; color: #999999; line-height: 1; }
.u-previews {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 10px;
}
.u-preview {
    position: relative;
    width: 84px; height: 84px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-soft);
    flex: 0 0 auto;
}
.u-preview img, .u-preview video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.u-remove {
    position: absolute;
    top: 3px; right: 3px;
    width: 20px; height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.u-submit { margin-top: 6px; display: flex; flex-direction: column; align-items: center; }
.u-publish {
    padding: 14px;
    font-size: 17px;
    font-weight: 700;
    margin-top: 14px;
}

@media (min-width: 900px) {
    .urgent-page { margin-top: 8px; }
    .u-upload-box, .u-preview { width: 96px; height: 96px; }
}

/* 手机端：日期/地区行改为标签在上、控件在下，避免一行内拥挤溢出卡片 */
@media (max-width: 899px) {
    /* 仅日期/地区堆叠行纵向；产品价格、库存数量行保持横向单行 */
    .u-row.u-stack {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    /* 第二行：勾选框与年月（或省市）下拉横向排列，整个控件项共 2 行 */
    .u-right {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
    }
    /* 勾选框固定等宽，避免“无生产日期/无保质期”文字长度不同导致两个年月选择器宽度不一致 */
    .u-right .u-check {
        flex: 0 0 92px;
        width: 92px;
    }
    .u-ym, .u-region { width: 100%; flex: 1 1 0; min-width: 0; }
    .u-ym .u-sel,
    .u-region .u-sel {
        flex: 1 1 0;
        width: 100%;
        max-width: none;
        min-width: 0;
    }
}

/* =========================================================
   会员中心 · app 风格改版（mc2）
   ========================================================= */
.mc2 { display: flex; flex-direction: column; gap: 14px; padding-bottom: 84px; }
.mc2-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* 渐变头部 */
.mc2-hero {
    background: -webkit-linear-gradient(top left, #ff3b57 0%, var(--primary-dark) 100%);
    background: linear-gradient(135deg, #ff3b57 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    padding: 20px 18px 18px;
    color: #fff;
    box-shadow: 0 10px 24px rgba(229, 30, 60, .25);
}
.mc2-hero-row { display: flex; align-items: center; gap: 14px; }
.mc2-avatar {
    width: 62px; height: 62px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .85);
    object-fit: cover; background: #fff; flex: 0 0 auto;
}
.mc2-hero-info { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.mc2-level-tag {
    margin: 0; align-self: flex-start;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px; padding: 2px 12px; font-size: 12px;
}
.mc2-no { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .92); }
.mc2-no .copyable { color: #fff; font-weight: 600; }

/* 数据概览（点击切换面板） */
.mc2-overview {
    margin-top: 18px;
    background: #fff; border-radius: 14px; padding: 14px 6px;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mc2-ov-item {
    background: none; border: 0; padding: 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--ink-soft);
}
.mc2-ov-item b { font-size: 19px; color: var(--ink); font-weight: 700; }
.mc2-ov-item span { font-size: 11.5px; }
.mc2-ov-item.active b { color: var(--primary); }

/* 临时密码提示 */
.mc2-temp {
    background: #fff4e5; color: #c96a10;
    border-radius: 12px; padding: 11px 14px; font-size: 13.5px; text-align: center;
}

/* 账号信息白卡 */
.mc2-info-card {
    background: var(--card); border-radius: 18px; padding: 16px;
    box-shadow: var(--shadow-sm);
}
.mc2-info-card h3 { margin: 0 0 8px; font-size: 15px; }
.mc2-info-card p {
    margin: 0; padding: 9px 0; display: flex; justify-content: space-between; gap: 12px;
    font-size: 13.5px; border-bottom: 1px solid #f0f0f0;
}
.mc2-info-card p:last-child { border-bottom: 0; }
.mc2-info-card span { color: var(--ink-soft); flex: 0 0 auto; }
.mc2-info-card b { font-weight: 500; text-align: right; min-width: 0; }

/* 快捷功能宫格 */
.mc2-quick {
    background: var(--card); border-radius: 18px; padding: 16px;
    box-shadow: var(--shadow-sm);
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px;
}
.mc2-quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; }
.q-ic {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-soft); color: var(--ink-soft);
}
.q-ic svg { width: 23px; height: 23px; }
.q-ic.is-red { background: #ffecef; color: var(--primary); }
.q-ic.is-orange { background: #fff1e4; color: #e8762c; }
.q-ic.is-blue { background: #e8f1ff; color: #2f6fe0; }
.q-ic.is-green { background: #e7f7ee; color: #12a05c; }

/* 退出登录 */
.mc2-logout {
    background: var(--card); border-radius: 14px; padding: 14px;
    text-align: center; color: var(--primary); font-size: 14.5px; font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* 主区：Tab + 面板 */
.mc2-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mc2-tabs {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--card); border-radius: 14px; padding: 4px;
    box-shadow: var(--shadow-sm);
    position: sticky; top: 76px; z-index: 50;
}
.mc2-tab {
    background: none; border: 0; padding: 10px 4px;
    font-size: 13.5px; color: var(--ink-soft); border-radius: 10px;
}
.mc2-tab.active { background: var(--primary); color: #fff; font-weight: 600; }

.mc2-panel { display: none; flex-direction: column; gap: 11px; }
.mc2-panel.active { display: flex; }
.mc2-empty {
    background: var(--card); border-radius: 16px; padding: 34px 16px;
    text-align: center; color: var(--ink-soft); font-size: 14px;
}
.mc2-empty a { color: var(--primary); font-weight: 600; }

/* 条目卡片 */
.mc2-item {
    background: var(--card); border-radius: 16px; padding: 13px;
    box-shadow: var(--shadow-sm);
    display: flex; gap: 12px; align-items: flex-start;
}
.mc2-item-img {
    width: 74px; height: 74px; border-radius: 12px; object-fit: cover; flex: 0 0 auto;
}
.mc2-item-ic {
    width: 74px; height: 74px; border-radius: 12px; flex: 0 0 auto;
    background: var(--bg-soft); color: var(--ink-soft);
    display: flex; align-items: center; justify-content: center;
}
.mc2-item-ic svg { width: 32px; height: 32px; }
.mc2-item-body { flex: 1; min-width: 0; }
.mc2-item-title {
    margin: 0 0 7px; font-size: 14px; font-weight: 600;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    line-clamp: 2; overflow: hidden;
}
.mc2-item-meta {
    margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 12px; color: var(--ink-soft);
}
.mc2-item-sub { margin: 6px 0 0; font-size: 12px; color: var(--ink-soft); }
.mc2-item-ops { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.mc2-item-ops form { display: inline; }
.mc2-item-ops .btn { padding: 6px 12px; }
.mc2-item-ops .btn:disabled { opacity: .45; cursor: not-allowed; }

/* 电脑端：两列布局，侧边 sticky */
@media (min-width: 900px) {
    .mc2 {
        display: grid; grid-template-columns: 300px minmax(0, 1fr);
        gap: 24px; align-items: start; padding-bottom: 24px;
    }
    .mc2-side { position: sticky; top: 88px; }
    .mc2-tabs { position: static; }
    .mc2-hero { padding: 22px 20px 20px; }
    .mc2-quick { gap: 18px 10px; }
}

/* =========================================================
   会员中心 · app 信息架构改版（mc3）
   ========================================================= */
.mc3 { display: flex; flex-direction: column; gap: 14px; padding-bottom: 84px; }
.mc3-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mc3-right { display: none; flex-direction: column; gap: 12px; min-width: 0; }
.mc3-right.open { display: flex; }
.mc3-left.hide { display: none; }

/* 渐变头部 */
.mc3-hero {
    background: -webkit-linear-gradient(top left, #ff3b57 0%, var(--primary-dark) 100%);
    background: linear-gradient(135deg, #ff3b57 0%, var(--primary-dark) 100%);
    border-radius: 20px; padding: 20px 18px; color: #fff;
    box-shadow: 0 10px 24px rgba(229, 30, 60, .25);
}
.mc3-hero-row { display: flex; align-items: center; gap: 14px; }
.mc3-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .85);
    object-fit: cover; background: #fff; flex: 0 0 auto;
}
.mc3-hero-info { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mc3-no { margin: 0; font-size: 14px; color: #fff; font-weight: 600; }
.mc3-no,
.mc3-no .copyable,
.mc3-no .copyable:hover,
.mc3-no .copyable:focus,
.mc3-no .copyable:active {
    color: #fff !important;
}
.mc3-no .copyable::selection { background: rgba(255,255,255,.28); color: #fff; }
.mc3-level-tag {
    margin: 0; align-self: flex-start;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px; padding: 2px 12px; font-size: 12px;
    font-family: inherit; line-height: 1.5; color: #fff; cursor: pointer;
}

/* 临时密码提示 */
.mc3-temp {
    background: #fff4e5; color: #c96a10;
    border-radius: 12px; padding: 11px 14px; font-size: 13.5px; text-align: center;
}

/* 四个我的入口（红色框内白色卡片，同 mc2 overview） */
.mc3-my {
    margin-top: 26px;
    background: #fff; border-radius: 14px; padding: 16px 6px;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mc3-my-item {
    background: none; border: 0; padding: 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--ink-soft);
}
.mc3-my-item b { font-size: 19px; color: var(--ink); font-weight: 700; }
.mc3-my-item span { font-size: 11.5px; }
.mc3-my-item.active b { color: var(--primary); }

/* 宫格卡片（4 列） */
.mc3-card {
    background: var(--card); border-radius: 18px; padding: 16px 10px;
    box-shadow: var(--shadow-sm);
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 6px;
}
.mc3-card a, .mc3-grid-btn {
    background: none; border: 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 12px; color: var(--ink); text-align: center;
}
.g-ic {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; color: var(--ink-soft);
}
.g-ic svg { width: 26px; height: 26px; }
.g-ic.is-red { background: transparent; color: var(--primary); }
.g-ic.is-orange { background: transparent; color: #e8762c; }
.g-ic.is-blue { background: transparent; color: #2f6fe0; }
.g-ic.is-green { background: transparent; color: #12a05c; }

/* 退出 */
.mc3-logout {
    background: var(--card); border-radius: 14px; padding: 14px;
    text-align: center; color: var(--primary); font-size: 14.5px; font-weight: 600;
    box-shadow: var(--shadow-sm);
}
/* 设置页内退出登录快捷入口 */
.mc3-setting-logout {
    display: block; margin-top: 18px;
    background: var(--card); border-radius: 14px; padding: 14px;
    text-align: center; color: var(--primary); font-size: 14.5px; font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* 子页返回条 */
.mc3-sub-bar {
    display: flex; align-items: center; gap: 8px;
    background: var(--card); border-radius: 14px; padding: 8px 10px;
    box-shadow: var(--shadow-sm);
    position: sticky; top: 76px; z-index: 60;
}
.mc3-back {
    background: none; border: 0; color: var(--primary);
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.mc3-back svg { width: 24px; height: 24px; }
.mc3-sub-title { margin: 0; flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.mc3-back-placeholder { width: 36px; flex: 0 0 auto; }

/* 电脑端 Tab（手机端隐藏） */
.mc3-tabs { display: none; }
.mc3-panels { display: flex; flex-direction: column; gap: 11px; }
.mc3-panel { display: none; flex-direction: column; gap: 11px; }
.mc3-panel.active { display: flex; }
.mc3-empty {
    background: var(--card); border-radius: 16px; padding: 34px 16px;
    text-align: center; color: var(--ink-soft); font-size: 14px;
}
.mc3-empty a { color: var(--primary); font-weight: 600; }

/* 列表搜索框 */
.mc3-search { position: relative; }
.mc3-search input {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; padding: 11px 14px; font-size: 14px; color: var(--ink);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.mc3-search input:focus { outline: none; border-color: var(--primary); }
.mc3-no-result {
    background: var(--card); border-radius: 14px; padding: 26px 16px;
    text-align: center; color: var(--ink-soft); font-size: 13.5px;
}

/* 我的收藏：货源/求购 Tab */
.fav-tabs {
    display: flex; gap: 8px;
    background: var(--card); border-radius: 12px; padding: 5px;
    box-shadow: var(--shadow-sm);
}
.fav-tab {
    flex: 1; background: none; border: 0; border-radius: 9px;
    padding: 9px 0; font-size: 13.5px; color: var(--ink-soft);
    font-family: inherit; cursor: pointer;
}
.fav-tab.active { background: var(--primary); color: #fff; font-weight: 600; }
.fav-tab-body { display: flex; flex-direction: column; gap: 11px; }
.fav-tab-body[hidden] { display: none; }

/* 条目卡片 */
.mc3-item {
    background: var(--card); border-radius: 16px; padding: 13px;
    box-shadow: var(--shadow-sm);
    display: flex; gap: 12px; align-items: flex-start;
}
.mc3-item-img {
    width: 74px; height: 74px; border-radius: 12px; object-fit: cover; flex: 0 0 auto;
}
.mc3-item-ic {
    width: 74px; height: 74px; border-radius: 12px; flex: 0 0 auto;
    background: var(--bg-soft); color: var(--ink-soft);
    display: flex; align-items: center; justify-content: center;
}
.mc3-item-ic svg { width: 32px; height: 32px; }
.mc3-item-body { flex: 1; min-width: 0; }
.mc3-item-title {
    margin: 0 0 7px; font-size: 14px; font-weight: 600;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    line-clamp: 2; overflow: hidden;
}
.mc3-item-meta {
    margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 12px; color: var(--ink-soft);
}
.mc3-item-sub { margin: 6px 0 0; font-size: 12px; color: var(--ink-soft); }
.mc3-item-ops { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.mc3-item-ops form { display: inline; }
.mc3-item-ops .btn { padding: 6px 12px; }
.mc3-item-ops .btn:disabled { opacity: .45; cursor: not-allowed; }

/* 会员权限页 */
.mc3-perm-card {
    background: var(--card); border-radius: 16px; padding: 22px 18px;
    box-shadow: var(--shadow-sm);
}
.mc3-perm-level { margin: 0; font-size: 20px; font-weight: 700; }
.mc3-perm-desc { margin: 6px 0 16px; font-size: 13px; color: var(--ink-soft); }
.mc3-perm-rows p {
    margin: 0; padding: 12px 0; display: flex; justify-content: space-between;
    font-size: 14px; border-bottom: 1px solid #f0f0f0;
}
.mc3-perm-rows p:last-child { border-bottom: 0; }
.mc3-perm-rows span { color: var(--ink-soft); }
.mc3-perm-rows b { font-weight: 600; }
.mc3-upgrade-btn {
    display: block; margin: 32px auto 0;
    border: 0; border-radius: 999px; padding: 11px 42px;
    background: -webkit-linear-gradient(top left, #ff4d67, var(--primary));
    background: linear-gradient(135deg, #ff4d67, var(--primary));
    color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(229, 30, 60, .32);
    transition: transform .15s, box-shadow .15s;
}
.mc3-upgrade-btn:active {
    transform: scale(.96);
    box-shadow: 0 4px 12px rgba(229, 30, 60, .28);
}

/* 自定义上传图标（图片）：无背景框，统一 44x44、等比完整显示 */
.g-ic-img {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
}
.g-ic-img img {
    width: 44px; height: 44px;
    object-fit: contain;
    border-radius: 0;
}

/* 消息通知入口角标 */
.mc3-grid-btn { position: relative; }
.mc3-badge {
    position: absolute; top: -2px; left: calc(50% + 14px);
    background: var(--primary); color: #fff; font-size: 10px; line-height: 1;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; display: flex; align-items: center; justify-content: center;
}
.mc3-grid-label { position: relative; }

/* 通知列表 */
.mc3-notif-head {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--card); border-radius: 14px; padding: 12px 14px;
    font-size: 12.5px; color: var(--ink-soft); box-shadow: var(--shadow-sm);
}
.mc3-read-all {
    background: none; border: 0; color: var(--primary);
    font-size: 13px; font-weight: 600;
}
.mc3-read-all:disabled { color: var(--ink-soft); opacity: .6; }
.mc3-notif {
    background: var(--card); border-radius: 16px; padding: 14px;
    box-shadow: var(--shadow-sm); display: flex; gap: 10px; align-items: flex-start;
}
.mc3-notif-dot {
    width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto;
    background: #cfcfcf;
}
.mc3-notif.is-unread .mc3-notif-dot { background: var(--primary); }
.mc3-notif-body { flex: 1; min-width: 0; }
.mc3-notif-title { margin: 0 0 6px; font-size: 14.5px; font-weight: 700; }
.mc3-notif.is-unread .mc3-notif-title { color: var(--primary); }
.mc3-notif-content { margin: 0 0 8px; font-size: 13px; color: var(--ink); line-height: 1.6; word-break: break-word; }
.mc3-notif-time { margin: 0; font-size: 11.5px; color: var(--ink-soft); }

/* 资料设置表单 */
.mc3-form {
    background: var(--card); border-radius: 16px; padding: 18px 16px;
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
}
.mc3-field { display: flex; flex-direction: column; gap: 6px; }
.mc3-field label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.mc3-field input {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    padding: 11px 12px; font-size: 14px; background: #fff; color: var(--ink);
}
.mc3-field input:focus { outline: none; border-color: var(--primary); }
.mc3-field input[readonly] { background: var(--bg-soft); color: var(--ink-soft); }
.mc3-form-btn {
    width: 100%; border: 0; border-radius: 12px; padding: 13px;
    background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
}
/* 资料只读列表 */
.mc3-profile {
    background: var(--card); border-radius: 16px;
    padding: 22px 18px;
    box-shadow: var(--shadow-sm);
}
.mc3-profile-level { margin: 0; font-size: 20px; font-weight: 700; }
.mc3-profile-desc { margin: 6px 0 16px; font-size: 13px; color: var(--ink-soft); }
.mc3-profile-row {
    width: 100%; display: flex; align-items: center; gap: 10px;
    background: none; border: 0; border-bottom: 1px solid #f0f0f0;
    padding: 12px 0; text-align: left; color: var(--ink);
}
.mc3-profile-row:last-child { border-bottom: 0; }
.mc3-profile-row.is-static { cursor: default; }
.mc3-profile .mp-label { flex: 0 0 auto; font-size: 14px; color: var(--ink-soft); }
.mc3-profile .mp-value {
    flex: 1; min-width: 0; text-align: right; font-size: 14px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mc3-profile-row.is-static .mp-value { color: var(--ink); font-weight: 600; }
.mc3-profile .mp-chevron { flex: 0 0 auto; font-size: 20px; color: #c2c2c2; line-height: 1; }

/* 单字段编辑视图 */
.mc3-edit { position: relative; }
.mc3-edit-back {
    background: none; border: 0; color: var(--primary);
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.mc3-edit-back svg { width: 24px; height: 24px; flex: 0 0 auto; }
.mc3-edit-title { margin: 6px 0 18px; font-size: 18px; font-weight: 700; }
.mc3-edit-body {
    background: var(--card); border-radius: 16px; padding: 18px 16px;
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
}
.mc3-edit-body input {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    padding: 12px; font-size: 15px; background: #fff; color: var(--ink);
}
.mc3-edit-body input:focus { outline: none; border-color: var(--primary); }
.mc3-edit-error { margin: 0; font-size: 13px; color: var(--primary); }
.mc3-edit-save {
    width: 100%; border: 0; border-radius: 12px; padding: 13px;
    background: var(--primary); color: #fff; font-size: 15px; font-weight: 700;
}

/* 手机端：单项编辑页顶部固定标题栏已有返回箭头，隐藏编辑视图内的重复箭头 */
@media (max-width: 899px) {
    .mc3-edit-back { display: none; }
}

/* 电脑端：两列，左 sticky，右侧 Tab 常驻 */
@media (min-width: 900px) {
    .mc3 {
        display: grid; grid-template-columns: 300px minmax(0, 1fr);
        gap: 24px; align-items: start; padding-bottom: 24px;
    }
    .mc3-left { position: sticky; top: 88px; }
    .mc3-right { display: flex; }
    .mc3-sub-bar { display: none; }
    .mc3-tabs {
        display: grid; grid-template-columns: repeat(4, 1fr);
        background: var(--card); border-radius: 14px; padding: 4px;
        box-shadow: var(--shadow-sm);
    }
    .mc3-tabs.mc3-tabs-off { display: none; }
    .mc3-tab {
        background: none; border: 0; padding: 10px 4px;
        font-size: 13.5px; color: var(--ink-soft); border-radius: 10px;
    }
    .mc3-tab.active { background: var(--primary); color: #fff; font-weight: 600; }
    .mc3-card { gap: 18px 8px; }
}

/* ================= 文章/资讯系统 ================= */

/* 列表网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-top: 16px;
}
@media (min-width: 640px) {
    .article-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (min-width: 1024px) {
    .article-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
    .article-grid { grid-template-columns: repeat(4, 1fr); }
}

.article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line, #ececec);
    transition: transform .15s ease, box-shadow .15s ease;
    color: var(--ink, #222);
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,.08);
}
.ac-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f2f3f5;
    overflow: hidden;
}
.ac-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.ac-cover-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; font-weight: 700; color: #c2c6cc;
}
.ac-body {
    padding: 12px 14px 14px;
    display: flex; flex-direction: column; gap: 8px;
    flex: 1;
}
.ac-title {
    font-size: 15px; font-weight: 600; line-height: 1.45;
    margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.ac-summary {
    font-size: 13px; color: var(--ink-soft, #888); line-height: 1.5;
    margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.ac-meta {
    margin-top: auto;
    display: flex; justify-content: space-between;
    font-size: 12px; color: #9aa0a8;
    padding-top: 6px;
}

/* 分页 */
.article-pager {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; margin-top: 28px;
}
.ap-btn {
    min-width: 38px; padding: 8px 12px;
    border: 1px solid var(--line, #e5e5e5);
    border-radius: 8px; background: #fff;
    font-size: 14px; color: var(--ink, #333);
    display: inline-flex; align-items: center; justify-content: center;
}
.ap-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 详情页 */
.article-detail-page { padding: 22px 20px; }
.ad-header { margin-bottom: 16px; }
.ad-title { font-size: 22px; line-height: 1.4; margin: 0 0 12px; font-weight: 700; }
.ad-meta {
    display: flex; flex-wrap: wrap; gap: 14px;
    font-size: 13px; color: #9096a0;
}
.ad-cover { margin: 0 0 18px; border-radius: 10px; overflow: hidden; }
.ad-cover img { width: 100%; display: block; }

/* 富文本正文：图片/视频/表格自适应 */
.article-content { font-size: 15px; line-height: 1.8; color: #2c2f33; word-break: break-word; }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 16px; }
.article-content h1, .article-content h2, .article-content h3,
.article-content h4 { margin: 24px 0 12px; line-height: 1.4; font-weight: 700; }
.article-content h2 { font-size: 20px; }
.article-content h3 { font-size: 17px; }
.article-content a { color: var(--primary); text-decoration: underline; }
.article-content ul, .article-content ol { margin: 0 0 16px; padding-left: 24px; }
.article-content li { margin-bottom: 6px; }
.article-content img {
    max-width: 100%; height: auto;
    border-radius: 8px; display: block; margin: 16px auto;
}
.article-content video {
    max-width: 100%; height: auto;
    display: block; margin: 16px auto; border-radius: 8px;
}
.article-content iframe {
    max-width: 100%; display: block; margin: 16px auto;
    border: 0; border-radius: 8px;
}
.article-content table {
    max-width: 100%; border-collapse: collapse; margin: 16px 0;
    display: block; overflow-x: auto;
}
.article-content blockquote {
    margin: 16px 0; padding: 10px 16px;
    border-left: 4px solid var(--primary);
    background: #f7f8fa; color: #555;
}
@media (max-width: 640px) {
    .article-detail-page { padding: 18px 14px; }
    .ad-title { font-size: 19px; }
    .article-content { font-size: 15px; }
}

/* 上一篇/下一篇 */
.ad-neighbor {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-top: 26px; padding-top: 18px;
    border-top: 1px solid var(--line, #ececec);
}
.adn-link {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 13px; color: var(--ink, #333);
    min-width: 0;
}
.adn-link:last-child { text-align: right; }
.adn-label { color: #9aa0a8; font-size: 12px; }
.adn-title {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 480px) {
    .ad-neighbor { grid-template-columns: 1fr; }
    .adn-link:last-child { text-align: left; }
}

/* =========================================================
   多浏览器兼容兜底（PC + 手机）
   .ua-legacy 由 app.js 识别：旧 X5/QQ/UC/百度、旧安卓、Chrome<84、
   Safari<14.1、EdgeHTML 等不支持 flex gap 的内核。
   ========================================================= */

/* 表单元素：字体继承，避免旧内核默认字号/字体突变；宽度不撑破卡片 */
input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], input[type="number"], input:not([type]),
select, textarea, button {
    font-family: inherit;
    max-width: 100%;
}
/* 文本类输入框去掉 iOS/旧内核原生外观（按钮、复选框、下拉不动） */
input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], input[type="number"], input:not([type]),
textarea {
    -webkit-appearance: none;
    appearance: none;
}
/* 禁用旧内核点击高亮灰块，保留触摸反馈 */
a, button, [role="button"] {
    -webkit-tap-highlight-color: transparent;
}

/* 兜底容器统一清除原生 gap：部分被标记 ua-legacy 的浏览器（如新版 QQ）
   实际支持 flex gap，会与下方 margin 叠加导致换行/错位，间距只保留 margin 一份 */
.ua-legacy .header-phone,
.ua-legacy .user-link,
.ua-legacy .range-chips,
.ua-legacy .kw-row,
.ua-legacy .mp-row,
.ua-legacy .mp-sub,
.ua-legacy .sheet-search,
.ua-legacy .sheet-actions,
.ua-legacy .sheet-gate-actions,
.ua-legacy .sheet-toolbar,
.ua-legacy .sheet-toolbar-search,
.ua-legacy .sheet-toolbar-dl,
.ua-legacy .detail-btn-actions,
.ua-legacy .mc2-hero-row,
.ua-legacy .mc2-item-ops,
.ua-legacy .fav-tabs,
.ua-legacy .mc3-item-ops,
.ua-legacy .cp-inline-selects,
.ua-legacy .brand-links,
.ua-legacy .m-footer-links,
.ua-legacy .sheet-list,
.ua-legacy .mc2,
.ua-legacy .mc2-side,
.ua-legacy .mc2-main,
.ua-legacy .mc2-panel,
.ua-legacy .mp-actions,
.ua-legacy .product-grid,
.ua-legacy .qrcode-grid,
.ua-legacy .mobile-nav-item {
    gap: 0;
    row-gap: 0;
}

/* ---------- flex gap 横向兜底：子项右 margin ---------- */
.ua-legacy .header-phone > *,
.ua-legacy .user-link > *,
.ua-legacy .range-chips > *,
.ua-legacy .kw-row > *,
.ua-legacy .mp-row > *,
.ua-legacy .mp-sub > *,
.ua-legacy .sheet-search > *,
.ua-legacy .sheet-actions > *,
.ua-legacy .sheet-gate-actions > *,
.ua-legacy .sheet-toolbar > *,
.ua-legacy .sheet-toolbar-search > *,
.ua-legacy .sheet-toolbar-dl > *,
.ua-legacy .detail-btn-actions > *,
.ua-legacy .mc2-hero-row > *,
.ua-legacy .mc2-item-ops > *,
.ua-legacy .fav-tabs > *,
.ua-legacy .mc3-item-ops > * {
    margin-right: 8px;
}
.ua-legacy .cp-inline-selects > * { margin-right: 12px; }
.ua-legacy .brand-links > * { margin-right: 22px; }
.ua-legacy .m-footer-links > * { margin-right: 18px; }
.ua-legacy .header-phone > *:last-child,
.ua-legacy .user-link > *:last-child,
.ua-legacy .range-chips > *:last-child,
.ua-legacy .kw-row > *:last-child,
.ua-legacy .mp-row > *:last-child,
.ua-legacy .mp-sub > *:last-child,
.ua-legacy .cp-inline-selects > *:last-child,
.ua-legacy .sheet-search > *:last-child,
.ua-legacy .sheet-actions > *:last-child,
.ua-legacy .sheet-gate-actions > *:last-child,
.ua-legacy .sheet-toolbar > *:last-child,
.ua-legacy .sheet-toolbar-search > *:last-child,
.ua-legacy .sheet-toolbar-dl > *:last-child,
.ua-legacy .detail-btn-actions > *:last-child,
.ua-legacy .mc2-hero-row > *:last-child,
.ua-legacy .mc2-item-ops > *:last-child,
.ua-legacy .fav-tabs > *:last-child,
.ua-legacy .mc3-item-ops > *:last-child,
.ua-legacy .brand-links > *:last-child,
.ua-legacy .m-footer-links > *:last-child {
    margin-right: 0;
}

/* ---------- flex gap 纵向兜底：子项下 margin ---------- */
.ua-legacy .sheet-list > *,
.ua-legacy .mc2 > *,
.ua-legacy .mc2-side > *,
.ua-legacy .mc2-main > *,
.ua-legacy .mc2-panel > *,
.ua-legacy .mp-actions > * {
    margin-bottom: 12px;
}
.ua-legacy .sheet-list > *:last-child,
.ua-legacy .mc2 > *:last-child,
.ua-legacy .mc2-side > *:last-child,
.ua-legacy .mc2-main > *:last-child,
.ua-legacy .mc2-panel > *:last-child,
.ua-legacy .mp-actions > *:last-child {
    margin-bottom: 0;
}
/* 底部导航：图标与文字之间的 5px 间距 */
.ua-legacy .mobile-nav-item > span { margin-top: 5px; }

/* 旧内核不支持 aspect-ratio：图片高度回退为按原图比例自适应，避免卡片图塌陷 */
.ua-legacy .card-img-link { aspect-ratio: auto; }
.ua-legacy .card-img { height: auto; }

/* ---------- 网格兜底：产品两列、底部二维码三列 ---------- */
.ua-legacy .product-grid {
    display: flex;
    flex-wrap: wrap;
}
.ua-legacy .product-grid > .product-card {
    width: calc(50% - 7px);
    margin-right: 14px;
    margin-bottom: 14px;
}
.ua-legacy .product-grid > .product-card:nth-child(2n) { margin-right: 0; }
.ua-legacy .qrcode-grid {
    display: flex;
    flex-wrap: wrap;
}
.ua-legacy .qrcode-grid > .qrcode-item {
    width: calc(33.333% - 15px);
    margin-right: 22px;
    margin-bottom: 22px;
}
.ua-legacy .qrcode-grid > .qrcode-item:nth-child(3n) { margin-right: 0; }

/* ---------- 手机端旧内核：间距收紧到与移动端 gap 一致 ---------- */
@media (max-width: 899px) {
    .ua-legacy .cp-inline-selects > * { margin-right: 8px; }
    .ua-legacy .cp-inline-selects > *:last-child { margin-right: 0; }
}

/* ---------- IE / EdgeHTML：不支持 CSS 变量，提示更换浏览器 ---------- */
.ie-upgrade-tip {
    display: none;
    margin: 0;
    padding: 12px 16px;
    background: #fff7e6;
    color: #9a6b20;
    font-size: 13px;
    text-align: center;
    border-bottom: 1px solid #f0e0c0;
}
.ua-ie .ie-upgrade-tip { display: block; }

/* =========================================================
   电脑端货盘自定义下拉（xk-dd）：替代原生 option 列表
   ========================================================= */
.xk-dd { position: relative; }
/* 原生 select 仅保留值与事件，视觉隐藏 */
.xk-dd select {
    position: absolute;
    left: 0; top: 0;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}
.xk-dd-trigger {
    width: 100%;
    height: 42px;
    padding: 0 32px 0 12px;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-size: 13px;
    color: #333333;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.xk-dd-trigger:hover { border-color: #c9c9c9; }
.xk-dd.open .xk-dd-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 36, 66, .12);
}
.xk-dd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    z-index: 1200;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}
.xk-dd.open .xk-dd-menu { display: block; }
.xk-dd-option {
    padding: 11px 12px;
    font-size: 13px;
    line-height: 1.3;
    color: #333333;
    border-radius: 8px;
    white-space: nowrap;
    cursor: pointer;
}
.xk-dd-option:hover { background: #f6f6f6; }
.xk-dd-option.selected {
    color: var(--primary);
    font-weight: 600;
    background: #fff2f3;
}
/* 细滚动条 */
.xk-dd-menu::-webkit-scrollbar { width: 6px; }
.xk-dd-menu::-webkit-scrollbar-thumb { background: #d8d8d8; border-radius: 3px; }
.xk-dd-menu { scrollbar-width: thin; scrollbar-color: #d8d8d8 transparent; }

/* 求购卡片：置顶徽章内联展示（非图片角标） */
.demand-card .pd-no .top-badge {
    position: static;
    display: inline-block;
    margin-right: 6px;
    vertical-align: 1px;
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    pointer-events: none;
}
