:root {
    color-scheme: light;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --gold: #f59e0b;
    --blue: #2563eb;
    --accent: #dc2626;
    --soft: #eef7f6;
}

/* Phase 7D: reliable share panel, aligned action icons, compact chat drawers */
.facebook-reel-card,
.fb-post-card {
    overflow: visible !important;
}
.facebook-action-row,
.fb-post-actions.share-actions {
    position: relative;
    z-index: 4;
}
.facebook-action-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
}
.facebook-action-row > form,
.facebook-action-row > button,
.facebook-action-row > .share-popover,
.fb-post-actions.share-actions > form,
.fb-post-actions.share-actions > button,
.fb-post-actions.share-actions > .share-popover {
    min-width: 0;
    display: grid;
}
.facebook-action-row > form > button,
.facebook-action-row > button,
.facebook-action-row .share-popover > button,
.fb-post-actions.share-actions > form > button,
.fb-post-actions.share-actions > button,
.fb-post-actions.share-actions .share-popover > button {
    width: 100% !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #667085 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap;
}
.facebook-action-row > form > button:hover,
.facebook-action-row > button:hover,
.facebook-action-row .share-popover > button:hover,
.fb-post-actions.share-actions > form > button:hover,
.fb-post-actions.share-actions > button:hover,
.fb-post-actions.share-actions .share-popover > button:hover {
    background: #f2f4f7 !important;
    color: #101828 !important;
}
.action-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: inline-block;
    position: relative;
}
.like-icon::before {
    content: "";
    position: absolute;
    inset: 1px 2px 3px;
    background: currentColor;
    clip-path: polygon(50% 100%, 8% 58%, 8% 24%, 28% 7%, 50% 22%, 72% 7%, 92% 24%, 92% 58%);
}
.comment-icon {
    border: 2px solid currentColor !important;
    border-radius: 50%;
    background: transparent !important;
    clip-path: none !important;
}
.comment-icon::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -4px;
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-18deg);
    background: #fff;
}
.share-icon::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 8px;
    width: 14px;
    height: 2px;
    background: currentColor;
    transform: rotate(-28deg);
}
.share-icon::after {
    content: "";
    position: absolute;
    right: 0;
    top: 1px;
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}
.share-popover {
    position: relative !important;
    z-index: 80;
    min-width: 0;
}
.share-options[hidden] {
    display: none !important;
}
.share-options {
    position: absolute !important;
    right: 0;
    top: calc(100% + 6px);
    z-index: 9999 !important;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}
.share-options form,
.share-options a {
    display: block !important;
}
.share-options button,
.share-options a {
    width: 100% !important;
    min-height: 42px !important;
    display: block !important;
    padding: 11px 13px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #344054 !important;
    font-weight: 850 !important;
    text-align: left !important;
    text-decoration: none !important;
}
.share-options form:last-child button,
.share-options a:last-child {
    border-bottom: 0 !important;
}
.media-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}
.media-chat-form .attach-toggle,
.media-chat-form .emoji-toggle {
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #eef7f6;
    color: #0f766e;
    font-weight: 900;
    cursor: pointer;
}
.media-chat-form .button {
    grid-column: 1 / -1;
}
.media-chat-form .attachment-drawer,
.media-chat-form .emoji-drawer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.media-chat-form .emoji-drawer {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.media-chat-form .attachment-drawer[hidden],
.media-chat-form .emoji-drawer[hidden] {
    display: none !important;
}
.media-chat-form .attachment-drawer span,
.media-chat-form .emoji-drawer span {
    min-height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f4f7;
    color: #344054;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}
.media-chat-form .emoji-drawer span {
    font-size: 18px;
}

@media (max-width: 700px) {
    .media-chat-form {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
        padding: 8px !important;
    }
    .media-chat-form .attach-toggle,
    .media-chat-form .emoji-toggle {
        min-width: 54px;
        padding: 0 8px;
        font-size: 12px;
    }
    .media-chat-form .attachment-drawer {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .media-chat-form .emoji-drawer {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .facebook-action-row > form > button,
    .facebook-action-row > button,
    .facebook-action-row .share-popover > button,
    .fb-post-actions.share-actions > form > button,
    .fb-post-actions.share-actions > button,
    .fb-post-actions.share-actions .share-popover > button {
        min-height: 42px !important;
        gap: 5px;
        font-size: 12px !important;
    }
    .share-options {
        right: 0;
        min-width: 166px;
    }
}

/* SehVarta brand theme: navy, gold and clean social surfaces */
:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --ink: #10233f;
    --muted: #65748b;
    --line: #dbe3ef;
    --primary: #123a60;
    --primary-dark: #0b2744;
    --gold: #c9942f;
    --blue: #1d63b7;
    --accent: #d6a23c;
    --soft: #eef5fb;
    --shadow: 0 18px 55px rgba(18, 58, 96, .12);
}
body {
    background:
        radial-gradient(circle at 18% 0%, rgba(201, 148, 47, .13), transparent 28%),
        radial-gradient(circle at 85% 8%, rgba(18, 58, 96, .10), transparent 30%),
        var(--bg);
    color: var(--ink);
}
.topbar,
.auth-topbar {
    background: rgba(255,255,255,.94);
    border-bottom-color: rgba(18, 58, 96, .12);
    box-shadow: 0 8px 30px rgba(18, 58, 96, .06);
}
.brand {
    color: var(--primary-dark);
    letter-spacing: .01em;
}
.brand-logo-img {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: inline-block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(18, 58, 96, .20);
}
.app-logo .brand-logo-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
}
.brand-mark span {
    background: linear-gradient(135deg, var(--primary), var(--gold));
}
.top-search input {
    background: #eef2f7;
    color: var(--ink);
}
.top-search input:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(201, 148, 47, .28);
    border-color: var(--gold) !important;
}
.button,
button.button,
a.button {
    background: linear-gradient(135deg, var(--primary), #174d7a);
    box-shadow: 0 10px 28px rgba(18, 58, 96, .16);
}
.button:hover,
button.button:hover,
a.button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.button.ghost,
button.ghost,
a.button.ghost {
    background: #f1f4f8;
    color: var(--primary);
    box-shadow: none;
}
.round-action,
.mobile-icon-nav a,
.mobile-side-menu a span,
.mobile-side-menu button span,
.fb-left-rail a span,
.page-left-rail a span,
.chat-person-row > span,
.chat-avatar-lg,
.profile-avatar-xl {
    background: linear-gradient(135deg, var(--primary), var(--blue));
    color: #fff;
}
.round-action svg,
.mobile-icon-nav svg {
    stroke: var(--primary-dark);
}
.round-action:hover,
.mobile-icon-nav a:hover {
    background: rgba(201, 148, 47, .14);
    color: var(--primary-dark);
}
.badge-action b,
.mobile-icon-nav b,
.unread-badge {
    background: var(--gold);
    color: #10233f;
}
.panel,
.fb-post-card,
.social-section-card,
.fb-reward-panel,
.fb-support-panel,
.messenger-list,
.messenger-window,
.story-card,
.poster-card,
.preview-feed,
.preview-panel {
    border-color: rgba(18, 58, 96, .11);
    box-shadow: var(--shadow);
}
.auth-brand-panel {
    background:
        linear-gradient(135deg, rgba(10, 31, 55, .95), rgba(18, 58, 96, .92)),
        radial-gradient(circle at 80% 20%, rgba(201, 148, 47, .30), transparent 32%);
}
.auth-brand-logo,
.hero-brand-logo {
    width: clamp(92px, 14vw, 150px);
    height: clamp(92px, 14vw, 150px);
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(18, 58, 96, .28);
}
.auth-brand-logo {
    border-radius: 50%;
    border: 3px solid rgba(201, 148, 47, .55);
}
.hero-brand-logo {
    margin-bottom: 18px;
    border-radius: 24px;
}
.public-hero {
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,245,251,.92)),
        radial-gradient(circle at 78% 20%, rgba(201,148,47,.20), transparent 30%);
}
.public-hero h1,
.auth-brand-panel h1,
.fb-dashboard h1,
.page-title-row h1 {
    color: var(--primary-dark);
}
.auth-brand-panel h1 {
    color: #fff;
}
.eyebrow,
.feature-band span,
.fb-task-item b,
.task-card-head strong {
    color: var(--gold);
}
.hero-metrics div,
.auth-stats div,
.floating-wallet,
.fb-stories a {
    border-color: rgba(201, 148, 47, .22);
    background: linear-gradient(135deg, #fff, #fff8ec);
}
.post-actions span,
.reaction-row button,
.facebook-action-row button,
.fb-post-actions.share-actions button {
    color: var(--primary);
}
.progress i {
    background: linear-gradient(90deg, var(--gold), var(--primary));
}
.mobile-side-menu {
    background: #ffffff;
}
.drawer-head {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.drawer-profile span,
.account-trigger span,
.composer-inline span,
.fb-post-head > span {
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff;
}
.public-footer {
    background: #0b2744;
    color: #e6edf6;
}
.public-footer .brand {
    color: #fff;
}

@media (max-width: 700px) {
    .brand-logo-img {
        width: 40px;
        height: 40px;
    }
    .app-logo .brand-logo-img {
        width: 44px;
        height: 44px;
    }
    .hero-brand-logo,
    .auth-brand-logo {
        width: 86px;
        height: 86px;
    }
}

/* Phase 8: media size/aspect controls, visible stories and seen counters */
.media-aspect-select {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #101828;
    font-weight: 800;
    padding: 0 10px;
}
.media-ratio-note {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.media-aspect {
    width: 100%;
    display: block;
    background: #0f172a;
    object-fit: contain;
}
.media-aspect-1-1 {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.media-aspect-4-5 {
    aspect-ratio: 4 / 5;
    object-fit: cover;
}
.media-aspect-9-16 {
    aspect-ratio: 9 / 16;
    object-fit: cover;
}
.media-aspect-16-9 {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.media-aspect-original {
    max-height: 760px;
    object-fit: contain;
}
.document-preview-card {
    display: grid;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: #101828;
    text-decoration: none;
}
.document-preview-card span {
    color: var(--muted);
}
.visible-story-strip {
    align-items: stretch;
    padding: 10px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}
.visible-story-strip .story-card {
    position: relative;
    flex: 0 0 140px;
    min-height: 210px;
    overflow: hidden;
    border-radius: 8px;
    scroll-snap-align: start;
}
.story-card.add-story {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 12px;
    background: #fff;
}
.story-plus {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 26px;
    font-weight: 900;
}
.story-preview-card img,
.story-preview-card video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-preview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .05), rgba(15, 23, 42, .74));
}
.story-preview-card strong,
.story-preview-card small {
    position: relative;
    z-index: 1;
    display: block;
    margin: 0 10px;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.story-preview-card strong {
    margin-top: 132px;
}
.story-preview-card small {
    font-size: 11px;
}
.status-viewer-card {
    max-width: 980px;
    margin: 0 auto;
}
.status-viewer-card .story-viewer-media {
    border-radius: 8px;
    overflow: hidden;
    background: #020617;
}
.status-viewer-card .story-viewer-media img,
.status-viewer-card .story-viewer-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.story-seen-list {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.story-seen-list summary {
    cursor: pointer;
    font-weight: 900;
}
.story-seen-list div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}
.story-seen-list div span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-weight: 900;
}

@media (max-width: 700px) {
    .composer-upload-row {
        grid-template-columns: 1fr;
    }
    .visible-story-strip .story-card {
        flex-basis: 118px;
        min-height: 180px;
    }
    .story-preview-card strong {
        margin-top: 110px;
    }
}

@media (max-width: 900px) {
    .vertical-reel-card .reel-action-rail {
        display: none !important;
    }
    .vertical-reel-card .reel-social-actions {
        display: grid !important;
    }
}

/* Phase 7C: instant actions, reliable share panel, aligned action icons, security controls */
.comments-collapsed {
    display: none !important;
}
.post-stats button,
.facebook-reel-stats button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.share-sheet {
    position: relative;
    min-width: 0;
}

.facebook-action-row > form,
.facebook-action-row > button,
.facebook-action-row > .share-popover {
    min-width: 0;
    display: grid;
}
.facebook-action-row > form > button,
.facebook-action-row > button,
.facebook-action-row .share-popover > button,
.fb-post-actions.share-actions > form > button,
.fb-post-actions.share-actions > button,
.fb-post-actions.share-actions .share-popover > button {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 4px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #667085;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}
.facebook-action-row > form > button:hover,
.facebook-action-row > button:hover,
.facebook-action-row .share-popover > button:hover {
    background: #f2f4f7;
    color: #101828;
}
.facebook-action-row .action-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}
.comment-icon {
    border: 2px solid currentColor;
    border-radius: 50%;
    background: transparent !important;
    clip-path: none !important;
    position: relative;
}
.comment-icon::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -4px;
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-18deg);
    background: #fff;
}
.share-popover {
    position: relative;
    min-width: 0;
}
.share-options {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.share-options form,
.share-options a {
    display: block;
}
.share-options button,
.share-options a {
    width: 100%;
    min-height: 40px;
    display: block;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: #344054;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
}
.share-options form:last-child button,
.share-options a:last-child {
    border-bottom: 0;
}
.share-options button:hover,
.share-options a:hover {
    background: #f2f4f7;
}
.share-sheet summary {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: 0;
    color: #667085;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}
.share-sheet summary::-webkit-details-marker {
    display: none;
}
.share-sheet[open] summary {
    background: #eef4ff;
    color: #175cd3;
}
.share-sheet[open] {
    z-index: 20;
}
.share-sheet[open] > form,
.share-sheet[open] > a {
    position: relative;
    z-index: 21;
    display: block;
    min-width: 190px;
    padding: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: #fff;
}
.share-sheet[open] > form:first-of-type,
.share-sheet[open] > a:first-of-type {
    border-top: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
}
.share-sheet[open] > form:last-child,
.share-sheet[open] > a:last-child {
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
}
.share-sheet a,
.share-sheet form button {
    width: 100%;
    min-height: 40px;
    display: block;
    padding: 10px 12px;
    border: 0;
    background: #fff;
    color: #344054;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
}
.share-sheet a:hover,
.share-sheet form button:hover {
    background: #f2f4f7;
}
.security-settings-form {
    display: grid;
    gap: 10px;
}
.security-settings-form label,
.device-limit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: #344054;
    font-weight: 850;
}
.security-settings-form input[type="number"] {
    max-width: 140px;
    min-height: 40px;
    margin-left: auto;
}
.device-limit-row {
    flex-wrap: wrap;
}
.security-session-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.security-session-row > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-size: 12px;
    font-weight: 950;
}
.security-session-row strong,
.security-session-row small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
.security-session-row small {
    color: var(--muted);
}
.dashboard-social-card img,
.dashboard-task-shortcut img {
    display: none;
}

