:root {
    --user-radius-lg: 24px;
    --user-radius-md: 16px;
    --user-radius-sm: 12px;
    --app-vh: 100dvh;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-height: 78px;
    --composer-height: 88px;
    --keyboard-offset: 0px;
    --znode-keyboard-inset: 0px;
    --znode-input-accessory-offset: 0px;
    --znode-android-system-nav-guard: 0px;
    --znode-composer-height: var(--composer-height);
    --znode-safe-bottom: var(--safe-bottom);
    --znode-visual-vh: var(--app-vh);
    --znode-visual-viewport-height: var(--app-vh);
    --znode-vv-top: 0px;
    --znode-vv-height: var(--app-vh);
    --znode-viewport-bottom-inset: var(--keyboard-offset);
    --znode-keyboard-clearance: var(--znode-viewport-bottom-inset);
}

html[data-device-platform="android"] {
    --znode-android-system-nav-guard: 42px;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--zn-member-scrollbar-thumb) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--zn-member-scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    min-height: 34px;
    border: 2px solid var(--zn-member-scrollbar-border);
    border-radius: 999px;
    background:
        linear-gradient(180deg, var(--zn-member-scrollbar-fill-start), var(--zn-member-scrollbar-fill-end))
        padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--zn-member-scrollbar-thumb-hover);
}

*::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

html {
    background: var(--zn-member-bg-app);
    min-height: 100%;
    height: 100%;
}

body {
    margin: 0;
    height: 100%;
    min-height: 100%;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    overscroll-behavior-y: none;
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 0%, var(--zn-member-shade-start, rgba(255, 255, 255, 0.08)), transparent 28%),
        radial-gradient(circle at 90% 96%, var(--zn-member-shade-end, rgba(86, 111, 201, 0.1)), transparent 26%),
        linear-gradient(180deg, var(--zn-member-shade-mid, transparent), transparent 58%),
        var(--zn-member-bg-app);
    color: var(--zn-member-text-primary);
    font-weight: 400;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

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

.call-audio-container {
    position: fixed;
    left: max(1px, env(safe-area-inset-left));
    bottom: max(1px, env(safe-area-inset-bottom));
    z-index: 0;
    width: 2px;
    height: 2px;
    overflow: visible;
    opacity: 0.01;
    pointer-events: none;
}

.call-audio-container audio {
    display: block;
    width: 2px;
    height: 2px;
}

.user-shell {
    height: 100vh;
    height: 100svh;
    height: var(--app-vh);
    padding:
        max(14px, env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        max(14px, var(--safe-bottom))
        max(14px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

html[data-display-mode="standalone"] body {
    background-color: var(--zn-member-bg-app);
}

@supports (height: 100dvh) {
    body {
        min-height: 100dvh;
    }

    .user-shell {
        height: var(--app-vh);
    }

    .call-screen-shell {
        min-height: 100dvh;
    }
}

.user-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.topbar-title-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-self: flex-start;
    margin-top: 2px;
    overflow: hidden;
    border-radius: 10px;
    border: 0;
    background: transparent;
}

.topbar-profile-trigger {
    padding: 0;
    color: var(--zn-member-accent-text);
    cursor: pointer;
    text-decoration: none;
}

.topbar-profile-trigger:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--zn-member-accent-border-strong) 76%, transparent);
    outline-offset: 3px;
}

.topbar-title-mark-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: center;
    transform: none;
    transform-origin: center;
}

.topbar-profile-image {
    transform: scale(1.08);
}

.topbar-profile-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: inherit;
    background: var(--zn-member-accent-soft);
    color: var(--zn-member-accent-text);
    font-weight: 800;
    letter-spacing: 0;
}

.topbar-title-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.user-app-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-app-nav-link,
.surface-switcher-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--zn-member-border);
    background: var(--zn-member-bg-surface-hover);
    color: var(--zn-member-text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.user-app-nav-link.is-active,
.surface-switcher-link.is-active {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-surface);
    color: var(--zn-member-accent-text);
}

.surface-switcher-link.surface-switcher-operator {
    border-color: color-mix(in srgb, var(--zn-success, #33c27f) 42%, var(--zn-member-border));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--zn-success, #33c27f) 16%, transparent),
        0 0 18px color-mix(in srgb, var(--zn-success, #33c27f) 18%, transparent);
}

.surface-switcher-link.surface-switcher-operator.is-active {
    border-color: color-mix(in srgb, var(--zn-success, #33c27f) 54%, var(--zn-member-accent-border));
    background: color-mix(in srgb, var(--zn-success, #33c27f) 12%, var(--zn-member-bg-surface-hover));
    color: var(--zn-member-text-primary);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--zn-success, #33c27f) 24%, transparent),
        0 0 24px color-mix(in srgb, var(--zn-success, #33c27f) 24%, transparent);
}

.surface-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.znode-user-version {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    color: var(--zn-member-text-muted);
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.surface-switcher-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.surface-switcher-user {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.surface-switcher-user .surface-switcher-link {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    min-height: 46px;
    padding: 0;
    border-radius: 14px;
}

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

.surface-switcher-user .surface-switcher-link:hover .surface-switcher-label,
.surface-switcher-user .surface-switcher-link:focus-visible .surface-switcher-label {
    top: calc(100% + 8px);
    left: 50%;
    z-index: 30;
    width: auto;
    height: auto;
    min-width: max-content;
    padding: 6px 9px;
    margin: 0;
    overflow: visible;
    clip: auto;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 96%, transparent);
    color: var(--zn-member-text-primary);
    box-shadow: var(--zn-shadow-soft);
    font-size: 0.72rem;
    line-height: 1;
    transform: translateX(-50%);
    pointer-events: none;
}

.surface-switcher-logout {
    margin: 0;
}

.surface-switcher-button {
    font: inherit;
    cursor: pointer;
}

.surface-switcher-logout-button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
}

.surface-switcher-logout-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-meetings .topbar-title,
body.user-body-workspace .topbar-title {
    width: 100%;
    align-items: flex-start;
}

body.user-body-meetings .topbar-title-copy,
body.user-body-workspace .topbar-title-copy {
    width: auto;
    flex: 0 1 auto;
}

.workspace-brand-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.workspace-brand-line h1 {
    min-width: 0;
}

body.user-body-meetings .surface-switcher-user,
body.user-body-workspace .surface-switcher-user {
    width: auto;
    max-width: none;
    justify-content: flex-start;
}

body.user-body-meetings .surface-switcher-user .surface-switcher-link,
body.user-body-workspace .surface-switcher-user .surface-switcher-link {
    flex: 0 0 124px;
    width: 124px;
    min-width: 124px;
    min-height: 58px;
    border-radius: 18px;
}

body.user-body-meetings .surface-switcher-user .surface-switcher-logout-button,
body.user-body-workspace .surface-switcher-user .surface-switcher-logout-button {
    flex: 0 0 48px;
    min-width: 48px;
}

body.user-body-meetings .meeting-layout {
    flex: 1;
    min-height: 0;
    max-width: 1600px;
    width: calc(100% - 8px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
    gap: 14px;
}

body.user-body-meetings .meeting-left-panel,
body.user-body-meetings .meeting-main {
    min-height: 0;
}

body.user-body-meetings .meeting-hub {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px 12px 14px 14px;
}

body.user-body-meetings .meeting-home-header {
    flex: 0 0 auto;
    padding: 6px 6px 14px 4px;
}

body.user-body-meetings .meeting-brand-row {
    grid-template-columns: 46px minmax(0, 1fr) auto 42px;
}

body.user-body-meetings .meeting-brand-row h1 {
    margin: 0;
    font-weight: 650;
    letter-spacing: 0;
}

body.user-body-meetings .meeting-home-header .surface-switcher-user {
    width: 100%;
    max-width: none;
    justify-content: stretch;
    gap: 8px;
}

body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-link {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 46px;
    border-radius: 14px;
    border-color: color-mix(in srgb, var(--zn-member-border) 62%, transparent);
    box-shadow: none;
}

body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}

body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-logout {
    flex: 0 0 22px;
}

body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-logout-button {
    flex: 0 0 22px;
    width: 22px;
    min-width: 22px;
    min-height: 46px;
    border-radius: 14px;
}

body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-logout-icon {
    width: 20px;
    height: 19px;
    flex-basis: 20px;
}

body.user-body-meetings .meeting-cockpit {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    overflow: auto;
    padding: 28px;
    border-radius: var(--user-radius-lg);
    border-color: color-mix(in srgb, var(--zn-member-border) 56%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-card) 88%, transparent);
    box-shadow: 0 18px 50px rgba(4, 8, 18, 0.16);
}

body.user-body-meetings .meeting-create-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 4px 14px;
    border-radius: 0;
}

body.user-body-meetings .meeting-create-form {
    gap: 12px;
}

body.user-body-meetings .meeting-create-heading h2 {
    font-size: 1.12rem;
    font-weight: 760;
}

body.user-body-meetings .meeting-title-field span {
    color: var(--zn-member-text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
}

body.user-body-meetings .meeting-selected-participants {
    min-height: 36px;
    max-height: 86px;
}

body.user-body-meetings .meeting-selected-chip {
    flex: 0 1 auto;
    max-width: 100%;
    min-height: 36px;
    border-color: color-mix(in srgb, var(--zn-member-border) 62%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 78%, transparent);
    font-weight: 500;
}

body.user-body-meetings .meeting-selected-chip .meeting-participant-avatar {
    display: none;
}

body.user-body-meetings .meeting-participant-list {
    min-height: 160px;
    border-color: color-mix(in srgb, var(--zn-member-border) 54%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 72%, transparent);
}

body.user-body-meetings .meeting-participant-option {
    grid-template-columns: 38px minmax(0, 1fr) minmax(70px, auto) 20px;
    border-bottom-color: color-mix(in srgb, var(--zn-member-border) 42%, transparent);
    transition: background 160ms ease, box-shadow 160ms ease;
}

body.user-body-meetings .meeting-participant-option:hover {
    background: color-mix(in srgb, var(--zn-member-bg-surface-hover) 70%, transparent);
}

body.user-body-meetings .meeting-participant-option:has(input[type="checkbox"]:checked) {
    background: color-mix(in srgb, var(--zn-member-accent-surface) 28%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zn-member-accent-border-strong) 42%, transparent);
}

body.user-body-meetings .meeting-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) 78%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--zn-member-bg-card) 82%, transparent);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body.user-body-meetings .meeting-participant-option input[type="checkbox"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 160ms ease;
    background: #fff;
}

body.user-body-meetings .meeting-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);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--zn-member-accent-surface) 72%, transparent);
}

body.user-body-meetings .meeting-participant-option input[type="checkbox"]:checked::before {
    transform: scale(1);
}

body.user-body-meetings .meeting-participant-option input[type="checkbox"]:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--zn-member-accent-border-strong) 82%, transparent);
    outline-offset: 2px;
}

body.user-body-meetings .meeting-external-guest-panel {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 60%, transparent);
    border-radius: 12px;
    display: block;
    background: color-mix(in srgb, var(--zn-member-bg-surface) 70%, transparent);
    overflow: hidden;
}

body.user-body-meetings .meeting-external-guest-summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    cursor: pointer;
    list-style: none;
    color: var(--zn-member-text-primary);
    font-size: 0.88rem;
    font-weight: 650;
}

body.user-body-meetings .meeting-external-guest-summary::-webkit-details-marker {
    display: none;
}

body.user-body-meetings .meeting-external-guest-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.user-body-meetings .meeting-external-guest-title svg,
body.user-body-meetings .meeting-external-guest-chevron,
body.user-body-meetings .meeting-card-guest-icon svg,
body.user-body-meetings .meeting-card-guest-actions svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-meetings .meeting-external-guest-title svg {
    color: var(--zn-member-text-secondary);
}

body.user-body-meetings .meeting-external-guest-chevron {
    flex: 0 0 18px;
    color: var(--zn-member-text-muted);
    transition: transform 160ms ease;
}

body.user-body-meetings .meeting-external-guest-panel[open] .meeting-external-guest-chevron {
    transform: rotate(180deg);
}

body.user-body-meetings .meeting-external-guest-body {
    display: grid;
    gap: 10px;
    padding: 0 14px 14px;
}

.meeting-external-send-row {
    display: flex;
    justify-content: flex-end;
}

.meeting-external-send-button {
    min-height: 34px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
}

body.user-body-meetings .meeting-external-expiry-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    color: var(--zn-member-text-secondary);
    font-size: 0.82rem;
}

body.user-body-meetings .meeting-external-expiry-row strong {
    color: var(--zn-member-text-primary);
    font-size: 0.82rem;
}

body.user-body-meetings .meeting-email-token-field,
body.user-body-workspace .meeting-email-token-field {
    width: 100%;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-surface);
}

body.user-body-meetings .meeting-email-token-list,
body.user-body-workspace .meeting-email-token-list {
    min-width: 0;
    display: contents !important;
}

body.user-body-meetings .meeting-email-token,
body.user-body-workspace .meeting-email-token {
    max-width: 100%;
    min-height: 30px;
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 4px 8px 4px 10px;
    border: 1px solid color-mix(in srgb, var(--zn-member-success-text) 26%, var(--zn-member-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-success-soft) 62%, var(--zn-member-bg-surface));
    color: var(--zn-member-text-primary);
    font-size: 0.82rem;
    font-weight: 650;
}

body.user-body-meetings .meeting-email-token > span,
body.user-body-workspace .meeting-email-token > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.user-body-meetings .meeting-email-token button,
body.user-body-workspace .meeting-email-token button {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--zn-member-text-primary) 8%, transparent);
    color: var(--zn-member-text-secondary);
    font: inherit;
    font-size: 0.76rem;
    line-height: 1;
    cursor: pointer;
}

body.user-body-meetings .meeting-email-token-input.form-input,
body.user-body-workspace .meeting-email-token-input.form-input {
    flex: 1 1 170px;
    min-width: min(180px, 100%);
    min-height: 30px;
    padding: 5px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    resize: none;
}

body.user-body-meetings .meeting-email-token-input.form-input:focus,
body.user-body-workspace .meeting-email-token-input.form-input:focus {
    outline: 0;
    box-shadow: none;
}

body.user-body-meetings .meeting-create-button {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: auto;
    min-height: 54px;
    border: 1px solid color-mix(in srgb, var(--zn-member-accent-border-strong) 64%, transparent);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%),
        linear-gradient(135deg, color-mix(in srgb, var(--zn-member-accent) 92%, white), var(--zn-member-accent));
    box-shadow:
        0 14px 28px color-mix(in srgb, var(--zn-member-accent) 24%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-weight: 650;
    letter-spacing: 0;
}

body.user-body-meetings .meeting-create-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 18px 34px color-mix(in srgb, var(--zn-member-accent) 28%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

body.user-body-meetings .meeting-copy-status {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 1400;
    width: min(calc(100vw - 28px), 460px);
    transform: translateX(-50%);
    pointer-events: none;
}

body.user-body-meetings .meeting-list-section {
    gap: 12px;
}

body.user-body-meetings .meeting-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    min-height: 132px;
    border-radius: 14px;
}

body.user-body-meetings .meeting-row-actions {
    padding-top: 8px;
}

body.user-body-meetings .meeting-join-button {
    min-height: 48px;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 740;
}

body.user-body-meetings .meeting-section-title {
    gap: 10px;
}

body.user-body-meetings .meeting-section-title h3 {
    font-size: 1.08rem;
    font-weight: 650;
    letter-spacing: 0;
}

body.user-body-meetings .meeting-count {
    min-width: 28px;
    height: 28px;
    font-size: 0.84rem;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 44%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-surface-hover) 70%, transparent);
    font-weight: 650;
}

body.user-body-meetings .meeting-schedule-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-color: color-mix(in srgb, #22c55e 52%, var(--zn-member-border));
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 48%),
        color-mix(in srgb, #22c55e 14%, var(--zn-member-bg-surface));
    color: color-mix(in srgb, #bbf7d0 86%, var(--zn-member-text-primary));
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
    font-size: 0.84rem;
    font-weight: 650;
    text-align: center;
    white-space: nowrap;
}

body.user-body-meetings .meeting-schedule-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-meetings .meeting-card-guest-bar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 58%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--zn-member-bg-surface) 66%, transparent);
}

body.user-body-meetings .meeting-card-guest-bar.is-active {
    border-color: color-mix(in srgb, var(--zn-member-success-text) 24%, var(--zn-member-border));
}

body.user-body-meetings .meeting-card-guest-status {
    min-width: 0;
    display: grid;
    grid-template-columns: 24px auto minmax(120px, 1fr);
    gap: 10px;
    align-items: center;
}

body.user-body-meetings .meeting-card-guest-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--zn-member-success-text);
}

body.user-body-meetings .meeting-card-guest-status strong {
    color: var(--zn-member-success-text);
    font-size: 0.86rem;
    white-space: nowrap;
}

body.user-body-meetings .meeting-card-guest-url {
    min-width: 0;
    overflow: hidden;
    color: var(--zn-member-text-secondary);
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.user-body-meetings .meeting-card-guest-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

body.user-body-meetings .meeting-card-guest-actions .secondary-button {
    min-height: 42px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}

body.user-body-meetings .meeting-card-guest-actions .meeting-card-guest-icon-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 10px;
}

body.user-body-meetings .meeting-card-guest-actions .meeting-card-guest-icon-button svg {
    width: 16px;
    height: 16px;
}

body.user-body-meetings .meeting-card-guest-actions .secondary-button[hidden] {
    display: none !important;
}

body.user-body-meetings .meeting-card-guest-invite {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--zn-member-border) 48%, transparent);
}

body.user-body-meetings .meeting-card-guest-invite[hidden] {
    display: none !important;
}

body.user-body-meetings .meeting-card-guest-invite .form-field {
    margin: 0;
}

body.user-body-meetings .meeting-card-guest-invite .form-input {
    min-height: 42px;
    resize: vertical;
}

body.user-body-meetings .meeting-card-guest-invite .secondary-button {
    min-height: 42px;
    border-radius: 10px;
    white-space: nowrap;
}

body.user-body-meetings .meeting-history-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.user-body-meetings .meeting-history-summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

body.user-body-meetings .meeting-history-summary::-webkit-details-marker {
    display: none;
}

body.user-body-meetings .meeting-history-summary:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--zn-member-accent-border-strong) 78%, transparent);
    outline-offset: 4px;
    border-radius: 12px;
}

body.user-body-meetings .meeting-history-chevron {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 48%, transparent);
    border-radius: 999px;
    color: var(--zn-member-text-secondary);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 62%, transparent);
    transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

body.user-body-meetings .meeting-history-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-meetings .meeting-history-details[open] .meeting-history-chevron {
    transform: rotate(180deg);
    border-color: color-mix(in srgb, var(--zn-member-accent-border-strong) 50%, transparent);
    color: var(--zn-member-accent-text);
    background: color-mix(in srgb, var(--zn-member-accent-surface) 72%, transparent);
}

body.user-body-meetings .meeting-list {
    gap: 10px;
}

body.user-body-meetings .meeting-row {
    min-height: 112px;
    padding: 18px;
    gap: 14px;
    border-radius: var(--user-radius-sm);
    border-color: color-mix(in srgb, var(--zn-member-border) 52%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 78%, transparent);
    box-shadow: 0 10px 28px rgba(4, 8, 18, 0.08);
}

body.user-body-meetings .meeting-row-main {
    gap: 18px;
}

body.user-body-meetings .meeting-row-icon {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), 0 12px 22px rgba(6, 76, 89, 0.12);
}

body.user-body-meetings .meeting-row-icon svg {
    width: 30px;
    height: 30px;
}

body.user-body-meetings .meeting-row-copy h3 {
    font-size: 1.06rem;
    font-weight: 650;
    letter-spacing: 0;
}

body.user-body-meetings .meeting-row-actions {
    gap: 10px;
}

body.user-body-meetings .meeting-join-button {
    min-width: 96px;
}

body.user-body-meetings .meeting-action-menu summary {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border-color: color-mix(in srgb, var(--zn-member-border) 54%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 68%, transparent);
}

body.user-body-meetings .meeting-card-note,
body.user-body-meetings .meeting-card-guest-link {
    grid-column: 1 / -1;
}

body.user-body-meetings .meeting-card-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 50%, transparent);
    border-radius: var(--user-radius-sm);
    color: var(--zn-member-text-secondary);
    background: color-mix(in srgb, var(--zn-member-bg-card) 76%, transparent);
    font-size: 0.84rem;
}

body.user-body-meetings .meeting-card-note strong {
    color: var(--zn-member-text-primary);
}

body.user-body-meetings .meeting-card-guest-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

body.user-body-meetings .meeting-scheduled-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

body.user-body-meetings .meeting-date-card {
    width: 76px;
    height: 70px;
    border-radius: var(--user-radius-sm);
}

body.user-body-meetings .meeting-date-card strong {
    font-size: 1.06rem;
}

body.user-body-meetings .meeting-empty-state {
    min-height: 112px;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 48%, transparent);
    border-radius: var(--user-radius-sm);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 72%, transparent);
}

body.user-body-meetings .meeting-stage[hidden] {
    display: none;
}

