
.messaging-layout {
    flex: 1;
    min-height: 0;
    max-width: none;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
    gap: 12px;
}

.messages-network-status {
    position: fixed;
    left: 50%;
    top: calc(14px + env(safe-area-inset-top, 0px));
    z-index: 1350;
    width: min(calc(100vw - 28px), 440px);
    transform: translateX(-50%);
    padding: 8px 14px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.3);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    pointer-events: none;
}

.messages-network-status[data-state="session_expired"] {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(127, 29, 29, 0.94);
}

.messages-network-status[data-state="sync_restored"] {
    border-color: rgba(45, 212, 191, 0.4);
    background: rgba(20, 83, 45, 0.94);
}

.messages-network-status[hidden],
.messages-network-status.is-hidden {
    display: none;
}



.chat-card,
.chat-empty-state {
    height: 100%;
    min-height: 0;
    border-radius: var(--user-radius-lg);
}

.chat-card[data-chat-state="active"] > .chat-empty-state,
.chat-card:not(.is-empty-shell) > .chat-empty-state[aria-hidden="true"] {
    display: none !important;
}

.left-pane-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--zn-member-border);
}

.mini-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-profile-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--zn-member-accent-soft);
}

.mini-profile-avatar-fallback,
.conversation-avatar,
.chat-header-avatar {
    display: grid;
    place-items: center;
    background: var(--zn-member-avatar-background);
    color: var(--zn-member-avatar-text);
}

.icon-button {
    display: grid;
    place-items: center;
    background: var(--zn-member-accent-soft);
    color: var(--zn-member-accent-text);
}

[data-theme-family="institutional-light"] body.user-body-messaging .icon-button {
    background: var(--zn-member-filled-accent-background);
    color: var(--zn-member-filled-accent-icon);
}

.mini-profile-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    font-weight: 700;
}

.mini-profile-avatar-image,
.conversation-avatar-image,
.chat-header-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}

.mini-profile-copy {
    min-width: 0;
}

.mini-profile-copy strong,
.conversation-copy-top strong,
.message-author {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 560;
}

.mini-profile-copy span,
.conversation-role,
.conversation-presence,
.profile-details,
.chat-subtitle,
.chat-presence,
.message-author-title,
.conversation-copy p,
.conversation-copy-top span {
    color: var(--zn-member-text-muted);
    font-size: 0.79rem;
    font-weight: 400;
}

.conversation-presence,
.chat-presence {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow-wrap: anywhere;
}

.chat-presence {
    max-width: 100%;
    min-width: 0;
    margin-top: 4px;
    overflow-wrap: normal;
}

.chat-presence-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-presence.is-truncated {
    cursor: pointer;
}

.chat-presence.is-truncated:focus-visible {
    outline: 2px solid var(--zn-member-accent);
    outline-offset: 3px;
}

.chat-presence-tooltip {
    position: fixed;
    z-index: 1000;
    max-width: min(280px, calc(100vw - 24px));
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.2);
    pointer-events: none;
}

.chat-presence-tooltip[hidden] {
    display: none;
}

.chat-active-call {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--zn-member-accent-border);
    border-radius: 12px;
    background:
        linear-gradient(
            135deg,
            var(--zn-member-accent-surface-strong),
            color-mix(in srgb, var(--zn-member-accent-surface) 72%, var(--zn-member-bg-card) 28%)
        );
    color: var(--zn-member-text-primary);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--zn-member-shadow-color, #000) 10%, transparent);
    font-size: 0.88rem;
    font-weight: 760;
    line-height: 1.25;
}

.chat-active-call[hidden] {
    display: none;
}

.chat-active-call-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.chat-active-call-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-active-call-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid var(--zn-member-accent-border-strong);
    border-radius: 10px;
    background: var(--zn-member-accent-surface);
    color: var(--zn-member-accent-text);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface) 38%, transparent);
}

.chat-active-call-join:hover {
    background: var(--zn-member-accent-surface-strong);
}

.chat-active-call-join:disabled,
.chat-active-call-join[data-joining="true"] {
    cursor: progress;
    opacity: 0.72;
}

@media (max-width: 520px) {
    .chat-active-call {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .chat-active-call-label {
        white-space: normal;
    }

    .chat-active-call-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-left: 0;
    }

    .chat-active-call-actions .chat-active-call-join:only-child {
        grid-column: 1 / -1;
    }

    .chat-active-call-join {
        min-width: 0;
        padding: 0 12px;
    }
}

