/* ============================================================================
   MIGHTY MEDIA STUDIO | STEM ENGINE | CANONICAL STYLESHEET
   ============================================================================
   Scope: #stemEngineMount; reference geometry: 1280 x 800.
   Source order and responsive cascade retained. Shared LABS CSS is unchanged.
   ============================================================================ */

/* ============================================================================
   STEM ENGINE | TOKENS AND REFERENCE SCALE
   ============================================================================ */

#stemEngineMount {
    --stem-reference-unit: 1px;
    --stem-vocals: #ff7300;
    --stem-bass: #ff7300;
    --stem-drums: #ff7300;
    --stem-other: #ff7300;
}

#stemEngineMount * {
    box-sizing: border-box;
}

/* ============================================================================
   STEM ENGINE | WORKSPACE
   ============================================================================ */

#stemEngineMount .stemEngineRoot {
    margin: 0;
    color: #eee;
    font-family: inherit;
    text-align: center;
    padding: calc(8 * var(--stem-reference-unit)) calc(20 * var(--stem-reference-unit)) calc(82 * var(--stem-reference-unit));
}

#stemEngineMount .sub {
    text-align: center;
    color: #8e93a3;
    letter-spacing: calc(3 * var(--stem-reference-unit));
    font-size: calc(12 * var(--stem-reference-unit));
    margin: calc(8 * var(--stem-reference-unit)) 0 calc(26 * var(--stem-reference-unit));
}

#stemEngineMount .panel {
    position: relative;
    z-index: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    transform: none;
    opacity: 1;
    overflow: visible;
    transition: none;
    background: #111318;
    border: calc(1 * var(--stem-reference-unit)) solid #292d39;
    border-radius: calc(18 * var(--stem-reference-unit));
    padding: calc(20 * var(--stem-reference-unit));
    margin: calc(14 * var(--stem-reference-unit)) 0;
    box-shadow: 0 calc(12 * var(--stem-reference-unit)) calc(35 * var(--stem-reference-unit)) #0008;
}

#stemEngineMount .head {
    font-size: calc(12 * var(--stem-reference-unit));
    letter-spacing: calc(3 * var(--stem-reference-unit));
    color: #9da4b5;
    margin-bottom: calc(14 * var(--stem-reference-unit));
}

#app > #floatingStatus.floating {
    --stem-reference-unit: 1px;
    position: fixed;
    left: calc(12 * var(--stem-reference-unit));
    bottom: calc(16 * var(--stem-reference-unit));
    transform: none;
    z-index: 999;
    border-radius: calc(999 * var(--stem-reference-unit));
    max-width: calc(100vw - calc(28 * var(--stem-reference-unit)));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 calc(8 * var(--stem-reference-unit)) calc(24 * var(--stem-reference-unit)) #0009;
}

#stemEngineMount .hidden {
    position: absolute;
    width: calc(1 * var(--stem-reference-unit));
    height: calc(1 * var(--stem-reference-unit));
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* ============================================================================
   STEM ENGINE | IMPORT CONTROLS
   ============================================================================ */

#stemEngineMount .source,#stemEngineMount .buttons {
    display: flex;
    gap: calc(10 * var(--stem-reference-unit));
    align-items: center;
    flex-wrap: wrap;
}

#stemEngineMount .file {
    position: absolute;
    width: calc(1 * var(--stem-reference-unit));
    height: calc(1 * var(--stem-reference-unit));
    opacity: 0;
    pointer-events: none;
}

#stemEngineMount .button {
    border: 0;
    border-radius: calc(10 * var(--stem-reference-unit));
    padding: calc(13 * var(--stem-reference-unit)) calc(15 * var(--stem-reference-unit));
    background: #f5f5f5;
    color: #090a0d;
    font-weight:500;
    letter-spacing: calc(.8 * var(--stem-reference-unit));
}

#stemEngineMount .button:disabled {
    opacity: .35;
}

/* ============================================================================
   STEM ENGINE | STEM CARDS
   ============================================================================ */

#stemEngineMount .matrix {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: calc(9 * var(--stem-reference-unit));
}

#stemEngineMount .stem {
    text-align: center;
    font-size: calc(11 * var(--stem-reference-unit));
    letter-spacing: calc(1.3 * var(--stem-reference-unit));
    min-width: 0;
}

#stemEngineMount .stemTitle {
    color: #ff7300;
}

#stemEngineMount .stem .buttons {
    flex-direction: column;
}

#stemEngineMount .mixChecks .stem {
    color: #eee;
}

#stemEngineMount .mixChecks input {
    accent-color: #ff7300;
}

#stemEngineMount .tiny {
    font-size: calc(11 * var(--stem-reference-unit));
    color: #8f96a8;
    margin-top: calc(8 * var(--stem-reference-unit));
    line-height: 1.5;
}

#stemEngineMount .good {
    color: #9fc99f;
}

#stemEngineMount .bad {
    color: #d98f8f;
}

#stemEngineMount .contract,#stemEngineMount .log {
    white-space: pre-wrap;
    background: #05060a;
    border: calc(1 * var(--stem-reference-unit)) solid #252936;
    border-radius: calc(10 * var(--stem-reference-unit));
    padding: calc(13 * var(--stem-reference-unit));
    font: calc(11 * var(--stem-reference-unit)) ui-monospace,SFMono-Regular,Menlo,monospace;
    color: #b8c0d2;
    line-height: 1.65;
}