body.user-body-meetings.meeting-room-active .meeting-layout,
body.user-body-meetings .meeting-layout.meeting-room-active {
    max-width: none;
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

body.user-body-meetings.meeting-room-active .meeting-left-panel,
body.user-body-meetings .meeting-layout.meeting-room-active .meeting-left-panel {
    display: none;
}

body.user-body-meetings.meeting-room-active .meeting-main,
body.user-body-meetings .meeting-layout.meeting-room-active .meeting-main {
    grid-column: 1;
    display: grid;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

body.user-body-meetings.meeting-room-active .meeting-main > :not(.meeting-stage),
body.user-body-meetings .meeting-layout.meeting-room-active .meeting-main > :not(.meeting-stage) {
    display: none;
}

body.user-body-meetings.meeting-room-active .meeting-stage,
body.user-body-meetings .meeting-layout.meeting-room-active .meeting-stage {
    min-height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: #05070c;
    box-shadow: none;
    overflow: hidden;
}

@media (max-width: 980px) {
    body.user-body-meetings .meeting-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        overflow: auto;
    }

    body.user-body-meetings .meeting-left-panel,
    body.user-body-meetings .meeting-cockpit {
        grid-column: 1;
    }

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

    body.user-body-meetings .meeting-cockpit {
        overflow: visible;
    }
}

@media (max-width: 760px) {
    body.user-body-meetings .meeting-layout {
        padding-bottom: 0;
    }

    body.user-body-meetings .meeting-cockpit {
        padding: 16px;
    }

    body.user-body-meetings .meeting-scheduled-row,
    body.user-body-meetings .meeting-row {
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-body-meetings .meeting-row-actions {
        justify-content: stretch;
    }

    body.user-body-meetings .meeting-row-actions .primary-button,
    body.user-body-meetings .meeting-row-actions .secondary-button,
    body.user-body-meetings .meeting-row-actions .meeting-join-button {
        width: 100%;
    }

    body.user-body-meetings .meeting-card-guest-link {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    body.user-body-workspace:has(.workspace-calendar-shell) {
        overflow: auto;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .user-shell {
        height: auto;
        min-height: 100vh;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
        max-height: none;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-main {
        height: min(74vh, 760px);
        min-height: 560px;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-week-grid {
        overflow: visible;
        min-width: max(720px, calc(70px + (var(--calendar-day-count) * 128px)));
        grid-template-columns: 60px repeat(var(--calendar-day-count), minmax(118px, 1fr));
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-form-panel {
        max-height: 70vh;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-upcoming .workspace-calendar-panel {
        max-height: none;
    }
}

/* Viewport-proportional surface nav sizing for full-width meeting/workspace pages. */
body.user-body-meetings .surface-switcher-user,
body.user-body-workspace .surface-switcher-user {
    width: auto;
    max-width: none;
    justify-content: flex-start;
}

body.user-body-meetings .surface-switcher-user .surface-switcher-link,
body.user-body-workspace .surface-switcher-user .surface-switcher-link {
    flex: 0 0 clamp(52px, 6.5vw, 76px);
    width: clamp(52px, 6.5vw, 76px);
    min-width: 52px;
    min-height: clamp(46px, 5.2vw, 56px);
    border-radius: 16px;
}

body.user-body-meetings .surface-switcher-user .surface-switcher-icon,
body.user-body-workspace .surface-switcher-user .surface-switcher-icon {
    width: clamp(18px, 2.1vw, 22px);
    height: clamp(18px, 2.1vw, 22px);
    flex-basis: clamp(18px, 2.1vw, 22px);
}

body.user-body-meetings .surface-switcher-user .surface-switcher-logout-button,
body.user-body-workspace .surface-switcher-user .surface-switcher-logout-button {
    flex: 0 0 clamp(44px, 5.2vw, 52px);
    width: clamp(44px, 5.2vw, 52px);
    min-width: 44px;
}

@media (max-width: 760px), (max-width: 980px) and (orientation: landscape) {
    body.user-body-meetings .surface-switcher-user,
    body.user-body-workspace .surface-switcher-user {
        gap: 6px;
    }

    body.user-body-meetings .surface-switcher-user .surface-switcher-link,
    body.user-body-workspace .surface-switcher-user .surface-switcher-link {
        flex-basis: clamp(42px, 13vw, 54px);
        width: clamp(42px, 13vw, 54px);
        min-width: 42px;
        min-height: 46px;
        border-radius: 15px;
    }

    body.user-body-meetings .surface-switcher-user .surface-switcher-icon,
    body.user-body-workspace .surface-switcher-user .surface-switcher-icon {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }
}

.mobile-pull-refresh-indicator {
    position: fixed;
    top: calc(8px + var(--safe-top));
    left: 50%;
    z-index: 1400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 92%, transparent);
    color: var(--zn-member-text-secondary);
    box-shadow: 0 10px 26px rgba(2, 7, 14, 0.18);
    font-size: 0.76rem;
    font-weight: 750;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, 0, 0);
    transition: opacity 0.16s ease, transform 0.18s ease;
}

.mobile-pull-refresh-indicator[data-state="visible"] {
    opacity: 1;
}

.topbar-controls,
.server-upload-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-controls {
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.topbar-user-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface-hover);
    min-width: 0;
}

.topbar-user-card strong {
    font-size: 0.84rem;
}

.topbar-user-card span {
    color: var(--zn-member-text-muted);
    font-size: 0.74rem;
}

.logout-form {
    margin: 0;
}

.user-kicker,
.pane-kicker,
.session-inline-label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--zn-member-text-muted);
}

.topbar-title h1,
.messages-brand-row h1,
.chat-header-copy h2,
.chat-empty-state h2 {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.session-form-compact,
.conversation-search,
.composer,
.composer-message-form,
.composer-tools,
.chat-action-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.session-form-compact {
    min-width: 0;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.session-select.compact-select {
    width: 240px;
    min-width: 240px;
}

.server-upload-form {
    flex: 0 0 auto;
}

.topbar-upload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    white-space: nowrap;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.topbar-upload-status {
    min-width: 0;
    max-width: 108px;
    font-size: 0.74rem;
    color: var(--zn-member-text-muted);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.topbar-upload-status[data-tone="error"] {
    color: var(--zn-member-danger-text);
}

.topbar-upload-status[data-tone="progress"] {
    color: var(--zn-member-text-link);
}

.compact-select,
.search-input,
.form-input,
.composer-input {
    width: 100%;
    border: 1px solid var(--zn-member-border-strong);
    background: var(--zn-member-bg-surface-hover);
    color: var(--zn-member-text-primary);
    border-radius: var(--user-radius-sm);
    padding: 10px 12px;
    outline: none;
}

.pane-card,
.chat-card,
.chat-empty-state,
.flash-banner {
    border: 1px solid var(--zn-member-border);
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    backdrop-filter: blur(18px);
}

.flash-banner {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--user-radius-md);
    padding: 10px 12px;
    font-size: 0.9rem;
}

.flash-banner-success {
    color: var(--zn-member-success-text);
}

.flash-banner-error {
    color: var(--zn-member-danger-text-soft);
}

body.user-body-messaging .flash-banner-success[data-flash-message="Image sent."],
body.user-body-messaging .flash-banner-success[data-flash-message="Audio sent."] {
    display: none;
}

.is-hidden,
.screen-share-viewer-modal.is-hidden {
    display: none !important;
}

.call-transient-notice,
.call-button-reason {
    color: var(--zn-member-text-muted);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.call-launch-group {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.call-launch-group .call-button {
    min-height: 36px;
    height: 36px;
    width: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
}

.call-launch-group .call-button svg {
    width: 18px;
    height: 18px;
}

.call-button-video {
    color: var(--zn-member-primary-text);
}

.call-screen {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    min-height: 100dvh;
}

.call-screen [hidden] {
    display: none !important;
}

.call-screen-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 18%, var(--zn-member-accent-surface-strong), transparent 32%),
        radial-gradient(circle at 80% 16%, var(--zn-success-soft), transparent 28%),
        radial-gradient(circle at 50% 78%, var(--zn-member-accent-surface), transparent 36%),
        linear-gradient(180deg, var(--zn-member-bg-shell), var(--zn-member-bg-app));
    backdrop-filter: blur(24px);
}

.call-screen-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding:
        clamp(22px, 3vw, 34px)
        clamp(18px, 4vw, 42px)
        calc(max(22px, env(safe-area-inset-bottom)) + 10px);
    overflow: hidden;
}

.call-screen-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.call-screen-chip,
.call-screen-brand {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-strong);
    backdrop-filter: blur(16px);
}

.call-screen-chip {
    color: var(--zn-member-text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.call-screen-brand {
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
    display: none;
}

.call-screen-body {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(28px, 8vh, 88px) 0 calc(184px + max(22px, env(safe-area-inset-bottom)));
}

.call-screen-identity {
    width: min(100%, 620px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.call-screen-avatar {
    width: clamp(152px, 24vw, 216px);
    height: clamp(152px, 24vw, 216px);
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(180deg, var(--zn-member-accent-surface-strong), var(--zn-success-soft)),
        var(--zn-member-bg-pane);
    border: 1px solid var(--zn-member-border-soft);
    box-shadow:
        0 0 0 16px var(--zn-member-bg-surface-lift),
        0 0 0 34px var(--zn-member-bg-surface-faint),
        var(--zn-member-shadow);
    color: var(--zn-member-primary-text);
    font-size: clamp(3.1rem, 8vw, 5rem);
    font-weight: 620;
    letter-spacing: -0.05em;
}

.call-screen-avatar .conversation-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-screen-copy {
    width: min(100%, 560px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.call-screen-kicker {
    margin: 0;
    color: var(--zn-member-text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.call-screen-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 1.04;
    text-wrap: balance;
}

.call-screen-subtitle,
.call-screen-status-detail {
    margin: 0;
    color: var(--zn-member-text-secondary);
    font-size: clamp(0.92rem, 1.4vw, 1.06rem);
    line-height: 1.45;
    text-wrap: balance;
}

.call-screen-local-muted {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 36px;
    padding: 9px 16px;
    border: 1px solid var(--zn-danger-border);
    border-radius: 999px;
    background: var(--zn-danger-soft);
    color: var(--zn-danger-text-strong);
    font-size: 0.84rem;
    font-weight: 620;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 36px var(--zn-danger-shadow);
}

.call-screen-local-muted::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--zn-danger);
    box-shadow: 0 0 0 6px var(--zn-danger-soft);
}

.call-screen-status {
    margin: 8px 0 0;
    font-size: clamp(1.08rem, 2vw, 1.5rem);
    font-weight: 540;
    letter-spacing: -0.02em;
}

.call-screen-remote-presence {
    margin: 10px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-strong);
    color: var(--zn-member-text-primary);
    font-size: 0.82rem;
    backdrop-filter: blur(14px);
}

.call-screen-remote-presence[data-remote-state="connected"] {
    border-color: var(--zn-success-border);
    background: var(--zn-success-soft);
    color: var(--zn-member-success-text);
}

.call-screen-remote-presence[data-remote-state="warning"] {
    border-color: var(--zn-warning-border);
    background: var(--zn-warning-soft);
    color: var(--zn-member-warning-text);
}

.call-screen-remote-presence[data-remote-state="muted"] {
    border-color: var(--zn-member-border-muted);
    background: var(--zn-member-bg-surface-faint);
}

.call-video-stage {
    width: min(100%, 940px);
    margin-top: 24px;
    position: relative;
}

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

.call-video-remotes {
    display: contents;
}

.call-video-tile {
    position: relative;
    min-height: 160px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 14px;
    background: var(--zn-member-bg-pane);
    box-shadow: var(--zn-member-shadow);
}

.call-video-element {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: var(--zn-member-bg-pane);
}

.call-video-label {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--zn-member-bg-card);
    color: var(--zn-member-text-primary);
    font-size: 0.76rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.call-video-status {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: calc(100% - 40px);
    transform: translate(-50%, -50%);
    padding: 8px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 84%, transparent);
    color: var(--zn-member-text-primary);
    font-size: 0.82rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.call-switch-camera-overlay {
    display: none;
    padding: 0;
    border: 0;
    background: none;
    color: var(--zn-member-text-primary);
    cursor: pointer;
}

.call-switch-camera-overlay .call-control-button-face {
    width: 52px;
    height: 52px;
    background: var(--zn-member-bg-card);
    backdrop-filter: blur(18px);
}

.call-switch-camera-icon {
    display: block;
    width: 30px;
    height: 30px;
    background: currentColor;
    mask: url("/static/icons/znode-ico/switch-camera.png") center / contain no-repeat;
    -webkit-mask: url("/static/icons/znode-ico/switch-camera.png") center / contain no-repeat;
}

.call-screen-notice {
    position: absolute;
    left: 50%;
    bottom: calc(132px + max(22px, env(safe-area-inset-bottom)));
    transform: translateX(-50%);
    margin: 0;
    width: min(100%, 520px);
    text-align: center;
    pointer-events: none;
}

.call-screen-footer {
    position: absolute;
    left: clamp(18px, 4vw, 42px);
    right: clamp(18px, 4vw, 42px);
    bottom: calc(max(22px, env(safe-area-inset-bottom)) + 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 2;
}

.call-screen-secondary-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    min-height: 46px;
}

.call-secondary-action {
    min-width: 148px;
    padding: 11px 18px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-strong);
    color: var(--zn-member-text-primary);
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.call-secondary-action:hover {
    transform: translateY(-1px);
    background: var(--zn-member-bg-surface-active);
}

.call-secondary-action:disabled {
    cursor: default;
    opacity: 0.6;
}

.call-screen-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    width: 100%;
}

.call-control-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--zn-member-text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 86px;
    cursor: pointer;
}

.call-control-button-face {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--zn-member-border-soft);
    background: var(--zn-member-bg-surface-strong);
    box-shadow: var(--zn-member-shadow);
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.call-control-button svg {
    width: 28px;
    height: 28px;
}

.call-control-button-label {
    color: var(--zn-member-text-secondary);
    font-size: 0.82rem;
    line-height: 1.2;
    text-align: center;
    white-space: pre-line;
}

.meeting-memo-control[hidden],
.meeting-memo-error[hidden] {
    display: none !important;
}

.meeting-memo-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.meeting-memo-button {
    text-decoration: none;
}

.meeting-memo-button svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.meeting-memo-record-icon {
    fill: #ef4444;
    stroke: none;
}

.meeting-memo-stop-icon {
    display: none;
    fill: currentColor;
    stroke: none;
}

.meeting-memo-control[data-memo-state="recording"] .meeting-memo-record-icon {
    display: none;
}

.meeting-memo-control[data-memo-state="recording"] .meeting-memo-stop-icon {
    display: block;
}

.meeting-memo-control[data-memo-state="recording"] .meeting-memo-button .call-control-button-face {
    border-color: rgba(248, 113, 113, 0.48);
    background: rgba(127, 29, 29, 0.58);
    color: #fecaca;
}

.meeting-memo-control[data-memo-state="recording"]::after,
.meeting-memo-control[data-memo-state="processing"]::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
    pointer-events: none;
}

.meeting-memo-control[data-memo-state="processing"] .meeting-memo-record-icon {
    fill: #f59e0b;
}

.meeting-memo-error {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 12;
    width: max-content;
    max-width: min(260px, 70vw);
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(127, 29, 29, 0.9);
    color: #fee2e2;
    font-size: 0.72rem;
    line-height: 1.15;
    text-align: center;
    transform: translateX(-50%);
}

.call-control-button:not(.is-passive):not(:disabled):hover .call-control-button-face {
    transform: translateY(-1px);
    background: var(--zn-member-bg-surface-active);
}

.call-control-button:disabled {
    cursor: default;
}

.call-control-button.is-passive .call-control-button-face,
.call-control-button:disabled .call-control-button-face {
    opacity: 0.58;
}

.call-control-button[data-active="true"] .call-control-button-face {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-border-muted);
}

.call-control-button-danger .call-control-button-face {
    border-color: var(--zn-danger-border);
    background: linear-gradient(180deg, var(--zn-danger), var(--zn-danger-surface-hover));
    color: var(--zn-danger-text-strong);
}

.call-control-button-accept .call-control-button-face {
    border-color: var(--zn-success-border);
    background: linear-gradient(180deg, var(--zn-success), var(--zn-success-soft-strong));
    color: var(--zn-text-inverse);
}

.call-control-button[data-call-speaker] .call-control-button-label[data-state-label]::after {
    content: attr(data-state-label);
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--zn-member-text-muted);
}

.call-control-button[data-call-speaker][data-active="true"] .call-control-button-face {
    border-color: var(--zn-member-accent-border-strong);
    background: var(--zn-member-primary);
    color: var(--zn-member-primary-text);
}

.call-control-button[data-call-speaker][data-active="true"] .call-control-button-label::after {
    color: var(--zn-member-success-text);
}

.call-control-button[data-call-mute] .call-control-button-label[data-state-label]::after {
    content: attr(data-state-label);
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--zn-member-danger-text);
}

.call-control-button[data-call-mute][data-active="true"] .call-control-button-face {
    border-color: var(--zn-danger-border-strong);
    background: linear-gradient(180deg, var(--zn-danger-soft-strong), var(--zn-danger-surface-hover));
    color: var(--zn-danger-text-strong);
    box-shadow:
        0 0 0 1px var(--zn-danger-ring),
        0 16px 34px var(--zn-danger-shadow);
}

.call-control-button[data-call-mute][data-active="true"] .call-control-button-face::after {
    content: "";
    position: absolute;
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(-45deg);
}

.call-control-button[data-call-mute][data-active="true"] .call-control-button-label::after {
    color: var(--zn-member-danger-text-soft);
}

.call-screen[data-call-ui-mode="terminal"] .call-screen-footer {
    display: none;
}

.call-screen[data-call-ui-mode="terminal"] .call-screen-body {
    padding-bottom: clamp(24px, 6vh, 72px);
}

.call-screen-body {
    align-items: center;
}

.call-screen-copy {
    gap: 12px;
}

.call-screen-status {
    margin: 0;
    max-width: 18ch;
    color: var(--zn-member-text-secondary);
    font-size: clamp(1rem, 1.8vw, 1.22rem);
    font-weight: 500;
    text-wrap: balance;
}

.call-screen-subtitle {
    color: var(--zn-member-text-secondary);
}

.call-screen[data-call-ui-mode="incoming"] .call-screen-status {
    margin-top: 0;
}

.call-screen[data-call-ui-mode="active"] .call-screen-subtitle {
    margin-top: -2px;
}

.call-screen[data-call-ui-mode="active"] .call-screen-chip {
    min-width: 96px;
    justify-content: center;
    letter-spacing: 0.02em;
    text-transform: none;
}

.call-screen-footer {
    gap: 12px;
}

.call-screen-controls {
    width: min(100%, 360px);
    gap: 20px;
}

.call-control-button {
    flex: 1 1 92px;
    min-width: 92px;
}

.call-control-button-face {
    width: 78px;
    height: 78px;
}

.call-control-button-label {
    color: var(--zn-member-text-primary);
    font-size: 0.84rem;
    font-weight: 500;
}

.call-control-button[data-active="false"] .call-control-button-face {
    background: var(--zn-member-bg-surface-strong);
    border-color: var(--zn-member-border-soft);
}

.call-control-button[data-active="true"] .call-control-button-face {
    border-color: var(--zn-member-accent-border-strong);
    background: var(--zn-member-accent-border);
}

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

.call-screen[data-call-ui-mode="active"] .call-screen-controls {
    width: min(100%, 520px);
}

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

.call-screen[data-call-ui-mode="incoming"] .call-screen-controls,
.call-screen[data-call-ui-mode="active"] .call-screen-controls,
.call-screen[data-call-ui-mode="outgoing"] .call-screen-controls {
    flex-wrap: nowrap;
}

.call-screen[data-call-ui-mode="incoming"] .call-screen-controls > [data-call-speaker],
.call-screen[data-call-ui-mode="incoming"] .call-screen-controls > [data-call-video],
.call-screen[data-call-ui-mode="incoming"] .call-screen-controls > [data-call-mute],
.call-screen[data-call-ui-mode="incoming"] .call-screen-controls > [data-call-hangup],
.call-screen[data-call-ui-mode="incoming"] .call-screen-secondary-actions,
.call-screen[data-call-ui-mode="active"] .call-screen-controls > [data-call-accept],
.call-screen[data-call-ui-mode="active"] .call-screen-controls > [data-call-decline],
.call-screen[data-call-ui-mode="outgoing"] .call-screen-controls > [data-call-accept],
.call-screen[data-call-ui-mode="outgoing"] .call-screen-controls > [data-call-decline],
.call-screen[data-call-ui-mode="outgoing"] .call-screen-controls > [data-call-speaker],
.call-screen[data-call-ui-mode="outgoing"] .call-screen-controls > [data-call-video],
.call-screen[data-call-ui-mode="outgoing"] .call-screen-controls > [data-call-mute],
.call-screen[data-call-ui-mode="outgoing"] .call-screen-secondary-actions {
    display: none !important;
}

.messaging-layout {
    flex: 1;
    min-height: 0;
    max-width: 1600px;
    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;
}

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

.conversation-hub,
.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;
}

.conversation-hub {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px;
}

.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,
.icon-button {
    display: grid;
    place-items: center;
    background: var(--zn-member-accent-soft);
    color: var(--zn-member-accent-text);
}

.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 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.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 {
    margin-top: 4px;
}

.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 var(--zn-member-border-soft);
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
        rgba(13, 20, 31, 0.86);
    color: #ff6f76;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.notification-enable-button::-webkit-details-marker {
    display: none;
}

.notification-enable-button:hover {
    transform: translateY(-1px);
}

.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;
    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-setup > summary {
    list-style: none;
}

.notification-mobile-panel {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    z-index: 30;
    width: min(380px, calc(100vw - 28px));
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

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

.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-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;
}

.notification-settings[data-state="active"] .notification-enable-button {
    border-color: rgba(95, 224, 145, 0.28);
    color: #78efaa;
    background:
        linear-gradient(180deg, rgba(95, 224, 145, 0.16), rgba(95, 224, 145, 0.06)),
        rgba(13, 24, 31, 0.9);
}

.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;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--zn-member-text-secondary);
}

.secondary-button,
.primary-button,
.icon-button {
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 78%, transparent);
    border-radius: 999px;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}

.secondary-button {
    padding: 10px 12px;
    background: var(--zn-member-bg-surface-active);
    border-color: var(--zn-member-border);
    color: var(--zn-member-text-primary);
}

.primary-button {
    padding: 10px 14px;
    background: linear-gradient(180deg, var(--zn-member-primary), var(--zn-member-primary-hover));
    color: var(--zn-member-primary-text);
}

.icon-button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-color: color-mix(in srgb, var(--zn-member-border) 76%, transparent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        color-mix(in srgb, var(--zn-member-bg-surface-active) 82%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    font-size: 0.96rem;
}

.secondary-button:hover,
.primary-button:hover,
.icon-button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--zn-member-accent-border-strong) 68%, transparent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.024)),
        color-mix(in srgb, var(--zn-member-bg-surface-active) 92%, var(--zn-member-accent) 8%);
}

.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,
.conversation-item.is-active {
    background: var(--zn-member-bg-surface-active);
    border-color: var(--zn-member-border);
}

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

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

.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 > .chat-empty-state {
    flex: 1;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

[data-theme="shepherds-consulting"] .conversation-hub,
[data-theme="shepherds-consulting"] .chat-card,
[data-theme="shepherds-consulting"] .chat-empty-state {
    background:
        radial-gradient(circle at 68% 8%, rgba(214, 190, 138, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 254, 250, 0.98) 0%, rgba(250, 244, 230, 0.96) 58%, rgba(240, 221, 180, 0.86) 100%);
}

[data-theme="shepherds-consulting"] .chat-header,
[data-theme="shepherds-consulting"] .composer-message-form {
    background: rgba(255, 254, 250, 0.82);
    backdrop-filter: blur(18px);
}

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

.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 {
    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-home-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 2px 12px;
    border-bottom: 1px solid var(--zn-member-border);
}

.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-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);
}

.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-radius: 12px;
    color: #fff;
    background: #2f78d4;
    font-size: 0.78rem;
    font-weight: 800;
}

.group-chat-participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.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;
}

@media (max-width: 760px) {
    .group-chat-drawer-panel {
        height: var(--app-vh);
        max-height: var(--app-vh);
        overflow: hidden;
        padding-bottom: calc(18px + var(--safe-bottom));
    }

    .group-chat-create-form {
        overflow: hidden;
    }

    .group-chat-participant-picker {
        flex: 0 1 auto;
    }

    .group-chat-participant-list {
        flex: 0 1 auto;
        max-height: min(300px, 42vh);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .group-chat-drawer-actions {
        padding-top: 4px;
    }

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

    .group-settings-drawer .group-chat-create-form {
        overflow: visible;
    }
}

.group-settings-form {
    flex: 0 0 auto;
}

.group-settings-current,
.group-settings-danger {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--zn-member-bg-surface) 82%, transparent);
}

.group-settings-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--zn-member-text-secondary);
    font-size: 0.86rem;
}

.group-settings-section-heading strong {
    color: var(--zn-member-text-primary);
    font-size: 0.92rem;
}

.group-settings-chip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-settings-chip {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 80%, transparent);
    border-radius: 12px;
    background: var(--zn-member-bg-card);
}

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

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

.group-settings-chip-copy small {
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
}

.group-settings-chip button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--zn-member-danger-text-soft) 30%, transparent);
    border-radius: 999px;
    color: var(--zn-member-danger-text-soft);
    background: transparent;
    cursor: pointer;
}

.group-settings-participant-picker {
    flex: 0 0 auto;
    min-height: 220px;
}

.group-settings-status {
    min-height: 18px;
    margin: 0;
    color: var(--zn-member-text-muted);
    font-size: 0.82rem;
}

.group-settings-status[data-tone="error"] {
    color: var(--zn-member-danger-text-soft);
}

.group-settings-delete-confirm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--zn-member-danger-text-soft) 28%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--zn-member-danger-text-soft) 8%, transparent);
}

.group-settings-delete-confirm[hidden] {
    display: none;
}

.group-settings-delete-confirm p {
    margin: 0;
    color: var(--zn-member-text-secondary);
    font-size: 0.86rem;
}

.messages-brand-row {
    display: grid;
    position: relative;
    grid-template-columns: 46px minmax(0, 1fr) auto 42px;
    align-items: center;
    gap: 12px;
}

.messages-brand-row .topbar-title-mark {
    align-self: center;
    margin-top: 0;
}

.messages-brand-row h1 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pwa-profile-menu {
    position: relative;
    justify-self: end;
    padding: 0;
    border: 0;
    background: transparent;
}

.profile-menu-hidden-trigger {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 18;
}

.pwa-profile-menu > summary {
    list-style: none;
}

.pwa-profile-menu[open] > summary {
    margin-bottom: 0;
}

.pwa-profile-menu > summary::-webkit-details-marker,
.chat-more-menu > summary::-webkit-details-marker,
.chat-menu-nested > summary::-webkit-details-marker {
    display: none;
}

.messages-settings-button,
.chat-more-button {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--zn-member-border-muted);
    border-radius: 12px;
    background: var(--zn-member-bg-surface-faint);
    color: var(--zn-member-text-secondary);
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.messages-settings-button:hover,
.chat-more-button:hover {
    transform: translateY(-1px);
}

.messages-settings-button svg,
.chat-more-button svg {
    width: 18px;
    height: 18px;
}

.profile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 16;
    width: min(330px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: 18px;
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
}

.profile-menu-panel .server-upload-form,
.profile-menu-panel .logout-form {
    width: 100%;
}

.profile-menu-panel .topbar-upload-button,
.profile-menu-panel .surface-home-link,
.profile-menu-panel .logout-form .secondary-button {
    width: 100%;
    justify-content: center;
}

.notification-settings {
    border: 1px solid var(--zn-member-border);
    border-radius: 16px;
    padding: 10px 12px;
    background: var(--zn-member-bg-surface-faint);
}

.notification-settings-compact {
    justify-self: end;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.notification-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-copy strong {
    color: var(--zn-member-text-primary);
    font-size: 0.9rem;
    font-weight: 650;
}

.notification-copy span {
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.notification-copy .notification-status {
    margin-top: 2px;
}

.notification-chevron {
    color: var(--zn-member-text-muted);
    font-size: 1.5rem;
    line-height: 1;
}

.user-bottom-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 4px 2px;
    border-top: 1px solid var(--zn-member-border);
}

.user-bottom-nav-global {
    display: none;
}

.user-bottom-nav-link {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 48px;
    color: var(--zn-member-text-muted);
    font-size: 0.72rem;
}

.user-bottom-nav-link svg {
    width: 21px;
    height: 21px;
}

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

.user-bottom-nav-link.is-active::after {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
}

.feed-unread-badge {
    position: absolute;
    top: 4px;
    right: 20%;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: var(--zn-member-accent);
    color: var(--zn-member-primary-text);
    font-size: 0.62rem;
    font-weight: 760;
    line-height: 1;
    box-shadow: 0 0 0 3px var(--zn-member-accent-soft);
}

.feed-unread-badge[hidden] {
    display: none !important;
}

.mobile-backlink svg {
    width: 20px;
    height: 20px;
}

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

.chat-more-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 18;
    width: min(330px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid var(--zn-member-border);
    border-radius: 18px;
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
}

.chat-menu-nested {
    position: relative;
}

.chat-menu-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--zn-member-text-primary);
    cursor: pointer;
}

button.chat-menu-item {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    text-align: left;
}

.chat-menu-item:hover,
.chat-menu-item:focus-visible,
.chat-menu-nested[open] > .chat-menu-item {
    background: var(--zn-member-bg-surface-active);
}

.chat-menu-item svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.chat-menu-item .chat-files-count {
    margin-left: auto;
}

.chat-more-popover .chat-files-popover,
.chat-participants-popover {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 8px;
    box-shadow: none;
    border-radius: 14px;
    background: var(--zn-member-bg-surface-faint);
}

.chat-participants-popover {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--zn-member-border);
}

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

.chat-participant-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 12px;
    font-size: 0.74rem;
}

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

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

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

.chat-files-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    height: 36px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-active);
    color: var(--zn-member-text-primary);
    font: inherit;
    font-size: 0.76rem;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.chat-files-button:hover {
    transform: translateY(-1px);
}

.chat-files-menu[open] .chat-files-button {
    background: var(--zn-member-accent-surface);
    border-color: var(--zn-member-accent-border-strong);
}

.chat-files-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--zn-member-accent-surface-strong);
    color: var(--zn-member-accent-text);
    font-size: 0.72rem;
    font-weight: 600;
}

.chat-files-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 12;
    width: min(360px, calc(100vw - 48px));
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 18px;
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
}

.chat-files-popover-header,
.chat-files-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-files-popover-header {
    justify-content: space-between;
    margin-bottom: 10px;
}

.chat-files-popover-copy {
    min-width: 0;
}

.chat-files-popover-copy strong,
.chat-files-item-name {
    display: block;
    color: var(--zn-member-text-primary);
}

.chat-files-popover-copy span,
.chat-files-item-meta {
    font-size: 0.78rem;
    color: var(--zn-member-text-muted);
}

.chat-files-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.chat-files-filter-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-hover);
    color: var(--zn-member-text-muted);
    font: inherit;
    font-size: 0.74rem;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.chat-files-filter-button.is-active {
    background: var(--zn-member-accent-surface);
    border-color: var(--zn-member-accent-border-strong);
    color: var(--zn-member-text-primary);
}

.chat-files-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--zn-member-bg-surface-strong);
    color: inherit;
    font-size: 0.7rem;
    font-weight: 600;
}

.chat-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
}

.chat-files-item {
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--zn-member-bg-surface-hover);
}

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

.chat-files-item-name,
.chat-files-item-meta {
    margin: 0;
    overflow-wrap: anywhere;
}

.chat-files-item-type {
    margin: 0 0 4px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(176, 191, 244, 0.88);
}

.chat-files-empty {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--zn-member-text-muted);
}

.chat-files-empty strong,
.chat-files-empty p {
    margin: 0;
}

.chat-subtitle {
    margin: 4px 0 0;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.call-button {
    min-width: 84px;
    white-space: nowrap;
}

.call-button:disabled {
    cursor: default;
    opacity: 0.6;
}

.call-transient-notice {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(122, 150, 255, 0.08), transparent 48%),
        rgba(10, 16, 26, 0.92);
}

.call-transient-notice[data-tone="error"] {
    color: var(--zn-member-danger-text);
    border-color: rgba(255, 138, 138, 0.2);
}

.call-transient-notice[data-tone="warning"] {
    color: var(--zn-member-warning-text);
    border-color: rgba(248, 222, 157, 0.2);
}

.call-button-reason[data-tone="error"] {
    color: var(--zn-member-danger-text);
}

.call-button-reason[data-tone="warning"] {
    color: var(--zn-member-warning-text);
}

.screen-share-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.screen-share-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 5, 10, 0.78);
    backdrop-filter: blur(10px);
}

.screen-share-viewer-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 22px;
    background:
        radial-gradient(circle at top, rgba(115, 152, 255, 0.08), transparent 45%),
        rgba(6, 12, 22, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.screen-share-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.screen-share-viewer-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.screen-share-viewer-copy strong {
    font-size: 1.08rem;
}

.screen-share-viewer-copy span {
    color: var(--zn-member-text-muted);
    font-size: 0.86rem;
}

.screen-share-viewer-body {
    position: relative;
    flex: 1;
    min-height: min(72vh, 720px);
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        rgba(4, 8, 15, 0.96);
}

.screen-share-viewer-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020407;
}

.screen-share-viewer-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: var(--zn-member-text-muted);
    background:
        linear-gradient(135deg, rgba(122, 150, 255, 0.08), transparent 44%),
        rgba(4, 8, 15, 0.92);
}

.screen-share-viewer-fallback strong {
    color: var(--zn-member-text-primary);
    font-size: 1rem;
}

.danger-button {
    border-color: rgba(255, 138, 138, 0.22);
    color: var(--zn-member-danger-text-soft);
}

.message-timeline {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: var(--zn-member-bg-pane-shade, var(--zn-member-bg-pane));
}

.message-row {
    display: flex;
}

.message-date-divider {
    align-self: center;
    margin: 2px 0 8px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 48%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-surface-faint) 68%, transparent);
    color: var(--zn-member-text-muted);
    font-size: 0.72rem;
}

.message-row.is-sent {
    justify-content: flex-end;
}

.message-row.is-received {
    justify-content: flex-start;
}

.message-row.is-call-event {
    justify-content: center;
}

.call-event-card {
    max-width: min(88%, 560px);
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 24%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-bg-surface-faint) 58%, transparent);
    color: var(--zn-member-text-secondary);
    font-size: 0.76rem;
    line-height: 1.35;
    text-align: center;
}

.message-bubble {
    position: relative;
    max-width: min(68%, 720px);
    border-radius: 16px;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 28%, transparent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
        color-mix(in srgb, var(--zn-member-bg-bubble-in) 88%, transparent);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.message-row.is-sent .message-bubble {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        color-mix(in srgb, var(--zn-member-bg-bubble-out) 82%, transparent);
    border-color: color-mix(in srgb, var(--zn-member-accent-border) 42%, transparent);
}

.message-row.is-group-message .message-bubble {
    --group-message-tone: var(--zn-member-accent);
    --group-message-base: var(--zn-member-bg-bubble-in);
    --group-message-bg: color-mix(in srgb, var(--group-message-base) 91%, var(--group-message-tone) 9%);
    --group-message-border: color-mix(in srgb, var(--zn-member-border) 72%, var(--group-message-tone) 28%);
    --group-message-author: color-mix(in srgb, var(--zn-member-text-primary) 72%, var(--group-message-tone) 28%);
    --group-message-shadow: color-mix(in srgb, var(--group-message-tone) 14%, transparent);
    background: var(--group-message-bg);
    border-color: var(--group-message-border);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--group-message-shadow) 70%, transparent);
}

.message-row.is-sent.is-group-message .message-bubble {
    --group-message-base: var(--zn-member-bg-bubble-out);
}

.message-row.is-group-message .message-author {
    color: var(--group-message-author);
    font-weight: 700;
}

