/* Extracted from the legacy post-workspace cascade. Keep route-tail ordering stable. */
@media (max-width: 760px) {
    body.user-body-messaging {
        --user-mobile-bottom-panel-bg: var(--zn-member-bg-card);
    }}

@media (min-width: 761px) and (max-width: 1100px) {
    body.user-body-messaging .messaging-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-body-messaging .chat-pane.is-empty,
    body.user-body-messaging .messaging-layout.has-selection .conversation-pane {
        display: none;
    }

    body.user-body-messaging .mobile-backlink {
        display: inline-flex;
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }
}

@media (min-width: 761px) {
    body.user-body-messaging .user-shell {
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
    }
}

@media (max-width: 980px) {
    body.user-body-messaging {
        overflow: auto;
    }

    body.user-body-messaging .user-shell {
        height: auto;
        min-height: 100vh;
    }

    body.user-body-messaging .user-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.user-body-messaging .topbar-controls {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: wrap;
    }

    body.user-body-messaging .server-upload-form,
    .session-form-compact {
        min-width: 0;
        justify-content: flex-start;
    }

    .session-select.compact-select {
        width: 100%;
        min-width: 0;
    }

    body.user-body-messaging .messaging-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    body.user-body-messaging .conversation-pane.is-hidden-mobile {
        display: none;
    }

    body.user-body-messaging .chat-pane.is-hidden-mobile {
        display: none;
    }

    body.user-body-messaging .chat-card,
    body.user-body-messaging .chat-empty-state {
        min-height: calc(100vh - 160px);
    }

    body.user-body-messaging .mobile-backlink {
        display: inline-flex;
    }

    body.user-body-messaging .chat-header-main {
        align-items: center;
    }

    body.user-body-messaging .call-screen-shell {
        padding:
            clamp(18px, 3vw, 28px)
            clamp(18px, 4vw, 28px)
            calc(max(18px, env(safe-area-inset-bottom)) + 10px);
    }

    body.user-body-messaging .call-screen-body {
        padding:
            clamp(24px, 6vh, 56px)
            0
            calc(170px + max(18px, env(safe-area-inset-bottom)));
    }

    body.user-body-messaging .call-screen-controls {
        gap: 14px;
    }

    body.user-body-messaging .message-bubble {
        max-width: 88%;
    }

}

@media (min-width: 761px) and (max-width: 980px) {
    body.user-body-messaging .composer {
        flex-direction: column;
        align-items: stretch;
    }

    body.user-body-messaging .composer-message-form {
        width: 100%;
    }
}

:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) {
    border-color: var(--zn-direct-sent-bubble-border) !important;
    background: var(--zn-direct-sent-bubble-background) !important;
    color: var(--zn-direct-sent-bubble-text) !important;
}

:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) p,
:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) strong,
:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) a,
:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-author,
:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-author-title {
    color: var(--zn-direct-sent-bubble-text) !important;
}

:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-time,
:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-status {
    color: var(--zn-direct-sent-bubble-meta-text) !important;
}

:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-preview {
    background: var(--zn-direct-sent-reply-background);
}

:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-preview::before {
    background: var(--zn-direct-sent-reply-marker);
}

:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-label {
    color: var(--zn-direct-sent-reply-label) !important;
}

:is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-excerpt {
    color: var(--zn-direct-sent-reply-excerpt) !important;
}

[data-theme="moonlight-silver"] body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-preview {
    background: var(--zn-direct-sent-reply-background);
}

[data-theme="moonlight-silver"] body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-preview::before {
    background: var(--zn-direct-sent-reply-marker);
}

[data-theme="moonlight-silver"] body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-label {
    color: var(--zn-direct-sent-reply-label) !important;
}

[data-theme="moonlight-silver"] body.user-body-messaging .message-row.is-sent:not(.is-group-message) .message-bubble:not(.has-media-message) .message-reply-excerpt {
    color: var(--zn-direct-sent-reply-excerpt) !important;
}

