/**
 * 个人空间 - 清新绿色风格
 * 原生态摄影网站专用样式 — 自然、清新、绿色基调
 * 瀑布流布局：固定行高，每行图片数量自适应
 */

/* ============================================
   1. CSS变量 - 清新绿色调色板
   ============================================ */
:root {
    --sp-bg-primary: #f5f7f2;
    --sp-bg-secondary: #eef2e8;
    --sp-bg-card: #ffffff;
    --sp-bg-hover: #f0f4eb;
    --sp-bg-overlay: rgba(255, 255, 255, 0.92);
    --sp-text-primary: #2c3e2d;
    --sp-text-secondary: #5a6e5c;
    --sp-text-muted: #8a9a8c;
    --sp-accent: #3a7d44;
    --sp-accent-hover: #2d6235;
    --sp-accent-light: rgba(58, 125, 68, 0.08);
    --sp-like-red: #d94f4f;
    --sp-favorite-gold: #c8952e;
    --sp-success: #3a7d44;
    --sp-border: rgba(58, 125, 68, 0.1);
    --sp-border-light: rgba(58, 125, 68, 0.06);
    --sp-shadow: 0 2px 12px rgba(44, 62, 45, 0.06);
    --sp-shadow-lg: 0 8px 30px rgba(44, 62, 45, 0.1);
    --sp-radius: 10px;
    --sp-radius-lg: 16px;
    --sp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sp-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    
    /* 瀑布流行高 */
    --sp-row-height: 220px;
    --sp-row-gap: 8px;
}

/* ============================================
   2. 空间整体布局
   ============================================ */
.sp-body {
    background: var(--sp-bg-primary);
    color: var(--sp-text-primary);
    min-height: 100vh;
    font-family: var(--sp-font);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.sp-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 主页/图集页内容区垂直间距（宽度与 sp-header-content 对齐） */
.sp-home-wrap {
    padding-top: 24px;
    padding-bottom: 40px;
}

/* ============================================
   3. 空间头部 - 封面图 + 头像 + 数据行
   ============================================ */
.sp-header {
    position: relative;
    background: var(--sp-bg-card);
    border-bottom: 1px solid var(--sp-border);
    margin-bottom: 0;
}

.sp-header-cover {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.sp-header-cover-default {
    background: linear-gradient(135deg, #e8f0e4 0%, #d4e4cf 50%, #c8dcc3 100%);
}

.sp-header-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, rgba(255,255,255,0.9));
}

.sp-header-content {
    max-width: 1400px;
    margin: -60px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

.sp-avatar-wrap {
    flex-shrink: 0;
}

.sp-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--sp-bg-card);
    box-shadow: var(--sp-shadow-lg);
}

.sp-profile-info {
    flex: 1;
    padding-bottom: 16px;
}

.sp-profile-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--sp-text-primary);
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

.sp-profile-bio {
    font-size: 15px;
    color: var(--sp-text-secondary);
    margin: 0 0 10px;
    line-height: 1.5;
}

.sp-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--sp-text-muted);
}

.sp-profile-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sp-profile-meta i {
    color: var(--sp-accent);
}

.sp-tag-chip {
    display: inline-block;
    padding: 2px 10px;
    background: var(--sp-accent-light);
    color: var(--sp-accent);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 操作按钮 */
.sp-header-actions {
    display: flex;
    gap: 10px;
    padding-bottom: 16px;
    flex-shrink: 0;
}

.sp-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--sp-transition);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sp-btn-primary {
    background: var(--sp-accent);
    color: #fff;
}

.sp-btn-primary:hover {
    background: var(--sp-accent-hover);
}

.sp-btn-outline {
    background: transparent;
    color: var(--sp-accent);
    border: 1.5px solid var(--sp-accent);
}

.sp-btn-outline:hover {
    background: var(--sp-accent-light);
}

.sp-btn-follow {
    background: var(--sp-accent);
    color: #fff;
    border-radius: 20px;
    padding: 8px 24px;
}

.sp-btn-follow.following {
    background: var(--sp-bg-secondary);
    color: var(--sp-text-secondary);
    border: 1px solid var(--sp-border);
}

/* 数据统计行 */
.sp-stats-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    gap: 32px;
    border-top: 1px solid var(--sp-border-light);
    background: var(--sp-bg-card);
}

.sp-stat-item {
    font-size: 14px;
    color: var(--sp-text-secondary);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 4px;
    transition: var(--sp-transition);
}

.sp-stat-item:hover {
    color: var(--sp-accent);
}

.sp-stat-number {
    font-weight: 700;
    font-size: 16px;
    color: var(--sp-text-primary);
}

.sp-stat-label {
    font-size: 13px;
    color: var(--sp-text-muted);
}

/* ============================================
   4. 导航栏 - 整洁横向布局
   ============================================ */