.presence-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 999px;
    background: rgba(156, 171, 196, 0.56);
    box-shadow: 0 0 0 1px rgba(10, 15, 26, 0.34);
}

.presence-dot[data-online="true"] {
    background: #5fe091;
    box-shadow: 0 0 0 1px rgba(95, 224, 145, 0.18);
}

.profile-details {
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    padding: 8px 10px;
    background: var(--zn-member-bg-surface-faint);
}

.profile-details summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.86rem;
    color: var(--zn-member-text-secondary);
}

.profile-details[open] summary {
    margin-bottom: 10px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-settings {
    display: block;
    position: relative;
}

.notification-settings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.notification-enable-button {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, #399a68 58%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, #52b986 12%, var(--zn-member-bg-surface-faint));
    color: #358760;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.notification-enable-button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, #399a68 72%, transparent);
    color: #24734e;
    background: color-mix(in srgb, #52b986 20%, var(--zn-member-bg-card));
}

.notification-enable-button:disabled {
    cursor: default;
    opacity: 0.72;
    transform: none;
}

.notification-bell-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
}

.notification-bell-icon svg {
    width: 20px;
    height: 20px;
}

.notification-znode-icon,
.messages-settings-icon,
.user-bottom-nav-icon {
    width: 20px;
    height: 20px;
}

.notification-bell-dot {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 9px;
    height: 9px;
    border: 2px solid rgba(13, 20, 31, 0.96);
    border-radius: 50%;
    background: #ff515d;
    box-shadow: 0 0 0 3px rgba(255, 81, 93, 0.12);
}

.notification-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zn-member-text-secondary);
    font-size: 0.8rem;
}

.notification-toggle-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.notification-toggle input {
    width: 15px;
    height: 15px;
    accent-color: var(--zn-member-accent);
}

.notification-status {
    min-height: 0;
    margin: 0;
    color: var(--zn-member-text-muted);
    font-size: 0.74rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    min-width: 0;
}

.notification-mobile-setup {
    position: relative;
}

.notification-mobile-panel[hidden] {
    display: none;
}

.notification-mobile-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: var(--z-layer-modal, 1600);
    width: min(350px, calc(100vw - 28px));
    max-height: min(620px, calc(100dvh - 32px));
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 8px;
    background: var(--zn-member-bg-card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translate(-50%, -50%);
}

.notification-panel-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 8px;
    background: var(--zn-member-bg-surface-faint);
    color: var(--zn-member-text-secondary);
    cursor: pointer;
}

.notification-panel-close-icon {
    width: 16px;
    height: 16px;
}

