/* Laulunäytteen yhteinen konserttitausta */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    font-family: Arial, Helvetica, sans-serif;
    color: #f4f5f8;

    background:
        linear-gradient(
            rgba(5, 7, 15, 0.76),
            rgba(5, 7, 15, 0.84)
        ),
        url("../images/taustakuva.jpg") center center / cover fixed;

    background-color: #080a12;
}

main,
.page-container {
    max-width: 1100px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    color: #ffffff;
}

a {
    color: #9bcaff;
    text-decoration: none;
}

a:hover {
    color: #d0e5ff;
    text-decoration: underline;
}

section,
.contestant {
    margin: 20px 0;
    padding: 20px;
    background: rgba(19, 23, 35, 0.88);
    border: 1px solid rgba(150, 170, 210, 0.28);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(5px);
}

.song {
    margin: 12px 0;
    padding: 14px;
    background: rgba(43, 49, 65, 0.88);
    border-radius: 8px;
}

.history {
    margin-top: 14px;
    padding: 14px;
    background: rgba(25, 30, 43, 0.92);
    border: 1px solid rgba(150, 170, 210, 0.25);
    border-radius: 8px;
}

.history-entry {
    padding: 12px 0;
    border-bottom: 1px solid rgba(180, 190, 210, 0.22);
}

.history-entry:last-child {
    border-bottom: none;
}

.history-old,
.muted {
    color: #c1c7d3;
}

.history-new {
    color: #a8e6b0;
}

button {
    padding: 10px 16px;
    margin: 5px 5px 5px 0;
    color: #ffffff;
    background: #315b96;
    border: 1px solid #547fba;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background: #4275b8;
}

hr {
    border: 0;
    border-top: 1px solid rgba(180, 190, 210, 0.25);
    margin: 22px 0;
}

@media (max-width: 600px) {
    body {
        padding: 14px;
        background-attachment: scroll;
    }

    section,
    .contestant {
        padding: 14px;
    }
}


/* Lomakekentät */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    max-width: 100%;
    padding: 11px 12px;
    border: 1px solid #59647a;
    border-radius: 7px;
    background: rgba(12, 16, 27, 0.94);
    color: #fff;
    font: inherit;
    font-size: 16px;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #8ba9e8;
    outline-offset: 2px;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #7898d5;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

small {
    color: #c1c7d3;
}

.page-narrow {
    width: 100%;
    max-width: 680px;
    margin: 35px auto;
    padding: 30px;
}

.brand {
    color: #c0c9dc;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.description,
.details {
    color: #d0d8e8;
    line-height: 1.7;
}

.description {
    white-space: pre-line;
}

.status,
.song-card,
.privacy,
.notice {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(150, 170, 210, 0.28);
    border-radius: 9px;
    background: rgba(35, 43, 61, 0.88);
    line-height: 1.6;
}

.status.open {
    border-left: 4px solid #36b879;
}

.status.closed,
.status.not_started {
    border-left: 4px solid #d6a84c;
}

.song-card {
    margin: 22px 0;
    padding: 18px;
}

.song-card h3 {
    margin-top: 0;
}

.field {
    margin-top: 18px;
}

.song-help,
.privacy,
.notice,
.edit-info {
    color: #c1c7d3;
    line-height: 1.6;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    line-height: 1.5;
}

.consent input {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    margin: 1px 0 0;
}

.messages {
    margin-top: 20px;
    padding: 14px;
    border-radius: 7px;
    background: rgba(100, 40, 45, 0.9);
    color: #ffdada;
    line-height: 1.6;
}

.messages.success {
    background: rgba(32, 75, 55, 0.92);
    color: #c8f5dc;
}

.messages ul {
    margin: 0;
    padding-left: 20px;
}

.success {
    color: #65d69b;
    font-size: 42px;
}

.edit-link {
    display: inline-block;
    margin: 14px 0;
    padding: 13px 22px;
    border-radius: 8px;
    background: #315b96;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.edit-link:hover {
    background: #4275b8;
}

footer {
    margin-top: 35px;
    color: #c1c7d3;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 600px) {
    .page-narrow {
        margin: 10px auto;
        padding: 22px 18px;
    }
}


/* Kirjautumisen ja äänitystestin paneelit */
.panel {
    width: 100%;
    max-width: 520px;
    margin: 35px auto;
    padding: 24px;
    background: rgba(19, 23, 35, 0.90);
    border: 1px solid rgba(150, 170, 210, 0.32);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
}

.timer {
    margin: 20px 0;
    text-align: center;
    font-size: 38px;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}

.buttons {
    display: flex;
    gap: 10px;
}

.buttons button {
    flex: 1;
    min-height: 52px;
    margin: 0;
    border: 0;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.buttons button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#startButton,
#startButton:hover {
    background: #168447;
}

#stopButton,
#stopButton:hover {
    background: #c62828;
}

#status {
    margin-top: 16px;
    padding: 12px;
    background: rgba(55, 60, 75, 0.90);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

#status.status-error {
    background: rgba(150, 25, 25, 0.95);
    border: 1px solid #ff5555;
    color: #ffffff;
    font-weight: bold;
}

audio {
    display: block;
    width: 100%;
    margin-top: 16px;
}

#downloadLink {
    display: none;
    margin-top: 14px;
    padding: 13px;
    background: #245a9b;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
}

#downloadLink:hover {
    background: #3474bb;
    color: white;
}

.small {
    margin-top: 18px;
    color: #c1c7d3;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .panel {
        margin: 10px auto;
        padding: 18px;
    }

    .buttons {
        flex-direction: column;
    }
}


/* Järjestäjän sivujen asettelu */
.page-form {
    max-width: 760px;
}

.page-competitions {
    max-width: 940px;
    padding: 24px;
}

.page-competitions > section {
    margin: 20px 0;
    padding: 22px;
}

.page-competitions > hr {
    max-width: 100%;
}

@media (max-width: 600px) {
    .page-form {
        padding: 18px;
    }

    .page-competitions {
        padding: 10px;
    }

    .page-competitions > section {
        padding: 16px;
    }
}

/* Kalenteri- ja aikakenttien vaalea kuvake tummalla taustalla */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

