.content-wrapper.controller-chat {
    --chat-room-panel-radius: 20px;
    --chat-room-panel-border: color-mix(in srgb, var(--hub-accent) 16%, var(--bs-border-color));
    --chat-room-panel-bg: color-mix(in srgb, var(--bs-card-bg) 97%, transparent);
    --chat-room-desktop-panel-height: clamp(27rem, calc(100dvh - 15.5rem), 36rem);
    --chat-room-mobile-nav-offset: calc(5.3rem + env(safe-area-inset-bottom));
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
}

.chat-room-shell {
    display: grid;
    gap: 0.65rem;
}

.chat-room-topic {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.52rem;
    padding: 0.4rem 0.52rem;
    border: 1px solid color-mix(in srgb, var(--bs-warning) 28%, var(--bs-border-color));
    border-radius: 13px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--bs-warning) 10%, var(--bs-card-bg)), var(--bs-card-bg));
}

.chat-room-topic-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--bs-warning);
    background: color-mix(in srgb, var(--bs-warning) 13%, var(--bs-secondary-bg));
}

.chat-room-topic > div { min-width: 0; display: flex; align-items: baseline; gap: 0.38rem; }
.chat-room-topic small { flex: 0 0 auto; color: var(--bs-warning); font-size: 0.64rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.chat-room-topic small::after { content: ':'; }
.chat-room-topic strong { min-width: 0; overflow: hidden; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-room-topic-answer { min-height: 30px; display: inline-flex; align-items: center; gap: 0.32rem; padding: 0.25rem 0.5rem; border-radius: 9px; font-size: 0.72rem; font-weight: 800; white-space: nowrap; }

.chat-room-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border: 1px solid color-mix(in srgb, var(--hub-accent) 20%, var(--bs-border-color));
    border-radius: var(--chat-room-panel-radius);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--hub-accent) 10%, transparent), transparent 56%),
        linear-gradient(180deg, color-mix(in srgb, var(--bs-card-bg) 96%, transparent), color-mix(in srgb, var(--bs-card-bg) 91%, transparent));
    box-shadow: var(--hub-shadow-soft);
}

.chat-room-header > div {
    flex: 1 1 22rem;
    min-width: 0;
}

.chat-room-header h1 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.08;
}

.chat-room-header p {
    max-width: 38rem;
    margin: 0.22rem 0 0;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-room-header .btn,
.chat-room-live-badge {
    flex: 0 0 auto;
    align-self: center;
}

.chat-room-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 42px;
    padding: 0.5rem 0.82rem;
    border-radius: 999px;
    color: var(--bs-success);
    background: color-mix(in srgb, var(--bs-success) 12%, var(--bs-secondary-bg));
    font-size: 0.84rem;
    font-weight: 850;
    white-space: nowrap;
}

.chat-room-live-badge i {
    font-size: 0.56rem;
}

.chat-room-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.chat-room-users,
.chat-room-main {
    min-width: 0;
    border: 1px solid var(--chat-room-panel-border);
    border-radius: var(--chat-room-panel-radius);
    background: var(--chat-room-panel-bg);
    box-shadow: var(--hub-shadow-soft);
}

.chat-room-users {
    overflow: hidden;
}

.chat-room-users-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--bs-border-color);
    font-size: 0.86rem;
    font-weight: 900;
}

.chat-room-users-head strong {
    min-width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--bs-success);
    background: color-mix(in srgb, var(--bs-success) 12%, var(--bs-secondary-bg));
    font-size: 0.76rem;
}

.chat-room-users-head > span { display: inline-flex; align-items: center; gap: 0.45rem; }
.chat-room-users-toggle { padding: 0.3rem 0.5rem; border: 1px solid var(--bs-border-color); border-radius: 999px; color: var(--bs-secondary-color); background: var(--bs-body-bg); font-size: 0.7rem; font-weight: 800; }
.chat-room-users-search { position: relative; padding: 0.55rem 0.65rem 0; }
.chat-room-users-search i { position: absolute; top: 1.05rem; left: 1.2rem; z-index: 1; color: var(--bs-secondary-color); font-size: 0.72rem; }
.chat-room-users-search input { padding-left: 1.75rem; border-radius: 12px; font-size: 0.75rem; }

.chat-room-users-list,
.chat-room-messages {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--hub-accent) 28%, transparent) transparent;
}

.chat-room-users-list::-webkit-scrollbar,
.chat-room-messages::-webkit-scrollbar {
    width: 0.45rem;
    height: 0.45rem;
}

