@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&display=swap');

:root {
    --snh-sfm-height-reserve: 108px;
    --snh-sfm-page-bg: #D7E2FB;
    --snh-sfm-blue: #0249FF;
    --snh-sfm-card: #FFFFFF;
    --snh-sfm-text: #202124;
    --snh-sfm-subtext: #6B7280;
}

html.snh-sfm-nav-busy { cursor: progress; }

body { padding-bottom: var(--snh-sfm-height-reserve); }

.snh-sfm-shell {
    position: fixed;
    z-index: 999990;
    left: 50%;
    bottom: 12px;
    width: min(760px, calc(100vw - 24px));
    transform: translateX(-50%);
    margin: 0;
    pointer-events: none;
}

.snh-sfm-player {
    box-sizing: border-box;
    width: 100%;
    min-height: 78px;
    padding: 12px 14px 11px 18px;
    border: 1px solid rgba(2, 73, 255, .09);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 26px rgba(31, 55, 95, .11);
    color: var(--snh-sfm-text);
    font-family: 'Roboto', 'Pretendard', 'Noto Sans KR', Arial, sans-serif;
    pointer-events: auto;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.snh-sfm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: stretch;
    column-gap: 14px;
    min-height: 54px;
}

.snh-sfm-info {
    display: grid;
    grid-template-rows: auto 30px;
    align-content: center;
    min-width: 0;
    row-gap: 6px;
}

.snh-sfm-title {
    min-width: 0;
    overflow: hidden;
    color: var(--snh-sfm-text);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.snh-sfm-spectrum {
    position: relative;
    width: 100%;
    height: 30px;
    min-width: 0;
    overflow: hidden;
}

.snh-sfm-spectrum canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.snh-sfm-spectrum.is-unavailable { opacity: .55; }

.snh-sfm-toggle,
.snh-sfm-toggle:hover,
.snh-sfm-toggle:focus,
.snh-sfm-toggle:focus-visible,
.snh-sfm-toggle:active {
    align-self: center;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--snh-sfm-blue) !important;
    box-shadow: 0 5px 14px rgba(2, 73, 255, .22) !important;
    outline: none;
    color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.snh-sfm-toggle:hover {
    background: #003FDF !important;
    box-shadow: 0 6px 17px rgba(2, 73, 255, .28) !important;
}

.snh-sfm-toggle:active { transform: scale(.96); }
.snh-sfm-toggle:focus-visible { outline: 3px solid rgba(2, 73, 255, .24); outline-offset: 3px; }
.snh-sfm-toggle i { display: block; font-size: 1.12rem; line-height: 1; }
.snh-sfm-toggle .fa-play { margin-left: 2px; }

.snh-sfm-player audio { display: none; }

.snh-sfm-nav-indicator {
    position: fixed;
    z-index: 999989;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--snh-sfm-blue);
    opacity: 0;
    pointer-events: none;
    transition: width .18s ease, opacity .18s ease;
}

html.snh-sfm-nav-busy .snh-sfm-nav-indicator {
    width: 72%;
    opacity: 1;
}

@media (max-width: 640px) {
    :root { --snh-sfm-height-reserve: 98px; }

    .snh-sfm-shell {
        bottom: max(9px, env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
    }

    .snh-sfm-player {
        min-height: 72px;
        padding: 10px 11px 9px 16px;
        border-radius: 18px;
    }

    .snh-sfm-layout {
        grid-template-columns: minmax(0, 1fr) 44px;
        column-gap: 12px;
        min-height: 50px;
    }

    .snh-sfm-info {
        grid-template-rows: auto 27px;
        row-gap: 5px;
    }

    .snh-sfm-title { font-size: .94rem; }
    .snh-sfm-spectrum { height: 27px; }

    .snh-sfm-toggle,
    .snh-sfm-toggle:hover,
    .snh-sfm-toggle:focus,
    .snh-sfm-toggle:focus-visible,
    .snh-sfm-toggle:active {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }

    .snh-sfm-toggle i { font-size: 1.04rem; }
}

@media (max-width: 380px) {
    .snh-sfm-player { padding-left: 14px; }
    .snh-sfm-layout { column-gap: 9px; }
    .snh-sfm-title { font-size: .91rem; }
}

@media (prefers-reduced-motion: reduce) {
    .snh-sfm-toggle,
    .snh-sfm-nav-indicator { transition: none; }
}