.message-row .message-bubble.has-media-message,
.message-row.is-sent .message-bubble.has-media-message,
.message-row.is-received .message-bubble.has-media-message,
.message-row.is-group-message .message-bubble.has-media-message,
.message-row.is-sent.is-group-message .message-bubble.has-media-message {
    display: grid;
    width: fit-content;
    max-width: min(76%, 560px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.message-row.is-sent .message-bubble.has-media-message {
    margin-right: 10px;
}

.message-row.is-received .message-bubble.has-media-message {
    margin-left: 10px;
}

.message-bubble.has-media-message .message-author,
.message-bubble.has-media-message .message-author-title {
    width: fit-content;
    margin: 0 0 7px 3px;
    padding: 0;
    color: color-mix(in srgb, var(--zn-member-text-primary) 82%, var(--zn-member-accent) 18%);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.message-reaction-badge {
    position: absolute;
    left: 0;
    bottom: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 1.08rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.16));
    transform: translate(-62%, 24%);
    transform-origin: center;
    pointer-events: none;
}

.message-row.is-received .message-reaction-badge {
    right: 0;
    left: auto;
    transform: translate(62%, 24%);
}

.message-reaction-badge.is-active {
    color: inherit;
}

.message-bubble.is-like-feedback {
    animation:
        message-like-bubble-pop 440ms ease,
        message-like-bubble-glow 620ms ease;
}

.message-bubble.is-like-feedback .message-reaction-badge {
    animation: message-like-badge-pop 500ms cubic-bezier(0.2, 1.15, 0.28, 1);
}

.message-bubble.is-like-feedback .message-reaction-emoji {
    display: inline-block;
    animation: message-like-heart-pop 500ms cubic-bezier(0.2, 1.2, 0.32, 1);
}

@keyframes message-like-bubble-pop {
    0% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.008);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes message-like-bubble-glow {
    0% {
        box-shadow: 0 0 0 color-mix(in srgb, var(--zn-member-accent-border) 0%, transparent);
    }
    34% {
        box-shadow:
            0 0 0 2px color-mix(in srgb, var(--zn-member-accent-border) 72%, transparent),
            0 0 28px color-mix(in srgb, var(--zn-member-accent-border) 48%, transparent),
            0 10px 32px color-mix(in srgb, var(--zn-member-accent-border) 22%, transparent),
            var(--zn-member-shadow);
    }
    100% {
        box-shadow: var(--zn-member-shadow);
    }
}

@keyframes message-like-badge-pop {
    0% {
        opacity: 0;
        transform: translate(-62%, 24%) scale(0.78);
    }
    52% {
        opacity: 1;
        transform: translate(-62%, 24%) scale(1.24);
    }
    100% {
        opacity: 1;
        transform: translate(-62%, 24%) scale(1);
    }
}

.message-row.is-received .message-bubble.is-like-feedback .message-reaction-badge {
    animation-name: message-like-badge-pop-received;
}

@keyframes message-like-badge-pop-received {
    0% {
        opacity: 0;
        transform: translate(62%, 24%) scale(0.78);
    }
    52% {
        opacity: 1;
        transform: translate(62%, 24%) scale(1.24);
    }
    100% {
        opacity: 1;
        transform: translate(62%, 24%) scale(1);
    }
}

@keyframes message-like-heart-pop {
    0% {
        transform: scale(1.45) rotate(-8deg);
    }
    48% {
        transform: scale(1.08) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.message-row.is-group-message.message-tone-0 {
    --group-message-tone: var(--zn-success);
}

.message-row.is-group-message.message-tone-1 {
    --group-message-tone: var(--zn-accent);
}

.message-row.is-group-message.message-tone-2 {
    --group-message-tone: #a78bfa;
}

.message-row.is-group-message.message-tone-3 {
    --group-message-tone: var(--zn-warning);
}

.message-row.is-group-message.message-tone-4 {
    --group-message-tone: var(--zn-danger);
}

.message-row.is-group-message.message-tone-5 {
    --group-message-tone: #8bcf6b;
}

.message-row.is-group-message.message-tone-6 {
    --group-message-tone: #46c7d8;
}

.message-row.is-group-message.message-tone-7 {
    --group-message-tone: #f08b54;
}

.message-author {
    margin: 0 0 4px;
    font-size: 0.78rem;
    color: var(--zn-member-text-secondary);
}

.message-author-title {
    margin: 0 0 6px;
}

.message-body {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.42;
    font-size: 0.92rem;
    font-weight: 400;
}

.message-body a,
.network-feed-content a {
    color: var(--zn-member-text-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.message-body a:hover,
.network-feed-content a:hover {
    color: var(--zn-member-accent-text);
}

.image-message-card,
.audio-message-card,
.file-message-card {
    display: flex;
    gap: 8px;
    position: relative;
    max-width: min(100%, 360px);
}

.image-message-card,
.audio-message-card {
    flex-direction: column;
    gap: 8px;
    width: min(100%, 520px);
}

.audio-message-card .attachment-inline-main {
    gap: 0;
}

.file-message-card {
    align-items: center;
    min-width: min(100%, 260px);
    padding: 7px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--zn-member-bg-surface-faint) 38%, transparent);
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 26%, transparent);
}

.attachment-preview-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: zoom-in;
    text-align: left;
}

.chat-media-frame {
    position: relative;
    overflow: visible;
    width: 100%;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
}

.chat-media-frame::before {
    content: "";
    position: absolute;
    inset: -14px;
    z-index: -1;
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 18%, rgba(150, 205, 255, 0.32), transparent 36%),
        radial-gradient(circle at 88% 82%, rgba(188, 143, 255, 0.24), transparent 40%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(120, 164, 255, 0.1));
    filter: blur(18px);
    opacity: 0.8;
    pointer-events: none;
}

.message-row.is-sent .chat-media-frame {
    box-shadow: none;
}

.message-row.is-sent .chat-media-frame::before {
    opacity: 0.92;
}

.attachment-card-footer,
.attachment-inline-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.attachment-card-footer {
    justify-content: flex-end;
}

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

.image-message-preview {
    display: block;
    width: 100%;
    max-height: min(58vh, 420px);
    object-fit: contain;
    border-radius: 16px;
    border: 0;
    background: transparent;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.3),
        0 18px 38px rgba(0, 0, 0, 0.13);
}

.chat-media-image {
    vertical-align: middle;
}

.message-meta-over-media {
    position: absolute;
    right: 13px;
    bottom: 13px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(10, 12, 18, 0.48);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
}

.message-meta-over-media .message-time,
.message-meta-over-media .message-status {
    color: inherit;
}

.chat-media-uploading {
    opacity: 0.9;
}

.chat-media-pending-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 8px;
    background: rgba(4, 7, 12, 0.28);
    color: white;
    text-align: center;
    backdrop-filter: blur(2px);
}

.chat-media-progress {
    width: 34px;
    height: 34px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.34);
    border-top-color: rgba(255, 255, 255, 0.96);
    border-radius: 999px;
    animation: chat-media-spin 900ms linear infinite;
}

.chat-media-upload-label {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.24);
    font-size: 0.76rem;
    font-weight: 650;
}

.chat-media-upload-cancel {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: rgba(10, 12, 18, 0.46);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.chat-media-failure-actions {
    display: flex;
    gap: 6px;
    padding: 7px 2px 0;
}

.chat-media-failure-actions button {
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 54%, transparent);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-active);
    color: var(--zn-member-text);
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.message-row[data-upload-state="failed"] .chat-media-pending-overlay {
    background: rgba(75, 12, 18, 0.42);
}

.message-row[data-upload-state="failed"] .chat-media-progress {
    display: none;
}

@keyframes chat-media-spin {
    to {
        transform: rotate(360deg);
    }
}

.image-message-name,
.image-message-meta,
.audio-message-name,
.audio-message-meta,
.file-message-name,
.file-message-meta {
    margin: 0;
}

.image-message-name,
.audio-message-name,
.file-message-name {
    font-size: 0.86rem;
    font-weight: 560;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.image-message-meta,
.audio-message-meta,
.file-message-meta {
    font-size: 0.74rem;
    color: var(--zn-member-text-muted);
    overflow-wrap: anywhere;
}

.audio-message-player {
    display: none;
}

.audio-message-control {
    --audio-progress: 0%;
    display: grid;
    grid-template-columns: 32px minmax(108px, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 9px 6px 6px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 24%, transparent);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.006)),
        color-mix(in srgb, var(--zn-member-bg-surface-active) 48%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.028);
}

.message-row.is-sent .audio-message-control {
    border-color: color-mix(in srgb, var(--zn-member-accent-border) 30%, transparent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.01)),
        color-mix(in srgb, var(--zn-member-primary) 16%, rgba(7, 11, 19, 0.52));
}

.audio-message-play {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-accent) 84%, white 4%);
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--zn-member-accent) 22%, transparent);
}

.audio-message-play:hover {
    background: color-mix(in srgb, var(--zn-member-accent) 92%, white 6%);
}

.audio-message-play svg {
    width: 16px;
    height: 16px;
}

.audio-message-pause-icon,
.audio-message-card.is-playing .audio-message-play-icon {
    display: none;
}

.audio-message-card.is-playing .audio-message-pause-icon {
    display: block;
}

.audio-message-waveform {
    position: relative;
    display: grid;
    grid-template-columns: repeat(32, minmax(1px, 1fr));
    align-items: center;
    gap: 2px;
    min-width: 0;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: color-mix(in srgb, var(--zn-member-text-muted) 52%, transparent);
    cursor: pointer;
}

.audio-message-waveform span {
    display: block;
    height: var(--bar-height);
    min-height: 4px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.78;
    transition: background 140ms ease, opacity 140ms ease;
}

.audio-message-waveform span.is-played {
    background: color-mix(in srgb, var(--zn-member-accent-text) 88%, white 4%);
    opacity: 1;
}

.audio-message-duration {
    color: var(--zn-member-text-secondary);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.attachment-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border-bright) 70%, transparent);
    border-radius: 8px;
    background: var(--zn-member-bg-surface-active);
    color: var(--zn-member-text);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
}

.attachment-file-icon:disabled {
    cursor: default;
    opacity: 0.72;
}

.attachment-action-menu {
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
}

.attachment-action-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--zn-member-text-muted);
    cursor: pointer;
    list-style: none;
    font-size: 1rem;
    line-height: 1;
}

.attachment-action-menu summary::-webkit-details-marker {
    display: none;
}

.attachment-action-menu summary:hover,
.attachment-action-menu[open] summary {
    background: var(--zn-member-bg-surface-active);
    color: var(--zn-member-text);
}

.attachment-action-list {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    display: grid;
    min-width: 132px;
    padding: 5px;
    border: 1px solid var(--zn-member-border-bright);
    border-radius: 8px;
    background: var(--zn-member-bg-panel);
    box-shadow: 0 16px 36px var(--zn-member-shadow);
}

.attachment-action {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--zn-member-text);
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.attachment-action:hover {
    background: var(--zn-member-bg-surface-active);
}

.attachment-action.is-danger {
    color: var(--zn-member-danger-text-soft);
}

.media-message-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.message-delete-form {
    margin: 0;
}

.message-delete-button {
    padding: 6px 10px;
    border: 1px solid var(--zn-danger-border);
    border-radius: 10px;
    background: var(--zn-danger-soft);
    color: var(--zn-member-danger-text-soft);
    cursor: pointer;
}

.message-delete-button:hover {
    background: var(--zn-danger-soft-strong);
}

.file-message-link {
    align-self: flex-start;
    font-size: 0.82rem;
    color: var(--zn-member-text-link);
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--zn-member-border-bright);
    background: var(--zn-member-bg-surface-active);
}

.attachment-viewer {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 22px;
}

.attachment-viewer[hidden] {
    display: none;
}

.attachment-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--zn-member-bg-page) 58%, rgba(0, 0, 0, 0.46));
    backdrop-filter: blur(10px);
}

.attachment-viewer-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(96vw, 1040px);
    max-height: 92vh;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 54%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--zn-member-bg-panel) 94%, transparent);
    box-shadow: 0 24px 80px color-mix(in srgb, var(--zn-member-shadow) 75%, transparent);
    overflow: hidden;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-panel,
.attachment-viewer[data-viewer-kind="video"] .attachment-viewer-panel,
.attachment-viewer[data-viewer-kind="audio"] .attachment-viewer-panel {
    width: fit-content;
    min-width: min(92vw, 280px);
    max-width: 96vw;
    background: color-mix(in srgb, var(--zn-member-bg-panel) 76%, transparent);
}

.attachment-viewer[data-viewer-kind="image"] {
    padding:
        max(14px, env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        max(14px, env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-backdrop {
    background: rgba(2, 4, 9, 0.82);
    backdrop-filter: blur(14px);
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-panel {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-header {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    z-index: 2;
    border: 0;
    color: white;
    pointer-events: none;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-header strong {
    opacity: 0;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-actions {
    margin-left: auto;
    pointer-events: auto;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-download,
.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-delete,
.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-close {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(16px);
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-delete {
    border-color: rgba(255, 126, 112, 0.52);
    background: rgba(150, 38, 34, 0.34);
    color: #ff8a78;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-download:hover,
.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-close:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.46);
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-delete:hover {
    background: rgba(174, 46, 40, 0.44);
    border-color: rgba(255, 140, 128, 0.66);
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-body,
.attachment-viewer[data-viewer-kind="video"] .attachment-viewer-body {
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-body {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100dvh;
}

.attachment-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--zn-member-border) 52%, transparent);
}

.attachment-viewer-header strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
}

.attachment-viewer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.attachment-viewer-download,
.attachment-viewer-delete,
.attachment-viewer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--zn-member-border-bright);
    border-radius: 8px;
    background: var(--zn-member-bg-surface-active);
    color: var(--zn-member-text);
    font-size: 0.82rem;
    text-decoration: none;
    cursor: pointer;
}

.attachment-viewer-download svg,
.attachment-viewer-delete svg,
.attachment-viewer-close svg {
    width: 18px;
    height: 18px;
}

.attachment-viewer-delete-form {
    margin: 0;
}

.attachment-viewer-delete {
    color: var(--zn-member-danger-text-soft);
}

.attachment-viewer-close {
    width: 40px;
    padding: 0;
}

.attachment-viewer-body {
    min-height: 220px;
    overflow: auto;
    padding: 12px;
}

.attachment-viewer-image,
.attachment-viewer-video {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 86px);
    margin: 0 auto;
    border-radius: 6px;
}

.attachment-viewer[data-viewer-kind="image"] .attachment-viewer-image {
    max-width: calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

.attachment-viewer-frame {
    width: 100%;
    height: calc(92vh - 94px);
    min-height: calc(92vh - 94px);
    border: 0;
    border-radius: 6px;
    background: white;
}

.attachment-viewer-audio {
    width: min(100%, 620px);
    margin: 60px auto;
}

.attachment-viewer-text {
    min-height: calc(92vh - 118px);
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 0.84rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--zn-member-text);
}

.attachment-viewer-text.is-csv {
    white-space: pre;
}

.attachment-viewer-fallback {
    min-height: calc(64vh - 88px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px;
    border: 1px dashed color-mix(in srgb, var(--zn-member-border) 72%, transparent);
    border-radius: 8px;
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-text);
    text-align: center;
}

.attachment-viewer-fallback strong {
    font-size: 1rem;
}

.attachment-viewer-fallback p {
    max-width: 32rem;
    margin: 0;
    color: var(--zn-member-text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.attachment-viewer-fallback-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.attachment-viewer-fallback-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--zn-member-border-bright);
    border-radius: 8px;
    background: var(--zn-member-bg-surface-active);
    color: var(--zn-member-text);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.file-message-link.is-disabled {
    color: var(--zn-member-text-muted);
    background: var(--zn-member-bg-surface-faint);
    pointer-events: none;
    opacity: 0.72;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.message-time {
    display: block;
    text-align: right;
    font-size: 0.76rem;
    color: var(--zn-member-text-muted);
}

.message-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    color: var(--zn-member-text-link);
}

.message-status[data-state="delivered"] {
    color: var(--zn-member-text-link);
}

.message-status[data-state="read"] {
    color: var(--zn-member-accent);
}

.message-status-icon {
    font-size: 0.78rem;
    line-height: 1;
    letter-spacing: -0.08em;
}

.composer {
    padding: 12px 14px;
    border-top: 1px solid var(--zn-member-border);
    align-items: flex-end;
}

.composer-tools {
    flex: 0 0 auto;
}

.composer-message-form {
    flex: 1;
    min-width: 0;
}

.composer-input-shell {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.mention-trigger-button[hidden] {
    display: none !important;
}

.mention-picker[hidden] {
    display: none !important;
}

.mention-picker {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    left: 0;
    z-index: 24;
    max-height: min(270px, 42vh);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--zn-member-accent-border-strong) 54%, var(--zn-member-border));
    border-radius: 24px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--zn-member-bg-surface-active) 92%, white 4%), var(--zn-member-bg-card));
    box-shadow: 0 18px 48px rgba(2, 7, 14, 0.22);
}

.mention-picker-header {
    padding: 9px 16px 7px;
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid color-mix(in srgb, var(--zn-member-border) 72%, transparent);
}

.mention-picker-list {
    max-height: calc(min(270px, 42vh) - 34px);
    overflow-y: auto;
    padding: 6px;
}

.mention-picker-option {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--zn-member-text-primary);
    text-align: left;
    cursor: pointer;
}

.mention-picker-option:hover,
.mention-picker-option:focus-visible {
    background: color-mix(in srgb, var(--zn-member-accent) 54%, var(--zn-member-bg-surface-active));
    color: var(--zn-member-text-primary);
    outline: none;
}

.mention-picker-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-accent) 32%, var(--zn-member-bg-surface-active));
    color: var(--zn-member-text-primary);
    font-weight: 780;
}

.mention-picker-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.mention-picker-copy strong {
    font-weight: 720;
}

.mention-picker-copy small {
    color: color-mix(in srgb, var(--zn-member-text-secondary) 86%, transparent);
    font-size: 0.84rem;
}

.mention-picker-empty {
    padding: 14px 16px;
    color: var(--zn-member-text-muted);
    font-weight: 650;
}

.composer-status {
    max-width: 120px;
    font-size: 0.74rem;
    color: var(--zn-member-text-muted);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.composer-status[data-tone="error"] {
    color: var(--zn-member-danger-text);
}

.composer-status[data-tone="progress"] {
    color: var(--zn-member-text-link);
}

.composer-status[data-tone="recording"] {
    color: var(--zn-member-danger-text);
}

.voice-record-button {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 2;
    width: 38px;
    height: 38px;
    padding: 0;
    border-color: color-mix(in srgb, var(--zn-member-border) 54%, transparent);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02)),
        color-mix(in srgb, var(--zn-member-bg-surface-active) 78%, transparent);
    color: var(--zn-member-text-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    transform: translateY(-50%);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.voice-record-button:hover,
.voice-record-button:focus-visible {
    transform: translateY(-50%);
}

.voice-record-button:hover {
    border-color: color-mix(in srgb, var(--zn-member-accent-border-strong) 58%, transparent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.024)),
        color-mix(in srgb, var(--zn-member-bg-surface-active) 80%, var(--zn-member-accent) 10%);
    color: var(--zn-member-accent-text);
}

.voice-record-button svg {
    width: 18px;
    height: 18px;
}

.voice-record-button.is-recording {
    border-color: rgba(220, 38, 38, 0.42);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(220, 38, 38, 0.14);
    color: var(--zn-member-danger-text);
}

.voice-record-indicator {
    position: absolute;
    top: 50%;
    right: 58px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 132px);
    min-height: 28px;
    padding: 0 4px;
    color: var(--zn-member-danger-text);
    font-size: 0.74rem;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
}

.voice-record-indicator[hidden] {
    display: none !important;
}

.voice-record-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.32);
    animation: voice-record-pulse 1.15s ease-out infinite;
}

.voice-record-hint {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--zn-member-text-muted);
}

@keyframes voice-record-pulse {
    70% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.composer-input {
    min-height: 56px;
    min-width: 0;
    padding-right: 60px;
    resize: none;
}

.composer-message-form.is-recording-voice .composer-input {
    color: transparent;
    caret-color: transparent;
}

.composer-message-form.is-recording-voice .composer-input::placeholder {
    color: transparent;
}

.composer-mobile-editor {
    display: none;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}

.composer-mobile-editor.is-active {
    display: block;
}

.composer-mobile-editor:empty::before {
    color: var(--zn-member-text-muted);
    content: attr(data-placeholder);
    pointer-events: none;
}

.composer-input.is-native-composer-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    resize: none !important;
    clip-path: inset(50%) !important;
}

.composer-button {
    min-width: 52px;
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
}

.composer-button svg {
    width: 21px;
    height: 21px;
}

.network-feed-card {
    min-height: 0;
    background: var(--zn-member-bg-pane);
}

.network-feed-header-main {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.network-feed-icon {
    color: var(--zn-member-accent-text);
}

.network-feed-header-icon {
    width: 21px;
    height: 21px;
}

.network-feed-mark-read {
    white-space: nowrap;
}

.network-feed-surface {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        linear-gradient(180deg, var(--zn-member-bg-card), transparent 168px),
        var(--zn-member-bg-pane);
}

.network-feed-composer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--zn-member-border) 58%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-card) 86%, transparent);
}

.network-feed-composer-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
}

.network-feed-input {
    width: 100%;
    min-height: 64px;
    resize: vertical;
    border-color: color-mix(in srgb, var(--zn-member-border) 72%, transparent);
    background: var(--zn-member-bg-surface-faint);
}

.network-feed-submit {
    align-self: stretch;
    min-width: 86px;
}

.network-feed-status {
    margin: 0;
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.network-feed-status[data-tone="error"] {
    color: var(--zn-member-danger-text);
}

.network-feed-status[data-tone="progress"] {
    color: var(--zn-member-text-link);
}

.network-feed-status[data-tone="success"] {
    color: var(--zn-member-accent-text);
}

.network-feed-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 18px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.network-feed-post {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 42%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 94%, var(--zn-member-bg-pane));
    box-shadow: var(--zn-member-shadow);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    touch-action: manipulation;
}

.network-feed-post.is-pinned {
    border-color: color-mix(in srgb, var(--zn-member-accent-border) 72%, transparent);
    background: linear-gradient(180deg, var(--zn-member-accent-soft), var(--zn-member-bg-card) 82%);
}

.network-feed-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.network-feed-post-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.network-feed-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.network-feed-post-author {
    min-width: 0;
}

.network-feed-post-author strong {
    display: block;
    color: var(--zn-member-text-primary);
    font-size: 0.94rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.network-feed-post-author span,
.network-feed-post-meta {
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.network-feed-post-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    text-align: right;
}

.network-feed-pin-label {
    padding: 3px 7px;
    border: 1px solid var(--zn-member-accent-border);
    border-radius: 999px;
    color: var(--zn-member-accent-text);
    background: var(--zn-member-accent-soft);
    font-weight: 700;
}

.network-feed-content {
    margin: 0;
    color: var(--zn-member-text-primary);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.5;
    font-size: 0.98rem;
}

.network-feed-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 22px;
}

.network-feed-reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 52%, transparent);
    border-radius: 999px;
    background: var(--zn-member-bg-surface-faint);
    color: var(--zn-member-text-secondary);
    font-size: 0.78rem;
    line-height: 1;
}

.network-feed-reaction-badge.is-active {
    border-color: color-mix(in srgb, var(--zn-member-accent-border) 72%, transparent);
    background: var(--zn-member-accent-soft);
    color: var(--zn-member-accent-text);
}

.network-feed-reaction-badge strong {
    font-size: 0.72rem;
}

.network-feed-post.is-like-pop {
    animation:
        network-feed-like-pop 460ms ease,
        network-feed-like-glow 640ms ease;
}

.network-feed-post.is-like-pop .network-feed-reaction-badge {
    animation: network-feed-heart-pop 460ms ease;
}

.network-feed-day-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--zn-member-text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.network-feed-day-divider::before,
.network-feed-day-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: color-mix(in srgb, var(--zn-member-border) 48%, transparent);
}

@keyframes network-feed-like-pop {
    0% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.012);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes network-feed-like-glow {
    0% {
        box-shadow: var(--zn-member-shadow);
        border-color: color-mix(in srgb, var(--zn-member-border) 42%, transparent);
    }
    34% {
        box-shadow:
            0 0 0 2px color-mix(in srgb, var(--zn-member-accent-border) 72%, transparent),
            0 0 30px color-mix(in srgb, var(--zn-member-accent-border) 48%, transparent),
            0 12px 34px color-mix(in srgb, var(--zn-member-accent-border) 22%, transparent),
            var(--zn-member-shadow);
        border-color: color-mix(in srgb, var(--zn-member-accent-border) 76%, transparent);
    }
    100% {
        box-shadow: var(--zn-member-shadow);
        border-color: color-mix(in srgb, var(--zn-member-border) 42%, transparent);
    }
}

@keyframes network-feed-heart-pop {
    0% {
        transform: scale(0.84);
    }
    55% {
        transform: scale(1.16);
    }
    100% {
        transform: scale(1);
    }
}

.network-feed-menu {
    position: relative;
}

.network-feed-menu summary {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    list-style: none;
    border: 1px solid var(--zn-member-border);
    border-radius: 10px;
    background: var(--zn-member-bg-surface-faint);
    color: var(--zn-member-text-secondary);
    cursor: pointer;
}

.network-feed-menu summary::-webkit-details-marker {
    display: none;
}

.network-feed-menu-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 12;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
}

.network-feed-menu-button {
    width: 100%;
    padding: 7px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--zn-member-text-primary);
    text-align: left;
    cursor: pointer;
}

.network-feed-menu-button:hover {
    background: var(--zn-member-bg-surface-active);
}

.network-feed-menu-button-danger {
    color: var(--zn-member-danger-text);
}

.network-feed-empty {
    align-self: stretch;
}

@media (max-width: 760px) {
    .network-feed-composer {
        padding: 12px;
    }

    .network-feed-composer-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .network-feed-submit {
        width: 100%;
        min-height: 46px;
    }

    .network-feed-list {
        padding: 12px;
        gap: 12px;
    }

    .network-feed-post {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
        padding: 13px;
    }

    .network-feed-avatar {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .network-feed-post-header {
        gap: 8px;
    }
}

body.user-body-call-active .composer,
.messaging-layout.is-call-active .composer,
.messaging-layout:has(.call-screen:not(.is-hidden)) .composer {
    display: none !important;
    pointer-events: none;
}

body.user-body-call-active .message-timeline,
.messaging-layout.is-call-active .message-timeline {
    padding-bottom: 14px;
    scroll-padding-bottom: 14px;
}

.chat-empty-state,
.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
}

.login-shell {
    min-height: 100%;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-lg);
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-card h1 {
    margin: 0;
    font-size: 1.3rem;
}

.login-copy {
    margin: 0;
    color: var(--zn-member-text-secondary);
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.setup-body {
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(10, 16, 24, 0.98), rgba(9, 13, 20, 1)),
        var(--zn-member-bg-app);
}

body.setup-body .user-shell {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.setup-shell {
    width: 100%;
    min-height: 0;
    height: 100%;
    display: grid;
    place-items: center;
}

.setup-card {
    width: min(520px, 100%);
    padding: 28px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-lg);
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.setup-wizard-card {
    width: min(820px, 100%);
    min-height: min(680px, 100%);
    height: min(820px, 100%);
    max-height: 100%;
    overflow: hidden;
}

.setup-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.setup-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--zn-member-text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.setup-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.setup-copy h1,
.setup-form-title h2 {
    margin: 0;
}

.setup-copy h1 {
    font-size: 1.62rem;
}

.setup-copy p,
.setup-footnote {
    margin: 8px 0 0;
    color: var(--zn-member-text-secondary);
    line-height: 1.5;
}

.setup-status-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: rgba(255, 255, 255, 0.035);
}

.setup-progress {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.setup-progress-item {
    min-width: 0;
    min-height: 34px;
    padding: 8px 6px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--zn-member-text-muted);
    cursor: pointer;
    font-size: 0.76rem;
}

.setup-progress-item.is-active {
    color: var(--zn-member-text-primary);
    border-color: rgba(126, 145, 255, 0.44);
    background: rgba(126, 145, 255, 0.12);
}

.setup-progress-item.is-complete {
    color: var(--zn-member-success-text);
}

.setup-step {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 16px;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    margin-right: -4px;
    scrollbar-gutter: stable;
}

.setup-step[hidden] {
    display: none;
}

.setup-step-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setup-step-heading p {
    margin: 0;
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.setup-step-heading h2 {
    margin: 0;
    font-size: 1.18rem;
}

.setup-muted {
    margin: 0;
    color: var(--zn-member-text-secondary);
    line-height: 1.5;
}

.setup-choice-grid,
.setup-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.setup-choice-grid {
    align-items: stretch;
}

.setup-choice {
    min-width: 0;
    min-height: 92px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.setup-choice input {
    margin-top: 3px;
    accent-color: var(--zn-member-primary);
}

.setup-choice span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setup-choice strong {
    color: var(--zn-member-text-primary);
    font-size: 0.92rem;
}

.setup-choice small {
    color: var(--zn-member-text-secondary);
    line-height: 1.42;
}

.setup-choice:has(input:checked) {
    border-color: rgba(126, 145, 255, 0.48);
    background: rgba(126, 145, 255, 0.12);
}

.setup-instruction,
.setup-warning {
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: rgba(255, 255, 255, 0.03);
    color: var(--zn-member-text-secondary);
    line-height: 1.5;
}

.setup-warning {
    border-color: rgba(255, 194, 97, 0.24);
    color: var(--zn-member-warning-text);
}

.setup-instruction span {
    display: block;
    margin-bottom: 8px;
    color: var(--zn-member-text-primary);
    font-weight: 700;
}

.setup-instruction dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.setup-instruction dl div {
    min-width: 0;
}

.setup-instruction dt {
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
}

.setup-instruction dd {
    margin: 3px 0 0;
    color: var(--zn-member-text-primary);
    overflow-wrap: anywhere;
}

.setup-instruction code,
.setup-instruction pre {
    display: block;
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--zn-member-text-primary);
    font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.setup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.setup-actions .secondary-button,
.setup-actions .primary-button {
    min-width: 112px;
}

.setup-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.setup-checklist li {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--zn-member-text-primary);
}

.setup-checklist li span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--zn-member-success-text);
    box-shadow: 0 0 0 4px rgba(95, 224, 145, 0.12);
}

.setup-shell[data-access-mode="trial_ip"] .setup-production-field,
.setup-shell[data-email-mode="skip"] .setup-email-fields,
.setup-shell[data-email-mode="gmail"] .setup-email-warning,
.setup-shell[data-turn-auth-mode="shared_secret"] .setup-turn-static-field,
.setup-shell[data-turn-auth-mode="static_credentials"] .setup-turn-secret-field {
    display: none;
}