.chat-room-users-list::-webkit-scrollbar-thumb,
.chat-room-messages::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--hub-accent) 24%, var(--bs-secondary-color));
}

.chat-room-users-list {
    max-height: 560px;
    display: grid;
    gap: 0.52rem;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.65rem;
}

.chat-room-user {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 0.52rem;
    padding: 0.44rem;
    border: 1px solid transparent;
    border-radius: 13px;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.chat-room-user-card { position: relative; min-width: 0; border: 1px solid transparent; border-radius: 13px; }
.chat-room-user-card:hover { border-color: color-mix(in srgb, var(--hub-accent) 20%, var(--bs-border-color)); background: color-mix(in srgb, var(--bs-secondary-bg) 48%, transparent); }
.chat-room-user-card .chat-room-user:hover { border-color: transparent; background: transparent; transform: none; }
.chat-room-user-actions { position: absolute; right: 0.35rem; bottom: 0.2rem; display: inline-flex; gap: 0.2rem; opacity: 0; transition: opacity 0.18s ease; }
.chat-room-user-card:hover .chat-room-user-actions, .chat-room-user-card:focus-within .chat-room-user-actions { opacity: 1; }
.chat-room-user-actions button, .chat-room-user-actions a { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; color: var(--bs-secondary-color); background: color-mix(in srgb, var(--bs-body-bg) 88%, transparent); font-size: 0.7rem; text-decoration: none; }

.chat-room-user:hover {
    color: var(--bs-body-color);
    border-color: color-mix(in srgb, var(--hub-accent) 20%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-secondary-bg) 48%, transparent);
    transform: translateY(-1px);
}

.chat-room-user-avatar,
.chat-room-message-avatar {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--bs-body-color);
    background: color-mix(in srgb, var(--hub-accent) 12%, var(--bs-secondary-bg));
    font-weight: 900;
}

.chat-room-user-avatar {
    width: 40px;
    height: 40px;
}

.chat-room-user-avatar img,
.chat-room-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-room-user-avatar > span {
    position: absolute;
    right: 0.08rem;
    bottom: 0.08rem;
    width: 0.74rem;
    height: 0.74rem;
    border: 2px solid var(--bs-body-bg);
    border-radius: 50%;
    background: var(--bs-success);
}

.chat-room-user-body {
    min-width: 0;
    display: grid;
    gap: 0.14rem;
}

.chat-room-user-body strong,
.chat-room-user-body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-room-user-body strong {
    font-size: 0.8rem;
}

.chat-room-user-body small {
    color: var(--bs-secondary-color);
    font-size: 0.66rem;
}

.chat-room-empty-users {
    padding: 1rem 0.7rem;
    color: var(--bs-secondary-color);
    font-size: 0.82rem;
    text-align: center;
}

.chat-room-main {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
}

.chat-room-messages {
    min-height: 520px;
    max-height: calc(100dvh - 265px);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
    padding: 0.82rem;
    overflow-anchor: none;
    scroll-behavior: auto;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bs-secondary-bg) 22%, transparent), transparent 12rem),
        transparent;
}

.chat-room-message {
    max-width: 82%;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.62rem;
    align-items: end;
    transition: transform 0.18s ease;
}

.chat-room-message.is-own {
    align-self: end;
    grid-template-columns: minmax(0, 1fr) 40px;
}

.chat-room-message.is-own .chat-room-message-avatar {
    grid-column: 2;
    grid-row: 1;
}

.chat-room-message.is-own .chat-room-message-bubble {
    grid-column: 1;
    grid-row: 1;
    border-color: color-mix(in srgb, var(--hub-accent) 34%, transparent);
    color: #fff;
    background: linear-gradient(135deg, #f14f7a, #b8325f);
}

.chat-room-message-avatar {
    width: 40px;
    height: 40px;
    text-decoration: none;
    font-size: 0.84rem;
}

.chat-room-message-bubble {
    min-width: 0;
    width: 100%;
    padding: 0.66rem 0.78rem;
    border: 1px solid color-mix(in srgb, var(--bs-border-color) 74%, transparent);
    border-radius: 18px 18px 18px 7px;
    background: color-mix(in srgb, var(--bs-secondary-bg) 56%, transparent);
}

.chat-room-message.is-own .chat-room-message-bubble {
    border-radius: 18px 18px 7px 18px;
}

.chat-room-message.is-reply-focus .chat-room-message-bubble {
    border-color: color-mix(in srgb, var(--hub-accent) 54%, transparent);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--hub-accent) 16%, transparent);
}

