        /* --- DJ Decks visual (full-screen overlay inside canvas-container) --- */
        #dj-visual-root {
            position: absolute; inset: 0;
            display: flex; flex-direction: column;
            background: radial-gradient(ellipse at center, #121218 0%, #030306 70%);
            color: #eee;
            font-family: 'Quicksand', sans-serif;
            cursor: default;
            pointer-events: auto;
            z-index: 4;
            box-sizing: border-box;
            padding: clamp(8px, 2vmin, 16px);
            /* Clear persistent #ui-layer at bottom (z-index 50) so Deck B controls stay tappable */
            padding-bottom: var(--ui-bottom-hud-clearance);
            gap: 8px;
        }
        html.ui-hud-at-top #dj-visual-root {
            padding-bottom: clamp(8px, 2vmin, 16px);
            padding-top: var(--ui-bottom-hud-clearance);
        }
        #dj-visual-root button,
        #dj-visual-root input[type="range"] { cursor: pointer; }
        .dj-layout {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
            gap: 8px;
            align-items: stretch;
        }
        .dj-deck-columns {
            flex: 1;
            display: flex;
            min-height: 0;
            gap: 10px;
            align-items: stretch;
        }
        #dj-visual-root.dj-mode-portrait .dj-deck-columns { flex-direction: column; }
        #dj-visual-root.dj-mode-landscape .dj-deck-columns { flex-direction: row; }
        /* Landscape: flex-grow weights (--dj-landscape-split-a/b) set by drag handle; portrait ignores vars */
        #dj-visual-root.dj-mode-landscape .dj-deck-a {
            flex: var(--dj-landscape-split-a, 1) 1 0%;
            min-width: 0;
        }
        #dj-visual-root.dj-mode-landscape .dj-deck-b {
            flex: var(--dj-landscape-split-b, 1) 1 0%;
            min-width: 0;
        }
        /*
         * Splitter-collapsed Deck B: when the user drags the splitter into the last 10% of
         * the available screen width, Deck B snaps to zero width and is hidden, leaving the
         * splitter handle pinned to the right edge. The splitter stays interactive so a
         * leftward drag (or double-click → 50/50) restores Deck B instantly.
         */
        #dj-visual-root.dj-mode-landscape.dj-deck-b-collapsed .dj-deck-b {
            flex: 0 0 0;
            width: 0;
            min-width: 0;
            max-width: 0;
            overflow: hidden;
            visibility: hidden;
            pointer-events: none;
        }
        #dj-visual-root.dj-mode-landscape.dj-deck-b-collapsed .dj-deck-splitter {
            margin-left: auto;
        }
        #dj-visual-root.dj-mode-landscape.dj-deck-b-collapsed .dj-deck-splitter-grip {
            background: rgba(212, 175, 55, 0.55);
            border-color: rgba(212, 175, 55, 0.85);
        }
        #dj-visual-root.dj-mode-portrait .dj-deck-a,
        #dj-visual-root.dj-mode-portrait .dj-deck-b {
            flex: 1 1 0%;
            /* Default .dj-deck { min-height: 0 } lets portrait column flex shrink each card past
             * in-flow chrome (Deck A mosaic / controls, Deck B crossfader strip). Borders then look
             * short of the visible deck. Use automatic minimum height so each card is at least as
             * tall as its non-collapsing content. */
            min-height: auto;
        }
        #dj-visual-root .dj-deck-splitter {
            display: none;
            align-items: center;
            justify-content: center;
            flex: 0 0 12px;
            width: 12px;
            min-width: 12px;
            align-self: stretch;
            cursor: col-resize;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
            box-sizing: border-box;
            padding: 0;
            margin: 0;
            background: transparent;
            border: none;
            border-radius: 6px;
            color: inherit;
            font: inherit;
        }
        #dj-visual-root.dj-mode-landscape .dj-deck-splitter {
            display: flex;
            position: relative;
            z-index: 20;
        }
        #dj-visual-root .dj-deck-splitter:focus {
            outline: none;
        }
        #dj-visual-root .dj-deck-splitter:focus-visible .dj-deck-splitter-grip {
            box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.55);
        }
        #dj-visual-root .dj-deck-splitter-grip {
            display: block;
            width: 6px;
            height: min(120px, 38vh);
            min-height: 40px;
            border-radius: 4px;
            background: rgba(212, 175, 55, 0.26);
            border: 1px solid rgba(212, 175, 55, 0.4);
            pointer-events: none;
            flex-shrink: 0;
        }
        #dj-visual-root .dj-deck-splitter:hover .dj-deck-splitter-grip,
        #dj-visual-root .dj-deck-splitter.is-dragging .dj-deck-splitter-grip {
            background: rgba(212, 175, 55, 0.42);
            border-color: rgba(212, 175, 55, 0.62);
        }
        .dj-deck-head-row {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 6px;
            width: 100%;
            flex-shrink: 0;
            padding: 4px 8px 6px;
            box-sizing: border-box;
            border-bottom: 1px solid rgba(212, 175, 55, 0.15);
        }
        .dj-head-line--primary {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: center;
            gap: 8px 14px;
            min-width: 0;
            width: 100%;
        }
        .dj-head-cluster {
            display: inline-flex;
            flex-wrap: nowrap;
            align-items: center;
            gap: 6px;
            min-width: 0;
            flex: 0 1 auto;
        }
        .dj-deck-badge--head {
            flex-shrink: 0;
            white-space: nowrap;
        }
        .dj-head-cluster--a .dj-deck-badge--head {
            color: #FF0B55;
            opacity: 0.85;
        }
        .dj-head-station-name {
            font-size: 14px;
            letter-spacing: 0.2em;
            font-weight: 700;
            opacity: 0.9;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: min(280px, 38vw);
            line-height: 1.2;
            padding: 0;
        }
        .dj-head-station-name--a { color: #9803FC; }
        .dj-head-station-name--b { color: #FF0B55; }
        .dj-station-load-spinner {
            flex-shrink: 0;
            width: 13px;
            height: 13px;
            border: 2px solid rgba(152, 3, 252, 0.28);
            border-top-color: #bf62ff;
            border-radius: 50%;
            box-sizing: border-box;
            animation: dj-station-load-spin 0.7s linear infinite;
            vertical-align: middle;
        }
        .dj-station-load-spinner--b {
            border-color: rgba(255, 11, 85, 0.28);
            border-top-color: #ff6ba8;
        }
        @keyframes dj-station-load-spin {
            to { transform: rotate(360deg); }
        }
        .dj-head-station-name.dj-head-station--local {
            text-transform: none;
            letter-spacing: 0.04em;
        }
        .dj-head-station-name .dj-local-prefix {
            font-size: 14px;
            font-weight: 700;
            opacity: 0.92;
            letter-spacing: 0.18em;
            margin-right: 0.35em;
            color: rgba(250, 250, 250, 0.95);
        }
        #dj-visual-root .dj-head-station-name--a .dj-local-prefix {
            color: #9803FC;
            opacity: 0.92;
        }
        #dj-visual-root .dj-head-station-name--b .dj-local-prefix {
            color: #FF0B55;
            opacity: 0.92;
        }
        #dj-visual-root .dj-head-station-name--a .dj-local-filename {
            color: #9803FC;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-shadow: 0 0 12px rgba(152, 3, 252, 0.55), 0 0 22px rgba(152, 3, 252, 0.22);
        }
        #dj-visual-root .dj-head-station-name--b .dj-local-filename {
            color: #FF0B55;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-shadow: 0 0 12px rgba(255, 11, 85, 0.55), 0 0 22px rgba(255, 11, 85, 0.22);
        }
        .dj-head-datetime {
            flex: 0 0 auto;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.06em;
            opacity: 1;
            white-space: nowrap;
            color: #FFFF00;
        }
        #dj-visual-root .dj-head-automix-timer {
            flex: 0 0 auto;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.08em;
            white-space: nowrap;
            color: #39FF14;
            text-shadow:
                0 0 8px rgba(57, 255, 20, 0.95),
                0 0 18px rgba(57, 255, 20, 0.55),
                0 0 32px rgba(57, 255, 20, 0.28);
        }


        .dj-head-video-inline {
            display: inline-flex;
            flex-wrap: nowrap;
            align-items: center;
            gap: 6px;
            min-width: 0;
            flex-shrink: 1;
            max-width: min(420px, 45vw);
        }
        .dj-head-video-badge {
            flex-shrink: 0;
            font-size: 14px;
            letter-spacing: 0.2em;
            font-weight: 700;
            opacity: 1;
            color: #39FF14;
            text-shadow: 0 0 10px rgba(57, 255, 20, 0.45);
            white-space: nowrap;
        }
        .dj-head-video-title {
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 0.06em;
            color: rgba(255, 255, 255, 0.92);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: min(520px, 72vw);
            min-width: 0;
            line-height: 1.2;
        }
        .dj-deck-badge--b {
            color: #9803FC;
            letter-spacing: 0.18em;
        }
        #dj-visual-root .dj-deck-head-row .dj-deck-badge {
            font-size: 14px;
        }
        #dj-visual-root .dj-deck-head-row .dj-station-load-spinner {
            width: 15px;
            height: 15px;
        }
        /* Crossfader strip lives at top of Deck B only */
        #dj-visual-root .dj-fader-strip {
            display: flex;
            box-sizing: border-box;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            width: 100%;
            flex-shrink: 0;
            min-height: 52px;
            padding: 6px 12px;
            gap: 10px;
        }
        /* Deck columns toggled by DJ engine: portrait = stacked; landscape = side by side */
        #dj-visual-root .dj-fader-strip .dj-fader-label-a,
        #dj-visual-root .dj-fader-strip .dj-fader-label-b {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.06em;
            flex-shrink: 0;
        }
        #dj-visual-root .dj-fader-strip .dj-fader-label-a { color: #FF0B55; }
        #dj-visual-root .dj-fader-strip .dj-fader-label-b { color: #5800FF; }
        .dj-crossfader-mount {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            min-height: 44px;
        }
        #dj-visual-root .dj-crossfader-mount {
            min-height: 56px;
        }
        #dj-visual-root .dj-crossfader-wrap {
            position: relative;
            flex: 1 1 auto;
            width: 100%;
            max-width: min(92vw, 560px);
            min-width: 0;
            min-height: 56px;
            display: flex;
            align-items: center;
            --cross-x: 0;
            --cross-deck-a: rgba(208, 18, 18, 0.6);
            --cross-deck-b: rgba(30, 26, 77, 0.6);
            --cross-thumb-half: 28px;
        }
        #dj-visual-root .dj-crossfader-wrap::before {
            content: '';
            position: absolute;
            left: var(--cross-thumb-half);
            right: var(--cross-thumb-half);
            top: 50%;
            height: 14px;
            transform: translateY(-50%);
            border-radius: 7px;
            border: 1px solid rgba(212, 175, 55, 0.9);
            box-sizing: border-box;
            background: linear-gradient(
                to right,
                var(--cross-deck-b) 0%,
                var(--cross-deck-b) calc(var(--cross-x) * 100%),
                var(--cross-deck-a) calc(var(--cross-x) * 100%),
                var(--cross-deck-a) 100%
            );
            box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.45), 0 0 10px rgba(212, 175, 55, 0.28);
            pointer-events: none;
        }
        #dj-visual-root .dj-crossfader-mount input[type="range"] {
            width: 100%;
            max-width: min(92vw, 560px);
            height: 14px;
        }
        #dj-visual-root .dj-autofade-btn,
        #mix-panel .dj-autofade-btn {
            flex-shrink: 0;
            padding: 6px 10px;
            border: 1px solid rgba(212, 175, 55, 0.45);
            border-radius: 7px;
            background: rgba(212, 175, 55, 0.1);
            color: #f5e6b8;
            font-size: 10px;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            cursor: pointer;
            line-height: 1.1;
        }
        #dj-visual-root .dj-autofade-btn:hover,
        #mix-panel .dj-autofade-btn:hover {
            filter: brightness(1.08);
        }
        #dj-visual-root .dj-autofade-btn.on,
        #mix-panel .dj-autofade-btn.on {
            box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.55), 0 0 14px rgba(212, 175, 55, 0.22);
            background: rgba(212, 175, 55, 0.2);
            color: #fff4ca;
        }
        /* Brief pulsing state shown while the Change-Station preload waits for the
           incoming deck's stream to buffer before starting the actual crossfade. */
        #dj-visual-root .dj-autofade-btn.is-preloading,
        #mix-panel .dj-autofade-btn.is-preloading {
            color: #fff4ca;
            animation: dj-autofade-preload-pulse 0.9s ease-in-out infinite;
        }
        @keyframes dj-autofade-preload-pulse {
            0%   { box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 0 8px  rgba(212, 175, 55, 0.18); background: rgba(212, 175, 55, 0.12); }
            50%  { box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.85), 0 0 18px rgba(212, 175, 55, 0.38); background: rgba(212, 175, 55, 0.24); }
            100% { box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 0 8px  rgba(212, 175, 55, 0.18); background: rgba(212, 175, 55, 0.12); }
        }
        #dj-visual-root .dj-automix-btn,
        #mix-panel .dj-automix-btn {
            flex-shrink: 0;
            padding: 6px 10px;
            border: 1px solid rgba(130, 200, 255, 0.45);
            border-radius: 7px;
            background: rgba(130, 200, 255, 0.1);
            color: #d8eeff;
            font-size: 10px;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            cursor: pointer;
            line-height: 1.1;
        }
        #dj-visual-root .dj-automix-btn:hover,
        #mix-panel .dj-automix-btn:hover {
            filter: brightness(1.08);
        }
        #dj-visual-root .dj-automix-btn.on,
        #mix-panel .dj-automix-btn.on {
            box-shadow: 0 0 0 1px rgba(130, 200, 255, 0.55), 0 0 14px rgba(130, 200, 255, 0.22);
            background: rgba(130, 200, 255, 0.2);
            color: #f2f9ff;
        }
        #mix-panel .mix-auto-actions {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex-shrink: 0;
            align-items: stretch;
        }
        #dj-visual-root .dj-autofade-wrap,
        #dj-visual-root .dj-automix-wrap {
            position: relative;
            flex-shrink: 0;
        }
        #dj-visual-root .dj-autofade-panel,
        #dj-visual-root .dj-automix-panel {
            position: absolute;
            right: 0;
            top: calc(100% + 6px);
            z-index: 65;
            min-width: 172px;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid rgba(212, 175, 55, 0.45);
            background: rgba(10, 10, 16, 0.96);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
            display: none;
        }
        #dj-visual-root .dj-autofade-panel.is-fixed-popup {
            position: fixed;
            right: auto;
            top: auto;
        }
        #dj-visual-root .dj-automix-panel.is-fixed-popup {
            position: fixed;
            right: auto;
            top: auto;
            border-color: rgba(130, 200, 255, 0.4);
        }
        #dj-visual-root .dj-automix-panel { min-width: 208px; }
        #dj-visual-root .dj-autofade-panel { min-width: 228px; }
        #dj-visual-root .dj-autofade-panel.is-open,
        #dj-visual-root .dj-automix-panel.is-open {
            display: block;
        }
        #dj-visual-root .dj-autofade-title,
        #dj-visual-root .dj-automix-title {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.72);
            letter-spacing: 0.05em;
            text-transform: uppercase;
            margin-bottom: 6px;
        }
        #dj-visual-root .dj-autofade-row,
        #dj-visual-root .dj-automix-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
            align-items: center;
        }
        #dj-visual-root .dj-autofade-row input[type="range"],
        #dj-visual-root .dj-automix-row input[type="range"] {
            width: 100%;
            min-width: 118px;
        }
        #dj-visual-root .dj-autofade-station-block {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.12);
        }
        #dj-visual-root .dj-autofade-station-title {
            font-size: 11px;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #aaa;
            margin-bottom: 6px;
        }
        #dj-visual-root .dj-autofade-station-check {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: #ddd;
            margin-bottom: 8px;
            cursor: pointer;
            user-select: none;
        }
        #dj-visual-root .dj-autofade-station-check input {
            cursor: pointer;
        }
        #dj-visual-root .dj-autofade-readout,
        #dj-visual-root .dj-automix-readout {
            font-size: 11px;
            color: #f5e6b8;
            min-width: 34px;
            text-align: right;
        }
        #dj-visual-root .dj-automix-limit-section {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }
        #dj-visual-root .dj-automix-check-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.85);
            cursor: pointer;
            user-select: none;
        }
        #dj-visual-root .dj-automix-check-row input {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
            accent-color: rgba(130, 200, 255, 0.9);
        }
        #dj-visual-root .dj-automix-limit-remaining {
            margin-left: 6px;
            font-weight: 600;
            font-size: 11px;
            color: rgba(255, 215, 120, 0.95);
            letter-spacing: 0.02em;
            white-space: nowrap;
        }
        #dj-visual-root .dj-automix-nextfade-section {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }
        #dj-visual-root .dj-automix-nextfade-row {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.85);
        }
        #dj-visual-root .dj-automix-nextfade-readout {
            font-weight: 600;
            font-size: 11px;
            color: rgba(130, 210, 255, 0.98);
            letter-spacing: 0.02em;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }
        .dj-deck-body-b {
            flex-direction: column !important;
            align-items: stretch !important;
            justify-content: flex-start;
            gap: 0;
        }
        .dj-deck-b-stage {
            position: relative;
            flex: 1 1 auto;
            width: 100%;
            min-height: 0;
            display: flex;
            flex-direction: column;
        }
        .dj-deck-b-controls {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
        }
        .dj-deck-b-viz-layer {
            display: none;
            position: relative;
            flex: 1 1 auto;
            width: 100%;
            min-height: clamp(160px, 32vmin, 420px);
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(152, 3, 252, 0.45);
            background: rgba(0, 0, 0, 0.65);
            box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.5);
        }
        .dj-deck-b-stage.dj-deck-b-visual-mode .dj-deck-b-controls {
            display: none;
        }
        .dj-deck-b-stage.dj-deck-b-visual-mode .dj-deck-b-viz-layer {
            display: block;
        }
        .dj-deck-b-stage.dj-deck-b-queue-mode .dj-deck-b-controls {
            display: none;
        }
        .dj-deck-b-stage.dj-deck-b-queue-mode .dj-deck-b-viz-layer {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            pointer-events: auto;
            min-height: 0;
            flex: 1 1 auto;
        }
        .dj-deck-b-stage.dj-deck-b-media-mode .dj-deck-b-controls {
            display: none;
        }
        .dj-deck-b-stage.dj-deck-b-media-mode .dj-deck-b-viz-layer {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            pointer-events: auto;
            min-height: 0;
            flex: 1 1 auto;
        }
        .dj-deck-b-text-stage {
            position: absolute;
            inset: 0;
            background: #000;
            border-radius: 12px;
            overflow: hidden;
            display: none;
            pointer-events: none;
            z-index: 6;
        }
        .dj-deck-b-stage.dj-deck-b-text-mode .dj-deck-b-controls {
            display: none;
        }
        .dj-deck-b-stage.dj-deck-b-text-mode .dj-deck-b-text-stage {
            display: block;
            position: relative;
            flex: 1 1 auto;
            width: 100%;
            min-height: clamp(160px, 32vmin, 420px);
            inset: auto;
        }
        .dj-deck-b-text-overlay-layer {
            position: absolute;
            inset: 0;
            overflow: hidden;
            pointer-events: none;
        }
        .dj-deck-b-text-overlay-layer .rising-text {
            position: absolute;
            left: 50%;
            transform: translate(-50%, 0);
            will-change: transform, opacity, text-shadow;
            white-space: pre;
        }
        .dj-deck-b-queue-panel,
        .dj-deck-b-media-panel {
            flex: 1;
            min-height: 0;
            max-height: 100%;
            display: flex;
            flex-direction: column;
            padding: 10px 12px;
            padding-bottom: calc(10px + var(--ui-bottom-hud-clearance));
            box-sizing: border-box;
            color: #eaeaf4;
            font-size: 12px;
            overflow-x: hidden;
            overflow-y: hidden;
            gap: 10px;
            overscroll-behavior: contain;
            scrollbar-gutter: stable;
            color-scheme: dark;
            scrollbar-width: auto;
            scrollbar-color: #5a5a68 #12121a;
            position: relative;
            z-index: 1;
        }
        .dj-deck-b-queue-panel::-webkit-scrollbar,
        .dj-deck-b-media-panel::-webkit-scrollbar {
            width: 12px;
            -webkit-appearance: none;
            appearance: none;
        }
        .dj-deck-b-queue-panel::-webkit-scrollbar-track,
        .dj-deck-b-media-panel::-webkit-scrollbar-track {
            background: linear-gradient(180deg, #0d0d12 0%, #15151c 100%);
            border-radius: 7px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            margin: 4px 2px 4px 0;
        }
        .dj-deck-b-queue-panel::-webkit-scrollbar-thumb,
        .dj-deck-b-media-panel::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #5c5c6e 0%, #383844 100%);
            border-radius: 7px;
            border: 2px solid rgba(0, 0, 0, 0.45);
            min-height: 48px;
        }
        .dj-deck-b-queue-panel::-webkit-scrollbar-thumb:hover,
        .dj-deck-b-media-panel::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #717184 0%, #4a4a58 100%);
        }
        .dj-deck-b-queue-panel::-webkit-scrollbar-corner,
        .dj-deck-b-media-panel::-webkit-scrollbar-corner {
            background: transparent;
        }
        .dj-deck-b-queue-panel .dj-queue-header {
            font-weight: 700;
            letter-spacing: 0.06em;
            font-size: 11px;
            color: #bf62ff;
            text-transform: uppercase;
            flex-shrink: 0;
        }
        .dj-deck-b-queue-panel .dj-queue-columns {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: minmax(0, 1fr);
            gap: 12px;
            align-items: stretch;
            flex: 1 1 0;
            min-height: 0;
            height: 100%;
        }
        @media (max-width: 520px) {
            .dj-deck-b-queue-panel .dj-queue-columns {
                grid-template-columns: 1fr;
                grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
            }
        }
        .dj-deck-b-queue-panel .dj-queue-col {
            border: 1px solid rgba(152, 3, 252, 0.35);
            border-radius: 10px;
            padding: 8px;
            background: rgba(0, 0, 0, 0.35);
            min-height: 0;
            height: 100%;
            display: flex;
            flex-direction: column;
            gap: 8px;
            overflow: hidden;
        }
        .dj-deck-b-queue-panel .dj-queue-col-title {
            font-weight: 700;
            font-size: 11px;
            letter-spacing: 0.08em;
            opacity: 0.85;
            margin: 0;
            flex: 1;
            min-width: 0;
        }
        .dj-deck-b-queue-panel .dj-queue-col[data-deck="a"] .dj-queue-col-title { color: #FF0B55; }
        .dj-deck-b-queue-panel .dj-queue-col[data-deck="b"] .dj-queue-col-title { color: #5800FF; }
        .dj-deck-b-queue-panel .dj-queue-col-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
        }
        .dj-deck-b-queue-panel .dj-queue-col-head-btns {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
            flex-shrink: 0;
        }
        .dj-deck-b-queue-panel .dj-queue-col-head .dj-queue-add,
        .dj-deck-b-queue-panel .dj-queue-col-head .dj-queue-shuffle,
        .dj-deck-b-queue-panel .dj-queue-col-head .dj-queue-folder,
        .dj-deck-b-queue-panel .dj-queue-col-head .dj-queue-add-url,
        .dj-deck-b-queue-panel .dj-queue-col-head .dj-queue-clear-all {
            padding: 4px 8px;
            font-size: 10px;
            align-self: auto;
        }
        .dj-deck-b-queue-panel .dj-queue-shuffle {
            min-width: 26px;
            padding: 4px 7px;
            font-weight: 700;
            color: #c8e6ff;
            border: 1px solid rgba(100, 180, 255, 0.45);
            background: rgba(8, 24, 40, 0.55);
            border-radius: 4px;
            cursor: pointer;
        }
        .dj-deck-b-queue-panel .dj-queue-shuffle:hover {
            filter: brightness(1.15);
            border-color: rgba(140, 200, 255, 0.7);
        }
        .dj-deck-b-queue-panel .dj-queue-clear-all {
            min-width: 26px;
            padding: 4px 7px;
            font-weight: 700;
            color: #ffb4b4;
            border: 1px solid rgba(255, 80, 80, 0.45);
            background: rgba(40, 8, 8, 0.55);
            border-radius: 4px;
            cursor: pointer;
        }
        .dj-deck-b-queue-panel .dj-queue-clear-all:hover {
            filter: brightness(1.15);
            border-color: rgba(255, 120, 120, 0.7);
        }
        .dj-deck-b-queue-panel ul.dj-queue-list {
            list-style: none;
            margin: 0;
            padding: 0 4px 0 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1 1 0;
            min-height: 0;
            height: 100%;
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-gutter: stable;
            scrollbar-width: thin;
            scrollbar-color: #3d3d48 #0c0c10;
        }
        .dj-deck-b-queue-panel ul.dj-queue-list::-webkit-scrollbar {
            width: 10px;
            -webkit-appearance: none;
            appearance: none;
        }
        .dj-deck-b-queue-panel ul.dj-queue-list::-webkit-scrollbar-track {
            background: #0a0a0f;
            border-radius: 6px;
            border: 1px solid rgba(0, 0, 0, 0.5);
        }
        .dj-deck-b-queue-panel ul.dj-queue-list::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #3a3a46 0%, #242428 100%);
            border-radius: 6px;
            border: 2px solid #0a0a0f;
            min-height: 32px;
        }
        .dj-deck-b-queue-panel ul.dj-queue-list::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #4a4a56 0%, #303036 100%);
        }
        .dj-deck-b-queue-panel li.dj-queue-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 4px 6px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.06);
            font-size: 11px;
            word-break: break-word;
        }
        .dj-deck-b-queue-panel li.dj-queue-item .dj-queue-idx {
            flex-shrink: 0;
            opacity: 0.55;
            font-size: 10px;
            width: 1.2em;
        }
        .dj-deck-b-queue-panel li.dj-queue-item .dj-queue-name { flex: 1; min-width: 0; }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-remove {
            flex-shrink: 0;
            padding: 2px 8px;
            font-size: 10px;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.25);
            background: rgba(0, 0, 0, 0.25);
            color: #fff;
            cursor: pointer;
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-play {
            flex-shrink: 0;
            padding: 2px 8px;
            font-size: 11px;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.25);
            background: rgba(0, 0, 0, 0.25);
            color: #fff;
            cursor: pointer;
            line-height: 1;
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-play:hover {
            background: rgba(80, 255, 170, 0.18);
            border-color: rgba(160, 255, 210, 0.55);
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-remove:hover {
            background: rgba(255, 80, 80, 0.35);
            border-color: rgba(255, 160, 160, 0.45);
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-to-deck {
            flex-shrink: 0;
            min-width: 1.6em;
            padding: 2px 6px;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.04em;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.28);
            background: rgba(0, 0, 0, 0.35);
            color: #fff;
            cursor: pointer;
            line-height: 1.1;
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-to-deck.dj-queue-to-deck--to-b {
            border-color: rgba(88, 0, 255, 0.45);
            color: #c9b3ff;
            background: rgba(88, 0, 255, 0.12);
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-to-deck.dj-queue-to-deck--to-b:hover {
            background: rgba(88, 0, 255, 0.22);
            border-color: rgba(140, 90, 255, 0.55);
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-to-deck.dj-queue-to-deck--to-a {
            border-color: rgba(255, 11, 85, 0.45);
            color: #ffb3c8;
            background: rgba(255, 11, 85, 0.1);
        }
        .dj-deck-b-queue-panel li.dj-queue-item button.dj-queue-to-deck.dj-queue-to-deck--to-a:hover {
            background: rgba(255, 11, 85, 0.2);
            border-color: rgba(255, 120, 160, 0.5);
        }
        .dj-deck-b-queue-panel .dj-queue-add {
            padding: 6px 10px;
            font-size: 11px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.22);
            background: rgba(255, 255, 255, 0.07);
            color: #fff;
            cursor: pointer;
            align-self: flex-start;
        }
        .dj-deck-b-queue-panel .dj-queue-add:hover { filter: brightness(1.12); }
        .dj-deck-b-queue-panel .dj-queue-add-url {
            padding: 6px 10px;
            font-size: 11px;
            border-radius: 6px;
            border: 1px solid rgba(212, 175, 55, 0.45);
            background: rgba(212, 175, 55, 0.08);
            color: #f5e6b8;
            cursor: pointer;
            align-self: flex-start;
        }
        .dj-deck-b-queue-panel .dj-queue-add-url:hover { filter: brightness(1.12); }
        .dj-deck-b-queue-panel .dj-queue-folder {
            padding: 6px 10px;
            font-size: 11px;
            border-radius: 6px;
            border: 1px solid rgba(120, 200, 255, 0.42);
            background: rgba(80, 160, 255, 0.12);
            color: #fff;
            cursor: pointer;
            align-self: flex-start;
        }
        .dj-deck-b-queue-panel .dj-queue-folder:hover { filter: brightness(1.12); }
        .dj-deck-b-queue-panel .dj-queue-hint {
            margin: 0;
            font-size: 10px;
            line-height: 1.35;
            color: rgba(255, 255, 255, 0.45);
        }
        .dj-deck-b-media-panel .dj-station-cycle {
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03);
            padding: 8px;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .dj-deck-b-media-panel .dj-station-cycle-radio-anchor {
            position: relative;
            width: 100%;
            margin-bottom: 6px;
        }
        .dj-deck-b-media-panel .dj-station-cycle-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
        }
        .dj-deck-b-media-panel .dj-station-cycle-top .dj-station-cycle-head {
            margin: 0;
            flex: 1;
            min-width: 0;
        }
        .dj-deck-b-media-panel .dj-station-cycle-top .dj-video-btn.dj-b-video-radio {
            flex-shrink: 0;
            padding: 4px 10px;
            font-size: 10px;
        }
        .dj-deck-b-media-panel .dj-queue-tools {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            align-items: start;
        }
        @media (max-width: 720px) {
            .dj-deck-b-media-panel .dj-queue-tools {
                grid-template-columns: 1fr;
            }
        }
        .dj-deck-b-media-panel .dj-station-cycle-head {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            color: rgba(255, 255, 255, 0.7);
            margin: 0 0 6px 0;
        }
        .dj-deck-b-media-panel .dj-station-cycle-list {
            overflow-x: hidden;
            overflow-y: auto;
            max-height: min(42vh, 280px);
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1 1 auto;
            min-height: 0;
            overscroll-behavior: contain;
            scrollbar-gutter: stable;
            scrollbar-width: thin;
            scrollbar-color: #5a5a68 #12121a;
        }
        .dj-deck-b-media-panel .dj-station-cycle-list::-webkit-scrollbar {
            width: 10px;
            -webkit-appearance: none;
            appearance: none;
        }
        .dj-deck-b-media-panel .dj-station-cycle-list::-webkit-scrollbar-track {
            background: rgba(18, 18, 26, 0.95);
            border-radius: 6px;
        }
        .dj-deck-b-media-panel .dj-station-cycle-list::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #5c5c6e 0%, #383844 100%);
            border-radius: 6px;
            border: 2px solid rgba(0, 0, 0, 0.35);
            min-height: 36px;
        }
        .dj-deck-b-media-panel .dj-station-cycle-list::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #717184 0%, #4a4a58 100%);
        }
        .dj-deck-b-media-panel .dj-station-cycle-item {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 11px;
            line-height: 1.2;
            color: #fff;
            user-select: none;
            flex-shrink: 0;
        }
        .dj-deck-b-media-panel .dj-station-cycle-name {
            flex: 1;
            min-width: 0;
            cursor: pointer;
            text-decoration: none;
            border-radius: 4px;
            padding: 2px 4px;
            margin: -2px -4px;
        }
        .dj-deck-b-media-panel .dj-station-cycle-name:hover {
            color: #f5e6b8;
            background: rgba(212, 175, 55, 0.12);
        }
        .dj-deck-b-media-panel .dj-station-cycle-item input[type="checkbox"] {
            accent-color: #D4AF37;
            flex-shrink: 0;
        }
        .dj-deck-b-media-panel .dj-station-cycle-empty {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.55);
        }
        .dj-deck-b-media-panel .dj-url-drop {
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03);
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .dj-deck-b-media-panel .dj-url-input {
            width: 100%;
            box-sizing: border-box;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(0, 0, 0, 0.35);
            color: #fff;
            padding: 6px 8px;
            font-size: 11px;
        }
        .dj-deck-b-media-panel .dj-url-input::placeholder { color: rgba(255, 255, 255, 0.45); }
        .dj-deck-b-media-panel .dj-url-entry-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 6px;
            align-items: center;
        }
        .dj-deck-b-media-panel .dj-url-btn {
            padding: 5px 8px;
            font-size: 10px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.22);
            background: rgba(255, 255, 255, 0.07);
            color: #fff;
            cursor: pointer;
            line-height: 1.1;
        }
        .dj-deck-b-media-panel .dj-url-btn:hover { filter: brightness(1.1); }
        .dj-deck-b-media-panel .dj-url-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
            overflow: visible;
            flex-shrink: 0;
        }
        .dj-deck-b-media-panel .dj-url-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.06);
        }
        .dj-deck-b-media-panel .dj-url-name {
            font-size: 11px;
            flex: 1;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            word-break: break-word;
        }
        .dj-deck-b-media-panel .dj-url-item-actions {
            display: inline-flex;
            gap: 4px;
            flex-shrink: 0;
        }
        .dj-deck-b-media-panel .dj-url-item .dj-url-btn {
            padding: 1px 4px;
            font-size: 9px;
            border-radius: 4px;
            min-width: 0;
            line-height: 1;
            width: auto;
        }
        .dj-deck-b-media-panel .dj-media-queue.dj-video-queue {
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03);
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .dj-deck-b-media-panel .dj-video-tools-block {
            width: 100%;
        }
        .dj-deck-b-media-panel .dj-radio-popout {
            display: none;
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 6px);
            z-index: 60;
            padding: 10px;
            border: 1px solid rgba(212, 175, 55, 0.5);
            border-radius: 8px;
            background: rgba(14, 14, 22, 0.98);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
        }
        .dj-deck-b-media-panel .dj-radio-popout.is-open {
            display: block;
        }
        .dj-deck-b-media-panel .dj-radio-popout-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 8px;
        }
        .dj-deck-b-media-panel .dj-radio-popout-close {
            flex-shrink: 0;
            padding: 2px 8px;
            font-size: 14px;
            line-height: 1;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.75);
            cursor: pointer;
        }
        .dj-deck-b-media-panel .dj-radio-popout-close:hover {
            background: rgba(255, 80, 80, 0.25);
            color: #fff;
        }
        .dj-deck-b-media-panel .dj-b-video-radio {
            border-color: rgba(212, 175, 55, 0.55) !important;
            color: #f5e6b8 !important;
            background: rgba(212, 175, 55, 0.1) !important;
        }
        .dj-deck-b-media-panel .dj-media-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
        }
        .dj-deck-b-media-panel .dj-media-head-actions {
            display: inline-flex;
            gap: 4px;
        }
        .dj-deck-b-media-panel .dj-media-head-actions .dj-url-btn {
            padding: 1px 5px;
            font-size: 9px;
            border-radius: 4px;
            line-height: 1;
        }
        .dj-deck-b-media-panel .dj-url-btn.on {
            border-color: #D4AF37 !important;
            box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.45);
            color: #f5e6b8;
        }
        #dj-visual-root #dj-b-video-load {
            border: 2px solid #D4AF37;
            box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
        }
        #dj-visual-root #dj-b-video-local {
            border: 2px solid #39FF14;
            box-shadow: 0 0 6px rgba(57, 255, 20, 0.55), 0 0 0 1px rgba(57, 255, 20, 0.35);
        }
        #dj-visual-root #dj-b-video-folder {
            border: 2px solid #9803FC;
            box-shadow: 0 0 0 1px rgba(152, 3, 252, 0.45);
        }
        #dj-visual-root #dj-b-video-q-a {
            border: 2px solid #FF0B55;
            box-shadow: 0 0 10px rgba(255, 11, 85, 0.65), 0 0 0 1px rgba(255, 11, 85, 0.45);
            color: #ffc6d9;
        }
        #dj-visual-root #dj-b-video-q-b {
            border: 2px solid #9803FC;
            box-shadow: 0 0 0 1px rgba(152, 3, 252, 0.45);
        }
        .dj-deck-b-media-panel .dj-media-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
            overflow: visible;
            flex-shrink: 0;
        }
        #dj-visual-root.dj-mode-portrait .dj-deck-b-queue-panel,
        #dj-visual-root.dj-mode-portrait .dj-deck-b-media-panel {
            padding-bottom: calc(10px + var(--ui-bottom-hud-clearance) + clamp(20px, 4vh, 40px));
        }
        .dj-deck-b-viz-mount {
            position: absolute;
            inset: 0;
            pointer-events: none;
        }
        .dj-deck-b-viz-mount canvas {
            width: 100% !important;
            height: 100% !important;
            display: block;
        }
        .dj-deck-b-viz-placeholder {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px;
            font-size: clamp(11px, 2.4vmin, 14px);
            font-weight: 600;
            color: rgba(255, 255, 255, 0.45);
            text-align: center;
            pointer-events: none;
            letter-spacing: 0.04em;
        }
        #dj-visual-root .dj-video-shell {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            background: rgba(0, 0, 0, 0.55);
            border-radius: 10px;
            overflow: hidden;
            pointer-events: auto;
        }
        /* Karaoke / embedded web page in Deck B viz mount (iframe may be blocked by remote X-Frame-Options) */
        #dj-visual-root .dj-deck-b-embed-shell {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: auto;
            background: #0a0a10;
            border-radius: 10px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        #dj-visual-root .dj-deck-b-embed-frame {
            flex: 1;
            width: 100%;
            min-height: 0;
            border: 0;
            display: block;
            background: #000;
        }
        #dj-visual-root .dj-video-stack {
            position: relative;
            flex: 1;
            min-height: 0;
            width: 100%;
            background: #000;
        }
        #dj-visual-root .dj-video-player {
            flex: 1;
            min-height: 0;
            width: 100%;
            height: auto;
            object-fit: contain;
            background: #000;
        }
        #dj-visual-root .dj-video-player--layer {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.07s linear;
        }
        #dj-visual-root .dj-video-controls {
            position: relative;
            flex-shrink: 0;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-wrap: wrap;
            gap: 4px 8px;
            justify-content: center;
            align-items: center;
            padding: 5px 8px;
            pointer-events: auto;
            background: rgba(0, 0, 0, 0.72);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        #dj-visual-root .dj-video-btn {
            padding: 4px 9px;
            font-size: 10px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.25);
            background: rgba(0, 0, 0, 0.45);
            color: #fff;
            cursor: pointer;
            line-height: 1;
        }
        #dj-visual-root .dj-video-btn:hover { filter: brightness(1.1); }
        .dj-deck-b-media-panel .dj-media-deck-b-tools {
            display: flex;
            flex-wrap: nowrap;
            gap: 4px;
            align-items: center;
            margin: 6px 0 4px;
            min-width: 0;
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        #dj-visual-root .dj-deck-b-media-panel .dj-media-deck-b-tools .dj-video-btn {
            padding: 4px 7px;
            font-size: 10px;
            border-radius: 6px;
            flex: 0 0 auto;
        }
        #dj-visual-root .dj-deck-b-media-panel .dj-media-deck-b-tools .dj-video-loader-input {
            flex: 1 1 0;
            min-width: 48px;
            width: 0;
            max-width: none;
            padding: 4px 6px;
            font-size: 10px;
        }
        #dj-visual-root .dj-video-shell:fullscreen {
            border-radius: 0;
            background: #000;
        }
        #dj-visual-root .dj-video-shell:-webkit-full-screen {
            border-radius: 0;
            background: #000;
        }
        #dj-visual-root #dj-deck-b-viz-mount:fullscreen {
            border-radius: 0;
            background: #000;
        }
        #dj-visual-root #dj-deck-b-viz-mount:-webkit-full-screen {
            border-radius: 0;
            background: #000;
        }
        #dj-visual-root .dj-video-shell.dj-video-fs-hide-controls .dj-video-controls {
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
        }
        /* Video transport sits in Deck B header row (same slot as crossfader) */
        #dj-visual-root #dj-b-video-transport-mount {
            display: flex;
            width: 100%;
            flex-shrink: 0;
            box-sizing: border-box;
            flex-direction: column;
            align-items: stretch;
            justify-content: center;
            min-height: 34px;
            padding: 2px 8px;
            gap: 4px;
            border-bottom: 1px solid rgba(88, 0, 255, 0.28);
            background: rgba(0, 0, 0, 0.4);
        }
        #dj-visual-root #dj-b-video-transport-mount .dj-video-controls {
            position: relative;
            flex-shrink: 0;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-wrap: wrap;
            gap: 3px 6px;
            justify-content: center;
            align-items: center;
            padding: 1px 2px;
            pointer-events: auto;
            background: transparent;
            border-bottom: none;
        }
        #dj-visual-root #dj-b-video-transport-mount .dj-video-btn {
            padding: 3px 8px;
            font-size: 10px;
        }
        #dj-visual-root #dj-b-video-transport-mount.dj-video-fs-hide-controls .dj-video-controls {
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
        }
        /* Deck B video fullscreen: hide cursor after idle (toggled from JS; see scheduleFsCtrlHide in startDeckBVideoVisual) */
        html.dj-deck-b-video-fs-cursor-idle,
        html.dj-deck-b-video-fs-cursor-idle body {
            cursor: none !important;
        }
        #dj-visual-root .dj-video-loader-input {
            width: 100%;
            box-sizing: border-box;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.24);
            background: rgba(0,0,0,0.4);
            color: #fff;
            font-size: 11px;
            padding: 5px 7px;
        }
        /* Beat map | jog | deck volume | button block */
        /* Col 1 = samples + tempo: keep compact so cols 4–6 (AUDIO:BAR grid) gain width */
        #dj-visual-root .dj-deck-mosaic {
            display: grid;
            --dj-control-scale: 1;
            --dj-btn-height-mult: 1.62;
            --dj-knob-scale: 0.6;
            grid-template-columns: minmax(calc(220px * var(--dj-control-scale)), min(26vw, calc(300px * var(--dj-control-scale)))) auto minmax(calc(32px * var(--dj-control-scale)), calc(52px * var(--dj-control-scale))) repeat(3, minmax(0, 1fr));
            grid-template-rows: repeat(6, minmax(calc(24px * var(--dj-control-scale)), auto));
            gap: 1px;
            width: 100%;
            /* stretch so deck volume column spans full knob + button stack (center would shrink column to ~track height) */
            align-items: stretch;
        }
        /*
         * Landscape: enforce a strict 30 / 30 / 40 split inside each deck mosaic so the right
         * button grid and the sample-pad column scale together when the deck is widened or
         * squeezed by the splitter (instead of the right grid getting starved while the
         * sample column hoarded a fixed pixel width).
         *   col 1 (30%) — .dj-beatmap-strip: sample pads + tempo slider
         *   col 2 (30%) — .dj-jog-wrap     : jog wheel
         *   col 3 ( 4%) — .dj-deck-vol-col : vertical volume slider
         *   col 4-6 (12% each, 36% total) — .dj-btn-block: knob row + transport buttons
         *  → cols 3-6 combine to 40%, matching the requested "volume + grid buttons = 40%".
         * fr units share remaining space proportionally even when columns hit their pixel
         * min (the volume column has a small min so the thumb image always renders cleanly).
         */
        #dj-visual-root.dj-mode-landscape .dj-deck-mosaic {
            grid-template-columns:
                minmax(0, 30fr)
                minmax(0, 30fr)
                minmax(calc(26px * var(--dj-control-scale)), 4fr)
                minmax(0, 12fr)
                minmax(0, 12fr)
                minmax(0, 12fr);
        }
        /*
         * Jog wheel: clamp so it never busts out of its 30% column on narrow viewports / when
         * Deck B is squeezed by the splitter. max-width/height: 100% keeps it inside the cell.
         */
        #dj-visual-root.dj-mode-landscape .dj-deck-mosaic .dj-jog {
            width: clamp(calc(56px * var(--dj-control-scale)), calc(17vmin * var(--dj-control-scale)), calc(132px * var(--dj-control-scale)));
            height: clamp(calc(56px * var(--dj-control-scale)), calc(17vmin * var(--dj-control-scale)), calc(132px * var(--dj-control-scale)));
            max-width: 100%;
            max-height: 100%;
        }
        /*
         * Landscape: Deck A’s body centers its mosaic (content-sized .dj-stack). Deck B wraps controls in
         * .dj-deck-b-controls { flex: 1 }, which stretched them to the column top. Let the controls block
         * size to content and vertically center it under the crossfader strip — matches Deck A alignment.
         * Also center the crossfader strip + body as one block (body had flex:1, which pinned the fader
         * to the top). Skip when Deck B stage is in visual / queue / text mode — those need a full-height column.
         */
        #dj-visual-root.dj-mode-landscape .dj-deck-b:not(:has(.dj-deck-b-stage:is(.dj-deck-b-visual-mode, .dj-deck-b-queue-mode, .dj-deck-b-media-mode, .dj-deck-b-text-mode))) {
            justify-content: center;
        }
        #dj-visual-root.dj-mode-landscape .dj-deck-b:not(:has(.dj-deck-b-stage:is(.dj-deck-b-visual-mode, .dj-deck-b-queue-mode, .dj-deck-b-media-mode, .dj-deck-b-text-mode))) > .dj-deck-body {
            flex: 0 1 auto;
        }
        #dj-visual-root.dj-mode-landscape .dj-deck-b-stage:not(.dj-deck-b-visual-mode):not(.dj-deck-b-queue-mode):not(.dj-deck-b-media-mode):not(.dj-deck-b-text-mode) {
            justify-content: center;
            flex: 0 1 auto;
        }
        #dj-visual-root.dj-mode-landscape .dj-deck-b-stage:not(.dj-deck-b-visual-mode):not(.dj-deck-b-queue-mode):not(.dj-deck-b-media-mode):not(.dj-deck-b-text-mode) .dj-deck-b-controls {
            flex: 0 1 auto;
        }
        #dj-visual-root .dj-deck-mosaic > .dj-beatmap-strip {
            grid-column: 1;
            grid-row: 1 / 7;
            min-width: 0;
            min-height: 0;
            align-self: stretch;
        }
        #dj-visual-root .dj-deck-mosaic > .dj-jog-wrap {
            grid-column: 2;
            grid-row: 1 / -1;
            justify-self: center;
            align-self: center;
            position: relative;
            z-index: 2;
        }
        #dj-visual-root .dj-deck-mosaic > .dj-deck-vol-col {
            grid-column: 3;
            grid-row: 1 / 7;
            min-height: 0;
            align-self: stretch;
            position: relative;
            z-index: 1;
        }
        #dj-visual-root .dj-deck-mosaic > .dj-btn-block {
            grid-column: 4 / 7;
            grid-row: 1 / 7;
            min-width: 0;
            min-height: 0;
            align-self: stretch;
            position: relative;
            z-index: 3;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            grid-template-rows: repeat(6, minmax(calc(24px * var(--dj-control-scale)), auto));
            gap: 1px;
            align-items: stretch;
            justify-items: stretch;
        }
        #dj-visual-root .dj-btn-block .dj-knob-top-row {
            grid-column: 1 / 4;
            grid-row: 1;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 2px;
            align-items: center;
        }
        #dj-visual-root .dj-btn-block .dj-knob-top-row .eq-col {
            width: auto;
            gap: 1px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        #dj-visual-root .dj-btn-block .dj-knob-top-row .eq-label {
            font-size: 8px;
            line-height: 1;
            text-transform: uppercase;
        }
        #dj-visual-root .dj-deck-mosaic .eq-col {
            width: auto;
            gap: 0;
        }
        #dj-visual-root .dj-deck-mosaic .knob-wrap {
            width: calc(67.5px * var(--dj-control-scale) * var(--dj-knob-scale));
            height: calc(67.5px * var(--dj-control-scale) * var(--dj-knob-scale));
        }
        #dj-visual-root .dj-deck-vol-col {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 0;
            align-self: stretch;
        }
        #dj-visual-root .dj-deck-vol-stack {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            min-height: 0;
            gap: 4px;
        }
        /* VOL mute: same footprint / chrome as beat-map Sync (compact footer button) */
        #dj-visual-root .dj-beatmap-tempo-footer .btn.dj-fx.dj-beatmap-sync,
        #dj-visual-root .dj-deck-vol-stack .btn.dj-fx.dj-deck-vol-mute {
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 26px;
            padding: 4px 8px;
            font-size: 11px;
            letter-spacing: 0.06em;
            flex-shrink: 0;
            white-space: nowrap;
            line-height: 1.1;
            text-align: center;
        }
        /* Fixed width so VOL / Sync labels do not shift layout when showing live slider values */
        #dj-visual-root .dj-deck-vol-stack .btn.dj-fx.dj-deck-vol-mute {
            width: 46px;
            min-width: 46px;
            max-width: 46px;
        }
        #dj-visual-root .dj-beatmap-tempo-footer .btn.dj-fx.dj-beatmap-sync {
            width: 50px;
            min-width: 50px;
            max-width: 50px;
        }
        #dj-visual-root .dj-deck-vol-mute--live,
        #dj-visual-root .dj-beatmap-sync--live {
            letter-spacing: 0.02em;
            font-variant-numeric: tabular-nums;
        }
        #dj-visual-root .dj-deck-vol-wrap,
        #dj-visual-root .dj-beatmap-tempo-slider-wrap {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            flex: 1 1 auto;
            min-height: 0;
            overflow: visible;
            position: relative;
        }
        #dj-visual-root .dj-deck-vol-wrap {
            height: 100%;
            max-height: 100%;
            --deck-vol-thumb-half: calc(23px * var(--dj-control-scale));
            --deck-vol-rail: rgba(255, 255, 255, 0.08);
            --deck-vol-pct: 1;
            /* Segment above thumb: match crossfader rail hues (--cross-deck-a / --cross-deck-b on .dj-crossfader-wrap) */
            --deck-vol-fill-high: rgba(208, 18, 18, 0.6);
        }
        #dj-visual-root .dj-deck-b .dj-deck-vol-wrap {
            --deck-vol-fill-high: rgba(30, 26, 77, 0.6);
        }
        #dj-visual-root .dj-deck-vol-wrap::before {
            content: '';
            position: absolute;
            left: 50%;
            top: var(--deck-vol-thumb-half);
            bottom: var(--deck-vol-thumb-half);
            width: calc(14px + 6px);
            box-sizing: border-box;
            min-height: 24px;
            transform: translateX(-50%);
            border-radius: 7px;
            border: 3px solid rgba(212, 175, 55, 0.45);
            /* Bottom = min (mute), top = max; fill above thumb matches crossfader deck hues */
            background: linear-gradient(
                to top,
                var(--deck-vol-rail) 0%,
                var(--deck-vol-rail) calc(var(--deck-vol-pct, 1) * 100%),
                var(--deck-vol-fill-high) calc(var(--deck-vol-pct, 1) * 100%),
                var(--deck-vol-fill-high) 100%
            );
            box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.45);
            pointer-events: none;
        }
        /* Tempo BPM: gold rail inset by half thumb travel (same idea as crossfader / deck VOL) */
        #dj-visual-root .dj-beatmap-tempo-slider-wrap {
            --bpm-thumb-half: calc(23px * var(--dj-control-scale));
            /* Match .dj-deck-vol-wrap: fill the flex slot so JS width === getBoundingClientRect().height */
            height: 100%;
            max-height: 100%;
            align-self: stretch;
            /* Prefer absorbing free space in the tempo stack so clientHeight matches the rail slot */
            flex: 1 1 0;
            min-height: 0;
        }
        #dj-visual-root .dj-beatmap-tempo-slider-wrap::before {
            content: '';
            position: absolute;
            left: 50%;
            top: var(--bpm-thumb-half);
            bottom: var(--bpm-thumb-half);
            width: calc(14px + 2px);
            box-sizing: border-box;
            min-height: 24px;
            transform: translateX(-50%);
            border-radius: 7px;
            border: 1px solid rgba(212, 175, 55, 0.45);
            background: rgba(255, 255, 255, 0.08);
            box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.45);
            pointer-events: none;
        }
        #dj-visual-root .dj-beatmap-strip {
            display: flex;
            flex-direction: row;
            align-items: stretch;
            gap: 4px;
            min-width: 0;
            padding: 0;
        }
        #dj-visual-root .dj-beatmap-main {
            flex: 1 1 0;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            gap: 4px;
            min-width: 0;
            min-height: 0;
        }
        #dj-visual-root .dj-beatmap-fx-knobs {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 2px;
            align-items: end;
            justify-items: center;
            flex-shrink: 0;
        }
        #dj-visual-root .dj-beatmap-fx-knobs .eq-col {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
            gap: 2px;
            min-width: 0;
        }
        /* Match Deck EQ knobs (Lo / Med / High / Gain): 67.5px */
        #dj-visual-root .dj-beatmap-fx-knobs .knob-wrap {
            width: calc(67.5px * var(--dj-control-scale) * var(--dj-knob-scale));
            height: calc(67.5px * var(--dj-control-scale) * var(--dj-knob-scale));
        }
        /* TK / Loop / Arp (Deck A) + Deck B mirror FX (Reverb / Flanger / CUT): darker chassis */
        #dj-visual-root #dj-knob-a-tk,
        #dj-visual-root #dj-knob-a-loop,
        #dj-visual-root #dj-knob-a-arp,
        #dj-visual-root #dj-knob-b-reverb,
        #dj-visual-root #dj-knob-b-flanger,
        #dj-visual-root #dj-knob-b-cut {
            background: radial-gradient(110% 110% at 50% 16%, #282828 0%, #060606 92%);
            border: 1px solid rgba(255, 255, 255, 0.28);
            box-shadow:
                0 5px 12px rgba(0, 0, 0, 0.82),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
        }
        /* Deck B Flanger: ensure indicator line color wins over generic knob rules */
        #dj-visual-root #dj-knob-b-flanger {
            --knob-color: #3fff00;
        }
        #dj-visual-root #dj-knob-a-tk .knob-indicator,
        #dj-visual-root #dj-knob-a-loop .knob-indicator,
        #dj-visual-root #dj-knob-a-arp .knob-indicator,
        #dj-visual-root #dj-knob-b-reverb .knob-indicator,
        #dj-visual-root #dj-knob-b-flanger .knob-indicator,
        #dj-visual-root #dj-knob-b-cut .knob-indicator {
            box-shadow: 0 0 6px var(--knob-color, #fff);
            filter: brightness(1.22) saturate(1.2);
        }
        #dj-visual-root .dj-beatmap-fx-knobs .eq-col:has(#dj-knob-a-tk) .eq-label,
        #dj-visual-root .dj-beatmap-fx-knobs .eq-col:has(#dj-knob-a-loop) .eq-label,
        #dj-visual-root .dj-beatmap-fx-knobs .eq-col:has(#dj-knob-a-arp) .eq-label,
        #dj-visual-root .dj-beatmap-fx-knobs .eq-col:has(#dj-knob-b-reverb) .eq-label,
        #dj-visual-root .dj-beatmap-fx-knobs .eq-col:has(#dj-knob-b-flanger) .eq-label,
        #dj-visual-root .dj-beatmap-fx-knobs .eq-col:has(#dj-knob-b-cut) .eq-label {
            color: rgba(255, 255, 255, 0.4);
        }
        #dj-visual-root .dj-beatmap-fx-knobs .eq-label {
            font-size: 8px;
            line-height: 1;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.65);
        }
        /* Beat-map FX knobs: click toggles effect; active = ring + red pilot dot */
        #dj-visual-root .dj-beatmap-fx-knobs .knob-wrap.dj-beatfx-on {
            box-shadow:
                0 0 0 2px rgba(255, 72, 72, 0.75),
                0 0 16px rgba(255, 60, 60, 0.35),
                0 4px 6px rgba(0, 0, 0, 0.5),
                inset 0 1px 1px rgba(255, 255, 255, 0.22);
            filter: saturate(1.2) brightness(1.06);
        }
        #dj-visual-root .dj-beatmap-fx-knobs .knob-wrap.dj-beatfx-on::after {
            content: '';
            position: absolute;
            top: 7px;
            right: 7px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ff3838;
            box-shadow: 0 0 8px rgba(255, 55, 55, 0.95);
            pointer-events: none;
            z-index: 2;
        }
        /* Tempo column: same width band as Deck VOL column */
        #dj-visual-root .dj-beatmap-tempo-col {
            flex: 0 0 minmax(calc(32px * var(--dj-control-scale)), calc(52px * var(--dj-control-scale)));
            min-width: calc(32px * var(--dj-control-scale));
            max-width: calc(52px * var(--dj-control-scale));
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: stretch;
            min-height: 0;
            align-self: stretch;
        }
        #dj-visual-root .dj-beatmap-tempo-stack {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            flex: 1 1 0;
            height: 100%;
            min-height: 0;
            gap: 4px;
            width: 100%;
        }
        /* Same vertical span behavior as .dj-deck-vol-stack: slider grows, one compact footer row (cf. VOL mute) */
        #dj-visual-root .dj-beatmap-tempo-footer {
            display: flex;
            flex-direction: column;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: center;
            gap: 4px;
            flex-shrink: 0;
            width: 100%;
        }
        /* Match .dj-btn-block: 1px gutters; row height from content (same as btn rows minmax(30px, auto)), not 1fr stretch */
        #dj-visual-root .dj-beatmap-pads {
            flex: 0 1 auto;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 1px;
            min-width: 0;
            min-height: 0;
            align-items: stretch;
            justify-items: stretch;
            align-content: start;
        }
        #dj-visual-root .dj-beatmap-col {
            display: grid;
            grid-template-rows: repeat(5, minmax(calc(28px * var(--dj-control-scale) * var(--dj-btn-height-mult)), auto));
            gap: 1px;
            min-height: 0;
            align-items: stretch;
            justify-items: stretch;
            align-content: start;
        }
        /* Sample pads (left-side beat-map grid): bnt.png frame over wly.gif. Black fallback if the gif is missing.
         * clamp() font-size + tight horizontal padding lets the label scale down to fit when the deck
         * mosaic (and therefore the 30% sample column / 3 sub-cols) is narrowed by the splitter. */
        #dj-visual-root .dj-beatmap-pads .btn.dj-fx.dj-beat-pad {
            width: 100%;
            min-height: calc(28px * var(--dj-control-scale) * var(--dj-btn-height-mult));
            box-sizing: border-box;
            touch-action: manipulation;
            /* Labels stay on a single line and shrink to fit. The JS fitDeckButtonText()
             * pass on DjDecksEngine further reduces font-size when scrollWidth exceeds
             * clientWidth after a resize / splitter drag; CSS overflow:hidden +
             * text-overflow:ellipsis is the visual backstop when even the 4px floor
             * cannot fit a freakishly long label. */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: clamp(5px, calc(11px * var(--dj-control-scale)), 13px);
            font-weight: 700;
            letter-spacing: 0;
            padding: calc(6px * var(--dj-control-scale)) calc(3px * var(--dj-control-scale));
            line-height: 1.1;
            background-color: #000;
            background-image: url('../assets/images/bnt.png'), url('../assets/gifs/wly.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root .dj-beatmap-pads .btn.dj-fx.dj-beat-pad:hover {
            background-image: url('../assets/images/bnt.png'), url('../assets/gifs/wly.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root .dj-beatmap-pads .btn.dj-fx.dj-beat-pad.on {
            background-image: url('../assets/images/bnt.png'), url('../assets/gifs/wly.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
            color: #FFD700;
            text-shadow: 0 0 6px rgba(255, 215, 0, 0.45), 0 0 4px rgba(0,0,0,0.85), 0 0 10px rgba(0,0,0,0.55);
        }
        #dj-visual-root .dj-beatmap-pads .btn.dj-fx.dj-beat-pad.dj-beat-pad-mode-loop,
        #dj-visual-root .dj-beatmap-pads .btn.dj-fx.dj-beat-pad.dj-beat-pad-mode-once {
            border-left: none;
        }
        .dj-beat-pad-loop-menu {
            position: fixed;
            z-index: 999999;
            min-width: 168px;
            padding: 6px;
            background: rgba(14, 14, 22, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: 8px;
            box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .dj-beat-pad-loop-menu-item {
            width: 100%;
            margin: 0;
            padding: 8px 10px;
            border: 1px solid transparent;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.06);
            color: #fff;
            font-size: 13px;
            letter-spacing: 0.03em;
            text-align: left;
            cursor: pointer;
            box-sizing: border-box;
        }
        .dj-beat-pad-loop-menu-item:hover {
            background: rgba(255, 255, 255, 0.14);
        }
        .dj-beat-pad-loop-menu-item--active {
            border: 1px solid rgba(212, 175, 55, 0.9);
            box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2) inset;
            background: rgba(212, 175, 55, 0.12);
        }
        .dj-beat-pad-loop-menu-item--active:hover {
            background: rgba(212, 175, 55, 0.18);
        }
        /* Deck VOL + beat-map tempo: same thumb, rotation; visible rail + gold frame live on
         * the wrap::before (inset by half thumb) so the border matches thumb travel like #dj-crossfader. */
        #dj-visual-root .dj-deck-vol,
        #dj-visual-root .dj-beatmap-bpm-slider {
            -webkit-appearance: none;
            appearance: none;
            height: 14px;
            transform: rotate(-90deg);
            transform-origin: center center;
            background: transparent !important;
            border-radius: 7px;
            border: none;
            box-sizing: border-box;
            position: relative;
            z-index: 1;
            margin: 0;
            padding: 0;
            /* Wrap is a narrow row flexbox; default shrink=1 squashes the long pre-rotate width so thumb travel
             * no longer matches the full-height gold ::before rail (especially noticeable on the BPM slider). */
            flex-shrink: 0;
        }
        /* Pre-rotate width = vertical travel; deck VOL rails are 2× tempo slider length (see syncDeckVolumeSliderLengths). */
        #dj-visual-root .dj-deck-vol {
            width: calc(420px * var(--dj-control-scale));
        }
        #dj-visual-root .dj-beatmap-bpm-slider {
            width: calc(210px * var(--dj-control-scale));
        }
        #dj-visual-root .dj-deck-vol::-webkit-slider-runnable-track,
        #dj-visual-root .dj-beatmap-bpm-slider::-webkit-slider-runnable-track {
            background: transparent;
        }
        #dj-visual-root .dj-deck-vol::-moz-range-track,
        #dj-visual-root .dj-beatmap-bpm-slider::-moz-range-track {
            background: transparent;
        }
        #dj-visual-root .dj-deck-vol::-moz-range-progress,
        #dj-visual-root .dj-beatmap-bpm-slider::-moz-range-progress {
            background: transparent !important;
        }
        #dj-visual-root .dj-deck-vol::-webkit-slider-thumb,
        #dj-visual-root .dj-beatmap-bpm-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: calc(46px * var(--dj-control-scale));
            height: calc(46px * var(--dj-control-scale));
            background: transparent url('../assets/images/vol.png') center center / 100% 100% no-repeat;
            border: none;
            border-radius: 50%;
            margin-top: calc((14px - (46px * var(--dj-control-scale))) / 2);
            box-shadow: none;
        }
        #dj-visual-root .dj-deck-vol::-moz-range-thumb,
        #dj-visual-root .dj-beatmap-bpm-slider::-moz-range-thumb {
            width: calc(46px * var(--dj-control-scale));
            height: calc(46px * var(--dj-control-scale));
            background: transparent url('../assets/images/vol.png') center center / 100% 100% no-repeat;
            border: none;
            border-radius: 50%;
            box-shadow: none;
        }
        .dj-deck {
            flex: 1;
            min-width: 0;
            min-height: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            padding: clamp(10px, 2vmin, 18px);
            border-radius: 14px;
            border: 1px solid rgba(212, 175, 55, 0.28);
            background: rgba(0, 0, 0, 0.45);
            box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
        }
        .dj-deck-a { border-color: rgba(255, 11, 85, 0.35); }
        .dj-deck-b { border-color: rgba(88, 0, 255, 0.35); }
        .dj-deck-badge {
            font-size: 11px;
            letter-spacing: 0.2em;
            font-weight: 700;
            opacity: 0.85;
        }
        .dj-deck-a .dj-deck-badge { color: #FF0B55; }
        .dj-deck-b .dj-deck-badge { color: #9803FC; }
        .dj-station-title {
            width: 100%;
            text-align: center;
            font-size: clamp(13px, 2.8vmin, 18px);
            font-weight: 600;
            line-height: 1.25;
            padding: 0 6px;
            word-break: break-word;
            color: #fafafa;
            max-height: 3.6em;
            overflow: hidden;
        }
        /* Deck B fallback label (header): match Deck badge styling (purple) */
        #dj-station-b-title.is-deck-b-label {
            letter-spacing: 0.2em;
            color: #9803FC;
            opacity: 0.85;
            text-transform: uppercase;
        }
        .dj-deck-b-media-panel .dj-url-item.is-looping-current {
            outline: 1px solid rgba(212, 175, 55, 0.75);
            background: rgba(212, 175, 55, 0.12);
            border-radius: 6px;
        }
        #dj-visual-root .dj-visual-title-btn {
            width: 100%;
            min-height: 32px;
            padding: 5px 10px;
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 8px;
            color: #fff;
            font-size: clamp(11px, 2.1vmin, 14px);
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            background-color: rgba(255, 255, 255, 0.08);
            background-image: url('../assets/images/btn.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: 100% 100%;
        }
        #dj-visual-root .dj-visual-title-btn:hover {
            color: #f5d20f;
            border-color: rgba(245, 210, 15, 0.35);
            filter: brightness(1.1);
        }
        /* Idle label style: match Deck badge (purple), no btn skin */
        #dj-visual-root .dj-visual-title-btn.as-deck-badge {
            border: none;
            background: none;
            background-image: none !important;
            box-shadow: none;
            min-height: 0;
            padding: 0;
            border-radius: 0;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.2em;
            color: #9803FC;
            opacity: 0.85;
            text-align: center;
            cursor: pointer;
            text-transform: uppercase;
        }
        #dj-visual-root .dj-visual-title-btn.as-deck-badge:hover {
            color: #bf62ff;
            border: none;
            filter: none;
        }
        .dj-deck-body {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: clamp(12px, 3vmin, 22px);
            width: 100%;
            flex: 1;
        }
        .dj-jog-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            touch-action: none;
        }
        .dj-jog-deck-label {
            font-size: clamp(10px, 2vmin, 12px);
            font-weight: 700;
            letter-spacing: 0.2em;
            text-align: center;
            line-height: 1.15;
            user-select: none;
            pointer-events: none;
            white-space: nowrap;
            opacity: 0.85;
        }
        .dj-jog-deck-label--a {
            color: #FF0B55;
            text-shadow: 0 0 10px rgba(255, 11, 85, 0.45);
        }
        .dj-jog-deck-label--b {
            color: #9803FC;
            text-shadow: 0 0 10px rgba(152, 3, 252, 0.45);
        }
        .dj-jog {
            width: clamp(calc(88px * var(--dj-control-scale)), calc(26vmin * var(--dj-control-scale)), calc(200px * var(--dj-control-scale)));
            height: clamp(calc(88px * var(--dj-control-scale)), calc(26vmin * var(--dj-control-scale)), calc(200px * var(--dj-control-scale)));
            border-radius: 50%;
            background:
                radial-gradient(circle at 35% 30%, rgba(255,255,255,0.14), transparent 42%),
                radial-gradient(circle at center, #1a1a22 0%, #07070c 55%, #020208 100%);
            border: 3px solid rgba(212, 175, 55, 0.45);
            box-shadow:
                0 12px 28px rgba(0,0,0,0.65),
                inset 0 0 24px rgba(0,0,0,0.55);
            position: relative;
            touch-action: none;
        }
        .dj-jog-marker {
            position: absolute;
            left: 50%; top: 14%;
            width: 6%; height: 22%;
            margin-left: -3%;
            background: rgba(212, 175, 55, 0.95);
            border-radius: 2px;
            transform-origin: 50% 318%;
            box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
            pointer-events: none;
            z-index: 3;
        }
        .dj-jog-progress-svg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            transform-origin: 50% 50%;
            overflow: visible;
            transition: opacity 0.2s ease, visibility 0.2s ease;
        }
        .dj-jog-progress-svg.dj-jog-progress-svg--hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }
        .dj-jog-progress-svg circle.dj-jog-progress-track,
        .dj-jog-progress-svg circle.dj-jog-progress-bar {
            pointer-events: none;
        }
        .dj-jog-progress-svg circle.dj-jog-progress-hit {
            pointer-events: stroke;
            cursor: pointer;
            touch-action: none;
        }
        .dj-jog-progress-svg--a .dj-jog-progress-bar {
            stroke: #FF0B55;
            filter: drop-shadow(0 0 3px rgba(255, 11, 85, 0.9)) drop-shadow(0 0 10px rgba(255, 11, 85, 0.45));
        }
        .dj-jog-progress-svg--b .dj-jog-progress-bar {
            stroke: #5800FF;
            filter: drop-shadow(0 0 3px rgba(88, 0, 255, 0.95)) drop-shadow(0 0 10px rgba(88, 0, 255, 0.45));
        }
        /* DJ Deck buttons: align with Mixer Settings (#mix-panel .btn / #mix-effects .btn) — btn.png */
        #dj-visual-root .dj-play,
        #dj-visual-root .dj-tbtn {
            overflow: hidden;
            padding: calc(4px * var(--dj-control-scale)) calc(8px * var(--dj-control-scale));
            border: 1px solid rgba(255,255,255,0.25);
            background-color: rgba(255,255,255,0.08);
            background-image: url('../assets/images/btn.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            color: #fff;
            border-radius: 6px;
            cursor: pointer;
            font-size: calc(10px * var(--dj-control-scale));
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
            transition: all 0.2s ease;
            min-height: calc(28px * var(--dj-control-scale) * var(--dj-btn-height-mult));
        }
        #dj-visual-root .dj-play {
            min-width: calc(70px * var(--dj-control-scale));
            height: calc(28px * var(--dj-control-scale) * var(--dj-btn-height-mult));
            max-height: calc(28px * var(--dj-control-scale) * var(--dj-btn-height-mult));
            box-sizing: border-box;
            padding: 0 calc(8px * var(--dj-control-scale));
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: calc(10px * var(--dj-control-scale));
            line-height: 1;
            letter-spacing: 0.08em;
        }
        #dj-visual-root .btn.dj-fx,
        #dj-visual-root .btn.dj-sfx {
            overflow: hidden;
            padding: calc(6px * var(--dj-control-scale));
            border: 1px solid rgba(255,0,0,0.25);
            background-color: rgba(0,0,0,0.25);
            background-image: url('../assets/images/btn.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            color: #fff;
            border-radius: 6px;
            cursor: pointer;
            font-size: calc(10px * var(--dj-control-scale));
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            transition: all 0.2s ease;
            text-shadow: 0 0 4px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.6);
            white-space: nowrap;
        }
        #dj-visual-root .btn.dj-fx.on,
        #dj-visual-root .btn.dj-sfx.on {
            border-color: rgba(212,175,55,0.8);
            box-shadow: 0 0 12px rgba(212,175,55,0.25) inset;
            background-color: rgba(212,175,55,0.12);
            background-image: url('../assets/images/btn.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            color: #fff;
        }
        #dj-visual-root .btn.dj-sfx.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ytu.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root .btn.dj-sfx {
            background-color: #000;
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ytu.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root .btn.dj-sfx.sample-playing {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ytu.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
            color: #FFD700;
            text-shadow: 0 0 6px rgba(255, 215, 0, 0.45), 0 0 4px rgba(0,0,0,0.85), 0 0 10px rgba(0,0,0,0.55);
        }
        /* Loop armed + playing: keep gold label (beats generic .dj-sfx.on white). */
        #dj-visual-root .btn.dj-sfx.on.sample-playing {
            color: #FFD700;
            text-shadow: 0 0 6px rgba(255, 215, 0, 0.45), 0 0 4px rgba(0,0,0,0.85), 0 0 10px rgba(0,0,0,0.55);
        }
        /* RADIO shortcut: Digital Radio visual (dig.gif) */
        #dj-visual-root #dj-a-sfx-wav,
        #dj-visual-root #dj-b-sfx-wav {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/dig.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-sfx-wav:hover,
        #dj-visual-root #dj-b-sfx-wav:hover,
        #dj-visual-root #dj-a-sfx-wav.on,
        #dj-visual-root #dj-b-sfx-wav.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/dig.gif');
            background-size: 100% 100%, 100% 100%;
        }
        /* Deck A indicator: matching Deck B visual is active */
        #dj-visual-root .btn.dj-fx.deck-b-active {
            color: #f5d20f;
            text-shadow: 0 0 6px rgba(245, 210, 15, 0.6), 0 0 14px rgba(245, 210, 15, 0.4);
        }
        #dj-visual-root .dj-play:hover,
        #dj-visual-root .dj-tbtn:hover {
            background-color: rgba(217,2,45,0.1);
            color: #f5d20f;
            box-shadow: 0 0 10px rgba(255,255,255,0.15);
            border-color: rgba(245,210,15,0.3);
            background-image: url('../assets/images/btn.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: 100% 100%;
        }
        /* Transport GIF backdrops */
        #dj-visual-root #dj-a-prev,
        #dj-visual-root #dj-b-prev {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/pre.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-next,
        #dj-visual-root #dj-b-next {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ran.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-play-a:not(.is-playing),
        #dj-visual-root #dj-play-b:not(.is-playing) {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ylp.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, cover;
        }
        #dj-visual-root #dj-play-a:not(.is-playing):hover,
        #dj-visual-root #dj-play-b:not(.is-playing):hover {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ylp.gif');
            background-size: 100% 100%, cover;
        }
        /* Pause label: gold text on ply.gif backdrop (no brighter “white” idle fill). */
        #dj-visual-root #dj-play-a.is-playing,
        #dj-visual-root #dj-play-b.is-playing {
            background-color: transparent;
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ply.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, cover;
            color: #FFD700;
            text-shadow: 0 0 6px rgba(255, 215, 0, 0.4), 0 0 4px rgba(0, 0, 0, 0.9);
        }
        #dj-visual-root #dj-play-a.is-playing:hover,
        #dj-visual-root #dj-play-b.is-playing:hover {
            background-color: rgba(217, 2, 45, 0.1);
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ply.gif');
            background-size: 100% 100%, cover;
            color: #f5d20f;
            border-color: rgba(245, 210, 15, 0.3);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
        }
        #dj-visual-root .btn.dj-fx:hover {
            filter: brightness(1.15);
            border-color: rgba(217,2,45,0.35);
            color: #f5d20f;
            background-image: url('../assets/images/btn.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: 100% 100%;
        }
        #dj-visual-root .btn.dj-sfx:hover {
            filter: brightness(1.15);
            border-color: rgba(217,2,45,0.35);
            color: #f5d20f;
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ytu.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        /* ProjectM / AUDIO:BAR: btn.png on top (transparent center), gif fills underneath */
        #dj-visual-root #dj-vis-pm2,
        #dj-visual-root #dj-b-vis-pm2 {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/prm.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, cover;
            background-color: rgba(0, 0, 0, 0.45);
        }
        #dj-visual-root #dj-vis-pm2.on,
        #dj-visual-root #dj-b-vis-pm2.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/prm.gif');
            background-size: 100% 100%, cover;
        }
        #dj-visual-root #dj-vis-pm2:hover,
        #dj-visual-root #dj-b-vis-pm2:hover {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/prm.gif');
            background-size: 100% 100%, cover;
            filter: brightness(1.12);
        }
        /* Audio Bars visual shortcut: aub.gif backdrop */
        #dj-visual-root #dj-vis-bars,
        #dj-visual-root #dj-b-vis-bars {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/aub.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
            background-color: rgba(0, 0, 0, 0.45);
        }
        #dj-visual-root #dj-vis-bars:hover,
        #dj-visual-root #dj-b-vis-bars:hover {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/aub.gif');
            background-size: 100% 100%, 100% 100%;
            filter: brightness(1.12);
        }
        @keyframes karaokeLabelNeonCycle {
            0% {
                color: #ff66ee;
                text-shadow:
                    0 0 10px rgba(255, 90, 230, 0.98),
                    0 0 20px rgba(220, 60, 255, 0.65),
                    0 0 2px rgba(90, 0, 70, 0.9);
            }
            12.5% {
                color: #ffffff;
                text-shadow:
                    0 0 2px rgba(0, 0, 0, 0.95),
                    0 1px 3px rgba(0, 0, 0, 0.85),
                    0 0 12px rgba(255, 255, 255, 1),
                    0 0 22px rgba(220, 235, 255, 0.55);
            }
            25% {
                color: #c877ff;
                text-shadow:
                    0 0 10px rgba(200, 120, 255, 0.98),
                    0 0 20px rgba(160, 80, 255, 0.55),
                    0 0 2px rgba(60, 0, 100, 0.85);
            }
            37.5% {
                color: #060608;
                text-shadow:
                    0 0 4px rgba(255, 255, 255, 0.95),
                    0 0 10px rgba(255, 255, 255, 0.65),
                    0 0 18px rgba(200, 210, 255, 0.35),
                    0 0 2px rgba(255, 255, 255, 0.9);
            }
            50% {
                color: #66f5ff;
                text-shadow:
                    0 0 10px rgba(90, 240, 255, 0.98),
                    0 0 20px rgba(60, 200, 255, 0.5),
                    0 0 2px rgba(0, 70, 90, 0.85);
            }
            62.5% {
                color: #f8f8fb;
                text-shadow:
                    0 0 2px rgba(0, 0, 0, 0.88),
                    0 0 10px rgba(255, 255, 255, 0.95),
                    0 0 20px rgba(230, 240, 255, 0.45);
            }
            75% {
                color: #ffa8ff;
                text-shadow:
                    0 0 10px rgba(255, 170, 255, 0.98),
                    0 0 20px rgba(255, 130, 230, 0.55),
                    0 0 2px rgba(100, 0, 80, 0.85);
            }
            87.5% {
                color: #000000;
                text-shadow:
                    0 0 5px rgba(255, 255, 255, 0.92),
                    0 0 14px rgba(255, 255, 255, 0.45),
                    0 0 22px rgba(180, 190, 255, 0.25);
            }
            100% {
                color: #ff66ee;
                text-shadow:
                    0 0 10px rgba(255, 90, 230, 0.98),
                    0 0 20px rgba(220, 60, 255, 0.65),
                    0 0 2px rgba(90, 0, 70, 0.9);
            }
        }
        #dj-visual-root #dj-a-sfx-w1,
        #dj-visual-root #dj-b-sfx-w1 {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/kar.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-sfx-w1:hover,
        #dj-visual-root #dj-b-sfx-w1:hover,
        #dj-visual-root #dj-a-sfx-w1.on,
        #dj-visual-root #dj-b-sfx-w1.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/kar.gif');
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-sfx-w1,
        #dj-visual-root #dj-a-sfx-w1:hover,
        #dj-visual-root #dj-a-sfx-w1.on,
        #dj-visual-root #dj-b-sfx-w1,
        #dj-visual-root #dj-b-sfx-w1:hover,
        #dj-visual-root #dj-b-sfx-w1.on {
            animation: karaokeLabelNeonCycle 6.5s ease-in-out infinite;
        }
        @media (prefers-reduced-motion: reduce) {
            #dj-visual-root #dj-a-sfx-w1,
            #dj-visual-root #dj-a-sfx-w1:hover,
            #dj-visual-root #dj-a-sfx-w1.on,
            #dj-visual-root #dj-b-sfx-w1,
            #dj-visual-root #dj-b-sfx-w1:hover,
            #dj-visual-root #dj-b-sfx-w1.on {
                animation: none;
                color: #e6c2ff;
                text-shadow:
                    0 0 8px rgba(200, 110, 255, 0.95),
                    0 0 16px rgba(170, 70, 255, 0.55),
                    0 0 2px rgba(50, 0, 80, 0.85);
            }
        }
        #dj-visual-root #dj-fx-high,
        #dj-visual-root #dj-b-fx-high {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ava.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, cover;
        }
        #dj-visual-root #dj-fx-high:hover,
        #dj-visual-root #dj-b-fx-high:hover,
        #dj-visual-root #dj-fx-high.on,
        #dj-visual-root #dj-b-fx-high.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/ava.gif');
            background-size: 100% 100%, cover;
        }
        #dj-visual-root #dj-fx-low,
        #dj-visual-root #dj-b-fx-low {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/vid.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-fx-low:hover,
        #dj-visual-root #dj-b-fx-low:hover,
        #dj-visual-root #dj-fx-low.on,
        #dj-visual-root #dj-b-fx-low.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/vid.gif');
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-fx-treble,
        #dj-visual-root #dj-b-fx-treble {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/mix.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-fx-treble:hover,
        #dj-visual-root #dj-b-fx-treble:hover,
        #dj-visual-root #dj-fx-treble.on,
        #dj-visual-root #dj-b-fx-treble.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/mix.gif');
            background-size: 100% 100%, 100% 100%;
        }
        @keyframes queueGoldGlowPulse {
            0%, 100% {
                color: #00edff;
                -webkit-text-stroke-width: 0.35px;
                -webkit-text-stroke-color: rgba(212, 175, 55, 0.4);
                text-shadow:
                    0 0 3px rgba(255, 215, 120, 0.55),
                    0 0 8px rgba(212, 175, 55, 0.45),
                    0 0 14px rgba(212, 175, 55, 0.22),
                    0 0 10px rgba(0, 235, 255, 0.95),
                    0 0 22px rgba(0, 210, 255, 0.55),
                    0 0 34px rgba(0, 180, 255, 0.28),
                    0 0 2px rgba(0, 35, 55, 0.95);
            }
            50% {
                color: #00edff;
                -webkit-text-stroke-width: 0.85px;
                -webkit-text-stroke-color: rgba(255, 228, 160, 0.98);
                text-shadow:
                    0 0 8px rgba(255, 235, 190, 1),
                    0 0 18px rgba(212, 175, 55, 0.95),
                    0 0 32px rgba(255, 210, 120, 0.55),
                    0 0 48px rgba(212, 175, 55, 0.28),
                    0 0 12px rgba(0, 235, 255, 0.95),
                    0 0 26px rgba(0, 210, 255, 0.65),
                    0 0 2px rgba(0, 35, 55, 0.95);
            }
        }
        #dj-visual-root #dj-a-queue,
        #dj-visual-root #dj-b-queue {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/que.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-queue:hover,
        #dj-visual-root #dj-b-queue:hover,
        #dj-visual-root #dj-a-queue.on,
        #dj-visual-root #dj-b-queue.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/que.gif');
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-queue,
        #dj-visual-root #dj-a-queue:hover,
        #dj-visual-root #dj-a-queue.on,
        #dj-visual-root #dj-b-queue,
        #dj-visual-root #dj-b-queue:hover,
        #dj-visual-root #dj-b-queue.on {
            paint-order: stroke fill;
            animation: queueGoldGlowPulse 2.8s ease-in-out infinite;
        }
        @media (prefers-reduced-motion: reduce) {
            #dj-visual-root #dj-a-queue,
            #dj-visual-root #dj-a-queue:hover,
            #dj-visual-root #dj-a-queue.on,
            #dj-visual-root #dj-b-queue,
            #dj-visual-root #dj-b-queue:hover,
            #dj-visual-root #dj-b-queue.on {
                animation: none;
                -webkit-text-stroke-width: 0.5px;
                -webkit-text-stroke-color: rgba(212, 175, 55, 0.75);
                color: #00edff;
                text-shadow:
                    0 0 10px rgba(0, 235, 255, 1),
                    0 0 22px rgba(0, 210, 255, 0.75),
                    0 0 34px rgba(0, 180, 255, 0.4),
                    0 0 2px rgba(0, 35, 55, 0.95);
            }
        }
        #dj-visual-root #dj-fx-tk,
        #dj-visual-root #dj-b-fx-tk {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/tin.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-fx-tk:hover,
        #dj-visual-root #dj-b-fx-tk:hover,
        #dj-visual-root #dj-fx-tk.on,
        #dj-visual-root #dj-b-fx-tk.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/tin.gif');
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-fx-distort,
        #dj-visual-root #dj-b-fx-distort {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/sta.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-fx-distort:hover,
        #dj-visual-root #dj-b-fx-distort:hover,
        #dj-visual-root #dj-fx-distort.on,
        #dj-visual-root #dj-b-fx-distort.on {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/sta.gif');
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-sfx-w2,
        #dj-visual-root #dj-b-sfx-w2 {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/you.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
        }
        #dj-visual-root #dj-a-sfx-w2:hover,
        #dj-visual-root #dj-b-sfx-w2:hover,
        #dj-visual-root #dj-a-sfx-w2.on,
        #dj-visual-root #dj-b-sfx-w2.on,
        #dj-visual-root #dj-a-sfx-w2.sample-playing,
        #dj-visual-root #dj-b-sfx-w2.sample-playing {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/you.gif');
            background-size: 100% 100%, 100% 100%;
        }
        /* No Visual shortcut: nvi.gif backdrop with btn frame */
        #dj-visual-root #dj-vis-blank,
        #dj-visual-root #dj-b-vis-blank {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/nvi.gif');
            background-position: center, center;
            background-repeat: no-repeat, no-repeat;
            background-size: 100% 100%, 100% 100%;
            background-color: rgba(0, 0, 0, 0.45);
        }
        #dj-visual-root #dj-vis-blank:hover,
        #dj-visual-root #dj-b-vis-blank:hover {
            background-image: url('../assets/images/btn.png'), url('../assets/gifs/nvi.gif');
            background-size: 100% 100%, 100% 100%;
            filter: brightness(1.12);
        }
        #dj-visual-root #dj-vis-blank,
        #dj-visual-root #dj-vis-blank:hover,
        #dj-visual-root #dj-vis-blank.on,
        #dj-visual-root #dj-b-vis-blank,
        #dj-visual-root #dj-b-vis-blank:hover,
        #dj-visual-root #dj-b-vis-blank.on {
            color: #000000;
            text-shadow: 0 0 3px rgba(255, 255, 255, 0.88), 0 1px 2px rgba(255, 255, 255, 0.45);
        }
        /* TK filter: long-press editor — position set in JS at cursor */
        #dj-visual-root .dj-tk-hold-panel {
            position: absolute;
            z-index: 50;
            left: 0;
            top: 0;
            transform: none;
            width: min(268px, 90vw);
            padding: 10px 12px 12px;
            border-radius: 12px;
            border: 1px solid rgba(212, 175, 55, 0.45);
            background: rgba(12, 12, 18, 0.94);
            box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
            pointer-events: auto;
        }
        #dj-visual-root .dj-tk-hold-head {
            font-size: 11px;
            letter-spacing: 0.14em;
            font-weight: 700;
            color: #c9c9d4;
            margin-bottom: 8px;
            text-align: center;
        }
        #dj-visual-root .dj-tk-hold-graph {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 8px;
            margin-bottom: 8px;
            background: rgba(0, 0, 0, 0.35);
        }
        #dj-visual-root .dj-tk-hold-pad {
            position: relative;
            width: 100%;
            aspect-ratio: 5 / 4;
            max-height: 140px;
            border-radius: 10px;
            background: linear-gradient(180deg, rgba(55, 55, 72, 0.55), rgba(18, 18, 26, 0.95));
            border: 1px solid rgba(255, 255, 255, 0.12);
            touch-action: none;
            cursor: crosshair;
        }
        #dj-visual-root .dj-tk-hold-pad::before {
            content: 'Q';
            position: absolute;
            left: 4px;
            top: 50%;
            transform: translateY(-50%) rotate(-90deg);
            font-size: 9px;
            opacity: 0.45;
            pointer-events: none;
        }
        #dj-visual-root .dj-tk-hold-pad::after {
            content: 'Freq';
            position: absolute;
            bottom: 3px;
            right: 6px;
            font-size: 9px;
            opacity: 0.45;
            pointer-events: none;
        }
        #dj-visual-root .dj-tk-hold-dot {
            position: absolute;
            width: 16px;
            height: 16px;
            margin-left: -8px;
            margin-top: -8px;
            border-radius: 50%;
            background: radial-gradient(circle at 32% 28%, #fff, #c9a227);
            box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
            left: 50%;
            top: 50%;
            pointer-events: none;
        }
        #dj-visual-root .dj-tk-hold-readout {
            margin-top: 8px;
            font-size: 11px;
            color: #9ad;
            text-align: center;
        }
        /* DJ crossfader: same vol.png thumb as Mixer / station list theme.
         * The visible rail is drawn on .dj-crossfader-mount::before and inset by
         * half the 56px thumb width, matching the browser's actual thumb-centre
         * travel. That prevents the knob from visually stopping short of the rail
         * ends at 0/1 while keeping this input as the interactive hit target. */
        #dj-visual-root #dj-crossfader {
            -webkit-appearance: none;
            appearance: none;
            height: 14px !important;
            position: relative;
            z-index: 1;
            background: transparent !important;
            box-shadow: none;
            border: none;
        }
        #dj-visual-root #dj-crossfader::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 56px !important;
            height: 56px !important;
            background: transparent url('../assets/images/vol.png') center center / 100% 100% no-repeat !important;
            border: none !important;
            border-radius: 50%;
            margin-top: -21px !important;
            box-shadow: none !important;
        }
        #dj-visual-root #dj-crossfader::-moz-range-thumb {
            width: 56px !important;
            height: 56px !important;
            background: transparent url('../assets/images/vol.png') center center / 100% 100% no-repeat !important;
            border: none !important;
            border-radius: 50%;
            box-shadow: none !important;
        }
        #dj-visual-root #dj-crossfader::-moz-range-progress {
            background: transparent !important;
        }
        .dj-transport-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
        }
        .dj-transport-row .dj-tbtn {
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.25);
            background: rgba(255,255,255,0.07);
            color: #fff;
            font-size: 12px;
            font-weight: 700;
            min-height: 40px;
        }
        .dj-transport-row .dj-tbtn:hover { background: rgba(212,175,55,0.2); border-color: rgba(212,175,55,0.45); }
        .dj-stack { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
        .dj-eq-strip.eq-strip {
            margin-top: 0;
            padding: 6px 8px;
        }
        #dj-visual-root .dj-eq-strip .eq-group { justify-content: space-around; gap: 4px; }
        #dj-visual-root .dj-eq-strip .eq-col { width: 36px; gap: 4px; }
        #dj-visual-root .dj-eq-strip .eq-label { font-size: 8px; line-height: 1.05; }
        #dj-visual-root .dj-eq-strip .knob-wrap {
            width: 51px;
            height: 51px;
        }
        .dj-middle-row {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            justify-content: center;
            gap: clamp(10px, 2vmin, 20px);
            width: 100%;
        }
        .dj-fx-col, .dj-sfx-col {
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: stretch;
            min-width: 100px;
        }
        #dj-visual-root .dj-controls-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            align-items: stretch;
            justify-items: stretch;
            flex: 1 1 220px;
            min-width: 0;
            max-width: none;
        }
        #dj-visual-root .dj-deck-body > .dj-stack > .dj-middle-row:not(.dj-deck-mosaic) .dj-controls-grid {
            max-width: 320px;
        }
        #dj-visual-root .dj-controls-grid .btn.dj-fx,
        #dj-visual-root .dj-controls-grid .btn.dj-sfx,
        #dj-visual-root .dj-btn-block .btn.dj-fx,
        #dj-visual-root .dj-btn-block .btn.dj-sfx,
        #dj-visual-root .dj-beatmap-pads .btn.dj-fx {
            width: 100%;
            /*
             * `min-width: 0` is critical — the browser default `min-width: auto` makes
             * a button at least as wide as its text content ("AUDIO:BAR", "NO VISUAL",
             * etc.). When the deck mosaic is squeezed (splitter drag, narrow window),
             * `minmax(0, 1fr)` cells would otherwise be FORCED open to fit the text,
             * causing buttons to bleed past their cell edges and visually overlap
             * neighbouring buttons. With min-width: 0 the button shrinks with its cell
             * and the JS fitDeckButtonText() pass + ellipsis backstop handle the text.
             */
            min-width: 0;
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1.1;
            min-height: calc(28px * var(--dj-control-scale) * var(--dj-btn-height-mult));
            padding: calc(8px * var(--dj-control-scale)) calc(6px * var(--dj-control-scale));
            /*
             * Labels must REMAIN on a single line and shrink to fit. CSS clamp() gives a
             * base scale and overflow:hidden + text-overflow:ellipsis is the visual
             * backstop; the JS fitDeckButtonText() pass on DjDecksEngine then reduces
             * font-size dynamically whenever scrollWidth > clientWidth (post resize /
             * splitter drag / orientation change) so labels like "AUDIO:BAR" stay
             * legible without wrapping into the next row.
             */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            text-align: center;
        }
        /* Deck A/B right grid: uniform 12px * scale ramp across every grid cell —
         * FX rows, SFX rows (including the RADIO shortcut #dj-?-sfx-wav, which
         * previously fell back to the base 10px * scale rule at line ~2071 and so
         * rendered smaller than its neighbours), Play, and the toggle buttons.
         * Keeping a single rule means all right-grid labels read at the same
         * visual weight. The clamp floor is held at 4px to match the JS
         * fitDeckButtonText() minimum so the auto-fit pass never has to fight a
         * CSS floor higher than its own floor on really narrow decks; the ceiling
         * sits at 14px so the wide-deck size isn't clipped at scale 1.0. */
        #dj-visual-root .dj-controls-grid > .btn.dj-fx,
        #dj-visual-root .dj-controls-grid > .btn.dj-sfx,
        #dj-visual-root .dj-controls-grid > .dj-play,
        #dj-visual-root .dj-controls-grid > .dj-tbtn {
            font-size: clamp(4px, calc(12px * var(--dj-control-scale)), 14px);
            padding: calc(6px * var(--dj-control-scale)) calc(4px * var(--dj-control-scale));
            letter-spacing: 0;
        }
        #dj-visual-root .dj-controls-grid .dj-play,
        #dj-visual-root .dj-controls-grid .dj-tbtn,
        #dj-visual-root .dj-btn-block .dj-play,
        #dj-visual-root .dj-btn-block .dj-tbtn {
            width: 100%;
            box-sizing: border-box;
            /*
             * Override the global `.dj-play` min-width: calc(70px * scale) (set on
             * line ~2046 to keep the standalone Play button a sensible size).
             * Inside the right grid the Play button has to share a 3-column row with
             * Rand and Prev, so a 70px*scale floor caused it to overhang into the
             * next cell on narrow decks. min-width: 0 lets the grid shrink it just
             * like the other right-grid buttons.
             */
            min-width: 0;
        }
        #dj-visual-root .dj-fx-row {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            align-items: stretch;
        }
        #dj-visual-root .dj-fx-row .btn.dj-fx {
            flex: 1 1 0;
            min-width: 72px;
        }
        .dj-sfx-col .btn.dj-sfx {
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1.1;
            min-height: 40px;
            padding: 8px 10px;
            font-size: 14px;
        }
