.chat-page {
    --chat-rail: 248px;
    --chat-roster: 232px;
    width: 100vw;
    max-width: 100vw;
    height: calc(100vh - var(--nav-h) - var(--dock-clear, 0px));
    margin: 0 calc(50% - 50vw) calc(var(--page-pad-b) * -1);
    padding: 0 max(var(--gutter), calc((100vw - 1360px) / 2 + var(--gutter))) 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-shell {
    display: grid;
    grid-template-columns: var(--chat-rail) minmax(0, 1fr) var(--chat-roster);
    grid-template-rows: minmax(0, 1fr);
    flex: 1;
    min-height: 0;
}

.chat-page.in-call {
    --chat-roster: 456px;
}

.chat-rooms,
.chat-roster {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.chat-rooms {
    padding-right: 18px;
    border-right: 1px solid var(--hairline);
}

.chat-roster {
    padding-left: 18px;
    border-left: 1px solid var(--hairline);
    overflow: hidden auto;
}

.chat-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 56px;
    padding: 10px 0 8px 12px;
}

.chat-col-title {
    margin: 0;
    font-family: var(--font-text);
    font-size: var(--step-0);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
}

.chat-rooms-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.chat-scroll::-webkit-scrollbar,
.chat-room-list::-webkit-scrollbar,
.chat-roster::-webkit-scrollbar,
.chat-emoji-grid::-webkit-scrollbar,
.chat-stash-list::-webkit-scrollbar,
.vstage::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.chat-muted {
    margin: 8px 12px;
    color: var(--ink-3);
    font-size: var(--step-0);
}

.chat-center {
    align-self: center;
    text-align: center;
}

/* rooms */

.chat-room-list {
    flex: 1;
    min-height: 0;
    overflow: hidden auto;
    display: flex;
    flex-direction: column;
}

.room-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 56px;
    padding: 8px 10px 8px 12px;
    border-top: 1px solid var(--hairline);
    border-radius: var(--r-1);
    color: var(--ink-2);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.room-row:last-child {
    border-bottom: 1px solid var(--hairline);
}

.room-row:hover {
    background: var(--wash);
    color: var(--ink);
}

.room-active,
.room-active:hover {
    background: var(--wash-strong);
    color: var(--ink);
    box-shadow: inset 1px 0 0 rgb(var(--sun-rgb));
}

.room-hash {
    flex: none;
    color: var(--ink-3);
    font-size: var(--step-1);
    font-weight: 700;
    line-height: 1;
}

.room-active .room-hash {
    color: rgb(var(--sun-rgb));
}

.room-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.room-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: var(--step-0);
    font-weight: 600;
}

.room-active .room-name,
.room-unread-on .room-name {
    color: var(--ink);
    font-weight: 700;
}

.room-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-lock {
    display: inline-flex;
    flex: none;
    color: var(--ink-3);
}

.room-lock svg {
    width: 13px;
    height: 13px;
}

.room-last {
    overflow: hidden;
    color: var(--ink-3);
    font-size: var(--step--1);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-unread-on .room-last {
    color: var(--ink-2);
}

.room-sig {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
}

.room-sig:empty {
    display: none;
}

.room-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--live);
    color: var(--live-ink);
    font-size: var(--step--1);
    font-weight: 700;
    line-height: 1;
}

.room-voice {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--live);
    font-size: var(--step--1);
    font-weight: 700;
}

.room-voice svg {
    display: block;
}

/* new room, browse, invites */

.chat-newroom,
.chat-browse,
.chat-invite-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 12px 16px;
    border-bottom: 1px solid var(--hairline);
}

.chat-visibility {
    display: flex;
    gap: 6px;
}

.chat-vis {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-2);
    background: none;
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chat-vis:hover {
    background: var(--wash);
    color: var(--ink);
}

.chat-vis[aria-pressed="true"] {
    background: var(--wash-strong);
    border-color: rgb(var(--sun-rgb) / 0.8);
    color: var(--ink);
}

.chat-newroom-hint {
    margin: 0;
    color: var(--ink-3);
    font-size: var(--step--1);
}

.chat-invite-list {
    display: flex;
    flex-direction: column;
    max-height: 220px;
    overflow: hidden auto;
}

.chat-invite-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 4px 4px 4px 2px;
    border: 0;
    border-top: 1px solid var(--hairline);
    border-radius: var(--r-1);
    background: none;
    color: var(--ink);
    font-size: var(--step-0);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-invite-row:hover {
    background: var(--wash);
}