.chat-room-message-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.28rem 0.65rem;
    margin-bottom: 0.32rem;
}

.chat-room-message-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
}

.chat-room-message-head a {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 0.79rem;
    font-weight: 900;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-room-message-head time {
    flex: 0 0 auto;
    color: color-mix(in srgb, currentColor 62%, transparent);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.chat-room-message-actions .dropdown-menu {
    min-width: 10.75rem;
    padding: 0.32rem;
    border-radius: 14px;
}

.chat-room-message-actions .dropdown-item {
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
}

.chat-room-message-actions .dropdown-item:active {
    background: color-mix(in srgb, var(--hub-accent) 14%, var(--bs-secondary-bg));
    color: inherit;
}

.chat-room-message-menu {
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: inherit;
    background: transparent;
    opacity: 0.7;
    transition: opacity 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.chat-room-message-meta .chat-room-message-menu {
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.chat-room-message.is-own .chat-room-message-meta .chat-room-message-menu {
    color: rgba(255, 255, 255, 0.82);
}

.chat-room-message-menu::after {
    display: none;
}

.chat-room-message-menu:hover,
.chat-room-message-menu:focus-visible {
    opacity: 1;
    color: inherit;
    background: color-mix(in srgb, currentColor 10%, transparent);
}

.chat-room-message-menu:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.chat-room-reply-card {
    width: 100%;
    display: flex;
    align-items: flex-start;
    margin: 0 0 0.48rem;
    padding: 0.58rem 0.66rem;
    border: 1px solid color-mix(in srgb, var(--hub-accent) 22%, var(--bs-border-color));
    border-left-width: 3px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bs-secondary-bg) 74%, transparent);
    text-align: left;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.chat-room-reply-card:hover,
.chat-room-reply-card:focus-visible {
    border-color: color-mix(in srgb, var(--hub-accent) 34%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-secondary-bg) 88%, transparent);
    transform: translateY(-1px);
}

.chat-room-reply-body {
    min-width: 0;
    display: grid;
    gap: 0.14rem;
}

.chat-room-reply-label {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    color: color-mix(in srgb, currentColor 80%, transparent);
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
}

.chat-room-reply-text {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 0.78rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-room-reply-card.is-deleted .chat-room-reply-text {
    font-style: italic;
}

.chat-room-message.is-own .chat-room-reply-card {
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.14);
}

.chat-room-message.is-own .chat-room-reply-label {
    color: rgba(255, 255, 255, 0.78);
}

.chat-room-message-topic {
    display: grid;
    gap: 0.18rem;
    margin: 0 0 0.48rem;
    padding: 0.55rem 0.65rem;
    border-left: 3px solid var(--bs-warning);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bs-warning) 9%, var(--bs-secondary-bg));
}

.chat-room-message-topic span,
.chat-room-composer-topic span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--bs-warning);
    font-size: 0.66rem;
    font-weight: 900;
}

.chat-room-message-topic strong {
    font-size: 0.75rem;
    line-height: 1.3;
}

.chat-room-message.is-own .chat-room-message-topic {
    border-left-color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.13);
}

.chat-room-message.is-own .chat-room-message-topic span {
    color: rgba(255, 255, 255, 0.82);
}

.chat-room-message-bubble p {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
    line-height: 1.45;
}