#stemEngineMount .log {
    height: calc(500 * var(--stem-reference-unit));
    overflow: auto;
}

#stemEngineMount .warn {
    font-size: calc(12 * var(--stem-reference-unit));
    line-height: 1.6;
    color: #b7bdca;
    background: #0a0c11;
    border: calc(1 * var(--stem-reference-unit)) solid #292d39;
    border-radius: calc(10 * var(--stem-reference-unit));
    padding: calc(13 * var(--stem-reference-unit));
}

@media (min-width:761px) and (max-width:1366px){
    #stemEngineMount main {
        width: 100%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot {
        padding: calc(6 * var(--stem-reference-unit)) calc(12 * var(--stem-reference-unit)) calc(82 * var(--stem-reference-unit));
    }

    #stemEngineMount .panel {
        padding: calc(14 * var(--stem-reference-unit));
    }

    #stemEngineMount .matrix {
        grid-template-columns: repeat(4,minmax(0,1fr));
        gap: calc(6 * var(--stem-reference-unit));
    }

    #stemEngineMount .stem {
        padding: calc(10 * var(--stem-reference-unit)) calc(4 * var(--stem-reference-unit));
        letter-spacing: calc(.8 * var(--stem-reference-unit));
    }

    #stemEngineMount .stemTitle {
        font-size: calc(10 * var(--stem-reference-unit));
        letter-spacing: calc(.8 * var(--stem-reference-unit));
    }

    #stemEngineMount .stem .button {
        font-size: calc(9 * var(--stem-reference-unit));
        padding: calc(9 * var(--stem-reference-unit)) calc(3 * var(--stem-reference-unit));
    }

    #stemEngineMount .mixChecks .stem {
        font-size: calc(14 * var(--stem-reference-unit));
        font-weight:500;
    }

    #app > #floatingStatus.floating {
        bottom: calc(10 * var(--stem-reference-unit));
    }

    #stemEngineMount .source .button {
        height: calc(50 * var(--stem-reference-unit));
        flex: 1;
        min-width: 0;
    }
}

#stemEngineMount .stemEngineRoot.phoneOnly {
    padding: calc(10 * var(--stem-reference-unit)) calc(10 * var(--stem-reference-unit)) calc(72 * var(--stem-reference-unit));
    overflow-x: hidden;
}

#stemEngineMount .stemEngineRoot.phoneOnly main {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    overflow: visible;
}

#stemEngineMount .stemEngineRoot.phoneOnly .panel {
    padding: calc(12 * var(--stem-reference-unit));
    margin: calc(10 * var(--stem-reference-unit)) 0;
    border-radius: calc(14 * var(--stem-reference-unit));
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

#stemEngineMount .stemEngineRoot.phoneOnly .source {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(8 * var(--stem-reference-unit));
    width: 100%;
}

#stemEngineMount .stemEngineRoot.phoneOnly .source .button {
    height: calc(48 * var(--stem-reference-unit));
    width: 100%;
    min-width: 0;
    font-size: calc(13 * var(--stem-reference-unit));
    font-weight:500;
    border-radius: calc(10 * var(--stem-reference-unit));
    padding: 0 calc(10 * var(--stem-reference-unit));
    white-space: nowrap;
}

#stemEngineMount .stemEngineRoot.phoneOnly #run {
    display: none !important;
}

#stemEngineMount .stemEngineRoot.phoneOnly .matrix {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: calc(8 * var(--stem-reference-unit));
    width: 100%;
    margin-top: calc(10 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stemEngineRoot.phoneOnly .stem {
    padding: calc(11 * var(--stem-reference-unit)) calc(6 * var(--stem-reference-unit));
    letter-spacing: calc(.7 * var(--stem-reference-unit));
    border-radius: calc(11 * var(--stem-reference-unit));
    min-width: 0;
}

#stemEngineMount .stemEngineRoot.phoneOnly .stemTitle {
    font-size: calc(13 * var(--stem-reference-unit));
    font-weight:500;
    letter-spacing: calc(.9 * var(--stem-reference-unit));
    margin-bottom: calc(8 * var(--stem-reference-unit));
    color: #ff7300;
}

#stemEngineMount .stemEngineRoot.phoneOnly .stem .buttons {
    gap: calc(6 * var(--stem-reference-unit));
}

#stemEngineMount .stemEngineRoot.phoneOnly .stem .button {
    font-size: calc(11 * var(--stem-reference-unit));
    padding: calc(10 * var(--stem-reference-unit)) calc(4 * var(--stem-reference-unit));
    border-radius: calc(9 * var(--stem-reference-unit));
}

#stemEngineMount .stemEngineRoot.phoneOnly .tiny {
    font-size: calc(11 * var(--stem-reference-unit));
    line-height: 1.45;
}

