.vu-shell:has(.vu-chat-page) { grid-template-columns: 16.5rem minmax(0, 1fr); }
body:has(.vu-chat-page) .vu-compose-launch { display: none; }
.vu-chat-page { height: 100dvh; display: flex; flex-direction: column; min-width: 0; }
.fi-panel-vulture .vu-chat-page :is(a, button, input, select, textarea):focus { outline: none; box-shadow: none; }
.vu-chat-page > .vu-page-header { flex: 0 0 3.5rem; position: relative; }
.vu-chat-actions { display: flex; align-items: center; gap: .3rem; }
.vu-chat-workspace { display: grid; grid-template-columns: 14rem minmax(0, 1fr); flex: 1; min-height: 0; }
.vu-chat-sidebar { border-right: 1px solid var(--az-border); min-height: 0; overflow: auto; }
.vu-chat-conversation { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--az-border); cursor: pointer; }
.vu-chat-conversation:hover, .vu-chat-conversation.vu-selected { background: var(--az-hover); }
.vu-chat-conversation > span:nth-child(2) { min-width: 0; flex: 1; }
.vu-chat-conversation strong, .vu-chat-conversation small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-chat-conversation strong { font-size: .85rem; font-weight: 700; }
.vu-chat-conversation small { font-size: .72rem; margin-top: .125rem; color: var(--vu-muted); }
.vu-chat-conversation-symbol { width: 1.75rem; height: 1.75rem; display: grid; place-items: center; font-size: 1.3rem; color: var(--vu-muted); flex-shrink: 0; }
.vu-chat-count { border-radius: 999px; background: var(--az-accent); color: var(--az-main); min-width: 1.2rem; padding: .15rem .25rem; font-size: .65rem; text-align: center; font-weight: 750; }
.vu-chat-thread { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.vu-chat-drop-overlay { position: absolute; inset: .5rem; z-index: 20; display: grid; place-items: center; padding: 1rem; border: 2px dashed var(--az-accent); border-radius: .75rem; background: color-mix(in srgb, var(--az-main) 90%, transparent); color: var(--az-accent); pointer-events: none; }
.vu-chat-drop-overlay span { font-size: .95rem; font-weight: 650; text-align: center; }
.vu-chat-public { flex: 1; }
.vu-chat-thread-header { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--az-border); min-height: 4rem; }
.vu-chat-thread-header > div { flex: 1; min-width: 0; }
.vu-chat-thread-header > .vu-chat-actions { flex: 0 0 auto; }
.vu-chat-thread-header h2 { font-size: .95rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-chat-thread-header p { font-size: .7rem; color: var(--vu-muted); margin-top: .2rem; }
.vu-chat-back { display: none; }
.vu-chat-messages { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 1rem; scrollbar-gutter: stable; }
.vu-chat-date-divider { display: flex; align-items: center; gap: .75rem; width: 100%; margin: 1.25rem 0; color: var(--vu-muted); font-size: .75rem; font-weight: 600; }
.vu-chat-date-divider::before, .vu-chat-date-divider::after { content: ''; flex: 1; min-width: 0; border-top: 1px solid var(--az-border); }
.vu-chat-date-divider time { flex-shrink: 0; white-space: nowrap; }
.vu-chat-message { margin: .4rem 0 1.15rem; max-width: 88%; width: fit-content; min-width: 7rem; }
.vu-chat-own { margin-left: auto; }
.vu-chat-message-group { margin: .4rem 0 1.15rem; max-width: 88%; width: fit-content; min-width: 7rem; }
.vu-chat-message-group.vu-chat-own { margin-left: auto; }
.vu-chat-group-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.vu-chat-own > .vu-chat-group-stack { align-items: flex-end; }
.vu-chat-group-stack > .vu-chat-message { width: fit-content; max-width: 100%; margin: 0; }
.vu-chat-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .7rem; margin: 0 .2rem .35rem; }
.vu-chat-message-meta a { font-weight: 650; }
.vu-chat-author { display: inline-flex; align-items: center; gap: .15rem; min-width: 0; }
.vu-chat-author > span:first-child { overflow-wrap: anywhere; min-width: 0; }
.vu-chat-author > [role="img"] { flex-shrink: 0; }
.vu-chat-message-meta time { color: var(--vu-muted); font-size: .65rem; }
.vu-chat-bubble { border: 1px solid var(--az-border); border-radius: .75rem; padding: .65rem .8rem; min-width: 0; overflow: hidden; }
.vu-chat-own .vu-chat-bubble { background: var(--az-hover); }
.vu-chat-message-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.5; }
.vu-chat-custom-emoji { display: inline-block; width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: -.2em; }
.vu-chat-message-footer { display: flex; align-items: center; gap: .3rem; min-height: 1.6rem; margin-top: .2rem; flex-wrap: wrap; }
.vu-chat-message-tools { display: flex; align-items: center; opacity: .5; }
.vu-chat-message:hover .vu-chat-message-tools, .vu-chat-message:focus-within .vu-chat-message-tools { opacity: 1; }
.vu-chat-message-tools .vu-post-icon { width: 1.65rem; height: 1.65rem; }
.vu-chat-message-tools .fi-icon { width: 1rem; height: 1rem; }
.vu-chat-read { color: var(--vu-muted); font-size: .6rem; margin-left: auto; }
.vu-chat-reactions { display: flex; gap: .2rem; flex-wrap: wrap; }
.vu-chat-reactions button { display: flex; align-items: center; gap: .25rem; padding: .15rem .4rem; border: 1px solid var(--az-border); border-radius: 999px; font-size: .8rem; cursor: pointer; }
.vu-chat-reactions button.vu-selected { border-color: var(--az-accent); background: var(--az-hover); }
.vu-chat-reactions small { font-size: .65rem; }
.vu-chat-images { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; margin-top: .3rem; width: min(22rem, 100%); }
.vu-chat-images-many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vu-chat-images button { min-width: 0; border-radius: 0; overflow: hidden; background: var(--az-hover); cursor: pointer; }
.vu-chat-images img { width: 100%; max-height: 24rem; object-fit: cover; }
.vu-chat-images-many img { height: 9rem; }
.vu-chat-composer { position: relative; padding: .7rem 1rem; border-top: 1px solid var(--az-border); flex-shrink: 0; }
.vu-chat-input { position: relative; }
.vu-chat-mention-options { position: absolute; bottom: calc(100% + .35rem); left: 0; right: 0; z-index: 30; background: var(--az-main); max-height: min(15rem, 40dvh); font-size: .85rem; }
.vu-chat-composer textarea { width: 100%; display: block; resize: none; min-height: 2.5rem; max-height: min(10rem, 30dvh); overflow-x: hidden; overflow-y: hidden; overflow-wrap: anywhere; background: transparent; border: 0; outline: none; font-size: .9rem; line-height: 1.45; }
.vu-chat-composer-footer { display: flex; align-items: center; gap: .2rem; }
.vu-chat-status { flex: 1; color: var(--vu-muted); font-size: .7rem; }
.vu-chat-length { font-size: .65rem; color: var(--vu-muted); }
.vu-chat-too-long, .vu-chat-danger { color: #dc2626; }
.vu-chat-send { margin-left: .5rem; }
.vu-chat-page button:disabled { opacity: .4; cursor: default; }
.vu-chat-composer .vu-compose-images { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 9rem; justify-content: start; margin: 0 0 .75rem; padding-bottom: .35rem; overflow-x: auto; overflow-y: hidden; }
.vu-chat-composer .vu-compose-images img { object-position: center; }
.vu-chat-composer .vu-emoji-picker { bottom: calc(100% + .5rem); top: auto; left: 0; z-index: 15; }
.vu-chat-muted { font-size: .85rem; line-height: 1.5; color: var(--vu-muted); }
.vu-chat-pad { padding: 1rem; }
.vu-chat-empty { margin: 4rem 1rem; text-align: center; font-size: .85rem; color: var(--vu-muted); }
.vu-chat-older { display: block; margin: 0 auto 1rem; }
.vu-chat-loading { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 4rem 1rem; color: var(--vu-muted); font-size: .9rem; }
.vu-chat-loading .fi-loading-indicator { width: 1.25rem; height: 1.25rem; }
.vu-chat-remember { display: flex; align-items: flex-start; gap: .5rem; font-size: .8rem; line-height: 1.5; }
.vu-chat-remember input { margin-top: .2rem; flex-shrink: 0; }
.vu-chat-invitations { padding: .8rem; border-bottom: 1px solid var(--az-border); }
.vu-chat-invitations h2 { font-size: .8rem; font-weight: 750; }
.vu-chat-invitation { padding: .7rem 0; font-size: .8rem; }
.vu-chat-invitation > strong, .vu-chat-invitation > small { display: block; margin-bottom: .3rem; overflow-wrap: anywhere; }
.vu-chat-invitation small { color: var(--vu-muted); }
.vu-chat-invitation > div { display: flex; gap: 1rem; font-size: .75rem; }
.vu-chat-invitation button { cursor: pointer; text-decoration: underline; }
.vu-chat-person { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: .8rem 0; border-bottom: 1px solid var(--az-border); font-size: .9rem; }
button.vu-chat-person { cursor: pointer; }
.vu-chat-person .fi-icon { width: 1rem; height: 1rem; }
.vu-chat-person small { color: var(--vu-muted); font-size: .7rem; }
.vu-chat-people-results { max-height: min(24rem, 50dvh); overflow-y: auto; border-block: 1px solid var(--az-border); padding: .25rem 0; }
.vu-chat-person-option { min-height: 2.75rem; padding: .35rem .25rem; border: 0; text-align: left; }
.vu-chat-person-option:hover, .vu-chat-person-option:focus-visible { background: var(--az-hover); }
.vu-chat-person-option > .fi-icon { flex-shrink: 0; }
.vu-chat-person-identity { display: grid; min-width: 0; }
.vu-chat-person-identity > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-chat-members { display: grid; gap: .7rem; margin-top: 1.5rem; }
.vu-chat-members h3 { font-weight: 750; font-size: .9rem; }
.vu-chat-members .vu-text-button { text-align: left; }
.vu-chat-member-list { border-block: 1px solid var(--az-border); padding: .375rem 0; }
.vu-chat-member { display: flex; align-items: center; gap: .65rem; min-height: 2.75rem; padding: .125rem 0; font-size: .9rem; }
.vu-chat-member-info { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; }
.vu-chat-member-label { display: inline-flex; align-items: center; gap: .2rem; min-width: 0; }
.vu-chat-member .vu-chat-avatar, .vu-chat-person-option .vu-chat-avatar { width: 2rem; height: 2rem; background: var(--az-hover); color: var(--vu-muted); }
.vu-chat-member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-chat-member .vu-chat-actions { flex-shrink: 0; }
.vu-chat-details { background: transparent; border: 1px solid var(--az-border); border-radius: .5rem; padding: .65rem; width: 100%; }
@media (max-width: 1240px) { .vu-shell:has(.vu-chat-page) { grid-template-columns: 4.75rem minmax(0, 1fr); } }
@media (max-width: 760px) {
    .vu-shell:has(.vu-chat-page) { grid-template-columns: minmax(0, 1fr); }
    .vu-chat-page { height: 100%; min-height: 0; }
    .vu-chat-workspace { display: flex; }
    .vu-chat-sidebar { display: none; width: 100%; border-right: 0; }
    .vu-chat-thread { width: 100%; }
    .vu-chat-show-list .vu-chat-sidebar { display: block; }
    .vu-chat-show-list .vu-chat-thread { display: none; }
    .vu-chat-back { display: grid; }
    .vu-chat-thread-header { padding: .6rem .65rem; }
    .vu-chat-composer { padding: .6rem .7rem; }
    .vu-chat-messages { padding: .8rem .6rem; }
    .vu-chat-message, .vu-chat-message-group { max-width: 94%; }
    .vu-chat-message-tools { opacity: .75; }
    .vu-chat-images-many img { height: 7.5rem; }
}

.vu-chat-people-search { transition: box-shadow 200ms ease, border-color 200ms ease; }
.vu-chat-search-spinner { width: 1rem; height: 1rem; }
@media (prefers-reduced-motion: reduce) { .vu-chat-people-search { transition: none; } }

.vu-chat-avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; flex-shrink: 0; border-radius: 50%; overflow: hidden; }
.fi-panel-vulture .fi-modal-window .vu-chat-avatar { border-radius: 50% !important; }
.vu-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vu-chat-avatar .fi-icon { width: 1rem; height: 1rem; }