.chat-room-reactions { display: flex; flex-wrap: wrap; gap: 0.28rem; margin-top: 0.42rem; }
.chat-room-reaction { min-height: 25px; display: inline-flex; align-items: center; gap: 0.22rem; padding: 0.14rem 0.38rem; border: 1px solid color-mix(in srgb, var(--bs-border-color) 78%, transparent); border-radius: 999px; color: inherit; background: color-mix(in srgb, var(--bs-body-bg) 45%, transparent); font-size: 0.76rem; }
.chat-room-reaction.is-reacted { border-color: color-mix(in srgb, var(--hub-accent) 55%, transparent); background: color-mix(in srgb, var(--hub-accent) 18%, transparent); }
.chat-room-reaction small { font-size: 0.65rem; font-weight: 900; }
.chat-room-reaction-tools { position: relative; height: 29px; margin-top: 0.22rem; }
.chat-room-reaction-toggle { position: absolute; top: 0; left: 0; width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--bs-border-color); border-radius: 999px; color: var(--bs-secondary-color); background: var(--bs-body-bg); opacity: 0; }
.chat-room-message-bubble:hover .chat-room-reaction-toggle, .chat-room-reaction-toggle:focus-visible { opacity: 1; }
.chat-room-reaction-picker { position: absolute; top: 2rem; left: 0; z-index: 20; display: flex; gap: 0.2rem; padding: 0.35rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: var(--bs-body-bg); box-shadow: var(--hub-shadow-soft); white-space: nowrap; }
.chat-room-reaction-picker.is-open-up { top: auto; bottom: 2rem; }
.chat-room-message.is-own .chat-room-reaction-picker { right: 0; left: auto; }
.chat-room-reaction-picker button, .chat-room-emoji-shortcuts button { border: 0; background: transparent; }
.chat-room-reaction-picker button { min-width: 30px; min-height: 30px; padding: 0.18rem; border-radius: 999px; }
.chat-room-reaction-picker button:hover, .chat-room-reaction-picker button:focus-visible { background: var(--bs-secondary-bg); }
.chat-room-unread-divider { display: flex; align-items: center; gap: 0.5rem; color: var(--bs-warning); font-size: 0.72rem; font-weight: 850; }
.chat-room-unread-divider::before, .chat-room-unread-divider::after { height: 1px; flex: 1; content: ''; background: color-mix(in srgb, var(--bs-warning) 42%, transparent); }
.chat-room-new-messages { position: absolute; right: 1rem; bottom: 7.5rem; z-index: 10; display: inline-flex; align-items: center; gap: 0.42rem; padding: 0.45rem 0.7rem; border: 0; border-radius: 999px; color: #fff; background: var(--hub-accent); box-shadow: 0 0.55rem 1.25rem rgba(0, 0, 0, 0.25); font-size: 0.75rem; }

.chat-room-mention {
    color: color-mix(in srgb, var(--hub-accent) 90%, currentColor);
    font-weight: 800;
    text-decoration: none;
}

.chat-room-mention:hover {
    text-decoration: underline;
}

.chat-room-message-deleted {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: inherit;
    font-style: italic;
}

.chat-room-message.is-deleted .chat-room-message-bubble,
.chat-room-message.is-own.is-deleted .chat-room-message-bubble {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--bs-border-color) 86%, transparent);
    color: var(--bs-secondary-color);
    background: color-mix(in srgb, var(--bs-secondary-bg) 68%, transparent);
}

.chat-room-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: end;
    gap: 0.5rem;
    padding: 0.72rem;
    border-top: 1px solid var(--bs-border-color);
    background: color-mix(in srgb, var(--bs-body-bg) 68%, transparent);
}

.chat-room-typing { padding: 0.28rem 0.85rem 0; color: var(--bs-secondary-color); font-size: 0.72rem; font-style: italic; }
.chat-room-prompts { display: flex; gap: 0.35rem; padding: 0.5rem 0.72rem 0; overflow-x: auto; scrollbar-width: none; }
.chat-room-prompts button { flex: 0 0 auto; padding: 0.3rem 0.55rem; border: 1px solid color-mix(in srgb, var(--hub-accent) 22%, var(--bs-border-color)); border-radius: 999px; color: var(--bs-secondary-color); background: color-mix(in srgb, var(--hub-accent) 6%, var(--bs-body-bg)); font-size: 0.7rem; }

.chat-room-composer-reply {
    grid-column: 1 / -1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.55rem;
    padding: 0.68rem 0.78rem;
    border: 1px solid color-mix(in srgb, var(--hub-accent) 20%, var(--bs-border-color));
    border-radius: 18px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--hub-accent) 8%, transparent), transparent 70%),
        color-mix(in srgb, var(--bs-card-bg) 96%, transparent);
}

.chat-room-composer-topic {
    grid-column: 1 / -1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding: 0.62rem 0.72rem;
    border: 1px solid color-mix(in srgb, var(--bs-warning) 28%, var(--bs-border-color));
    border-radius: 16px;
    background: color-mix(in srgb, var(--bs-warning) 8%, var(--bs-card-bg));
}

.chat-room-composer-topic > div { min-width: 0; display: grid; gap: 0.14rem; }
.chat-room-composer-topic strong {
    min-width: 0;
    overflow: visible;
    font-size: 0.78rem;
    line-height: 1.38;
    overflow-wrap: anywhere;
    white-space: normal;
}
.chat-room-composer-topic > button { width: 1.85rem; height: 1.85rem; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 999px; color: var(--bs-secondary-color); background: var(--bs-secondary-bg); }