@media (max-width: 900px) {
    .share-sheet[open] > form,
    .share-sheet[open] > a {
        position: absolute;
        right: 0;
        top: 100%;
        box-shadow: var(--shadow);
    }
    .facebook-action-row .share-sheet[open] > form,
    .facebook-action-row .share-sheet[open] > a {
        right: 0;
    }
    .security-session-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }
    .security-session-row form,
    .security-session-row .status-pill {
        grid-column: 2;
        justify-self: start;
    }
    .security-settings-form label,
    .device-limit-row {
        align-items: flex-start;
    }
}

/* Phase 6E: Facebook-style reel post cards */
.reels-feed-main {
    max-width: 760px;
}
.facebook-reels-list {
    display: grid;
    gap: 12px;
}
.facebook-reel-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.facebook-reel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 8px;
}
.facebook-author {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}
.facebook-author > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-size: 13px;
    font-weight: 950;
}
.facebook-author strong {
    display: block;
    overflow: hidden;
    color: #101828;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.facebook-author small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reel-follow-form button {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #0f766e;
    border-radius: 8px;
    background: #fff;
    color: #0f766e;
    font-weight: 900;
}
.post-more-menu {
    position: relative;
}
.post-more-menu summary {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2f4f7;
    color: #344054;
    font-weight: 950;
    cursor: pointer;
    list-style: none;
}
.post-more-menu summary::-webkit-details-marker {
    display: none;
}
.post-more-menu[open] summary {
    background: #e6f4f1;
}
.post-more-menu form,
.post-more-menu a {
    display: block;
}
.post-more-menu[open]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 8;
}
.post-more-menu[open] > form,
.post-more-menu[open] > a {
    position: relative;
    z-index: 9;
    min-width: 140px;
    padding: 0;
    background: #fff;
}
.post-more-menu button {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #344054;
    font-weight: 850;
    text-align: left;
}
.post-more-menu .danger-text {
    color: #b42318;
}
.facebook-reel-caption {
    margin: 0;
    padding: 0 14px 10px;
    color: #101828;
}
.facebook-reel-media {
    display: grid;
    place-items: center;
    background: #24272c;
}
.facebook-reel-media video {
    display: block;
    width: 100%;
    max-height: 680px;
    object-fit: contain;
    background: #111827;
}
.facebook-reel-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 14px;
    color: var(--muted);
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}
.facebook-action-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}
.facebook-action-row form {
    min-width: 0;
}
.facebook-action-row button {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #667085;
    font-weight: 900;
}
.facebook-action-row button:hover {
    background: #f2f4f7;
    color: #101828;
}
.action-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    background: currentColor;
    opacity: .9;
}
.like-icon {
    clip-path: polygon(50% 18%, 62% 5%, 80% 5%, 95% 20%, 95% 40%, 50% 90%, 5% 40%, 5% 20%, 20% 5%, 38% 5%);
}
.comment-icon {
    border-radius: 50%;
    clip-path: polygon(7% 10%, 93% 10%, 93% 72%, 58% 72%, 34% 95%, 38% 72%, 7% 72%);
}
.share-icon {
    clip-path: polygon(6% 45%, 70% 5%, 70% 30%, 94% 30%, 94% 62%, 70% 62%, 70% 90%);
}