.chat-invite-row[aria-pressed="true"] {
    background: var(--wash-strong);
}

.chat-invite-mark {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
}

.chat-invite-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-invite-check,
.chat-invite-add {
    display: inline-flex;
    flex: none;
    width: 24px;
    justify-content: center;
    color: var(--ink-3);
}

.chat-invite-row[aria-pressed="true"] .chat-invite-check {
    color: rgb(var(--sun-rgb));
}

.chat-invite-row:hover .chat-invite-add {
    color: var(--ink);
}

.chat-invite-head,
.chat-browse-head,
.roster-private {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--ink-2);
    font-size: var(--step-0);
    font-weight: 600;
}

.chat-browse-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 52px;
    padding: 6px 0;
    border-top: 1px solid var(--hairline);
}

.chat-browse-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.chat-browse-name {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    font-size: var(--step-0);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-browse-count {
    color: var(--ink-3);
    font-size: var(--step--1);
}

/* room header */

.chat-main {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 0 18px;
}

.chat-head {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 10px 0 8px;
    border-bottom: 1px solid var(--hairline);
}

.chat-head-title {
    display: flex;
    align-items: baseline;
    gap: 14px;
    min-width: 0;
}

.chat-h1 {
    min-width: 0;
    overflow: hidden;
    font-size: var(--step-2);
    font-stretch: 116%;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    text-wrap: nowrap;
    white-space: nowrap;
}

.chat-h1-hash {
    margin-right: 2px;
    color: rgb(var(--sun-rgb));
}

.chat-topic {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--ink-3);
    font-size: var(--step--1);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-head-tools {
    display: flex;
    flex: none;
    align-items: center;
    gap: 6px;
}

.chat-conn {
    padding-right: 6px;
    color: var(--live);
    font-size: var(--step--1);
    font-weight: 600;
}

.chat-voice-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 6px;
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
    white-space: nowrap;
}

.chat-hop {
    min-height: 40px;
    padding: 0 16px;
}

/* voice pre-join sheet */

.voice-sheet {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(380px, 100%);
    padding: 20px 20px 18px;
    border: 1px solid var(--hairline);
    border-top-color: rgb(var(--sun-rgb) / 0.32);
    border-radius: var(--r-3);
    background: rgb(var(--deep-rgb) / 0.97);
    box-shadow: var(--shadow-2);
    animation: menu-in 0.18s var(--ease-out);
}

.voice-sheet-head {
    display: grid;
    gap: 6px;
}

.voice-sheet-title {
    font-family: var(--font-text);
    font-size: var(--step-2);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
}

.voice-sheet-lead {
    margin: 0;
    color: var(--ink-2);
    font-size: var(--step-0);
}

.voice-sheet-mic select {
    padding-right: 24px;
}

.voice-you {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
}

.voice-you-mark {
    width: 52px;
    height: 52px;
    font-size: var(--step-1);
    outline: 3px solid transparent;
    outline-offset: 3px;
    transition: outline-color 0.15s ease;
}

.voice-you.is-speaking .voice-you-mark {
    outline-color: var(--live);
}

.voice-you-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.voice-you-name {
    overflow: hidden;
    font-size: var(--step-0);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-you-name small {
    color: var(--ink-2);
    font-size: inherit;
    font-weight: 400;
}

.voice-meter {
    display: block;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(var(--sun-rgb) / 0.14);
    box-shadow: inset 0 0 0 1px var(--hairline);
}

.voice-meter-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--live);
    transform: scaleX(0);
    transform-origin: left center;
}

.voice-meter.is-off .voice-meter-fill {
    display: none;
}

.voice-sheet-note {
    min-height: 1.5em;
    margin: -6px 0 0;
    color: var(--ink-3);
    font-size: var(--step--1);
}

.voice-sheet-note.is-warn {
    color: var(--alert-soft);
}

.voice-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    color: var(--ink-2);
    font-size: var(--step-0);
    cursor: pointer;
}

.voice-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.voice-switch-track {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    border: 1px solid var(--hairline-strong);
    border-radius: 999px;
    background: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.voice-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ink-2);
    transition: transform 0.2s var(--ease-out), background-color 0.2s ease;
}

.voice-switch input:checked + .voice-switch-track {
    border-color: rgb(var(--sun-rgb));
    background: var(--wash-strong);
}

.voice-switch input:checked + .voice-switch-track::after {
    background: rgb(var(--sun-rgb));
    transform: translateX(16px);
}

.voice-switch input:focus-visible + .voice-switch-track {
    outline: var(--focus-ring);
    outline-offset: 3px;
}

