:root {
    --sp-bg: #f4f5f7;
    --sp-card: #ffffff;
    --sp-border: #e1e4e8;
    --sp-primary: #4f6ef7;
    --sp-primary-d: #3a57e0;
    --sp-danger: #e03e3e;
    --sp-success: #22a05b;
    --sp-text: #1a1d23;
    --sp-muted: #6b7280;
    --sp-radius: 10px;
    --sp-radius-sm: 6px;
    --sp-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
    --sp-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wpsp-auth-box, .wpsp-profile-page, .wpsp-chat-page,
.wpsp-forum, .wpsp-header-reels, #wpsp-reel-lightbox {
    font-family: var(--sp-font);
    color: var(--sp-text);
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

.wpsp-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1rem;
    border: 1.5px solid transparent;
    border-radius: var(--sp-radius-sm);
    font-size: .875rem;
    font-weight: 600;
    font-family: var(--sp-font);
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    line-height: 1.4;
    white-space: nowrap;
}

.wpsp-btn:disabled {
    opacity: .5;
    cursor: default;
}

.wpsp-btn-primary {
    background: #222425;
    color: #fff;
    border-color: #323335;
}

.wpsp-btn-primary:hover:not(:disabled) {
    background: #cc1c1c;
    border-color: #cc1c1c;
    color: #fff;
}

.wpsp-btn-outline {
    background: #ffffff;
    border-color: var(--sp-border);
    color: var(--sp-text);
}

.wpsp-btn-outline:hover:not(:disabled) {
    background: var(--sp-bg);
}

.wpsp-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--sp-muted);
}

.wpsp-btn-ghost:hover:not(:disabled) {
    background: var(--sp-bg);
    color: var(--sp-text);
}

.wpsp-btn-danger {
    background: #f32424;
    color: #fff;
    border-color: #f32424;
}

.wpsp-btn-danger:hover:not(:disabled) {
    opacity: .88;
}

.wpsp-btn-sm {
    padding: .3rem .65rem;
    font-size: .8rem;
}

.wpsp-field {
    margin-bottom: .85rem;
}

.wpsp-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--sp-muted);
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wpsp-field input,
.wpsp-field textarea,
.wpsp-field select {
    width: 100%;
    padding: .55rem .85rem;
    border: 1.5px solid #323334;
    border-radius: var(--sp-radius-sm);
    font-size: .9rem;
    font-family: var(--sp-font);
    color: var(--sp-muted);
    background: #121517;
    transition: border-color .15s, background .15s;
}

.wpsp-field input:focus,
.wpsp-field textarea:focus {
    outline: #18191b;
    color: #ffffff;
}

.wpsp-field textarea {
    resize: vertical;
}

.wpsp-check-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .875rem;
    margin-bottom: .85rem;
    cursor: pointer;
    color: var(--sp-muted);
}

.wpsp-flex-gap {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}

.wpsp-empty {
    color: var(--sp-muted);
    font-size: .9rem;
    padding: .75rem 0;
}

.wpsp-hint {
    color: var(--sp-muted);
    font-size: .875rem;
    margin-bottom: .75rem;
}

.wpsp-notice-inline {
    font-size: .9rem;
}

[class*="wpsp-notice"]:not(.wpsp-notice-inline) {
    padding: .65rem 1rem;
    border-radius: var(--sp-radius-sm);
    font-size: .875rem;
    margin-bottom: .85rem;
}

.wpsp-notice-success, .success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.wpsp-notice-error, .error {
    background: #fff1f2;
    color: #881337;
    border: 1px solid #fecdd3;
}

.wpsp-notice-info, .info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.wpsp-badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}

.wpsp-badge-green {
    background: #ecfdf5;
    color: #065f46;
}

.wpsp-badge-gray {
    background: var(--sp-bg);
    color: var(--sp-muted);
    border: 1px solid var(--sp-border);
}

.wpsp-auth-box {
    max-width: 440px;
    margin: 0 auto;
    background: #18191b;
    border: 1px solid #27282a;
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    padding: 2rem 2rem 2.25rem;
}

