/* ================================================================
   ZAO MixZ skin
   Loaded after styles.css. A hardware-console look for the main screen:
   each deck is a platter beside its transport under a wide waveform,
   the mixer is two channel faders side by side over the crossfader,
   the next-track switches are eight coloured performance pads.
   Layout only moves existing elements; no ids or behaviour change.
   ================================================================ */

:root {
    --mz-bg: #07080c;
    --mz-panel: #0f1118;
    --mz-panel-hi: #161924;
    --mz-inset: #05060a;
    --mz-line: rgba(255, 255, 255, 0.07);
    --mz-line-hi: rgba(255, 255, 255, 0.14);
    --mz-text: #f1f3f8;
    --mz-muted: #8a90a6;
    --mz-dim: #555b70;
    --mz-a: #00d4ff;
    --mz-a-rgb: 0, 212, 255;
    --mz-b: #ff6b35;
    --mz-b-rgb: 255, 107, 53;
    --mz-play: #2bff9a;
    --mz-cue: #ffc533;
    --mz-sync: #c77dff;
    --mz-jog: 232px;
}

body { background: var(--mz-bg); color: var(--mz-text); }

/* ── Page frame ─────────────────────────────────────────────── */
#dj-app {
    grid-template-rows: none;
    grid-auto-rows: max-content;
    gap: 0;
    background:
        radial-gradient(1200px 520px at 22% -8%, rgba(var(--mz-a-rgb), 0.07), transparent 60%),
        radial-gradient(1200px 520px at 78% -8%, rgba(var(--mz-b-rgb), 0.07), transparent 60%),
        var(--mz-bg);
}

