body:is(.chat-conversation, .channels-arcade, .polls-page, .pm-page, .members-page, .online-page) {
    --night-chat-bg: #14122b;
    --night-chat-surface: #1e1b3f;
    --night-chat-sidebar: #19163a;
    --night-chat-raised: #2f2a5e;
    --night-chat-edge: #0d0b1f;
    --night-chat-line: #3a3568;
    --night-chat-text: #f4f2ff;
    --night-chat-muted: #b1add6;
    --night-chat-action: #c8f04b;
    --night-chat-pink: #ff6b8b;
    --night-chat-blue: #6bb2ff;
    --night-chat-green: #5be38a;
    --night-chat-amber: #ffc44d;
    --night-chat-body: Inter, system-ui, sans-serif;
}

html[data-sneebo-theme] body.chat-conversation {
    --site-bg: var(--night-chat-bg);
    --site-surface: var(--night-chat-surface);
    --site-surface-muted: var(--night-chat-surface);
    --site-surface-raised: var(--night-chat-raised);
    --site-border: var(--night-chat-line);
    --site-border-strong: var(--night-chat-line);
    --site-selected: var(--night-chat-raised);
    --site-text: var(--night-chat-text);
    --site-muted: var(--night-chat-muted);
    --chat-header-background: var(--night-chat-surface);
    --chat-stream-background: var(--night-chat-bg);
}

html[data-sneebo-theme] body.chat-conversation > .chat-workspace {
    inline-size: 100%;
    max-inline-size: none;
}
body.chat-conversation .chat-stream { background: var(--night-chat-bg); }

html[data-sneebo-theme] .chat-conversation .night-chat-header {
    display: flex;
    flex: none;
    align-items: center;
    min-block-size: 52px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--night-chat-edge) !important;
    border-radius: 0 !important;
    background: var(--night-chat-surface) !important;
    z-index: 10;
}
html[data-sneebo-theme] .chat-conversation .night-chat-header > .container {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    inline-size: 100%;
    max-inline-size: none;
    min-block-size: 51px;
    padding: 0 6px 0 12px;
}
.chat-conversation .night-chat-header .chat-channel-display {
    flex: 1 1 auto;
    min-inline-size: 0;
    gap: 0;
}
.chat-conversation .night-chat-header .chat-channel-text {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 5px;
    padding: 0;
    color: var(--night-chat-text);
    min-inline-size: 0;
}
.chat-conversation .night-chat-header .chat-channel-name {
    color: var(--night-chat-text);
    font-family: var(--night-chat-body);
    font-size: 16px;
    font-weight: 600;
}
.chat-conversation .night-chat-header .chat-channel-text .night-chat-hash {
    display: block;
    color: var(--night-chat-muted);
    font-size: 20px;
}
.chat-conversation .night-chat-header .chat-room-trigger .ti-chevron-down { display: block; }
.chat-conversation .night-chat-header .chat-connection-indicator {
    padding: 0;
    margin: 0;
    flex: 0 0 18px;
    inline-size: 18px;
    border: 0;
    color: var(--night-chat-muted);
}
.chat-conversation .night-chat-header .chat-connection-indicator[data-state="live"] { color: var(--night-chat-green); }
.chat-conversation .night-chat-header .chat-connection-detail { z-index: 12; }
html[data-sneebo-theme] body.chat-conversation .night-chat-header .night-chat-actions {
    display: flex;
    flex: none;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
}
html[data-sneebo-theme] body.chat-conversation .night-chat-header .night-chat-actions .nav-icon-btn {
    display: grid;
    position: relative;
    place-items: center;
    inline-size: clamp(32px, 10.26vw, 40px);
    min-inline-size: 0;
    block-size: 44px !important;
    min-block-size: 44px;
    padding: 0 !important;
    margin: 0;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    color: var(--night-chat-muted) !important;
    box-shadow: none !important;
}
html[data-sneebo-theme] body.chat-conversation .night-chat-header .night-chat-actions .nav-icon-btn:hover {
    background: var(--night-chat-raised) !important;
    color: var(--night-chat-text) !important;
}
html[data-sneebo-theme] body.chat-conversation .night-chat-header.header-layout-sticky .night-chat-actions .nav-icon-btn {
    inline-size: 32px;
}
html[data-sneebo-theme] body.chat-conversation .night-chat-header.header-layout-overflow .night-chat-actions .night-chat-secondary {
    display: none;
}
.chat-conversation .night-chat-actions .nav-icon-btn > i {
    font-size: 20px;
    line-height: 1;
    margin: 0;
}
.chat-conversation .night-chat-actions :is(.night-chat-member-count, .pm-counter:not(:empty)) {
    position: absolute;
    inset: 2px 0 auto auto;
    min-inline-size: 16px;
    min-block-size: 16px;
    margin: 0;
    padding-inline: 3px;
    border: 0;
    border-radius: 8px;
    background: var(--night-chat-raised);
    color: var(--night-chat-text);
    text-align: center;
    font: 700 10px/16px var(--night-chat-body);
}
.chat-conversation .night-chat-actions .pm-counter:not(:empty) {
    background: var(--night-chat-pink);
    color: #2a0a14;
}
.chat-conversation .night-chat-actions .pm-counter:empty { display: none; }