@media (max-width: 900px) {
    .reels-feed-main {
        max-width: 430px;
        padding-inline: 8px;
    }
    .reel-upload-card {
        padding: 10px;
    }
    .facebook-reel-card {
        border-radius: 8px;
    }
    .facebook-reel-head {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
        padding: 10px 10px 7px;
    }
    .facebook-author {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
    }
    .facebook-author > span {
        width: 38px;
        height: 38px;
    }
    .reel-follow-form button {
        min-height: 31px;
        padding: 6px 9px;
        font-size: 12px;
    }
    .post-more-menu summary {
        width: 31px;
        height: 31px;
    }
    .facebook-reel-caption {
        padding: 0 10px 8px;
        font-size: 14px;
    }
    .facebook-reel-media video {
        max-height: 490px;
    }
    .facebook-reel-stats {
        padding: 7px 10px;
        font-size: 12px;
    }
    .facebook-action-row button {
        min-height: 42px;
        gap: 6px;
        font-size: 13px;
    }
    .action-icon {
        width: 18px;
        height: 18px;
    }
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
.app-frame { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }
.social-app-frame {
    display: block;
    min-height: 100vh;
}
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    padding: 18px;
    background: #101828;
    color: #d0d5dd;
}
.brand-block { display: block; color: #fff; margin-bottom: 18px; padding: 12px 10px; }
.side-section { display: grid; gap: 6px; margin: 18px 0; }
.side-section span {
    color: #98a2b3;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0 10px 6px;
}
.side-section a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #eaecf0;
    font-weight: 650;
}
.side-section a:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-main { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 48px);
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.brand { font-weight: 800; color: var(--ink); min-width: 0; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
}
.compact-brand { display: none; }
.navlinks, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.navlinks a { white-space: nowrap; }
.auth-topbar {
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(420px, 1fr) minmax(230px, 360px);
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
}
.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.topbar-right { justify-content: flex-end; }
.app-logo span {
    width: 48px;
    height: 48px;
    border-radius: 999px;
}
.top-search { flex: 1; min-width: 0; }
.top-search input {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: #f0f2f5;
    padding: 10px 16px;
}
.app-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 0;
}
.app-nav a {
    flex: 0 0 auto;
    min-width: 86px;
    min-height: 54px;
    display: grid;
    place-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    color: #344054;
    font-weight: 800;
    border-bottom: 3px solid transparent;
}
.app-nav a:hover {
    background: #f0f2f5;
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.round-action {
    min-width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f0f2f5;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
}
.round-action:hover { background: #e4e6eb; color: var(--primary); }
.account-menu {
    position: relative;
    display: block;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    border: 0;
}
.account-trigger {
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-weight: 900;
}
.account-trigger span { display: block; }
.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 20;
    width: 260px;
    display: none;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 22px 48px rgba(15, 23, 42, .18);
}
.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown { display: grid; }
.account-dropdown strong {
    padding: 10px;
    font-size: 17px;
}
.account-dropdown a,
.account-dropdown button {
    min-height: 40px;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    color: #344054;
    background: transparent;
    border: 0;
    text-align: left;
    font-weight: 750;
    font-size: 14px;
}
.account-dropdown a:hover,
.account-dropdown button:hover { background: #f0f2f5; color: var(--primary); }
.admin-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px clamp(16px, 4vw, 48px);
    background: #101828;
}
.admin-strip a {
    flex: 0 0 auto;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 10px;
    border-radius: 8px;
}
.admin-strip a:hover { background: rgba(255,255,255,.1); color: #fff; }
button, input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
}
button { width: auto; cursor: pointer; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    font-weight: 700;
}
.button.ghost { background: #f3f4f6; color: var(--ink); }
.shell { width: min(1680px, calc(100% - 48px)); margin: 22px auto 64px; }
.app-shell { width: min(1540px, calc(100% - 36px)); }
.hero {
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 28px;
    align-items: center;
}
.public-hero {
    min-height: calc(100vh - 110px);
    display: grid;
    grid-template-columns: minmax(460px, .95fr) minmax(520px, 1.05fr);
    gap: clamp(32px, 4.5vw, 86px);
    align-items: center;
    padding: 32px 0 44px;
}
.hero-copy h1 {
    margin: 0;
    font-size: clamp(58px, 6.6vw, 126px);
    line-height: .92;
    letter-spacing: 0;
}
.hero-copy p { color: var(--muted); font-size: 19px; line-height: 1.75; max-width: 680px; }
.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.hero-metrics div {
    min-width: 126px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.8);
}
.hero-metrics strong { display: block; font-size: 22px; }
.hero-metrics span { color: var(--muted); font-weight: 700; }
.hero-product { display: grid; place-items: center; }
.social-stage {
    position: relative;
    width: min(720px, 100%);
    min-height: 650px;
    padding: 18px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 34px 90px rgba(15, 23, 42, .16);
}
.hero-poster {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    border: 1px solid var(--line);
}
.social-stage .story-strip {
    grid-template-columns: repeat(4, 1fr);
    margin: -34px 18px 16px;
    position: relative;
    z-index: 2;
}
.social-stage .story-strip span {
    min-height: 112px;
    padding: 10px;
    border: 3px solid #fff;
    background: linear-gradient(145deg, #2563eb, #14b8a6 52%, #f59e0b);
    box-shadow: 0 18px 35px rgba(15, 23, 42, .16);
}
.story-strip i {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #fff;
    opacity: .9;
}
.social-post-preview {
    margin: 14px 18px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.post-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.post-head b {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}
.post-head small { display: block; color: var(--muted); margin-top: 2px; }
.post-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
}
.post-actions span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f3f4f6;
    color: #344054;
    font-weight: 800;
    font-size: 13px;
}
.floating-wallet {
    position: absolute;
    right: 8px;
    bottom: 28px;
    width: 210px;
    padding: 18px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    box-shadow: 0 22px 45px rgba(15, 23, 42, .22);
}
.floating-wallet span,
.floating-wallet small { display: block; color: #cbd5e1; }
.floating-wallet strong { display: block; font-size: 28px; margin: 5px 0; }
.phone-frame {
    width: min(380px, 100%);
    min-height: 620px;
    border-radius: 34px;
    padding: 22px;
    background: #111827;
    box-shadow: 0 35px 90px rgba(17, 24, 39, .22);
    color: #fff;
}
.phone-top { width: 88px; height: 8px; border-radius: 999px; background: #374151; margin: 0 auto 24px; }
.story-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.story-strip span { height: 94px; border-radius: 18px; background: linear-gradient(145deg, #14b8a6, #2563eb); }
.feed-card, .wallet-mini {
    border-radius: 18px;
    background: #fff;
    color: var(--ink);
    padding: 18px;
    margin-top: 14px;
}
.feed-card p { color: var(--muted); }
.progress { height: 10px; border-radius: 99px; background: #e5e7eb; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.wallet-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wallet-mini span { display: block; color: var(--muted); }
.wallet-mini strong { font-size: 20px; }
.section-heading {
    display: grid;
    gap: 6px;
    margin: 18px 0;
}
.section-heading h2 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(30px, 5vw, 58px);
    line-height: 1.05;
}
.poster-showcase {
    padding: 24px 0 10px;
}
.poster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.poster-card {
    color: var(--ink);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.poster-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, .42);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .13);
}
.poster-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.poster-grid div { padding: 18px; }
.poster-grid h3 { margin: 0 0 8px; font-size: 22px; }
.poster-grid p { margin: 0; color: var(--muted); line-height: 1.6; }
.social-home-preview {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 270px;
    gap: 16px;
    align-items: start;
    margin: 8px 0 32px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef2f7;
}
.preview-rail,
.preview-panel,
.preview-feed > *,
.feed-demo-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .05);
}
.preview-rail {
    display: grid;
    gap: 6px;
    padding: 14px;
}
.preview-rail strong { padding: 8px 10px; }
.preview-rail a {
    min-height: 38px;
    padding: 10px;
    border-radius: 8px;
    color: #344054;
    font-weight: 800;
}
.preview-rail a:hover,
.preview-rail a:first-of-type { background: var(--soft); color: var(--primary); }
.preview-feed { display: grid; gap: 14px; }
.composer-box {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
}
.composer-box span {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #f59e0b);
}
.composer-box p {
    margin: 0;
    flex: 1;
    padding: 13px 15px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--muted);
}
.preview-stories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.preview-stories div {
    min-height: 132px;
    display: flex;
    align-items: end;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(145deg, rgba(37,99,235,.96), rgba(15,118,110,.94));
}
.preview-stories div:nth-child(2) { background: linear-gradient(145deg, #dc2626, #f59e0b); }
.preview-stories div:nth-child(3) { background: linear-gradient(145deg, #111827, #2563eb); }
.preview-stories div:nth-child(4) { background: linear-gradient(145deg, #0f766e, #84cc16); }
.feed-demo-card { padding: 16px; }
.feed-demo-card p { color: #344054; line-height: 1.6; }
.demo-media {
    min-height: 230px;
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(15,118,110,.9), rgba(37,99,235,.66)),
        url('/assets/social-reward-banner.png') center / cover;
}
.preview-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
}
.preview-panel div {
    padding: 14px;
    border-radius: 8px;
    background: #f8fafc;
}
.preview-panel span { color: var(--muted); font-weight: 800; }
.preview-panel strong { display: block; margin-top: 4px; }
.feature-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 22px 0;
}
.feature-band a {
    color: var(--ink);
    min-height: 240px;
    border-radius: 8px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feature-band a:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, .42);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}
.feature-band span { color: var(--primary); font-weight: 900; }
.feature-band h2 { margin-bottom: 8px; }
.feature-band p { color: var(--muted); line-height: 1.6; }
.public-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
    padding: 54px 0;
}
.public-split h2 { font-size: clamp(32px, 5vw, 58px); line-height: 1; margin: 0 0 14px; }
.public-split p { color: var(--muted); line-height: 1.75; }
.check-list { display: grid; gap: 10px; }
.check-list a {
    display: block;
    margin: 0;
    padding: 15px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.check-list a:hover {
    transform: translateX(4px);
    border-color: rgba(15, 118, 110, .42);
    background: var(--soft);
}
.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: 28px;
    align-items: start;
    padding: 42px 0;
}
.auth-brand-panel {
    min-height: 640px;
    border-radius: 8px;
    padding: clamp(28px, 5vw, 58px);
    background:
        linear-gradient(135deg, rgba(16,24,40,.96), rgba(15,118,110,.82)),
        #101828;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-brand-panel h1 { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: 1; }
.auth-brand-panel p { color: #d0d5dd; line-height: 1.75; font-size: 18px; }
.auth-poster {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.22);
    margin: 18px 0 6px;
}
.auth-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.auth-stats div { padding: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; }
.auth-stats strong { display: block; color: #fff; }
.auth-stats span { color: #98a2b3; }
.auth-mini-feed {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}
.auth-mini-feed div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
}
.auth-mini-feed span {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--gold);
}
.auth-mini-feed p { margin: 0; font-size: 14px; color: #fff; }
.demo-login-box {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
}
.demo-login-box strong { color: #fff; }
.demo-login-box span { color: #e5e7eb; font-size: 14px; overflow-wrap: anywhere; }
.auth-forms { display: grid; gap: 16px; }
.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 32px clamp(16px, 4vw, 48px);
    border-top: 1px solid var(--line);
    background: #fff;
}
.public-footer p { max-width: 560px; color: var(--muted); }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(38px, 7vw, 78px); line-height: 1.02; }
.hero p { max-width: 640px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.eyebrow { color: var(--primary); font-weight: 800; text-transform: uppercase; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.metric-grid div, .card, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .06);
}
.metric-grid div { padding: 22px; min-height: 130px; }
.metric-grid strong, .card strong { display: block; font-size: 28px; }
.metric-grid span, .card span, .row span { color: var(--muted); }
.muted { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.card { padding: 20px; min-height: 130px; }
.panel { padding: 22px; margin: 18px 0; }
.panel.narrow { max-width: 460px; margin-inline: auto; }
.stack { display: grid; gap: 12px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.notice {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: var(--soft);
    color: var(--primary);
    font-weight: 700;
}
.notice.error { background: #fff1f2; color: var(--accent); }
.public-page {
    max-width: 960px;
    margin-inline: auto;
}
.public-page h1 { font-size: clamp(34px, 5vw, 58px); margin-top: 0; }
.page-body {
    color: #344054;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.social-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 18px;
    align-items: stretch;
    margin: 8px 0 18px;
}
.social-dashboard-hero > div:first-child,
.dashboard-referral-card,
.metric-card,
.composer-card,
.quick-action-grid a,
.dashboard-left-panel,
.dashboard-right-panel > section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}
.social-dashboard-hero > div:first-child {
    padding: clamp(24px, 4vw, 46px);
    background:
        linear-gradient(120deg, rgba(15,118,110,.08), rgba(37,99,235,.08)),
        #fff;
}
.social-dashboard-hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1;
}
.social-dashboard-hero p { color: var(--muted); max-width: 780px; line-height: 1.7; }
.dashboard-referral-card {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 24px;
}
.dashboard-referral-card span,
.metric-card span,
.metric-card small { color: var(--muted); font-weight: 750; }
.dashboard-referral-card strong { font-size: 34px; overflow-wrap: anywhere; }
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0;
}
.metric-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    color: var(--ink);
}
.metric-card:hover { border-color: rgba(15,118,110,.42); transform: translateY(-2px); }
.metric-card strong { font-size: clamp(26px, 2.5vw, 38px); overflow-wrap: anywhere; }
.social-dashboard-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}
.dashboard-left-panel {
    position: sticky;
    top: 120px;
    display: grid;
    gap: 6px;
    padding: 12px;
}
.dashboard-left-panel a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: #344054;
    font-weight: 850;
}
.dashboard-left-panel a:hover { background: var(--soft); color: var(--primary); }
.dashboard-feed-column { display: grid; gap: 14px; }
.composer-card { padding: 18px; }
.composer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.composer-head span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-weight: 900;
}
.composer-head small { display: block; color: var(--muted); }
.composer-card textarea {
    min-height: 108px;
    resize: vertical;
    background: #f8fafc;
}
.composer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.quick-action-grid a {
    min-height: 132px;
    display: grid;
    align-content: end;
    gap: 8px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}