.wpsp-auth-tabs {
    display: flex;
    border-bottom: 2px solid #414445;
    margin-bottom: 1.5rem;
    gap: 0;
}

.wpsp-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: .6rem .5rem;
    font-size: .85rem;
    font-weight: 600;
    font-family: var(--sp-font);
    color: #808384;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.wpsp-tab.active {
    color: #ff0000;
    border-bottom-color: #ff0000;
}

.wpsp-tab:hover:not(.active) {
    color: white;
}

.wpsp-tab-panel {
    animation: wpsp-in .15s ease;
}

@keyframes wpsp-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.wpsp-auth-notice {
    margin-bottom: 1rem;
}

.wpsp-profile-page {
    max-width: 820px;
    margin: 0 auto;
}

.wpsp-profile-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: #222425;
    border: 1px solid #323335;
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wpsp-profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.wpsp-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #323335;
    box-shadow: 0 0 0 2px #47484b;
}

.wpsp-avatar-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f52424;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.wpsp-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.wpsp-profile-name {
    margin: 0;
    font-size: 1.35rem !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    color: white !important;
    text-align: start !important;
}

.wpsp-profile-name:before {
    display: none !important;
}

.wpsp-profile-username {
    font-size: .875rem;
    color: var(--sp-muted);
}

.wpsp-profile-loc, .wpsp-profile-web {
    font-size: .85rem;
    color: var(--sp-muted);
    text-decoration: none;
}

.wpsp-profile-web:hover {
    color: var(--sp-primary);
}

.wpsp-profile-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-left: auto;
}

.wpsp-profile-bio {
    margin-bottom: 1rem !important;
    font-size: .9rem !important;
    line-height: 1.6 !important;
    background: #222425;
    border: 1px solid #323335;
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    padding: 1rem;
    color: var(--sp-muted);
    font-weight: 400 !important;
}

.wpsp-edit-panel {
    box-shadow: var(--sp-shadow);
    background: #222425;
    border: 2px dashed #323335;
    border-radius: var(--sp-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.wpsp-edit-panel h3 {
    margin: 0 0 1rem;
    color: white;
}

.wpsp-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.wpsp-edit-grid .wpsp-field:last-of-type,
.wpsp-edit-grid .wpsp-field:nth-of-type(2) {
    grid-column: span 2;
}

.wpsp-edit-actions {
    display: flex;
    gap: .5rem;
    margin-top: .25rem;
}

.wpsp-profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #323335;
    margin-bottom: 1.25rem;
    background: #222425;
    border-radius: var(--sp-radius);
    border-left: 1px solid #323335;
    border-right: 1px solid #323335;
    border-top: 1px solid #323335;
}

.wpsp-ptab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: .65rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    font-family: var(--sp-font);
    color: var(--sp-muted);
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.wpsp-ptab.active {
    color: #f52424;
    border-bottom-color: #f52424;
}

.wpsp-ptab:hover:not(.active) {
    color: #ffffff;
}

.wpsp-ptab-panel {
    animation: wpsp-in .15s ease;
}

.wpsp-friends-search-bar {
    position: relative;
    margin-bottom: 1.25rem;
}

.wpsp-friends-search-bar input {
    width: 100%;
    padding: .65rem 1rem;
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius);
    font-size: .9rem;
    font-family: var(--sp-font);
    background: var(--sp-card);
    color: var(--sp-text);
}

.wpsp-friends-search-bar input:focus {
    border-color: var(--sp-primary);
    outline: none;
}

.wpsp-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sp-card);
    border: 1px solid var(--sp-border);
    border-top: none;
    border-radius: 0 0 var(--sp-radius-sm) var(--sp-radius-sm);
    box-shadow: var(--sp-shadow);
    z-index: 99;
    max-height: 280px;
    overflow-y: auto;
}

.wpsp-search-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--sp-border);
    cursor: pointer;
}

.wpsp-search-item:last-child {
    border-bottom: none;
}

.wpsp-search-item:hover {
    background: var(--sp-bg);
}

.wpsp-search-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wpsp-search-item a {
    flex: 1;
    text-decoration: none;
    color: var(--sp-text);
    font-size: .875rem;
}