html[data-sneebo-theme] body.chat-conversation .chat-workspace .chat-input-wrapper {
    padding: 10px 12px;
    background: var(--night-chat-surface) !important;
    border-bottom-color: var(--night-chat-edge);
}
html[data-sneebo-theme] body.chat-conversation .chat-workspace .chat-input-group {
    grid-template-columns: auto auto minmax(0, 1fr) auto 54px;
    column-gap: 0;
    isolation: isolate;
}
.chat-conversation .chat-input-group::before {
    z-index: -1;
    grid-area: 2 / 1 / 3 / 5;
    align-self: stretch;
    border-radius: 10px;
    background: var(--night-chat-raised);
    content: "";
}
.chat-conversation .chat-input-group:focus-within::before { outline: 1px solid var(--night-chat-muted); }
html[data-sneebo-theme] body.chat-conversation .chat-workspace #messageBox {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-block-size: 46px;
    padding: 12px 0 12px 14px;
    border-radius: 10px !important;
    font: 400 16px/22px var(--night-chat-body);
    color: var(--night-chat-text) !important;
}
html[data-sneebo-theme] body.chat-conversation .chat-workspace .chat-input-group :is(#sendButton, #imageUploadBtn, #emojiPickerBtn, #gameCommandBtn) {
    min-block-size: 46px !important;
    block-size: 46px !important;
    border-radius: 10px !important;
}
html[data-sneebo-theme] body.chat-conversation .chat-workspace .chat-input-group :is(#imageUploadBtn, #emojiPickerBtn, #gameCommandBtn) {
    color: var(--night-chat-muted) !important;
}
html[data-sneebo-theme] body.chat-conversation .chat-workspace .chat-input-group #sendButton {
    min-inline-size: 46px !important;
    inline-size: 46px !important;
    justify-self: end;
    color: var(--night-chat-bg) !important;
    background: var(--night-chat-action) !important;
}
.chat-conversation .chat-input-group :is(#emojiPickerBtn, #sendButton) i { font-size: 20px; }
body.chat-conversation .chat-history-viewport {
    padding: 8px 0 16px;
    scrollbar-gutter: auto;
}

html[data-sneebo-theme] body.chat-conversation .chat-history-viewport .onboarding-card {
    position: relative;
    margin: 0;
    padding: 10px 6px 14px 68px;
    border: 0 !important;
    border-bottom: 1px solid var(--night-chat-raised) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.night-chat-welcome-icon {
    position: absolute;
    inset: 14px auto auto 16px;
    display: grid;
    place-items: center;
    inline-size: 40px;
    block-size: 40px;
    border-radius: 50%;
    background: var(--night-chat-raised);
    color: var(--night-chat-text);
    font-size: 22px;
}
.chat-conversation .onboarding-card .onboarding-header {
    position: relative;
    display: block;
    padding: 0 38px 0 0;
}
.chat-conversation .onboarding-card .onboarding-title {
    margin: 0;
    color: var(--night-chat-text);
    font: 600 18px/1.35 var(--night-chat-body);
}
.chat-conversation .onboarding-card .onboarding-subtitle {
    margin: 8px 0;
    color: var(--night-chat-muted);
    font-size: 14px;
}
.chat-conversation .onboarding-card .onboarding-dismiss {
    position: absolute;
    inset: -10px 0 auto auto;
    display: grid;
    place-items: center;
    inline-size: 40px;
    block-size: 44px;
    color: var(--night-chat-muted);
    background: transparent;
}
.chat-conversation .onboarding-card .onboarding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}
html[data-sneebo-theme] body.chat-conversation .onboarding-actions > .btn {
    min-height: 44px;
    padding-inline: 12px;
    border: 0 !important;
    border-radius: 8px !important;
    font-size: 14px;
    font-weight: 600;
}
html[data-sneebo-theme] body.chat-conversation .onboarding-actions > [data-onboarding-action="game"] {
    background: var(--night-chat-raised) !important;
    color: var(--night-chat-text) !important;
}
.chat-conversation .onboarding-card .mobile-chat-guide {
    margin: 0;
    padding: 0;
}
.chat-conversation .onboarding-card .mobile-chat-guide[open] { flex: 1 0 100%; }
.chat-conversation .onboarding-card .mobile-chat-guide summary {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    min-block-size: 44px;
    padding: 0 6px;
    color: var(--night-chat-muted);
    font-size: 14px;
    font-weight: 500;
}
.chat-conversation .onboarding-card .mobile-chat-guide summary::marker { content: ""; }
.chat-conversation .onboarding-card .mobile-chat-guide summary::-webkit-details-marker { display: none; }
.chat-conversation .onboarding-card .mobile-chat-guide[open] summary i { rotate: 90deg; }

html[data-sneebo-theme] body.chat-conversation #messages .chat-card-body {
    padding: 8px 6px 8px 16px !important;
}
.chat-conversation #messages .night-chat-message {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    position: relative;
    gap: 2px 6px;
}
.chat-conversation #messages .night-chat-message-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 8px;
    grid-column: 1;
    font-size: .9375rem;
    line-height: 1.4;
}
html[data-sneebo-theme] .chat-conversation #messages .night-chat-message-head .nick:not([data-style-color]) { color: #ff9db3; }
html[data-sneebo-theme] .chat-conversation #messages .chat-own-message .night-chat-message-head .nick:not([data-style-color]) { color: #9ccbff; }
.chat-conversation #messages .night-chat-message-head .nick b { font-weight: 600; }
.chat-conversation #messages .night-chat-message-head .chat-time-text {
    margin: 0;
    font-size: 12px;
    color: var(--night-chat-muted);
}
.chat-conversation #messages .night-chat-message .chat-message-text {
    grid-column: 1;
    font-size: 1rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.chat-conversation #messages .night-chat-message .chat-reply-inline,
