/* OSANIME Profile UI — Stage 4 v280
 * About + Community + contextual sidebar polish.
 * Loaded after Stage 1-3 and legacy community styles.
 */

body.profile-ui-stage4-v280 {
    --profile-v280-card: linear-gradient(180deg, rgba(14, 28, 49, .96), rgba(8, 18, 35, .96));
    --profile-v280-card-soft: rgba(255, 255, 255, .035);
    --profile-v280-line: rgba(255, 255, 255, .09);
    --profile-v280-line-strong: rgba(255, 255, 255, .14);
    --profile-v280-muted: #9facbf;
    --profile-v280-text: #f6f8fc;
    --profile-v280-pink: #ff4f93;
}

/* -------------------------------------------------------------------------
 * ABOUT
 * ---------------------------------------------------------------------- */
body.profile-ui-stage4-v280 .profile-about-panel-v280 {
    display: grid !important;
    gap: 16px !important;
    overflow: hidden !important;
}

body.profile-ui-stage4-v280 .profile-about-head-v280 {
    margin: 0 !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid var(--profile-v280-line) !important;
}

body.profile-ui-stage4-v280 .profile-about-head-v280 h2 {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    margin-top: 5px !important;
    font-size: clamp(20px, 2vw, 25px) !important;
}

body.profile-ui-stage4-v280 .profile-about-head-v280 h2 > i {
    color: var(--profile-v280-pink) !important;
    font-size: .88em !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-v280 {
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, .8fr) !important;
    gap: 12px !important;
    align-items: stretch !important;
    margin: 0 !important;
}

body.profile-ui-stage4-v280 .profile-about-bio-card-v280 {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 20px !important;
    border: 1px solid var(--profile-v280-line) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, rgba(255, 79, 147, .07), rgba(96, 111, 255, .035) 48%, rgba(7, 16, 31, .75)) !important;
}

body.profile-ui-stage4-v280 .profile-about-bio-card-v280 > span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: var(--profile-v280-pink) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase !important;
}