.voice-sheet-acts {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

/* the stream */

.chat-scroll {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 0 16px;
    overflow: hidden auto;
    overscroll-behavior: contain;
}

.chat-scroll::before {
    content: '';
    flex: 1 1 auto;
}

.chat-older {
    align-self: center;
    margin: 4px 0 16px;
}

.chat-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    align-self: center;
    margin: auto 0 48px;
    color: var(--ink);
    text-align: center;
}

.chat-empty-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border: 1px solid var(--hairline-strong);
    border-radius: 50%;
    color: rgb(var(--sun-rgb));
}

.chat-empty-mark svg {
    width: 22px;
    height: 22px;
}

.chat-empty p {
    margin: 0;
    font-size: var(--step-2);
    font-weight: 700;
}

.chat-empty-hint {
    color: var(--ink-2);
    font-size: var(--step-0);
}

.msg-list {
    display: flex;
    flex-direction: column;
}

.msg-day {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 8px;
    color: var(--ink-3);
    font-size: var(--step--1);
    font-weight: 600;
}

.msg-day::before,
.msg-day::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hairline);
}

.msg-day:first-child {
    margin-top: 0;
}

.msg {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 40px;
    column-gap: 10px;
    align-items: start;
    margin-top: 14px;
    padding: 4px 6px 4px 8px;
    border-radius: var(--r-2);
    transition: background-color 0.15s ease;
}

.msg-grouped {
    margin-top: 0;
}

.msg:hover,
.msg:focus-within {
    background: var(--wash);
}

.msg:focus-visible {
    outline: var(--focus-ring);
    outline-offset: -2px;
}

.msg-mark {
    grid-column: 1;
    width: 40px;
    height: 40px;
    margin-top: 1px;
    justify-self: end;
    font-size: var(--step--1);
}