.setup-status-card div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setup-status-card span,
.setup-form-title p {
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.setup-status-card strong {
    color: var(--zn-member-text-primary);
    font-size: 0.9rem;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setup-form-title h2 {
    font-size: 1rem;
}

.setup-submit {
    margin-top: 4px;
    min-height: 44px;
}

.setup-footnote {
    font-size: 0.82rem;
}

@media (max-width: 560px) {
    body.setup-body {
        overflow: auto;
    }

    body.setup-body .user-shell {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        overflow: visible;
    }

    .setup-shell {
        min-height: calc(100vh - 28px);
        min-height: calc(100dvh - 28px);
        height: auto;
        place-items: start center;
    }

    .setup-card {
        padding: 22px;
    }

    .setup-wizard-card {
        min-height: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .setup-step {
        flex: 0 0 auto;
        overflow: visible;
        padding-right: 0;
        margin-right: 0;
    }

    .setup-status-card {
        grid-template-columns: 1fr;
    }

    .setup-progress {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .setup-choice-grid,
    .setup-form-grid,
    .setup-checklist,
    .setup-instruction dl {
        grid-template-columns: 1fr;
    }

    .setup-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .setup-actions .secondary-button,
    .setup-actions .primary-button {
        width: 100%;
    }
}

body.user-body-workspace .workspace-explorer .workspace-explorer-table {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

body.user-body-workspace .workspace-explorer .workspace-explorer-row {
    display: grid;
    grid-template-rows: minmax(92px, auto) auto;
    width: auto;
    min-width: 0;
    overflow: visible;
}

body.user-body-workspace .workspace-explorer .workspace-file-row .workspace-row-main,
body.user-body-workspace .workspace-explorer .workspace-row-main {
    display: contents;
}

@media (max-width: 760px) {
    body.user-body-workspace .workspace-explorer {
        min-height: 360px;
    }

    body.user-body-workspace .workspace-explorer-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        padding: 12px 14px;
    }

    body.user-body-workspace .workspace-explorer-heading span {
        white-space: normal;
    }

    body.user-body-workspace .workspace-explorer .workspace-explorer-table {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 22px 16px;
        padding: 20px 12px 28px;
    }

    body.user-body-workspace .workspace-explorer .workspace-explorer-row {
        min-height: 138px;
        padding: 8px 4px;
    }

    body.user-body-workspace .workspace-explorer .workspace-row-icon {
        transform: scale(0.86);
        transform-origin: center bottom;
    }

    body.user-body-workspace .workspace-explorer-actions {
        opacity: 1;
        pointer-events: auto;
    }

    body.user-body-workspace .workspace-explorer-name .workspace-row-copy strong {
        font-size: 0.84rem;
    }
}

.desktop-inline {
    display: inline;
}

.mobile-inline {
    display: none;
}

.empty-state-list {
    min-height: 90px;
}

.mobile-backlink {
    display: none;
    color: var(--zn-member-accent);
}

body.user-body-workspace {
    overflow: auto;
}

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

.workspace-layout {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

.workspace-browser {
    border-radius: var(--user-radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.workspace-header-copy {
    min-width: 0;
    max-width: 780px;
}

.workspace-header-copy h2 {
    margin: 6px 0 0;
    font-size: 1.28rem;
    letter-spacing: -0.03em;
}

.workspace-subtitle,
.workspace-helper-text {
    margin: 8px 0 0;
    color: var(--zn-member-text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.workspace-upload-status {
    min-height: 18px;
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.workspace-upload-status[data-tone="error"] {
    color: var(--zn-member-danger-text);
}

.workspace-upload-status[data-tone="progress"] {
    color: var(--zn-member-text-link);
}

.workspace-refresh-status {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.workspace-refresh-status[data-tone="progress"] {
    color: var(--zn-member-text-link);
}

.workspace-refresh-status[data-tone="error"] {
    color: var(--zn-member-danger-text);
    border-color: var(--zn-member-danger-border);
    background: var(--zn-danger-soft);
}

.workspace-browser[aria-busy="true"] {
    cursor: progress;
}

.workspace-project-controls,
.workspace-upload-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workspace-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: rgba(255, 255, 255, 0.025);
}

.workspace-breadcrumb-link,
.workspace-breadcrumb-current {
    font-size: 0.82rem;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
}

.workspace-breadcrumb-link {
    color: var(--zn-member-text-secondary);
    text-decoration: none;
}

.workspace-breadcrumb-current {
    color: var(--zn-member-text-primary);
    font-weight: 600;
    padding: 0 10px;
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface);
}

.workspace-breadcrumb-link::after {
    content: "/";
    margin-left: 8px;
    color: var(--zn-member-text-muted);
}

.workspace-action-bar {
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(420px, 1.25fr);
    gap: 14px;
    align-items: stretch;
}

.workspace-project-form,
.workspace-create-folder-form,
.workspace-upload-form {
    min-width: 0;
}

.workspace-create-folder-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
}

.workspace-new-folder-input {
    min-width: 0;
}

.workspace-new-folder-button {
    white-space: nowrap;
}

.workspace-upload-form {
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
}

.workspace-share-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
}

.workspace-share-header,
.workspace-acl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workspace-share-header strong {
    display: block;
    margin-top: 2px;
}

.workspace-share-header > span {
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
    font-weight: 650;
}

.workspace-share-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(4, auto) auto;
    align-items: center;
    gap: 8px;
}

.workspace-permission-toggle,
.workspace-acl-form label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--zn-member-text-secondary);
    font-size: 0.78rem;
    font-weight: 650;
    white-space: nowrap;
}

.workspace-share-button {
    white-space: nowrap;
}

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

.workspace-acl-row {
    padding: 9px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface-hover);
}

.workspace-acl-user {
    min-width: 140px;
}

.workspace-acl-user strong,
.workspace-acl-user span {
    display: block;
}

.workspace-acl-user span {
    color: var(--zn-member-text-muted);
    font-size: 0.72rem;
}

.workspace-acl-form {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.workspace-upload-dropzone {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    padding: 14px;
    border: 1px dashed var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: rgba(255, 255, 255, 0.025);
}

.workspace-upload-dropzone.is-dragging {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-surface);
}

.workspace-upload-dropzone input[type="file"] {
    width: 100%;
}

.workspace-dropzone-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workspace-dropzone-copy strong {
    font-size: 0.88rem;
    color: var(--zn-member-text-primary);
}

.workspace-dropzone-copy span {
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

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

.workspace-section {
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.workspace-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--zn-member-border);
}

.workspace-section-heading strong {
    font-size: 0.82rem;
    color: var(--zn-member-text-secondary);
}

.workspace-list {
    display: flex;
    flex-direction: column;
}

.workspace-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--zn-member-border-muted);
    flex-wrap: wrap;
}

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

.workspace-folder-row:hover {
    background: var(--zn-member-bg-surface-hover);
}

.workspace-row-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.workspace-row-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--zn-member-accent-surface);
    border: 1px solid var(--zn-member-accent-border-muted);
    color: var(--zn-member-accent-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.workspace-row-icon-folder {
    position: relative;
    border-radius: 10px;
}

.workspace-row-icon-folder::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 9px;
    width: 14px;
    height: 6px;
    border-radius: 4px 4px 0 0;
    background: currentColor;
    opacity: 0.8;
}

.workspace-row-icon-folder::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 8px;
    width: 24px;
    height: 15px;
    border-radius: 4px;
    background: currentColor;
}

.workspace-row-icon-file span {
    max-width: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
}

.workspace-row-icon-pdf {
    color: var(--zn-member-danger-text);
    background: rgba(179, 68, 68, 0.12);
}

.workspace-row-icon-code {
    color: var(--zn-member-text-link);
}

.workspace-row-icon-table {
    color: var(--zn-member-success-text);
    background: rgba(64, 140, 101, 0.12);
}

.workspace-row-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workspace-row-copy strong,
.workspace-row-copy span,
.workspace-row-meta {
    overflow-wrap: anywhere;
}

.workspace-row-copy span,
.workspace-row-meta {
    color: var(--zn-member-text-muted);
    font-size: 0.8rem;
}

.workspace-row-title-link {
    color: var(--zn-member-text-primary);
    text-decoration: none;
}

.workspace-row-title-link:hover {
    color: var(--zn-member-text-link);
}

.workspace-file-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.workspace-preview-button,
.workspace-download-button {
    white-space: nowrap;
}

.workspace-preview-button {
    color: var(--zn-member-accent-text);
}

.workspace-icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.workspace-compact-button.workspace-icon-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
}

.workspace-action-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.workspace-file-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    justify-content: start;
    column-gap: 12px;
    row-gap: 9px;
}

.workspace-file-row .workspace-row-main {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    max-width: 100%;
}

.workspace-file-row .workspace-row-copy {
    gap: 2px;
}

.workspace-file-row .workspace-row-copy strong,
.workspace-file-row .workspace-row-copy span {
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-file-row .workspace-row-copy strong {
    font-size: 0.93rem;
    font-weight: 650;
    line-height: 1.18;
}

.workspace-file-row .workspace-row-copy span {
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.25;
}

.workspace-file-row .workspace-file-actions {
    grid-column: 2;
    justify-self: start;
    justify-content: flex-start;
    max-width: 100%;
    gap: 7px;
}

.workspace-file-row .workspace-file-actions > form {
    min-width: 0;
}

.workspace-file-row .workspace-icon-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    border-radius: 999px;
}

.workspace-file-row .workspace-action-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.workspace-file-row .workspace-danger-button {
    color: var(--zn-member-danger-text);
}

.workspace-file-move-row {
    grid-column: 2;
    width: min(100%, 280px);
    max-width: 100%;
}

.workspace-file-move-row .workspace-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 7px;
    width: 100%;
}

.workspace-file-move-row .workspace-action-select {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 500;
}

.workspace-item-actions {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 52px;
}

.workspace-item-actions > form {
    min-width: 0;
}

.workspace-inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.workspace-rename-form {
    flex: 0 0 auto;
}

.workspace-hidden-rename-form {
    display: none;
}

.workspace-action-input,
.workspace-action-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    font-size: 0.8rem;
}

.workspace-compact-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.workspace-danger-button {
    color: var(--zn-member-danger-text);
    border-color: var(--zn-member-danger-border);
}

.workspace-empty-state {
    flex: 1;
    min-height: 180px;
    padding: 24px;
}

.workspace-owner-landing {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
}

.workspace-owner-landing-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.workspace-owner-landing-header h2 {
    margin: 2px 0 4px;
    color: var(--zn-member-text-primary);
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.08;
}

.workspace-owner-landing-header p:last-child {
    margin: 0;
    color: var(--zn-member-text-secondary);
    font-weight: 650;
}

.workspace-owner-search {
    min-width: min(280px, 100%);
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-text-muted);
}

.workspace-owner-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--zn-member-text-primary);
    font: inherit;
}

.workspace-owner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 22px;
}

.workspace-owner-card {
    min-height: 150px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 12px;
    padding: 18px 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: 14px;
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-text-primary);
    text-align: center;
    text-decoration: none;
}

.workspace-owner-card:hover,
.workspace-owner-card:focus-visible {
    border-color: var(--zn-member-accent-border-muted);
    background: var(--zn-member-bg-surface-hover);
    outline: none;
}

.workspace-owner-card .workspace-row-icon {
    width: 96px;
    height: 76px;
    border: 0;
    background: transparent;
    color: #54c2f2;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.2));
}

.workspace-owner-card .workspace-row-icon-folder::before {
    top: 9px;
    left: 10px;
    width: 38px;
    height: 17px;
    border-radius: 8px 8px 2px 2px;
    background: linear-gradient(180deg, #7bd7ff, #47bcea);
    opacity: 1;
}

.workspace-owner-card .workspace-row-icon-folder::after {
    top: 20px;
    left: 3px;
    width: 90px;
    height: 54px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0 6px, transparent 7px),
        linear-gradient(180deg, #6ed4ff, #35acd9);
    border: 1px solid rgba(9, 87, 121, 0.18);
}

.workspace-owner-card strong {
    display: block;
    color: var(--zn-member-text-primary);
    font-size: 0.98rem;
    line-height: 1.15;
}

.workspace-finder-window {
    min-height: 620px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
}

.workspace-finder-toolbar {
    min-height: 50px;
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(360px, 1.4fr) minmax(180px, 0.8fr);
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-bottom: 1px solid var(--zn-member-border);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 88%, transparent);
}

.workspace-finder-nav,
.workspace-finder-toolbar-center {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.workspace-finder-toolbar-center {
    justify-content: center;
}

.workspace-finder-toolbar-button {
    appearance: none;
    display: inline-grid;
    min-height: 34px;
    place-items: center;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--zn-member-text-secondary);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.workspace-finder-nav .workspace-finder-toolbar-button {
    width: 36px;
    padding: 0;
}

.workspace-finder-nav-icon {
    width: 20px;
    height: 20px;
}

.workspace-finder-toolbar-button:hover,
.workspace-finder-toolbar-button:focus-visible,
.workspace-finder-share[open] > .workspace-finder-toolbar-button,
.workspace-finder-action-menu[open] > .workspace-finder-toolbar-button {
    background: var(--zn-member-bg-surface-hover);
    color: var(--zn-member-text-primary);
    outline: none;
}

.workspace-finder-toolbar-button:disabled {
    opacity: 0.58;
    cursor: default;
}

.workspace-finder-share,
.workspace-finder-action-menu {
    position: relative;
}

.workspace-finder-share > summary::-webkit-details-marker,
.workspace-finder-action-menu > summary::-webkit-details-marker {
    display: none;
}

.workspace-share-popover,
.workspace-finder-action-popover {
    position: absolute;
    z-index: 35;
    top: calc(100% + 8px);
    right: 0;
    width: min(680px, 78vw);
    max-height: min(620px, 72vh);
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--zn-member-border);
    border-radius: 14px;
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow-card);
}

.workspace-finder-action-popover {
    width: min(220px, 70vw);
    display: grid;
    gap: 6px;
    padding: 8px;
}

.workspace-finder-action-popover button {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--zn-member-text-primary);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.workspace-finder-action-popover button:hover,
.workspace-finder-action-popover button:focus-visible {
    background: var(--zn-member-bg-surface-hover);
    outline: none;
}

.workspace-finder-search {
    min-width: 0;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-text-muted);
}

.workspace-finder-search-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.workspace-finder-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--zn-member-text-primary);
    font: inherit;
    font-size: 0.9rem;
}

.workspace-finder-breadcrumbs {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--zn-member-border);
    border-radius: 0;
    background: transparent;
}

.workspace-explorer {
    border: 0;
    border-radius: 0;
    background: transparent;
    min-height: 420px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.workspace-finder-window .workspace-explorer-heading {
    display: none;
}

.workspace-explorer-heading {
    min-height: 64px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--zn-member-border);
}

.workspace-explorer-heading strong {
    display: block;
    color: var(--zn-member-text-primary);
    font-size: 1rem;
    line-height: 1.2;
}

.workspace-explorer-heading span {
    color: var(--zn-member-text-muted);
    font-size: 0.8rem;
    font-weight: 650;
    white-space: nowrap;
}

.workspace-explorer-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    align-content: start;
    gap: 26px 32px;
    padding: 28px;
}

.workspace-explorer-header {
    display: none;
}

.workspace-explorer-row {
    position: relative;
    min-width: 0;
    min-height: 154px;
    display: grid;
    grid-template-rows: minmax(92px, auto) auto;
    justify-items: center;
    align-content: start;
    gap: 10px;
    padding: 10px 8px 8px;
    border-radius: 8px;
}

.workspace-explorer-row:hover,
.workspace-explorer-row:focus-within {
    background: var(--zn-member-bg-surface-hover);
}

.workspace-explorer-row[data-workspace-draggable-item] {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.workspace-explorer-row[data-workspace-draggable-item] .workspace-explorer-name {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.workspace-explorer-row[data-workspace-draggable-item]:active {
    cursor: grabbing;
}

.workspace-explorer-row[data-workspace-draggable-item]:active .workspace-explorer-name {
    cursor: grabbing;
}

.workspace-explorer-row.is-dragging {
    opacity: 0.45;
}

.workspace-explorer-row.is-touch-dragging {
    transform: scale(0.98);
}

.workspace-drag-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    max-width: min(260px, 72vw);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--zn-member-accent-border);
    border-radius: 12px;
    background: var(--zn-member-bg-card);
    color: var(--zn-member-text-primary);
    box-shadow: var(--zn-member-shadow);
    pointer-events: none;
    opacity: 0.96;
}

.workspace-drag-ghost strong {
    max-width: 180px;
    overflow: hidden;
    font-size: 0.84rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-drag-ghost-icon {
    flex: 0 0 auto;
    color: var(--zn-member-accent-text);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.workspace-explorer-row.is-drop-target {
    background: var(--zn-member-accent-surface);
    box-shadow: inset 0 0 0 2px var(--zn-member-accent-border-muted);
}

.workspace-drop-capture {
    display: none;
}

.workspace-drag-active .workspace-drop-capture {
    position: absolute;
    inset: 0;
    z-index: 24;
    display: block;
    border-radius: inherit;
}

.workspace-explorer-name,
.workspace-file-open-button {
    width: 100%;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 10px;
    color: var(--zn-member-text-primary);
    text-decoration: none;
    text-align: center;
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.workspace-explorer-name .workspace-row-copy {
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 2px;
}

.workspace-explorer-name .workspace-row-copy strong {
    max-width: 100%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: var(--zn-member-text-primary);
    font-size: 0.96rem;
    font-weight: 750;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.workspace-explorer-name .workspace-row-copy small {
    display: none;
}

.workspace-explorer-cell {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.workspace-explorer .workspace-row-icon {
    width: 104px;
    height: 82px;
    flex-basis: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.workspace-explorer .workspace-row-icon-folder {
    color: #54c2f2;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.22));
}

.workspace-explorer .workspace-row-icon-folder::before {
    top: 10px;
    left: 11px;
    width: 40px;
    height: 18px;
    border-radius: 8px 8px 2px 2px;
    background: linear-gradient(180deg, #7bd7ff, #47bcea);
    opacity: 1;
}

.workspace-explorer .workspace-row-icon-folder::after {
    top: 21px;
    left: 4px;
    width: 96px;
    height: 58px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0 6px, transparent 7px),
        linear-gradient(180deg, #6ed4ff, #35acd9);
    border: 1px solid rgba(9, 87, 121, 0.18);
}

.workspace-explorer .workspace-row-icon-file {
    width: 72px;
    height: 92px;
    border-radius: 10px;
    background:
        linear-gradient(135deg, transparent 0 12px, rgba(0, 0, 0, 0.08) 13px 22px, transparent 23px),
        linear-gradient(180deg, #ffffff, #f0f3f6);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #4d5964;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
    position: relative;
}

.workspace-explorer .workspace-row-icon-file::before {
    content: "";
    position: absolute;
    inset: 18px 12px auto;
    height: 44px;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(42, 51, 60, 0.48) 0 1px,
            transparent 1px 5px
        );
    opacity: 0.7;
}

.workspace-explorer .workspace-row-icon-file span {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 8px;
    max-width: none;
    padding: 3px 4px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.78);
    color: inherit;
    font-size: 0.62rem;
}

.workspace-explorer .workspace-row-icon-pdf {
    color: #b34444;
}

.workspace-explorer-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.workspace-explorer-row:hover .workspace-explorer-actions,
.workspace-explorer-row:focus-within .workspace-explorer-actions {
    opacity: 1;
    pointer-events: auto;
}

.workspace-icon-danger-button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-danger-text);
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.workspace-icon-danger-button:hover {
    border-color: var(--zn-member-danger-border);
    background: var(--zn-member-danger-soft);
}

.workspace-icon-danger {
    width: 16px;
    height: 16px;
}

.workspace-menu-form {
    min-width: 0;
}

.workspace-subtabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-surface);
    align-self: flex-start;
}

.workspace-subtab {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: var(--user-radius-sm);
    color: var(--zn-member-text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.workspace-subtab:hover,
.workspace-subtab.is-active {
    color: var(--zn-member-accent-text);
    background: var(--zn-member-accent-surface);
}

.workspace-calendar-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.workspace-calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: stretch;
}

.workspace-calendar-main,
.workspace-calendar-upcoming,
.workspace-calendar-scheduler {
    min-width: 0;
}

.workspace-calendar-main {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 680px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
    overflow: hidden;
}

.workspace-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--zn-member-border);
}

.workspace-calendar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.workspace-calendar-title h2 {
    margin: 0;
    font-size: 1rem;
}

.workspace-calendar-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: var(--user-radius-sm);
    color: var(--zn-member-accent-text);
    background: var(--zn-member-accent-surface);
    border: 1px solid var(--zn-member-accent-border-muted);
}

.workspace-calendar-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.workspace-calendar-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.workspace-calendar-control,
.workspace-calendar-arrow,
.workspace-calendar-fullscreen-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.78rem;
    text-decoration: none;
}

.workspace-calendar-fullscreen-toggle {
    width: 34px;
    min-width: 34px;
    padding: 0;
}

.workspace-calendar-world-timer-toggle {
    width: 30px;
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #123d5f;
    background: transparent;
    cursor: pointer;
}

.workspace-calendar-world-timer-toggle:hover,
.workspace-calendar-world-timer-toggle:focus-visible,
.workspace-calendar-world-timer-toggle[aria-expanded="true"] {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 10px 26px rgba(14, 165, 233, 0.16);
}

.workspace-calendar-fullscreen-icon {
    width: 17px;
    height: 17px;
    display: block;
}

.workspace-calendar-world-timer-icon {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.workspace-calendar-arrow {
    width: 34px;
    padding: 0;
    font-size: 1.1rem;
}

.workspace-calendar-range,
.workspace-calendar-timezone,
.workspace-calendar-view-pill {
    color: var(--zn-member-text-secondary);
    font-size: 0.78rem;
    font-weight: 650;
    white-space: nowrap;
}

.workspace-calendar-view-pill {
    padding: 8px 10px;
    border: 1px solid var(--zn-member-accent-border-muted);
    border-radius: 999px;
    background: var(--zn-member-accent-surface);
    color: var(--zn-member-accent-text);
}

.workspace-calendar-timezone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--zn-member-text-muted);
}

.workspace-world-timer-drawer {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 24;
    width: min(340px, calc(100% - 24px));
    max-height: 100%;
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(18, 61, 95, 0.12);
    border-radius: var(--user-radius-md);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(18, 61, 95, 0.14);
    backdrop-filter: blur(18px);
    animation: workspace-world-timer-in 180ms ease-out;
}

.workspace-world-timer-drawer[hidden] {
    display: none;
}

.workspace-world-timer-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.workspace-world-timer-title-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.08);
}

.workspace-world-timer-title-icon img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.workspace-world-timer-header h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
}

.workspace-world-timer-header p,
.workspace-world-timer-info p,
.workspace-world-timer-footnote {
    margin: 0;
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.workspace-world-timer-close {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    color: var(--zn-member-text-muted);
    background: var(--zn-member-bg-card);
    cursor: pointer;
}

.workspace-world-timer-close:hover,
.workspace-world-timer-close:focus-visible {
    color: var(--zn-member-text);
    border-color: var(--zn-member-accent-border-muted);
    box-shadow: 0 8px 20px rgba(18, 61, 95, 0.12);
}

.workspace-world-timer-info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 18px 0;
    padding: 12px;
    border: 1px solid rgba(47, 125, 93, 0.12);
    border-radius: var(--user-radius-sm);
    background: rgba(47, 125, 93, 0.06);
}

.workspace-world-timer-info span {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(47, 125, 93, 0.72);
    border-radius: 999px;
    box-shadow: inset 6px 0 0 rgba(47, 125, 93, 0.2);
}

.workspace-world-timer-fields {
    display: grid;
    gap: 12px;
}

.workspace-world-timer-results {
    margin-top: 18px;
}

.workspace-world-timer-results h4 {
    margin: 0 0 10px;
    font-size: 0.82rem;
}

.workspace-world-timer-list {
    display: grid;
    gap: 9px;
}

.workspace-world-timer-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--zn-member-border-muted);
    border-radius: var(--user-radius-sm);
    background: rgba(255, 255, 255, 0.84);
}

.workspace-world-timer-row.is-reference {
    border-color: rgba(47, 125, 93, 0.48);
    box-shadow: 0 10px 26px rgba(47, 125, 93, 0.08);
}