#stemEngineMount .stemEngineRoot.phoneOnly .mixChecks {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: calc(8 * var(--stem-reference-unit));
    width: 100%;
    margin-bottom: calc(14 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stemEngineRoot.phoneOnly .mixChecks label.stem {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: calc(9 * var(--stem-reference-unit)) !important;
    color: #eee;
    font-size: calc(13 * var(--stem-reference-unit)) !important;
    font-weight:500;
    padding: calc(11 * var(--stem-reference-unit)) calc(8 * var(--stem-reference-unit));
    white-space: nowrap;
}

#stemEngineMount .stemEngineRoot.phoneOnly .mixChecks input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: calc(22 * var(--stem-reference-unit));
    height: calc(22 * var(--stem-reference-unit));
    min-width: calc(22 * var(--stem-reference-unit));
    margin: 0;
    border: calc(1.5 * var(--stem-reference-unit)) solid #ff7300;
    border-radius: calc(6 * var(--stem-reference-unit));
    background: #0b0d12;
    display: inline-grid;
    place-content: center;
    box-shadow: inset 0 0 0 calc(.5 * var(--stem-reference-unit)) rgba(255,115,0,.08);
}

#stemEngineMount .stemEngineRoot.phoneOnly .mixChecks input[type="checkbox"]::after {
    content: "";
    width: calc(6 * var(--stem-reference-unit));
    height: calc(12 * var(--stem-reference-unit));
    border-right: calc(2 * var(--stem-reference-unit)) solid #eee;
    border-bottom: calc(2 * var(--stem-reference-unit)) solid #eee;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    margin-top: calc(-2 * var(--stem-reference-unit));
}

#stemEngineMount .stemEngineRoot.phoneOnly .mixChecks input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
}

#stemEngineMount .stemEngineRoot.phoneOnly .buttons {
    gap: calc(8 * var(--stem-reference-unit));
    flex-wrap: wrap;
}

#stemEngineMount .stemEngineRoot.phoneOnly #buildMix,#stemEngineMount .stemEngineRoot.phoneOnly #previewMix,#stemEngineMount .stemEngineRoot.phoneOnly #downloadMix {
    min-height: calc(44 * var(--stem-reference-unit));
    font-size: calc(12 * var(--stem-reference-unit));
    padding: calc(10 * var(--stem-reference-unit)) calc(12 * var(--stem-reference-unit));
    margin-top: calc(2 * var(--stem-reference-unit)) !important;
    margin-bottom: calc(4 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stemEngineRoot.phoneOnly .mixAudioLab {
    display: flex !important;
    justify-content: center !important;
    margin-top: calc(14 * var(--stem-reference-unit)) !important;
    margin-bottom: calc(4 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stemEngineRoot.phoneOnly .contract,#stemEngineMount .stemEngineRoot.phoneOnly .log {
    font-size: calc(10 * var(--stem-reference-unit));
    overflow-wrap: anywhere;
}

#stemEngineMount main>.panel:first-of-type {
    border-radius: 0 !important;
}

#stemEngineMount main>.panel:first-of-type #fileState {
    margin-top: calc(9 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stemEngineRoot.phoneOnly main>.panel:first-of-type .source {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: calc(8 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stemEngineRoot {
    background: #000 !important;
}

#stemEngineMount main {
    width: 100% !important;
    max-width: calc(1180 * var(--stem-reference-unit)) !important;
    margin: 0 auto !important;
}

#stemEngineMount main>.panel:first-of-type {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 calc(28 * var(--stem-reference-unit)) !important;
}

#stemEngineMount main>.panel:first-of-type .source {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: calc(14 * var(--stem-reference-unit)) !important;
    flex-wrap: wrap !important;
}

#stemEngineMount main>.panel:nth-of-type(2) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#stemEngineMount #run {
    display: none !important;
}

#stemEngineMount main>.panel:nth-of-type(2)>.matrix {
    margin-top: 0 !important;
    gap: calc(12 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stem {
    background: #0b0d12 !important;
    border: calc(1 * var(--stem-reference-unit)) solid #292d39 !important;
    border-radius: calc(14 * var(--stem-reference-unit)) !important;
    padding: calc(18 * var(--stem-reference-unit)) calc(12 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stemTitle {
    letter-spacing: calc(1.5 * var(--stem-reference-unit)) !important;
    margin-bottom: calc(14 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .stem-vocals .stemTitle {
    color: #ff7300 !important;
}

#stemEngineMount .stem-bass .stemTitle {
    color: #ff7300 !important;
}

#stemEngineMount .stem-drums .stemTitle {
    color: #ff7300 !important;
}

#stemEngineMount .stem-other .stemTitle {
    color: #ff7300 !important;
}

#stemEngineMount .stem .buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: calc(8 * var(--stem-reference-unit)) !important;
    align-items: stretch !important;
}

#stemEngineMount .stem .button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: calc(44 * var(--stem-reference-unit)) !important;
    padding: calc(10 * var(--stem-reference-unit)) calc(8 * var(--stem-reference-unit)) !important;
    border: calc(1 * var(--stem-reference-unit)) solid #242830 !important;
    border-radius: calc(11 * var(--stem-reference-unit)) !important;
    background: #111318 !important;
    color: #f5f5f5 !important;
    font-size: calc(11 * var(--stem-reference-unit)) !important;
    font-weight:500 !important;
    letter-spacing: .08em !important;
}

#stemEngineMount #progress {
    letter-spacing: .03em !important;
    margin: calc(24 * var(--stem-reference-unit)) auto calc(12 * var(--stem-reference-unit)) !important;
}

/* ============================================================================
   STEM ENGINE | CANONICAL SECTION INTRODUCTIONS
   ============================================================================ */

#stemEngineMount .stemSectionIntroduction > h2,
#stemEngineMount .stemSectionIntroduction > p {
    box-sizing: border-box;
    width: 100%;
    padding-inline: 0;
    margin-inline: auto;
    text-align: center;
}