.chat-conversation #messages .night-chat-message .chat-reactions { grid-column: 1; }

.chat-conversation #messages .night-chat-message-actions {
    --chat-message-action-width: 2rem;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    display: flex;
    gap: 0;
}
.chat-conversation #messages .night-chat-message .chat-footer-meta {
    flex-wrap: wrap;
    grid-column: 1;
    margin: 0;
}
.chat-conversation #messages .night-chat-message .chat-footer-meta:empty { display: none; }
.chat-conversation #messages .night-chat-message-actions .chat-tools { margin: 0; gap: 0; }
.chat-conversation #messages .night-chat-message-actions .chat-edited {
    position: absolute;
    inset: 0 calc(2 * var(--chat-message-action-width) + 6px) auto auto;
    font-size: 11px;
}
.chat-conversation #messages .night-chat-message-actions :is(.chat-more-button, .chat-reply-btn) {
    display: grid;
    place-items: center;
    inline-size: var(--chat-message-action-width);
    block-size: 2rem;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--night-chat-muted);
    font-size: 1rem;
}
.chat-conversation #messages .night-chat-message-actions :is(.chat-more-button, .chat-reply-btn):hover {
    background: var(--night-chat-raised);
    color: var(--night-chat-text);
}

html[data-sneebo-theme] body.chat-conversation.chat-compact #messages .chat-card-body { padding-block: 4px !important; }
body.chat-conversation.chat-compact #messages .night-chat-message .chat-message-text { font-size: .9375rem; }

body.chat-conversation #messages .chat-sys-text {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: var(--night-chat-muted);
    font: 400 14px/1.4 var(--night-chat-body);
}
body.chat-conversation #messages .chat-sys-text i { color: var(--night-chat-green); font-size: 18px; }
body.chat-conversation #messages .chat-sys-text b { color: var(--night-chat-text); }