.wpsp-search-item small {
    color: var(--sp-muted);
    font-size: .78rem;
}

.wpsp-friends-block {
    margin-bottom: 1.5rem;
}

.wpsp-friends-block h4 {
    font-size: .875rem;
    font-weight: 700;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 .75rem;
}

.wpsp-friends-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpsp-friend-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 0;
    border-bottom: 1px solid #323335;
}

.wpsp-friend-row:last-child {
    border-bottom: none;
}

.wpsp-friend-row>img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wpsp-friend-row-info {
    flex: 1;
    min-width: 0;
}

.wpsp-friend-row-info a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: -3px;
    display: block;
}

.wpsp-friend-row-info span {
    display: block;
    font-size: .78rem;
    color: var(--sp-muted);
}

.wpsp-friend-row-actions {
    display: flex;
    gap: .35rem;
    margin-left: auto;
    flex-shrink: 0;
}

.wpsp-reel-upload-form {
    background: #222425;
    border: 2px dashed #323335;
    border-radius: var(--sp-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.wpsp-reel-upload-form h4 {
    margin: 0 0 .85rem;
    font-size: .9rem;
    color: white;
}

.wpsp-reel-upload-notice {
    margin-bottom: .75rem;
}

.wpsp-reel-upload-row {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

.wpsp-upload-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .85rem;
    background: var(--sp-card);
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--sp-text);
    transition: border-color .15s;
    white-space: nowrap;
}

.wpsp-upload-label:hover {
    border-color: #f52424;
    color: #f52424;
}

.wpsp-reel-upload-row input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: .5rem .75rem;
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    font-family: var(--sp-font);
    font-size: .875rem;
    background: var(--sp-card);
    color: var(--sp-text);
}

.wpsp-reel-upload-row #wpsp-reel-upload-btn {
    background-color: #f52424;
    width: 100%;
    margin-top: 10px;
    justify-content: center;
}

.wpsp-reel-upload-row input[type="text"]:focus {
    border-color: #f52424;
    outline: none;
}

.wpsp-reels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.wpsp-reel-tile {
    position: relative;
    aspect-ratio: 9/16;
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: #111;
}

.wpsp-reel-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}

.wpsp-reel-tile:hover img {
    transform: scale(1.05);
}

.wpsp-reel-tile-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    pointer-events: none;
}

.wpsp-reel-tile-foot {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: linear-gradient(to top, rgb(15 17 19), transparent);
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: #fff;
}

.wpsp-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpsp-post-item {
    border-bottom: 1px solid var(--sp-border);
    padding: 12px 20px;
    background: #222425;
    border: 1px solid #323335;
    border-radius: var(--sp-radius-sm);
}

.wpsp-post-item:last-child {
    border-bottom: none;
}

.wpsp-post-item-topic a {
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
}

.wpsp-post-item-body {
    font-size: .875rem;
    color: #6b7280;
    margin: .3rem 0;
}

.wpsp-post-item-date {
    font-size: 11px;
    color: var(--sp-muted);
}

.wpsp-about-list {
    margin: 0;
}

.wpsp-about-list dt {
    font-size: .78rem;
    font-weight: 700;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 1rem 0 .3rem;
}

.wpsp-about-list dt:first-child {
    margin-top: 0;
}

.wpsp-about-list dd {
    margin: 0;
    font-size: .9rem;
}

.wpsp-friends-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.wpsp-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .7rem;
    background: var(--sp-bg);
    border: 1px solid var(--sp-border);
    border-radius: 999px;
    font-size: .8rem;
    text-decoration: none;
    color: var(--sp-text);
    transition: background .15s;
}

.wpsp-chip:hover {
    background: var(--sp-border);
}

.wpsp-chip img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

#wpsp-reel-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

#wpsp-reel-lightbox::-webkit-scrollbar {
    display: none;
}

#wpsp-lightbox-close {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpsp-lightbox-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    background: #000000;
    margin: 0 auto;
    max-width: 1000px;
}

.wpsp-lightbox-slide video, .wpsp-lightbox-slide .wpsp-lb-img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    max-width: 900px;
    margin: 0 auto;
    display: block;
}