.quick-action-grid a:nth-child(2) { background: linear-gradient(135deg, #dc2626, #f59e0b); }
.quick-action-grid a:nth-child(3) { background: linear-gradient(135deg, #111827, #2563eb); }
.quick-action-grid a:nth-child(4) { background: linear-gradient(135deg, #0f766e, #84cc16); }
.quick-action-grid span { color: rgba(255,255,255,.86); line-height: 1.45; }
.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.section-row h2 { margin: 0; }
.task-row-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.task-row-card:last-child { border-bottom: 0; }
.task-row-card span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}
.task-row-card b {
    flex: 0 0 auto;
    color: var(--primary);
}
.dashboard-right-panel {
    position: sticky;
    top: 120px;
    display: grid;
    gap: 14px;
}
.reward-ad-card { overflow: hidden; padding-bottom: 18px; }
.reward-ad-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.reward-ad-card h3,
.reward-ad-card p,
.reward-ad-card .button { margin-left: 16px; margin-right: 16px; }
.reward-ad-card p { color: var(--muted); line-height: 1.55; }
.mini-panel {
    display: grid;
    gap: 8px;
    padding: 16px;
}
.mini-panel h3 { margin: 0 0 4px; }
.mini-panel p { margin: 0; color: var(--muted); line-height: 1.55; }
.mini-panel a:not(.button) {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    color: #344054;
    font-weight: 800;
}
.mini-panel a:hover { background: var(--soft); color: var(--primary); }
.fb-dashboard {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(520px, 740px) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
    max-width: 1460px;
    margin: 0 auto;
}
.fb-left-rail,
.fb-right-rail {
    position: sticky;
    top: 82px;
    display: grid;
    gap: 10px;
}
.fb-left-rail a {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #111827;
    font-weight: 820;
}
.fb-left-rail a:hover { background: #e9edf3; }
.fb-left-rail span,
.fb-post-head span,
.composer-inline span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
.fb-feed { display: grid; gap: 14px; }
.fb-composer,
.fb-post-card,
.fb-task-feed,
.fb-sponsored,
.fb-reward-panel,
.fb-support-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}
.fb-composer { padding: 14px; }
.composer-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}
.composer-inline button {
    flex: 1;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    background: #f0f2f5;
    color: #667085;
    text-align: left;
}
.fb-post-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.fb-post-form textarea {
    min-height: 88px;
    resize: vertical;
    background: #f8fafc;
}
.fb-post-form div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.fb-stories {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.fb-stories a {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    padding: 14px;
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(15,23,42,.06), rgba(15,23,42,.75)),
        url('/assets/digikray-referral-poster.png') center / cover;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}
.fb-stories a:nth-child(2) { background-image: linear-gradient(180deg, rgba(15,23,42,.06), rgba(15,23,42,.75)), url('/assets/digikray-task-reward-poster.png'); }
.fb-stories a:nth-child(3) { background-image: linear-gradient(180deg, rgba(15,23,42,.06), rgba(15,23,42,.75)), url('/assets/digikray-wallet-payout-poster.png'); }
.fb-stories a:nth-child(4) { background-image: linear-gradient(180deg, rgba(15,23,42,.06), rgba(15,23,42,.75)), url('/assets/social-reward-banner.png'); }
.fb-stories strong { text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.fb-stories span { color: rgba(255,255,255,.9); font-size: 13px; }
.fb-post-card { padding: 14px; }
.fb-post-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fb-post-head small { display: block; color: var(--muted); margin-top: 2px; }
.fb-post-card p { color: #344054; line-height: 1.6; }
.fb-post-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 1px solid var(--line);
}
.fb-post-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.fb-post-actions a {
    min-height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f0f2f5;
    color: #344054;
    font-weight: 900;
}
.fb-post-actions a:hover { background: var(--soft); color: var(--primary); }
.fb-task-feed { padding: 16px; }
.fb-task-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: #111827;
}
.fb-task-item:last-child { border-bottom: 0; }
.fb-task-item span { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.fb-task-item b { flex: 0 0 auto; color: var(--primary); }
.fb-right-rail section { padding: 14px; }
.fb-sponsored h3,
.fb-reward-panel h3,
.fb-support-panel h3 { margin: 0 0 12px; color: #667085; }
.fb-sponsored a {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    color: #111827;
}
.fb-sponsored img {
    width: 112px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}
.fb-sponsored span { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.fb-reward-panel {
    display: grid;
    gap: 10px;
}
.fb-reward-panel div {
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}
.fb-reward-panel span { color: var(--muted); font-weight: 780; }
.fb-reward-panel strong { display: block; margin-top: 4px; font-size: 22px; overflow-wrap: anywhere; }
.fb-support-panel {
    display: grid;
    gap: 8px;
}
.fb-support-panel a {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f0f2f5;
    color: #344054;
    font-weight: 850;
}
.fb-support-panel a:hover { background: var(--soft); color: var(--primary); }
.social-page-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(280px, 340px);
    gap: 18px;
    max-width: 1500px;
    margin: 0 auto;
    align-items: start;
}
.social-page-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.page-left-rail,
.page-right-rail { top: 82px; }
.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 6px 0;
}
.page-title-row h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 48px);
}
.page-title-row p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}
.social-section-card,
.task-feed-card,
.person-card,
.community-card,
.product-card,
.referral-hero-card,
.empty-state-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.social-section-card { padding: 18px; }
.task-feed-list { display: grid; gap: 14px; }
.task-feed-card { padding: 18px; }
.task-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}
.task-card-head > span,
.people-row > span,
.person-card > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-weight: 900;
}
.task-card-head h2 { margin: 0 0 6px; }
.task-card-head p { margin: 0; color: #344054; line-height: 1.55; }
.task-card-head strong { color: var(--primary); font-size: 20px; white-space: nowrap; }
.task-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}
.task-meta-row span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f0f2f5;
    color: #344054;
    font-weight: 800;
    font-size: 13px;
}
.proof-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.proof-form textarea,
.proof-form button { grid-column: 1 / -1; }
.people-grid,
.community-grid,
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.people-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.people-row:last-child { border-bottom: 0; }
.people-row small { display: block; color: var(--muted); margin-top: 2px; }
.person-card {
    position: relative;
    overflow: hidden;
    padding: 0 16px 16px;
}
.person-cover,
.community-cover,
.product-media {
    height: 108px;
    margin: 0 -16px 0;
    background:
        linear-gradient(135deg, rgba(15,118,110,.88), rgba(37,99,235,.7)),
        url('/assets/social-reward-banner.png') center / cover;
}
.person-card > span {
    width: 68px;
    height: 68px;
    margin-top: -34px;
    border: 4px solid #fff;
}
.person-card h2,
.community-card h2,
.product-card h2 { margin: 12px 0; font-size: 22px; }
.create-inline-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}
.create-inline-form textarea { min-height: 56px; }
.community-card,
.product-card {
    overflow: hidden;
    padding: 0 16px 16px;
}
.community-cover { margin: 0 -16px; background-image: linear-gradient(135deg, rgba(220,38,38,.8), rgba(245,158,11,.75)), url('/assets/digikray-referral-poster.png'); }
.page-cover { background-image: linear-gradient(135deg, rgba(15,118,110,.82), rgba(132,204,22,.65)), url('/assets/digikray-task-reward-poster.png'); }
.community-card p,
.product-card p { color: var(--muted); line-height: 1.55; }
.polished-reels {
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
}
.empty-state-card {
    padding: 28px;
    text-align: center;
}
.referral-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 22px;
    background:
        linear-gradient(120deg, rgba(15,118,110,.1), rgba(37,99,235,.08)),
        #fff;
}
.referral-hero-card span { color: var(--muted); font-weight: 800; }
.referral-hero-card strong {
    display: block;
    font-size: clamp(34px, 5vw, 62px);
    margin: 4px 0 12px;
    overflow-wrap: anywhere;
}
.wallet-balance-grid,
.wallet-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.wallet-balance-grid div {
    padding: 24px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.wallet-balance-grid span { color: var(--muted); font-weight: 800; }
.wallet-balance-grid strong { display: block; margin-top: 8px; font-size: clamp(34px, 5vw, 58px); }
.product-media {
    background-image: linear-gradient(135deg, rgba(17,24,39,.55), rgba(37,99,235,.55)), url('/assets/digikray-wallet-payout-poster.png');
}
.product-card strong { display: block; font-size: 26px; }
.product-card > span { display: block; color: var(--muted); margin: 8px 0 12px; }
.comment-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 12px;
}
.messenger-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 14px;
    min-height: calc(100vh - 130px);
}
.messenger-list,
.messenger-window {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.messenger-list { padding: 14px; overflow: auto; }
.messenger-list h1,
.messenger-list h2 { margin: 0 0 12px; }
.chat-person-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 8px;
    border-radius: 8px;
    color: #111827;
}
.chat-person-row:hover { background: #f0f2f5; }
.chat-person-row span,
.messenger-head span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-weight: 900;
}
.chat-person-row button {
    border: 0;
    background: var(--soft);
    color: var(--primary);
    font-weight: 850;
}
.messenger-window {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}
.messenger-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.messenger-head h2 { margin: 0; }
.empty-chat-state {
    display: grid;
    place-items: center;
    align-content: center;
    flex: 1;
    color: var(--muted);
}
.profile-cover-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.profile-cover-art {
    min-height: 240px;
    background:
        linear-gradient(120deg, rgba(15,118,110,.32), rgba(37,99,235,.24)),
        url('/assets/social-reward-banner.png') center / cover;
}
.profile-summary {
    display: flex;
    align-items: end;
    gap: 16px;
    padding: 0 22px 22px;
}
.profile-summary > span {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    margin-top: -56px;
    border-radius: 999px;
    border: 5px solid #fff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-size: 38px;
    font-weight: 900;
}
.profile-avatar-img {
    width: 112px;
    height: 112px;
    object-fit: cover;
    margin-top: -56px;
    border-radius: 999px;
    border: 5px solid #fff;
    background: #fff;
}
.profile-summary h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); }
.profile-summary p { margin: 6px 0 0; color: var(--muted); }
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.toast-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100;
    display: grid;
    gap: 8px;
}
.toast {
    min-width: 220px;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
    font-weight: 800;
}
.toast.error { background: #dc2626; }
.js-action-form button:disabled {
    opacity: .7;
    cursor: wait;
}
.js-action-form.is-done button {
    box-shadow: inset 0 0 0 2px rgba(15,118,110,.18);
}
.mobile-bottom-nav { display: none; }
.reaction-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}
.reaction-row form { flex: 0 0 auto; }
.reaction-row button {
    border: 0;
    border-radius: 999px;
    background: #f0f2f5;
    color: #344054;
    font-weight: 850;
    padding: 8px 12px;
}
.share-actions {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.share-actions form,
.share-actions button { width: 100%; }
.social-tabs,
.profile-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
}
.social-tabs a,
.profile-tabs a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f0f2f5;
    color: #344054;
    font-weight: 850;
}
.social-tabs a:hover,
.profile-tabs a:hover { background: var(--soft); color: var(--primary); }
.status-pill {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    white-space: nowrap;
}
.chat-attachment {
    display: block;
    max-width: min(360px, 100%);
    border-radius: 8px;
    margin-top: 8px;
}
.file-attachment {
    display: inline-flex;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f0f2f5;
    color: #344054;
    font-weight: 850;
}
.typing-row {
    padding: 6px 16px;
    color: var(--muted);
    font-size: 13px;
}
.media-chat-form {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto;
}
.notification-list { display: grid; gap: 10px; }
.notification-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}
.notification-row > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-weight: 900;
}
.notification-row p { margin: 4px 0; color: #344054; }
.notification-row small { color: var(--muted); }
.vertical-reels {
    height: calc(100vh - 170px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    display: grid;
    gap: 18px;
}
.vertical-reel-card {
    position: relative;
    min-height: min(760px, calc(100vh - 190px));
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #111827;
    overflow: hidden;
    scroll-snap-align: start;
}
.vertical-reel-card video {
    width: min(420px, 100%);
    height: 100%;
    max-height: calc(100vh - 190px);
    object-fit: cover;
    background: #000;
}
.reel-caption {
    position: absolute;
    left: 18px;
    bottom: 18px;
    max-width: 68%;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.reel-action-rail {
    position: absolute;
    right: 14px;
    bottom: 18px;
    display: grid;
    gap: 8px;
    justify-items: center;
}
.reel-action-rail button,
.reel-action-rail span {
    min-width: 58px;
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #111827;
    font-weight: 850;
    font-size: 12px;
}
@media (max-width: 760px) {
    .app-frame { grid-template-columns: 1fr; }
    .auth-topbar {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 8px;
        padding: 8px 10px 0;
        background: #fff;
    }
    .topbar-left {
        width: 100%;
        order: 1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px;
    }
    .app-logo span {
        width: 44px;
        height: 44px;
    }
    .top-search { min-width: 0; }
    .top-search input {
        min-height: 44px;
        font-size: 15px;
    }
    .app-nav {
        width: 100%;
        order: 2;
        justify-content: flex-start;
        gap: 0;
        padding: 2px 0 0;
        border-top: 1px solid #f0f2f5;
    }
    .app-nav a {
        min-width: 78px;
        min-height: 44px;
        border-radius: 0;
        font-size: 15px;
        border-bottom-width: 3px;
    }
    .topbar-right {
        width: 100%;
        order: 3;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 8px 0 10px;
        scrollbar-width: none;
    }
    .topbar-right::-webkit-scrollbar,
    .app-nav::-webkit-scrollbar,
    .page-left-rail::-webkit-scrollbar { display: none; }
    .account-dropdown { left: 0; right: auto; }
    .round-action { min-width: 42px; height: 42px; }
    .social-dashboard-hero,
    .dashboard-metrics,
    .social-dashboard-grid,
    .quick-action-grid,
    .fb-dashboard,
    .fb-stories { grid-template-columns: 1fr; }
    .dashboard-left-panel,
    .dashboard-right-panel,
    .fb-right-rail { position: static; }
    .fb-left-rail,
    .page-left-rail {
        position: static;
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 10px 2px 12px;
        margin: -4px 0 2px;
        background: transparent;
    }
    .fb-left-rail a,
    .page-left-rail a {
        min-width: 76px;
        min-height: 74px;
        flex: 0 0 auto;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: 5px;
        padding: 7px 6px;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
        font-size: 12px;
        line-height: 1.15;
        text-align: center;
    }
    .fb-left-rail span,
    .page-left-rail span {
        width: 38px;
        height: 38px;
        margin: 0;
    }
    .fb-sponsored a { grid-template-columns: 92px minmax(0, 1fr); }
    .fb-sponsored img { width: 92px; }
    .social-page-shell,
    .messenger-layout,
    .wallet-balance-grid,
    .wallet-actions-grid,
    .referral-hero-card,
    .settings-grid { grid-template-columns: 1fr; }
    .page-left-rail,
    .page-right-rail { position: static; }
    .page-title-row { align-items: flex-start; flex-direction: column; }
    .proof-form,
    .create-inline-form,
    .comment-inline-form { grid-template-columns: 1fr; }
    .people-row,
    .task-card-head { grid-template-columns: auto minmax(0, 1fr); }
    .people-row form,
    .task-card-head strong { grid-column: 1 / -1; }
    .composer-actions { grid-template-columns: 1fr; }
    .fb-post-form div { grid-template-columns: 1fr; }
    .fb-dashboard,
    .social-page-shell {
        gap: 10px;
        width: min(100%, 640px);
        padding: 0 8px;
    }
    .app-shell {
        width: 100%;
        margin-top: 10px;
    }
    .fb-feed,
    .social-page-main {
        gap: 10px;
    }
    .fb-composer,
    .fb-post-card,
    .fb-task-feed,
    .social-section-card,
    .task-feed-card,
    .referral-hero-card,
    .wallet-balance-grid div,
    .messenger-list,
    .messenger-window {
        border-radius: 8px;
        box-shadow: 0 1px 5px rgba(15, 23, 42, .1);
    }
    .fb-stories {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }
    .fb-stories::-webkit-scrollbar { display: none; }
    .fb-stories a {
        min-width: 132px;
        min-height: 190px;
        flex: 0 0 auto;
    }
    .fb-post-card img {
        border-radius: 8px;
    }
    .page-title-row {
        padding: 6px 2px 2px;
    }
    .page-title-row h1 {
        font-size: 30px;
    }
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        min-height: 58px;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.98);
        border-top: 1px solid var(--line);
        box-shadow: 0 -8px 24px rgba(15,23,42,.08);
    }
    .mobile-bottom-nav a {
        display: grid;
        place-items: center;
        color: #344054;
        font-size: 12px;
        font-weight: 850;
    }
    .mobile-bottom-nav a:hover { color: var(--primary); }
    body { padding-bottom: 66px; }
    .media-chat-form {
        grid-template-columns: 1fr;
    }
    .vertical-reels {
        height: calc(100vh - 210px);
    }
    .vertical-reel-card {
        min-height: calc(100vh - 230px);
    }
    .reel-caption { max-width: 62%; }
    .sidebar {
        position: static;
        height: auto;
        display: grid;
        gap: 10px;
        padding: 12px;
    }
    .brand-block { margin: 0; }
    .side-section { display: flex; overflow-x: auto; margin: 0; padding-bottom: 4px; }
    .side-section span { display: none; }
    .side-section a { white-space: nowrap; background: rgba(255,255,255,.06); }
    .topbar { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
    .brand-mark { align-items: flex-start; }
    .brand-mark span { flex: 0 0 auto; }
    .navlinks { width: 100%; gap: 8px; }
    .navlinks a, .navlinks .button { font-size: 14px; }
    .compact-brand { display: inline-flex; }
    .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 24px; }
    .public-hero, .auth-layout, .public-split, .social-home-preview { grid-template-columns: 1fr; }
    .social-stage { min-height: auto; }
    .social-stage .story-strip, .social-post-preview { margin-left: 0; margin-right: 0; }
    .social-stage .story-strip { grid-template-columns: repeat(2, 1fr); margin-top: 12px; }
    .floating-wallet { position: static; width: 100%; margin-top: 14px; }
    .preview-rail { grid-template-columns: repeat(2, 1fr); }
    .preview-rail strong { grid-column: 1 / -1; }
    .preview-stories { grid-template-columns: repeat(2, 1fr); }
    .poster-grid { grid-template-columns: 1fr; }
    .post-actions { grid-template-columns: repeat(2, 1fr); }
    .phone-frame { min-height: auto; }
    .feature-band { grid-template-columns: 1fr; }
    .auth-brand-panel { min-height: auto; }
    .auth-stats { grid-template-columns: 1fr; }
    .public-footer { flex-direction: column; }
    .metric-grid { grid-template-columns: 1fr; }
    .row { align-items: flex-start; flex-direction: column; }
}
@media (min-width: 761px) and (max-width: 1080px) {
    .social-home-preview { grid-template-columns: 180px minmax(0, 1fr); }
    .preview-panel { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
    .poster-grid { grid-template-columns: 1fr 1fr; }
    .auth-topbar { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); }
    .topbar-right { grid-column: 1 / -1; justify-content: flex-start; }
    .social-dashboard-grid { grid-template-columns: 180px minmax(0, 1fr); }
    .dashboard-right-panel { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); position: static; }
    .dashboard-metrics,
    .quick-action-grid { grid-template-columns: repeat(2, 1fr); }
    .fb-dashboard { grid-template-columns: 190px minmax(0, 1fr); }
    .fb-right-rail { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); position: static; }
    .fb-stories { grid-template-columns: repeat(4, 1fr); }
    .social-page-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .page-right-rail { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); position: static; }
    .create-inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wallet-actions-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
}
.chat-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.chat-list { max-height: 78vh; overflow: auto; }
.chat-window { min-height: 70vh; display: flex; flex-direction: column; }
.messages { display: grid; gap: 10px; align-content: start; flex: 1; overflow: auto; padding: 8px 0; }
.message { max-width: min(680px, 86%); padding: 12px 14px; border-radius: 8px; background: #f3f4f6; }
.message.mine { justify-self: end; background: var(--soft); }
.message span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.message p { margin: 0; line-height: 1.55; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 220px; background: linear-gradient(135deg, #fff, #eef7f6); }
.reel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.reel-card video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: #111827; }
.story-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}
.story-card {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 12px;
    display: grid;
    align-content: end;
    gap: 8px;
}
.story-card img,
.story-card video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-card strong,
.story-card small {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,.55);
}
.add-story {
    align-content: start;
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}
.add-story strong,
.add-story small {
    color: var(--text);
    text-shadow: none;
}
.post-media {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    margin: 8px 0;
}
.post-stats {
    color: var(--muted);
    font-weight: 800;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.comments-list {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}
.comment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    background: #f8fafc;
}
.comment-row span {
    color: #475467;
}
.comment-row form {
    margin-left: auto;
}
.share-actions form,
.reel-action-rail form {
    display: inline-flex;
}
.share-actions button,
.reel-action-rail button,
.comment-row button,
.message-delete button {
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    color: #344054;
    background: #f2f4f7;
    font-weight: 850;
    cursor: pointer;
}
.attach-picker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 8px;
    padding: 0 16px;
    background: #eef4ff;
    color: #175cd3;
    font-weight: 900;
    cursor: pointer;
}
.attach-picker input {
    display: none;
}
.attachment-drawer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, minmax(72px, 1fr));
    gap: 8px;
}
.attachment-drawer span {
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background: #f8fafc;
    color: #344054;
    font-weight: 850;
}
.settings-check-grid,
.compact-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.settings-check-grid label,
.compact-settings label {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 850;
}
.page-back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #344054;
    padding: 9px 12px;
    font-weight: 900;
    cursor: pointer;
}
.profile-quick-upload {
    position: relative;
}
.clickable-upload {
    cursor: pointer;
    display: block;
}
.clickable-upload input,
.avatar-upload-label input {
    display: none;
}
.clickable-upload span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    border-radius: 8px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    padding: 10px 12px;
    font-weight: 900;
}
.floating-save {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 3;
}
.avatar-upload-form {
    display: grid;
    gap: 8px;
    justify-items: center;
}
.avatar-upload-label {
    position: relative;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}