body.profile-ui-stage4-v280 .profile-about-bio-card-v280 p {
    max-width: 760px !important;
    margin: 10px 0 0 !important;
    color: #dfe6f0 !important;
    font-size: 14px !important;
    line-height: 1.68 !important;
    overflow-wrap: anywhere !important;
    white-space: pre-line !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > a,
body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > span {
    min-width: 0 !important;
    min-height: 66px !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 11px !important;
    padding: 10px 13px !important;
    border: 1px solid var(--profile-v280-line) !important;
    border-radius: 14px !important;
    background: var(--profile-v280-card) !important;
    color: inherit !important;
    text-decoration: none !important;
    text-align: left !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > a {
    transition: transform .16s ease, border-color .16s ease, background .16s ease !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > a:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(255, 79, 147, .28) !important;
    background: linear-gradient(180deg, rgba(20, 34, 57, .98), rgba(9, 20, 39, .98)) !important;
}

body.profile-ui-stage4-v280 .profile-about-stat-icon {
    width: 40px !important;
    height: 40px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
    color: var(--profile-v280-pink) !important;
    background: rgba(255, 79, 147, .11) !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > * > span:last-child {
    min-width: 0 !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 b {
    display: block !important;
    color: #fff !important;
    font-size: 18px !important;
    line-height: 1.12 !important;
}

body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 small {
    display: block !important;
    margin-top: 4px !important;
    color: var(--profile-v280-muted) !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

body.profile-ui-stage4-v280 .profile-about-section-v280 {
    min-width: 0 !important;
    padding: 17px !important;
    border: 1px solid var(--profile-v280-line) !important;
    border-radius: 17px !important;
    background: var(--profile-v280-card) !important;
}

body.profile-ui-stage4-v280 .profile-about-section-head-v280 {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    margin-bottom: 13px !important;
}

body.profile-ui-stage4-v280 .profile-about-section-head-v280 > span {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
    color: var(--profile-v280-pink) !important;
    background: rgba(255, 79, 147, .10) !important;
    border: 1px solid rgba(255, 79, 147, .13) !important;
}

body.profile-ui-stage4-v280 .profile-about-section-head-v280 small,
body.profile-ui-stage4-v280 .profile-about-section-head-v280 h3 {
    display: block !important;
}

body.profile-ui-stage4-v280 .profile-about-section-head-v280 small {
    color: var(--profile-v280-pink) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
}

body.profile-ui-stage4-v280 .profile-about-section-head-v280 h3 {
    margin: 2px 0 0 !important;
    color: #fff !important;
    font-size: 16px !important;
}

body.profile-ui-stage4-v280 .profile-about-data-grid-v280 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.profile-ui-stage4-v280 .profile-about-data-grid-v280 > .profile-about-data-item-v280 {
    min-width: 0 !important;
    min-height: 72px !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 11px 12px !important;
    border: 1px solid rgba(255, 255, 255, .065) !important;
    border-radius: 13px !important;
    background: rgba(5, 14, 29, .55) !important;
}

body.profile-ui-stage4-v280 .profile-about-data-icon-v280 {
    width: 36px !important;
    height: 36px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 11px !important;
    color: #ff76ad !important;
    background: rgba(255, 79, 147, .09) !important;
}

body.profile-ui-stage4-v280 .profile-about-presence-icon-v280.is-online {
    color: #5de0a5 !important;
    background: rgba(54, 210, 143, .10) !important;
}

body.profile-ui-stage4-v280 .profile-about-data-item-v280 > span:last-child {
    min-width: 0 !important;
}

body.profile-ui-stage4-v280 .profile-about-data-item-v280 small {
    display: block !important;
    color: #8e9db2 !important;
    font-size: 10.5px !important;
    line-height: 1.25 !important;
}

body.profile-ui-stage4-v280 .profile-about-data-item-v280 b {
    display: block !important;
    margin-top: 4px !important;
    color: #f3f6fb !important;
    font-size: 13px !important;
    line-height: 1.38 !important;
    overflow-wrap: anywhere !important;
}

body.profile-ui-stage4-v280 .profile-about-data-item-v280 a {
    color: #ff78b0 !important;
    text-decoration: none !important;
}

body.profile-ui-stage4-v280 .profile-about-data-item-v280 a:hover {
    text-decoration: underline !important;
}

/* -------------------------------------------------------------------------
 * COMMUNITY
 * ---------------------------------------------------------------------- */
body.profile-ui-stage4-v280 .profile-community-v280 {
    display: grid !important;
    gap: 14px !important;
}

body.profile-ui-stage4-v280 .profile-community-v280 .profile-stage9-community-head {
    margin: 0 !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid var(--profile-v280-line) !important;
}

body.profile-ui-stage4-v280 .profile-community-status-strip-v280 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 7px !important;
}

body.profile-ui-stage4-v280 .profile-community-status-strip-v280 > span {
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    border-radius: 999px !important;
    background: rgba(5, 14, 29, .58) !important;
    color: #9facbf !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
}

body.profile-ui-stage4-v280 .profile-community-status-strip-v280 > span i {
    color: var(--profile-v280-pink) !important;
}

body.profile-ui-stage4-v280 .profile-community-status-strip-v280 > span b {
    color: #eaf0f8 !important;
    font-size: inherit !important;
}

body.profile-ui-stage4-v280 .profile-community-status-strip-v280 .is-presence.is-online i {
    color: #52dfa0 !important;
}

body.profile-ui-stage4-v280 .profile-community-status-strip-v280 .is-presence.is-recent i {
    color: #f7c85d !important;
}

body.profile-ui-stage4-v280 .profile-community-status-strip-v280 .is-stale {
    border-color: rgba(244, 178, 69, .25) !important;
    color: #e5c58c !important;
}

body.profile-ui-stage4-v280 .profile-stage9-score-grid {
    gap: 9px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-score-grid article {
    min-height: 88px !important;
    padding: 14px !important;
    border-radius: 15px !important;
    border-color: var(--profile-v280-line) !important;
    background: var(--profile-v280-card) !important;
}

body.profile-ui-stage4-v280 .profile-stage9-score-grid article > span {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
    border-radius: 12px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-score-grid b {
    font-size: 21px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-score-grid small {
    font-size: 10.5px !important;
    line-height: 1.3 !important;
}

body.profile-ui-stage4-v280 .profile-stage9-snapshot-note-v280 {
    justify-content: flex-start !important;
    padding: 9px 11px !important;
    border: 1px dashed rgba(255, 255, 255, .075) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, .018) !important;
}

body.profile-ui-stage4-v280 .profile-stage9-snapshot-note-v280 span {
    color: #8292a9 !important;
    font-size: 10.5px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-two-column {
    align-items: start !important;
    gap: 12px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-card {
    align-self: start !important;
    padding: 16px !important;
    border-color: var(--profile-v280-line) !important;
    border-radius: 16px !important;
    background: var(--profile-v280-card) !important;
}

body.profile-ui-stage4-v280 .profile-stage9-card-head {
    min-height: 42px !important;
    margin-bottom: 12px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-badge-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-badge {
    min-width: 0 !important;
    min-height: 64px !important;
    align-items: flex-start !important;
    padding: 10px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-badge small {
    line-height: 1.45 !important;
}

body.profile-ui-stage4-v280 .profile-stage9-signal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-signal-grid > span {
    min-width: 0 !important;
    min-height: 66px !important;
    padding: 10px !important;
    border-radius: 12px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-signal-grid > span b {
    font-size: 15px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-contribution-list {
    display: grid !important;
    gap: 6px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-contribution-row {
    min-height: 68px !important;
    padding: 8px 9px !important;
    border: 1px solid rgba(255, 255, 255, .055) !important;
    border-radius: 12px !important;
    background: rgba(4, 13, 27, .42) !important;
}

body.profile-ui-stage4-v280 .profile-stage9-contribution-row:first-child {
    border-top: 1px solid rgba(255, 255, 255, .055) !important;
}

body.profile-ui-stage4-v280 .profile-stage9-contribution-row:hover {
    border-color: rgba(255, 79, 147, .20) !important;
    background: rgba(255, 79, 147, .045) !important;
}

body.profile-ui-stage4-v280 .profile-stage9-contribution-copy b {
    font-size: 13px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-suggestion-grid {
    gap: 9px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-suggestion {
    padding: 13px !important;
    border-radius: 14px !important;
    background: rgba(4, 13, 27, .44) !important;
}

body.profile-ui-stage4-v280 .profile-stage9-suggestion-person img {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-suggestion-person b {
    font-size: 13px !important;
}

body.profile-ui-stage4-v280 .profile-stage9-suggestion-actions button,
body.profile-ui-stage4-v280 .profile-stage9-suggestion-actions a {
    min-height: 40px !important;
}

/* -------------------------------------------------------------------------
 * SIDEBAR
 * ---------------------------------------------------------------------- */
body.profile-ui-stage4-v280 .profile-member-side-sticky {
    gap: 11px !important;
}

body.profile-ui-stage4-v280 .profile-statistics-card,
body.profile-ui-stage4-v280 .profile-genres-card,
body.profile-ui-stage4-v280 .profile-latest-card,
body.profile-ui-stage4-v280 .member-profile-share-card {
    overflow: hidden !important;
    border-color: var(--profile-v280-line) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .13) !important;
}

body.profile-ui-stage4-v280 .profile-statistics-card h3,
body.profile-ui-stage4-v280 .profile-genres-card h3,
body.profile-ui-stage4-v280 .profile-latest-card h3 {
    margin-bottom: 8px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .065) !important;
}

body.profile-ui-stage4-v280 .profile-statistics-card .member-stat-row {
    min-height: 50px !important;
    margin: 0 !important;
    padding: 8px 4px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .045) !important;
}

body.profile-ui-stage4-v280 .profile-statistics-card .member-stat-row:last-child {
    border-bottom: 0 !important;
}

body.profile-ui-stage4-v280 .profile-statistics-card .member-stat-icon {
    width: 34px !important;
    height: 34px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 10px !important;
    color: #ff76ad !important;
    background: rgba(255, 79, 147, .085) !important;
}

body.profile-ui-stage4-v280 .profile-statistics-card .member-stat-row b {
    font-size: 13px !important;
}

body.profile-ui-stage4-v280 .profile-sidebar-social-trigger:not(:disabled):hover,
body.profile-ui-stage4-v280 .profile-stage9-sidebar-community:hover {
    background: rgba(255, 79, 147, .045) !important;
}

/* If JS detects a sidebar taller than the usable viewport, do not trap lower
   cards below a sticky region on short laptop screens. */
@media (min-width: 1181px) {
    body.profile-ui-stage4-v280 .profile-member-side-sticky.profile-sidebar-tall-v280 {
        position: static !important;
        top: auto !important;
    }
}

/* -------------------------------------------------------------------------
 * RESPONSIVE
 * ---------------------------------------------------------------------- */
@media (max-width: 1180px) {
    body.profile-ui-stage4-v280 .profile-about-overview-v280 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > a,
    body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > span {
        min-height: 72px !important;
    }
}

@media (max-width: 860px) {
    body.profile-ui-stage4-v280 .profile-stage9-badge-list {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-signal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    body.profile-ui-stage4-v280 .profile-about-panel-v280,
    body.profile-ui-stage4-v280 .profile-community-v280 {
        gap: 11px !important;
    }

    body.profile-ui-stage4-v280 .profile-about-head-v280,
    body.profile-ui-stage4-v280 .profile-community-v280 .profile-stage9-community-head {
        padding-bottom: 12px !important;
    }

    body.profile-ui-stage4-v280 .profile-about-head-v280 .profile-content-head-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.profile-ui-stage4-v280 .profile-about-head-v280 .profile-content-head-actions a:only-child {
        grid-column: 1 / -1 !important;
    }

    body.profile-ui-stage4-v280 .profile-about-bio-card-v280,
    body.profile-ui-stage4-v280 .profile-about-section-v280,
    body.profile-ui-stage4-v280 .profile-stage9-card {
        padding: 14px !important;
        border-radius: 14px !important;
    }

    body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > a,
    body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > span {
        min-height: 62px !important;
    }

    body.profile-ui-stage4-v280 .profile-about-data-grid-v280 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.profile-ui-stage4-v280 .profile-about-data-grid-v280 > .profile-about-data-item-v280 {
        min-height: 64px !important;
    }

    body.profile-ui-stage4-v280 .profile-community-status-strip-v280 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.profile-ui-stage4-v280 .profile-community-status-strip-v280 > span {
        width: 100% !important;
        justify-content: flex-start !important;
        border-radius: 11px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-score-grid article {
        min-height: 82px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-contribution-row {
        grid-template-columns: 44px minmax(0, 1fr) 16px !important;
        min-height: 64px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-contribution-row time {
        display: none !important;
    }
}

@media (max-width: 460px) {
    body.profile-ui-stage4-v280 .profile-about-head-v280 h2 {
        font-size: 20px !important;
    }

    body.profile-ui-stage4-v280 .profile-about-head-v280 .profile-content-head-actions {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.profile-ui-stage4-v280 .profile-about-bio-card-v280 p {
        font-size: 13px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-score-grid article {
        display: grid !important;
        grid-template-columns: 36px minmax(0, 1fr) !important;
        gap: 9px !important;
        min-height: 78px !important;
        padding: 10px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-score-grid article > span {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-score-grid b {
        font-size: 18px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-score-grid small {
        font-size: 9.5px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-signal-grid {
        gap: 6px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-signal-grid > span {
        min-height: 62px !important;
        grid-template-columns: 22px minmax(0, 1fr) !important;
        column-gap: 6px !important;
        padding: 8px !important;
    }

    body.profile-ui-stage4-v280 .profile-stage9-signal-grid > span small {
        font-size: 9.5px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.profile-ui-stage4-v280 .profile-about-overview-stats-v280 > a,
    body.profile-ui-stage4-v280 .profile-stage9-contribution-row {
        transition: none !important;
    }
}