.wpsp-lb-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .7) 0%, transparent 50%);
    pointer-events: none;
}

.wpsp-lb-actions {
    position: absolute;
    right: 14px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.wpsp-lb-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
}

.wpsp-lb-btn-icon {
    display: block;
    font-size: 26px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.wpsp-lb-btn.liked .wpsp-lb-btn-icon {
    color: #e0335a;
}

.wpsp-lb-info {
    position: absolute;
    left: 0;
    right: 72px;
    bottom: 20px;
    padding: 12px 14px;
}

.wpsp-lb-author {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}

.wpsp-lb-author img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .8);
}

.wpsp-lb-author strong {
    color: #fff;
    font-size: .9rem;
}

.wpsp-lb-caption {
    font-size: .85rem;
    color: rgba(255, 255, 255, .9);
    margin: 0;
}

.wpsp-header-reels {
    overflow: hidden;
    background-color: #18191b;
    border-bottom: 1px solid #27282a;
}

.wpsp-header-reels-strip {
    display: flex;
    gap: 12px;
    overflow-x: scroll;
    padding: 8px 0;
    scrollbar-width: none;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    max-height: 70px;
    overflow-y: hidden;
}

.wpsp-header-reels-strip:after {
    content: " ";
    width: 100px;
    height: 100px;
    position: absolute;
    right: 0;
    top: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 50%, rgb(24 25 27) 100%);
}

.wpsp-header-reels-strip::-webkit-scrollbar {
    display: none;
}

.wpsp-header-reel-btn {
    position: relative;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid #f52424;
    background: #111;
    padding: 0;
    cursor: pointer;
}

.wpsp-header-reel-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpsp-hr-play {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    color: #fff;
    background: rgba(0, 0, 0, .6);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpsp-chat-page {
    max-width: 960px;
    margin: 0 auto;
}

.wpsp-chat-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--sp-border);
    margin-bottom: 0;
}

.wpsp-chat-tab {
    flex: 1;
    max-width: 200px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: .7rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    font-family: var(--sp-font);
    color: var(--sp-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.wpsp-chat-tab.active {
    color: #f22424;
    border-bottom-color: #f22424;
}

.wpsp-chat-tab:hover:not(.active) {
    color: var(--sp-text);
}

.wpsp-unread-badge {
    background: var(--sp-danger);
    color: #fff;
    border-radius: 999px;
    font-size: .7rem;
    padding: 1px 6px;
    font-weight: 700;
}

.wpsp-chat-panels {
    margin-top: 0;
}

.wpsp-chat-panel {
    animation: wpsp-in .15s ease;
}

.wpsp-chat-panel-hdr {
    background: var(--sp-primary);
    color: #fff;
    padding: .75rem 1rem;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    border-radius: var(--sp-radius) var(--sp-radius) 0 0;
}

.wpsp-live-dot {
    color: #a7f3d0;
    font-size: .6rem;
}

.wpsp-chat-messages {
    height: 380px;
    overflow-y: auto;
    padding: .75rem 1rem;
    background: var(--sp-card);
    border-left: 1px solid var(--sp-border);
    border-right: 1px solid var(--sp-border);
    display: flex;
    flex-direction: column;
    gap: .4rem;
    scrollbar-width: thin;
}

.wpsp-msg-row {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
}

.wpsp-msg-row.mine {
    flex-direction: row-reverse;
}

.wpsp-msg-row img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wpsp-msg-bubble {
    max-width: 68%;
    padding: .45rem .8rem;
    border-radius: 14px;
    font-size: .875rem;
    line-height: 1.5;
    word-break: break-word;
    background: var(--sp-bg);
    color: var(--sp-text);
    position: relative;
}

.wpsp-msg-row.mine .wpsp-msg-bubble {
    background: var(--sp-primary);
    color: #fff;
}

.wpsp-msg-name {
    font-size: .72rem;
    font-weight: 700;
    color: var(--sp-primary);
    margin-bottom: .15rem;
}

.wpsp-msg-row.mine .wpsp-msg-name {
    color: rgba(255, 255, 255, .8);
}

.wpsp-msg-time {
    font-size: .68rem;
    color: var(--sp-muted);
    margin-top: .15rem;
}

.wpsp-msg-row.mine .wpsp-msg-time {
    color: rgba(255, 255, 255, .65);
}

.wpsp-msg-del {
    display: none;
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--sp-danger);
    color: #fff;
    font-size: 9px;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.wpsp-msg-bubble:hover .wpsp-msg-del {
    display: flex;
}

.wpsp-chat-input-row {
    display: flex;
    gap: .5rem;
    padding: .65rem .85rem;
    background: var(--sp-card);
    border: 1px solid var(--sp-border);
    border-top: none;
    border-radius: 0 0 var(--sp-radius) var(--sp-radius);
}

.wpsp-chat-input-row input,
.wpsp-chat-input-row textarea {
    flex: 1;
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    padding: .5rem .8rem;
    font-family: var(--sp-font);
    font-size: .875rem;
    background: var(--sp-bg);
    color: var(--sp-text);
    resize: none;
    transition: border-color .15s;
}

.wpsp-chat-input-row input:focus,
.wpsp-chat-input-row textarea:focus {
    border-color: #dddddd;
    outline: none;
}

.wpsp-dm-sidebar-hdr #wpsp-dm-new-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.wpsp-chat-guest {
    padding: 1rem;
    color: var(--sp-muted);
    font-size: .875rem;
}

.wpsp-dm-layout {
    display: flex;
    height: 460px;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    overflow: hidden;
}

.wpsp-dm-sidebar {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid var(--sp-border);
    display: flex;
    flex-direction: column;
    background: var(--sp-bg);
}

.wpsp-dm-sidebar-hdr {
    padding: .75rem 1rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--sp-border);
}