.workspace-world-timer-flag {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.workspace-world-timer-flag-france {
    background: linear-gradient(90deg, #244f9f 0 33%, #fff 33% 66%, #e9414f 66% 100%);
}

.workspace-world-timer-flag-indonesia {
    background: linear-gradient(180deg, #ef3340 0 50%, #fff 50% 100%);
}

.workspace-world-timer-flag-portugal {
    background: linear-gradient(90deg, #079246 0 42%, #da1e37 42% 100%);
}

.workspace-world-timer-flag-uae {
    background: linear-gradient(90deg, #e31b23 0 25%, transparent 25% 100%), linear-gradient(180deg, #00843d 0 33%, #fff 33% 66%, #000 66% 100%);
}

.workspace-world-timer-flag-ireland {
    background: linear-gradient(90deg, #169b62 0 33%, #fff 33% 66%, #ff883e 66% 100%);
}

.workspace-world-timer-flag-usa {
    background: linear-gradient(180deg, #b22234 0 14%, #fff 14% 28%, #b22234 28% 42%, #fff 42% 56%, #b22234 56% 70%, #fff 70% 84%, #b22234 84% 100%);
    position: relative;
}

.workspace-world-timer-flag-usa::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 52%;
    height: 54%;
    border-radius: 999px 0 8px;
    background: #3c3b6e;
}

.workspace-world-timer-copy,
.workspace-world-timer-time {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.workspace-world-timer-copy strong,
.workspace-world-timer-time strong {
    font-size: 0.88rem;
    line-height: 1.1;
}

.workspace-world-timer-copy small {
    overflow: hidden;
    color: var(--zn-member-text-muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-world-timer-time {
    justify-items: end;
}

.workspace-world-timer-time strong {
    font-size: 1rem;
    font-weight: 750;
}

.workspace-world-timer-status {
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
}

.workspace-world-timer-status-working {
    color: #2f6f4f;
    background: rgba(47, 125, 93, 0.13);
}

.workspace-world-timer-status-early {
    color: #2563a8;
    background: rgba(37, 99, 168, 0.12);
}

.workspace-world-timer-status-late {
    color: #9a5a00;
    background: rgba(245, 158, 11, 0.16);
}

.workspace-world-timer-empty,
.workspace-world-timer-footnote {
    margin-top: 14px;
}

@keyframes workspace-world-timer-in {
    from {
        opacity: 0;
        transform: translateX(14px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.workspace-week-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, minmax(82px, 1fr));
    min-height: 420px;
    border-bottom: 1px solid var(--zn-member-border);
    background:
        linear-gradient(to bottom, transparent 49px, var(--zn-member-border-muted) 50px),
        linear-gradient(to right, transparent calc(100% - 1px), var(--zn-member-border-muted) calc(100% - 1px));
    background-size: 100% 50px, calc(100% / 7) 100%;
}

.workspace-week-day {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px;
    border-right: 1px solid var(--zn-member-border-muted);
}

.workspace-week-day:last-child {
    border-right: 0;
}

.workspace-week-day.is-today {
    background: color-mix(in srgb, var(--zn-member-accent-surface) 42%, transparent);
}

.workspace-week-day.is-selecting {
    background: color-mix(in srgb, var(--zn-member-accent-surface) 34%, transparent);
}

.workspace-week-day-heading {
    display: grid;
    gap: 2px;
    min-height: 36px;
    text-align: center;
}

.workspace-week-day-heading span {
    color: var(--zn-member-text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workspace-week-day-heading strong {
    color: var(--zn-member-text-primary);
    font-size: 0.82rem;
}

.workspace-week-slot {
    min-height: 38px;
    border: 1px dashed var(--zn-member-border-muted);
    border-radius: var(--user-radius-sm);
    background: rgba(255, 255, 255, 0.025);
    touch-action: none;
}

button.workspace-week-slot {
    width: 100%;
    cursor: crosshair;
    transition:
        background 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease;
}

button.workspace-week-slot:hover,
button.workspace-week-slot:focus-visible,
button.workspace-week-slot.is-selected {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-surface);
    box-shadow: inset 0 0 0 1px var(--zn-member-accent-border-muted);
    outline: none;
}

.workspace-week-slot-readonly {
    opacity: 0.48;
}

.workspace-calendar-day-events {
    position: relative;
    display: grid;
    grid-template-rows: repeat(96, minmax(12px, 1fr));
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.workspace-calendar-selection-preview {
    position: absolute;
    top: var(--selection-top);
    right: 4px;
    left: 4px;
    z-index: 3;
    min-height: 28px;
    height: var(--selection-height);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 5px 7px;
    border: 1px solid var(--zn-member-accent-border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--zn-member-accent-surface) 70%, transparent);
    color: var(--zn-member-accent-text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zn-member-accent-border) 38%, transparent);
    font-size: 0.68rem;
    font-weight: 850;
    pointer-events: none;
}

.workspace-calendar-event-block {
    position: relative;
    grid-row: var(--event-start) / span var(--event-span);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 2px 0;
    padding: 9px;
    border: 1px solid var(--zn-member-accent-border-muted);
    border-radius: var(--user-radius-sm);
    color: var(--zn-member-text-primary);
    background: var(--zn-member-accent-surface);
    font-size: 0.74rem;
    cursor: pointer;
    overflow: hidden;
    overflow-wrap: anywhere;
    outline: none;
}

.workspace-calendar-event-block:hover,
.workspace-calendar-event-block:focus-visible,
.workspace-calendar-event-block.is-selected {
    border-color: var(--zn-member-accent-border);
    box-shadow: var(--zn-shadow-soft);
}

.workspace-calendar-event-block::after {
    content: attr(data-calendar-tooltip);
    position: absolute;
    left: 8px;
    bottom: calc(100% + 8px);
    z-index: 20;
    width: max-content;
    max-width: min(280px, 72vw);
    padding: 8px 10px;
    border: 1px solid var(--zn-member-border);
    border-radius: 10px;
    background: var(--zn-member-bg-card);
    color: var(--zn-member-text-primary);
    box-shadow: var(--zn-shadow-soft);
    font-size: 0.74rem;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition:
        opacity 140ms ease,
        transform 140ms ease;
}

.workspace-calendar-event-block:hover::after,
.workspace-calendar-event-block:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.workspace-calendar-event-block strong {
    font-size: 0.78rem;
}

.workspace-calendar-event-block strong,
.workspace-calendar-event-block span,
.workspace-calendar-event-block small {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-calendar-event-block span,
.workspace-calendar-event-block small {
    color: var(--zn-member-text-secondary);
}

.workspace-calendar-event-block.is-compact .workspace-calendar-event-location,
.workspace-calendar-event-block.is-compact .workspace-calendar-event-participants,
.workspace-calendar-event-block.is-tight .workspace-calendar-event-participants {
    display: none;
}

.workspace-calendar-event-type {
    color: var(--zn-member-accent-text) !important;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.workspace-calendar-event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 5px 0 0;
}

.workspace-calendar-event-block.is-compact .workspace-calendar-event-actions,
.workspace-calendar-event-block.is-tight .workspace-calendar-event-actions {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 2;
    max-width: calc(100% - 10px);
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition:
        opacity 120ms ease,
        transform 120ms ease;
}

.workspace-calendar-event-block.is-compact:hover .workspace-calendar-event-actions,
.workspace-calendar-event-block.is-compact:focus-visible .workspace-calendar-event-actions,
.workspace-calendar-event-block.is-compact:focus-within .workspace-calendar-event-actions,
.workspace-calendar-event-block.is-tight:hover .workspace-calendar-event-actions,
.workspace-calendar-event-block.is-tight:focus-visible .workspace-calendar-event-actions,
.workspace-calendar-event-block.is-tight:focus-within .workspace-calendar-event-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.workspace-calendar-delete-form {
    display: flex;
    justify-content: flex-start;
    margin: 0;
}

.workspace-calendar-inline-button,
.workspace-calendar-delete-button {
    min-height: 26px;
    padding: 0 8px;
    border-radius: 8px;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.workspace-calendar-inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--zn-member-accent-border-muted);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 82%, transparent);
    color: var(--zn-member-accent-text);
    text-decoration: none;
}

.workspace-calendar-inline-button:hover,
.workspace-calendar-inline-button:focus-visible {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-surface);
    outline: none;
}

.workspace-calendar-delete-button {
    border: 1px solid var(--zn-danger-border);
    background: var(--zn-danger-soft);
    color: var(--zn-member-danger-text-soft);
}

.workspace-calendar-delete-button:hover,
.workspace-calendar-delete-button:focus-visible {
    background: var(--zn-danger-soft-strong);
    color: var(--zn-danger-text-strong);
    outline: none;
}

.workspace-calendar-event-actions .workspace-calendar-action-button {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}

.workspace-calendar-action-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.workspace-calendar-event-actions .workspace-calendar-action-join {
    border-color: color-mix(in srgb, var(--zn-success-text) 48%, transparent);
    background: color-mix(in srgb, var(--zn-success-soft) 88%, transparent);
    color: var(--zn-success-text);
}

.workspace-calendar-event-actions .workspace-calendar-action-join:hover,
.workspace-calendar-event-actions .workspace-calendar-action-join:focus-visible {
    border-color: var(--zn-success-text);
    background: color-mix(in srgb, var(--zn-success-soft) 72%, white);
    color: var(--zn-success-text);
}

.workspace-calendar-event-actions .workspace-calendar-action-edit {
    border-color: var(--zn-member-accent-border-muted);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 82%, transparent);
    color: var(--zn-member-accent-text);
}

.workspace-calendar-event-actions .workspace-calendar-action-edit:hover,
.workspace-calendar-event-actions .workspace-calendar-action-edit:focus-visible {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-surface);
}

.workspace-calendar-event-actions .workspace-calendar-action-delete {
    border-color: var(--zn-danger-border);
    background: var(--zn-danger-soft);
    color: var(--zn-member-danger-text-soft);
}

.workspace-calendar-event-actions .workspace-calendar-action-delete:hover,
.workspace-calendar-event-actions .workspace-calendar-action-delete:focus-visible {
    background: var(--zn-danger-soft-strong);
    color: var(--zn-danger-text-strong);
}

.workspace-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: grid;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(8, 12, 18, 0.58);
    backdrop-filter: blur(10px);
}

.workspace-confirm-overlay[hidden] {
    display: none;
}

body.workspace-confirm-open {
    overflow: hidden;
}

.workspace-confirm-dialog {
    width: min(430px, 100%);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.workspace-confirm-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid var(--zn-danger-border);
    background: var(--zn-danger-soft);
}

.workspace-confirm-icon::before,
.workspace-confirm-icon::after {
    content: "";
    grid-area: 1 / 1;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--zn-danger-text-strong);
}

.workspace-confirm-icon::before {
    transform: rotate(45deg);
}

.workspace-confirm-icon::after {
    transform: rotate(-45deg);
}

.workspace-confirm-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.workspace-confirm-copy h2,
.workspace-confirm-copy p {
    margin: 0;
}

.workspace-confirm-copy h2 {
    color: var(--zn-member-text-primary);
    font-size: 1rem;
    line-height: 1.25;
}

.workspace-confirm-copy p {
    color: var(--zn-member-text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
}

.workspace-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.workspace-confirm-cancel,
.workspace-confirm-primary {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    cursor: pointer;
}

.workspace-confirm-primary {
    border: 1px solid var(--zn-danger-border);
    background: var(--zn-danger-soft);
    color: var(--zn-danger-text-strong);
}

.workspace-confirm-primary:hover,
.workspace-confirm-primary:focus-visible {
    background: var(--zn-danger-soft-strong);
    outline: none;
}

.workspace-calendar-footer {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
}

.workspace-calendar-availability,
.workspace-calendar-sync {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.workspace-calendar-availability strong,
.workspace-calendar-sync strong {
    display: block;
    font-size: 0.84rem;
}

.workspace-calendar-availability p,
.workspace-calendar-sync p,
.workspace-calendar-action-shell p {
    margin: 2px 0 0;
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
}

.workspace-availability-dot,
.workspace-sync-dot {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 999px;
    background: var(--zn-member-success-text);
    opacity: 0.85;
}

.workspace-sync-dot {
    background: var(--zn-member-text-muted);
}

.workspace-calendar-settings {
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
    font-weight: 750;
    white-space: nowrap;
}

.workspace-calendar-upcoming,
.workspace-calendar-scheduler {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.workspace-calendar-panel {
    min-height: 0;
    overflow: hidden;
}

.workspace-calendar-upcoming .workspace-calendar-panel {
    height: auto;
}

.workspace-calendar-upcoming-heading {
    min-height: 48px;
}

.workspace-calendar-upcoming-heading-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.workspace-calendar-upcoming-toggle {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
}

.workspace-calendar-upcoming-toggle-icon {
    width: 16px;
    height: 16px;
    display: block;
    transition: transform 140ms ease;
}

.workspace-calendar-upcoming.is-expanded .workspace-calendar-upcoming-toggle-icon {
    transform: rotate(180deg);
}

.workspace-calendar-upcoming-content[hidden] {
    display: none;
}

.workspace-calendar-panel-empty {
    min-height: 240px;
    padding: 24px 18px;
}

.workspace-calendar-upcoming-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 14px;
}

.workspace-calendar-upcoming-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface);
}

.workspace-calendar-upcoming-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.workspace-calendar-upcoming-row span,
.workspace-calendar-upcoming-row small {
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
}

.workspace-calendar-upcoming-type {
    color: var(--zn-member-accent-text);
    font-weight: 800;
}

.workspace-calendar-join-button {
    align-self: flex-start;
    min-height: 30px;
    margin-top: 4px;
    padding: 0 10px;
    font-size: 0.74rem;
    text-decoration: none;
}

.workspace-calendar-form-panel {
    flex: 1;
}

.workspace-calendar-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 8px 12px 0;
}

.workspace-calendar-mode {
    min-height: 32px;
    border: 0;
    border-bottom: 2px solid var(--zn-member-border);
    background: transparent;
    color: var(--zn-member-text-muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

.workspace-calendar-mode.is-active {
    color: var(--zn-member-accent-text);
    border-color: var(--zn-member-accent-border);
}

.workspace-calendar-action-shell {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
}

.workspace-calendar-action-shell[hidden],
[data-calendar-mode-panel][hidden] {
    display: none;
}

.workspace-calendar-edit-shell {
    margin: 12px 16px 16px;
    padding: 14px;
    border: 1px solid var(--zn-member-accent-border-muted);
    border-radius: var(--user-radius-sm);
    background: color-mix(in srgb, var(--zn-member-accent-surface) 52%, transparent);
}

.workspace-calendar-edit-shell[hidden] {
    display: none;
}

.workspace-calendar-edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.workspace-calendar-edit-header > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.workspace-calendar-edit-header strong {
    color: var(--zn-member-text-primary);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.workspace-calendar-edit-header-actions {
    display: flex;
    align-items: flex-start;
    justify-items: end;
    align-content: start;
    justify-content: flex-end;
    gap: 6px;
    min-width: 30px;
    max-width: 100%;
}

.workspace-calendar-detail-action-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
}

.workspace-calendar-action-shell h3 {
    margin: 0;
    font-size: 0.92rem;
}

.workspace-calendar-form-panel .form-field {
    gap: 4px;
    font-size: 0.8rem;
}

.workspace-calendar-form-panel .form-input {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.2;
}

.workspace-calendar-form-panel textarea.form-input {
    min-height: 42px;
    resize: vertical;
}

.workspace-calendar-note-input {
    min-height: 86px;
    resize: vertical;
}

.workspace-calendar-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.workspace-calendar-participants {
    min-width: 0;
    max-height: 124px;
    min-height: 82px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
}

.workspace-calendar-participants legend {
    color: var(--zn-member-text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.workspace-calendar-participants label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zn-member-text-primary);
    font-size: 0.8rem;
}

.workspace-calendar-submit {
    width: 100%;
    flex: 0 0 auto;
}

body.user-body-workspace .workspace-calendar-guest-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--zn-member-success-text) 24%, var(--zn-member-border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--zn-success-soft) 42%, var(--zn-member-bg-surface));
}

body.user-body-workspace .workspace-calendar-guest-result-copy {
    min-width: 0;
    display: grid;
    grid-template-columns: 22px auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

body.user-body-workspace .workspace-calendar-guest-result-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: var(--zn-member-success-text);
}

body.user-body-workspace .workspace-calendar-guest-result-icon svg,
body.user-body-workspace .workspace-calendar-guest-copy-button svg,
body.user-body-workspace .workspace-calendar-meeting-guest-summary svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-workspace .workspace-calendar-guest-result-copy strong {
    color: var(--zn-member-success-text);
    font-size: 0.82rem;
    white-space: nowrap;
}

body.user-body-workspace .workspace-calendar-guest-result-copy span:last-child {
    min-width: 0;
    overflow: hidden;
    color: var(--zn-member-text-secondary);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.user-body-workspace .workspace-calendar-guest-copy-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 10px;
}

body.user-body-workspace .workspace-calendar-external-guest-panel,
body.user-body-workspace .workspace-calendar-meeting-guest-panel {
    width: 100%;
    display: block;
    flex: 0 0 auto;
    margin: 0 0 2px;
    padding: 0;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-surface);
    overflow: visible;
    box-sizing: border-box;
}

body.user-body-workspace .workspace-calendar-external-guest-panel[hidden],
body.user-body-workspace .workspace-calendar-meeting-guest-panel[hidden] {
    display: none !important;
}

body.user-body-workspace .workspace-calendar-external-guest-header,
body.user-body-workspace .workspace-calendar-meeting-guest-summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    list-style: none;
    color: var(--zn-member-text-primary);
    font-size: 0.84rem;
    font-weight: 750;
    cursor: pointer;
}

body.user-body-workspace .workspace-calendar-external-guest-header::-webkit-details-marker,
body.user-body-workspace .workspace-calendar-meeting-guest-summary::-webkit-details-marker {
    display: none;
}

body.user-body-workspace .workspace-calendar-external-guest-header::marker {
    content: "";
}

body.user-body-workspace .workspace-calendar-external-guest-header > span,
body.user-body-workspace .workspace-calendar-meeting-guest-summary > span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}

body.user-body-workspace .workspace-calendar-external-guest-body,
body.user-body-workspace .workspace-calendar-meeting-guest-body {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
}

body.user-body-workspace .workspace-calendar-external-guest-help {
    margin: -2px 0 2px;
    color: var(--zn-member-text-muted);
    font-size: 0.74rem;
    line-height: 1.35;
}

body.user-body-workspace .workspace-calendar-feed-card {
    display: grid;
    gap: 10px;
    margin: 12px;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--zn-member-bg-surface-muted) 52%, transparent);
}

body.user-body-workspace .workspace-calendar-feed-copy {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

body.user-body-workspace .workspace-calendar-feed-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--zn-member-accent-text);
    border: 1px solid var(--zn-member-accent-border-muted);
    border-radius: 10px;
    background: var(--zn-member-accent-surface);
}

body.user-body-workspace .workspace-calendar-feed-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-workspace .workspace-calendar-feed-copy strong {
    display: block;
    color: var(--zn-member-text-primary);
    font-size: 0.88rem;
}

body.user-body-workspace .workspace-calendar-feed-copy p,
body.user-body-workspace .workspace-calendar-feed-status {
    margin: 2px 0 0;
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

body.user-body-workspace .workspace-calendar-feed-copy-button {
    width: 100%;
    min-height: 36px;
    font-size: 0.78rem;
}

body.user-body-workspace .workspace-calendar-feed-status:empty {
    display: none;
}

body.user-body-workspace .workspace-calendar-feed-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 2px;
    color: var(--zn-member-text-muted);
    font-size: 0.74rem;
}

body.user-body-workspace .workspace-calendar-feed-meta strong {
    color: var(--zn-member-text-secondary);
}

body.user-body-workspace .workspace-calendar-feed-regenerate {
    justify-self: start;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--zn-member-accent-text);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

body.user-body-workspace .workspace-calendar-feed-card.is-collapsible {
    padding: 0;
    overflow: hidden;
}

body.user-body-workspace .workspace-calendar-feed-card.is-collapsible.is-collapsed {
    gap: 0;
}

body.user-body-workspace .workspace-calendar-feed-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 22px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

body.user-body-workspace .workspace-calendar-feed-card.is-collapsible.is-collapsed .workspace-calendar-feed-toggle {
    min-height: 46px;
    padding: 8px 12px;
}

body.user-body-workspace .workspace-calendar-feed-toggle .workspace-calendar-feed-icon {
    align-self: center;
}

body.user-body-workspace .workspace-calendar-feed-toggle-title {
    min-width: 0;
    color: var(--zn-member-text-primary);
    font-size: 0.88rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.user-body-workspace .workspace-calendar-feed-toggle-icon {
    color: var(--zn-member-text-muted);
    font-size: 1rem;
    font-weight: 900;
    transform: rotate(0deg);
    transition: transform 140ms ease;
}

body.user-body-workspace .workspace-calendar-feed-toggle[aria-expanded="true"] .workspace-calendar-feed-toggle-icon {
    transform: rotate(90deg);
}

body.user-body-workspace .workspace-calendar-feed-content {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

body.user-body-workspace .workspace-calendar-feed-content[hidden] {
    display: none;
}

body.user-body-workspace .workspace-calendar-feed-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.48);
}

body.user-body-workspace .workspace-calendar-feed-modal[hidden] {
    display: none;
}

body.user-body-workspace .workspace-calendar-feed-modal-panel {
    width: min(440px, 100%);
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--zn-member-border);
    border-radius: 16px;
    background: var(--zn-member-bg-surface);
    box-shadow: var(--zn-shadow, 0 18px 48px rgba(0, 0, 0, 0.32));
}

body.user-body-workspace .workspace-calendar-feed-modal-panel h3,
body.user-body-workspace .workspace-calendar-feed-modal-panel p {
    margin: 0;
}

body.user-body-workspace .workspace-calendar-feed-modal-panel p {
    color: var(--zn-member-text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
}

body.user-body-workspace .workspace-calendar-feed-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.workspace-calendar-schedule-result {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--zn-member-accent-border-muted);
    border-radius: var(--user-radius-sm);
    background: color-mix(in srgb, var(--zn-member-accent-surface) 52%, transparent);
}

.workspace-calendar-schedule-result span {
    color: var(--zn-member-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-calendar-schedule-result a {
    color: var(--zn-member-accent-text);
    font-size: 0.8rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.external-schedule-shell {
    min-height: 100vh;
}

.external-schedule-card {
    gap: 18px;
}

.external-schedule-details {
    margin-top: 0;
}

.external-schedule-description {
    margin: 12px 0 0;
    color: var(--zn-member-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.external-schedule-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.external-schedule-slots legend {
    margin-bottom: 8px;
    color: var(--zn-member-text-primary);
    font-size: 0.88rem;
    font-weight: 900;
}

.external-schedule-slot {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: color-mix(in srgb, var(--zn-member-surface) 84%, transparent);
    color: var(--zn-member-text-primary);
    cursor: pointer;
}

.external-schedule-slot:has(input:checked) {
    border-color: var(--zn-member-accent-border);
    background: color-mix(in srgb, var(--zn-member-accent-surface) 68%, transparent);
}

.external-schedule-slot span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.external-schedule-slot strong,
.external-schedule-slot small {
    overflow-wrap: anywhere;
}

.external-schedule-result {
    align-items: stretch;
}

.workspace-availability-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.workspace-availability-chips span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--zn-member-border);
    color: var(--zn-member-text-secondary);
    background: var(--zn-member-bg-surface);
    font-size: 0.72rem;
    font-weight: 750;
}

body.user-body-workspace:has(.workspace-calendar-shell) {
    overflow: hidden;
}

body.user-body-workspace:has(.workspace-calendar-shell) .user-shell {
    height: 100vh;
    min-height: 0;
}

body.user-body-workspace:has(.workspace-calendar-shell) .workspace-layout,
body.user-body-workspace:has(.workspace-calendar-shell) .workspace-browser,
.workspace-calendar-shell,
.workspace-calendar-layout {
    min-height: 0;
}

body.user-body-workspace:has(.workspace-calendar-shell) .workspace-layout {
    display: flex;
}

body.user-body-workspace:has(.workspace-calendar-shell) .workspace-browser {
    flex: 1;
}

body.user-body-workspace:has(.workspace-calendar-shell) .workspace-hub {
    overflow: auto;
    overscroll-behavior: contain;
}

.workspace-calendar-shell {
    flex: 1;
}

.workspace-calendar-shell.is-fullscreen {
    position: fixed;
    inset: 12px;
    z-index: 1000;
    padding: 0;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-surface);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.28);
}

.workspace-calendar-shell:fullscreen {
    width: 100vw;
    height: 100vh;
    padding: 12px;
    border: 0;
    border-radius: 0;
    background: var(--zn-member-bg-surface);
}

body.workspace-calendar-fullscreen-open {
    overflow: hidden;
}

.workspace-calendar-layout {
    flex: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    height: calc(100vh - 172px);
    max-height: none;
}

.workspace-calendar-shell.is-fullscreen .workspace-calendar-layout {
    height: calc(100vh - 26px);
    padding: 12px;
}

.workspace-calendar-shell:fullscreen .workspace-calendar-layout {
    height: calc(100vh - 24px);
    padding: 0;
}

.workspace-calendar-shell.is-fullscreen .workspace-calendar-main {
    min-height: 0;
}

.workspace-calendar-shell.is-fullscreen .workspace-calendar-upcoming .workspace-calendar-panel {
    max-height: 220px;
}

.workspace-calendar-shell.is-fullscreen .workspace-calendar-upcoming.is-collapsed .workspace-calendar-panel {
    max-height: 58px;
}

.workspace-calendar-main {
    min-height: 0;
}

.workspace-calendar-toolbar {
    flex: 0 0 auto;
}

.workspace-calendar-scroll {
    --calendar-row-height: 34px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    border-bottom: 1px solid var(--zn-member-border);
    overscroll-behavior: contain;
}

.workspace-week-grid {
    --calendar-day-count: 5;
    --calendar-grid-height: calc(46px + (48 * var(--calendar-row-height)));
    min-width: max(760px, calc(96px + (var(--calendar-day-count) * 150px)));
    height: var(--calendar-grid-height);
    min-height: var(--calendar-grid-height);
    display: grid;
    grid-template-columns: 70px repeat(var(--calendar-day-count), minmax(136px, 1fr));
    grid-template-rows: 46px repeat(48, var(--calendar-row-height));
    align-content: start;
    border-bottom: 0;
    background: transparent;
}

.workspace-calendar-sticky-corner,
.workspace-week-day-heading {
    position: sticky;
    top: 0;
    z-index: 12;
    min-height: 46px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 94%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--zn-member-border);
}

.workspace-calendar-sticky-corner {
    left: 0;
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zn-member-text-muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    border-right: 1px solid var(--zn-member-border);
}

.workspace-week-day-heading {
    display: grid;
    place-items: center;
    gap: 1px;
    padding: 7px 8px;
    text-align: center;
    border-right: 1px solid var(--zn-member-border-muted);
}

.workspace-week-day-heading.is-today {
    color: var(--zn-member-accent-text);
    background: color-mix(in srgb, var(--zn-member-accent-surface) 76%, var(--zn-member-bg-card));
}

.workspace-calendar-time-rows {
    position: sticky;
    left: 0;
    z-index: 9;
    grid-row: 2 / span 48;
    display: grid;
    grid-template-rows: repeat(48, var(--calendar-row-height));
    height: calc(48 * var(--calendar-row-height));
    background: color-mix(in srgb, var(--zn-member-bg-card) 94%, transparent);
    backdrop-filter: blur(14px);
    border-right: 1px solid var(--zn-member-border);
}

.workspace-calendar-time-rows span {
    display: flex;
    justify-content: center;
    padding-top: 4px;
    color: var(--zn-member-text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    border-bottom: 1px solid transparent;
}

.workspace-calendar-time-rows span.is-hour {
    border-bottom-color: var(--zn-member-border-muted);
}

.workspace-week-day {
    height: calc(48 * var(--calendar-row-height));
    min-height: calc(48 * var(--calendar-row-height));
    display: grid;
    grid-template-rows: repeat(48, var(--calendar-row-height));
    padding: 0;
    border-right: 1px solid var(--zn-member-border-muted);
}

.workspace-week-day.is-today {
    background: color-mix(in srgb, var(--zn-member-accent-surface) 28%, transparent);
}

.workspace-week-day.is-selecting {
    background: color-mix(in srgb, var(--zn-member-accent-surface) 36%, transparent);
}

.workspace-week-day.is-past {
    background: color-mix(in srgb, var(--zn-member-bg-surface-faint) 72%, transparent);
}

.workspace-week-day-heading.is-past {
    opacity: 0.58;
}

.workspace-week-slots,
.workspace-calendar-day-events {
    grid-column: 1;
    grid-row: 1 / span 48;
    display: grid;
    grid-template-rows: repeat(48, var(--calendar-row-height));
    height: calc(48 * var(--calendar-row-height));
    min-height: 0;
}

.workspace-week-slot {
    min-height: 0;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--zn-member-border-muted);
    border-radius: 0;
    background: transparent;
}

button.workspace-week-slot:hover,
button.workspace-week-slot:focus-visible,
button.workspace-week-slot.is-selected {
    background: color-mix(in srgb, var(--zn-member-accent-surface) 62%, transparent);
    box-shadow: inset 0 0 0 1px var(--zn-member-accent-border-muted);
}

.workspace-week-slot.is-past,
button.workspace-week-slot:disabled {
    background: color-mix(in srgb, var(--zn-member-border-muted) 64%, transparent);
    cursor: not-allowed;
    opacity: 0.62;
}

button.workspace-week-slot.is-past:hover,
button.workspace-week-slot.is-past:focus-visible,
button.workspace-week-slot:disabled:hover,
button.workspace-week-slot:disabled:focus-visible {
    background: color-mix(in srgb, var(--zn-member-border-muted) 64%, transparent);
    box-shadow: none;
}

.workspace-calendar-day-events {
    pointer-events: none;
    padding: 3px;
}

.workspace-calendar-selection-preview {
    right: 3px;
    left: 3px;
}

.workspace-calendar-event-block {
    grid-row: var(--event-start) / span var(--event-span);
    grid-column: 1;
    pointer-events: auto;
    z-index: 4;
    width: calc(var(--event-column-width, 100%) - 3px);
    margin-left: var(--event-column-left, 0%);
    box-sizing: border-box;
    min-height: 30px;
    padding: 6px 8px;
    gap: 1px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.workspace-calendar-event-block.is-selected {
    border-color: var(--zn-member-accent-border);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.12),
        inset 0 0 0 1px color-mix(in srgb, var(--zn-member-accent-border) 42%, transparent);
}

.workspace-calendar-event-block.is-compact,
.workspace-calendar-event-block.is-tight {
    justify-content: center;
    gap: 1px;
    padding: 4px 7px;
}

.workspace-calendar-event-block.is-compact .workspace-calendar-event-type,
.workspace-calendar-event-block.is-tight .workspace-calendar-event-type {
    display: none;
}

.workspace-calendar-event-block.is-compact strong,
.workspace-calendar-event-block.is-tight strong {
    font-size: 0.72rem;
    line-height: 1.08;
}

.workspace-calendar-event-block.is-compact .workspace-calendar-event-time,
.workspace-calendar-event-block.is-tight .workspace-calendar-event-time {
    display: block;
    font-size: 0.62rem;
    line-height: 1.05;
}

.workspace-calendar-event-block.is-compact .workspace-calendar-event-location,
.workspace-calendar-event-block.is-tight .workspace-calendar-event-location,
.workspace-calendar-event-block.is-compact .workspace-calendar-event-participants,
.workspace-calendar-event-block.is-tight .workspace-calendar-event-participants {
    display: none;
}

.workspace-calendar-event-meeting {
    border-color: var(--zn-member-accent-border);
    background: color-mix(in srgb, var(--zn-member-accent-surface) 82%, var(--zn-member-bg-card));
}

.workspace-calendar-event-internal_event,
.workspace-calendar-event-maintenance {
    background: color-mix(in srgb, var(--zn-member-bg-surface) 88%, var(--zn-member-accent-surface));
}

.workspace-calendar-event-block.is-past {
    border-color: var(--zn-member-border);
    background: color-mix(in srgb, var(--zn-member-bg-card) 76%, var(--zn-member-border-muted));
    color: var(--zn-member-text-secondary);
    filter: saturate(0.58);
    opacity: 0.78;
}

.workspace-calendar-event-block.is-past .workspace-calendar-event-type {
    color: var(--zn-member-text-muted) !important;
}

.workspace-calendar-event-block strong {
    font-size: 0.74rem;
    line-height: 1.15;
}

.workspace-calendar-event-block span,
.workspace-calendar-event-block small {
    font-size: 0.68rem;
    line-height: 1.2;
}

.workspace-calendar-event-actions {
    gap: 4px;
    margin-top: 4px;
}

.workspace-calendar-inline-button,
.workspace-calendar-delete-button {
    min-height: 22px;
    padding: 0 6px;
    font-size: 0.66rem;
}

.workspace-calendar-footer {
    flex: 0 0 auto;
    padding: 9px 12px;
}

.workspace-calendar-upcoming {
    min-height: 0;
    overflow: visible;
}

.workspace-calendar-form-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.workspace-calendar-upcoming .workspace-calendar-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 220px;
}

.workspace-calendar-upcoming.is-collapsed .workspace-calendar-panel {
    max-height: 58px;
}

.workspace-calendar-upcoming.is-expanded .workspace-calendar-panel {
    max-height: min(260px, 32vh);
}

.workspace-calendar-upcoming-list,
.workspace-calendar-form-panel > .workspace-calendar-action-shell,
.workspace-calendar-edit-shell {
    overflow: auto;
    overscroll-behavior: contain;
}

.workspace-calendar-upcoming-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    align-items: stretch;
    flex: 1;
    min-height: 0;
    max-height: 205px;
    padding: 10px;
}

.workspace-calendar-upcoming-row {
    min-width: 0;
    height: 100%;
    padding: 10px;
}

.workspace-calendar-upcoming .workspace-calendar-panel-empty {
    min-height: 110px;
    padding: 18px;
}

.workspace-calendar-form-panel > .workspace-calendar-action-shell {
    flex: 1;
    min-height: 0;
    padding: 10px;
}

.workspace-calendar-edit-shell {
    max-height: min(560px, 58vh);
}

.workspace-calendar-detail-panel {
    position: absolute;
    top: 64px;
    right: 14px;
    bottom: 14px;
    z-index: 36;
    width: min(430px, calc(100% - 28px));
    max-height: none;
    margin: 0;
    padding: 16px;
    border-color: var(--zn-member-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 96%, white);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
    overflow: auto;
    overscroll-behavior: contain;
}

.workspace-calendar-detail-panel[hidden] {
    display: none;
}

.workspace-calendar-detail-panel.is-readonly .workspace-calendar-submit {
    display: none;
}

.workspace-calendar-detail-panel .form-field {
    gap: 5px;
    font-size: 0.8rem;
}

.workspace-calendar-detail-panel .form-input {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.25;
}

.workspace-calendar-detail-panel .workspace-calendar-note-input {
    min-height: 128px;
}

.workspace-calendar-detail-panel .workspace-calendar-participants {
    max-height: 150px;
}