.avatar-upload-label b {
    position: absolute;
    right: -8px;
    bottom: -2px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    padding: 6px 8px;
    font-size: 12px;
}
.file-tile {
    display: grid;
    gap: 8px;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
    font-weight: 900;
}
.campaign-admin-card {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.post-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}
.post-meta-strip span,
.poll-box button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 8px 10px;
    font-weight: 850;
}
.poll-box {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}
.inline-edit-panel {
    display: inline-grid;
    gap: 8px;
}
.inline-edit-panel form {
    display: grid;
    gap: 8px;
    min-width: min(420px, 86vw);
}
.story-viewer {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}
.story-viewer-card {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}
.story-viewer-media img,
.story-viewer-media video {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 8px;
    background: #0f172a;
}
.page-logo-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 3px solid #fff;
    border-radius: 8px;
    margin-top: -34px;
    box-shadow: var(--shadow-sm);
}
.vertical-reels {
    scroll-snap-type: y mandatory;
}
.vertical-reel-card {
    scroll-snap-align: start;
}
@media (max-width: 860px) {
    .chat-layout { grid-template-columns: 1fr; }
    .chat-window { min-height: 60vh; }
    .chat-form { grid-template-columns: 1fr; }
    .profile-hero { align-items: flex-start; flex-direction: column; }
    .attachment-drawer { grid-template-columns: repeat(3, 1fr); }
    .comment-row { align-items: flex-start; flex-direction: column; }
    .comment-row form { margin-left: 0; }
    .floating-save { position: static; margin: 10px; }
    .clickable-upload span { left: 12px; right: auto; }
    .story-viewer-card { grid-template-columns: 1fr; padding: 10px; }
}

/* Chat and composer final polish */
.chat-page-shell .messenger-layout {
    grid-template-columns: minmax(260px, 380px) minmax(320px, 430px);
    justify-content: center;
    align-items: start;
    gap: 14px;
    max-width: 980px;
    margin-inline: auto;
}
.chat-page-shell .messenger-list {
    max-height: calc(100vh - 140px);
    overflow: auto;
}
.chat-page-shell .messenger-window {
    width: min(100%, 430px);
    aspect-ratio: 9 / 16;
    min-height: 620px;
    max-height: calc(100vh - 138px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    overflow: hidden;
}
.messenger-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
}
.messenger-head .chat-avatar-lg,
.chat-person-row span {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-weight: 900;
}
.chat-title-block h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}
.chat-title-block small {
    color: var(--muted);
    font-weight: 700;
}
.chat-head-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.chat-head-actions .button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}
.messenger-window .messages {
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    background: #f8fafc;
}
.messenger-window .message {
    width: fit-content;
    max-width: 76%;
    padding: 8px 10px;
    border-radius: 12px 12px 12px 4px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: none;
}
.messenger-window .message.mine {
    align-self: flex-end;
    border-radius: 12px 12px 4px 12px;
    background: #e7f6f3;
}
.messenger-window .message > span {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.2;
    color: #667085;
    font-weight: 850;
}
.messenger-window .message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}
.message-delete button {
    margin-top: 5px;
    padding: 4px 8px;
    font-size: 12px;
}
.chat-attachment {
    max-width: 100%;
    max-height: 210px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 6px;
}
.media-preview {
    margin-top: 6px;
}
.media-preview summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 900;
}
.pdf-preview {
    width: 100%;
    height: 220px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.file-card {
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
    color: #344054;
    font-weight: 850;
}
.download-link {
    display: inline-flex;
    margin-top: 6px;
    font-weight: 900;
    color: var(--primary);
}
.chat-media-card {
    position: relative;
    overflow: hidden;
    min-width: min(220px, 72vw);
    max-width: min(320px, 76vw);
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.chat-media-card .chat-attachment {
    display: block;
    width: 100%;
    max-height: 260px;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
}
.media-blur-preview {
    filter: saturate(.9) brightness(.92);
}
.media-download-overlay {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 82px;
    min-height: 82px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 0;
    border-radius: 18px;
    background: rgba(15, 23, 42, .62);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.media-download-overlay small {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    font-size: 11px;
    font-weight: 900;
}
.download-circle {
    --progress: 0%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(15, 23, 42, .86) 0 58%, transparent 60%),
        conic-gradient(var(--gold) var(--progress), rgba(255, 255, 255, .5) 0);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
}
.download-circle b {
    color: #fff;
    font-size: 16px;
    line-height: 1;
}
.media-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
}
.chat-media-card.media-ready .media-download-overlay {
    opacity: .18;
    transform: translate(-50%, -50%) scale(.84);
}
.chat-media-card.media-ready .media-download-overlay:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.media-card-actions button,
.media-card-actions a {
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
}
.media-card-actions :last-child {
    border-right: 0;
}
.audio-file-card,
.pdf-file-card {
    min-height: 110px;
    display: grid;
    align-content: center;
}
.media-lightbox,
.chat-forward-modal {
    width: min(92vw, 900px);
    max-height: 92vh;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .34);
}
.media-lightbox::backdrop,
.chat-forward-modal::backdrop {
    background: rgba(15, 23, 42, .72);
}
.media-lightbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}
.media-lightbox-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.media-lightbox-body {
    min-height: 240px;
    max-height: calc(92vh - 128px);
    display: grid;
    place-items: center;
    overflow: auto;
    background: #0b1220;
}
.media-lightbox-body img,
.media-lightbox-body video {
    max-width: 100%;
    max-height: calc(92vh - 140px);
    object-fit: contain;
}
.media-lightbox-body audio {
    width: min(520px, 88vw);
}
.media-lightbox-body iframe {
    width: min(880px, 90vw);
    height: min(720px, 75vh);
    border: 0;
    background: #fff;
}
.lightbox-file-card {
    padding: 28px;
    border-radius: 14px;
    background: #fff;
    color: #101828;
    font-weight: 950;
}
.media-lightbox-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
}