.msg-main {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.msg-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.msg-who {
    overflow: hidden;
    color: var(--crew);
    color: color-mix(in srgb, var(--crew) 80%, var(--ink));
    font-size: var(--step-1);
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msg-time {
    flex: none;
    color: var(--ink-3);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.msg-time-gutter {
    position: absolute;
    top: 6px;
    left: 0;
    width: 52px;
    text-align: right;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.msg:hover .msg-time-gutter,
.msg:focus-within .msg-time-gutter {
    opacity: 1;
}

.msg-text {
    font-size: var(--step-1);
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.msg-pending .msg-main {
    opacity: 0.6;
}

.msg-actions {
    grid-column: 3;
    display: flex;
    justify-content: flex-end;
    align-self: start;
}

.chat-react-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--r-2);
    background: none;
    color: var(--ink-2);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.msg:hover .chat-react-add,
.msg:focus-within .chat-react-add,
.chat-react-add[aria-expanded="true"] {
    opacity: 1;
}

.chat-react-add:hover,
.chat-react-add:focus-visible {
    border-color: var(--hairline-strong);
    background: var(--wash-strong);
    color: var(--ink);
}

@media (hover: none) {
    .msg:focus-within .chat-react-add {
        opacity: 1;
    }
}

/* chat markdown */

.msg-text strong {
    font-weight: 700;
}

.msg-text s {
    color: var(--ink-2);
}

.msg-text .chat-mention {
    padding: 0 3px;
    border-radius: 3px;
    background: var(--wash-strong);
    color: var(--ink);
    font-weight: 600;
}

.msg-text .chat-code-inline {
    padding: 1px 5px;
    border: 1px solid var(--hairline);
    border-radius: 4px;
    background: rgb(var(--deep-rgb) / 0.35);
}

.msg-text .chat-code {
    max-width: 100%;
    margin: 4px 0;
    padding: 10px 12px;
    overflow-x: auto;
    border: 1px solid var(--hairline);
    border-radius: var(--r-2);
    background: rgb(var(--deep-rgb) / 0.45);
    font-size: var(--step--1);
    line-height: 1.5;
}

.msg-text .chat-code code {
    font-size: inherit;
}

.msg-text .chat-quote {
    margin: 4px 0;
    padding: 2px 0 2px 12px;
    border-left: 1px solid rgb(var(--sun-rgb) / 0.7);
    color: var(--ink-2);
}

.msg-text .chat-spoiler {
    padding: 0 4px;
    border-radius: 3px;
    background: rgb(var(--ink-rgb) / 0.22);
    color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.msg-text .chat-spoiler.revealed {
    background: var(--wash);
    color: var(--ink);
}

/* attachments and previews */

.chat-atts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 640px;
}

.chat-att-img-wrap {
    display: block;
    max-width: min(100%, 540px);
    min-width: 120px;
    min-height: 80px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--hairline);
    border-radius: var(--r-2);
    background: rgb(var(--deep-rgb) / 0.3);
    cursor: zoom-in;
}

.chat-att-img {
    display: block;
    max-width: 100%;
    max-height: 440px;
    object-fit: contain;
}

.chat-att-img:not([src]) {
    width: 200px;
    height: 120px;
    opacity: 0;
}

.chat-att {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    min-height: 44px;
    padding: 6px 12px 6px 10px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-2);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: var(--step-0);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-att:hover {
    background: var(--wash);
    border-color: rgb(var(--sun-rgb) / 0.8);
}

.chat-att > svg {
    flex: none;
    color: var(--ink-2);
}

.chat-att-name {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-att-meta {
    flex: none;
    color: var(--ink-3);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
}

.chat-att-get {
    display: inline-flex;
    flex: none;
    color: var(--ink-2);
}

.chat-att-play-badge {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--ink-deep);
}

.chat-att-play-badge svg {
    width: 14px;
    height: 14px;
}

.chat-att-pending,
.chat-att-gone {
    border-style: dashed;
    color: var(--ink-2);
    cursor: default;
}

.chat-att-pending:hover,
.chat-att-gone:hover {
    background: none;
    border-color: var(--hairline-strong);
}

.chat-att-spin {
    flex: none;
    width: 14px;
    height: 14px;
    border: 2px solid var(--hairline);
    border-top-color: rgb(var(--sun-rgb));
    border-radius: 50%;
    animation: chat-spin 0.8s linear infinite;
}

.chat-att-media {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(100%, 520px);
}

.chat-att-video,
.chat-att-audio {
    display: block;
    width: 100%;
    border: 1px solid var(--hairline);
    border-radius: var(--r-2);
    background: rgb(var(--deep-rgb) / 0.6);
}

.chat-att-video {
    max-height: 360px;
}

.chat-att-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: var(--step--1);
}

.chat-embed {
    display: flex;
    gap: 16px;
    width: min(100%, 620px);
    padding: 14px 16px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-2);
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-embed:hover {
    background: var(--wash);
    border-color: var(--hairline-strong);
}

.chat-embed-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.chat-embed-site {
    color: var(--ink-3);
    font-size: var(--step--1);
}

.chat-embed-title {
    font-size: var(--step-1);
    font-weight: 700;
    line-height: 1.35;
    text-decoration: underline;
    text-decoration-color: rgb(var(--sun-rgb) / 0.55);
    text-underline-offset: 0.2em;
}

.chat-embed:hover .chat-embed-title {
    text-decoration-color: rgb(var(--sun-rgb));
}

.chat-embed-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ink-2);
    font-size: var(--step--1);
    line-height: 1.45;
}

.chat-embed-thumb {
    position: relative;
    flex: none;
    width: 136px;
    height: 96px;
    overflow: hidden;
    border-radius: var(--r-1);
    background: rgb(var(--deep-rgb) / 0.4);
}

.chat-embed-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-embed-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

.chat-embed-play svg {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 50%;
    background: rgb(var(--deep-rgb) / 0.75);
}

.chat-reacts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.chat-react {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-1);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: var(--step--1);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-react:hover {
    background: var(--wash);
    border-color: var(--hairline-strong);
}

.chat-react-emoji {
    font-size: 1rem;
    line-height: 1;
}

.chat-react-count {
    color: var(--ink-2);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.chat-react-mine {
    border-color: var(--hairline-strong);
    background: var(--wash-strong);
}

.chat-react-mine .chat-react-count {
    color: var(--ink);
}

.chat-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    padding: 6px 0 0 58px;
    color: var(--ink-3);
    font-size: var(--step--1);
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
}

.typing-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ink-2);
    animation: typing-bounce 1.2s ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots i:nth-child(3) {
    animation-delay: 0.3s;
}

/* composer */

.chat-composer-wrap {
    position: relative;
    flex: none;
    padding: 4px 0 0;
}

.chat-jump {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--hairline);
    border-top-color: rgb(var(--sun-rgb) / 0.32);
    border-radius: var(--r-2);
    background: rgb(var(--deep-rgb) / 0.97);
    box-shadow: var(--shadow-2);
    color: var(--ink);
    font-size: var(--step--1);
    font-weight: 600;
    cursor: pointer;
    transform: translateX(-50%);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-jump:hover {
    background: rgb(var(--deep-2-rgb) / 0.97);
    border-color: var(--hairline-strong);
}