.workspace-calendar-detail-join-button {
    width: 100%;
    max-width: none;
    min-height: 32px;
    padding: 0 8px;
    border-color: color-mix(in srgb, var(--zn-member-success-text) 42%, var(--zn-member-border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--zn-success-soft) 72%, var(--zn-member-bg-card));
    color: var(--zn-member-success-text);
    font-size: 0.76rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.workspace-calendar-detail-join-button.is-disabled {
    border-color: color-mix(in srgb, var(--zn-member-border) 82%, transparent);
    background: color-mix(in srgb, var(--zn-member-bg-surface) 72%, var(--zn-member-bg-card));
    color: var(--zn-member-text-muted);
    cursor: not-allowed;
    pointer-events: none;
}

.workspace-calendar-detail-close-button {
    width: 26px;
    min-width: 26px;
    height: 26px;
    min-height: 26px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--zn-member-danger-text) 36%, var(--zn-member-border));
    border-radius: 50%;
    background: color-mix(in srgb, var(--zn-danger-soft) 70%, var(--zn-member-bg-card));
    color: var(--zn-member-danger-text);
    font: inherit;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.workspace-calendar-detail-decline-button,
.workspace-calendar-detail-delete-button {
    width: 100%;
    max-width: none;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--zn-member-border);
    border-radius: 10px;
    background: var(--zn-member-bg-card);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 820;
    white-space: nowrap;
    cursor: pointer;
}

