@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --text: #1e1e1e;
    --muted: #9f9f9f;
    --brand: #b94898;
    --border: #dddddd;
    --border-strong: #a9a9a9;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
    padding: 0.85rem;
}

.sidebar {
    background: #fff;
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    padding: 1rem;
    position: sticky;
    top: 0.85rem;
    max-height: calc(100vh - 1.7rem);
    overflow-y: auto;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text);
}

.brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 999px;
}

.sidebar nav {
    display: grid;
    gap: 0.4rem;
}

.sidebar nav a {
    color: #1e1e1e;
    padding: 0.46rem 0.62rem;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.16s ease;
}

.sidebar nav a:hover {
    background: #f8ebf4;
    border-color: #e7c2dc;
    color: #1e1e1e;
}

.app-main {
    min-width: 0;
    display: block;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #fff;
    margin-bottom: 1rem;
}

.topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.topbar p {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 12px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.topbar-actions a {
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    font-size: 12px;
    font-weight: 500;
    color: #1e1e1e;
    background: #fff;
    transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.topbar-actions a:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: #fff7fc;
}

.app-content {
    padding: 0 0 1rem;
}

.card,
.auth-card,
.meta-box {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.06);
}

.card {
    padding: 1rem 1.05rem;
}

.card h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

.meta-box {
    margin-top: 1rem;
    padding: 0.9rem;
}

.meta-box h3 {
    margin: 0 0 0.55rem;
}

.meta-box ul {
    margin: 0;
    padding-left: 1.2rem;
}

.auth-body {
    min-height: 100vh;
    padding: 0.95rem;
}

.auth-main {
    width: 100%;
    max-width: 560px;
    padding: 1.3rem 1.35rem;
    margin: 0 auto;
}

.auth-shell {
    max-width: 1140px;
    margin: 0 auto;
    min-height: calc(100vh - 1.9rem);
    display: grid;
    grid-template-columns: minmax(340px, 46%) 1fr;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.08);
}

.auth-visual {
    min-height: 100%;
    background: #101016;
}

.auth-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-card {
    padding: 1.2rem 1.1rem;
    border: 0;
    border-radius: 0;
    min-height: 100%;
    display: grid;
    align-content: start;
}

.auth-card h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

.auth-card p {
    margin: 0.42rem 0 0.95rem;
}

.form-grid {
    display: grid;
    gap: 0.6rem;
}

.form-grid input,
.form-grid button {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.68rem 0.78rem;
    font: inherit;
    font-size: 14px;
}

.form-grid button {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    cursor: pointer;
}

.auth-links {
    margin-top: 0.9rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 13px;
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
    }

    .sidebar {
        position: static;
        top: auto;
        max-height: none;
        border-radius: 0;
        border: 0;
        border-bottom: 1px solid var(--border-strong);
    }

    .auth-shell {
        grid-template-columns: 1fr;
        border-radius: 0;
        min-height: 100vh;
    }

    .auth-visual {
        min-height: 210px;
    }

    .topbar {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .app-content {
        padding: 0.85rem;
    }
}

.form-grid select {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.68rem 0.78rem;
    font: inherit;
    font-size: 14px;
    background: #e8e8e8;
}

.alert {
    border-radius: 8px;
    padding: 0.6rem 0.72rem;
    margin: 0 0 0.75rem;
    font-size: 13px;
}

.alert-error {
    background: #ffecec;
    color: #8c1e1e;
    border: 1px solid #ffb8b8;
}

.alert-success {
    background: #ecfff2;
    color: #1b6a37;
    border: 1px solid #b8efcb;
}

.topbar-actions span {
    color: var(--muted);
    font-size: 12px;
}

.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--brand);
    border-radius: 5px;
    background: var(--brand);
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    padding: 0.52rem 0.9rem;
    line-height: 1.2;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.btn-brand:hover {
    background: #a73d88;
    border-color: #a73d88;
    opacity: 1;
}

.btn-sm {
    font-size: 12px;
    padding: 0.42rem 0.72rem;
}