/* Channel and participant navigation in the conversation workspace. */
.chat-conversation .chat-sidebar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 6px 10px;
}
.chat-conversation .chat-sidebar h2 {
    margin: 0;
    color: var(--night-chat-muted);
    font: 600 12px/1.35 var(--night-chat-body);
    letter-spacing: .04em;
    text-transform: uppercase;
}
.chat-conversation .chat-sidebar h2 a { color: inherit; }
.chat-conversation .chat-sidebar-create {
    display: grid;
    place-items: center;
    inline-size: 36px;
    block-size: 36px;
    border-radius: 8px;
    font-size: 18px;
}
.chat-conversation .chat-sidebar-create > i { color: var(--night-chat-action) !important; }
.chat-conversation .chat-sidebar-create:hover { background: var(--night-chat-raised); }
.chat-conversation .chat-sidebar li > :is(a, span) {
    min-block-size: 40px;
    padding: 0 10px;
    font: 600 15px/1.3 var(--night-chat-body);
}
.chat-conversation .chat-sidebar li > a i { color: var(--night-chat-muted); }
.chat-conversation .chat-sidebar li > a[aria-current="page"] { color: var(--night-chat-text); }
.chat-conversation .chat-participants-sidebar h2 { padding: 6px 10px; }
.chat-conversation .chat-participants-sidebar li > :is(a, span) { color: #9ccbff; }
.chat-conversation .chat-participants-sidebar li > :is(a, span)::before,
.night-chat-presence-dot {
    flex: 0 0 10px;
    inline-size: 10px;
    block-size: 10px;
    border-radius: 50%;
    background: var(--night-chat-green);
    content: "";
}
@media (max-width: 51.999rem) {
    .chat-conversation #messages .night-chat-message-actions { --chat-message-action-width: 1.875rem; }

    html[data-sneebo-theme] body.chat-conversation .chat-channels-sidebar.chat-room-menu-open {
        inset-block-start: 52px;
        background: var(--night-chat-sidebar);
    }
}
@media (min-width: 52rem) {
    html[data-sneebo-theme] body.chat-conversation .chat-columns:has(> .chat-channels-sidebar) {
        grid-template-columns: 200px minmax(0, 1fr);
    }
    html[data-sneebo-theme] body.chat-conversation :is(.chat-channels-sidebar, .chat-channels-sidebar.chat-room-menu-open) {
        padding: 12px 8px;
        border-right-color: var(--night-chat-edge);
        background: var(--night-chat-sidebar) !important;
        box-shadow: none !important;
    }
}
@media (min-width: 64rem) {
    html[data-sneebo-theme] body.chat-conversation > .night-navigation { display: flex !important; }
}
@media (min-width: 73rem) {
    html[data-sneebo-theme] body.chat-conversation .chat-columns:has(> .chat-participants-sidebar) {
        grid-template-columns: minmax(0, 1fr) 180px;
    }
    html[data-sneebo-theme] body.chat-conversation .chat-columns:has(> .chat-channels-sidebar):has(> .chat-participants-sidebar) {
        grid-template-columns: 200px minmax(0, 1fr) 180px;
    }
    html[data-sneebo-theme] body.chat-conversation .chat-participants-sidebar {
        padding: 12px 8px;
        border-left-color: var(--night-chat-edge);
        background: var(--night-chat-sidebar) !important;
    }
}

/* The emoji picker remains anchored below the composer. */
html[data-sneebo-theme] body.chat-conversation #emojiPicker {
    padding: 6px 12px 12px;
    max-inline-size: calc(100% - 16px);
    max-width: calc(100% - 16px);
    border: 1px solid var(--night-chat-line) !important;
    border-radius: 12px !important;
    background: var(--night-chat-surface) !important;
    box-shadow: none !important;
    color: var(--night-chat-text);
}
body.chat-conversation #emojiPicker.is-open { display: flex; flex-direction: column; gap: 10px; }
body.chat-conversation .chat-emoji-picker-header {
    min-block-size: 44px;
    margin: 0 -8px 0 0;
    padding: 0;
}
body.chat-conversation .chat-emoji-picker-title {
    font: 600 16px/1.4 var(--night-chat-body);
}
body.chat-conversation .chat-emoji-picker-close {
    display: grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    border: 0;
    color: var(--night-chat-muted);
    background: transparent;
}
body.chat-conversation .chat-emoji-picker-search {
    position: relative;
    margin: 0;
}
body.chat-conversation .chat-emoji-picker-search > i {
    position: absolute;
    inset: 14px auto auto 12px;
    color: var(--night-chat-muted);
    font-size: 18px;
    pointer-events: none;
}
html[data-sneebo-theme] body.chat-conversation #emojiPickerSearch {
    height: 46px;
    padding: 0 12px 0 40px;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--night-chat-raised) !important;
}
body.chat-conversation .chat-emoji-picker-meta {
    margin: 0;
    color: var(--night-chat-muted);
    font-size: 13px;
}
html[data-sneebo-theme] body.chat-conversation #emojiPicker .chat-emoji-picker-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 2px;
    max-block-size: none;
    max-height: none;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
}
html[data-sneebo-theme] .chat-conversation #emojiPicker .chat-emoji-picker-item {
    display: grid;
    place-items: center;
    min-inline-size: 0;
    aspect-ratio: auto;
    block-size: 44px;
    padding: 0;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
}
html[data-sneebo-theme] .chat-conversation #emojiPicker .chat-emoji-picker-item:hover {
    background: var(--night-chat-raised) !important;
}
body.chat-conversation .chat-emoji-picker-image img { max-inline-size: 27px; max-block-size: 27px; }
body.chat-conversation .chat-emoji-picker-pagination { margin: 0; gap: 8px; }
html[data-sneebo-theme] body.chat-conversation .chat-emoji-picker-pagination .btn {
    min-height: 44px;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--night-chat-raised) !important;
    color: var(--night-chat-text) !important;
    box-shadow: none !important;
}

.chat-conversation .chat-search-panel[hidden] { display: none; }
.chat-conversation .chat-search-panel {
    display: flex;
    flex-direction: column;
    flex: none;
    gap: 10px;
    max-block-size: calc(100% - 52px);
    overflow-y: auto;
    padding: 4px 12px 12px;
    border-bottom: 1px solid var(--night-chat-edge);
    background: var(--night-chat-surface);
}
.chat-conversation .chat-search-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-right: -8px;
}
.chat-conversation .chat-search-top h2 {
    margin: 0;
    color: var(--night-chat-text);
    font: 600 16px/1.4 var(--night-chat-body);
}
.chat-conversation .chat-search-top button {
    display: grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--night-chat-muted);
}
.chat-conversation .chat-search-top button:hover { background: var(--night-chat-raised); }
.chat-conversation .chat-search-panel :is(.chat-find-list, .chat-reaction-status):empty { display: none; }
.chat-conversation .chat-search-panel .chat-find-field { position: relative; flex: 1; min-inline-size: 0; }
.chat-conversation .chat-search-panel .chat-find-field > i {
    position: absolute;
    inset: 14px auto auto 12px;
    color: var(--night-chat-muted);
    font-size: 18px;
}
html[data-sneebo-theme] .chat-conversation .chat-search-panel .chat-reaction-search {
    inline-size: 100%;
    min-block-size: 46px;
    margin: 0;
    padding: 0 12px 0 40px;
    border: 0;
    border-radius: 10px;
    background: var(--night-chat-raised);
    color: var(--night-chat-text);
    font: 400 16px/1.4 var(--night-chat-body);
}
html[data-sneebo-theme] .chat-conversation .chat-search-panel button[type="submit"] {
    min-block-size: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--night-chat-action);
    color: var(--night-chat-bg);
    font-size: 15px;
    font-weight: 600;
}
.chat-conversation .chat-stream:has(.chat-search-panel:not([hidden])) > :is(.chat-input-wrapper, .chat-input-readonly, .chat-history-frame) {
    display: none;
}