.workspace-calendar-detail-decline-button {
    border-color: color-mix(in srgb, #d97706 36%, var(--zn-member-border));
    background: color-mix(in srgb, #f59e0b 12%, var(--zn-member-bg-card));
    color: #b45309;
}

.workspace-calendar-detail-decline-button[hidden] {
    display: none;
}

.workspace-calendar-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.workspace-calendar-detail-delete-button {
    border-color: color-mix(in srgb, var(--zn-member-danger-text) 34%, var(--zn-member-border));
    background: color-mix(in srgb, var(--zn-danger-soft) 58%, var(--zn-member-bg-card));
    color: var(--zn-member-danger-text);
    font-weight: 800;
}

.workspace-calendar-detail-delete-button[hidden] {
    display: none;
}

.workspace-calendar-left-workflow {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
}

.workspace-calendar-left-workflow .workspace-section-heading {
    padding: 12px 12px 0;
}

.workspace-calendar-view-pill {
    text-decoration: none;
}

.workspace-calendar-view-pill.is-active {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-surface);
    color: var(--zn-member-accent-text);
}

@media (max-width: 980px) {
    body.user-body-workspace:has(.workspace-calendar-shell) {
        overflow: auto;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .user-shell {
        height: auto;
        min-height: 100vh;
    }

    .workspace-calendar-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
        max-height: none;
    }

    .workspace-calendar-main {
        height: min(74vh, 760px);
    }

    .workspace-calendar-scroll {
        max-height: none;
    }

    .workspace-week-grid {
        min-width: max(720px, calc(70px + (var(--calendar-day-count) * 128px)));
        grid-template-columns: 60px repeat(var(--calendar-day-count), minmax(118px, 1fr));
    }

    .workspace-calendar-event-block[data-calendar-overlap-density="dense"] {
        width: calc(100% - (var(--event-overlap-stack-offset, 0) * 10px) - 4px);
        margin-left: calc(var(--event-overlap-stack-offset, 0) * 10px);
        transform: translateY(calc(var(--event-overlap-stack-offset, 0) * 3px));
        z-index: calc(8 + var(--event-overlap-stack-order, 0));
    }

    .workspace-calendar-event-block[data-calendar-overlap-density="dense"] .workspace-calendar-event-actions {
        flex-wrap: wrap;
    }

    .workspace-calendar-form-panel {
        max-height: 70vh;
    }

    .workspace-calendar-upcoming .workspace-calendar-panel {
        max-height: none;
    }
}

@media (max-width: 760px) {
    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-browser {
        padding-top: 0;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-left-workflow {
        width: auto;
        max-width: none;
        margin: 12px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
        box-sizing: border-box;
        max-height: calc(100dvh - 116px);
        overflow: hidden;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-form-panel {
        height: auto;
        max-height: calc(100dvh - 116px);
        min-height: 0;
        overflow: hidden;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-form-panel > .workspace-calendar-action-shell,
    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-edit-shell {
        flex: 1 1 auto;
        max-height: calc(100dvh - 168px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-participants {
        max-height: 168px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-layout {
        height: auto;
        grid-template-rows: auto;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-main {
        display: none;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-upcoming {
        width: 100%;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-upcoming .workspace-calendar-panel {
        max-height: none;
    }

    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-calendar-upcoming-list {
        grid-template-columns: minmax(0, 1fr);
        max-height: none;
    }
}

@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%;
    }

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

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

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

    body.user-body-workspace .topbar-controls {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

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

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

    .workspace-calendar-main {
        min-height: auto;
    }

    .workspace-calendar-toolbar,
    .workspace-calendar-footer {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .workspace-calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace-calendar-controls {
        justify-content: flex-start;
    }

    .workspace-week-grid {
        overflow-x: auto;
        grid-template-columns: repeat(7, minmax(120px, 1fr));
    }

    .workspace-action-bar {
        grid-template-columns: 1fr;
    }

    .workspace-create-folder-form,
    .workspace-upload-dropzone {
        align-items: stretch;
    }

    .workspace-create-folder-form {
        flex-direction: column;
    }

    .workspace-upload-dropzone {
        grid-template-columns: 1fr;
    }

    .workspace-project-controls,
    .workspace-upload-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace-file-actions {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .workspace-item-actions {
        grid-template-columns: 1fr;
        padding-left: 0;
    }

    .workspace-inline-form {
        align-items: stretch;
        flex-direction: column;
    }
}

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

    .screen-share-viewer-modal {
        padding: 12px;
    }

    .screen-share-viewer-shell {
        max-height: calc(100vh - 24px);
        padding: 14px;
        border-radius: 18px;
    }

    .screen-share-viewer-header {
        flex-direction: column;
        align-items: stretch;
    }

    .screen-share-viewer-body {
        min-height: 48vh;
    }

    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-keyboard-open="true"],
    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging,
    html[data-device-platform="ios"][data-ios-composer-focus="true"],
    html[data-device-platform="ios"][data-ios-composer-focus="true"] body.user-body-messaging {
        overflow: hidden;
        overscroll-behavior: none;
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging.znode-surface-stage,
    html[data-device-platform="ios"][data-ios-composer-focus="true"] body.user-body-messaging.znode-surface-stage {
        perspective: none !important;
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .znode-surface-shell,
    html[data-device-platform="ios"][data-ios-composer-focus="true"] body.user-body-messaging .znode-surface-shell {
        transform: none !important;
        transform-style: flat !important;
        -webkit-transform-style: flat !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
        will-change: auto !important;
        transition: none !important;
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .znode-surface-shell::before,
    html[data-device-platform="ios"][data-ios-composer-focus="true"] body.user-body-messaging .znode-surface-shell::before {
        display: none !important;
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile),
    html[data-device-platform="ios"][data-ios-composer-focus="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);
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-card {
        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-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .chat-header {
        grid-row: 1;
    }

    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 .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 42px;
        gap: 10px;
    }

    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: max(16px, env(safe-area-inset-right));
    }

    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: 1000;
        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(--zn-member-bg-card);
    }

    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: var(--zn-member-bg-card);
        border-bottom: 1px solid var(--zn-member-border);
    }

    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 {
        font-size: 0.96rem;
        line-height: 1.2;
        white-space: nowrap;
        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-button {
        min-height: 34px;
        height: 34px;
        padding: 0 9px 0 10px;
        font-size: 0.72rem;
    }

    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);
    }

    body.user-body-messaging .chat-more-popover .chat-files-popover {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        max-height: min(46vh, 360px);
    }

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

    body.user-body-messaging .chat-files-item {
        flex-wrap: wrap;
        gap: 8px;
        align-items: flex-start;
    }

    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 {
        padding:
            calc(14px + env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            calc(18px + env(safe-area-inset-bottom));
        padding-left: max(16px, env(safe-area-inset-left));
        gap: 20px;
    }

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

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

    body.user-body-messaging .call-screen-notice {
        bottom: calc(166px + env(safe-area-inset-bottom));
        width: min(calc(100vw - 32px), 360px);
    }

    body.user-body-messaging .call-screen-brand {
        display: none;
    }

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

    body.user-body-messaging .call-screen-avatar {
        width: 138px;
        height: 138px;
        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-title {
        font-size: 2.2rem;
    }

    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 {
        left: max(16px, env(safe-area-inset-left));
        right: max(16px, env(safe-area-inset-right));
        bottom: calc(42px + env(safe-area-inset-bottom));
        gap: 14px;
    }

    body.user-body-messaging .call-screen-secondary-actions {
        width: 100%;
        gap: 10px;
    }

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

    body.user-body-messaging .call-screen-controls {
        width: min(100%, 320px);
        gap: 16px;
    }

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

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

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

    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="active"] .call-screen-controls {
        width: min(100%, 340px);
    }

    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(--composer-height) + var(--safe-bottom) + var(--znode-keyboard-clearance) + 18px)
            max(12px, env(safe-area-inset-left));
        gap: 10px;
        background: var(--zn-member-bg-pane);
        overflow-x: hidden;
        overscroll-behavior: contain;
        scroll-padding-bottom: calc(var(--composer-height) + var(--safe-bottom) + var(--znode-keyboard-clearance) + 18px);
    }

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .message-timeline,
    html[data-device-platform="ios"][data-ios-composer-focus="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .message-timeline {
        grid-row: 2;
        min-height: 0;
        overflow: auto;
        background: var(--zn-member-bg-pane);
        padding:
            14px
            max(12px, env(safe-area-inset-right))
            calc(var(--znode-composer-height) + 10px)
            max(12px, env(safe-area-inset-left));
        scroll-padding-bottom: calc(var(--znode-composer-height) + 10px);
    }

    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 12px 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-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: min(100%, calc(100vw - 46px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    }

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

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

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

    body.user-body-messaging .image-message-preview {
        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-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;
        min-height: var(--composer-height);
        width: 100%;
        padding:
            8px
            max(18px, env(safe-area-inset-right))
            8px
            max(18px, env(safe-area-inset-left));
        border-top: 0;
        background: transparent;
        backdrop-filter: none;
        flex-direction: row;
        align-items: flex-end;
        gap: 8px;
    }

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

    html[data-device-platform="ios"][data-keyboard-open="true"] body.user-body-messaging .chat-pane:not(.is-hidden-mobile) .composer {
        position: fixed;
        top: max(0px, calc(var(--znode-vv-top, 0px) + var(--znode-vv-height, var(--znode-visual-vh, 100dvh)) - var(--znode-composer-height, var(--composer-height))));
        right: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        background: transparent;
        box-shadow: none;
        z-index: 1120;
        padding-bottom: 8px;
    }

    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-tools .icon-button {
        width: 44px;
        height: 44px;
        border-radius: 999px;
    }

    body.user-body-messaging .composer-input {
        min-height: 46px;
        max-height: 120px;
        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 .voice-record-indicator {
        right: 54px;
        max-width: calc(100% - 118px);
        font-size: 0.72rem;
    }

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

    body.user-body-workspace .user-shell {
        padding: 0;
        gap: 0;
    }

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

    body.user-body-workspace .topbar-controls {
        justify-content: space-between;
        gap: 8px;
    }

    body.user-body-workspace .topbar-user-card {
        display: none;
    }

    body.user-body-workspace .workspace-layout {
        margin: 0;
    }

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

    body.user-body-workspace .workspace-browser {
        padding: 12px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
    }

    body.user-body-workspace .user-kicker {
        display: none;
    }

    body.user-body-workspace .topbar-title-mark {
        margin-top: 0;
    }

    body.user-body-workspace .topbar-title h1 {
        font-size: 1.08rem;
    }

    body.user-body-workspace .user-app-nav {
        gap: 6px;
    }

    body.user-body-workspace .user-app-nav-link {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    body.user-body-workspace .workspace-header-copy h2 {
        font-size: 1.08rem;
    }

    body.user-body-workspace .workspace-breadcrumbs,
    body.user-body-workspace .workspace-section,
    body.user-body-workspace .workspace-upload-form,
    body.user-body-workspace .workspace-calendar-main,
    body.user-body-workspace .workspace-subtabs {
        border-radius: 18px;
    }

    body.user-body-workspace .workspace-subtabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    body.user-body-workspace .workspace-calendar-controls {
        gap: 6px;
    }

    body.user-body-workspace .workspace-calendar-timezone,
    body.user-body-workspace .workspace-calendar-range {
        white-space: normal;
    }

    body.user-body-workspace .workspace-world-timer-drawer {
        position: fixed;
        inset: auto 12px 12px 12px;
        width: auto;
        max-height: min(78vh, 680px);
        border-radius: 20px;
        z-index: 1100;
    }

    body.user-body-workspace .workspace-world-timer-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    body.user-body-workspace .workspace-world-timer-time {
        grid-column: 2;
        justify-items: start;
    }

    body.user-body-workspace .workspace-calendar-form-row {
        grid-template-columns: 1fr;
    }

    body.user-body-workspace .workspace-row {
        align-items: flex-start;
        flex-direction: column;
    }

    body.user-body-workspace .workspace-file-actions {
        width: 100%;
    }

    body.user-body-workspace .workspace-preview-button,
    body.user-body-workspace .workspace-download-button {
        width: 100%;
        text-align: center;
    }
}

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

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

    body.user-body-messaging .call-screen-avatar {
        width: 112px;
        height: 112px;
        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-title {
        font-size: 1.72rem;
    }

    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-face {
        width: 60px;
        height: 60px;
    }

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

@media (max-width: 640px) {
    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: auto;
    }
}

@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 {
        padding: 16px 20px;
    }

    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: 10px;
        background: var(--zn-member-bg-pane);
    }

    body.user-body-messaging .message-bubble {
        max-width: min(56%, 640px);
        border-radius: 16px;
        padding: 10px 13px;
        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;
        padding: 14px 20px 18px;
        background: var(--zn-member-bg-card);
    }

    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-input {
        min-height: 52px;
        max-height: 118px;
        padding: 14px 62px 14px 16px;
        border-radius: 16px;
        line-height: 1.35;
    }

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

/* Final call surface overrides: audio, video and screen-share are separate visual modes. */
.call-screen {
    z-index: 1200;
}

.screen-share-viewer-modal {
    z-index: 1300;
}

.call-screen-backdrop {
    background: linear-gradient(160deg, var(--zn-member-bg-shell), var(--zn-member-bg-app) 58%, var(--zn-member-bg-pane));
    backdrop-filter: blur(20px);
}

.call-screen-shell {
    gap: 0;
    padding: calc(18px + env(safe-area-inset-top)) clamp(18px, 3vw, 34px) calc(22px + env(safe-area-inset-bottom));
}

.call-screen-topbar {
    position: absolute;
    z-index: 5;
    top: calc(18px + env(safe-area-inset-top));
    left: clamp(18px, 3vw, 34px);
    right: clamp(18px, 3vw, 34px);
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.call-screen-chip {
    grid-column: 2;
    min-width: 92px;
    justify-content: center;
    min-height: 38px;
    padding: 8px 18px;
    border-color: var(--zn-member-border-soft);
    background: var(--zn-member-bg-card);
    color: var(--zn-member-text-primary);
    font-size: 0.86rem;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: var(--zn-member-shadow);
    pointer-events: auto;
}

.call-screen-brand {
    display: none;
}

.call-screen-secondary-actions {
    grid-column: 3;
    justify-self: end;
    width: auto;
    min-height: 0;
    gap: 8px;
    pointer-events: auto;
}

.call-secondary-action {
    min-width: 0;
    min-height: 38px;
    padding: 8px 14px;
    border-color: var(--zn-member-border-soft);
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    backdrop-filter: blur(18px);
}

.call-screen[data-call-experience-mode="screen-share"] .call-secondary-action[data-call-screen-share] {
    border-color: var(--zn-danger-border);
    background: var(--zn-danger-surface-hover);
    color: var(--zn-danger-text-strong);
}

.call-screen-body {
    width: 100%;
    min-height: 100vh;
    padding: calc(78px + env(safe-area-inset-top)) 0 calc(132px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
}

.call-screen-identity {
    width: min(100%, 520px);
    gap: 18px;
}

.call-screen-avatar {
    width: clamp(132px, 17vw, 184px);
    height: clamp(132px, 17vw, 184px);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    box-shadow: 0 0 0 12px var(--zn-member-bg-surface-lift), 0 0 0 26px var(--zn-member-bg-surface-faint), var(--zn-member-shadow);
}

.call-screen-title {
    font-size: clamp(2.2rem, 4.8vw, 4.4rem);
    line-height: 0.98;
}

.call-screen[data-call-experience-mode="video"] .call-screen-identity,
.call-screen[data-call-experience-mode="screen-share"] .call-screen-identity,
.call-screen[data-call-experience-mode="video"] .call-screen-status,
.call-screen[data-call-experience-mode="screen-share"] .call-screen-status,
.call-screen[data-call-experience-mode="video"] .call-screen-local-muted,
.call-screen[data-call-experience-mode="screen-share"] .call-screen-local-muted,
.call-screen[data-call-experience-mode="video"] .call-screen-subtitle,
.call-screen[data-call-experience-mode="screen-share"] .call-screen-subtitle {
    display: none !important;
}

.call-screen[data-call-experience-mode="video"] .call-screen-body,
.call-screen[data-call-experience-mode="screen-share"] .call-screen-body {
    padding: 0;
    justify-content: stretch;
}

.call-screen[data-call-experience-mode="video"] .call-video-stage,
.call-screen[data-call-experience-mode="screen-share"] .call-video-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    margin: 0;
}

.call-screen[data-call-experience-mode="video"] .call-video-grid,
.call-screen[data-call-experience-mode="screen-share"] .call-video-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

.call-screen[data-call-experience-mode="video"] .call-video-tile,
.call-screen[data-call-experience-mode="screen-share"] .call-video-tile {
    position: absolute;
    inset: 0;
    min-height: 0;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--zn-member-bg-pane);
}

.call-screen[data-call-experience-mode="video"] .call-video-stage[data-has-remote-video="true"] .call-video-tile-local,
.call-screen[data-call-experience-mode="screen-share"] .call-video-stage[data-has-remote-video="true"] .call-video-tile-local {
    inset: auto clamp(18px, 3vw, 34px) calc(132px + env(safe-area-inset-bottom)) auto;
    z-index: 3;
    width: min(22vw, 220px);
    min-width: 148px;
    aspect-ratio: 9 / 16;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--zn-member-shadow);
}

.call-screen[data-call-experience-mode="screen-share"] .call-video-stage[data-has-remote-video="true"] .call-video-tile-local {
    width: min(18vw, 180px);
    min-width: 128px;
}

.call-screen[data-call-experience-mode="video"] .call-video-stage[data-has-remote-video="false"] .call-video-tile-local,
.call-screen[data-call-experience-mode="screen-share"] .call-video-stage[data-has-remote-video="false"] .call-video-tile-local {
    inset: 0;
    width: auto;
    min-width: 0;
    border: 0;
    border-radius: 0;
}

.call-screen[data-call-experience-mode="video"] .call-video-remotes .call-video-tile,
.call-screen[data-call-experience-mode="screen-share"] .call-video-remotes .call-video-tile {
    z-index: 2;
}

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

.call-screen[data-call-experience-mode="video"] .call-video-tile-local .call-video-label,
.call-screen[data-call-experience-mode="screen-share"] .call-video-tile-local .call-video-label {
    left: 10px;
    bottom: 10px;
}

.call-screen-footer {
    z-index: 5;
    bottom: calc(18px + env(safe-area-inset-bottom));
    gap: 0;
}

.call-screen-controls {
    width: min(100%, 440px);
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 999px;
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    backdrop-filter: blur(22px);
}

.call-control-button {
    min-width: 74px;
    gap: 7px;
}

.call-control-button-face {
    width: 58px;
    height: 58px;
}

.call-control-button svg {
    width: 24px;
    height: 24px;
}

.call-control-button-label {
    font-size: 0.72rem;
    line-height: 1.12;
}

.call-screen[data-call-experience-mode="audio"] [data-call-mute] {
    order: 1;
}

.call-screen[data-call-experience-mode="audio"] [data-call-speaker] {
    order: 2;
}

.call-screen[data-call-experience-mode="audio"] [data-call-video] {
    order: 3;
}

.call-screen[data-call-experience-mode="video"] [data-call-mute],
.call-screen[data-call-experience-mode="screen-share"] [data-call-mute] {
    order: 1;
}

.call-screen[data-call-experience-mode="video"] [data-call-video],
.call-screen[data-call-experience-mode="screen-share"] [data-call-video] {
    order: 2;
}

.call-screen[data-call-experience-mode="video"] [data-call-speaker],
.call-screen[data-call-experience-mode="screen-share"] [data-call-speaker] {
    order: 3;
}

.call-screen [data-call-hangup],
.call-screen [data-call-decline] {
    order: 4;
}

.call-screen [data-call-accept] {
    order: 3;
}

@media (max-width: 760px) {
    body.user-body-messaging .call-screen-shell {
        padding: calc(14px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom));
        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: 1fr auto 1fr;
    }

    body.user-body-messaging .call-secondary-action {
        min-height: 38px;
        padding: 7px 11px;
        font-size: 0.78rem;
    }

    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-screen-footer {
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(14px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging .call-screen-controls {
        width: min(100%, 390px);
        gap: 8px;
        padding: 8px;
    }

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

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

    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;
    }

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

.call-screen[data-call-experience-mode="video"] .call-video-stage[data-remote-video-count]:not([data-remote-video-count="0"]):not([data-remote-video-count="1"]) .call-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    padding: calc(74px + env(safe-area-inset-top)) clamp(12px, 2vw, 24px) calc(124px + env(safe-area-inset-bottom));
}

.call-screen[data-call-experience-mode="video"] .call-video-stage[data-remote-video-count]:not([data-remote-video-count="0"]):not([data-remote-video-count="1"]) .call-video-remotes .call-video-tile {
    position: relative;
    inset: auto;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
}

/* Last-pass mobile call polish. Keep this block last so legacy call CSS cannot reintroduce labels or overlaps. */
.call-screen {
    --voice-pulse-scale: 1;
    --voice-pulse-alpha: 0.08;
    --voice-pulse-spread: 18px;
}

.call-screen.is-minimized {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.call-soft-surface {
    position: fixed;
    inset: 0;
    z-index: 1150;
    overflow: auto;
    background: var(--zn-member-bg-app);
    color: var(--zn-member-text-primary);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.call-soft-surface > .user-shell,
.call-soft-surface > .app-shell {
    min-height: 100dvh;
}

body.user-body-call-soft-surface .call-soft-surface > .user-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding:
        max(14px, env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        max(14px, var(--safe-bottom))
        max(14px, env(safe-area-inset-left));
    gap: 10px;
}

body.user-body-call-soft-surface {
    overflow: hidden;
}

body.user-body-call-soft-surface > .user-shell {
    pointer-events: none;
}

body.user-body-call-soft-surface .call-soft-surface,
body.user-body-call-soft-surface .active-call-return,
body.user-body-call-soft-surface .call-screen,
body.user-body-call-soft-surface .screen-share-viewer-modal {
    pointer-events: auto;
}

.call-screen-icon-button,
.active-call-return-icon,
.active-call-return-end {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 50%;
    background: var(--zn-member-bg-card);
    color: var(--zn-member-text-primary);
    box-shadow: var(--zn-member-shadow);
    cursor: pointer;
    pointer-events: auto;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

.call-screen-icon-button {
    grid-column: 1;
    justify-self: start;
}

.call-screen-icon-button:hover,
.active-call-return-main:hover .active-call-return-icon,
.active-call-return-end:hover {
    transform: translateY(-1px);
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-bg-surface-lift);
}

.call-screen-icon-button svg,
.active-call-return-icon svg,
.active-call-return-end svg {
    width: 21px;
    height: 21px;
}

.active-call-return {
    position: fixed;
    z-index: 1180;
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(24px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(330px, calc(100vw - 28px));
    padding: 8px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 92%, transparent);
    color: var(--zn-member-text-primary);
    box-shadow: var(--zn-member-shadow);
    pointer-events: auto;
    backdrop-filter: blur(18px);
    touch-action: none;
    user-select: none;
}

.active-call-return.is-dragging {
    cursor: grabbing;
    transition: none;
}

.active-call-return-main {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: none;
}

.active-call-return-icon {
    background: var(--zn-member-accent-border-strong);
    color: var(--zn-member-primary-text);
}

.active-call-return-copy {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.active-call-return-copy strong,
.active-call-return-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-call-return-copy strong {
    font-size: 0.9rem;
    font-weight: 800;
}

.active-call-return-copy span {
    color: var(--zn-member-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.active-call-return-end {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-color: color-mix(in srgb, var(--zn-danger, #e5484d) 45%, transparent);
    background: color-mix(in srgb, var(--zn-danger, #e5484d) 88%, #111 12%);
    color: #fff;
}

.active-call-return[hidden],
.active-call-return.is-hidden {
    display: none !important;
}

body.user-body-call-minimized .composer,
.messaging-layout.is-call-minimized .composer,
.messaging-layout.is-call-minimized:has(.call-screen:not(.is-hidden)) .composer {
    display: grid !important;
    pointer-events: auto;
}

body.user-body-call-minimized .message-timeline,
.messaging-layout.is-call-minimized .message-timeline {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

.call-screen--audio .call-screen-backdrop {
    background:
        radial-gradient(circle at 28% 18%, var(--zn-member-accent-surface-strong), transparent 34%),
        radial-gradient(circle at 78% 24%, var(--zn-success-soft), transparent 30%),
        linear-gradient(180deg, var(--zn-member-bg-shell) 0%, var(--zn-member-bg-app) 68%, var(--zn-member-bg-pane) 100%);
}

.call-screen-shell {
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.call-screen--audio .call-screen-body {
    min-height: 100vh;
    padding:
        calc(68px + env(safe-area-inset-top))
        max(20px, env(safe-area-inset-left))
        calc(128px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
}

.call-screen--audio .call-screen-identity {
    width: min(100%, 440px);
    gap: 18px;
}

.call-screen-avatar {
    position: relative;
    overflow: visible;
    transform: scale(var(--voice-pulse-scale));
    transition:
        transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    letter-spacing: 0;
    isolation: isolate;
}

.call-screen-avatar::before {
    content: "";
    position: absolute;
    inset: calc(var(--voice-pulse-spread) * -1);
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--zn-member-accent-surface-strong), transparent 68%);
    opacity: var(--voice-pulse-alpha);
    transform: scale(var(--voice-pulse-scale));
    transition:
        opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

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

.call-screen--audio .call-screen-title {
    font-size: 3rem;
    line-height: 1.02;
    letter-spacing: 0;
}

.call-screen--audio .call-screen-status {
    margin: -4px 0 0;
    color: var(--zn-member-text-secondary);
    font-size: 1.04rem;
    font-weight: 620;
    letter-spacing: 0;
}

.call-group-stage {
    width: min(100%, 1120px);
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(16px, 2.4vw, 26px);
}

.call-group-stage[hidden] {
    display: none !important;
}

.call-screen--audio[data-call-scope="group"] .call-screen-body {
    align-items: center;
    justify-content: center;
}

.call-screen--audio[data-call-scope="group"] .call-screen-identity {
    display: none !important;
}

.call-group-heading {
    text-align: center;
}

.call-group-title {
    margin: 0;
    color: var(--zn-member-text-primary);
    font-size: clamp(1.9rem, 3.4vw, 3.4rem);
    line-height: 1;
    letter-spacing: 0;
}

.call-group-status {
    margin: 8px 0 0;
    color: var(--zn-member-text-secondary);
    font-size: 1.02rem;
    font-weight: 700;
}

.call-group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.8vw, 18px);
}

.call-group-stage[data-participant-count="1"] .call-group-grid {
    grid-template-columns: minmax(0, 1fr);
}

.call-group-stage[data-participant-count="3"] .call-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.call-group-stage[data-participant-count="4"] .call-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.call-group-tile {
    min-height: clamp(188px, 32vh, 328px);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 22px;
    background:
        linear-gradient(180deg, var(--zn-member-bg-card), var(--zn-member-bg-pane)),
        var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    text-align: center;
    overflow: hidden;
}

.call-group-tile.is-self {
    border-color: var(--zn-member-accent-border);
    background:
        linear-gradient(180deg, var(--zn-member-accent-surface), var(--zn-member-bg-card)),
        var(--zn-member-bg-card);
}

.call-group-tile.is-call-left,
.call-group-tile.is-call-stale {
    opacity: 0.62;
}

.call-group-tile.is-call-left .call-group-avatar,
.call-group-tile.is-call-stale .call-group-avatar {
    filter: saturate(0.55);
}

.call-group-avatar {
    --voice-pulse-scale: 1;
    --voice-pulse-alpha: 0.08;
    --voice-pulse-spread: 18px;
    position: relative;
    width: clamp(84px, 10vw, 132px);
    height: clamp(84px, 10vw, 132px);
    display: grid;
    place-items: center;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 50%;
    background: var(--zn-member-accent-surface);
    color: var(--zn-member-accent-text);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 0 0 10px var(--zn-member-bg-surface-lift), var(--zn-member-shadow);
    transform: scale(var(--voice-pulse-scale));
    transition:
        transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
    isolation: isolate;
}

.call-group-avatar::before {
    content: "";
    position: absolute;
    inset: calc(var(--voice-pulse-spread) * -1);
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--zn-member-accent-surface-strong), transparent 68%);
    opacity: var(--voice-pulse-alpha);
    transform: scale(var(--voice-pulse-scale));
    pointer-events: none;
}

.call-group-avatar .conversation-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.call-group-copy {
    display: grid;
    gap: 5px;
}

.call-group-copy strong {
    color: var(--zn-member-text-primary);
    font-size: clamp(1.04rem, 1.5vw, 1.26rem);
    line-height: 1.12;
}

.call-group-copy span {
    color: var(--zn-member-text-secondary);
    font-size: 0.9rem;
    line-height: 1.25;
}

.call-screen--audio .call-screen-subtitle,
.call-screen--audio .call-screen-local-muted,
.call-screen--audio .call-screen-kicker,
.call-screen--audio .call-video-stage,
.call-screen--video .call-screen-identity,
.call-screen--screen .call-screen-identity,
.call-screen--video .call-screen-status,
.call-screen--screen .call-screen-status,
.call-screen--video .call-screen-local-muted,
.call-screen--screen .call-screen-local-muted,
.call-screen--video .call-screen-subtitle,
.call-screen--screen .call-screen-subtitle {
    display: none !important;
}

.call-screen--video .call-screen-body,
.call-screen--screen .call-screen-body {
    min-height: 100vh;
    padding: 0;
}

.call-screen--video .call-video-stage,
.call-screen--screen .call-video-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    margin: 0;
}

.call-screen--video .call-video-element,
.call-screen--screen .call-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-screen--screen .call-screen-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
}

.call-screen--screen .call-screen-chip {
    grid-column: 1;
    justify-self: start;
    max-width: min(66vw, 380px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.call-screen--screen .call-screen-secondary-actions {
    grid-column: 2;
    justify-self: end;
}

.call-screen--screen .call-secondary-action[data-call-screen-share] {
    min-width: 72px;
    border-color: var(--zn-danger-border);
    background: var(--zn-danger-surface-hover);
}

.call-screen-footer {
    position: fixed;
    z-index: 6;
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
}

.call-screen-controls {
    width: min(100%, 456px);
    max-width: 456px;
    display: grid;
    grid-template-columns: repeat(6, minmax(50px, 1fr));
    align-items: center;
    justify-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--zn-member-border-soft);
    border-radius: 999px;
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    backdrop-filter: blur(24px);
}

.call-screen[data-call-ui-mode="incoming"] .call-screen-controls {
    grid-template-columns: repeat(2, minmax(64px, 1fr));
    width: min(100%, 180px);
}

.call-screen[data-call-ui-mode="outgoing"] .call-screen-controls {
    grid-template-columns: minmax(64px, 1fr);
    width: min(100%, 96px);
}

.call-control-button {
    min-width: 0;
    width: 64px;
    gap: 0;
    flex: 0 0 auto;
}

.call-control-button-face {
    width: 58px;
    height: 58px;
}

.call-control-button-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.call-screen--audio [data-call-speaker],
.call-screen--video [data-call-speaker] {
    order: 1;
}

.call-screen--audio [data-call-video],
.call-screen--video [data-call-video] {
    order: 2;
}

.call-screen--audio [data-call-mute],
.call-screen--video [data-call-mute] {
    order: 3;
}

.call-screen--screen [data-call-mute] {
    order: 1;
}

.call-screen--screen [data-call-video] {
    order: 2;
}

.call-screen--screen [data-call-speaker] {
    order: 3;
}

.call-screen [data-call-hangup],
.call-screen [data-call-decline] {
    order: 4;
}

.call-control-button[data-call-video][data-active="true"] .call-control-button-face {
    border-color: var(--zn-member-accent-border-strong);
    background: var(--zn-member-accent-border-strong);
    color: var(--zn-member-primary-text);
}

.call-control-button[data-call-mute][data-active="true"] .call-control-button-face {
    border-color: var(--zn-danger-border-strong);
    background: linear-gradient(180deg, var(--zn-danger-soft-strong), var(--zn-danger-surface-hover));
}

@media (max-width: 760px) {
    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(20px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging .call-screen-controls {
        width: min(100%, 360px);
        grid-template-columns: repeat(4, minmax(50px, 1fr));
        gap: 6px;
        padding: 8px;
    }

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

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

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

    body.user-body-messaging .call-screen--audio[data-call-scope="group"] .call-screen-body {
        padding:
            calc(58px + env(safe-area-inset-top))
            max(14px, env(safe-area-inset-left))
            calc(112px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging .call-group-stage {
        gap: 14px;
    }

    body.user-body-messaging .call-group-grid,
    body.user-body-messaging .call-group-stage[data-participant-count="3"] .call-group-grid,
    body.user-body-messaging .call-group-stage[data-participant-count="4"] .call-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.user-body-messaging .call-group-tile {
        min-height: 150px;
        gap: 10px;
        padding: 14px;
        border-radius: 18px;
    }

    body.user-body-messaging .call-group-avatar {
        width: 78px;
        height: 78px;
        font-size: 1.85rem;
        box-shadow: 0 0 0 7px var(--zn-member-bg-surface-lift), var(--zn-member-shadow);
    }

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

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

    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 {
        right: max(14px, env(safe-area-inset-right));
        bottom: calc(106px + env(safe-area-inset-bottom));
        width: 104px;
        min-width: 96px;
        border-radius: 14px;
    }
}

@media (max-width: 430px) and (max-height: 740px) {
    body.user-body-messaging .call-screen--audio[data-call-scope="group"] .call-screen-body {
        padding:
            calc(54px + env(safe-area-inset-top))
            max(10px, env(safe-area-inset-left))
            calc(104px + env(safe-area-inset-bottom));
    }

    body.user-body-messaging .call-group-title {
        font-size: 1.7rem;
    }

    body.user-body-messaging .call-group-status {
        margin-top: 5px;
        font-size: 0.88rem;
    }

    body.user-body-messaging .call-group-grid,
    body.user-body-messaging .call-group-stage[data-participant-count="3"] .call-group-grid,
    body.user-body-messaging .call-group-stage[data-participant-count="4"] .call-group-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-body-messaging .call-group-tile {
        min-height: 104px;
        grid-template-columns: auto minmax(0, 1fr);
        justify-items: start;
        text-align: left;
    }

    body.user-body-messaging .call-group-avatar {
        width: 62px;
        height: 62px;
        font-size: 1.45rem;
    }

    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;
    }
}

/* Mobile call UI safety pass: visual-only separation for audio, video and screen modes. */
.call-screen--audio .call-video-stage {
    display: none !important;
}

.call-screen--video .call-screen-identity,
.call-screen--screen .call-screen-identity {
    display: none !important;
}

.call-screen--video .call-video-stage,
.call-screen--screen .call-video-stage {
    display: block;
}

.call-screen--video .call-screen-local-muted,
.call-screen--screen .call-screen-local-muted {
    position: fixed;
    z-index: 7;
    left: 50%;
    bottom: calc(98px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
}

.call-screen-controls {
    grid-template-columns: repeat(6, minmax(50px, 1fr));
}

.call-screen [data-call-screen-share] {
    order: 3;
}

.call-screen .meeting-memo-control {
    order: 4;
}

.call-screen [data-call-mute] {
    order: 2;
}

.call-screen [data-call-video] {
    order: 1;
}

.call-screen--audio [data-call-speaker] {
    order: 1;
}

.call-screen--audio [data-call-video] {
    order: 2;
}

.call-screen--audio [data-call-mute] {
    order: 3;
}

.call-screen [data-call-hangup],
.call-screen [data-call-decline] {
    order: 5;
}

.call-control-button[data-call-screen-share][data-active="true"] .call-control-button-face {
    border-color: var(--zn-success-border);
    background: var(--zn-success-soft-strong);
    color: var(--zn-member-success-text);
}

body.user-body-meetings {
    overflow: hidden;
}

.meeting-topbar {
    flex: 0 0 auto;
}

.meeting-title-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.meeting-title-row h1 {
    margin: 0;
}

.meeting-layout {
    flex: 1 1 auto;
    min-height: 0;
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(360px, 520px);
    gap: 22px;
}

.meeting-create-panel,
.meeting-guest-panel,
.meeting-stage {
    border-radius: var(--user-radius-sm);
}

.meeting-main {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
    overflow: auto;
    padding: 2px 4px 10px 0;
}

.meeting-side {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

.meeting-copy-status {
    grid-column: 2;
    grid-row: 1;
    z-index: 3;
    align-self: start;
    justify-self: stretch;
    pointer-events: none;
}

.meeting-create-panel,
.meeting-guest-panel,
.meeting-stage {
    padding: 28px 32px;
}

.meeting-create-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.meeting-guest-panel {
    display: none;
}

.meeting-stage[hidden] {
    display: none;
}

body.meeting-room-active .meeting-topbar {
    display: none;
}

.meeting-layout.meeting-room-active {
    max-width: none;
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.meeting-layout.meeting-room-active .meeting-main,
.meeting-layout.meeting-room-active .meeting-create-panel,
.meeting-layout.meeting-room-active .meeting-guest-panel {
    display: none;
}

.meeting-layout.meeting-room-active .meeting-side {
    overflow: hidden;
}

.meeting-layout.meeting-room-active .meeting-stage {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 14px;
    padding: 16px;
    border-radius: 0;
    background: var(--zn-member-bg-page);
    box-shadow: none;
}

.meeting-layout.meeting-room-active .meeting-section-header {
    align-items: center;
}

.meeting-layout.meeting-room-active .meeting-section-header h2 {
    max-width: min(72vw, 900px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.16rem;
}

.meeting-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.meeting-section-header h2,
.meeting-section-header h3,
.meeting-hero h2,
.meeting-create-heading h2,
.meeting-row-copy h3,
.meeting-upcoming-placeholder strong,
.meeting-guest-panel h2 {
    margin: 0;
}

.meeting-hero {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meeting-hero h2 {
    color: var(--zn-member-text-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: 0;
}

.meeting-hero p,
.meeting-create-heading p,
.meeting-upcoming-placeholder p {
    margin: 0;
    color: var(--zn-member-text-secondary);
}

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

.meeting-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meeting-section-title h3 {
    color: var(--zn-member-text-primary);
    font-size: 1.22rem;
    line-height: 1.2;
}

.meeting-section-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #07505a;
}

.meeting-section-dot-muted {
    background: var(--zn-member-text-muted);
}

.meeting-section-calendar {
    width: 18px;
    height: 18px;
    color: var(--zn-member-text-secondary);
}

.meeting-section-calendar svg,
.meeting-row-facts svg,
.meeting-participant-search svg,
.meeting-create-button svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.meeting-section-header h2 {
    font-size: 1.08rem;
}

.meeting-count {
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--zn-member-text-secondary);
    background: color-mix(in srgb, var(--zn-member-bg-surface-hover) 84%, white);
    font-weight: 700;
}

.meeting-list {
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 128px;
    padding: 24px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-surface);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.meeting-row.is-deep-linked {
    border-color: var(--zn-member-accent-border-strong);
    box-shadow: 0 0 0 3px var(--zn-member-accent-surface), 0 12px 28px rgba(9, 16, 30, 0.18);
}

.meeting-row-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.meeting-row-icon {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #f6fbff;
    background:
        radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.25), transparent 34%),
        linear-gradient(135deg, #0a7882, #064c59);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 16px 28px rgba(6, 76, 89, 0.18);
}

.meeting-row-icon[data-state="ended"] {
    color: var(--zn-member-text-muted);
    background: var(--zn-member-bg-surface-hover);
    box-shadow: inset 0 0 0 1px var(--zn-member-border);
}

.meeting-row-icon svg {
    width: 38px;
    height: 38px;
}

.meeting-row-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meeting-row-title-line {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.meeting-row-copy h3 {
    max-width: min(52vw, 620px);
    color: var(--zn-member-text-primary);
    font-size: 1.14rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.meeting-row-copy p,
.meeting-row-facts,
.meeting-row-facts span,
.meeting-row-meta,
.meeting-helper-text,
.meeting-guest-panel p,
.meeting-readonly-panel p,
.meeting-form-status {
    margin: 0;
    color: var(--zn-member-text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
}

.meeting-row-facts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.meeting-row-facts span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.meeting-row-facts svg {
    width: 17px;
    height: 17px;
}

.meeting-row-meta {
    color: var(--zn-member-text-muted);
    overflow-wrap: anywhere;
}

.meeting-state-badge {
    display: inline-grid;
    min-height: 24px;
    align-items: center;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--zn-member-text-secondary);
}

.meeting-state-active {
    color: var(--zn-member-success-text);
    border-color: var(--zn-success-border);
    background: var(--zn-success-soft);
}

.meeting-state-ended {
    color: var(--zn-member-text-muted);
    background: var(--zn-member-bg-surface-hover);
}

.meeting-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.meeting-join-button {
    min-width: 98px;
}

.meeting-row-actions .secondary-button:disabled,
.meeting-row-actions .primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

.meeting-danger-button {
    color: var(--zn-member-danger-text);
    border-color: var(--zn-danger-border);
}

.meeting-action-menu {
    position: relative;
}

.meeting-action-menu summary {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    cursor: pointer;
    list-style: none;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    color: var(--zn-member-text-primary);
    background: var(--zn-member-bg-surface);
    font-weight: 800;
}

.meeting-action-menu summary::-webkit-details-marker {
    display: none;
}

.meeting-action-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    min-width: 180px;
    padding: 8px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-shadow-panel);
}

.meeting-action-menu-panel > span {
    display: block;
    padding: 6px 8px 8px;
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
}

.meeting-menu-action {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    text-align: left;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--zn-member-text-primary);
    font: inherit;
    cursor: pointer;
}

.meeting-menu-action:hover:not(:disabled) {
    background: var(--zn-member-bg-surface-hover);
}

.meeting-upcoming-placeholder {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    min-height: 120px;
    padding: 20px 24px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-surface);
}

.meeting-date-card {
    width: 72px;
    height: 86px;
    display: grid;
    place-items: center;
    padding: 8px;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-card);
}

.meeting-date-card span {
    color: var(--zn-member-text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.meeting-date-card strong {
    color: var(--zn-member-text-primary);
    font-size: 1.2rem;
}

.meeting-row-ended {
    min-height: 96px;
    opacity: 0.82;
}

.meeting-list-ended {
    gap: 8px;
}

.meeting-create-heading {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.meeting-create-heading h2 {
    color: var(--zn-member-text-primary);
    font-size: 1rem;
    line-height: 1.2;
}

.meeting-create-form {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-create-form .form-field span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.meeting-create-form .form-field small {
    color: var(--zn-member-text-muted);
    font-weight: 500;
}

.meeting-create-form .form-input {
    min-height: 44px;
    border-radius: 12px;
}

.meeting-title-field {
    gap: 0;
}

.meeting-participant-picker {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.meeting-external-guest-panel {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 10px;
    display: grid;
    gap: 10px;
    background: var(--zn-member-bg-surface);
}

.meeting-external-guest-panel legend {
    padding: 0 4px;
    color: var(--zn-member-text-primary);
    font-size: 0.86rem;
    font-weight: 800;
}

.meeting-checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zn-member-text-primary);
    font-size: 0.84rem;
    font-weight: 700;
}

.meeting-checkbox-field input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.meeting-picker-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.meeting-picker-title {
    min-width: 0;
    color: var(--zn-member-text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.meeting-picker-header button {
    padding: 0;
    border: 0;
    color: var(--zn-member-text-link);
    background: transparent;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.meeting-selected-participants {
    flex: 0 0 auto;
    min-height: 40px;
    max-height: 92px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    overflow: auto;
    padding-right: 2px;
}

.meeting-selected-chip {
    min-width: 0;
    max-width: calc(50% - 4px);
    flex: 1 1 190px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--zn-member-border);
    border-radius: 10px;
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-text-primary);
    font-size: 0.86rem;
}

.meeting-selected-chip > span:not(.meeting-participant-avatar) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meeting-selected-chip button {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--zn-member-text-secondary);
    background: transparent;
    cursor: pointer;
}

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

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

.meeting-participant-list {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 0 2px 0 0;
    border: 1px solid var(--zn-member-border);
    border-radius: 12px;
    background: var(--zn-member-bg-surface);
}

.meeting-participant-option {
    display: grid;
    grid-template-columns: 20px 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--zn-member-border);
    background: transparent;
}

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

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

.meeting-participant-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #64748b;
    font-weight: 800;
    font-size: 0.8rem;
}

.meeting-participant-avatar[data-tone="0"] { background: #6554d9; }
.meeting-participant-avatar[data-tone="1"] { background: #3f8f37; }
.meeting-participant-avatar[data-tone="2"] { background: #117c86; }
.meeting-participant-avatar[data-tone="3"] { background: #e0830c; }
.meeting-participant-avatar[data-tone="4"] { background: #2f78d4; }
.meeting-participant-avatar[data-tone="5"] { background: #8e45d8; }
.meeting-participant-avatar[data-tone="6"] { background: #ea5778; }
.meeting-participant-avatar[data-tone="7"] { background: #607d8b; }

.meeting-participant-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.meeting-participant-copy small,
.meeting-participant-role {
    color: var(--zn-member-text-muted);
    overflow-wrap: anywhere;
    font-size: 0.82rem;
}

.meeting-participant-role {
    white-space: nowrap;
}

.meeting-create-button {
    width: 100%;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    font-weight: 800;
}

.meeting-create-button svg {
    width: 22px;
    height: 22px;
}

.meeting-form-status[data-tone="progress"] {
    color: var(--zn-member-text-link);
}

.meeting-form-status[data-tone="error"] {
    color: var(--zn-member-danger-text);
}

.meeting-form-status[data-tone="success"] {
    color: var(--zn-member-success-text);
}

.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-remote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.meeting-layout.meeting-room-active .meeting-remote-grid {
    position: relative;
    min-height: 0;
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(0, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.32);
}

.meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="3"] .meeting-remote-tile:first-child {
    grid-row: span 2;
}

.meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="many"] {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.meeting-layout.meeting-room-active .meeting-remote-grid:not([data-remote-count]),
.meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-count="0"] {
    background: transparent;
}

.meeting-layout.meeting-room-active .meeting-remote-grid:not([data-remote-count])::before,
.meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-count="0"]::before {
    content: "Waiting for participants";
    display: grid;
    place-items: center;
    min-height: 100%;
    color: #dce6f5;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        #12151c;
}

.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-local-tile {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: clamp(132px, 18vw, 240px);
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.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-layout.meeting-room-active .meeting-stage[data-screen-sharing="true"] .meeting-remote-grid {
    display: none;
}

.meeting-layout.meeting-room-active .meeting-stage[data-screen-sharing="true"] .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-layout.meeting-room-active .meeting-stage[data-screen-sharing="true"] .meeting-local-tile video {
    object-fit: contain;
}

.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 video {
    min-height: 0;
}

.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;
}

.meeting-control-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.meeting-guest-link-result {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.meeting-card-guest-link {
    grid-column: 1 / -1;
    margin-top: 0;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 10px;
    background: var(--zn-member-bg-surface-hover);
}

.meeting-card-external-guests {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 10px;
    background: var(--zn-member-bg-surface);
}

.meeting-card-guest-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.meeting-card-guest-actions .secondary-button {
    min-width: 0;
}

.meeting-guest-link-result[hidden] {
    display: none !important;
}

.guest-meeting-body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    background:
        radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--zn-accent-soft) 44%, transparent), transparent 32%),
        linear-gradient(135deg, var(--zn-bg-app), color-mix(in srgb, var(--zn-bg-surface-muted) 74%, var(--zn-bg-app)));
    color: var(--zn-text-primary);
}

html:has(body.guest-meeting-body) {
    height: auto;
    overflow-y: auto;
}

.guest-invite-shell {
    display: grid;
    grid-template-columns: minmax(300px, 0.74fr) minmax(360px, 0.9fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    min-height: 100vh;
    padding: max(20px, env(safe-area-inset-top)) clamp(22px, 4vw, 58px) max(20px, env(safe-area-inset-bottom));
}

.guest-invite-aside,
.guest-invite-main {
    display: grid;
    gap: 18px;
}

.guest-invite-brand,
.guest-invite-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    color: var(--zn-text-primary);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.guest-invite-brand-mark,
.guest-invite-mobile-brand img {
    border-radius: 12px;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--zn-accent) 16%, transparent);
}

.guest-invite-mobile-brand {
    display: none;
}

.guest-invite-pitch {
    display: grid;
    gap: 16px;
    width: min(430px, 100%);
    margin: clamp(24px, 8vh, 76px) 0;
}

.guest-invite-version {
    width: max-content;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--zn-accent) 20%, var(--zn-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-accent-soft) 62%, var(--zn-bg-surface));
    color: var(--zn-accent);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-invite-pitch h2 {
    margin: 0;
    max-width: 10ch;
    color: var(--zn-text-primary);
    font-size: clamp(2.15rem, 4.2vw, 4.3rem);
    line-height: 0.98;
}

.guest-invite-pitch p:not(.guest-invite-version) {
    max-width: 34rem;
    margin: 0;
    color: var(--zn-text-secondary);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.55;
}

.guest-invite-feature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 390px;
}

.guest-invite-feature-grid span {
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--zn-accent) 18%, var(--zn-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-bg-surface) 74%, transparent);
    color: var(--zn-text-primary);
    font-size: 0.82rem;
    font-weight: 800;
}

.guest-invite-trust,
.guest-invite-note {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    color: var(--zn-text-secondary);
}

.guest-invite-trust {
    width: min(360px, 100%);
    margin: 0;
}

.guest-invite-lock,
.guest-invite-note-icon,
.guest-invite-detail-icon,
.guest-invite-icon,
.guest-invite-badge span {
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--zn-accent) 22%, var(--zn-border));
    background: var(--zn-accent-soft);
    color: var(--zn-accent);
}

.guest-invite-lock,
.guest-invite-note-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.guest-invite-lock::before,
.guest-invite-note-icon::before {
    content: "";
    width: 14px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 3px;
    box-sizing: border-box;
}

.guest-invite-lock::after,
.guest-invite-note-icon::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 8px;
    margin-top: -13px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.guest-invite-trust strong,
.guest-invite-note strong {
    display: block;
    color: var(--zn-text-primary);
    font-size: 0.92rem;
}

.guest-invite-trust p,
.guest-invite-note p {
    margin: 4px 0 0;
    line-height: 1.5;
}

.guest-invite-main {
    justify-items: center;
}

.guest-invite-card,
.guest-invite-note {
    width: min(540px, 100%);
    border: 1px solid var(--zn-border-soft);
    background: color-mix(in srgb, var(--zn-bg-surface) 94%, transparent);
    box-shadow: var(--zn-shadow);
    backdrop-filter: blur(20px);
}

.guest-invite-card {
    display: grid;
    gap: 14px;
    padding: clamp(20px, 3vw, 32px);
    border-radius: 24px;
}

.guest-invite-badge {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--zn-accent-soft);
    color: var(--zn-accent);
    font-size: 0.78rem;
    font-weight: 800;
}

.guest-invite-badge span {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: transparent;
}

.guest-invite-badge span::before {
    content: "";
    width: 7px;
    height: 9px;
    border: 2px solid currentColor;
    border-top: 0;
    transform: rotate(45deg);
}

.guest-invite-icon {
    justify-self: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
}

.guest-invite-icon::before {
    content: "";
    width: 22px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.guest-invite-heading {
    text-align: center;
}

.guest-invite-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 3.4vw, 2.7rem);
    line-height: 1.05;
}

.guest-invite-heading p {
    margin: 8px 0 0;
    color: var(--zn-text-secondary);
}

.guest-invite-error {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--zn-danger) 35%, var(--zn-border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--zn-danger) 10%, var(--zn-bg-surface));
    color: var(--zn-text-secondary);
}

.guest-invite-error strong {
    color: var(--zn-danger);
}

.guest-invite-error p,
.guest-invite-error span {
    margin: 0;
}

.guest-invite-details {
    display: grid;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--zn-border-soft);
}

.guest-invite-title-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.guest-invite-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
}

.guest-invite-detail-icon::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 4px;
    box-shadow: inset 0 5px 0 color-mix(in srgb, currentColor 18%, transparent);
}

.guest-invite-title-row h2 {
    margin: 0;
    font-size: 1.24rem;
    line-height: 1.2;
}

.guest-invite-meta {
    display: grid;
    gap: 10px;
    margin: 0;
}

.guest-invite-meta div {
    display: grid;
    grid-template-columns: minmax(112px, 0.7fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.guest-invite-meta dt {
    color: var(--zn-text-muted);
    font-size: 0.86rem;
}

.guest-invite-meta dd {
    margin: 0;
    color: var(--zn-text-primary);
    font-weight: 700;
}

.guest-invite-meta small {
    display: block;
    margin-top: 3px;
    color: var(--zn-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.guest-invite-form,
.guest-invite-join-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--zn-accent) 22%, var(--zn-border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--zn-accent-soft) 36%, var(--zn-bg-surface));
}

.guest-invite-waiting {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--zn-warning) 28%, var(--zn-border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--zn-warning) 10%, var(--zn-bg-surface));
}

.guest-invite-waiting-kicker {
    margin: 0;
    color: var(--zn-text-muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-invite-waiting h2 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.25;
}

.guest-invite-waiting p {
    margin: 0;
    color: var(--zn-text-secondary);
}

.guest-invite-waiting-meta {
    padding-top: 4px;
}

.guest-invite-waiting-meta time {
    overflow-wrap: anywhere;
}

.guest-invite-form .form-field {
    margin: 0;
}

.guest-invite-form .form-input {
    min-height: 44px;
}

.guest-invite-primary {
    min-height: 46px;
    background: linear-gradient(135deg, var(--zn-accent), var(--zn-accent-hover));
}

.guest-invite-primary:disabled {
    cursor: not-allowed;
    background: color-mix(in srgb, var(--zn-text-muted) 18%, var(--zn-bg-surface));
    color: var(--zn-text-muted);
    border: 1px solid var(--zn-border);
    box-shadow: none;
    opacity: 0.78;
}

.guest-invite-copy {
    min-height: 34px;
    border: 0;
    background: transparent;
    color: var(--zn-accent);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.guest-invite-ready {
    margin: 0;
    color: var(--zn-text-secondary);
}

.guest-invite-note {
    padding: 14px;
    border-radius: 18px;
}

.guest-meeting-stage {
    grid-column: 1 / -1;
    min-height: calc(100vh - 64px);
}

@media (max-width: 860px) {
    .guest-meeting-body {
        overflow-y: auto;
    }

    .guest-invite-shell {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 18px;
        min-height: auto;
        padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    }

    .guest-invite-aside {
        display: none;
    }

    .guest-invite-mobile-brand {
        display: inline-flex;
        justify-self: start;
        margin-bottom: 2px;
    }

    .guest-invite-main {
        gap: 16px;
        justify-items: stretch;
    }

    .guest-invite-card {
        width: 100%;
        gap: 16px;
        padding: 18px;
        border-radius: 22px;
    }

    .guest-invite-heading h1 {
        font-size: 2rem;
    }

    .guest-invite-title-row {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
    }

    .guest-invite-detail-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .guest-invite-title-row h2 {
        font-size: 1.18rem;
    }

    .guest-invite-meta {
        gap: 12px;
    }

    .guest-invite-meta div {
        grid-template-columns: minmax(92px, 0.72fr) minmax(0, 1fr);
        gap: 12px;
    }

    .guest-invite-waiting-meta div {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .guest-invite-form,
    .guest-invite-join-box {
        padding: 12px;
    }

    .guest-invite-note {
        width: 100%;
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 14px;
    }

    .guest-invite-note-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }
}

.meeting-layout.meeting-room-active .meeting-control-bar {
    position: sticky;
    bottom: 0;
    z-index: 3;
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 10px;
    grid-template-columns: repeat(5, minmax(104px, 1fr));
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: color-mix(in srgb, var(--zn-member-bg-card) 92%, transparent);
    box-shadow: var(--zn-shadow-soft);
    backdrop-filter: blur(16px);
}

.meeting-control-bar .secondary-button[data-active="true"] {
    border-color: var(--zn-success-border);
    background: var(--zn-success-soft);
    color: var(--zn-member-success-text);
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-stage {
    position: relative;
    isolation: isolate;
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-stage > .meeting-section-header {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    z-index: 8;
    align-items: flex-start;
    pointer-events: none;
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-stage .meeting-section-header > div {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(7, 10, 18, 0.54);
    color: #f7fbff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-live-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #d8ffe4;
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-live-kicker span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

body.user-body-meetings .meeting-layout.meeting-room-active [data-meeting-stage-title] {
    max-width: min(46vw, 560px);
    margin: 0;
    overflow: hidden;
    color: #f8fafc;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.user-body-meetings .meeting-layout.meeting-room-active [data-meeting-stage-title]:empty {
    display: none;
}

body.user-body-meetings .meeting-layout.meeting-room-active [data-meeting-connection-state] {
    width: max-content;
    min-height: 0;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(7, 10, 18, 0.46);
    color: #d9e4f2;
    font-size: 0.76rem;
    font-weight: 600;
    backdrop-filter: blur(16px);
}

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-remote-grid {
    gap: 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-local-tile {
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: clamp(148px, 15vw, 220px);
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    background: rgba(7, 10, 18, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-local-tile video {
    border-radius: 18px;
}

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);
}

body.user-body-meetings .meeting-layout.meeting-room-active .meeting-control-bar {
    position: absolute;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 9;
    width: auto;
    display: flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(7, 10, 18, 0.58);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
    transform: translateX(-50%);
    backdrop-filter: blur(20px);
}

body.user-body-meetings .meeting-control-button {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

body.user-body-meetings .meeting-control-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-meetings .meeting-control-button[data-active="true"] {
    border-color: rgba(34, 197, 94, 0.34);
    background: rgba(21, 128, 61, 0.34);
    color: #dcfce7;
}

body.user-body-meetings .meeting-control-button.meeting-danger-button {
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(127, 29, 29, 0.54);
    color: #fecaca;
}

body.user-body-meetings .meeting-memo-control[data-memo-state="recording"] .meeting-memo-button {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(127, 29, 29, 0.56);
    color: #fecaca;
}

body.user-body-meetings .meeting-memo-control[data-memo-state="processing"] .meeting-memo-button {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(120, 53, 15, 0.48);
    color: #fde68a;
}

body.user-body-meetings .meeting-control-button:hover::after,
body.user-body-meetings .meeting-control-button:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    width: max-content;
    max-width: 180px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(7, 10, 18, 0.88);
    color: #f8fafc;
    font-size: 0.72rem;
    line-height: 1;
    transform: translateX(-50%);
    pointer-events: none;
}

body.user-body-meetings .meeting-layout.meeting-room-active [data-meeting-rtc-status] {
    position: absolute;
    left: max(18px, env(safe-area-inset-left));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 8;
    max-width: min(320px, 34vw);
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.82rem;
}

body.user-body-meetings .meeting-confirm-modal[hidden] {
    display: none;
}

body.user-body-meetings .meeting-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

body.user-body-meetings .meeting-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 14, 0.68);
    backdrop-filter: blur(10px);
}

body.user-body-meetings .meeting-confirm-dialog {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 18px;
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--zn-member-border) 82%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 94%, #050914 6%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

body.user-body-meetings .meeting-confirm-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px solid rgba(248, 113, 113, 0.26);
    background: rgba(127, 29, 29, 0.2);
    color: #fca5a5;
}

body.user-body-meetings .meeting-confirm-mark svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.user-body-meetings .meeting-confirm-copy {
    min-width: 0;
}

body.user-body-meetings .meeting-confirm-copy .pane-kicker {
    margin: 0 0 6px;
}

body.user-body-meetings .meeting-confirm-copy h2 {
    margin: 0;
    color: var(--zn-member-text-primary);
    font-size: 1.12rem;
    font-weight: 680;
    line-height: 1.15;
}

body.user-body-meetings .meeting-confirm-copy p:last-child {
    margin: 10px 0 0;
    color: var(--zn-member-text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

body.user-body-meetings .meeting-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

body.user-body-meetings .meeting-confirm-actions .secondary-button,
body.user-body-meetings .meeting-confirm-actions .primary-button {
    min-height: 42px;
    border-radius: 999px;
    padding: 0 18px;
}

body.user-body-meetings .meeting-confirm-actions .meeting-danger-button {
    border-color: rgba(248, 113, 113, 0.36);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.96), rgba(153, 27, 27, 0.94));
    color: #fff;
}

.meeting-empty-state {
    min-height: 260px;
    border: 1px dashed var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface);
}

@media (max-width: 980px) {
    .meeting-layout {
        grid-template-columns: minmax(0, 1fr);
        overflow: auto;
        padding-bottom: calc(12px + var(--safe-bottom));
    }

    .meeting-main,
    .meeting-side,
    .meeting-copy-status {
        grid-column: 1;
        grid-row: auto;
    }

    .meeting-main,
    .meeting-side {
        overflow: visible;
    }

    .meeting-list {
        overflow: visible;
    }
}

@media (max-width: 760px) {
    body.user-body-meetings {
        overflow: hidden;
    }

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

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

    .meeting-topbar .topbar-controls {
        display: none;
    }

    .meeting-topbar .user-kicker,
    .meeting-topbar .topbar-user-card {
        display: none;
    }

    .meeting-topbar .topbar-title-mark {
        margin-top: 0;
    }

    .meeting-topbar .topbar-title h1 {
        font-size: 1.08rem;
    }

    .meeting-title-row {
        gap: 8px;
    }

    .meeting-topbar .surface-switcher {
        width: 100%;
        gap: 8px;
    }

    .meeting-topbar .surface-switcher-link {
        min-height: 40px;
        padding: 8px 13px;
    }

    .meeting-layout {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding:
            14px
            max(10px, env(safe-area-inset-right))
            calc(14px + var(--safe-bottom))
            max(10px, env(safe-area-inset-left));
    }

    .meeting-side {
        order: -1;
        gap: 12px;
    }

    .meeting-main {
        gap: 16px;
        padding: 0;
    }

    .meeting-create-panel,
    .meeting-readonly-panel {
        padding: 18px;
        border-radius: 16px;
        box-shadow: none;
    }

    .meeting-create-heading h2 {
        font-size: 1.08rem;
    }

    .meeting-create-form {
        gap: 14px;
    }

    .meeting-create-form .form-input {
        min-height: 52px;
        font-size: 16px;
    }

    .meeting-title-field {
        margin: 0;
    }

    .meeting-participant-picker {
        gap: 10px;
        overflow: visible;
    }

    .meeting-picker-header {
        min-height: 28px;
    }

    .meeting-picker-title {
        font-size: 0.94rem;
    }

    .meeting-selected-participants:empty,
    .meeting-guest-panel {
        display: none;
    }

    .meeting-selected-participants {
        max-height: 84px;
    }

    .meeting-participant-search {
        min-height: 44px;
        flex-basis: 44px;
    }

    .meeting-participant-list {
        max-height: 220px;
    }

    .meeting-create-button {
        min-height: 58px;
        border-radius: 14px;
        font-size: 1rem;
    }

    .meeting-section-header {
        align-items: center;
    }

    .meeting-section-title {
        gap: 10px;
    }

    .meeting-section-title h3 {
        font-size: 1.04rem;
    }

    .meeting-count {
        min-width: 28px;
        height: 28px;
        font-size: 0.86rem;
    }

    .meeting-empty-state {
        min-height: 120px;
        padding: 22px 18px;
        border-style: solid;
        text-align: left;
        align-items: flex-start;
    }

    .meeting-empty-state p {
        max-width: 28rem;
        text-align: left;
    }

    .meeting-upcoming-section {
        display: none;
    }

    .meeting-row {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        gap: 14px;
        padding: 16px;
        border-radius: 16px;
    }

    .meeting-row-main {
        gap: 14px;
        align-items: flex-start;
    }

    .meeting-row-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        border-radius: 14px;
    }

    .meeting-row-icon svg {
        width: 28px;
        height: 28px;
    }

    .meeting-row-copy h3 {
        max-width: 100%;
        font-size: 1rem;
    }

    .meeting-row-facts {
        gap: 8px;
    }

    .meeting-row-meta {
        font-size: 0.78rem;
    }

    .meeting-row-actions {
        justify-content: stretch;
        gap: 10px;
    }

    .meeting-row-actions .primary-button,
    .meeting-row-actions .secondary-button,
    .meeting-end-form {
        width: 100%;
    }

    html[data-keyboard-open="true"] body.user-body-meetings .meeting-layout {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    html[data-keyboard-open="true"] body.user-body-meetings .meeting-main {
        display: none;
    }

    html[data-keyboard-open="true"] body.user-body-meetings .meeting-create-panel {
        padding: 16px;
    }

    html[data-keyboard-open="true"] body.user-body-meetings .meeting-create-form {
        gap: 12px;
    }

    .meeting-control-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .meeting-layout.meeting-room-active {
        height: 100dvh;
        overflow: hidden;
    }

    .meeting-layout.meeting-room-active .meeting-stage {
        min-height: 100dvh;
        padding:
            calc(10px + env(safe-area-inset-top))
            10px
            calc(92px + env(safe-area-inset-bottom))
            10px;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

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

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

    .meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="2"],
    .meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="3"],
    .meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="4"],
    .meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="many"] {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }

    .meeting-layout.meeting-room-active .meeting-remote-grid[data-remote-layout="3"] .meeting-remote-tile:first-child {
        grid-row: auto;
    }

    .meeting-layout.meeting-room-active .meeting-local-tile {
        right: 8px;
        bottom: 8px;
        width: clamp(112px, 34vw, 160px);
    }

    .meeting-layout.meeting-room-active .meeting-control-bar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        width: auto;
        grid-template-columns: repeat(3, 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-controls {
        width: min(100%, 336px);
        max-width: 336px;
        grid-template-columns: repeat(4, minmax(48px, 1fr));
        gap: 6px;
        padding: 8px;
    }

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

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

    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 .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));
    }
}

body.user-body-meetings .topbar-title,
body.user-body-workspace .topbar-title {
    width: 100%;
    align-items: flex-start;
}

body.user-body-meetings .topbar-title-copy,
body.user-body-workspace .topbar-title-copy {
    width: min(760px, 100%);
    flex: 1 1 760px;
}

body.user-body-meetings .surface-switcher-user,
body.user-body-workspace .surface-switcher-user {
    width: min(760px, 100%);
    max-width: 760px;
}

body.user-body-meetings .surface-switcher-user .surface-switcher-link,
body.user-body-workspace .surface-switcher-user .surface-switcher-link {
    flex: 1 1 92px;
    min-width: 72px;
    min-height: 58px;
    border-radius: 18px;
}

body.user-body-meetings .surface-switcher-user .surface-switcher-logout-button,
body.user-body-workspace .surface-switcher-user .surface-switcher-logout-button {
    flex: 0 0 48px;
    min-width: 48px;
}

/* Meetings mobile must keep the same header geometry as Messaging and Workspace. */
@media (max-width: 760px), (max-width: 980px) and (orientation: landscape) {
    html,
    body.user-body-meetings {
        min-height: 100dvh;
        overflow: auto;
    }

    body.user-body-meetings .user-shell {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        padding: 0;
        gap: 0;
    }

    body.user-body-meetings .meeting-layout {
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow: visible;
        padding: 0 0 calc(18px + env(safe-area-inset-bottom));
    }

    body.user-body-meetings .meeting-left-panel,
    body.user-body-meetings .meeting-main,
    body.user-body-meetings .meeting-cockpit {
        width: 100%;
        min-width: 0;
        min-height: 0;
        grid-column: auto;
        grid-row: auto;
    }

    body.user-body-meetings .meeting-left-panel {
        order: 0;
    }

    body.user-body-meetings .meeting-cockpit {
        order: 1;
        gap: 16px;
        overflow: visible;
        padding:
            14px
            max(16px, env(safe-area-inset-right))
            14px
            max(16px, env(safe-area-inset-left));
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    body.user-body-meetings .meeting-hub {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding: 0 0 12px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    body.user-body-meetings .meeting-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-meetings .meeting-brand-row {
        grid-template-columns: 44px minmax(0, 1fr) auto 42px;
        gap: 10px;
        height: 42px;
        min-height: 42px;
    }

    body.user-body-meetings .meeting-brand-row .topbar-title-mark,
    body.user-body-meetings .meeting-brand-row .topbar-title-mark-image {
        width: 44px;
        height: 44px;
    }

    body.user-body-meetings .meeting-brand-row .topbar-title-mark {
        align-self: center;
        flex-basis: 44px;
        margin-top: 0;
        border-radius: 9px;
    }

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

    body.user-body-meetings .meeting-home-header .surface-switcher-user {
        width: 100%;
        max-width: none;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 0;
        scrollbar-width: none;
    }

    body.user-body-meetings .meeting-home-header .surface-switcher-user::-webkit-scrollbar {
        display: none;
    }

    body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-link {
        flex: 1 1 0;
        width: 100%;
        min-width: 0;
        min-height: 46px;
        border-radius: 14px;
    }

    body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-icon {
        width: 20px;
        height: 20px;
    }

    body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-logout {
        flex: 0 1 auto;
    }

    body.user-body-meetings .meeting-home-header .surface-switcher-user .surface-switcher-logout-button {
        flex: 1 1 0;
        flex-basis: 0;
        width: auto;
        min-width: 0;
        min-height: 46px;
        border-radius: 14px;
    }

    body.user-body-meetings .meeting-create-panel {
        gap: 12px;
        overflow: visible;
        padding:
            14px
            max(16px, env(safe-area-inset-right))
            0
            max(16px, env(safe-area-inset-left));
    }

    body.user-body-meetings .meeting-create-form,
    body.user-body-meetings .meeting-participant-picker {
        min-height: 0;
        overflow: visible;
    }

    body.user-body-meetings .meeting-selected-participants {
        max-height: none;
    }

    body.user-body-meetings .meeting-participant-list {
        max-height: 260px;
        min-height: 0;
        overflow: auto;
    }

    body.user-body-meetings .meeting-create-button {
        position: static;
        min-height: 52px;
        margin-top: 2px;
        border-radius: 999px;
    }

    body.user-body-meetings .meeting-upcoming-section {
        display: flex;
    }

    body.user-body-meetings .meeting-list-section {
        gap: 10px;
    }

    body.user-body-meetings .meeting-row {
        border-radius: 14px;
        padding: 14px;
    }

    body.user-body-meetings .meeting-row-main {
        align-items: center;
    }

    body.user-body-meetings .meeting-row-actions {
        flex-wrap: wrap;
    }

    body.user-body-meetings .meeting-card-guest-bar {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    body.user-body-meetings .meeting-card-guest-status {
        grid-template-columns: 24px minmax(0, auto);
    }

    body.user-body-meetings .meeting-card-guest-url {
        grid-column: 2;
        width: 100%;
    }

    body.user-body-meetings .meeting-card-guest-actions {
        justify-content: flex-end;
    }

    body.user-body-meetings .meeting-card-guest-actions .secondary-button {
        flex: 0 0 auto;
        padding: 0 10px;
    }

    body.user-body-meetings .meeting-card-guest-actions .meeting-card-guest-icon-button {
        flex-basis: 36px;
        padding: 0;
    }

    body.user-body-meetings .meeting-card-guest-invite {
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-body-meetings .meeting-empty-state {
        min-height: 0;
        padding: 18px;
    }

    body.user-body-meetings.meeting-room-active,
    body.user-body-meetings.meeting-room-active .user-shell {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    body.user-body-meetings .meeting-layout.meeting-room-active {
        width: 100%;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    body.user-body-meetings .meeting-layout.meeting-room-active .meeting-stage {
        min-height: 100dvh;
        padding:
            calc(10px + env(safe-area-inset-top))
            10px
            calc(88px + env(safe-area-inset-bottom))
            10px;
    }

    body.user-body-meetings .meeting-layout.meeting-room-active .meeting-local-tile {
        right: 10px;
        bottom: calc(78px + env(safe-area-inset-bottom));
        width: clamp(118px, 34vw, 150px);
    }

    body.user-body-meetings .meeting-layout.meeting-room-active .meeting-control-bar {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto;
        max-width: calc(100vw - 20px);
        display: flex;
        grid-template-columns: none;
        transform: translateX(-50%);
    }

    body.user-body-meetings .meeting-layout.meeting-room-active .meeting-control-button {
        width: 46px;
        min-width: 46px;
        height: 46px;
    }
}

/* Workspace PWA shell */
body.user-body-workspace {
    overflow: hidden;
}

body.user-body-workspace .user-shell {
    height: var(--app-vh);
    min-height: 0;
    overflow: hidden;
    padding:
        max(14px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(14px, var(--safe-bottom))
        max(18px, env(safe-area-inset-left));
}

body.user-body-workspace .workspace-layout {
    flex: 1 1 auto;
    min-height: 0;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
    gap: 14px;
}

body.user-body-workspace .workspace-left-panel,
body.user-body-workspace .workspace-browser {
    min-width: 0;
    min-height: 0;
}

body.user-body-workspace .workspace-hub {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px 12px 14px 14px;
}

body.user-body-workspace .workspace-home-header {
    flex: 0 0 auto;
    padding: 6px 6px 14px 4px;
}

body.user-body-workspace .workspace-brand-row {
    grid-template-columns: 46px minmax(0, 1fr) auto 42px;
    gap: 12px;
}

body.user-body-workspace .workspace-brand-row h1 {
    font-size: 1.04rem;
    letter-spacing: 0;
}

body.user-body-workspace .workspace-hub .surface-switcher-user {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
}

body.user-body-workspace .workspace-hub .surface-switcher-user .surface-switcher-link {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
}

body.user-body-workspace .workspace-hub .surface-switcher-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}

body.user-body-workspace .workspace-hub .surface-switcher-logout-icon {
    width: 20px;
    height: 19px;
    flex-basis: 20px;
}

body.user-body-workspace .workspace-browser {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 18px;
    border-radius: var(--user-radius-lg);
}

.workspace-identity-summary {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.workspace-identity-summary div:last-child {
    min-width: 0;
}

.workspace-identity-summary h2,
.workspace-identity-summary p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-identity-summary h2 {
    color: var(--zn-member-text-primary);
    font-size: clamp(1.35rem, 2vw, 1.86rem);
    font-weight: 850;
    letter-spacing: 0;
}

.workspace-identity-summary p {
    margin-top: 4px;
    color: var(--zn-member-text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.workspace-identity-avatar {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
}

body.user-body-workspace:has(.workspace-calendar-shell) .workspace-layout {
    display: grid;
    grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
    gap: 14px;
}

body.user-body-workspace:has(.workspace-calendar-shell) .workspace-browser {
    flex: initial;
}

body.user-body-workspace .workspace-hub .workspace-subtabs {
    width: 100%;
    margin-top: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-self: stretch;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
}

body.user-body-workspace .workspace-hub .workspace-subtab {
    min-height: 48px;
    border-radius: 14px;
    font-size: 0.86rem;
}

body.user-body-meetings .meeting-hub .workspace-subtabs {
    width: 100%;
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: stretch;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
}

body.user-body-meetings .meeting-hub .workspace-subtab {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-radius: 14px;
    font-size: 0.86rem;
    white-space: nowrap;
}

.workspace-sidebar-tools,
.workspace-current-location {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.workspace-sidebar-tools .pane-kicker,
.workspace-current-location .pane-kicker {
    margin-top: 4px;
    margin-bottom: 2px;
}

.workspace-tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.workspace-tool-card {
    min-width: 0;
    min-height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-surface-hover);
    color: var(--zn-member-text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.workspace-tool-card:hover,
.workspace-tool-card.is-active {
    border-color: var(--zn-member-accent-border);
    background: var(--zn-member-accent-surface);
    color: var(--zn-member-text-primary);
}

.workspace-tool-card.is-active .workspace-tool-icon {
    color: var(--zn-member-text-link);
}

.workspace-tool-card:disabled,
.workspace-tool-card.is-disabled {
    color: var(--zn-member-text-muted);
    cursor: not-allowed;
    opacity: 0.58;
}

.workspace-tool-card.is-disabled:hover {
    border-color: var(--zn-member-border);
    background: var(--zn-member-bg-surface-hover);
}

.workspace-file-open-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.72;
}

.workspace-tool-icon {
    width: 24px;
    height: 24px;
    color: var(--zn-member-accent-text);
}

.workspace-tool-permission-alert {
    margin: 10px 0 0;
    padding: 9px 10px;
    border: 1px solid color-mix(in srgb, var(--zn-warning-border) 70%, transparent);
    border-radius: var(--user-radius-sm);
    color: var(--zn-member-warning-text);
    background: color-mix(in srgb, var(--zn-warning-soft) 74%, transparent);
    font-size: 0.82rem;
    line-height: 1.35;
}

.workspace-tool-permission-alert[hidden] {
    display: none;
}

.workspace-sidebar-search {
    margin-top: 6px;
    min-height: 52px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-surface);
    color: var(--zn-member-text-muted);
}

.workspace-sidebar-search-icon {
    width: 19px;
    height: 19px;
}

.workspace-sidebar-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--zn-member-text-primary);
    font-size: 0.84rem;
}

.workspace-current-path {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--zn-member-text-link);
    font-size: 0.82rem;
    line-height: 1.35;
}

.workspace-current-path-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--zn-member-text-secondary);
}

.workspace-sidebar-account {
    min-width: 0;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-surface);
}

.workspace-sidebar-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--zn-member-border);
    background: var(--zn-member-bg-surface-hover);
    color: var(--zn-member-text-primary);
    font-weight: 800;
    text-transform: uppercase;
}

.workspace-sidebar-account div {
    min-width: 0;
}

.workspace-sidebar-account strong,
.workspace-sidebar-account span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-sidebar-account span {
    margin-top: 3px;
    color: var(--zn-member-text-muted);
    font-size: 0.78rem;
}

.workspace-storage-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 0.92fr);
    align-items: start;
    gap: 18px;
}

.workspace-storage-hero .workspace-header-copy h2 {
    margin-top: 4px;
    font-size: clamp(1.35rem, 2vw, 1.86rem);
    letter-spacing: 0;
}

.workspace-stat-strip {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-surface);
}

.workspace-stat-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
    padding: 0 14px;
    border-right: 1px solid var(--zn-member-border-muted);
}

