#radio-connection-notice:not([hidden]) {
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: #181621;
    color: #fff;
    border-bottom: 1px solid #6d5b96;
}
#radio-connection-retry {
    padding: 8px 12px;
    min-height: 44px;
    background: #7040c4;
    color: #fff;
    border: 0;
    cursor: pointer;
}

/* ═══════════ Fonts ═══════════ */

@font-face {
    font-family: 'Allumi Std';
    src: url('assets/font/allumi-std.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'URW Form Cond';
    src: url('assets/font/urw-form-cond.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ═══════════ Tokens ═══════════ */

:root {
    --purple: #8b5cf6;
    --jwv-owner-purple: #ad7ce2;
    --blue: #38bdf8;
    --pink: #f472b6;
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --glass-bg: rgba(14, 10, 32, 0.28);
    --glass-border: rgba(139, 92, 246, 0.14);
    --radius: 0px;
    --header-h: 52px;
    --player-min-h: 76px;
    --player-h: var(--player-min-h);
    --sidebar-w: 64px;
    --panel-w: 320px;
    --chat-w: 340px;
    --room-bg-image: url('assets/bg/bg-neon-city.jpg');
    --room-bg-blur: 28px;
    --room-bg-dim: 0.62;
    --room-bg-aspect: 1.7777777778;
}

/* ═══════════ Base ═══════════ */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Allumi Std', 'Segoe UI', Arial, sans-serif;
    color: var(--text);
}

button {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ═══════════ Background ═══════════ */

.room-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #000;
}

.room-bg__blur {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.room-bg__blur-image {
    position: absolute;
    inset: -30px;
    background-image: var(--room-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(var(--room-bg-blur));
    transform: scale(1.06);
}

.room-bg__dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--room-bg-dim));
    pointer-events: none;
}

.room-bg__fit {
    position: fixed;
    background-image: var(--room-bg-image);
    /* Fill the entire live room canvas. `contain` letterboxed wide/short
       viewports and left the empty side gutters visible beside the room. */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}

.room-bg--gradient .room-bg__fit {
    background-size: 100% 100%;
}

/* ═══════════ App Grid ═══════════ */

.app {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-areas:
        "topbar chat"
        "stage  chat"
        "player account";
    grid-template-rows: var(--header-h) 1fr var(--player-h);
    grid-template-columns: minmax(0, 1fr) var(--chat-w);
    gap: 0;
    padding: 0;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(8px) saturate(1.35);
    -webkit-backdrop-filter: blur(8px) saturate(1.35);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* ═══════════ Header ═══════════ */

.topbar {
    position: relative;
    z-index: 200;
    grid-area: topbar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 16px;
    gap: 16px;
    border-right: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
}

.logo-name {
    font-family: 'URW Form Cond', sans-serif;
    font-size: 18px;
    color: var(--text);
}

.room-name {
    font-size: 14px;
    color: var(--text-dim);
    padding-left: 14px;
    border-left: 1px solid var(--glass-border);
    white-space: nowrap;
}

.list-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pink);
    background: rgba(236, 72, 153, 0.15);
}

.topbar-center {
    display: flex;
    align-items: center;
    gap: 18px;
}

.pill-btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.pill-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-dim);
}

.stat svg {
    width: 16px;
    height: 16px;
    color: var(--pink);
}

.stat:last-child svg {
    color: var(--blue);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.topbar-playback {
    display: grid;
    width: 116px;
    height: var(--header-h);
    grid-template-rows: 20px 20px;
    align-content: center;
    gap: 4px;
    color: #a2acb6;
}

.topbar-playback .progress-row,
.topbar-playback .volume-control {
    display: grid;
    width: 100%;
    height: 20px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.topbar-playback .progress-row svg,
.topbar-playback .btn-volume svg {
    width: 18px;
    height: 18px;
}

.topbar-playback .progress-row time,
.topbar-playback .control-btn.btn-volume {
    color: #a2acb6;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 18px;
}

.topbar-playback .control-btn.btn-volume {
    display: grid;
    width: 100%;
    height: 20px;
    grid-column: 1 / -1;
    grid-template-columns: 18px minmax(0, 1fr);
    justify-items: start;
    gap: 8px;
    padding: 0;
}

.topbar-playback .volume-slider-wrap {
    top: 100%;
    right: 0;
    bottom: auto;
    left: auto;
}

.topbar-tool {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 255, 255, .08);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 800;
    transition: color .15s ease, background .15s ease;
}

.topbar-tool svg {
    width: 17px;
    height: 17px;
}

.topbar-tool:hover,
.topbar-tool.is-active {
    color: #fff;
    background: rgba(173, 124, 226, .16);
}

.topbar-tool.is-active {
    box-shadow: inset 0 -2px 0 var(--jwv-owner-purple);
}

.btn-signup {
    display: none;
}

.live-chat-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-dim);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pink);
    box-shadow: 0 0 8px var(--pink);
}

.chat-count {
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(244, 114, 182, 0.18);
    color: var(--pink);
}

/* ═══════════ Sidebar + Panel Overlay ═══════════ */

.sidebar-area {
    grid-area: sidebar;
    min-height: 0;
}

.sidebar {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 0;
    gap: 8px;
}

.side-panel {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: auto;
    bottom: var(--player-h);
    width: min(390px, calc(100vw - 16px));
    z-index: 25;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.4s;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.side-panel.panel-avatar {
    right: 0;
    width: min(520px, calc(100vw - 16px));
}

.side-panel.panel-avatar .panel-inner--avatar {
    width: 100%;
    min-width: 0;
}

.chat,
.player {
    position: relative;
    z-index: 5;
}

.side-btn.active {
    background: rgba(139, 92, 246, 0.25);
    color: var(--text);
}

.side-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.side-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text);
    transform: translateY(-2px);
}

/* ═══════════ Side Panel Content ═══════════ */

.panel-inner {
    width: var(--panel-w);
    min-width: var(--panel-w);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.panel-header h2 {
    margin: 0;
    font-family: 'URW Form Cond', sans-serif;
    font-size: 18px;
}

.panel-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.panel-close svg {
    width: 14px;
    height: 14px;
}

.panel-desc {
    margin: 0;
    padding: 12px 16px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-dim);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.bg-list {
    margin: 0;
    padding: 12px;
    list-style: none;
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-content: start;
}

.bg-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    text-align: left;
}

.bg-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.bg-option.active {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.12);
}

.bg-preview {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.bg-label {
    font-size: 12px;
    color: var(--text);
    padding: 0 2px;
}

.track-list,
.library-list {
    margin: 0;
    padding: 8px;
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.track-item,
.library-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.track-item:hover,
.library-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.library-item[draggable="true"] {
    cursor: grab;
}

.library-item.is-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

.library-item.is-drop-before {
    box-shadow: inset 0 2px 0 0 rgba(167, 139, 250, 0.9);
}

.library-item.is-drop-after {
    box-shadow: inset 0 -2px 0 0 rgba(167, 139, 250, 0.9);
}

.library-drag-handle {
    flex-shrink: 0;
    width: 14px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    letter-spacing: -2px;
    line-height: 1;
    user-select: none;
}

.library-item:hover .library-drag-handle {
    color: rgba(255, 255, 255, 0.65);
}

.track-item.is-playing,
.library-item.is-next {
    background: rgba(139, 92, 246, 0.15);
}

.track-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.track-item.is-repeat,
.library-item.is-repeat {
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.25);
}

.track-warning {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #facc15;
}

.playlist-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    align-items: center;
}

.playlist-select {
    flex: 1 1 140px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

.btn-playlist-new,
.btn-playlist-rename,
.btn-playlist-delete {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

.btn-playlist-new {
    min-width: 36px;
    font-size: 18px;
    line-height: 1;
}

.btn-playlist-delete:hover {
    border-color: rgba(248, 113, 113, 0.5);
    color: #fca5a5;
}

.playlist-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    align-items: center;
}

.playlist-search {
    flex: 1 1 140px;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}

.btn-playlist-to-library {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.45);
    background: rgba(139, 92, 246, 0.2);
    color: #e9d5ff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-playlist-to-library:hover {
    background: rgba(139, 92, 246, 0.35);
}

.settings-hint {
    margin: 10px 0 0;
    font-size: 12px;
    opacity: 0.55;
    line-height: 1.4;
}

.chat-messages.chat-compact .chat-msg {
    padding-top: 4px;
    padding-bottom: 4px;
}

.chat-messages.chat-timestamps-off time {
    display: none;
}

html[data-chat-font="Small"] .chat-messages,
html[data-chat-font="Small"] .chat-messages .chat-msg {
    font-size: 12px;
}

html[data-chat-font="Medium"] .chat-messages,
html[data-chat-font="Medium"] .chat-messages .chat-msg {
    font-size: 14px;
}

html[data-chat-font="Large"] .chat-messages,
html[data-chat-font="Large"] .chat-messages .chat-msg {
    font-size: 16px;
}

.chat-count[hidden],
.chat-count[style*="display: none"] {
    display: none !important;
}

.library-count {
    opacity: 0.6;
    font-weight: 500;
}

.btn-play-song.is-disabled,
.btn-play-song:disabled {
    opacity: 1;
    cursor: not-allowed;
    filter: none;
    pointer-events: none;
}

.track-list .track-info,
.library-list .track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.track-list .track-title,
.library-list .track-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-list .track-artist,
.library-list .track-artist {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-user {
    font-size: 11px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.track-badge,
.library-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.3);
    color: var(--purple);
    flex-shrink: 0;
}