.chat-jump svg {
    display: block;
}

.chat-composer {
    display: flex;
    flex-direction: column;
    margin: 0;
    transition: border-color 0.2s ease;
}

.chat-composer:focus-within {
    border-color: rgb(var(--sun-rgb) / 0.75);
}

.chat-composer-row {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 6px 8px;
}

.chat-composer textarea {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    max-height: 180px;
    padding: 9px 6px;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: var(--step-1);
    line-height: 1.45;
    resize: none;
    field-sizing: content;
}

.chat-composer textarea::placeholder {
    color: var(--ink-3);
}

.chat-composer textarea:focus {
    outline: none;
}

.chat-composer textarea:disabled {
    opacity: 0.6;
}

.chat-composer-btn[aria-expanded="true"] {
    border-color: var(--hairline-strong);
    background: var(--wash-strong);
    color: var(--ink);
}

.chat-send.is-ready {
    background: var(--ink);
    color: var(--ink-deep);
}

.chat-send.is-ready:hover {
    background: #ffffff;
}

.chat-pending {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 4px;
}

.chat-pending-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 260px;
    min-height: 32px;
    padding: 0 2px 0 10px;
    overflow: hidden;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-1);
    font-size: var(--step--1);
}

.chat-pending-chip > svg {
    flex: none;
    color: var(--ink-2);
}

.chat-pending-chip.ready {
    border-color: rgb(var(--sun-rgb) / 0.8);
}

.chat-pending-chip.err {
    border-color: rgb(var(--alert-rgb) / 0.7);
    color: var(--alert-soft);
}

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

.chat-pending-tag {
    flex: none;
    font-weight: 700;
}

.chat-pending-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgb(var(--sun-rgb) / 0.14);
}

.chat-pending-bar i {
    display: block;
    height: 100%;
    background: var(--live);
    transition: width 0.2s ease;
}

.chat-pending-x {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: var(--r-1);
    background: none;
    color: var(--ink-2);
    cursor: pointer;
}

.chat-pending-x:hover {
    background: var(--wash-strong);
    color: var(--ink);
}

/* attach + emoji popovers */

.chat-attach-menu,
.chat-emoji {
    position: absolute;
    bottom: calc(100% + 8px);
    z-index: 40;
    overflow: hidden;
    border: 1px solid var(--hairline);
    border-top-color: rgb(var(--sun-rgb) / 0.32);
    border-radius: var(--r-3);
    background: rgb(var(--deep-rgb) / 0.97);
    box-shadow: var(--shadow-2);
    animation: menu-in 0.18s var(--ease-out);
}

.chat-attach-menu {
    left: 0;
    width: min(380px, 100%);
}

.chat-emoji {
    right: 0;
    width: min(360px, 100%);
}

.chat-attach-tabs {
    display: flex;
    gap: 20px;
    padding: 4px 16px 0;
    border-bottom: 1px solid var(--hairline);
}

.chat-attach-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--ink-2);
    font-size: var(--step-0);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chat-attach-tab::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: rgb(var(--sun-rgb));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.chat-attach-tab:hover,
.chat-attach-tab[aria-selected="true"] {
    color: var(--ink);
}

.chat-attach-tab[aria-selected="true"]::after {
    transform: scaleX(1);
}

.chat-attach-drop {
    display: block;
    margin: 16px;
    border: 1px dashed var(--hairline-strong);
    border-radius: var(--r-2);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-attach-drop:hover,
.chat-attach-drop:focus-within {
    background: var(--wash);
    border-color: rgb(var(--sun-rgb) / 0.8);
}

.chat-attach-drop:focus-within {
    outline: var(--focus-ring);
    outline-offset: 3px;
}

.chat-attach-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    color: var(--ink-2);
    text-align: center;
}

.chat-attach-drop-inner svg {
    width: 22px;
    height: 22px;
    color: rgb(var(--sun-rgb));
}

.chat-attach-drop-title {
    color: var(--ink);
    font-size: var(--step-0);
    font-weight: 600;
}

.chat-attach-drop-inner small {
    color: var(--ink-3);
    font-size: var(--step--1);
}

.chat-stash {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px 16px;
}

.chat-stash-search,
.chat-emoji-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--hairline-strong);
    color: var(--ink-3);
    transition: border-color 0.2s ease;
}

.chat-stash-search:focus-within,
.chat-emoji-search:focus-within {
    border-bottom-color: rgb(var(--sun-rgb));
}

.chat-stash-search svg,
.chat-emoji-search > svg {
    flex: none;
}

