/* ============================================================
   music.css — generic music view: notation (OSMD) score,
   count-in overlay and the per-part mixer.
   Shared by every instrument.
   ============================================================ */
#scoreWrap {
    flex: 1;
    min-height: 0;
    position: relative;
    margin: 14px 16px 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #d9cdb0;
}
#osmd {
    height: 100%;
    overflow: auto;
    padding: 6px 10px 40px;
    background: linear-gradient(180deg, #fffdf6, #f4ecd9);
    scroll-behavior: smooth;
}
#osmd svg {
    display: block;
    margin: 0 auto;
}
#countIn {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 6;
    pointer-events: none;
}
#countIn span {
    font-family: "Fraunces", serif;
    font-weight: 900;
    font-size: 34vh;
    color: rgba(224, 164, 88, 0.9);
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

/* per-part mixer */
.mixer {
    display: flex;
    gap: 10px;
    padding: 12px 16px 4px;
    flex-wrap: wrap;
}
.voice {
    flex: 1 1 140px;
    min-width: 128px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.03),
        rgba(0, 0, 0, 0.12)
    );
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.voice::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--vc);
}
.voice .vtop {
    display: flex;
    align-items: center;
    gap: 8px;
}
.voice .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--vc);
    box-shadow: 0 0 10px var(--vc);
}
.voice .vname {
    font-weight: 600;
    font-size: 14px;
    color: var(--parch);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.voice .btns {
    display: flex;
    gap: 7px;
}
.tg {
    flex: 1;
    font: 600 12px/1 "Spline Sans";
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.2);
    color: var(--txt-dim);
    border-radius: 8px;
    padding: 8px 0;
    cursor: pointer;
    transition: 0.15s;
}
.tg:hover {
    border-color: var(--gold-dim);
    color: var(--parch);
}
.tg.on[data-k="m"] {
    background: #5a2b2b;
    border-color: #8a4b4b;
    color: #ffd9d9;
}
.tg.on[data-k="s"] {
    background: var(--vc);
    border-color: var(--vc);
    color: #1a140c;
}
.voice.silent {
    opacity: 0.45;
}

@media (max-width: 720px) {
    .voice {
        flex: 1 1 46%;
        min-width: 0;
    }
    #scoreWrap {
        margin: 10px 10px 0;
    }
}