/* The existing account and channel menu fills the mobile viewport. */
html[data-sneebo-theme] body.chat-conversation #userMenuOffcanvas {
    --bs-offcanvas-width: 390px;
    max-inline-size: 100%;
    background: var(--night-chat-bg) !important;
    border-color: var(--night-chat-line) !important;
    color: var(--night-chat-text);
}
@media (max-width: 35.999rem) {
    html[data-sneebo-theme] body.chat-conversation #userMenuOffcanvas {
        inline-size: 100%;
        width: 100%;
        max-inline-size: none;
        border: 0 !important;
    }
}
html[data-sneebo-theme] body.chat-conversation #userMenuOffcanvas .offcanvas-header {
    min-block-size: 52px;
    padding: 0 4px 0 16px;
    background: var(--night-chat-surface) !important;
    border-bottom: 1px solid var(--night-chat-edge);
    font: 600 16px/1.4 var(--night-chat-body);
}
html[data-sneebo-theme] body.chat-conversation #userMenuOffcanvas .btn-close {
    flex: 0 0 44px;
    inline-size: 44px;
    block-size: 44px;
    padding: 0;
    margin: 0;
    filter: none;
    background: transparent !important;
    color: var(--night-chat-muted);
    opacity: 1;
}
html[data-sneebo-theme] #userMenuOffcanvas :is(.user-menu-main, .user-menu-section) {
    background: transparent !important;
}
html[data-sneebo-theme] body.chat-conversation #userMenuOffcanvas .offcanvas-body { padding: 12px 8px 20px; }
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--night-chat-surface) !important;
}
#userMenuOffcanvas .user-menu-profile-info { flex: 1; }
#userMenuOffcanvas .user-menu-username { font: 600 18px/1.4 var(--night-chat-body); }
#userMenuOffcanvas .user-menu-avatar {
    flex: 0 0 48px;
    inline-size: 48px;
    block-size: 48px;
    border: 0;
    background: var(--night-chat-blue);
    color: #071b33;
    font-size: 20px;
}
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-account {
    flex: none;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 0 !important;
    border-radius: 8px !important;
    font-size: 14px;
    font-weight: 600;
}
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-section { margin-top: 14px; }
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-section-title {
    padding: 6px 12px;
    margin: 0;
    color: var(--night-chat-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-list {
    border: 0 !important;
    background: transparent !important;
}
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-row {
    min-height: 50px;
    padding: 0 8px 0 12px;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    font-size: 16px;
    font-weight: 500;
}
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-row + .user-menu-row { border-top: 0 !important; }
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-row:is(a):hover { background: var(--night-chat-raised) !important; }
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-row > span:first-child { gap: 12px; }
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-row > span:first-child > i {
    border: 0;
    background: transparent;
    color: var(--night-chat-muted) !important;
    font-size: 20px;
}
#userMenuOffcanvas .user-menu-lang-meta {
    gap: 2px;
    padding: 2px;
    border-radius: 10px;
    background: var(--night-chat-surface);
}
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-lang-btn {
    inline-size: 46px;
    min-block-size: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--night-chat-muted);
}
html[data-sneebo-theme] #userMenuOffcanvas .user-menu-lang-btn.is-active {
    background: var(--night-chat-raised);
    color: var(--night-chat-text);
    box-shadow: none;
}