#wpsp-conv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.wpsp-conv-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .85rem;
    cursor: pointer;
    border-bottom: 1px solid var(--sp-border);
    transition: background .1s;
}

.wpsp-conv-item:hover, .wpsp-conv-item.active {
    background: #eef1fb;
}

.wpsp-conv-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.wpsp-conv-info strong {
    display: block;
    font-size: .85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    margin-bottom: -4px;
}

.wpsp-conv-info span {
    font-size: .76rem;
    color: var(--sp-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpsp-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    flex-shrink: 0;
}

.wpsp-conv-item.unread strong {
    color: #f32424;
}

.wpsp-conv-empty {
    padding: .75rem 1rem;
    color: var(--sp-muted);
    font-size: .85rem;
}

.wpsp-dm-thread {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wpsp-dm-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-muted);
    font-size: .875rem;
}

#wpsp-dm-active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.wpsp-dm-thread-hdr {
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--sp-border);
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--sp-card);
}

.wpsp-dm-thread-hdr img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

#wpsp-dm-active .wpsp-chat-messages {
    flex: 1;
    height: auto;
    border: none;
    border-radius: 0;
}

#wpsp-dm-active .wpsp-chat-input-row {
    border: none;
    border-top: 1px solid var(--sp-border);
    border-radius: 0;
}

.wpsp-forum {
    max-width: 860px;
    margin: 0 auto;
}

.wpsp-forum-h {
    font-size: 1.25rem !important;
    color: white;
    padding: 0 !important;
    margin: 0 !important;
}

.wpsp-crumbs {
    font-size: .83rem;
    color: var(--sp-muted);
    margin-bottom: 1rem;
}

.wpsp-crumbs a {
    color: #ffffff;
    text-decoration: none;
}

.wpsp-forum-cat-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.wpsp-forum-cat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #18191b;
    border: 1px solid #27282a;
    border-radius: var(--sp-radius);
    padding: 1rem 1.25rem;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}

.wpsp-forum-cat-card:hover {
    border-color: #4a4b4c;
}

.wpsp-forum-cat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wpsp-forum-cat-body {
    flex: 1;
}

.wpsp-forum-cat-body strong {
    display: block;
    font-size: .95rem;
    color: #ffffff;
}

.wpsp-forum-cat-body span {
    font-size: .83rem;
    color: var(--sp-muted);
}

.wpsp-forum-cat-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-align: center;
    border: 1px solid #3f4344;
    padding: 6px;
    border-radius: 8px;
    background: #222425;
}