.chat-stash-search input,
.chat-emoji-search input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: var(--step-0);
}

.chat-stash-search input:focus,
.chat-emoji-search input:focus {
    outline: none;
}

.chat-stash-search input::placeholder,
.chat-emoji-search input::placeholder {
    color: var(--ink-3);
}

.chat-stash-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chat-stash-filter {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-1);
    background: none;
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chat-stash-filter:hover {
    color: var(--ink);
    background: var(--wash);
}

.chat-stash-filter[aria-pressed="true"] {
    border-color: var(--hairline-strong);
    background: var(--wash-strong);
    color: var(--ink);
}

.chat-stash-list {
    display: flex;
    flex-direction: column;
    max-height: 240px;
    overflow: hidden auto;
}

.chat-stash-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 4px 2px;
    border: 0;
    border-top: 1px solid var(--hairline);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: var(--step-0);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-stash-row:hover {
    background: var(--wash);
}

.chat-stash-row.picked {
    background: var(--wash-strong);
}

.chat-stash-row > svg {
    flex: none;
    color: var(--ink-2);
}

.chat-stash-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-stash-size {
    flex: none;
    color: var(--ink-3);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
}

.chat-stash-add {
    display: inline-flex;
    flex: none;
    width: 24px;
    justify-content: center;
    color: var(--ink-3);
}

.chat-stash-row.picked .chat-stash-add {
    color: rgb(var(--sun-rgb));
}

.chat-emoji {
    display: flex;
    flex-direction: column;
}

.chat-emoji-head {
    margin: 0;
    padding: 12px 16px 0;
    color: var(--ink-2);
    font-size: var(--step-0);
    font-weight: 600;
}

.chat-emoji-search {
    margin: 4px 16px 0;
}

.chat-emoji-tones {
    display: inline-flex;
    flex: none;
    gap: 2px;
}

.chat-emoji-tone {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--r-1);
    background: none;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.chat-emoji-tone:hover {
    background: var(--wash);
}

.chat-emoji-tone[aria-pressed="true"] {
    border-color: var(--hairline-strong);
    background: var(--wash-strong);
}

.chat-emoji-cats {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px 0;
}

.chat-emoji-cat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--r-2);
    background: none;
    color: var(--ink-2);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chat-emoji-cat:hover {
    background: var(--wash);
    color: var(--ink);
}

.chat-emoji-cat[aria-pressed="true"] {
    border-color: var(--hairline-strong);
    background: var(--wash-strong);
    color: var(--ink);
}

.chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    max-height: 240px;
    margin-top: 8px;
    padding: 0 12px 12px;
    overflow: hidden auto;
}

.chat-emoji-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: var(--r-1);
    background: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.chat-emoji-btn:hover {
    background: var(--wash-strong);
}

.chat-emoji-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 20px;
    text-align: center;
}

/* roster */

.roster-count {
    margin: 0 0 10px;
    padding-left: 12px;
    color: var(--ink-2);
    font-size: var(--step-0);
}

.roster-sub {
    margin: 18px 0 4px;
    padding-left: 12px;
    color: var(--ink-3);
    font-size: var(--step--1);
    font-weight: 600;
}

.roster-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.roster-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 4px 4px 4px 12px;
    border-top: 1px solid var(--hairline);
    border-radius: var(--r-1);
    transition: background-color 0.2s ease;
}

.roster-row:hover,
.roster-row:focus-within {
    background: var(--wash);
}

.roster-mark {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
}

.roster-away .roster-mark {
    opacity: 0.45;
}

.roster-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: var(--step-0);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-away .roster-name {
    color: var(--ink-3);
    font-weight: 400;
}

.roster-tag {
    flex: none;
    color: var(--ink-3);
    font-size: var(--step--1);
}