/* The channel directory and its related screens share the same narrow desktop column. */
html[data-sneebo-theme] body:is(.channels-arcade, .polls-page, .pm-page, .members-page, .online-page):not(.game-mobile) {
    display: flex;
    flex-direction: column;
    background: var(--night-chat-bg) !important;
    color: var(--night-chat-text);
    font-family: var(--night-chat-body);
}
html[data-sneebo-theme] body.channels-arcade > .channel-directory {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    inline-size: 100%;
    max-inline-size: 760px;
    margin-inline: auto;
}
html[data-sneebo-theme] body:has(> .night-chat-page-header) > .account-arcade-main {
    flex: 1 0 auto;
    inline-size: 100%;
    max-inline-size: 760px;
    padding: 0 0 16px;
    margin: 0 auto;
}
@media (min-width: 52rem) {
    body.channels-arcade > .channel-directory,
    body:has(> .night-chat-page-header) > .account-arcade-main {
        border-inline: 1px solid var(--night-chat-edge);
    }
}
.night-chat-page-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
    inline-size: 100%;
    max-inline-size: 760px;
    min-block-size: 52px;
    margin: 0 auto;
    padding: 0 12px 0 4px;
    border-bottom: 1px solid var(--night-chat-edge);
    background: var(--night-chat-surface);
}
.night-chat-page-header h1 {
    flex: 1 1 auto;
    min-inline-size: 0;
    margin: 0;
    color: var(--night-chat-text);
    font: 600 16px/1.25 var(--night-chat-body);
}
.night-chat-page-header h1 > span { display: block; }
.night-chat-page-context {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--night-chat-muted);
    font-size: 12px;
    font-weight: 500;
}
html[data-sneebo-theme] .night-chat-page-back {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 44px;
    min-block-size: 44px;
    gap: 2px;
    color: var(--night-chat-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.night-chat-page-back > i { font-size: 22px; }
html[data-sneebo-theme] .night-chat-page-coins {
    flex: none;
    display: flex;
    align-items: center;
    gap: 5px;
    min-block-size: 28px;
    padding: 0 10px;
    border-radius: 14px;
    background: var(--night-chat-bg);
    color: var(--night-chat-amber);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.night-chat-page-coins > i { font-size: 16px; }
body:has(.night-chat-page-header) > .site-footer {
    width: 100%;
    max-width: 760px;
    margin: auto auto 0;
    border: 0 !important;
    background: transparent !important;
}
.channel-directory-header h1 { text-align: center; }
.channel-directory-header .night-chat-page-back {
    max-inline-size: 40%;
    justify-content: flex-start;
    padding: 0 8px;
}
.channel-directory-header .night-chat-page-back > span {
    min-inline-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
html[data-sneebo-theme] body.channels-arcade #createChannelBtn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-block-size: 36px;
    padding: 0 12px;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--night-chat-action) !important;
    color: var(--night-chat-bg) !important;
    box-shadow: none !important;
    font-size: 14px;
    font-weight: 600;
}
.channel-directory-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--night-chat-edge);
    background: var(--night-chat-surface);
}
.channel-directory-search { grid-column: 1 / -1; }
.channel-search-icon {
    position: absolute;
    inset: 14px auto auto 12px;
    color: var(--night-chat-muted);
    font-size: 18px;
    pointer-events: none;
}
html[data-sneebo-theme] body.channels-arcade .channel-directory-controls :is(.form-control, .form-select, .channel-filter-btn) {
    min-block-size: 44px;
    border: 0 !important;
    border-radius: 10px !important;
    background-color: var(--night-chat-raised) !important;
    color: var(--night-chat-text) !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 500;
}
html[data-sneebo-theme] body.channels-arcade .channel-directory-controls #channelSearch {
    min-block-size: 46px;
    padding-inline: 40px 44px;
    font-size: 16px;
}
html[data-sneebo-theme] body.channels-arcade .channel-directory-controls .channel-filter-btn {
    padding: 0 14px;
    font-weight: 600;
}
html[data-sneebo-theme] body.channels-arcade .channel-filter-btn i { font-size: 18px; }

