:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --bg: #f5f7fa;
    --bg-white: #fff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f1f5f9;
    --danger: #ef4444;
    --success: #10b981;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
/* overflow-x:hidden 会让 body 变成滚动容器，导致 position:sticky 失效；clip 不会 */
@supports (overflow-x: clip) {
    html, body { overflow-x: clip; }
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* === Top bar === */
.topbar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-muted);
}
.topbar .inner {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.topbar a { color: var(--text-muted); }
.topbar a:hover { color: var(--primary); }

/* === Header === */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.site-header .row {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: #c8161d;
    flex-shrink: 0;
}
.brand .brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brand .brand-text b { font-family:'SiyuanRouhei','PingFang SC','Microsoft YaHei',sans-serif; font-size: 20px; font-weight: 800; letter-spacing: .5px; color: #c8161d; }
.brand .brand-text small { display: block; margin: 2px 0 0; font-size: 10px; font-weight: 700; letter-spacing: 1.1px; color: #c8161d; font-family:'SiyuanRouhei','PingFang SC','Microsoft YaHei',sans-serif; }
.brand .icon {
    width: 42px;
    height: 42px;
    background: url(/favicon.ico?v=20260606) center/contain no-repeat;
    color: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    filter: drop-shadow(0 0 8px rgba(251,191,36,.85)) drop-shadow(0 0 18px rgba(245,158,11,.45));
    overflow: hidden;
    text-indent: -9999px;
}
.brand small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.main-nav a {
    padding: 8px 16px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all .2s;
    position: relative;
}
.main-nav a:hover { background: var(--bg); color: var(--primary); }
.main-nav a.active {
    color: var(--primary);
    font-weight: 600;
}
.main-nav a small {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-box {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    overflow: hidden;
    height: 36px;
}
.search-box input {
    width: 200px;
    border: none;
    background: transparent;
    padding: 0 14px;
    outline: none;
    font-size: 13px;
}
.search-box button {
    background: transparent;
    border: none;
    padding: 0 14px;
    color: var(--text-secondary);
    font-size: 14px;
}
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 4px 12px rgba(37,99,235,.35); transform: translateY(-1px); color: #fff; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost {
    background: var(--bg);
    color: var(--text);
}
.btn-ghost:hover { background: #e5e7eb; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.user-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 18px;
    background: var(--bg);
    color: var(--text);
}
.user-mini:hover { background: var(--primary-light); color: var(--primary); }
.user-mini .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
}
.user-mini .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-mini .nickname { font-size: 13px; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 汉堡 */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 22px;
    padding: 6px;
}

/* === Layout === */
.main-wrap { padding: 20px 0 60px; }
.layout-3col {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 20px;
    align-items: start;
}
.layout-2col {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

.side-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.side-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.side-card h3 .more { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.side-card h3 .more:hover { color: var(--primary); }

.category-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 6px;
    color: var(--text);
    margin-bottom: 2px;
    transition: all .2s;
    font-size: 13px;
}
.category-list a:hover, .category-list a.active {
    background: var(--primary-light);
    color: var(--primary);
}
.category-list a .ico {
    width: 22px; text-align: center;
}
.category-list a .cnt {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.hot-list { margin: 0; padding: 0; list-style: none; }
.hot-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-light);
}
.hot-list li:last-child { border: 0; }
.hot-list li a {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.hot-list li .rank {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-top: 2px;
}
.hot-list li:nth-child(1) .rank { background: #ef4444; color: #fff; }
.hot-list li:nth-child(2) .rank { background: #f97316; color: #fff; }
.hot-list li:nth-child(3) .rank { background: #f59e0b; color: #fff; }
.hot-list li .title {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}
.hot-list li:hover .title { color: var(--primary); }
.hot-list li .meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }


/* === Top tabs (推荐/最新/精华) === */
.tabs-bar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.tabs-bar .tab {
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-right: 4px;
    transition: all .2s;
    white-space: nowrap;
}
.tabs-bar .tab:hover { color: var(--primary); }
.tabs-bar .tab.active {
    color: var(--primary);
    font-weight: 700;
    border-bottom-color: var(--primary);
}
.tabs-bar .tab .badge {
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}
.tabs-bar .write-btn {
    margin-left: auto;
}

/* === Post card === */
.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow-md); }

.post-card .head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.post-card .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #93c5fd, var(--primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
}
.post-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-card .author { font-weight: 500; font-size: 14px; color: var(--text); }
.post-card .time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.post-card .body { padding-left: 52px; }
.post-card .title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color .2s;
}
.post-card .title:hover { color: var(--primary); }
.post-card .title .tag-top {
    display: inline-block;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
    margin-right: 6px;
    vertical-align: middle;
}
.post-card .title .tag-essence {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
    margin-right: 6px;
    vertical-align: middle;
}
.post-card .excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
    margin-bottom: 12px;
    max-width: 480px;
}
.post-card .images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity .2s;
}
.post-card .images img:hover { opacity: .85; }