.wpsp-forum-cat-count small {
    display: block;
    font-size: .72rem;
    font-weight: 400;
    color: var(--sp-muted);
}

.wpsp-forum-cat-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.wpsp-new-topic-form {
    background: var(--sp-bg);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}

.wpsp-forum-form-notice {
    margin-bottom: .75rem;
}

.wpsp-topic-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wpsp-topic-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #18191b;
    border: 1px solid #27282a;
    border-radius: var(--sp-radius-sm);
    padding: .85rem 1rem;
    flex-wrap: wrap;
}

.wpsp-topic-row.pinned {
    border-left: 3px solid var(--sp-primary);
}

.wpsp-topic-flag {
    font-size: .9rem;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.wpsp-topic-main {
    flex: 1;
    min-width: 0;
}

.wpsp-topic-link {
    font-weight: 600;
    font-size: .9rem;
    color: #ffffff;
    text-decoration: none;
    display: block;
}

.wpsp-topic-link:hover {
    color: #f52424;
}

.wpsp-topic-meta {
    font-size: .78rem;
    color: var(--sp-muted);
}

.wpsp-topic-replies {
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-align: center;
    border: 1px solid #3f4344;
    padding: 6px;
    border-radius: 8px;
    background: #222425;
}

.wpsp-topic-replies small {
    display: block;
    font-size: .7rem;
    font-weight: 400;
    color: var(--sp-muted);
}

.wpsp-topic-admin-btns {
    display: flex;
    gap: .3rem;
}

.wpsp-topic-hdr {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: .75rem;
    flex-wrap: wrap;
}

.wpsp-posts-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.wpsp-post-card {
    display: flex;
    gap: 1rem;
    background: #18191b;
    border: 1px solid #27282a;
    border-radius: var(--sp-radius);
    padding: 1rem;
}

.wpsp-post-card-side {
    width: 110px;
    flex-shrink: 0;
    text-align: center;
}

.wpsp-post-card-side img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: .4rem;
}

.wpsp-post-card-side a {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.wpsp-post-card-date {
    font-size: .72rem;
    color: var(--sp-muted);
    margin-top: .25rem;
}

.wpsp-post-card-body {
    flex: 1;
    min-width: 0;
}

.wpsp-post-card-content {
    font-size: .9rem;
    line-height: 1.1rem;
    color: var(--sp-muted);
}

.wpsp-post-card-actions {
    display: flex;
    gap: .35rem;
    margin-top: .65rem;
}

.wpsp-reply-box {
    background: #222425;
    border: 2px dashed #323335;
    border-radius: var(--sp-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.wpsp-reply-box h4 {
    margin: 0 0 .85rem;
    font-size: .95rem;
    color: white;
}

.wpsp-pagination {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .wpsp-reels-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wpsp-dm-layout {
        flex-direction: column;
        height: auto;
    }

    .wpsp-dm-sidebar {
        width: 100%;
        height: 160px;
        border-right: none;
        border-bottom: 1px solid var(--sp-border);
    }

    .wpsp-dm-thread {
        min-height: 300px;
    }

    .wpsp-profile-header {
        flex-direction: column;
    }

    .wpsp-edit-grid {
        grid-template-columns: 1fr;
    }

    .wpsp-edit-grid .wpsp-field:nth-of-type(2) {
        grid-column: 1;
    }

    .wpsp-post-card {
        flex-direction: column;
    }

    .wpsp-post-card-side {
        width: auto;
        text-align: left;
        display: flex;
        align-items: center;
        gap: .75rem;
    }
}



.wpsp-dm-new {
    position: relative;
    padding: .65rem;
    border-bottom: 1px solid rgba(0, 0, 0, .08)
}

#wpsp-dm-user-search {
    width: 100%;
    box-sizing: border-box
}

#wpsp-dm-search-results {
    position: absolute;
    left: .65rem;
    right: .65rem;
    top: calc(100% - .2rem);
    z-index: 30;
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12)
}

.wpsp-dm-search-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .55rem .7rem;
    background: #fff;
    border: 0;
    text-align: left;
    cursor: pointer
}

