/* =============================================================================
   Ember - dark / orange neon
   A warm near-black base with a single hot-orange accent used sparingly for
   emphasis. Everything else is desaturated so the accent actually reads as
   "on fire" instead of competing with itself.
   ========================================================================== */

:root {
    --bg:            #0a0705;
    --bg-1:          #100b08;
    --bg-2:          #17100c;
    --bg-3:          #1f1510;

    --line:          #2a1d15;
    --line-soft:     #20160f;

    --text:          #f6efe8;
    --text-dim:      #b8a99c;
    --text-faint:    #7d6e62;

    --accent:        #ff7a1a;
    --accent-hot:    #ffa23c;
    --accent-deep:   #d94f00;
    --accent-glow:   rgba(255, 122, 26, .35);
    --accent-wash:   rgba(255, 122, 26, .10);

    --live:          #3ddc84;
    --danger:        #ff4d4d;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;

    --shadow: 0 10px 34px rgba(0, 0, 0, .55);
    --glow: 0 0 0 1px var(--accent-glow), 0 0 22px -6px var(--accent-glow);

    --ease: cubic-bezier(.22, .61, .36, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
            'Helvetica Neue', Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* warm ambient wash so the flat black does not read as dead space */
    background-image:
        radial-gradient(1100px 620px at 78% -12%, rgba(255, 122, 26, .10), transparent 62%),
        radial-gradient(760px 460px at 8% 108%, rgba(217, 79, 0, .08), transparent 60%);
}

.hidden { display: none !important; }

/* keyboard users must always be able to see where they are */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------- brand */

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    font-size: 13px;
    color: var(--text);
    user-select: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 10px;
    color: var(--accent);
    background: linear-gradient(160deg, rgba(255, 122, 26, .22), rgba(255, 122, 26, .04));
    box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .30), 0 0 18px -6px var(--accent-glow);
    flex-shrink: 0;
}

.brand--lg { justify-content: center; }
.brand--lg .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.brand--lg .brand-name { font-size: 22px; letter-spacing: .22em; }

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 9px 14px;
    cursor: pointer;
    transition: background .16s var(--ease), border-color .16s var(--ease),
                transform .12s var(--ease), box-shadow .16s var(--ease), color .16s var(--ease);
    white-space: nowrap;
}
.btn:hover { background: #271a13; border-color: #3a2718; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.btn--primary {
    color: #180a02;
    background: linear-gradient(180deg, var(--accent-hot), var(--accent));
    border-color: transparent;
    box-shadow: 0 6px 18px -8px var(--accent-glow);
}
.btn--primary:hover { background: linear-gradient(180deg, #ffb057, var(--accent-hot)); }

.btn--ghost { background: transparent; color: var(--text-dim); }
.btn--ghost:hover { background: var(--bg-3); color: var(--text); }

.btn--block { width: 100%; }
.btn--lg { padding: 13px 20px; font-size: 15px; border-radius: var(--r-md); }

.icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: color .16s var(--ease), background .16s var(--ease),
                border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.icon-btn:hover { color: var(--accent); background: var(--accent-wash); border-color: rgba(255, 122, 26, .25); }
.icon-btn[aria-pressed="true"] {
    color: var(--accent);
    background: var(--accent-wash);
    border-color: rgba(255, 122, 26, .4);
    box-shadow: 0 0 16px -6px var(--accent-glow);
}
.icon-btn--danger:hover { color: var(--danger); background: rgba(255, 77, 77, .1); border-color: rgba(255, 77, 77, .3); }

.icon-btn-badge {
    position: absolute;
    top: -3px; right: -3px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    display: grid; place-items: center;
    font-size: 10px; font-weight: 700;
    color: #180a02;
    background: var(--accent);
    border-radius: 9px;
    border: 2px solid var(--bg-1);
}

/* ---------------------------------------------------------------- join */

.screen {
    position: fixed; inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 100;
    overflow-y: auto;
}

.join-card {
    width: 100%;
    max-width: 372px;
    padding: 34px 30px 30px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow), 0 0 60px -30px var(--accent-glow);
}

.join-sub {
    margin: 10px 0 26px;
    font-size: 13px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.field { margin-bottom: 16px; text-align: left; }

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.field input {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field input::placeholder { color: #5f5249; }
.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 122, 26, .13);
}
.field input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(255, 77, 77, .12);
}

.field-error {
    min-height: 17px;
    margin-top: 5px;
    font-size: 12px;
    color: var(--danger);
}

/* colour picker */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 4px 2px;
}