#stemEngineMount .mixComboPanel {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: calc(38 * var(--stem-reference-unit)) 0 0 !important;
    margin: 0 !important;
}

#stemEngineMount .mixChecks {
    gap: calc(12 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .mixChecks .stem {
    min-height: calc(64 * var(--stem-reference-unit)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: calc(10 * var(--stem-reference-unit)) !important;
    letter-spacing: .12em !important;
}

#stemEngineMount .mix-vocals {
    border-color: rgba(255,115,0,.72) !important;
}

#stemEngineMount .mix-bass {
    border-color: rgba(255,115,0,.72) !important;
}

#stemEngineMount .mix-drums {
    border-color: rgba(255,115,0,.72) !important;
}

#stemEngineMount .mix-other {
    border-color: rgba(255,115,0,.72) !important;
}

#stemEngineMount .mix-vocals input {
    accent-color: #ff7300 !important;
}

#stemEngineMount .mix-bass input {
    accent-color: #ff7300 !important;
}

#stemEngineMount .mix-drums input {
    accent-color: #ff7300 !important;
}

#stemEngineMount .mix-other input {
    accent-color: #ff7300 !important;
}

#stemEngineMount #buildMix {
    grid-column: 1 / -1 !important;
    min-height: calc(50 * var(--stem-reference-unit)) !important;
    color: #fff !important;
    border: calc(1 * var(--stem-reference-unit)) solid #ff7300 !important;
    background: #111318 !important;
}

#stemEngineMount #previewMix,#stemEngineMount #downloadMix {
    min-height: calc(48 * var(--stem-reference-unit)) !important;
    background: #111318 !important;
    color: #f5f5f5 !important;
    border: calc(1 * var(--stem-reference-unit)) solid #ff7300 !important;
}

#app > #floatingStatus.floating {
    min-width: calc(132 * var(--stem-reference-unit)) !important;
    padding: calc(14 * var(--stem-reference-unit)) calc(24 * var(--stem-reference-unit)) !important;
    border: calc(1 * var(--stem-reference-unit)) solid transparent !important;
    background: #111318 !important;
    color: #fff !important;
    font-size: calc(16 * var(--stem-reference-unit)) !important;
    font-weight:500 !important;
    letter-spacing: .14em !important;
    text-align: center !important;
}

@media (max-width:760px){
    #stemEngineMount main {
        max-width: none !important;
    }

    #stemEngineMount main>.panel:first-of-type .source {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: calc(8 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .matrix {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }

    #stemEngineMount #progress {
        font-size: calc(18 * var(--stem-reference-unit)) !important;
    }
}

#stemEngineMount main>.panel:nth-child(2) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 calc(26 * var(--stem-reference-unit)) !important;
}

#stemEngineMount main>.panel:nth-child(2) .source {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: calc(14 * var(--stem-reference-unit)) !important;
    flex-wrap: wrap !important;
}

#stemEngineMount main>.panel:nth-child(3) {
    border-radius: 0 !important;
    margin: 0 !important;
}

#stemEngineMount main>.panel:nth-child(3)>.matrix {
    margin-top: 0 !important;
}

#stemEngineMount .mixComboPanel>.buttons {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    margin: calc(18 * var(--stem-reference-unit)) auto 0 !important;
}

#stemEngineMount #buildMix,#stemEngineMount #previewMix,#stemEngineMount #downloadMix {
    grid-column: auto !important;
    font-weight:500 !important;
    letter-spacing: .04em !important;
}

@media (max-width:760px){
    #stemEngineMount main>.panel:nth-child(2) .source {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: calc(8 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .mixComboPanel>.buttons {
        grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    }
}

#stemEngineMount .stem .head {
    font-size: calc(20 * var(--stem-reference-unit)) !important;
    letter-spacing: .12em !important;
}

#stemEngineMount .stem {
    padding-bottom: calc(18 * var(--stem-reference-unit)) !important;
}

#stemEngineMount #buildMix,#stemEngineMount #previewMix,#stemEngineMount #downloadMix {
    padding: 0 calc(22 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .mixAudioLab {
    display: flex !important;
    justify-content: center !important;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}

@media (max-width:760px){
    #stemEngineMount .stem .head {
        font-size: calc(16 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .mixComboPanel>.buttons {
        width: 100% !important;
        gap: calc(8 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount #buildMix,#stemEngineMount #previewMix,#stemEngineMount #downloadMix {
        min-height: calc(50 * var(--stem-reference-unit)) !important;
        padding: 0 calc(8 * var(--stem-reference-unit)) !important;
        font-size: calc(11 * var(--stem-reference-unit)) !important;
    }

}

#stemEngineMount main>.panel:nth-child(2) {
    margin-bottom: calc(34 * var(--stem-reference-unit)) !important;
}

#stemEngineMount main>.panel:nth-child(3) {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#stemEngineMount main>.panel:nth-child(3)>.matrix {
    margin-bottom: calc(20 * var(--stem-reference-unit)) !important;
}

#stemEngineMount #progress {
    margin-top: calc(32 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .mixComboPanel>.buttons {
    width: min(100%,calc(760 * var(--stem-reference-unit))) !important;
    gap: calc(14 * var(--stem-reference-unit)) !important;
}

#stemEngineMount #buildMix,#stemEngineMount #previewMix,#stemEngineMount #downloadMix {
    min-height: calc(56 * var(--stem-reference-unit)) !important;
}

@media (max-width:760px){
    #stemEngineMount main>.panel:nth-child(2) {
        margin-bottom: calc(24 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount main>.panel:nth-child(3)>.matrix {
        margin-bottom: calc(14 * var(--stem-reference-unit)) !important;
    }
}

#stemEngineMount #progress {
    margin-bottom: calc(8 * var(--stem-reference-unit)) !important;
}

#stemEngineMount .mixComboPanel {
    margin-top: calc(6 * var(--stem-reference-unit)) !important;
}