/* Ääninäytteen reaaliaikainen mikrofonin äänitasomittari */
.audio-level {
    margin: 18px 0;
    padding: 16px;
    background: #171717;
    border: 1px solid #444;
    border-radius: 10px;
}
.audio-level h3 {
    margin: 0 0 12px;
    font-size: 16px;
}
.audio-level-track {
    position: relative;
    height: 22px;
    overflow: hidden;
    border-radius: 6px;
    background: linear-gradient(to right, #345b86 0%, #345b86 18%, #303030 18%, #303030 86%, #963b3b 86%, #963b3b 100%);
}
.audio-level-target {
    position: absolute;
    z-index: 1;
    left: 59%;
    width: 27%;
    top: 0;
    bottom: 0;
    background: rgba(46, 160, 67, 0.55);
}
.audio-level-music {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #f2c230;
}

.audio-level-fill {
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #e53935;
    transition: width 70ms linear;
}

.audio-reference-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.audio-level-loud-label {
    margin: 0 0 5px;
    color: #c1c7d3;
    font-size: 13px;
    text-align: right;
}

.audio-level-labels {
    position: relative;
    height: 24px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}

.audio-level-label-quiet {
    position: absolute;
    left: 0;
    color: #c1c7d3;
}

.audio-level-label-music {
    position: absolute;
    left: 12%;
    width: 46%;
    box-sizing: border-box;
    padding-right: 8px;
    color: #f2c230;
    text-align: right;
}

.audio-level-label-vocal {
    position: absolute;
    left: 59%;
    width: 27%;
    color: #70d889;
    text-align: center;
}

.audio-level-help {
    margin: 12px 0 0;
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.5;
}


/* JMP AUDIO MIXER - complete hardware-style design */
.jmp-mixer {
    margin: 18px 0;
    padding: 16px;
    background: linear-gradient(145deg, #15191f, #07090c);
    border: 1px solid #35404c;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06),
                0 10px 28px rgba(0,0,0,.45);
    color: #edf3fa;
}

.jmp-mixer-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:14px;
    padding-bottom:12px;
    border-bottom:1px solid #303944;
}

.jmp-mixer-brand {
    color:#38bdf8;
    font-size:12px;
    font-weight:900;
    letter-spacing:3px;
    text-shadow:0 0 12px rgba(56,189,248,.45);
}

.jmp-mixer-title {
    display:block;
    margin-top:3px;
    font-size:22px;
    letter-spacing:2px;
    color:#f4f7fb;
}

.jmp-mixer-status {
    color:#65e6a7;
    font-size:11px;
    font-weight:800;
    letter-spacing:1px;
    white-space:nowrap;
}

.jmp-mixer-channels {
    display:grid;
    grid-template-columns:1fr 1fr 1fr .8fr;
    gap:10px;
    align-items:stretch;
}

.jmp-channel {
    min-width:0;
    padding:12px;
    background:linear-gradient(180deg,#222831,#101318);
    border:1px solid #37414d;
    border-radius:9px;
    box-shadow:inset 0 0 14px rgba(0,0,0,.35);
}

.jmp-channel h4 {
    margin:0 0 10px;
    text-align:center;
    font-size:12px;
    letter-spacing:1.5px;
    color:#b7c5d5;
}

.jmp-channel-vocal h4 { color:#55c9ff; }
.jmp-channel-music h4 { color:#5cf0ad; }
.jmp-channel-reverb h4 { color:#c6a6ff; }
.jmp-channel-master h4 { color:#ffd36a; }

.jmp-channel-value {
    display:block;
    margin:7px 0;
    color:#f6f9fd;
    font-size:22px;
    font-weight:900;
    text-align:center;
    font-variant-numeric:tabular-nums;
    text-shadow:0 0 8px rgba(255,255,255,.08);
}

.jmp-channel input[type="range"] {
    width:100%;
    margin:10px 0;
    accent-color:#38bdf8;
}

.jmp-channel-music input[type="range"] {
    accent-color:#35e69a;
}

.jmp-channel-reverb input[type="range"] {
    accent-color:#b58cff;
}

.jmp-channel-master input[type="range"] {
    accent-color:#ffd166;
}

.jmp-channel select {
    width:100%;
    margin:8px 0;
    padding:9px;
    color:#edf3fa;
    background:#090c10;
    border:1px solid #414b58;
    border-radius:6px;
    font-size:12px;
    font-weight:700;
}

.jmp-mute-control {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:7px;
    margin-top:10px;
    padding:8px;
    background:#080a0d;
    border:1px solid #39434f;
    border-radius:6px;
    cursor:pointer;
    font-size:11px;
    font-weight:900;
    letter-spacing:1px;
}

.jmp-mute-control input {
    width:16px;
    height:16px;
    accent-color:#ff4d5d;
}

.jmp-stereo-meter {
    display:grid;
    gap:6px;
    margin-top:10px;
}

.jmp-stereo-meter > span {
    display:block;
    min-height:16px;
    text-align:center;
    color:#8291a2;
    font-size:10px;
}

.jmp-meter-stereo {
    display:flex;
    gap:7px;
}

.jmp-meter-side {
    display:flex;
    flex:1;
    align-items:center;
    gap:4px;
}

.jmp-meter-side small {
    color:#7f8d9c;
    font-size:9px;
    font-weight:800;
}

.jmp-meter-track {
    position:relative;
    flex:1;
    height:13px;
    overflow:hidden;
    background:#030405;
    border:1px solid #29333e;
    border-radius:3px;
    box-shadow:inset 0 0 5px #000;
}

.jmp-meter-fill {
    width:0;
    height:100%;
    background:linear-gradient(
        to right,
        #0875e8 0%,
        #168bff 15%,
        #20c978 48%,
        #a6e33b 72%,
        #ffd23f 88%,
        #ff4242 100%
    );
    transition:width 70ms linear;
    box-shadow:0 0 7px rgba(65,210,255,.4);
}

.jmp-master-meter {
    background:linear-gradient(
        to right,
        #16a34a 0%,
        #22c55e 55%,
        #a3e635 75%,
        #facc15 88%,
        #ef4444 100%
    );
}

.jmp-channel-master {
    border-color:#665532;
    background:linear-gradient(180deg,#28251c,#11100d);
}

.jmp-channel-master .jmp-channel-value {
    color:#ffd166;
}

.jmp-mixer-player {
    margin-top:12px;
    padding:12px;
    background:#080b0e;
    border:1px solid #303944;
    border-radius:9px;
}

.jmp-mixer-transport {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.jmp-mixer-transport button {
    min-width:76px;
    min-height:40px;
    padding:8px 12px;
    border:1px solid #46515e;
    border-radius:7px;
    background:linear-gradient(180deg,#303843,#171c22);
    color:#f5f8fc;
    font-size:12px;
    font-weight:900;
    letter-spacing:.5px;
    cursor:pointer;
}

.jmp-mixer-transport button:disabled {
    opacity:.35;
    cursor:not-allowed;
}

.jmp-mixer-transport .jmp-transport-rec {
    background:linear-gradient(180deg,#5a2026,#301014);
    border-color:#a33c47;
    color:#ff6571;
}

.jmp-mixer-transport #liveMixPlayButton {
    background:linear-gradient(180deg,#145a3c,#0b3021);
    border-color:#2e9d68;
    color:#68f0ae;
}

.jmp-mixer-transport #liveMixStopButton {
    background:linear-gradient(180deg,#343a42,#1b2026);
}

.jmp-mixer-transport button:hover:not(:disabled) {
    filter:brightness(1.2);
}

.jmp-mixer-transport strong {
    margin-left:auto;
    color:#a9bacb;
    font-family:monospace;
    font-size:13px;
}

.jmp-mixer-seek {
    width:100%;
    margin:12px 0 5px;
    accent-color:#38bdf8;
}

.jmp-mixer-player small {
    display:block;
    color:#8594a4;
    font-size:11px;
    margin-top:5px;
}

.jmp-mixer-actions {
    display:flex;
    margin-top:12px;
}

.jmp-mixer-actions button {
    width:100%;
    min-height:48px;
    padding:10px 14px;
    background:linear-gradient(180deg,#087c53,#075035);
    border:1px solid #27a873;
    border-radius:8px;
    color:#eafff5;
    font-weight:900;
    font-size:13px;
    letter-spacing:.5px;
    box-shadow:0 0 12px rgba(39,168,115,.12);
    cursor:pointer;
}

.jmp-mixer-actions button:hover {
    filter:brightness(1.15);
    box-shadow:0 0 16px rgba(39,168,115,.25);
}

#mixSection > small {
    color:#a8b4c1;
    font-size:12px;
    line-height:1.6;
}

@media (max-width:700px) {
    .jmp-mixer {
        padding:10px;
    }

    .jmp-mixer-channels {
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .jmp-channel {
        padding:9px;
    }

    .jmp-channel-value {
        font-size:19px;
    }

    .jmp-channel-master {
        grid-column:span 2;
    }

    .jmp-mixer-transport {
        justify-content:center;
    }

    .jmp-mixer-transport strong {
        width:100%;
        margin:4px 0 0;
        text-align:center;
    }
}

@media (max-width:380px) {
    .jmp-mixer-channels {
        grid-template-columns:1fr;
    }

    .jmp-channel-master {
        grid-column:auto;
    }

    .jmp-mixer-transport button {
        flex:1;
        min-width:0;
    }
}

/* =========================================================
   JMP AUDIO MIXER - STUDIO HARDWARE DESIGN
   ========================================================= */

.jmp-mixer {
    margin: 22px 0;
    padding: 18px;
    color: #e9edf2;
    background:
        linear-gradient(145deg,#34383d 0%,#171a1e 18%,#080a0c 100%);
    border: 2px solid #59616a;
    border-radius: 9px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        inset 0 0 35px #000,
        0 16px 36px rgba(0,0,0,.65);
}

.jmp-mixer-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 18px;
    margin-bottom:18px;
    background:linear-gradient(180deg,#292e34,#101317);
    border:1px solid #515963;
    border-radius:5px;
    box-shadow:inset 0 0 12px #000;
}

.jmp-mixer-brand {
    color:#42c8ff;
    font-size:12px;
    font-weight:900;
    letter-spacing:5px;
    text-shadow:0 0 12px #168bc9;
}

.jmp-mixer-title {
    display:block;
    margin-top:4px;
    color:#f5f7f9;
    font-size:28px;
    font-weight:900;
    letter-spacing:5px;
    text-shadow:0 2px 5px #000;
}

.jmp-mixer-status {
    padding:8px 12px;
    color:#5dffad;
    background:#06150d;
    border:1px solid #237b4b;
    border-radius:4px;
    font-family:monospace;
    font-weight:900;
    box-shadow:0 0 12px rgba(30,220,110,.18);
}

.jmp-mixer-channels {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    align-items:stretch;
}

.jmp-channel {
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    min-width:0;
    padding:12px 9px 14px;
    background:
        linear-gradient(180deg,#363b41 0%,#22262b 12%,#111418 100%);
    border:1px solid #606872;
    border-radius:5px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.14),
        inset 0 0 18px rgba(0,0,0,.65),
        0 5px 9px #000;
}

.jmp-channel h4 {
    width:100%;
    margin:0 0 10px;
    padding:9px 3px;
    text-align:center;
    font-size:12px;
    font-weight:900;
    letter-spacing:2px;
    color:#e1e5e9;
    background:linear-gradient(180deg,#171b1f,#080a0c);
    border:1px solid #434a52;
    border-radius:3px;
    text-shadow:0 1px 3px #000;
}

.jmp-channel-vocal h4 {
    color:#53cfff;
    border-color:#27718c;
}

.jmp-channel-music h4 {
    color:#5cffad;
    border-color:#28784f;
}

.jmp-channel-reverb h4 {
    color:#c4a0ff;
    border-color:#7051a2;
}

.jmp-channel-master h4 {
    color:#ffd66e;
    border-color:#91712e;
}

.jmp-channel-value {
    display:block;
    width:100%;
    margin:4px 0 10px;
    padding:7px 3px;
    color:#f5f5f5;
    background:#030405;
    border:1px solid #343a40;
    border-radius:3px;
    font-family:monospace;
    font-size:20px;
    font-weight:900;
    text-align:center;
    font-variant-numeric:tabular-nums;
    text-shadow:0 0 8px rgba(255,255,255,.2);
}

.jmp-channel input[type="range"] {
    cursor:pointer;
    accent-color:#45c9ff;
}

.jmp-channel-vocal input[type="range"],
.jmp-channel-music input[type="range"],
.jmp-channel-master input[type="range"] {
    width:38px;
    height:155px;
    min-height:155px;
    margin:8px auto 12px;
    writing-mode:vertical-lr;
    direction:rtl;
    appearance:slider-vertical;
    -webkit-appearance:slider-vertical;
}

.jmp-channel-music input[type="range"] {
    accent-color:#43ed9c;
}

.jmp-channel-reverb input[type="range"] {
    width:90%;
    height:28px;
    margin:10px 0;
    accent-color:#b78cff;
}

.jmp-channel-master input[type="range"] {
    accent-color:#ffd166;
}

.jmp-channel select {
    width:100%;
    margin:8px 0;
    padding:10px 5px;
    color:#f2f2f2;
    background:linear-gradient(180deg,#181c21,#080a0c);
    border:1px solid #555e68;
    border-radius:4px;
    font-size:11px;
    font-weight:800;
    text-align:center;
}

.jmp-mute-control {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:7px;
    width:100%;
    margin-top:10px;
    padding:9px 4px;
    background:linear-gradient(180deg,#292e34,#111418);
    border:1px solid #515963;
    border-radius:4px;
    cursor:pointer;
    font-size:11px;
    font-weight:900;
    letter-spacing:1px;
    color:#dfe4e8;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.jmp-mute-control input {
    width:17px;
    height:17px;
    accent-color:#ff424f;
}

.jmp-stereo-meter {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    width:100%;
    margin-top:8px;
    padding:9px 4px;
    background:#050607;
    border:1px solid #343b43;
    border-radius:4px;
    box-shadow:inset 0 0 10px #000;
}

.jmp-stereo-meter > span {
    display:block;
    width:100%;
    min-height:16px;
    text-align:center;
    color:#8c99a5;
    font-size:9px;
    font-family:monospace;
}

.jmp-meter-track {
    position:relative;
    width:15px;
    height:140px;
    flex:none;
    overflow:hidden;
    background:
        repeating-linear-gradient(
            180deg,
            #101214 0px,
            #101214 3px,
            #050607 3px,
            #050607 5px
        );
    border:1px solid #343b43;
    border-radius:2px;
    box-shadow:inset 0 0 6px #000;
}

.jmp-meter-fill {
    position:absolute;
    left:0;
    bottom:0;
    width:100%;
    height:0%;
    background:linear-gradient(
        to top,
        #0875e8 0%,
        #168bff 15%,
        #20c978 48%,
        #a6e33b 72%,
        #ffd23f 88%,
        #ff4242 100%
    );
    transition:height 50ms linear;
    box-shadow:0 0 8px rgba(65,210,255,.5);
}

.jmp-meter-stereo {
    display:flex;
    justify-content:center;
    gap:8px;
}

.jmp-meter-side {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:4px;
}

.jmp-meter-side small {
    color:#8c98a4;
    font-size:9px;
    font-weight:900;
}

.jmp-channel-master {
    border-color:#8b713d;
    background:linear-gradient(180deg,#393329,#1b1711);
}

.jmp-channel-master .jmp-channel-value {
    color:#ffd166;
    border-color:#80652e;
}

.jmp-channel-master .jmp-stereo-meter {
    border-color:#80652e;
}

.jmp-master-meter {
    background:linear-gradient(
        to top,
        #16a34a 0%,
        #22c55e 55%,
        #a3e635 75%,
        #facc15 88%,
        #ef4444 100%
    );
}

.jmp-mixer-player {
    margin-top:16px;
    padding:16px;
    background:linear-gradient(180deg,#171b20,#080a0c);
    border:1px solid #525a64;
    border-radius:5px;
    box-shadow:inset 0 0 15px #000;
}

.jmp-mixer-transport {
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.jmp-mixer-transport button {
    min-width:90px;
    min-height:48px;
    padding:10px 14px;
    border:1px solid #69727c;
    border-radius:4px;
    background:linear-gradient(180deg,#454c54,#1a1e23);
    color:#f5f8fc;
    font-size:13px;
    font-weight:900;
    letter-spacing:1px;
    cursor:pointer;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 3px 5px #000;
}

.jmp-mixer-transport button:active:not(:disabled) {
    transform:translateY(1px);
    box-shadow:inset 0 2px 5px #000;
}

.jmp-mixer-transport button:disabled {
    opacity:.35;
    cursor:not-allowed;
}

.jmp-mixer-transport .jmp-transport-rec {
    background:linear-gradient(180deg,#792c35,#341217);
    border-color:#c34b58;
    color:#ff6976;
    text-shadow:0 0 8px #a82232;
}

.jmp-mixer-transport #liveMixPlayButton {
    background:linear-gradient(180deg,#21764c,#103321);
    border-color:#43bd7c;
    color:#73ffc0;
}

.jmp-mixer-transport #liveMixStopButton {
    background:linear-gradient(180deg,#444b53,#1a1e23);
}

.jmp-mixer-transport button:hover:not(:disabled) {
    filter:brightness(1.25);
}

.jmp-mixer-transport strong {
    margin-left:auto;
    padding:9px 12px;
    color:#65ffad;
    background:#030705;
    border:1px solid #28573d;
    border-radius:3px;
    font-family:monospace;
    font-size:15px;
    text-shadow:0 0 8px #1a8a4b;
}

.jmp-mixer-seek {
    width:100%;
    margin:15px 0 8px;
    accent-color:#46caff;
}

.jmp-mixer-player small {
    display:block;
    color:#9aa6b2;
    font-size:11px;
    margin-top:6px;
}

.jmp-mixer-actions {
    display:flex;
    margin-top:15px;
}

.jmp-mixer-actions button {
    width:100%;
    min-height:54px;
    padding:12px 16px;
    background:linear-gradient(180deg,#168c60,#075235);
    border:1px solid #42d394;
    border-radius:4px;
    color:#eafff5;
    font-weight:900;
    font-size:14px;
    letter-spacing:1px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 0 15px rgba(39,168,115,.2);
    cursor:pointer;
}

.jmp-mixer-actions button:hover:not(:disabled) {
    filter:brightness(1.2);
    box-shadow:0 0 20px rgba(39,168,115,.4);
}

.jmp-mixer-actions button:disabled {
    opacity:.45;
    cursor:not-allowed;
}

#mixSection > small {
    color:#a8b4c1;
    font-size:12px;
    line-height:1.6;
}

@media (max-width:700px) {
    .jmp-mixer {
        padding:10px;
    }

    .jmp-mixer-channels {
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px;
    }

    .jmp-channel {
        padding:9px 6px;
    }

    .jmp-channel-vocal input[type="range"],
    .jmp-channel-music input[type="range"],
    .jmp-channel-master input[type="range"] {
        height:125px;
        min-height:125px;
    }

    .jmp-meter-track {
        height:115px;
    }

    .jmp-channel-value {
        font-size:17px;
    }

    .jmp-mixer-transport {
        justify-content:center;
    }

    .jmp-mixer-transport strong {
        width:100%;
        margin:4px 0 0;
        text-align:center;
    }
}

@media (max-width:380px) {
    .jmp-mixer-channels {
        grid-template-columns:1fr 1fr;
    }

    .jmp-mixer-transport button {
        flex:1;
        min-width:0;
    }

    .jmp-mixer-title {
        font-size:23px;
    }
}

/* MP3-painike mikserin toimintorivillä */
.jmp-mixer-transport #createMp3Button {
    flex: 1.5;
    min-width: 130px;
    background: linear-gradient(180deg,#168c60,#075235);
    border-color: #42d394;
    color: #eafff5;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15),
                0 0 10px rgba(39,168,115,.2);
}

.jmp-mixer-transport #createMp3Button:hover:not(:disabled) {
    filter: brightness(1.2);
    box-shadow: 0 0 15px rgba(39,168,115,.4);
}

@media (max-width:700px) {
    .jmp-mixer-transport #createMp3Button {
        flex: 1.5;
        min-width: 110px;
    }
}

/* Kaiun kanava: sama pystysuuntainen fader kuin muissa kanavissa */
.jmp-channel-reverb input[type="range"] {
    width:38px;
    height:155px;
    min-height:155px;
    margin:8px auto 12px;
    writing-mode:vertical-lr;
    direction:rtl;
    appearance:slider-vertical;
    -webkit-appearance:slider-vertical;
    accent-color:#b78cff;
}

/* =========================================================
   JMP AUDIO MIXER – KOMPAKTI HARDWARE-MIKSERI
   ========================================================= */

.jmp-mixer {
    width:100%;
    max-width:1600px;
    margin:18px auto;
    padding:18px;
    box-sizing:border-box;
}

.jmp-mixer-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:12px;
    flex-wrap:wrap;
}

.jmp-mixer-reverb-preset {
    display:flex;
    align-items:center;
    gap:8px;
    padding:7px 10px;
    background:#101820;
    border:1px solid #344552;
    border-radius:8px;
}

.jmp-mixer-reverb-preset label {
    color:#b9c7d3;
    font-size:11px;
    font-weight:bold;
    white-space:nowrap;
}

.jmp-mixer-reverb-preset select {
    width:auto;
    min-width:140px;
    margin:0;
}

/* Neljä samankorkuista kanavaa */
.jmp-mixer-channels {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    align-items:stretch;
}

.jmp-channel {
    min-width:0;
    min-height:330px;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    padding:10px;
    border-radius:10px;
    position:relative;
}

.jmp-channel h4 {
    margin:0 0 5px;
    text-align:center;
    font-size:14px;
    letter-spacing:1px;
}

.jmp-channel-value {
    display:block;
    text-align:center;
    font-size:18px;
    font-weight:bold;
    margin:2px 0 8px;
}

/* LED-mittari ja fader rinnakkain */
.jmp-channel-controls {
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
    gap:12px;
    height:165px;
    min-height:165px;
    margin:4px auto 8px;
}

/* Pystysuuntaiset faderit */
.jmp-channel-controls > input[type="range"] {
    width:38px;
    height:155px;
    min-height:155px;
    max-width:38px;
    margin:0;
    writing-mode:vertical-lr;
    direction:rtl;
    appearance:slider-vertical;
    -webkit-appearance:slider-vertical;
    flex:0 0 38px;
}

.jmp-channel-vocal input[type="range"] {
    accent-color:#42d394;
}

.jmp-channel-music input[type="range"] {
    accent-color:#38bdf8;
}

.jmp-channel-reverb input[type="range"] {
    accent-color:#b78cff;
}

.jmp-channel-master input[type="range"] {
    accent-color:#ffbd59;
}

/* LED-mittarien rakenne */
.jmp-meter-track {
    width:15px;
    height:150px;
    min-height:150px;
    position:relative;
    overflow:hidden;
    border-radius:4px;
    background:
        repeating-linear-gradient(
            to top,
            #10151a 0px,
            #10151a 5px,
            #26313a 6px,
            #26313a 7px
        );
    border:1px solid #46525d;
    box-shadow:inset 0 0 5px rgba(0,0,0,.8);
}

.jmp-meter-fill {
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    height:0%;
    background:linear-gradient(
        to top,
        #13a45c 0%,
        #43dc76 65%,
        #d9e94d 82%,
        #ffb52e 94%,
        #ff4d4d 100%
    );
    border-radius:2px;
    transition:height .045s linear;
}

/* Laulun mittari */
.jmp-channel-vocal .jmp-channel-controls .jmp-meter-track {
    flex:0 0 15px;
}

/* Musiikin stereo LED-mittarit */
.jmp-meter-stereo {
    display:flex;
    flex-direction:row;
    justify-content:center;
    align-items:center;
    gap:5px;
}

.jmp-meter-side {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
}

.jmp-meter-side small {
    font-size:9px;
    font-weight:bold;
    color:#aab8c4;
}

.jmp-channel-music .jmp-channel-controls .jmp-meter-stereo {
    flex:0 0 auto;
}

.jmp-channel-music .jmp-meter-track {
    width:12px;
}

/* Kaiun määrä näkyy myös LED-mittarina */
.jmp-reverb-meter {
    display:flex;
    align-items:center;
}

.jmp-reverb-meter .jmp-meter-track {
    background:
        repeating-linear-gradient(
            to top,
            #10151a 0px,
            #10151a 5px,
            #26313a 6px,
            #26313a 7px
        );
}

.jmp-channel-reverb .jmp-meter-fill {
    background:linear-gradient(
        to top,
        #6542a8,
        #a77bff,
        #dfc8ff
    );
}

/* Master-mittari */
.jmp-master-meter {
    background:linear-gradient(
        to top,
        #13a45c,
        #43dc76 65%,
        #d9e94d 82%,
        #ffb52e 94%,
        #ff4d4d
    );
}

/* Kanavan sisältö joustavaksi */
.jmp-channel > small {
    display:block;
    text-align:center;
    color:#a8b4c1;
    font-size:10px;
    line-height:1.4;
    margin-top:5px;
}

.jmp-channel > span:not(.jmp-channel-value) {
    display:block;
    min-height:14px;
    text-align:center;
    font-size:10px;
    color:#9eabb8;
}

/* Mikrofoni-testipainike */
.jmp-mic-test-button {
    width:100%;
    padding:7px 4px;
    margin:5px 0;
    font-size:11px;
    box-sizing:border-box;
}

/* Musiikin lähdevalinnat tiiviiksi */
.jmp-music-source {
    margin:4px 0 6px !important;
    text-align:left;
    font-size:10px;
}

.jmp-music-source label {
    font-size:10px;
}

.jmp-music-source select {
    width:100%;
    margin-top:3px;
    padding:5px;
    font-size:10px;
    box-sizing:border-box;
}

.jmp-music-source input[type="file"] {
    width:100%;
    max-width:100%;
    font-size:10px;
    box-sizing:border-box;
}

.jmp-music-source video,
.jmp-music-source audio {
    max-width:100%;
}

.jmp-music-source p {
    font-size:10px !important;
    line-height:1.35;
    margin:5px 0;
}

.jmp-channel-music #videoMusicSection,
.jmp-channel-music #fileMusicSection {
    margin-top:5px !important;
}

/* MUTE aina kanavan alareunassa */
.jmp-mute-control {
    margin-top:auto !important;
    width:100%;
    min-height:36px;
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:7px;
    border:1px solid #52616d;
    border-radius:7px;
    background:linear-gradient(#202b35,#111920);
    color:#e8edf2;
    font-weight:bold;
    font-size:12px;
    letter-spacing:1px;
}

.jmp-mute-control input[type="checkbox"] {
    width:18px;
    height:18px;
    margin:0;
    accent-color:#ff5555;
}

/* Musiikkikanavan korkeus säilyy lähdevalinnoista huolimatta */
.jmp-channel-music .jmp-channel-controls {
    margin-top:auto;
}

/* Mikserin otsikko */
.jmp-mixer-title {
    font-size:26px;
}

.jmp-mixer-status {
    white-space:nowrap;
    font-size:11px;
}

/* Pienemmät näytöt */
@media (max-width:900px) {
    .jmp-mixer-channels {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .jmp-channel {
        min-height:330px;
    }
}

@media (max-width:700px) {
    .jmp-mixer-header {
        justify-content:center;
        text-align:center;
    }

    .jmp-mixer-reverb-preset {
        order:3;
        width:100%;
        justify-content:center;
    }

    .jmp-mixer-reverb-preset select {
        flex:1;
        max-width:220px;
    }

    .jmp-channel-controls {
        height:145px;
        min-height:145px;
    }

    .jmp-channel-controls > input[type="range"] {
        height:135px;
        min-height:135px;
    }

    .jmp-meter-track {
        height:130px;
        min-height:130px;
    }

    .jmp-channel {
        min-height:310px;
    }
}

@media (max-width:380px) {
    .jmp-mixer-channels {
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:6px;
    }

    .jmp-channel {
        padding:7px 5px;
        min-height:300px;
    }

    .jmp-channel h4 {
        font-size:12px;
    }

    .jmp-channel-controls {
        gap:7px;
    }

    .jmp-channel-controls > input[type="range"] {
        width:32px;
        max-width:32px;
        flex-basis:32px;
    }
}



/* JMP MIXER – YHTENÄINEN LED- JA FADER-ASETTELU */
.jmp-channel-controls {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    height: 165px !important;
    min-height: 165px !important;
    margin: 8px auto !important;
    box-sizing: border-box !important;
}

.jmp-channel-controls > input[type="range"] {
    display: block !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    max-width: 38px !important;
    height: 155px !important;
    min-height: 155px !important;
    margin: 0 !important;
}

/* Laulu ja Master */
.jmp-channel-controls > .jmp-meter-track {
    display: block !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 150px !important;
    min-height: 150px !important;
    margin: 0 !important;
}

/* Kaiku */
.jmp-channel-controls > .jmp-reverb-meter {
    display: flex !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 150px !important;
    min-height: 150px !important;
    margin: 0 !important;
}

.jmp-channel-controls > .jmp-reverb-meter .jmp-meter-track {
    width: 18px !important;
    height: 150px !important;
    min-height: 150px !important;
    flex: 0 0 18px !important;
}

/* Musiikin L/R-mittarit */
.jmp-channel-controls > .jmp-meter-stereo {
    display: flex !important;
    flex: 0 0 42px !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    margin: 0 !important;
    gap: 5px !important;
}

.jmp-channel-controls .jmp-meter-side {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
}

.jmp-channel-controls .jmp-meter-side small {
    line-height: 12px !important;
}

.jmp-channel-controls .jmp-meter-side .jmp-meter-track {
    width: 16px !important;
    height: 140px !important;
    min-height: 140px !important;
    flex: 0 0 16px !important;
    margin: 0 !important;
}

#mixVocalMeterValue {
    display: none !important;
}

/* JMP MIXER – ASETUSPANEELI JA VIISI SARAKETTA */
.jmp-mixer-channels {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.jmp-channel-settings {
    order: -1;
    justify-content: flex-start;
    gap: 12px;
}

.jmp-channel-settings .jmp-music-source {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jmp-channel-settings .jmp-music-source select,
.jmp-channel-settings .jmp-music-source input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.jmp-channel-settings .jmp-mic-test-button {
    width: 100%;
    margin-top: 8px;
}

.jmp-channel-settings small {
    text-align: center;
}

@media (max-width: 900px) {
    .jmp-mixer-channels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .jmp-mixer-channels {
        grid-template-columns: 1fr;
    }
}

/* JMP MIXER – PIDEMMÄT FADERIT */
.jmp-channel-controls {
    height: 220px !important;
    min-height: 220px !important;
}

.jmp-channel-controls > input[type="range"] {
    height: 210px !important;
    min-height: 210px !important;
}


/* JMP MIXER – KANAVIEN LEVEYDET JA OTSIKOT */
.jmp-mixer-channels {
    grid-template-columns: minmax(190px, 1.3fr) repeat(4, minmax(145px, 1fr));
}

.jmp-channel h4 {
    font-size: 18px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.jmp-channel-settings h4 {
    font-size: 16px;
}


/* KaraokeStudio – laajennetaan vain mikserin sisältävä paneeli */
.panel:has(.jmp-mixer) {
    width: 100%;
    max-width: 1600px;
    box-sizing: border-box;
}


/* JMP MIXER – HIEMAN KAPEAMMAT KANAVAT */
.jmp-mixer-channels {
    grid-template-columns: minmax(190px, 1.15fr) repeat(4, minmax(125px, 0.9fr));
}

/* Musiikin lähdevalikon luettavat vaihtoehdot */
.jmp-channel-settings select option {
    color: #111111;
    background-color: #ffffff;
}


/* JMP MIXER – HIEMAN KAPEAMMAT KANAVAT */
.jmp-mixer-channels {
    grid-template-columns: minmax(190px, 1.15fr) repeat(4, minmax(125px, 0.9fr));
}

/* MUSIIKIN LÄHDE – VALIKON TEKSTIT NÄKYVIKSI */
.jmp-channel-settings select option {
    color: #111111;
    background-color: #ffffff;
}

/* TIEDOSTONVALINTAPAINIKKEET SELKEÄSTI NÄKYVIIN */
.jmp-channel-settings input[type="file"] {
    color: #ffffff;
    min-height: 36px;
    padding: 5px;
    border: 1px solid #666666;
    border-radius: 5px;
    background: #222222;
}

.jmp-channel-settings input[type="file"]::file-selector-button {
    color: #111111;
    background: #dddddd;
    border: 0;
    border-radius: 4px;
    padding: 6px 10px;
    margin-right: 8px;
    cursor: pointer;
}


/* Kompaktit MP3- ja tyhjennyspainikkeet */
.jmp-mixer-transport #createMp3Button,
.jmp-mixer-transport #clearPageButton {
    flex:0 0 116px;
    width:116px;
    min-width:0;
    padding:8px 5px;
    white-space:nowrap;
}

.jmp-mixer-transport #clearPageButton {
    background:linear-gradient(180deg,#454c54,#1a1e23);
    border-color:#69727c;
    color:#e2e8f0;
}

@media (max-width:380px) {
    .jmp-mixer-transport #createMp3Button,
    .jmp-mixer-transport #clearPageButton {
        flex:0 0 104px;
        width:104px;
    }
}

/* Piilotetaan ylimääräinen HTML-musiikkisoitin, mutta säilytetään JS-toiminnallisuus */
#musicPlayer {
    display: none !important;
    visibility: hidden !important;
}

/* =========================================================
   JMP KARAOKE MIXER – RESPONSIVE LAYOUT
   ========================================================= */

.jmp-mixer {
    width: 100% !important;
    max-width: 100% !important;
    padding: clamp(6px, 1.2vw, 18px) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.jmp-mixer-channels {
    width: 100% !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: clamp(4px, 0.8vw, 12px) !important;
    box-sizing: border-box !important;
}

.jmp-channel {
    min-width: 0 !important;
    width: 100% !important;
    padding: clamp(4px, 0.7vw, 10px) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.jmp-channel h4 {
    font-size: clamp(10px, 1.1vw, 17px) !important;
    letter-spacing: clamp(0px, 0.08vw, 1px) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
}

.jmp-channel-settings h4 {
    font-size: clamp(10px, 1vw, 15px) !important;
}

.jmp-channel-value {
    font-size: clamp(12px, 1.3vw, 18px) !important;
}

.jmp-channel-controls {
    gap: clamp(3px, 0.5vw, 12px) !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.jmp-channel-controls > input[type="range"] {
    flex: 0 1 clamp(24px, 2.5vw, 38px) !important;
    width: clamp(24px, 2.5vw, 38px) !important;
    min-width: 24px !important;
    max-width: clamp(24px, 2.5vw, 38px) !important;
    box-sizing: border-box !important;
}

.jmp-channel-controls > .jmp-meter-track,
.jmp-channel-controls > .jmp-reverb-meter,
.jmp-channel-controls > .jmp-reverb-meter .jmp-meter-track {
    flex: 0 1 clamp(12px, 1.3vw, 18px) !important;
    width: clamp(12px, 1.3vw, 18px) !important;
    min-width: 12px !important;
    box-sizing: border-box !important;
}

.jmp-channel-controls > .jmp-meter-stereo {
    flex: 0 1 clamp(26px, 3vw, 42px) !important;
    width: clamp(26px, 3vw, 42px) !important;
    min-width: 26px !important;
    gap: clamp(2px, 0.3vw, 5px) !important;
}

.jmp-channel-controls .jmp-meter-side .jmp-meter-track {
    flex: 0 1 clamp(10px, 1.1vw, 16px) !important;
    width: clamp(10px, 1.1vw, 16px) !important;
    min-width: 10px !important;
}

.jmp-mixer-title {
    font-size: clamp(18px, 2vw, 26px) !important;
}

/* Kapeampi mikserinäkymä */
@media (max-width: 1100px) {
    .jmp-mixer-channels {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .jmp-channel h4 {
        font-size: clamp(11px, 1.5vw, 15px) !important;
    }
}

/* Tablet */
@media (max-width: 800px) {
    .jmp-mixer-channels {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .jmp-channel-controls {
        gap: 6px !important;
    }

    .jmp-channel h4 {
        font-size: clamp(12px, 2vw, 16px) !important;
    }
}

/* Puhelin */
@media (max-width: 500px) {
    .jmp-mixer-channels {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .jmp-channel {
        padding: 8px !important;
    }

    .jmp-channel h4 {
        font-size: 15px !important;
    }

    .jmp-channel-controls > input[type="range"] {
        flex: 0 0 32px !important;
        width: 32px !important;
        max-width: 32px !important;
    }
}


/* JMP MIXER – COMPACT SIZE */
.jmp-mixer {
    width: 60% !important;
    max-width: 1100px !important;
    min-width: 0 !important;
    margin: 20px auto !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

.jmp-mixer-channels {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important;
}

.jmp-channel {
    width: auto !important;
    min-width: 0 !important;
    padding: 5px !important;
}

@media (max-width: 900px) {
    .jmp-mixer {
        width: 90% !important;
    }

    .jmp-mixer-channels {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .jmp-mixer {
        width: 100% !important;
    }

    .jmp-mixer-channels {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* FORCE ALL MIXER CHANNELS SIDE BY SIDE */
.jmp-mixer-channels {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

@media (max-width: 900px) {
    .jmp-mixer-channels {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .jmp-mixer-channels {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}


/* JMP MIXER – SLIM CHANNELS AND SMALLER HEADERS */
.jmp-mixer {
    width: 55% !important;
    max-width: 950px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 8px !important;
}

.jmp-mixer-channels {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
}

.jmp-channel {
    padding: 4px !important;
    min-width: 0 !important;
}

.jmp-channel h4 {
    font-size: clamp(9px, 0.8vw, 13px) !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    padding: 8px 3px !important;
    min-height: 0 !important;
    height: auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.jmp-channel-value {
    font-size: clamp(11px, 0.9vw, 15px) !important;
    padding: 5px 2px !important;
}

.jmp-channel-controls {
    gap: 3px !important;
}

.jmp-channel-controls > input[type="range"] {
    flex: 0 1 24px !important;
    width: 24px !important;
    min-width: 20px !important;
    max-width: 24px !important;
}

.jmp-channel-controls > .jmp-meter-track,
.jmp-channel-controls > .jmp-reverb-meter,
.jmp-channel-controls > .jmp-reverb-meter .jmp-meter-track {
    flex: 0 1 12px !important;
    width: 12px !important;
    min-width: 10px !important;
}

.jmp-channel-controls > .jmp-meter-stereo {
    flex: 0 1 24px !important;
    width: 24px !important;
    min-width: 20px !important;
    gap: 2px !important;
}

.jmp-channel-controls .jmp-meter-side .jmp-meter-track {
    flex: 0 1 10px !important;
    width: 10px !important;
    min-width: 8px !important;
}


/* JMP MIXER – FINAL LAYOUT */
.jmp-mixer {
    width: 92% !important;
    max-width: 1250px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow-x: auto !important;
}

.jmp-mixer-channels {
    display: grid !important;
    grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr)) !important;
    min-width: 720px !important;
    gap: 5px !important;
}

.jmp-channel-settings {
    min-width: 0 !important;
}

.jmp-channel-settings h4 {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.jmp-channel {
    min-width: 0 !important;
    width: auto !important;
}

@media (max-width: 700px) {
    .jmp-mixer {
        width: 100% !important;
        max-width: 100% !important;
    }

    .jmp-mixer-channels {
        min-width: 720px !important;
        grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr)) !important;
    }
}

/* FORCE MASTER TO THE FIFTH COLUMN */
.jmp-channel-master {
    grid-column: 5 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: auto !important;
}

/* JMP MIXER – HALF WIDTH, FULLY RESPONSIVE */
.jmp-mixer {
    width: 50% !important;
    max-width: 700px !important;
    min-width: 0 !important;
    margin: 20px auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.jmp-mixer-channels {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
}

.jmp-channel,
.jmp-channel-settings,
.jmp-channel-master {
    min-width: 0 !important;
    width: auto !important;
    grid-column: auto !important;
    grid-row: 1 !important;
    padding: 3px !important;
}

.jmp-channel h4 {
    font-size: clamp(8px, 0.65vw, 11px) !important;
    padding: 5px 1px !important;
}

.jmp-channel-value {
    font-size: clamp(9px, 0.65vw, 12px) !important;
    padding: 3px 1px !important;
}

.jmp-channel-controls {
    gap: 1px !important;
}

.jmp-channel-controls > input[type="range"] {
    width: 16px !important;
    min-width: 12px !important;
    max-width: 16px !important;
    flex: 0 1 16px !important;
}

.jmp-channel-controls > .jmp-meter-track,
.jmp-channel-controls > .jmp-reverb-meter,
.jmp-channel-controls > .jmp-reverb-meter .jmp-meter-track {
    width: 8px !important;
    min-width: 6px !important;
    flex: 0 1 8px !important;
}

.jmp-channel-controls > .jmp-meter-stereo {
    width: 16px !important;
    min-width: 12px !important;
    flex: 0 1 16px !important;
    gap: 1px !important;
}

.jmp-channel-controls .jmp-meter-side .jmp-meter-track {
    width: 6px !important;
    min-width: 5px !important;
    flex: 0 1 6px !important;
}

.jmp-mute-control {
    font-size: clamp(8px, 0.65vw, 11px) !important;
    padding: 3px 1px !important;
}

@media (max-width: 900px) {
    .jmp-mixer {
        width: 50% !important;
        max-width: 700px !important;
    }

    .jmp-mixer-channels {
        min-width: 0 !important;
        grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)) !important;
    }
}

/* VALMIS TALLENNE – SAMA LEVEYS KUIN MIKSERILLÄ */
#playback {
    display: block !important;
    width: 50% !important;
    max-width: 700px !important;
    min-width: 0 !important;
    margin: 10px auto 20px !important;
    box-sizing: border-box !important;
}

body > h3 {
    width: 50% !important;
    max-width: 700px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

#downloadLink {
    display: block;
    width: fit-content;
    margin: 10px auto;
}

@media (max-width: 900px) {
    #playback,
    body > h3 {
        width: 50% !important;
        max-width: 700px !important;
    }
}

/* KARAOKESTUDIO – KOMPAKTI KOKONAISALUE */
.panel {
    width: 92% !important;
    max-width: 740px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

#mixSection,
.jmp-mixer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#playback,
.panel > h3 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}


/* LATAUSPAINIKE – AINA NÄKYVISSÄ */
#downloadLink {
    display: block !important;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    margin: 14px auto;
    padding: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

/* Tallennetta ei vielä ole */
#downloadLink:not([href]) {
    background: #444 !important;
    color: #aaa !important;
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tallenne on valmis */
#downloadLink[href] {
    background: #245a9b !important;
    color: #fff !important;
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

#downloadLink[href]:hover {
    background: #3474bb !important;
}