.vu-chat-pending .vu-chat-bubble, .vu-chat-pending .vu-chat-message-meta { opacity: .55; }
.vu-chat-message-tools.vu-chat-pending-tools { opacity: 1; }
.vu-chat-send-spinner { width: 1rem; height: 1rem; }

.vu-chat-gif-control { display: flex; flex-shrink: 0; }
.vu-chat-gif-picker { position: absolute; right: .75rem; bottom: calc(100% + .5rem); z-index: 40; display: flex; flex-direction: column; width: min(25rem, calc(100vw - 2rem)); max-height: min(34rem, 70dvh); background: var(--az-main); border: 1px solid var(--az-border); box-shadow: 0 .5rem 1.75rem #0004; }
.vu-chat-gif-search { display: flex; align-items: center; gap: .5rem; padding: .6rem .65rem; border-bottom: 1px solid var(--az-border); }
.vu-chat-gif-search > .fi-icon { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--vu-muted); }
.vu-chat-gif-search input { flex: 1; min-width: 0; padding: .3rem 0; border: 0; border-radius: 0; outline: 0; box-shadow: none; background: transparent; color: var(--vu-text); font-size: .875rem; }
.vu-chat-gif-search input::placeholder { color: var(--vu-muted); }
.vu-chat-gif-search .vu-post-icon { width: 1.75rem; height: 1.75rem; }
.vu-chat-gif-tabs { flex-shrink: 0; border-top: 0; border-bottom: 1px solid var(--az-border); }
.vu-chat-gif-results { min-height: 0; height: min(24rem, 45dvh); overflow-y: auto; overscroll-behavior: contain; padding: .6rem .6rem 2.5rem; }
.vu-chat-gif-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.vu-chat-gif-tile { position: relative; min-width: 0; background: var(--az-hover); }
.vu-chat-gif-choice { display: block; width: 100%; height: 8.5rem; cursor: pointer; }
.vu-chat-gif-choice img { display: block; width: 100%; height: 100%; object-fit: cover; }
:is(.vu-chat-gif-tile, .vu-chat-gif) .vu-chat-gif-favorite { position: absolute; top: .25rem; right: .25rem; width: 1.7rem; height: 1.7rem; background: #000b; color: #fff; }
.vu-chat-gif-favorite > svg { width: 1rem; height: 1rem; }
.vu-chat-gif-saved { color: #e9bc4b; }
.vu-chat-gif-loading, .vu-chat-gif-empty, .vu-chat-gif-error { display: flex; align-items: center; justify-content: center; min-height: 10rem; padding: 1.25rem; text-align: center; gap: .75rem; }
.vu-chat-gif-loading > svg { width: 1.5rem; height: 1.5rem; color: var(--vu-muted); }
.vu-chat-gif-empty, .vu-chat-gif-error { flex-direction: column; color: var(--vu-muted); font-size: .85rem; }
.vu-chat-gif-empty > .fi-icon { width: 2rem; height: 2rem; }
.vu-chat-gif-error { color: #dc2626; }
.vu-chat-gif-results .vu-chat-gif-more { margin: .5rem auto 0; }
.vu-chat-gif-attribution { position: absolute; right: .85rem; bottom: .5rem; display: block; opacity: .8; }
.vu-chat-gif-attribution img { display: block; width: 7.5rem; height: auto; filter: invert(1); }
.dark .vu-chat-gif-attribution img { filter: none; }
.vu-chat-page .vu-chat-gif-picker button:focus-visible { outline: 2px solid var(--az-accent); outline-offset: -2px; }
.vu-chat-gif { position: relative; width: min(20rem, 58vw, calc(20rem * var(--vu-chat-gif-ratio))); max-width: 100%; }
.vu-chat-gif-open { display: block; width: 100%; cursor: pointer; }
.vu-chat-gif-open img { display: block; width: 100%; height: auto; max-height: 20rem; object-fit: contain; }
.vu-chat-gif-unavailable { padding: 1.5rem .5rem; font-size: .85rem; color: var(--vu-muted); }
@media (max-width: 760px) {
    .vu-chat-gif-picker { right: .5rem; width: calc(100% - 1rem); }
    .vu-chat-gif-choice { height: 7.5rem; }
}