.btn-track-action {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-track-action.btn-icon {
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-track-action.btn-icon svg {
    width: 13px;
    height: 13px;
}

.btn-track-action:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.btn-skip:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-remove:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-add-library:hover {
    border-color: var(--purple);
    color: var(--purple);
}

.btn-add-library.added {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.2);
    color: var(--purple);
}

.library-add {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.library-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    outline: none;
}

.library-input:focus {
    border-color: var(--purple);
}

.btn-add-track {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
    flex-shrink: 0;
}

.library-section {
    flex-shrink: 0;
    border-bottom: 1px solid var(--glass-border);
}

.library-section:last-child {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-bottom: none;
}

.library-label {
    margin: 0;
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.btn-remove {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.avatar-preview {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 -12px 24px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    overflow: hidden;
    display: block;
    min-height: 150px;
}

.avatar-preview canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.avatar-search-wrap {
    padding: 0 16px 12px;
    flex-shrink: 0;
}

.avatar-search {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    outline: none;
}

.avatar-search:focus {
    border-color: var(--purple);
}

.avatar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.avatar-group {
    margin-bottom: 16px;
}

.avatar-group.is-hidden {
    display: none;
}

.avatar-group-title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.avatar-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 16px;
    row-gap: 12px;
}

.avatar-option {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px 10px;
    min-height: 0;
    flex: 0 0 auto;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color 0.2s, background 0.2s;
}

.avatar-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar-option.active {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.15);
}

.settings-panel .panel-inner {
    overflow: hidden;
}

.settings-body {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.settings-tabs {
    width: 110px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
}

.settings-tab {
    padding: 10px 12px;
    font-size: 12px;
    text-align: left;
    border-radius: 8px;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s;
}

.settings-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.settings-tab.active {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text);
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-section h3 {
    margin: 0 0 14px;
    font-family: 'URW Form Cond', sans-serif;
    font-size: 15px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.setting-row span {
    color: var(--text-dim);
}

.setting-input {
    padding: 6px 10px;
    font-size: 12px;
    font-family: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    outline: none;
    min-width: 100px;
}

.setting-range {
    width: 100px;
    accent-color: var(--purple);
}

.setting-row.toggle input[type="checkbox"] {
    accent-color: var(--purple);
    width: 16px;
    height: 16px;
}

/* ═══════════ Área principal ═══════════ */

.stage {
    grid-area: stage;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.video-placeholder {
    /* Overlay the top of the stage — does not consume flex space, so the
       painted table line (lower ~12% of the bg) always stays inside .stage-area */
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    aspect-ratio: 16 / 9;
    width: min(100%, 480px);
    max-height: min(48%, 270px);
    margin: 0;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    pointer-events: none;
}

.video-placeholder.has-media {
    pointer-events: auto;
}

.stage-media--video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    /* Block click-to-pause on the video element */
    pointer-events: none;
    user-select: none;
}

.stage-media--art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-media__loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.video-placeholder.is-loading .stage-media__loading {
    display: flex;
}

.stage-media__spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #c4b5fd;
    animation: stage-media-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.stage-media__loading-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stage-media__loading-title {
    font-size: 13px;
    font-weight: 700;
}

.stage-media__loading-sub {
    font-size: 11px;
    opacity: 0.75;
    line-height: 1.3;
}

.stage-lyrics {
    display: none;
}

@media (min-width: 861px) {
    .video-placeholder.lyrics-split {
        width: min(calc(100% - 24px), 760px);
        height: min(44vh, 320px);
        max-height: min(52%, 340px);
        aspect-ratio: auto;
        background: #070708;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
    }

    .video-placeholder.lyrics-split .stage-media--video,
    .video-placeholder.lyrics-split .stage-media--art,
    .video-placeholder.lyrics-split .stage-media__loading {
        inset: 0 50% 0 0;
        width: 50%;
        height: 100%;
    }

    .video-placeholder.lyrics-split .stage-media--art {
        object-fit: cover;
    }

    .video-placeholder.lyrics-split .stage-lyrics:not([hidden]) {
        position: absolute;
        inset: 0 0 0 50%;
        z-index: 4;
        display: flex;
        flex-direction: column;
        min-width: 0;
        color: #f8f8fb;
        background:
            radial-gradient(circle at 90% 0%, rgba(153, 83, 255, 0.16), transparent 42%),
            linear-gradient(180deg, #121014 0%, #09090a 100%);
        border-left: 1px solid rgba(255, 255, 255, 0.11);
        pointer-events: auto;
    }

    .stage-lyrics__header {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 19px 22px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .stage-lyrics__eyebrow {
        color: #b987ff;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.18em;
    }

    .stage-lyrics__title {
        overflow: hidden;
        color: #fff;
        font-size: 16px;
        font-weight: 750;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stage-lyrics__status {
        padding: 10px 22px 0;
        color: rgba(255, 255, 255, 0.48);
        font-size: 10px;
        letter-spacing: 0.02em;
    }

    .stage-lyrics__lines {
        flex: 1;
        min-height: 0;
        overflow: auto;
        padding: 16px 22px 64px;
        scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
        scrollbar-width: thin;
        scroll-behavior: smooth;
    }

    .stage-lyrics__line {
        margin: 0 0 13px;
        color: rgba(255, 255, 255, 0.34);
        font-size: 16px;
        font-weight: 650;
        line-height: 1.38;
        transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
    }

    .stage-lyrics__line.is-past {
        color: rgba(255, 255, 255, 0.22);
    }

    .stage-lyrics__line.is-active {
        color: #fff;
        opacity: 1;
        transform: translateX(4px);
        text-shadow: 0 0 20px rgba(176, 117, 255, 0.28);
    }
}

@keyframes stage-media-spin {
    to { transform: rotate(360deg); }
}

.stage-area {
    flex: 1 1 0;
    min-height: 0;
    position: relative;
    overflow: visible;
}

.stage-space {
    /* Full height of stage-area so --stage-ground-top (table line) stays inside */
    position: absolute;
    left: 25%;
    right: 25%;
    top: 0;
    bottom: 0;
    height: auto;
    overflow: visible;
}

.dj-space {
    /* Zero-height anchor pinned to the table line computed from the bg
       artwork (--stage-ground-top, set by updateStageGroundLine in room.js) */
    position: absolute;
    top: var(--stage-ground-top, 86%);
    left: 0;
    right: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 3;
}

.stage-characters {
    /* Same ground math as the DJ — fixed offset so crowd doesn't jump with/without DJ. */
    position: absolute;
    left: 10%;
    right: 10%;
    top: 0;
    height: calc(var(--stage-ground-top, 86%) - 70px);
    overflow: visible;
    pointer-events: none;
    z-index: 2;
}

.stage-characters-crowd {
    /* Full crowd plane — avatars are placed with RNG left/bottom % inside this box */
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stage-char {
    position: relative;
    left: 0;
    bottom: 0;
    transform: none;
    transform-origin: bottom center;
    width: auto;
    height: auto;
}

.stage-char__sprite {
    display: block;
    line-height: 0;
}

.stage-char__name {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 5px);
    transform: translateX(-50%);
    max-width: 150px;
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(16, 18, 22, 0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    text-align: center;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
}

.stage-char canvas {
    display: block;
    flex-shrink: 0;
}

.stage-char--crowd {
    /* Feet at RNG left/bottom % inside .stage-characters-crowd */
    position: absolute;
    transform: translateX(-50%);
    transform-origin: bottom center;
}

.stage-char--dj {
    /* Feet on the anchor line, centered — same pattern as .stage-char--crowd */
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 8;
}

.stage-char--front {
    bottom: 22%;
}

.stage-char--idle {
    left: 36%;
}

.stage-char--dance {
    left: 64%;
}

.stage-floor {
    /* Fixed band so queue avatars never resize the stage / move characters */
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 8px 12px;
    gap: 16px;
    min-height: 92px;
    box-sizing: border-box;
    position: relative;
    z-index: 4;
}

.play-song-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 76px;
}

.btn-play-song {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.45);
    transition: filter 0.2s, transform 0.2s;
}

.btn-play-song .icon-leave {
    display: none;
}

.btn-play-song.queued {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.4);
}

.btn-play-song.queued .icon-play {
    display: none;
}

.btn-play-song.queued .icon-leave {
    display: block;
}

.btn-play-song:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.btn-self-skip {
    width: 100%;
    min-height: 32px;
    padding: 0 12px;
    color: #f4f6f8;
    background: #b13b45;
    border: 1px solid #d25a65;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.btn-self-skip:hover { background: #c84b57; }
.btn-self-skip[hidden] { display: none !important; }

.dj-avatars {
    display: flex;
    align-items: center;
    padding-left: 6px;
    min-height: 30px;
}

.mini-avatar {
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid rgba(10, 12, 24, 0.8);
    flex-shrink: 0;
    overflow: hidden;
}

.mini-avatar__image,
.mini-avatar__sprite {
    display: block;
    flex: 0 0 auto;
}

.mini-avatar__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-avatar__sprite {
    background-repeat: no-repeat;
}

.dj-avatars .mini-avatar {
    margin-left: -8px;
}

.dj-avatars .mini-avatar:first-child {
    margin-left: 0;
}

.av-1 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.av-2 { background: linear-gradient(135deg, #38bdf8, #0369a1); }
.av-3 { background: linear-gradient(135deg, #f472b6, #be185d); }
.av-4 { background: linear-gradient(135deg, #34d399, #059669); }
.av-more { background: rgba(255, 255, 255, 0.12); color: var(--text-dim); }

/* ═══════════ Reações ═══════════ */

.reactions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: 999px;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-dim);
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.reaction-btn.is-disabled,
.reaction-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
}

.reaction-btn.is-disabled:hover,
.reaction-btn:disabled:hover {
    background: transparent;
    color: inherit;
}

.reaction-btn svg {
    width: 17px;
    height: 17px;
}

.reaction-btn.active[data-reaction="like"] {
    color: var(--blue);
    background: rgba(56, 189, 248, 0.15);
}

.reaction-btn.active[data-reaction="dislike"] {
    color: var(--pink);
    background: rgba(244, 114, 182, 0.15);
}

.reaction-btn.active[data-reaction="playlist"] {
    color: var(--purple);
    background: rgba(139, 92, 246, 0.15);
}

.reaction-btn:first-child:hover { color: var(--blue); }
.reaction-btn:nth-child(2):hover { color: var(--pink); }
.reaction-btn:last-child:hover { color: var(--purple); }

/* ═══════════ Chat Tabs ═══════════ */

.chat-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.chat-tab {
    flex: 1;
    padding: 10px 4px;
    font-size: 11px;
    color: var(--text-dim);
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.chat-tab:hover {
    color: var(--text);
}

.chat-tab.active {
    color: var(--text);
    border-bottom-color: var(--purple);
}

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

.chat-panel {
    display: none;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.chat-panel.active {
    display: flex;
    flex-direction: column;
}

.chat-panel .chat-messages {
    flex: 1;
}

.chat-list {
    margin: 0;
    padding: 12px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.list-user {
    font-weight: 700;
    line-height: 1.35;
    padding-bottom: 1px;
}

.list-action {
    color: var(--text-dim);
    font-size: 12px;
}

.list-badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.25);
    color: var(--purple);
}

.list-badge--ban {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.list-badge--mute {
    background: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}

.list-badge--admin {
    background: rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
}

.list-empty {
    padding: 12px;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
}

/* ═══════════ Chat ═══════════ */

.chat {
    grid-area: chat;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.chat-welcome {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(56, 189, 248, 0.1));
}

.chat-welcome__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-welcome__edit {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.08);
}

.chat-welcome__edit:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
}

.chat-welcome h3 {
    margin: 0 0 4px;
    font-family: 'URW Form Cond', sans-serif;
    font-size: 15px;
}

.chat-welcome p {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.45;
}

.chat-messages {
    flex: 1;
    margin: 0;
    padding: 12px;
    list-style: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-panel:not([data-panel="chat"]) .chat-messages {
    display: none;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.chat-msg {
    position: relative;
    display: flex;
    gap: 10px;
    padding-right: 42px;
}

.msg-body {
    min-width: 0;
}

.msg-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.msg-user {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.msg-user:hover,
.msg-user:focus-visible { text-decoration: underline; }

.msg-user--default { color: #aeb5bd; }
.msg-user--admin { color: var(--purple); }
.msg-user--owner { color: #f4c96b; }

.chat-role-badge {
    display: inline-flex;
    min-height: 15px;
    align-items: center;
    padding: 1px 5px;
    border: 1px solid rgba(177, 114, 255, .56);
    color: #e2c6ff;
    background: rgba(119, 54, 184, .2);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.u-purple { color: var(--purple); }
.u-blue   { color: var(--blue); }
.u-pink   { color: var(--pink); }
.u-green  { color: #34d399; }

.msg-meta time {
    font-size: 11px;
    color: var(--text-dim);
}

.msg-body p {
    margin: 3px 0 0;
    font-size: 13.5px;
    line-height: 1.4;
    color: #dbe4ee;
    overflow-wrap: break-word;
}

.chat-reply-context {
    margin: 0 0 2px;
    color: #7f8992;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.chat-reply-context strong { color: #b8c0c8; }

.chat-reply-action {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 38px;
    height: 24px;
    padding: 0 7px;
    border: 0;
    color: #aeb8c2;
    background: transparent;
    font-size: 9px;
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, color .12s ease, background .12s ease;
}

.chat-msg:hover .chat-reply-action,
.chat-msg:focus-within .chat-reply-action {
    opacity: 1;
    pointer-events: auto;
}

.chat-reply-action:hover,
.chat-reply-action:focus-visible { color: #fff; background: transparent; text-decoration: underline; }

.chat-mention,
.chat-activity__user {
    appearance: none;
    border: 0;
    padding: 0;
    background: none;
    color: #c8a7ff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.chat-mention {
    border-radius: 3px;
    background: rgba(151, 103, 226, 0.18);
    padding: 0 3px;
}

.chat-mention:hover,
.chat-mention:focus-visible,
.chat-activity__user:hover,
.chat-activity__user:focus-visible {
    color: #fff;
    background: rgba(151, 103, 226, 0.34);
    outline: 1px solid rgba(200, 167, 255, 0.55);
}

.chat-activity {
    min-height: 34px;
    align-items: center;
    gap: 8px;
    border-left: 2px solid currentColor;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.035);
}

.chat-activity--grab { color: #c8a7ff; background: rgba(151, 103, 226, 0.09); }
.chat-activity--meh { color: #ff8e98; background: rgba(211, 66, 78, 0.09); }
.chat-activity--skip { color: #f4bd68; background: rgba(232, 154, 54, 0.09); }

.chat-activity__icon {
    display: grid;
    width: 22px;
    flex: 0 0 22px;
    place-items: center;
    font-size: 13px;
}

.chat-activity__body {
    min-width: 0;
    flex: 1;
}

.chat-activity__body p {
    margin: 0;
    color: currentColor;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.35;
}

.chat-activity > time {
    align-self: flex-start;
    color: var(--text-dim);
    font-size: 10px;
}

.chat-input-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.chat-reply-indicator {
    width: 100%;
    min-height: 24px;
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -2px 0 0;
    padding: 4px 7px 5px 10px;
    border-left: 2px solid #9a63cf;
    color: #89939c;
    background: rgba(255, 255, 255, .045);
    font-size: 10px;
    font-weight: 700;
}

.chat-reply-indicator[hidden] { display: none; }
.chat-reply-indicator strong { color: #d4dae0; }
.chat-reply-indicator button {
    width: 22px;
    height: 22px;
    color: #929ca5;
    font-size: 18px;
    line-height: 1;
}
.chat-reply-indicator button:hover { color: #fff; background: #30363c; }

.chat-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s;
}

.chat-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.chat-input {
    flex: 1;
    min-width: 0;
    padding: 9px 14px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input::placeholder {
    color: var(--text-dim);
}

.chat-input:focus {
    border-color: var(--purple);
}

.chat-command-menu {
    position: absolute;
    z-index: 180;
    right: 8px;
    bottom: calc(100% + 1px);
    left: 8px;
    max-height: min(52vh, 420px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .1);
    background: #171b1d;
    box-shadow: 0 -14px 38px rgba(0, 0, 0, .72);
}

.chat-command-menu[hidden] {
    display: none;
}

.chat-command-menu__heading {
    position: sticky;
    z-index: 1;
    top: 0;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: #171b1d;
    color: rgba(255, 255, 255, .42);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.chat-command-option {
    display: grid;
    width: 100%;
    min-height: 48px;
    grid-template-columns: minmax(82px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: #fff;
    text-align: left;
    transition: background .15s ease;
}

.chat-command-option:last-child {
    border-bottom: 0;
}

.chat-command-option:hover,
.chat-command-option.is-active {
    background: rgba(255, 255, 255, .1);
}

.chat-command-option:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.chat-command-option__name,
.chat-command-option__mention {
    color: #e7c8ff;
    font-size: 12px;
    font-weight: 900;
}

.chat-command-option__description,
.chat-command-option__song-meta {
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, .58);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-command-option__lock {
    color: rgba(255, 255, 255, .42);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.chat-command-option--song {
    display: flex;
    min-height: 54px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
}

.chat-command-option__song-title {
    overflow: hidden;
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-command-option--mention {
    display: flex;
    min-height: 50px;
    gap: 10px;
}

.chat-command-option__avatar {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: #292e34;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.chat-command-menu__status {
    margin: 0;
    padding: 16px 12px;
    color: rgba(255, 255, 255, .46);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.chat-command-menu__status.is-error {
    color: #fecaca;
}

.chat-command-result__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
}

.chat-command-result__close {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: rgba(255, 255, 255, .5);
    font-size: 20px;
}

.chat-command-result__close:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.chat-command-result__song {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.chat-command-result__song strong,
.chat-command-result__song span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-command-result__song strong {
    color: #fff;
    font-size: 12px;
}

.chat-command-result__song span {
    color: rgba(255, 255, 255, .46);
    font-size: 10px;
    font-weight: 700;
}

.emoji-picker {
    position: absolute;
    left: 12px;
    bottom: calc(100% + 6px);
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(12, 14, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.emoji-picker[hidden] {
    display: none !important;
}

.emoji-picker__btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 8px;
    transition: background 0.15s;
}

.emoji-picker__btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-options-menu,
.player-more-menu {
    position: absolute;
    z-index: 30;
    min-width: 140px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(12, 14, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.chat-options-menu {
    right: 12px;
    bottom: calc(100% + 6px);
}

.player-more-menu {
    right: 0;
    bottom: calc(100% + 6px);
}

.chat-options-menu[hidden],
.player-more-menu[hidden] {
    display: none !important;
}

.player-more-item[hidden] {
    display: none !important;
}

.chat-options-item,
.player-more-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    border-radius: 8px;
    color: var(--text);
    transition: background 0.15s;
}

.chat-options-item:hover,
.player-more-item:hover {
    background: rgba(255, 255, 255, 0.1);
}


.chat-send-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
    transition: filter 0.2s, transform 0.2s;
}

.chat-send-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.chat-send-btn svg {
    width: 16px;
    height: 16px;
    margin-left: 1px;
}

/* ═══════════ Player ═══════════ */

.player {
    grid-area: player;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: var(--player-min-h);
    padding: 0 18px;
    gap: 20px;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.playlist-thumb {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.4);
    overflow: hidden;
}

.playlist-thumb.has-art svg {
    display: none;
}

.playlist-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.playlist-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-sub {
    font-size: 13.5px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: min(520px, 44vw);
}

.player-center .track-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-align: center;
}

.player-center .track-artist {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 40%;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-center .track-name {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.progress-row time {
    font-size: 11px;
    color: var(--text-dim);
}

.progress-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    position: relative;
}

.progress-fill {
    width: 48%;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    pointer-events: none;
    transition: width 0.05s linear;
}

.btn-play-pause svg,
.btn-volume svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-play-pause svg {
    display: none;
}

.btn-play-pause.playing .icon-pause,
.btn-play-pause:not(.playing) .icon-play {
    display: block;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.volume-control {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.volume-slider-wrap {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    padding: 10px 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: opacity 0.2s, transform 0.2s;
}

.volume-slider-wrap::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    height: 12px;
}

.volume-control.open .volume-slider-wrap {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--purple);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--purple);
    border: none;
    cursor: pointer;
}

.btn-volume .icon-muted {
    display: none;
}

.volume-control.muted .btn-volume .icon-volume {
    display: none;
}

.volume-control.muted .btn-volume .icon-muted {
    display: block;
}

.control-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.control-btn svg {
    width: 18px;
    height: 18px;
}

.player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    position: relative;
}

.social-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pink);
}

.social-btn svg {
    width: 18px;
    height: 18px;
}

.social-btn.btn-favorite.active,
.social-btn.btn-favorite[aria-pressed="true"] {
    color: var(--pink);
    background: rgba(236, 72, 153, 0.18);
}

.social-btn.is-disabled,
.social-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
}

/* JWV player reference: copied from the current /radio desktop geometry. */
.player {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 116px;
    min-width: 0;
    height: 76px;
    min-height: 76px;
    padding: 0;
    gap: 0;
    overflow: visible;
    background: #181b20;
    border: 0;
}

.player-left {
    min-width: 0;
    gap: 10px;
    padding: 0 10px;
}

.playlist-thumb {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 0;
    color: #78828c;
    background: none !important;
    box-shadow: none;
}

.playlist-thumb svg {
    display: block !important;
    width: 22px;
    height: 22px;
}

.playlist-info {
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.playlist-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 19px;
    color: #a4afb8;
}

.playlist-sub {
    font-size: 11px;
    font-weight: 500;
    line-height: 15px;
    color: #818b95;
}

.player-center {
    width: 116px;
    height: 76px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    color: #a2acb6;
}

.player-queue-tool {
    display: grid;
    width: 116px;
    height: 76px;
    place-items: center;
    align-content: center;
    gap: 5px;
    border-left: 1px solid #30363a;
    background: #181b20;
    color: #a2acb6;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: background .15s ease, color .15s ease;
}

.player-queue-tool svg {
    width: 21px;
    height: 21px;
}

.player-queue-tool:hover,
.player-queue-tool.is-active {
    background: #292e31;
    color: #fff;
}

.player-queue-tool.is-active {
    box-shadow: inset 0 2px 0 var(--jwv-owner-purple);
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 20px;
    padding: 0;
    position: static;
}

.progress-row svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.progress-row time {
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #a2acb6;
    font-variant-numeric: tabular-nums;
}

.progress-total {
    display: none;
}

.progress-bar {
    position: absolute;
    z-index: 20;
    inset: auto 0 0;
    width: 100%;
    height: 2px;
    border-radius: 0;
    background: transparent;
    cursor: default;
}

.progress-fill {
    height: 2px;
    border-radius: 0;
    background: #5869aa;
}

.player-controls {
    justify-content: flex-start;
    height: 20px;
}

.volume-control {
    width: 100%;
    justify-content: flex-start;
}

.control-btn.btn-volume {
    width: auto;
    height: 20px;
    gap: 8px;
    border-radius: 0;
    color: #a2acb6;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.control-btn.btn-volume::after {
    content: attr(data-volume);
}

.control-btn.btn-volume:hover {
    background: transparent;
    color: white;
}

.volume-slider-wrap {
    left: auto;
    right: 0;
    bottom: 100%;
    transform: none;
    width: 112px;
    height: 36px;
    padding: 16px 8px;
    border: 0;
    border-radius: 0;
    background: #20252d;
}

.volume-slider-wrap::after {
    display: none;
}

.volume-control.open .volume-slider-wrap {
    transform: none;
}

.volume-slider {
    width: 96px;
    accent-color: #7183c6;
}

.player-right {
    width: 58px;
    height: 76px;
    justify-content: stretch;
    gap: 0;
    background: #181b20;
}

.player-right .player-more-menu {
    right: auto;
    left: 0;
    bottom: 100%;
    border-radius: 0;
}

.player-right > .btn-share,
.player-right > .btn-favorite {
    display: none;
}

.player-right > .btn-settings {
    display: grid;
    width: 58px;
    height: 76px;
    place-items: center;
    border-radius: 0;
    color: #fff;
    background: var(--jwv-owner-purple);
    transition: background 0.15s, color 0.15s;
}

.player-right > .btn-settings:hover,
.player-right > .btn-settings:focus-visible {
    background: #ba8ae8;
    color: white;
}

.player-right > .btn-settings svg {
    width: 20px;
    height: 20px;
}

.account-strip {
    position: relative;
    grid-area: account;
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) 76px;
    align-items: center;
    height: 76px;
    min-height: 76px;
    min-width: 0;
    overflow: visible;
    border-left: 1px solid #3a4045;
    background: #181b20;
}

.account-strip-avatar-wrap {
    display: grid;
    height: 76px;
    place-items: center;
    padding: 0;
    border: 0;
    background: #181b20;
    color: inherit;
    cursor: pointer;
}

.account-strip-avatar-wrap:hover,
.account-strip-avatar-wrap[aria-expanded="true"] {
    background: #292e31;
}

.account-strip-avatar-frame {
    position: relative;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    border: 2px solid #73572a;
    border-radius: 50%;
    background: #313538;
    box-shadow: 0 0 0 2px #0f1112, 0 2px 5px rgba(0, 0, 0, 0.58);
}

.account-strip-avatar,
.account-strip-initial {
    width: 100%;
    height: 100%;
}

.account-strip-avatar {
    display: block;
}

.account-strip-avatar[hidden],
.account-strip-initial[hidden] {
    display: none;
}

.account-strip-initial {
    display: grid;
    place-items: center;
    color: #d5d9dc;
    font-size: 22px;
    font-weight: 900;
}

.account-strip-progress {
    display: flex;
    height: 76px;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 0 12px;
}

.account-strip-name-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.account-strip-name-row svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #9f69d6;
}

.account-strip-name {
    min-width: 0;
    overflow: hidden;
    color: #ad7ce2;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
    white-space: nowrap;
}

.account-strip-rank {
    overflow: hidden;
    color: #747c82;
    font-size: 9px;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.account-strip-level-row {
    display: grid;
    grid-template-columns: auto minmax(48px, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-top: 8px;
}

.account-strip-level {
    color: #aab0b5;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.account-strip-xp-bar {
    position: relative;
    display: block;
    height: 15px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.45);
    background: #6a7076;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.52);
}

.account-strip-xp-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: #20a7dc;
}

.account-strip-xp-text {
    position: relative;
    z-index: 1;
    display: grid;
    height: 100%;
    place-items: center;
    overflow: hidden;
    padding: 0 3px;
    color: white;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
    white-space: nowrap;
}

.account-strip-shop {
    display: grid;
    height: 76px;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 0;
    background: #009cdd;
    color: #bdefff;
    opacity: 1;
}

.account-strip-shop svg {
    width: 22px;
    height: 22px;
}

.account-strip-shop span {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.account-avatar-menu {
    position: fixed;
    right: 0;
    bottom: 76px;
    z-index: 250;
    width: min(420px, calc(100vw - 16px));
    border: 1px solid #343b3f;
    background: #171b1d;
    box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.58);
}

.account-avatar-menu[hidden] {
    display: none;
}

.account-avatar-menu__current {
    display: flex;
    min-height: 132px;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid #303639;
    background: linear-gradient(145deg, #272d30, #1d2224);
}

.account-avatar-menu__preview,
.avatar-current__preview {
    position: relative;
    display: block;
    flex: 0 0 auto;
}

.account-avatar-menu__preview canvas,
.avatar-current__preview canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.account-avatar-menu__current small,
.avatar-current__copy small {
    display: block;
    margin-bottom: 5px;
    color: #7f8a90;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-avatar-menu__current strong,
.avatar-current__copy strong {
    color: #f1f4f5;
    font-size: 14px;
}

.account-avatar-menu > button {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    padding: 0 18px;
    border: 0;
    border-bottom: 1px solid #292f32;
    background: #1c2123;
    color: #bdc5c9;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.account-avatar-menu > button:hover {
    background: #292f32;
    color: #fff;
}

.account-owned-avatars {
    display: grid;
    max-height: min(420px, calc(100vh - 260px));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: auto;
    background: #303639;
}

.account-owned-avatar {
    position: relative;
    display: grid;
    min-height: 136px;
    grid-template-rows: 96px auto;
    place-items: center;
    gap: 6px;
    padding: 10px 8px 8px;
    border: 0;
    background: #1c2123;
    color: #aeb8bd;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.account-owned-avatar:hover,
.account-owned-avatar.is-current {
    background: #292f32;
    color: #fff;
}

.account-owned-avatar.is-current {
    box-shadow: inset 0 -3px 0 var(--jwv-owner-purple);
}

.account-owned-avatar__image {
    display: block;
    width: 84px;
    height: 96px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.account-owned-avatars__status {
    grid-column: 1 / -1;
    padding: 28px 18px;
    background: #1c2123;
    color: #879298;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.avatar-current {
    display: flex;
    min-height: 154px;
    align-items: center;
    gap: 18px;
    padding: 10px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .18);
}

.list-badge--queue {
    color: var(--blue);
    background: rgba(59, 130, 246, 0.15);
}

.room-blocked[hidden] {
    display: none !important;
}

.app[hidden] {
    display: none !important;
}

.room-blocked {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 8, 16, 0.92);
}

.room-blocked__card {
    width: min(100%, 420px);
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.room-blocked__image {
    width: min(100%, 280px);
    height: auto;
    border-radius: 12px;
}

.room-blocked__title {
    margin: 0;
    font-size: 22px;
    color: var(--text);
}

.room-blocked__text {
    margin: 0;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ═══════════ User card ═══════════ */

.user-link,
.user-card-target {
    cursor: pointer;
}

.user-card {
    position: fixed;
    z-index: 200;
    min-width: 120px;
    padding: 12px 14px 10px;
    border-radius: 12px;
    background: rgba(12, 14, 28, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.user-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.user-card--interactive {
    pointer-events: auto;
}

.user-card__role {
    margin: 4px 0 0;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: capitalize;
}

.user-card__actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
}

.user-card__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-card__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.user-card__btn {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.15s;
}

.user-card__btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.user-card__btn--danger {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
}

.user-card__btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.user-card__btn[hidden] {
    display: none !important;
}

.user-card__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.user-card__preview canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.user-card__name {
    margin: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

/* JWV Radio controls and account surfaces */
.logo {
    text-decoration: none;
    min-width: max-content;
}

.logo-icon {
    width: 31px;
    height: 31px;
    border-radius: 7px;
    object-fit: cover;
}

.logo:hover .logo-name {
    color: #fff;
}

.reactions {
    gap: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    width: 300px;
    height: 70px;
    background: #363b41;
    border: 1px solid rgba(0, 0, 0, 0.55);
}

.reaction-btn {
    width: 100px;
    height: 70px;
    display: grid;
    grid-template: 42.5px 27.5px / 1fr;
    place-items: stretch;
    gap: 0;
    padding: 0;
    border-radius: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.4);
    color: #fff;
}

.reaction-btn:last-child { border-right: 0; }
.reaction-btn .reaction-label {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    background: #363b41;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
}
.reaction-btn .reaction-label svg { width: 18px; height: 18px; flex: 0 0 18px; }
.reaction-btn .reaction-count {
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13.75px;
    line-height: 1;
    font-weight: 900;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .32);
}
.reaction-btn--woot .reaction-label svg { color: #a8c631; }
.reaction-btn--grab .reaction-label svg { color: #a987ff; }
.reaction-btn--meh .reaction-label svg { color: #fff; }
.reaction-btn--woot .reaction-count { background: #8faa22; }
.reaction-btn--grab .reaction-count { background: #8c6ee8; }
.reaction-btn--meh .reaction-count { background: #d3424e; }
.reaction-btn:hover .reaction-label { background: #42484f; }
.reaction-btn.active .reaction-label { background: #4a5055; }
.reaction-btn.active[data-reaction="like"] { box-shadow: inset 0 0 0 1px #badc42; }
.reaction-btn.active[data-reaction="playlist"] { box-shadow: inset 0 0 0 1px #b79aff; }
.reaction-btn.active[data-reaction="dislike"] { box-shadow: inset 0 0 0 1px #ff7a84; }

.account-strip-shop:not(:disabled) {
    cursor: pointer;
}

.account-strip-shop:not(:disabled):hover {
    color: #fff;
    background: #6e5dc7;
}

.jwv-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: grid;
    place-items: center;
    padding: 24px;
    /* Keep the animated stage out of the panel's paint/composite path. */
    background: #080b0d;
    isolation: isolate;
}

.jwv-overlay[hidden] { display: none; }

.jwv-panel-open .stage,
.jwv-panel-open .room-bg {
    visibility: hidden;
}

.jwv-dialog {
    width: min(1040px, calc(100vw - 48px));
    max-height: min(820px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #e8ebed;
    background: #121619;
    border: 1px solid #30363b;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68);
    contain: layout paint style;
}

.jwv-dialog--compact { width: min(560px, calc(100vw - 48px)); }
.jwv-dialog--waitlist { width: min(1320px, calc(100vw - 48px)); }
.jwv-dialog--shop { width: min(1180px, calc(100vw - 48px)); }

.jwv-dialog__header {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 18px 14px 22px;
    border-bottom: 1px solid #2a3034;
    background: #191e21;
}

.jwv-dialog__header > div:first-child { flex: 1; min-width: 0; }
.jwv-dialog__eyebrow { display: block; margin-bottom: 2px; color: #8faa22; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.jwv-dialog__header h2 { margin: 0; font-size: 22px; line-height: 1.15; }
.jwv-dialog__close { width: 38px; height: 38px; color: #aeb5ba; font-size: 30px; line-height: 1; border-left: 1px solid #343a3f; }
.jwv-dialog__close:hover { color: #fff; }

.jwv-empty {
    display: grid;
    min-height: 260px;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 40px;
    text-align: center;
    color: #9ca5ab;
}
.jwv-empty strong { color: #fff; font-size: 19px; }
.jwv-empty a { color: #b9a9ff; font-weight: 800; }

.jwv-waitlist-rule { display: block; margin-top: 4px; color: #8d979d; font-size: 10px; font-weight: 700; }
.jwv-waitlist-count { flex: 0 0 auto; color: #b9c2c8; font-size: 11px; font-weight: 900; white-space: nowrap; }
.jwv-waitlist-body { height: min(660px, calc(100vh - 122px)); min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; overflow: hidden; }
.jwv-waitlist { min-height: 0; overflow: hidden; }
.jwv-waitlist-layout { height: 100%; display: grid; grid-template: auto minmax(0, 1fr) / 280px minmax(0, 1fr); grid-template-areas: "search search" "playlists songs"; }
.jwv-waitlist-queue { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid #30373c; background: #101417; }
.jwv-waitlist-queue > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #30373c; background: #171c20; }
.jwv-waitlist-queue > header div { min-width: 0; }
.jwv-waitlist-queue > header strong, .jwv-waitlist-queue > header span { display: block; }
.jwv-waitlist-queue > header strong { color: #f0f3f5; font-size: 13px; }
.jwv-waitlist-queue > header div span { margin-top: 3px; color: #7f8990; font-size: 10px; }
.jwv-waitlist-queue > header > .queue-count { min-width: 28px; padding: 5px; color: #fff; background: #282e34; font-size: 11px; font-weight: 900; text-align: center; }
.jwv-waitlist-queue .track-list { flex: 1; min-height: 0; margin: 0; padding: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; list-style: none; }
.jwv-waitlist-queue .track-item { position: relative; grid-template-columns: 42px minmax(0, 1fr) auto; min-height: 58px; padding: 7px 8px; border-bottom: 1px solid #292e33; background: #171b20; }
.jwv-waitlist-queue .track-item.is-playing { border-left: 3px solid #a978d5; background: #20242a; }
.jwv-waitlist-queue .track-thumb { width: 42px; height: 42px; }

.jwv-your-queue {
    display: flex;
    min-height: 0;
    max-height: 48%;
    flex: 0 1 auto;
    flex-direction: column;
    border-bottom: 1px solid #30373c;
    background: #12171a;
}
.jwv-your-queue[hidden] { display: none; }
.jwv-your-queue > header {
    min-height: 46px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #2c3338;
    color: #eef2f5;
    background: #181d21;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.jwv-your-queue > header span { padding: 4px 6px; color: #dce2e7; background: #272d32; }
.jwv-your-queue-list { min-height: 0; display: grid; gap: 1px; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.jwv-your-queue > p { margin: 0; padding: 5px 10px 7px; color: #747f87; font-size: 9px; text-align: center; }
.jwv-reorder-item {
    display: grid;
    grid-template-columns: 20px 40px minmax(0, 1fr) auto;
    min-height: 54px;
    align-items: center;
    gap: 7px;
    padding: 6px;
    border-bottom: 1px solid #30363b;
    background: #171c20;
}
.jwv-reorder-item.is-dragging { opacity: .45; }
.jwv-reorder-item.is-saving { opacity: .72; }
.jwv-reorder-handle { color: #7f8990; font-size: 18px; text-align: center; cursor: grab; }
.jwv-reorder-item:active .jwv-reorder-handle { cursor: grabbing; }
.jwv-reorder-art { width: 40px; height: 40px; object-fit: cover; background: #252c32; }
.jwv-reorder-copy { min-width: 0; }
.jwv-reorder-copy strong,
.jwv-reorder-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jwv-reorder-copy strong { color: #eef2f5; font-size: 12px; }
.jwv-reorder-copy span { margin-top: 3px; color: #89939b; font-size: 10px; }
.jwv-reorder-controls { display: flex; gap: 3px; }
.jwv-reorder-controls button {
    width: 25px;
    height: 25px;
    border: 1px solid #3b444c;
    color: #d9dee2;
    background: #242b30;
    font-size: 16px;
    font-weight: 900;
}
.jwv-reorder-controls button:hover:not(:disabled) { color: #fff; background: #313941; }
.jwv-reorder-controls button:disabled { opacity: .3; }
.jwv-reorder-controls .jwv-reorder-remove { color: #e6b3b7; border-color: #613038; background: #352126; }
.jwv-reorder-controls .jwv-reorder-remove:hover:not(:disabled) { color: #fff; background: #592b32; }
.jwv-waitlist-queue .track-title {
    display: block;
    overflow: visible;
    color: #edf2f7;
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}
.jwv-waitlist-queue .track-artist, .jwv-waitlist-queue .track-user, .jwv-waitlist-queue .track-badge { color: #87919a; font-size: 10px; }
.jwv-waitlist-search { grid-area: search; position: relative; display: flex; min-height: 58px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #293034; background: #151a1d; }
.jwv-waitlist-search svg { position: absolute; left: 28px; width: 18px; height: 18px; color: #768087; pointer-events: none; }
.jwv-waitlist-search input { width: 100%; height: 40px; padding: 0 112px 0 42px; border: 1px solid #343b40; background: #0e1214; color: #fff; font-size: 13px; font-weight: 700; outline: none; }
.jwv-waitlist-search input::placeholder { color: #69737a; }
.jwv-waitlist-search input:focus { border-color: #7868d5; box-shadow: 0 0 0 1px #7868d5; }
.jwv-waitlist-search__spinner { position: absolute; right: 24px; color: #9d8af0; font-size: 10px; font-weight: 900; }
.jwv-waitlist-leave { position: absolute; right: 14px; height: 32px; padding: 0 10px; border-left: 1px solid #434a50; color: #b8c0c5; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.jwv-waitlist-leave:hover { color: #fff; background: #272d31; }
.jwv-playlist-empty { padding: 24px 14px; color: #7e898f; font-size: 11px; font-weight: 700; line-height: 1.5; text-align: center; }
.jwv-playlist-nav { grid-area: playlists; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; contain: layout paint; border-right: 1px solid #293034; background: #171c1f; }
.jwv-playlist-button { width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 11px; align-items: center; padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.045); }
.jwv-playlist-button:hover, .jwv-playlist-button.is-active { background: #282f34; }
.jwv-playlist-button.is-active { box-shadow: inset 3px 0 #8c6ee8; }
.jwv-playlist-cover { width: 46px; height: 46px; object-fit: cover; background: #242a2e; }
.jwv-playlist-meta { min-width: 0; }
.jwv-playlist-meta strong, .jwv-playlist-meta span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jwv-playlist-meta strong { color: #e7eaec; font-size: 13px; }
.jwv-playlist-meta span { margin-top: 3px; color: #858f96; font-size: 11px; }
.jwv-song-pane { grid-area: songs; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; contain: layout paint; background: #111518; }
.jwv-song-pane__head { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #293034; background: #111518; }
.jwv-song-pane__head strong { font-size: 15px; }
.jwv-song-pane__head span { color: #858f96; font-size: 12px; }
.jwv-song-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 8px 15px; border-bottom: 1px solid rgba(255,255,255,.05); }
.jwv-song-row { contain: layout paint style; }
.jwv-song-virtual { position: relative; width: 100%; contain: strict; }
.jwv-song-virtual__window { position: absolute; inset: 0 0 auto; will-change: transform; contain: layout paint style; }
.jwv-song-virtual .jwv-song-row { height: 64px; }
.jwv-song-row:hover { background: #1c2226; }
.jwv-song-art { width: 44px; height: 44px; object-fit: cover; background: #272e33; }
.jwv-song-copy { min-width: 0; }
.jwv-song-copy strong, .jwv-song-copy span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jwv-song-copy strong { font-size: 13px; }
.jwv-song-copy span { margin-top: 4px; color: #818b92; font-size: 11px; }
.jwv-action { min-width: 78px; padding: 8px 12px; color: #fff; font-size: 11px; font-weight: 900; text-transform: uppercase; background: #7060c9; }
.jwv-action:hover { background: #8978e3; }
.jwv-action:disabled { cursor: default; opacity: .55; }

.jwv-grab-list { max-height: min(560px, calc(100vh - 150px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; contain: layout paint; padding: 8px 0; }
.jwv-grab-button { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.05); }
.jwv-grab-button { content-visibility: auto; contain: layout paint style; contain-intrinsic-size: auto 66px; }
.jwv-grab-button:hover { background: #22282c; }
.jwv-grab-button > span:last-child { color: #8c6ee8; font-size: 11px; font-weight: 900; text-transform: uppercase; }

.jwv-shop-balance { flex: 0 0 auto !important; color: #b8c06d; font-size: 12px; text-align: right; }
.jwv-shop-balance strong { display: block; color: #e8ef92; font-size: 20px; }
.jwv-shop-tabs { display: flex; min-height: 48px; border-bottom: 1px solid #293034; background: #151a1d; }
.jwv-shop-tabs button { min-width: 120px; padding: 0 20px; color: #879198; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; border-right: 1px solid #293034; }
.jwv-shop-tabs button:hover, .jwv-shop-tabs button.is-active { color: #fff; background: #252c30; }
.jwv-shop-tabs button.is-active { box-shadow: inset 0 -3px #8c6ee8; }
.jwv-shop-content { min-height: 440px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; contain: layout paint; padding: 18px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.jwv-shop-filters { position: relative; display: grid; grid-template-columns: 210px minmax(180px, 1fr) auto; gap: 8px; align-items: center; margin: -18px -18px 18px; padding: 12px 18px; border-bottom: 1px solid #293034; background: #111518; }
.jwv-shop-filters select, .jwv-shop-filters input { width: 100%; height: 40px; padding: 0 12px; color: #e7eaec; background: #20262c; border: 1px solid #353d43; border-radius: 0; outline: none; font-size: 11px; font-weight: 800; }
.jwv-shop-filters select { text-transform: uppercase; }
.jwv-shop-filters input::placeholder { color: #707a81; }
.jwv-shop-filters select:focus, .jwv-shop-filters input:focus { border-color: #9a79e7; box-shadow: 0 0 0 1px #9a79e7; }
.jwv-shop-results { color: #8d979d; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.jwv-avatar-collection + .jwv-avatar-collection { margin-top: 22px; }
.jwv-avatar-collection { contain: layout paint style; }
.jwv-avatar-virtual { position: relative; width: 100%; contain: strict; }
.jwv-avatar-virtual__window { position: absolute; inset: 0 0 auto; will-change: transform; contain: layout paint style; }
.jwv-avatar-collection__header { min-height: 54px; display: flex; align-items: end; justify-content: space-between; gap: 14px; padding: 0 2px 10px; border-bottom: 1px solid #343b40; }
.jwv-avatar-collection__header span { color: #9a79e7; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.jwv-avatar-collection__header h3 { margin: 3px 0 0; color: #fff; font-size: 16px; line-height: 1; text-transform: uppercase; }
.jwv-avatar-collection__header p { display: flex; gap: 12px; margin: 0; color: #8d979d; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.jwv-avatar-collection__header p span { color: #d8dc67; letter-spacing: 0; }
.jwv-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 0; border-left: 1px solid #2d3438; }
.jwv-avatar-grid--virtual { grid-auto-rows: 224px; }
.jwv-avatar-card { position: relative; min-height: 224px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; padding: 10px; overflow: hidden; color: #d9dde0; background: #1b2023; border-right: 1px solid #2d3438; border-bottom: 1px solid #2d3438; }
.jwv-avatar-card { height: 224px; contain: layout paint style; }
.jwv-avatar-card:hover { border-color: #6f61bb; background: #20262a; }
.jwv-avatar-card.is-owned { border-color: rgba(143,170,34,.45); }
.jwv-avatar-preview { width: 100%; height: 116px; display: grid; flex: 0 0 116px; place-items: center; overflow: hidden; }
.jwv-avatar-preview__frame { display: block; max-width: 100%; max-height: 100%; overflow: hidden; }
.jwv-avatar-preview__frame img { display: block; width: auto; max-width: none; height: 100%; }
.jwv-avatar-card strong { width: 100%; min-height: 28px; display: grid; place-items: center; overflow-wrap: anywhere; color: #f0f2f4; font-size: 11px; line-height: 1.25; text-align: center; text-transform: uppercase; }
.jwv-avatar-card__collection { max-width: 100%; overflow: hidden; color: #858f96; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.jwv-avatar-card button { width: 100%; padding: 7px; color: #fff; font-size: 10px; font-weight: 900; text-transform: uppercase; background: #6d5cc4; }
.jwv-avatar-card button:disabled { color: #8c949a; background: #30363a; }
.jwv-shop-no-results { min-height: 260px; display: grid; place-content: center; gap: 6px; color: #7f8990; text-align: center; }
.jwv-shop-no-results strong { color: #dfe3e5; font-size: 15px; text-transform: uppercase; }
.jwv-extra { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; max-width: 720px; padding: 24px; background: #1a1f22; border: 1px solid #30363a; }
.jwv-extra h3 { margin: 0 0 6px; font-size: 20px; }
.jwv-extra p { margin: 0; color: #8e989e; font-size: 13px; line-height: 1.5; }
.jwv-unlock-list { display: grid; gap: 8px; }
.jwv-unlock-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 15px 18px; background: #1a1f22; border-left: 3px solid #8c6ee8; }
.jwv-unlock-row strong { color: #dfe3e5; }
.jwv-unlock-row span { color: #8d979d; font-size: 12px; }

@media (max-width: 760px) {
    .logo-name { font-size: 15px; }
    .room-name { display: none; }
    .topbar-center .stat { display: none; }
    .jwv-overlay { padding: 0; }
    .jwv-dialog, .jwv-dialog--compact, .jwv-dialog--reorder, .jwv-dialog--shop { width: 100vw; max-height: 100vh; height: 100vh; }
    .jwv-dialog__header { gap: 10px; padding-left: 14px; }
    .jwv-waitlist-count { font-size: 9px; }
    .jwv-waitlist-body { height: calc(100dvh - var(--mobile-dock-h) - 74px); grid-template-columns: minmax(0, 1fr) min(34vw, 132px); }
    .jwv-waitlist-layout { height: 100%; grid-template: auto minmax(0, 1fr) / 92px minmax(0, 1fr); grid-template-areas: "search search" "playlists songs"; }
    .jwv-waitlist-queue > header { min-height: 58px; padding: 8px; }
    .jwv-waitlist-queue > header div span { display: none; }
    .jwv-waitlist-queue .track-list { padding: 4px; }
    .jwv-waitlist-queue .track-item { display: grid; grid-template-columns: 1fr; gap: 3px; min-height: 72px; padding: 7px 5px; }
    .jwv-waitlist-queue .track-thumb { display: none; }
    .jwv-waitlist-queue .track-info { min-width: 0; }
    .jwv-waitlist-queue .track-user, .jwv-waitlist-queue .track-badge { white-space: normal; }
    .jwv-waitlist-queue .track-item.is-own-queue { padding-right: 5px; padding-bottom: 34px; }
    .jwv-waitlist-queue .btn-queue-remove { right: 5px; bottom: 5px; left: 5px; width: auto; }
    .jwv-reorder-body { flex: 1; }
    .jwv-reorder-item { grid-template-columns: 22px 38px minmax(0, 1fr) auto; gap: 7px; }
    .jwv-reorder-art { width: 38px; height: 38px; }
    .jwv-reorder-controls { flex-direction: column; }
    .jwv-reorder-controls button { width: 38px; height: 34px; }
    .jwv-playlist-button { grid-template-columns: 1fr; padding: 9px; text-align: center; }
    .jwv-playlist-cover { margin: auto; }
    .jwv-playlist-meta span { display: none; }
    .jwv-song-row { grid-template-columns: 38px minmax(0, 1fr); padding: 8px 10px; }
    .jwv-song-art { width: 38px; height: 38px; }
    .jwv-song-row .jwv-action { grid-column: 1 / -1; }
    .jwv-shop-tabs button { min-width: 0; flex: 1; padding: 0 8px; }
    .jwv-shop-filters { grid-template-columns: 1fr; align-items: stretch; }
    .jwv-shop-results { text-align: right; }
    .jwv-avatar-collection__header { align-items: start; }
    .jwv-avatar-collection__header p { flex-direction: column; gap: 3px; text-align: right; }
    .jwv-avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jwv-extra { grid-template-columns: 1fr; }
}

/* ═══════════ Modals ═══════════ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.about-modal {
    position: relative;
    width: min(480px, 90vw);
    padding: 32px 28px;
    max-height: 80vh;
    overflow-y: auto;
}

.about-modal h2 {
    margin: 0 0 16px;
    font-family: 'URW Form Cond', sans-serif;
    font-size: 22px;
}

.about-modal h2 {
    margin: 0 0 16px;
    font-family: 'URW Form Cond', sans-serif;
    font-size: 22px;
}

.about-modal__content {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
}

.plug-modal-backdrop {
    position: fixed;
    inset: 0;
    /* Keep join/password prompts above every room surface on direct room URLs. */
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Password prompt: error3 as full-page backdrop behind the dialog card */
.plug-modal-backdrop.plug-modal-backdrop--password {
    background-color: #080810;
    background-image:
        linear-gradient(180deg, rgba(8, 8, 16, 0.4) 0%, rgba(8, 8, 16, 0.75) 100%),
        url('/assets/error/error3.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.plug-modal {
    position: relative;
    width: min(100%, 420px);
    margin: 0;
    padding: 28px 24px 22px;
    max-height: 85vh;
    overflow-y: auto;
}

.plug-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s;
}

.plug-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.plug-modal__close svg {
    width: 18px;
    height: 18px;
}

.plug-modal__title {
    margin: 0 32px 14px 0;
    font-family: 'URW Form Cond', sans-serif;
    font-size: 20px;
}

.plug-modal__message {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dim);
}

.plug-modal__label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

.plug-modal__input,
.plug-modal__textarea {
    width: 100%;
    margin: 0 0 12px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    outline: none;
}

.plug-modal__textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.45;
}

.plug-modal__input:focus,
.plug-modal__textarea:focus {
    border-color: var(--purple);
}

.plug-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.plug-modal__btn {
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.plug-modal__btn--cancel {
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.08);
}

.plug-modal__btn--cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.plug-modal__btn--confirm {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.plug-modal__btn--confirm:hover {
    filter: brightness(1.08);
}

.plug-modal__btn--danger {
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

/* ═══════════ Tooltips ═══════════ */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text);
    background: rgba(10, 12, 24, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 50;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.side-btn[data-tooltip]::before {
    left: calc(100% + 10px);
    bottom: 50%;
    transform: translateY(50%) translateX(-4px);
}

.side-btn[data-tooltip]:hover::before {
    transform: translateY(50%) translateX(0);
}

.volume-control[data-tooltip]::before {
    display: none;
}

/* ═══════════ Toast ═══════════ */

.toast {
    position: fixed;
    bottom: calc(var(--player-h) + 16px);
    left: 50vw;
    width: max-content;
    max-width: min(520px, calc(100vw - 24px));
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: rgba(10, 12, 24, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* The room owns the left workspace; the permanent chat owns the right column. */
.side-panel .panel-inner {
    width: 100%;
    min-width: 0;
}

.side-panel {
    top: var(--header-h);
    right: var(--chat-w);
    left: auto;
    bottom: var(--player-h);
    width: min(390px, calc(100vw - var(--chat-w) - 16px));
}

.chat {
    position: relative;
    inset: auto;
    width: auto;
    z-index: 25;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.chat-tabs {
    min-height: var(--header-h);
    align-items: stretch;
    background: rgba(16, 18, 22, .9);
}

.chat-tab {
    display: grid;
    min-width: 0;
    place-items: center;
    padding: 0 4px;
}

.topbar-tool--chat {
    display: none;
}

.account-strip-avatar-frame {
    display: block;
}

.account-strip-avatar-frame .account-strip-avatar {
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 56px;
    height: 68px;
    max-width: none;
    transform: translateX(-50%);
}

.account-avatar-menu__preview,
.account-owned-avatar__image {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.account-avatar-menu__preview {
    width: 88px;
    height: 112px;
    flex: 0 0 88px;
}

.account-avatar-menu__preview canvas,
.account-owned-avatar__image canvas {
    position: absolute;
    left: 50%;
    bottom: 0;
    max-width: none;
    transform: translateX(-50%);
}

.account-avatar-menu__filters {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #303639;
    background: #1c2123;
}

.account-avatar-menu__field {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.account-avatar-menu__field > span {
    color: #879298;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.account-avatar-menu__field select,
.account-avatar-menu__field input {
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 0 10px;
    border: 1px solid #3a4246;
    border-radius: 0;
    outline: 0;
    background: #111516;
    color: #eef1f2;
    font: inherit;
    font-size: 12px;
}

.account-avatar-menu__field select:focus,
.account-avatar-menu__field input:focus {
    border-color: var(--jwv-owner-purple);
    box-shadow: 0 0 0 1px var(--jwv-owner-purple);
}

.account-avatar-menu__result {
    grid-column: 1 / -1;
    min-height: 14px;
    margin: 0;
    color: #879298;
    font-size: 10px;
    font-weight: 800;
}

/* ═══════════ Responsividade ═══════════ */

@media (max-width: 1279px) {
    .app {
        grid-template-areas:
            "topbar chat"
            "stage  chat"
            "player player";
        grid-template-columns: minmax(0, 1fr) var(--chat-w);
    }

    .account-strip {
        position: fixed;
        right: 0;
        bottom: 76px;
        z-index: 120;
        display: grid;
        width: 142px;
        grid-template-columns: 66px 76px;
        box-shadow: -8px -6px 22px rgba(0, 0, 0, .34);
    }

    .account-strip-progress {
        display: none;
    }

    .account-avatar-menu {
        bottom: 152px;
    }
}

@media (max-width: 1100px) {
    :root {
        --chat-w: 300px;
    }

    .topbar-center {
        display: none;
    }
}

@media (max-width: 860px) {
    .app {
        grid-template-areas:
            "topbar"
            "stage"
            "player";
        grid-template-columns: minmax(0, 1fr);
    }

    .side-panel {
        right: 8px;
        left: 8px;
        width: auto;
    }

    .side-panel.panel-avatar {
        right: 8px;
        width: auto;
    }

    .chat {
        position: fixed;
        top: var(--header-h);
        bottom: var(--player-h);
        right: 8px;
        left: 8px;
        width: auto;
        z-index: 25;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .24s ease, visibility .24s;
    }

    .chat.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .chat-tabs {
        min-height: 42px;
    }

    .topbar-tool--chat {
        display: inline-flex;
    }

    .video-placeholder {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .logo-name,
    .topbar-tool span {
        display: none;
    }

    .topbar {
        padding: 0 8px;
        gap: 8px;
    }

    .topbar-right {
        gap: 2px;
    }

    .topbar-tool {
        width: 38px;
        justify-content: center;
        padding: 0;
        border-left: 0;
    }

    .topbar-playback {
        width: 104px;
    }

    .account-owned-avatars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-avatar-menu__filters {
        grid-template-columns: 1fr;
    }

    .account-avatar-menu__result {
        grid-column: 1;
    }
}

/* Radio V2 compact top-right dock: Chat, Members, Queue, Leaderboard. */
.chat-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: var(--header-h);
    border-bottom: 1px solid #2d3237;
    background: #101317;
}

.chat-tab {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: var(--header-h);
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 8px;
    border: 0;
    border-left: 1px solid #252a2f;
    border-bottom: 2px solid transparent;
    color: #87919b;
    background: #101317;
}

.chat-tab:first-child { border-left: 0; }
.chat-tab:hover { color: #d9e0e7; background: #161a1f; }
.chat-tab.active {
    color: #f1f5f9;
    border-bottom-color: var(--jwv-owner-purple);
    background: #191e23;
}

.chat-tab svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.chat-tab-count {
    min-width: 18px;
    color: #b8c0c8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.chat[data-active-panel]:not([data-active-panel="chat"]) .chat-welcome,
.chat[data-active-panel]:not([data-active-panel="chat"]) .chat-input-bar {
    display: none;
}

.member-panel-tabs,
.leaderboard-tabs {
    display: flex;
    flex: 0 0 auto;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid #2b3035;
    background: #15191e;
    scrollbar-width: none;
}

.member-panel-tabs::-webkit-scrollbar,
.leaderboard-tabs::-webkit-scrollbar { display: none; }

.member-panel-tabs button,
.leaderboard-tabs button {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0 11px;
    border-right: 1px solid #292e33;
    color: #8f9aa5;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.member-panel-tabs button:hover,
.leaderboard-tabs button:hover,
.member-panel-tabs button.is-active,
.leaderboard-tabs button.is-active {
    color: #fff;
    background: #23282e;
}

.member-panel-tabs button.is-active,
.leaderboard-tabs button.is-active {
    box-shadow: inset 0 -2px 0 var(--jwv-owner-purple);
}

.member-panel-view { display: none; flex: 1; min-height: 0; overflow-y: auto; }
.member-panel-view.is-active { display: block; }

.dock-panel-heading {
    display: flex;
    min-height: 62px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #2b3035;
    background: #181c21;
}

.dock-panel-heading > div { display: grid; gap: 2px; }
.dock-panel-heading strong { color: #f1f5f9; font-size: 14px; }
.dock-panel-heading span { color: #7f8993; font-size: 11px; }
.mobile-queue-actions { display: none !important; }
.dock-panel-total {
    display: grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #343a40;
    color: #dbe2e9 !important;
    background: #20252b;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.chat-panel--queue .dock-queue-list {
    flex: 1;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    list-style: none;
}

.chat-panel--queue .track-item {
    position: relative;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 7px 8px;
    border-bottom: 1px solid #292e33;
    background: #171b20;
}

.chat-panel--queue .track-item.is-playing {
    border-left: 3px solid #a978d5;
    background: #20242a;
}

.chat-panel--queue .track-thumb { width: 42px; height: 42px; }
.chat-panel--queue .track-title {
    overflow: visible;
    color: #edf2f7;
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}
.chat-panel--queue .track-artist,
.chat-panel--queue .track-user,
.chat-panel--queue .track-badge { color: #87919a; font-size: 10px; }
.chat-panel--queue .btn-skip { display: none; }
.chat-panel--queue .track-item.is-own-queue,
.jwv-waitlist-queue .track-item.is-own-queue { padding-right: 68px; }
.btn-queue-remove {
    position: absolute;
    right: 7px;
    bottom: 7px;
    min-width: 54px;
    height: 24px;
    padding: 0 7px;
    color: #f0c7ca;
    background: #382126;
    border: 1px solid #6d343c;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}
.btn-queue-remove:hover { color: #fff; background: #5a2931; }
.btn-queue-remove:disabled { opacity: .45; }

.leaderboard-rule {
    flex: 0 0 auto;
    margin: 0;
    padding: 9px 12px;
    border-bottom: 1px solid #292e33;
    color: #79838d;
    background: #12161a;
    font-size: 10px;
    line-height: 1.4;
}

.leaderboard-list {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.leaderboard-row {
    display: grid;
    min-height: 58px;
    grid-template-columns: 34px 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border-bottom: 1px solid #292e33;
    background: #171b20;
}

.leaderboard-row:nth-child(1),
.leaderboard-row:nth-child(2),
.leaderboard-row:nth-child(3) { background: #1d2228; }
.leaderboard-row:hover { background: #252b31; }
.leaderboard-rank { color: #77828c; font-size: 11px; font-weight: 900; }
.leaderboard-row:nth-child(1) .leaderboard-rank { color: #ffd76a; }
.leaderboard-row:nth-child(2) .leaderboard-rank { color: #c7d0d8; }
.leaderboard-row:nth-child(3) .leaderboard-rank { color: #d6a173; }
.leaderboard-user { display: grid; min-width: 0; gap: 2px; }
.leaderboard-user strong { overflow: hidden; color: #edf2f7; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-user small { color: #727d87; font-size: 9px; }
.leaderboard-value { color: #c9a6e9; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }
.leaderboard-empty { padding: 34px 14px; color: #7f8993; font-size: 12px; text-align: center; }

/* The footer queue control moved to the top-right dock. */
.player { grid-template-columns: 58px minmax(0, 1fr); }

@media (max-width: 680px) {
    .chat-tab { min-height: 42px; padding: 0 6px; }
    .chat-tab svg { width: 20px; height: 20px; }
    .chat-tab-count { min-width: 14px; font-size: 11px; }
    .leaderboard-tabs button { padding: 0 10px; }
}

/* Radio V2 room editor, hover volume, and recent-song history */
.topbar-playback {
    position: relative;
    z-index: 200;
    width: 116px;
}

.topbar-playback .volume-control {
    position: relative;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
}

.topbar-playback .volume-control::after {
    content: '';
    position: absolute;
    z-index: 239;
    top: 100%;
    right: -8px;
    width: 140px;
    height: 52px;
}

.topbar-playback .control-btn.btn-volume {
    grid-column: 1 / -1;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
}

.topbar-playback .control-btn.btn-volume::after {
    content: none;
}

.topbar-playback .volume-value {
    display: block;
    min-width: 0;
    text-align: left;
}

.topbar-playback .volume-slider-wrap {
    position: absolute;
    z-index: 240;
    top: calc(100% + 7px);
    right: -8px;
    bottom: auto;
    left: auto;
    display: flex;
    width: 140px;
    height: 42px;
    align-items: center;
    padding: 0 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-5px);
    background: #20252d;
    border: 1px solid #3a424b;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .48);
    transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}

.topbar-playback .volume-slider-wrap::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 100%;
    height: 10px;
}

.topbar-playback .volume-control:hover .volume-slider-wrap,
.topbar-playback .volume-control:focus-within .volume-slider-wrap,
.topbar-playback .volume-control.open .volume-slider-wrap {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.topbar-playback .volume-slider-wrap::after {
    display: none;
}

.topbar-playback .volume-slider {
    width: 100%;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #7183c6;
}

.topbar-playback .volume-control[data-tooltip]::before {
    display: none;
}

.topbar-history {
    display: grid;
    width: var(--header-h);
    height: var(--header-h);
    flex: 0 0 var(--header-h);
    place-items: center;
    border-left: 1px solid rgba(255, 255, 255, .08);
    border-right: 1px solid rgba(255, 255, 255, .08);
    color: #9ca6b0;
    transition: color .15s ease, background .15s ease;
}

.topbar-history svg {
    width: 20px;
    height: 20px;
}

.topbar-history:hover,
.topbar-history[aria-expanded="true"] {
    color: #fff;
    background: #282e37;
}

.recently-played-panel {
    position: fixed;
    top: var(--header-h);
    right: var(--chat-w);
    z-index: 90;
    display: flex;
    width: min(400px, calc(100vw - var(--chat-w) - 16px));
    max-height: min(420px, calc(100vh - var(--header-h) - var(--player-h) - 12px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #30363d;
    background: #20252d;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .62);
}

.recently-played-panel[hidden] {
    display: none;
}

.recently-played-panel__header {
    display: flex;
    min-height: 58px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 10px 16px;
    background: #181b20;
}

.recently-played-panel__header div,
.recently-played-panel__header strong,
.recently-played-panel__header span {
    display: block;
}

.recently-played-panel__header strong {
    color: #d6dce1;
    font-size: 13px;
}

.recently-played-panel__header span {
    margin-top: 3px;
    color: #7f8993;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.recently-played-panel__close {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #8d96a0;
    font-size: 24px;
    line-height: 1;
}

.recently-played-panel__close:hover {
    color: #fff;
    background: #282e37;
}

.recently-played-list {
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    list-style: none;
}

.recently-played-item {
    display: grid;
    grid-template-columns: 26px 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 6px 8px;
    color: #aab3bc;
}

.recently-played-item:hover {
    background: #282e37;
}

.recently-played-item__index,
.recently-played-item__duration {
    color: #7f8993;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.recently-played-item__index {
    color: #69737d;
    text-align: right;
}

.recently-played-item__art {
    width: 46px;
    height: 46px;
    object-fit: cover;
    background: #111318;
}

.recently-played-item__meta {
    min-width: 0;
}

.recently-played-item__meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recently-played-item__title {
    color: #c0c8cf;
    font-size: 12px;
    font-weight: 700;
}

.recently-played-item__artist,
.recently-played-item__dj {
    color: #7f8993;
    font-size: 10px;
    line-height: 14px;
}

.recently-played-item__dj {
    color: #9aa5af;
    font-weight: 700;
}

.recently-played-empty {
    margin: 0;
    padding: 32px 16px;
    color: #8d96a0;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.stage-floor-spacer {
    min-height: 92px;
    flex: 0 0 92px;
}

.stage-floor.room-widget-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    min-height: 0;
    padding: 0;
    pointer-events: none;
}

.room-widget {
    position: absolute;
    z-index: 1;
    pointer-events: auto;
    transform: scale(var(--room-widget-scale, 1));
    transform-origin: top left;
}

.room-widget[data-room-widget="waitlist"] {
    left: 12px;
    bottom: 8px;
}

.room-widget[data-room-widget="reactions"] {
    right: 12px;
    bottom: 8px;
}

.room-widget-handle {
    display: none;
}

.room-editor-toolbar {
    position: fixed;
    left: 50%;
    bottom: calc(var(--player-h) + 14px);
    z-index: 180;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    color: #d8dde2;
    background: #181b20;
    border: 1px solid #414852;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
    transform: translateX(-50%);
}

.room-editor-toolbar[hidden] {
    display: none;
}

.room-editor-toolbar > span {
    padding: 0 8px;
    color: #9ca6b0;
    font-size: 11px;
}

.room-editor-toolbar > span strong {
    color: #fff;
    margin-right: 4px;
}

.room-editor-toolbar button {
    min-height: 34px;
    padding: 0 12px;
    color: #b9c1c8;
    background: #282e37;
    font-size: 11px;
    font-weight: 800;
}

.room-editor-toolbar button:hover {
    color: #fff;
    background: #343b46;
}

.room-editor-toolbar .room-editor-save {
    color: #fff;
    background: #7056bd;
}

body.room-editor-active .room-widget {
    cursor: move;
    outline: 2px solid #ad7ce2;
    outline-offset: 4px;
    touch-action: none;
    user-select: none;
}

body.room-editor-active .room-widget.is-dragging {
    z-index: 20;
    outline-color: #fff;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .5);
}

body.room-editor-active .room-widget.is-resizing {
    z-index: 20;
    outline-color: #fff;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .5);
}

body.room-editor-active .room-widget-handle {
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    display: block;
    min-width: max-content;
    padding: 4px 7px;
    color: #fff;
    background: #7056bd;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    pointer-events: none;
}

.room-widget-resize {
    display: none;
}

body.room-editor-active .room-widget-resize {
    position: absolute;
    z-index: 4;
    display: block;
    width: 14px;
    height: 14px;
    padding: 0;
    background: #fff;
    border: 2px solid #7056bd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

body.room-editor-active .room-widget-resize--nw {
    top: -3px;
    left: -3px;
    cursor: nwse-resize;
}

body.room-editor-active .room-widget-resize--ne {
    top: -3px;
    right: -3px;
    cursor: nesw-resize;
}

body.room-editor-active .room-widget-resize--sw {
    bottom: -3px;
    left: -3px;
    cursor: nesw-resize;
}

body.room-editor-active .room-widget-resize--se {
    right: -3px;
    bottom: -3px;
    cursor: nwse-resize;
}

@media (max-width: 860px) {
    .topbar-playback .volume-control::after {
        display: none;
    }

    .recently-played-panel {
        right: 8px;
        width: min(400px, calc(100vw - 16px));
    }

    .player-more-item--layout {
        display: none !important;
    }
}

@media (max-width: 680px) {
    .topbar-playback {
        width: 104px;
    }

    .topbar-playback .volume-control {
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 8px;
    }

    .topbar-history {
        width: var(--header-h);
        flex-basis: var(--header-h);
    }
}

/* Radio V2 identity polish and mobile room layout. */
.stage-char__name {
    padding: 0 1px 1px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 11px;
    line-height: 1.35;
    text-shadow: 0 1px 2px #000, 0 0 5px #000;
}

.chat-avatar {
    overflow: hidden;
    background: #252a30;
}

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

.chat-role-badge {
    width: 18px;
    height: 18px;
    min-height: 0;
    flex: 0 0 18px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
}

.chat-role-badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.msg-identity {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 3px;
}

.msg-identity .chat-role-badge {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

body.jwv-listen-only .chat-input,
body.jwv-listen-only .btn-chat-send,
body.jwv-listen-only .btn-play-song,
body.jwv-listen-only .reaction-btn,
body.jwv-listen-only .player-right .btn-favorite,
body.jwv-listen-only .account-strip-shop,
body.jwv-listen-only #account-strip-menu-toggle {
    cursor: not-allowed;
    opacity: .52;
}

body.jwv-listen-only .chat-input {
    border-color: rgba(255, 255, 255, .08);
    color: #8a949d;
}

body.jwv-listen-only #account-avatar-menu { display: none !important; }

.mobile-dock {
    display: none;
}

@media (max-width: 860px) {
    :root {
        --mobile-dock-h: 58px;
        --mobile-player-h: 88px;
        --player-h: var(--mobile-player-h);
    }

    body.jwv-listen-only .chat-input,
    body.jwv-listen-only .btn-chat-send,
    body.jwv-listen-only .btn-play-song,
    body.jwv-listen-only .reaction-btn,
    body.jwv-listen-only .player-right .btn-favorite,
    body.jwv-listen-only .account-strip-shop,
    body.jwv-listen-only #account-strip-menu-toggle {
        cursor: pointer;
        pointer-events: auto;
    }

    html,
    body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .app {
        width: 100%;
        height: calc(100dvh - var(--mobile-dock-h));
        grid-template-rows: var(--header-h) minmax(0, 1fr) var(--mobile-player-h);
    }

    .topbar-tool--chat {
        display: none !important;
    }

    .mobile-dock {
        position: fixed;
        z-index: 320;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        height: var(--mobile-dock-h);
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding-bottom: env(safe-area-inset-bottom, 0);
        border-top: 1px solid #353b42;
        background: #181b20;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, .42);
    }

    .mobile-dock__button {
        position: relative;
        display: grid;
        min-width: 0;
        min-height: 48px;
        grid-template-rows: 24px 12px;
        place-content: center;
        place-items: center;
        gap: 2px;
        padding: 4px 2px 2px;
        border-top: 2px solid transparent;
        border-right: 1px solid #24292f;
        color: #8d97a1;
        background: #181b20;
        font-size: 9px;
        font-weight: 800;
        line-height: 1;
    }

    .mobile-dock__button:last-child {
        border-right: 0;
    }

    .mobile-dock__button svg {
        width: 21px;
        height: 21px;
    }

    .mobile-dock__button.is-active,
    .mobile-dock__button[aria-expanded="true"] {
        border-top-color: #a978d5;
        color: #d8b8f3;
        background: #24202b;
    }

    .mobile-dock__count {
        position: absolute;
        top: 3px;
        left: calc(50% + 7px);
        display: grid;
        min-width: 15px;
        height: 15px;
        place-items: center;
        padding: 0 3px;
        border-radius: 8px;
        color: #fff;
        background: #7851a8;
        font-size: 8px;
        font-weight: 900;
        font-variant-numeric: tabular-nums;
    }

    .chat {
        position: fixed;
        inset: var(--header-h) 0 var(--mobile-dock-h);
        width: 100%;
        z-index: 260;
        border: 0;
        border-radius: 0;
        background: #101317;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: translateY(10px);
    }

    .chat.open {
        transform: translateY(0);
    }

    .chat > .chat-tabs {
        display: none;
    }

    .chat-panel {
        min-height: 0;
    }

    .chat-messages {
        padding: 12px 10px;
    }

    .chat-welcome {
        padding: 8px 10px;
        font-size: 10px;
    }

    .chat-input-bar {
        min-height: 58px;
        padding: 8px;
        border-radius: 0;
    }

    .side-panel {
        inset: var(--header-h) 0 var(--mobile-dock-h);
        width: 100%;
        border-radius: 0;
    }

    .side-panel.panel-avatar {
        right: 0;
        left: 0;
        width: 100%;
    }

    .video-placeholder {
        display: none;
    }

    .video-placeholder.has-media {
        top: 12px;
        display: block;
        width: min(46vw, 180px);
        max-height: none;
        aspect-ratio: 1;
        border: 1px solid rgba(255, 255, 255, .13);
        border-radius: 0;
        box-shadow: 0 7px 22px rgba(0, 0, 0, .48);
    }

    .stage-media--video {
        object-fit: cover;
    }

    .stage-space {
        right: 4%;
        left: 4%;
    }

    .stage-characters {
        right: 2%;
        left: 2%;
    }

    .stage-floor-spacer {
        min-height: 70px;
        flex-basis: 70px;
    }

    .room-widget {
        --room-widget-scale: 1 !important;
        top: auto !important;
        bottom: 6px !important;
        height: 60px !important;
        min-height: 60px !important;
        transform: none !important;
    }

    .room-widget[data-room-widget="waitlist"] {
        right: auto !important;
        left: 6px !important;
        width: 108px !important;
    }

    .room-widget[data-room-widget="reactions"] {
        right: 6px !important;
        left: auto !important;
        width: calc(100vw - 126px) !important;
        max-width: 300px;
    }

    .room-widget-handle,
    .room-widget-resize,
    .dj-avatars {
        display: none !important;
    }

    .play-song-area {
        width: 100%;
        min-height: 60px;
    }

    body.self-is-dj .stage-floor-spacer { min-height: 108px; flex-basis: 108px; }
    body.self-is-dj .room-widget[data-room-widget="waitlist"] { height: 98px !important; min-height: 98px !important; }
    body.self-is-dj .play-song-area { height: 98px; min-height: 98px; gap: 4px; }
    body.self-is-dj .btn-self-skip { height: 34px; min-height: 34px; }

    .btn-play-song {
        width: 100%;
        height: 60px;
        justify-content: center;
        gap: 6px;
        padding: 0 8px;
        border-radius: 0;
        font-size: 12px;
        line-height: 1.1;
    }

    .reactions {
        width: 100%;
        height: 60px;
    }

    .reaction-btn {
        width: 33.333%;
        height: 60px;
        grid-template-rows: 36px 24px;
    }

    .reaction-btn .reaction-label {
        gap: 4px;
        padding: 0 3px;
        font-size: 11px;
    }

    .reaction-btn .reaction-label svg {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .reaction-btn .reaction-count {
        font-size: 11px;
    }

    .player {
        height: var(--mobile-player-h);
        min-height: var(--mobile-player-h);
        grid-template-columns: 48px minmax(0, 1fr);
        padding-right: 108px;
    }

    .player-left {
        height: var(--mobile-player-h);
        gap: 8px;
        padding: 0 8px;
    }

    .playlist-thumb {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    .playlist-name {
        font-size: 13px;
    }

    .playlist-meta {
        font-size: 10px;
    }

    .player-right {
        width: 48px;
        height: var(--mobile-player-h);
    }

    .player-right > .btn-settings {
        width: 48px;
        height: var(--mobile-player-h);
    }

    .account-strip {
        position: fixed;
        right: 0;
        bottom: var(--mobile-dock-h);
        z-index: 120;
        width: 108px;
        height: var(--mobile-player-h);
        min-height: var(--mobile-player-h);
        grid-template-columns: 54px 54px;
    }

    .account-strip-avatar-wrap,
    .account-strip-shop {
        height: var(--mobile-player-h);
    }

    .account-strip-avatar-frame {
        width: 44px;
        height: 44px;
    }

    .account-strip-avatar-frame .account-strip-avatar {
        width: 48px;
        height: 58px;
    }

    .account-strip-shop svg {
        width: 20px;
        height: 20px;
    }

    .account-avatar-menu {
        right: 0;
        bottom: calc(var(--mobile-dock-h) + var(--mobile-player-h));
        width: 100%;
    }

    .recently-played-panel {
        inset: var(--header-h) 0 auto;
        width: 100%;
        max-height: calc(100dvh - var(--header-h) - var(--mobile-dock-h));
        border-right: 0;
        border-left: 0;
    }

    .jwv-overlay {
        padding: 0;
        place-items: end stretch;
    }

    .jwv-dialog,
    .jwv-dialog--compact,
    .jwv-dialog--shop {
        width: 100%;
        height: auto;
        max-height: calc(100dvh - var(--mobile-dock-h));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 16px 16px 0 0;
    }

    .room-editor-toolbar {
        bottom: calc(var(--mobile-dock-h) + var(--mobile-player-h) + 8px);
    }
}

@media (max-width: 480px) {
    .video-placeholder.has-media {
        width: min(44vw, 160px);
    }

    .room-widget[data-room-widget="waitlist"] {
        width: 102px !important;
    }

    .room-widget[data-room-widget="reactions"] {
        width: calc(100vw - 116px) !important;
    }

    .reaction-btn .reaction-label {
        font-size: 10px;
    }

    .reaction-btn .reaction-label svg {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }
}

@media (min-width: 861px) {
    .topbar-playback .progress-row,
    .topbar-playback .control-btn.btn-volume {
        grid-template-columns: 18px 34px;
        justify-content: end;
        gap: 8px;
        padding-right: 6px;
    }

    .topbar-playback .progress-row time,
    .topbar-playback .volume-value {
        width: 34px;
        text-align: right;
    }
}

/* Mobile usability pass: touch-first controls, readable panels, and a usable DJ line. */
@media (max-width: 860px) {
    :root {
        --mobile-dock-h: 64px;
        --mobile-player-h: 76px;
        --player-h: var(--mobile-player-h);
    }

    .app {
        height: calc(100dvh - var(--mobile-dock-h));
        grid-template-rows: var(--header-h) minmax(0, 1fr) var(--mobile-player-h);
    }

    .topbar {
        min-width: 0;
        padding: 0 6px 0 8px;
    }

    .topbar-left,
    .logo {
        min-width: 44px;
    }

    .logo {
        min-height: 44px;
        justify-content: center;
    }

    .logo-icon {
        width: 32px;
        height: 38px;
        object-fit: contain;
    }

    .topbar-playback {
        width: 118px;
    }

    .topbar-history {
        width: var(--header-h);
        min-width: var(--header-h);
        height: var(--header-h);
    }

    .topbar-playback .progress-row,
    .topbar-playback .control-btn.btn-volume {
        min-height: 24px;
    }

    .video-placeholder.has-media {
        top: 10px;
        width: min(38vw, 150px);
    }

    .stage-space {
        right: 2%;
        left: 2%;
    }

    .stage-char__name {
        max-width: 92px;
        overflow: hidden;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stage-floor-spacer {
        min-height: 126px;
        flex-basis: 126px;
    }

    .room-widget {
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
    }

    .room-widget[data-room-widget="waitlist"] {
        right: 8px !important;
        bottom: 68px !important;
        left: 8px !important;
        width: auto !important;
        height: 50px !important;
        min-height: 50px !important;
    }

    .room-widget[data-room-widget="reactions"] {
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
        width: auto !important;
        height: 54px !important;
        min-height: 54px !important;
    }

    .play-song-area,
    .btn-play-song {
        width: 100%;
        height: 50px;
        min-height: 50px;
    }

    .btn-play-song {
        justify-content: center;
        padding: 0 14px;
        font-size: 13px;
        font-weight: 900;
        letter-spacing: .01em;
    }

    .reactions,
    .reaction-btn {
        height: 54px;
        min-height: 54px;
    }

    .reaction-btn {
        grid-template-rows: 32px 22px;
        touch-action: manipulation;
    }

    .reaction-btn .reaction-label {
        gap: 6px;
        font-size: 12px;
    }

    .reaction-btn .reaction-label svg {
        width: 17px;
        height: 17px;
        flex-basis: 17px;
    }

    body.self-is-dj .stage-floor-spacer {
        min-height: 164px;
        flex-basis: 164px;
    }

    body.self-is-dj .room-widget[data-room-widget="waitlist"] {
        height: 88px !important;
        min-height: 88px !important;
    }

    body.self-is-dj .play-song-area {
        height: 88px;
        min-height: 88px;
    }

    body.self-is-dj .btn-self-skip {
        height: 36px;
        min-height: 36px;
    }

    .player {
        height: var(--mobile-player-h);
        min-height: var(--mobile-player-h);
        grid-template-columns: 48px minmax(0, 1fr);
        padding-right: 104px;
    }

    .player-left,
    .player-right,
    .player-right > .btn-settings {
        height: var(--mobile-player-h);
    }

    .player-left {
        gap: 9px;
        padding: 0 10px;
    }

    .playlist-name {
        font-size: 14px;
        line-height: 1.2;
    }

    .playlist-meta {
        margin-top: 3px;
        font-size: 10px;
    }

    .account-strip {
        bottom: var(--mobile-dock-h);
        width: 104px;
        height: var(--mobile-player-h);
        min-height: var(--mobile-player-h);
        grid-template-columns: 52px 52px;
    }

    .account-strip-avatar-wrap,
    .account-strip-shop {
        height: var(--mobile-player-h);
        min-height: 48px;
    }

    .account-strip-shop {
        font-size: 9px;
    }

    .mobile-dock {
        height: var(--mobile-dock-h);
    }

    .mobile-dock__button {
        min-height: 56px;
        grid-template-rows: 26px 14px;
        gap: 3px;
        padding: 5px 2px 3px;
        font-size: 10px;
        touch-action: manipulation;
    }

    .mobile-dock__button svg {
        width: 23px;
        height: 23px;
    }

    .mobile-dock__count {
        top: 4px;
    }

    .chat,
    .side-panel {
        inset: var(--header-h) 0 var(--mobile-dock-h);
    }

    .chat-messages,
    .chat-list,
    .leaderboard-list,
    .dock-queue-list {
        overscroll-behavior: contain;
    }

    .chat-input-bar {
        min-height: 64px;
        padding: 8px 10px;
    }

    .chat-input,
    .chat-icon-btn,
    .chat-send-btn {
        min-height: 44px;
    }

    .chat-icon-btn,
    .chat-send-btn {
        min-width: 44px;
    }

    .user-card {
        top: auto !important;
        right: 12px;
        bottom: calc(var(--mobile-dock-h) + 12px);
        left: 12px !important;
        width: auto;
        max-height: calc(100dvh - var(--header-h) - var(--mobile-dock-h) - 24px);
        overflow-y: auto;
        padding: 16px;
        border-radius: 14px;
        background: #171b20;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .user-card__btn {
        min-height: 44px;
        padding: 10px 12px;
    }

    .recently-played-panel {
        max-height: calc(100dvh - var(--header-h) - var(--mobile-dock-h));
        overscroll-behavior: contain;
    }

    .jwv-dialog__close,
    .jwv-shop-tabs button,
    .jwv-action,
    .jwv-grab-button {
        min-height: 44px;
        touch-action: manipulation;
    }
}

@media (max-width: 760px) {
    .jwv-dialog,
    .jwv-dialog--compact,
    .jwv-dialog--shop,
    .jwv-dialog--waitlist {
        height: calc(100dvh - var(--mobile-dock-h));
        max-height: calc(100dvh - var(--mobile-dock-h));
        border-radius: 0;
    }

    .jwv-dialog--waitlist .jwv-dialog__header {
        min-height: 86px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-areas:
            "title close"
            "count count";
        gap: 5px 10px;
        padding: 9px 8px 8px 14px;
    }

    .jwv-dialog--waitlist .jwv-dialog__header > div:first-child {
        grid-area: title;
    }

    .jwv-dialog--waitlist .jwv-dialog__header h2 {
        overflow: hidden;
        font-size: 18px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jwv-dialog--waitlist .jwv-waitlist-rule {
        overflow: hidden;
        font-size: 9px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jwv-dialog--waitlist .jwv-waitlist-count {
        grid-area: count;
        justify-self: start;
        padding: 4px 8px;
        color: #d9c8ec;
        background: #27202f;
        font-size: 10px;
    }

    .jwv-dialog--waitlist .jwv-dialog__close {
        grid-area: close;
        width: 44px;
        height: 44px;
        border-left: 1px solid #343a3f;
    }

    .jwv-waitlist-body {
        min-height: 0;
        height: calc(100dvh - var(--mobile-dock-h) - 86px);
        grid-template-columns: minmax(0, 1fr) 128px;
    }

    .jwv-waitlist {
        min-height: 0;
    }

    .jwv-waitlist-layout {
        height: 100%;
        grid-template: 56px 58px minmax(0, 1fr) / minmax(0, 1fr);
        grid-template-areas:
            "search"
            "playlists"
            "songs";
    }

    .jwv-waitlist-search {
        min-height: 56px;
        padding: 7px 8px;
    }

    .jwv-waitlist-search svg {
        left: 19px;
    }

    .jwv-waitlist-search input {
        height: 42px;
        padding: 0 12px 0 39px;
        font-size: 12px;
    }

    .jwv-waitlist-search__spinner {
        display: none;
    }

    .jwv-waitlist-leave {
        right: 8px;
        height: 34px;
        padding: 0 8px;
        font-size: 8px;
    }

    .jwv-playlist-nav {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        border-right: 0;
        border-bottom: 1px solid #293034;
    }

    .jwv-playlist-nav::-webkit-scrollbar {
        display: none;
    }

    .jwv-playlist-button {
        width: 132px;
        min-width: 132px;
        height: 58px;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 7px;
        padding: 6px 8px;
        border-right: 1px solid rgba(255, 255, 255, .06);
        border-bottom: 0;
        text-align: left;
    }

    .jwv-playlist-button.is-active {
        box-shadow: inset 0 -3px #8c6ee8;
    }

    .jwv-playlist-cover {
        width: 36px;
        height: 36px;
        margin: 0;
    }

    .jwv-playlist-meta strong {
        font-size: 11px;
    }

    .jwv-playlist-meta span {
        display: block;
        font-size: 9px;
    }

    .jwv-song-pane__head {
        min-height: 46px;
        padding: 9px 10px;
    }

    .jwv-song-pane__head strong {
        font-size: 13px;
    }

    .jwv-song-pane__head span {
        font-size: 10px;
    }

    .jwv-song-row {
        min-height: 64px;
        grid-template-columns: 36px minmax(0, 1fr) 62px;
        gap: 8px;
        padding: 7px 8px;
    }

    .jwv-song-art {
        width: 36px;
        height: 36px;
    }

    .jwv-song-copy strong {
        font-size: 11px;
    }

    .jwv-song-copy span {
        margin-top: 3px;
        font-size: 9px;
    }

    .jwv-song-row .jwv-action {
        grid-column: auto;
        min-width: 62px;
        height: 36px;
        min-height: 36px;
        padding: 0 5px;
        font-size: 9px;
    }

    .jwv-waitlist-queue > header {
        min-height: 56px;
        padding: 7px 6px;
    }

    .jwv-your-queue { max-height: 50%; }
    .jwv-your-queue > header { min-height: 42px; padding: 6px; font-size: 9px; }
    .jwv-your-queue > p { display: none; }
    .jwv-your-queue-list { padding: 3px; }
    .jwv-reorder-item {
        min-height: 76px;
        grid-template-columns: 14px minmax(0, 1fr);
        grid-template-areas:
            "handle copy"
            "controls controls";
        gap: 4px;
        padding: 5px 4px;
    }
    .jwv-reorder-handle { grid-area: handle; font-size: 14px; }
    .jwv-reorder-art { display: none; }
    .jwv-reorder-copy { grid-area: copy; }
    .jwv-reorder-copy strong { font-size: 9px; }
    .jwv-reorder-copy span { font-size: 8px; }
    .jwv-reorder-controls { grid-area: controls; }
    .jwv-reorder-controls button { width: auto; min-width: 0; height: 30px; flex: 1; }

    .jwv-waitlist-queue > header strong {
        font-size: 11px;
    }

    .jwv-waitlist-queue .track-item {
        min-height: 68px;
        padding: 7px 6px;
    }

    .jwv-waitlist-queue .track-title {
        font-size: 10px;
    }

    .jwv-waitlist-queue .track-artist,
    .jwv-waitlist-queue .track-user,
    .jwv-waitlist-queue .track-badge {
        font-size: 9px;
    }

    .jwv-shop-filters {
        position: sticky;
        z-index: 3;
        top: -18px;
        padding-top: 12px;
        background: #111518;
    }
}

@media (hover: none) {
    .chat-reply-action {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 480px) {
    .video-placeholder.has-media {
        width: min(37vw, 144px);
    }

    .reaction-btn .reaction-label {
        font-size: 11px;
    }
}

/* Mobile shell refinement: explicit panel escape, compact chrome, and stage-first controls. */
.logo-back-icon,
.mobile-panel-header {
    display: none;
}

@media (max-width: 860px) {
    :root {
        --mobile-dock-h: 52px;
        --mobile-player-h: 64px;
        --player-h: var(--mobile-player-h);
    }

    .app {
        height: calc(100dvh - var(--mobile-dock-h));
        grid-template-rows: var(--header-h) minmax(0, 1fr) var(--mobile-player-h);
    }

    .topbar {
        padding: 0;
        gap: 4px;
    }

    .topbar-left,
    .logo {
        width: 48px;
        min-width: 48px;
        height: var(--header-h);
    }

    .logo {
        justify-content: center;
        color: #eef2f6;
    }

    .logo-icon,
    .logo-name {
        display: none;
    }

    .logo-back-icon {
        display: block;
        width: 26px;
        height: 26px;
    }

    .topbar-right {
        gap: 0;
    }

    .topbar-playback {
        width: 58px;
        height: var(--header-h);
        grid-template-rows: 1fr;
        align-content: stretch;
    }

    .topbar-playback .volume-control {
        display: none !important;
    }

    .topbar-playback .progress-row {
        height: var(--header-h);
        min-height: var(--header-h);
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 5px;
    }

    .topbar-playback .progress-row svg {
        width: 16px;
        height: 16px;
    }

    .topbar-playback .progress-row time {
        font-size: 11px;
    }

    .topbar-history {
        width: var(--header-h);
        min-width: var(--header-h);
        border-left: 1px solid rgba(255, 255, 255, .08);
    }

    .toast {
        bottom: calc(var(--mobile-dock-h) + var(--mobile-player-h) + 92px);
    }

    .mobile-panel-header {
        display: flex;
        min-height: 50px;
        flex: 0 0 50px;
        align-items: center;
        justify-content: space-between;
        padding: 0 4px 0 14px;
        border-bottom: 1px solid #2d333a;
        background: #171b20;
    }

    .mobile-panel-header__title {
        min-width: 0;
        overflow: hidden;
        color: #f1f4f7;
        font-size: 14px;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-panel-header__close {
        display: grid;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        place-items: center;
        color: #b4bdc6;
        touch-action: manipulation;
    }

    .mobile-panel-header__close svg {
        width: 22px;
        height: 22px;
    }

    .chat,
    .side-panel {
        inset: var(--header-h) 0 var(--mobile-dock-h);
    }

    .room-widget[data-room-widget="waitlist"] {
        display: none !important;
    }

    .room-widget[data-room-widget="reactions"] {
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
        display: flex !important;
        width: auto !important;
        max-width: none !important;
        height: 54px !important;
        min-height: 54px !important;
    }

    .stage-floor-spacer {
        min-height: 70px;
        flex-basis: 70px;
    }

    body.self-is-dj .stage-floor-spacer {
        min-height: 120px;
        flex-basis: 120px;
    }

    body.self-is-dj .room-widget[data-room-widget="waitlist"] {
        right: 8px !important;
        bottom: 68px !important;
        left: 8px !important;
        display: flex !important;
        width: auto !important;
        height: 44px !important;
        min-height: 44px !important;
    }

    body.self-is-dj .play-song-area {
        height: 44px;
        min-height: 44px;
    }

    .btn-play-song {
        display: none !important;
    }

    .chat-panel--queue .dock-panel-heading {
        min-height: 72px;
        gap: 8px;
        padding: 8px 10px;
    }

    .chat-panel--queue .dock-panel-heading > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .mobile-queue-actions {
        display: flex !important;
        flex: 0 0 auto;
        grid-auto-flow: column;
        gap: 6px !important;
    }

    .mobile-queue-action {
        min-width: 96px;
        min-height: 44px;
        padding: 0 10px;
        border: 1px solid #765fd5;
        border-radius: 4px;
        color: #fff;
        background: #5f4bbb;
        font-size: 11px;
        font-weight: 900;
        line-height: 1.1;
        touch-action: manipulation;
    }

    .mobile-queue-action--leave {
        min-width: 84px;
        border-color: #4a5158;
        color: #d8dee4;
        background: #242a30;
    }

    .mobile-queue-action:disabled {
        opacity: .5;
    }

    .chat-panel--queue .dock-panel-total {
        display: none;
    }

    body.self-is-dj .btn-self-skip {
        width: 100%;
        height: 44px;
        min-height: 44px;
    }

    .player {
        height: var(--mobile-player-h);
        min-height: var(--mobile-player-h);
        grid-template-columns: 40px minmax(0, 1fr);
        padding-right: 100px;
    }

    .player-left,
    .player-right,
    .player-right > .btn-settings {
        height: var(--mobile-player-h);
    }

    .player-left {
        gap: 6px;
        padding: 0 7px;
    }

    .player-right,
    .player-right > .btn-settings {
        width: 40px;
    }

    .playlist-thumb {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .playlist-name {
        font-size: 12px;
        line-height: 1.15;
    }

    .playlist-sub,
    .playlist-meta {
        display: none !important;
    }

    .account-strip {
        bottom: var(--mobile-dock-h);
        width: 100px;
        height: var(--mobile-player-h);
        min-height: var(--mobile-player-h);
        grid-template-columns: 50px 50px;
    }

    .account-strip-avatar-wrap,
    .account-strip-shop {
        height: var(--mobile-player-h);
        min-height: var(--mobile-player-h);
    }

    .account-strip-avatar-frame {
        width: 40px;
        height: 40px;
    }

    .account-strip-avatar-frame .account-strip-avatar {
        width: 44px;
        height: 52px;
    }

    .account-strip-shop svg {
        width: 18px;
        height: 18px;
    }

    .mobile-dock {
        height: var(--mobile-dock-h);
    }

    .mobile-dock__button {
        min-height: 48px;
        grid-template-rows: 21px 11px;
        gap: 1px;
        padding: 3px 2px 2px;
        font-size: 9px;
    }

    .mobile-dock__button svg {
        width: 20px;
        height: 20px;
    }

    .mobile-dock__count {
        top: 2px;
    }

    .account-avatar-menu {
        bottom: calc(var(--mobile-dock-h) + var(--mobile-player-h));
    }

    .user-card {
        bottom: calc(var(--mobile-dock-h) + 10px);
    }
}