.workspace-stat-card:last-child {
    border-right: 0;
}

.workspace-stat-icon {
    grid-row: 1 / span 2;
    width: 22px;
    height: 22px;
    color: var(--zn-member-text-link);
}

.workspace-stat-card dt {
    grid-column: 2;
    grid-row: 2;
    color: var(--zn-member-text-muted);
    font-size: 0.76rem;
}

.workspace-stat-card dd {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    overflow: hidden;
    color: var(--zn-member-text-primary);
    font-size: 1rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-breadcrumb-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--zn-member-text-secondary);
}

.workspace-breadcrumb-icon {
    width: 18px;
    height: 18px;
}

body.user-body-workspace .workspace-action-bar {
    display: block;
}

body.user-body-workspace .workspace-action-bar[hidden] {
    display: none;
}

.workspace-action-panel {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-md);
    background: var(--zn-member-bg-card);
}

.workspace-action-panel[hidden] {
    display: none;
}

.workspace-action-panel-copy {
    min-width: 0;
}

.workspace-action-panel-copy strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--zn-member-text-primary);
    font-size: 0.98rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.user-body-workspace .workspace-create-folder-form,
body.user-body-workspace .workspace-upload-form {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.user-body-workspace .workspace-create-folder-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

body.user-body-workspace .workspace-upload-dropzone {
    margin-top: 0;
    grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr) auto;
}

[data-workspace-filter-row][hidden] {
    display: none;
}

@media (max-width: 1180px) {
    .workspace-storage-hero {
        grid-template-columns: 1fr;
    }
}

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

    body.user-body-workspace .user-shell {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
        padding: 0;
        gap: 0;
    }

    body.user-body-workspace .workspace-layout,
    body.user-body-workspace:has(.workspace-calendar-shell) .workspace-layout {
        width: 100%;
        max-width: none;
        margin: 0;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 0 calc(18px + env(safe-area-inset-bottom));
    }

    body.user-body-workspace .workspace-left-panel,
    body.user-body-workspace .workspace-browser {
        width: 100%;
        min-width: 0;
    }

    body.user-body-workspace .workspace-hub {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding: 0 0 12px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    body.user-body-workspace .workspace-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-workspace .workspace-brand-row {
        grid-template-columns: 44px minmax(0, 1fr) auto 42px;
        gap: 10px;
        height: 42px;
        min-height: 42px;
    }

    body.user-body-workspace .workspace-brand-row .topbar-title-mark,
    body.user-body-workspace .workspace-brand-row .topbar-title-mark-image {
        width: 44px;
        height: 44px;
    }

    body.user-body-workspace .workspace-brand-row .topbar-title-mark {
        align-self: center;
        flex-basis: 44px;
        margin-top: 0;
        border-radius: 9px;
    }

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

    body.user-body-workspace .workspace-hub .surface-switcher-user {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 0;
        scrollbar-width: none;
    }

    body.user-body-workspace .workspace-hub .surface-switcher-user::-webkit-scrollbar {
        display: none;
    }

    body.user-body-workspace .workspace-hub .workspace-subtabs,
    body.user-body-workspace .workspace-sidebar-tools,
    body.user-body-workspace .workspace-sidebar-search,
    body.user-body-workspace .workspace-current-location {
        width: auto;
        margin-right: max(16px, env(safe-area-inset-right));
        margin-left: max(16px, env(safe-area-inset-left));
    }

    body.user-body-workspace .workspace-browser {
        overflow: visible;
        padding:
            14px
            max(16px, env(safe-area-inset-right))
            14px
            max(16px, env(safe-area-inset-left));
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
    }

    .workspace-sidebar-account {
        margin-top: 0;
    }

    .workspace-stat-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-stat-card:nth-child(2) {
        border-right: 0;
    }

    .workspace-stat-card:nth-child(n + 3) {
        margin-top: 12px;
    }

    .workspace-action-panel {
        grid-template-columns: 1fr;
    }

    body.user-body-workspace .workspace-upload-dropzone {
        grid-template-columns: 1fr;
    }

    body.user-body-workspace .workspace-share-panel {
        min-width: 0;
        overflow: hidden;
    }

    body.user-body-workspace .workspace-share-header,
    body.user-body-workspace .workspace-acl-row {
        align-items: stretch;
        flex-direction: column;
    }

    body.user-body-workspace .workspace-share-form,
    body.user-body-workspace .workspace-acl-form {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-body-workspace .workspace-permission-toggle,
    body.user-body-workspace .workspace-acl-form label,
    body.user-body-workspace .workspace-share-button {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }

    body.user-body-workspace .workspace-row {
        width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    body.user-body-workspace .workspace-row-main,
    body.user-body-workspace .workspace-row-copy,
    body.user-body-workspace .workspace-file-actions,
    body.user-body-workspace .workspace-item-actions {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.user-body-workspace .workspace-row-copy strong,
    body.user-body-workspace .workspace-row-copy span {
        max-width: 100%;
    }

    body.user-body-workspace .workspace-item-actions {
        flex: 0 0 auto;
        align-self: stretch;
        grid-template-columns: minmax(0, 1fr);
        padding-left: 0;
    }

    body.user-body-workspace .workspace-item-actions > form,
    body.user-body-workspace .workspace-inline-form {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.user-body-workspace .workspace-inline-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    body.user-body-workspace .workspace-action-input,
    body.user-body-workspace .workspace-action-select,
    body.user-body-workspace .workspace-compact-button {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    body.user-body-workspace .workspace-brand-row {
        grid-template-columns: 44px minmax(0, 1fr) auto 42px;
        gap: 10px;
    }

    body.user-body-workspace .workspace-brand-row h1 {
        font-size: 1.14rem;
    }

    .workspace-tool-grid,
    .workspace-stat-strip {
        grid-template-columns: 1fr;
    }

    .workspace-stat-card,
    .workspace-stat-card:nth-child(2) {
        padding: 10px 0;
        border-right: 0;
        border-bottom: 1px solid var(--zn-member-border-muted);
    }

    .workspace-stat-card:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 760px) {
    body.user-body-workspace .workspace-owner-landing {
        min-height: 460px;
        padding: 16px;
        border-radius: 14px;
    }

    body.user-body-workspace .workspace-owner-landing-header {
        align-items: stretch;
        flex-direction: column;
    }

    body.user-body-workspace .workspace-owner-search {
        width: 100%;
        min-width: 0;
    }

    body.user-body-workspace .workspace-owner-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body.user-body-workspace .workspace-owner-card {
        min-height: 92px;
        grid-template-columns: 74px minmax(0, 1fr);
        justify-items: start;
        align-content: center;
        text-align: left;
    }

    body.user-body-workspace .workspace-owner-card .workspace-row-icon {
        width: 72px;
        height: 56px;
    }

    body.user-body-workspace .workspace-owner-card .workspace-row-icon-folder::before {
        top: 7px;
        left: 8px;
        width: 29px;
        height: 13px;
    }

    body.user-body-workspace .workspace-owner-card .workspace-row-icon-folder::after {
        top: 15px;
        left: 2px;
        width: 68px;
        height: 40px;
    }

    body.user-body-workspace .workspace-finder-window {
        min-height: 520px;
        border-radius: 14px;
    }

    body.user-body-workspace .workspace-finder-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
        padding: 10px;
    }

    body.user-body-workspace .workspace-finder-nav,
    body.user-body-workspace .workspace-finder-toolbar-center {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    body.user-body-workspace .workspace-finder-nav::-webkit-scrollbar,
    body.user-body-workspace .workspace-finder-toolbar-center::-webkit-scrollbar {
        display: none;
    }

    body.user-body-workspace .workspace-finder-toolbar-button {
        min-height: 32px;
        padding: 0 9px;
        font-size: 0.82rem;
    }

    body.user-body-workspace .workspace-share-popover,
    body.user-body-workspace .workspace-finder-action-popover {
        position: fixed;
        top: 88px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: calc(100vh - 116px);
        border-radius: 14px;
    }

    body.user-body-workspace .workspace-share-form,
    body.user-body-workspace .workspace-acl-form {
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-body-workspace .workspace-explorer-table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 18px;
        padding: 24px 18px;
    }

    body.user-body-workspace .workspace-explorer-row {
        min-height: 150px;
        padding: 8px 4px;
    }

    body.user-body-workspace .workspace-icon-danger-button {
        width: 36px;
        height: 36px;
    }
}

@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);
    }

    body[class*="user-body-"] .surface-switcher-user .surface-switcher-link.surface-switcher-operator {
        border-color: color-mix(in srgb, var(--zn-success, #33c27f) 42%, var(--zn-member-border));
        box-shadow:
            0 0 0 1px color-mix(in srgb, var(--zn-success, #33c27f) 18%, transparent),
            0 0 22px color-mix(in srgb, var(--zn-success, #33c27f) 22%, transparent);
    }

    body[class*="user-body-"] .surface-switcher-user .surface-switcher-link.surface-switcher-operator.is-active {
        box-shadow:
            0 0 0 1px color-mix(in srgb, var(--zn-success, #33c27f) 26%, transparent),
            0 0 28px color-mix(in srgb, var(--zn-success, #33c27f) 28%, transparent);
    }
}