/* STEM ENGINE | SOUND STUDIO | SECTION SEPARATION */
#stemEngineMount .mixComboPanel.stemStudioIntroduction {
    margin-top: calc(38 * var(--stem-reference-unit)) !important;
}

@media (max-width:760px){
    #stemEngineMount #progress {
        margin-bottom: calc(7 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .mixComboPanel {
        margin-top: calc(4 * var(--stem-reference-unit)) !important;
    }

}

#stemEngineMount .mixChecks input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: calc(22 * var(--stem-reference-unit)) !important;
    height: calc(22 * var(--stem-reference-unit)) !important;
    min-width: calc(22 * var(--stem-reference-unit)) !important;
    margin: 0 !important;
    border: calc(1 * var(--stem-reference-unit)) solid currentColor !important;
    border-radius: calc(6 * var(--stem-reference-unit)) !important;
    background: #0b0d12 !important;
    display: inline-grid !important;
    place-content: center !important;
    box-shadow: none !important;
}

#stemEngineMount .mixChecks input[type="checkbox"]::after {
    content: "" !important;
    width: calc(6 * var(--stem-reference-unit)) !important;
    height: calc(11 * var(--stem-reference-unit)) !important;
    border-right: calc(2 * var(--stem-reference-unit)) solid currentColor !important;
    border-bottom: calc(2 * var(--stem-reference-unit)) solid currentColor !important;
    transform: rotate(45deg) scale(0) !important;
    transform-origin: center !important;
    margin-top: calc(-2 * var(--stem-reference-unit)) !important;
    transition: transform .12s ease !important;
}

#stemEngineMount .mixChecks input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1) !important;
}

#stemEngineMount .mix-vocals input[type="checkbox"] {
    color: #ff7300 !important;
}

#stemEngineMount .mix-bass input[type="checkbox"] {
    color: #ff7300 !important;
}

#stemEngineMount .mix-drums input[type="checkbox"] {
    color: #ff7300 !important;
}

#stemEngineMount .mix-other input[type="checkbox"] {
    color: #ff7300 !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly main>.panel:nth-child(2) {
        margin-bottom: calc(22 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly .mixComboPanel {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        padding-top: calc(18 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly .mixChecks {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
        gap: calc(9 * var(--stem-reference-unit)) !important;
        width: 100% !important;
        margin-bottom: calc(15 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly .mixChecks label.stem {
        min-height: calc(58 * var(--stem-reference-unit)) !important;
        padding: calc(10 * var(--stem-reference-unit)) calc(8 * var(--stem-reference-unit)) !important;
        justify-content: center !important;
        gap: calc(9 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly {
        padding-bottom: calc(38 * var(--stem-reference-unit)) !important;
    }
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly main>.panel:nth-child(3)>.matrix {
        margin-bottom: 0 !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly #progress {
        margin: calc(20 * var(--stem-reference-unit)) auto !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly .mixComboPanel>.buttons {
        width: 88% !important;
        max-width: calc(430 * var(--stem-reference-unit)) !important;
        margin: calc(12 * var(--stem-reference-unit)) auto 0 !important;
        display: grid !important;
        grid-template-columns: repeat(3,minmax(0,1fr)) !important;
        gap: calc(8 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly #buildMix,#stemEngineMount .stemEngineRoot.phoneOnly #previewMix,#stemEngineMount .stemEngineRoot.phoneOnly #downloadMix {
        min-width: 0 !important;
        width: 100% !important;
        min-height: calc(52 * var(--stem-reference-unit)) !important;
        padding: 0 calc(8 * var(--stem-reference-unit)) !important;
        font-size: 0 !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly #buildMix::after {
        content: "BUILD";
        font-size: calc(12 * var(--stem-reference-unit));
    }

    #stemEngineMount .stemEngineRoot.phoneOnly #previewMix::after {
        content: "PLAY";
        font-size: calc(12 * var(--stem-reference-unit));
    }

    #stemEngineMount .stemEngineRoot.phoneOnly #downloadMix::after {
        content: "SAVE";
        font-size: calc(12 * var(--stem-reference-unit));
    }
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly #buildMix, #stemEngineMount .stemEngineRoot.phoneOnly #previewMix, #stemEngineMount .stemEngineRoot.phoneOnly #downloadMix {
        border-radius: calc(999 * var(--stem-reference-unit)) !important;
    }
}

#stemEngineMount #progress.offlineState::after {
    content: none !important;
}

#stemEngineMount .engineNotice {
    margin: calc(12 * var(--stem-reference-unit)) auto calc(14 * var(--stem-reference-unit)) !important;
    max-width: calc(760 * var(--stem-reference-unit)) !important;
    text-align: center !important;
    line-height: 1.55 !important;
}

#stemEngineMount .engineNoticeTitle {
    display: block !important;
    margin-bottom: calc(6 * var(--stem-reference-unit)) !important;
    font-size: calc(18 * var(--stem-reference-unit)) !important;
    letter-spacing: .08em !important;
    background: #111318 !important;
    background-clip: text !important;
    color: #ff7300 !important;
    -webkit-text-fill-color: #ff7300 !important;
}

#stemEngineMount .engineNoticeBody {
    display: block !important;
    font-size: calc(16 * var(--stem-reference-unit)) !important;
    line-height: 1.55 !important;
}

@media (max-width:760px){
    #stemEngineMount .engineNoticeTitle {
        font-size: calc(16 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .engineNoticeBody {
        font-size: calc(14 * var(--stem-reference-unit)) !important;
    }
}

#stemEngineMount #progress {
    font-size: calc(15 * var(--stem-reference-unit)) !important;
    font-weight: 500 !important;
}

#stemEngineMount #progress.idleState {
    font-size: calc(18 * var(--stem-reference-unit)) !important;
    font-weight: 500 !important;
}