.sp-nav {
    background: var(--sp-bg-card);
    border-bottom: 1px solid var(--sp-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sp-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-nav-link {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--sp-text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--sp-transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-nav-link:hover {
    color: var(--sp-accent);
    background: var(--sp-accent-light);
}

.sp-nav-link.active {
    color: var(--sp-accent);
    border-bottom-color: var(--sp-accent);
}

.sp-nav-link i {
    font-size: 14px;
}

/* 右侧操作区 */
.sp-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-nav-action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--sp-text-secondary);
    text-decoration: none;
    border: 1px solid var(--sp-border);
    transition: var(--sp-transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sp-nav-action-btn:hover {
    color: var(--sp-accent);
    border-color: var(--sp-accent);
    background: var(--sp-accent-light);
}

.sp-notification-bell {
    position: relative;
    padding: 8px;
    color: var(--sp-text-secondary);
    cursor: pointer;
}

.sp-notification-bell:hover {
    color: var(--sp-accent);
}

.sp-notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #d94f4f;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* ============================================
   5. 内容区
   ============================================ */
.sp-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

/* 工具栏 */
.sp-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.sp-sort-tabs {
    display: flex;
    gap: 4px;
    background: var(--sp-bg-secondary);
    padding: 4px;
    border-radius: 8px;
}

.sp-sort-tab {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--sp-text-secondary);
    text-decoration: none;
    transition: var(--sp-transition);
}

.sp-sort-tab:hover {
    color: var(--sp-text-primary);
}

.sp-sort-tab.active {
    background: var(--sp-bg-card);
    color: var(--sp-accent);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-weight: 500;
}

/* ============================================
   6. 作品瀑布流 - 500px风格自适应布局
   固定行高，每行图片数量根据宽度自适应
   ============================================ */
.sp-masonry {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-row-gap);
}

/* 关键：使用伪元素占位，确保最后一行也能对齐 */
.sp-masonry::after {
    content: '';
    flex: 999999999;
}

.sp-photo-card {
    height: var(--sp-row-height);
    flex-grow: 1;
    min-width: 200px;
    position: relative;
    overflow: hidden;
    border-radius: var(--sp-radius);
    cursor: pointer;
    transition: var(--sp-transition);
}

/* 每张图片根据宽高比计算flex值 */
.sp-photo-card[data-ratio] {
    flex-grow: calc(var(--sp-row-height) / var(--aspect-ratio, 1));
}

.sp-photo-card:hover {
    box-shadow: var(--sp-shadow-lg);
}

.sp-photo-img-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sp-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sp-photo-card:hover .sp-photo-img {
    transform: scale(1.03);
}

/* 悬停遮罩层 */
.sp-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.5) 0%,
        transparent 30%,
        transparent 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
}

.sp-photo-card:hover .sp-photo-overlay {
    opacity: 1;
}

/* 图集徽章 */
.sp-album-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 2;
    pointer-events: none;
}

.sp-album-badge i {
    margin-right: 3px;
    opacity: 0.85;
}

.sp-photo-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-photo-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.sp-photo-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.95);
}

.sp-photo-stats i {
    font-size: 12px;
}

/* 点赞按钮 */
.sp-like-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--sp-transition);
}

.sp-like-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sp-like-btn.liked {
    color: var(--sp-like-red);
}

.sp-like-btn.liked i {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 编辑按钮 */
.sp-photo-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.sp-photo-card:hover .sp-photo-actions {
    opacity: 1;
}

.sp-photo-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--sp-transition);
}

.sp-photo-action-btn:hover {
    background: var(--sp-accent);
}

/* ============================================
   7. 列表项 - 粉丝/关注/收藏等
   ============================================ */
.sp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sp-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    transition: var(--sp-transition);
}

.sp-list-item:hover {
    box-shadow: var(--sp-shadow-lg);
}

.sp-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--sp-bg-secondary);
}

.sp-list-info {
    flex: 1;
}

.sp-list-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-text-primary);
    text-decoration: none;
}

.sp-list-name:hover {
    color: var(--sp-accent);
}

.sp-list-desc {
    font-size: 13px;
    color: var(--sp-text-muted);
    margin-top: 2px;
}

.sp-list-action {
    flex-shrink: 0;
}

/* ============================================
   8. 排行榜
   ============================================ */
.sp-ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.sp-ranking-card {
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius-lg);
    padding: 24px;
    box-shadow: var(--sp-shadow);
}

.sp-ranking-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sp-text-primary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-ranking-title i {
    color: var(--sp-accent);
}

.sp-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--sp-border-light);
}

.sp-ranking-item:last-child {
    border-bottom: none;
}

.sp-ranking-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: var(--sp-bg-secondary);
    color: var(--sp-text-muted);
}

