/* ============================================================
   PDD 多人团组队 (zd) - 蓝色主题
   与主站"秒助力"风格一致: #2563eb / #06b6d4 / 浅蓝渐变背景
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #eaf4ff 0%, #f0f8ff 30%, #f5f9ff 100%);
    min-height: 100vh;
    color: #1e293b;
    padding-bottom: 90px;
}
.page { max-width: 520px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶栏 ===== */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0 8px 0;
}
.back-link {
    display: flex; align-items: center; gap: 4px;
    font-size: 13px; color: #475569; text-decoration: none;
    background: #fff; border-radius: 12px; padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.back-link:active { background: #eff6ff; }
.top-title { font-size: 18px; font-weight: 800; color: #0f172a; }
.top-title .badge-new {
    display: inline-block; vertical-align: 2px; margin-left: 6px;
    font-size: 10px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 2px 7px; border-radius: 10px; letter-spacing: 1px;
}
.user-btn {
    border: none; cursor: pointer; font-size: 12px; font-weight: 600; color: #2563eb;
    background: #fff; border-radius: 12px; padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.user-btn:active { background: #eff6ff; }

/* ===== 身份提示横幅 ===== */
.id-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border-radius: 12px; padding: 10px 14px; margin: 10px 0 4px 0;
    font-size: 13px;
}
.id-banner.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.id-banner.tip {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe; color: #1e40af;
}
.id-banner .go-login {
    border: none; cursor: pointer; flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 18px;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

/* ===== 搜索框 ===== */
.search-wrap { margin: 12px 0 10px 0; position: relative; }
.search-wrap input {
    width: 100%; border: none; outline: none;
    background: #fff; border-radius: 24px; padding: 12px 44px 12px 40px;
    font-size: 14px; color: #1e293b;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.search-wrap input::placeholder { color: #94a3b8; }
.search-wrap .s-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: 15px;
}
.search-wrap .s-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    display: none; border: none; cursor: pointer;
    width: 22px; height: 22px; border-radius: 50%;
    background: #e2e8f0; color: #64748b; font-size: 12px; line-height: 1;
}

/* ===== Tab 行 ===== */
.tab-row {
    display: flex; align-items: center; gap: 2px;
    border-bottom: 1px solid #e2e8f0; margin-bottom: 4px;
}
.tab {
    border: none; background: none; cursor: pointer;
    font-size: 15px; color: #64748b; padding: 10px 14px;
    position: relative; font-weight: 500;
}
.tab.active { color: #2563eb; font-weight: 800; }
.tab.active::after {
    content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
    width: 24px; height: 3px; border-radius: 2px; background: #2563eb;
}
.tab-right { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.countdown {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 700; color: #2563eb;
    background: rgba(37, 99, 235, 0.08); border-radius: 14px; padding: 4px 10px;
    font-variant-numeric: tabular-nums;
}
.refresh-btn {
    display: flex; align-items: center; gap: 4px;
    border: none; background: none; cursor: pointer;
    font-size: 12px; font-weight: 600; color: #475569;
}
.refresh-btn .r-icon { display: inline-block; transition: transform 0.4s; }
.refresh-btn.spin .r-icon { transform: rotate(360deg); }

/* ===== 拼团卡片 ===== */
.pt-card {
    background: #fff; border-radius: 16px; padding: 14px;
    margin-top: 12px; box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}
.pt-main { display: flex; gap: 12px; }
.pt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-head { display: flex; align-items: center; gap: 6px; }
.pt-nick {
    font-size: 12px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pt-nick b { color: #2563eb; font-weight: 700; }
.pt-time { font-size: 11px; color: #94a3b8; flex-shrink: 0; }
.copy-btn {
    margin-left: auto; flex-shrink: 0; cursor: pointer;
    border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb;
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}
.copy-btn:active { background: #dbeafe; }
.pt-title-line { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; }
.team-tag {
    flex-shrink: 0; font-size: 11px; font-weight: 700; color: #2563eb;
    background: #eff6ff; border: 1px solid #bfdbfe;
    padding: 2px 8px; border-radius: 8px; margin-top: 1px;
}
.pt-goods-title {
    font-size: 14px; font-weight: 600; color: #0f172a; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pt-bottom { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.price-box { flex: 1; min-width: 0; }
.price-label { font-size: 11px; color: #64748b; margin-right: 2px; }
.price-num {
    font-size: 19px; font-weight: 900; color: #ef4444; letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}
.join-btn {
    flex-shrink: 0; cursor: pointer; border: none;
    display: flex; align-items: center; gap: 4px;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    font-size: 14px; font-weight: 800; padding: 10px 18px; border-radius: 24px;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.12s;
}
.join-btn:active { transform: scale(0.96); }
.join-btn.done { background: #e2e8f0; color: #94a3b8; box-shadow: none; }
.pt-marks {
    display: flex; align-items: center; gap: 2px; margin-top: 10px;
    border-top: 1px dashed #e2e8f0; padding-top: 8px;
}
.mk-btn {
    border: none; background: none; cursor: pointer;
    font-size: 12px; color: #64748b; padding: 4px 10px; border-radius: 8px;
}
.mk-btn:active { background: #f1f5f9; color: #2563eb; }
.mk-btn.marked { color: #94a3b8; cursor: default; }
.mk-status {
    margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}
.mk-status.full { background: #fef3c7; color: #b45309; }
.mk-status.expire { background: #fee2e2; color: #b91c1c; }

/* ===== 加载 / 空状态 ===== */
.load-more {
    display: block; width: 100%; margin-top: 14px; border: none; cursor: pointer;
    background: #fff; color: #2563eb; font-size: 13px; font-weight: 600;
    padding: 12px 0; border-radius: 12px; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.load-more:disabled { color: #94a3b8; cursor: default; }
.empty-state {
    text-align: center; padding: 60px 0 30px 0; color: #94a3b8;
}
.empty-state .e-icon { font-size: 44px; }
.empty-state p { margin-top: 10px; font-size: 14px; }

/* ===== 底部悬浮发布按钮 ===== */
.publish-fab {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: 26px; z-index: 40;
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    border: none; cursor: pointer; text-decoration: none;
    font-size: 15px; font-weight: 800; letter-spacing: 1px;
    padding: 14px 34px; border-radius: 30px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}
.publish-fab:active { transform: translateX(-50%) scale(0.96); }

/* ===== 弹层 (统一居中浮动卡片风格) ===== */
.mask {
    display: none; position: fixed; inset: 0; z-index: 60;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.mask.open {
    display: flex; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
}
.sheet {
    background: #fff; width: 100%; max-width: 500px;
    border-radius: 20px; padding: 22px 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
    max-height: 82vh; overflow-y: auto; box-sizing: border-box;
}
.sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; margin-bottom: 14px;
}
.sheet-title {
    font-size: 17px; font-weight: 800; color: #0f172a;
    display: flex; align-items: center;
}
.sheet-title::before {
    content: ''; width: 4px; height: 16px; border-radius: 2px;
    background: linear-gradient(180deg, #2f6bff, #22b8e6);
    margin-right: 8px;
}
.sheet-close {
    border: none; cursor: pointer; width: 28px; height: 28px; border-radius: 50%;
    background: #f1f5f9; color: #64748b; font-size: 13px; line-height: 28px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.15s;
}
.sheet-close:active { transform: scale(0.92); background: #e2e8f0; }
.sheet-body { font-size: 14px; color: #334155; line-height: 1.7; }

/* 登录表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 12px; color: #64748b; margin-bottom: 6px; font-weight: 600; }
.form-item input {
    width: 100%; border: 1px solid #e2e8f0; outline: none;
    border-radius: 10px; padding: 11px 14px; font-size: 14px; color: #1e293b;
    background: #f8fafc;
}
.form-item input:focus { border-color: #93c5fd; background: #fff; }
.form-item input[type=url] { color: #2563eb; }
.form-item select {
    width: 100%; border: 1px solid #e2e8f0; outline: none;
    border-radius: 10px; padding: 11px 14px; font-size: 14px; color: #1e293b;
    background: #f8fafc; -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.form-item select:focus { border-color: #93c5fd; background-color: #fff; }

/* ===== H5 粘贴解析发布弹层 ===== */
.howto-box {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
    padding: 10px 12px; margin-bottom: 12px;
}
.howto-h { font-size: 13px; font-weight: 700; color: #2563eb; margin-bottom: 4px; }
.howto-p { font-size: 12px; color: #64748b; }
.paste-wrap { position: relative; margin-bottom: 12px; }
.paste-wrap textarea {
    width: 100%; border: 1px solid #e2e8f0; outline: none; resize: none;
    border-radius: 10px; padding: 11px 14px; font-size: 13px; color: #1e293b;
    background: #f8fafc; line-height: 1.6; box-sizing: border-box;
    font-family: inherit;
}
.paste-wrap textarea:focus { border-color: #93c5fd; background: #fff; }
.paste-btn {
    position: absolute; top: 8px; right: 8px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    font-size: 12px; padding: 5px 12px; border-radius: 999px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, .3);
}
.parse-preview {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 12px 14px; margin-bottom: 12px;
}
.pp-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pp-team {
    background: #2563eb; color: #fff; font-size: 12px; font-weight: 700;
    padding: 2px 8px; border-radius: 6px;
}
.pp-lack { font-size: 12px; color: #64748b; }
.pp-title {
    font-size: 14px; font-weight: 600; color: #1e293b; line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.pp-price { font-size: 12px; color: #64748b; text-align: right; }
.pp-price b { color: #ef4444; font-size: 18px; margin-left: 2px; }
.parse-err { font-size: 12px; color: #ef4444; text-align: center; margin-bottom: 12px; }
.pub-actions { display: flex; gap: 10px; }
.ghost-btn {
    flex: 0 0 30%; border: 1px solid #e2e8f0; border-radius: 12px; cursor: pointer;
    background: #fff; color: #64748b; font-size: 15px; padding: 12px 0;
}
.pub-actions .pub-btn { flex: 1; padding: 12px 0; font-size: 15px; }
.primary-btn:disabled { opacity: .45; cursor: not-allowed; }
.primary-btn {
    width: 100%; border: none; cursor: pointer;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    font-size: 15px; font-weight: 800; letter-spacing: 2px;
    padding: 13px 0; border-radius: 12px;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.primary-btn:active { transform: scale(0.98); }
.swap-line { text-align: center; margin-top: 12px; font-size: 13px; color: #64748b; }
.swap-line a { color: #2563eb; font-weight: 700; text-decoration: none; }

/* 找同款结果复用卡片 */
.same-list .pt-card { box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06); }

/* ===== 轻提示 (toast, 替代 alert) ===== */
.toast {
    position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0.9);
    z-index: 99; pointer-events: none;
    background: rgba(15, 23, 42, 0.82); color: #fff;
    font-size: 14px; font-weight: 600; padding: 12px 22px; border-radius: 12px;
    opacity: 0; transition: opacity 0.2s, transform 0.2s;
    max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ===== 规则/关于 文本 (主站胶囊标题与清晰段落) ===== */
.rule-h {
    font-size: 13px; font-weight: 800; color: #1e40af;
    background: #f0f5ff; border: 1px solid #dbe7ff;
    padding: 3px 10px; border-radius: 6px;
    display: inline-block; margin: 12px 0 6px 0;
}
.rule-h:first-child { margin-top: 2px; }
.rule-p { font-size: 13px; color: #475569; line-height: 1.85; }

/* ============================================================
   拼团详情页 (detail.html)
   ============================================================ */
.page { padding-bottom: 84px; }   /* 给底部参与条留空间 */

.dt-main-card { padding: 16px 14px; }
.dt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.dt-head .copy-btn { margin-left: auto; }

.dt-goods-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.dt-price { font-size: 26px; }
.dt-price .price-label { font-size: 12px; }

.dt-countdown {
    margin-top: 10px; display: inline-block;
    font-size: 12px; color: #2563eb;
    background: rgba(37, 99, 235, .08);
    border-radius: 8px; padding: 4px 10px;
}
.dt-countdown b { font-variant-numeric: tabular-nums; }

.dt-marks-row {
    display: flex; border-top: 1px solid #f1f5f9;
    margin: 14px -14px -16px -14px;
}
.dt-marks-row .mk-btn {
    flex: 1; border: 0; border-radius: 0;
    padding: 11px 0; font-size: 13px;
}
.dt-marks-row .mk-btn:first-child { border-right: 1px solid #f1f5f9; }

.dt-join-card, .dt-sim-card { margin-top: 12px; padding: 14px; }
.dt-join-head { display: flex; align-items: center; margin-bottom: 10px; }
.dt-sec-title { font-size: 15px; font-weight: 800; color: #0f172a; }
.dt-join-count { margin-left: auto; font-size: 12px; color: #64748b; }
.dt-join-count b { color: #2563eb; font-size: 15px; }

.dt-joiner-list { display: flex; flex-direction: column; gap: 10px; }
.dt-joiner { display: flex; align-items: center; gap: 8px; }
.dt-joiner-nick { font-size: 13px; color: #334155; font-weight: 600; }
.dt-joiner-time { margin-left: auto; font-size: 11px; color: #94a3b8; }

.dt-sim-empty { font-size: 13px; color: #94a3b8; text-align: center; padding: 8px 0 2px 0; }
.dt-sim-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 6px; border-radius: 10px; cursor: pointer;
}
.dt-sim-item:active { background: #eff6ff; }
.dt-sim-title {
    flex: 1; min-width: 0; font-size: 13px; color: #334155;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dt-sim-price { font-size: 14px; font-weight: 800; color: #ef4444; flex-shrink: 0; }
.dt-refresh-sim { margin-left: auto; font-size: 12px; color: #2563eb; cursor: pointer; }

/* 底部参与条 */
.dt-actionbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 520px;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, .07);
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
}
.dt-price-mini { display: flex; flex-direction: column; line-height: 1.3; }
.dt-price-num { font-size: 22px; font-weight: 900; color: #ef4444; }
.dt-join-big {
    flex: 1; padding: 13px 0; font-size: 16px;
    border-radius: 24px;
}
.dt-join-big:disabled { background: #e2e8f0; color: #94a3b8; box-shadow: none; }

/* ============================================================
   发布弹窗美化: 居中卡片版
   ============================================================ */

/* 所有弹层开启动效 */
.mask.open .sheet { animation: sheetUp .22s ease; }
@keyframes sheetUp {
    from { transform: translateY(26px) scale(.97); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* 发布弹窗: 水平垂直居中, 圆角四边 */
#pubMask.mask.open { align-items: center; padding: 20px; }
#pubMask .sheet {
    border-radius: 20px;
    padding: 22px 20px 20px 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
}
#pubMask .sheet-body { padding-top: 4px; }

/* 标题带蓝色强调条 */
.pub-head {
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}
.pub-title { display: flex; align-items: center; font-size: 18px; }
.pub-title::before {
    content: ''; width: 4px; height: 16px; border-radius: 2px;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    margin-right: 8px;
}

/* 步骤条 */
.howto-steps {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    border: 1px solid #bfdbfe; border-radius: 12px;
    padding: 10px 16px; margin-bottom: 14px;
}
.howto-steps .step {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: #1e40af;
}
.howto-steps .step i {
    font-style: normal; width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    font-size: 11px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(37, 99, 235, .3);
}
.howto-steps em { font-style: normal; color: #93c5fd; font-weight: 800; }

/* 粘贴框微调 */
#pubMask .paste-btn {
    top: 50%; transform: translateY(-50%);
    padding: 6px 14px; font-size: 12px; font-weight: 700;
}
#pubMask .paste-wrap textarea { border-radius: 12px; }

/* 遮罩加深一点, 突出弹窗 */
#pubMask { background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }

/* "我的"Tab 分组标题 */
.mine-group-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 800; color: #1e40af;
    margin: 14px 2px 8px 2px;
}
.mine-group-title span {
    font-size: 11px; font-weight: 700; color: #2563eb;
    background: #eff6ff; border-radius: 999px; padding: 1px 8px;
}

/* "我的"Tab 仅近一天提示 */
.mine-tip {
    font-size: 12px; color: #64748b;
    background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px;
    padding: 8px 12px; margin: 10px 0 4px 0; text-align: center;
}

/* 找同款弹层: 与发布弹窗同款居中卡片风格 */
#sameMask.mask.open { align-items: center; padding: 20px; }
#sameMask .sheet {
    border-radius: 20px;
    padding: 22px 20px 20px 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
    max-height: 78vh; width: 100%;
}
#sameMask .sheet-body { padding-top: 2px; }
#sameMask { background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }

/* 弹层内卡片排布 */
#sameMask .same-list { display: flex; flex-direction: column; }
#sameMask .same-list .pt-card { box-shadow: none; border-bottom: 1px solid #f1f5f9; border-radius: 0; padding: 12px 2px; }
#sameMask .same-list .pt-card:last-child { border-bottom: none; }
#sameMask .empty-hint, #sameMask p { text-align: center; }

/* ============================================================
   主站 index-new 风格覆盖层 (#2f6bff / 浅灰蓝底 / 双光晕 / 竖条 / 纯净文字)
   ============================================================ */
body {
    background:
        radial-gradient(800px 300px at 85% -50px, rgba(47,107,255,0.08), transparent 60%),
        radial-gradient(600px 260px at 0% 0%, rgba(124,58,237,0.05), transparent 55%),
        #f6f8fc;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}
.page { max-width: 620px; padding: 0 14px 40px 14px; }

/* --- 顶栏: 品牌栏风格 (主站对齐) --- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 2px 8px 2px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; cursor: pointer; }
.brand:active { opacity: 0.75; }
.brand-logo {
    width: 38px; height: 38px; border-radius: 11px; object-fit: cover; display: block;
    box-shadow: 0 4px 12px rgba(47,107,255,0.28);
}
.brand-name {
    font-size: 16px; font-weight: 800; letter-spacing: 0.5px; color: #0f172a;
    display: flex; align-items: center;
}
.brand-sub { font-size: 10.5px; color: #94a3b8; margin-top: 1px; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
    height: 36px; padding: 0 12px; border-radius: 11px; border: 1px solid #e8eef7;
    background: #fff; cursor: pointer; font-size: 12.5px; font-weight: 700; color: #475569;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:active { transform: scale(0.94); background: #f8fafc; }
.badge-new {
    display: inline-block; vertical-align: 1px; margin-left: 5px;
    font-size: 10px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #2f6bff, #5a8cff);
    padding: 1.5px 6px; border-radius: 6px; letter-spacing: 0.5px;
}

/* --- hero 居中大标题 --- */
.hero { text-align: center; padding: 14px 0 12px 0; }
.hero h1 {
    margin: 0; font-size: 23px; font-weight: 800; letter-spacing: 1px;
    color: #2563eb; text-shadow: 0 2px 8px rgba(37,99,235,0.15);
}
.hero-sub { margin-top: 6px; font-size: 12px; color: #94a3b8; letter-spacing: 2px; }

/* --- 身份横幅 → 主站公告栏风格 (白卡+左竖条) --- */
.id-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: #fff !important; border: 1px solid #e8eef7 !important;
    border-radius: 14px; box-shadow: 0 2px 10px rgba(15,23,42,0.04);
    color: #475569 !important; position: relative; overflow: hidden;
    padding: 9px 14px 9px 18px !important; margin: 10px 0 6px 0;
    font-size: 12.5px;
}
.id-banner::before {
    content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px;
    border-radius: 0 4px 4px 0; background: linear-gradient(180deg, #2f6bff, #22b8e6);
}
.id-banner.ok::before { background: linear-gradient(180deg, #10b981, #34d399); }
.id-banner.tip::before { background: linear-gradient(180deg, #2f6bff, #22b8e6); }

/* --- 搜索框 --- */
.search-wrap { margin: 10px 0 10px 0; position: relative; }
.search-wrap input {
    width: 100%; border: 1.5px solid #dde6f2; border-radius: 13px;
    background: #f8fafd; height: 44px; padding: 0 36px 0 38px;
    font-size: 14px; color: #1e293b; outline: none;
    box-shadow: 0 2px 8px rgba(15,23,42,0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.search-wrap input:focus {
    border-color: #2f6bff; background: #fff; box-shadow: 0 0 0 3px rgba(47,107,255,0.12);
}
.search-wrap .s-icon {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.search-wrap .s-clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; border-radius: 50%;
    background: #e2e8f0; color: #64748b; font-size: 11px; line-height: 22px;
    text-align: center; border: none; cursor: pointer;
}

/* --- Tab 行与倒计时/刷新防挤压 --- */
.tab-row {
    display: flex; align-items: center; gap: 2px;
    border-bottom: 1px solid #e8eef7; margin-bottom: 6px;
    position: relative;
}
.tab {
    border: none; background: none; cursor: pointer;
    font-size: 14.5px; color: #64748b; padding: 9px 10px;
    position: relative; font-weight: 600;
    transition: color 0.15s;
}
.tab.active { color: #2f6bff; font-weight: 800; }
.tab.active::after {
    content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -1px;
    width: 22px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #2f6bff, #22b8e6);
}
.tab-right {
    margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.countdown {
    background: #fff; border: 1px solid #e8eef7; color: #2f6bff;
    border-radius: 999px; padding: 3px 8px; font-size: 11.5px; font-weight: 700;
    box-shadow: 0 2px 6px rgba(15,23,42,0.03); font-variant-numeric: tabular-nums;
}
.refresh-btn {
    display: flex; align-items: center; gap: 3px;
    border: 1px solid #e8eef7; background: #fff; cursor: pointer;
    font-size: 11.5px; font-weight: 700; color: #2f6bff;
    border-radius: 999px; padding: 3px 9px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.03);
    transition: transform 0.15s, background 0.15s;
}
.refresh-btn:active { transform: scale(0.95); background: #f0f5ff; }
.refresh-btn.spin .r-icon { animation: rotateSpin 0.5s linear infinite; }
@keyframes rotateSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* --- 拼团卡片 (列表页): 纯净胶囊微渐变单列卡片 (去掉生硬左竖条，四边圆润浑然一体) --- */
.pt-card {
    background: linear-gradient(168deg, #ffffff 65%, #f6f9ff 100%);
    border: 1px solid #e2eaf5;
    border-radius: 20px;
    padding: 13px 15px 12px 15px;
    margin-top: 11px;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.pt-card:active {
    transform: scale(0.988);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    border-color: #cde0ff;
}
/* 彻底移除左侧蓝色竖条，保持纯净大胶囊卡片质感 */
.pt-card::before { display: none; }
.pt-card.st-full   { opacity: 0.85; }
.pt-card.st-expire { opacity: 0.55; }

.pt-row1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 胶囊化 N人团标签 */
.team-tag {
    flex-shrink: 0; font-size: 11px; font-weight: 800; color: #2563eb;
    background: linear-gradient(135deg, #eef5ff, #e2eeff);
    border: 1px solid #cce0ff;
    padding: 2.5px 9px; border-radius: 999px; line-height: 1.25;
    letter-spacing: 0.3px;
}
.pt-goods-title {
    flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: #0f172a;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.45; word-break: break-all;
}
.pt-row2 { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
.pt-nick {
    flex: 1; min-width: 0; font-size: 11.5px; color: #64748b; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.price-box { flex: none; margin-left: auto; white-space: nowrap; display: flex; align-items: baseline; gap: 2px; }
.price-label { font-size: 10.5px; color: #94a3b8; font-weight: 600; }
.price-num { font-size: 18px; font-weight: 900; color: #ef4444; letter-spacing: -0.5px; }
.price-num i { font-style: normal; font-size: 12px; font-weight: 800; margin-right: 1px; }

/* 参与拼团大胶囊按钮 */
.join-btn {
    align-self: center;
    background: linear-gradient(135deg, #2f6bff 0%, #5a8cff 100%); color: #fff;
    border: none; border-radius: 999px; padding: 7.5px 18px;
    font-size: 12.5px; font-weight: 800; letter-spacing: 0.8px;
    box-shadow: 0 4px 14px rgba(47, 107, 255, 0.32);
    cursor: pointer; transition: transform 0.12s, box-shadow 0.15s;
    white-space: nowrap; flex-shrink: 0;
}
.join-btn:active { transform: scale(0.95); }

/* 底部操作区全量胶囊化 */
.pt-marks {
    display: flex; align-items: center; gap: 7px; margin-top: 9px;
    border-top: 1px dashed #eaf0f8; padding-top: 9px;
}
.mk-btn {
    border: 1px solid #e2eaf5; background: #f8fafd; cursor: pointer;
    font-size: 11px; font-weight: 600; color: #64748b;
    padding: 3.5px 11px; border-radius: 999px;
    transition: all 0.15s ease;
}
.mk-btn:active {
    background: #eef4ff; color: #2f6bff; border-color: #cde0ff;
    transform: scale(0.96);
}
.mk-btn.marked { color: #94a3b8; background: #f1f5f9; border-color: #e2e8f0; cursor: default; }
.mk-status {
    margin-left: auto; font-size: 11px; font-weight: 700;
    padding: 2.5px 9px; border-radius: 999px;
}
.mk-status.full { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.mk-status.expire { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* --- 主按钮 --- */
.primary-btn {
    background: linear-gradient(135deg, #2f6bff, #5a8cff);
    box-shadow: 0 5px 16px rgba(47,107,255,0.32);
    border-radius: 13px;
}

/* --- "我的"分组标题: 主站 list-title 竖条 --- */
.mine-group-title::before {
    content: ''; width: 4px; height: 14px; border-radius: 2px;
    background: linear-gradient(180deg, #2f6bff, #22b8e6);
}
.mine-group-title span { background: #f0f5ff; }

/* --- 弹层标题竖条同步主站色 --- */
.pub-title::before { background: linear-gradient(180deg, #2f6bff, #22b8e6); }

/* --- 详情页副卡/主卡去左侧竖条 --- */
.dt-join-card::before, .dt-sim-card::before, .dt-main-card::before, #sameMask .pt-card::before { display: none; }

/* ===== 顶部频道导航栏 (契合全站科技蓝·跑道胶囊样式) ===== */
.channel-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0 12px 0;
    padding: 3.5px;
    background: #eef3fb;
    border: 1px solid #dce6f5;
    border-radius: 999px;
}
.channel-tab {
    flex: 1;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
    padding: 0 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.channel-tab.is-active {
    background: linear-gradient(135deg, #2f6bff, #5086ff);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(47, 107, 255, 0.28);
    cursor: default;
}
.channel-tab:not(.is-active) {
    background: transparent;
    color: #475569;
    cursor: pointer;
}
.channel-tab:not(.is-active):hover {
    background: rgba(255, 255, 255, 0.85);
    color: #2f6bff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
.channel-tab:not(.is-active):active {
    transform: scale(0.97);
}
.tab-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1.5px 6.5px;
    border-radius: 999px;
    line-height: 1.3;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff4d4f, #f5222d);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(245, 34, 45, 0.25);
}

@media (max-width: 480px) {
    .channel-nav { gap: 4px; margin: 0 0 10px 0; padding: 3px; }
    .channel-tab { min-height: 36px; font-size: 12.5px; padding: 0 6px; gap: 4px; }
    .tab-badge { font-size: 9.5px; padding: 1px 5px; }
}
@media (max-width: 360px) {
    .channel-tab { font-size: 11.5px; gap: 3px; padding: 0 3px; }
    .tab-badge { font-size: 9px; padding: 1px 4px; }
}

/* 找同款弹层: 整卡可点进详情 */
#sameBody .pt-card { cursor: pointer; }
#sameBody .pt-card:active { transform: scale(.985); }
.same-go { font-size: 12px; color: #2f6bff; font-weight: 600; white-space: nowrap; }

/* ---- 详情页主卡重设计: 标签行/大标题/价格锚点/倒计时胶囊 ---- */
.dt-main-card {
    padding: 18px 16px 0; border-radius: 16px;
    background: linear-gradient(165deg, #ffffff 55%, #f4f8ff);
    border: 1px solid #e8eef7;
}
.dt-top { display: flex; align-items: center; gap: 8px; }
.dt-top .dt-nick { margin-left: auto; font-size: 12px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-goods-title { margin-top: 12px; font-size: 17px; font-weight: 800; line-height: 1.55; color: #0f172a; }
.dt-price-row { margin-top: 12px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.dt-price-row .price-label { font-size: 12px; }
.dt-price { font-size: 32px; font-weight: 900; color: #ef4444; letter-spacing: -0.5px; }
.dt-price i { font-style: normal; font-size: 16px; font-weight: 800; margin-right: 2px; }
.dt-price-row .dt-countdown { margin-left: auto; }
.dt-countdown { font-size: 12px; color: #2f6bff; background: #eef4ff; border: 1px solid #dbe7ff; border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.dt-marks-row { display: flex; gap: 10px; border-top: 1px solid #f1f5f9; margin: 16px -16px 0; padding: 14px 16px; }
.dt-marks-row .mk-btn { flex: 1; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 0; font-size: 13px; color: #64748b; }
.dt-marks-row .mk-btn:active { color: #2f6bff; background: #eef4ff; border-color: #dbe7ff; }

/* 详情页流水参与记录 */
.dt-join-head { display: flex; align-items: center; margin-bottom: 10px; }
.dt-sec-title { font-size: 14.5px; font-weight: 800; color: #0f172a; }
.dt-join-count { margin-left: auto; font-size: 12px; color: #64748b; }
.dt-join-count b { color: #2f6bff; font-size: 14px; font-weight: 800; }
.dt-joiner-list { display: flex; flex-direction: column; gap: 2px; }
.dt-joiner {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 0; border-bottom: 1px solid #f8fafc;
}
.dt-joiner:last-child { border-bottom: none; }
.dt-join-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: linear-gradient(135deg, #2f6bff, #22b8e6);
    flex-shrink: 0;
}
.dt-joiner-nick { font-size: 13px; color: #1e293b; font-weight: 600; }
.dt-joiner-time { margin-left: auto; font-size: 11px; color: #94a3b8; }

/* 详情页底部固定参与条 */
.dt-actionbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 620px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, .06);
    border-top: 1px solid #e8eef7;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 50; box-sizing: border-box;
}
.dt-price-num { font-size: 22px; font-weight: 900; color: #ef4444; }
.dt-price-num i { font-style: normal; font-size: 13.5px; font-weight: 800; margin-right: 1px; }
.dt-join-big {
    flex: 1; padding: 12px 0; font-size: 15.5px; font-weight: 800; letter-spacing: 1px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2f6bff, #5a8cff);
    box-shadow: 0 4px 14px rgba(47,107,255,0.35);
}
.dt-join-big:disabled, .dt-join-big.join-btn-done {
    background: #e2e8f0 !important; color: #94a3b8 !important; box-shadow: none !important; cursor: not-allowed;
}

/* 底部悬浮发布按钮 (带安全区防误触) */
.publish-fab {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40;
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #2f6bff, #5a8cff); color: #fff;
    border: none; cursor: pointer; text-decoration: none;
    font-size: 14.5px; font-weight: 800; letter-spacing: 1.5px;
    padding: 12px 30px; border-radius: 999px;
    box-shadow: 0 6px 20px rgba(47,107,255, 0.38);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.publish-fab:hover { transform: translateX(-50%) translateY(-1px); }
.publish-fab:active { transform: translateX(-50%) scale(0.96); }

/* 页面底部间距适配全面屏 (防止被固定底栏/悬浮按钮遮挡) */
.page { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* 发布弹层操作按钮胶囊化 */
.ghost-btn {
    flex: 0 0 30%; border: 1px solid #e8eef7; border-radius: 999px; cursor: pointer;
    background: #fff; color: #64748b; font-size: 14px; font-weight: 700; padding: 11px 0;
    transition: background 0.15s;
}
.ghost-btn:active { background: #f8fafc; }
.pub-actions .pub-btn {
    flex: 1; padding: 11px 0; font-size: 14.5px; border-radius: 999px;
}

/* 发布弹层步骤条 */
.howto-steps {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #f0f5ff, #e6f0ff);
    border: 1px solid #dbe7ff; border-radius: 12px;
    padding: 10px 16px; margin-bottom: 14px;
}
.howto-steps .step {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: #1e40af;
}
.howto-steps .step i {
    font-style: normal; width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #2f6bff, #5a8cff); color: #fff;
    font-size: 11px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(47,107,255,0.3);
}
.howto-steps em { font-style: normal; color: #94a3b8; font-weight: 800; }

/* ===== 悬浮回到顶部按钮 (毛玻璃虚化质感) ===== */
.back-top {
    position: fixed;
    right: max(16px, calc(50% - 260px - 58px));
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(220, 235, 255, 0.85);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(47, 107, 255, 0.08);
    color: #2f6bff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.88);
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.15s ease,
                border-color 0.15s ease,
                box-shadow 0.15s ease;
}
.back-top svg { display: block; transition: transform 0.2s ease; }
.back-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.back-top:hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(191, 219, 254, 0.95);
    box-shadow: 0 6px 20px rgba(47, 107, 255, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
}
.back-top:hover svg {
    transform: translateY(-2px);
}
.back-top:active {
    transform: translateY(0) scale(0.92);
    background: rgba(240, 246, 255, 0.92);
}


