

/* Mobile Music Studio */

#mobile-fm-header {
    display:none;
}

@media(max-width:600px) {

    body {
        padding-top:calc(
            env(safe-area-inset-top, 0px) + 12px
        ) !important;

        padding-bottom:calc(
            env(safe-area-inset-bottom, 0px) + 24px
        ) !important;
    }

    body.fm-mobile-open {
        overflow:hidden !important;
    }

    #universe-music #music-panel[hidden] {
        display:none !important;
    }

    #universe-music #music-panel:not([hidden]) {

        position:fixed !important;

        top:auto !important;

        left:8px !important;

        right:8px !important;

        bottom:calc(
            env(safe-area-inset-bottom, 0px) + 8px
        ) !important;

        width:auto !important;

        max-width:none !important;

        min-width:0 !important;

        max-height:calc(
            100dvh - env(safe-area-inset-top, 0px)
            - env(safe-area-inset-bottom, 0px) - 24px
        ) !important;

        padding:16px !important;

        margin:0 !important;

        transform:none !important;

        box-sizing:border-box !important;

        border-radius:24px !important;

        background:var(--background,#17372c);

        overflow-y:auto !important;

        overflow-x:hidden !important;

        overscroll-behavior:contain;

        -webkit-overflow-scrolling:touch;

        z-index:10000 !important;

    }

    #mobile-fm-header {

        display:flex;

        position:sticky;

        top:0;

        align-items:center;

        justify-content:space-between;

        padding:12px 8px;

        background:#17372c;

        border-bottom:1px solid #dfc18a25;

        border-radius:12px;

        z-index:10;

        margin-bottom:12px;

    }

    #mobile-fm-header strong {

        font-size:20px;

        color:var(--gold,#dfc18a);

        font-family:Georgia,serif;

        font-weight:normal;

    }

    #mobile-fm-close {

        width:36px !important;

        height:36px !important;

        padding:0 !important;

        border-radius:50% !important;

        font-size:20px !important;

    }

    #fm-library {

        padding:12px !important;

        margin:0 0 18px !important;

        width:100% !important;

        box-sizing:border-box !important;

        border-radius:16px !important;

    }

    #fm-library > .subtitle {

        display:none !important;

    }

    #fm-library > h2 {

        font-size:19px !important;

        margin:8px 0 14px !important;

    }

    #fm-library .fm-tabs {

        display:grid !important;

        grid-template-columns:repeat(4,minmax(0,1fr));

        gap:5px !important;

    }

    #fm-library .fm-tabs button {

        font-size:10px !important;

        min-width:0 !important;

        padding:10px 3px !important;

        margin:0 !important;

        border-radius:9px !important;

        white-space:normal;

    }

    #fm-library .fm-search-row {

        display:flex !important;

        align-items:center;

        gap:8px !important;

        margin:12px 0 !important;

    }

    #fm-query {

        flex:1;

        min-width:0 !important;

        width:0 !important;

        font-size:16px !important;

        padding:10px !important;

    }

    #fm-search-btn {

        flex-shrink:0;

        width:auto !important;

        margin:0 !important;

    }

    #fm-region {

        width:100% !important;

        margin:4px 0 !important;

    }

    #fm-tags {

        display:flex;

        flex-wrap:wrap;

        gap:5px;

        margin:12px 0;

    }

    #fm-tags[hidden] {

        display:none !important;

    }

    #fm-tags button {

        width:auto !important;

        font-size:10px !important;

        padding:6px 9px !important;

        margin:0 !important;

        min-height:28px;

    }

    #fm-results {

        max-height:none !important;

        overflow:visible !important;

    }

    #music-panel .fm-song {

        padding:10px !important;

        margin:8px 0 !important;

        min-width:0;

        overflow-wrap:anywhere;

    }

    #music-panel h2 {

        font-size:23px !important;

    }

    #record-disc {

        width:110px !important;

        height:110px !important;

        margin:18px auto !important;

    }

    #bgm-audio {

        width:100% !important;

    }

    body.fm-mobile-open #music-toggle {

        visibility:hidden !important;

    }

    #music-toggle {

        padding:10px 15px !important;

        font-size:12px !important;

    }

    #music-picker {

        box-sizing:border-box !important;

        width:100% !important;

        max-width:100% !important;

        padding:12px !important;

        overflow-wrap:anywhere;

    }

    #music-picker[hidden] {

        display:none !important;

    }

    #music-picker .music-search-row {

        display:flex;

        gap:6px;

    }

    #music-query {

        min-width:0;

        flex:1;

        width:0 !important;

        font-size:16px !important;

    }

    #music-picker button {

        font-size:12px !important;

        padding:8px 10px !important;

    }

}



/* FM_THEME_FOLLOW_V3 */

@media(max-width:600px){

    #mobile-fm-header {

        background:inherit !important;

        color:inherit !important;

    }

    #mobile-fm-header h2,
    #mobile-fm-header h3,
    #mobile-fm-header button {

        color:inherit !important;

    }

}



/* FM_THEME_SYNC_V4 */

@media(max-width:600px){

    #universe-music #mobile-fm-header {

        background:var(--universe-bg,#17372c)
            !important;

        color:var(--cream,#fff1d8)
            !important;

        border-color:var(--gold,#dfc18a)
            !important;

    }

    #mobile-fm-header strong {

        color:var(--gold,#dfc18a)
            !important;

    }

    #mobile-fm-header button {

        background:transparent !important;

        color:var(--cream,#fff1d8)
            !important;

    }

}