.notification-instruction {
    margin: 0;
    color: var(--zn-member-text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.notification-device-health {
    display: grid;
    gap: 8px;
}

.notification-device-health > strong {
    color: var(--zn-member-text-primary);
    font-size: 0.78rem;
}

.notification-mobile-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.notification-action-button {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
}

.notification-debug-details > summary {
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 8px;
    color: var(--zn-member-text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.notification-debug-details {
    width: 100%;
    min-width: 0;
}

.notification-debug-details > summary {
    width: 100%;
    box-sizing: border-box;
}

.notification-debug-details[open] > summary {
    margin-bottom: 8px;
}

.notification-debug-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin: 0;
}

.notification-debug-grid > div {
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface-faint);
}

.notification-debug-grid .notification-debug-row-wide {
    grid-column: 1 / -1;
}

.notification-debug-grid dt {
    margin: 0 0 4px;
    color: var(--zn-member-text-muted);
    font-size: 0.68rem;
    line-height: 1.2;
}

.notification-debug-grid dd {
    margin: 0;
    color: var(--zn-member-text-primary);
    font-size: 0.76rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .notification-mobile-panel {
        top: calc(env(safe-area-inset-top) + 12px);
        right: 12px;
        bottom: calc(var(--bottom-nav-height, 78px) + env(safe-area-inset-bottom) + 12px);
        left: 12px;
        width: auto;
        max-height: none;
        transform: none;
    }

    .notification-action-button {
        min-height: 44px !important;
        padding: 8px 10px !important;
        border-radius: 8px !important;
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .notification-toggle {
        gap: 6px;
        font-size: 0.72rem;
    }
}

.notification-settings[data-state="active"] .notification-enable-button {
    border-color: rgba(95, 224, 145, 0.28);
    color: #78efaa;
    background: rgba(95, 224, 145, 0.1);
}

.notification-settings[data-state="active"] .notification-bell-dot {
    background: #5fe091;
    box-shadow: 0 0 0 3px rgba(95, 224, 145, 0.14);
}

.notification-settings[data-state="blocked"] .notification-enable-button {
    border-color: rgba(255, 100, 110, 0.24);
    color: #ff6f76;
}

.compact-search .search-input {
    padding: 9px 11px;
}

.roster-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.messages-tab-panel[hidden] {
    display: none;
}

.list-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.conversation-item {
    display: block;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.conversation-item:hover {
    background: var(--zn-member-conversation-hover-background);
    border-color: var(--zn-member-conversation-hover-border);
}

.conversation-item.is-active {
    background: var(--zn-member-conversation-active-background);
    border-color: var(--zn-member-conversation-active-border);
    position: relative;
    color: var(--zn-member-conversation-active-text);
    box-shadow: var(--zn-member-conversation-active-shadow);
}

.conversation-item.is-active strong,
.conversation-item.is-active p,
.conversation-item.is-active .conversation-meta,
.conversation-item.is-active .presence-copy {
    color: var(--zn-member-conversation-active-text);
}

.conversation-item.is-active::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 14px;
    bottom: 14px;
    width: 3px;
    display: var(--zn-member-conversation-marker-display);
    border-radius: 999px;
    background: var(--zn-member-conversation-marker);
    opacity: 0.84;
}

.conversation-item-main {
    display: flex;
    gap: 10px;
}

.conversation-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    overflow: hidden;
    border: var(--zn-member-avatar-border-width) solid var(--zn-member-avatar-border);
    font-size: 0.82rem;
    font-weight: 700;
}

.conversation-list-contacts .conversation-item:nth-child(5n) .conversation-avatar:not(:has(img)),
.conversation-list-recent .conversation-item:nth-child(6n) .conversation-avatar:not(:has(img)) {
    background: var(--zn-member-avatar-alternate-background);
    border-color: var(--zn-member-avatar-alternate-border);
    color: var(--zn-member-avatar-alternate-text);
}

.conversation-copy {
    min-width: 0;
    flex: 1;
}

.conversation-copy-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.conversation-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.call-history-item .conversation-item-main {
    align-items: center;
}

.call-history-copy {
    min-width: 0;
}

.call-history-detail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.call-history-direction {
    color: var(--zn-member-text-secondary);
}

.call-history-item.is-missed .call-history-direction,
.call-history-item.is-missed .conversation-copy-top strong {
    color: var(--zn-member-danger-text-soft);
}

.call-history-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 999px;
    color: var(--zn-member-accent-text);
    background: var(--zn-member-bg-surface-faint);
}

.call-history-item.is-missed .call-history-icon {
    color: var(--zn-member-danger-text-soft);
    border-color: var(--zn-member-border);
}

.call-history-icon-svg {
    width: 16px;
    height: 16px;
}

.call-history-empty {
    display: grid;
    place-items: center;
    color: var(--zn-member-text-muted);
    text-align: center;
}

.unread-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(123, 144, 255, 0.2);
    color: #ebf1ff;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--zn-member-accent-border);
}

.conversation-copy p {
    margin: 4px 0 0;
    color: var(--zn-member-text-secondary);
    line-height: 1.3;
    font-size: 0.8rem;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.chat-pane {
    min-height: 0;
}

.chat-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-card [hidden] {
    display: none !important;
}

.chat-pane > [data-call-preserved-chat-pane][hidden] {
    display: none !important;
}

.chat-card > .chat-empty-state {
    flex: 1;
    min-height: 0;
    align-content: center;
    gap: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.chat-card > .chat-empty-state h2,
.chat-card > .chat-empty-state p {
    margin: 0;
}

.chat-card > .chat-empty-state p {
    max-width: 36rem;
    color: var(--zn-member-text-secondary);
    line-height: 1.5;
}

[data-theme-presentation] .conversation-hub,
[data-theme-presentation] .chat-card,
[data-theme-presentation] .chat-empty-state {
    background: var(--zn-messaging-chat-surface-background);
}

[data-theme-presentation] .chat-header,
[data-theme-presentation] .composer-message-form {
    background: var(--zn-messaging-chat-chrome-background);
    backdrop-filter: blur(18px);
}

.chat-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--zn-member-border);
    position: relative;
    z-index: 2;
    display: grid;
    gap: 10px;
}

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

.chat-header-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
    overflow: hidden;
}

.chat-header-copy {
    min-width: 0;
    flex: 1;
}

.chat-header-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    position: relative;
}

.chat-header-title-row h2,
.chat-header-title-row [data-feed-display-name] {
    min-width: 0;
    flex: 1;
}