.color-option {
    position: relative;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.color-option:hover { transform: scale(1.14); }
.color-option.selected {
    border-color: var(--text);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--bg-2), 0 0 14px -3px currentColor;
}
.color-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.welcome-msg {
    margin-top: 16px;
    font-size: 13px;
    color: var(--accent);
}

/* ---------------------------------------------------------------- shell */

#main-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(16, 11, 8, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    z-index: 20;
}

.topbar-room {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.room-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* live / offline pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-3);
    color: var(--text-faint);
    flex-shrink: 0;
    transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.status-pill[data-state="live"] {
    color: var(--live);
    border-color: rgba(61, 220, 132, .4);
    background: rgba(61, 220, 132, .1);
}
.status-pill[data-state="live"] .status-dot { animation: pulse-live 1.6s ease-in-out infinite; }

.status-pill[data-state="offline"] {
    color: var(--text-faint);
    border-color: var(--line);
}

.status-pill[data-state="checking"] .status-dot { animation: pulse-live 1.1s ease-in-out infinite; color: var(--accent); }

@keyframes pulse-live {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: .55; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0); }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------- grid */

#body-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
}

/* ---------------------------------------------------------------- video */

#stream-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #000;
}

#video-container {
    position: relative;
    flex: 1;
    min-height: 0;
    background:
        radial-gradient(700px 420px at 50% 40%, #14100d, #050403);
    display: grid;
    place-items: center;
    overflow: hidden;
}

#video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 1;
}

#player-skeleton {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 0;
}
.skeleton-bar {
    width: 42%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    background-size: 200% 100%;
    animation: sweep 1.5s var(--ease) infinite;
}
@keyframes sweep {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* offline card, shown over the player area */
#player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 4, 3, .82);
    backdrop-filter: blur(3px);
}

.offline-card {
    text-align: center;
    max-width: 330px;
    padding: 26px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-1);
    box-shadow: var(--shadow);
}
.offline-icon { color: var(--accent); opacity: .85; display: block; margin-bottom: 10px; }
.offline-card h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 7px;
}
.offline-card p { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }

#stream-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: var(--bg-1);
    border-top: 1px solid var(--line);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.stream-hint {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--mono);
}

/* ---------------------------------------------------------------- chat */

#chat-container {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--bg-1);
    border-left: 1px solid var(--line);
}

#chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.room-chip {
    padding: 2px 8px;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: none;
    color: var(--accent);
    background: var(--accent-wash);
    border: 1px solid rgba(255, 122, 26, .25);
    border-radius: 999px;
}

.ws-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-faint);
}
.ws-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
}
.ws-status[data-state="online"] .ws-dot { background: var(--live); }
.ws-status[data-state="connecting"] .ws-dot { background: var(--accent); animation: pulse-live 1.1s ease-in-out infinite; }

#chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    scrollbar-width: thin;
    scrollbar-color: #3a2718 transparent;
}
#chat-messages::-webkit-scrollbar { width: 9px; }
#chat-messages::-webkit-scrollbar-thumb {
    background: #33210f;
    border-radius: 6px;
    border: 2px solid var(--bg-1);
}
#chat-messages::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