/* Phase 10: platform polish, profile visibility, PWA and responsive fixes */
.auth-topbar {
    background: rgba(255, 255, 255, .98);
    color: #101828;
}
.auth-topbar .desktop-nav a,
.auth-topbar .round-action,
.auth-topbar .menu-toggle {
    color: #123a60;
}
.auth-topbar .round-action svg,
.auth-topbar .menu-toggle svg,
.mobile-icon-nav svg {
    stroke: currentColor;
}
.auth-topbar .round-action,
.auth-topbar .menu-toggle {
    background: #eef4fb;
    border: 1px solid rgba(18, 58, 96, .12);
}
.auth-topbar .round-action:hover,
.auth-topbar .menu-toggle:hover,
.mobile-icon-nav a:hover {
    color: #fff;
    background: #123a60;
}
.mini-avatar,
.fb-post-head > span,
.profile-avatar-xl,
.account-trigger span,
.drawer-profile span,
.fb-left-rail a span {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.fb-post-head > span.mini-avatar {
    color: #fff;
}
.media-aspect {
    max-height: none;
}
.media-aspect-9-16 {
    max-width: min(420px, 100%);
    margin-inline: auto;
}
.media-aspect-16-9 {
    aspect-ratio: 16 / 9;
}
.media-aspect-original {
    width: 100%;
    height: auto;
    max-height: 780px;
    object-fit: contain;
}
.profile-media-panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.profile-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.profile-media-tile {
    position: relative;
    min-height: 120px;
    display: grid;
    align-items: end;
    overflow: hidden;
    border-radius: 8px;
    background: #eef4fb;
    color: #fff;
    text-decoration: none;
}
.profile-media-tile img,
.profile-media-tile video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-media-tile span,
.profile-media-tile strong {
    position: relative;
    z-index: 1;
    padding: 8px;
    background: linear-gradient(180deg, transparent, rgba(15,23,42,.72));
    font-weight: 900;
}
.dashboard-story-strip .story-card {
    min-width: 150px;
}
.fb-dashboard .fb-feed {
    min-width: 0;
}
.fb-post-card .post-media {
    border-radius: 8px;
}
@media (min-width: 821px) {
    .auth-topbar {
        display: grid !important;
        grid-template-columns: minmax(250px, 360px) minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 18px !important;
        min-height: 76px !important;
        height: auto !important;
        padding: 12px 22px !important;
    }
    .auth-topbar .desktop-nav {
        display: flex !important;
        justify-content: center;
        gap: 12px;
    }
    .auth-topbar .topbar-right {
        display: flex !important;
        gap: 8px !important;
    }
    .auth-topbar .top-search {
        max-width: 330px !important;
    }
    .mobile-icon-nav,
    .mobile-bottom-nav {
        display: none !important;
    }
    .fb-dashboard {
        grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(250px, 330px);
        max-width: 1220px;
        margin: 0 auto;
    }
    .social-page-shell {
        max-width: 1220px;
        margin: 0 auto;
    }
    .public-profile-card,
    .profile-media-panel,
    .profile-timeline {
        max-width: 900px;
    }
}
@media (max-width: 820px) {
    .auth-topbar {
        background: #fff !important;
    }
    .mobile-icon-nav {
        background: #fff !important;
    }
    .mobile-icon-nav a {
        color: #123a60 !important;
        background: #fff !important;
    }
    .mobile-icon-nav a:hover,
    .mobile-icon-nav a:active {
        background: #eef4fb !important;
        color: #123a60 !important;
    }
    .fb-dashboard,
    .social-page-shell {
        display: block !important;
        width: 100%;
        max-width: 100%;
    }
    .fb-left-rail,
    .fb-right-rail,
    .social-page-shell > .social-left-rail,
    .social-page-shell > .social-right-rail {
        display: none !important;
    }
    .fb-feed,
    .social-page-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .fb-post-card,
    .fb-composer,
    .fb-task-feed,
    .profile-media-panel,
    .public-profile-card {
        border-radius: 8px;
    }
    .media-aspect-9-16 {
        max-width: min(100%, 360px);
    }
    .profile-media-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Phase 11: admin API bridge settings, protected profile media and avatar fixes */
.api-settings-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(18, 58, 96, .08), rgba(207, 155, 48, .14));
    box-shadow: 0 16px 45px rgba(15, 23, 42, .08);
}
.api-settings-dashboard h1 {
    margin: 0 0 8px;
}
.api-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.api-provider-card,
.api-verify-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}
.api-provider-card input,
.api-provider-card select,
.api-provider-card textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}
.api-provider-card p,
.api-verify-card small {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.4;
}
.api-provider-card .section-row span,
.api-verify-card span {
    padding: 4px 9px;
    border-radius: 99px;
    background: #f2f4f7;
    color: #123a60;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.api-save-card {
    align-content: center;
    background: linear-gradient(135deg, #123a60, #0f766e);
    color: #fff;
}
.api-save-card p {
    color: rgba(255, 255, 255, .8);
}
.api-verify-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.chat-list-avatar,
.chat-avatar-lg,
.profile-avatar-xl,
.mini-avatar,
.account-trigger span,
.drawer-profile span {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.protected-avatar,
.protected-profile-cover,
[data-protected-media],
.protected-media-img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}
.protected-profile-cover {
    display: block;
    width: 100%;
    min-height: 260px;
    padding: 0;
    border: 0;
    cursor: pointer;
    background-color: #dfe7ef;
    background-size: cover;
    background-position: center;
}
button.profile-avatar-xl {
    border: 4px solid #fff;
    cursor: pointer;
}
.profile-media-viewer {
    width: min(92vw, 620px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
}
.profile-media-viewer::backdrop {
    background: rgba(15, 23, 42, .76);
    backdrop-filter: blur(4px);
}
.profile-media-viewer-card {
    overflow: hidden;
    border-radius: 14px;
    background: #07111f;
    color: #fff;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .4);
}
.profile-media-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}
.profile-media-viewer-head button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}
.profile-media-viewer img {
    display: block;
    width: 100%;
    max-height: 76vh;
    object-fit: contain;
    background: #000;
    pointer-events: none;
}
.profile-media-viewer p {
    margin: 0;
    padding: 10px 14px 14px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}
@media (max-width: 980px) {
    .api-settings-dashboard,
    .api-settings-grid,
    .api-verify-grid {
        grid-template-columns: 1fr;
    }
    .protected-profile-cover {
        min-height: 170px;
    }
}
.chat-forward-modal form {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}
.chat-forward-modal label {
    margin-top: 8px;
    color: #344054;
    font-weight: 900;
}
.chat-forward-modal select,
.chat-forward-modal textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
}
.unread-badge,
.badge-action b {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #12b76a;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
}
.chat-person-row .unread-badge {
    margin-left: auto;
}
.badge-action {
    position: relative;
}
.badge-action b {
    position: absolute;
    right: -4px;
    top: -5px;
}
.mobile-icon-nav,
.mobile-side-menu {
    display: none;
}
.menu-toggle {
    border: 0;
    cursor: pointer;
}
.share-menu {
    position: relative;
    display: inline-grid;
}
.share-menu summary {
    cursor: pointer;
    font-weight: 900;
    color: #344054;
}
.share-menu[open] {
    z-index: 10;
}
.share-menu[open]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
}
.share-menu form,
.share-menu a {
    min-width: 160px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-top: 0;
    background: #fff;
    color: #344054;
    font-weight: 850;
}
.group-detail-hero {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.group-detail-hero .community-cover {
    min-height: 240px;
}
@media (max-width: 820px) {
    .auth-topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        min-height: 66px;
        padding: 8px 12px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 8px;
    }
    .topbar-left {
        gap: 8px;
    }
    .top-search {
        max-width: none;
    }
    .top-search input {
        min-height: 42px;
        border-radius: 999px;
    }
    .desktop-nav {
        display: none;
    }
    .topbar-right {
        display: flex;
        gap: 6px;
    }
    .topbar-right .round-action {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }
    .topbar-right .round-action::first-letter {
        font-size: 13px;
    }
    .topbar-right .round-action[title="Shop"]::before { content: "Sh"; font-size: 12px; }
    .topbar-right .round-action[title="Chat"]::before { content: "Ch"; font-size: 12px; }
    .topbar-right .round-action[title="Notifications"]::before { content: "Nt"; font-size: 12px; }
    .topbar-right .round-action[title="Referrals"]::before { content: "Rf"; font-size: 12px; }
    .topbar-right .menu-toggle::before { content: "☰"; font-size: 20px; }
    .mobile-icon-nav {
        position: sticky;
        top: 66px;
        z-index: 25;
        display: grid;
        grid-template-columns: repeat(7, minmax(54px, 1fr));
        gap: 0;
        border-bottom: 1px solid var(--line);
        background: #fff;
        overflow-x: auto;
    }
    .mobile-icon-nav a {
        position: relative;
        min-height: 54px;
        display: grid;
        place-items: center;
        color: #344054;
        font-size: 12px;
        font-weight: 900;
        text-align: center;
        border-bottom: 3px solid transparent;
    }
    .mobile-icon-nav a:active,
    .mobile-icon-nav a:hover {
        color: var(--primary);
        border-bottom-color: var(--primary);
        background: #f8fafc;
    }
    .mobile-icon-nav b {
        position: absolute;
        right: 6px;
        top: 4px;
        border-radius: 999px;
        background: #12b76a;
        color: #fff;
        padding: 1px 5px;
        font-size: 10px;
    }
    .mobile-side-menu {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 60;
        width: min(84vw, 340px);
        display: grid;
        align-content: start;
        gap: 8px;
        padding: 18px;
        background: #fff;
        box-shadow: -20px 0 50px rgba(15, 23, 42, .18);
        transform: translateX(105%);
        transition: transform .2s ease;
    }
    .mobile-side-menu.is-open {
        transform: translateX(0);
    }
    .mobile-side-menu a,
    .mobile-side-menu button {
        width: 100%;
        min-height: 44px;
        border: 0;
        border-radius: 8px;
        padding: 10px 12px;
        background: #f2f4f7;
        color: #101828;
        text-align: left;
        font-weight: 900;
    }
    .app-shell {
        padding-top: 12px;
    }
    .page-left-rail {
        display: none;
    }
    .social-page-shell {
        grid-template-columns: 1fr;
        padding-inline: 10px;
    }
    .fb-feed,
    .social-page-main {
        width: 100%;
        max-width: 100%;
    }
    .fb-composer,
    .fb-post-card,
    .social-section-card,
    .community-card,
    .vertical-reel-card {
        border-radius: 8px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    }
    .story-strip {
        overflow-x: auto;
        grid-auto-flow: column;
        grid-auto-columns: minmax(130px, 42vw);
    }
    .create-inline-form {
        grid-template-columns: 1fr;
    }
    .people-row {
        align-items: flex-start;
        gap: 10px;
    }
    .people-row .actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .vertical-reel-card video {
        aspect-ratio: 9 / 16;
        object-fit: cover;
        background: #101828;
    }
}