.roster-kick {
    width: 32px;
    height: 32px;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.roster-row:hover .roster-kick,
.roster-row:focus-within .roster-kick {
    opacity: 1;
}

.roster-kick:hover {
    color: var(--alert-soft);
}

.roster-private {
    padding: 0 0 10px 12px;
    color: var(--ink-3);
    font-weight: 400;
}

/* voice dock */

.voice-dock:empty {
    display: none;
}

.voice-dock {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(420px, calc(100vw - 36px));
    max-height: min(70vh, 680px);
    padding: 14px 16px 16px;
    border: 1px solid var(--hairline);
    border-top-color: rgb(var(--sun-rgb) / 0.32);
    border-radius: var(--r-3);
    background: rgb(var(--deep-rgb) / 0.97);
    box-shadow: var(--shadow-2);
    animation: menu-in 0.18s var(--ease-out);
}

.voice-collapsed {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: auto;
    max-width: min(360px, calc(100vw - 36px));
    padding: 6px 6px 6px 14px;
}

.voice-restore {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.voice-restore svg {
    flex: none;
    color: var(--ink-2);
    transform: rotate(180deg);
}

.voice-restore-name {
    font-size: var(--step-0);
    font-weight: 700;
    white-space: nowrap;
}

.voice-restore-note {
    min-width: 0;
    overflow: hidden;
    color: var(--ink-2);
    font-size: var(--step--1);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.voice-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    row-gap: 2px;
    min-width: 0;
    padding-top: 6px;
}

.voice-title strong {
    font-size: var(--step-1);
    font-weight: 700;
    line-height: 1.2;
}

.voice-sub {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
}

.voice-state {
    flex-basis: 100%;
    color: var(--live);
    font-size: var(--step--1);
    font-weight: 600;
}

.voice-head-tools {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 2px;
}

.voice-banner {
    margin: 0;
    padding: 8px 12px;
    border: 1px solid rgb(var(--live-rgb) / 0.5);
    border-radius: var(--r-2);
    color: var(--live);
    font-size: var(--step--1);
    font-weight: 600;
}

.voice-dock.voice-theatre {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    padding: 16px clamp(16px, 4vw, 48px) 20px;
    border-radius: 0;
    animation: none;
}

.voice-theatre .vstage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.voice-theatre .vstage-main {
    flex: 1 1 auto;
    min-height: 0;
    grid-auto-rows: 1fr;
    align-content: stretch;
}

.voice-theatre .vstage-main .vtile {
    min-height: 0;
    height: 100%;
}

.voice-theatre .vstage-strip {
    flex: none;
}

.voice-theatre .vstage-strip .vtile {
    height: 104px;
}

/* stage and tiles */

.vstage {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
}

.vstage-main {
    display: grid;
    gap: 8px;
}

.vstage-grid-1 {
    grid-template-columns: 1fr;
}

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

.vstage-grid-6,
.vstage-grid-many {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vstage-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.vstage-strip .vtile {
    flex: none;
    width: 124px;
    min-height: 96px;
}

.vstage-strip .vtile-mark {
    width: 40px;
    height: 40px;
    margin: 10px 0 26px;
    font-size: var(--step--1);
}

.vstage-empty {
    margin: 0;
    padding: 28px 12px;
    color: var(--ink-2);
    font-size: var(--step-0);
    text-align: center;
}

.vtile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    border-radius: var(--r-2);
    background: rgb(var(--deep-2-rgb) / 0.45);
}

.vtile-cam,
.vtile-screen {
    border-color: color-mix(in srgb, var(--crew, var(--crew-7)) 55%, transparent);
}

.vtile.is-speaking {
    outline: 2px solid var(--live);
    outline-offset: -2px;
}

.vtile-screen {
    grid-column: 1 / -1;
}

.vstage-focus .vstage-main .vtile-screen {
    min-height: 220px;
}

.vtile-broken {
    border-style: dashed;
    border-color: rgb(var(--alert-rgb) / 0.6);
}

.vtile-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgb(var(--deep-rgb));
}

.vtile-screen .vtile-video {
    object-fit: contain;
}

.vtile-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 16px 0 34px;
    border-radius: 50%;
    background: var(--crew, var(--crew-7));
    color: var(--ink-deep);
    font-size: var(--step-1);
    font-weight: 700;
    transition: outline-color 0.15s ease;
}

.vtile.is-speaking .vtile-mark {
    outline: 3px solid var(--live);
    outline-offset: 3px;
}

.vtile-label {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    pointer-events: none;
}

.vtile-cam .vtile-label,
.vtile-screen .vtile-label {
    padding: 4px 8px;
    border-radius: var(--r-1);
    background: rgb(var(--deep-rgb) / 0.78);
}

.vtile-name {
    min-width: 0;
    overflow: hidden;
    font-size: var(--step--1);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vtile-name small {
    color: var(--ink-2);
    font-size: inherit;
    font-weight: 400;
}

.vchip {
    display: inline-flex;
    flex: none;
    align-items: center;
    color: var(--ink-2);
}

.vchip svg {
    display: block;
}

.vq {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
    white-space: nowrap;
}

.vq-poor {
    color: var(--alert-soft);
}

.vtile-tools {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.vtile:hover .vtile-tools,
.vtile:focus-within .vtile-tools {
    opacity: 1;
}

.vtool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--r-1);
    background: rgb(var(--deep-rgb) / 0.82);
    color: var(--ink-2);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.vtool:hover {
    color: var(--ink);
    border-color: var(--hairline);
}

.vtool[aria-pressed="true"] {
    border-color: var(--hairline-strong);
    background: rgb(var(--deep-2-rgb) / 0.95);
    color: var(--ink);
}

.vvol {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--r-1);
    background: rgb(var(--deep-rgb) / 0.82);
    color: var(--ink-2);
}