.empty-msg {
    margin: auto;
    text-align: center;
    color: var(--text-faint);
    font-size: 13px;
    line-height: 1.7;
    max-width: 230px;
}
.empty-msg strong { display: block; color: var(--text-dim); margin-bottom: 3px; }

/* date separator */
.day-sep {
    align-self: center;
    margin: 12px 0 8px;
    padding: 3px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-faint);
    background: var(--bg-3);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
}

.system-msg {
    align-self: center;
    margin: 4px 0;
    font-size: 12px;
    color: var(--accent);
    opacity: .85;
}

.chat-message {
    padding: 4px 8px;
    border-radius: var(--r-sm);
    word-break: break-word;
    overflow-wrap: anywhere;
    transition: background .14s var(--ease);
}
.chat-message:hover { background: rgba(255, 255, 255, .022); }

.chat-message .username {
    font-weight: 700;
    margin-right: 6px;
}
.chat-message .timestamp {
    color: var(--text-faint);
    font-size: 10.5px;
    margin-right: 6px;
    font-variant-numeric: tabular-nums;
}
.chat-message .text { color: var(--text); }

/* consecutive messages from one person: no name, one timestamp */
.chat-message.is-grouped { padding-top: 1px; padding-bottom: 1px; }
.chat-message.is-grouped .username,
.chat-message.is-grouped .timestamp { display: none; }

.chat-message.is-own {
    background: var(--accent-wash);
    box-shadow: inset 2px 0 0 var(--accent);
}
.chat-message.is-own .text { color: #fff5ec; }

.chat-message.mentioned {
    background: rgba(255, 122, 26, .13);
    box-shadow: inset 2px 0 0 var(--accent);
}
.chat-message .text .mention {
    color: var(--accent-hot);
    font-weight: 700;
}

/* scroll-to-latest */
#scroll-bottom {
    position: absolute;
    right: 16px;
    bottom: 96px;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    color: var(--text);
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
#scroll-bottom:hover { color: var(--accent); border-color: rgba(255, 122, 26, .35); }

#unread-badge {
    position: absolute;
    top: -5px; right: -5px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    display: grid; place-items: center;
    font-size: 10px; font-weight: 700;
    color: #180a02;
    background: var(--accent);
    border-radius: 9px;
}

/* people-here popover */
#users-popover {
    position: absolute;
    top: 52px; right: 14px;
    z-index: 12;
    width: 216px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
}
.popover-head {
    position: sticky; top: 0;
    padding: 10px 13px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-faint);
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
}
#users-list { list-style: none; padding: 5px; }
#users-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    font-size: 13px;
    border-radius: var(--r-sm);
}
#users-list li:hover { background: var(--bg-3); }
#users-list .user-color {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
#users-list li.is-you { color: var(--accent); font-weight: 700; }

/* ---------------------------------------------------------------- input */

#chat-form {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
    position: relative;
}

#chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 13px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    position: relative;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
#chat-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 122, 26, .12);
}

#chat-input {
    flex: 1;
    min-width: 0;
    padding: 8px 2px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
}
#chat-input::placeholder { color: #5f5249; }
#chat-input:disabled { opacity: .5; }

#emoji-btn {
    display: grid; place-items: center;
    width: 32px; height: 32px;
    color: var(--text-faint);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .16s var(--ease), background .16s var(--ease);
}
#emoji-btn:hover, #emoji-btn[aria-expanded="true"] { color: var(--accent); background: var(--accent-wash); }

.send-btn {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    color: #180a02;
    background: linear-gradient(180deg, var(--accent-hot), var(--accent));
    border: none;
    border-radius: 9px;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter .16s var(--ease), transform .12s var(--ease), opacity .16s var(--ease);
}
.send-btn:hover { filter: brightness(1.1); }
.send-btn:active { transform: scale(.94); }
.send-btn:disabled {
    background: var(--bg-3);
    color: var(--text-faint);
    cursor: not-allowed;
    transform: none;
    filter: none;
}