/* ── Top bar ────────────────────────────────────────────────── */
.top-bar {
    height: 58px;
    padding: 0 20px;
    background: linear-gradient(180deg, #12141c, #0b0c12);
    border-bottom: 1px solid var(--mz-line);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.28rem;
    letter-spacing: 0.02em;
    color: var(--mz-text);
    display: flex;
    align-items: baseline;
    gap: 7px;
}
.logo .logo-accent {
    background: linear-gradient(90deg, var(--mz-a), #7cf0ff 45%, var(--mz-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.btn-toolbar {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--mz-line-hi);
    background: linear-gradient(180deg, #1b1e2a, #12141c);
    color: var(--mz-muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}
.btn-toolbar:hover { color: var(--mz-text); border-color: rgba(255, 255, 255, 0.28); }

/* ── Decks row ──────────────────────────────────────────────── */
.decks-row {
    grid-template-columns: minmax(0, 1fr) 228px minmax(0, 1fr);
    gap: 0;
    overflow: visible;
    border-bottom: 1px solid var(--mz-line);
}

.deck {
    display: grid;
    grid-template-columns: var(--mz-jog) minmax(0, 1fr);
    grid-template-areas:
        "head head"
        "over over"
        "wave wave"
        "jog  time"
        "jog  trans";
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: 22px;
    row-gap: 10px;
    padding: 16px 20px 18px;
    background: linear-gradient(180deg, var(--mz-panel), #0b0c12);
    position: relative;
}
.deck-b {
    grid-template-columns: minmax(0, 1fr) var(--mz-jog);
    grid-template-areas:
        "head head"
        "over over"
        "wave wave"
        "time jog"
        "trans jog";
}
.deck::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mz-a), transparent);
    opacity: 0.55;
}
.deck-b::before { background: linear-gradient(90deg, transparent, var(--mz-b), transparent); }
.deck > .pro-only { grid-column: 1 / -1; }

/* Header: badge, title, tempo and key */
.deck-header { grid-area: head; gap: 14px; align-items: center; }
.deck-label {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 11px;
    font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
    color: #05060a;
    background: linear-gradient(145deg, #6fe8ff, var(--mz-a));
    box-shadow: 0 6px 18px rgba(var(--mz-a-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 0;
}
.deck-b .deck-label, .deck-label-b {
    background: linear-gradient(145deg, #ffa27a, var(--mz-b));
    box-shadow: 0 6px 18px rgba(var(--mz-b-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.track-info { min-width: 0; flex: 1; }
.track-title {
    font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; line-height: 1.2;
    color: var(--mz-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-artist { color: var(--mz-muted); font-size: 0.85rem; min-height: 1.1em; }
.track-meta { display: flex; align-items: center; gap: 10px; }
.bpm-display {
    font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
    padding: 7px 12px; border-radius: 9px;
    background: var(--mz-inset); border: 1px solid var(--mz-line-hi);
    color: var(--mz-text); letter-spacing: 0.02em; white-space: nowrap;
}
.key-display {
    font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem;
    padding: 7px 10px; border-radius: 9px; min-width: 38px; text-align: center;
    background: var(--mz-inset); border: 1px solid var(--mz-line-hi); color: var(--mz-muted);
}
.camelot-display { font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem; color: var(--mz-a); }
.deck-b .camelot-display { color: var(--mz-b); }
.deck-header .btn-load, .deck-header [id$="-load"] {
    height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 700; letter-spacing: 0.08em;
}

/* Waveforms: an instrument screen */
.waveform-overview {
    grid-area: over;
    min-height: 34px;
    border-radius: 8px;
    background: var(--mz-inset);
    border: 1px solid var(--mz-line);
}
.waveform-main {
    grid-area: wave;
    min-height: 132px;
    border-radius: 12px;
    border: 1px solid var(--mz-line-hi);
    background:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.5) calc(50% - 1px), rgba(255, 255, 255, 0.5) calc(50% + 1px), transparent calc(50% + 1px)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 48px),
        linear-gradient(180deg, transparent 49.5%, rgba(255, 255, 255, 0.06) 49.5% 50.5%, transparent 50.5%),
        linear-gradient(180deg, #080a10, #05060a);
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.04);
}
.deck-a .waveform-main { box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(var(--mz-a-rgb), 0.08); }
.deck-b .waveform-main { box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(var(--mz-b-rgb), 0.08); }

/* Empty deck: one clear line on the screen */
.deck-drop-hint {
    position: static;
    grid-area: wave;
    z-index: 4;
    align-self: center; justify-self: center;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 16px; border-radius: 10px;
    background: rgba(7, 8, 12, 0.82);
    border: 1px dashed var(--mz-line-hi);
    color: var(--mz-text);
    inset: auto;
}
.deck-drop-hint svg { display: none; }
.deck-drop-hint span { font-size: 0.86rem; font-weight: 600; }
.deck-drop-hint .hint-sub { font-size: 0.74rem; font-weight: 400; color: var(--mz-muted); }
.deck-drop-hint.hint-hidden { display: none; }

/* Platter */
.jog-section { grid-area: jog; padding: 4px 0 0; justify-content: center; }
.jog-nudge { gap: 0; position: relative; }
.jog-wheel {
    width: var(--mz-jog); height: var(--mz-jog);
    border-radius: 50%;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.jog-nudge .nudge-btn {
    position: absolute; bottom: -2px;
    width: 34px; height: 30px; border-radius: 8px;
    background: linear-gradient(180deg, #1b1e2a, #12141c);
    border: 1px solid var(--mz-line-hi); color: var(--mz-muted); font-weight: 700;
}
.jog-nudge .nudge-btn:first-child { left: -6px; }
.jog-nudge .nudge-btn:last-child { right: -6px; }

/* Time readout */
.time-row {
    grid-area: time;
    align-self: start;
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--mz-inset);
    border: 1px solid var(--mz-line);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
    font-family: var(--font-mono);
}
.time-elapsed { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em; color: var(--mz-a); text-shadow: 0 0 18px rgba(var(--mz-a-rgb), 0.35); }
.deck-b .time-elapsed { color: var(--mz-b); text-shadow: 0 0 18px rgba(var(--mz-b-rgb), 0.35); }
.time-remaining { font-size: 1.05rem; font-weight: 600; color: var(--mz-muted); }

/* Transport: three hardware buttons */
.transport-controls {
    grid-area: trans;
    align-self: center;
    display: flex; align-items: center; justify-content: center; gap: 18px;
    padding: 0;
}
.btn-transport {
    height: 62px; min-width: 86px; padding: 0 18px;
    border-radius: 14px;
    font-family: var(--font-display); font-size: 0.86rem; font-weight: 800; letter-spacing: 0.14em;
    color: var(--mz-text);
    background: linear-gradient(180deg, #232737, #151824);
    border: 1px solid var(--mz-line-hi);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -3px 0 rgba(0, 0, 0, 0.35);
    transition: transform 0.08s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}
.btn-transport:active { transform: translateY(2px); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.btn-cue { color: var(--mz-cue); border-color: rgba(255, 197, 51, 0.35); }
.btn-cue:hover { box-shadow: 0 8px 22px rgba(255, 197, 51, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -3px 0 rgba(0, 0, 0, 0.35); }
.btn-sync { color: var(--mz-sync); border-color: rgba(199, 125, 255, 0.35); }
.btn-sync:hover { box-shadow: 0 8px 22px rgba(199, 125, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -3px 0 rgba(0, 0, 0, 0.35); }
.btn-play {
    width: 92px; height: 92px; min-width: 92px; padding: 0;
    border-radius: 50%;
    color: var(--mz-play);
    background: radial-gradient(circle at 35% 28%, #2b3044, #131622 62%);
    border: 2px solid rgba(43, 255, 154, 0.55);
    box-shadow: 0 0 0 6px rgba(43, 255, 154, 0.07), 0 12px 26px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.12);
}
.btn-play svg { width: 30px; height: 30px; }
.btn-play:hover { box-shadow: 0 0 0 8px rgba(43, 255, 154, 0.12), 0 0 34px rgba(43, 255, 154, 0.28), 0 12px 26px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.14); }
.btn-play.playing {
    color: #05060a;
    background: radial-gradient(circle at 35% 28%, #8dffca, var(--mz-play) 62%);
    box-shadow: 0 0 0 8px rgba(43, 255, 154, 0.14), 0 0 44px rgba(43, 255, 154, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

/* ── Mixer ──────────────────────────────────────────────────── */
.mixer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 12px 6px;
    padding: 16px 12px 18px;
    background: linear-gradient(180deg, #0c0d13, #08090d);
    border-left: 1px solid var(--mz-line);
    border-right: 1px solid var(--mz-line);
}
.mixer > .pro-only { grid-column: 1 / -1; }
.channel-strip {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center; justify-items: center; align-items: center;
    column-gap: 10px; row-gap: 8px;
    padding: 10px 6px 12px;
    border-radius: 12px;
    background: var(--mz-panel);
    border: 1px solid var(--mz-line);
}
.channel-strip > * { grid-column: 1 / -1; }
.channel-strip > .level-meter { grid-column: 1; grid-row: 3; }
.channel-strip > .vol-fader { grid-column: 2; grid-row: 3; }
.channel-label {
    font-family: var(--font-display); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.12em;
    width: 26px; height: 22px; display: grid; place-items: center; border-radius: 6px;
    color: #05060a; background: var(--mz-a);
}
#channel-b .channel-label { background: var(--mz-b); }
.level-meter { width: 12px; height: 168px; border-radius: 4px; border: 1px solid var(--mz-line-hi); background: var(--mz-inset); }
.vol-fader {
    width: 168px; height: 8px; margin: 80px -66px;
    border-radius: 4px;
    background: linear-gradient(90deg, #0a0b10, #1b1e2a);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--mz-line);
}
.vol-fader::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 38px; border-radius: 5px; cursor: grab;
    background: linear-gradient(90deg, #d9dce6 0 46%, #05060a 46% 54%, #b9bdca 54%);
    border: 1px solid #05060a;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), -4px 0 10px rgba(0, 0, 0, 0.6);
}
.vol-fader::-moz-range-thumb {
    width: 22px; height: 38px; border-radius: 5px; cursor: grab;
    background: linear-gradient(90deg, #d9dce6 0 46%, #05060a 46% 54%, #b9bdca 54%);
    border: 1px solid #05060a;
}

.crossfader-section {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
    margin: 4px 0 0; padding: 14px 10px 12px;
    border-radius: 12px;
    background: var(--mz-panel);
    border: 1px solid var(--mz-line);
}
.xf-label { font-family: var(--font-display); font-weight: 800; font-size: 0.9rem; }
.xf-endpoint-a .xf-label { color: var(--mz-a); }
.xf-endpoint-b .xf-label { color: var(--mz-b); }
.xf-track-wrap { position: relative; }
.crossfader {
    width: 100%; height: 10px; border-radius: 5px;
    background: linear-gradient(90deg, rgba(var(--mz-a-rgb), 0.55), #1b1e2a 38%, #1b1e2a 62%, rgba(var(--mz-b-rgb), 0.55));
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}
.crossfader::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 30px; height: 40px; border-radius: 6px; cursor: grab;
    background: linear-gradient(90deg, #c9cdd9 0 44%, #05060a 44% 56%, #c9cdd9 56%);
    border: 1px solid #05060a;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 14px rgba(0, 0, 0, 0.7);
}
.crossfader::-moz-range-thumb {
    width: 30px; height: 40px; border-radius: 6px; cursor: grab;
    background: linear-gradient(90deg, #c9cdd9 0 44%, #05060a 44% 56%, #c9cdd9 56%);
    border: 1px solid #05060a;
}
.xf-hint { display: none; }

/* ── Next-track switches: eight performance pads ────────────── */
.switch-pad {
    padding: 14px 20px 14px;
    background: linear-gradient(180deg, #0c0d13, #090a0f);
    border: 0; border-bottom: 1px solid var(--mz-line);
}
.switch-pad-head { margin-bottom: 10px; }
.switch-pad-title { font-family: var(--font-display); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.2em; color: var(--mz-muted); }
.switch-pad-auto { font-size: 0.74rem; color: var(--mz-muted); }
.switch-pad-grid { gap: 10px; }
.switch-btn {
    --pad: 0, 212, 255;
    min-height: 74px;
    padding: 14px 12px 10px 14px;
    gap: 4px;
    border-radius: 12px;
    background: linear-gradient(180deg, #1a1d29, #11131b);
    border: 1px solid rgba(var(--pad), 0.32);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -3px 0 rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.switch-btn::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: rgb(var(--pad)); box-shadow: 0 0 16px rgba(var(--pad), 0.7);
}
.switch-btn:hover, .switch-btn:focus-visible {
    border-color: rgba(var(--pad), 0.8);
    background: linear-gradient(180deg, rgba(var(--pad), 0.16), #11131b);
    box-shadow: 0 8px 24px rgba(var(--pad), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -3px 0 rgba(0, 0, 0, 0.3);
}
.switch-btn:active { transform: translateY(2px) scale(0.99); }
.switch-btn-n {
    position: absolute; right: 10px; left: auto; top: 12px;
    font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
    color: rgba(var(--pad), 0.9);
}
.switch-btn-label { font-family: var(--font-display); font-size: 0.86rem; font-weight: 800; letter-spacing: 0.08em; color: var(--mz-text); }
.switch-btn-hint { font-size: 0.72rem; line-height: 1.25; color: var(--mz-muted); }
.switch-btn.hit { background: rgba(var(--pad), 0.28); border-color: rgb(var(--pad)); }
.switch-btn.miss { background: rgba(255, 80, 80, 0.14); border-color: rgba(255, 80, 80, 0.7); }
#switch-btn-smooth { --pad: 0, 212, 255; }
#switch-btn-up     { --pad: 43, 255, 154; }
#switch-btn-down   { --pad: 96, 165, 250; }
#switch-btn-key    { --pad: 255, 197, 51; }
#switch-btn-mood   { --pad: 199, 125, 255; }
#switch-btn-genre  { --pad: 255, 107, 53; }
#switch-btn-double { --pad: 255, 84, 112; }
#switch-btn-wild   { --pad: 240, 240, 250; }
.switch-pad-say {
    margin-top: 10px; min-height: 22px;
    font-size: 0.82rem; color: var(--mz-muted);
    padding-left: 12px; border-left: 2px solid var(--mz-line-hi);
}

/* ── Library ────────────────────────────────────────────────── */
.library { background: var(--mz-bg); }
.library-header { padding: 12px 20px; border-bottom: 1px solid var(--mz-line); background: #0b0c12; }
.library-tabs { background: var(--mz-inset); border: 1px solid var(--mz-line); border-radius: 10px; padding: 4px; gap: 2px; }
.library-tab { height: 30px; padding: 0 13px; border-radius: 7px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--mz-muted); }
.library-tab.active { background: linear-gradient(180deg, #252a3b, #191c28); color: var(--mz-text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.zao-crate-tab { color: var(--mz-a); }
.library-table thead th { font-size: 0.66rem; letter-spacing: 0.14em; color: var(--mz-dim); padding: 10px 12px; border-bottom: 1px solid var(--mz-line); background: #0b0c12; }
.library-table tbody td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 0.88rem; }
.library-table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.library-table tbody td:first-of-type + td, .lib-title { font-weight: 600; color: var(--mz-text); }
.lib-bpm, .lib-key { font-family: var(--font-mono); color: var(--mz-muted); }

/* ── Narrow screens ─────────────────────────────────────────── */
@media (max-width: 1180px) {
    :root { --mz-jog: 176px; }
    .decks-row { grid-template-columns: minmax(0, 1fr) 204px minmax(0, 1fr); }
    .btn-transport { min-width: 66px; height: 54px; padding: 0 12px; }
    .btn-play { width: 76px; height: 76px; min-width: 76px; }
    .time-elapsed { font-size: 1.5rem; }
    .transport-controls { gap: 10px; }
}
@media (max-width: 900px) {
    :root { --mz-jog: 150px; }
    .decks-row { grid-template-columns: 1fr; grid-template-rows: auto; }
    .mixer { grid-template-columns: 1fr 1fr; border: 0; border-top: 1px solid var(--mz-line); border-bottom: 1px solid var(--mz-line); }
    .channel-strip { flex-direction: unset; }
    .deck, .deck-b { column-gap: 14px; padding: 14px; }
}
@media (max-width: 520px) {
    .deck, .deck-b { grid-template-columns: 1fr; grid-template-areas: "head" "over" "wave" "time" "trans" "jog"; }
    .jog-section { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
    .btn-transport, .switch-btn { transition: none; }
}

/* ── Fit and finish ─────────────────────────────────────────── */
/* The app's own simple/pro rules set the middle column; these win. */
body .decks-row, body:not(.pro-mode) .decks-row { grid-template-columns: minmax(0, 1fr) 244px minmax(0, 1fr) !important; }
body.pro-mode .decks-row { grid-template-columns: minmax(0, 1fr) 304px minmax(0, 1fr) !important; }
.mixer { min-width: 0; overflow: hidden; }
.deck { min-width: 0; }

.channel-strip { min-width: 0; grid-template-rows: auto; }
.channel-strip > .channel-label { grid-row: 1; }
.channel-strip > .pfl-btn { grid-row: 2; width: 100%; height: 26px; border-radius: 7px; letter-spacing: 0.12em; }
.channel-strip > .eq-section { grid-row: 3; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.channel-strip > .level-meter { grid-column: 1; grid-row: 4; }
.channel-strip > .vol-fader { grid-column: 2; grid-row: 4; }

.btn-play { flex: 0 0 auto; aspect-ratio: 1; }
.transport-controls .btn-cue, .transport-controls .btn-sync { flex: 0 0 auto; }

.track-meta { flex-direction: row; align-items: center; flex-wrap: nowrap; }
.key-row { display: flex; align-items: center; gap: 6px; margin: 0; }
.bpm-pulse { display: none; }

/* Top bar when PRO shows every tool */
.top-bar { gap: 8px; overflow-x: auto; scrollbar-width: none; }
.top-bar::-webkit-scrollbar { display: none; }
body.pro-mode .btn-toolbar { height: 30px; padding: 0 10px; font-size: 0.62rem; letter-spacing: 0.08em; }
body.pro-mode .toolbar-select { height: 30px; border-radius: 8px; background: #12141c; border: 1px solid var(--mz-line-hi); color: var(--mz-muted); }

/* PRO rows inside a deck: grouped panels */
.deck > .pro-only {
    padding: 8px 10px; border-radius: 10px;
    background: rgba(255, 255, 255, 0.022); border: 1px solid var(--mz-line);
}
.deck > .grid-toggle-row.pro-only { padding: 0; background: none; border: 0; }
.btn-mini {
    border-radius: 7px; border: 1px solid var(--mz-line-hi);
    background: linear-gradient(180deg, #1b1e2a, #12141c); color: var(--mz-muted);
    font-family: var(--font-mono); font-weight: 700;
}
.btn-mini:hover { color: var(--mz-text); border-color: rgba(255, 255, 255, 0.3); }
.btn-mini.active { color: #05060a; background: var(--mz-a); border-color: var(--mz-a); }
.deck-b .btn-mini.active { background: var(--mz-b); border-color: var(--mz-b); }

/* Hot cue pads: eight colours, like the controller */
.cue-pad {
    --pad: 255, 84, 112;
    height: 40px; border-radius: 9px;
    font-family: var(--font-mono); font-weight: 700; font-size: 0.78rem;
    color: rgba(var(--pad), 0.95);
    background: linear-gradient(180deg, #1a1d29, #11131b);
    border: 1px solid rgba(var(--pad), 0.35);
    box-shadow: inset 0 -3px 0 rgba(var(--pad), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.cue-pad:hover { background: rgba(var(--pad), 0.16); }
.cue-pad.active, .cue-pad.set { color: #05060a; background: rgb(var(--pad)); box-shadow: 0 0 18px rgba(var(--pad), 0.5); }
.cue-pad:nth-of-type(8n+1) { --pad: 255, 84, 112; }
.cue-pad:nth-of-type(8n+2) { --pad: 255, 142, 60; }
.cue-pad:nth-of-type(8n+3) { --pad: 255, 197, 51; }
.cue-pad:nth-of-type(8n+4) { --pad: 43, 255, 154; }
.cue-pad:nth-of-type(8n+5) { --pad: 0, 212, 255; }
.cue-pad:nth-of-type(8n+6) { --pad: 96, 165, 250; }
.cue-pad:nth-of-type(8n+7) { --pad: 199, 125, 255; }
.cue-pad:nth-of-type(8n+8) { --pad: 255, 120, 220; }

.beat-jump-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: calc(var(--mz-jog) + 20px); }
.beat-jump-btns .btn-mini { padding: 3px 5px; font-size: 0.56rem; min-width: 0; }

/* Mixer centre panels in PRO */
.mixer > .pro-only {
    padding: 10px; border-radius: 12px;
    background: var(--mz-panel); border: 1px solid var(--mz-line);
    min-width: 0; overflow: hidden;
}
.hp-label { font-family: var(--font-display); font-weight: 800; font-size: 0.64rem; letter-spacing: 0.18em; color: var(--mz-dim); text-align: left; }
.eq-group { display: grid; grid-template-columns: 26px 1fr 20px; align-items: center; gap: 5px; }
.eq-group label { font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700; color: var(--mz-dim); letter-spacing: 0.06em; }
.eq-knob { width: 100%; min-width: 0; }
.eq-kill-btn { width: 20px; height: 18px; border-radius: 5px; font-size: 0.56rem; padding: 0; }

/* Laptop screens (1366 x 768): keep the library on the first screen */
@media (max-height: 860px) {
    :root { --mz-jog: 176px; }
    .top-bar { height: 50px; }
    .deck { padding: 12px 16px 14px; row-gap: 8px; }
    .deck-label { width: 38px; height: 38px; font-size: 1.1rem; }
    .waveform-main { min-height: 96px; }
    .waveform-overview { min-height: 26px; }
    .time-row { padding: 7px 14px; }
    .time-elapsed { font-size: 1.6rem; }
    .btn-transport { height: 54px; min-width: 76px; }
    .btn-play { width: 78px; height: 78px; min-width: 78px; }
    .level-meter { height: 120px; }
    .vol-fader { width: 120px; margin: 56px -42px; }
    .switch-pad { padding: 10px 16px; }
    .switch-btn { min-height: 58px; padding: 11px 10px 8px 12px; }
    .switch-btn-hint { font-size: 0.68rem; }
    .switch-pad-say { margin-top: 7px; min-height: 18px; }
}

/* Play stays a true circle whatever the row height */
.transport-controls .btn-play { width: 92px !important; height: 92px !important; min-height: 92px; border-radius: 50% !important; }
@media (max-height: 860px), (max-width: 1180px) {
    .transport-controls .btn-play { width: 78px !important; height: 78px !important; min-height: 78px; }
}
/* The mixer's spare room under the crossfader: a quiet brand plate */
.mixer::after {
    content: "ZAO MixZ"; grid-column: 1 / -1; align-self: end; justify-self: center;
    font-family: var(--font-display); font-weight: 800; font-size: 0.62rem; letter-spacing: 0.34em;
    color: var(--mz-dim); opacity: 0.6; padding-top: 4px;
}

/* Nothing may push the console wider than the window (the PRO toolbar did) */
#dj-app { grid-template-columns: minmax(0, 1fr); max-width: 100vw; overflow-x: clip; }
.top-bar, .decks-row, .switch-pad, .library { min-width: 0; max-width: 100%; }

/* ── DJ MixZ, the bot DJ ────────────────────────────────────── */
.djmixz-open { display: inline-flex; align-items: center; gap: 8px; color: var(--mz-text); border-color: rgba(43, 255, 154, 0.45); }
.djmixz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mz-dim); }
.djmixz-open.live .djmixz-dot { background: var(--mz-play); box-shadow: 0 0 12px var(--mz-play); }
.djmixz-pro { font-size: 0.56rem; font-weight: 800; letter-spacing: 0.12em; padding: 2px 5px; border-radius: 4px; color: #05060a; background: linear-gradient(90deg, var(--mz-cue), #ff9d4d); }
.djmixz-panel {
    position: fixed; top: 66px; right: 16px; z-index: 9000;
    width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 84px); overflow-y: auto;
    padding: 18px; border-radius: 16px;
    background: linear-gradient(180deg, #151824, #0d0f16);
    border: 1px solid var(--mz-line-hi);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
    display: flex; flex-direction: column; gap: 10px;
}
.djmixz-panel.hidden { display: none; }
.djmixz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.djmixz-title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--mz-text); }
.djmixz-sub { font-size: 0.82rem; color: var(--mz-muted); margin-top: 2px; }
.djmixz-label { font-family: var(--font-display); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mz-dim); margin-top: 4px; }
.djmixz-select { width: 100%; height: 38px; border-radius: 9px; padding: 0 10px; background: var(--mz-inset); border: 1px solid var(--mz-line-hi); color: var(--mz-text); font-size: 0.86rem; }
.djmixz-artists { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--mz-inset); border: 1px solid var(--mz-line-hi); }
.djmixz-artists[hidden] { display: none; }
.djmixz-artists-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 800; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mz-muted); }
.djmixz-artists-count { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--mz-a); }
.djmixz-artists-picked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.djmixz-artists-hint { font-size: 0.8rem; color: var(--mz-dim); }
.djmixz-pick { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--mz-a); background: rgba(var(--mz-a-rgb), 0.16); color: var(--mz-text); font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.djmixz-pick b { color: var(--mz-a); font-weight: 800; }
.djmixz-artists-search { width: 100%; height: 36px; border-radius: 9px; padding: 0 10px; background: var(--mz-panel); border: 1px solid var(--mz-line-hi); color: var(--mz-text); font-size: 0.86rem; }
.djmixz-artists-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 232px; overflow-y: auto; padding-right: 2px; }
.djmixz-chip { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 10px; text-align: left; cursor: pointer; background: var(--mz-panel); border: 1px solid var(--mz-line); color: var(--mz-text); font-size: 0.84rem; }
.djmixz-chip:hover:not(:disabled) { border-color: var(--mz-line-hi); background: var(--mz-panel-hi); }
.djmixz-chip.on { border-color: var(--mz-a); background: rgba(var(--mz-a-rgb), 0.16); box-shadow: 0 0 0 1px var(--mz-a) inset; }
.djmixz-chip:disabled { opacity: 0.35; cursor: default; }
.djmixz-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.djmixz-chip-n { flex: none; font-size: 0.72rem; color: var(--mz-muted); }
.djmixz-artists-empty { grid-column: 1 / -1; font-size: 0.82rem; color: var(--mz-muted); padding: 8px 2px; }
@media (max-width: 420px) { .djmixz-artists-grid { grid-template-columns: 1fr; } }
.djmixz-moods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.djmixz-mood { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 9px 11px; border-radius: 10px; cursor: pointer; background: var(--mz-inset); border: 1px solid var(--mz-line); color: var(--mz-muted); }
.djmixz-mood b { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--mz-text); }
.djmixz-mood span { font-size: 0.72rem; }
.djmixz-mood:hover { border-color: var(--mz-line-hi); }
.djmixz-mood.active { border-color: var(--mz-play); background: rgba(43, 255, 154, 0.09); }
.djmixz-actions { display: flex; gap: 8px; margin-top: 6px; }
.djmixz-btn { flex: 1; height: 42px; border-radius: 10px; cursor: pointer; font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--mz-text); background: linear-gradient(180deg, #232737, #151824); border: 1px solid var(--mz-line-hi); }
.djmixz-btn:hover { border-color: rgba(255, 255, 255, 0.3); }
.djmixz-go { color: #05060a; background: linear-gradient(180deg, #8dffca, var(--mz-play)); border-color: var(--mz-play); }
.djmixz-go:disabled { opacity: 0.35; cursor: not-allowed; }
.djmixz-say { font-size: 0.84rem; color: var(--mz-muted); padding-left: 10px; border-left: 2px solid var(--mz-line-hi); }
.djmixz-plan { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: set; }
.djmixz-row { counter-increment: set; padding: 8px 10px; border-radius: 10px; background: var(--mz-inset); border: 1px solid var(--mz-line); }
.djmixz-row.now { border-color: var(--mz-play); background: rgba(43, 255, 154, 0.07); }
.djmixz-row.done { opacity: 0.45; }
.djmixz-move { font-size: 0.72rem; color: var(--mz-muted); margin-bottom: 4px; }
.djmixz-move b { color: var(--mz-cue); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }
.djmixz-track { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 10px; align-items: center; }
.djmixz-energy { grid-row: 1 / 3; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--mz-play) var(--e), rgba(255, 255, 255, 0.08) var(--e)); }
.djmixz-name { font-weight: 700; font-size: 0.88rem; color: var(--mz-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.djmixz-name::before { content: counter(set) ". "; color: var(--mz-dim); font-family: var(--font-mono); font-weight: 400; }
.djmixz-meta { font-size: 0.74rem; color: var(--mz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── DJ MixZ live strip: who has the decks, and the handover button ── */
.djmixz-bar {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 8900;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
    max-width: calc(100vw - 32px);
    padding: 10px 12px 10px 18px; border-radius: 14px;
    background: linear-gradient(180deg, #171b28, #0d0f16);
    border: 1px solid rgba(43, 255, 154, 0.5);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7), 0 0 26px rgba(43, 255, 154, 0.14);
}
.djmixz-bar.human { border-color: rgba(255, 197, 51, 0.6); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7), 0 0 26px rgba(255, 197, 51, 0.16); }
.djmixz-bar-who { font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.14em; color: var(--mz-play); }
.djmixz-bar.human .djmixz-bar-who { color: var(--mz-cue); }
.djmixz-bar-next { font-size: 0.84rem; color: var(--mz-muted); max-width: 46ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.djmixz-bar-turn { font-family: var(--font-mono); font-size: 0.74rem; color: var(--mz-text); padding: 3px 8px; border-radius: 6px; background: var(--mz-inset); border: 1px solid var(--mz-line-hi); }
.djmixz-bar-btn {
    height: 38px; padding: 0 16px; border-radius: 10px; cursor: pointer;
    font-family: var(--font-display); font-weight: 800; font-size: 0.74rem; letter-spacing: 0.12em;
    color: #05060a; background: linear-gradient(180deg, #ffd874, var(--mz-cue)); border: 1px solid var(--mz-cue);
}
.djmixz-bar.human .djmixz-bar-btn { background: linear-gradient(180deg, #8dffca, var(--mz-play)); border-color: var(--mz-play); }
.djmixz-bar-btn:focus-visible { outline: 2px solid var(--mz-text); outline-offset: 2px; }
.djmixz-bar-score { font-family: var(--font-mono); font-size: 0.76rem; color: var(--mz-muted); padding: 4px 9px; border-radius: 6px; background: var(--mz-inset); border: 1px solid var(--mz-line-hi); white-space: nowrap; }
.djmixz-bar-score b { color: var(--mz-text); }
.djmixz-bar-vote { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--mz-text); }
.djmixz-bar-btn.vote { height: 32px; padding: 0 12px; color: var(--mz-text); background: linear-gradient(180deg, #232737, #151824); border-color: var(--mz-line-hi); }
.djmixz-bar-btn.vote:hover { border-color: var(--mz-play); }
/* Flow Director: why the next song fits, and other picks to swap in */
.djmixz-bar-why { flex-basis: 100%; text-align: center; font-size: 0.78rem; color: var(--mz-muted); }
.djmixz-bar-btn.swap { height: 30px; padding: 0 10px; max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mz-text); background: linear-gradient(180deg, #232737, #151824); border-color: var(--mz-line-hi); }
.djmixz-bar-btn.swap.better { border-color: var(--mz-play); }
.djmixz-bar-btn.swap:hover { border-color: var(--mz-play); }

/* Cover art on the deck badge */
.deck-label.has-cover {
    width: 58px; height: 58px; border-radius: 12px;
    background-size: cover !important; background-position: center !important;
    color: #fff; font-size: 0.8rem;
    display: grid; place-items: end start; padding: 0 0 3px 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
@media (max-height: 860px) { .deck-label.has-cover { width: 50px; height: 50px; } }
.audius-artwork { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }

/* A dot on the ZAO tab when new uploads have come in */
.zao-crate-tab.has-new::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--mz-play); box-shadow: 0 0 10px var(--mz-play); vertical-align: middle; }

/* DJ MixZ: the one-press SongChainn set */
.djmixz-quick { flex: none; width: 100%; height: 48px; color: #05060a; background: linear-gradient(180deg, #8dffca, var(--mz-play)); border-color: var(--mz-play); font-size: 0.86rem; }
.djmixz-quick-hint { font-size: 0.78rem; color: var(--mz-muted); margin-top: -4px; }

/* ===== PRO, in order: top bar menus ===== */
.tb-menu { position: relative; }
.tb-menu-btn::after { content: ''; display: inline-block; margin-left: 7px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); opacity: 0.6; }
.tb-menu-btn.has-active { color: var(--mz-play); border-color: rgba(43, 255, 154, 0.45); }
.tb-menu.open > .tb-menu-btn { color: var(--mz-text); border-color: var(--mz-line-hi); background: var(--mz-panel-hi); }
.tb-menu-panel {
    display: none; position: fixed; top: 56px; left: 8px; z-index: 400;
    min-width: 260px; padding: 12px; border-radius: 12px;
    background: var(--mz-panel); border: 1px solid var(--mz-line-hi);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.tb-menu.open > .tb-menu-panel { display: flex; flex-direction: column; gap: 8px; }
.tb-menu-title { font-size: 0.58rem; letter-spacing: 0.14em; color: var(--mz-dim); margin-top: 4px; }
.tb-menu-title:first-child { margin-top: 0; }
.tb-menu-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ===== PRO, in order: fold bars on deck and mixer blocks ===== */
.pro-fold {
    grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 6px 10px; margin: 0; border-radius: 8px; cursor: pointer;
    background: transparent; border: 1px solid var(--mz-line); color: var(--mz-muted);
    font-size: 0.58rem; letter-spacing: 0.14em; text-align: left;
}
.pro-fold::after { content: '+'; font-size: 0.8rem; line-height: 1; color: var(--mz-dim); }
.pro-fold.open::after { content: '\2212'; }
.pro-fold:hover, .pro-fold.open { color: var(--mz-text); border-color: var(--mz-line-hi); }
.pro-folded { display: none !important; }
/* The bar already names the block, so its own heading is not repeated under it. */
.pro-fold + .pro-only > .hp-label:first-child { display: none; }

/* ===== TRY A MOVE ===== */
.btn-move { color: var(--mz-cue); border-color: rgba(255, 197, 51, 0.35); }
.move-card {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 450;
    display: flex; align-items: center; gap: 12px; max-width: min(92vw, 720px);
    padding: 10px 12px 10px 14px; border-radius: 999px;
    background: var(--mz-panel); border: 1px solid rgba(255, 197, 51, 0.4);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
.move-card.hidden { display: none; }
.move-tag { font-size: 0.58rem; letter-spacing: 0.16em; color: var(--mz-cue); white-space: nowrap; }
.move-say { font-size: 0.86rem; color: var(--mz-text); }
.move-card.won { border-color: rgba(43, 255, 154, 0.6); box-shadow: 0 0 0 1px rgba(43, 255, 154, 0.25), 0 14px 36px rgba(0, 0, 0, 0.55); }
.move-card.won .move-tag { color: var(--mz-play); }
.move-card .hidden { display: none; }

/* ===== PHONE: run the set from a phone ===== */
.btn-phone { color: var(--mz-a); border-color: rgba(var(--mz-a-rgb), 0.35); }
.btn-phone.active { color: var(--mz-play); border-color: rgba(43, 255, 154, 0.5); }
.remote-panel {
    position: fixed; top: 60px; right: 16px; z-index: 460; width: min(92vw, 300px); max-height: calc(100vh - 80px); overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px;
    background: var(--mz-panel); border: 1px solid var(--mz-line-hi); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.remote-panel.hidden { display: none; }
.remote-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.remote-title { font-size: 0.6rem; letter-spacing: 0.14em; color: var(--mz-muted); }
.remote-qr { display: flex; justify-content: center; min-height: 40px; font-size: 0.74rem; color: var(--mz-muted); }
.remote-qr canvas { border-radius: 8px; max-width: 100%; }
.remote-status { font-size: 0.82rem; color: var(--mz-text); text-align: center; }
.remote-link { font-size: 0.6rem; color: var(--mz-dim); word-break: break-all; user-select: all; text-align: center; }
.remote-requests { display: flex; flex-direction: column; gap: 6px; }
.remote-req-head { font-size: 0.6rem; letter-spacing: 0.14em; color: var(--mz-cue); }
.remote-req { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); }
.remote-req.onair { border-color: rgba(43, 255, 154, 0.6); }
.remote-req.next { border-color: rgba(255, 197, 51, 0.5); }
.remote-req-info { flex: 1 1 160px; min-width: 0; }
.remote-req-info b { display: block; font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-req-info small { display: block; font-size: 0.7rem; color: var(--mz-muted); }
.remote-req-tag { font-size: 0.6rem; letter-spacing: 0.12em; font-weight: 800; color: var(--mz-cue); }
.remote-req.onair .remote-req-tag { color: #2bff9a; }
.remote-phones { display: flex; flex-direction: column; gap: 6px; font-size: 0.78rem; }
.remote-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid rgba(255, 197, 51, 0.5); color: var(--mz-cue); }
.remote-ask span { flex: 1 1 100%; }
.remote-phone { color: var(--mz-play); }
.remote-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.remote-note { margin: 0; font-size: 0.66rem; line-height: 1.45; color: var(--mz-dim); }

/* ===== INSTALL ===== */
.btn-install { color: var(--mz-play); border-color: rgba(43, 255, 154, 0.4); }
.btn-install.hidden { display: none; }
.install-sheet {
    position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 470; width: min(92vw, 360px);
    display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px;
    background: var(--mz-panel); border: 1px solid rgba(43, 255, 154, 0.4); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.install-sheet.hidden { display: none; }
.install-title { font-weight: 700; color: var(--mz-text); }
.install-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; line-height: 1.4; color: var(--mz-muted); }
.install-sheet button { align-self: flex-end; }

/* ══════════════════════════════════════════════════════════════
   Stream ready (14 Oct 2026): the title first, the library as a button,
   and a NOW PLAYING strip for whoever is watching.
   ══════════════════════════════════════════════════════════════ */

/* ── The title is the most important thing on the deck ── */
.track-title {
    font-size: 1.45rem; line-height: 1.12; letter-spacing: -0.012em; color: #ffffff;
    white-space: normal; text-overflow: clip;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.track-artist { font-size: 0.9rem; margin-top: 3px; }
.deck-header { align-items: flex-start; }
.track-meta { flex: none; }
.deck.on-air .track-title { color: var(--mz-play); text-shadow: 0 0 22px rgba(43, 255, 154, 0.35); }
.deck.on-air .track-info::before {
    content: 'ON AIR'; display: inline-block; margin-bottom: 4px;
    font-family: var(--font-display); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.22em;
    color: #05060a; background: var(--mz-play); border-radius: 4px; padding: 2px 6px;
    box-shadow: 0 0 14px rgba(43, 255, 154, 0.5);
}
@media (max-height: 860px) { .track-title { font-size: 1.28rem; } }

/* ── NOW PLAYING strip under the top bar ── */
.now-playing {
    display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 8px 20px;
    background: linear-gradient(90deg, rgba(43, 255, 154, 0.09), rgba(43, 255, 154, 0) 55%), #0b0c12;
    border-bottom: 1px solid var(--mz-line);
}
.now-playing.hidden { display: none; }
.now-playing.deck-b-live { background: linear-gradient(90deg, rgba(var(--mz-b-rgb), 0.12), rgba(var(--mz-b-rgb), 0) 55%), #0b0c12; }
.np-art { width: 48px; height: 48px; border-radius: 9px; background: var(--mz-panel-hi) center / cover no-repeat; flex: none; border: 1px solid var(--mz-line); }
.np-text { min-width: 0; flex: 1; }
.np-label { font-family: var(--font-display); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.24em; color: var(--mz-play); }
.now-playing.deck-b-live .np-label { color: var(--mz-b); }
.np-title { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.15; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: var(--mz-muted); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-pills { display: flex; gap: 6px; flex: none; }
.np-pill { font-family: var(--font-mono); font-size: 0.74rem; padding: 5px 9px; border: 1px solid var(--mz-line-hi); border-radius: 7px; color: var(--mz-muted); background: var(--mz-inset); }
.np-pill:empty { display: none; }
.np-link, .np-share {
    flex: none; height: 34px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center;
    font-family: var(--font-display); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-decoration: none; cursor: pointer;
    background: linear-gradient(180deg, #1b1e2a, #12141c); border: 1px solid var(--mz-line-hi); color: var(--mz-muted);
}
.np-link { color: var(--mz-a); border-color: rgba(var(--mz-a-rgb), 0.35); }
.np-link.hidden { display: none; }
.np-share { color: var(--mz-play); border-color: rgba(43, 255, 154, 0.4); }
.np-share:hover, .np-link:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
@media (max-width: 1180px) { .np-pills { display: none; } .np-title { font-size: 1.25rem; } }

/* ── LIBRARY button: the library over the decks, full height ── */
.btn-library { color: var(--mz-cue); border-color: rgba(255, 197, 51, 0.35); }
.btn-library.active, body.lib-open .btn-library { color: #05060a; background: linear-gradient(180deg, #ffd766, var(--mz-cue)); border-color: transparent; }
.lib-sheet-bar { display: none; }
body.lib-open .bottom-row {
    position: fixed; top: 58px; left: 0; right: 0; bottom: 0; z-index: 90;
    max-height: none; min-height: 0; grid-template-rows: auto minmax(0, 1fr);
    background: var(--mz-bg); border-top: 1px solid var(--mz-line-hi); box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.7);
}
body.lib-open .lib-sheet-bar {
    display: flex; align-items: center; gap: 14px; grid-column: 1 / -1; grid-row: 1;
    padding: 8px 20px; background: #0b0c12; border-bottom: 1px solid var(--mz-line);
}
.lib-sheet-title { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.16em; font-size: 0.78rem; color: var(--mz-cue); }
.lib-sheet-hint { flex: 1; color: var(--mz-dim); font-size: 0.78rem; }
body.lib-open .bottom-row > .library, body.lib-open .bottom-row > .playlists-sidebar, body.lib-open .bottom-row > .setlist-panel { grid-row: 2; min-height: 0; overflow: auto; }
body.lib-open .library-resize-handle { display: none; }
body.lib-open .library { max-height: none; }
@media (max-height: 860px) { body.lib-open .bottom-row { top: 50px; } }

/* ── TEST: what to try this round, and feedback, in the app ── */
.btn-test { color: var(--mz-sync); border-color: rgba(199, 125, 255, 0.4); }
.btn-test.has-bad { color: var(--mz-b); border-color: rgba(var(--mz-b-rgb), 0.5); }
.test-panel {
    position: fixed; top: 64px; right: 16px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 80px); z-index: 120;
    display: flex; flex-direction: column; background: var(--mz-panel); border: 1px solid rgba(199, 125, 255, 0.35); border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7); overflow: hidden;
}
.test-panel.hidden { display: none; }
.test-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--mz-line); background: #0b0c12; }
.test-head > div { flex: 1; }
.test-title { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--mz-text); }
.test-sub { color: var(--mz-muted); font-size: 0.8rem; margin-top: 3px; line-height: 1.4; }
.test-list { overflow: auto; padding: 6px 16px; }
.test-group { font-family: var(--font-display); font-size: 0.62rem; letter-spacing: 0.2em; color: var(--mz-sync); font-weight: 800; padding: 12px 0 4px; }
.test-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--mz-line); align-items: center; }
.test-text { font-size: 0.86rem; line-height: 1.35; color: var(--mz-text); }
.test-row.is-ok .test-text { color: var(--mz-muted); }
.test-row.is-bad .test-text { color: var(--mz-b); }
.test-marks { display: flex; gap: 6px; }
.test-mark { height: 32px; min-width: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--mz-line-hi); background: var(--mz-inset); color: var(--mz-muted); font-family: var(--font-display); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; }
.test-mark.ok.on { background: var(--mz-play); color: #05060a; border-color: transparent; }
.test-mark.bad.on { background: var(--mz-b); color: #05060a; border-color: transparent; }
.test-note { grid-column: 1 / -1; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--mz-line); background: var(--mz-inset); color: var(--mz-text); font: inherit; font-size: 0.8rem; }
.test-note::placeholder { color: var(--mz-dim); }
.test-extra { margin: 8px 16px 0; min-height: 70px; padding: 10px; border-radius: 10px; border: 1px solid var(--mz-line); background: var(--mz-inset); color: var(--mz-text); font: inherit; font-size: 0.84rem; resize: vertical; }
.test-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; }
.test-send { color: var(--mz-sync); border-color: rgba(199, 125, 255, 0.5); }
.test-say { padding: 0 16px 12px; color: var(--mz-muted); font-size: 0.8rem; min-height: 1.2em; }
@media (max-width: 700px) { .test-panel { left: 8px; right: 8px; width: auto; top: 56px; } }

/* ── Auto play if silent (DeadAir) ── */
.deadair-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 8px 0 4px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--mz-line-hi); background: var(--mz-inset); color: var(--mz-muted); font: inherit; font-size: 0.82rem; cursor: pointer; text-align: left; }
.deadair-toggle b { font-family: var(--font-display); font-size: 0.66rem; letter-spacing: 0.14em; color: var(--mz-dim); }
.deadair-toggle.on { border-color: rgba(43, 255, 154, 0.45); color: var(--mz-text); }
.deadair-toggle.on b { color: var(--mz-play); }

/* ── SIMPLE / PRO switch ────────────────────────────────────── */
/* One control, always in the same place beside the name, showing both views and which is on.
   It was a dim PRO button that scrolled off the end of the PRO toolbar. */
.top-bar .logo { order: -2; flex: 0 0 auto; }
.top-bar .toolbar-group:has(#pro-mode-toggle) { order: -1; flex: 0 0 auto; position: sticky; left: 0; z-index: 2; }
#pro-mode-toggle {
    height: 34px; padding: 3px; gap: 0;
    display: inline-flex; align-items: stretch;
    border-radius: 9px; border: 1px solid var(--mz-line-hi);
    background: var(--mz-inset);
    font-family: var(--font-display); font-weight: 800; font-size: 0.68rem; letter-spacing: 0.12em;
    opacity: 1;
}
#pro-mode-toggle svg { display: none; }
#pro-mode-toggle::before, #pro-mode-toggle .pro-btn-label {
    display: grid; place-items: center; padding: 0 13px; border-radius: 6px;
    color: var(--mz-muted); transition: background 0.15s, color 0.15s;
}
#pro-mode-toggle::before { content: "SIMPLE"; }
body:not(.pro-mode) #pro-mode-toggle::before { color: #05060a; background: linear-gradient(180deg, #6fe8ff, var(--mz-a)); }
body.pro-mode #pro-mode-toggle .pro-btn-label { color: #05060a; background: linear-gradient(180deg, #ffd874, var(--mz-cue)); }
#pro-mode-toggle:hover { border-color: rgba(255, 255, 255, 0.3); }
#pro-mode-toggle:focus-visible { outline: 2px solid var(--mz-a); outline-offset: 2px; }
body.pro-mode #pro-mode-toggle { height: 34px; padding: 3px; }



/* A track refused for having no licence: the deck says so for a few seconds. */
.licence-refused { color: #ff5a5a !important; font-weight: 700; letter-spacing: 0.04em; }

/* BATTLES tab: last night's WaveWarZ quick battle songs, and the night picker beside it. */
.battle-night { margin-left: 4px; max-width: 150px; font-size: 11px; background: transparent; color: inherit; border: 1px solid rgba(255,255,255,0.18); border-radius: 4px; padding: 2px 4px; }
.battle-night option { color: #111; }

/* The ? panel links to how.html, the one-page guide to MixZ. */
.how-link { display: block; margin: 0 0 12px; padding: 8px 10px; border: 1px solid rgba(255,176,32,0.5); border-radius: 6px; color: #ffb020; text-decoration: none; font-size: 13px; }
.how-link:hover { background: rgba(255,176,32,0.08); }

/* FEEDBACK in the top bar: a link styled as a toolbar button, opens /feedback. */
.btn-feedback { text-decoration: none; display: inline-flex; align-items: center; }

/* ZM: the ZAO Music community link in the top bar. */
.btn-zm { color: #ffb020; border-color: rgba(255,176,32,0.6); }

/* Ask before MIDI: the note shown before the browser's MIDI prompt (MidiAsk.js). */
.midi-ask { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.midi-ask-card { max-width: 420px; background: #161a22; color: #e8eaf0; border: 1px solid #2a3140; border-radius: 10px; padding: 18px 20px; font-size: 14px; line-height: 1.5; }
.midi-ask-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; color: #ffb020; }
.midi-ask-later { color: #9aa3b5; font-size: 13px; }
.midi-ask-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.midi-ask-yes { border-color: #ffb020 !important; color: #ffb020 !important; }
.midi-connect { border-color: rgba(255,176,32,0.6); color: #ffb020; }

/* Settings: the DJ's on/off switches (Settings.js DJ_SETTINGS) */
.dj-setting { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--mz-line-hi); cursor: pointer; }
.dj-setting:first-of-type { border-top: 0; }
.dj-setting-text { display: flex; flex-direction: column; gap: 3px; }
.dj-setting-text b { font-size: 0.82rem; color: var(--mz-text); }
.dj-setting-text small { font-size: 0.72rem; color: var(--mz-muted); line-height: 1.35; }
.dj-setting-text .dj-setting-default { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em; }
.dj-setting-switch { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--mz-play); cursor: pointer; }
.dj-setting-words .dj-setting-text { width: 100%; }
.dj-setting-words textarea { width: 100%; margin-top: 6px; resize: vertical; font-family: var(--font-mono); font-size: 0.74rem; color: var(--mz-text); background: var(--mz-inset); border: 1px solid var(--mz-line-hi); border-radius: 8px; padding: 6px 8px; }

/* Host a lobby (Settings) */
.dj-lobby-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dj-lobby-row input { flex: 1; min-width: 0; background: var(--bg-dark, #0b0d12); color: inherit; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 6px 8px; font: inherit; }
.dj-lobby-row button { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 6px 12px; font: inherit; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.dj-lobby-link { word-break: break-all; }

/* Agent drafts and receipts (AgentQueue.js) */
.agents-panel { position: fixed; top: 64px; right: 16px; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; z-index: 900; background: #0f1118; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 12px; color: #f1f3f8; }
.agents-panel.hidden { display: none; }
.agent-queue-title { font-size: .72rem; letter-spacing: .1em; color: #8a90a6; margin: 8px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.agent-drafts, .agent-receipts { list-style: none; margin: 0; padding: 0; }
.agent-draft { border-top: 1px solid rgba(255,255,255,.1); padding: 8px 0; }
.agent-draft textarea { width: 100%; min-height: 54px; margin: 6px 0; background: #07080c; color: inherit; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 6px; font: inherit; }
.agent-draft-row { display: flex; gap: 8px; }
.agents-panel button { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 4px 10px; font: inherit; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
.agent-receipt { font-size: .8rem; padding: 4px 0; border-top: 1px solid rgba(255,255,255,.06); }
.agent-empty { color: #8a90a6; font-size: .85rem; padding: 6px 0; }

/* Flow Mode: HIDE keeps the set playing; the pill brings the screen back */
.flow-header-btns { display: flex; gap: 8px; }
.flow-show-pill { position: fixed; left: 16px; bottom: 16px; z-index: 9000; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--mz-a); background: rgba(var(--mz-a-rgb), 0.18); color: var(--mz-text); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.12em; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.flow-show-pill[hidden] { display: none; }
.flow-show-pill::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2ee59d; margin-right: 8px; vertical-align: middle; box-shadow: 0 0 8px #2ee59d; }

/* DJ MixZ party FX pad */
.djmixz-fx { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.djmixz-fx button { height: 38px; border-radius: 9px; border: 1px solid var(--mz-line-hi); background: var(--mz-inset); color: var(--mz-text); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; cursor: pointer; }
.djmixz-fx button:hover { border-color: #f5a623; color: #ffd27a; }
.djmixz-fx button:active { transform: scale(0.97); background: rgba(245, 166, 35, 0.18); }
.djmixz-fx button[data-fx="rewind"] { border-color: #ff3b5c; color: #ff8fa3; }
.djmixz-artists-head { gap: 10px; }
.djmixz-artists-count { margin-left: auto; }
.djmixz-artists-tools { display: flex; gap: 6px; }
.djmixz-artists-tools button { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--mz-line-hi); background: var(--mz-panel); color: var(--mz-text); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; }
.djmixz-artists-tools button:hover { border-color: var(--mz-a); color: var(--mz-a); }

/* FX board: the DJ's samples on pads, in manual and DJ MixZ mode alike */
.btn-fxboard { border-color: #f5a623 !important; color: #ffd27a !important; }
.fxboard { position: fixed; right: 12px; top: 64px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; z-index: 60; background: var(--mz-panel, #121419); border: 1px solid var(--mz-line-hi, #2a2f3a); border-radius: 14px; padding: 12px 14px 16px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.fxboard.hidden { display: none; }
.fxboard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fxboard-head > div { flex: 1; }
.fxboard-title { font-weight: 900; letter-spacing: .12em; font-size: .85rem; color: #ffd27a; }
.fxboard-sub { font-size: .72rem; color: var(--mz-dim, #8a93a6); }
.fxboard-label { font-size: .68rem; letter-spacing: .14em; color: var(--mz-dim, #8a93a6); margin: 10px 0 6px; font-weight: 800; }
.fxboard-pads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fxboard-pads button { min-height: 44px; padding: 4px 6px; border-radius: 9px; border: 1px solid var(--mz-line-hi, #2a2f3a); background: var(--mz-inset, #0c0e12); color: var(--mz-text, #e8ecf4); font-weight: 800; font-size: .66rem; letter-spacing: .06em; line-height: 1.15; cursor: pointer; white-space: normal; }
.fxboard-horn .fxboard-pads button { border-color: #f5a623; color: #ffd27a; }
.fxboard-vocal .fxboard-pads button { border-color: #3ddc84; color: #9df2c0; }
.fxboard-fx .fxboard-pads button { border-color: #4da3ff; color: #a9d2ff; }
.fxboard-pads button:hover { filter: brightness(1.25); }
.fxboard-pads button:active, .fxboard-pads button.hit { transform: scale(0.96); background: rgba(245, 166, 35, 0.22); }
.fxboard-empty { font-size: .78rem; color: var(--mz-dim, #8a93a6); padding: 8px 0; }
.djmixz-fx .djmixz-fx-board { grid-column: 1 / -1; border-color: #f5a623; color: #ffd27a; }
@media (max-width: 640px) { .fxboard { right: 8px; left: 8px; width: auto; top: 56px; } .fxboard-pads { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* DJ MixZ session countdown */
.djmixz-clock { font-variant-numeric: tabular-nums; font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: #ffd27a; margin-left: 6px; }
.djmixz-bar-clock { font-variant-numeric: tabular-nums; font-weight: 800; color: #ffd27a; margin: 0 10px; white-space: nowrap; }

/* The eight next-track switches, small, in the top bar beside SIMPLE | PRO. SIMPLE view only:
   PRO has the full pad under the decks. */
.top-bar .switch-mini { order: -1; flex: 0 0 auto; display: none; gap: 4px; align-items: center; }
body:not(.pro-mode) .top-bar .switch-mini { display: flex; }
.switch-mini-btn {
    height: 26px; padding: 0 8px; border-radius: 6px;
    border: 1px solid var(--mz-line-hi); background: var(--mz-inset); color: var(--mz-muted);
    font-family: var(--font-display); font-weight: 800; font-size: 0.56rem; letter-spacing: 0.06em; white-space: nowrap;
    cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.switch-mini-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.switch-mini-btn:focus-visible { outline: 2px solid var(--mz-a); outline-offset: 2px; }
.switch-mini-btn.hit { color: #05060a; background: var(--mz-a); border-color: var(--mz-a); }
.switch-mini-btn.miss { border-color: #ff5a5a; color: #ff5a5a; }
@media (max-width: 900px) { body:not(.pro-mode) .top-bar .switch-mini { display: none; } }