.post-card .foot {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-muted);
    font-size: 13px;
}
.post-card .foot .cat-tag {
    background: var(--bg);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: auto;
}
.post-card .foot .cat-tag:hover { background: var(--primary-light); color: var(--primary); }
.post-card .foot .act {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color .2s;
}
.post-card .foot .act:hover { color: var(--primary); }
.post-card .foot .act.liked { color: var(--danger); }
.post-card .foot .act.collected { color: var(--accent); }

/* Empty / Loading */
.empty, .loading {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
.empty .emoji { font-size: 40px; margin-bottom: 12px; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--border-light);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .cur {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination .disabled { opacity: .4; cursor: not-allowed; }

/* === Post detail === */
.post-detail {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    box-shadow: var(--shadow-sm);
}
.post-detail .crumb {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}
.post-detail .crumb a:hover { color: var(--primary); }
.post-detail h1 {
    font-size: 26px;
    color: var(--text);
    margin-bottom: 18px;
    line-height: 1.4;
}
.post-detail .author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}
.post-detail .author-info .avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #93c5fd, var(--primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.post-detail .author-info .avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-detail .author-info .nick { font-size: 15px; font-weight: 500; }
.post-detail .author-info .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.post-detail .author-info .stats {
    margin-left: auto;
    display: flex;
    gap: 24px;
    color: var(--text-muted);
    font-size: 13px;
}
.post-detail .content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 28px;
}
.post-detail .content img { max-width: 100%; border-radius: var(--radius-md); margin: 16px 0; }
.post-detail .actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 18px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.post-detail .actions .act-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-secondary);
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}
.post-detail .actions .act-btn:hover { background: var(--primary-light); color: var(--primary); }
.post-detail .actions .act-btn.liked { background: #fee2e2; color: var(--danger); }
.post-detail .actions .act-btn.collected { background: #fef3c7; color: var(--accent); }

/* === Comments === */
.comments-section { margin-top: 28px; }
.comments-section h3 { font-size: 17px; color: var(--text); margin-bottom: 16px; }
.comment-form {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.comment-form textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
}
.comment-form textarea:focus { border-color: var(--primary); }
.comment-form .actions {
    margin-top: 10px;
    text-align: right;
}
.comment-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 12px;
}
.comment-item .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #93c5fd, var(--primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.comment-item .avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-item .body { flex: 1; min-width: 0; }
.comment-item .nick { font-size: 13px; font-weight: 500; color: var(--text); }
.comment-item .time { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
.comment-item .text { font-size: 14px; color: var(--text); margin-top: 6px; }

/* === Forms === */
.form-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
    max-width: 720px;
    margin: 0 auto;
}
.form-card h2 { font-size: 20px; margin-bottom: 22px; color: var(--text); }
.form-row { margin-bottom: 16px; }
.form-row label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    background: var(--bg-white);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); }
.form-row textarea { resize: vertical; min-height: 200px; line-height: 1.7; }