/* Mobile header grid hard fix: logo | search | actions, no wrapping into nav row */
@media (max-width: 820px) {
    .auth-topbar {
        display: grid !important;
        grid-template-columns: 38px minmax(0, 1fr) auto !important;
        grid-template-areas: "logo search actions";
        align-items: center !important;
        column-gap: 7px !important;
        row-gap: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 54px !important;
        height: 54px !important;
        overflow: visible !important;
    }
    .auth-topbar .topbar-left {
        display: contents !important;
    }
    .auth-topbar .app-logo {
        grid-area: logo;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
    }
    .auth-topbar .app-logo span {
        width: 38px !important;
        height: 38px !important;
    }
    .auth-topbar .top-search {
        grid-area: search;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    .auth-topbar .top-search input {
        width: 100% !important;
        min-width: 0 !important;
        height: 36px !important;
        min-height: 36px !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .auth-topbar .topbar-right {
        grid-area: actions;
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: 36px;
        align-items: center;
        justify-content: end;
        gap: 5px !important;
        width: auto !important;
        min-width: 118px !important;
        max-width: 118px !important;
        overflow: visible !important;
    }
    .auth-topbar .chat-action,
    .auth-topbar .bell-action,
    .auth-topbar .menu-toggle {
        display: inline-grid !important;
    }
    .auth-topbar .shop-action,
    .auth-topbar .ref-action,
    .auth-topbar .account-menu,
    .auth-topbar .desktop-nav {
        display: none !important;
    }
    .auth-topbar .round-action,
    .auth-topbar .menu-toggle {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        overflow: visible !important;
    }
    .mobile-icon-nav {
        top: 54px !important;
        grid-template-columns: repeat(7, minmax(44px, 1fr)) !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }
    .mobile-icon-nav a {
        min-width: 44px !important;
        width: auto !important;
        overflow: visible !important;
    }
    .mobile-icon-nav a svg {
        width: 21px !important;
        height: 21px !important;
    }
    .mobile-side-menu {
        right: 0 !important;
        left: auto !important;
        transform: translateX(105%) !important;
    }
    .mobile-side-menu.is-open {
        transform: translateX(0) !important;
    }
}

@media (max-width: 380px) {
    .auth-topbar {
        grid-template-columns: 36px minmax(0, 1fr) auto !important;
        column-gap: 5px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    .auth-topbar .app-logo,
    .auth-topbar .app-logo span,
    .auth-topbar .round-action,
    .auth-topbar .menu-toggle {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
    }
    .auth-topbar .topbar-right {
        grid-auto-columns: 34px;
        min-width: 112px !important;
        max-width: 112px !important;
        gap: 5px !important;
    }
}

.mobile-preview-studio {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
}
.preview-controls {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.preview-controls h1 {
    margin: 0;
}
.preview-controls p {
    margin: 0;
    color: var(--muted);
}
.preview-controls label {
    display: grid;
    gap: 6px;
    font-weight: 900;
}
.phone-preview-wrap {
    min-height: 80vh;
    display: grid;
    place-items: start center;
    overflow: auto;
    padding: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #eef4ff, #f8fafc);
}
.phone-frame {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    border: 12px solid #101828;
    border-radius: 34px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}
.phone-speaker {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 2;
    width: 86px;
    height: 18px;
    border-radius: 999px;
    background: #101828;
    transform: translateX(-50%);
}
.phone-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
@media (max-width: 900px) {
    .mobile-preview-studio {
        grid-template-columns: 1fr;
    }
    .preview-controls {
        position: static;
    }
}

/* Mobile compact shell override */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}
@media (max-width: 820px) {
    .social-app-frame,
    .app-frame,
    .app-shell,
    .shell {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    .auth-topbar {
        position: sticky;
        top: 0;
        z-index: 80;
        min-height: 54px;
        height: 54px;
        padding: max(6px, env(safe-area-inset-top)) 8px 6px;
        display: flex;
        align-items: center;
        gap: 7px;
        border-bottom: 1px solid rgba(16, 24, 40, .08);
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(12px);
    }
    .auth-topbar .topbar-left {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 7px;
    }
    .auth-topbar .app-logo {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        min-width: 36px;
        padding: 0;
        border-radius: 50%;
        overflow: hidden;
    }
    .auth-topbar .app-logo span {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-size: 12px;
    }
    .auth-topbar .app-logo {
        font-size: 0;
    }
    .auth-topbar .top-search {
        flex: 1 1 auto;
        min-width: 94px;
        max-width: clamp(118px, 42vw, 190px);
        position: relative;
    }
    .auth-topbar .top-search::before {
        content: "";
        position: absolute;
        left: 11px;
        top: 50%;
        width: 13px;
        height: 13px;
        border: 2px solid #667085;
        border-radius: 50%;
        transform: translateY(-50%);
        opacity: .8;
    }
    .auth-topbar .top-search::after {
        content: "";
        position: absolute;
        left: 23px;
        top: 29px;
        width: 7px;
        height: 2px;
        border-radius: 999px;
        background: #667085;
        transform: rotate(45deg);
    }
    .auth-topbar .top-search input {
        width: 100%;
        min-height: 36px;
        height: 36px;
        border: 0;
        border-radius: 999px;
        padding: 0 10px 0 34px;
        background: #f2f4f7;
        font-size: 13px;
        font-weight: 700;
    }
    .auth-topbar .topbar-right {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: max-content;
    }
    .desktop-nav,
    .auth-topbar .shop-action,
    .auth-topbar .ref-action,
    .auth-topbar .account-menu {
        display: none !important;
    }
    .auth-topbar .round-action,
    .auth-topbar .menu-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        padding: 0;
        display: inline-grid;
        place-items: center;
        border: 0;
        border-radius: 50%;
        background: #f2f4f7;
        color: #101828;
        font-size: 0;
        line-height: 1;
    }
    .auth-topbar .chat-action::before {
        content: "\1F4AC";
        font-size: 18px;
    }
    .auth-topbar .bell-action::before {
        content: "\1F514";
        font-size: 18px;
    }
    .auth-topbar .menu-toggle::before {
        content: "\2630";
        font-size: 19px;
        font-weight: 900;
    }
    .badge-action b {
        right: -2px;
        top: -4px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 10px;
    }
    .mobile-icon-nav {
        position: sticky;
        top: 54px;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        min-height: 46px;
        border-bottom: 1px solid rgba(16, 24, 40, .08);
        background: #fff;
        overflow: hidden;
    }
    .mobile-icon-nav a {
        position: relative;
        min-width: 0;
        min-height: 46px;
        display: grid;
        place-items: center;
        color: #344054;
        font-size: 0;
        border-bottom: 3px solid transparent;
        text-decoration: none;
    }
    .mobile-icon-nav a::before {
        font-size: 21px;
        line-height: 1;
    }
    .mobile-icon-nav .nav-home::before { content: "\1F3E0"; }
    .mobile-icon-nav .nav-video::before { content: "\25B6"; }
    .mobile-icon-nav .nav-market::before { content: "\1F6CD"; }
    .mobile-icon-nav .nav-friends::before { content: "\1F465"; }
    .mobile-icon-nav .nav-tasks::before { content: "\2705"; }
    .mobile-icon-nav .nav-alerts::before { content: "\1F514"; }
    .mobile-icon-nav .nav-profile::before { content: "\1F464"; }
    .mobile-icon-nav a:hover,
    .mobile-icon-nav a:active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        background: #f8fafc;
    }
    .mobile-icon-nav b {
        position: absolute;
        right: 8px;
        top: 5px;
        min-width: 17px;
        height: 17px;
        display: inline-grid;
        place-items: center;
        border-radius: 999px;
        background: #12b76a;
        color: #fff;
        padding: 0 5px;
        font-size: 10px;
        font-weight: 950;
    }
    .mobile-bottom-nav {
        display: none !important;
    }
    .mobile-side-menu {
        top: 0;
        width: min(82vw, 310px);
        padding: max(16px, env(safe-area-inset-top)) 14px 16px;
    }
    .mobile-side-menu a,
    .mobile-side-menu button {
        min-height: 42px;
        border-radius: 8px;
        font-size: 14px;
    }
    .app-shell {
        width: 100%;
        padding: 10px 8px 22px;
    }
    .page-back-button {
        margin-left: 0;
        min-height: 36px;
        padding: 7px 10px;
        font-size: 13px;
    }
    .social-page-shell,
    .fb-feed,
    .social-page-main,
    .dashboard-grid,
    .content-grid {
        max-width: 100%;
        overflow-x: hidden;
    }
}
@media (max-width: 380px) {
    .auth-topbar {
        gap: 5px;
        padding-left: 6px;
        padding-right: 6px;
    }
    .auth-topbar .top-search {
        max-width: 36vw;
    }
    .auth-topbar .round-action,
    .auth-topbar .menu-toggle,
    .auth-topbar .app-logo,
    .auth-topbar .app-logo span {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
}

/* Mobile SVG header + right drawer + chat order polish */
.round-action svg,
.mobile-icon-nav svg,
.drawer-head svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.drawer-overlay {
    display: none;
}
.message-date-separator {
    align-self: center;
    margin: 8px 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e4e7ec;
    color: #475467;
    font-size: 12px;
    font-weight: 900;
}
.messenger-window .message .message-meta {
    margin: 5px 0 0;
    text-align: right;
    font-size: 10px;
    color: #667085;
}
.messenger-window .message:not(.mine) .message-meta {
    text-align: left;
}
@media (max-width: 820px) {
    .auth-topbar .round-action::before,
    .auth-topbar .menu-toggle::before,
    .mobile-icon-nav a::before {
        content: none !important;
    }
    .auth-topbar .round-action,
    .auth-topbar .menu-toggle,
    .mobile-icon-nav a {
        -webkit-tap-highlight-color: transparent;
    }
    .auth-topbar .round-action svg,
    .auth-topbar .menu-toggle svg {
        width: 20px;
        height: 20px;
    }
    .mobile-icon-nav a svg {
        width: 22px;
        height: 22px;
    }
    .mobile-icon-nav a {
        isolation: isolate;
    }
    .mobile-side-menu {
        inset: 0 0 0 auto;
        right: 0;
        left: auto;
        height: 100dvh;
        overflow-y: auto;
        transform: translateX(105%);
        z-index: 100;
    }
    .drawer-overlay {
        position: fixed;
        inset: 0;
        z-index: 95;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(15, 23, 42, .42);
        transition: opacity .18s ease, visibility .18s ease;
    }
    .drawer-overlay.is-open {
        visibility: visible;
        opacity: 1;
    }
    body.drawer-open {
        overflow: hidden;
    }
    .drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--line);
    }
    .drawer-profile {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .drawer-profile span,
    .mobile-side-menu a span,
    .mobile-side-menu button span {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        display: inline-grid;
        place-items: center;
        border-radius: 50%;
        background: linear-gradient(135deg, #0f766e, #2563eb);
        color: #fff;
        font-size: 11px;
        font-weight: 950;
    }
    .drawer-profile strong {
        overflow: hidden;
        color: #101828;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .drawer-head > button {
        width: 40px;
        min-height: 40px;
        display: grid;
        place-items: center;
        padding: 0;
        border-radius: 50%;
        text-align: center;
    }
    .mobile-side-menu a,
    .mobile-side-menu button {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #f8fafc;
    }
    .mobile-side-menu a:hover,
    .mobile-side-menu button:hover {
        background: #eef4ff;
        color: #175cd3;
    }
    .mobile-side-menu .drawer-logout {
        background: #fff1f3;
        color: #b42318;
    }
    .dark-mode {
        background: #101828;
        color: #f8fafc;
    }
    .dark-mode .auth-topbar,
    .dark-mode .mobile-icon-nav,
    .dark-mode .mobile-side-menu,
    .dark-mode .fb-post-card,
    .dark-mode .social-section-card {
        background: #182230;
        color: #f8fafc;
    }
    .dark-mode .top-search input,
    .dark-mode .round-action {
        background: #243447;
        color: #f8fafc;
    }
    .messenger-window .messages {
        justify-content: flex-start !important;
        padding: 10px;
    }
    .messenger-window .message {
        max-width: 78%;
        padding: 7px 9px;
        border-radius: 14px 14px 14px 4px;
        background: #fff;
    }
    .messenger-window .message.mine {
        border-color: #175cd3;
        background: #dbeafe;
        color: #101828;
    }
}
.typing-row {
    padding: 8px 12px;
    font-size: 12px;
}
.media-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--line);
    background: #fff;
}
.media-chat-form .button {
    grid-column: 1 / -1;
    min-height: 40px;
}
.media-chat-form input[name="body"] {
    min-height: 42px;
}
.media-chat-form .attachment-drawer {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
.media-chat-form .attachment-drawer span {
    padding: 8px 5px;
    font-size: 12px;
}
.composer-conditional[hidden] {
    display: none !important;
}
.composer-extra-row,
.composer-upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.composer-upload-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}
.post-media-picker {
    display: grid;
    align-items: center;
    min-height: 46px;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    padding: 0 14px;
    background: #f8fafc;
    color: #344054;
    font-weight: 850;
    cursor: pointer;
}
.post-media-picker input {
    display: none;
}
@media (max-width: 760px) {
    .chat-page-shell .messenger-layout {
        grid-template-columns: 1fr;
        max-width: 430px;
        padding-inline: 8px;
    }
    .chat-page-shell .messenger-layout.has-active-chat .messenger-list {
        display: none;
    }
    .chat-page-shell .messenger-window {
        min-height: min(720px, calc(100vh - 118px));
        max-height: calc(100vh - 118px);
    }
    .messenger-head {
        grid-template-columns: 44px minmax(0, 1fr);
    }
    .chat-head-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    .chat-head-actions form,
    .chat-head-actions .button {
        flex: 1;
    }
    .media-chat-form .attachment-drawer {
        grid-template-columns: repeat(3, 1fr);
    }
    .composer-extra-row,
    .composer-upload-row {
        grid-template-columns: 1fr;
    }
}

/* Phase 6D: compact social lists, Instagram-style reels/feed actions and mobile-first page polish */
.compact-people-list {
    display: grid;
    gap: 8px;
}
.compact-person-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.person-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}
.person-main > span,
.compact-person-row > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-size: 12px;
    font-weight: 950;
}
.person-main strong,
.chat-list-copy strong,
.public-profile-copy h1 {
    overflow: hidden;
    text-overflow: ellipsis;
}
.person-main small,
.chat-list-copy small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.compact-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.compact-actions .button,
.compact-person-row .button {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}
.chat-page-shell .messenger-layout {
    align-items: start;
}
.chat-page-shell .messenger-list {
    max-height: calc(100vh - 150px);
    padding: 12px;
}
.compact-chat-tools .button {
    min-height: 38px;
    padding: 8px 12px;
}
.chat-person-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 8px;
    border-radius: 8px;
}
.chat-list-copy {
    min-width: 0;
}
.chat-person-row button {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
}
.chat-person-row .unread-badge {
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #12b76a;
    color: #fff;
    font-size: 12px;
}
.public-profile-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.public-profile-cover {
    min-height: 230px;
    background: linear-gradient(135deg, #d1fADF, #dbeafe 60%, #fef3c7);
    background-position: center;
    background-size: cover;
}
.public-profile-head {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
    padding: 0 24px 20px;
    margin-top: -54px;
}
.profile-avatar-xl {
    width: 116px;
    height: 116px;
    display: grid;
    place-items: center;
    border: 5px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    background-position: center;
    background-size: cover;
    color: #fff;
    font-size: 34px;
    font-weight: 950;
}
.public-profile-copy h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
}
.public-profile-copy p {
    margin: 4px 0 10px;
    color: var(--muted);
}
.profile-mini-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--muted);
}
.profile-mini-stats strong {
    color: var(--ink);
}
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.profile-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 24px;
    border-top: 1px solid var(--line);
    overflow-x: auto;
}
.profile-tabs a {
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f2f4f7;
    color: #344054;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}
.profile-timeline {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.campaign-task-builder {
    margin-top: 12px;
}
.campaign-task-builder summary {
    display: inline-flex;
    list-style: none;
    cursor: pointer;
}
.campaign-task-builder summary::-webkit-details-marker {
    display: none;
}
.campaign-task-builder[open] form {
    margin-top: 12px;
}
.reel-media-shell {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #101828;
}
.reel-media-shell video {
    display: block;
    width: 100%;
}
.reel-overlay-head {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: 10px;
    color: #fff;
    background: linear-gradient(180deg, rgba(16,24,40,.62), rgba(16,24,40,0));
}
.reel-user-chip {
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}
.reel-user-chip span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    font-size: 12px;
    font-weight: 950;
}
.reel-user-chip strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reel-overlay-head button {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 900;
}
.reel-overlay-head .reel-more {
    width: 34px;
    padding: 0;
}
.reel-social-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.reel-social-actions form {
    min-width: 0;
}
.reel-social-actions button {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 2px;
    padding: 7px 4px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #101828;
    font-size: 13px;
    font-weight: 900;
}
.reel-social-actions strong {
    font-size: 12px;
    color: var(--muted);
}
.insta-caption {
    padding: 10px 12px 4px !important;
    background: #fff !important;
}
.insta-caption p {
    margin: 0 0 5px !important;
    color: #101828 !important;
}
.insta-caption small {
    color: var(--muted) !important;
}
.link-button {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b42318;
    font-weight: 850;
}
.post-follow-form {
    margin-left: auto;
}
.post-follow-form button {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #0f766e;
    border-radius: 8px;
    background: #fff;
    color: #0f766e;
    font-weight: 900;
}

@media (max-width: 900px) {
    .page-right-rail {
        display: none !important;
    }
    .social-page-main {
        min-width: 0;
    }
    .compact-person-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 9px;
    }
    .compact-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .compact-actions form,
    .compact-actions .button {
        width: 100%;
    }
    .chat-page-shell .messenger-layout {
        max-width: 430px;
    }
    .chat-page-shell .messenger-list {
        max-height: none;
    }
    .chat-person-row {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 8px;
        min-height: 54px;
    }
    .messenger-head {
        gap: 8px;
        padding: 10px;
    }
    .chat-title-block h2 {
        font-size: 20px;
    }
    .messenger-window .messages {
        min-height: 48vh;
        max-height: 52vh;
    }
    .vertical-reel-card {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
        border-radius: 8px;
        background: #fff;
    }
    .vertical-reel-card video {
        position: static !important;
        width: 100% !important;
        max-height: min(560px, 70vh) !important;
        aspect-ratio: 9 / 14;
        border-radius: 8px;
        object-fit: cover;
    }
    .reel-caption {
        position: static !important;
        width: 100%;
        padding: 8px 0;
        background: transparent !important;
        color: var(--ink) !important;
    }
    .reel-caption small,
    .reel-caption p {
        color: var(--muted) !important;
    }
    .reel-action-rail {
        display: none !important;
    }
    .reel-social-actions {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .reel-social-actions button {
        min-height: 44px;
        font-size: 12px;
    }
    .reel-overlay-head {
        padding: 8px;
        gap: 6px;
    }
    .reel-user-chip {
        grid-template-columns: 32px minmax(0, 1fr);
    }
    .reel-user-chip span {
        width: 32px;
        height: 32px;
    }
    .reel-overlay-head button {
        min-height: 30px;
        padding: 5px 9px;
        font-size: 12px;
    }
    .fb-post-head {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }
    .reaction-row {
        display: none !important;
    }
    .fb-post-actions.share-actions {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }
    .fb-post-actions.share-actions > form:nth-of-type(n+2),
    .fb-post-actions.share-actions > details:nth-of-type(n+2),
    .fb-post-actions.share-actions > .inline-edit-panel,
    .fb-post-actions.share-actions > form:last-child {
        display: none;
    }
    .fb-post-actions.share-actions button,
    .fb-post-actions.share-actions a,
    .fb-post-actions.share-actions summary {
        min-height: 42px;
        display: grid;
        place-items: center;
        padding: 8px 4px;
        border: 0;
        border-radius: 0;
        background: #fff;
        color: #101828;
        font-size: 12px;
        font-weight: 900;
        text-decoration: none;
    }
    .fb-post-actions.share-actions .share-popover > button {
        min-height: 42px;
        font-size: 12px;
    }
    .share-options {
        right: 0;
        left: auto;
        min-width: 170px;
    }
    .fb-post-actions.share-actions span {
        color: var(--muted);
        font-size: 11px;
    }
    .post-follow-form button {
        min-height: 30px;
        padding: 5px 9px;
        font-size: 12px;
    }
    .reel-action-rail {
        position: static !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        order: 2;
    }
    .reel-action-rail form,
    .reel-action-rail button,
    .reel-action-rail span {
        width: 100%;
    }
    .reel-action-rail button,
    .reel-action-rail span {
        min-height: 36px;
        padding: 8px 6px;
        border-radius: 8px;
        background: #f2f4f7;
        color: #344054;
        font-size: 12px;
        font-weight: 850;
        text-align: center;
    }
    .reel-action-rail .reel-owner-action,
    .reel-action-rail form:nth-child(n+4) {
        display: none;
    }
    .reel-caption {
        order: 3;
    }
    .comment-inline-form {
        order: 4;
    }
    .comment-inline-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
        width: 100%;
    }
    .comment-row {
        display: grid;
        gap: 2px;
        padding: 8px 10px;
        border-radius: 8px;
        background: #f8fafc;
    }
    .public-profile-cover {
        min-height: 150px;
    }
    .public-profile-head {
        grid-template-columns: 76px minmax(0, 1fr);
        align-items: end;
        gap: 10px;
        padding: 0 10px 12px;
        margin-top: -38px;
    }
    .profile-avatar-xl {
        width: 76px;
        height: 76px;
        border-width: 4px;
        font-size: 24px;
    }
    .public-profile-copy h1 {
        font-size: 28px;
        line-height: 1.05;
    }
    .profile-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .profile-actions form,
    .profile-actions button {
        width: 100%;
    }
    .profile-tabs {
        padding: 8px;
        gap: 6px;
    }
    .profile-tabs a {
        min-width: 82px;
        padding: 9px 10px;
        font-size: 13px;
    }
}