#stemEngineMount .engineNoticeTitle {
    font-weight: 500 !important;
}

#stemEngineMount .engineNoticeBody {
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    color: #a7abb3 !important;
    -webkit-text-fill-color: #a7abb3 !important;
    font-weight: 400 !important;
}

#stemEngineMount #progress,#stemEngineMount #progress.idleState,#stemEngineMount .engineNoticeTitle {
    font-size: calc(18 * var(--stem-reference-unit)) !important;
    font-weight: 500 !important;
}

#stemEngineMount .stem.stem-vocals,#stemEngineMount .stem.stem-bass,#stemEngineMount .stem.stem-drums,#stemEngineMount .stem.stem-other {
    border: 0 !important;
    box-shadow: none !important;
}

#stemEngineMount .stem.stem-vocals .button,#stemEngineMount .stem.stem-bass .button,#stemEngineMount .stem.stem-drums .button,#stemEngineMount .stem.stem-other .button {
    border-radius: calc(999 * var(--stem-reference-unit)) !important;
    border: calc(1 * var(--stem-reference-unit)) solid rgba(255,255,255,.075) !important;
}

#stemEngineMount .stem.stem-vocals .button:disabled,#stemEngineMount .stem.stem-bass .button:disabled,#stemEngineMount .stem.stem-drums .button:disabled,#stemEngineMount .stem.stem-other .button:disabled {
    opacity: .46 !important;
}

#stemEngineMount .stem.stem-vocals .button:not(:disabled),#stemEngineMount .stem.stem-bass .button:not(:disabled),#stemEngineMount .stem.stem-drums .button:not(:disabled),#stemEngineMount .stem.stem-other .button:not(:disabled) {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

#stemEngineMount .stem.stem-vocals .button,#stemEngineMount .stem.stem-bass .button,#stemEngineMount .stem.stem-drums .button,#stemEngineMount .stem.stem-other .button {
    background: #111318 !important;
    border-color: rgba(255,255,255,.085) !important;
    box-shadow: inset 0 calc(1 * var(--stem-reference-unit)) 0 rgba(255,255,255,.022),0 0 calc(13 * var(--stem-reference-unit)) rgba(255,115,0,.035) !important;
}

#stemEngineMount .stem.stem-vocals .button:not(:disabled):hover,#stemEngineMount .stem.stem-bass .button:not(:disabled):hover,#stemEngineMount .stem.stem-drums .button:not(:disabled):hover,#stemEngineMount .stem.stem-other .button:not(:disabled):hover,#stemEngineMount .stem.stem-vocals .button:not(:disabled):active,#stemEngineMount .stem.stem-bass .button:not(:disabled):active,#stemEngineMount .stem.stem-drums .button:not(:disabled):active,#stemEngineMount .stem.stem-other .button:not(:disabled):active {
    background: #111318 !important;
    border-color: rgba(255,255,255,.115) !important;
}

#stemEngineMount .mixChecks .stem {
    background: #0b0d12 !important;
    border: 0 !important;
    box-shadow: none !important;
}

#stemEngineMount #buildMix,#stemEngineMount #previewMix,#stemEngineMount #downloadMix {
    border-radius: calc(999 * var(--stem-reference-unit)) !important;
    border: calc(1 * var(--stem-reference-unit)) solid #ff7300 !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background: #111318 !important;
    box-shadow: inset 0 calc(1 * var(--stem-reference-unit)) 0 rgba(255,255,255,.022),0 0 calc(13 * var(--stem-reference-unit)) rgba(255,115,0,.035) !important;
}

#stemEngineMount #buildMix:disabled,#stemEngineMount #previewMix:disabled,#stemEngineMount #downloadMix:disabled {
    opacity: .46 !important;
}

#stemEngineMount #buildMix:not(:disabled):hover,#stemEngineMount #previewMix:not(:disabled):hover,#stemEngineMount #downloadMix:not(:disabled):hover,#stemEngineMount #buildMix:not(:disabled):active,#stemEngineMount #previewMix:not(:disabled):active,#stemEngineMount #downloadMix:not(:disabled):active {
    border-color: #ff7300 !important;
    background: #1b1e24 !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly .mixChecks label.stem {
        border: 0 !important;
        box-shadow: none !important;
        background: #0b0d12 !important;
    }
}