/* === Footer === */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 28px 0 20px;
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
}
.site-footer a { color: #94a3b8; }
.site-footer a:hover { color: #fff; }
.site-footer .links { margin-bottom: 14px; }
.site-footer .links a { margin: 0 12px; }
.site-footer .copy { color: #64748b; font-size: 12px; }

/* === Toast === */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: rgba(0,0,0,.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all .25s;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === Modal === */
.modal-mask {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}
.modal-mask.show { display: flex; }
.modal-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 420px;
    padding: 24px 28px;
}

/* === Responsive === */
@media (max-width: 980px) {
    .layout-3col { grid-template-columns: 1fr 260px; }
    .layout-3col .left-side { display: none; }
}
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .topbar { font-size: 11px; }
    .topbar .inner > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .site-header .row { height: 56px; gap: 10px; }
    .brand { font-size: 18px; gap: 8px; }
    .brand .icon { width: 36px; height: 36px; font-size: 0; }
    .brand .brand-text b { font-size: 18px; }
    .brand .brand-text small { display: block; font-size: 9px; letter-spacing: .8px; }

    .nav-toggle { display: block; }
    .main-nav {
        position: absolute;
        top: 56px; left: 0; right: 0;
        flex-direction: column;
        background: #fff;
        gap: 2px;
        padding: 0 12px;
        border-top: 1px solid var(--border-light);
        box-shadow: 0 4px 12px rgba(0,0,0,.05);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s, padding .3s;
    }
    .main-nav.open { max-height: 400px; padding: 10px 12px 14px; }
    .main-nav a { padding: 12px; font-size: 15px; border-radius: 8px; }
    .main-nav a.active::after { display: none; }
    .main-nav a.active { background: var(--primary-light); }
    .main-nav a small { display: none; }

    .header-actions { gap: 8px; margin-left: auto; }
    .search-box { display: none; }
    .header-actions .btn { padding: 6px 12px; font-size: 13px; }

    .main-wrap { padding: 12px 0 40px; }
    .layout-3col, .layout-2col { grid-template-columns: 1fr; }
    .layout-3col .left-side, .layout-3col .right-side,
    .layout-2col .right-side { display: none; }

    .tabs-bar { padding: 4px 8px; border-radius: 10px; }
    .tabs-bar .tab { padding: 8px 14px; font-size: 14px; }

    .post-card { padding: 14px 16px; margin-bottom: 10px; border-radius: 10px; }
    .post-card .body { padding-left: 0; margin-top: 4px; }
    .post-card .title { font-size: 16px; }
    .post-card .excerpt { font-size: 13px; }
    .post-card .images { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .post-card .images img { height: 90px; }
    .post-card .foot { font-size: 12px; gap: 12px; flex-wrap: wrap; }

    .post-detail { padding: 20px 16px; border-radius: 10px; }
    .post-detail h1 { font-size: 20px; }
    .post-detail .content { font-size: 15px; }
    .post-detail .author-info .stats { display: none; }

    .form-card { padding: 20px 16px; border-radius: 10px; }
}
@media (max-width: 420px) {
    .post-card .images { grid-template-columns: repeat(2, 1fr); }
    .post-card .images img { height: 110px; }
}

/* ==========================================================================
   社区圈移动端：图文 / 文章 双展示
   ========================================================================== */
.feed-view-toggle {
    display: none;
}

@media (max-width: 768px) {
    .feed-view-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin: -6px 0 10px;
    }

    .feed-view-toggle > span {
        margin-right: 2px;
        color: var(--text-muted);
        font-size: 11px;
    }

    .feed-view-toggle button {
        height: 28px;
        padding: 0 12px;
        border: 1px solid var(--border-light);
        border-radius: 999px;
        background: #fff;
        color: #6b7280;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        transition: background .18s ease, border-color .18s ease, color .18s ease;
    }

    .feed-view-toggle button.active {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
    }

    #postList.feed-notes {
        display: block;
    }

    #postList.feed-notes .note-cols {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

    #postList.feed-notes .note-col {
        flex: 1;
        min-width: 0;
    }

    #postList.feed-notes .note-card {
        display: block;
        break-inside: avoid;
        -webkit-column-break-inside: avoid;
        page-break-inside: avoid;
        margin: 0 0 8px;
        overflow: hidden;
        border-radius: 10px;
        background: #fff;
        color: inherit;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(17, 24, 39, .05);
    }

    #postList.feed-notes .note-cover,
    #postList.feed-notes .note-text-cover {
        position: relative;
        overflow: hidden;
    }

    #postList.feed-notes .note-cover {
        min-height: 160px;
    }

    #postList.feed-notes .note-cover img {
        display: block;
        width: 100%;
        height: auto;
        max-height: 360px;
        object-fit: cover;
    }

    #postList.feed-notes .note-shade {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 58px;
        background: linear-gradient(transparent, rgba(0, 0, 0, .45));
        pointer-events: none;
    }

    #postList.feed-notes .note-cat {
        position: absolute;
        left: 8px;
        bottom: 8px;
        z-index: 2;
        max-width: calc(100% - 16px);
        padding: 2px 7px;
        border-radius: 999px;
        background: rgba(17, 24, 39, .5);
        color: #fff;
        font-size: 10px;
        line-height: 1.5;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    #postList.feed-notes .note-badge {
        position: absolute;
        left: 8px;
        top: 8px;
        z-index: 3;
        padding: 2px 6px;
        border-radius: 4px;
        color: #fff;
        font-size: 9px;
        line-height: 1.5;
    }

    #postList.feed-notes .note-badge.top { background: var(--danger); }
    #postList.feed-notes .note-badge.essence { background: var(--accent); }
    #postList.feed-notes .note-badge + .note-badge { top: 28px; }

    #postList.feed-notes .note-video {
        position: absolute;
        right: 8px;
        top: 8px;
        z-index: 3;
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(17, 24, 39, .55);
        color: #fff;
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    #postList.feed-notes .note-video svg {
        width: 12px;
        height: 12px;
        margin-left: 1px;
        fill: currentColor;
    }

    #postList.feed-notes .note-body {
        padding: 8px 10px 9px;
    }

    #postList.feed-notes .note-body-mini {
        padding-top: 7px;
    }

    #postList.feed-notes .note-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 38px;
        color: #1f2937;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.45;
    }

    #postList.feed-notes .note-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        margin-top: 8px;
        color: #9aa3af;
        font-size: 10px;
    }

    #postList.feed-notes .note-author {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
    }

    #postList.feed-notes .note-avatar {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border-radius: 50%;
        background: linear-gradient(135deg, #93c5fd, var(--primary));
        color: #fff;
        font-size: 9px;
        font-weight: 600;
    }

    #postList.feed-notes .note-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #postList.feed-notes .note-name {
        max-width: 82px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    #postList.feed-notes .note-like {
        display: flex;
        align-items: center;
        gap: 3px;
        flex: 0 0 auto;
    }

    #postList.feed-notes .note-like svg {
        width: 12px;
        height: 12px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
    }

    #postList.feed-notes .note-text-cover {
        min-height: 168px;
        padding: 14px 12px 34px;
        display: flex;
        flex-direction: column;
        color: #fff;
    }

    #postList.feed-notes .note-text-cover::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 80% 12%, rgba(255, 255, 255, .22), transparent 42%);
        pointer-events: none;
    }

    #postList.feed-notes .note-kicker {
        position: relative;
        z-index: 1;
        font-size: 8px;
        letter-spacing: 1.6px;
        opacity: .76;
    }

    #postList.feed-notes .note-text-title {
        position: relative;
        z-index: 1;
        margin-top: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
    }
}


