:root {
    --primary: #1769e0;
    --primary-dark: #1257bf;
    --primary-soft: #eef3fb;
    --price: #f0480e;
    --success: #2ba471;
    --supply: #3b6d11;
    --supply-soft: #eaf3de;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #1f2329;
    --sub: #646a73;
    --muted: #8f959e;
    --line: #eef0f2;
    --warn: #fa8c16;
    --warn-soft: #fff7e6;
    --radius: 16px;
    --shadow: 0 4px 16px rgba(31, 35, 41, 0.06);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: #e7ebf1;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app {
    position: relative;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 40px rgba(31, 35, 41, 0.08);
    overflow-x: hidden;
}

.view {
    min-height: 100vh;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

a { color: inherit; text-decoration: none; }

/* ================= 首页 ================= */
.top-area { padding: 10px 12px 0; }

.banner {
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1769e0 0%, #5b8def 55%, #7c5cff 100%);
    box-shadow: 0 8px 22px rgba(23, 105, 224, 0.3);
}

.banner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-title {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.banner-stat {
    display: flex;
    align-items: baseline;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.banner-num { font-size: 16px; font-weight: 800; color: #fff; }
.banner-lbl { margin-left: 4px; font-size: 11px; color: rgba(255, 255, 255, 0.9); }
.banner-sub { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, 0.92); }

.search-bar {
    display: flex;
    align-items: center;
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}
.search-icon { margin-right: 8px; font-size: 14px; }
.search-placeholder { font-size: 13px; color: var(--muted); }

.kind-tabs {
    display: flex;
    padding: 4px;
    margin-top: 10px;
    border-radius: 10px;
    background: #eef1f5;
}
.kind-tab {
    flex: 1;
    padding: 9px 0;
    text-align: center;
    font-size: 13px;
    color: var(--sub);
    border-radius: 8px;
    transition: all 0.15s ease;
    cursor: pointer;
}
.kind-tab.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 3px 9px rgba(23, 105, 224, 0.12);
}

.sort-tabs { display: flex; align-items: center; margin-top: 10px; }
.sort-tab {
    padding: 5px 13px;
    margin-right: 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e8eb;
    font-size: 12px;
    color: var(--sub);
    cursor: pointer;
}
.sort-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.chip-row {
    display: flex;
    gap: 7px;
    margin-top: 9px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto;
    padding: 6px 13px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e8eb;
    font-size: 12px;
    color: var(--sub);
    cursor: pointer;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.fee-active { background: #fff1e8; border-color: #ffd9c2; color: var(--price); font-weight: 600; }

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
    font-size: 11px;
    color: var(--muted);
}
.clear-filter { color: var(--primary); cursor: pointer; }

/* ================= 信息流 ================= */
.feed { padding: 10px 12px 20px; }

.post-card {
    margin-bottom: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.12s ease;
}
.post-card:active { transform: scale(0.985); }

.post-cover {
    height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.post-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover-emoji { font-size: 38px; line-height: 1; }
.post-cover-cat { margin-top: 5px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.95); }

.post-body { padding: 13px 14px 12px; }
.post-head { display: flex; align-items: flex-start; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #1769e0, #5b8def);
    color: #fff; font-size: 15px; font-weight: 600;
    line-height: 34px; text-align: center; flex-shrink: 0;
}
.post-head-main { flex: 1; margin-left: 10px; min-width: 0; }
.post-title {
    font-size: 15px; font-weight: 600; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }

.tag {
    padding: 2px 8px;
    border-radius: 5px;
    background: #f2f3f5;
    color: var(--sub);
    font-size: 11px;
}
.tag-kind.demand { background: #e6f1fb; color: var(--primary); }
.tag-kind.supply { background: var(--supply-soft); color: var(--supply); }
.tag-new { background: #fff1e8; color: var(--price); font-weight: 600; }

.post-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; padding-top: 9px; border-top: 1px solid #f0f1f2;
}
.foot-left { display: flex; align-items: baseline; }
.post-price { font-size: 14px; font-weight: 700; color: var(--price); }
.post-hot { margin-left: 7px; font-size: 11px; color: #d4380d; }
.post-time { font-size: 11px; color: var(--muted); }

/* ================= 状态 ================= */
.state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 240px; padding: 32px 20px;
    text-align: center;
}
.state-icon { font-size: 40px; }
.state-title { margin-top: 10px; font-size: 16px; font-weight: 600; }
.state-desc { margin-top: 6px; font-size: 13px; color: var(--sub); line-height: 1.6; }

.spinner {
    width: 26px; height: 26px;
    border: 3px solid #dbe8fb; border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.primary-btn {
    display: inline-flex; align-items: center; justify-content: center;
    margin-top: 14px; padding: 0 24px; height: 40px;
    border: none; border-radius: 10px;
    background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer;
}
.primary-btn:active { opacity: 0.85; }

/* ================= 底部 tabBar ================= */
.tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(31, 35, 41, 0.05);
    z-index: 50;
}
.tab {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 56px;
    color: var(--muted);
    font-size: 11px;
}
.tab-icon { font-size: 19px; line-height: 1.2; }
.tab-text { margin-top: 1px; }
.tab.active { color: var(--primary); font-weight: 600; }
.tab-publish { position: relative; }
.tab-plus {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-top: -18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1769e0, #5b8def);
    color: #fff; font-size: 26px; font-weight: 300;
    box-shadow: 0 6px 14px rgba(23, 105, 224, 0.35);
    line-height: 1;
}
.tab-publish .tab-text { margin-top: 2px; }

/* ================= 详情 ================= */
.detail { padding: 0 12px 20px; }
.detail-cover {
    height: 170px;
    margin: 0 -12px;
    display: flex; align-items: center; justify-content: center;
}
.detail-cover-img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover-emoji { font-size: 60px; }

.detail-card {
    margin-top: -18px;
    position: relative;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}
.detail-head { display: flex; align-items: center; }
.detail-head-main { flex: 1; margin-left: 10px; min-width: 0; }
.nickname { font-size: 14px; color: var(--text); }
.fav-btn {
    flex-shrink: 0;
    width: 34px; height: 34px; line-height: 32px;
    text-align: center; border-radius: 50%;
    border: 1px solid #e5e8eb; background: #f5f7fa;
    color: #b4bac1; font-size: 18px; margin-left: 8px;
    cursor: pointer;
}
.fav-btn.on { border-color: #ffb020; background: #fff7e6; color: var(--warn); }

.detail-title { margin-top: 14px; font-size: 20px; font-weight: 700; line-height: 1.4; }
.price-box {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 14px; padding: 12px;
    border-radius: 10px; background: #fff7f3;
}
.price-label { font-size: 13px; color: var(--sub); }
.price-value { font-size: 17px; font-weight: 700; color: #d4380d; }

.section-label {
    display: block; margin: 18px 0 7px;
    font-size: 13px; font-weight: 600; color: var(--text);
}
.desc { font-size: 14px; line-height: 1.7; color: #32383d; white-space: pre-wrap; }
.contact-box {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 12px; border-radius: 10px; background: var(--bg);
}
.contact-text { font-size: 14px; word-break: break-all; }
.copy-btn {
    flex-shrink: 0; margin-left: 10px;
    padding: 7px 14px; border: none; border-radius: 8px;
    background: var(--primary); color: #fff; font-size: 12px; cursor: pointer;
}
.detail-time { display: block; margin-top: 14px; font-size: 11px; color: var(--muted); }
.safe-tip {
    margin-top: 14px; padding: 10px 12px; border-radius: 9px;
    background: var(--warn-soft); color: #ad6800; font-size: 11px; line-height: 1.6;
}

.related-card {
    display: flex; align-items: center;
    margin-top: 8px; padding: 12px;
    border-radius: 11px; background: #fff; border: 1px solid var(--line);
    cursor: pointer;
}
.rel-cover {
    width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
    margin-right: 10px; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.rel-cover img { width: 100%; height: 100%; object-fit: cover; }
.rel-cover-emoji { font-size: 22px; }
.rel-main { flex: 1; min-width: 0; }
.rel-title {
    font-size: 13px; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.rel-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rel-price { font-size: 12px; font-weight: 600; color: #d4380d; }
.rel-arrow { color: #c0c4cc; font-size: 18px; }

.detail-bar {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    display: flex; align-items: center; gap: 9px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(31, 35, 41, 0.05);
    z-index: 40;
}
.bar-btn {
    flex: 1; height: 42px; border: none; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.bar-primary { background: var(--primary); color: #fff; }
.bar-ghost { flex: 0 0 84px; background: #fff1f0; color: #d4380d; }
.bar-report { flex: 0 0 72px; text-align: center; font-size: 13px; color: var(--sub); cursor: pointer; }

/* ================= 顶部返回栏 ================= */
.navbar {
    display: flex; align-items: center;
    padding: 10px 12px; background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.nav-back { width: 34px; font-size: 26px; line-height: 1; color: var(--text); cursor: pointer; }
.nav-title { flex: 1; font-size: 15px; font-weight: 600; text-align: center; }
.nav-right { width: 34px; font-size: 20px; text-align: right; color: var(--sub); cursor: pointer; }

/* ================= 搜索 ================= */
.search-top {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.search-input {
    flex: 1; padding: 9px 12px;
    border: none; border-radius: 10px;
    background: #f2f3f5; font-size: 13px;
}
.panel { padding: 16px 12px; }
.block { margin-bottom: 20px; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.block-title { font-size: 13px; font-weight: 600; }
.block-clear { font-size: 12px; color: var(--muted); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { padding: 7px 14px; }
.chips .chip.hot { background: #fff1e8; border-color: #ffd9c2; color: var(--price); }

.result-count { padding: 8px 2px 4px; font-size: 12px; color: var(--muted); }
.res-card {
    display: flex; padding: 12px; margin-bottom: 9px;
    border-radius: 12px; background: #fff; border: 1px solid var(--line);
    cursor: pointer;
}
.res-cover {
    width: 64px; height: 64px; border-radius: 9px; flex-shrink: 0;
    margin-right: 10px; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.res-cover img { width: 100%; height: 100%; object-fit: cover; }
.res-cover-emoji { font-size: 28px; }
.res-main { flex: 1; min-width: 0; }
.res-title {
    margin-top: 5px; font-size: 14px; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.res-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.res-price { font-size: 13px; font-weight: 700; color: #d4380d; }
.res-meta { font-size: 11px; color: var(--muted); }

/* ================= 发布 ================= */
.publish-wrap { padding: 12px; }
.form-card { padding: 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.form-section { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 7px; font-size: 13px; color: var(--text); font-weight: 500; }
.form-label .required { color: #d4380d; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.label-row .form-label { margin-bottom: 0; }
.counter { font-size: 11px; color: var(--muted); }
.kind-row { display: flex; padding: 4px; border-radius: 10px; background: #eef1f5; }
.kind-option {
    flex: 1; padding: 9px 0; text-align: center;
    font-size: 13px; color: var(--sub); border-radius: 8px; cursor: pointer;
}
.kind-option.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 3px 9px rgba(23, 105, 224, 0.12); }

.input, .textarea, .select {
    width: 100%; padding: 11px 12px;
    border: 1px solid #d6d8dc; border-radius: 10px;
    background: #fff; font-size: 14px; color: var(--text);
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f959e' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.quick-row { display: flex; gap: 8px; margin-top: 8px; }
.quick-chip {
    padding: 5px 14px; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
    font-size: 12px; cursor: pointer; border: none;
}

.cover-add {
    width: 100px; height: 100px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 1.5px dashed #bcd0f3; border-radius: 10px;
    background: #f5f9ff; color: var(--primary); cursor: pointer;
}
.cover-add-icon { font-size: 28px; line-height: 1; }
.cover-add-text { margin-top: 5px; font-size: 12px; }
.cover-preview { position: relative; width: 100px; height: 100px; border-radius: 10px; overflow: hidden; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-remove {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px; line-height: 20px; text-align: center;
    border-radius: 50%; background: rgba(0, 0, 0, 0.55);
    color: #fff; font-size: 17px; cursor: pointer;
}

.form-error {
    margin-top: 12px; padding: 9px 12px; border-radius: 9px;
    background: #fff0ef; color: #d4380d; font-size: 12px;
}
.submit-btn {
    width: 100%; height: 46px; margin-top: 16px;
    border: none; border-radius: 11px;
    background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer;
}
.submit-btn:disabled { opacity: 0.6; }
.form-tip { display: block; margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.6; }

/* ================= 我的 ================= */
.mine-wrap { padding: 20px 12px 12px; }
.hero { margin-bottom: 14px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--primary); }
.hero-title { margin-top: 7px; font-size: 25px; font-weight: 700; line-height: 1.25; }
.hero-sub { margin-top: 5px; font-size: 13px; color: var(--sub); }

.profile-card {
    display: flex; align-items: center;
    padding: 16px; border-radius: 16px; background: #fff;
    border: 1px solid #e5e8eb; box-shadow: var(--shadow);
}
.profile-avatar {
    position: relative; width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(135deg, #1769e0, #5b8def);
    color: #fff; font-size: 22px; font-weight: 700;
    line-height: 54px; text-align: center; flex-shrink: 0;
    overflow: hidden; cursor: pointer;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar::after {
    content: '改'; position: absolute; right: 0; bottom: 0;
    width: 18px; height: 18px; line-height: 18px; font-size: 10px;
    text-align: center; background: rgba(0, 0, 0, 0.45); color: #fff;
}
.profile-main { flex: 1; margin-left: 12px; min-width: 0; }
.nickname-row { display: flex; align-items: center; cursor: pointer; }
.nickname { font-size: 17px; font-weight: 600; }
.nickname-edit {
    margin-left: 8px; padding: 2px 9px; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary); font-size: 11px;
}
.stat-board { display: flex; align-items: center; margin-top: 8px; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 17px; font-weight: 700; line-height: 1.2; }
.stat-lbl { margin-top: 2px; font-size: 11px; color: var(--muted); }
.stat-div { width: 1px; height: 24px; background: var(--line); margin: 0 16px; }

.menu-card {
    margin-top: 10px; padding: 4px 16px;
    border-radius: 16px; background: #fff;
    border: 1px solid #e5e8eb; box-shadow: var(--shadow);
}
.menu-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 0; border-top: 1px solid #f0f1f2; cursor: pointer;
}
.menu-item:first-child { border-top: none; }
.menu-left { display: flex; align-items: center; }
.menu-icon { font-size: 17px; margin-right: 10px; }
.menu-text { font-size: 14px; }
.menu-arrow { color: var(--muted); font-size: 16px; }

/* ================= Toast / Sheet ================= */
.toast {
    position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(10px);
    max-width: 80%;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(31, 35, 41, 0.88);
    color: #fff; font-size: 13px; text-align: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sheet-mask {
    position: fixed; inset: 0; z-index: 300;
    display: none;
    align-items: flex-end; justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}
.sheet-mask.show { display: flex; }
.sheet-body {
    width: 100%; max-width: 480px;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: #fff;
    animation: sheetUp 0.22s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.sheet-desc { font-size: 13px; color: var(--sub); line-height: 1.6; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-btn {
    flex: 1; height: 42px; border: none; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.sheet-cancel { background: #f2f3f5; color: var(--sub); }
.sheet-ok { background: var(--primary); color: #fff; }
.sheet-ok.danger { background: #d4380d; }

/* ==================================================================
   账号 / 积分 / 签到 / 推广 —— 第二批样式（与前面同一套设计变量）
   ================================================================== */
:root {
    --coin: #f0a020;
    --coin-deep: #d98600;
    --coin-soft: #fff6e5;
    --wx: #07c160;
}

/* ---------- 通用小件 ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
}
.pill-coin { background: rgba(255, 255, 255, 0.22); color: #fff; }
.pill-coin-dark { background: var(--coin-soft); color: var(--coin-deep); }

.banner-actions { display: flex; align-items: center; gap: 8px; }
.pts-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff; font-size: 12px; font-weight: 600;
    cursor: pointer;
}
.pts-pill .coin-dot { font-size: 12px; }

.fade-in { animation: fadeIn 0.22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片角标 ---------- */
.badge-top, .badge-heat {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 5px;
    font-size: 11px; font-weight: 600;
}
.badge-top { background: linear-gradient(135deg, #ff8a3d, #f0480e); color: #fff; }
.badge-heat { background: #fff1e8; color: var(--price); }
.badge-row { display: flex; gap: 6px; margin-bottom: 0; }

/* 置顶卡片描边，信息流里一眼可见 */
.post-card.is-top { border-color: #ffd0b8; box-shadow: 0 6px 20px rgba(240, 72, 14, 0.12); }

/* ---------- 加载骨架 ---------- */
.sk-card {
    margin-bottom: 10px; padding-bottom: 12px;
    border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow: hidden;
}
.sk-cover { height: 112px; background: #eef1f5; }
.sk-body { padding: 13px 14px 0; }
.sk-line { height: 12px; margin-bottom: 9px; border-radius: 6px; background: #eef1f5; }
.sk-line.w70 { width: 70%; }
.sk-line.w45 { width: 45%; }
.sk-line.w30 { width: 30%; }
.sk-shine { position: relative; overflow: hidden; }
.sk-shine::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- 登录页 ---------- */
.login-wrap { padding: 26px 18px 30px; }
.login-hero { text-align: center; padding: 18px 0 22px; }
.brand-mark {
    width: 66px; height: 66px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #1769e0, #5b8def 60%, #7c5cff);
    box-shadow: 0 10px 26px rgba(23, 105, 224, 0.32);
    color: #fff; font-size: 30px;
}
.login-title { margin-top: 16px; font-size: 23px; font-weight: 800; letter-spacing: 0.5px; }
.login-sub { margin-top: 7px; font-size: 13px; color: var(--sub); line-height: 1.6; }

.login-card {
    padding: 18px; border-radius: 18px; background: #fff;
    border: 1px solid #e5e8eb; box-shadow: var(--shadow);
}
.wx-btn {
    width: 100%; height: 48px; border: none; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--wx); color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer;
}
.wx-btn:active { opacity: 0.9; }
.wx-btn .wx-icon { font-size: 17px; }
.guest-btn {
    width: 100%; height: 46px; margin-top: 10px;
    border: 1px solid #d6d8dc; border-radius: 12px;
    background: #fff; color: var(--text); font-size: 14px; font-weight: 500;
    cursor: pointer;
}
.guest-btn:active { background: #f7f8fa; }

.login-note {
    margin-top: 12px; padding: 10px 12px; border-radius: 9px;
    background: var(--warn-soft); color: #ad6800; font-size: 11.5px; line-height: 1.65;
}
.login-agree { margin-top: 14px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.6; }

.login-benefits { margin-top: 16px; padding: 4px 16px; border-radius: 16px; background: #fff; border: 1px solid #e5e8eb; }
.benefit-row { display: flex; align-items: center; padding: 12px 0; border-top: 1px solid #f2f3f5; }
.benefit-row:first-child { border-top: none; }
.benefit-emoji { width: 30px; font-size: 17px; }
.benefit-main { flex: 1; }
.benefit-title { font-size: 13.5px; font-weight: 600; }
.benefit-desc { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.benefit-value { font-size: 12px; font-weight: 700; color: var(--coin-deep); }

/* ---------- 积分中心 ---------- */
.coin-wrap { padding: 12px; }
.coin-hero {
    position: relative; overflow: hidden;
    padding: 20px 18px 18px; border-radius: 20px;
    background: linear-gradient(135deg, #2b3a67, #41548f 52%, #5b6fb5);
    box-shadow: 0 12px 28px rgba(43, 58, 103, 0.28);
    color: #fff;
}
.coin-hero::after {
    content: '◈'; position: absolute; right: -14px; bottom: -34px;
    font-size: 128px; line-height: 1; color: rgba(255, 255, 255, 0.08);
}
.coin-label { font-size: 12px; color: rgba(255, 255, 255, 0.75); letter-spacing: 1px; }
.coin-balance { display: flex; align-items: baseline; margin-top: 4px; }
.coin-num { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: 0.5px; }
.coin-unit { margin-left: 6px; font-size: 13px; color: rgba(255, 255, 255, 0.82); }
.coin-sub { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, 0.85); }

.sign-btn {
    position: absolute; right: 16px; top: 18px; z-index: 2;
    height: 40px; padding: 0 18px;
    border: none; border-radius: 999px;
    background: linear-gradient(135deg, #ffcf6b, #f0a020);
    color: #6b3f00; font-size: 13.5px; font-weight: 700;
    box-shadow: 0 6px 16px rgba(240, 160, 32, 0.4);
    cursor: pointer;
}
.sign-btn:disabled { background: rgba(255, 255, 255, 0.24); color: rgba(255, 255, 255, 0.9); box-shadow: none; }

.week-card {
    margin-top: 10px; padding: 14px 12px 12px;
    border-radius: 16px; background: #fff; border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.week-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.week-title { font-size: 13px; font-weight: 600; }
.week-streak { font-size: 11.5px; color: var(--coin-deep); font-weight: 600; }
.week-grid { display: flex; gap: 6px; }
.week-cell { flex: 1; text-align: center; }
.week-day { font-size: 10.5px; color: var(--muted); }
.week-dot {
    position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 42px;
    margin: 5px auto 0; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: #f4f6f9; color: var(--muted); font-size: 12px; font-weight: 600;
}
.week-cell.signed .week-dot { background: linear-gradient(135deg, #ffe1a6, #ffc65c); color: #7a4a00; }
.week-cell.today .week-dot { box-shadow: 0 0 0 2px var(--primary) inset; }
.week-cell.today.signed .week-dot { box-shadow: 0 0 0 2px #d98600 inset; }
.week-reward { margin-top: 4px; font-size: 10px; color: var(--coin-deep); }

.task-card, .rule-card, .ledger-card {
    margin-top: 10px; padding: 4px 16px;
    border-radius: 16px; background: #fff; border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 0 9px; }
.card-title { font-size: 13.5px; font-weight: 600; }
.card-extra { font-size: 11.5px; color: var(--muted); }

.task-row { display: flex; align-items: center; padding: 12px 0; border-top: 1px solid #f2f3f5; }
.task-icon { width: 34px; font-size: 18px; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 13.5px; font-weight: 500; }
.task-desc { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.task-btn {
    flex-shrink: 0; height: 30px; padding: 0 14px;
    border: none; border-radius: 999px;
    background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
    cursor: pointer;
}
.task-btn.ghost { background: #eef3fb; color: var(--primary); }
.task-btn.gold { background: linear-gradient(135deg, #ffcf6b, #f0a020); color: #6b3f00; }
.task-btn:disabled { background: #f2f3f5; color: #b4bac1; cursor: default; }

.rule-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid #f2f3f5; font-size: 12.5px; }
.rule-row:first-of-type { border-top: none; }
.rule-name { color: var(--sub); }
.rule-val { font-weight: 600; }
.rule-val.minus { color: var(--price); }
.rule-val.plus { color: var(--success); }

.ledger-row { display: flex; align-items: center; padding: 11px 0; border-top: 1px solid #f2f3f5; }
.ledger-row:first-of-type { border-top: none; }
.ledger-main { flex: 1; min-width: 0; }
.ledger-title { font-size: 13px; }
.ledger-time { margin-top: 2px; font-size: 11px; color: var(--muted); }
.ledger-amt { font-size: 14px; font-weight: 700; }
.ledger-amt.plus { color: var(--success); }
.ledger-amt.minus { color: var(--price); }
.ledger-empty { padding: 18px 0; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 发布页积分条 ---------- */
.points-strip {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding: 11px 14px;
    border-radius: 12px; background: linear-gradient(135deg, #fff8ea, #fff3d9);
    border: 1px solid #ffe0ac;
}
.points-strip-left { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #8a5a00; }
.points-strip-num { font-weight: 800; font-size: 15px; color: #6b3f00; }
.points-strip-link { font-size: 12px; font-weight: 600; color: var(--coin-deep); cursor: pointer; }
.points-warn {
    margin-bottom: 12px; padding: 10px 13px; border-radius: 10px;
    background: #fff1f0; color: #cf2f0a; font-size: 12px; line-height: 1.6;
}

/* 未登录遮罩卡 */
.gate-card {
    margin: 12px; padding: 26px 20px; text-align: center;
    border-radius: 18px; background: #fff; border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.gate-icon { font-size: 38px; }
.gate-title { margin-top: 10px; font-size: 17px; font-weight: 700; }
.gate-desc { margin-top: 6px; font-size: 13px; color: var(--sub); line-height: 1.65; }

/* ---------- 详情页推广 ---------- */
.detail-badges { display: flex; gap: 6px; margin-top: 10px; }
.promote-panel {
    margin-top: 10px; padding: 12px;
    border-radius: 12px; background: #f7f9fc; border: 1px dashed #cfdcf3;
}
.promote-head { display: flex; align-items: center; justify-content: space-between; }
.promote-title { font-size: 12.5px; font-weight: 600; color: var(--primary); }
.promote-balance { font-size: 11.5px; color: var(--sub); }
.promote-actions { display: flex; gap: 8px; margin-top: 10px; }
.promote-btn {
    flex: 1; height: 36px;
    border: none; border-radius: 9px;
    font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.promote-btn.top { background: linear-gradient(135deg, #ff9a4d, #f0480e); color: #fff; }
.promote-btn.heat { background: #fff1e8; color: var(--price); border: 1px solid #ffd9c2; }
.promote-btn:disabled { opacity: 0.55; cursor: default; }
.promote-state { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.55; }

/* ---------- 我的：积分卡 ---------- */
.pts-card {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2b3a67, #4b5f9e);
    color: #fff; box-shadow: 0 8px 22px rgba(43, 58, 103, 0.24);
    cursor: pointer;
}
.pts-card-left { display: flex; align-items: baseline; gap: 6px; }
.pts-card-num { font-size: 24px; font-weight: 800; }
.pts-card-lbl { font-size: 12px; color: rgba(255, 255, 255, 0.82); }
.pts-card-right { font-size: 12px; color: rgba(255, 255, 255, 0.92); }

.progress-wrap { margin-top: 9px; }
.progress-track { height: 6px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5b8def, #1769e0); }
.progress-text { margin-top: 4px; font-size: 10.5px; color: var(--muted); }

.logout-btn {
    width: 100%; height: 44px; margin-top: 12px;
    border: 1px solid #e5e8eb; border-radius: 12px;
    background: #fff; color: var(--sub); font-size: 14px;
    cursor: pointer;
}

/* ---------- 我的：资料编辑表单 ---------- */
.form-row { margin-top: 14px; }
.form-row .form-label { margin-bottom: 6px; }

/* ---------- 桌面端：手机框观感 ---------- */
@media (min-width: 560px) {
    body { padding: 24px 0; }
    .app { min-height: calc(100vh - 48px); border-radius: 20px; overflow: hidden; }
    .tabbar { bottom: 24px; border-radius: 0 0 20px 20px; }
    .detail-bar { bottom: 24px; }
}