/* Phase 7D final override: keep share/actions/chat composer stable after older rules */
.facebook-reel-card,
.fb-post-card {
    overflow: visible !important;
}
.facebook-action-row,
.fb-post-actions.share-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 0 !important;
    position: relative !important;
    z-index: 20 !important;
}
.facebook-action-row > form,
.facebook-action-row > button,
.facebook-action-row > .share-popover,
.fb-post-actions.share-actions > form,
.fb-post-actions.share-actions > button,
.fb-post-actions.share-actions > .share-popover {
    min-width: 0 !important;
    display: grid !important;
}
.facebook-action-row > form > button,
.facebook-action-row > button,
.facebook-action-row .share-popover > button,
.fb-post-actions.share-actions > form > button,
.fb-post-actions.share-actions > button,
.fb-post-actions.share-actions .share-popover > button {
    width: 100% !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 8px 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #667085 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
.action-icon {
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-block !important;
    position: relative !important;
}
.like-icon::before {
    content: "";
    position: absolute;
    inset: 1px 2px 3px;
    background: currentColor;
    clip-path: polygon(50% 100%, 8% 58%, 8% 24%, 28% 7%, 50% 22%, 72% 7%, 92% 24%, 92% 58%);
}
.comment-icon {
    border: 2px solid currentColor !important;
    border-radius: 50% !important;
    background: transparent !important;
    clip-path: none !important;
}
.comment-icon::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -4px;
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-18deg);
    background: #fff;
}
.share-icon::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 8px;
    width: 14px;
    height: 2px;
    background: currentColor;
    transform: rotate(-28deg);
}
.share-icon::after {
    content: "";
    position: absolute;
    right: 0;
    top: 1px;
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}
.share-popover {
    position: relative !important;
    z-index: 100 !important;
    min-width: 0 !important;
}
.share-options[hidden] {
    display: none !important;
}
.share-options {
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 6px) !important;
    z-index: 9999 !important;
    min-width: 190px !important;
    overflow: hidden !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18) !important;
}
.share-options form,
.share-options a {
    display: block !important;
}
.share-options button,
.share-options a {
    width: 100% !important;
    min-height: 42px !important;
    display: block !important;
    padding: 11px 13px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #344054 !important;
    font-weight: 850 !important;
    text-align: left !important;
    text-decoration: none !important;
}
.media-chat-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 8px !important;
    align-items: center !important;
}
.media-chat-form .attach-toggle,
.media-chat-form .emoji-toggle {
    min-height: 42px !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #eef7f6 !important;
    color: #0f766e !important;
    font-weight: 900 !important;
    cursor: pointer !important;
}
.media-chat-form .button {
    grid-column: 1 / -1 !important;
}
.media-chat-form .attachment-drawer,
.media-chat-form .emoji-drawer {
    grid-column: 1 / -1 !important;
    display: grid !important;
    gap: 6px !important;
    padding: 8px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
}
.media-chat-form .attachment-drawer {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}
.media-chat-form .emoji-drawer {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}
.media-chat-form .attachment-drawer[hidden],
.media-chat-form .emoji-drawer[hidden] {
    display: none !important;
}
.media-chat-form .attachment-drawer span,
.media-chat-form .emoji-drawer span {
    min-height: 38px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 8px !important;
    background: #f2f4f7 !important;
    color: #344054 !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    cursor: pointer !important;
}
.media-chat-form .emoji-drawer span {
    font-size: 18px !important;
}
@media (max-width: 700px) {
    .media-chat-form {
        gap: 6px !important;
        padding: 8px !important;
    }
    .media-chat-form .attach-toggle,
    .media-chat-form .emoji-toggle {
        min-width: 54px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }
    .media-chat-form .attachment-drawer {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .media-chat-form .emoji-drawer {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

/* Phase 10 final cascade guard */
@media (min-width: 821px) {
    .auth-topbar {
        display: grid !important;
        grid-template-columns: minmax(250px, 360px) minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 18px !important;
        min-height: 76px !important;
        height: auto !important;
        padding: 12px 22px !important;
        background: #fff !important;
    }
    .auth-topbar .desktop-nav {
        display: flex !important;
        justify-content: center;
        gap: 12px;
    }
    .auth-topbar .topbar-right {
        display: flex !important;
        gap: 8px !important;
        grid-column: auto !important;
    }
    .auth-topbar .top-search {
        max-width: 330px !important;
    }
    .mobile-icon-nav,
    .mobile-bottom-nav {
        display: none !important;
    }
    .fb-dashboard {
        grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(250px, 330px) !important;
        max-width: 1220px;
        margin: 0 auto;
    }
}
@media (max-width: 820px) {
    .auth-topbar,
    .mobile-icon-nav {
        background: #fff !important;
    }
    .auth-topbar .round-action,
    .auth-topbar .menu-toggle,
    .mobile-icon-nav a {
        color: #123a60 !important;
        background: #eef4fb !important;
        border-color: rgba(18, 58, 96, .12) !important;
    }
    .mobile-icon-nav a {
        background: #fff !important;
    }
    .fb-left-rail,
    .fb-right-rail,
    .social-left-rail,
    .social-right-rail {
        display: none !important;
    }
    .fb-dashboard,
    .social-page-shell,
    .fb-feed,
    .social-page-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        display: block !important;
    }
}