.chat-files-menu {
    position: relative;
    flex: 0 0 auto;
}

.chat-files-menu summary {
    list-style: none;
}

.chat-files-menu summary::-webkit-details-marker {
    display: none;
}

.messages-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
}

.messages-search-row-full {
    grid-template-columns: minmax(0, 1fr);
}

.messages-search-row .conversation-search {
    min-width: 0;
}

.message-create-group-button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 80%, transparent);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
        var(--zn-member-bg-surface-active);
    color: var(--zn-member-text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-size: 1.24rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.message-create-group-icon {
    width: 22px;
    height: 22px;
}

.message-create-group-button:hover,
.message-create-group-button:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--zn-member-accent-border-strong) 72%, transparent);
    background: var(--zn-member-accent-surface);
}

[data-theme-family="institutional-light"] body.user-body-messaging .message-create-group-button {
    border-color: var(--zn-member-accent-border-strong);
    background: var(--zn-member-filled-accent-background);
    color: var(--zn-message-create-group-icon, var(--zn-member-filled-accent-icon));
}

[data-theme-family="institutional-light"] body.user-body-messaging .message-create-group-button:hover,
[data-theme-family="institutional-light"] body.user-body-messaging .message-create-group-button:focus-visible {
    background: var(--zn-member-primary-hover);
    color: var(--zn-message-create-group-icon, var(--zn-member-filled-accent-icon));
}

.message-create-group-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--zn-member-accent-border-strong) 78%, transparent);
    outline-offset: 3px;
}

.group-chat-drawer[hidden] {
    display: none;
}

.group-chat-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    justify-content: flex-end;
}

.group-chat-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(2, 6, 14, 0.62);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.group-chat-drawer-panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding:
        max(20px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        18px;
    border-left: 1px solid color-mix(in srgb, var(--zn-member-border) 82%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-card) 96%, #050914 4%);
    box-shadow: -24px 0 70px rgba(0, 0, 0, 0.34);
}

.group-chat-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.group-chat-drawer-header h2 {
    margin: 0;
    color: var(--zn-member-text-primary);
    font-size: 1.18rem;
    font-weight: 680;
    letter-spacing: 0;
}

.group-chat-drawer-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-faint);
    color: var(--zn-member-text-secondary);
    cursor: pointer;
}

.group-chat-create-form {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.group-chat-participant-picker {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.group-chat-participant-picker legend {
    margin: 0;
    padding: 0;
    color: var(--zn-member-text-secondary);
    font-size: 0.88rem;
    font-weight: 650;
}

.group-chat-participant-search {
    min-height: 44px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    color: var(--zn-member-text-muted);
    background: var(--zn-member-bg-surface);
}

.group-chat-search-icon {
    width: 18px;
    height: 18px;
}

.group-chat-participant-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--zn-member-text-primary);
    background: transparent;
}

.group-chat-participant-list {
    min-height: 0;
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-surface);
}

.group-chat-participant-option {
    display: grid;
    grid-template-columns: 20px 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--zn-member-border);
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.group-chat-participant-option:last-child {
    border-bottom: 0;
}

.group-chat-participant-option[hidden] {
    display: none;
}

.group-chat-participant-option:hover,
.group-chat-participant-option:has(input[type="checkbox"]:checked) {
    background: color-mix(in srgb, var(--zn-member-accent-surface) 42%, transparent);
}

.group-chat-participant-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 84%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--zn-member-bg-card) 82%, transparent);
}

.group-chat-participant-option input[type="checkbox"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform 0.16s ease;
}

.group-chat-participant-option input[type="checkbox"]:checked {
    border-color: color-mix(in srgb, var(--zn-member-accent-border-strong) 72%, transparent);
    background: var(--zn-member-accent);
}

.group-chat-participant-option input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.group-chat-participant-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: var(--zn-member-avatar-border-width, 0) solid var(--zn-member-avatar-border);
    border-radius: 12px;
    color: var(--zn-member-avatar-text);
    background: var(--zn-member-avatar-background);
    font-size: 0.78rem;
    font-weight: 800;
}

.group-chat-participant-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}

.group-chat-participant-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-chat-participant-copy strong,
.group-chat-participant-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-chat-participant-copy small {
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.group-chat-drawer-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

.group-chat-drawer-actions .secondary-button,
.group-chat-drawer-actions .primary-button {
    min-height: 42px;
    padding: 0 16px;
}

.group-settings-drawer .group-chat-drawer-panel {
    overflow: auto;
}
