:root {
    color-scheme: dark;
    font-family: system-ui, sans-serif;
    background: #09151f;
    color: #f2e7d4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: auto; padding: 1rem; max-width: 76rem; }
a { color: #9ad5d3; }
h1 { margin: .3rem 0; }
h2, h3 { margin: 0 0 .65rem; }
#show, .decks { display: grid; gap: .85rem; }
#show { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
#show > :is(#voice-panel, #phone-mic, #playback-panel, #music-panel) { grid-column: 1 / -1; }
.card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #385060;
    border-radius: .7rem;
    background: #142632;
}
#venue-card { margin-bottom: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .5rem; }
button, input, select {
    font: inherit;
    min-height: 44px;
    max-width: 100%;
    color: inherit;
    background: #213847;
    border: 1px solid #55707d;
    border-radius: .35rem;
    padding: .35rem .65rem;
}
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
    outline: 3px solid #e8c58e;
    outline-offset: 2px;
}
.primary { background: #e8c58e; color: #09151f; }
ol { list-style: none; margin: 0; padding: 0; }
li { padding: .65rem; border-radius: .35rem; overflow-wrap: anywhere; }
li:nth-child(2n+1), .deck { background: #1b313f; }
li[draggable] { cursor: grab; }
#playback { overflow-wrap: anywhere; }
#playback strong { display: block; }
.decks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deck { padding: .75rem; border-radius: .4rem; overflow-wrap: anywhere; }
.fader { display: grid; grid-template-columns: 1fr 1fr; margin-block: .8rem; }
.fader label, .fader input { grid-column: 1 / -1; }
.fader span:last-child { justify-self: end; }
#pairing { margin-top: .8rem; }
#pairing label { display: block; }
@media (max-width: 650px) {
    #show, .decks { grid-template-columns: minmax(0, 1fr); }
    select { width: 100%; }
}

button {
    border: 0;
    background: #284353;
}
button:enabled:hover { background: #345569; }
button:enabled:active { background: #1d3443; }
button.primary, .singer-states button[aria-pressed="true"] {
    background: #e8c58e;
    color: #09151f;
}
button.primary:enabled:hover, .singer-states button[aria-pressed="true"]:hover {
    background: #f2d5a8;
}
.display-settings { margin-block: .75rem; }
.display-settings summary { cursor: pointer; }
.display-limits { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .5rem; }
.display-limits label { display: flex; align-items: center; gap: .5rem; }
.display-limits input { width: 4.5rem; }
.singer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .6rem; }
.singer-states { display: flex; flex-wrap: wrap; gap: .25rem; }
.singer-states button { padding-inline: .5rem; font-size: .875rem; }
.forward-button, .move-button { min-width: 44px; width: 44px; padding: 0; display: inline-grid; place-items: center; }
.forward-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#forward-song {
    width: min(26rem, calc(100% - 2rem));
    border: 0;
    border-radius: .7rem;
    background: #142632;
    color: inherit;
    padding: 1rem;
}
#forward-song::backdrop { background: #09151fc9; }
#forward-song p { overflow-wrap: anywhere; }
#forward-song select { display: block; width: 100%; margin-block: .35rem; }

.move-button { font-size: 1.25rem; line-height: 1; }
@media (max-width: 400px) {
    :is(#queue, #playlist, #playlist-b) .actions { gap: 3px; flex-wrap: nowrap; }
    :is(#queue, #playlist, #playlist-b) .actions button:not(.move-button, .forward-button) {
        font-size: .8125rem;
        padding-inline: .375rem;
    }
}

@media (min-width: 1120px) {
    :root {
        background: #101b27;
        color: #e8eef5;
    }
    body { max-width: 120rem; padding: .65rem; }
    body > header {
        display: flex;
        align-items: baseline;
        gap: 1rem;
        padding: .45rem .75rem;
        background: #162531;
        border-radius: .4rem;
    }
    body > header a { font-size: .875rem; }
    h1 { margin: 0; font-size: 1.15rem; }
    #status { margin: .4rem .75rem; font-size: .875rem; }
    #venue-card {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: .45rem .75rem;
        margin-bottom: .55rem;
    }
    #venue-card > :is(h2, p, .actions, .display-settings) { margin: 0; }
    #venue-card #pairing { flex-basis: 100%; }
    #show {
        grid-template-columns: minmax(13.5rem, 1fr) minmax(17rem, 1.22fr) minmax(27rem, 1.85fr);
        grid-template-rows: auto auto 1fr auto;
        gap: .55rem;
        align-items: stretch;
    }
    #show > #phone-mic { grid-area: 4 / 1 / 5 / 3; }
    #show > #singers-panel { grid-area: 2 / 1 / 4 / 2; }
    #show > #queue-panel { grid-area: 2 / 2 / 4 / 3; }
    #show > #playback-panel { grid-area: 2 / 3 / 3 / 4; }
    #show > #music-panel { grid-area: 3 / 3 / 5 / 4; }
    .card {
        background: #162531;
        border: 0;
        border-radius: .45rem;
        padding: .65rem;
    }
    .card > h2 {
        font-size: 1.075rem;
        margin-bottom: .55rem;
    }
    #show .actions { gap: .3rem; margin-block: .35rem; }
    #show button, #venue-card button, #venue-card select {
        min-height: 36px;
        font-size: .875rem;
    }
    #show .move-button { font-size: 1.15rem; }
    #show :is(.forward-button, .move-button) { width: 36px; min-width: 36px; }
    #show li { padding: .45rem; }
    #add-singer input, #song-search input { flex: 1 1 8rem; min-width: 0; }
    #playback-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-content: start;
        gap: .45rem;
    }
    #playback-panel h2 { grid-column: 1 / -1; }
    #playback, #show #transport {
        background: #1e2e3d;
        border-radius: .35rem;
        padding: .7rem;
        margin: 0;
    }
    #playback { grid-column: 2; text-align: center; }
    #playback strong:first-child { font-size: 1.45rem; }
    #playback small { display: block; margin-top: .3rem; color: #b1bfcc; }
    #show #transport { grid-column: 1; grid-row: 2; align-content: start; }
    #transport > button:first-child { flex-basis: 100%; }
    #music-panel { display: flex; flex-direction: column; }
    #music-panel > h2 { order: -2; }
    #music-panel > .fader { order: -1; margin: 0 0 .4rem; }
    #fader { accent-color: #e8c58e; }
    .deck { background: #1e2e3d; }
    .deck[data-playing="true"][data-deck="A"] { background: #494537; }
    .deck[data-playing="true"][data-deck="B"] { background: #1c4548; }
    .deck h3 { font-size: .875rem; color: #e8c58e; }
    .deck[data-deck="B"] h3 { color: #79d2c7; }
    .deck p { margin: .45rem 0; }
    #playlist-heading, #playlist-b-heading { margin-top: .65rem; font-size: .95rem; }
}

@media (max-width: 650px) {
    body { padding: .75rem; }
    .card { padding: .8rem; }
    #add-singer input, #song-search input { flex: 1 1 8rem; min-width: 0; }
}

@media (min-width: 1120px) {
    #show {
        height: max(39rem, calc(100dvh - 9rem));
        grid-template-rows: auto minmax(0, 1fr) auto;
    }
    #show > .card { overflow: auto; min-height: 0; }
    #phone-mic p { margin: .3rem 0 .45rem; }
    :is(#playlist, #playlist-b) > li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: .25rem .65rem;
    }
}

@media (min-width: 1120px) {
    #show > #voice-panel { grid-area: 1 / 1 / 2 / -1; }
}
#voice-panel p { margin-block: .5rem; overflow-wrap: anywhere; }
#voice-status:empty { display: none; }
#voice-text { flex: 1 1 16rem; min-width: 0; }
#voice-choices { display: grid; gap: .4rem; max-width: 38rem; }
#voice-choices select { min-width: 0; width: 100%; }