.wpsp-dm-search-item:hover {
    background: rgba(0, 0, 0, .04)
}

.wpsp-dm-search-item img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover
}

.wpsp-dm-search-item span {
    display: flex;
    flex-direction: column;
    line-height: 1.2
}

.wpsp-dm-search-item small {
    opacity: .65
}

.wpsp-lb-comments {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 92vw);
    z-index: 100000;
    background: rgba(10, 10, 10, .96);
    color: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, .12);
}

.wpsp-lb-comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.wpsp-lb-comments-close {
    border: none;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.wpsp-lb-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.wpsp-lb-comment {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.wpsp-lb-comment img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.wpsp-lb-comment strong {
    display: block;
    font-size: .86rem;
    margin-bottom: 2px;
}

.wpsp-lb-comment p {
    margin: 0;
    font-size: .88rem;
    color: rgba(255, 255, 255, .88);
    line-height: 1.35;
}

.wpsp-lb-comments-empty,
.wpsp-lb-comment-login {
    padding: 14px 16px;
    color: rgba(255, 255, 255, .65);
    font-size: .9rem;
}

.wpsp-lb-comment-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.wpsp-lb-comment-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
}

.wpsp-lb-comment-submit {
    border: none;
    border-radius: 999px;
    padding: 0 16px;
    background: #fff;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .wpsp-lb-comments {
        width: 100%;
    }
}

.wpsp-floating-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    font-family: inherit
}

.wpsp-floating-chat-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: #f52424;
    color: #fff;
    box-shadow: 0 12px 30px rgb(18 21 23 / 45%);
    cursor: pointer;
    font-weight: 700;
    line-height: 1;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease,
        opacity .25s ease;

    will-change: transform;
}

.wpsp-floating-chat-toggle:hover {
    transform: translateY(-6px) scale(1.0);
    box-shadow: 0 18px 40px rgb(18 21 23 / 55%);
}

.wpsp-floating-chat-toggle:active {
    transform: translateY(-2px) scale(.1);
}

.wpsp-floating-chat-toggle svg,
.wpsp-floating-chat-toggle i {
    transition: transform .25s ease;
}


.wpsp-floating-chat-icon {
    font-size: 20px;
    line-height: 1
}

.wpsp-floating-chat-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc1e1e;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    border: 1px solid #ff600c;
}

.wpsp-floating-chat-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: min(600px, calc(100vw - 24px));
    height: min(680px, calc(100vh - 105px));
    border-radius: 18px;
    box-shadow: 0 14px 30px rgb(0 0 0);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.wpsp-floating-chat.open .wpsp-floating-chat-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.wpsp-floating-chat-head {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #222425;
    color: #fff
}

.wpsp-floating-chat-head button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 0 4px 12px
}

.wpsp-floating-chat-body {
    height: calc(100% - 52px);
    overflow: hidden;
    background: #f8fafc
}

.wpsp-floating-chat-loading, .wpsp-floating-chat-error {
    padding: 20px;
    text-align: center;
    color: #64748b
}

.wpsp-floating-chat .wpsp-chat-page {
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    max-width: none
}

.wpsp-floating-chat .wpsp-chat-panels {
    height: calc(100% - 46px)
}

.wpsp-floating-chat .wpsp-chat-panel {
    height: 100%
}

.wpsp-floating-chat .wpsp-chat-messages {
    height: calc(100% - 110px);
    max-height: none
}

.wpsp-floating-chat .wpsp-dm-layout {
    height: 100%;
    display: flex
}

.wpsp-floating-chat .wpsp-dm-sidebar {
    width: 42%;
    min-width: 145px;
    overflow: auto
}

.wpsp-floating-chat .wpsp-dm-thread {
    width: 58%;
    min-width: 0;
    display: flex;
    flex-direction: column
}

.wpsp-floating-chat #wpsp-dm-active {
    height: 100%;
    display: flex;
    flex-direction: column
}

.wpsp-floating-chat #wpsp-dm-active[style*="display:none"] {
    display: none !important
}

.wpsp-floating-chat #wpsp-dm-messages {
    flex: 1;
    height: auto;
    min-height: 0
}