.night-chat-list-label {
    margin: 0;
    padding: 6px 12px;
    color: var(--night-chat-muted);
    font: 600 12px/1.4 var(--night-chat-body);
    letter-spacing: .04em;
    text-transform: uppercase;
}
.channel-directory-main > .night-chat-list-label { margin: 10px 8px 0; }
html[data-sneebo-theme] body.channels-arcade .channel-directory .channels-list {
    gap: 2px;
    margin: 0;
    padding: 0 8px 16px;
    background: transparent;
    box-shadow: none;
}
html[data-sneebo-theme] body.channels-arcade .channel-directory .channel-item {
    padding: 0;
    margin: 0;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
}
html[data-sneebo-theme] body.channels-arcade .channel-directory .channel-link {
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--night-chat-text) !important;
    box-shadow: none !important;
}
html[data-sneebo-theme] body.channels-arcade .channel-directory .channel-link:is(:hover, [aria-current="page"]) {
    background: var(--night-chat-raised) !important;
}
body.channels-arcade .channel-directory .channel-left {
    flex: 1;
    align-items: flex-start;
    gap: 10px;
    min-inline-size: 0;
}
html[data-sneebo-theme] body.channels-arcade .channel-directory .channel-icon {
    flex: 0 0 20px;
    inline-size: 20px;
    block-size: 22px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: var(--night-chat-muted) !important;
    font-size: 20px;
}
body.channels-arcade .channel-directory .channel-icon img {
    inline-size: 20px;
    block-size: 20px;
}
body.channels-arcade .channel-directory .channel-info {
    display: grid;
    grid-template-columns: minmax(0, max-content) auto minmax(0, 1fr);
    gap: 3px 8px;
    min-inline-size: 0;
}
body.channels-arcade .channel-directory .channel-title {
    order: 0;
    min-inline-size: 0;
    color: var(--night-chat-text) !important;
    font: 600 16px/22px var(--night-chat-body) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.channels-arcade .channel-directory .channel-meta {
    order: 1;
    grid-column: 2;
    grid-row: 1;
    gap: 4px;
    min-width: 0;
}
body.channels-arcade .channel-directory .channel-unread-badge:not([hidden]) { order: 2; grid-column: 3; justify-self: start; }
body.channels-arcade .channel-directory :is(.channel-preview, .channel-desc) {
    order: 3;
    grid-column: 1 / -1;
    min-width: 0;
    color: var(--night-chat-muted);
    font-size: 14px;
}
body.channels-arcade .channel-directory .channel-preview:empty { display: none; }
body.channels-arcade .channel-directory .channel-desc { font-size: 12px; }
html[data-sneebo-theme] body.channels-arcade .channel-directory .channel-meta :is(.badge-owner, .badge-moderator) {
    padding: 0 6px;
    border: 0;
    border-radius: 5px;
    background: var(--night-chat-bg);
    color: var(--night-chat-action);
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
}
body.channels-arcade .channel-directory .badge-owner > i { display: none; }
html[data-sneebo-theme] body.channels-arcade .channel-directory .channel-online {
    flex: none;
    gap: 4px;
    align-self: flex-start;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: var(--night-chat-muted) !important;
    box-shadow: none !important;
    font: 600 13px/22px var(--night-chat-body);
}
body.channels-arcade .channel-directory .channel-online i { font-size: 16px; }
body.channels-arcade .channel-directory #noChannelsFound { margin: 0 12px 6px; }

/* Polls are rendered by the existing ballot handlers on both screens. */
html[data-sneebo-theme] body:is(.chat-conversation, .polls-page) .chat-poll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    inline-size: auto;
    min-inline-size: 0;
    padding: 14px;
    margin: 12px 16px 4px;
    border: 1px solid var(--night-chat-line) !important;
    border-radius: 10px !important;
    background: var(--night-chat-surface) !important;
    box-shadow: none !important;
}
body:is(.chat-conversation, .polls-page) .chat-poll-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0;
}
body:is(.chat-conversation, .polls-page) .chat-poll-heading {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    color: var(--night-chat-muted);
    font: 600 12px/1.4 var(--night-chat-body);
    letter-spacing: .04em;
    text-transform: uppercase;
}
body:is(.chat-conversation, .polls-page) .chat-poll-heading i { font-size: 16px; }
body:is(.chat-conversation, .polls-page) .chat-poll-question {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--night-chat-text);
    font: 600 17px/1.35 var(--night-chat-body);
}
body:is(.chat-conversation, .polls-page) .chat-poll-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}
html[data-sneebo-theme] body:is(.chat-conversation, .polls-page) .chat-poll-option-button {
    justify-content: flex-start;
    gap: 12px;
    min-block-size: 46px;
    padding: 0 12px;
    border: 1.5px solid var(--night-chat-raised) !important;
    border-radius: 8px !important;
    background: var(--night-chat-raised) !important;
    color: var(--night-chat-text) !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 500;
}
body:is(.chat-conversation, .polls-page) .chat-poll-option-button::before {
    flex: 0 0 18px;
    block-size: 18px;
    border: 1.5px solid var(--night-chat-muted);
    border-radius: 50%;
    content: "";
}
html[data-sneebo-theme] body:is(.chat-conversation, .polls-page) .chat-poll-option-button:is(.voted, :hover:not(:disabled)) {
    border-color: var(--night-chat-action) !important;
}
body:is(.chat-conversation, .polls-page) .chat-poll-option-button.voted::before {
    border-color: var(--night-chat-action);
    background: var(--night-chat-action);
    box-shadow: inset 0 0 0 4px var(--night-chat-raised);
}
body:is(.chat-conversation, .polls-page) .chat-poll-option { margin: 0; }
body:is(.chat-conversation, .polls-page) .chat-poll-option-votes { margin-inline-start: auto; }
body:is(.chat-conversation, .polls-page) .chat-poll-footer {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2px 8px;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--night-chat-muted);
    font-size: 13px;
}
body:is(.chat-conversation, .polls-page) .chat-poll-meta {
    flex: 1 1 9rem;
    font-size: 13px;
}
body:is(.chat-conversation, .polls-page) .chat-poll-meta-muted {
    color: var(--night-chat-muted);
    font-size: inherit;
    font-style: normal;
}
html[data-sneebo-theme] body:is(.chat-conversation, .polls-page) :is(.chat-poll-hide-btn, .chat-poll-toggle-btn) {
    min-block-size: 44px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: var(--night-chat-muted) !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
body:is(.chat-conversation, .polls-page) .chat-poll-status .badge.poll-status-active {
    min-block-size: 22px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: var(--night-chat-green) !important;
    color: #06241a !important;
    font-size: 12px;
    line-height: 22px;
}
html[data-sneebo-theme] body.polls-page .night-polls-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-block-size: 44px;
    margin: 8px 8px 0;
    padding: 0 8px;
    color: var(--night-chat-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
body.polls-page .polls-page-description { margin: 8px 16px; }
body.polls-page .polls-page-list { margin: 0; }

/* Participant lists use compact rows with the live status or the account avatar. */
html[data-sneebo-theme] body:is(.members-page, .online-page):not(.game-mobile) .account-arcade-main {
    padding: 10px 8px 16px;
}
html[data-sneebo-theme] body:is(.members-page, .online-page) :is(.members-list, .online-list) {
    gap: 2px;
    margin: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
html[data-sneebo-theme] body:is(.members-page, .online-page) :is(.members-list, .online-list) .list-group-item {
    min-block-size: 50px;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 12px;
    margin: 0;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
}
html[data-sneebo-theme] body:is(.members-page, .online-page) :is(.members-list, .online-list) .list-group-item:hover {
    background: var(--night-chat-raised) !important;
}
body:is(.members-page, .online-page) .user-list-name-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
html[data-sneebo-theme] body:is(.members-page, .online-page) .user-list-name-row .nick:not([data-style-color]) {
    color: #9ccbff !important;
    font-size: 16px;
}
body:is(.members-page, .online-page) .user-list-name-row .small-grey-text { color: var(--night-chat-muted); }
body:is(.members-page, .online-page) .night-chat-presence-dot:not(.is-online) { background: var(--night-chat-muted); }
body.members-page .night-chat-member-chevron { color: var(--night-chat-muted); font-size: 14px; }
body:is(.members-page, .online-page) .user-list-meta-row:empty { display: none; }
html[data-sneebo-theme] body:is(.members-page, .online-page) .night-chat-list-back { margin-inline: 4px; }
html[data-sneebo-theme] body:is(.members-page, .online-page) .night-chat-list-back a {
    min-block-size: 46px;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--night-chat-raised) !important;
    color: var(--night-chat-text) !important;
    box-shadow: none !important;
}

/* Private messages reuse the top composition layout and the existing expiry notice. */
.night-pm-compose {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--night-chat-edge);
    background: var(--night-chat-surface);
}
.night-pm-field { display: flex; flex-direction: column; gap: 8px; }
.night-pm-field .form-label {
    margin: 0;
    color: var(--night-chat-muted);
    font-size: 13px;
    font-weight: 600;
}
html[data-sneebo-theme] body.pm-page .night-pm-compose :is(#recipient, #message) {
    min-block-size: 46px;
    border: 0 !important;
    border-radius: 10px !important;
    background-color: var(--night-chat-raised) !important;
    color: var(--night-chat-text) !important;
    box-shadow: none !important;
}
.night-pm-send { display: flex; align-items: flex-end; gap: 8px; }
.night-pm-send textarea { flex: 1; resize: vertical; }
html[data-sneebo-theme] .night-pm-compose .night-pm-send textarea {
    min-block-size: 68px;
    padding: 10px 12px;
}
html[data-sneebo-theme] .night-pm-send button[type="submit"] {
    flex: none;
    min-block-size: 46px;
    padding: 0 16px;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--night-chat-action) !important;
    color: var(--night-chat-bg) !important;
    font-size: 15px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none !important;
}
.night-pm-history-heading {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin: 4px 6px 0 16px;
}
.night-pm-history-heading h2 { padding: 0; }
html[data-sneebo-theme] .night-pm-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    min-block-size: 44px;
    padding-inline: 10px;
    color: var(--night-chat-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.night-pm-refresh > i { font-size: 18px; }
html[data-sneebo-theme] .night-pm-history .pm-list {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
html[data-sneebo-theme] body.pm-page .night-pm-history .list-group-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 16px;
    border: 0 !important;
    background: transparent !important;
    color: var(--night-chat-text);
    box-shadow: none !important;
}
.night-pm-author,
.night-pm-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--night-chat-muted);
    font-size: 12px;
}
.night-pm-meta { gap: 5px; }
.night-pm-author b { color: #ff9db3; font-size: 15px; font-weight: 600; }
.night-pm-text { font-size: 16px; line-height: 1.4; }
.night-pm-vanish {
    display: flex;
    gap: 10px;
    margin: 12px 16px 0;
    padding: 12px;
    border-radius: 10px;
    background: var(--night-chat-surface);
    color: var(--night-chat-muted);
    font-size: 13px;
    line-height: 1.4;
}
.night-pm-vanish > i { flex: none; color: var(--night-chat-amber); font-size: 18px; }

html[data-sneebo-theme] body:is(.channels-arcade, .polls-page, .pm-page, .members-page, .online-page) .site-footer__links {
    gap: 0 22px;
    font-size: 13px;
}
html[data-sneebo-theme] body:is(.channels-arcade, .polls-page, .pm-page, .members-page, .online-page) .site-footer__links a {
    color: var(--night-chat-muted);
}
body:is(.channels-arcade, .polls-page, .pm-page, .members-page, .online-page) .site-footer__dot { display: none; }
html[data-sneebo-theme] body:is(.channels-arcade, .pm-page) :is(#channelSort, #recipient) {
    appearance: auto;
    background-image: none !important;
    padding-inline: 10px;
}