#stemEngineMount .stem.stem-vocals .button,#stemEngineMount .stem.stem-bass .button,#stemEngineMount .stem.stem-drums .button,#stemEngineMount .stem.stem-other .button,#stemEngineMount .stem.stem-vocals .button:not(:disabled):hover,#stemEngineMount .stem.stem-bass .button:not(:disabled):hover,#stemEngineMount .stem.stem-drums .button:not(:disabled):hover,#stemEngineMount .stem.stem-other .button:not(:disabled):hover,#stemEngineMount .stem.stem-vocals .button:not(:disabled):active,#stemEngineMount .stem.stem-bass .button:not(:disabled):active,#stemEngineMount .stem.stem-drums .button:not(:disabled):active,#stemEngineMount .stem.stem-other .button:not(:disabled):active {
    border: 0 !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly main>.panel:nth-child(2) .source {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
        gap: calc(8 * var(--stem-reference-unit)) !important;
        width: 100% !important;
        align-items: stretch !important;
    }

}

#stemEngineMount .stemTitle,#stemEngineMount .mixChecks .stem {
    font-size: calc(14 * var(--stem-reference-unit)) !important;
    font-weight: 500 !important;
}

#stemEngineMount .mixAudioLab {
    margin-top: calc(32 * var(--stem-reference-unit)) !important;
    padding-top: 0 !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly .stemTitle,#stemEngineMount .stemEngineRoot.phoneOnly .mixChecks label.stem {
        font-size: calc(14 * var(--stem-reference-unit)) !important;
        font-weight: 500 !important;
        letter-spacing: calc(.9 * var(--stem-reference-unit)) !important;
    }
}

#stemEngineMount #progress {
    margin-left: auto !important;
    margin-right: auto !important;
}

#stemEngineMount #fileState {
    display: none !important;
}

#stemEngineMount main>.panel:first-of-type #progress {
    width: fit-content !important;
    max-width: 100% !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
}

#stemEngineMount main>.panel:nth-child(2) {
    margin-top: calc(22 * var(--stem-reference-unit)) !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly main>.panel:nth-child(2) {
        margin-top: calc(18 * var(--stem-reference-unit)) !important;
    }
}

#stemEngineMount #progress {
    width: 100% !important;
    max-width: 100% !important;
    background: none !important;
    background-clip: text !important;
    color: #ff7300 !important;
    -webkit-text-fill-color: #ff7300 !important;
    text-align: center !important;
}

#stemEngineMount main>.panel:first-of-type #progress {
    margin-top: calc(28 * var(--stem-reference-unit)) !important;
    margin-bottom: 0 !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly main>.panel:first-of-type #progress {
        margin-top: calc(14 * var(--stem-reference-unit)) !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
}

@media (min-width:761px) and (max-width:1366px){
    #stemEngineMount main>.panel:nth-child(2) #progress {
        margin-top: 0 !important;
        padding-top: calc(28 * var(--stem-reference-unit)) !important;
        margin-bottom: 0 !important;
    }
}

#stemEngineMount #progress:not(.offlineState) {
    background: none !important;
    background-image: none !important;
    color: #a7abb3 !important;
    -webkit-text-fill-color: #a7abb3 !important;
}

/* Selected WAV name and prompt: white, with the original orange START ENGINE. */
#stemEngineMount #progress.idleState:not(.offlineState) > span:first-child:not(:last-child):not(.stem-progress-accent):not(.audio-operation-spinner) {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

#stemEngineMount #progress .stem-progress-accent {
    color: #ff7300;
    -webkit-text-fill-color: #ff7300;
}

#stemEngineMount .stemTitle {
    font-size: calc(17 * var(--stem-reference-unit)) !important;
    font-weight:500 !important;
}

#stemEngineMount .mixChecks .stem {
    font-size: calc(17 * var(--stem-reference-unit)) !important;
    font-weight: 500 !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly .stemTitle {
        font-size: calc(17 * var(--stem-reference-unit)) !important;
        font-weight:500 !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly .mixChecks label.stem {
        font-size: calc(17 * var(--stem-reference-unit)) !important;
        font-weight: 500 !important;
    }
}

#stemEngineMount #buildMix,#stemEngineMount #previewMix,#stemEngineMount #downloadMix {
    font-size: calc(16 * var(--stem-reference-unit)) !important;
}

@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly #buildMix::after,#stemEngineMount .stemEngineRoot.phoneOnly #previewMix::after,#stemEngineMount .stemEngineRoot.phoneOnly #downloadMix::after {
        font-size: calc(16 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .stemEngineRoot.phoneOnly .mixAudioLab {
        margin-top: calc(26 * var(--stem-reference-unit)) !important;
    }

    #stemEngineMount .stemEngineRoot main>.panel:nth-child(2) #progress {
        display: block !important;
        margin: calc(28 * var(--stem-reference-unit)) auto 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        line-height: 1.35 !important;
        text-align: center !important;
    }

    #stemEngineMount .stemEngineRoot main>.panel:nth-child(2) {
        margin-bottom: calc(24 * var(--stem-reference-unit)) !important;
    }
}

@media (min-width:1367px) and (orientation:landscape){
    #stemEngineMount main>.panel:nth-child(2) #progress {
        display: block !important;
        margin: 0 auto !important;
        padding-top: calc(28 * var(--stem-reference-unit)) !important;
        padding-bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        line-height: 1.35 !important;
        text-align: center !important;
    }

    #stemEngineMount main>.panel:nth-child(2) {
        margin-bottom: calc(24 * var(--stem-reference-unit)) !important;
    }
}