.sp-ranking-item:nth-child(1) .sp-ranking-num { background: #f0c940; color: #fff; }
.sp-ranking-item:nth-child(2) .sp-ranking-num { background: #b0b8c0; color: #fff; }
.sp-ranking-item:nth-child(3) .sp-ranking-num { background: #cd7f32; color: #fff; }

/* ============================================
   8.5 图集列表页（/space/{sid}/albums）
   宽度与 sp-header-content 对齐（sp-container 1400px）
   ============================================ */
.sp-albums-wrap {
    padding-top: 24px;
    padding-bottom: 40px;
}

.sp-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sp-album-card {
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius);
    overflow: hidden;
    box-shadow: var(--sp-shadow);
    transition: var(--sp-transition);
}

.sp-album-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sp-shadow-lg);
}

.sp-album-cover-wrap {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--sp-bg-secondary);
}

.sp-album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sp-album-card:hover .sp-album-cover {
    transform: scale(1.05);
}

.sp-album-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-text-muted);
    font-size: 40px;
}

.sp-album-count-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 12px;
    pointer-events: none;
}

.sp-album-count-badge i {
    margin-right: 3px;
    opacity: 0.85;
}

.sp-album-info {
    padding: 14px 16px;
}

.sp-album-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-album-desc {
    font-size: 12px;
    color: var(--sp-text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-album-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--sp-text-muted);
}

.sp-album-meta i {
    margin-right: 3px;
}

@media (max-width: 768px) {
    .sp-album-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

/* ============================================
   9. 关于页
   ============================================ */
.sp-about-card {
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius-lg);
    padding: 32px;
    box-shadow: var(--sp-shadow);
    max-width: 800px;
}

.sp-about-section {
    margin-bottom: 24px;
}

.sp-about-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sp-accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.sp-about-value {
    font-size: 15px;
    color: var(--sp-text-primary);
    line-height: 1.7;
}

/* ============================================
   10. 空状态
   ============================================ */
.sp-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--sp-text-muted);
}

.sp-empty i {
    font-size: 48px;
    color: var(--sp-border);
    margin-bottom: 16px;
    display: block;
}

.sp-empty p {
    font-size: 15px;
    margin: 8px 0 0;
}

/* ============================================
   11. 分页
   ============================================ */
.sp-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    padding: 16px 0;
}

.sp-pagination a, .sp-pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: var(--sp-text-secondary);
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    transition: var(--sp-transition);
}

.sp-pagination a:hover {
    border-color: var(--sp-accent);
    color: var(--sp-accent);
}

.sp-pagination .current {
    background: var(--sp-accent);
    color: #fff;
    border-color: var(--sp-accent);
}

/* 加载动画 */
.sp-load-more {
    text-align: center;
    padding: 30px;
}

.sp-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--sp-border);
    border-top-color: var(--sp-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sp-load-text {
    font-size: 12px;
    color: var(--sp-text-muted);
    margin-top: 8px;
}

.sp-no-more {
    text-align: center;
    padding: 20px;
    color: var(--sp-text-muted);
    font-size: 12px;
}

/* ============================================
   12. Lightbox
   ============================================ */
.sp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.sp-lightbox.active {
    display: flex;
}

.sp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: var(--sp-transition);
}

.sp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: var(--sp-transition);
}

.sp-lightbox-prev {
    left: 20px;
}

.sp-lightbox-next {
    right: 20px;
}

.sp-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sp-lightbox-img-container {
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.sp-lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.sp-lightbox-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.sp-lightbox-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 6px;
    max-width: 800px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-lightbox-exif {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    gap: 12px;
}

.sp-lightbox-actions {
    display: flex;
    gap: 8px;
}

.sp-lightbox-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: var(--sp-transition);
}

.sp-lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sp-lightbox-action-btn.sp-like-btn.liked {
    color: var(--sp-like-red);
}

/* ============================================
   13. 响应式
   ============================================ */
@media (max-width: 1200px) {
    :root {
        --sp-row-height: 200px;
    }
}

@media (max-width: 768px) {
    :root {
        --sp-row-height: 160px;
    }
    .sp-photo-card {
        min-width: 150px;
    }
    .sp-header-cover { height: 180px; }
    .sp-header-content { flex-direction: column; align-items: center; text-align: center; margin-top: -40px; }
    .sp-avatar { width: 80px; height: 80px; }
    .sp-profile-name { font-size: 22px; }
    .sp-profile-meta { justify-content: center; }
    .sp-header-actions { justify-content: center; }
    .sp-stats-bar { justify-content: center; flex-wrap: wrap; gap: 16px; }
    .sp-nav-inner { flex-direction: column; padding: 0 12px; }
    .sp-nav-links { overflow-x: auto; width: 100%; padding: 4px 0; }
    .sp-nav-link { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
    .sp-nav-right { padding: 8px 0; }
    .sp-ranking-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    :root {
        --sp-row-height: 140px;
    }
    .sp-photo-card {
        min-width: 120px;
    }
}
