    /* 覆盖 markdown-body 的一些默认样式以匹配主题 */
    .markdown-body {
        font-family: inherit;
        background: transparent;
        color: var(--text);
    }
    body[data-theme="dark"] .markdown-body {
        color: var(--text);
    }
    .markdown-body p { margin-bottom: 16px; }
    .markdown-body img { max-width: 100%; border-radius: 12px; }
    :root {
      --bg: #f8fafc;
      --panel: #ffffff;
      --text: #1e293b;
      --muted: #64748b;
      --primary: #1e293b;
      --line: #e2e8f0;
    }
    body { 
        margin: 0; 
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        background: var(--bg);
        color: var(--text);
    }
    .space-container {
        width: 1200px;
        max-width: calc(100% - 32px);
        margin: 40px auto;
        display: flex;
        flex-direction: column;
    }
    /* 头部横幅卡片 */
    .space-header-card {
        background: var(--panel);
        border-radius: 24px;
        overflow: hidden;
        margin-bottom: 24px;
        position: relative;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.02);
        min-height: 280px;
    }
    
    .space-banner {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    
    .space-banner-mask {
        position: absolute;
        inset: 0;
        background: linear-gradient(to right, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.6) 50%, rgba(15,23,42,0.8) 100%);
        z-index: 2;
    }
    
    html[data-theme="light"] .space-banner-mask {
        background: linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.9) 100%);
    }

    .space-profile-info {
        padding: 40px;
        position: relative;
        z-index: 10;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 32px;
        height: 100%;
        min-height: 280px;
    }
    .space-profile-top {
        display: flex;
        align-items: center;
        gap: 32px;
        min-width: 0;
        flex: 1;
    }
    .space-avatar-wrap {
        position: relative;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        padding: 6px;
        background: rgba(255,255,255,0.15);
        flex-shrink: 0;
        border: none;
    }
    .space-avatar {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }
    .space-name-box {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 12px;
    }
    .space-name-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    .space-name {
        font-size: 28px;
        font-weight: 900;
        color: #fff !important;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }
    .space-name[style*="--vip-auto-color"],
    .space-name[style*="--u-color"] {
        color: #fff !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }
    html[data-theme="dark"] .space-name:not([style*="--vip-auto-color"]):not([style*="--u-color"]),
    body[data-theme="dark"] .space-name:not([style*="--vip-auto-color"]):not([style*="--u-color"]) {
        color: #e2e8f0 !important;
    }
    .space-tags-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .space-signature-actions-row {
        display: flex;
        align-items: center;
        gap: 16px;
        min-width: 0;
    }
    .space-signature-row {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.6;
    }
    .space-signature-row svg {
        flex-shrink: 0;
        opacity: 0.6;
    }
    .space-badges {
        display: inline-flex;
        gap: 8px;
        align-items: center;
    }
    .space-badge {
        padding: 4px 12px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .badge-role { border: none; }
    .role-admin {
        background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
        color: #fff;
    }
    .role-webmaster {
        background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
        position: relative;
        overflow: hidden;
        color: #fff;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    .role-webmaster::after {
        content: "";
        position: absolute;
        top: -50%; left: -50%; width: 200%; height: 200%;
        background: linear-gradient(45deg, transparent 45%, rgba(255,255,255,0.2) 50%, transparent 55%);
        animation: shine 3s infinite;
    }
    .role-moderator {
        background: linear-gradient(135deg, #1e293b 0%, #1e293b 100%);
        box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2);
        color: #fff;
    }
    .role-user {
        background: var(--panel);
        color: var(--muted);
        border: 1px solid var(--line);
        box-shadow: none;
    }
    .space-header-stats {
        display: flex;
        gap: 32px;
        margin-top: 16px;
    }
    .header-stat-item {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .header-stat-icon {
        width: 40px;
        height: 40px;
        background: rgba(0,0,0,0.3);
        border: 1px solid rgba(255,255,255,0.2);
        backdrop-filter: blur(4px);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        flex-shrink: 0;
    }
    .header-stat-info {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 6px;
        white-space: nowrap;
    }
    .header-stat-val {
        font-size: 16px;
        font-weight: 900;
        color: #fff;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }
    .header-stat-label {
        font-size: 12px;
        color: rgba(255,255,255,0.8);
        font-weight: 700;
    }
    
    .space-header-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 20px;
    }
    .user-id-badge {
        background: var(--bg);
        border: 1px solid var(--line);
        padding: 4px 10px;
        border-radius: 10px;
        font-size: 12px;
        font-weight: 800;
        color: var(--muted);
        text-transform: uppercase;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    .signature-text {
        font-size: 14px;
        color: var(--muted);
        line-height: 1.5;
        margin: 0;
        font-style: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    @keyframes shine {
        0% { transform: translateX(-100%) translateY(-100%); }
        20%, 100% { transform: translateX(100%) translateY(100%); }
    }

    .space-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 0;
    }
    .space-actions form { margin: 0; }
    .space-actions .btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 10px;
        gap: 6px;
        white-space: nowrap;
    }
    .space-actions .btn-hover-swap .normal-text { gap: 6px; }
    .space-actions .btn-hover-swap .hover-text { gap: 6px; }
    .btn { padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
    .btn-primary { background: var(--primary); color: #fff; }
    .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(30, 41, 59, 0.2); }
    /* 黑夜模式：主按钮使用与板块选中一致的绿色 */
    html[data-theme="dark"] .btn-primary { background: var(--nav-active-bg, var(--primary)); color: #fff; }
    html[data-theme="dark"] .btn-primary:hover { background: var(--nav-active-bg, var(--primary-dark, var(--primary-hover))); color: #fff; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); }
    .btn-outline { background: #fff; border: 1.5px solid var(--line); color: var(--muted); }
    .btn-outline:hover { border-color: var(--primary); color: var(--primary); }
    
    .btn-hover-swap { position: relative; overflow: hidden; display: inline-flex; justify-content: center; align-items: center; transition: all 0.2s; }
    .btn-hover-swap .normal-text { display: inline-flex; align-items: center; gap: 8px; transition: opacity 0.2s; }
    .btn-hover-swap .hover-text { position: absolute; inset: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; opacity: 0; transition: opacity 0.2s; }
    .btn-hover-swap:hover .normal-text { opacity: 0; }
    .btn-hover-swap:hover .hover-text { opacity: 1; }
    .btn-hover-swap.following-btn { background: transparent; }
    .btn-hover-swap.following-btn:hover { background: #fee2e2 !important; color: #ef4444 !important; border-color: #fca5a5 !important; }

    /* 手机签到按钮默认隐藏 */
    .mobile-checkin-btn { display: none; }

    /* 内容网格 3列布局 */
    .space-grid {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 24px;
        flex: 1;
        min-height: 0;
        align-items: start;
    }
    
    .space-left, .space-right {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    
    .space-main {
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding-bottom: 40px;
    }

    .space-sidebar-widget {
        background: var(--panel);
        border-radius: 24px;
        border: 1px solid var(--line);
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    }
    .widget-title { font-size: 16px; font-weight: 800; margin-bottom: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
    
    .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .stat-item { text-align: center; padding: 16px; background: #f8fafc; border-radius: 16px; border: 1px solid var(--line); min-height: 80px; display: flex; flex-direction: column; justify-content: center; }
    body[data-theme="dark"] .stat-item { background: rgba(255,255,255,0.03); }
    .stat-val { font-size: 20px; font-weight: 900; color: var(--primary); display: block; }
    .stat-label { font-size: 11px; color: var(--muted); font-weight: 700; }

    /* 加入时间精美卡片 */
    .join-time-card {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .join-date-row {
        display: flex;
        align-items: center;
        gap: 12px;
        background: var(--bg);
        padding: 12px 16px;
        border-radius: 16px;
        border: 1px solid var(--line);
    }
    .join-date-icon {
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: var(--primary);
        box-shadow: 0 4px 10px rgba(0,0,0,0.03);
        border: 1px solid var(--line);
        flex-shrink: 0;
    }
    body[data-theme="dark"] .join-date-icon {
        background: #1e293b;
    }
    .join-date-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .join-date-main {
        font-size: 15px;
        font-weight: 900;
        color: var(--text);
        letter-spacing: 0.5px;
    }
    .join-date-sub {
        font-size: 11px;
        color: var(--muted);
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    .join-date-sub::before {
        content: "";
        width: 4px;
        height: 4px;
        background: var(--primary);
        border-radius: 50%;
        display: inline-block;
    }

    /* 动态列表 */
    .timeline-list { 
        display: flex; 
        flex-direction: column; 
        gap: 12px; 
        position: relative;
    }

    .timeline-item {
        background: var(--panel);
        border-radius: 20px;
        border: 1px solid var(--line);
        padding: 16px 20px;
        display: flex;
        align-items: flex-start;
        gap: 16px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }
    .timeline-item:hover { 
        border-color: var(--primary); 
        transform: translateY(-2px); 
        background: var(--bg);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    .timeline-icon {
        width: 44px; height: 44px;
        border-radius: 14px;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
        border: 1px solid var(--line);
        transition: all 0.3s;
    }
    body[data-theme="dark"] .timeline-icon {
        background: #1e293b;
    }
    .timeline-item:hover .timeline-icon {
        background: var(--primary-soft);
        border-color: var(--primary);
        transform: scale(1.05) rotate(5deg);
    }
    .timeline-content { flex: 1; min-width: 0; padding-top: 2px; }
    .timeline-title { 
        font-weight: 800; 
        color: var(--text); 
        margin-bottom: 6px; 
        font-size: 15px; 
        line-height: 1.4;
    }
    .timeline-meta { 
        font-size: 12px; 
        color: var(--muted); 
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .reward-badge {
        background: #fffbeb;
        color: #d97706;
        padding: 2px 10px;
        border-radius: 100px;
        font-size: 11px;
        font-weight: 900;
        border: 1px solid #fef3c7;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    body[data-theme="dark"] .reward-badge {
        background: rgba(217, 119, 6, 0.1);
        color: #f59e0b;
        border-color: rgba(217, 119, 6, 0.2);
    }

    /* 动态名称颜色优化 */
    .timeline-task-name {
        color: #1e293b; /* 亮色模式：沉稳的靛蓝色 */
        font-weight: 800;
        margin: 0 2px;
    }
    .timeline-post-name, .timeline-target-name {
        color: var(--primary); /* 使用主题绿 */
        font-weight: 800;
        margin-left: 2px;
    }
    body[data-theme="dark"] .timeline-task-name {
        color: #a5b4fc; /* 暗色模式：更亮一点的淡靛蓝，确保对比度 */
    }

    /* 选项卡导航样式 */
    .space-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        margin-bottom: 24px;
        background: var(--panel);
        padding: 12px 24px;
        border-radius: 24px;
        border: 1px solid var(--line);
        width: 100%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    }
    .space-tab-item {
        padding: 10px 20px;
        border-radius: 14px;
        font-size: 15px;
        font-weight: 800;
        color: var(--muted);
        text-decoration: none;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .space-tab-item:hover {
        background: var(--bg);
        color: var(--text);
    }
    .space-tab-item.active {
        background: var(--primary-soft);
        color: var(--primary);
    }
    .tab-count {
        font-size: 11px;
        background: var(--line);
        color: var(--muted);
        padding: 2px 8px;
        border-radius: 20px;
        font-weight: 700;
        margin-left: 4px;
        transition: all 0.2s;
    }
    .space-tab-item.active .tab-count {
        background: var(--primary) !important;
        color: #fff !important;
    }

    /* 桌面端显示完整按钮文字，手机端显示简称 */
    .t-short { display: none; }

    /* 分页（桌面端基础样式，手机端在 media 内紧凑化） */
    .space-pagination {
        padding: 14px 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        border-top: 1px solid var(--line);
    }
    .space-page-btn {
        padding: 8px 16px;
        border-radius: 12px;
        font-size: 13px;
        font-weight: 700;
        color: var(--text);
        background: var(--bg);
        border: 1px solid var(--line);
        transition: all 0.2s;
        text-decoration: none;
        white-space: nowrap;
    }
    .space-page-btn:hover { border-color: var(--primary); color: var(--primary); }
    .space-page-current {
        color: var(--primary);
        background: var(--primary-a1);
        border-color: transparent;
        font-weight: 800;
    }
    .space-page-ellipsis {
        padding: 8px 4px;
        font-size: 13px;
        color: var(--muted);
        white-space: nowrap;
    }

    /* 列表卡片样式增强 */
    .space-item-card {
        background: var(--panel);
        border-radius: 20px;
        border: 1px solid var(--line);
        padding: 16px 20px; /* 稍微减小上下内边距 */
        margin-bottom: 12px; /* 减小间距 */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex; /* 改为 flex 布局 */
        align-items: center;
        justify-content: space-between;
        text-decoration: none;
        color: inherit;
        position: relative;
        overflow: hidden;
    }
    .space-item-card:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    }
    .space-item-content { flex: 1; min-width: 0; }
    .space-item-arrow {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        background: var(--bg);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        transition: all 0.3s;
        opacity: 0;
        transform: translateX(10px);
        flex-shrink: 0;
        margin-left: 16px;
        border: 1px solid var(--line);
    }
    .space-item-card:hover .space-item-arrow {
        opacity: 1;
        transform: translateX(0);
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }
    .space-item-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
    .space-item-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
    .meta-icon-item { display: flex; align-items: center; gap: 4px; }
    .meta-icon-item svg { opacity: 0.6; }
    .space-item-excerpt { 
        font-size: 14px; 
        color: var(--muted); 
        margin-top: 10px; 
        line-height: 1.6; 
        display: -webkit-box; 
        -webkit-line-clamp: 3; /* 严格限制为3行 */
        -webkit-box-orient: vertical; 
        overflow: hidden; 
        max-height: 4.8em; /* 兜底高度限制 */
    }

    /* 手机端适配 */
    @media (max-width: 800px) {
        .space-container { margin: 0 auto; width: 100%; padding-top: 16px; }
        /* 关键：主内容优先，侧栏放后面，全部单列 */
        .space-grid {
            grid-template-columns: 1fr;
            padding: 0 12px;
            gap: 14px;
            box-sizing: border-box;
        }
        .space-main { order: 1; padding-bottom: 0; }
        .space-left {
            order: 2;
            gap: 14px;
        }
        .space-header-card { border-radius: 0; border: none; margin-bottom: 12px; box-shadow: none; min-height: 0; }
        /* banner 只保留顶部 150px 横幅，头像不悬浮，避免被 overflow 裁剪 */
        .space-banner { inset: 0 0 auto 0 !important; height: 150px !important; }
        .space-banner-mask { inset: 0 0 auto 0 !important; height: 150px !important; }

        .space-profile-info {
            padding: 16px 16px 20px;
            flex-direction: column;
            align-items: flex-start;
            margin-top: 0;
            gap: 14px;
            min-height: 0;
            height: auto;
        }

        .space-profile-top {
            width: 100%;
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .space-avatar-wrap {
            width: 84px;
            height: 84px;
            padding: 3px;
        }
        .space-avatar {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border-width: 3px;
            box-shadow: 0 8px 16px rgba(0,0,0,0.1);
            margin-bottom: 0;
        }

        .space-name-box {
            width: 100%;
            min-width: 0;
            padding-bottom: 0;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            gap: 8px;
            margin-top: 0;
        }

        .space-name {
            font-size: 17px;
            margin-bottom: 0;
            justify-content: flex-start;
            gap: 8px;
            align-items: center;
            line-height: 1.2;
        }

        .name-wrapper {
            padding: 4px 10px;
            border-radius: 10px;
            gap: 6px;
        }

        .signature-wrap {
            margin-top: 0;
            padding: 0;
            background: transparent;
            border: none;
            display: flex;
            align-items: center;
            gap: 8px;
            max-width: 100%;
        }

        .user-id-badge {
            font-size: 9px;
            padding: 1px 6px;
            flex-shrink: 0;
        }

        .signature-text {
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            opacity: 0.7;
        }

        .mobile-checkin-btn {
            display: inline-flex !important;
            padding: 4px 10px;
            font-size: 10px;
            height: 22px;
        }

        .space-signature-actions-row {
            flex-wrap: wrap;
            gap: 10px;
        }
        .space-signature-row {
            flex: 1 1 100%;
        }

        /* 头部统计项紧凑 */
        .space-header-stats { gap: 20px; margin-top: 8px; }
        .header-stat-icon { width: 34px; height: 34px; border-radius: 10px; }
        .header-stat-icon svg { width: 16px; height: 16px; }
        .header-stat-val { font-size: 15px; }

        /* 右侧按钮区全宽 */
        .space-header-right {
            width: 100%;
            align-items: stretch;
            gap: 12px;
        }

        .space-actions {
            width: 100%;
            margin-top: 0;
            display: flex;
            justify-content: flex-start;
            gap: 8px;
        }
        .space-actions div, .space-actions form {
            width: 100%;
            display: flex;
            gap: 8px;
        }
        /* 操作按钮：返回首页整行 + 4 个操作按钮一行，总共两行 */
        .space-actions > div { flex-wrap: wrap !important; justify-content: flex-start !important; }
        .space-actions > div > .btn-outline-home { flex: 1 1 100% !important; }
        .space-actions > div > div { flex-wrap: nowrap !important; }
        .space-actions > div > div > * { flex: 1 !important; min-width: 0; }
        .space-actions .btn {
            flex: 1 1 auto !important;
            padding: 8px 4px !important;
            font-size: 12px !important;
            justify-content: center;
            gap: 4px;
            white-space: nowrap;
        }
        .space-actions .btn svg { width: 14px !important; height: 14px !important; }

        .space-tabs {
            width: calc(100% - 24px);
            margin: 0 auto 14px;
            justify-content: flex-start;
            flex-wrap: nowrap;
            overflow-x: auto;
            padding: 4px;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            border-radius: 12px;
            gap: 3px;
            position: relative;
        }
        .space-tabs::-webkit-scrollbar { display: none; }
        .space-tab-item {
            padding: 6px 4px;
            font-size: 12px;
            white-space: nowrap;
            flex: 1 1 0;
            justify-content: center;
            min-width: 0;
            gap: 3px;
        }
        .space-tab-item svg { width: 12px !important; height: 12px !important; flex-shrink: 0; }
        /* 手机端隐藏 tab 计数，保证 5 个 tab 一屏放下 */
        .space-tab-item .tab-count { display: none !important; }
        /* 手机端按钮文字显示简称 */
        .t-short { display: inline; }
        .t-full { display: none; }

        /* 侧栏卡片间距由 flex gap 控制，去掉多余 margin */
        .space-sidebar-widget { margin-bottom: 0; }

        /* 内容区块紧凑：间距由 flex gap 控制，去掉多余 margin */
        .space-block { margin-bottom: 0; border-radius: 16px; }
        .space-block-header { padding: 12px 14px; gap: 8px; }
        .space-block-header h3 { font-size: 15px !important; }
        .space-block-header span { font-size: 11px !important; padding: 3px 10px; }
        .space-block-body { padding: 14px 14px; }
        .space-block-body > .markdown-body { font-size: 14px; }

        /* 勋章墙：窄屏两列紧凑卡片 */
        .medal-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
        .medal-group { padding: 14px; margin-bottom: 14px; border-radius: 16px; }
        .medal-card { padding: 12px; }
        .medal-icon-wrap { width: 40px; height: 40px; border-radius: 12px; }

        /* 动态/列表卡片紧凑 */
        .timeline-item { padding: 12px 14px; gap: 12px; border-radius: 16px; }
        .timeline-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; }
        .timeline-title { font-size: 14px; }
        .timeline-meta { font-size: 11px; }
        .space-item-card { padding: 12px 14px; border-radius: 16px; }
        .space-item-title { font-size: 15px; }
        .space-item-meta { font-size: 11px; gap: 8px; flex-wrap: wrap; }
        .space-item-arrow { display: none; }
        .space-item-excerpt { font-size: 13px; }

        /* 分页紧凑一行 */
        .space-pagination {
            padding: 10px 14px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            border-top: 1px solid var(--line);
        }
        .space-page-btn {
            padding: 6px 12px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 700;
            color: var(--text);
            background: var(--bg);
            border: 1px solid var(--line);
            transition: all 0.2s;
            text-decoration: none;
            white-space: nowrap;
        }
        .space-page-btn:active { border-color: var(--primary); color: var(--primary); }
        .space-page-current {
            color: var(--primary);
            background: var(--primary-a1);
            border-color: transparent;
            font-weight: 800;
        }
        .space-page-ellipsis {
            padding: 6px 2px;
            font-size: 12px;
            color: var(--muted);
            white-space: nowrap;
        }

        /* 头像不悬浮后，白色区域上的文字/按钮改深色，但用户名落在背景图上单独保持白色 */
        .space-name,
        .space-name[style*="--vip-auto-color"],
        .space-name[style*="--u-color"] {
            color: #fff !important;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }
        .header-stat-val { color: var(--text) !important; text-shadow: none; }
        .header-stat-label { color: var(--muted) !important; }
        .space-avatar-wrap { background: var(--line); }
        /* UID 徽章与用户组标签块统一为相同大小（覆盖上方手机端 9px/1px 6px 的缩小规则） */
        .space-tags-row .user-id-badge {
            background: var(--bg) !important;
            border: 1px solid var(--line) !important;
            color: var(--muted) !important;
            backdrop-filter: none;
            padding: 4px 10px !important;
            font-size: 12px !important;
            font-weight: 800 !important;
            border-radius: 10px !important;
            line-height: 1.2;
        }
        .space-tags-row .user-id-badge img { filter: none !important; }
        .space-badges .badge-role[style*="rgba(0,0,0,0.3)"] {
            background: var(--bg) !important;
            border: 1px solid var(--line) !important;
            color: var(--muted) !important;
            backdrop-filter: none;
        }
        /* 用户组标签块与 UID 徽章统一为相同大小的矩形框（覆盖所有角色渐变样式） */
        .space-tags-row .space-badge {
            padding: 4px 10px !important;
            font-size: 12px !important;
            border-radius: 10px !important;
            gap: 4px !important;
            line-height: 1.2;
            box-shadow: none !important;
            background: var(--bg) !important;
            border: 1px solid var(--line) !important;
            color: var(--muted) !important;
            text-shadow: none;
            position: static;
        }
        .space-tags-row .space-badge::after { display: none !important; }
        /* 操作按钮：白色背景上的浅色样式 */
        .space-actions .btn-outline-home {
            background: var(--panel) !important;
            border: 1px solid var(--line) !important;
            color: var(--text) !important;
            backdrop-filter: none;
        }
        .space-actions .btn-outline-msg {
            background: rgba(37, 99, 235, 0.06) !important;
            border: 1px solid rgba(37, 99, 235, 0.3) !important;
            color: #2563eb !important;
            backdrop-filter: none;
        }
        .space-actions .btn-outline-msg img { filter: none !important; }
        .space-actions .btn-danger {
            background: rgba(220, 38, 38, 0.06) !important;
            border: 1px solid rgba(220, 38, 38, 0.3) !important;
            color: #dc2626 !important;
            backdrop-filter: none;
        }
        .space-actions .btn-outline:not(.btn-primary):not(.btn-outline-home):not(.btn-outline-msg):not(.btn-danger) {
            background: var(--panel) !important;
            border: 1px solid var(--line) !important;
            color: var(--muted) !important;
            backdrop-filter: none;
        }
    }

    body[data-theme="dark"] {
        --bg: #0f172a; --panel: #1e293b; --text: #f1f5f9; --muted: #94a3b8; --line: #334155;
    }
    body[data-theme="dark"] .stat-item { background: #0f172a; }
    body[data-theme="dark"] .badge-role { background: rgba(255,255,255,0.05); }

    /* 精美 Toast 提示 */
    .晚星社区-toast-wrap {
        position: fixed;
        top: 24px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10000;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .晚星社区-toast {
        background: #fff;
        padding: 12px 20px;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
        display: flex;
        align-items: center;
        gap: 12px;
        pointer-events: auto;
        border: 1px solid var(--line);
        min-width: 240px;
        max-width: 90vw;
        position: relative;
        overflow: hidden;
        animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .晚星社区-toast.toast-success {
        background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 12px 32px rgba(16,185,129,0.35);
        color: #fff;
    }
    .晚星社区-toast.toast-success .toast-body { color: #fff; }
    .晚星社区-toast.toast-success .toast-close { color: rgba(255,255,255,0.85); }
    .晚星社区-toast.toast-success .toast-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
    .晚星社区-toast.toast-success .toast-progress { background: rgba(255,255,255,0.9); }
    @keyframes toast-in {
        from { transform: translateY(-20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .晚星社区-toast.is-closing {
        animation: toast-out 0.3s forwards;
    }
    @keyframes toast-out {
        to { transform: translateY(-20px); opacity: 0; }
    }
    .toast-icon { font-size: 18px; flex-shrink: 0; }
    .toast-body { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
    .toast-close {
        width: 20px; height: 20px;
        display: flex; align-items: center; justify-content: center;
        font-size: 14px; color: var(--muted);
        cursor: pointer; border-radius: 6px; transition: all 0.2s;
    }
    .toast-close:hover { background: #f1f5f9; color: #ef4444; }
    .toast-progress {
        position: absolute;
        bottom: 0; left: 0; height: 3px;
        background: var(--primary);
        width: 100%;
        transform-origin: left;
        border-radius: 0 0 16px 16px;
        -webkit-mask-image: -webkit-radial-gradient(white, black);
    }

    /* 精美确认模态框 */
    .晚星社区-modal-overlay {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        z-index: 11000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }
    .晚星社区-modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    .晚星社区-modal {
        background: var(--panel);
        width: min(400px, 90vw);
        border-radius: 24px;
        padding: 32px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.2);
        transform: scale(0.9);
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        text-align: center;
        border: 1px solid var(--line);
    }
    .晚星社区-modal-overlay.show .晚星社区-modal {
        transform: scale(1);
    }
    .modal-icon {
        width: 64px; height: 64px;
        background: #fee2e2;
        color: #ef4444;
        border-radius: 20px;
        display: flex; align-items: center; justify-content: center;
        font-size: 32px;
        margin: 0 auto 20px;
    }
    .modal-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
    .modal-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
    .modal-btns { display: flex; gap: 12px; }
    .modal-btns .btn { flex: 1; justify-content: center; padding: 12px; }
    .btn-danger { background: #ef4444; color: #fff; }
    .btn-danger:hover { background: #dc2626; transform: translateY(-2px); box-shadow: 0 8px 16px rgba(239, 68, 68, 0.2); }
    
    /* 按钮悬浮效果增强 */
    .btn-outline-home:hover {
        border-color: var(--primary) !important;
        color: #fff !important;
        background: var(--primary) !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    }
    body[data-theme="dark"] .btn-outline-home:hover {
        background: var(--primary) !important;
    }

    /* 发送私信按钮：悬浮改为蓝色实底白字 */
    .btn-outline-msg:hover {
        background: #3b82f6 !important;
        color: #fff !important;
        border-color: #3b82f6 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    }
    .btn-outline-msg:hover img {
        filter: brightness(0) invert(1) !important;
    }

        .stat-item.liked .stat-icon svg {
            fill: var(--primary);
        }
        .stat-item.liked:hover {
            background: var(--primary-a1);
        }
        .stat-item.liked:hover .stat-icon {
            color: var(--primary);
        }

            .medal-group {
              background: var(--panel);
              border-radius: 24px;
              border: 1px solid var(--line);
              padding: 24px;
              margin-bottom: 24px;
              box-shadow: 0 4px 12px rgba(0,0,0,0.02);
            }
            .medal-group-title {
              font-size: 16px;
              font-weight: 800;
              color: var(--text);
              margin-bottom: 20px;
              display: flex;
              align-items: center;
              gap: 8px;
            }
            .medal-group-title::before {
              content: "";
              display: block;
              width: 4px;
              height: 16px;
              background: var(--primary);
              border-radius: 2px;
            }
            .medal-grid {
              display: grid;
              grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
              gap: 16px;
            }
            .medal-card {
              display: flex;
              align-items: center;
              gap: 12px;
              padding: 16px;
              border-radius: 16px;
              border: 1px solid var(--line);
              background: var(--bg);
              transition: all 0.3s;
              position: relative;
            }
            .medal-card.unlocked {
              border-color: var(--primary-soft);
              background: var(--panel);
              box-shadow: 0 8px 20px rgba(0,0,0,0.04);
            }
            .medal-card.unlocked:hover {
              transform: translateY(-2px);
              border-color: var(--primary);
            }
            .medal-card.locked {
              opacity: 0.6;
              filter: grayscale(1);
            }
            .medal-icon-wrap {
              width: 48px;
              height: 48px;
              border-radius: 14px;
              display: flex;
              align-items: center;
              justify-content: center;
              font-size: 24px;
              flex-shrink: 0;
              background: #e2e8f0;
              color: #94a3b8;
            }
            body[data-theme="dark"] .medal-card.locked .medal-icon-wrap {
              background: #1e293b;
              color: #475569;
            }
            .medal-info {
              flex: 1;
              min-width: 0;
            }
            .medal-name {
              font-size: 14px;
              font-weight: 900;
              color: var(--text);
              margin-bottom: 4px;
            }
            .medal-desc {
              font-size: 11px;
              color: var(--muted);
              line-height: 1.4;
            }
            .medal-equip-btn {
              position: absolute;
              top: 12px;
              right: 12px;
              padding: 4px 10px;
              border-radius: 6px;
              font-size: 11px;
              font-weight: 700;
              cursor: pointer;
              border: none;
              background: var(--primary);
              color: #fff;
              transition: all 0.2s;
              flex-shrink: 0;
            }
            .medal-equip-btn.equipped {
              background: var(--line);
              color: var(--muted);
            }
            .medal-equip-btn:hover {
              opacity: 0.9;
              transform: scale(1.05);
            }