#stemEngineMount .stem-center-actions {
    justify-content: center;
}

#stemEngineMount .stem-primary-run {
    min-width: calc(320 * var(--stem-reference-unit));
    height: calc(50 * var(--stem-reference-unit));
    font-size: calc(14 * var(--stem-reference-unit));
    font-weight:500;
}

#stemEngineMount .stem-gap-top12 {
    margin-top: calc(12 * var(--stem-reference-unit));
}

#stemEngineMount .stem-gap-top18 {
    margin-top: calc(18 * var(--stem-reference-unit));
}

#stemEngineMount .stem-mix-actions {
    margin-top: calc(12 * var(--stem-reference-unit));
    justify-content: center;
}

#stemEngineMount .stem-internal-hidden {
    display: none;
}

#stemEngineMount .stem-source-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: calc(14 * var(--stem-reference-unit));
    max-width: calc(760 * var(--stem-reference-unit));
    margin-inline: auto;
}

#stemEngineMount .stem-import-row,
#stemEngineMount .stem-file-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: calc(12 * var(--stem-reference-unit));
    width: 100%;
}

#stemEngineMount .stem-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#stemEngineMount .stem-link-input {
    flex: 1 1 auto;
    min-width: 0;
    height: calc(50 * var(--stem-reference-unit));
    padding: 0 calc(20 * var(--stem-reference-unit));
    border: calc(1 * var(--stem-reference-unit)) solid #38383e;
    border-radius: calc(999 * var(--stem-reference-unit));
    background: #17181d;
    color: #ffffff;
    font: inherit;
    font-size: calc(15 * var(--stem-reference-unit));
}

#stemEngineMount .stem-link-input::placeholder {
    color: #a7a7ad;
}

#stemEngineMount .stem-import-action,
#stemEngineMount .stem-choose-action,
#stemEngineMount .stem-start-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    min-height: calc(50 * var(--stem-reference-unit));
    padding: 0 calc(22 * var(--stem-reference-unit));
    border: calc(1 * var(--stem-reference-unit)) solid #26272c;
    border-radius: calc(10 * var(--stem-reference-unit));
    background: #17181d;
    color: #ffffff;
    font: inherit;
    font-size: calc(16 * var(--stem-reference-unit));
    font-weight:500;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

#stemEngineMount .stem-choose-action,
#stemEngineMount .stem-start-action {
    flex: 1 1 0;
}

#stemEngineMount .stem-start-action {
    background: #ff7300;
    border-color: #ff7300;
    color: #ffffff;
}

#stemEngineMount .stem-import-action:hover,
#stemEngineMount .stem-choose-action:hover {
    background: #25262c;
}

#stemEngineMount .stem-start-action:hover:not(:disabled) {
    background: #ff7300;
}

#stemEngineMount .stem-start-action:disabled {
    opacity: .45;
    cursor: not-allowed;
}

#stemEngineMount .stem-link-input:focus-visible,
#stemEngineMount .stem-import-action:focus-visible,
#stemEngineMount .stem-choose-action:focus-visible,
#stemEngineMount .stem-start-action:focus-visible {
    outline: calc(2 * var(--stem-reference-unit)) solid #ff7300;
    outline-offset: calc(3 * var(--stem-reference-unit));
}

#stemEngineMount .stem-import-state {
    color: #a7a7ad;
    text-align: center;
    font-size: calc(12 * var(--stem-reference-unit));
    line-height: 1.5;
}

#stemEngineMount .stemEngineRoot.phoneOnly .stem-source-toolbar {
    width: 100%;
    max-width: 100%;
}

#stemEngineMount .stemEngineRoot.phoneOnly .stem-import-row,
#stemEngineMount .stemEngineRoot.phoneOnly .stem-file-row {
    gap: calc(8 * var(--stem-reference-unit));
}

#stemEngineMount .stemEngineRoot.phoneOnly .stem-link-input {
    padding-inline: calc(12 * var(--stem-reference-unit));
    font-size: 16px;
}

#stemEngineMount .stemEngineRoot.phoneOnly .stem-import-action,
#stemEngineMount .stemEngineRoot.phoneOnly .stem-choose-action,
#stemEngineMount .stemEngineRoot.phoneOnly .stem-start-action {
    min-height: calc(48 * var(--stem-reference-unit));
    padding-inline: calc(10 * var(--stem-reference-unit));
    font-size: calc(14 * var(--stem-reference-unit));
}

@media (min-width:1400px) and (orientation:landscape){
    #app > #floatingStatus.floating {
        --stem-reference-unit: 0.078125vw;
    }

    #stemEngineMount {
        --stem-reference-unit: 0.078125vw;
    }
}

/* STEM ENGINE | SOUND STUDIO | PHONE PORTRAIT SECTION SEPARATION */
@media (max-width:760px){
    #stemEngineMount .stemEngineRoot.phoneOnly .mixComboPanel.stemStudioIntroduction {
        margin-top: calc(38 * var(--stem-reference-unit)) !important;
    }
}

/* Suno IMPORT only: retain the existing charcoal action surface and geometry.
   ID specificity preserves the text color against the shared modal rule. */
#stemEngineMount #stemImport.stem-import-action { color: #ff7300 !important; }
