:root {
    --social-bg: #f5f7fb;
    --social-panel: #ffffff;
    --social-border: #d8dee9;
    --social-text: #1d2430;
    --social-muted: #697386;
    --social-accent: #2864d9;
}

body.social-metro {
    background: var(--social-bg);
    color: var(--social-text);
}

.social-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
}

.social-badge {
    display: inline-grid;
    min-width: 1.35rem;
    min-height: 1.35rem;
    margin-left: 6px;
    place-items: center;
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1;
    background: #d93838;
    border-radius: 999px;
}

.social-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
}

.social-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.social-sidebar,
.social-card,
.social-composer {
    background: var(--social-panel);
    border: 1px solid var(--social-border);
    border-radius: 8px;
}

.social-sidebar {
    padding: 16px;
    position: sticky;
    top: 72px;
}

.profile-strip,
.social-card__header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.profile-strip {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--social-border);
}

.profile-strip span,
.social-card time,
.event-meta {
    display: block;
    color: var(--social-muted);
    font-size: 0.875rem;
}

.social-avatar {
    border-radius: 50%;
}

.social-feed {
    display: grid;
    gap: 16px;
}

.social-feed--single {
    max-width: 820px;
    margin-inline: auto;
}

.social-card,
.social-composer {
    padding: 16px;
}

.social-card h1,
.social-card h2 {
    margin-top: 0;
}

.social-content {
    line-height: 1.6;
}

.social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--social-border);
}

.social-actions--plain {
    padding-top: 0;
    border-top: 0;
}

.social-comments {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.social-comment {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.social-comment__body {
    padding: 8px 10px;
    background: #f1f5f9;
    border-radius: 8px;
}

.social-comment__body p {
    margin: 0;
}

.social-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.social-thread {
    display: grid;
    gap: 14px;
}

.social-thread__messages {
    display: grid;
    gap: 10px;
}

.social-thread__message {
    max-width: 78%;
    padding: 10px 12px;
    background: #f1f5f9;
    border-radius: 8px;
}

.social-thread__message.is-own {
    justify-self: end;
    background: #dbeafe;
}

.social-composer {
    display: grid;
    gap: 12px;
}

.social-form {
    display: grid;
    gap: 14px;
}

.social-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 16px;
}

.social-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.social-composer__bar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.social-composer__bar select {
    max-width: 180px;
}

.social-form-status {
    min-height: 1.4em;
    margin: 0;
    color: var(--social-muted);
}

.social-global-status {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    max-width: min(360px, calc(100% - 40px));
    padding: 12px 14px;
    color: #ffffff;
    background: var(--social-accent);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(29, 36, 48, 0.2);
}

.social-global-status[data-type="error"] {
    background: #b42318;
}

.social-global-status[data-type="success"] {
    background: #15803d;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.social-media-grid {
    display: grid;
    gap: 6px;
    margin: 12px 0;
    overflow: hidden;
    border-radius: 8px;
}

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

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

.social-media-grid__item {
    display: block;
    aspect-ratio: 4 / 3;
    background: #eef2f7;
}

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

.social-muted {
    color: var(--social-muted);
}

.social-list {
    display: grid;
    gap: 10px;
}

.social-list__item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    color: inherit;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid var(--social-border);
    border-radius: 8px;
}

.social-list__item.is-unread {
    border-color: var(--social-accent);
    box-shadow: inset 4px 0 0 var(--social-accent);
}

.social-list__item.is-read {
    opacity: 0.72;
}

.social-list__content {
    display: grid;
    gap: 4px;
}

.social-list__actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.social-cover {
    display: block;
    margin: -16px -16px 16px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.social-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.social-hero {
    display: grid;
    gap: 16px;
    padding: 24px;
    background: var(--social-panel);
    border: 1px solid var(--social-border);
    border-radius: 8px;
    overflow: hidden;
}

.social-profile-cover {
    margin: -24px -24px 0;
    aspect-ratio: 4 / 1;
    background: #e8eef7;
}

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

.social-hero__main {
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.social-meta-item {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--social-border);
    border-radius: 8px;
}

.social-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.social-directory-card {
    display: grid;
    gap: 8px;
    align-content: start;
    min-height: 150px;
    padding: 12px;
    color: inherit;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid var(--social-border);
    border-radius: 8px;
}

.social-directory-card img {
    width: 100%;
    max-height: 130px;
    object-fit: cover;
    border-radius: 8px;
}

.social-directory-card .social-avatar {
    width: 72px;
    height: 72px;
}

.social-pagination {
    margin-top: 16px;
}

.social-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 40px auto 24px;
    color: var(--social-muted);
}

@media (max-width: 820px) {
    .social-shell {
        width: min(100% - 20px, 680px);
        margin-top: 16px;
    }

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

    .social-sidebar {
        position: static;
    }
}