@media (max-width:560px) {
    .wpsp-floating-chat {
        right: 12px;
        bottom: 12px
    }

    .wpsp-floating-chat-label {
        display: none
    }

    .wpsp-floating-chat-panel {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: 72px;
        width: auto;
        height: calc(100vh - 92px)
    }

    .wpsp-floating-chat .wpsp-dm-layout {
        flex-direction: column
    }

    .wpsp-floating-chat .wpsp-dm-sidebar, .wpsp-floating-chat .wpsp-dm-thread {
        width: 100%
    }

    .wpsp-floating-chat .wpsp-dm-sidebar {
        max-height: 42%
    }
}

.wpsp-profile-meta {
    display: block;
    margin-top: .25rem;
    color: #6b7280;
    font-size: .9rem
}

.wpsp-edit-grid select, #wpsp-reel-audience {
    width: 100%;
    max-width: 100%;
    padding: .6rem .75rem;
    border: 1px solid #d1d5db;
    border-radius: .65rem;
    background: #fff
}

.wpsp-field small {
    display: block;
    margin-top: .35rem;
    color: #6b7280;
    font-size: .8rem;
    line-height: 1.35
}

#wpsp-reel-audience {
    min-width: 180px
}


a.wpsp-user-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpsp-user-box img {
    max-width: 25px;
    max-height: 25px;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    min-height: 25px;
    min-width: 25px;
}

.wpsp-header-reel-btn.seen {
    opacity: .45;
    filter: grayscale(1);
}

.wpsp-header-reel-btn.seen::after {
    content: '✓';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

/* ══ ACTIVITY FEED ══════════════════════════════════════════════════════════ */
.wpsp-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpsp-activity-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--sp-border);
}

.wpsp-activity-item:last-child {
    border-bottom: none;
}

.wpsp-activity-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: .1rem;
}

.wpsp-activity-body {
    flex: 1;
    min-width: 0;
}

.wpsp-activity-label {
    display: inline-block;
    background: var(--sp-bg);
    border: 1px solid var(--sp-border);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--sp-muted);
    padding: .1rem .55rem;
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wpsp-activity-context {
    font-size: .875rem;
    display: block;
    margin-bottom: .2rem;
}

.wpsp-activity-context a {
    color: var(--sp-primary);
    text-decoration: none;
    font-weight: 600;
}

.wpsp-activity-excerpt {
    margin: 0;
    font-size: .83rem;
    color: var(--sp-muted);
}

.wpsp-activity-time {
    font-size: .75rem;
    color: var(--sp-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: .15rem;
}

/* ══ FORUM VOTE BAR ═════════════════════════════════════════════════════════ */
.wpsp-post-card-footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .65rem;
    flex-wrap: wrap;
}

.wpsp-vote-bar {
    display: flex;
    gap: .35rem;
    align-items: center;
}

.wpsp-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--sp-bg);
    border: 1.5px solid var(--sp-border);
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .82rem;
    font-family: var(--sp-font);
    cursor: pointer;
    color: var(--sp-muted);
    transition: all .15s;
    font-weight: 600;
}

.wpsp-vote-btn:hover {
    border-color: var(--sp-primary);
    color: var(--sp-primary);
    background: #fff;
}

.wpsp-vote-btn.active.wpsp-upvote {
    background: #ecfdf5;
    border-color: var(--sp-success);
    color: var(--sp-success);
}

.wpsp-vote-btn.active.wpsp-downvote {
    background: #fff1f2;
    border-color: var(--sp-danger);
    color: var(--sp-danger);
}

/* ── Reel tile — pending + owner delete ─────────────────────────────────── */
.wpsp-reel-tile.is-pending {
    opacity: .65;
}

.wpsp-reel-tile.is-pending img {
    filter: grayscale(30%);
}

.wpsp-reel-tile-pending {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 4px 6px;
    letter-spacing: .3px;
}

.wpsp-reel-tile-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 38, 38, .85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
    transition: background .15s;
}

.wpsp-reel-tile:hover .wpsp-reel-tile-delete {
    display: flex;
}

.wpsp-reel-tile-delete:hover {
    background: rgba(185, 28, 28, 1);
}