@import url('./booking-row.css');
/* ===== 个人资料页面专用样式 ===== */

/* 页面特定隐藏类 - 无覆盖 */
.profile-hidden {
    display: none;
}

/* 页面基础样式 */
.profile-page {
    font-family: var(--spinmatch-font-family);
    line-height: 1.6;
    color: #fff;
    background: #1a1a1a;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* 容器样式已移除 - 使用通用ui-components.css中的统一容器样式 */



/* 个人中心专用：英雄区域底部柔和阴影 - 已删除重复定义，使用通用英雄区域阴影 */

/* 个人信息头部 - 用户名片区域 */
.profile-header {
    background: transparent;
    color: white;
    padding: 18px 0 10px;
    margin-top: -8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.profile-info {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* 头像和统计数据的容器 - 参考聊天模态框设计 */
.profile-avatar-stats-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    grid-column: 1 / span 2;
}

/* 头像区域 */
/* 个人中心选手卡片容器 - 防止加载时跳动 */
.profile-player-card-container {
    min-width: 140px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}












/* 基本信息 */
.basic-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

/* 用户级别样式 */
.user-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.5rem 0;
}

.user-level.guest {
    background: rgba(128, 128, 128, 0.2);
    color: #ccc;
    border: 1px solid rgba(128, 128, 128, 0.3);
}

.user-level.member {
    background: linear-gradient(135deg, #DC143C, #B91C3C);
    color: white;
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.user-bio {
    margin: 0.5rem 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.user-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    opacity: 0.8;
}

/* 数据统计 */
.profile-stats {
    display: flex;
    gap: 2rem;
}

.profile-stats .stat-item {
    text-align: center;
}

.profile-stats .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.profile-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 内联统计数据样式 - 参考聊天模态框 */
.profile-stats-inline {
    display: none; /* 桌面端默认隐藏 */
    gap: 1rem;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: auto;
}

.profile-stats-inline .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 70px;
}

.profile-stats-inline .stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #DC143C;
    margin-bottom: 0.3rem;
    line-height: 1;
}

.profile-stats-inline .stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
}

/* 个人简介区域 */
.profile-bio-section {
    grid-column: 1 / -1; /* 占据整行 */
    margin-top: 0.25rem; /* 进一步减少上边距 */
}

.profile-bio {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: left; /* 居左对齐 */
    max-width: 600px; /* 限制最大宽度提高可读性 */
    padding: 0.75rem 0;
}

.profile-bio:empty::before {
    content: "这个人很懒，什么都没有留下...";
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* 个人中心页面按钮容器样式优化 - 已删除，使用通用移动端样式（左右分布水平排列） */

/* 主要内容区域 */
.profile-main {
    padding: 0.25rem 0 80px 0;
    min-height: 60vh;
}

/* 单列布局 */
.profile-layout-single {
    display: block;
    width: 100%;
}

/* 右侧内容区域 */
.profile-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
    backdrop-filter: blur(20px);
    border: 0;
    overflow: visible;
}

/* 标签页导航 */
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 0;
    overflow: visible;
}

/* 标签页按钮样式（基于全局btn类） */
.tab-btn {
    flex: 1;
    border: 0;
    border-radius: 10px;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible !important;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: none;
}

.tab-btn.active {
    color: #fff;
    border: 0;
}


/* 标签页内容 */
.tab-content {
    display: none;
    padding-top: 0.5rem;
}

.tab-content.active {
    display: block;
    animation: fadeInContent 0.2s ease-in-out;
}

/* 标签页内容淡入动画 */
@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    margin-top: 0;
    font-size: 1.3rem;
}

/* 活动列表 */
.activities-list,
.records-list,
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item,
.record-item,
.post-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-item:hover,
.record-item:hover,
.post-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(220, 20, 60, 0.3);
}

/* 活动图标 */
.activity-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DC143C, #B91C3C);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.activity-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

.activity-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    align-self: flex-start;
}

/* 记录项目 */
.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.record-header h4 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
}