.vvol input {
    width: 76px;
    height: 16px;
    margin: 0;
    accent-color: rgb(var(--sun-rgb));
    cursor: pointer;
}

.voice-controls {
    display: flex;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--hairline);
}

.vbtn {
    display: inline-flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 56px;
    padding: 6px 4px;
    border: 1px solid transparent;
    border-radius: var(--r-2);
    background: none;
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.vbtn svg {
    display: block;
}

.vbtn:hover {
    border-color: var(--hairline);
    background: var(--wash);
    color: var(--ink);
}

.vbtn[aria-pressed="true"] {
    border-color: var(--hairline-strong);
    background: var(--wash-strong);
    color: var(--ink);
}

.vbtn-off,
.vbtn-off[aria-pressed="true"] {
    color: var(--alert-soft);
}

.vbtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vbtn-leave {
    color: var(--alert-soft);
}

.vbtn-leave:hover {
    border-color: rgb(var(--alert-rgb) / 0.6);
    background: rgb(var(--alert-rgb) / 0.12);
    color: var(--alert-soft);
}

/* narrow and mobile */

@media (max-width: 1199px) {
    .chat-page {
        --chat-rail: 220px;
        --chat-roster: 200px;
    }

    .chat-page.in-call {
        --chat-roster: 200px;
    }

    .voice-dock:not(.voice-theatre):not(.voice-collapsed) {
        width: min(360px, calc(100vw - 36px));
    }
}

@media (max-width: 860px) {
    .chat-page {
        --chat-rail: 0px;
        padding: 0 0 6px;
    }

    .chat-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .chat-rooms {
        padding: 0 var(--gutter);
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .chat-col-head {
        min-height: 48px;
        padding: 6px 0 4px;
    }

    .chat-room-list {
        flex-direction: row;
        gap: 4px;
        margin: 0 calc(var(--gutter) * -1);
        padding: 0 var(--gutter) 8px;
        overflow: auto hidden;
        scrollbar-width: none;
    }

    .chat-room-list::-webkit-scrollbar {
        display: none;
    }

    .room-row,
    .room-row:last-child {
        flex: none;
        gap: 6px;
        min-height: 40px;
        padding: 0 12px;
        border: 1px solid var(--hairline);
        border-radius: var(--r-2);
    }

    .room-active,
    .room-active:hover {
        border-color: rgb(var(--sun-rgb) / 0.8);
        box-shadow: none;
    }

    .room-hash,
    .room-last {
        display: none;
    }

    .room-name {
        font-size: var(--step--1);
    }

    .room-unread {
        min-width: 20px;
        height: 20px;
    }

    .chat-roster {
        display: none;
    }

    .chat-main {
        padding: 0 var(--gutter);
    }

    .chat-head {
        gap: 10px;
        min-height: 52px;
        padding: 6px 0;
    }

    .chat-head-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .chat-h1 {
        font-size: var(--step-1);
    }

    .chat-topic {
        max-width: 100%;
    }

    .chat-voice-note {
        display: none;
    }

    .chat-hop {
        padding: 0 12px;
    }

    .voice-sheet {
        position: fixed;
        top: auto;
        right: 10px;
        bottom: calc(var(--dock-clear, 0px) + 10px);
        left: 10px;
        width: auto;
    }

    .msg {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        column-gap: 8px;
        padding: 4px 2px;
    }

    .msg-mark {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .msg-time-gutter {
        display: none;
    }

    .chat-react-add {
        width: 34px;
        height: 34px;
    }

    .chat-typing {
        padding-left: 46px;
    }

    .chat-attach-menu,
    .chat-emoji {
        right: 0;
        left: 0;
        width: auto;
    }

    .chat-emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .voice-dock {
        right: 8px;
        bottom: calc(var(--dock-clear, 0px) + 8px);
        left: 8px;
        width: auto;
        max-height: 60vh;
    }

    .voice-collapsed {
        margin-left: auto;
    }

    .vbtn span {
        font-size: 0.75rem;
    }
}