.chat-room-composer-reply-body {
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.chat-room-composer-reply-label {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    color: color-mix(in srgb, var(--hub-accent) 76%, var(--bs-body-color));
    font-size: 0.72rem;
    font-weight: 900;
}

.chat-room-composer-reply-text {
    min-width: 0;
    overflow: hidden;
    color: var(--bs-body-color);
    font-size: 0.82rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-room-composer-reply-close {
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: var(--bs-secondary-color);
    background: color-mix(in srgb, var(--bs-secondary-bg) 74%, transparent);
}

.chat-room-composer-reply-close:hover,
.chat-room-composer-reply-close:focus-visible {
    color: var(--bs-danger);
    background: color-mix(in srgb, var(--bs-danger) 10%, var(--bs-secondary-bg));
}

.chat-room-composer textarea {
    min-height: 48px;
    max-height: 128px;
    resize: none;
    border-radius: 18px;
    padding: 0.78rem 0.95rem;
}

.chat-room-composer .btn {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.chat-room-composer-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.65rem; color: var(--bs-secondary-color); font-size: 0.66rem; }
.chat-room-emoji-shortcuts { display: inline-flex; gap: 0.1rem; margin-right: auto; }
.chat-room-emoji-shortcuts button { padding: 0.1rem 0.2rem; font-size: 0.8rem; }
.chat-room-composer-meta > span { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--bs-success); }
.chat-room-composer-meta > span.is-offline { color: var(--bs-warning); }
.chat-room-composer-meta > span i { font-size: 0.42rem; }

.chat-room-status {
    margin: 0 0.72rem 0.72rem;
    padding: 0.56rem 0.7rem;
    border-radius: 12px;
    color: var(--bs-body-color);
    background: color-mix(in srgb, var(--bs-success) 12%, var(--bs-card-bg));
    font-size: 0.79rem;
    font-weight: 800;
    text-align: center;
}

.chat-room-status.is-error {
    background: color-mix(in srgb, var(--bs-danger) 12%, var(--bs-card-bg));
}

.chat-room-empty,
.chat-room-login {
    min-height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.45rem;
    padding: 1.4rem;
    color: var(--bs-secondary-color);
    text-align: center;
}

.chat-room-empty span,
.chat-room-login span {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: color-mix(in srgb, var(--hub-accent) 82%, var(--bs-body-color));
    background: color-mix(in srgb, var(--hub-accent) 10%, var(--bs-secondary-bg));
    font-size: 1.15rem;
}

.chat-room-empty strong,
.chat-room-login strong {
    color: var(--bs-body-color);
}

.chat-room-login small {
    max-width: 26rem;
    color: var(--bs-secondary-color);
}

.chat-room-login-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
}

.chat-room-login-actions .btn {
    min-width: 148px;
}