.record-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.record-status.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.record-status.upcoming {
    background: rgba(var(--sm-accent-rgb, 216, 222, 232), 0.1);
    color: var(--sm-accent, #d8dee8);
}

.record-status.participated {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
}

.record-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.record-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-details i {
    color: #DC143C;
    width: 16px;
    text-align: center;
}

.post-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-item h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.post-item p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.post-stats {
    display: flex;
    gap: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-stats i {
    color: #DC143C;
}



/* 编辑表单 */
.edit-form {
    padding: 2rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .profile-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    /* 紧凑名片：头像与统计同行，简介紧随其后。 */
    .profile-header {
        padding: 10px 0 8px;
    }
    
    .profile-header .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .profile-info {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }
    
    .profile-avatar-stats-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        grid-column: 1;
    }
    
    .profile-header .avatar-section {
        min-width: 0;
    }

    .profile-player-card-container {
        min-width: 0;
        min-height: 56px;
    }
    
    /* 隐藏原始的统计数据显示 */
    .profile-stats {
        display: none;
    }
    
    /* 显示内联统计数据 */
    .profile-stats-inline {
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
        flex-wrap: nowrap;
        margin-left: 0;
    }
    
    .profile-stats-inline .stat-item {
        min-width: 0;
        flex: 1 1 0;
    }
    
    .profile-stats-inline .stat-number {
        font-size: 1.2rem;
    }
    
    .profile-stats-inline .stat-label {
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    /* 移动端bio样式调整 */
    .profile-bio-section {
        margin-top: 0;
        grid-column: 1;
    }
    
    .profile-bio {
        font-size: 0.9rem;
        max-width: 100%;
        padding: 0;
        overflow-wrap: anywhere;
    }

    .basic-info h1 {
        font-size: 1.5rem;
    }
    
    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.25rem;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 0;
        font-size: 0.85rem;
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .activity-item,
    .record-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 移除原有的slideInRight动画，使用更平滑的opacity过渡 */

/* 加载状态 */
.profile-loading {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.profile-loading i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* ===== 空状态样式 - 类似参与者空状态 ===== */
.no-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.no-content-icon {
    margin-bottom: 1.5rem;
}

.no-content-icon i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.no-content h4 {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.no-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .no-content h4 {
        font-size: 1.1rem;
    }
    
    .no-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .no-content h4 {
        font-size: 1rem;
    }
    
    .no-content p {
        font-size: 0.85rem;
    }
}

/* ===== 个人中心选手卡片预加载动画 ===== */
/* 基于英雄界面shimmer动画设计的简约高级加载效果 */
.profile-player-card-loading {
    background: none;
    border: none;
    padding: 0.75rem;
    width: auto;
    min-width: 140px;
    max-width: 180px;
    height: 90px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* 头像加载占位 */
.profile-player-card-loading .loading-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;

}

/* 信息区域加载容器 */
.profile-player-card-loading .loading-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
}

/* 姓名加载占位 */
.profile-player-card-loading .loading-name {
    width: 80px;
    height: 18px;
    border-radius: 6px;

}

/* 积分加载占位 */
.profile-player-card-loading .loading-points {
    width: 60px;
    height: 14px;
    border-radius: 4px;

}

/* 预加载动画关键帧 */


/* 无障碍设计 */
@media (prefers-reduced-motion: reduce) {
    .profile-player-card-loading .loading-avatar,
    .profile-player-card-loading .loading-name,
    .profile-player-card-loading .loading-points {
    
}
}

/* ===== 个人中心Bio区域预加载动画 ===== */
/* 简约单行加载效果 */
.profile-bio-loading {
    padding: 0;
}

/* Bio单行加载占位 */
.profile-bio-loading .loading-bio-line {
    width: 200px;
    height: 24px;
    border-radius: 4px;

}

/* Shimmer动画 */


/* 响应式设计 */
@media (max-width: 768px) {
    .profile-header .player-card.horizontal,
    .profile-player-card-loading {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 56px;
        padding: 0;
        gap: 0.5rem;
    }

    .profile-header .player-card.horizontal .player-details,
    .profile-player-card-loading .loading-details {
        gap: 0.25rem;
        padding: 0;
    }

    .profile-header .player-name-container {
        min-width: 0;
        max-width: 100%;
    }

    .profile-header .player-card.horizontal .player-name {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.25;
    }

    .profile-player-card-loading .loading-name,
    .profile-player-card-loading .loading-points {
        max-width: 100%;
    }

    .profile-bio-loading {
        padding: 0;
    }
    
    .profile-bio-loading .loading-bio-line {
        width: 150px;
        height: 23px;
    
}
}

/* Bio预加载动画无障碍设计 */
@media (prefers-reduced-motion: reduce) {
    .profile-bio-loading .loading-bio-line {
    
}
} 
/* Personal posts link to the shared community reader and its interaction controls. */
.profile-posts-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-posts-heading h3 { margin: 0; }

html:lang(en) .profile-bio:empty::before {
    content: "No bio yet.";
}

.profile-page .profile-posts-heading { justify-content: flex-end; }

/* A single quiet profile card; every content track may shrink on a phone. */
.profile-page :is(.profile-header .container,.profile-main .container,.profile-layout-single,.profile-content,.tab-content,.activities-list,.records-list,.posts-list) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.profile-page .profile-info {
    display: block;
    min-width: 0;
    padding: 22px 24px;
    border: 0;
    border-radius: 16px;
    background: rgba(255,255,255,.025);
    text-align: left;
}
.profile-page .profile-avatar-stats-container { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.7fr); gap: 24px; }
.profile-page :is(.avatar-section,.profile-player-card-container) { min-width: 0; width: 100%; }
.profile-page .profile-player-card-container { min-height: 68px; }
.profile-page .profile-header .player-card.horizontal { width: 100%; max-width: none; min-width: 0; height: auto; min-height: 68px; padding: 0; gap: 16px; }
.profile-page .profile-header .player-card.horizontal .player-avatar { width: 64px; height: 64px; }
.profile-page .profile-header :is(.player-details,.player-name-container,.player-name) { min-width: 0; max-width: 100%; }
.profile-page .profile-header .player-name-container { width: 100%; justify-content: flex-start; gap: 6px; }
.profile-page .profile-header .player-card.horizontal .player-name { flex: 0 1 auto; }
.profile-page .profile-header .player-gender-icon { margin: 0; align-self: center; }
.profile-page .profile-header .player-card.horizontal .player-name { font-size: 1.05rem; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.profile-page .profile-header .player-card.horizontal .player-details { gap: 7px; padding: 0; }
.profile-page .profile-header .player-card.horizontal .player-points { color: #a4aab4; font-size: .78rem; }
.profile-page .profile-stats-inline { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; width: 100%; margin: 0; }
.profile-page .profile-stats-inline .stat-item { min-width: 0; gap: 7px; padding: 4px 8px; }
.profile-page .profile-stats-inline .stat-item + .stat-item { border-left: 1px solid rgba(235,240,248,.09); }
.profile-page .profile-stats-inline .stat-number { margin: 0; font-size: 1.5rem; font-weight: 550; font-variant-numeric: tabular-nums; line-height: 1.15; color: #eef0f4; overflow-wrap: anywhere; max-width: 100%; }
.profile-page .profile-stats-inline .stat-label { font-size: .73rem; line-height: 1.4; color: #a2a8b2; white-space: normal; overflow-wrap: anywhere; }
.profile-page .profile-bio-section { margin: 14px 0 0; }
.profile-page .profile-bio-section:has(.profile-bio:empty) { display: none; }
.profile-page .profile-bio { padding: 0; margin: 0; max-width: 100%; font-size: .84rem; color: #aeb3bc; overflow-wrap: anywhere; }
.profile-page :is(.profile-header,.profile-main) > .container { width: 100%; max-width: 1300px; margin-block: 0; padding-inline: 16px; }
.profile-page .profile-main { padding-top: 0; }
.profile-page .profile-content { padding: 0; background: transparent; backdrop-filter: none; }
.profile-page .tabs-nav { min-width: 0; max-width: 100%; overflow: visible; }
.profile-page .tabs-nav .tab-btn { min-width: 0; flex: 1 1 0; padding-inline: 6px; font-size: .86rem; white-space: nowrap; }
.profile-page .tab-content { overflow-wrap: anywhere; }
.profile-page .no-content { min-width: 0; padding: 36px 18px; border-radius: 14px; background: rgba(255,255,255,.02); }
.profile-page .no-content-icon { margin-bottom: 15px; }
.profile-page .no-content-icon i { font-size: 1.7rem; color: #878e99; }
.profile-page .no-content h4 { font-size: 1rem; font-weight: 500; }
.profile-page .no-content p { max-width: 100%; font-size: .86rem; }
.profile-page :is(.activity-content,.record-item,.post-item) { min-width: 0; max-width: 100%; }
.profile-community-heading { display:flex; justify-content:flex-end; margin-bottom:16px; }
.profile-communities-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
@media(max-width:600px) { .profile-communities-grid { grid-template-columns:minmax(0,1fr); } .profile-page .tabs-nav { gap:3px; } .profile-page .tabs-nav .tab-btn { padding-inline:3px; font-size:.71rem; } }
@media (max-width: 600px) {
    .profile-page .profile-header .container { padding-inline: 16px; }
    .profile-page .profile-info { padding: 18px; border-radius: 14px; }
    .profile-page .profile-avatar-stats-container { grid-template-columns: minmax(0,1fr); gap: 18px; }
    .profile-page .profile-stats-inline .stat-number { font-size: 1.3rem; }
    .profile-page .profile-stats-inline .stat-item { padding-block: 0; }
    .profile-page .profile-header .player-card.horizontal { gap: 14px; min-height: 58px; }
    .profile-page .profile-header .player-card.horizontal .player-avatar { width: 58px; height: 58px; }
    .profile-page .profile-player-card-container { min-height: 58px; }
    .profile-page .tabs-nav .tab-btn { font-size: .76rem; }
    .profile-page .profile-posts-heading { margin-bottom: 8px; }
}

/* Public profiles reuse the personal page framework and its segmented tabs. */
.profile-framework-skeleton { display:none; gap:16px; padding:24px 0; }
.profile-framework-skeleton span { display:block; height:58px; border-radius:12px; }
html[data-public-profile][data-profile-loading] .profile-framework-skeleton { display:grid; }
html[data-public-profile][data-profile-loading] .tab-content { visibility:hidden; height:0; overflow:hidden; }
html[data-public-profile][data-profile-loading] .stat-number { color:transparent; background:rgba(var(--sm-ink-rgb),.07); border-radius:6px; min-width:32px; }
html[data-public-profile] .profile-posts-heading, html[data-public-profile] .profile-community-heading { display:none; }
.profile-public-record { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 18px; padding:20px 0; color:var(--sm-text); text-decoration:none; border-bottom:1px solid var(--sm-line); }
.profile-public-record strong { font-size:15px; font-weight:500; overflow-wrap:anywhere; }
.profile-public-record > span:first-of-type { grid-column:1; color:var(--sm-text-muted); font-size:13px; overflow-wrap:anywhere; }
.profile-public-record > span:last-child { grid-column:2; grid-row:1/3; align-self:center; }
.profile-public-record:focus-visible { outline:2px solid var(--sm-text); outline-offset:4px; }
.profile-public-facts { display:flex; gap:24px; flex-wrap:wrap; padding:12px 0; font-size:14px; }
.profile-public-facts dt { color:var(--sm-text-muted); margin-bottom:8px; }
.profile-public-facts dd { margin:0; }

.profile-public-record > .profile-activity-role { grid-column:1; color:var(--sm-text-muted); font-size:12px; }

/* Keep the cover quiet and the return action in the shared sticky action row. */
html[data-public-profile] :is(#hero-title, #hero-description, #hero-actions) { display: none; }
.profile-return-bar { background: var(--sm-bg, #1a1a1a); }
.profile-page .profile-avatar-stats-container { grid-template-columns: minmax(0, 1fr) minmax(0, .65fr) auto; }
.profile-page .profile-stats-inline { grid-column: 1 / -1; width: 100%; margin: 0; }
.profile-region { grid-column: 3; grid-row: 1; justify-self: end; max-width: min(230px, 34vw); text-align: right; font-size: .78rem; }
.profile-region > span { display: block; margin-bottom: 5px; color: var(--sm-text-muted, #a4aab4); }
.profile-region > strong { display: block; color: var(--sm-text, #fff); font-size: .88rem; font-weight: 500; overflow-wrap: anywhere; }
.profile-page .avatar-section { grid-column: 1 / 3; }
.profile-contact-actions { display: flex; gap: 10px; margin-top: 14px; }
.profile-contact-actions[hidden], .profile-region[hidden] { display: none; }
.profile-contact-actions > .btn { flex: 1 1 0; min-width: 0; min-height:44px; display: flex; justify-content: center; align-items:center; gap: 8px; }
body.profile-page .profile-info .profile-contact-actions > .btn.btn-secondary[data-public-profile-friend] {
    --sm-button-face: #f5f5f5;
    --sm-button-hover-face: #fff;
    --sm-glass-text: #242424;
    background: #f5f5f5;
    color: #242424;
    text-shadow: none;
}
.profile-page .profile-header { margin-top: 0; padding-block: 0 8px; }
body.profile-page .profile-content .tabs-nav { margin-bottom: 8px; }
.profile-page .tab-content { padding-top: 0; }
@media (max-width: 768px) {
    .profile-page #main-content-container { padding-top: 0; }
    .profile-page :is(.profile-header,.profile-main) > .container { padding-inline: 0; }
}
@media (max-width: 600px) {
    .profile-page .profile-avatar-stats-container { grid-template-columns: minmax(0, 1fr) auto; gap: 16px 12px; }
    .profile-page .avatar-section { grid-column: 1; }
    .profile-region { grid-column: 2; max-width: 100px; font-size: .72rem; }
    .profile-region > strong { font-size: .8rem; }
}


/* Full-bleed surfaces keep a comfortable reading inset. */
html:not([data-profile-return]) .profile-return-bar,
.profile-return-bar[hidden] { display: none; }
html body .profile-return-bar [data-public-profile-share][hidden] { display: none; }
.profile-page :is(.profile-header,.profile-main) > .container { padding-inline: 0; }
.profile-page .profile-info { padding: 22px clamp(16px, 3vw, 28px); }
.profile-page .profile-public-record { grid-template-columns: 38px minmax(0,1fr) auto; gap: 6px 12px; padding: 20px clamp(16px, 3vw, 28px); }
.profile-page .profile-public-record .profile-record-icon { grid-column: 1; grid-row: 1 / 4; align-self: center; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(var(--sm-ink-rgb,255,255,255),.055); color: var(--sm-text-muted); font-size: 16px; }
.profile-page .profile-public-record > strong,
.profile-page .profile-public-record > span:first-of-type,
.profile-page .profile-public-record > .profile-activity-role { grid-column: 2; }
.profile-page .profile-public-record > span:last-child { grid-column: 3; grid-row: 1 / 4; }
.profile-page :is(.profile-posts-heading,.profile-community-heading) { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin: 0 0 12px; }
.profile-page :is(.profile-posts-heading,.profile-community-heading) > .btn { display: flex; justify-content: center; align-items: center; gap: 9px; width: 100%; min-height: 46px; }
.profile-page .profile-discover-link { align-self: flex-end; display: flex; gap: 7px; align-items: center; padding: 6px 18px; font-size: 13px; color: var(--sm-text-muted); text-decoration: none; }
.profile-page .tabs-nav .tab-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; }
.profile-page .tabs-nav .tab-btn i { font-size: 13px; }
.profile-page .no-content { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 224px; padding: 36px 20px; text-align: center; }
.profile-page .no-content-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 17px; margin: 0 0 16px; background: rgba(var(--sm-ink-rgb,255,255,255),.045); }
.profile-page .no-content-icon i { font-size: 21px; color: var(--sm-text-muted); }
.profile-page .no-content h4 { margin: 0 0 8px; }
.profile-page .no-content p { margin: 0; color: var(--sm-text-muted); line-height: 1.7; }
.profile-page .no-content .btn { margin-top: 18px; }
@media(max-width: 380px) { .profile-page .tabs-nav .tab-btn { gap: 4px; font-size: 11px; } .profile-page .tabs-nav .tab-btn i { font-size: 11px; } }

/* Match the colored category language used in the message center. */
.profile-page :is([data-tab="bookings"] i,#bookings .no-content-icon i,.profile-record-icon.fa-table-tennis) { color:#5a9ee8; }
.profile-page :is([data-tab="events"] i,#events .no-content-icon i,.profile-record-icon.fa-trophy) { color:#d89a47; }
.profile-page :is([data-tab="posts"] i,#posts .no-content-icon i) { color:#bd86dc; }
.profile-page :is([data-tab="communities"] i,#communities .no-content-icon i,.profile-record-icon.fa-users,.profile-community-symbol i) { color:#45bfa2; }
.profile-page #posts .posts-list.cw-embedded-feed { display:block; gap:0; }
.profile-page #profile-community-composer { width:100%; min-width:0; }
.profile-page #posts .cw-empty > i { color:#bd86dc; }
.profile-page #main-content-container > [hidden] { display:none!important; }

.profile-page #bookings .profile-public-record { grid-template-columns:58px minmax(0,1fr) auto; }
.profile-page .profile-record-cover { width:58px; height:58px; grid-column:1; grid-row:1/4; }

/* Activity previews have the same photo-first geometry while loading and loaded. */
.profile-page #bookings .profile-public-record { grid-template-columns:116px minmax(0,1fr) 18px; grid-template-rows:auto auto auto; gap:6px 18px; align-content:center; min-height:126px; }
.profile-page #bookings .profile-record-cover { width:116px; height:88px; border-radius:12px; object-fit:cover; align-self:center; grid-column:1; grid-row:1/4; }
.profile-page .profile-public-record > .profile-record-date { grid-column:2; grid-row:2; font-size:12px; color:var(--sm-text-muted); }
.profile-page .profile-public-record > .profile-record-location { grid-column:2; grid-row:3; display:flex; align-items:center; gap:8px; font-size:12px; color:var(--sm-text-muted); min-width:0; }
.profile-page .profile-record-location > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-page .profile-record-location small { font-size:10px; flex:none; padding:2px 6px; border-radius:5px; background:rgba(var(--sm-ink-rgb),.05); }
.profile-page .profile-public-record > .profile-record-arrow { grid-column:3; grid-row:1/4; color:var(--sm-text-muted); }
.profile-page .profile-booking-record > strong { align-self:end; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.5; }
.profile-page .profile-booking-skeleton strong { height:20px; width:80%; border-radius:5px; }
.profile-page .profile-booking-skeleton .profile-record-date { height:14px; width:38%; border-radius:4px; }
.profile-page .profile-booking-skeleton .profile-record-location { height:14px; width:65%; border-radius:4px; }
@media(max-width:600px) { .profile-page #bookings .profile-public-record { grid-template-columns:96px minmax(0,1fr) 14px; gap:5px 12px; padding-block:16px; min-height:120px; } .profile-page #bookings .profile-record-cover { width:96px; height:88px; } }

.profile-page .profile-framework-skeleton { gap:0; padding:0; }
.profile-page .profile-framework-skeleton .profile-public-record { grid-template-columns:116px minmax(0,1fr) 18px; min-height:126px; }
.profile-page .profile-framework-skeleton .profile-record-cover { width:116px; height:88px; border-radius:12px; }
@media(max-width:600px) { .profile-page .profile-framework-skeleton .profile-public-record { grid-template-columns:96px minmax(0,1fr) 14px; min-height:120px; gap:5px 12px; padding-block:16px; } .profile-page .profile-framework-skeleton .profile-record-cover { width:96px; } }

.profile-page .profile-framework-skeleton .profile-public-record > .profile-record-cover { grid-column:1; grid-row:1/4; }

/* Share the booking/community 4px surface rhythm, including nested tabs. */
body.profile-page .profile-content .tabs-nav { margin-bottom:4px; }
.profile-page [data-profile-booking-scope] { width:100%; margin:0 0 4px; }
.profile-page [data-profile-booking-scope] button { flex:1; min-width:0; }
.profile-page :is(.profile-posts-heading,.profile-community-heading) { gap:4px; margin-bottom:4px; }
.profile-page .profile-public-record { padding-inline:24px; }
@media(max-width:768px) { .profile-page .profile-public-record { padding-inline:16px; } }

/* The tabs share one spacing rhythm and their records sit in one continuous surface. */
body.profile-page .profile-header { padding-bottom:4px; }
body.profile-page .profile-info { padding-block:clamp(18px,3vw,24px); }
body.profile-page .profile-bio-section { grid-column:1/-1; margin:0; }
body.profile-page .profile-bio { margin:0; }
body.profile-page #profileBio { color:var(--sm-text-muted); line-height:1.7; overflow-wrap:anywhere; }
body.profile-page .profile-content > .tabs-nav { margin-bottom:4px; }
/* The booking scope and rows share the same surface tone as the posts feed. */
body.profile-page :is(#bookings,#events) { display:flex; flex-direction:column; gap:4px; background:transparent; overflow:visible; }
body.profile-page .profile-record-list-surface { min-width:0; border-radius:14px; background:rgba(var(--sm-ink-rgb,255,255,255),.035); overflow:hidden; }
body.profile-page [data-profile-booking-scope] { margin:0; background:transparent; border-radius:14px 14px 0 0; }
body.profile-page #bookings :is(.no-content,.profile-public-record) { background:transparent; border-radius:0; }
body.profile-page .profile-content :is(.no-content,.cw-empty) { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:250px; padding:28px 20px; gap:0; text-align:center; }
body.profile-page .profile-content :is(.no-content,.cw-empty) :is(h3,h4) { margin:8px 0 0; font-size:16px; font-weight:500; line-height:1.6; color:var(--sm-text); }
body.profile-page .profile-content :is(.no-content,.cw-empty) .xiaoping-slot { --xp-reserved-height:122px; min-height:122px; width:136px; }
body.profile-page .profile-content :is(.no-content,.cw-empty) .xiaoping { justify-content:center; width:136px; margin:0 auto; }
body.profile-page .profile-content :is(.no-content,.cw-empty) .xp-touch { width:136px; }
body.profile-page [data-profile-avatar-upload] { cursor:pointer; }
body.profile-page [data-profile-avatar-upload]:focus-visible { outline:2px solid var(--sm-text); outline-offset:5px; }
.profile-page #bookings .profile-public-record.sm-booking-row { display:flex; min-height:120px; padding-block:16px; }

body.profile-page [data-profile-booking-scope] { --sm-segment-track:transparent; --sm-segment-fill:rgba(var(--sm-ink-rgb,255,255,255),.065); background:transparent!important; }
body.profile-page #profilePlayerCard .player-avatar { cursor:default; pointer-events:none; }
body.profile-page #profilePlayerCard .is-profile-avatar-pending { opacity:0; }


/* The profile owns one retained inbox and three direct record destinations. */
.profile-page :is([data-profile-home],[data-profile-record-page],.profile-record-content,.tabs-nav [data-tab])[hidden] { display:none!important; }
body.profile-page.profile-record-open :is(#hero-container,#footer-container) { display:none!important; }
body.profile-page .profile-record-page { min-height:calc(100svh - var(--nav-bar-height,60px) - 80px); padding-top:var(--sm-navbar-bottom,var(--nav-bar-height,60px)); padding-bottom:32px; }
.profile-page .profile-record-return { display:flex; align-items:center; gap:20px; min-height:64px; }
.profile-page .profile-record-return h1 { margin:0; font:inherit; font-size:16px; font-weight:550; color:var(--sm-text); }
.profile-page .profile-record-return h1:focus { outline:0; }
.profile-page .profile-record-content { padding-top:4px; }
.profile-page .profile-record-content .no-content { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:270px; padding:28px 20px; text-align:center; }
.profile-page .profile-content > .tab-content.active { animation:profilePanelReveal 280ms cubic-bezier(.22,.72,.18,1); }
@keyframes profilePanelReveal { from { opacity:.3; } to { opacity:1; } }
body.profile-page .profile-stats-inline { gap:8px; }
body.profile-page .profile-stats-inline .profile-stat-link { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:11px; min-width:0; min-height:96px; padding:16px 18px; border:0; border-radius:15px; background:linear-gradient(145deg,rgba(var(--sm-ink-rgb,255,255,255),.055),rgba(var(--sm-ink-rgb,255,255,255),.018)); color:var(--sm-text); text-align:left; font:inherit; cursor:pointer; transition:background-color 240ms ease,transform 320ms cubic-bezier(.22,.72,.18,1); }
body.profile-page .profile-stats-inline .profile-stat-link + .profile-stat-link { border-left:0; }
body.profile-page .profile-stat-link .stat-number { color:var(--sm-text); font-size:clamp(25px,3vw,31px); letter-spacing:-.04em; }
body.profile-page .profile-stat-link .stat-label { display:flex; align-items:center; justify-content:space-between; gap:7px; width:100%; color:var(--sm-text-muted); font-size:12px; }
body.profile-page .profile-stat-link .stat-label i { flex:none; font-size:11px; opacity:.7; transition:transform 320ms cubic-bezier(.22,.72,.18,1),opacity 240ms ease; }
body.profile-page .profile-stat-link:hover:not(:disabled) { background-color:rgba(var(--sm-ink-rgb,255,255,255),.04); }
body.profile-page .profile-stat-link:hover:not(:disabled) .stat-label i { transform:translateX(3px); opacity:1; }
body.profile-page .profile-stat-link:active:not(:disabled) { transform:scale(.975); }
body.profile-page .profile-stat-link:focus-visible { outline:2px solid var(--sm-accent); outline-offset:3px; }
body.profile-page .profile-stat-link:disabled { cursor:default; }
body.profile-page .profile-stat-link:disabled .stat-label i { display:none; }
.profile-page .profile-tab-count { position:absolute; top:2px; right:4px; display:grid; place-items:center; min-width:17px; height:17px; padding:0 4px; border-radius:999px; background:linear-gradient(145deg,#ff5265,#e72748 70%); color:#fff; font-size:10px; line-height:1; box-sizing:border-box; }
.profile-page .profile-tab-count.hidden { display:none; }
.profile-page .profile-messages-workspace { min-width:0; }
.profile-page .profile-messages-workspace .messages-content { margin:0; }
.profile-page .profile-messages-workspace .messages-return { margin-bottom:4px; }
.profile-page .profile-like-record { display:flex; align-items:center; gap:16px; }
.profile-page .profile-like-symbol { display:grid; place-items:center; width:44px; height:44px; flex:none; border-radius:14px; background:rgba(var(--sm-control-red,196,38,56),.12); color:var(--sm-accent); }
.profile-page .profile-like-copy { display:flex; flex:1; flex-direction:column; gap:5px; min-width:0; }
.profile-page .profile-like-copy > :is(small,span) { font-size:12px; color:var(--sm-text-muted); }
.profile-page .profile-like-copy > strong { font-size:15px; font-weight:550; color:var(--sm-text); }
.profile-page .profile-like-copy > p { margin:0; font-size:13px; color:var(--sm-text-muted); }
.profile-page .profile-like-copy > :is(strong,p) { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.profile-page .profile-like-record > i { font-size:11px; color:var(--sm-text-muted); }
@media(max-width:600px) {
    body.profile-page .profile-stats-inline { gap:6px; }
    body.profile-page .profile-stats-inline .profile-stat-link { padding:13px 12px; min-height:87px; border-radius:13px; }
    body.profile-page .profile-stat-link .stat-label { font-size:11px; }
}
@media(prefers-reduced-motion:reduce) {
    .profile-page .profile-content > .tab-content.active { animation:none; }
    body.profile-page :is(.profile-stat-link,.profile-stat-link .stat-label i) { transition:none; }
}

/* Activity charts use only the visible record set; totals come from the account API. */
#bookings .profile-activity-chart { --activity-accent:#5a9ee8; }
#events .profile-activity-chart { --activity-accent:#d89a47; }
.profile-activity-chart { margin:0; padding:20px 16px 14px; border-radius:16px; background:var(--sm-segment-track); color:var(--sm-text); }
.profile-activity-chart figcaption { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; }
.profile-activity-total { display:flex; align-items:baseline; gap:10px; }
.profile-activity-total strong { font-size:38px; font-weight:550; line-height:1; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.profile-activity-total span { color:var(--sm-text-muted); font-size:11px; }
.profile-activity-year { display:flex; align-items:center; gap:6px; font-size:13px; }
.profile-activity-year button { min-width:32px; min-height:40px; font-size:24px; }
.profile-activity-year button:disabled { opacity:.2; }
.profile-activity-reading { display:flex; align-items:center; justify-content:flex-end; gap:8px; min-height:42px; font-size:12px; font-variant-numeric:tabular-nums; }
.profile-activity-reading small { font-size:10px; color:var(--sm-text-muted); }
.profile-activity-plot { display:flex; position:relative; height:180px; gap:8px; }
.profile-activity-axis { width:18px; flex:none; display:flex; flex-direction:column; justify-content:space-between; padding-bottom:26px; color:var(--sm-text-muted); font-size:10px; }
.profile-activity-viewport { position:relative; flex:1; min-width:0; overflow-x:auto; scrollbar-width:none; overscroll-behavior-x:contain; touch-action:pan-x pan-y; cursor:grab; }
.profile-activity-viewport::-webkit-scrollbar { display:none; }
.profile-activity-viewport.is-dragging { cursor:grabbing; user-select:none; }
.profile-activity-bars { display:grid; position:relative; grid-template-columns:repeat(12,minmax(0,1fr)); min-width:264px; height:180px; }
.profile-activity-bars button,.profile-activity-bar-placeholder { display:flex; flex-direction:column; justify-content:flex-end; align-items:center; min-width:0; gap:10px; padding:0 4px; border:0; border-radius:7px; background:none; color:var(--sm-text-muted); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.profile-activity-bars small { font-size:9px; line-height:16px; white-space:nowrap; }
.profile-activity-column { position:relative; width:100%; max-width:34px; height:154px; display:flex; align-items:flex-end; }
.profile-activity-column > span { width:100%; height:max(3px,calc(var(--activity-fill)*100%)); border-radius:10px 10px 5px 5px; background:linear-gradient(0deg,color-mix(in srgb,var(--activity-accent) 72%,var(--sm-surface)),color-mix(in srgb,var(--activity-accent) 88%,white)); opacity:.75; transition:opacity 240ms ease,filter 240ms ease; }
.profile-activity-bars button[aria-pressed="true"] { color:var(--sm-text); }
.profile-activity-bars button[aria-pressed="true"] .profile-activity-column > span { opacity:1; filter:brightness(1.12); }
.profile-activity-bars button:focus-visible { outline:2px solid var(--sm-text-muted); outline-offset:2px; }
.profile-activity-point-reading { display:flex; align-items:baseline; gap:8px; position:absolute; top:0; left:0; z-index:1; padding:7px 10px; max-width:100%; border-radius:11px; background:var(--sm-surface-raised,var(--sm-surface)); box-shadow:var(--sm-segment-shadow,0 3px 14px rgba(0,0,0,.12)); color:var(--sm-text-muted); font-size:10px; line-height:18px; font-variant-numeric:tabular-nums; white-space:nowrap; pointer-events:none; }
.profile-activity-point-reading strong { color:var(--activity-accent); font-size:17px; font-weight:650; }
.profile-activity-point-reading[hidden] { display:none; }
.profile-activity-total-placeholder { width:112px; height:38px; }
.profile-activity-year-placeholder { width:100px; height:24px; }
.profile-activity-skeleton .profile-activity-axis .sm-skeleton-shape { width:14px; height:10px; }
.profile-activity-skeleton .profile-activity-column > span { background:var(--sm-skeleton-fill); opacity:1; }
.profile-activity-bar-placeholder small { width:14px; height:16px; }
@media(prefers-reduced-motion:reduce) { .profile-activity-column > span { transition:none; } }