/* 社区圈瀑布流：加载更多与下拉刷新 */
.feed-loader {
    display: block;
    padding: 18px 0 12px;
    color: #9aa3af;
    font-size: 11px;
    text-align: center;
    letter-spacing: .5px;
}

.feed-loader.is-error {
    color: var(--danger);
    cursor: pointer;
}

.feed-loading {
    padding: 48px 20px;
    border-radius: 10px;
    background: #fff;
    color: #9aa3af;
    font-size: 12px;
    text-align: center;
}

.feed-ptr {
    position: fixed;
    top: 116px;
    left: 50%;
    z-index: 9998;
    padding: 6px 15px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .82);
    color: #fff;
    font-size: 11px;
    letter-spacing: .5px;
    opacity: 0;
    transform: translate(-50%, -18px);
    pointer-events: none;
    transition: opacity .12s ease;
}

@media (max-width: 768px) {
    body {
        overscroll-behavior-y: contain;
    }
}

/* 社区圈顶部操作：图文 / 文章 / 发布 */
.tabs-bar {
    gap: 2px;
    scrollbar-width: none;
}

.tabs-bar::-webkit-scrollbar {
    display: none;
}

.tabs-bar .tab {
    margin-right: 0;
    padding: 9px 11px;
    font-size: 14px;
}

.feed-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding-left: 6px;
    flex: 0 0 auto;
}