@media (max-width: 760px) {
    body.user-body-messaging {
        height: 100%;
        min-height: 100%;
        overflow: hidden;
        --message-composer-clearance: 14px;
        background:
            radial-gradient(circle at top left, rgba(123, 144, 255, 0.08), transparent 24%),
            var(--zn-member-bg-app);
    }

    body.user-body-messaging .messaging-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    body.user-body-messaging .conversation-pane.is-hidden-mobile {
        display: none !important;
    }

    body.user-body-messaging .user-shell {
        height: var(--app-vh);
        min-height: 100svh;
        min-height: var(--app-vh);
        overflow: hidden;
        padding: 0;
        gap: 0;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"][data-keyboard-open="true"],
    html[data-device-platform="ios"][data-display-mode="standalone"][data-keyboard-open="true"] body.user-body-messaging {
        overflow: hidden;
        overscroll-behavior: none;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) {
        position: fixed;
        top: var(--znode-vv-top, 0px);
        left: 0;
        right: 0;
        z-index: 1050;
        height: var(--znode-vv-height, 100dvh);
        min-height: 0;
        overflow: hidden;
        background: var(--zn-member-bg-pane);
    }

    body.user-body-messaging .user-topbar {
        padding:
            calc(14px + env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            12px
            max(16px, env(safe-area-inset-left));
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        border-bottom: 1px solid var(--zn-member-border);
        background: var(--zn-member-bg-card);
        backdrop-filter: blur(16px);
    }

    body.user-body-messaging .user-topbar.is-chat-active {
        display: none;
    }

    body.user-body-messaging .user-kicker,
    body.user-body-messaging .topbar-user-card,
    body.user-body-messaging .surface-home-link,
    body.user-body-messaging .server-upload-form,
    body.user-body-messaging .chat-action-group,
    body.user-body-messaging .conversation-role,
    body.user-body-messaging .chat-card-direct .message-author,
    body.user-body-messaging .chat-card-direct .message-author-title,
    body.user-body-messaging .file-message-meta,
    body.user-body-messaging .desktop-inline {
        display: none;
    }

    body.user-body-messaging .mobile-inline {
        display: inline;
    }

    body.user-body-messaging .profile-menu-panel .server-upload-form {
        display: flex;
    }

    body.user-body-messaging .chat-card-direct .message-row.is-received .message-author {
        display: block;
    }

    body.user-body-messaging .chat-card-direct .message-row.is-sent .message-author-line {
        margin: 0;
    }

    body.user-body-messaging .chat-card-direct .message-row.is-sent .message-author-copy {
        display: none;
    }

    body.user-body-messaging .messages-home-header {
        gap: 10px;
        padding:
            calc(12px + env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            10px
            max(16px, env(safe-area-inset-left));
        border-bottom: 0;
    }

    body.user-body-messaging .messages-brand-row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
        padding-right: max(6px, env(safe-area-inset-right));
    }

    body.user-body-messaging .messages-brand-row .user-header-actions {
        margin-right: 0;
    }

    body.user-body-messaging .messages-settings-button {
        width: 36px;
        height: 36px;
        align-self: center;
    }

    body.user-body-messaging .messages-brand-row h1 {
        font-size: 1.14rem;
        line-height: 1.12;
    }

    body.user-body-messaging .profile-menu-panel {
        right: auto;
        left: 0;
    }

    body.user-body-messaging .topbar-title {
        align-items: center;
        gap: 10px;
        flex: 1 1 auto;
        min-width: 0;
    }

    body.user-body-messaging .topbar-title-mark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        margin-top: 0;
        border-radius: 9px;
    }

    body.user-body-messaging .topbar-title h1 {
        font-size: 1.12rem;
        line-height: 1.1;
    }

    body.user-body-messaging .topbar-controls {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
    }

    body.user-body-messaging .logout-form .secondary-button {
        min-width: 64px;
        padding: 9px 12px;
        border-radius: 999px;
    }

    body.user-body-messaging .flash-banner {
        margin: 0 12px 8px;
        width: auto;
        border-radius: 18px;
    }

    body.user-body-messaging .messaging-layout {
        display: block;
        flex: 1;
        height: 100%;
        min-height: 0;
        margin: 0;
        overflow: hidden;
    }

    body.user-body-messaging .conversation-pane,
    body.user-body-messaging .chat-pane {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    body.user-body-messaging .chat-pane.is-empty {
        display: none;
    }

    body.user-body-messaging .conversation-hub,
    body.user-body-messaging .chat-card,
    body.user-body-messaging .chat-empty-state {
        height: 100%;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
    }

    body.user-body-messaging .conversation-hub {
        padding: 0 0 calc(var(--bottom-nav-height) + var(--safe-bottom));
    }

    body.user-body-messaging .left-pane-top {
        gap: 10px;
        padding:
            12px
            max(16px, env(safe-area-inset-right))
            10px
            max(16px, env(safe-area-inset-left));
        border-bottom: 0;
    }

    body.user-body-messaging .mini-profile {
        display: none;
    }

    body.user-body-messaging .profile-menu-panel .mini-profile {
        display: flex;
    }

    body.user-body-messaging .profile-details {
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.user-body-messaging .profile-details summary {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.76rem;
        color: var(--zn-member-accent);
    }

    body.user-body-messaging .profile-form {
        margin-top: 10px;
        padding: 14px;
        border: 1px solid var(--zn-member-border);
        border-radius: 18px;
        background: var(--zn-member-bg-card);
    }

    body.user-body-messaging .compact-search .search-input {
        padding: 12px 14px;
        border-radius: 20px;
    }

    body.user-body-messaging .notification-settings {
        padding: 10px 12px;
    }

    body.user-body-messaging .notification-settings-compact {
        width: 42px;
        height: 42px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.user-body-messaging .notification-settings-header {
        align-items: center;
        min-height: 42px;
    }

    body.user-body-messaging .notification-enable-button {
        width: 42px;
        height: 42px;
    }

    body.user-body-messaging .notification-toggle {
        font-size: 0.78rem;
    }

    body.user-body-messaging .notification-status {
        font-size: 0.7rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    body.user-body-messaging .roster-scroll {
        padding:
            2px
            max(16px, env(safe-area-inset-right))
            12px
            max(16px, env(safe-area-inset-left));
        gap: 18px;
    }

    body.user-body-messaging .user-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1300;
        height: calc(var(--bottom-nav-height) + var(--safe-bottom));
        min-height: calc(var(--bottom-nav-height) + var(--safe-bottom));
        padding:
            6px
            max(16px, env(safe-area-inset-right))
            var(--safe-bottom)
            max(16px, env(safe-area-inset-left));
        align-items: center;
        background: var(--user-mobile-bottom-panel-bg);
        border: 0;
        border-top: 1px solid rgba(151, 126, 78, 0.18);
        border-radius: 0;
        box-shadow: 0 72px 0 72px var(--user-mobile-bottom-panel-bg);
    }

    body.user-body-messaging .user-bottom-nav-in-pane {
        display: none;
    }

    body.user-body-messaging .user-bottom-nav-global {
        display: grid;
    }

    body.user-body-messaging .messaging-layout[data-active-feed="false"][data-mobile-view="chat"] .user-bottom-nav-global {
        display: none;
    }

    body.user-body-messaging .list-section {
        gap: 8px;
    }

    body.user-body-messaging .list-section:first-child .list-section-header {
        display: none;
    }

    body.user-body-messaging .list-section.call-history-section:first-child .list-section-header {
        display: flex;
    }

    body.user-body-messaging .pane-kicker {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
        padding: 0 2px;
    }

    body.user-body-messaging .conversation-list {
        gap: 0;
    }

    body.user-body-messaging .conversation-item {
        padding: 11px 0;
        border: 0;
        border-bottom: 1px solid rgba(177, 196, 232, 0.1);
        border-radius: 0;
        background: transparent;
    }

    body.user-body-messaging .conversation-item:hover,
    body.user-body-messaging .conversation-item.is-active {
        border-color: var(--zn-member-border-bright);
        background: transparent;
    }

    body.user-body-messaging .conversation-item-main {
        align-items: center;
        gap: 12px;
    }

    body.user-body-messaging .conversation-avatar {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 16px;
        font-size: 0.9rem;
    }

    body.user-body-messaging .conversation-copy-top {
        align-items: center;
        gap: 10px;
    }

    body.user-body-messaging .conversation-copy-top strong {
        font-size: 0.93rem;
    }

    body.user-body-messaging .conversation-meta {
        gap: 6px;
        font-size: 0.72rem;
        color: var(--zn-member-text-muted);
        white-space: nowrap;
    }

    body.user-body-messaging .conversation-copy p {
        margin-top: 4px;
        font-size: 0.82rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
    }

    body.user-body-messaging .empty-state-list {
        min-height: 180px;
        border: 1px dashed var(--zn-member-border);
        border-radius: 22px;
        background: var(--zn-member-bg-surface-faint);
    }

    body.user-body-messaging .chat-card {
        display: flex;
        flex-direction: column;
        position: relative;
        padding-bottom: 0;
        overflow: hidden;
        background: transparent;
    }

    body.user-body-messaging .chat-header {
        padding:
            calc(10px + env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            9px
            max(12px, env(safe-area-inset-left));
        background:
            linear-gradient(
                180deg,
                color-mix(in srgb, var(--zn-member-bg-card) 82%, transparent),
                color-mix(in srgb, var(--zn-member-bg-app) 56%, transparent)
            );
        border-bottom: 1px solid color-mix(in srgb, var(--zn-member-border) 64%, transparent);
        box-shadow:
            inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 24%, transparent),
            0 10px 24px color-mix(in srgb, var(--zn-member-shadow-color, #000) 7%, transparent);
        backdrop-filter: blur(18px) saturate(1.08);
        -webkit-backdrop-filter: blur(18px) saturate(1.08);
    }

    body.user-body-messaging .chat-header-main {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    body.user-body-messaging .mobile-backlink {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 999px;
        color: var(--zn-member-text-primary);
        border: 1px solid var(--zn-member-border);
        background: var(--zn-member-bg-surface-active);
        font-size: 1rem;
        line-height: 1;
    }

    body.user-body-messaging .chat-header-avatar {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 14px;
    }

    body.user-body-messaging .chat-header-copy h2,
    body.user-body-messaging .chat-header-copy [data-feed-display-name] {
        font-size: 0.96rem;
        line-height: 1.2;
        white-space: normal;
        overflow: visible;
        overflow-wrap: anywhere;
        text-overflow: clip;
    }

    body.user-body-messaging .chat-card-direct .chat-presence,
    body.user-body-messaging .chat-card-direct .chat-presence > span:last-child {
        min-width: 0;
    }

    body.user-body-messaging .chat-card-direct .chat-presence {
        max-width: 100%;
        overflow: hidden;
        overflow-wrap: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: normal;
    }

    body.user-body-messaging .chat-card-direct .chat-presence > span:last-child {
        max-width: 10.5ch;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.user-body-messaging .chat-header-title-row {
        gap: 8px;
    }

    body.user-body-messaging .chat-header-actions {
        width: auto;
        max-width: 100%;
        justify-content: flex-end;
        margin-left: 0;
        flex: 0 0 auto;
        gap: 8px;
    }

    

    body.user-body-messaging .chat-files-count {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
    }

    body.user-body-messaging .chat-files-popover {
        position: fixed;
        top: calc(76px + env(safe-area-inset-top));
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: min(58vh, 420px);
        z-index: 80;
        overflow: hidden;
        background: var(--zn-member-bg-card);
    }

    body.user-body-messaging .chat-more-popover .chat-files-popover {
        position: fixed;
        top: calc(92px + env(safe-area-inset-top));
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        width: auto;
        max-width: none;
        max-height: min(62vh, 430px);
        overflow: hidden;
        z-index: 90;
    }

    body.user-body-messaging .chat-more-popover {
        max-height: min(70vh, 520px);
        overflow: auto;
    }

    body.user-body-messaging .chat-files-item {
        min-height: 0;
        grid-template-columns: 72px minmax(0, 1fr) auto;
        grid-template-rows: auto;
        gap: 10px;
        align-items: center;
    }

    body.user-body-messaging .chat-files-item-preview {
        width: 72px;
        height: 72px;
        grid-row: auto;
    }

    body.user-body-messaging .chat-files-item-copy {
        min-width: 0;
    }

    body.user-body-messaging .chat-files-item-name {
        -webkit-line-clamp: 2;
    }

    body.user-body-messaging .chat-files-item-meta {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body.user-body-messaging .chat-files-list {
        grid-template-columns: minmax(0, 1fr);
        max-height: min(42vh, 284px);
        overflow: auto;
    }

    body.user-body-messaging .chat-files-item .file-message-link {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        white-space: nowrap;
    }

    body.user-body-messaging .call-button {
        min-width: 38px;
        width: 38px;
        height: 34px;
        min-height: 34px;
        border-radius: 999px;
    }

    body.user-body-messaging .chat-subtitle {
        margin-top: 2px;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.user-body-messaging .chat-action-group,
    body.user-body-messaging .call-button-reason {
        display: none;
    }

    body.user-body-messaging .call-screen-shell {


        gap: 20px;
    }

body.user-body-messaging .call-screen-topbar {
    align-items: center;
    justify-content: space-between;
}



body.user-body-messaging .call-screen-identity {
        gap: 24px;
    }

    body.user-body-messaging .call-screen-avatar {


        box-shadow:
            0 0 0 12px var(--zn-member-bg-surface-lift),
            0 0 0 24px var(--zn-member-bg-surface-faint),
            var(--zn-member-shadow);
    }



    body.user-body-messaging .call-screen-status {
        font-size: 1.06rem;
    }

    body.user-body-messaging .call-screen-status-detail,
    body.user-body-messaging .call-screen-subtitle {
        font-size: 0.9rem;
    }

    body.user-body-messaging .call-screen-footer {



        gap: 14px;
    }

    body.user-body-messaging .call-screen-secondary-actions {

        gap: 10px;
    }

    body.user-body-messaging .call-secondary-action {
        flex: 1 1 160px;
    }









    body.user-body-messaging .call-screen[data-call-ui-mode="incoming"] .call-screen-controls {
        width: min(100%, 256px);
    }

    body.user-body-messaging .call-screen[data-call-ui-mode="outgoing"] .call-screen-controls {
        width: min(100%, 108px);
    }

    body.user-body-messaging .call-screen[data-call-ui-mode="terminal"] .call-screen-body {
        padding-bottom: 24px;
    }

    body.user-body-messaging .message-timeline {
        padding:
            14px
            max(12px, env(safe-area-inset-right))
            calc(var(--znode-composer-obstruction-height, var(--composer-height)) + var(--safe-bottom) + var(--znode-keyboard-clearance) + var(--message-composer-clearance))
            max(12px, env(safe-area-inset-left));
        gap: 14px;
        background: var(--zn-member-bg-pane);
        overflow-x: hidden;
        overscroll-behavior: contain;
        scroll-padding-bottom: calc(var(--znode-composer-obstruction-height, var(--composer-height)) + var(--safe-bottom) + var(--znode-keyboard-clearance) + var(--message-composer-clearance));
    }

    body.user-body-messaging .message-timeline > .message-date-divider:first-child,
    body.user-body-messaging .message-timeline > .message-row:first-child {
        margin-top: auto;
    }

    body.user-body-messaging .message-bubble {
        max-width: 82%;
        padding: 10px 15px 8px;
        border-radius: 18px;
    }

    body.user-body-messaging .message-row.is-received .message-bubble {
        border-top-left-radius: 8px;
    }

    body.user-body-messaging .message-row.is-sent .message-bubble {
        border-top-right-radius: 8px;
    }

    body.user-body-messaging .message-row .message-bubble.has-media-message,
    body.user-body-messaging .message-row.is-sent .message-bubble.has-media-message,
    body.user-body-messaging .message-row.is-received .message-bubble.has-media-message,
    body.user-body-messaging .message-row.is-group-message .message-bubble.has-media-message,
    body.user-body-messaging .message-row.is-sent.is-group-message .message-bubble.has-media-message {
        max-width: min(88%, calc(100vw - 46px - env(safe-area-inset-left) - env(safe-area-inset-right)));
        margin-right: 0;
        margin-left: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.user-body-messaging .message-bubble.has-media-message .message-author-line {
        padding-inline: 15px;
    }

    body.user-body-messaging .message-body {
        font-size: 0.91rem;
        line-height: 1.45;
    }

    body.user-body-messaging .image-message-card,
    body.user-body-messaging .audio-message-card,
    body.user-body-messaging .file-message-card {
        gap: 7px;
    }

    body.user-body-messaging .image-message-card {
        width: fit-content;
        max-width: min(82vw, 420px);
    }

    body.user-body-messaging .video-message-card {
        width: min(82vw, 330px);
        max-width: 100%;
    }

    body.user-body-messaging .chat-media-frame {
        width: fit-content;
        max-width: 100%;
        border-radius: 16px;
    }

    body.user-body-messaging .video-message-card .chat-media-frame {
        width: 100%;
    }

    body.user-body-messaging .chat-media-frame::before {
        inset: -7px;
        border-radius: 20px;
        filter: blur(12px);
        opacity: 0.72;
    }

    body.user-body-messaging .video-message-card .chat-media-frame::before {
        content: none;
    }

    body.user-body-messaging .file-message-card {
        padding: 8px;
        border-radius: 8px;
    }

    body.user-body-messaging .image-message-preview {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: min(54vh, 440px);
        border-radius: 15px;
    }

    body.user-body-messaging .message-meta-over-media {
        right: 8px;
        bottom: 8px;
        padding: 3px 7px;
    }

    body.user-body-messaging .message-meta-over-media .message-time {
        margin-top: 0;
    }

    body.user-body-messaging .attachment-viewer,
    body.user-body-workspace .attachment-viewer {
        padding: 10px;
    }

    body.user-body-messaging .attachment-viewer-panel,
    body.user-body-workspace .attachment-viewer-panel {
        width: min(100vw - 20px, 760px);
        max-height: 90vh;
    }

    body.user-body-messaging .attachment-viewer-body,
    body.user-body-workspace .attachment-viewer-body {
        padding: 8px;
    }

    body.user-body-messaging .attachment-viewer-fallback,
    body.user-body-workspace .attachment-viewer-fallback {
        min-height: calc(90vh - 96px);
        padding: 18px;
    }

    body.user-body-messaging .attachment-viewer-fallback-action,
    body.user-body-workspace .attachment-viewer-fallback-action {
        width: 100%;
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] {
        align-items: flex-start;
        justify-items: center;
        padding:
            max(54px, calc(env(safe-area-inset-top) + 22px))
            max(14px, env(safe-area-inset-right))
            max(14px, env(safe-area-inset-bottom))
            max(14px, env(safe-area-inset-left));
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-panel {
        width: min(100%, 420px);
        max-width: 100%;
        height: min(720px, calc(100dvh - max(54px, calc(env(safe-area-inset-top) + 22px)) - max(14px, env(safe-area-inset-bottom))));
        max-height: calc(100dvh - max(54px, calc(env(safe-area-inset-top) + 22px)) - max(14px, env(safe-area-inset-bottom)));
        border-radius: 16px;
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-header {
        min-height: 58px;
        padding: 8px 12px;
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-actions {
        gap: 8px;
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-download,
    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-share,
    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-close {
        min-width: 46px;
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-body {
        display: grid;
        min-height: 0;
        padding: 10px;
        overflow: hidden;
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .workspace-preview-pdf-fallback {
        min-height: 0;
        height: 100%;
        justify-content: center;
        padding: 18px;
    }

    body.user-body-workspace .attachment-viewer[data-viewer-kind="pdf"] .attachment-viewer-fallback-actions {
        flex-direction: column;
    }

    body.user-body-messaging .attachment-viewer[data-viewer-kind="image"] {
        align-items: stretch;
        justify-items: stretch;
        min-height: 100dvh;
        padding: 0;
        background: rgba(2, 4, 9, 0.92);
    }

    body.user-body-messaging .attachment-viewer[data-viewer-kind="image"] .attachment-viewer-panel {
        display: grid;
        grid-template-rows: minmax(0, 1fr);
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: hidden;
    }

    body.user-body-messaging .attachment-viewer[data-viewer-kind="image"] .attachment-viewer-body {
        display: grid;
        place-items: center;
        width: 100vw;
        height: 100dvh;
        min-height: 0;
        padding:
            max(10px, env(safe-area-inset-top))
            max(10px, env(safe-area-inset-right))
            max(10px, env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
        overflow: hidden;
    }

    body.user-body-messaging .attachment-viewer[data-viewer-kind="image"] .attachment-viewer-image {
        display: block;
        width: auto;
        height: auto;
        max-width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right));
        max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        object-fit: contain;
        border-radius: 10px;
    }

    body.user-body-messaging .attachment-viewer[data-viewer-kind="image"] .attachment-viewer-header {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
        left: max(10px, env(safe-area-inset-left));
        padding: 0;
        background: transparent;
    }

    body.user-body-messaging .message-time {
        margin-top: 4px;
        font-size: 0.68rem;
    }

    body.user-body-messaging .composer {
        position: fixed;
        right: 0;
        bottom: var(--safe-bottom);
        left: 0;
        z-index: 1100;
        --mobile-composer-glass-bg:
            linear-gradient(
                180deg,
                color-mix(in srgb, var(--zn-member-bg-card) 70%, transparent),
                color-mix(in srgb, var(--zn-member-bg-app) 58%, transparent)
            );
        height: 72px;
        min-height: 72px;
        max-height: 72px;
        flex: 0 0 72px;
        width: 100%;
        padding:
            8px
            max(18px, env(safe-area-inset-right))
            8px
            max(18px, env(safe-area-inset-left));
        border-top: 1px solid color-mix(in srgb, var(--zn-member-border) 56%, transparent);
        background: var(--mobile-composer-glass-bg);
        box-shadow:
            inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 28%, transparent),
            0 -14px 28px color-mix(in srgb, var(--zn-member-shadow-color, #000) 10%, transparent);
        backdrop-filter: blur(20px) saturate(1.08);
        -webkit-backdrop-filter: blur(20px) saturate(1.08);
        overflow: visible;
        flex-direction: row;
        align-items: flex-end;
        gap: 8px;
    }

    body.user-body-messaging .composer::after {
        content: "";
        position: absolute;
        top: calc(100% - 1px);
        right: 0;
        left: 0;
        height: calc(var(--safe-bottom) + 30px);
        pointer-events: none;
        background: var(--mobile-composer-glass-bg);
        backdrop-filter: blur(20px) saturate(1.08);
        -webkit-backdrop-filter: blur(20px) saturate(1.08);
    }

    body.user-body-messaging .new-messages-pill {
        position: fixed;
        left: 50%;
        bottom: calc(var(--safe-bottom) + var(--znode-composer-height, var(--composer-height)) + 10px);
        z-index: 1120;
        margin: 0;
        transform: translateX(-50%);
    }

    html[data-device-platform="android"][data-keyboard-open="true"] body.user-body-messaging .composer {
        bottom: calc(var(--keyboard-offset) + var(--znode-input-accessory-offset));
    }

    body.user-body-messaging .composer-tools {
        flex: 0 0 auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }

    body.user-body-messaging .composer-message-form {
        flex: 1;
        width: auto;
        min-width: 0;
        align-items: flex-end;
        gap: 8px;
    }

    body.user-body-messaging .composer.is-recording-voice {
        align-items: center;
    }

    body.user-body-messaging .composer.is-recording-voice .composer-message-form {
        flex: 1 1 auto;
        min-width: 0;
    }

    body.user-body-messaging .composer.is-recording-voice .composer-tools {
        flex: 0 0 auto;
        min-width: 0;
    }

    body.user-body-messaging .composer.is-recording-voice .composer-input,
    body.user-body-messaging .composer.is-recording-voice .composer-mobile-editor,
    body.user-body-messaging .composer.is-recording-voice .mention-picker {
        display: none;
    }

    body.user-body-messaging .composer.is-recording-voice .composer-status,
    body.user-body-messaging .composer.is-recording-voice .voice-record-hint {
        display: none;
    }

    body.user-body-messaging .composer.is-recording-voice .composer-input-shell {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 0;
        width: 100%;
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .new-messages-pill {
        top: max(8px, calc(var(--znode-composer-top, 0px) - 46px));
        bottom: auto;
    }

    body.user-body-messaging .composer.is-recording-voice [data-chat-attachment-status],
    body.user-body-messaging .composer.is-recording-voice [data-voice-record-indicator] {
        position: static;
        top: auto;
        right: auto;
        transform: none;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.user-body-messaging .composer-input {
        min-height: 46px;
        max-height: min(32vh, 168px);
        overflow-y: auto;
        resize: none;
        padding: 12px 58px 12px 14px;
        border-radius: 24px;
        line-height: 1.35;
    }

    body.user-body-messaging .mention-picker {
        right: 0;
        bottom: calc(100% + 8px);
        left: 0;
        max-height: min(220px, 36vh);
        border-radius: 22px;
    }

    body.user-body-messaging .mention-picker-list {
        max-height: calc(min(220px, 36vh) - 34px);
    }

    body.user-body-messaging .mention-picker-option {
        min-height: 54px;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
        padding: 7px 10px;
        border-radius: 16px;
    }

    body.user-body-messaging .mention-picker-avatar {
        width: 38px;
        height: 38px;
    }

    body.user-body-messaging .composer-button {
        min-width: 46px;
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 999px;
    }

    html[data-display-mode="standalone"] body.user-body-messaging .chat-card-direct {
        border-radius: 0;
    }

    body.user-body-messaging .composer-status {
        flex-basis: 100%;
        max-width: none;
        padding-left: 2px;
        font-size: 0.72rem;
    }

    body.user-body-messaging .composer-status:empty {
        display: none;
    }

    body.user-body-messaging .voice-record-indicator {
        right: 54px;
        max-width: calc(100% - 118px);
        font-size: 0.72rem;
    }

    body.user-body-messaging .chat-empty-state {
        padding: 32px 20px;
    }}

@media (max-width: 980px) {
    body.user-body-messaging .mobile-backlink,
    body.user-body-messaging .chat-more-button,
    body.user-body-messaging .call-launch-group .call-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }

    body.user-body-messaging .network-feed-mark-read,
    body.user-body-messaging .profile-menu-panel > .user-header-actions .notification-settings-compact,
    body.user-body-messaging .profile-menu-panel > .user-header-actions .notification-enable-button,
    body.user-body-messaging .profile-menu-panel > .user-header-actions .user-header-logout-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }

    body.user-body-messaging .profile-menu-hidden-trigger {
        right: auto;
        left: 0;
    }

    body.user-body-messaging .profile-menu-panel {
        right: auto;
        left: 0;
    }
}

@media (min-width: 761px) and (max-width: 980px) {
    body.user-body-messaging .chat-pane.is-empty {
        display: none;
    }

    body.user-body-messaging .messaging-layout.has-selection .conversation-pane {
        display: none;
    }

    body.user-body-messaging .conversation-pane,
    body.user-body-messaging .conversation-hub {
        min-height: min(760px, calc(100vh - 28px));
    }

    body.user-body-messaging .chat-card-direct .chat-header-main {
        grid-template-columns: auto auto minmax(160px, 1fr) auto auto;
    }

    body.user-body-messaging .chat-card-direct .chat-header-copy,
    body.user-body-messaging .chat-card-direct .chat-header-copy h2,
    body.user-body-messaging .chat-card-direct .chat-subtitle,
    body.user-body-messaging .chat-card-direct .chat-presence,
    body.user-body-messaging .chat-card-direct .chat-presence > span:last-child {
        min-width: 0;
    }

    body.user-body-messaging .chat-card-direct .chat-header-copy h2,
    body.user-body-messaging .chat-card-direct .chat-subtitle,
    body.user-body-messaging .chat-card-direct .chat-presence {
        max-width: 100%;
        overflow: hidden;
        overflow-wrap: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: normal;
    }

    body.user-body-messaging .chat-card-direct .chat-presence > span:last-child {
        max-width: 10.5ch;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.user-body-messaging .chat-card-direct .chat-header-actions {
        display: contents;
    }

    body.user-body-messaging .chat-card-direct .call-launch-group {
        grid-column: 4;
        grid-row: 1;
    }

    body.user-body-messaging .chat-card-direct .chat-more-menu {
        grid-column: 5;
        grid-row: 1;
    }

    body.user-body-messaging .chat-card-direct .call-button-reason {
        display: -webkit-box;
        grid-column: 3 / 6;
        grid-row: 2;
        min-width: 0;
        overflow: hidden;
        overflow-wrap: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: normal;
    }

    body.user-body-messaging .chat-card-direct .call-button-reason[hidden] {
        display: none;
    }

    body.user-body-messaging .conversation-pane:has(.profile-menu-hidden-trigger[open]) {
        position: relative;
        z-index: 20;
    }

    body.user-body-messaging .conversation-hub:has(.profile-menu-hidden-trigger[open]) {
        overflow: visible;
    }

    body.user-body-messaging .profile-menu-panel {
        max-height: calc(100dvh - 102px - env(safe-area-inset-bottom));
        overflow: auto;
    }
}

@media (max-width: 430px) and (max-height: 740px) {
    body.user-body-messaging .call-screen-shell {
        gap: 12px;
    }



    body.user-body-messaging .call-screen-avatar {


        box-shadow:
            0 0 0 8px var(--zn-member-bg-surface-lift),
            0 0 0 18px var(--zn-member-bg-surface-faint),
            var(--zn-member-shadow);
    }

    body.user-body-messaging .call-screen-identity {
        gap: 16px;
    }



    body.user-body-messaging .call-screen-status {
        font-size: 0.94rem;
    }

    body.user-body-messaging .call-screen-footer {
        gap: 10px;
    }

    body.user-body-messaging .call-screen-controls {
        gap: 10px;
    }

    body.user-body-messaging .call-control-button {
        min-width: 74px;
    }



    body.user-body-messaging .call-control-button-label {
        font-size: 0.7rem;
    }}

@media (max-width: 640px) {
    body.user-body-messaging .call-launch-group,
    body.user-body-messaging .chat-header-actions > .call-button-reason {
        display: none;
    }

    body.user-body-messaging .chat-mobile-call-item {
        display: flex;
    }

    body.user-body-messaging .chat-call-status-menu:not([hidden]) {
        position: relative;
        display: block;
        flex: 0 0 auto;
    }

    body.user-body-messaging .chat-call-status-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        padding: 10px;
        border: 0;
        border-radius: 999px;
        color: var(--zn-warning);
        background: transparent;
        cursor: pointer;
    }

    body.user-body-messaging
        .chat-header-actions.has-chat-transient-status
        .chat-call-status-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        color: var(--zn-member-text-muted);
    }

    body.user-body-messaging
        .chat-header-actions.has-chat-transient-status
        .chat-call-status-menu[data-tone="warning"]
        > .chat-call-status-button {
        color: var(--zn-member-warning-text);
    }

    body.user-body-messaging
        .chat-header-actions.has-chat-transient-status
        .chat-call-status-menu[data-tone="error"]
        > .chat-call-status-button {
        color: var(--zn-member-danger-text);
    }

    body.user-body-messaging .chat-call-status-button:hover,
    body.user-body-messaging .chat-call-status-button:focus-visible,
    body.user-body-messaging .chat-call-status-menu[open] > .chat-call-status-button {
        background: var(--zn-member-bg-surface-active);
    }

    body.user-body-messaging .chat-call-status-button svg {
        width: 20px;
        height: 20px;
    }

    body.user-body-messaging .chat-call-status-popover,
    body.user-body-messaging
        .chat-header-actions.has-chat-transient-status
        .chat-call-status-popover {
        position: absolute;
        top: calc(100% + 10px);
        right: -52px;
        z-index: 19;
        width: min(300px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        padding: 12px 14px;
        border: 1px solid var(--zn-member-border);
        border-radius: 14px;
        color: var(--zn-member-text-primary);
        background: var(--zn-member-bg-card);
        box-shadow: var(--zn-member-shadow);
        font-size: 0.82rem;
        line-height: 1.45;
        grid-template-columns: minmax(0, 1fr) 32px;
        align-items: start;
        gap: 10px;
    }

    body.user-body-messaging
        .chat-call-status-menu[open]
        > .chat-call-status-popover {
        display: grid;
    }

    body.user-body-messaging .chat-call-status-dismiss {
        width: 32px;
        min-width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        padding: 7px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: var(--zn-member-text-muted);
        cursor: pointer;
    }

    body.user-body-messaging .chat-call-status-dismiss:hover,
    body.user-body-messaging .chat-call-status-dismiss:focus-visible {
        background: var(--zn-member-bg-surface-active);
        color: var(--zn-member-text-primary);
    }

    body.user-body-messaging .chat-call-status-dismiss svg {
        width: 18px;
        height: 18px;
    }

    body.user-body-messaging .conversation-copy-top {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    body.user-body-messaging .topbar-title h1 {
        font-size: 1.06rem;
    }

    body.user-body-messaging .logout-form .secondary-button {
        min-width: 64px;
    }

    body.user-body-messaging .chat-header-main {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
    }

    body.user-body-messaging .chat-header-actions {
        grid-column: auto;
        width: auto;
        justify-content: flex-end;
    }

    body.user-body-messaging .chat-files-popover {
        top: calc(112px + env(safe-area-inset-top));
    }

    body.user-body-messaging .chat-more-popover .chat-files-popover {
        top: calc(88px + env(safe-area-inset-top));
    }

    body.user-body-messaging .chat-files-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    body.user-body-messaging .chat-files-item {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        min-height: 0;
    }

    body.user-body-messaging .chat-files-item-preview {
        width: 64px;
        height: 64px;
    }

    body.user-body-messaging .chat-files-item-name {
        -webkit-line-clamp: 2;
    }}

@media (min-width: 981px) {
    body.user-body-messaging .user-shell {
        padding: 14px 18px;
    }

    body.user-body-messaging .user-topbar {
        align-items: center;
        margin-bottom: 2px;
    }

    body.user-body-messaging .messaging-layout {
        gap: 14px;
    }

    body.user-body-messaging .conversation-hub,
    body.user-body-messaging .chat-card {
        border-color: var(--zn-member-border-bright);
        background: var(--zn-member-bg-card);
    }

    body.user-body-messaging .conversation-hub {
        padding: 14px 12px 14px 14px;
    }

    body.user-body-messaging .left-pane-top {
        gap: 12px;
        padding: 6px 6px 12px 4px;
    }

    body.user-body-messaging .messages-home-header {
        padding: 6px 6px 14px 4px;
    }

    body.user-body-messaging .profile-details,
    body.user-body-messaging .search-input,
    body.user-body-messaging .composer-input {
        background: var(--zn-member-bg-surface-lift);
        border-color: var(--zn-member-border-bright);
    }

    body.user-body-messaging .pwa-profile-menu {
        border: 0;
        background: transparent;
    }

    body.user-body-messaging .roster-scroll,
    body.user-body-messaging .message-timeline,
    body.user-body-messaging .chat-files-list {
        scrollbar-gutter: stable;
    }

    body.user-body-messaging .roster-scroll {
        gap: 14px;
        padding: 12px 5px 0 0;
    }

    body.user-body-messaging .list-section {
        gap: 9px;
    }

    body.user-body-messaging .list-section-header {
        padding: 0 4px;
    }

    body.user-body-messaging .conversation-list {
        gap: 6px;
    }

    body.user-body-messaging .conversation-item {
        padding: 10px;
        border-radius: 16px;
        border-color: var(--zn-member-border-muted);
        background: var(--zn-member-bg-surface-faint);
    }

    body.user-body-messaging .conversation-item:hover {
        background: var(--zn-member-bg-surface-active);
        border-color: var(--zn-member-border-bright);
    }

    body.user-body-messaging .conversation-item.is-active {
        background:
            linear-gradient(135deg, var(--zn-member-accent-surface), var(--zn-member-bg-surface-faint));
        border-color: var(--zn-member-accent-border-strong);
        box-shadow: inset 0 1px 0 var(--zn-member-bg-surface-active);
    }

    body.user-body-messaging .conversation-copy-top strong,
    body.user-body-messaging .conversation-meta,
    body.user-body-messaging .conversation-copy p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.user-body-messaging .conversation-copy-top strong {
        min-width: 0;
    }

    body.user-body-messaging .conversation-meta {
        flex: 0 0 auto;
        max-width: 92px;
    }



    body.user-body-messaging .chat-header-actions .secondary-button {
        min-height: 36px;
        min-width: 38px;
    }

    body.user-body-messaging .message-timeline {
        padding: 18px 20px;
        gap: 14px;
        background: var(--zn-member-bg-pane);
    }

    body.user-body-messaging .message-bubble {
        max-width: min(56%, 640px);
        border-radius: 16px;
        padding: 10px 14px;
        box-shadow: 0 10px 24px rgba(2, 7, 14, 0.16);
    }

    body.user-body-messaging .message-row.is-received .message-bubble {
        border-top-left-radius: 8px;
    }

    body.user-body-messaging .message-row.is-sent .message-bubble {
        border-top-right-radius: 8px;
    }

    body.user-body-messaging .composer {
        gap: 12px;



        border-top: 1px solid color-mix(in srgb, var(--zn-member-border) 58%, transparent);
        border-radius: 0 0 var(--user-radius-lg) var(--user-radius-lg);


    }

    body.user-body-messaging .composer-message-form {
        flex: 1 1 min(89%, 1280px);

        margin-left: clamp(10px, 2vw, 32px);
        display: grid;
        grid-template-columns: minmax(0, 1fr) 52px;
        gap: 12px;
        align-items: end;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    body.user-body-messaging .composer-input-shell {
        grid-column: 1;
        margin-left: -5%;
        margin-right: 0;
        border: 1px solid color-mix(in srgb, var(--zn-member-border-bright) 52%, transparent);
        border-radius: 28px;
        background:
            linear-gradient(
                180deg,
                color-mix(in srgb, var(--zn-member-bg-surface-lift) 54%, transparent),
                color-mix(in srgb, var(--zn-member-bg-surface) 36%, transparent)
            );
        box-shadow:
            inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 34%, transparent),
            0 12px 28px color-mix(in srgb, var(--zn-member-shadow-color, #000) 7%, transparent);
        backdrop-filter: blur(18px) saturate(1.05);
    }

    body.user-body-messaging .composer-tools .icon-button {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    body.user-body-messaging .voice-record-indicator {
        right: 58px;
        max-width: calc(100% - 134px);
        font-size: 0.72rem;
    }

    body.user-body-messaging .composer-button {
        grid-column: 2;
        align-self: end;
    }

    body.user-body-messaging .composer-input {

        min-height: 52px;
        height: 52px;
        max-height: calc(6 * 1.35em + 28px);
        overflow-y: auto;
        resize: none;
        padding: 14px 62px 14px 16px;

        line-height: 1.35;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    body.user-body-messaging .composer-button {
        min-height: 52px;
        min-width: 52px;
        width: 52px;
        border-radius: 999px;
    }}

@media (max-width: 760px) {
    body.user-body-messaging .call-screen-shell {

        padding-left: max(14px, env(safe-area-inset-left));
    }

    body.user-body-messaging .call-screen-topbar {
        top: calc(14px + env(safe-area-inset-top));
        left: max(14px, env(safe-area-inset-left));
        right: max(14px, env(safe-area-inset-right));
        grid-template-columns: minmax(0, 1fr) auto;
    }



    body.user-body-messaging .call-screen-body {
        padding: calc(72px + env(safe-area-inset-top)) 0 calc(122px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging .call-screen-avatar {
        width: 132px;
        height: 132px;
    }

    body.user-body-messaging .call-screen-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }





    body.user-body-messaging .call-control-button {
        min-width: 64px;
        gap: 6px;
    }



    body.user-body-messaging .call-control-button-label {
        font-size: 0.68rem;
    }

    body.user-body-messaging .call-screen[data-call-experience-mode="video"] .call-video-stage[data-has-remote-video="true"] .call-video-tile-local,
    body.user-body-messaging .call-screen[data-call-experience-mode="screen-share"] .call-video-stage[data-has-remote-video="true"] .call-video-tile-local {
        right: max(14px, env(safe-area-inset-right));
        bottom: calc(118px + env(safe-area-inset-bottom));
        width: min(28vw, 118px);
        min-width: 96px;
        border-radius: 14px;
    }

    body.user-body-messaging .call-screen[data-call-experience-mode="video"] .call-video-label,
    body.user-body-messaging .call-screen[data-call-experience-mode="screen-share"] .call-video-label {
        bottom: calc(118px + env(safe-area-inset-bottom));
    }}

@media (max-width: 430px) and (max-height: 740px) {
    body.user-body-messaging .call-screen-body {
        padding: calc(62px + env(safe-area-inset-top)) 0 calc(108px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging .call-screen-avatar {
        width: 104px;
        height: 104px;
    }

    body.user-body-messaging .call-screen-title {
        font-size: 1.85rem;
    }

    }

.call-screen-avatar .conversation-avatar-image {
    border-radius: inherit;
}

@media (max-width: 760px) {










    body.user-body-messaging .call-screen--video .call-video-stage[data-has-remote-video="true"] .call-video-tile-local,
    body.user-body-messaging .call-screen--screen .call-video-stage[data-has-remote-video="true"] .call-video-tile-local {
        border-radius: 14px;
    }}

@media (max-width: 430px) and (max-height: 740px) {
    body.user-body-messaging .call-screen--audio .call-screen-avatar {
        width: 108px;
        height: 108px;
    }

    body.user-body-messaging .call-screen--audio .call-screen-title {
        font-size: 2rem;
    }

    body.user-body-messaging .call-control-button-face {
        width: 50px;
        height: 50px;
    }}

.meeting-media-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.meeting-layout.meeting-room-active .meeting-media-grid {
    position: relative;
    min-height: 0;
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: #12151c;
}

.meeting-layout.meeting-room-active .meeting-stage[data-screen-sharing="true"] .meeting-media-grid {
    grid-template-columns: minmax(0, 1fr);
}

.meeting-media-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface);
}

.meeting-layout.meeting-room-active .meeting-media-tile {
    min-height: 220px;
    background: #12151c;
}

.meeting-layout.meeting-room-active .meeting-media-grid[data-remote-count="0"] .meeting-remote-grid {
    display: none;
}

.meeting-layout.meeting-room-active .meeting-media-grid[data-remote-count="0"] .meeting-local-tile {
    position: relative;
    inset: auto;
    z-index: 1;
    width: auto;
    min-height: 100%;
    aspect-ratio: auto;
    border-color: var(--zn-member-border);
    box-shadow: none;
}

.meeting-media-tile video {
    width: 100%;
    height: 100%;
    min-height: 150px;
    display: block;
    object-fit: cover;
    background: var(--zn-member-bg-surface-hover);
}

.meeting-layout.meeting-room-active .meeting-media-tile video {
    min-height: 220px;
    background: #12151c;
}

.meeting-layout.meeting-room-active .meeting-local-tile .meeting-media-placeholder {
    font-size: 0.78rem;
}

.meeting-media-tile span,
.meeting-media-placeholder {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--zn-member-bg-card);
    color: var(--zn-member-text-secondary);
    font-size: 0.76rem;
}

.meeting-layout.meeting-room-active .meeting-media-tile span {
    max-width: min(260px, calc(100% - 20px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(18, 21, 28, 0.82);
    color: #f4f7fb;
}

.meeting-media-placeholder {
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 0;
    background: var(--zn-member-bg-surface);
    font-size: 0.9rem;
}

.meeting-media-placeholder[hidden] {
    display: none !important;
}

.meeting-layout.meeting-room-active .meeting-media-placeholder {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        #12151c;
    color: #dce6f5;
    font-size: 1rem;
}

.meeting-layout.meeting-room-active .meeting-media-tile[data-video-state="waiting-for-track"] > video,
.meeting-layout.meeting-room-active .meeting-media-tile[data-video-state="waiting-for-frames"] > video {
    opacity: 0;
}

.meeting-layout.meeting-room-active .meeting-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.meeting-media-placeholder .meeting-media-avatar,
.meeting-media-placeholder .meeting-media-placeholder-copy,
.meeting-layout.meeting-room-active .meeting-media-placeholder .meeting-media-avatar,
.meeting-layout.meeting-room-active .meeting-media-placeholder .meeting-media-placeholder-copy {
    position: static;
    max-width: none;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
}

.meeting-media-placeholder .meeting-media-avatar,
.meeting-layout.meeting-room-active .meeting-media-placeholder .meeting-media-avatar {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--zn-member-accent), var(--zn-member-accent-border-strong));
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.meeting-media-placeholder .meeting-media-placeholder-copy,
.meeting-layout.meeting-room-active .meeting-media-placeholder .meeting-media-placeholder-copy {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 0.92rem;
}

.guest-live-shell .meeting-media-grid {
    position: relative;
    min-height: 0;
    height: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--zn-border) 78%, transparent);
    border-radius: 22px;
    background: #10141b;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.20);
}

.guest-live-shell .meeting-media-tile {
    position: relative;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #10141b;
}

.guest-live-shell .meeting-media-tile video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    background: #10141b;
}

.guest-live-shell .meeting-media-tile > span {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 4;
    max-width: calc(100% - 24px);
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #1c222a;
    font-size: 0.78rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guest-live-shell .meeting-media-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.10), transparent 28%),
        #10141b;
    color: rgba(244, 247, 251, 0.9);
    text-align: center;
}

.guest-live-shell .meeting-media-placeholder[hidden] {
    display: none !important;
}

.guest-live-shell .meeting-media-placeholder .meeting-media-avatar {
    position: static;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--zn-accent), color-mix(in srgb, var(--zn-accent) 72%, #ffffff));
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
}

.guest-live-shell .meeting-media-placeholder .meeting-media-placeholder-copy {
    position: static;
    max-width: min(260px, 84%);
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 0.95rem;
    line-height: 1.35;
}

@media (max-width: 860px) {

    .guest-live-shell .meeting-media-grid {
        border-radius: 18px;
    }

    .guest-live-shell .meeting-media-tile > span {
        left: 10px;
        bottom: 10px;
        padding: 5px 9px;
        font-size: 0.74rem;
    }}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-media-grid {
    min-height: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #05070c;
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-media-tile {
    min-height: 100%;
    border: 0;
    border-radius: 0;
    background: #05070c;
    box-shadow: none;
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-media-tile video {
    min-height: 100%;
    background: #05070c;
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-media-grid[data-remote-count="0"] .meeting-local-tile,
body.user-body-meetings .meeting-layout.meeting-room-active .meeting-stage[data-screen-sharing="true"] .meeting-local-tile {
    position: absolute;
    inset: auto max(18px, env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) auto;
    z-index: 2;
    width: clamp(148px, 15vw, 220px);
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-media-tile span {
    left: 12px;
    bottom: 12px;
    padding: 5px 9px;
    background: rgba(7, 10, 18, 0.64);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 650;
    backdrop-filter: blur(12px);
}

@media (max-width: 760px) {

    .meeting-layout.meeting-room-active .meeting-media-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: minmax(0, 1fr);
    }}

@media (max-width: 760px) {
    body.user-body-messaging .call-screen,
    body.user-body-messaging .call-screen-shell,
    body.user-body-messaging .call-screen-body {
        min-height: 100dvh;
    }

    body.user-body-messaging .call-screen-shell {
        padding:
            calc(12px + env(safe-area-inset-top))
            max(10px, env(safe-area-inset-right))
            calc(18px + env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
    }

    body.user-body-messaging .call-screen-secondary-actions {
        position: fixed;
        z-index: 7;
        top: calc(58px + env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
        width: auto;
        min-height: 0;
    }

    body.user-body-messaging .call-screen-secondary-actions:empty,
    body.user-body-messaging .call-screen-secondary-actions[hidden] {
        display: none !important;
    }

    body.user-body-messaging .call-secondary-action {
        min-width: 0;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 0.76rem;
    }

    body.user-body-messaging .call-screen--video .call-switch-camera-overlay:not([hidden]) {
        position: fixed;
        z-index: 8;
        top: calc(14px + env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        display: grid;
        place-items: center;
    }

    body.user-body-messaging .call-screen--audio .call-screen-body {
        padding:
            calc(44px + env(safe-area-inset-top))
            max(16px, env(safe-area-inset-left))
            calc(230px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging .call-screen--audio .call-screen-identity {
        gap: 12px;
        transform: translateY(-56px);
    }

    body.user-body-messaging .call-screen--audio .call-screen-avatar {
        width: 96px;
        height: 96px;
        box-shadow:
            0 0 0 8px var(--zn-member-bg-surface-lift),
            0 0 0 16px var(--zn-member-bg-surface-faint),
            var(--zn-member-shadow);
    }

    body.user-body-messaging .call-screen--audio .call-screen-avatar::before {
        inset: calc((var(--voice-pulse-spread) + 4px) * -1);
    }

    body.user-body-messaging .call-screen--audio .call-screen-title {
        font-size: 1.78rem;
        line-height: 1.04;
    }

    body.user-body-messaging .call-screen--audio .call-screen-status,
    body.user-body-messaging .call-screen--audio .call-screen-status-detail {
        position: static;
        z-index: auto;
        min-height: 30px;
        max-width: min(320px, calc(100vw - 48px));
        margin: 2px auto 0;
        padding: 7px 14px;
        border: 1px solid var(--zn-member-border-soft);
        border-radius: 999px;
        background: color-mix(in srgb, var(--zn-member-bg-card) 92%, transparent);
        box-shadow: var(--zn-member-shadow);
        backdrop-filter: blur(18px);
        transform: none;
        text-align: center;
    }

    body.user-body-messaging .call-screen--audio .call-screen-status {
        font-size: 0.98rem;
    }

    body.user-body-messaging .call-screen .meeting-memo-control {
        width: 50px;
        justify-self: center;
    }

    body.user-body-messaging .call-screen .meeting-memo-button {
        width: 50px;
    }

    body.user-body-messaging .call-control-button {
        width: 50px;
    }

    body.user-body-messaging .call-control-button-face {
        width: 46px;
        height: 46px;
    }

    body.user-body-messaging .call-screen-footer {
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(18px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging:has(.call-screen:not(.is-hidden):not(.is-minimized)) .user-bottom-nav {
        display: none !important;
        pointer-events: none;
    }

    body.user-body-messaging .call-screen--video .call-video-stage[data-has-remote-video="true"] .call-video-tile-local,
    body.user-body-messaging .call-screen--screen .call-video-stage[data-has-remote-video="true"] .call-video-tile-local {
        bottom: calc(92px + env(safe-area-inset-bottom));
        right: max(10px, env(safe-area-inset-right));
        width: 96px;
        min-width: 86px;
    }

    body.user-body-messaging .call-screen--video .call-video-label,
    body.user-body-messaging .call-screen--screen .call-video-label {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }}

[data-theme-presentation] body.user-body-messaging .conversation-hub {
    background: var(--zn-messaging-hub-background);
}

[data-theme-presentation] body.user-body-messaging .messages-home-header {
    background: var(--zn-messaging-home-header-background);
}

[data-theme-presentation] body.user-body-messaging .messages-home-header .surface-switcher-link {
    border-color: var(--zn-messaging-switcher-border);
    background: var(--zn-messaging-switcher-background);
    box-shadow: var(--zn-messaging-switcher-shadow);
}

[data-theme-presentation] body.user-body-messaging .messages-home-header .surface-switcher-link.is-active {
    border-color: var(--zn-messaging-switcher-active-border);
    background: var(--zn-messaging-switcher-active-background);
    box-shadow: var(--zn-messaging-switcher-active-shadow);
}

[data-theme-presentation] body.user-body-messaging .conversation-search .search-input {
    border-color: var(--zn-messaging-search-border);
    background: var(--zn-messaging-search-background);
    box-shadow: var(--zn-messaging-search-shadow);
}

[data-theme-presentation] body.user-body-messaging .message-create-group-button {
    border-color: var(--zn-messaging-create-border);
    background: var(--zn-messaging-create-background);
    box-shadow: var(--zn-messaging-create-shadow);
}

[data-theme-presentation] body.user-body-messaging .conversation-list-recent {
    gap: 10px;
}

[data-theme-presentation] body.user-body-messaging .conversation-list-recent .conversation-item {
    border-color: var(--zn-messaging-recent-border);
    background: var(--zn-messaging-recent-background);
    box-shadow: var(--zn-messaging-recent-shadow);
}

[data-theme-presentation] body.user-body-messaging .conversation-list-recent .conversation-item:hover,
[data-theme-presentation] body.user-body-messaging .conversation-list-recent .conversation-item.is-active {
    border-color: var(--zn-messaging-recent-active-border);
    background: var(--zn-messaging-recent-active-background);
    box-shadow: var(--zn-messaging-recent-active-shadow);
}

[data-theme-presentation] body.user-body-messaging .conversation-list-contacts {
    overflow: hidden;
    gap: 0;
    border: 1px solid var(--zn-messaging-contacts-border);
    border-radius: 18px;
    background: var(--zn-messaging-contacts-background);
    box-shadow: var(--zn-messaging-contacts-shadow);
}

[data-theme-presentation] body.user-body-messaging .conversation-list-contacts .conversation-item {
    border: 0;
    border-bottom: 1px solid var(--zn-messaging-contact-border);
    border-radius: 0;
    background: transparent;
}

[data-theme-presentation] body.user-body-messaging .conversation-list-contacts .conversation-item:last-child {
    border-bottom: 0;
}

[data-theme-presentation] body.user-body-messaging .conversation-list-contacts .conversation-item:hover {
    background: var(--zn-messaging-contact-hover-background);
}

[data-theme-presentation] body.user-body-messaging .conversation-avatar {
    border: 1px solid var(--zn-messaging-avatar-border);
    background: var(--zn-messaging-avatar-background);
    color: var(--zn-messaging-avatar-color);
    box-shadow: var(--zn-messaging-avatar-shadow);
}

[data-theme-presentation] body.user-body-messaging .conversation-list-contacts .conversation-item:nth-child(3n + 1) .conversation-avatar {
    background: var(--zn-messaging-avatar-1-background);
    color: var(--zn-messaging-avatar-1-color);
}

[data-theme-presentation] body.user-body-messaging .conversation-list-contacts .conversation-item:nth-child(3n + 2) .conversation-avatar {
    background: var(--zn-messaging-avatar-2-background);
    color: var(--zn-messaging-avatar-2-color);
}

[data-theme-presentation] body.user-body-messaging .conversation-list-contacts .conversation-item:nth-child(3n) .conversation-avatar {
    background: var(--zn-messaging-avatar-3-background);
    color: var(--zn-messaging-avatar-3-color);
}

body.user-body-messaging .user-bottom-nav-in-pane {
    flex: 0 0 auto;
    margin: auto -12px -12px;
    padding: 11px 18px 14px;
    border-radius: 0 0 var(--user-radius-lg) var(--user-radius-lg);
}

@media (max-width: 1280px) and (min-width: 761px) {
    body.user-body-messaging .conversation-hub {
        padding-bottom: 0;
    }

    body.user-body-messaging .user-bottom-nav-in-pane {
        margin: auto -12px -14px -14px;
        padding: 11px 18px 14px;
    }}

@media (max-width: 980px) {
    [data-theme-presentation="advisory"] body.user-body-messaging .conversation-hub {
        background: var(--zn-messaging-hub-compact-background);
    }

    [data-theme-presentation="advisory"] body.user-body-messaging .roster-scroll {
        padding-top: 8px;
    }

    [data-theme-presentation="advisory"] body.user-body-messaging .conversation-list-recent .conversation-item {
        padding: 12px 14px;
        border: 1px solid var(--zn-messaging-recent-compact-border);
        border-radius: 18px;
    }

    [data-theme-presentation="advisory"] body.user-body-messaging .conversation-list-contacts .conversation-item {
        padding: 13px 14px;
    }

    [data-theme-presentation="advisory"] body.user-body-messaging .conversation-list-contacts .conversation-avatar {
        border-radius: 50%;
    }}

@media (max-width: 980px) {
    body.user-body-messaging .topbar-title-mark,
    body.user-body-meetings .meeting-brand-row .topbar-title-mark,
    body.user-body-workspace .workspace-brand-row .topbar-title-mark {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        margin-top: 0;
        border-radius: 9px;
    }

    body.user-body-messaging .topbar-title-mark-image,
    body.user-body-meetings .meeting-brand-row .topbar-title-mark-image,
    body.user-body-workspace .workspace-brand-row .topbar-title-mark-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 46%;
    }

    body.user-body-messaging .topbar-profile-image,
    body.user-body-meetings .meeting-brand-row .topbar-profile-image,
    body.user-body-workspace .workspace-brand-row .topbar-profile-image {
        transform: scale(1.08);
    }

}

@media (min-width: 761px) {
    body.user-body-messaging .conversation-hub {
        padding-bottom: 0 !important;
    }

    body.user-body-messaging .conversation-hub > .user-bottom-nav-in-pane {
        align-self: stretch;
        width: auto;
        margin-top: auto !important;
        margin-bottom: 0 !important;
        padding: 12px 18px 14px !important;
        border-radius: 0 0 var(--user-radius-lg) var(--user-radius-lg) !important;
    }}

@media (min-width: 1281px) {
    body.user-body-messaging .conversation-hub > .user-bottom-nav-in-pane {
        margin-right: -12px !important;
        margin-left: -12px !important;
    }}

@media (min-width: 761px) and (max-width: 1280px) {
    body.user-body-messaging .conversation-hub > .user-bottom-nav-in-pane {
        margin-right: -12px !important;
        margin-left: -14px !important;
    }}

@media (max-width: 760px) {
    body.user-body-messaging .user-bottom-nav-global {
        right: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 !important;

    }}

body.user-body-messaging .messages-brand-row .znode-user-version,
body.user-body-meetings .meeting-brand-row .znode-user-version,
body.user-body-workspace .workspace-brand-row .znode-user-version {
    justify-self: end;
}

body.user-body-messaging .profile-menu-panel > .user-header-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: -2px 0 0;
    padding: 0 2px 2px;
}

body.user-body-messaging .profile-menu-panel > .user-header-actions .notification-settings-compact,
body.user-body-messaging .profile-menu-panel > .user-header-actions .notification-enable-button,
body.user-body-messaging .profile-menu-panel > .user-header-actions .user-header-logout-button {
    width: 38px;
    height: 38px;
}

body.user-body-messaging .profile-menu-panel > .user-header-actions .notification-znode-icon,
body.user-body-messaging .profile-menu-panel > .user-header-actions .notification-bell-icon,
body.user-body-messaging .profile-menu-panel > .user-header-actions .notification-bell-icon svg,
body.user-body-messaging .profile-menu-panel > .user-header-actions .user-header-logout-icon {
    width: 18px;
    height: 18px;
}

@media (max-width: 760px) {
    body.user-body-messaging .messages-brand-row,
    body.user-body-meetings .meeting-brand-row,
    body.user-body-workspace .workspace-brand-row {
        grid-template-columns: 44px minmax(0, 1fr) auto !important;
    }}

body.user-body-messaging .user-bottom-nav {
    color: var(--zn-member-text-secondary);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--zn-member-bg-card) 92%, transparent),
            color-mix(in srgb, var(--zn-member-bg-app) 92%, var(--zn-member-bg-card))
        ),
        var(--zn-member-bg-app) !important;
    border-top-color: color-mix(in srgb, var(--zn-member-border) 72%, transparent) !important;
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 36%, transparent),
        0 -16px 30px color-mix(in srgb, var(--zn-member-shadow-color, #000) 10%, transparent) !important;
}

body.user-body-messaging .user-bottom-nav-link {
    color: var(--zn-member-text-secondary);
}

body.user-body-messaging .user-bottom-nav-link.is-active {
    color: var(--zn-member-bottom-nav-active-text);
}

body.user-body-messaging .composer-button {
    border-color: var(--zn-messaging-primary-control-border);
    background: var(--zn-messaging-primary-control-background);
    color: var(--zn-messaging-primary-control-text);
}

body.user-body-messaging .call-button,
body.user-body-messaging .voice-record-button,
body.user-body-messaging .composer-tools .icon-button {
    border-color: var(--zn-messaging-secondary-control-border);
    background: var(--zn-messaging-secondary-control-background);
    color: var(--zn-messaging-secondary-control-text);
}

body.user-body-messaging .composer-button svg,
body.user-body-messaging .call-button svg,
body.user-body-messaging .voice-record-button svg,
body.user-body-messaging .composer-tools .icon-button svg {
    color: currentColor;
    stroke: currentColor;
}

@media (min-width: 981px) {
    body.user-body-messaging .chat-card {
        --chat-header-overlay-height: 78px;
        position: relative;
    }

    body.user-body-messaging .chat-card:has(.chat-active-call:not([hidden])) {
        --chat-header-overlay-height: 150px;
    }

    body.user-body-messaging .network-feed-card {
        --chat-header-overlay-height: 78px;
    }

    body.user-body-messaging .network-feed-card .network-feed-list {
        padding-top: calc(var(--chat-header-overlay-height) + 16px);
        scroll-padding-top: calc(var(--chat-header-overlay-height) + 16px);
    }

    body.user-body-messaging .chat-header {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        z-index: 8;
        min-height: var(--chat-header-overlay-height);
        padding: 12px 20px 8px;
        background-color: transparent !important;
        background:
            linear-gradient(
                180deg,
                color-mix(in srgb, var(--zn-member-bg-card) 50%, transparent),
                color-mix(in srgb, var(--zn-member-bg-card) 24%, transparent) 58%,
                transparent
            ) !important;
        border-bottom-color: color-mix(in srgb, var(--zn-member-border) 34%, transparent) !important;
        box-shadow:
            inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 18%, transparent),
            0 12px 24px color-mix(in srgb, var(--zn-member-shadow-color, #000) 5%, transparent);
        backdrop-filter: blur(18px) saturate(1.12);
        -webkit-backdrop-filter: blur(18px) saturate(1.12);
    }

    body.user-body-messaging .message-timeline {
        padding-top: calc(var(--chat-header-overlay-height) + 6px);
        scroll-padding-top: calc(var(--chat-header-overlay-height) + 6px);
    }

    body.user-body-messaging .composer {
        position: relative;
        height: calc(var(--bottom-nav-height) + 8px);
        min-height: calc(var(--bottom-nav-height) + 8px);
        max-height: calc(var(--bottom-nav-height) + 8px);
        margin-top: -8px;
        padding: 18px 18px 10px !important;
        align-items: center;
        background:
            linear-gradient(
                180deg,
                color-mix(in srgb, var(--zn-member-bg-card) 64%, transparent),
                color-mix(in srgb, var(--zn-member-bg-app) 56%, transparent)
            ) !important;
        border-top-color: color-mix(in srgb, var(--zn-member-border) 64%, transparent) !important;
        box-shadow:
            inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 32%, transparent),
            0 -16px 30px color-mix(in srgb, var(--zn-member-shadow-color, #000) 10%, transparent) !important;
        backdrop-filter: blur(22px) saturate(1.08);
        -webkit-backdrop-filter: blur(22px) saturate(1.08);
    }

    body.user-body-messaging .composer-message-form {
        height: 56px;
        min-height: 56px;
        max-width: min(74%, 980px);
        align-items: center;
        border-radius: 28px;
        overflow: hidden;
    }

    body.user-body-messaging .composer-input {
        min-height: 52px;
        border-radius: 28px;
    }

    body.user-body-messaging .composer-button,
    body.user-body-messaging .composer-tools .icon-button {
        align-self: center;
    }

    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone] .message-bubble:not(.has-media-message),
    body.user-body-messaging .message-row.is-group-message .message-bubble:not(.has-media-message) {
        --group-message-bg-final: color-mix(in srgb, var(--group-message-tone) 34%, var(--zn-group-message-surface) 66%);
        --group-message-border-final: color-mix(in srgb, var(--group-message-tone) 78%, var(--zn-member-border) 22%);
        background:
            linear-gradient(
                180deg,
                color-mix(in srgb, var(--zn-member-bg-surface) 22%, transparent),
                transparent
            ),
            var(--group-message-bg-final) !important;
        border-color: var(--group-message-border-final) !important;
        border-left: 3px solid var(--group-message-tone) !important;
        box-shadow:
            inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 22%, transparent),
            0 12px 28px color-mix(in srgb, var(--group-message-tone) 22%, transparent) !important;
    }

    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row.is-sent[data-sender-tone] .message-bubble:not(.has-media-message),
    body.user-body-messaging .message-row.is-sent.is-group-message .message-bubble:not(.has-media-message) {
        --group-message-bg-final: color-mix(in srgb, var(--group-message-tone) 40%, var(--zn-group-message-sent-surface) 60%);
    }

    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone] .message-author,
    body.user-body-messaging .message-row.is-group-message .message-author {
        color: var(--zn-member-group-message-author-text) !important;
    }

    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="0"],
    body.user-body-messaging .message-row.is-group-message.message-tone-0 { --group-message-tone: var(--zn-group-message-tone-0); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="1"],
    body.user-body-messaging .message-row.is-group-message.message-tone-1 { --group-message-tone: var(--zn-group-message-tone-1); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="2"],
    body.user-body-messaging .message-row.is-group-message.message-tone-2 { --group-message-tone: var(--zn-group-message-tone-2); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="3"],
    body.user-body-messaging .message-row.is-group-message.message-tone-3 { --group-message-tone: var(--zn-group-message-tone-3); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="4"],
    body.user-body-messaging .message-row.is-group-message.message-tone-4 { --group-message-tone: var(--zn-group-message-tone-4); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="5"],
    body.user-body-messaging .message-row.is-group-message.message-tone-5 { --group-message-tone: var(--zn-group-message-tone-5); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="6"],
    body.user-body-messaging .message-row.is-group-message.message-tone-6 { --group-message-tone: var(--zn-group-message-tone-6); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="7"],
    body.user-body-messaging .message-row.is-group-message.message-tone-7 { --group-message-tone: var(--zn-group-message-tone-7); }}
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="8"],
    body.user-body-messaging .message-row.is-group-message.message-tone-8 { --group-message-tone: var(--zn-group-message-tone-8); }
    body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone="9"],
    body.user-body-messaging .message-row.is-group-message.message-tone-9 { --group-message-tone: var(--zn-group-message-tone-9); }

@media (max-width: 760px) {
    body.user-body-messaging .user-bottom-nav-global {
        background:
            linear-gradient(
                180deg,
                color-mix(in srgb, var(--zn-member-bg-card) 92%, transparent),
                color-mix(in srgb, var(--zn-member-bg-app) 92%, var(--zn-member-bg-card))
            ),
            var(--zn-member-bg-app) !important;
        box-shadow:
            0 80px 0 80px
            color-mix(in srgb, var(--zn-member-bg-app) 92%, var(--zn-member-bg-card)) !important;
    }}

body.user-body-messaging .messaging-layout[data-active-conversation-kind="group"] .message-row[data-sender-tone] .message-bubble:not(.has-media-message),
body.user-body-messaging .chat-card[data-conversation-kind="group"] .message-row[data-sender-tone] .message-bubble:not(.has-media-message),
body.user-body-messaging .message-row.is-group-message .message-bubble:not(.has-media-message) {
    border-left-width: 3px !important;
}

body.user-body-messaging .message-row[data-sender-tone="0"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-0);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent), color-mix(in srgb, var(--zn-group-message-tone-0) 28%, var(--zn-group-message-surface) 72%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-0) 64%, var(--zn-member-border) 36%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="1"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-1) 28%, var(--zn-group-message-surface) 72%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-1) 64%, var(--zn-member-border) 36%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="2"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-2) 30%, var(--zn-group-message-surface) 70%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-2) 66%, var(--zn-member-border) 34%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="3"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-3);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-3) 32%, var(--zn-group-message-surface) 68%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-3) 68%, var(--zn-member-border) 32%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="4"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-4) 30%, var(--zn-group-message-surface) 70%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-4) 66%, var(--zn-member-border) 34%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="5"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-5);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-5) 30%, var(--zn-group-message-surface) 70%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-5) 66%, var(--zn-member-border) 34%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="6"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-6);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-6) 32%, var(--zn-group-message-surface) 68%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-6) 68%, var(--zn-member-border) 32%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="7"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-7);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-7) 32%, var(--zn-group-message-surface) 68%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-7) 68%, var(--zn-member-border) 32%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="8"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-8);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-8) 30%, var(--zn-group-message-surface) 70%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-8) 66%, var(--zn-member-border) 34%) !important;
}