#char-counter {
    position: absolute;
    right: 14px;
    bottom: 58px;
    padding: 3px 9px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--text-dim);
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 999px;
    z-index: 8;
}
#char-counter.is-over { color: var(--danger); border-color: rgba(255, 77, 77, .4); }

/* ---------------------------------------------------------------- pickers */

#emoji-picker {
    position: absolute;
    bottom: calc(100% - 4px);
    left: 12px;
    width: min(330px, calc(100% - 24px));
    max-height: 292px;
    overflow-y: auto;
    z-index: 14;
    padding: 12px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
}
.emoji-category + .emoji-category { margin-top: 12px; }
.emoji-category-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 7px;
}
.emoji-grid { display: flex; flex-wrap: wrap; gap: 3px; }
.emoji-btn {
    width: 32px; height: 32px;
    font-size: 19px;
    line-height: 1;
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background .12s var(--ease), transform .12s var(--ease);
}
.emoji-btn:hover { background: var(--accent-wash); transform: scale(1.14); }

.dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 190px;
    max-height: 210px;
    overflow-y: auto;
    z-index: 15;
    padding: 5px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
}
.dropdown.active { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    font-size: 13px;
    border-radius: 7px;
    cursor: pointer;
}
.dropdown-item:hover,
.dropdown-item.selected { background: var(--accent-wash); }
.dropdown-item .user-color {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dropdown-item .item-label {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
}

/* ---------------------------------------------------------------- toasts */

.toast-stack {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: max-content;
    max-width: 92vw;
}

.toast {
    padding: 10px 17px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: #2a1410;
    border: 1px solid rgba(255, 77, 77, .35);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow);
    animation: toast-in .22s var(--ease);
}
.toast.info {
    color: var(--text);
    background: var(--bg-3);
    border-color: var(--line);
}
.toast.is-out { animation: toast-out .2s var(--ease) forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateY(6px) scale(.98); }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
    #body-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 760px) {
    #body-grid {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    }
    #stream-section { border-bottom: 1px solid var(--line); }
    #chat-container { border-left: none; }
    .brand-name { display: none; }
    #stream-bar .stream-hint { display: none; }
    #topbar { padding: 8px 10px; gap: 10px; }
}

@media (max-width: 460px) {
    #topbar-actions .icon-btn:nth-child(-n+2) { display: none; }
    .join-card { padding: 26px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------------------------------------------------------------- overlay
   For OBS browser sources. Keeps the username visible - an overlay where you
   cannot tell who is speaking is useless - but drops chrome and timestamps. */

body.overlay-mode { background: transparent; }
body.overlay-mode #topbar,
body.overlay-mode #chat-header,
body.overlay-mode #chat-form,
body.overlay-mode #stream-section,
body.overlay-mode #scroll-bottom,
body.overlay-mode #users-popover { display: none !important; }

body.overlay-mode #body-grid { grid-template-columns: 1fr; }
body.overlay-mode #chat-container {
    background: transparent;
    border: none;
}
body.overlay-mode #chat-messages {
    background: transparent;
    padding: 10px;
    overflow: visible;
    height: 100%;
}
body.overlay-mode .chat-message {
    background: transparent !important;
    box-shadow: none !important;
    padding: 1px 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 10px rgba(0, 0, 0, .8);
}
body.overlay-mode .chat-message .timestamp { display: none; }
body.overlay-mode .chat-message .text { color: #fff; }

/* The escape hatch. Overlay mode hides the top bar, so without this the mode
   cannot be turned off from the page at all. */
.overlay-exit {
    position: fixed;
    top: 10px; right: 10px;
    z-index: 3000;
    padding: 6px 12px;
    font: inherit;
    font-size: 12px;
    color: var(--text);
    background: rgba(23, 16, 12, .92);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    opacity: .35;
    transition: opacity .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.overlay-exit:hover {
    opacity: 1;
    color: var(--accent);
    border-color: rgba(255, 122, 26, .45);
}