.feed-view-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.feed-view-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feed-view-icon.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.feed-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 31px;
    margin-left: 2px;
    border: 1px solid #ffd9d5;
    border-radius: 8px;
    background: #fff1f1;
    color: var(--danger);
    text-decoration: none;
}

.feed-plus svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

@media (min-width: 769px) {
    .feed-actions .feed-view-icon {
        display: none;
    }
}

@media (max-width: 380px) {
    .tabs-bar .tab {
        padding: 9px 8px;
        font-size: 13px;
    }

    .feed-view-icon {
        width: 29px;
    }

    .feed-plus {
        width: 31px;
    }
}

/* 社区圈排序标签：无下划线，选中红色加粗 */
.tabs-bar .tab {
    border-bottom: 0 !important;
    color: #6b7280;
}

.tabs-bar .tab:hover {
    color: #e4393c;
}

.tabs-bar .tab.active {
    color: #e4393c !important;
    border-bottom: 0 !important;
    font-weight: 700;
}

/* 社区圈移动端：排序栏固定在顶部 */
@media (max-width: 768px) {
    .tabs-bar {
        position: fixed;
        top: var(--app-mhead-h, 106px);
        left: 10px;
        right: 10px;
        z-index: 290;
        margin: 0;
        border-radius: 10px;
        box-shadow: 0 4px 16px rgba(15, 23, 42, .1);
    }

    .main-col {
        padding-top: 52px;
    }

    .feed-ptr {
        top: calc(var(--app-mhead-h, 106px) + 58px);
    }
}

/* 帖子详情：移动端统一 App 头部 + 底部导航，精简次要内容 */
@media (max-width: 900px) {
    body.post-page .topbar,
    body.post-page .site-header,
    body.post-page .site-footer {
        display: none !important;
    }

    body.post-page .layout-2col {
        grid-template-columns: 1fr;
    }

    body.post-page .right-side {
        display: none !important;
    }

    body.post-page .post-detail {
        padding: 16px 15px;
        border-radius: 10px;
    }

    body.post-page .post-detail .crumb {
        display: none;
    }

    body.post-page .post-detail h1 {
        margin-top: 0;
        font-size: 20px;
    }

    body.post-page .author-info {
        padding-bottom: 14px;
        margin-bottom: 16px;
    }

    body.post-page .post-detail .content {
        margin-bottom: 20px;
        font-size: 15px;
    }

    body.post-page .comments-section {
        margin-top: 16px;
    }

    body.post-page .comment-form {
        padding: 14px;
        border-radius: 10px;
    }

    body.post-page .main-wrap {
        padding-top: 12px;
    }
}

/* 帖子详情：移动端小红书式头部 + 底部互动栏 */
.post-head,
.post-bar {
    display: none;
}

