.cards-grid.social-mode {
    display: block;
    padding: 1.5rem;
    background: var(--social-profile-bg, var(--bg-dark));
}

.cards-grid.public-chat-mode {
    padding: 0;
    overflow: hidden;
}

#public-chat-view {
    background: #182536;
    color: #dbe8f5;
}

#public-chat-view.active {
    display: flex;
}

html.social-profile-scrollbar {
    scrollbar-color: var(--profile-scrollbar-thumb, #67c5f5) var(--profile-scrollbar-track, #0a2d46);
}

html.social-profile-scrollbar::-webkit-scrollbar {
    width: 14px;
}

html.social-profile-scrollbar::-webkit-scrollbar-track {
    background: var(--profile-scrollbar-track, #0a2d46);
}

html.social-profile-scrollbar::-webkit-scrollbar-thumb {
    background: var(--profile-scrollbar-thumb, #67c5f5);
    border: 3px solid var(--profile-scrollbar-track, #0a2d46);
    border-radius: 999px;
}

.cards-grid.social-mode.cursor-effect-crosshair,
.cards-grid.social-mode.cursor-effect-crosshair * {
    cursor: crosshair;
}

.cards-grid.social-mode.cursor-effect-retro,
.cards-grid.social-mode.cursor-effect-retro * {
    cursor: cell;
}

.social-cursor-trail {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.social-cursor-trail.sparkle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 20%, #ffd447 22% 48%, rgba(103, 197, 245, 0.1) 50% 100%);
    animation: social-sparkle-trail 520ms ease-out forwards;
}

.social-cursor-trail.comet {
    width: 30px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 212, 71, 0), #67c5f5, #fff);
    box-shadow: 0 0 14px rgba(103, 197, 245, 0.9);
    animation: social-comet-trail 720ms ease-out forwards;
}

.social-cursor-trail.neon {
    width: 12px;
    height: 12px;
    border: 2px solid #67c5f5;
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(103, 197, 245, 0.9);
    animation: social-neon-trail 520ms ease-out forwards;
}

@keyframes social-sparkle-trail {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    to { opacity: 0; transform: translate(-50%, -110%) scale(0.2) rotate(110deg); }
}

@keyframes social-comet-trail {
    from { opacity: 0.95; transform: translate(-50%, -50%) rotate(-18deg) scaleX(1); }
    to { opacity: 0; transform: translate(-85%, -95%) rotate(-18deg) scaleX(0.2); }
}

@keyframes social-neon-trail {
    from { opacity: 1; transform: translate(-50%, -50%) scale(0.7); }
    to { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

.cards-grid.social-settings-open .social-links-block,
.cards-grid.social-settings-open .social-top-friends,
.cards-grid.social-settings-open .social-top-cards,
.cards-grid.social-settings-open .social-top-lists,
.cards-grid.social-settings-open .social-tabs,
.cards-grid.social-settings-open .social-composer,
.cards-grid.social-settings-open .social-feed,
.cards-grid.social-settings-open .social-load-more {
    display: none;
}

.social-main {
    width: min(980px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0.25rem 0 3rem;
}

.social-tool-main {
    width: min(1320px, calc(100% - 2rem));
}

.social-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.social-tab {
    min-height: 44px;
    background: #1e2a3a;
    color: #dbe8f5;
    border: 1px solid #2d3a4a;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 900;
}

.social-tab.active {
    background: #2b8ab3;
    border-color: #67c5f5;
}

.social-notification-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    display: inline-flex;
    min-width: 1.15rem;
    height: 1.15rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 0.68rem;
    font-weight: 900;
    padding: 0 0.25rem;
    box-shadow: 0 0 0 2px #222c3a;
}

.social-profile-card {
    position: relative;
    margin-bottom: 1rem;
    overflow: visible;
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: var(--profile-header-bg, #222c3a);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.social-links-block {
    margin-bottom: 1rem;
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: var(--social-links-bg, #1e2a3a);
    padding: 0.85rem;
}

.social-top-friends {
    margin-bottom: 1rem;
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: var(--top-friends-bg, #1e2a3a);
    padding: 0.85rem;
}

.social-top-cards {
    margin-bottom: 1rem;
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: var(--top-cards-bg, #1e2a3a);
    padding: 0.85rem;
}

.social-top-lists {
    margin-bottom: 1rem;
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: var(--top-lists-bg, #1e2a3a);
    padding: 0.85rem;
}

.social-links-heading,
.social-top-friends-heading,
.social-top-cards-heading,
.social-top-lists-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.social-links-heading h2,
.social-top-friends-heading h2,
.social-top-cards-heading h2,
.social-top-lists-heading h2 {
    margin: 0;
    color: var(--top-friends-text-color, #f0f8ff);
    font-size: 1rem;
}

.social-links-heading h2 {
    color: var(--social-links-text-color, #f0f8ff);
}

.social-links-heading span {
    color: var(--social-links-text-color, #8fa0b8);
    font-size: 0.82rem;
    font-weight: 800;
}

.social-top-friends-heading span,
.social-top-friends-empty,
.social-top-cards-heading span,
.social-top-cards-empty,
.social-top-lists-heading span,
.social-top-lists-empty {
    color: var(--top-friends-text-color, #8fa0b8);
    font-size: 0.82rem;
    font-weight: 800;
}

.social-links-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-block-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.social-block-tabs button {
    min-height: 36px;
    border: 1px solid rgba(103, 193, 245, 0.28);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.72);
    color: var(--social-links-text-color, #dbe8f5);
    font: inherit;
    font-weight: 900;
    padding: 0 0.9rem;
    cursor: pointer;
}

.social-block-tabs button.active {
    border-color: rgba(255, 214, 90, 0.78);
    background: rgba(39, 127, 163, 0.78);
}

.social-block-panel {
    display: none;
}

.social-block-panel.active {
    display: flex;
}

.social-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.social-info-grid.active {
    display: grid;
}

.social-text-panel.active {
    display: grid;
}

@media (max-width: 768px) {
    .social-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .social-tab {
        min-width: 0;
        min-height: 44px;
        padding: 0.25rem 0.2rem;
        font-size: 0.76rem;
        line-height: 1.05;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .social-block-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.35rem;
        align-items: stretch;
    }

    .social-block-tabs button {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 0.25rem 0.2rem;
        font-size: 0.78rem;
        line-height: 1.05;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.social-info-item {
    display: grid;
    gap: 0.25rem;
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.48);
    padding: 0.75rem;
}

.social-info-item span {
    color: var(--social-links-text-color, #9cc6dc);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.social-info-item strong {
    color: var(--social-links-text-color, #ffffff);
}

.social-text-panel {
    gap: 0.45rem;
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.48);
    padding: 0.85rem;
}

.social-text-panel span {
    color: var(--social-links-text-color, #9cc6dc);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.social-text-panel p {
    margin: 0;
    color: var(--social-links-text-color, #ffffff);
    font-weight: 800;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.social-links-buttons a,
.social-link-disabled {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--social-links-button-bg, #111827);
    color: var(--social-links-button-text, #dbe8f5);
    padding: 0 1rem;
    text-decoration: none;
    font-weight: 900;
}

.social-link-disabled {
    opacity: 0.38;
    cursor: not-allowed;
    filter: grayscale(0.55);
}

.social-links-buttons a:hover,
.social-links-buttons a:focus-visible {
    filter: brightness(1.12);
}

.social-top-friends-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.65rem;
}

.social-top-friend-card {
    min-width: 0;
    display: grid;
    gap: 0.4rem;
    justify-items: center;
    border: 0;
    background: transparent;
    color: #dbe8f5;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.social-top-friend-avatar {
    width: 58px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #304256;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 0 0 3px var(--avatar-border-color, #67c5f5);
    overflow: hidden;
}

.social-top-friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #1b2736;
}

.social-top-friend-name {
    max-width: 100%;
    color: var(--top-friends-name-color, #cfe2f3);
    font-size: 0.74rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-top-cards-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.75rem;
}

.social-top-card {
    min-width: 0;
    display: grid;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.social-top-card:hover img,
.social-top-card:focus-visible img {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.social-top-card img {
    width: 100%;
    aspect-ratio: 63 / 88;
    display: block;
    border-radius: 6px;
    background: #111827;
    object-fit: contain;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.social-top-card strong {
    color: #e6f1ff;
    font-size: 0.72rem;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
}

.social-top-lists-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.social-top-list-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #111827;
    color: #dbe8f5;
    cursor: pointer;
    font: inherit;
    padding: 0.65rem;
    text-align: left;
}

.social-top-list-card:hover,
.social-top-list-card:focus-visible {
    border-color: #67c5f5;
    background: #172334;
}

.social-top-list-cover {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #24344a;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
    overflow: hidden;
}

.social-top-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.social-top-list-copy {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.social-top-list-copy strong,
.social-top-list-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-top-list-copy strong {
    color: #eef7ff;
    font-size: 0.94rem;
}

.social-top-list-copy small {
    color: #9fb4cc;
    font-size: 0.76rem;
    font-weight: 800;
}

.social-profile-loading {
    padding: 1rem;
    color: #a8bdd2;
}

.social-profile-banner {
    height: clamp(150px, 19vw, 230px);
    border-radius: 10px 10px 0 0;
    background:
        radial-gradient(circle at 22% 20%, rgba(59, 130, 246, 0.7), transparent 32%),
        radial-gradient(circle at 78% 24%, rgba(45, 212, 191, 0.52), transparent 36%),
        linear-gradient(135deg, #0d2f47, #111827 58%, #2b1747);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.social-profile-avatar {
    position: absolute;
    top: clamp(96px, 15.5vw, 166px);
    left: 50%;
    width: 96px;
    height: 96px;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    border: 6px solid var(--profile-header-bg, #222c3a);
    border-radius: 14px;
    background: #304256;
    color: #fff;
    font-size: 2.4rem;
    font-weight: 900;
    box-shadow: 0 0 0 5px var(--avatar-border-color, #ffd447);
    overflow: hidden;
}

.social-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #1b2736;
}

.social-profile-info {
    min-height: 86px;
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(220px, 0.8fr) minmax(260px, 1fr);
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.5rem 0.75rem;
    background: var(--profile-header-bg, #222c3a);
}

.social-profile-left {
    min-width: 0;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0;
}

.social-profile-stats {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex: 0 0 auto;
}

.social-profile-stat {
    min-width: 90px;
}

.social-profile-stat + .social-profile-stat {
    padding-left: 1.2rem;
    border-left: 1px solid #3b4657;
}

.social-profile-stat span {
    display: block;
    color: #8fa0b8;
    font-weight: 800;
}

.social-profile-stat strong {
    display: block;
    margin-top: 0.35rem;
    color: #fff;
    font-size: 1.2rem;
}

.social-profile-identity {
    min-width: 0;
    text-align: center;
    align-self: center;
    padding-top: 1.45rem;
}

.social-profile-identity h2 {
    margin: 0;
    color: var(--profile-username-color, #f0f8ff);
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.social-profile-details {
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
}

.social-profile-about {
    width: min(100%, 34rem);
    display: grid;
    gap: 0.35rem;
    margin-left: auto;
    padding-left: 0.85rem;
    border-left: 3px solid rgba(103, 197, 245, 0.58);
    text-align: left;
}

.social-profile-about-title {
    color: #91a8c4;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.social-profile-bio {
    margin: 0;
    max-width: 100%;
    color: #d6e8f8;
    font-size: 0.84rem;
    line-height: 1.28;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.social-profile-bio.short {
    font-size: 0.94rem;
    line-height: 1.25;
}

.social-profile-bio.long {
    font-size: 0.78rem;
    line-height: 1.22;
}

.social-profile-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.social-profile-action,
.social-profile-icon {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 1rem;
}

.social-profile-action.primary {
    background: #ffd447;
    color: #111827;
}

.social-profile-action.danger {
    background: #6d1f2b;
    color: #ffd7dc;
}

.social-profile-action.muted,
.social-profile-action:disabled {
    background: #151d29;
    color: #8fa0b8;
    cursor: default;
}

.social-profile-icon {
    position: relative;
    width: 44px;
    height: 44px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    background: #26364a;
    border: 1px solid rgba(143, 160, 184, 0.24);
    color: #dbe8f5;
    padding: 0;
}

.social-profile-icon.primary {
    background: #ffd447;
    border-color: #ffd447;
    color: #111827;
}

.social-profile-icon.primary:hover,
.social-profile-icon.primary:focus-visible {
    background: #ffdf6b;
    color: #111827;
}

.social-profile-icon.message-icon {
    width: 42px;
    height: 42px;
    min-height: 42px;
    background: transparent;
    border-color: transparent;
    color: #f0f8ff;
}

.social-profile-icon.message-icon:hover,
.social-profile-icon.message-icon:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.social-profile-icon.message-icon svg {
    width: 38px;
    height: 38px;
    transform: translateY(3px);
}

.social-profile-menu {
    position: relative;
    display: inline-flex;
}

.social-profile-icon.menu-toggle {
    background: rgba(38, 54, 74, 0.78);
    border-color: rgba(103, 197, 245, 0.28);
}

.social-profile-icon.menu-toggle svg {
    width: 25px;
    height: 25px;
}

.social-profile-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    z-index: 20;
    min-width: 148px;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(103, 197, 245, 0.35);
    border-radius: 8px;
    background: #132235;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
}

.social-profile-menu.open .social-profile-menu-dropdown {
    display: block;
}

.social-profile-menu-dropdown button {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: #dbe8f5;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 0.9rem;
    text-align: left;
}

.social-profile-menu-dropdown button:hover,
.social-profile-menu-dropdown button:focus-visible {
    background: #1d3f61;
    color: #ffffff;
}

.social-profile-menu-dropdown button.danger {
    color: #ffd7dc;
}

.social-profile-menu-dropdown button.danger:hover,
.social-profile-menu-dropdown button.danger:focus-visible {
    background: #6d1f2b;
}

.social-profile-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.social-profile-icon:hover,
.social-profile-icon:focus-visible {
    background: #31455d;
    color: #ffffff;
}

.social-profile-settings {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #2d3a4a;
    border-radius: 8px;
    background: #192433;
}

.social-profile-top-friends-editor,
.social-profile-top-cards-editor,
.social-profile-top-lists-editor {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.65rem;
    border: 1px solid #2d3a4a;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    padding: 0.8rem;
}

.social-profile-top-friends-editor-heading,
.social-profile-top-friends-add,
.social-profile-top-friend-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.social-profile-top-friends-editor-heading {
    justify-content: space-between;
}

.social-profile-top-friends-editor-heading h3,
.social-profile-top-friends-editor-heading span,
.social-profile-top-friends-empty {
    margin: 0;
}

.social-profile-top-friends-editor-heading h3 {
    font-size: 1rem;
}

.social-profile-top-friends-editor-heading span,
.social-profile-top-friends-empty {
    color: #8fa0b8;
    font-size: 0.82rem;
    font-weight: 800;
}

.social-profile-top-friends-list {
    display: grid;
    gap: 0.45rem;
}

.social-profile-top-friend-row {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 7px;
    background: rgba(17, 24, 39, 0.58);
    padding: 0.5rem;
}

.social-profile-top-friend-row span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.social-profile-list-picker {
    min-width: 0;
    flex: 1;
    border: 1px solid #405166;
    border-radius: 8px;
    background: #101720;
    color: #fff;
    font: inherit;
    padding: 0.65rem 0.75rem;
}

.social-profile-search-picker {
    display: grid;
    gap: 0.55rem;
}

.social-profile-search-picker input[type="search"] {
    width: 100%;
    border: 1px solid #405166;
    border-radius: 8px;
    background: #101720;
    color: #fff;
    font: inherit;
    padding: 0.75rem 0.85rem;
    outline: none;
}

.social-profile-search-picker input[type="search"]:focus {
    border-color: #67c5f5;
    box-shadow: 0 0 0 2px rgba(103, 197, 245, 0.18);
}

.social-profile-search-results {
    display: grid;
    gap: 0.45rem;
    max-height: 260px;
    overflow: auto;
}

.social-profile-search-result {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.7);
    color: #dbe8f5;
    font: inherit;
    padding: 0.55rem;
    text-align: left;
    cursor: pointer;
}

.social-profile-search-result:hover,
.social-profile-search-result:focus-visible {
    border-color: #67c5f5;
    background: #172334;
}

.social-profile-search-result > span:not(.social-profile-search-avatar) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.social-profile-search-result > strong,
.social-profile-search-result > b {
    color: #67c5f5;
    font-size: 0.82rem;
}

.social-profile-search-copy {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    gap: 0.45rem;
}

.social-profile-search-copy strong,
.social-profile-search-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-profile-search-copy small {
    color: #8fa0b8;
    font-size: 0.78rem;
    font-weight: 800;
}

.social-profile-search-avatar,
.social-profile-card-search-result img {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #304256;
    color: #fff;
    font-weight: 900;
    overflow: hidden;
}

.social-profile-search-avatar {
    box-shadow: 0 0 0 2px var(--avatar-border-color, #67c5f5);
}

.social-profile-search-avatar img,
.social-profile-card-search-result img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.social-profile-card-search-result img {
    height: 52px;
    aspect-ratio: 63 / 88;
    border-radius: 5px;
}

.social-profile-search-hint {
    margin: 0;
    color: #8fa0b8;
    font-size: 0.85rem;
    font-weight: 800;
}

.social-profile-location {
    margin: 0;
    color: #cfe2f3;
    font-size: 0.9rem;
    font-weight: 900;
}

.social-profile-settings h2 {
    margin-bottom: 1rem;
}

.social-profile-settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.social-profile-field {
    display: grid;
    gap: 0.45rem;
}

.social-profile-field.wide,
.social-profile-section-toggles,
.social-profile-visibility,
.social-profile-settings-actions,
.social-profile-settings-status {
    grid-column: 1 / -1;
}

.social-profile-field span,
.social-profile-visibility legend {
    color: #dbe8f5;
    font-weight: 900;
}

.social-profile-field small {
    color: #94a3b8;
}

.social-profile-section-toggles {
    display: grid;
    gap: 0.65rem;
    border: 1px solid #2d3a4a;
    border-radius: 8px;
    background: #111827;
    padding: 0.8rem;
}

.social-profile-section-toggles h3 {
    margin: 0;
    color: #dbe8f5;
    font-size: 1rem;
}

.social-profile-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #dbe8f5;
    font-weight: 900;
    cursor: pointer;
}

.social-profile-toggle input {
    position: absolute;
    inset: 0 auto auto 0;
    width: 48px;
    height: 26px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.social-profile-toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    flex: 0 0 auto;
    border: 1px solid #405166;
    border-radius: 999px;
    background: #1e2a3a;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.social-profile-toggle-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #cfe2f3;
    transition: transform 0.16s ease, background 0.16s ease;
}

.social-profile-toggle input:checked + .social-profile-toggle-slider {
    border-color: #67c5f5;
    background: #2b8ab3;
}

.social-profile-toggle input:checked + .social-profile-toggle-slider::after {
    transform: translateX(22px);
    background: #ffffff;
}

.social-profile-field input,
.social-profile-field select,
.social-profile-field textarea {
    width: 100%;
    border: 1px solid #405166;
    border-radius: 8px;
    background: #101720;
    color: #fff;
    font: inherit;
    padding: 0.85rem;
    outline: none;
}

.social-profile-field select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.social-profile-color-row {
    display: grid;
    grid-template-columns: 54px minmax(7.5rem, 9rem) auto;
    gap: 0.6rem;
    align-items: center;
}

.social-profile-color-row input[type="color"] {
    width: 54px;
    min-height: 42px;
    padding: 0.18rem;
    cursor: pointer;
}

.social-profile-color-reset {
    min-height: 42px;
    border: 1px solid #405166;
    border-radius: 8px;
    background: #26364a;
    color: #dbe8f5;
    font: inherit;
    font-weight: 900;
    padding: 0 0.85rem;
    cursor: pointer;
}

.social-profile-color-reset:hover,
.social-profile-color-reset:focus-visible {
    background: #31455d;
    color: #fff;
}

.social-profile-field textarea {
    min-height: 110px;
    resize: vertical;
}

.social-profile-visibility {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    border: 0;
    padding: 0;
}

.social-profile-visibility legend {
    grid-column: 1 / -1;
    margin-bottom: 0.25rem;
}

.social-profile-visibility-choice {
    display: grid;
    gap: 0.45rem;
    border: 1px solid #405166;
    border-radius: 10px;
    background: #111827;
    padding: 1rem;
    cursor: pointer;
}

.social-profile-visibility-choice:has(input:checked) {
    border-color: #ffd447;
}

.social-profile-visibility-choice span {
    color: #94a3b8;
}

.social-profile-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
}

.social-profile-settings-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: #2b8ab3;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 1rem;
}

.social-profile-settings-actions button.secondary {
    background: #1e2a3a;
}

.social-composer,
.social-post,
.social-empty {
    background: #192433;
    border: 1px solid #2d3a4a;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.social-composer {
    padding: 1rem;
    margin-bottom: 1rem;
}

.social-composer textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    background: #101720;
    color: #fff;
    border: 1px solid #405166;
    border-radius: 6px;
    padding: 0.85rem;
    font: inherit;
    outline: none;
}

.social-composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.7rem;
}

.social-composer select,
.social-composer button,
.social-comment-form button {
    height: 40px;
    border-radius: 6px;
    border: 1px solid #718096;
    font-weight: 800;
}

.social-composer select {
    background: #eef4f8;
    color: #111827;
    padding: 0 0.6rem;
}

.social-composer button,
.social-comment-form button {
    background: #2b8ab3;
    color: white;
    cursor: pointer;
    padding: 0 1rem;
}

.social-status {
    min-height: 1.25rem;
    color: #9fb4c9;
    margin-top: 0.5rem;
}

.social-feed {
    display: grid;
    gap: 0.9rem;
}

.social-post {
    padding: 1rem;
}

.social-post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.social-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 2px solid var(--avatar-border-color, #3b82f6);
    background: #304256;
    color: white;
    font-weight: 900;
    overflow: hidden;
}

.social-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-post-meta {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 0.1rem;
}

.social-post-meta strong {
    color: #76c8f5;
}

.social-author-link {
    width: fit-content;
    border: 0;
    background: transparent;
    color: #76c8f5;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0;
    text-align: left;
}

.social-author-link:hover,
.social-author-link:focus-visible {
    color: #b9e9ff;
    text-decoration: underline;
    outline: none;
}

.social-post-meta span {
    color: #94a3b8;
    font-size: 0.88rem;
}

.social-user-wall-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #2d3a4a;
    border-radius: 8px;
    background: #192433;
}

.social-user-wall-banner strong {
    color: #dbe8f5;
}

.social-user-wall-banner span {
    color: #94a3b8;
}

.social-post-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.social-youtube-list {
    display: grid;
    gap: 0.75rem;
    margin: 0.75rem 0 1rem;
}

.social-youtube-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid #33465c;
    border-radius: 8px;
    background: #0b1118;
}

.social-youtube-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.social-post-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.2rem 0 0.9rem;
}

.social-like-btn,
.social-stat-pill {
    min-height: 34px;
    border: 1px solid #33465c;
    border-radius: 999px;
    background: #101720;
    color: #b8c7d8;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 0.35rem 0.75rem;
}

.social-like-btn {
    cursor: pointer;
}

.social-like-btn:hover,
.social-like-btn:focus-visible {
    border-color: #67c5f5;
    color: #fff;
    outline: none;
}

.social-like-btn.active {
    background: rgba(43, 138, 179, 0.24);
    border-color: #67c5f5;
    color: #c7f0ff;
}

.social-like-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

.social-comments {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.social-delete-btn,
.social-report-btn {
    min-height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 800;
    padding: 0 0.7rem;
}

.social-delete-btn {
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
}

.social-delete-btn:hover,
.social-delete-btn:focus-visible {
    background: rgba(185, 28, 28, 0.55);
    border-color: rgba(248, 113, 113, 0.75);
    outline: none;
}

.social-report-btn {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(30, 41, 59, 0.55);
    color: #cbd5e1;
}

.social-report-btn:hover,
.social-report-btn:focus-visible {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(203, 213, 225, 0.75);
    outline: none;
}

.social-delete-btn:disabled,
.social-report-btn:disabled {
    cursor: wait;
    opacity: 0.6;
}

.social-comment {
    background: #101720;
    border: 1px solid #2d3a4a;
    border-radius: 6px;
    padding: 0.55rem 0.7rem;
    display: grid;
    gap: 0.2rem;
}

.social-comment-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.social-comment-author {
    display: inline-flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.5rem;
    border: 0;
    background: transparent;
    color: #c5f59b;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0;
    text-align: left;
}

.social-comment-author .social-avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-width: 2px;
}

.social-comment-author span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-comment-author:hover span,
.social-comment-author:focus-visible span {
    color: #e0ffbd;
    text-decoration: underline;
}

.social-comment-author:focus-visible {
    outline: 2px solid rgba(103, 197, 245, 0.7);
    outline-offset: 3px;
}

.social-comment-actions {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.social-comment-action-btn {
    min-height: 32px;
    border: 1px solid rgba(103, 197, 245, 0.38);
    border-radius: 6px;
    background: rgba(43, 138, 179, 0.16);
    color: #c7f0ff;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    padding: 0 0.7rem;
}

.social-comment-action-btn:hover,
.social-comment-action-btn:focus-visible {
    background: rgba(43, 138, 179, 0.28);
    border-color: #67c5f5;
    color: #fff;
    outline: none;
}

.social-comment strong {
    color: #c5f59b;
    font-size: 0.9rem;
}

.social-comment-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.social-comment-replies {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(103, 197, 245, 0.25);
}

.social-comment-replies:empty {
    display: none;
}

.social-comment-reply {
    background: rgba(16, 23, 32, 0.72);
    border-color: rgba(103, 197, 245, 0.2);
}

.social-comment-form {
    display: flex;
    gap: 0.5rem;
}

.social-reply-form {
    margin-top: 0.45rem;
    padding-left: 1rem;
}

.social-comment-form input {
    flex: 1;
    min-width: 0;
    background: #101720;
    border: 1px solid #405166;
    color: #fff;
    border-radius: 6px;
    padding: 0 0.75rem;
    outline: none;
}

.social-empty {
    padding: 1rem;
    color: #94a3b8;
}

.social-load-more {
    width: 100%;
    margin-top: 1rem;
    min-height: 44px;
    background: #33465c;
    color: #fff;
    border: 1px solid #718096;
    border-radius: 6px;
    font-weight: 900;
    cursor: pointer;
}

.notifications-panel {
    width: min(620px, calc(100vw - 2rem));
    max-height: min(760px, calc(100vh - 2rem));
    flex-direction: column;
    overflow: auto;
    padding: 1.25rem;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.notifications-header h2 {
    margin: 0;
    min-width: 0;
    font-size: clamp(1.55rem, 4vw, 2rem);
    line-height: 1.1;
}

.notifications-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.55rem;
}

.notifications-close-btn {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
}

.notifications-close-btn:hover,
.notifications-close-btn:focus-visible {
    background: #ff6b6b;
    outline: none;
}

.notifications-list {
    display: grid;
    gap: 0.65rem;
}

.notification-row {
    display: grid;
    gap: 0.25rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    padding: 0.85rem;
}

.notification-row.unread {
    border-color: rgba(103, 197, 245, 0.65);
    background: rgba(43, 138, 179, 0.18);
}

.notification-row strong {
    color: #f8fafc;
}

.notification-row span,
.notification-row p {
    margin: 0;
    color: #a8bdd2;
}

@media (max-width: 1300px) and (min-width: 701px) {
    .social-main {
        width: min(900px, calc(100% - 2rem));
    }

    .social-profile-info {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 4.6rem 1rem 1rem;
        text-align: center;
    }

    .social-profile-identity {
        order: 1;
        padding-top: 0;
    }

    .social-profile-identity h2 {
        font-size: clamp(1.35rem, 3.8vw, 1.85rem);
    }

    .social-profile-left {
        justify-content: center;
        flex-wrap: wrap;
        order: 2;
        padding-top: 0;
    }

    .social-profile-details {
        order: 3;
        padding-top: 0;
    }

    .social-profile-about {
        margin: 0 auto;
        padding-left: 0;
        border-left: 0;
        text-align: center;
    }

    .social-profile-bio {
        text-align: center;
    }

    .social-profile-actions {
        justify-content: center;
    }

    .social-profile-bio {
        max-width: 28rem;
        margin: 0 auto;
    }

    .social-top-friends-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .social-top-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .social-top-lists-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .cards-grid.social-mode {
        padding: 0.45rem;
    }

    .social-main {
        width: 100%;
        padding: 0.5rem 0 2rem;
    }

    .social-post,
    .social-composer,
    .social-empty {
        border-radius: 7px;
    }

    .social-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .social-top-friends-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .social-top-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .social-top-lists-grid {
        grid-template-columns: 1fr;
    }

    .social-top-friend-avatar {
        width: 52px;
    }

    .social-profile-banner {
        height: 150px;
    }

    .social-profile-avatar {
        top: 96px;
        width: 88px;
        height: 88px;
        border-width: 5px;
        font-size: 2rem;
    }

    .social-profile-info {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        padding: 2.4rem 1rem 0.85rem;
        text-align: center;
    }

    .social-profile-stats {
        justify-content: center;
    }

    .social-profile-left {
        justify-content: center;
        flex-wrap: wrap;
        order: 2;
        padding-top: 0;
    }

    .social-profile-identity {
        order: 1;
        padding-top: 0;
    }

    .social-profile-details {
        order: 3;
        padding-top: 0;
    }

    .social-profile-about {
        margin: 0 auto;
        padding-left: 0;
        border-left: 0;
        text-align: center;
    }

    .social-profile-bio {
        text-align: center;
    }

    .social-profile-actions {
        justify-content: center;
        order: 4;
    }

    .social-profile-settings-form,
    .social-profile-visibility {
        grid-template-columns: 1fr;
    }

    .social-profile-top-friends-add,
    .social-profile-top-friend-row {
        align-items: stretch;
        flex-direction: column;
    }

    .notifications-header {
        align-items: stretch;
        flex-direction: column;
    }

    .notifications-header-actions {
        justify-content: space-between;
    }

    .social-comment-form,
    .social-composer-actions {
        flex-direction: column;
    }

    .social-comment-form input {
        min-height: 40px;
    }

    .social-group-create {
        grid-template-columns: 1fr;
    }

    .social-group-hero {
        grid-template-columns: 1fr;
        min-height: 210px;
        align-items: end;
    }

    .social-group-topbar {
        gap: 0.55rem;
    }

    .social-group-topbar .social-group-back {
        min-width: 5.8rem;
        padding: 0 0.45rem;
        font-size: clamp(0.76rem, 3.5vw, 0.95rem);
    }

    .social-group-topbar-title {
        display: none;
    }

    .social-group-topbar-meta {
        display: grid;
        justify-content: end;
        gap: 0.15rem;
        font-size: clamp(0.78rem, 3.5vw, 1rem);
        text-align: right;
        white-space: normal;
    }

    .social-group-hero-meta h2 {
        display: block;
    }

    .social-group-navrow {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        padding: 0.5rem;
        min-width: 0;
        overflow: hidden;
        border-bottom: 1px solid rgba(103, 193, 245, 0.18);
        background: rgba(8, 31, 46, 0.72);
    }

    .social-group-actionbar {
        justify-content: stretch;
        gap: 0.3rem;
        padding: 0.4rem;
        overflow: hidden;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .social-group-navrow .social-group-actionbar {
        flex: none;
        order: 1;
        border: 1px solid rgba(103, 193, 245, 0.2);
        border-radius: 8px;
        background: rgba(6, 28, 43, 0.68);
    }

    .social-group-actionbar button {
        flex: 1 1 0;
        min-height: 34px;
        min-width: 0;
        padding: 0 0.12rem;
        font-size: clamp(0.58rem, 2.75vw, 0.82rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .social-group-actionbar [data-group-membership] {
        flex: 0.72 1 0;
    }

    .social-group-navrow .social-group-tabs {
        flex: none;
        order: 2;
        min-width: 0;
        width: 100%;
    }

    .social-group-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.16rem;
        padding: 0.22rem;
        overflow: hidden;
        border: 1px solid rgba(103, 193, 245, 0.2);
        border-radius: 8px;
        background: rgba(6, 28, 43, 0.68);
        box-sizing: border-box;
    }

    .social-group-tabs button {
        flex: none;
        min-width: 0;
        min-height: 40px;
        padding: 0 0.08rem;
        font-size: clamp(0.58rem, 2.75vw, 0.78rem);
        line-height: 1.1;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .social-group-content {
        grid-template-columns: 1fr;
        padding: 0.65rem;
        min-width: 0;
    }

    .social-group-user-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .social-group-user-row button {
        grid-column: 2;
        justify-self: start;
    }
}

.social-tool-panel {
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background:
        radial-gradient(circle at top left, rgba(103, 193, 245, 0.12), transparent 35%),
        linear-gradient(145deg, rgba(16, 55, 78, 0.94), rgba(9, 31, 46, 0.98));
    overflow: hidden;
}

.social-tool-main .social-tool-panel {
    min-height: calc(100vh - 7.5rem);
}

.social-tool-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(103, 193, 245, 0.16);
    background: rgba(8, 31, 46, 0.4);
}

.social-tool-header:empty {
    display: none;
}

.social-group-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.social-group-topbar-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-group-topbar-meta {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.5rem 1rem;
    color: #b2d6e8;
    font-weight: 900;
    white-space: nowrap;
}

.social-group-topbar .social-group-back {
    flex: 0 0 auto;
    min-width: 6.8rem;
    white-space: nowrap;
}

.social-tool-header h2,
.social-tool-header p {
    margin: 0;
}

.social-tool-header p,
.social-group-card p,
.social-tool-post p,
.social-tool-empty {
    color: #b2d6e8;
}

.social-tool-body {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.social-group-create,
.social-public-chat-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.4fr) minmax(160px, 1.2fr) minmax(130px, auto) auto;
    gap: 0.65rem;
}

.social-group-create input,
.social-group-create select,
.social-group-settings input,
.social-group-settings textarea,
.social-group-settings select,
.social-group-invite-panel input,
.social-group-share-panel textarea,
.social-group-share-panel select,
.social-group-post-form textarea,
.social-group-post-form input,
.social-public-chat-form input {
    min-height: 42px;
    border: 1px solid rgba(103, 193, 245, 0.26);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.88);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    padding: 0.7rem 0.8rem;
}

.social-group-post-form textarea {
    min-height: 94px;
    resize: vertical;
}

.social-group-create button,
.social-group-actions button,
.social-group-post-form button,
.social-public-chat-form button {
    min-height: 42px;
    border: 1px solid rgba(103, 193, 245, 0.3);
    border-radius: 8px;
    background: #277fa3;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    padding: 0 1rem;
    cursor: pointer;
}

.social-group-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    align-items: start;
    gap: 0.85rem;
}

.social-group-list-actions,
.social-group-create-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.52);
    padding: 0.9rem;
}

.social-group-list-actions h3,
.social-group-list-actions p,
.social-group-create-intro h3,
.social-group-create-intro p {
    margin: 0;
}

.social-group-list-actions p,
.social-group-create-intro p {
    color: #b2d6e8;
}

.social-group-list-actions button,
.social-group-create-actions button {
    min-height: 42px;
    border: 1px solid rgba(103, 193, 245, 0.3);
    border-radius: 8px;
    background: #277fa3;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    padding: 0 1rem;
    cursor: pointer;
}

.social-group-create-page {
    display: grid;
    gap: 1rem;
    max-width: 860px;
}

.social-group-create-page .social-group-create {
    grid-template-columns: 1fr;
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.64);
    padding: 1rem;
}

.social-group-create-page label {
    display: grid;
    gap: 0.35rem;
    color: #b2d6e8;
    font-weight: 900;
}

.social-group-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-group-create-actions .secondary {
    background: rgba(8, 31, 46, 0.88);
}

.social-group-card,
.social-group-detail,
.social-tool-post,
.social-public-chat-panel,
.social-public-chat-channels {
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.64);
    padding: 0.9rem;
}

.social-group-card-cover {
    min-height: 90px;
    margin: -0.9rem -0.9rem 0.8rem;
    border-radius: 8px 8px 0 0;
    background:
        radial-gradient(circle at 25% 20%, rgba(103, 193, 245, 0.22), transparent 32%),
        linear-gradient(135deg, rgba(40, 116, 158, 0.7), rgba(13, 49, 71, 0.94));
    background-position: center;
    background-size: cover;
}

.social-group-card.joined {
    border-color: rgba(255, 214, 90, 0.45);
}

.social-group-card h3,
.social-group-detail h3,
.social-public-chat-panel h3 {
    margin: 0 0 0.45rem;
    color: #ffffff;
}

.social-group-card h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.social-group-description-wrap {
    display: grid;
    gap: 0.2rem;
    margin: 0 0 0.65rem;
}

.social-group-card-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.social-group-see-more {
    justify-self: start;
    border: 0;
    background: transparent;
    color: #67c1f5;
    font: inherit;
    font-weight: 900;
    padding: 0;
    cursor: pointer;
}

.social-group-description-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(2, 13, 22, 0.78);
}

.social-group-description-dialog {
    width: min(640px, 100%);
    max-height: min(78vh, 680px);
    overflow: auto;
    border: 1px solid rgba(103, 193, 245, 0.32);
    border-radius: 8px;
    background: #081f2e;
    color: #d7efff;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.44);
}

.social-group-description-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(103, 193, 245, 0.2);
}

.social-group-description-dialog-head h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.15rem;
}

.social-group-description-dialog-head button {
    min-width: 38px;
    min-height: 38px;
    border: 1px solid rgba(103, 193, 245, 0.32);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.88);
    color: #ffffff;
    font: inherit;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
}

.social-group-description-dialog p {
    margin: 0;
    padding: 1rem;
    white-space: pre-wrap;
}

.social-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-group-actions .secondary {
    background: rgba(8, 31, 46, 0.88);
}

.social-group-post-form {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.social-group-feed {
    display: grid;
    gap: 0.75rem;
}

.social-group-page-body {
    padding: 0;
}

.social-group-page {
    display: grid;
    gap: 0;
}

.social-group-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    min-height: 300px;
    padding: 1.2rem;
    border-radius: 8px 8px 0 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(103, 193, 245, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(41, 101, 170, 0.75), rgba(16, 86, 79, 0.58), rgba(35, 28, 76, 0.7));
    background-position: center;
    background-size: cover;
}

.social-group-back,
.social-group-actionbar button,
.social-group-tabs button,
.social-group-card-panel button,
.social-group-settings-actions button {
    min-height: 38px;
    border: 1px solid rgba(103, 193, 245, 0.3);
    border-radius: 8px;
    background: #277fa3;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    padding: 0 0.9rem;
    cursor: pointer;
}

.social-group-back,
.social-group-actionbar .secondary,
.social-group-card-panel .secondary,
.social-group-settings-actions .secondary {
    background: rgba(8, 31, 46, 0.88);
}

.social-group-hero-meta h2 {
    margin: 0.35rem 0 0.15rem;
    color: #ffffff;
    font-size: clamp(1.6rem, 3vw, 2.7rem);
    display: none;
}

.social-group-hero-meta p {
    margin: 0.18rem 0;
    color: #d7efff;
    font-weight: 800;
}

.social-group-owner {
    color: #9cc6dc !important;
}

.social-group-actionbar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(103, 193, 245, 0.18);
    background: rgba(8, 31, 46, 0.72);
    overflow-x: auto;
}

.social-group-actionbar button {
    flex: 0 1 10rem;
    min-width: 0;
    white-space: nowrap;
}

.social-group-actionbar [data-group-membership] {
    flex-basis: 7.5rem;
}

.social-group-navrow {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(103, 193, 245, 0.18);
    background: rgba(8, 31, 46, 0.72);
}

.social-group-navrow .social-group-tabs {
    flex: 1 1 auto;
}

.social-group-navrow .social-group-actionbar {
    flex: 0 1 48%;
    border-bottom: 0;
    background: transparent;
}

.social-group-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid rgba(103, 193, 245, 0.18);
    background: rgba(8, 31, 46, 0.72);
}

.social-group-tabs button {
    border-width: 0 0 3px;
    border-color: transparent;
    border-radius: 0;
    background: transparent;
    color: #b2d6e8;
    min-width: 120px;
}

.social-group-tabs button.active {
    border-bottom-color: #67c1f5;
    color: #ffffff;
}

.social-group-actionbar button.active {
    border-color: rgba(255, 212, 71, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255, 212, 71, 0.18);
}

.social-group-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 1rem;
    padding: 1rem;
}

.social-group-content.no-sidebar {
    grid-template-columns: minmax(0, 1fr);
}

.social-group-content-main,
.social-group-sidebar,
.social-group-member-list,
.social-group-invite-results {
    display: grid;
    align-content: start;
    gap: 0.85rem;
}

.social-group-card-panel {
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.68);
    padding: 1rem;
}

.social-group-card-panel h3,
.social-group-card-panel p {
    margin-top: 0;
}

.social-group-wide-panel {
    min-height: 220px;
}

.social-group-about-line {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(103, 193, 245, 0.12);
    color: #b2d6e8;
}

.social-group-about-line strong {
    color: #ffffff;
}

.social-group-composer {
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(16, 55, 78, 0.72);
    padding: 0.9rem;
}

.social-tool-post-image {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(103, 193, 245, 0.16);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.social-tool-post-image img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

.social-group-media-grid,
.social-group-recent-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.55rem;
}

.social-group-recent-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.social-group-media-grid a,
.social-group-recent-media a {
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    aspect-ratio: 1;
}

.social-group-media-grid img,
.social-group-recent-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-group-settings {
    display: grid;
    gap: 0.8rem;
}

.social-group-settings label {
    display: grid;
    gap: 0.35rem;
    color: #b2d6e8;
    font-weight: 900;
}

.social-group-settings textarea {
    min-height: 110px;
    resize: vertical;
}

.social-group-share-panel {
    display: grid;
    gap: 0.65rem;
}

.social-group-share-panel textarea {
    min-height: 120px;
    resize: vertical;
}

.social-group-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.social-group-share-actions .secondary {
    background: rgba(8, 31, 46, 0.88);
}

.social-group-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.social-group-danger-zone {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.9rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 105, 105, 0.38);
    border-radius: 8px;
    background: rgba(83, 15, 20, 0.34);
}

.social-group-danger-zone h4,
.social-group-danger-zone p {
    margin: 0;
}

.social-group-danger-zone h4 {
    color: #ffd7d7;
    font-size: 1.05rem;
}

.social-group-danger-zone p,
.social-group-delete-body p {
    color: #f0b8b8;
}

.social-group-settings-actions .danger,
.social-group-danger-zone .danger,
.social-group-delete-dialog .danger {
    border-color: rgba(255, 116, 116, 0.62);
    background: #7f1d1d;
    color: #ffe6e6;
}

.social-group-delete-body {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.social-group-delete-body p {
    margin: 0;
}

.social-group-delete-body label {
    display: grid;
    gap: 0.4rem;
    color: #d7efff;
    font-weight: 900;
}

.social-group-delete-body input {
    min-height: 42px;
    border: 1px solid rgba(255, 116, 116, 0.38);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.88);
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    padding: 0.7rem 0.8rem;
}

.social-group-delete-dialog button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.social-group-user-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.65rem;
    align-items: center;
    border-top: 1px solid rgba(103, 193, 245, 0.12);
    padding: 0.6rem 0;
}

.social-group-user-row strong,
.social-group-user-row small {
    display: block;
}

.social-group-user-row small {
    color: #9cc6dc;
}

.social-group-locked {
    display: grid;
    justify-items: start;
    gap: 0.5rem;
}

.social-public-chat {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1rem;
    min-height: calc(100vh - 15rem);
}

.social-public-chat-channels {
    display: grid;
    align-content: start;
    gap: 0.5rem;
}

.social-public-chat-channels button {
    min-height: 44px;
    border: 1px solid rgba(103, 193, 245, 0.22);
    border-radius: 8px;
    background: rgba(16, 55, 78, 0.86);
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    text-align: left;
    padding: 0 0.8rem;
    cursor: pointer;
}

.social-public-chat-channels button.active {
    border-color: rgba(255, 214, 90, 0.65);
    background: #277fa3;
}

.social-public-chat-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    min-height: 0;
}

.social-public-chat-messages {
    display: grid;
    align-content: start;
    gap: 0.65rem;
    overflow-y: auto;
    min-height: 0;
}

.social-public-chat-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.social-tool-post-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: #9cc6dc;
    font-size: 0.86rem;
}

.social-tool-post-header strong {
    color: #67c1f5;
}

.social-group-feed-post {
    display: grid;
    gap: 0.45rem;
}

.social-tool-report-btn {
    justify-self: start;
    min-height: 30px;
    border: 1px solid rgba(103, 193, 245, 0.22);
    border-radius: 999px;
    background: rgba(8, 31, 46, 0.86);
    color: #9cc6dc;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    padding: 0 0.75rem;
}

.social-tool-report-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.social-group-feed-label {
    color: #ffd65a;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.social-public-chat-page {
    width: 100%;
    height: 100vh;
    min-height: 0;
}

.social-public-chat-page .friends-chat-sidebar,
.social-public-chat-page .friends-chat-main {
    height: 100%;
}

.social-public-chat-sidebar .friends-panel-band {
    margin-top: 0;
}

.social-public-room-row {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.social-public-room-row .web-friend-avatar {
    border-color: #67c5f5;
}

.social-public-room-row.active .web-friend-avatar {
    border-color: #ffd65a;
}

.social-public-chat-main .web-chat-messages {
    min-height: 0;
}

.social-public-chat-main .web-empty-row {
    padding: 0;
}

@media (max-width: 768px) {
    .social-group-create,
    .social-public-chat,
    .social-public-chat-form {
        grid-template-columns: 1fr;
    }

    .social-group-list-actions,
    .social-group-create-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .social-group-list-actions button,
    .social-group-create-intro .social-group-back {
        width: 100%;
    }

    .social-group-hero {
        grid-template-columns: 1fr;
        min-height: 210px;
        align-items: end;
    }

    .social-group-topbar {
        gap: 0.55rem;
    }

    .social-group-topbar .social-group-back {
        min-width: 5.8rem;
        padding: 0 0.45rem;
        font-size: clamp(0.76rem, 3.5vw, 0.95rem);
    }

    .social-group-topbar-title {
        display: none;
    }

    .social-group-topbar-meta {
        display: grid;
        justify-content: end;
        gap: 0.15rem;
        font-size: clamp(0.78rem, 3.5vw, 1rem);
        text-align: right;
        white-space: normal;
    }

    .social-group-hero-meta h2 {
        display: block;
    }

    .social-group-navrow {
        gap: 0.45rem;
        padding: 0.5rem;
        min-width: 0;
        overflow: hidden;
    }

    .social-group-navrow .social-group-actionbar {
        border: 1px solid rgba(103, 193, 245, 0.2);
        border-radius: 8px;
        background: rgba(6, 28, 43, 0.68);
    }

    .social-group-actionbar {
        justify-content: stretch;
        gap: 0.3rem;
        padding: 0.4rem;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .social-group-actionbar button {
        flex: 1 1 0;
        min-height: 34px;
        min-width: 0;
        padding: 0 0.12rem;
        font-size: clamp(0.58rem, 2.75vw, 0.82rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .social-group-actionbar [data-group-membership] {
        flex: 0.72 1 0;
    }

    .social-group-navrow .social-group-tabs {
        width: 100%;
    }

    .social-group-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.16rem;
        padding: 0.22rem;
        overflow: hidden;
        border: 1px solid rgba(103, 193, 245, 0.2);
        border-radius: 8px;
        background: rgba(6, 28, 43, 0.68);
        box-sizing: border-box;
    }

    .social-group-tabs button {
        flex: none;
        min-width: 0;
        min-height: 40px;
        padding: 0 0.08rem;
        font-size: clamp(0.58rem, 2.75vw, 0.78rem);
        line-height: 1.1;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .social-group-content {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    .social-group-user-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .social-group-user-row button {
        grid-column: 2;
        justify-self: start;
    }

    .social-public-chat-page {
        height: 100vh;
        min-height: 0;
    }
}