@media (min-width: 992px) {
    body.controller-chat.action-index {
        height: 100dvh;
        min-height: 0;
        padding-bottom: 0;
        overflow: hidden;
    }

    body.controller-chat.action-index .container-scroller {
        height: 100dvh;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    body.controller-chat.action-index .horizontal-menu {
        flex: 0 0 auto;
    }

    body.controller-chat.action-index .content-wrapper.controller-chat {
        min-height: 0;
        flex: 1 1 auto;
        padding-top: 0.75rem !important;
        padding-bottom: calc(5rem + env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .chat-room-shell {
        height: 100%;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .chat-room-shell.is-topic-answered {
        grid-template-rows: minmax(0, 1fr);
    }

    .chat-room-layout {
        height: 100%;
        min-height: 0;
        align-items: stretch;
    }

    .chat-room-users,
    .chat-room-main {
        min-height: 0;
        height: 100%;
    }

    .chat-room-users {
        position: static;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
    }

    .chat-room-users-list {
        min-height: 0;
        max-height: none;
    }

    .chat-room-messages {
        min-height: 0;
        max-height: none;
    }
}

@media (max-width: 1199.98px) {
    .chat-room-layout {
        grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
    }
}

@media (max-width: 991.98px) {
    body.controller-chat.action-index {
        height: 100svh;
        height: 100dvh;
        min-height: 0;
        padding-bottom: 0 !important;
        overflow: hidden;
    }

    body.controller-chat.action-index .container-scroller {
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    body.controller-chat.action-index .horizontal-menu {
        display: none;
    }

    body.controller-chat.action-index .content-wrapper.controller-chat {
        min-height: 0;
        flex: 1 1 auto;
        box-sizing: border-box;
        padding-top: 0.55rem !important;
        padding-bottom: var(--chat-room-mobile-nav-offset) !important;
        overflow: hidden;
    }

    .chat-room-shell {
        height: 100%;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 0.55rem;
    }

    .chat-room-shell.is-topic-answered {
        grid-template-rows: minmax(0, 1fr);
    }

    .chat-room-layout,
    .chat-room-users,
    .chat-room-users-list {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .chat-room-layout {
        height: 100%;
        min-height: 0;
        display: flex !important;
        flex-direction: column !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }

    .chat-room-users {
        flex: 0 0 auto;
        order: -1;
        width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .chat-room-users:not(.is-expanded) .chat-room-users-search,
    .chat-room-users:not(.is-expanded) .chat-room-users-list {
        display: none !important;
    }

    .chat-room-users-head {
        padding: 0.7rem 0.8rem;
        margin: 0;
    }

    .chat-room-users-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 0.5rem;
        padding: 0.6rem 0.8rem !important;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .chat-room-user {
        flex: 0 0 118px !important;
        width: 118px !important;
        min-width: 118px !important;
        max-width: 118px !important;
        scroll-snap-align: start;
    }

    .chat-room-user-card {
        flex: 0 0 132px;
        width: 132px;
    }

    .chat-room-user-actions,
    .chat-room-reaction-toggle {
        opacity: 1;
    }

    .chat-room-main {
        min-height: 0;
        height: auto;
        flex: 1 1 auto;
        width: 100% !important;
        max-height: none;
        overflow: hidden;
    }

    .chat-room-messages {
        min-height: 0;
        width: 100% !important;
        max-height: none;
    }
    .chat-room-composer {
        position: static;
        bottom: auto;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .chat-room-messages {
        align-self: stretch;
    }
}

@media (max-width: 767.98px) {
    .content-wrapper.controller-chat {
        --bs-gutter-x: 0.85rem;
    }

    .chat-room-topic {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 0.34rem 0.42rem;
    }

    .chat-room-topic small { display: none; }

    .chat-room-topic-answer { width: 32px; height: 32px; min-height: 32px; justify-content: center; padding: 0; border-radius: 9px; }
    .chat-room-topic-answer span { display: none; }

    .chat-room-main { overflow: hidden; }

    .chat-room-header {
        padding: 0.78rem 0.82rem;
    }

    .chat-room-header h1 {
        font-size: 1.08rem;
    }

    .chat-room-header p {
        display: none;
    }

    .chat-room-users-head {
        padding: 0.64rem 0.72rem;
        font-size: 0.78rem;
    }

    .chat-room-header .btn,
    .chat-room-live-badge {
        width: 100%;
        justify-content: center;
    }

    .chat-room-live-badge {
        min-height: 38px;
        padding: 0.42rem 0.72rem;
        font-size: 0.79rem;
    }

    .chat-room-message {
        max-width: 100%;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 0.45rem;
    }

    .chat-room-message.is-own {
        grid-template-columns: minmax(0, 1fr) 36px;
    }

    .chat-room-message-avatar {
        width: 36px;
        height: 36px;
    }

    .chat-room-message-head {
        grid-template-columns: 1fr;
    }

    .chat-room-message-head time {
        justify-self: start;
    }

    .chat-room-composer {
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 0.45rem;
        padding: 0.58rem;
        position: static;
        bottom: auto;
        z-index: 3;
        border-radius: 18px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
        backdrop-filter: blur(16px);
    }

    .chat-room-composer-reply {
        padding: 0.58rem 0.68rem;
        border-radius: 16px;
    }

    .chat-room-composer-reply-label {
        font-size: 0.68rem;
    }

    .chat-room-composer-reply-text {
        font-size: 0.77rem;
    }

    .chat-room-composer textarea {
        max-height: 136px;
        border-radius: 16px;
        padding: 0.68rem 0.88rem;
        font-size: 0.95rem;
    }

    .chat-room-composer .btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
}

@media (max-width: 575.98px) {
    .chat-room-users-list {
        grid-auto-columns: unset !important;
    }

    .chat-room-user {
        flex-basis: 106px !important;
        width: 106px !important;
        min-width: 106px !important;
        max-width: 106px !important;
    }
}