@media (max-width: 900px) {
    .post-head {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
        display: flex;
        align-items: center;
        gap: 8px;
        height: 56px;
        padding: 0 10px;
        background: #fff;
        border-bottom: 1px solid #f0f2f5;
        box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
    }

    .post-head-back,
    .post-share {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        background: transparent;
        color: #1f2937;
        cursor: pointer;
    }

    .post-head-back svg,
    .post-share svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .post-head-author {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
        color: inherit;
        text-decoration: none;
    }

    .post-head-avatar {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border-radius: 50%;
        background: linear-gradient(135deg, #93c5fd, var(--primary));
        color: #fff;
        font-size: 12px;
        font-weight: 600;
    }

    .post-head-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .post-head-name {
        overflow: hidden;
        color: #1f2937;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .post-follow {
        flex: 0 0 auto;
        height: 28px;
        padding: 0 12px;
        border: 1px solid #e4393c;
        border-radius: 999px;
        background: #fff;
        color: #e4393c;
        font-size: 11px;
        font-weight: 500;
        cursor: pointer;
    }

    .post-follow.followed {
        border-color: #e5e7eb;
        background: #f8fafc;
        color: #9aa3af;
    }

    .post-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 300;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #f0f2f5;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, .05);
    }

    .post-comment-pill {
        flex: 1;
        min-width: 0;
        height: 36px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 12px;
        border: 0;
        border-radius: 18px;
        background: #f5f6f8;
        color: #9aa3af;
        font-size: 12px;
        text-align: left;
        cursor: pointer;
    }

    .post-comment-pill svg {
        flex: 0 0 15px;
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .post-comment-pill span {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .post-bar-act {
        flex: 0 0 auto;
        height: 36px;
        display: flex;
        align-items: center;
        gap: 3px;
        padding: 0 2px;
        border: 0;
        background: transparent;
        color: #4b5563;
        font-size: 12px;
        cursor: pointer;
    }

    .post-bar-act svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .post-bar-act.liked {
        color: #e4393c;
    }

    .post-bar-act.liked svg {
        fill: #e4393c;
        stroke: #e4393c;
    }

    .post-bar-act.collected {
        color: #eab308;
    }

    .post-bar-act.collected svg {
        fill: #facc15;
        stroke: #eab308;
    }

    .post-bar-cnt {
        font-size: 11px;
        font-weight: 500;
    }

    body.post-page .main-wrap {
        padding-top: 68px;
        padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }

    body.post-page .post-detail .actions {
        display: none !important;
    }

    body.post-page .comments-section {
        scroll-margin-top: 68px;
    }
}

/* 用户主页 / 登录注册：移动端统一顶部与底部 */
.sub-head {
    display: none;
}

@media (max-width: 900px) {
    .sub-head {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
        display: flex;
        align-items: center;
        height: 56px;
        padding: 0 10px;
        background: #fff;
        border-bottom: 1px solid #f0f2f5;
        box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
    }

    .sub-back,
    .sub-action {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        background: transparent;
        color: #1f2937;
        cursor: pointer;
    }

    .sub-back svg,
    .sub-action svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .sub-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        color: #1f2937;
        font-size: 15px;
        font-weight: 600;
        text-align: center;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .sub-spacer {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
    }

    body.user-page .topbar,
    body.user-page .site-header,
    body.user-page .site-footer,
    body.auth-page .topbar,
    body.auth-page .site-header,
    body.auth-page .site-footer {
        display: none !important;
    }

    body.user-page .main-wrap {
        padding-top: 68px;
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }

    body.auth-page .main-wrap {
        padding-top: 12px;
        padding-bottom: 18px;
    }

    body.auth-page .form-card {
        padding: 24px 20px;
        border-radius: 12px;
    }
}

/* 用户主页资料卡与动态相册 */
.profile-card {
    padding: 16px 15px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #93c5fd, #2563eb);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-info b {
    display: block;
    overflow: hidden;
    color: #1f2937;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-info span {
    display: block;
    margin-top: 3px;
    color: #9aa3af;
    font-size: 11px;
}

.profile-follow {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 14px;
    border: 1px solid #e4393c;
    border-radius: 999px;
    background: #fff;
    color: #e4393c;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.profile-follow.followed {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #9aa3af;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f2f4f7;
}

.profile-stats b {
    display: block;
    color: #1f2937;
    font-size: 17px;
    font-weight: 600;
}

.profile-stats span {
    display: block;
    margin-top: 1px;
    color: #9aa3af;
    font-size: 10px;
}

.album-heading {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 6px 2px 10px;
}

.album-heading h2 {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
}

.album-heading span {
    color: #9aa3af;
    font-size: 11px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.album-card {
    display: block;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    color: inherit;
    text-decoration: none;
}

.album-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f6f8;
}

.album-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-text {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.album-body {
    padding: 8px 9px 9px;
}

.album-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 36px;
    color: #1f2937;
    font-size: 12.5px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.album-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 6px;
    color: #9aa3af;
    font-size: 10px;
}

.album-meta span {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.album-meta svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

@media (min-width: 769px) {
    .album-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}

/* 登录 / 注册 */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.auth-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.auth-logo b {
    color: #1f2937;
    font-size: 17px;
    font-weight: 600;
}

.auth-foot {
    display: none;
    margin: 22px 0 4px;
    color: #b6bdc7;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 900px) {
    .auth-foot {
        display: block;
    }
}

/* 发布动态：移动端统一社区圈顶部与底部 */
@media (max-width: 900px) {
    body.publish-page .topbar,
    body.publish-page .site-header,
    body.publish-page .site-footer {
        display: none !important;
    }

    body.publish-page .main-wrap {
        padding-top: 12px;
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }

    body.publish-page .form-card {
        padding: 18px 15px;
        border-radius: 12px;
    }

    body.publish-page .form-card > h2 {
        margin-bottom: 18px;
        font-size: 19px;
    }

    body.publish-page .form-row {
        margin-bottom: 18px;
    }

    body.publish-page .preview-item {
        width: 82px;
        height: 82px;
    }
}

/* ==== 社区活动（左侧栏） ==== */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.activity-cover { width: 64px; height: 64px; border-radius: 8px; background: #eef2f7 center/cover no-repeat; flex-shrink: 0; }
.activity-info { min-width: 0; flex: 1; }
.activity-info b { display: block; font-size: 13px; color: var(--text); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-info span { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-loading { color: #aaa; font-size: 12px; text-align: center; padding: 10px 0; }
.activity-modal { max-width: 520px; max-height: 80vh; overflow: auto; position: relative; }
.activity-modal h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); padding-right: 24px; line-height: 1.45; }
.activity-modal .activity-meta { font-size: 12px; color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.activity-modal .activity-content { font-size: 14px; color: #4b5563; line-height: 1.9; white-space: pre-wrap; }
.activity-modal-cover { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; display: none; }
.activity-close { position: absolute; top: 10px; right: 12px; width: 28px; height: 28px; border: none; border-radius: 50%; background: #f1f5f9; color: #64748b; font-size: 18px; line-height: 1; cursor: pointer; }
.activity-close:hover { background: #e2e8f0; color: #0f172a; }

/* ==== 社区活动页 ==== */
.page-panel { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.page-panel h2 { margin-bottom: 8px; }
.page-panel p { color: var(--text-muted); font-size: 14px; }
.activity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.activity-card { background: #fff; border: 1px solid var(--border-light, #eef2f7); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.activity-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.06); }
.activity-card .cover { height: 160px; background: #eef2f7 center/cover no-repeat; }
.activity-card .body { padding: 14px 16px 16px; }
.activity-card h3 { font-size: 16px; margin: 0 0 8px; color: var(--text); line-height: 1.45; }
.activity-card .meta { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
@media (max-width: 980px) { .activity-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .activity-grid { grid-template-columns: 1fr; } }

/* 活动报名 */
.activity-join-btn { margin-top: 10px; align-self: flex-start; border: none; border-radius: 999px; background: var(--primary, #2563eb); color: #fff; font-size: 12px; padding: 6px 16px; cursor: pointer; }
.activity-join-btn:hover { opacity: .9; }
.activity-join-btn.joined, .activity-join-btn:disabled { background: #e5e7eb; color: #6b7280; cursor: default; }
.activity-actions { margin-top: 16px; }
.activity-actions .btn:disabled { opacity: .65; cursor: default; }
.activity-card { cursor: pointer; }

/* 发起活动表单 */
.create-box { max-width: 560px; max-height: 85vh; overflow: auto; }
.create-box h3 { margin: 0 0 6px; font-size: 19px; color: var(--text); }
.create-tip { font-size: 12px; color: #9ca3af; margin: 0 0 14px; }
.create-form label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 12px; }
.create-form input[type=text], .create-form input[type=number], .create-form input[type=datetime-local], .create-form textarea { width: 100%; margin-top: 6px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; background: #fff; color: #374151; }
.create-form input:focus, .create-form textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.create-form textarea { resize: vertical; min-height: 88px; }
.create-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-form input[type=file] { margin-top: 6px; font-size: 13px; color: #6b7280; }
.create-actions { margin-top: 6px; text-align: right; }
@media (max-width: 640px) { .create-form .row2 { grid-template-columns: 1fr; } }

/* ==== 社区圈：微博式布局 —— 整页滚动，左右栏吸顶，tabs 固定 ==== */
@media (min-width: 981px) {
    .layout-3col .left-side,
    .layout-3col .right-side {
        position: sticky;
        top: 84px;
        align-self: start;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    .layout-3col .tabs-bar {
        position: sticky;
        top: 84px;
        z-index: 60;
    }
}

/* ==== 顶部导航固定（topbar + header） ==== */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 101;
}
.site-header {
    position: fixed;
    top: var(--topbar-h, 33px);
    left: 0; right: 0;
    z-index: 100;
}
body {
    padding-top: calc(var(--topbar-h, 33px) + var(--site-header-h, 64px));
}
@media (max-width: 900px) {
    body.post-page { padding-top: 0 !important; }
}

/* 吸顶内容跟随固定头部高度 */
@media (min-width: 981px) {
    .layout-3col .left-side,
    .layout-3col .right-side,
    .layout-3col .tabs-bar {
        top: calc(var(--topbar-h, 33px) + var(--site-header-h, 64px) + 16px);
    }
}


/* ==== 左栏站点信息 ==== */
.site-info { padding: 12px 4px 4px; background: transparent; border-radius: 0; box-shadow: none; }
.site-info .si-row { padding: 8px 0; border-bottom: 1px dashed #f1f3f5; }
.site-info .si-row:last-of-type { border-bottom: none; }
.si-h { font-size: 12px; color: #6b7280; font-weight: 600; margin-bottom: 4px; }
.si-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.si-links a { font-size: 12px; color: #9ca3af; }
.si-links a:hover { color: var(--primary); }
.si-copy { margin-top: 6px; padding-top: 10px; border-top: 1px solid #f1f3f5; font-size: 11px; color: #b0b7c3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.si-copy a { color: #9ca3af; }
.si-copy a:hover { color: var(--primary); }

/* 站点信息：压缩行距 */
.site-info .si-row { padding: 5px 0; }
.site-info .si-h { margin-bottom: 2px; }
.site-info .si-copy { margin-top: 4px; padding-top: 8px; }

/* 左右栏：可滚动但不显示滚动条 */
@media (min-width: 981px) {
    .layout-3col .left-side,
    .layout-3col .right-side {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .layout-3col .left-side::-webkit-scrollbar,
    .layout-3col .right-side::-webkit-scrollbar { display: none; }
}


/* 移动端 App 头部页面：body 不额外留白 */
@media (max-width: 900px) {
    body.has-app-mhead { padding-top: 0 !important; }
}

/* 移动端：推荐/最新/精华 整行白底 */
@media (max-width: 768px) {
    .tabs-bar {
        left: 0;
        right: 0;
        border-radius: 0;
        background: #fff;
        border-bottom: 1px solid #f0f2f5;
        box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
        padding: 8px 12px;
    }
}


/* 排序栏里的活动入口链接 */
.tabs-bar a.tab { display: inline-flex; align-items: center; text-decoration: none; }


/* 我的圈子：手机端六个标签分两行，退出登录放右侧居中 */
@media (max-width: 768px) {
    .tabs-bar.tabs-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
        gap: 0 4px;
        overflow: visible;
        padding: 6px 10px;
        position: static;
        top: auto;
        left: auto;
        right: auto;
        z-index: auto;
    }
    .tabs-bar.tabs-grid .tab {
        width: 100%;
        justify-content: center;
        text-align: center;
        margin-right: 0;
        padding: 7px 2px;
        font-size: 13px;
    }
    .tabs-bar.tabs-grid #logoutBtn {
        grid-column: 4;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: end;
        margin: 0;
        padding: 4px 8px;
        font-size: 12px;
    }
}


/* 活动页底部站点信息 */
.site-foot { background: #fff; border-top: 1px solid #f0f2f5; margin-top: 24px; padding: 24px 0 20px; }
.site-foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.site-foot .si-h { font-size: 13px; color: #4b5563; margin-bottom: 8px; }
.site-foot .si-links { flex-direction: column; gap: 6px; }
.site-foot .si-links a { font-size: 12px; color: #9ca3af; }
.site-foot-copy { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f1f3f5; font-size: 12px; color: #9ca3af; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.site-foot-copy a { color: #9ca3af; }
.site-foot-copy a:hover { color: var(--primary); }
@media (max-width: 768px) {
    /* 手机端活动页：整个底部信息区不要 */
    .site-foot { display: none; }
}


/* 活动卡片：报名成员头像 */
.activity-members { display: flex; align-items: center; margin-top: 10px; padding-left: 2px; }
.activity-members .am {
    width: 24px; height: 24px; border-radius: 50%;
    overflow: hidden; background: #eef2f7;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; color: #6b7280;
    border: 2px solid #fff; margin-left: -7px; flex-shrink: 0;
}
.activity-members .am:first-child { margin-left: 0; }
.activity-members .am img { width: 100%; height: 100%; object-fit: cover; display: block; }
.activity-members .am b { font-weight: 500; }
.activity-members .am-more { font-size: 12px; color: #9ca3af; margin-left: 8px; }