body.user-body-messaging .message-row[data-sender-tone="9"] .message-bubble:not(.has-media-message) {
    --group-message-tone: var(--zn-group-message-tone-9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent), color-mix(in srgb, var(--zn-group-message-tone-9) 30%, var(--zn-group-message-surface) 70%) !important;
    border-color: color-mix(in srgb, var(--zn-group-message-tone-9) 66%, var(--zn-member-border) 34%) !important;
}

body.user-body-messaging .message-row[data-sender-tone] .message-author {
    color: var(--zn-member-group-message-author-text) !important;
}

body.user-body-messaging .message-author-line {
    display: grid;
}

@media (max-width: 760px) {
    html[data-device-platform="ios"][data-display-mode="standalone"] {
        --bottom-nav-height: 53px;
        --ios-compact-bottom: 8px;
        --ios-nav-panel-lift: 32px;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .user-bottom-nav {
        height: calc(var(--bottom-nav-height) + var(--ios-compact-bottom) + var(--ios-nav-panel-lift));
        min-height: calc(var(--bottom-nav-height) + var(--ios-compact-bottom) + var(--ios-nav-panel-lift));
        padding-top: 0;
        padding-bottom: var(--ios-compact-bottom);
        align-items: center;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .user-bottom-nav-link {
        transform: translateY(-3px);
    }

}

[data-theme-family="institutional-light"] body.user-body-messaging .conversation-item.is-active {
    border-color: var(--zn-member-selected-surface-border);
    background: color-mix(
        in srgb,
        var(--zn-member-accent) 8%,
        var(--zn-member-selected-surface-background)
    );
    color: var(--zn-member-selected-surface-text);
    box-shadow: var(--zn-member-selected-surface-shadow);
}

[data-theme="moonlight-silver"] body.user-body-messaging .message-create-group-button {
    border: 1px solid var(--zn-surface-switcher-border, var(--zn-member-border));
    background: var(--zn-surface-switcher-background, var(--zn-member-bg-surface-hover));
    color: #FFFFFF;
    box-shadow: none;
}

[data-theme="moonlight-silver"] body.user-body-messaging .message-create-group-button:hover,
[data-theme="moonlight-silver"] body.user-body-messaging .message-create-group-button:focus-visible {
    border-color: var(--zn-surface-switcher-border, var(--zn-member-border));
    background: var(--zn-surface-switcher-background, var(--zn-member-bg-surface-hover));
    color: #FFFFFF;
}

[data-theme="moonlight-silver"] body.user-body-messaging .message-create-group-button:focus-visible {
    outline: 1px solid var(--zn-member-border-strong);
    outline-offset: 2px;
}

@media (min-width: 761px) {
    [data-theme-family="institutional-light"] body.user-body-messaging .conversation-item:hover {
        border-color: var(--zn-member-accent-border-muted);
        background: color-mix(in srgb, var(--zn-member-accent) 7%, var(--zn-member-bg-card));
        color: var(--zn-member-text-primary);
    }
}

@media (max-width: 760px) {
    [data-theme-family="institutional-light"] body.user-body-messaging .mobile-backlink {
        color: var(--zn-member-filled-accent-icon);
    }

    :is([data-theme="marine-blue"], [data-theme="dovehouse-capital"]) body.user-body-messaging .mobile-backlink {
        align-items: center;
        justify-content: center;
        border: 1px solid var(--zn-mobile-backlink-border);
        border-radius: 50%;
        background: var(--zn-mobile-backlink-background);
        color: var(--zn-mobile-backlink-text);
    }

    [data-theme="moonlight-silver"] body.user-body-messaging .mobile-backlink {
        color: var(--zn-mobile-backlink-text);
    }

    [data-theme-family="institutional-light"] body.user-body-messaging .conversation-item.is-active {
        border-color: var(--zn-member-border-muted);
        background: transparent;
        box-shadow: none;
    }
}

@media (min-width: 981px) {
    body.user-body-messaging .message-bubble.has-text-message {
        width: max-content;
        max-width: min(65%, 760px);
    }

    body.user-body-messaging .message-bubble.has-text-message .message-author-line {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 6px;
        min-width: 0;
        max-width: 100%;
        margin: 0 0 6px;
    }

    body.user-body-messaging .message-bubble.has-text-message .message-author,
    body.user-body-messaging .message-bubble.has-text-message .message-author-title {
        min-width: 0;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.user-body-messaging .conversation-hub > .user-bottom-nav-in-pane {
        height: var(--bottom-nav-height);
        min-height: var(--bottom-nav-height);
    }

    body.user-body-messaging .composer {
        height: auto;
        min-height: var(--bottom-nav-height);
        max-height: none;
        margin-top: 0;
        padding-top: 11px !important;
        padding-bottom: 12px !important;
        align-items: flex-end;
    }

    body.user-body-messaging .composer-message-form {
        height: auto;
        min-height: 52px;
        max-width: none;
        align-items: end;
        overflow: visible;
    }

    body.user-body-messaging .composer-button,
    body.user-body-messaging .composer-tools .icon-button {
        align-self: end;
    }
}

@media (max-width: 760px) {
    body.user-body-messaging .composer-input-shell {
        align-self: flex-end;
    }

    body.user-body-messaging .voice-record-button {
        top: auto;
        right: 5px;
        bottom: 6px;
        min-width: 36.1px;
        min-height: 36.1px;
        width: 36.1px;
        height: 36.1px;
        transform: none;
    }

    body.user-body-messaging .voice-record-button::after {
        content: "";
        position: absolute;
        inset: -4px;
    }

    body.user-body-messaging .voice-record-button:hover,
    body.user-body-messaging .voice-record-button:focus-visible {
        transform: none;
    }

    body.user-body-messaging .composer-button,
    body.user-body-messaging .composer-tools .icon-button {
        align-self: flex-end;
    }

    body.user-body-messaging .composer-tools .icon-button {
        margin-bottom: 1px;
    }

    body.user-body-messaging .composer-message-form.is-replying .composer-input-shell {
        padding: 6px;
    }

    body.user-body-messaging .composer-message-form.is-replying .voice-record-button {
        right: 13px;
        bottom: 13px;
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .composer-reply-preview {
        margin-bottom: 6px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card-direct {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        background: var(--zn-member-bg-pane);
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card-direct > .chat-header {
        grid-row: 1;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card-direct > .message-timeline {
        grid-row: 2;
        min-height: 0;
        overflow-y: auto;
        padding:
            14px
            max(12px, env(safe-area-inset-right))
            12px
            max(12px, env(safe-area-inset-left));
        scroll-padding-bottom: 12px;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card-direct > .composer {
        --composer-safe-bottom: max(var(--safe-bottom, 0px), env(safe-area-inset-bottom, 0px));
        grid-row: 3;
        position: relative;
        inset: auto;
        z-index: 1;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        flex: none;
        padding:
            6px
            max(18px, env(safe-area-inset-right))
            calc(6px + var(--composer-safe-bottom))
            max(18px, env(safe-area-inset-left));
    }

    html[data-device-platform="ios"][data-display-mode="standalone"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card-direct > .composer {
        --composer-safe-bottom: 0px;
        grid-row: auto;
        position: absolute;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
    }

    html[data-device-platform="ios"][data-display-mode="standalone"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card-direct > .message-timeline {
        padding-bottom: calc(var(--znode-composer-obstruction-height, var(--znode-composer-height)) + 12px);
        scroll-padding-bottom: calc(var(--znode-composer-obstruction-height, var(--znode-composer-height)) + 12px);
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card-direct > .composer::after {
        display: none;
    }
}

@media (max-width: 900px) {
    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .attachment-viewer:not([data-viewer-kind="image"]) {
        padding:
            max(74px, calc(var(--znode-ios-pwa-safe-top) + 38px))
            max(14px, env(safe-area-inset-right))
            max(18px, calc(var(--znode-ios-pwa-safe-bottom) + 12px))
            max(14px, env(safe-area-inset-left));
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .attachment-viewer:not([data-viewer-kind="image"]) .attachment-viewer-panel {
        max-height: calc(100dvh - max(74px, calc(var(--znode-ios-pwa-safe-top) + 38px)) - max(18px, calc(var(--znode-ios-pwa-safe-bottom) + 12px)));
    }

    html[data-device-platform="ios"][data-display-mode="standalone"] body.user-body-messaging .attachment-viewer:not([data-viewer-kind="image"]) .attachment-viewer-header {
        min-height: calc(58px + var(--znode-ios-pwa-safe-top));
    }
}