.feed-layout {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.feed-toolbar h2 {
    margin: 0;
}

.feed-toolbar p {
    margin: 0.2rem 0 0;
    color: var(--muted);
}

.feed-card {
    display: grid;
    gap: 0.85rem;
}

.feed-author {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #efefef;
    font-weight: 700;
    color: #444;
}

.feed-author h3 {
    margin: 0;
    font-size: 0.95rem;
}

.feed-author p {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.feed-text {
    margin: 0;
    line-height: 1.45;
    white-space: pre-wrap;
}

.feed-image-wrap {
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    overflow: hidden;
}

.feed-image {
    width: 100%;
    height: auto;
    display: block;
}

.feed-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.action-link {
    font: inherit;
    color: #76768a;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.inline-form {
    margin: 0;
}

.like-btn.is-liked {
    color: var(--brand);
    font-weight: 600;
}

.comment-block {
    border-top: 1px solid var(--border);
    padding-top: 0.9rem;
    display: grid;
    gap: 0.8rem;
}

.comment-form {
    display: grid;
    gap: 0.55rem;
}

.comment-form textarea {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    font: inherit;
    resize: vertical;
    min-height: 72px;
}

.comment-list {
    display: grid;
    gap: 0.5rem;
}

.comment-item {
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
}

.comment-user {
    margin: 0;
    color: var(--brand);
    font-size: 0.83rem;
    font-weight: 600;
}

.comment-text {
    margin: 0.3rem 0 0;
    white-space: pre-wrap;
}

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

.post-create h2 {
    margin-top: 0;
}

.post-create p {
    margin: 0.2rem 0 1rem;
    color: var(--muted);
}

.post-create-form label {
    font-weight: 600;
    color: #3d3d4b;
}

.post-create-form textarea {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    font: inherit;
    resize: vertical;
}

.image-preview {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: #fafafa;
}

.is-hidden {
    display: none;
}

.post-create-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

@media (max-width: 920px) {
    .feed-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

.directory-layout,
.friends-layout,
.friend-profile-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.directory-filters {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.65rem;
}

.directory-filters input,
.directory-filters select {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.62rem 0.75rem;
    font: inherit;
    background: #fff;
}

.directory-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.directory-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
}

.directory-card {
    display: grid;
    gap: 0.75rem;
}

.directory-card-top {
    color: inherit;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.35rem;
}

.directory-card h3,
.friend-row h3 {
    margin: 0;
}

.directory-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.directory-actions {
    border-top: 1px solid var(--border);
    padding-top: 0.55rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.status-pill {
    font-size: 0.82rem;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
}

.status-ok {
    background: #ecfff2;
    color: #1b6a37;
    border: 1px solid #b8efcb;
}

.status-pending {
    background: #f1f2f4;
    color: #797979;
    border: 1px solid #d6d9df;
}

.avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    object-fit: cover;
}

.avatar-lg {
    width: 70px;
    height: 70px;
    font-size: 1.1rem;
}

.avatar-xl {
    width: 110px;
    height: 110px;
    font-size: 1.4rem;
}

.friends-list {
    display: grid;
    gap: 0.8rem;
}

.friend-row {
    padding: 0.8rem 1rem;
}

.friend-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
}

.friend-profile-card {
    overflow: hidden;
}

.profile-banner {
    margin: -1.1rem -1.1rem 0;
    height: 160px;
    background: linear-gradient(135deg, #f0d7e6, #f6f6fb);
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.friend-profile-head {
    margin-top: -55px;
    display: grid;
    gap: 0.85rem;
    justify-items: center;
    text-align: center;
}

.friend-profile-main {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
}

.friend-profile-head h2 {
    margin: 0;
}

.friend-bio {
    margin: 0.45rem 0 0;
    color: #4f4f62;
}

.friend-meta {
    margin-top: 0.9rem;
    text-align: center;
}

.friend-meta p {
    margin: 0.25rem 0;
}

.social-row {
    margin-top: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.social-row-icons {
    gap: 0.9rem;
}

.social-icon-link {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(185, 72, 152, 0.45);
    color: var(--brand);
    background: #fff;
    box-shadow: 0 3px 8px rgba(185, 72, 152, 0.16);
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.social-icon-link:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    transform: translateY(-1px);
}

.social-icon-link:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.social-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
}

.social-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.friend-connect {
    margin-top: 0.9rem;
    display: grid;
    justify-items: center;
    gap: 0.7rem;
}

.friend-message-btn {
    border: 1px solid var(--brand);
    border-radius: 999px;
    padding: 0.42rem 0.82rem;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 600;
    background: #fff;
}

.friend-message-btn:hover {
    background: #fff4fb;
}

.friend-connect-note {
    margin: 0.25rem 0 0;
    width: min(680px, 100%);
    border: 1px solid var(--brand);
    padding: 0.6rem 0.8rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 300;
    color: #1f2937;
}

.friend-post-empty {
    text-align: center;
    margin: 1.1rem 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e1e1e;
}

.btn-accept,
.btn-reject {
    border: 0;
    border-radius: 0.5rem;
    color: #fff;
    font: inherit;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
}

.btn-accept {
    background: #1f9150;
}

.btn-reject {
    background: #c73939;
}

.profile-feed-list {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.8rem;
}

.profile-feed-item {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: grid;
    gap: 0.6rem;
}

@media (max-width: 920px) {
    .directory-filters {
        grid-template-columns: 1fr;
    }

    .directory-filter-actions {
        justify-content: space-between;
    }

    .friend-profile-head {
        margin-top: -45px;
    }

    .avatar-xl {
        width: 92px;
        height: 92px;
    }
}

.notifications-layout,
.events-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.notification-list {
    display: grid;
    gap: 0.8rem;
}

.notification-item {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: grid;
    gap: 0.55rem;
}

.notification-item h4 {
    margin: 0;
    font-size: 0.95rem;
}

.notification-time {
    margin: 0;
    color: #9a9aad;
    font-size: 0.8rem;
}

.notification-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.notification-user p {
    margin: 0;
}

.notification-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

.events-grid {
    display: grid;
    gap: 0.95rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.event-card {
    display: grid;
    gap: 0.75rem;
}

.event-image-wrap {
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    overflow: hidden;
    min-height: 180px;
    background: #f8f8fb;
}

.event-image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.event-image-fallback {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8aa0;
    font-weight: 600;
}

.event-content h3 {
    margin: 0;
}

.event-content p {
    margin: 0.4rem 0 0;
}

.event-details {
    color: #4f4f60;
}

.event-calendar-btn {
    margin-top: 0.8rem;
}

@media (max-width: 920px) {
    .events-grid {
        grid-template-columns: 1fr;
    }

    .notification-actions {
        justify-content: flex-start;
    }
}

.messages-layout,
.chat-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.messages-mode-toggle {
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.mode-btn {
    border: 1px solid var(--brand);
    border-radius: 0.5rem;
    padding: 0.55rem 0.8rem;
    text-align: center;
    color: var(--brand);
    font-weight: 500;
}

.mode-btn.is-active {
    background: var(--brand);
    color: #fff;
}

.forum-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
}

.forum-card {
    display: grid;
    gap: 0.8rem;
}

.forum-card-body {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.35rem;
}

.forum-card-body h3 {
    margin: 0;
}

.forum-card-action {
    border-top: 1px solid var(--border);
    padding-top: 0.65rem;
    display: flex;
    justify-content: center;
}

.conversation-list {
    display: grid;
    gap: 0.55rem;
}

.conversation-row {
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    color: inherit;
}

.conversation-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.conversation-user h3 {
    margin: 0;
    font-size: 0.95rem;
}

.unread-pill {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 0.45rem;
    background: var(--brand);
    color: #fff;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.chat-card {
    display: grid;
    gap: 0.8rem;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.chat-title-wrap {
    display: grid;
    gap: 0.25rem;
}

.chat-title-wrap h2 {
    margin: 0;
}

.chat-thread {
    min-height: 320px;
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    gap: 0.55rem;
    padding-right: 0.25rem;
}

.chat-bubble {
    max-width: min(78%, 620px);
    background: #ebebef;
    border-radius: 0.75rem;
    padding: 0.6rem 0.7rem;
    justify-self: start;
    display: grid;
    gap: 0.25rem;
}

.chat-bubble.mine {
    background: #f7e7f1;
    justify-self: end;
}

.chat-user {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #5b5b71;
}

.chat-text {
    margin: 0;
    white-space: pre-wrap;
}

.chat-time {
    margin: 0;
    font-size: 0.72rem;
    color: #8d8da0;
}

.chat-media {
    max-width: 260px;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.chat-form {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
}

.chat-file-input {
    display: none;
}

.chat-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.62rem 0.9rem;
    background: #fff;
    color: #5b5b71;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.chat-form input[type="text"] {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.62rem 0.75rem;
    font: inherit;
}

@media (max-width: 920px) {
    .messages-mode-toggle {
        grid-template-columns: 1fr;
    }

    .chat-thread {
        max-height: 54vh;
    }

    .chat-form {
        grid-template-columns: auto 1fr auto;
    }
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--brand);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--brand);
    font-weight: 600;
    padding: 0.55rem 0.9rem;
}

.btn-outline:hover {
    background: #f7edf4;
}

.btn-link-danger {
    border: 0;
    background: transparent;
    color: #ba2f2f;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.btn-link-danger:hover {
    text-decoration: underline;
}

.commerce-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.commerce-layout-narrow {
    max-width: 780px;
}

.merch-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.merch-card {
    display: grid;
    gap: 0.75rem;
}

.merch-image-wrap {
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    overflow: hidden;
    min-height: 210px;
    background: #f9f9fc;
}

.merch-image {
    width: 100%;
    min-height: 210px;
    height: 100%;
    object-fit: cover;
    display: block;
}

.merch-image-fallback {
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8c8ca3;
}

.merch-card-body h3 {
    margin: 0;
    font-size: 0.98rem;
}

.merch-card-body p {
    margin: 0.45rem 0 0;
}

.merch-price {
    font-weight: 700;
    color: #25253a;
}

.merch-actions {
    border-top: 1px solid var(--border);
    padding-top: 0.7rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.cart-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.cart-header p {
    margin: 0;
}

.cart-amount {
    font-weight: 700;
}

.cart-list {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.75rem;
}

.cart-row {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.8rem;
    align-items: center;
}

.cart-item-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.cart-image-wrap {
    width: 72px;
    height: 72px;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f8f8fc;
}

.cart-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8d8da4;
    font-size: 0.82rem;
}

.cart-item-main h3,
.cart-item-main p {
    margin: 0.2rem 0 0;
}

.cart-price {
    font-weight: 700;
}

.cart-stock {
    color: #707088;
    font-size: 0.84rem;
}

.cart-stock.low {
    color: #b12f2f;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qty-btn {
    border: 1px solid var(--brand);
    border-radius: 0.45rem;
    background: #fff;
    color: var(--brand);
    font: inherit;
    font-weight: 700;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.qty-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.qty-btn-plus {
    background: var(--brand);
    color: #fff;
}

.qty-value {
    min-width: 26px;
    text-align: center;
    font-weight: 700;
}

.checkout-action {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.order-line,
.order-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.order-line p,
.order-total p {
    margin: 0;
}

.order-total {
    border-top: 1px solid var(--border);
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    font-weight: 700;
}

.payment-form {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.8rem;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.payment-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid var(--brand);
    border-radius: 0.5rem;
    padding: 0.58rem 0.7rem;
    cursor: pointer;
}

.payment-choice input {
    margin: 0;
}

.payment-meta {
    border-top: 1px solid var(--border);
    padding-top: 0.7rem;
    display: grid;
    gap: 0.35rem;
}

.payment-meta p {
    margin: 0;
    font-size: 0.9rem;
}

.btn-pay {
    border: 0;
    border-radius: 0.6rem;
    background: #2f9f3c;
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 0.7rem 0.95rem;
    cursor: pointer;
}

.btn-pay:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.order-help {
    margin-top: 0.9rem;
}

.stripe-card {
    display: grid;
    gap: 0.7rem;
}

.stripe-card h2,
.stripe-card p {
    margin: 0;
}

.stripe-form {
    margin-top: 0.35rem;
    display: grid;
    gap: 0.7rem;
}

#stripe-payment-element {
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.75rem;
    background: #fff;
}

.transaction-card {
    text-align: center;
    padding: 1.8rem 1rem;
}

.transaction-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f7f2c;
}

.transaction-card.is-warning .transaction-title {
    color: #9a6500;
}

.transaction-card.is-error .transaction-title {
    color: #b42525;
}

.transaction-icon {
    margin: 0.95rem auto 0.7rem;
    width: 94px;
    height: 94px;
    border-radius: 999px;
    background: #1f7f2c;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 3rem;
    line-height: 1;
}

.transaction-card.is-warning .transaction-icon {
    background: #9a6500;
}

.transaction-card.is-error .transaction-icon {
    background: #b42525;
}

.transaction-icon img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.transaction-notes {
    margin: 0.95rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
    text-align: left;
}

.transaction-notes li {
    border-radius: 0.55rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.9rem;
    line-height: 1.35;
}

.transaction-notes .note-neutral {
    background: #f5f6f7;
    color: #4b5563;
}

.transaction-notes .note-success {
    background: #e9f8ee;
    color: #1f7f2c;
}

.transaction-notes .note-warning {
    background: #fff7e6;
    color: #9a6500;
}

.transaction-notes .note-error {
    background: #fdecec;
    color: #b42525;
}

.transaction-actions {
    display: flex;
    justify-content: center;
}

@media (max-width: 920px) {
    .merch-grid {
        grid-template-columns: 1fr;
    }

    .cart-row {
        grid-template-columns: 1fr;
    }

    .cart-controls {
        justify-content: flex-start;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }
}

.profile-layout,
.profile-settings-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.profile-card {
    padding: 0;
    overflow: hidden;
}

.profile-head {
    margin-top: -52px;
    padding: 0 1.1rem 1rem;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.7rem;
}

.profile-title h2 {
    margin: 0;
}

.profile-title p {
    margin: 0.35rem 0 0;
}

.profile-bio {
    color: #5d5d73;
}

.profile-friends-link {
    display: inline-block;
    margin-top: 0.45rem;
    font-weight: 600;
}

.profile-tabs {
    border-top: 1px solid var(--border);
    padding: 0.75rem 1.1rem 1rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
}

.profile-tab {
    border: 1px solid var(--brand);
    border-radius: 0.5rem;
    padding: 0.45rem 0.55rem;
    text-align: center;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 600;
}

.profile-tab.is-active {
    background: var(--brand);
    color: #fff;
}

.profile-media-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.profile-media-item {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
    display: block;
    min-height: 155px;
    background: #f8f8fc;
}

.profile-media-item img {
    width: 100%;
    height: 100%;
    min-height: 155px;
    object-fit: cover;
    display: block;
}

.invitation-tabs {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.65rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.invitation-tab {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.4rem 0.7rem;
    color: #60607a;
    font-size: 0.88rem;
}

.invitation-tab.is-active {
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 700;
}

.invitation-list {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.7rem;
}

.invitation-item {
    border-top: 1px solid var(--border);
    padding-top: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.invitation-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.invitation-main p {
    margin: 0.2rem 0 0;
}

.invitation-name {
    margin: 0;
    font-weight: 700;
}

.invitation-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.courses-list {
    display: grid;
    gap: 0.9rem;
}

.course-item {
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
    display: grid;
    grid-template-columns: minmax(130px, 190px) 1fr;
    gap: 0.8rem;
    align-items: start;
}

.course-image-wrap {
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    overflow: hidden;
    background: #f8f8fc;
    min-height: 104px;
}

.course-image {
    width: 100%;
    height: 100%;
    min-height: 104px;
    object-fit: cover;
    display: block;
}

.course-content h3 {
    margin: 0;
}

.course-content p {
    margin: 0.4rem 0 0;
}

.profile-settings-hero {
    display: grid;
    gap: 0.8rem;
}

.profile-settings-banner {
    min-height: 210px;
}

.profile-settings-upload-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-settings-upload-actions {
    display: grid;
    gap: 0.65rem;
    flex: 1;
}

.profile-upload-form {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.profile-upload-label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.86rem;
    color: #5d5d74;
}

.profile-upload-label input[type="file"] {
    font: inherit;
}

.profile-settings-form {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.8rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.settings-grid label {
    display: grid;
    gap: 0.3rem;
    font-size: 0.86rem;
    color: #5e5e73;
}

.settings-grid input,
.settings-grid select,
.settings-grid textarea {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.58rem 0.65rem;
    font: inherit;
    color: #1d1d29;
    background: #fff;
}

.settings-full {
    grid-column: 1 / -1;
}

.settings-checkbox {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

@media (max-width: 920px) {
    .profile-tabs {
        grid-template-columns: 1fr;
    }

    .invitation-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .invitation-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .course-item {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* React visual parity pass: typography, spacing, tabs, and card treatment */
:root {
    --secondary-100: #a9a9a9;
    --secondary-200: #9f9f9f;
    --secondary-300: #c6c6c6;
    --shadow-card: 0 0 8px 2px rgba(0, 0, 0, 0.15);
}

body {
    font-size: 14px;
    line-height: 1.35;
}

.app-shell {
    gap: 1.25rem;
    padding: 0;
}

.sidebar {
    border: 0;
    border-radius: 0;
    box-shadow: 0 0 10px 3px rgba(0, 0, 0, 0.15);
    top: 0;
    max-height: 100vh;
    padding: 1rem 0.6rem;
}

.sidebar .brand {
    margin: 0.2rem 0.45rem 0.9rem;
}

.sidebar nav a {
    padding: 0.52rem 0.72rem;
    border-right: 4px solid transparent;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.1;
}

.sidebar nav a:hover {
    border-right-color: var(--brand);
    background: #fff;
}

.topbar {
    background: linear-gradient(90deg, #ff803f 0%, #822a8a 100%);
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 1rem 1.4rem 0.9rem;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.topbar h1 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.topbar p {
    color: #fff;
    opacity: 0.92;
    font-size: 12px;
}

.topbar-actions a {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 5px;
    font-size: 12px;
    padding: 0.38rem 0.62rem;
}

.topbar-actions a:hover {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.26);
}

.topbar-actions span {
    color: #fff;
    font-size: 12px;
}

.app-content {
    padding: 1rem 1.4rem 1.2rem;
}

.card,
.auth-card,
.meta-box {
    border-color: var(--secondary-100);
    box-shadow: var(--shadow-card);
}

.card {
    border-radius: 10px;
    padding: 1rem;
}

.card h2 {
    font-size: 20px;
    font-weight: 500;
    line-height: 33px;
}

.muted {
    color: #797979;
}

.btn-brand,
.btn-outline,
.mode-btn,
.profile-tab {
    border-radius: 5px;
}

.btn-brand {
    font-weight: 500;
    font-size: 14px;
}

.btn-sm {
    font-size: 13px;
}

.feed-layout,
.directory-layout,
.friends-layout,
.friend-profile-layout,
.notifications-layout,
.events-layout,
.messages-layout,
.chat-layout,
.profile-layout,
.profile-settings-layout,
.commerce-layout {
    max-width: 1000px;
}

.feed-toolbar p {
    margin: 0;
    color: #797979;
    font-size: 12px;
}

.feed-card.card {
    border: 0;
    border-bottom: 1px solid var(--secondary-100);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    margin: 0;
    padding: 1rem 0.5rem;
}

.feed-layout > .feed-card.card:last-of-type {
    border-bottom: 0;
}

.feed-author {
    gap: 0.6rem;
}

.feed-author .avatar {
    width: 50px;
    height: 50px;
    background: #e8e8e8;
}

.feed-author h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
}

.feed-author p {
    color: #797979;
    font-size: 12px;
    line-height: 15px;
}

.feed-text {
    font-size: 13px;
    color: #000;
}

.feed-image-wrap {
    border: 0;
    border-radius: 6px;
}

.feed-image {
    border-radius: 6px;
}

.feed-actions {
    gap: 0.9rem;
}

.action-link {
    color: #c5c5c5;
    font-size: 12px;
    font-weight: 500;
}

.comment-block {
    border-top-color: #e5e7eb;
}

.comment-form textarea {
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 0.6rem 0.2rem;
    font-size: 13px;
}

@media (min-width: 992px) {
    .feed-text,
    .feed-image-wrap,
    .feed-actions {
        margin-left: 60px;
        margin-right: 60px;
    }
}

.directory-filters {
    grid-template-columns: minmax(0, 1fr) 170px 170px auto;
    gap: 0.55rem;
}

.directory-filters input,
.directory-filters select {
    height: 35px;
    border-color: var(--brand);
    border-radius: 5px;
    font-size: 13px;
    padding: 0 0.75rem;
}

.directory-filter-actions .btn-brand {
    min-height: 44px;
}

.directory-grid,
.forum-grid {
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.directory-card.card,
.forum-card.card {
    min-height: 220px;
    border: 2px solid var(--brand);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    padding: 0.95rem 0.7rem 0.7rem;
}

.forum-card.card {
    min-height: 250px;
    padding: 0;
    overflow: hidden;
}

.forum-card-body {
    padding: 1.2rem 0.65rem 0.5rem;
}

.forum-card-action {
    border-top: 0;
    padding-top: 0;
    margin-top: auto;
}

.forum-card-action .btn-brand {
    width: 100%;
    border-radius: 0 0 7px 7px;
}

.directory-card h3,
.forum-card-body h3 {
    font-size: 16px;
    line-height: 1.05;
    font-weight: 600;
}

.directory-meta {
    color: var(--secondary-100);
    font-size: 14px;
}

.directory-actions {
    border-top-color: var(--secondary-100);
    padding-top: 0.6rem;
}

.friends-list {
    gap: 0.95rem;
}

.friend-row.card {
    box-shadow: none;
    border: 1px solid #d1d5db;
    background: #f9fafb;
}

.friend-link .avatar {
    width: 40px;
    height: 40px;
    background: #e8e8e8;
}

.friend-link h3 {
    font-size: 14px;
    color: #4b5563;
    font-weight: 600;
}

.notification-item {
    border-top-color: var(--secondary-100);
    padding: 0.9rem 0.35rem 0.25rem;
}

.notification-item h4 {
    color: #1e1e1e;
    font-size: 12px;
    font-weight: 600;
    line-height: 33px;
}

.notification-time {
    color: #c5c5c5;
    font-size: 12px;
    font-weight: 500;
    line-height: 15px;
}

.messages-mode-toggle {
    gap: 0.5rem;
}

.mode-btn {
    min-height: 40px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--brand);
}

.mode-btn.is-active {
    color: #fff;
}

.conversation-row {
    border-top-color: var(--secondary-100);
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.conversation-user .avatar {
    width: 60px;
    height: 60px;
    border: 2px solid var(--brand);
    background: transparent;
}

.conversation-user h3 {
    color: #1e1e1e;
    font-size: 12px;
    font-weight: 700;
    line-height: 15px;
}

.conversation-user .muted {
    color: #c5c5c5;
    font-size: 12px;
    font-weight: 500;
    line-height: 15px;
}

.unread-pill {
    min-width: 20px;
    height: 20px;
    font-size: 10px;
}

.messages-search-form {
    margin-top: 0.8rem;
    margin-bottom: 0.65rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}

.messages-search-form input {
    height: 40px;
    border: 1px solid var(--brand);
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    padding: 0 0.75rem;
}

.messages-search-form .btn-outline {
    min-height: 40px;
}

.messages-live-error {
    margin: 0 0 0.5rem;
    color: #a73d88;
    font-size: 12px;
}

.chat-card.card {
    padding: 0;
    overflow: hidden;
}

.chat-header {
    padding: 0.85rem 1rem;
    border-bottom-color: var(--secondary-100);
}

.chat-connection-state {
    margin: 0;
    font-size: 11px;
    color: #70707f;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.chat-connection-state::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a9a9a9;
    flex-shrink: 0;
}

.chat-connection-state[data-state="connected"] {
    color: #1a7f44;
}

.chat-connection-state[data-state="connected"]::before {
    background: #22a35a;
}

.chat-connection-state[data-state="reconnecting"] {
    color: #a86c00;
}

.chat-connection-state[data-state="reconnecting"]::before {
    background: #d38a00;
}

.chat-connection-meta {
    margin: -2px 0 0;
    font-size: 10px;
    color: #8b8b98;
    line-height: 1.3;
}

.chat-thread {
    min-height: 420px;
    max-height: 62vh;
    padding: 0.4rem 1rem;
    gap: 0;
}

.chat-bubble {
    max-width: none;
    margin: 0.65rem 20% 0 0;
    border-radius: 0 10px 10px 10px;
    background: #e9e9e9;
    padding: 0.72rem;
}

.chat-bubble.mine {
    margin: 0.65rem 0 0 20%;
    border-radius: 10px 0 10px 10px;
    background: #e9e9e9;
}

.chat-user {
    color: #1e1e1e;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.chat-text {
    color: #383838;
    font-size: 14px;
}

.chat-time {
    color: #a9a9a9;
    font-size: 11px;
}

.chat-form {
    border-top: 0;
    background: var(--brand);
    grid-template-columns: auto 1fr auto;
    padding: 0.75rem;
    gap: 0.5rem;
}

.chat-attach-btn {
    height: 48px;
    padding: 0 0.95rem;
    border-radius: 10px;
    border: 1px solid #fff;
    background: #fff;
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
}

.chat-form input[type="text"] {
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: #fff;
}

.chat-form .btn-brand {
    height: 48px;
    min-width: 78px;
    border-radius: 10px;
    border-color: #fff;
    background: #fff;
    color: var(--brand);
}

.chat-form .btn-brand:hover {
    border-color: #fff;
    background: #fff;
    color: #a43f87;
}

.profile-card.card,
.friend-profile-card.card {
    padding: 0;
    overflow: hidden;
}

.profile-banner {
    margin: 0;
    height: 220px;
}

.profile-head,
.friend-profile-head {
    margin-top: -64px;
    padding: 0 1rem 1rem;
}

.friend-profile-main {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.avatar-xl {
    width: 140px;
    height: 140px;
    border: 1px solid var(--brand);
    background: #fff;
}

.profile-title h2,
.friend-profile-head h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 15px;
}

.profile-title .muted,
.friend-profile-head .muted,
.profile-bio,
.friend-bio {
    font-size: 14px;
    line-height: 15px;
    color: #797979;
}

.friend-message-btn {
    border: 1px solid var(--brand);
    border-radius: 999px;
    color: var(--brand);
    padding: 0.4rem 0.9rem;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    background: #fff;
}

.friend-message-btn:hover {
    color: #fff;
    background: var(--brand);
}

.profile-friends-link {
    margin-top: 0.45rem;
    color: var(--brand);
    font-size: 14px;
    font-weight: 400;
}

.profile-tabs {
    border-top-color: var(--secondary-100);
    padding: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-tab {
    padding: 0.52rem 0.92rem;
    border-color: var(--brand);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.profile-feed-item {
    border-top-color: var(--secondary-100);
    padding: 0.95rem 0.4rem 0.6rem;
}

.profile-feed-item .muted {
    color: #c5c5c5;
    font-size: 12px;
    font-weight: 500;
}

.profile-media-grid {
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.9rem;
}

.profile-media-item {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.invitation-tabs {
    margin-top: 1rem;
    margin-bottom: 1.1rem;
    justify-content: center;
    gap: 0.5rem;
    border-bottom-color: var(--secondary-100);
    padding-bottom: 0;
}

.invitation-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #797979;
    padding: 0.55rem 1rem;
    font-size: 14px;
}

.invitation-tab.is-active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 500;
}

.invitation-item {
    border-top-color: var(--secondary-100);
    padding: 1rem 0.45rem;
}

.invitation-main .avatar {
    width: 50px;
    height: 50px;
    background: #e8e8e8;
}

.invitation-name {
    color: #1e1e1e;
    font-size: 14px;
    font-weight: 600;
}

.invitation-main .muted {
    color: #797979;
    font-size: 12px;
    font-weight: 500;
}

.invitation-actions .btn-accept,
.invitation-actions .btn-reject {
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
}

.friend-connect-note {
    margin: 0.3rem 0 0;
    width: min(100%, 820px);
    border: 1px solid var(--brand);
    text-align: center;
    padding: 0.6rem 0.75rem;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 300;
}

.friend-post-empty {
    margin: 1rem 0 0.2rem;
    text-align: center;
}

.course-item {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    background: #fff;
    padding: 1rem;
    grid-template-columns: minmax(190px, 35%) 1fr;
}

.course-image-wrap {
    border: 0;
    border-radius: 10px;
    min-height: 180px;
}

.course-content h3 {
    color: var(--brand);
    font-size: 18px;
    font-weight: 500;
}

.course-content p {
    margin-top: 0.3rem;
}

.course-content .btn-brand.btn-sm {
    margin-top: 0.9rem;
    width: 100%;
}

.profile-error-state {
    margin: 0.35rem 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.profile-settings-hero {
    padding: 0 0 1rem;
}

.profile-settings-upload-row {
    padding: 0 1rem;
}

.profile-settings-form {
    margin-top: 1rem;
}

.settings-grid label {
    color: #797979;
    font-size: 12px;
    gap: 0.35rem;
}

.settings-grid input,
.settings-grid select,
.settings-grid textarea {
    border: 1px solid transparent;
    border-radius: 5px;
    background: #e8e8e8;
}

.settings-grid input:focus,
.settings-grid select:focus,
.settings-grid textarea:focus {
    outline: 0;
    border-color: var(--brand);
    background: #fff;
}

.event-card.card,
.merch-card.card {
    border: 1px solid var(--secondary-300);
    box-shadow: none;
}

.event-image-wrap {
    border: 0;
    border-radius: 12px;
    min-height: 250px;
}

.event-image {
    min-height: 250px;
    border-radius: 12px;
}

.event-content h3 {
    color: var(--brand);
    font-size: 16px;
}

.event-content p {
    font-size: 14px;
}

.merch-image-wrap {
    border: 0;
    border-radius: 12px;
}

.merch-card-body h3 {
    color: var(--brand);
    font-size: 16px;
    font-weight: 600;
}

.merch-card-body .muted {
    font-size: 13px;
}

.merch-actions {
    border-top-color: var(--secondary-100);
}

.cart-header {
    border-bottom: 1px solid #000;
}

.cart-row {
    border-top: 0;
    border-bottom: 1px solid #000;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.cart-list .cart-row:last-child {
    border-bottom: 0;
}

.cart-image-wrap {
    border: 0;
}

.cart-item-main h3 {
    color: var(--brand);
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.cart-item-main .cart-price {
    color: #000;
    font-weight: 700;
}

.btn-link-danger {
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: var(--brand);
    padding: 0.3rem 0.66rem;
    font-size: 13px;
    text-decoration: none;
}

.order-line {
    color: #4b5563;
}

.order-total {
    border-top-color: #d1d5db;
}

.payment-choice {
    border-radius: 8px;
}

.auth-shell {
    max-width: none;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: minmax(55%, 1fr) minmax(45%, 720px);
}

.auth-visual {
    order: 2;
    background: #fff;
}

.auth-main {
    order: 1;
    max-width: none;
    padding: 0;
}

.auth-card {
    min-height: 100vh;
    border: 0;
    border-radius: 0 80px 0 0;
    box-shadow: none;
    padding: 2.5rem 9%;
}

.auth-card h1 {
    margin-top: 0.2rem;
    color: var(--brand);
    font-size: 32px;
    line-height: 33px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-card p {
    font-size: 14px;
}

.form-grid label {
    color: #797979;
    font-size: 12px;
    margin-top: 0.05rem;
}

.form-grid input,
.form-grid select {
    border: 1px solid transparent;
    border-radius: 5px;
    background: #e8e8e8;
}

.form-grid input:focus,
.form-grid select:focus {
    outline: 0;
    border-color: var(--brand);
    background: #fff;
}

.form-grid button {
    min-height: 39px;
    border-radius: 5px;
}

.auth-links {
    margin-top: 1rem;
    font-size: 12px;
}

@media (max-width: 920px) {
    .topbar {
        padding: 0.85rem 0.9rem;
    }

    .app-content {
        padding: 0.85rem;
    }

    .feed-card.card {
        padding-left: 0;
        padding-right: 0;
    }

    .directory-filters {
        grid-template-columns: 1fr;
    }

    .directory-grid,
    .forum-grid,
    .events-grid,
    .merch-grid {
        grid-template-columns: 1fr;
    }

    .chat-bubble,
    .chat-bubble.mine {
        margin-left: 0;
        margin-right: 0;
    }

    .messages-search-form {
        grid-template-columns: 1fr;
    }

    .chat-form {
        grid-template-columns: 1fr;
    }

    .profile-head,
    .friend-profile-head {
        margin-top: -48px;
    }

    .friend-profile-main {
        gap: 0.65rem;
    }

    .avatar-xl {
        width: 100px;
        height: 100px;
    }

    .profile-tabs {
        justify-content: flex-start;
    }

    .course-item {
        grid-template-columns: 1fr;
    }

    .friend-connect-note {
        font-size: 16px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-card {
        border-radius: 0;
        min-height: auto;
        padding: 1.2rem 1rem;
    }
}

.article-layout,
.epr-core-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.article-card {
    max-width: 860px;
    justify-self: center;
    width: 100%;
}

.article-header {
    border-bottom: 1px solid var(--secondary-100);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.article-header h2 {
    margin: 0;
    line-height: 1.2;
}

.article-meta {
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.article-cover-wrap {
    border-radius: 0.65rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.article-cover {
    width: 100%;
    max-height: 430px;
    object-fit: cover;
    display: block;
}

.article-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1f2937;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin: 1.05rem 0 0.55rem;
    line-height: 1.3;
    color: #111827;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
    margin: 0.6rem 0;
}

.article-body img,
.article-body iframe,
.article-body video {
    max-width: 100%;
    border-radius: 0.5rem;
}

.epr-core-header p {
    margin: 0.2rem 0 0;
}

.epr-core-section h3,
.epr-core-clarity h3 {
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
    line-height: 1.25;
}

.epr-video-frame {
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.epr-video-frame iframe,
.epr-video-frame video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.epr-core-media-scroll,
.epr-core-article-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.epr-core-media-card,
.epr-core-article-card {
    flex: 0 0 240px;
    border: 2px solid var(--brand);
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.epr-core-media-card {
    min-height: 240px;
    display: grid;
    place-items: stretch;
}

.epr-core-media-card iframe,
.epr-core-media-card img {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    display: block;
}

.epr-core-article-card {
    color: inherit;
    text-decoration: none;
}

.epr-core-article-image-wrap {
    min-height: 170px;
    background: #f3f4f6;
}

.epr-core-article-image,
.epr-core-article-image-fallback {
    width: 100%;
    min-height: 170px;
    height: 100%;
    object-fit: cover;
    display: block;
}

.epr-core-article-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

.epr-core-article-body {
    padding: 0.6rem 0.75rem 0.8rem;
    display: grid;
    gap: 0.35rem;
}

.epr-core-article-meta {
    margin: 0;
    color: #6b7280;
    font-size: 0.74rem;
}

.epr-core-article-title {
    margin: 0;
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.epr-core-article-id {
    margin: 0;
    color: #9ca3af;
    font-size: 0.72rem;
}

.epr-core-course-list {
    display: grid;
    gap: 0.8rem;
}

.epr-core-course-item {
    display: grid;
    grid-template-columns: minmax(140px, 230px) 1fr;
    gap: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    padding: 0.8rem;
}

.epr-core-course-image-wrap {
    min-height: 120px;
    border-radius: 0.55rem;
    overflow: hidden;
    background: #f3f4f6;
}

.epr-core-course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.epr-core-course-content h4 {
    margin: 0;
    font-size: 1rem;
}

.epr-core-course-content p {
    margin: 0.45rem 0 0;
}

.epr-core-course-content .btn-brand {
    margin-top: 0.8rem;
}

.epr-core-spotlight {
    display: grid;
    gap: 0.7rem;
}

.epr-core-spotlight-image-wrap {
    width: min(290px, 100%);
    border: 2px solid var(--brand);
    border-radius: 0.55rem;
    overflow: hidden;
}

.epr-core-spotlight-image {
    width: 100%;
    display: block;
}

.epr-core-clarity-form {
    display: grid;
    gap: 0.7rem;
}

.epr-core-clarity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.epr-core-clarity-form input,
.epr-core-clarity-form textarea {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.62rem 0.75rem;
    font: inherit;
}

.epr-core-clarity-actions {
    display: flex;
    justify-content: center;
}

.epr-core-theme-spiritual .btn-brand {
    background: #f0a33c;
    border-color: #f0a33c;
}

.epr-core-theme-leadership .btn-brand {
    background: #ff803f;
    border-color: #ff803f;
}

.epr-core-theme-mentoring .btn-brand {
    background: #9364df;
    border-color: #9364df;
}

.epr-core-theme-wpn .btn-brand {
    background: #ff3333;
    border-color: #ff3333;
}

@media (max-width: 920px) {
    .article-card {
        max-width: 100%;
    }

    .epr-core-media-card,
    .epr-core-article-card {
        flex-basis: 190px;
    }

    .epr-core-course-item {
        grid-template-columns: 1fr;
    }

    .epr-core-clarity-grid {
        grid-template-columns: 1fr;
    }
}

.welcome-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.welcome-hero h2 {
    margin: 0;
}

.welcome-hero p {
    margin: 0.28rem 0 0;
    color: #6b7280;
}

.welcome-event {
    background: rgba(185, 72, 152, 0.15);
}

.welcome-event h3 {
    margin: 0 0 0.65rem;
}

.welcome-event-image-wrap {
    border-radius: 0.65rem;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.welcome-event-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.friend-action-submit[disabled],
.friend-action-submit[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.7;
}

.friend-action-submit.is-loading {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.friend-action-submit.is-loading::after {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: #fff;
    animation: friendActionSpin 0.8s linear infinite;
}

.action-link.friend-action-submit.is-loading::after {
    border-color: rgba(118, 118, 138, 0.35);
    border-top-color: #76768a;
}

@keyframes friendActionSpin {
    to {
        transform: rotate(360deg);
    }
}

.live-count-pill {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-left: 0.35rem;
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.profile-tab .live-count-pill {
    background: rgba(185, 72, 152, 0.16);
    color: var(--brand);
}

.profile-tab.is-active .live-count-pill {
    background: var(--brand);
    color: #fff;
}

.invitation-tab .live-count-pill {
    background: #d6d6de;
    color: #5d5d6e;
}

.invitation-tab.is-active .live-count-pill {
    background: var(--brand);
    color: #fff;
}

.flag-hidden {
    display: none !important;
}

/* ===== React parity shell + route overrides (S59) ===== */
:root {
    --parity-bg: #f5f5f5;
    --parity-white: #ffffff;
    --parity-text: #1e1e1e;
    --parity-muted: #a9a9a9;
    --parity-brand: #b94898;
    --parity-border: #c6c6c6;
    --parity-shadow: 0 0 10px 3px rgba(0, 0, 0, 0.08);
}

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

.app-body {
    margin: 0;
    background: var(--parity-bg);
    color: var(--parity-text);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 220;
    height: 72px;
    background: linear-gradient(90deg, #ff803f 0%, #822a8a 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 28px;
    box-shadow: none;
}

.app-topbar-logo {
    display: inline-flex;
    align-items: center;
}

.app-topbar-logo img {
    width: 92px;
    height: auto;
    display: block;
}

.app-topbar-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-icon-link {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #fff;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.topbar-icon-link svg {
    width: 19px;
    height: 19px;
    display: block;
}

.topbar-icon-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    position: absolute;
    right: 5px;
    top: 4px;
    border: 2px solid #fff;
    background: #cc2c45;
}

.topbar-profile-trigger {
    background: #fff;
    padding: 0;
    overflow: hidden;
}

.topbar-profile-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.topbar-profile-menu {
    position: absolute;
    right: 0;
    top: 40px;
    min-width: 190px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: grid;
    gap: 4px;
}

.topbar-profile-menu a {
    font-size: 13px;
    font-weight: 500;
    color: #2a2a2a;
    border-radius: 7px;
    padding: 8px 10px;
}

.topbar-profile-menu a:hover {
    background: #fff1fa;
    color: var(--parity-brand);
}

.topbar-profile-signout {
    color: #b13434 !important;
}

.app-shell {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 0;
    padding: 0;
}

.app-sidebar {
    background: #fff;
    min-height: calc(100vh - 72px);
    position: sticky;
    top: 72px;
    align-self: start;
    border-right: 0;
    box-shadow: rgb(51, 65, 85) 0px 4px 6px -1px, rgb(51, 65, 85) 0px 2px 4px -2px;
    padding: 64px 0 0 5px;
}

.sidebar-nav {
    display: grid;
    gap: 28px;
    padding: 0 0 0 40px;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    padding: 8px 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.sidebar-submenu a,
.topbar-profile-menu a,
.mode-btn,
.btn-brand,
.action-link,
.directory-all-btn,
.directory-parity-filters select,
.directory-parity-filters input,
.messages-search-form input,
.messages-search-form button,
.suggestion-name,
.suggestion-add-btn,
.events-calendar-list-item p,
.events-calendar-list-item span {
    font-size: 14px;
}

.sidebar-link:hover,
.sidebar-link.is-active,
.sidebar-group-toggle.is-active {
    color: #111;
}

.sidebar-link.is-active,
.sidebar-group-toggle.is-active {
    border-right: 4px solid var(--parity-brand);
}

.sidebar-group-toggle svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: #292929;
    transition: transform 0.18s ease;
}

.sidebar-group.is-open .sidebar-group-toggle svg {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    margin: -2px 0 4px;
    padding: 0 36px 0 48px;
    gap: 7px;
}

.sidebar-group.is-open .sidebar-submenu {
    display: grid;
}

.sidebar-submenu a {
    color: #5f5f5f;
    font-weight: 500;
    padding: 5px 0;
}

.sidebar-submenu a.is-active {
    color: var(--parity-brand);
}

.app-main {
    min-width: 0;
    background: var(--parity-bg);
}

.app-content {
    padding: 14px 24px 48px;
}

.card,
.messages-panel,
.welcome-block,
.directory-parity-card,
.event-parity-card,
.suggestions-rail,
.events-calendar-rail {
    background: #fff;
    border: 1px solid var(--parity-border);
    border-radius: 10px;
    box-shadow: var(--parity-shadow);
}

/* Welcome */
.welcome-layout {
    max-width: 904px;
    margin: 0 0 0 30px;
    padding-top: 28px;
    display: grid;
    gap: 12px;
}

.welcome-intro {
    padding: 6px 2px 0;
}

.welcome-intro h2 {
    margin: 0;
    color: var(--parity-brand);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.28;
}

.welcome-intro p {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 500;
}

.welcome-intro hr {
    margin: 10px 0 0;
    border: 0;
    border-top: 1px solid #bdbdbd;
}

.welcome-block {
    padding: 14px 16px;
}

.welcome-block h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 600;
}

.welcome-video-content {
    border-top: 1px solid #a9a9a9;
    padding-top: 8px;
}

.welcome-video-block {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 15px 0;
}

.welcome-video-content h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
}

.welcome-video-block .epr-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
    background: #000;
    border: 0;
}

.welcome-video-block iframe,
.welcome-video-block video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.welcome-text-block p,
.welcome-event-block p {
    margin: 0;
    color: #353535;
    line-height: 1.3;
}

.welcome-event-image-wrap {
    margin-bottom: 10px;
    border-radius: 9px;
    overflow: hidden;
}

/* Community */
.community-shell {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 24px;
    position: relative;
}

.community-main {
    min-width: 0;
}

.community-heading h1 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.community-post {
    border-bottom: 1px solid #a9a9a9;
    padding: 18px 14px 14px;
    margin: 0;
}

.feed-author h3 {
    font-size: 14px;
}

.feed-author p {
    font-size: 12px;
}

.feed-text {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.62;
}

.feed-image-wrap {
    margin-top: 12px;
    border: 0;
    border-radius: 10px;
}

.feed-actions {
    margin-top: 14px;
    gap: 16px;
}

.action-link {
    color: #c5c5c5;
    font-weight: 500;
}

.comment-block {
    margin-top: 12px;
    border-top: 1px solid #e2e2e2;
}

.community-add-fab {
    position: fixed;
    right: 28px;
    bottom: 26px;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: var(--parity-brand);
    color: #fff;
    font-size: 52px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(185, 72, 152, 0.36);
    z-index: 120;
}

/* Suggestions rail (community + messages) */
.suggestions-rail {
    border-color: var(--parity-brand);
    padding: 12px 10px 10px;
    height: fit-content;
    position: sticky;
    top: 86px;
}

.suggestions-rail h3 {
    margin: 3px 8px 10px;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #d6d6d6;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 6px;
}

.suggestion-card {
    display: grid;
    justify-items: center;
    gap: 5px;
}

.suggestion-avatar-link {
    width: 66px;
    height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.suggestion-avatar {
    width: 66px;
    height: 66px;
    border-radius: 999px;
    border: 1px solid var(--parity-brand);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.suggestion-name {
    margin: 0;
    min-height: 30px;
    text-align: center;
    color: var(--parity-brand);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;
}

.suggestion-form {
    width: 100%;
}

.suggestion-add-btn {
    width: 100%;
    min-height: 16px;
    border: 0;
    border-radius: 3px;
    background: var(--parity-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 0;
    cursor: pointer;
}

.suggestions-footer {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    padding-right: 6px;
}

.suggestions-footer a {
    color: var(--parity-muted);
    font-size: 12px;
    font-weight: 500;
}

/* Directory */
.directory-shell {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.directory-heading h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.directory-parity-filters {
    display: grid;
    gap: 10px;
}

.directory-search-wrap {
    border: 1px solid var(--parity-brand);
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 10px;
}

.directory-search-wrap input {
    border: 0;
    outline: 0;
    background: transparent;
    flex: 1;
    font-size: 14px;
    color: #2b2b2b;
}

.directory-search-wrap input::placeholder {
    color: #b7b7c4;
}

.directory-search-btn {
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: var(--parity-brand);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.directory-search-btn svg {
    width: 100%;
    height: 100%;
}

.directory-filter-row {
    display: grid;
    grid-template-columns: 124px 1fr 1fr;
    gap: 8px;
}

.directory-all-btn,
.directory-filter-row select {
    height: 42px;
    border-radius: 6px;
    border: 1px solid var(--parity-brand);
    background: var(--parity-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 0 12px;
}

.directory-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.directory-filter-row select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position: calc(100% - 16px) 16px, calc(100% - 9px) 16px;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
}

.directory-parity-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.directory-parity-card {
    padding: 14px 10px 8px;
    min-height: 200px;
    display: grid;
    align-content: space-between;
}

.directory-parity-card-link {
    color: inherit;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 10px;
}

.directory-parity-avatar {
    width: 70px;
    height: 70px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.directory-parity-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.directory-parity-actions {
    margin-top: 12px;
    border-top: 1px solid #a9a9a9;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.directory-parity-action-left,
.directory-parity-action-right {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.directory-parity-action-left {
    border-right: 1px solid #a9a9a9;
}

.directory-action-icon {
    width: 26px;
    height: 22px;
    border: 0;
    background: transparent;
    color: var(--parity-brand);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.directory-action-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.directory-action-icon.is-friend {
    color: #008e05;
    cursor: default;
}

.directory-action-icon.is-pending {
    color: #8e8e8e;
}

/* Messages */
.messages-shell {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 24px;
}

.messages-main {
    min-width: 0;
}

.messages-heading h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.messages-mode-toggle {
    margin-top: 10px;
    border-bottom: 1px solid #a9a9a9;
    padding-bottom: 10px;
}

.mode-btn {
    border-color: var(--parity-brand);
    font-weight: 600;
    min-height: 44px;
}

.messages-panel {
    margin-top: 10px;
    padding: 10px 14px;
}

.messages-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.messages-search-form input {
    min-height: 42px;
    border: 1px solid var(--parity-brand);
    border-radius: 6px;
    padding: 0 12px;
}

.messages-search-form .btn-outline {
    border: 1px solid var(--parity-brand);
    border-radius: 6px;
    color: var(--parity-brand);
    background: #fff;
    font-weight: 600;
    padding: 0 16px;
}

.conversation-row {
    border-top: 1px solid #a9a9a9;
    padding: 12px 2px;
}

.conversation-user {
    gap: 12px;
}

.conversation-user .avatar {
    width: 54px;
    height: 54px;
    background: #fff;
    border: 2px solid var(--parity-brand);
}

.conversation-user h3 {
    font-size: 16px;
    font-weight: 700;
}

.conversation-user .muted {
    color: #c5c5c5;
    font-size: 12px;
    font-weight: 500;
}

.unread-pill {
    min-width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: 700;
}

/* Events */
.events-shell {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 24px;
}

.events-main {
    min-width: 0;
}

.events-heading h1 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.events-parity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.event-parity-card {
    padding: 12px;
    display: grid;
    gap: 12px;
}

.event-parity-image-wrap {
    width: 100%;
    min-height: 230px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 0;
}

.event-parity-image {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: fill;
    border-radius: 12px;
    display: block;
}

.event-parity-content h3 {
    margin: 0;
    color: var(--parity-brand);
    font-size: 16px;
    font-weight: 600;
}

.event-parity-content {
    padding-left: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.event-parity-meta {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #3f3f3f;
    font-size: 14px;
    font-weight: 400;
}

.event-parity-copy {
    margin: 6px 0 0;
    font-size: 12px;
    color: #555;
    line-height: 1.45;
}

.event-calendar-btn {
    margin-top: 10px;
    border-radius: 6px;
    height: 36px;
    padding: 8px;
    width: 75%;
    font-size: 14px;
    font-weight: 500;
}

.events-calendar-rail {
    border-color: var(--parity-brand);
    padding: 0;
    height: calc((100vh - 72px) * 0.85);
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    border-radius: 8px;
}

.events-calendar-panel {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.events-calendar-rail h3 {
    margin: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.events-calendar-rail hr {
    border: 0;
    border-top: 1px solid #d7d7d7;
    margin: 10px 0;
}

.events-calendar-nav {
    display: grid;
    grid-template-columns: 24px 1fr 24px;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.events-calendar-nav p {
    margin: 0;
    text-align: center;
    color: var(--parity-brand);
    font-size: 12px;
    font-weight: 600;
}

.events-calendar-nav-btn {
    border: 0;
    background: transparent;
    color: #313131;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.events-calendar-weekdays,
.events-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.events-calendar-weekdays span {
    text-align: center;
    color: var(--parity-brand);
    font-size: 10px;
    font-weight: 600;
}

.events-calendar-day {
    min-height: 30px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #2d2d2d;
}

.events-calendar-day.is-empty {
    opacity: 0;
}

.events-calendar-day.is-today {
    background: #f3e8ff;
    color: var(--parity-brand);
    font-weight: 700;
}

.events-calendar-day.has-event {
    background: #1e1e1e;
    color: #fff;
    font-weight: 700;
}

.events-calendar-list {
    display: grid;
    gap: 8px;
    max-height: none;
    flex: 1;
    align-content: start;
    overflow-y: auto;
}

.events-calendar-list-item {
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
}

.events-calendar-list-item p {
    margin: 0;
    color: var(--parity-brand);
    font-size: 12px;
    font-weight: 600;
}

.events-calendar-list-item span {
    display: block;
    margin-top: 2px;
    color: #8f8f8f;
    font-size: 11px;
}

.events-calendar-empty {
    margin: 12px 0 0;
    color: #9f9f9f;
    text-align: center;
    font-size: 12px;
}

/* Shared typography scaling back from previous oversized values */
.welcome-intro h2,
.welcome-intro p,
.feed-author h3,
.feed-text,
.community-heading h1,
.directory-heading h1,
.directory-search-wrap input,
.directory-all-btn,
.directory-filter-row select,
.directory-parity-card h3,
.messages-heading h1,
.events-heading h1,
.events-heading p,
.event-parity-content h3,
.suggestions-rail h3,
.sidebar-link,
.sidebar-submenu a {
    letter-spacing: 0;
}

@media (max-width: 1260px) {
    .welcome-layout {
        max-width: 100%;
        margin: 0;
    }

    .community-shell,
    .messages-shell,
    .events-shell {
        grid-template-columns: 1fr;
    }

    .suggestions-rail,
    .events-calendar-rail {
        display: none;
    }

    .community-add-fab {
        right: 18px;
        bottom: 18px;
    }
}

@media (max-width: 992px) {
    .app-topbar {
        height: 64px;
        padding: 0 14px;
    }

    .app-shell {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 64px);
    }

    .app-sidebar {
        position: static;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #d8d8d8;
        box-shadow: none;
        padding: 10px 0;
    }

    .sidebar-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        gap: 4px;
        padding: 0 8px 2px;
    }

    .sidebar-group {
        display: none;
    }

    .sidebar-link {
        min-height: 36px;
        font-size: 13px;
        padding: 0 12px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid #e2e2e2;
    }

    .sidebar-link.is-active::after {
        display: none;
    }

    .sidebar-link.is-active {
        background: #fff1fa;
        border-color: var(--parity-brand);
        color: var(--parity-brand);
    }

    .app-content {
        padding: 12px;
    }

    .events-parity-grid,
    .directory-parity-grid {
        grid-template-columns: 1fr;
    }

    .directory-filter-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Strict parity tune (S61) ===== */
.topbar-profile-menu[hidden] {
    display: none !important;
}

.topbar-profile-menu:not([hidden]) {
    display: grid;
}

.app-topbar {
    height: 72px;
    padding: 8px 28px;
}

.app-shell {
    min-height: calc(100vh - 72px);
    grid-template-columns: 272px minmax(0, 1fr);
}

.app-sidebar {
    top: 72px;
    min-height: calc(100vh - 72px);
    padding: 64px 0 0 5px;
}

.app-content {
    padding: 14px 24px 48px;
}

.community-shell,
.messages-shell {
    max-width: 1180px;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) 256px;
}

.events-shell {
    max-width: 1118px;
    margin: 12px -10px 0 12px;
    gap: 31px;
    grid-template-columns: 776px 311px;
}

.suggestions-rail {
    top: 72px;
}

.events-calendar-rail {
    top: 88px;
}

.community-post {
    padding: 16px 0 14px;
}

.feed-author .avatar {
    width: 50px;
    height: 50px;
    background: #e8e8e8;
}

.feed-text,
.feed-image-wrap,
.feed-actions,
.comment-block {
    margin-left: 60px;
}

.feed-image-wrap {
    max-width: calc(100% - 60px);
}

.feed-actions {
    margin-top: 12px;
}

.messages-panel {
    padding: 10px 12px;
}

.conversation-user .avatar {
    width: 60px;
    height: 60px;
}

.conversation-user h3 {
    font-size: 12px;
    line-height: 15px;
}

.event-parity-card {
    padding: 16px;
    box-shadow: none;
    border-radius: 8px;
}

.event-parity-image-wrap {
    height: 250px;
    min-height: 250px;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

.event-parity-image {
    height: 100%;
    min-height: 250px;
    max-height: 300px;
    object-fit: fill;
    object-position: center;
    border-radius: 12px;
}

.event-parity-copy {
    display: none;
}

.event-calendar-btn {
    height: 36px;
    padding: 8px;
    width: 75%;
}

@media (max-width: 1260px) {
    .community-shell,
    .messages-shell,
    .events-shell {
        grid-template-columns: 1fr;
        max-width: 100%;
        margin: 0;
    }

    .welcome-layout {
        padding-top: 0;
    }

    .suggestions-rail,
    .events-calendar-rail {
        display: none;
    }
}

@media (max-width: 992px) {
    .app-topbar {
        height: 58px;
        padding: 0 14px;
    }

    .app-shell {
        min-height: calc(100vh - 58px);
    }

    .app-sidebar {
        top: 0;
        min-height: auto;
        padding: 10px 0;
    }

    .app-content {
        padding: 12px;
    }

    .feed-text,
    .feed-image-wrap,
    .feed-actions,
    .comment-block {
        margin-left: 0;
    }

    .feed-image-wrap {
        max-width: 100%;
    }
}
