
    body.sg-player-open { overflow: hidden !important; }

    .sg-player-layer {
        position: fixed;
        inset: 0;
        width: 100dvw;
        height: 100dvh;
        z-index: 10000;
        display: none;
        overflow: hidden;
        background: #000;
        direction: ltr;
        contain: strict;
        overscroll-behavior: none;
    }

    .sg-player-layer.show { display: block; }

    .sg-player-shell {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: #000;
        color: #fff;
        outline: none;
        user-select: none;
        touch-action: manipulation;
        font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    }

    .sg-player-shell.ui-hidden { cursor: none; }

    .sg-player-shell:fullscreen,
    .sg-player-shell:-webkit-full-screen {
        width: 100vw;
        height: 100vh;
        background: #000;
    }

    .sg-player-video {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
        max-width: none;
        max-height: none;
        background: #000;
        object-fit: cover;
        object-position: center center;
        transform: translateZ(0);
        will-change: auto;
    }

    .sg-player-shell.fit-cover .sg-player-video { object-fit: cover !important; }
    .sg-player-shell.fit-fill .sg-player-video { object-fit: fill !important; }
    .sg-player-shell.fit-contain .sg-player-video { object-fit: contain !important; }
    .sg-player-shell.fit-scale-down .sg-player-video { object-fit: scale-down !important; }

    .sg-player-vignette {
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(180deg, transparent 0%, transparent 64%, rgba(0,0,0,.88) 100%);
        opacity: 1;
        transition: opacity .18s ease;
    }

    .sg-player-ui {
        transition: opacity .2s ease, transform .2s ease;
    }

    .sg-player-shell.ui-hidden .sg-player-ui,
    .sg-player-shell.ui-hidden .sg-player-vignette {
        opacity: 0;
        pointer-events: none;
    }

    .sg-player-shell.ui-hidden .sg-player-topbar { transform: translateY(-14px); }
    .sg-player-shell.ui-hidden .sg-player-controls { transform: translateY(16px); }
    .sg-player-shell.ui-hidden .sg-player-center { transform: translate(-50%, -50%) scale(.94); }

    .sg-player-shell.ui-hidden.is-buffering .sg-player-center {
        opacity: 1;
        pointer-events: none;
        transform: translate(-50%, -50%) scale(1);
    }

    .sg-player-shell.ui-hidden.is-buffering .sg-player-center > .sg-player-skip { opacity: 0; }
    .sg-player-shell.ui-hidden.is-buffering .sg-player-main-play { opacity: 0; }

    .sg-player-topbar {
        position: absolute;
        z-index: 5;
        top: 0;
        right: 0;
        left: 0;
        min-height: calc(58px + env(safe-area-inset-top, 0px));
        margin: 0;
        padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
        background: transparent !important;
        background-image: none !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        display: grid;
        grid-template-columns: auto minmax(180px, 1fr) auto;
        align-items: center;
        gap: 14px;
        direction: ltr;
    }

    .sg-player-heading {
        min-width: 0;
        display: grid;
        gap: 3px;
        direction: rtl;
        text-align: left;
    }

    .sg-player-heading strong {
        overflow: hidden;
        color: #fff;
        font-size: clamp(1rem, 1.45vw, 1.25rem);
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sg-player-heading span {
        overflow: hidden;
        color: rgba(255,255,255,.66);
        font-size: .78rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sg-player-top-actions,
    .sg-player-left-controls,
    .sg-player-right-controls {
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .sg-player-icon,
    .sg-player-skip,
    .sg-player-main-play {
        border: 0;
        color: #fff;
        cursor: pointer;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }

    .sg-player-icon {
        width: 42px;
        height: 42px;
        padding: 0;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: rgba(31,32,37,.82);
        transition: background .14s ease, transform .14s ease;
    }

    .sg-player-icon:hover { background: rgba(64,65,72,.92); }
    .sg-player-icon:active { transform: scale(.94); }
    .sg-player-icon:focus-visible, .sg-player-skip:focus-visible, .sg-player-main-play:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 3px; }
    .sg-player-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .sg-player-back { background: transparent !important; }

    .sg-player-topbar::before,
    .sg-player-topbar::after {
        content: none !important;
        display: none !important;
    }

    .sg-player-topbar .sg-player-icon,
    .sg-player-topbar .sg-player-select-wrap {
        background: transparent !important;
        background-image: none !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .sg-player-select-wrap {
        position: relative;
        min-width: 64px;
        height: 42px;
        padding: 0 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border-radius: 999px;
        background: rgba(31,32,37,.82);
        color: #fff;
        overflow: hidden;
    }

    .sg-player-select-wrap svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
    .sg-player-select-wrap span { font-size: .76rem; font-weight: 800; }
    .sg-player-select-wrap select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }

    .sg-player-center {
        position: absolute;
        z-index: 4;
        top: 50%;
        left: 50%;
        display: flex;
        align-items: center;
        gap: clamp(28px, 5vw, 72px);
        transform: translate(-50%, -50%);
    }

    .sg-player-center-host {
        position: relative;
        width: 76px;
        height: 76px;
        flex: 0 0 76px;
    }

    .sg-player-main-play,
    .sg-player-spinner {
        position: absolute;
        border-radius: 50%;
    }

    .sg-player-main-play {
        inset: 0;
        width: 76px;
        height: 76px;
        display: grid;
        place-items: center;
        background: linear-gradient(135deg, #F04AD8 0%, #9B4DFF 48%, #14D7FF 100%);
        box-shadow: 0 14px 36px rgba(155,77,255,.30);
        transition: opacity .14s ease, transform .14s ease;
    }

    .sg-player-main-play:hover { transform: scale(1.04); }
    .sg-player-main-play svg { width: 32px; height: 32px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
    .sg-player-main-play .sg-pause-glyph { display: none; fill: none; }
    .sg-player-shell.is-playing .sg-player-main-play .sg-play-glyph { display: none; }
    .sg-player-shell.is-playing .sg-player-main-play .sg-pause-glyph { display: block; }

    .sg-player-spinner {
        top: 6px;
        left: 6px;
        width: 64px;
        height: 64px;
        display: none;
        border: 3px solid rgba(255,255,255,.2);
        border-top-color: #9B4DFF;
        animation: sg-spin .72s linear infinite;
    }

    .sg-player-shell.is-buffering .sg-player-spinner { display: block; }
    .sg-player-shell.is-buffering .sg-player-main-play { opacity: 0; pointer-events: none; }
    @keyframes sg-spin { to { transform: rotate(360deg); } }

    .sg-player-skip {
        width: 58px;
        height: 58px;
        padding: 0;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: rgba(22,23,27,.78);
        transition: background .14s ease, transform .14s ease;
    }


    .sg-player-shell.is-live .sg-player-skip { opacity: .3; pointer-events: none; }
    .sg-player-shell.is-live #sgSeek { opacity: .45; cursor: default; }

    .sg-player-skip:hover { background: rgba(58,59,65,.9); }
    .sg-player-skip:active { transform: scale(.93); }
    .sg-player-skip svg { width: 31px; height: 31px; fill: none; stroke: #fff; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
    .sg-player-skip text { fill: #fff; stroke: none; font-size: 7px; font-weight: 800; text-anchor: middle; }


    .sg-player-controls {
        position: absolute;
        z-index: 5;
        right: 0;
        bottom: 0;
        left: 0;
        padding: 18px 20px 17px;
        direction: ltr;
    }

    .sg-player-timeline {
        display: grid;
        grid-template-columns: 58px minmax(100px, 1fr) 58px;
        align-items: center;
        gap: 10px;
        color: rgba(255,255,255,.82);
        font-size: .74rem;
        font-variant-numeric: tabular-nums;
    }

    .sg-player-timeline span:last-child { text-align: right; }

    .sg-player-timeline input,
    .sg-player-volume,
    .sg-player-brightness {
        accent-color: #9B4DFF;
        cursor: pointer;
    }

    #sgSeek {
        width: 100%;
        direction: ltr;
    }

    .sg-player-control-row {
        min-height: 50px;
        margin-top: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
    }

    .sg-player-play-small .sg-pause-glyph { display: none; fill: none; }
    .sg-player-shell.is-playing .sg-player-play-small .sg-play-glyph { display: none; }
    .sg-player-shell.is-playing .sg-player-play-small .sg-pause-glyph { display: block; }
    .sg-player-shell.is-muted .sg-volume-on { display: none; }
    .sg-player-shell:not(.is-muted) .sg-volume-off { display: none; }

    .sg-player-volume { width: 94px; }
    .sg-player-brightness { width: 82px; }

    .sg-player-badge {
        min-height: 28px;
        padding: 0 10px;
        display: inline-flex;
        align-items: center;
        border-radius: 7px;
        background: linear-gradient(135deg, #F04AD8 0%, #9B4DFF 48%, #14D7FF 100%);
        color: #fff;
        font-size: .67rem;
        font-weight: 900;
        direction: ltr;
    }

    .sg-player-quality-wrap {
        height: 38px;
        padding: 0 11px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        border-radius: 9px;
        background: rgba(31,32,37,.82);
        color: #fff;
        font-size: .72rem;
    }

    .sg-player-quality-wrap select {
        border: 0;
        outline: none;
        background: transparent;
        color: #fff;
        font: inherit;
        cursor: pointer;
    }

    .sg-player-quality-wrap option { color: #111; }


    .sg-player-toast {
        position: absolute;
        z-index: 9;
        right: 50%;
        bottom: 105px;
        max-width: min(560px, 76vw);
        padding: 10px 16px;
        border-radius: 10px;
        background: rgba(20,21,25,.94);
        color: #fff;
        font-size: .78rem;
        text-align: center;
        direction: rtl;
        opacity: 0;
        pointer-events: none;
        transform: translate(50%, 8px);
        transition: opacity .16s ease, transform .16s ease;
    }

    .sg-player-toast.show { opacity: 1; transform: translate(50%, 0); }

    @media (max-width: 860px) {
        .sg-player-topbar { grid-template-columns: auto minmax(120px, 1fr) auto; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; }
        .sg-player-top-actions .sg-player-select-wrap { display: none; }
        .sg-player-volume, .sg-player-brightness, #sgBrightnessButton { display: none; }
        .sg-player-quality-wrap span { display: none; }
        .sg-player-center { gap: 24px; }
        .sg-player-skip { width: 50px; height: 50px; }
        .sg-player-center-host, .sg-player-main-play { width: 66px; height: 66px; }
        .sg-player-spinner { top: 5px; left: 5px; width: 56px; height: 56px; }
        .sg-player-controls { padding-inline: 12px; }
    }

/* SPACEGATE_PLAYER_EXPERIENCE_V53_3 */
.sg-player-shell {
    --sg-accent-cyan: #1fd7ff;
    --sg-accent-blue: #3a7bff;
    --sg-accent-violet: #8f46ff;
    --sg-accent-magenta: #d74dff;
    --sg-ui-surface: rgba(14, 16, 24, .74);
    --sg-ui-border: rgba(255,255,255,.08);
    --sg-range-height: 4px;
    --sg-range-thumb: 13px;
    font-family: "Tajawal", "Noto Sans Arabic", "Segoe UI", Arial, sans-serif;
}

.sg-player-layer,
.sg-player-shell,
.sg-player-shell:fullscreen,
.sg-player-shell:-webkit-full-screen {
    height: var(--sg-app-vh, 100dvh);
}

.sg-player-topbar {
    min-height: calc(62px + env(safe-area-inset-top, 0px));
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 8px;
}

.sg-player-heading strong {
    font-family: "Tajawal", "Noto Sans Arabic", "Segoe UI", Arial, sans-serif;
    font-size: clamp(1.12rem, 1.8vw, 1.5rem);
    font-weight: 700;
    line-height: 1.15;
}

.sg-player-heading span {
    font-size: .85rem;
    color: rgba(255,255,255,.72);
}

.sg-player-icon,
.sg-player-select-wrap,
.sg-player-quality-wrap,
.sg-player-skip {
    border: 1px solid var(--sg-ui-border);
    background: var(--sg-ui-surface) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sg-player-main-play,
.sg-player-badge {
    background: linear-gradient(135deg, var(--sg-accent-magenta) 0%, var(--sg-accent-violet) 48%, var(--sg-accent-cyan) 100%);
    box-shadow: 0 14px 36px rgba(79, 114, 255, .25);
}

.sg-player-badge {
    min-width: 74px;
    justify-content: center;
    font-size: .72rem;
    letter-spacing: .02em;
}

.sg-player-spinner {
    border-top-color: var(--sg-accent-cyan);
    border-right-color: var(--sg-accent-violet);
    box-shadow: 0 0 18px rgba(31,215,255,.18);
}

.sg-player-sequence[hidden] { display: none !important; }
.sg-player-sequence:disabled { opacity: .38; cursor: default; }
.sg-player-sequence:not(:disabled):hover {
    color: var(--sg-accent-cyan);
    border-color: rgba(31,215,255,.34);
}

.sg-player-timeline input,
.sg-player-volume,
.sg-player-brightness {
    accent-color: var(--sg-accent-violet);
}

#sgSeek,
.sg-player-volume,
.sg-player-brightness {
    --sg-fill: 0%;
    --sg-buffered: 0%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

#sgSeek::-webkit-slider-runnable-track,
.sg-player-volume::-webkit-slider-runnable-track,
.sg-player-brightness::-webkit-slider-runnable-track {
    height: var(--sg-range-height);
    border-radius: 999px;
    background: linear-gradient(to right,
        var(--sg-accent-magenta) 0%,
        var(--sg-accent-violet) calc(var(--sg-fill) * .6),
        var(--sg-accent-cyan) var(--sg-fill),
        rgba(255,255,255,.20) var(--sg-fill),
        rgba(255,255,255,.20) var(--sg-buffered),
        rgba(255,255,255,.08) var(--sg-buffered),
        rgba(255,255,255,.08) 100%);
}

.sg-player-volume::-moz-range-track,
.sg-player-brightness::-moz-range-track,
#sgSeek::-moz-range-track {
    height: var(--sg-range-height);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
}

#sgSeek::-webkit-slider-thumb,
.sg-player-volume::-webkit-slider-thumb,
.sg-player-brightness::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--sg-range-thumb);
    height: var(--sg-range-thumb);
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(143,70,255,.25);
    margin-top: calc((var(--sg-range-height) - var(--sg-range-thumb)) / 2);
}

#sgSeek::-moz-range-thumb,
.sg-player-volume::-moz-range-thumb,
.sg-player-brightness::-moz-range-thumb {
    width: var(--sg-range-thumb);
    height: var(--sg-range-thumb);
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(143,70,255,.25);
}

.sg-player-volume { width: 88px; }
.sg-player-brightness { width: 76px; }

.sg-player-quality-wrap select,
.sg-player-select-wrap select { font-family: inherit; }

.sg-player-toast {
    background: rgba(11, 14, 21, .92);
    border: 1px solid rgba(255,255,255,.08);
}

.sg-player-shell.is-android-shell .sg-player-controls {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.sg-player-shell.is-android-shell .sg-player-topbar {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
}

@media (pointer: coarse) {
    .sg-player-controls { padding-inline: 14px; }
    .sg-player-control-row { min-height: 54px; }
    .sg-player-icon { width: 44px; height: 44px; }
    .sg-player-quality-wrap { height: 40px; }
}

@media (max-width: 860px) {
    .sg-player-topbar {
        grid-template-columns: auto minmax(140px, 1fr) auto;
        gap: 10px;
    }
    .sg-player-top-actions { gap: 5px; }
    .sg-player-top-actions .sg-player-sequence { display: grid; }
    .sg-player-heading strong { font-size: 1.05rem; }
    .sg-player-controls { padding-inline: 12px; }
    .sg-player-timeline { grid-template-columns: 50px minmax(80px, 1fr) 50px; }
    .sg-player-badge { min-width: 68px; }
}


/* SPACEGATE_WEB_PLAYER_HARDENING_R1 */
.sg-player-forensic-mark {
    position: absolute;
    z-index: 4;
    max-width: 34vw;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .09em;
    color: rgba(255,255,255,.32);
    background: rgba(0,0,0,.12);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 5px;
    padding: 4px 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
    transform: translate(-50%, -50%) rotate(-8deg);
    mix-blend-mode: screen;
    transition: left .45s ease, top .45s ease, opacity .2s ease;
}
.sg-player-forensic-mark[hidden] { display: none !important; }

/* SPACEGATE_MOBILE_SELECT_GUARD_R1
   Keep native select controls stable while Android/iOS opens the system picker. */
.sg-player-quality-wrap,
.sg-player-select-wrap {
    touch-action: auto;
}

.sg-player-quality-wrap select,
.sg-player-select-wrap select {
    touch-action: auto;
    pointer-events: auto;
    -webkit-user-select: auto;
    user-select: auto;
}

@media (pointer: coarse) {
    .sg-player-quality-wrap select,
    .sg-player-select-wrap select {
        min-height: 40px;
    }
}

/* SPACEGATE_MOBILE_TOP_SOURCE_MENU_R3
   Exact target: server/quality control directly beside 1X in the top bar. */
.sg-player-source-mobile-trigger {
    display: none;
    flex: 0 0 auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.sg-player-source-mobile-trigger svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.sg-player-shell.uses-mobile-source-sheet .sg-player-source-native {
    display: none !important;
}
.sg-player-shell.uses-mobile-source-sheet .sg-player-source-mobile-trigger {
    display: grid !important;
}
.sg-player-mobile-source-sheet {
    position: absolute;
    z-index: 96;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(66px + env(safe-area-inset-top, 0px)) 12px 12px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    direction: rtl;
    transition: opacity .12s ease, visibility .12s ease;
}
.sg-player-mobile-source-sheet.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
.sg-player-mobile-source-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0,0,0,.54);
    touch-action: none;
}
.sg-player-mobile-source-panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 460px);
    max-height: min(72dvh, 520px);
    padding: 10px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    background: rgba(12,14,20,.985);
    box-shadow: 0 18px 55px rgba(0,0,0,.48);
    overflow: hidden;
    touch-action: pan-y;
}
.sg-player-mobile-source-head {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 8px;
}
.sg-player-mobile-source-head strong {
    font-size: .94rem;
    font-weight: 900;
}
.sg-player-mobile-source-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    color: #fff;
    font: inherit;
    font-size: 1.45rem;
    line-height: 1;
    touch-action: manipulation;
}
.sg-player-mobile-source-list {
    max-height: calc(min(72dvh, 520px) - 58px);
    display: grid;
    gap: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
.sg-player-mobile-source-option {
    width: 100%;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: rgba(255,255,255,.055);
    color: #fff;
    font: inherit;
    font-size: .84rem;
    font-weight: 800;
    text-align: right;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.sg-player-mobile-source-option.selected {
    border-color: rgba(31,215,255,.72);
    background: rgba(31,215,255,.14);
    box-shadow: inset 0 0 0 1px rgba(143,70,255,.24);
}
.sg-player-shell.mobile-source-open .sg-player-ui {
    pointer-events: none;
}
.sg-player-shell.mobile-source-open .sg-player-mobile-source-sheet,
.sg-player-shell.mobile-source-open .sg-player-mobile-source-sheet * {
    pointer-events: auto;
}
@media (orientation: landscape) and (max-height: 600px) {
    .sg-player-mobile-source-sheet {
        padding-top: calc(52px + env(safe-area-inset-top, 0px));
    }
    .sg-player-mobile-source-panel {
        width: min(86vw, 640px);
        max-height: 78dvh;
    }
    .sg-player-mobile-source-list {
        max-height: calc(78dvh - 58px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* SPACEGATE_ANDROID_NATIVE_PLAYER_R4
   Touch-first Android player polish, compact glass source menu and cinematic fallback. */
.sg-player-shell {
    --sg-glass-bg: rgba(9, 13, 21, .58);
    --sg-glass-bg-strong: rgba(9, 13, 21, .76);
    --sg-glass-border: rgba(255,255,255,.13);
    --sg-glass-highlight: rgba(255,255,255,.18);
    --sg-accent-electric: #25c8ff;
    --sg-accent-deep: #675cff;
}

.sg-player-shell::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -4%;
    pointer-events: none;
    background-image:
        linear-gradient(180deg, rgba(2,5,10,.18), rgba(0,0,0,.50)),
        var(--sg-player-artwork, url('/app/assets/images/nova-player-cinematic-fallback.svg?v=player-nova-identity-r6-20260918'));
    background-size: cover;
    background-position: center;
    filter: blur(12px) saturate(1.08) brightness(.68);
    transform: scale(1.06);
    opacity: .92;
}
.sg-player-video {
    z-index: 1;
    background: transparent !important;
}
.sg-player-movi {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}
.sg-player-shell.is-movi .sg-player-video { display: none !important; }
/* Movi provides only the media surface; Nova owns every visible control. */
.sg-player-shell.is-movi .sg-player-movi { pointer-events: none; }
/* VOD reference renderer owns its controls, as in the Sep30 baseline. */
.sg-player-shell.is-movi.is-movi-vod-reference .sg-player-movi { pointer-events: auto; }
.sg-player-shell.is-movi.is-movi-vod-reference .sg-player-center,
.sg-player-shell.is-movi.is-movi-vod-reference .sg-player-controls { display: none !important; }
.sg-player-shell.is-movi.fit-cover .sg-player-movi { --sg-movi-fit: cover; }
.sg-player-shell.is-movi.fit-contain .sg-player-movi { --sg-movi-fit: contain; }
.sg-player-shell.is-movi.fit-fill .sg-player-movi { --sg-movi-fit: fill; }
.sg-player-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    z-index: 2;
}
.sg-player-embed[hidden] { display: none !important; }
.sg-player-shell.is-embed .sg-player-video,
.sg-player-shell.is-embed .sg-player-center,
.sg-player-shell.is-embed .sg-player-controls,
.sg-player-shell.is-embed .sg-player-brand-watermark { display: none !important; }
.sg-player-shell.is-embed .sg-player-vignette { display: none; }
.sg-player-vignette {
    z-index: 3;
    background:
      linear-gradient(180deg, rgba(0,0,0,.56) 0%, rgba(0,0,0,.08) 23%, transparent 47%, rgba(0,0,0,.14) 66%, rgba(0,0,0,.88) 100%);
}
.sg-player-brand-watermark { z-index: 4; }
.sg-player-topbar,
.sg-player-center,
.sg-player-controls { z-index: 8; }

/* Keep touch gestures native-feeling and stop browser panning from stealing vertical swipes. */
.sg-player-shell.has-native-touch-gestures .sg-player-video {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.sg-player-gesture-hud {
    position: absolute;
    z-index: 94;
    top: 50%;
    width: 64px;
    min-height: 154px;
    padding: 12px 10px 10px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(24,31,43,.66), rgba(5,8,14,.72));
    box-shadow: 0 18px 55px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
    backdrop-filter: blur(20px) saturate(145%);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(.94);
    transition: opacity .13s ease, transform .13s ease;
}
.sg-player-gesture-hud.is-volume {
    right: max(18px, calc(env(safe-area-inset-right, 0px) + 12px));
}
.sg-player-gesture-hud.is-brightness {
    left: max(18px, calc(env(safe-area-inset-left, 0px) + 12px));
}
.sg-player-gesture-hud.show {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
.sg-player-gesture-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
}
.sg-player-gesture-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sg-player-gesture-meter {
    position: relative;
    width: 7px;
    height: 70px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.13);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.sg-player-gesture-meter i {
    --sg-gesture-fill: 0%;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--sg-gesture-fill);
    border-radius: inherit;
    background: linear-gradient(180deg, var(--sg-accent-electric), #2a80ff 55%, var(--sg-accent-deep));
    box-shadow: 0 0 14px rgba(37,200,255,.42);
}
.sg-player-gesture-value {
    font-size: .72rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.sg-player-gesture-label {
    font-size: .61rem;
    color: rgba(255,255,255,.66);
    font-weight: 700;
}

/* R4: compact premium glass source/quality menu. */
.sg-player-mobile-source-sheet {
    z-index: 98;
    direction: ltr;
    align-items: flex-start;
    justify-content: flex-end;
    padding: calc(60px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px));
}
.sg-player-mobile-source-backdrop {
    background: rgba(0,0,0,.20);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.sg-player-mobile-source-panel {
    box-sizing: border-box;
    direction: rtl;
    width: min(78vw, 318px);
    max-height: min(64dvh, 420px);
    padding: 8px;
    border: 1px solid var(--sg-glass-border);
    border-radius: 16px;
    background:
      linear-gradient(150deg, rgba(255,255,255,.08), rgba(255,255,255,.015) 42%),
      var(--sg-glass-bg);
    box-shadow: 0 18px 55px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
}
.sg-player-mobile-source-head {
    min-height: 38px;
    gap: 8px;
    padding: 1px 3px 7px;
}
.sg-player-mobile-source-title {
    min-width: 0;
    display: grid;
    gap: 1px;
}
.sg-player-mobile-source-title strong {
    font-size: .82rem;
    line-height: 1.15;
    font-weight: 900;
}
.sg-player-mobile-source-title small {
    font-size: .60rem;
    color: rgba(255,255,255,.54);
    font-weight: 700;
}
.sg-player-mobile-source-close {
    width: 32px;
    height: 32px;
    border-color: rgba(255,255,255,.10);
    background: rgba(255,255,255,.055);
    font-size: 1.15rem;
}
.sg-player-mobile-source-list {
    max-height: calc(min(64dvh, 420px) - 51px);
    gap: 5px;
    padding: 1px;
    scrollbar-width: thin;
}
.sg-player-mobile-source-option {
    min-height: 44px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border-color: rgba(255,255,255,.075);
    border-radius: 11px;
    background: rgba(255,255,255,.045);
    font-size: .76rem;
    text-align: right;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.sg-player-mobile-source-option:active { transform: scale(.985); }
.sg-player-mobile-source-check {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.05);
    color: transparent;
    font-size: .70rem;
    font-weight: 900;
}
.sg-player-mobile-source-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}
.sg-player-mobile-source-copy strong {
    overflow: hidden;
    color: rgba(255,255,255,.96);
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sg-player-mobile-source-copy small {
    overflow: hidden;
    color: rgba(255,255,255,.50);
    font-size: .59rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sg-player-mobile-source-quality {
    min-width: 48px;
    padding: 4px 7px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 8px;
    background: rgba(255,255,255,.055);
    color: rgba(255,255,255,.78);
    font-size: .64rem;
    font-weight: 900;
    text-align: center;
    direction: ltr;
}
.sg-player-mobile-source-option.selected {
    border-color: rgba(37,200,255,.50);
    background: linear-gradient(135deg, rgba(37,200,255,.12), rgba(103,92,255,.10));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 5px 16px rgba(0,0,0,.12);
}
.sg-player-mobile-source-option.selected .sg-player-mobile-source-check {
    border-color: rgba(37,200,255,.65);
    background: linear-gradient(135deg, #25c8ff, #675cff);
    color: #fff;
}
.sg-player-mobile-source-option.selected .sg-player-mobile-source-quality {
    border-color: rgba(37,200,255,.38);
    background: rgba(37,200,255,.12);
    color: #e9fbff;
}

.sg-player-shell.mobile-source-open .sg-player-source-mobile-trigger {
    border-color: rgba(37,200,255,.48);
    background: linear-gradient(135deg, rgba(37,200,255,.15), rgba(103,92,255,.14)) !important;
    color: #ecfbff;
    box-shadow: 0 0 0 1px rgba(37,200,255,.08), 0 8px 24px rgba(0,0,0,.18);
}

/* Larger, clearer touch targets while keeping the top bar compact. */
@media (pointer: coarse) {
    .sg-player-ui { transition-duration: .16s; }
    .sg-player-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        -webkit-tap-highlight-color: transparent;
    }
    .sg-player-top-actions .sg-player-icon,
    .sg-player-top-actions .sg-player-select-wrap {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    .sg-player-select-wrap { min-width: 42px; }
    .sg-player-center { gap: clamp(22px, 7vw, 44px); }
    .sg-player-center-host,
    .sg-player-main-play {
        width: clamp(84px, 13dvh, 94px);
        height: clamp(84px, 13dvh, 94px);
    }
    .sg-player-main-play {
        border: 1px solid rgba(255,255,255,.28);
        background: rgba(8,12,20,.52) !important;
        box-shadow: 0 16px 42px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.14), 0 0 0 1px rgba(37,200,255,.10);
        -webkit-backdrop-filter: blur(16px) saturate(140%);
        backdrop-filter: blur(16px) saturate(140%);
    }
    .sg-player-main-play svg {
        width: clamp(34px, 5.2dvh, 42px);
        height: clamp(34px, 5.2dvh, 42px);
    }
    .sg-player-spinner {
        top: 6px;
        left: 6px;
        width: calc(clamp(84px, 13dvh, 94px) - 12px);
        height: calc(clamp(84px, 13dvh, 94px) - 12px);
    }
    .sg-player-skip {
        width: clamp(54px, 8.4dvh, 62px);
        height: clamp(54px, 8.4dvh, 62px);
        border-radius: 50%;
        background: rgba(8,12,20,.48) !important;
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }
    .sg-player-skip svg { width: 32px; height: 32px; }
    .sg-player-controls {
        padding: 16px 14px calc(14px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.16) 18%, rgba(0,0,0,.70) 100%);
    }
    .sg-player-control-row { margin-top: 7px; min-height: 50px; }
    #sgSeek { --sg-range-height: 5px; --sg-range-thumb: 16px; min-height: 28px; }
    .sg-player-timeline { font-size: .70rem; }
    .sg-player-toast {
        bottom: 98px;
        padding: 8px 13px;
        border-radius: 12px;
        background: rgba(7,10,16,.68);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    .sg-player-topbar {
        min-height: calc(52px + env(safe-area-inset-top, 0px));
        padding-top: calc(6px + env(safe-area-inset-top, 0px));
        padding-bottom: 4px;
    }
    .sg-player-heading strong { font-size: .96rem; }
    .sg-player-heading span { font-size: .68rem; }
    .sg-player-mobile-source-sheet {
        padding-top: calc(50px + env(safe-area-inset-top, 0px));
    }
    .sg-player-mobile-source-panel {
        width: min(42vw, 310px);
        max-height: 72dvh;
    }
    .sg-player-mobile-source-list {
        max-height: calc(72dvh - 51px);
        grid-template-columns: 1fr;
    }
    .sg-player-gesture-hud {
        min-height: 138px;
        padding-block: 10px 8px;
    }
    .sg-player-gesture-meter { height: 58px; }
}

/* SPACEGATE_ANDROID_PLAYER_POLISH_R5
   Mobile/coarse-pointer polish: gesture-only sound/brightness controls and premium seek timeline. */
.sg-player-shell {
    --sg-progress-played: #24c7ff;
    --sg-progress-played-2: #4f8dff;
    --sg-progress-buffered: rgba(218, 238, 255, .24);
    --sg-progress-idle: rgba(155, 181, 207, .16);
    --sg-progress-frame: rgba(153, 210, 255, .085);
    --sg-progress-surface: rgba(7, 13, 22, .36);
}

/* Timeline gets its own quiet glass surface instead of a heavy dark strip. */
.sg-player-timeline {
    min-height: 34px;
    padding: 3px 9px;
    border: 1px solid var(--sg-progress-frame);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.032), rgba(255,255,255,.010)),
      var(--sg-progress-surface);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.035),
      0 8px 24px rgba(0,0,0,.10);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
}

.sg-player-timeline > span {
    color: rgba(235, 245, 255, .76);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-shadow: 0 1px 6px rgba(0,0,0,.32);
}

/* Large invisible hit-area, slim visible rail. */
#sgSeek {
    --sg-range-height: 4px;
    --sg-range-thumb: 14px;
    min-height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    touch-action: pan-x;
    -webkit-tap-highlight-color: transparent;
}

#sgSeek::-webkit-slider-runnable-track {
    height: var(--sg-range-height);
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 999px;
    background: linear-gradient(to right,
        var(--sg-progress-played) 0%,
        var(--sg-progress-played-2) var(--sg-fill),
        var(--sg-progress-buffered) var(--sg-fill),
        var(--sg-progress-buffered) var(--sg-buffered),
        var(--sg-progress-idle) var(--sg-buffered),
        var(--sg-progress-idle) 100%);
    box-shadow:
      inset 0 1px 2px rgba(0,0,0,.38),
      0 0 0 1px rgba(0,0,0,.10);
}

#sgSeek::-moz-range-track {
    height: var(--sg-range-height);
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 999px;
    background: var(--sg-progress-idle);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.38);
}

#sgSeek::-moz-range-progress {
    height: var(--sg-range-height);
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sg-progress-played), var(--sg-progress-played-2));
}

#sgSeek::-webkit-slider-thumb {
    width: var(--sg-range-thumb);
    height: var(--sg-range-thumb);
    border: 2px solid rgba(220, 250, 255, .94);
    background: var(--sg-progress-played);
    box-shadow:
      0 0 0 3px rgba(36,199,255,.14),
      0 0 15px rgba(36,199,255,.34),
      0 2px 6px rgba(0,0,0,.28);
}

#sgSeek::-moz-range-thumb {
    width: var(--sg-range-thumb);
    height: var(--sg-range-thumb);
    border: 2px solid rgba(220, 250, 255, .94);
    background: var(--sg-progress-played);
    box-shadow:
      0 0 0 3px rgba(36,199,255,.14),
      0 0 15px rgba(36,199,255,.34),
      0 2px 6px rgba(0,0,0,.28);
}

#sgSeek:focus-visible {
    outline: none;
}
#sgSeek:focus-visible::-webkit-slider-thumb {
    box-shadow:
      0 0 0 4px rgba(36,199,255,.22),
      0 0 18px rgba(36,199,255,.42);
}

/* On Android/touch mode the vertical gestures are the primary controls.
   Remove the duplicated bottom sound + brightness cluster at every landscape width. */
.sg-player-shell.has-native-touch-gestures #sgMute,
.sg-player-shell.has-native-touch-gestures .sg-player-volume,
.sg-player-shell.has-native-touch-gestures #sgBrightnessButton,
.sg-player-shell.has-native-touch-gestures .sg-player-brightness {
    display: none !important;
}

.sg-player-shell.has-native-touch-gestures .sg-player-left-controls {
    gap: 6px;
}

@media (pointer: coarse) {
    .sg-player-timeline {
        grid-template-columns: 52px minmax(120px, 1fr) 52px;
        gap: 8px;
        min-height: 36px;
        padding: 3px 8px;
        border-radius: 13px;
    }
    #sgSeek {
        --sg-range-height: 5px;
        --sg-range-thumb: 15px;
        min-height: 32px;
    }
    .sg-player-controls {
        padding-top: 12px;
    }
    .sg-player-control-row {
        margin-top: 5px;
        min-height: 46px;
    }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    .sg-player-timeline {
        min-height: 32px;
        padding-block: 2px;
    }
    #sgSeek { min-height: 28px; }
    .sg-player-controls {
        padding-top: 8px;
        padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px));
    }
    .sg-player-control-row {
        min-height: 42px;
        margin-top: 3px;
    }
}


/* SPACEGATE_NOVA_IDENTITY_R6
   NOVA+ identity pass: frameless seek timeline + branded quality badges.
   Brand palette taken from the supplied NOVA identity board:
   cyan #00E5FF, blue #2B7BFF, violet #7B5CFF, magenta #FF4EDB. */
.sg-player-shell {
    --nova-cyan: #00E5FF;
    --nova-blue: #2B7BFF;
    --nova-violet: #7B5CFF;
    --nova-magenta: #FF4EDB;
    --nova-night: #07111F;
    --nova-night-2: #0B1020;
    --sg-progress-buffered: rgba(148, 172, 211, .26);
    --sg-progress-idle: rgba(173, 192, 222, .16);
}

/* R6: absolutely no frame, glass box, outline or surface around the seek area. */
.sg-player-timeline,
.sg-player-shell.has-native-touch-gestures .sg-player-timeline {
    min-height: 31px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.sg-player-timeline > span {
    color: rgba(244,248,255,.82);
    text-shadow: 0 1px 7px rgba(0,0,0,.5);
}

/* Keep a generous invisible touch target but render only a slim NOVA rail. */
#sgSeek {
    --sg-range-height: 5px;
    --sg-range-thumb: 15px;
    min-height: 31px;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
#sgSeek::-webkit-slider-runnable-track {
    height: var(--sg-range-height);
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px;
    background:
      linear-gradient(90deg,
        var(--nova-cyan) 0%,
        var(--nova-blue) 38%,
        var(--nova-violet) 70%,
        var(--nova-magenta) 100%)
        0 50% / var(--sg-fill) 100% no-repeat,
      linear-gradient(90deg,
        var(--sg-progress-buffered) 0%,
        var(--sg-progress-buffered) var(--sg-buffered),
        var(--sg-progress-idle) var(--sg-buffered),
        var(--sg-progress-idle) 100%);
    box-shadow: none !important;
}
#sgSeek::-moz-range-track {
    height: var(--sg-range-height);
    border: 0 !important;
    border-radius: 999px;
    background: var(--sg-progress-idle);
    box-shadow: none !important;
}
#sgSeek::-moz-range-progress {
    height: var(--sg-range-height);
    border: 0 !important;
    border-radius: 999px;
    background: linear-gradient(90deg,
      var(--nova-cyan) 0%,
      var(--nova-blue) 38%,
      var(--nova-violet) 70%,
      var(--nova-magenta) 100%);
    box-shadow: none !important;
}
#sgSeek::-webkit-slider-thumb {
    width: var(--sg-range-thumb);
    height: var(--sg-range-thumb);
    border: 0 !important;
    background: linear-gradient(135deg, var(--nova-cyan), var(--nova-violet) 58%, var(--nova-magenta));
    box-shadow:
      0 0 0 2px rgba(255,255,255,.82),
      0 0 15px rgba(43,123,255,.46),
      0 0 25px rgba(255,78,219,.17),
      0 2px 7px rgba(0,0,0,.34);
}
#sgSeek::-moz-range-thumb {
    width: var(--sg-range-thumb);
    height: var(--sg-range-thumb);
    border: 0 !important;
    background: linear-gradient(135deg, var(--nova-cyan), var(--nova-violet) 58%, var(--nova-magenta));
    box-shadow:
      0 0 0 2px rgba(255,255,255,.82),
      0 0 15px rgba(43,123,255,.46),
      0 0 25px rgba(255,78,219,.17),
      0 2px 7px rgba(0,0,0,.34);
}
#sgSeek:focus-visible::-webkit-slider-thumb {
    box-shadow:
      0 0 0 2px rgba(255,255,255,.92),
      0 0 0 6px rgba(123,92,255,.15),
      0 0 20px rgba(0,229,255,.42),
      0 0 30px rgba(255,78,219,.18);
}

/* NOVA palette carries through the gesture HUD. */
.sg-player-gesture-meter i {
    background: linear-gradient(180deg,
      var(--nova-cyan) 0%,
      var(--nova-blue) 36%,
      var(--nova-violet) 70%,
      var(--nova-magenta) 100%);
    box-shadow: 0 0 15px rgba(0,229,255,.34), 0 0 24px rgba(123,92,255,.16);
}

/* Refined NOVA glass source/quality menu. */
.sg-player-mobile-source-panel {
    border-color: rgba(123,92,255,.24);
    background:
      radial-gradient(circle at 100% 0%, rgba(0,229,255,.09), transparent 34%),
      radial-gradient(circle at 0% 100%, rgba(255,78,219,.08), transparent 36%),
      linear-gradient(155deg, rgba(15,23,43,.88), rgba(5,10,20,.91));
    box-shadow:
      0 22px 58px rgba(0,0,0,.48),
      inset 0 1px 0 rgba(255,255,255,.075),
      0 0 0 1px rgba(0,229,255,.035);
}
.sg-player-mobile-source-title strong {
    background: linear-gradient(90deg, #fff 0%, #dff9ff 42%, #eadfff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.sg-player-mobile-source-option {
    border-color: rgba(143,161,199,.11);
    background: rgba(255,255,255,.038);
}
.sg-player-mobile-source-option.selected {
    border-color: rgba(0,229,255,.48);
    background:
      linear-gradient(105deg, rgba(0,229,255,.12), rgba(43,123,255,.10) 36%, rgba(123,92,255,.13) 72%, rgba(255,78,219,.10));
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.025),
      0 0 18px rgba(43,123,255,.11);
}
.sg-player-mobile-source-check {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.045);
}
.sg-player-mobile-source-option.selected .sg-player-mobile-source-check {
    border-color: transparent;
    background: linear-gradient(135deg, var(--nova-cyan), var(--nova-blue) 45%, var(--nova-violet) 76%, var(--nova-magenta));
    color: #fff;
    box-shadow: 0 0 12px rgba(0,229,255,.26);
}

/* Quality cell: resolution + a compact commercial tier badge. */
.sg-player-mobile-source-quality {
    min-width: 86px;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: rgba(240,246,255,.76);
    white-space: nowrap;
}
.sg-player-mobile-source-resolution {
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .01em;
    direction: ltr;
}
.sg-player-mobile-source-quality-badge {
    min-width: 31px;
    height: 21px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 6px;
    color: #fff;
    font-size: .58rem;
    line-height: 1;
    font-style: normal;
    font-weight: 950;
    letter-spacing: .015em;
    text-shadow: 0 1px 4px rgba(0,0,0,.38);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.17), 0 3px 9px rgba(0,0,0,.18);
}
.sg-player-mobile-source-quality.quality-4k .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, var(--nova-violet), var(--nova-magenta));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 0 12px rgba(255,78,219,.20);
}
.sg-player-mobile-source-quality.quality-fhd .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, var(--nova-cyan), var(--nova-blue));
    color: #061322;
    text-shadow: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 0 12px rgba(0,229,255,.18);
}
.sg-player-mobile-source-quality.quality-hd .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, var(--nova-blue), var(--nova-violet));
}
.sg-player-mobile-source-quality.quality-sd .sg-player-mobile-source-quality-badge {
    border-color: rgba(123,92,255,.25);
    background: linear-gradient(135deg, rgba(34,49,79,.96), rgba(47,39,79,.96));
    color: #dce7ff;
}
.sg-player-mobile-source-quality.quality-auto .sg-player-mobile-source-quality-badge {
    border-color: transparent;
    background: linear-gradient(135deg, var(--nova-cyan), var(--nova-blue) 36%, var(--nova-violet) 68%, var(--nova-magenta));
    color: #fff;
}
.sg-player-mobile-source-option.selected .sg-player-mobile-source-quality-badge {
    transform: translateZ(0);
    filter: saturate(1.12) brightness(1.05);
}

.sg-player-shell.mobile-source-open .sg-player-source-mobile-trigger {
    border-color: rgba(0,229,255,.42);
    background: linear-gradient(135deg, rgba(0,229,255,.13), rgba(123,92,255,.14), rgba(255,78,219,.10)) !important;
    box-shadow: 0 0 0 1px rgba(0,229,255,.07), 0 7px 22px rgba(0,0,0,.20), 0 0 20px rgba(123,92,255,.09);
}

@media (pointer: coarse) {
    .sg-player-timeline,
    .sg-player-shell.has-native-touch-gestures .sg-player-timeline {
        min-height: 32px;
        padding: 0;
    }
    #sgSeek {
        --sg-range-height: 5px;
        --sg-range-thumb: 15px;
        min-height: 32px;
    }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    .sg-player-timeline,
    .sg-player-shell.has-native-touch-gestures .sg-player-timeline {
        min-height: 29px;
        padding: 0;
    }
    #sgSeek { min-height: 29px; }
    .sg-player-mobile-source-quality { min-width: 80px; gap: 5px; }
    .sg-player-mobile-source-quality-badge { min-width: 29px; height: 20px; padding-inline: 5px; }
}

/* SPACEGATE_COMMERCIAL_PLAYER_R7
   Premium NOVA material, richer motion and native-style Android double-tap seek.
   Keeps the R6 frameless seek rail intact. */
.sg-player-shell {
    --nova-r7-glass: rgba(7, 14, 28, .58);
    --nova-r7-glass-strong: rgba(8, 15, 30, .78);
    --nova-r7-border: rgba(190, 221, 255, .14);
    --nova-r7-border-active: rgba(0, 229, 255, .38);
    --nova-r7-shadow: 0 12px 34px rgba(0, 0, 0, .34);
    --nova-r7-ease: cubic-bezier(.2,.82,.2,1);
}

/* Stronger cinema material without boxing the progress timeline. */
.sg-player-vignette {
    background:
      radial-gradient(circle at 50% 46%, transparent 22%, rgba(2, 5, 13, .10) 58%, rgba(1, 3, 9, .40) 100%),
      linear-gradient(180deg, rgba(3, 8, 18, .44) 0%, rgba(3, 8, 18, .08) 23%, transparent 43%, transparent 59%, rgba(3, 7, 16, .18) 77%, rgba(2, 5, 13, .70) 100%);
}
.sg-player-topbar {
    background: linear-gradient(180deg, rgba(3,8,20,.72) 0%, rgba(3,8,20,.30) 56%, transparent 100%);
    transition: opacity .28s var(--nova-r7-ease), transform .34s var(--nova-r7-ease), filter .34s var(--nova-r7-ease);
}
.sg-player-controls {
    background: linear-gradient(180deg, transparent 0%, rgba(3,7,16,.10) 15%, rgba(3,7,16,.48) 70%, rgba(2,5,13,.76) 100%);
    transition: opacity .27s var(--nova-r7-ease), transform .34s var(--nova-r7-ease), filter .34s var(--nova-r7-ease);
}
.sg-player-center {
    transition: opacity .24s var(--nova-r7-ease), transform .34s var(--nova-r7-ease), filter .34s var(--nova-r7-ease);
}
.sg-player-shell.ui-hidden .sg-player-topbar {
    transform: translateY(-14px);
    filter: blur(2px);
}
.sg-player-shell.ui-hidden .sg-player-controls {
    transform: translateY(18px);
    filter: blur(2px);
}
.sg-player-shell.ui-hidden .sg-player-center {
    transform: translate(-50%, -50%) scale(.91);
    filter: blur(1.2px);
}

/* Premium individual material for controls: clearer, larger, more commercial. */
.sg-player-icon,
.sg-player-quality-wrap,
.sg-player-select-wrap,
.sg-player-source-mobile-trigger {
    border: 1px solid var(--nova-r7-border) !important;
    background:
      linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018)),
      var(--nova-r7-glass) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.08),
      inset 0 -1px 0 rgba(0,0,0,.16),
      0 8px 22px rgba(0,0,0,.18);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
    transition: transform .18s var(--nova-r7-ease), border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease !important;
}
.sg-player-topbar .sg-player-icon,
.sg-player-topbar .sg-player-select-wrap {
    border: 1px solid rgba(189,218,255,.13) !important;
    background:
      linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.014)),
      rgba(6,13,28,.48) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 22px rgba(0,0,0,.14) !important;
    -webkit-backdrop-filter: blur(17px) saturate(140%) !important;
    backdrop-filter: blur(17px) saturate(140%) !important;
}
.sg-player-icon:hover,
.sg-player-source-mobile-trigger:hover,
.sg-player-quality-wrap:hover {
    border-color: rgba(0,229,255,.30) !important;
    background:
      linear-gradient(140deg, rgba(0,229,255,.10), rgba(123,92,255,.08) 62%, rgba(255,78,219,.06)),
      rgba(8,16,32,.70) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 9px 26px rgba(0,0,0,.22), 0 0 20px rgba(43,123,255,.07) !important;
}
.sg-player-icon:active,
.sg-player-source-mobile-trigger:active {
    transform: scale(.91) !important;
}

/* Bottom row polish. */
.sg-player-control-row {
    min-height: 52px;
    margin-top: 5px;
}
.sg-player-left-controls,
.sg-player-right-controls {
    gap: 8px;
}
#sgPlay,
#sgReload {
    width: 44px;
    height: 44px;
    border-radius: 13px;
}
#sgPlay {
    color: #fff;
    border-color: rgba(0,229,255,.24) !important;
    background:
      linear-gradient(145deg, rgba(0,229,255,.11), rgba(43,123,255,.07) 45%, rgba(123,92,255,.09)),
      rgba(6,14,28,.68) !important;
}
#sgPlay svg { width: 21px; height: 21px; }
.sg-player-shell.is-playing #sgPlay {
    border-color: rgba(123,92,255,.30) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 8px 24px rgba(0,0,0,.20), 0 0 18px rgba(123,92,255,.09) !important;
}
#sgReload {
    color: rgba(238,246,255,.92);
}
#sgReload:hover { color: var(--nova-cyan); }
.sg-player-badge {
    min-width: 58px;
    height: 36px;
    min-height: 36px;
    padding: 0 11px;
    justify-content: center;
    border: 1px solid rgba(0,229,255,.16);
    border-radius: 11px;
    background:
      linear-gradient(135deg, rgba(0,229,255,.15), rgba(43,123,255,.15) 38%, rgba(123,92,255,.18) 70%, rgba(255,78,219,.14)),
      rgba(6,13,27,.64);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.18);
    -webkit-backdrop-filter: blur(17px) saturate(145%);
    backdrop-filter: blur(17px) saturate(145%);
    font-size: .67rem;
    font-weight: 950;
    letter-spacing: .025em;
}
.sg-player-quality-wrap {
    min-width: 106px;
    height: 42px;
    padding: 0 12px;
    border-radius: 13px;
    gap: 7px;
}
.sg-player-quality-wrap > span {
    color: rgba(230,239,255,.62);
    font-size: .65rem;
    font-weight: 800;
}
.sg-player-quality-wrap select {
    color: #fff;
    font-weight: 850;
}

/* Main play gains depth and a restrained NOVA halo. */
.sg-player-main-play {
    isolation: isolate;
    overflow: visible;
    border: 1px solid rgba(255,255,255,.20);
    background:
      radial-gradient(circle at 32% 24%, rgba(255,255,255,.20), transparent 34%),
      linear-gradient(145deg, rgba(0,229,255,.22), rgba(43,123,255,.26) 35%, rgba(123,92,255,.32) 69%, rgba(255,78,219,.27)),
      rgba(5,12,25,.72);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.20),
      inset 0 -8px 18px rgba(0,0,0,.16),
      0 18px 50px rgba(0,0,0,.34),
      0 0 30px rgba(43,123,255,.16),
      0 0 46px rgba(255,78,219,.08);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
}
.sg-player-main-play::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: inherit;
    border: 1px solid rgba(123,92,255,.20);
    opacity: .58;
    transform: scale(.96);
    animation: sg-r7-play-halo 2.8s ease-in-out infinite;
}
.sg-player-main-play:active { transform: scale(.92) !important; }
@keyframes sg-r7-play-halo {
    0%,100% { opacity: .32; transform: scale(.96); box-shadow: 0 0 0 rgba(0,229,255,0); }
    50% { opacity: .72; transform: scale(1.045); box-shadow: 0 0 24px rgba(43,123,255,.12); }
}
.sg-player-shell.is-playing .sg-player-main-play::before { animation-duration: 3.8s; opacity: .28; }

/* Source sheet gets a subtle spring rather than a flat appearance. */
.sg-player-mobile-source-panel {
    transform-origin: 50% 15%;
    transition: transform .30s var(--nova-r7-ease), opacity .22s ease, filter .28s ease;
}
.sg-player-mobile-source-sheet:not(.show) .sg-player-mobile-source-panel {
    transform: translateY(-10px) scale(.965);
    opacity: 0;
    filter: blur(3px);
}
.sg-player-mobile-source-sheet.show .sg-player-mobile-source-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: none;
}
.sg-player-mobile-source-option {
    transition: transform .17s var(--nova-r7-ease), border-color .17s ease, background .17s ease, box-shadow .17s ease;
}
.sg-player-mobile-source-option:active { transform: scale(.975); }

/* Native Android double-tap seek feedback. */
.sg-player-doubletap-hud {
    position: absolute;
    z-index: 16;
    top: 50%;
    width: clamp(112px, 19vw, 158px);
    height: clamp(138px, 36dvh, 190px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(.92);
    transition: opacity .14s ease, transform .26s var(--nova-r7-ease);
    overflow: hidden;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 50%, rgba(43,123,255,.20), rgba(123,92,255,.10) 42%, rgba(4,10,22,.06) 68%, transparent 72%);
    -webkit-tap-highlight-color: transparent;
}
.sg-player-doubletap-hud.is-left { left: max(2.5vw, 12px); }
.sg-player-doubletap-hud.is-right { right: max(2.5vw, 12px); }
.sg-player-doubletap-hud.show {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
.sg-player-doubletap-arrow {
    width: 43px;
    height: 27px;
    display: grid;
    place-items: center;
    margin-bottom: 2px;
}
.sg-player-doubletap-arrow svg {
    width: 42px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 9px rgba(0,229,255,.42));
}
.sg-player-doubletap-hud.is-left .sg-player-doubletap-arrow { transform: rotate(180deg); }
.sg-player-doubletap-hud strong {
    font-size: 1.03rem;
    line-height: 1.05;
    font-weight: 950;
    text-shadow: 0 2px 12px rgba(0,0,0,.48), 0 0 12px rgba(43,123,255,.24);
}
.sg-player-doubletap-hud small {
    color: rgba(232,243,255,.76);
    font-size: .61rem;
    font-weight: 750;
}
.sg-player-doubletap-ripple {
    position: absolute;
    inset: 10%;
    border: 1px solid rgba(0,229,255,.20);
    border-radius: 999px;
    opacity: 0;
}
.sg-player-doubletap-hud.pulse .ripple-a { animation: sg-r7-doubletap-ripple .62s ease-out 0s 1; }
.sg-player-doubletap-hud.pulse .ripple-b { animation: sg-r7-doubletap-ripple .62s ease-out .07s 1; }
.sg-player-doubletap-hud.pulse .ripple-c { animation: sg-r7-doubletap-ripple .62s ease-out .14s 1; }
@keyframes sg-r7-doubletap-ripple {
    0% { opacity: .55; transform: scale(.48); border-color: rgba(0,229,255,.42); }
    55% { opacity: .26; border-color: rgba(123,92,255,.34); }
    100% { opacity: 0; transform: scale(1.08); border-color: rgba(255,78,219,.16); }
}

/* Android/touch: remove visible ±10 buttons; double-tap on the video replaces them. */
.sg-player-shell.has-native-touch-gestures .sg-player-skip {
    display: none !important;
}
.sg-player-shell.has-native-touch-gestures .sg-player-center {
    gap: 0 !important;
}

@media (pointer: coarse) {
    #sgPlay,
    #sgReload {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }
    .sg-player-control-row {
        min-height: 50px;
        gap: 12px;
    }
    .sg-player-right-controls { gap: 7px; }
    .sg-player-badge { height: 38px; min-height: 38px; border-radius: 12px; }
    .sg-player-quality-wrap { height: 44px; border-radius: 14px; }
    .sg-player-source-mobile-trigger { min-width: 44px; height: 44px; border-radius: 13px; }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    #sgPlay,
    #sgReload { width: 42px; height: 42px; border-radius: 12px; }
    .sg-player-control-row { min-height: 44px; margin-top: 2px; }
    .sg-player-badge { height: 34px; min-height: 34px; padding-inline: 9px; }
    .sg-player-quality-wrap { height: 40px; min-width: 96px; padding-inline: 10px; }
    .sg-player-doubletap-hud { width: 118px; height: 142px; }
}

@media (prefers-reduced-motion: reduce) {
    .sg-player-topbar,
    .sg-player-controls,
    .sg-player-center,
    .sg-player-icon,
    .sg-player-main-play,
    .sg-player-mobile-source-panel,
    .sg-player-mobile-source-option,
    .sg-player-doubletap-hud {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
    .sg-player-main-play::before,
    .sg-player-doubletap-ripple { animation: none !important; }
}

/* R7 micro-interactions: fast enough to feel native, restrained enough for long viewing. */
.sg-player-main-play .sg-play-glyph,
.sg-player-main-play .sg-pause-glyph,
.sg-player-play-small .sg-play-glyph,
.sg-player-play-small .sg-pause-glyph {
    transform-origin: 50% 50%;
    animation: sg-r7-glyph-in .24s var(--nova-r7-ease) both;
}
@keyframes sg-r7-glyph-in {
    from { opacity: .18; transform: scale(.72) rotate(-5deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}
.sg-player-shell.is-buffering .sg-player-spinner {
    box-shadow: 0 0 0 1px rgba(0,229,255,.08), 0 0 24px rgba(43,123,255,.16), 0 0 38px rgba(255,78,219,.08);
}
.sg-player-toast.show {
    animation: sg-r7-toast-in .22s var(--nova-r7-ease) both;
}
@keyframes sg-r7-toast-in {
    from { opacity: 0; transform: translate(50%, 10px) scale(.96); }
    to { opacity: 1; transform: translate(50%, 0) scale(1); }
}
.sg-player-mobile-source-option.selected .sg-player-mobile-source-quality-badge {
    animation: sg-r7-badge-pop .26s var(--nova-r7-ease) both;
}
@keyframes sg-r7-badge-pop {
    from { transform: scale(.84); opacity: .55; }
    to { transform: scale(1); opacity: 1; }
}

/* SPACEGATE_REFINED_PLAYER_R8
   Deterministic touch controls, unboxed gesture HUD, one bottom source/quality
   control, native-safe custom playback-speed menu and smaller central play. */

/* R8 — sound/brightness feedback floats directly over video: no card, no border,
   no glass container. The meter itself remains for legibility. */
.sg-player-gesture-hud {
    width: 54px;
    min-height: 136px;
    padding: 4px 3px;
    gap: 6px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    text-shadow: 0 2px 9px rgba(0,0,0,.78);
}
.sg-player-gesture-icon {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.72));
}
.sg-player-gesture-meter {
    width: 6px;
    height: 72px;
    border: 0;
    background: rgba(226,238,255,.20);
    box-shadow: 0 1px 8px rgba(0,0,0,.44);
}
.sg-player-gesture-value { font-size: .70rem; }
.sg-player-gesture-label { color: rgba(245,249,255,.78); }

/* R8 — on touch there is one quality/source affordance only. The native quality
   label remains in the DOM as state, but the clickable control is moved to the
   bottom row beside the current-quality card. */
.sg-player-shell.uses-mobile-source-sheet .sg-player-quality-native {
    display: none !important;
}
.sg-player-shell.uses-mobile-source-sheet .sg-player-bottom-source-trigger {
    display: grid !important;
}
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger,
.sg-player-shell.has-native-touch-gestures #sgPlay,
.sg-player-shell.has-native-touch-gestures #sgReload {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    color: rgba(242,248,255,.92);
}
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger:hover,
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger:active,
.sg-player-shell.has-native-touch-gestures #sgPlay:hover,
.sg-player-shell.has-native-touch-gestures #sgPlay:active,
.sg-player-shell.has-native-touch-gestures #sgReload:hover,
.sg-player-shell.has-native-touch-gestures #sgReload:active {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger:active,
.sg-player-shell.has-native-touch-gestures #sgPlay:active,
.sg-player-shell.has-native-touch-gestures #sgReload:active {
    transform: scale(.90) !important;
    color: var(--nova-cyan);
}
.sg-player-shell.mobile-source-open.has-native-touch-gestures #sgSourceMobileTrigger {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--nova-cyan);
    filter: drop-shadow(0 0 8px rgba(0,229,255,.32));
}

/* Keep the current-quality badge as the polished NOVA rectangle the user chose. */
.sg-player-shell.has-native-touch-gestures .sg-player-badge {
    min-width: 58px;
    height: 34px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid rgba(0,229,255,.16) !important;
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(0,229,255,.18), rgba(43,123,255,.20) 36%, rgba(123,92,255,.24) 69%, rgba(255,78,219,.18)),
      rgba(6,13,27,.70) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 7px 18px rgba(0,0,0,.18) !important;
    -webkit-backdrop-filter: blur(15px) saturate(145%);
    backdrop-filter: blur(15px) saturate(145%);
}

/* R8 — custom speed control. The hidden native <select> continues to own the
   playback state, but coarse-pointer devices never invoke the fragile picker. */
.sg-player-speed-mobile-trigger { display: none; }
.sg-player-shell.uses-mobile-speed-sheet .sg-player-speed-native { display: none !important; }
.sg-player-shell.uses-mobile-speed-sheet .sg-player-speed-mobile-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.sg-player-speed-mobile-trigger {
    min-width: 42px;
    height: 42px;
    padding: 0 5px;
    border: 0 !important;
    outline: 0;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff;
    font: inherit;
    font-size: .79rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    text-shadow: 0 2px 8px rgba(0,0,0,.62);
    transition: color .16s ease, transform .16s var(--nova-r7-ease), filter .16s ease;
}
.sg-player-speed-mobile-trigger:hover,
.sg-player-speed-mobile-trigger:focus-visible { color: var(--nova-cyan); }
.sg-player-speed-mobile-trigger:active { transform: scale(.90); }
.sg-player-shell.mobile-speed-open .sg-player-speed-mobile-trigger {
    color: var(--nova-cyan);
    filter: drop-shadow(0 0 8px rgba(0,229,255,.32));
}
.sg-player-mobile-speed-sheet {
    position: absolute;
    inset: 0;
    z-index: 99;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: calc(56px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility 0s linear .18s;
}
.sg-player-mobile-speed-sheet.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}
.sg-player-mobile-speed-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(1,5,13,.20);
    -webkit-backdrop-filter: blur(1.5px);
    backdrop-filter: blur(1.5px);
}
.sg-player-mobile-speed-panel {
    position: relative;
    width: min(246px, calc(100vw - 28px));
    max-height: min(330px, calc(100dvh - 74px));
    overflow: auto;
    border: 1px solid rgba(123,92,255,.22);
    border-radius: 16px;
    background:
      radial-gradient(circle at 100% 0%, rgba(0,229,255,.10), transparent 36%),
      radial-gradient(circle at 0% 100%, rgba(255,78,219,.08), transparent 38%),
      linear-gradient(155deg, rgba(13,22,42,.92), rgba(5,10,20,.94));
    box-shadow: 0 18px 48px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.07);
    -webkit-backdrop-filter: blur(22px) saturate(155%);
    backdrop-filter: blur(22px) saturate(155%);
    color: #fff;
    transform-origin: 88% 0%;
    transform: translateY(-7px) scale(.965);
    opacity: 0;
    transition: transform .26s var(--nova-r7-ease), opacity .18s ease;
    direction: rtl;
}
.sg-player-mobile-speed-sheet.show .sg-player-mobile-speed-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.sg-player-mobile-speed-head {
    min-height: 46px;
    padding: 8px 11px 7px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sg-player-mobile-speed-head strong { font-size: .82rem; font-weight: 900; }
.sg-player-mobile-speed-close {
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.045);
    color: rgba(245,249,255,.86);
    font: 400 1.2rem/1 Arial, sans-serif;
}
.sg-player-mobile-speed-list {
    padding: 7px;
    display: grid;
    gap: 4px;
}
.sg-player-mobile-speed-option {
    min-height: 43px;
    padding: 5px 9px;
    display: grid;
    grid-template-columns: 25px minmax(55px,auto) 1fr;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 11px;
    background: rgba(255,255,255,.025);
    color: #fff;
    text-align: right;
    font: inherit;
    transition: transform .15s var(--nova-r7-ease), border-color .15s ease, background .15s ease;
}
.sg-player-mobile-speed-option:active { transform: scale(.98); }
.sg-player-mobile-speed-option strong { font-size: .77rem; direction: ltr; text-align: right; }
.sg-player-mobile-speed-option small { color: rgba(225,236,255,.57); font-size: .61rem; }
.sg-player-mobile-speed-check {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    color: #fff;
    font-size: .68rem;
}
.sg-player-mobile-speed-option.selected {
    border-color: rgba(0,229,255,.42);
    background: linear-gradient(105deg, rgba(0,229,255,.10), rgba(43,123,255,.10) 38%, rgba(123,92,255,.12) 72%, rgba(255,78,219,.08));
}
.sg-player-mobile-speed-option.selected .sg-player-mobile-speed-check {
    border-color: transparent;
    background: linear-gradient(135deg, var(--nova-cyan), var(--nova-blue) 45%, var(--nova-violet) 76%, var(--nova-magenta));
    box-shadow: 0 0 10px rgba(0,229,255,.22);
}
.sg-player-shell.mobile-speed-open .sg-player-ui { pointer-events: none; }
.sg-player-shell.mobile-speed-open .sg-player-mobile-speed-sheet,
.sg-player-shell.mobile-speed-open .sg-player-mobile-speed-sheet * { pointer-events: auto; }

/* R8 — smaller central play control, still prominent but less dominant. */
@media (pointer: coarse) {
    .sg-player-center-host,
    .sg-player-main-play {
        width: clamp(68px, 10.4dvh, 78px) !important;
        height: clamp(68px, 10.4dvh, 78px) !important;
    }
    .sg-player-main-play svg {
        width: clamp(28px, 4.25dvh, 34px) !important;
        height: clamp(28px, 4.25dvh, 34px) !important;
    }
    .sg-player-spinner {
        top: 5px !important;
        left: 5px !important;
        width: calc(clamp(68px, 10.4dvh, 78px) - 10px) !important;
        height: calc(clamp(68px, 10.4dvh, 78px) - 10px) !important;
    }
    .sg-player-main-play::before { inset: -5px; }
    #sgPlay, #sgReload {
        width: 40px !important;
        height: 40px !important;
        border-radius: 9px !important;
    }
    #sgPlay svg, #sgReload svg { width: 20px; height: 20px; }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    .sg-player-center-host,
    .sg-player-main-play {
        width: clamp(64px, 10.8dvh, 72px) !important;
        height: clamp(64px, 10.8dvh, 72px) !important;
    }
    .sg-player-spinner {
        width: calc(clamp(64px, 10.8dvh, 72px) - 10px) !important;
        height: calc(clamp(64px, 10.8dvh, 72px) - 10px) !important;
    }
    .sg-player-mobile-speed-sheet {
        padding-top: calc(50px + env(safe-area-inset-top, 0px));
    }
    .sg-player-mobile-speed-panel { width: min(228px, calc(100vw - 24px)); }
    .sg-player-mobile-speed-option { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    .sg-player-mobile-speed-panel,
    .sg-player-mobile-speed-option,
    .sg-player-speed-mobile-trigger { transition-duration: .01ms !important; }
}


/* SPACEGATE_GLASS_PLAYER_R9
   Clearer source/quality affordance, glass-only selection sheet and NOVA play button. */
:root {
    --nova-r9-glass-bg: linear-gradient(180deg, rgba(11,16,28,.60), rgba(6,10,18,.72));
    --nova-r9-glass-border: rgba(255,255,255,.10);
    --nova-r9-glass-soft: rgba(255,255,255,.05);
}

/* Current quality card keeps the refined rectangle and now gains a compact tier pill. */
.sg-player-shell.has-native-touch-gestures .sg-player-badge {
    position: relative;
    gap: 7px;
    padding-inline: 12px 44px;
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge::after {
    content: attr(data-quality-badge);
    position: absolute;
    inset-inline-end: 7px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 28px;
    height: 20px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: .59rem;
    font-weight: 950;
    letter-spacing: .04em;
    color: #f7fbff;
    background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 3px 12px rgba(0,0,0,.18);
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge[data-quality-tier="4k"]::after {
    background: linear-gradient(135deg, rgba(255,166,74,.95), rgba(255,208,72,.85));
    color: #271600;
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge[data-quality-tier="fhd"]::after {
    background: linear-gradient(135deg, rgba(0,229,255,.95), rgba(43,123,255,.90));
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge[data-quality-tier="hd"]::after {
    background: linear-gradient(135deg, rgba(123,92,255,.92), rgba(86,116,255,.88));
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge[data-quality-tier="sd"]::after {
    background: linear-gradient(135deg, rgba(116,126,146,.92), rgba(76,86,104,.92));
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge[data-quality-tier="auto"]::after {
    background: linear-gradient(135deg, rgba(255,78,219,.92), rgba(123,92,255,.92));
}

/* One unmistakable bottom trigger for source/quality: HD tag + server-stack glyph. */
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger {
    width: 46px;
    min-width: 46px;
    height: 40px;
    border-radius: 12px;
    color: rgba(244,248,255,.94);
}
.sg-player-source-trigger-stack {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.sg-player-source-trigger-quality-tag {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0,229,255,.16), rgba(123,92,255,.20));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
    color: rgba(247,251,255,.95);
    font-size: .50rem;
    font-weight: 950;
    letter-spacing: .06em;
    line-height: 1;
}
#sgSourceMobileTrigger[data-quality-tier="4k"] .sg-player-source-trigger-quality-tag {
    background: linear-gradient(135deg, rgba(255,174,82,.95), rgba(255,213,96,.90));
    color: #2c1700;
}
#sgSourceMobileTrigger[data-quality-tier="fhd"] .sg-player-source-trigger-quality-tag {
    background: linear-gradient(135deg, rgba(0,229,255,.90), rgba(43,123,255,.90));
}
#sgSourceMobileTrigger[data-quality-tier="hd"] .sg-player-source-trigger-quality-tag {
    background: linear-gradient(135deg, rgba(123,92,255,.90), rgba(67,134,255,.86));
}
#sgSourceMobileTrigger[data-quality-tier="sd"] .sg-player-source-trigger-quality-tag {
    background: linear-gradient(135deg, rgba(96,106,125,.92), rgba(67,74,91,.92));
}
#sgSourceMobileTrigger[data-quality-tier="auto"] .sg-player-source-trigger-quality-tag {
    background: linear-gradient(135deg, rgba(255,78,219,.90), rgba(123,92,255,.88));
}
.sg-player-source-trigger-server {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 5px rgba(0,0,0,.30));
}

/* Source/speed sheets become glass-only: subtle, neutral and commercial. */
.sg-player-mobile-source-backdrop,
.sg-player-mobile-speed-backdrop {
    background: rgba(1,5,13,.14);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}
.sg-player-mobile-source-panel,
.sg-player-mobile-speed-panel {
    border: 1px solid var(--nova-r9-glass-border) !important;
    background: var(--nova-r9-glass-bg) !important;
    box-shadow: 0 18px 52px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08) !important;
    -webkit-backdrop-filter: blur(22px) saturate(125%) !important;
    backdrop-filter: blur(22px) saturate(125%) !important;
}
.sg-player-mobile-source-head,
.sg-player-mobile-speed-head {
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sg-player-mobile-source-option,
.sg-player-mobile-speed-option {
    border-color: rgba(255,255,255,.075) !important;
    background: rgba(255,255,255,.028) !important;
    box-shadow: none !important;
}
.sg-player-mobile-source-option.selected,
.sg-player-mobile-speed-option.selected {
    border-color: rgba(255,255,255,.16) !important;
    background: rgba(255,255,255,.085) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.16) !important;
}
.sg-player-mobile-source-option.selected .sg-player-mobile-source-check,
.sg-player-mobile-speed-option.selected .sg-player-mobile-speed-check {
    border-color: rgba(255,255,255,.18) !important;
    background: rgba(255,255,255,.10) !important;
    box-shadow: none !important;
}
.sg-player-mobile-source-check,
.sg-player-mobile-speed-check {
    color: rgba(248,251,255,.96);
}
.sg-player-mobile-source-close,
.sg-player-mobile-speed-close {
    background: rgba(255,255,255,.05);
}

/* Quality capsule inside each source row becomes a compact NOVA card. */
.sg-player-mobile-source-quality {
    min-width: 92px;
    min-height: 34px;
    padding: 0 8px 0 10px;
    gap: 6px;
    border: 1px solid rgba(0,229,255,.13);
    border-radius: 11px;
    background:
      linear-gradient(135deg, rgba(0,229,255,.10), rgba(43,123,255,.10) 34%, rgba(123,92,255,.11) 68%, rgba(255,78,219,.10)),
      rgba(8,14,28,.58);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 14px rgba(0,0,0,.18);
}
.sg-player-mobile-source-resolution {
    font-size: .71rem;
    font-weight: 900;
    color: rgba(248,251,255,.98);
}
.sg-player-mobile-source-quality-badge {
    min-width: 31px;
    height: 20px;
    padding-inline: 6px;
    border-radius: 999px;
    font-size: .57rem;
    font-weight: 950;
    letter-spacing: .04em;
    color: #fff;
    background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 2px 8px rgba(0,0,0,.14);
}
.sg-player-mobile-source-quality.quality-4k .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, rgba(255,174,82,.96), rgba(255,213,96,.92));
    color: #281400;
}
.sg-player-mobile-source-quality.quality-fhd .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, rgba(0,229,255,.96), rgba(43,123,255,.92));
}
.sg-player-mobile-source-quality.quality-hd .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, rgba(123,92,255,.95), rgba(67,134,255,.90));
}
.sg-player-mobile-source-quality.quality-sd .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, rgba(116,126,146,.95), rgba(76,86,104,.92));
}
.sg-player-mobile-source-quality.quality-auto .sg-player-mobile-source-quality-badge {
    background: linear-gradient(135deg, rgba(255,78,219,.96), rgba(123,92,255,.92));
}

/* Cinematic main play button styled after the supplied reference. */
.sg-player-main-play {
    border: 1px solid rgba(255,255,255,.22) !important;
    background:
      radial-gradient(circle at 50% 38%, rgba(68,20,111,.88), rgba(28,11,52,.95) 56%, rgba(13,8,28,.98) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.18),
      inset 0 -10px 20px rgba(0,0,0,.22),
      0 16px 44px rgba(26,12,56,.44),
      0 0 22px rgba(124,92,255,.28),
      0 0 34px rgba(0,229,255,.20) !important;
    color: #fbfdff;
}
.sg-player-main-play::before {
    inset: -4px !important;
    border: 2px solid transparent !important;
    background: linear-gradient(135deg, rgba(255,78,219,.92), rgba(123,92,255,.96) 42%, rgba(0,229,255,.96) 100%) border-box;
    -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    box-shadow: 0 0 20px rgba(0,229,255,.22), 0 0 26px rgba(255,78,219,.16);
    opacity: .92 !important;
    transform: none !important;
    animation: sg-r9-play-ring 2.8s ease-in-out infinite !important;
}
.sg-player-main-play::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    background: radial-gradient(circle at 50% 18%, rgba(255,255,255,.06), transparent 56%);
    pointer-events: none;
}
.sg-player-main-play .sg-play-glyph,
.sg-player-main-play .sg-pause-glyph {
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.34));
}
@keyframes sg-r9-play-ring {
    0%,100% { box-shadow: 0 0 14px rgba(124,92,255,.18), 0 0 22px rgba(0,229,255,.12); transform: scale(1); }
    50% { box-shadow: 0 0 18px rgba(124,92,255,.26), 0 0 30px rgba(0,229,255,.18), 0 0 20px rgba(255,78,219,.12); transform: scale(1.018); }
}
.sg-player-spinner {
    top: -4px !important;
    left: -4px !important;
    width: calc(100% + 8px) !important;
    height: calc(100% + 8px) !important;
    border: 0 !important;
    background: conic-gradient(from 0deg, rgba(0,229,255,.0) 0deg, rgba(0,229,255,.92) 70deg, rgba(123,92,255,.96) 200deg, rgba(255,78,219,.85) 290deg, rgba(0,229,255,.0) 360deg) !important;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    box-shadow: 0 0 18px rgba(0,229,255,.18), 0 0 24px rgba(123,92,255,.14);
}
.sg-player-shell.is-buffering .sg-player-main-play {
    opacity: .97 !important;
    pointer-events: none;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph,
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    opacity: .34;
    transform: scale(.94);
}
.sg-player-shell.is-buffering .sg-player-main-play::before {
    animation: sg-spin 1.05s linear infinite, sg-r9-buffer-pulse 1.8s ease-in-out infinite !important;
}
@keyframes sg-r9-buffer-pulse {
    0%,100% { filter: brightness(1) saturate(1); }
    50% { filter: brightness(1.08) saturate(1.08); }
}

@media (pointer: coarse) {
    .sg-player-main-play,
    .sg-player-center-host {
        width: clamp(62px, 9.6dvh, 72px) !important;
        height: clamp(62px, 9.6dvh, 72px) !important;
    }
    .sg-player-main-play svg {
        width: clamp(26px, 3.95dvh, 31px) !important;
        height: clamp(26px, 3.95dvh, 31px) !important;
    }
}
@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    .sg-player-main-play,
    .sg-player-center-host {
        width: clamp(60px, 9.9dvh, 68px) !important;
        height: clamp(60px, 9.9dvh, 68px) !important;
    }
}


/* SPACEGATE_DUAL_QUALITY_R10
   Separate server and quality menus, R8-style quality cards and reference-matched play/loading treatment. */

/* R10: server button means server only. */
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger {
    width: 42px;
    min-width: 42px;
    height: 40px;
    padding: 0;
    color: rgba(244,249,255,.94);
}
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger .sg-player-source-trigger-server {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}
.sg-player-source-trigger-stack,
.sg-player-source-trigger-quality-tag { display: none !important; }

/* R10: current quality is its own control, visually restored to the R8 card. */
.sg-player-shell.has-native-touch-gestures .sg-player-badge.sg-player-quality-current-trigger {
    min-width: 62px;
    height: 34px;
    min-height: 34px;
    padding: 0 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,229,255,.18) !important;
    border-radius: 10px !important;
    background:
      linear-gradient(135deg, rgba(0,229,255,.18), rgba(43,123,255,.20) 36%, rgba(123,92,255,.24) 69%, rgba(255,78,219,.18)),
      rgba(6,13,27,.72) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 7px 18px rgba(0,0,0,.18) !important;
    -webkit-backdrop-filter: blur(15px) saturate(145%);
    backdrop-filter: blur(15px) saturate(145%);
    color: #f8fbff;
    font-size: .70rem;
    font-weight: 950;
    letter-spacing: .02em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, border-color .15s ease, filter .15s ease;
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge.sg-player-quality-current-trigger::after {
    content: none !important;
    display: none !important;
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge.sg-player-quality-current-trigger:active {
    transform: scale(.95);
}
.sg-player-shell.mobile-quality-open .sg-player-badge.sg-player-quality-current-trigger {
    border-color: rgba(0,229,255,.42) !important;
    filter: drop-shadow(0 0 9px rgba(0,229,255,.22));
}

/* Neutral glass quality sheet opened from the current-quality card. */
.sg-player-mobile-quality-sheet {
    position: absolute;
    inset: 0;
    z-index: 101;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 14px max(14px, env(safe-area-inset-right, 0px)) calc(58px + env(safe-area-inset-bottom, 0px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility 0s linear .18s;
}
.sg-player-mobile-quality-sheet.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}
.sg-player-mobile-quality-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(1,5,13,.12);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}
.sg-player-mobile-quality-panel {
    position: relative;
    width: min(258px, calc(100vw - 26px));
    max-height: min(360px, calc(100dvh - 74px));
    overflow: auto;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(12,17,29,.64), rgba(6,10,18,.76));
    box-shadow: 0 18px 52px rgba(0,0,0,.43), inset 0 1px 0 rgba(255,255,255,.08);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
    backdrop-filter: blur(22px) saturate(125%);
    color: #fff;
    direction: rtl;
    transform-origin: 90% 100%;
    transform: translateY(9px) scale(.97);
    opacity: 0;
    transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
}
.sg-player-mobile-quality-sheet.show .sg-player-mobile-quality-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.sg-player-mobile-quality-head {
    min-height: 48px;
    padding: 8px 11px 7px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sg-player-mobile-quality-title {
    display: grid;
    gap: 1px;
    text-align: right;
}
.sg-player-mobile-quality-title strong { font-size: .82rem; font-weight: 950; }
.sg-player-mobile-quality-title small { color: rgba(227,237,255,.55); font-size: .58rem; }
.sg-player-mobile-quality-close {
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    color: rgba(248,251,255,.88);
    font: 400 1.2rem/1 Arial,sans-serif;
}
.sg-player-mobile-quality-list {
    padding: 8px;
    display: grid;
    gap: 6px;
}

/* Each quality choice is the same refined NOVA card language as R8 AUTO/current quality. */
.sg-player-mobile-quality-option {
    min-height: 48px;
    padding: 6px 9px 6px 10px;
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0,229,255,.12);
    border-radius: 11px;
    background:
      linear-gradient(135deg, rgba(0,229,255,.10), rgba(43,123,255,.11) 35%, rgba(123,92,255,.12) 68%, rgba(255,78,219,.09)),
      rgba(7,13,26,.62);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 4px 14px rgba(0,0,0,.15);
    color: #fff;
    font: inherit;
    text-align: right;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.sg-player-mobile-quality-option:active { transform: scale(.985); }
.sg-player-mobile-quality-option.selected {
    border-color: rgba(0,229,255,.36);
    background:
      linear-gradient(135deg, rgba(0,229,255,.18), rgba(43,123,255,.19) 35%, rgba(123,92,255,.22) 68%, rgba(255,78,219,.16)),
      rgba(8,14,28,.76);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 7px 18px rgba(0,0,0,.18), 0 0 14px rgba(43,123,255,.10);
}
.sg-player-mobile-quality-option-main { display: grid; gap: 1px; min-width: 0; }
.sg-player-mobile-quality-option-main strong { font-size: .74rem; font-weight: 950; }
.sg-player-mobile-quality-option-main small { font-size: .56rem; color: rgba(226,236,252,.55); }
.sg-player-mobile-quality-option-check {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    font-size: .66rem;
    color: #fff;
}
.sg-player-mobile-quality-option.selected .sg-player-mobile-quality-option-check {
    border-color: transparent;
    background: linear-gradient(135deg, #00E5FF, #2B7BFF 45%, #7B5CFF 76%, #FF4EDB);
    box-shadow: 0 0 10px rgba(0,229,255,.20);
}
.sg-player-mobile-quality-option-badge {
    min-width: 38px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
    color: #fff;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .03em;
}
.sg-player-mobile-quality-option.quality-4k .sg-player-mobile-quality-option-badge {
    background: linear-gradient(135deg, rgba(255,174,82,.96), rgba(255,213,96,.92)); color:#281400;
}
.sg-player-mobile-quality-option.quality-fhd .sg-player-mobile-quality-option-badge {
    background: linear-gradient(135deg, rgba(0,229,255,.96), rgba(43,123,255,.92));
}
.sg-player-mobile-quality-option.quality-hd .sg-player-mobile-quality-option-badge {
    background: linear-gradient(135deg, rgba(123,92,255,.95), rgba(67,134,255,.90));
}
.sg-player-mobile-quality-option.quality-sd .sg-player-mobile-quality-option-badge {
    background: linear-gradient(135deg, rgba(116,126,146,.95), rgba(76,86,104,.92));
}
.sg-player-mobile-quality-option.quality-auto .sg-player-mobile-quality-option-badge {
    background: linear-gradient(135deg, rgba(255,78,219,.95), rgba(123,92,255,.92));
}
.sg-player-shell.mobile-quality-open .sg-player-ui { pointer-events: none; }
.sg-player-shell.mobile-quality-open .sg-player-mobile-quality-sheet,
.sg-player-shell.mobile-quality-open .sg-player-mobile-quality-sheet * { pointer-events: auto; }

/* Server list no longer duplicates quality. */
.sg-player-mobile-server-option {
    grid-template-columns: 24px 30px minmax(0,1fr) !important;
}
.sg-player-mobile-server-glyph {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,.05);
    color: rgba(235,244,255,.86);
}
.sg-player-mobile-server-glyph svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}
.sg-player-mobile-server-option .sg-player-mobile-source-copy { grid-column: auto; }
.sg-player-mobile-server-option .sg-player-mobile-source-quality { display: none !important; }

/* R10 — reference-matched main play button: dark violet disk, crisp white triangle,
   thin violet→cyan neon rim. No bulky ring or gradient-filled button. */
.sg-player-main-play {
    isolation: isolate;
    overflow: visible;
    border: 0 !important;
    background:
      radial-gradient(circle at 46% 34%, rgba(76,33,128,.95) 0%, rgba(43,20,80,.98) 48%, rgba(23,12,49,.99) 76%, rgba(13,8,29,1) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.10),
      inset 0 -9px 18px rgba(0,0,0,.24),
      0 8px 24px rgba(13,5,34,.42),
      0 0 18px rgba(112,62,255,.19) !important;
    color: #fff !important;
}
.sg-player-main-play::before {
    content: "";
    position: absolute;
    inset: -3px !important;
    z-index: -1;
    border-radius: 50%;
    border: 0 !important;
    background: conic-gradient(from 210deg, #00D9FF 0deg, #2B7BFF 78deg, #7B5CFF 165deg, #B44DFF 238deg, #FF4EDB 304deg, #00D9FF 360deg);
    box-shadow: 0 0 9px rgba(0,217,255,.36), 0 0 13px rgba(180,77,255,.26);
    opacity: 1 !important;
    transform: none !important;
    animation: sg-r10-reference-glow 2.6s ease-in-out infinite !important;
}
.sg-player-main-play::after {
    content: "";
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.11);
    background: radial-gradient(circle at 38% 20%, rgba(255,255,255,.055), transparent 38%);
    pointer-events: none;
}
.sg-player-main-play .sg-play-glyph,
.sg-player-main-play .sg-pause-glyph {
    position: relative;
    z-index: 2;
    fill: #fff !important;
    stroke: #fff !important;
    filter: drop-shadow(0 1px 4px rgba(255,255,255,.18)) drop-shadow(0 3px 8px rgba(0,0,0,.34));
}
.sg-player-main-play .sg-play-glyph { transform: translateX(1.5px); }
@keyframes sg-r10-reference-glow {
    0%,100% { filter: brightness(.96) saturate(1); box-shadow: 0 0 8px rgba(0,217,255,.28), 0 0 12px rgba(180,77,255,.22); }
    50% { filter: brightness(1.08) saturate(1.08); box-shadow: 0 0 12px rgba(0,217,255,.42), 0 0 18px rgba(180,77,255,.30); }
}

/* R10 loading: keep the reference button visible. Only a thin outer arc rotates. */
.sg-player-shell.is-buffering .sg-player-main-play,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play {
    opacity: 1 !important;
    pointer-events: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph,
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    opacity: .70 !important;
    transform: translateX(1.5px) scale(.96) !important;
}
.sg-player-spinner {
    top: -7px !important;
    left: -7px !important;
    width: calc(100% + 14px) !important;
    height: calc(100% + 14px) !important;
    z-index: 4;
    border: 0 !important;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
      transparent 0deg 205deg,
      rgba(0,217,255,.15) 216deg,
      #00D9FF 245deg,
      #7B5CFF 288deg,
      #FF4EDB 326deg,
      transparent 354deg 360deg) !important;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    box-shadow: 0 0 10px rgba(0,217,255,.16), 0 0 14px rgba(123,92,255,.12) !important;
    animation: sg-r10-loader-spin 1.05s linear infinite !important;
}
@keyframes sg-r10-loader-spin { to { transform: rotate(360deg); } }
.sg-player-shell.is-buffering .sg-player-main-play::before {
    animation: sg-r10-buffer-breathe 1.8s ease-in-out infinite !important;
}
@keyframes sg-r10-buffer-breathe {
    0%,100% { filter: brightness(.94); opacity: .86; }
    50% { filter: brightness(1.08); opacity: 1; }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    .sg-player-mobile-quality-sheet { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
    .sg-player-mobile-quality-panel { width: min(244px, calc(100vw - 24px)); max-height: min(304px, calc(100dvh - 66px)); }
    .sg-player-mobile-quality-option { min-height: 43px; }
}

@media (prefers-reduced-motion: reduce) {
    .sg-player-mobile-quality-panel,
    .sg-player-mobile-quality-option { transition-duration: .01ms !important; }
    .sg-player-main-play::before { animation: none !important; }
    .sg-player-spinner { animation-duration: 1.6s !important; }
}

/* R10.1 play-reference precision pass: full continuous neon rim and restrained loader arc. */
.sg-player-main-play::before {
    inset: -3px !important;
    padding: 2px !important;
    background: conic-gradient(from 0deg,
      #D84CFF 0deg,
      #A84CFF 80deg,
      #795CFF 150deg,
      #397DFF 225deg,
      #00D9FF 292deg,
      #7A5CFF 338deg,
      #D84CFF 360deg) !important;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    box-shadow: 0 0 9px rgba(0,217,255,.28), 0 0 13px rgba(168,76,255,.24) !important;
}
.sg-player-spinner {
    top: -7px !important;
    left: -7px !important;
    width: calc(100% + 14px) !important;
    height: calc(100% + 14px) !important;
    background: conic-gradient(from 0deg,
      transparent 0deg 245deg,
      rgba(0,217,255,.16) 250deg,
      #00D9FF 274deg,
      #6D67FF 306deg,
      #D84CFF 334deg,
      transparent 358deg 360deg) !important;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)) !important;
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)) !important;
    box-shadow: 0 0 8px rgba(0,217,255,.14), 0 0 12px rgba(123,92,255,.10) !important;
    animation: sg-r10-loader-spin 1.08s linear infinite !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph,
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    opacity: .88 !important;
}

/* R10.2: loading preserves the reference play silhouette instead of showing pause. */
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph { display: block !important; opacity: .84 !important; }
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph { display: none !important; }


/* SPACEGATE_FINAL_POLISH_R11
   Player-only final visual pass: exact NOVA quality pill, reference play button,
   single professional loading ring and crisp high-DPI controls. */

/* Rendering quality: scoped to the player so no catalogue/detail UI is touched. */
.sg-player-shell {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}
.sg-player-shell svg {
    shape-rendering: geometricPrecision;
    text-rendering: geometricPrecision;
}
.sg-player-shell svg path,
.sg-player-shell svg line,
.sg-player-shell svg polyline,
.sg-player-shell svg circle,
.sg-player-shell svg rect {
    vector-effect: non-scaling-stroke;
}
.sg-player-shell .sg-player-icon svg,
.sg-player-shell .sg-player-play-small svg,
.sg-player-shell .sg-player-source-trigger-server {
    filter: none !important;
}

/* Exact current-quality pill from the supplied reference: compact, opaque,
   magenta -> violet -> cyan, with crisp white quality text. */
.sg-player-shell.has-native-touch-gestures .sg-player-badge.sg-player-quality-current-trigger {
    min-width: 58px !important;
    width: auto !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 11px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: linear-gradient(105deg, #e83bd4 0%, #b643ee 35%, #824cff 62%, #31c8ff 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.18),
      0 4px 12px rgba(88,54,210,.24) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #fff !important;
    font-size: .63rem !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge.sg-player-quality-current-trigger::after {
    content: none !important;
    display: none !important;
}
.sg-player-shell.has-native-touch-gestures .sg-player-badge.sg-player-quality-current-trigger:active {
    transform: scale(.96) !important;
    filter: brightness(1.04) !important;
}
.sg-player-shell.mobile-quality-open .sg-player-badge.sg-player-quality-current-trigger {
    border: 0 !important;
    filter: brightness(1.05) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.20),
      0 4px 14px rgba(88,54,210,.30),
      0 0 13px rgba(49,200,255,.14) !important;
}

/* Quality labels inside the menu use the same visual language, without changing
   the glass panel itself. */
.sg-player-shell .sg-player-mobile-quality-option-badge {
    min-width: 44px !important;
    height: 25px !important;
    padding: 0 8px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: linear-gradient(105deg, #e83bd4 0%, #b643ee 35%, #824cff 62%, #31c8ff 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 3px 9px rgba(64,44,170,.16) !important;
    color: #fff !important;
    font-size: .60rem !important;
    font-weight: 950 !important;
    text-shadow: none !important;
}

/* Reference play button: dark violet disk, bright white triangle and a static,
   razor-thin NOVA rim. No breathing/pulsing animation during normal playback. */
.sg-player-shell .sg-player-main-play {
    border: 0 !important;
    background:
      radial-gradient(circle at 45% 34%, #54218c 0%, #351569 42%, #23104e 70%, #170b35 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.11),
      inset 0 -8px 16px rgba(0,0,0,.20),
      0 7px 18px rgba(15,7,35,.34),
      0 0 13px rgba(141,74,255,.25),
      0 0 18px rgba(34,178,255,.14) !important;
    color: #fff !important;
    overflow: visible !important;
}
.sg-player-shell .sg-player-main-play::before {
    content: "" !important;
    position: absolute !important;
    inset: -3px !important;
    padding: 2px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: conic-gradient(from 205deg,
      #18cfff 0deg,
      #2d88ff 64deg,
      #755dff 136deg,
      #a64cff 218deg,
      #d94dff 288deg,
      #795cff 330deg,
      #18cfff 360deg) !important;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    filter: none !important;
    box-shadow: 0 0 7px rgba(135,79,255,.34), 0 0 10px rgba(24,207,255,.20) !important;
}
.sg-player-shell .sg-player-main-play::after {
    content: "" !important;
    position: absolute !important;
    inset: 1px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    background: radial-gradient(circle at 35% 20%, rgba(255,255,255,.045), transparent 42%) !important;
    pointer-events: none !important;
}
.sg-player-shell .sg-player-main-play .sg-play-glyph,
.sg-player-shell .sg-player-main-play .sg-pause-glyph {
    z-index: 3 !important;
    fill: #fff !important;
    stroke: #fff !important;
    filter: none !important;
}
.sg-player-shell .sg-player-main-play .sg-play-glyph {
    transform: translateX(1.5px) !important;
}

/* Loading/preparing: remove every old pulse/breathe animation. The only motion is
   one clean circular progress ring using the same NOVA colors as the play rim. */
.sg-player-shell.is-buffering .sg-player-main-play,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play {
    opacity: 1 !important;
    pointer-events: none !important;
    animation: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play::before {
    animation: none !important;
    opacity: .54 !important;
    filter: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph {
    display: block !important;
    opacity: 1 !important;
    transform: translateX(1.5px) !important;
    animation: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    display: none !important;
}
.sg-player-shell .sg-player-spinner {
    top: -8px !important;
    left: -8px !important;
    width: calc(100% + 16px) !important;
    height: calc(100% + 16px) !important;
    z-index: 5 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: conic-gradient(from 0deg,
      transparent 0deg 82deg,
      #18cfff 110deg,
      #2d88ff 158deg,
      #755dff 214deg,
      #a64cff 270deg,
      #d94dff 320deg,
      #18cfff 359deg) !important;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)) !important;
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)) !important;
    box-shadow: 0 0 7px rgba(125,84,255,.24), 0 0 10px rgba(24,207,255,.14) !important;
    animation: sg-r11-loader-spin .92s linear infinite !important;
    will-change: transform;
}
@keyframes sg-r11-loader-spin { to { transform: rotate(360deg); } }

/* Crisp, high-DPI timeline. The touch target stays large, while the visible rail
   is only 4px. Removed large glow/blur that made the old progress bar look soft. */
.sg-player-shell #sgSeek {
    --sg-range-height: 4px !important;
    --sg-range-thumb: 15px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.sg-player-shell #sgSeek::-webkit-slider-runnable-track {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background:
      linear-gradient(90deg, #18cfff 0%, #2d88ff 34%, #765dff 68%, #d94dff 100%) 0 50% / var(--sg-fill) 100% no-repeat,
      linear-gradient(90deg,
        rgba(255,255,255,.30) 0%,
        rgba(255,255,255,.30) var(--sg-buffered),
        rgba(255,255,255,.14) var(--sg-buffered),
        rgba(255,255,255,.14) 100%) !important;
    box-shadow: none !important;
}
.sg-player-shell #sgSeek::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 15px !important;
    height: 15px !important;
    margin-top: -5.5px !important;
    border: 2px solid rgba(255,255,255,.96) !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #29d4ff, #675fff 58%, #d94dff) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.35) !important;
}
.sg-player-shell #sgSeek::-moz-range-track {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.14) !important;
    box-shadow: none !important;
}
.sg-player-shell #sgSeek::-moz-range-progress {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #18cfff 0%, #2d88ff 34%, #765dff 68%, #d94dff 100%) !important;
    box-shadow: none !important;
}
.sg-player-shell #sgSeek::-moz-range-thumb {
    width: 15px !important;
    height: 15px !important;
    border: 2px solid rgba(255,255,255,.96) !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #29d4ff, #675fff 58%, #d94dff) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.35) !important;
}
.sg-player-shell #sgSeek:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(117,93,255,.22), 0 1px 4px rgba(0,0,0,.35) !important;
}
.sg-player-shell .sg-player-timeline > span {
    color: rgba(248,251,255,.92) !important;
    font-variant-numeric: tabular-nums;
    font-size: .70rem;
    font-weight: 750;
    letter-spacing: .01em;
    text-shadow: 0 1px 3px rgba(0,0,0,.58) !important;
}

/* Sharpen bottom-row icons without reintroducing frames. */
.sg-player-shell.has-native-touch-gestures .sg-player-control-row button:not(.sg-player-quality-current-trigger) {
    -webkit-tap-highlight-color: transparent;
}
.sg-player-shell.has-native-touch-gestures .sg-player-control-row button svg {
    stroke-width: 1.9 !important;
    opacity: .96;
}
.sg-player-shell.has-native-touch-gestures #sgPlay,
.sg-player-shell.has-native-touch-gestures #sgReload,
.sg-player-shell.has-native-touch-gestures #sgSourceMobileTrigger,
.sg-player-shell.has-native-touch-gestures .sg-player-speed-mobile-trigger {
    text-shadow: none !important;
    filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .sg-player-shell .sg-player-spinner {
        animation-duration: 1.8s !important;
    }
}


/* SPACEGATE_CRISP_LOADER_R12
   Player-only corrective pass: one professional loading ring, graphite play disk,
   sharper Android controls and vector icons for quality/server lists. */

/* Eliminate legacy loading motion. The play control itself never pulses, spins,
   breathes or fades; only #sgSpinner rotates while buffering. */
.sg-player-shell .sg-player-main-play,
.sg-player-shell .sg-player-main-play::before,
.sg-player-shell .sg-player-main-play::after,
.sg-player-shell .sg-player-main-play .sg-play-glyph,
.sg-player-shell .sg-player-main-play .sg-pause-glyph {
    animation: none !important;
    transition: transform .14s ease, opacity .14s ease !important;
    filter: none !important;
}

/* Reference-matched control: translucent graphite/black centre with NOVA neon rim. */
.sg-player-shell .sg-player-main-play {
    isolation: isolate !important;
    overflow: visible !important;
    border: 0 !important;
    background:
      radial-gradient(circle at 38% 28%, rgba(255,255,255,.075) 0%, rgba(255,255,255,.018) 30%, transparent 48%),
      linear-gradient(160deg, rgba(30,32,38,.88), rgba(13,14,18,.90) 56%, rgba(7,8,11,.92)) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.09),
      inset 0 -7px 14px rgba(0,0,0,.22),
      0 8px 20px rgba(0,0,0,.32),
      0 0 11px rgba(124,92,255,.18),
      0 0 13px rgba(24,207,255,.10) !important;
    color: #fff !important;
}
.sg-player-shell .sg-player-main-play::before {
    content: "" !important;
    position: absolute !important;
    inset: -3px !important;
    padding: 2px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: conic-gradient(from 215deg,
      #19d5ff 0deg,
      #238fff 62deg,
      #6b63ff 132deg,
      #a94cff 226deg,
      #e64bd8 292deg,
      #8b59ff 334deg,
      #19d5ff 360deg) !important;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: 0 0 6px rgba(126,82,255,.24), 0 0 8px rgba(25,213,255,.14) !important;
    pointer-events: none !important;
}
.sg-player-shell .sg-player-main-play::after {
    content: "" !important;
    position: absolute !important;
    inset: 3px !important;
    border: 1px solid rgba(255,255,255,.045) !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
}
.sg-player-shell .sg-player-main-play .sg-play-glyph,
.sg-player-shell .sg-player-main-play .sg-pause-glyph {
    z-index: 3 !important;
    fill: #fff !important;
    stroke: #fff !important;
    opacity: 1 !important;
    filter: none !important;
}
.sg-player-shell .sg-player-main-play .sg-play-glyph {
    transform: translateX(1.5px) !important;
}

/* Buffering/preparing: a single thin rotating circular bar. It uses exactly the
   same NOVA hues as the static play-button rim. No other loading animation. */
.sg-player-shell.is-buffering .sg-player-main-play,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play {
    opacity: 1 !important;
    pointer-events: none !important;
    animation: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play::before,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play::before {
    opacity: .34 !important;
    animation: none !important;
    transform: none !important;
    filter: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play::after,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play::after {
    animation: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play .sg-play-glyph {
    display: block !important;
    opacity: .90 !important;
    transform: translateX(1.5px) !important;
    animation: none !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play .sg-pause-glyph {
    display: none !important;
}
.sg-player-shell .sg-player-spinner {
    display: none;
    top: -7px !important;
    left: -7px !important;
    width: calc(100% + 14px) !important;
    height: calc(100% + 14px) !important;
    z-index: 6 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: conic-gradient(from 0deg,
      transparent 0deg 82deg,
      #19d5ff 94deg,
      #238fff 146deg,
      #6b63ff 202deg,
      #a94cff 255deg,
      #e64bd8 306deg,
      #8b59ff 340deg,
      transparent 360deg) !important;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)) !important;
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)) !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    transform-origin: 50% 50% !important;
    animation: none !important;
    will-change: auto !important;
    pointer-events: none !important;
}
.sg-player-shell.is-buffering .sg-player-spinner,
.sg-player-shell.ui-hidden.is-buffering .sg-player-spinner {
    display: block !important;
    animation: sg-r12-loader-ring .86s linear infinite !important;
    will-change: transform !important;
}
@keyframes sg-r12-loader-ring { to { transform: rotate(360deg); } }

/* Player rendering: avoid soft GPU effects on text/icons/transport controls. */
.sg-player-shell .sg-player-ui,
.sg-player-shell .sg-player-controls,
.sg-player-shell .sg-player-control-row,
.sg-player-shell .sg-player-timeline,
.sg-player-shell .sg-player-icon,
.sg-player-shell .sg-player-speed-mobile-trigger,
.sg-player-shell .sg-player-badge,
.sg-player-shell .sg-player-mobile-source-option,
.sg-player-shell .sg-player-mobile-quality-option,
.sg-player-shell .sg-player-mobile-speed-option {
    filter: none !important;
    text-shadow: none !important;
}
.sg-player-shell .sg-player-icon svg,
.sg-player-shell .sg-player-speed-mobile-trigger svg,
.sg-player-shell .sg-player-mobile-server-glyph svg,
.sg-player-shell .sg-player-mobile-quality-option-icon svg {
    shape-rendering: geometricPrecision !important;
    filter: none !important;
}
.sg-player-shell .sg-player-icon svg *,
.sg-player-shell .sg-player-mobile-server-glyph svg *,
.sg-player-shell .sg-player-mobile-quality-option-icon svg * {
    vector-effect: non-scaling-stroke;
}

/* Glass stays, but blur is deliberately light so content remains crisp. */
.sg-player-shell .sg-player-mobile-source-panel,
.sg-player-shell .sg-player-mobile-quality-panel,
.sg-player-shell .sg-player-mobile-speed-panel {
    filter: none !important;
    -webkit-backdrop-filter: blur(8px) saturate(112%) !important;
    backdrop-filter: blur(8px) saturate(112%) !important;
    background: linear-gradient(180deg, rgba(13,17,26,.78), rgba(7,10,16,.84)) !important;
    border-color: rgba(255,255,255,.11) !important;
}
.sg-player-shell .sg-player-mobile-source-backdrop,
.sg-player-shell .sg-player-mobile-quality-backdrop,
.sg-player-shell .sg-player-mobile-speed-backdrop {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(0,0,0,.10) !important;
}

/* Professional vector menu icons. */
.sg-player-shell .sg-player-mobile-server-glyph,
.sg-player-shell .sg-player-mobile-quality-option-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;
    background: rgba(255,255,255,.045);
    color: rgba(245,249,255,.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}
.sg-player-shell .sg-player-mobile-server-glyph svg,
.sg-player-shell .sg-player-mobile-quality-option-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sg-player-shell .sg-player-mobile-server-option.selected .sg-player-mobile-server-glyph,
.sg-player-shell .sg-player-mobile-quality-option.selected .sg-player-mobile-quality-option-icon {
    color: #fff;
    border-color: rgba(124,92,255,.24);
    background: linear-gradient(135deg, rgba(230,75,216,.13), rgba(107,99,255,.14) 54%, rgba(25,213,255,.12));
}
.sg-player-shell .sg-player-mobile-quality-option-icon.icon-auto {
    color: #dcb8ff;
}
.sg-player-shell .sg-player-mobile-quality-option-icon.icon-4k,
.sg-player-shell .sg-player-mobile-quality-option-icon.icon-fhd {
    color: #66dfff;
}
.sg-player-shell .sg-player-mobile-quality-option-icon.icon-hd {
    color: #9d8cff;
}
.sg-player-shell .sg-player-mobile-quality-option-icon.icon-sd {
    color: rgba(222,229,241,.82);
}
.sg-player-shell .sg-player-mobile-quality-option {
    grid-template-columns: 22px 30px minmax(0,1fr) auto !important;
}
.sg-player-shell .sg-player-mobile-server-option {
    grid-template-columns: 22px 30px minmax(0,1fr) !important;
}

/* High-DPI timeline: no blur, no outer container, crisp 4px rail and 13px thumb. */
.sg-player-shell #sgSeek {
    --sg-range-height: 4px !important;
    --sg-range-thumb: 13px !important;
    min-height: 28px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}
.sg-player-shell #sgSeek::-webkit-slider-runnable-track {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background:
      linear-gradient(90deg, #19d5ff 0%, #238fff 35%, #6b63ff 68%, #e64bd8 100%) 0 50% / var(--sg-fill) 100% no-repeat,
      linear-gradient(90deg,
        rgba(221,231,245,.30) 0%,
        rgba(221,231,245,.30) var(--sg-buffered),
        rgba(221,231,245,.15) var(--sg-buffered),
        rgba(221,231,245,.15) 100%) !important;
    box-shadow: none !important;
    filter: none !important;
}
.sg-player-shell #sgSeek::-webkit-slider-thumb {
    width: 13px !important;
    height: 13px !important;
    margin-top: -4.5px !important;
    border: 1px solid rgba(255,255,255,.92) !important;
    background: #6b63ff !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.35) !important;
    filter: none !important;
}
.sg-player-shell #sgSeek::-moz-range-track {
    height: 4px !important;
    border: 0 !important;
    background: rgba(221,231,245,.15) !important;
    box-shadow: none !important;
}
.sg-player-shell #sgSeek::-moz-range-progress {
    height: 4px !important;
    background: linear-gradient(90deg, #19d5ff 0%, #238fff 35%, #6b63ff 68%, #e64bd8 100%) !important;
    box-shadow: none !important;
}
.sg-player-shell #sgSeek::-moz-range-thumb {
    width: 13px !important;
    height: 13px !important;
    border: 1px solid rgba(255,255,255,.92) !important;
    background: #6b63ff !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.35) !important;
}
.sg-player-shell .sg-player-timeline > span,
.sg-player-shell .sg-player-mobile-source-copy strong,
.sg-player-shell .sg-player-mobile-source-copy small,
.sg-player-shell .sg-player-mobile-quality-option-main strong,
.sg-player-shell .sg-player-mobile-quality-option-main small {
    text-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .sg-player-shell.is-buffering .sg-player-spinner,
    .sg-player-shell.ui-hidden.is-buffering .sg-player-spinner {
        animation-duration: 1.5s !important;
    }
}


/* SPACEGATE_ANDROID_BACK_LOADER_R13
   Hard-removes the legacy loader, uses one NOVA circular ring only, keeps the
   play disk crisp/graphite and turns AUTO/4K/FHD/HD/SD into icon quality cards. */

/* Definitive legacy-loader kill switch. The old DOM node is also removed in JS. */
.sg-player-shell #sgSpinner,
.sg-player-shell .sg-player-spinner {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    animation: none !important;
    transition: none !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}

/* Play button: graphite-black translucent centre, crisp white glyph and static
   NOVA rim. Nothing on the button itself animates while preparing content. */
.sg-player-shell .sg-player-main-play,
.sg-player-shell .sg-player-main-play::before,
.sg-player-shell .sg-player-main-play::after,
.sg-player-shell .sg-player-main-play .sg-play-glyph,
.sg-player-shell .sg-player-main-play .sg-pause-glyph,
.sg-player-shell.is-buffering .sg-player-main-play,
.sg-player-shell.is-buffering .sg-player-main-play::before,
.sg-player-shell.is-buffering .sg-player-main-play::after,
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph,
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    animation: none !important;
    filter: none !important;
}
.sg-player-shell .sg-player-main-play {
    opacity: 1 !important;
    border: 0 !important;
    background:
      radial-gradient(circle at 38% 26%, rgba(255,255,255,.065) 0%, rgba(255,255,255,.018) 30%, transparent 48%),
      linear-gradient(158deg, rgba(33,34,39,.93), rgba(18,19,23,.95) 52%, rgba(8,9,12,.96)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.085),
      inset 0 -7px 13px rgba(0,0,0,.24),
      0 7px 18px rgba(0,0,0,.34),
      0 0 9px rgba(120,84,255,.17),
      0 0 10px rgba(25,213,255,.10) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.sg-player-shell .sg-player-main-play::before {
    content: "" !important;
    position: absolute !important;
    inset: -3px !important;
    padding: 2px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: conic-gradient(from 214deg,
      #19d5ff 0deg,
      #238fff 62deg,
      #6b63ff 132deg,
      #a94cff 226deg,
      #e64bd8 292deg,
      #8b59ff 334deg,
      #19d5ff 360deg) !important;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: 0 0 6px rgba(126,82,255,.24), 0 0 8px rgba(25,213,255,.14) !important;
}
.sg-player-shell .sg-player-main-play::after {
    content: "" !important;
    position: absolute !important;
    inset: 3px !important;
    border: 1px solid rgba(255,255,255,.042) !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
}
.sg-player-shell .sg-player-main-play .sg-play-glyph {
    display: block !important;
    opacity: 1 !important;
    fill: #fff !important;
    stroke: #fff !important;
    transform: translateX(1.5px) !important;
}
.sg-player-shell .sg-player-main-play .sg-pause-glyph { opacity: 1 !important; }
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph { display: none !important; }
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph { display: block !important; }

/* R13 loading indicator: the ONLY startup/buffering motion. A professional thin
   circular arc using the exact same palette as the static play rim. */
.sg-player-shell .sg-player-loader-ring-r13 {
    position: absolute;
    z-index: 9;
    top: -8px;
    left: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    display: none;
    border-radius: 50%;
    pointer-events: none;
    background: conic-gradient(from 0deg,
      transparent 0deg 86deg,
      #19d5ff 102deg,
      #238fff 150deg,
      #6b63ff 205deg,
      #a94cff 258deg,
      #e64bd8 306deg,
      #8b59ff 340deg,
      transparent 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    box-shadow: 0 0 5px rgba(107,99,255,.16), 0 0 7px rgba(25,213,255,.10);
    opacity: 1;
    transform-origin: 50% 50%;
    animation: none;
    will-change: auto;
}
.sg-player-shell .sg-player-loader-ring-r13.show {
    display: block;
    animation: sg-r13-loader-ring .92s linear infinite !important;
    will-change: transform;
}
@keyframes sg-r13-loader-ring { to { transform: rotate(360deg); } }

/* Quality list: AUTO/4K/FHD/HD/SD cards themselves carry the icon, instead of a
   separate generic icon column. This is the intended visual identifier. */
.sg-player-shell .sg-player-mobile-quality-option {
    grid-template-columns: 22px minmax(0,1fr) auto !important;
    gap: 9px !important;
}
.sg-player-shell .sg-player-mobile-quality-option-icon {
    display: none !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge {
    min-width: 60px !important;
    height: 30px !important;
    padding: 0 9px 0 7px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0 !important;
    border-radius: 9px !important;
    background: linear-gradient(105deg, #e83bd4 0%, #b643ee 35%, #824cff 62%, #31c8ff 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 9px rgba(64,44,170,.15) !important;
    color: #fff !important;
    white-space: nowrap;
}
.sg-player-shell .sg-player-mobile-quality-badge-icon {
    width: 17px;
    height: 17px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 17px;
}
.sg-player-shell .sg-player-mobile-quality-badge-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    shape-rendering: geometricPrecision;
}
.sg-player-shell .sg-player-mobile-quality-badge-icon svg * {
    vector-effect: non-scaling-stroke;
}
.sg-player-shell .sg-player-mobile-quality-badge-text {
    font-size: .59rem;
    font-weight: 950;
    letter-spacing: .025em;
    line-height: 1;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-4k {
    background: linear-gradient(105deg, #ff9a4d, #ffca57 55%, #f0a844) !important;
    color: #281500 !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-fhd {
    background: linear-gradient(105deg, #14d9ff, #2d83ff 58%, #6c63ff) !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-hd {
    background: linear-gradient(105deg, #685cff, #8b53ff 58%, #c348ed) !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-sd {
    background: linear-gradient(105deg, #727b8d, #596275 58%, #444c5c) !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-auto {
    background: linear-gradient(105deg, #e83bd4 0%, #b643ee 35%, #824cff 62%, #31c8ff 100%) !important;
}

/* Server rack icon stays vector/crisp and slightly stronger than R12. */
.sg-player-shell .sg-player-mobile-server-glyph {
    width: 31px !important;
    height: 31px !important;
    border-radius: 9px !important;
    border-color: rgba(255,255,255,.10) !important;
    background: rgba(255,255,255,.045) !important;
}
.sg-player-shell .sg-player-mobile-server-glyph svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 1.7 !important;
}

/* Keep player transport crisp on high-DPI Android; no blur/filter on interactive
   controls or timeline. No selectors outside .sg-player-shell are touched. */
.sg-player-shell .sg-player-ui,
.sg-player-shell .sg-player-control-row,
.sg-player-shell .sg-player-timeline,
.sg-player-shell .sg-player-icon,
.sg-player-shell .sg-player-badge,
.sg-player-shell #sgSeek,
.sg-player-shell #sgSeek::-webkit-slider-runnable-track,
.sg-player-shell #sgSeek::-webkit-slider-thumb {
    filter: none !important;
}
.sg-player-shell .sg-player-icon svg,
.sg-player-shell .sg-player-mobile-server-glyph svg,
.sg-player-shell .sg-player-mobile-quality-badge-icon svg {
    shape-rendering: geometricPrecision !important;
}

@media (prefers-reduced-motion: reduce) {
    .sg-player-shell .sg-player-loader-ring-r13.show {
        animation-duration: 1.55s !important;
    }
}


/* R13 icon-state correction: never show play and pause glyphs together. */
.sg-player-shell:not(.is-playing):not(.is-buffering) .sg-player-main-play .sg-play-glyph {
    display: block !important;
}
.sg-player-shell:not(.is-playing):not(.is-buffering) .sg-player-main-play .sg-pause-glyph {
    display: none !important;
}
.sg-player-shell.is-playing:not(.is-buffering) .sg-player-main-play .sg-play-glyph {
    display: none !important;
}
.sg-player-shell.is-playing:not(.is-buffering) .sg-player-main-play .sg-pause-glyph {
    display: block !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph {
    display: block !important;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    display: none !important;
}


/* SPACEGATE_R14_CLEAN_LOADER_R8_CARDS
   Final cleanup: remove old loader animation completely, use a professional full circular ring,
   and return quality/server cards to a cleaner R8-inspired look. */

/* 1) Kill every legacy animation around the main play button itself. */
.sg-player-shell .sg-player-main-play,
.sg-player-shell .sg-player-main-play::before,
.sg-player-shell .sg-player-main-play::after,
.sg-player-shell.is-buffering .sg-player-main-play,
.sg-player-shell.is-buffering .sg-player-main-play::before,
.sg-player-shell.is-buffering .sg-player-main-play::after {
    animation: none !important;
    transition: none !important;
}
.sg-player-shell .sg-player-main-play::before,
.sg-player-shell .sg-player-main-play::after {
    content: none !important;
    display: none !important;
}

/* Match the requested button core: dark black/grey translucent center, crisp neon ring. */
.sg-player-shell .sg-player-main-play {
    background: radial-gradient(circle at 50% 35%, rgba(46,52,63,.92) 0%, rgba(25,29,36,.90) 46%, rgba(11,13,18,.88) 100%) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.08),
      inset 0 -7px 14px rgba(0,0,0,.20),
      0 10px 28px rgba(0,0,0,.24),
      0 0 0 1.8px rgba(255,255,255,.06) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
    opacity: 1 !important;
}
.sg-player-shell .sg-player-main-play svg {
    filter: none !important;
}

/* The ONLY buffering animation now: one thin full circular professional ring. */
.sg-player-shell #sgSpinner { display: none !important; }
.sg-player-shell .sg-player-loader-ring-r13 {
    position: absolute;
    z-index: 6;
    inset: -7px;
    border-radius: 50%;
    display: none;
    opacity: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, #ff4edb 0deg, #7b5cff 120deg, #2b7bff 240deg, #00e5ff 330deg, #ff4edb 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    box-shadow: 0 0 10px rgba(123,92,255,.16);
    animation: none !important;
    transform: none !important;
}
.sg-player-shell .sg-player-loader-ring-r13.show,
.sg-player-shell.is-buffering .sg-player-loader-ring-r13 {
    display: block !important;
    opacity: 1 !important;
    animation: sg-r14-loader-spin .92s linear infinite !important;
}
@keyframes sg-r14-loader-spin { to { transform: rotate(360deg); } }

/* Keep the button static while buffering; only ring spins. */
.sg-player-shell.is-buffering .sg-player-main-play,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play {
    opacity: 1 !important;
    pointer-events: none;
}
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph,
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    opacity: 1 !important;
    transform: none !important;
}

/* 2) Crisper UI: no excessive blur/glow inside player controls. */
.sg-player-shell .sg-player-ui,
.sg-player-shell .sg-player-bottom,
.sg-player-shell .sg-player-progress,
.sg-player-shell .sg-player-badge,
.sg-player-shell .sg-player-time,
.sg-player-shell .sg-player-icon,
.sg-player-shell .sg-player-speed-mobile-trigger,
.sg-player-shell .sg-player-mobile-quality-option,
.sg-player-shell .sg-player-mobile-source-option {
    filter: none !important;
    text-shadow: none !important;
}
.sg-player-shell .sg-player-progress-track,
.sg-player-shell .sg-player-progress-fill,
.sg-player-shell .sg-player-progress-buffer,
.sg-player-shell .sg-player-progress-thumb {
    filter: none !important;
    box-shadow: none !important;
}

/* 3) Current quality chip exactly as a compact NOVA gradient pill. */
.sg-player-shell .sg-player-badge,
.sg-player-shell .sg-player-badge.is-quality-trigger,
.sg-player-shell .sg-player-quality-current-trigger {
    min-width: 74px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(90deg, #ff4edb 0%, #9d56ff 52%, #2dd5ff 100%) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-size: .78rem !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}
.sg-player-shell .sg-player-badge::after { content: none !important; }

/* 4) R8-inspired clean cards inside quality and source menus. */
.sg-player-shell .sg-player-mobile-quality-option-badge,
.sg-player-shell .sg-player-mobile-source-quality {
    min-width: 56px !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.055) !important;
    color: rgba(255,255,255,.86) !important;
    box-shadow: none !important;
    direction: ltr;
}
.sg-player-shell .sg-player-mobile-quality-badge-icon,
.sg-player-shell .sg-player-mobile-source-quality .sg-player-mobile-quality-badge-icon {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    background: rgba(255,255,255,.06) !important;
    color: rgba(255,255,255,.92) !important;
    box-shadow: none !important;
}
.sg-player-shell .sg-player-mobile-quality-badge-icon svg,
.sg-player-shell .sg-player-mobile-source-quality .sg-player-mobile-quality-badge-icon svg {
    width: 11px !important;
    height: 11px !important;
    stroke-width: 1.8 !important;
    filter: none !important;
}
.sg-player-shell .sg-player-mobile-quality-badge-text,
.sg-player-shell .sg-player-mobile-source-quality-badge,
.sg-player-shell .sg-player-mobile-source-resolution {
    color: rgba(255,255,255,.92) !important;
    font-size: .67rem !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}
/* Selected cards keep the nicer NOVA highlight but stay crisp and clean. */
.sg-player-shell .sg-player-mobile-quality-option.selected .sg-player-mobile-quality-option-badge,
.sg-player-shell .sg-player-mobile-source-option.selected .sg-player-mobile-source-quality {
    border-color: rgba(37,200,255,.38) !important;
    background: rgba(37,200,255,.12) !important;
    color: #e9fbff !important;
}
.sg-player-shell .sg-player-mobile-quality-option.selected .sg-player-mobile-quality-badge-icon,
.sg-player-shell .sg-player-mobile-source-option.selected .sg-player-mobile-quality-badge-icon {
    background: linear-gradient(135deg, #25c8ff, #675cff) !important;
    color: #fff !important;
}
/* Remove oversized fancy tier-specific treatments from later revisions. */
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-4k,
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-fhd,
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-hd,
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-sd,
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-auto,
.sg-player-shell .sg-player-mobile-source-quality.quality-4k .sg-player-mobile-source-quality-badge,
.sg-player-shell .sg-player-mobile-source-quality.quality-fhd .sg-player-mobile-source-quality-badge,
.sg-player-shell .sg-player-mobile-source-quality.quality-hd .sg-player-mobile-source-quality-badge,
.sg-player-shell .sg-player-mobile-source-quality.quality-sd .sg-player-mobile-source-quality-badge,
.sg-player-shell .sg-player-mobile-source-quality.quality-auto .sg-player-mobile-source-quality-badge {
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

/* Source/server menu gets the same clean mini-card feel. */
.sg-player-shell .sg-player-mobile-source-option,
.sg-player-shell .sg-player-mobile-quality-option,
.sg-player-shell .sg-player-mobile-speed-option {
    -webkit-backdrop-filter: blur(10px) saturate(120%) !important;
    backdrop-filter: blur(10px) saturate(120%) !important;
    background: rgba(14,18,28,.78) !important;
}

/* SPACEGATE_FINAL_R15
   Single source of truth for the Android player loader and R8-inspired cards.
   This block intentionally neutralizes all legacy player-loader visuals. */

/* --- Main play button: static reference look, no pseudo animation --- */
.sg-player-shell .sg-player-main-play,
.sg-player-shell .sg-player-main-play:hover,
.sg-player-shell .sg-player-main-play:active,
.sg-player-shell.is-playing .sg-player-main-play,
.sg-player-shell.is-buffering .sg-player-main-play {
    border: 2px solid transparent !important;
    background:
      linear-gradient(155deg, rgba(39,43,52,.94), rgba(17,20,27,.93) 56%, rgba(8,10,14,.92)) padding-box,
      linear-gradient(135deg, #ff4edb 0%, #a04cff 36%, #6f58ff 57%, #2b7bff 78%, #00e5ff 100%) border-box !important;
    color: #fff !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.08),
      inset 0 -8px 18px rgba(0,0,0,.24),
      0 10px 24px rgba(0,0,0,.26),
      0 0 12px rgba(123,92,255,.18),
      0 0 14px rgba(0,229,255,.10) !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    animation: none !important;
    transition: transform .12s ease !important;
    opacity: 1 !important;
}
.sg-player-shell .sg-player-main-play:hover { transform: scale(1.025) !important; }
.sg-player-shell .sg-player-main-play:active { transform: scale(.94) !important; }
.sg-player-shell .sg-player-main-play::before,
.sg-player-shell .sg-player-main-play::after,
.sg-player-shell.is-buffering .sg-player-main-play::before,
.sg-player-shell.is-buffering .sg-player-main-play::after {
    content: none !important;
    display: none !important;
    animation: none !important;
    box-shadow: none !important;
}
.sg-player-shell .sg-player-main-play svg {
    color: #fff !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    filter: none !important;
}
.sg-player-shell .sg-player-main-play .sg-pause-glyph { fill: none !important; }

/* Remove every historical loader. These nodes are also removed by JS. */
.sg-player-shell #sgSpinner,
.sg-player-shell .sg-player-spinner,
.sg-player-shell #sgR13LoaderRing,
.sg-player-shell .sg-player-loader-ring-r13 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    animation: none !important;
}

/* The only loading animation: one SVG ring with one continuous coloured arc. */
.sg-player-shell .sg-player-loader-r15 {
    position: absolute;
    z-index: 8;
    inset: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    overflow: visible;
    pointer-events: none;
    display: none;
    opacity: 0;
    transform-origin: 50% 50%;
    filter: none;
}
.sg-player-shell .sg-player-loader-r15.show,
.sg-player-shell.is-buffering .sg-player-loader-r15 {
    display: block !important;
    opacity: 1 !important;
    animation: sg-r15-loader-spin .95s linear infinite !important;
}
.sg-player-shell .sg-player-loader-r15-track,
.sg-player-shell .sg-player-loader-r15-arc {
    fill: none;
    vector-effect: non-scaling-stroke;
}
.sg-player-shell .sg-player-loader-r15-track {
    stroke: rgba(255,255,255,.08);
    stroke-width: 2;
}
.sg-player-shell .sg-player-loader-r15-arc {
    stroke: url(#sgLoaderR15Gradient);
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-dasharray: 72 28;
    stroke-dashoffset: 0;
}
@keyframes sg-r15-loader-spin { to { transform: rotate(360deg); } }
.sg-player-shell.is-buffering .sg-player-main-play .sg-play-glyph,
.sg-player-shell.is-buffering .sg-player-main-play .sg-pause-glyph {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* --- Crisp Android controls: no blur/filter on glyphs, labels or seek bar --- */
.sg-player-shell .sg-player-ui,
.sg-player-shell .sg-player-ui *,
.sg-player-shell .sg-player-icon,
.sg-player-shell .sg-player-icon svg,
.sg-player-shell .sg-player-speed-mobile-trigger,
.sg-player-shell .sg-player-badge,
.sg-player-shell .sg-player-timeline,
.sg-player-shell .sg-player-timeline span {
    text-shadow: none !important;
    filter: none !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}
.sg-player-shell .sg-player-icon svg,
.sg-player-shell .sg-player-source-trigger-server,
.sg-player-shell .sg-player-mobile-server-badge-r15 svg {
    shape-rendering: geometricPrecision;
    vector-effect: non-scaling-stroke;
}

/* Crisp seek: larger hit area, thin high-DPI track, no fuzzy halo. */
.sg-player-shell #sgSeek {
    --sg-range-height: 4px !important;
    --sg-range-thumb: 14px !important;
    min-height: 28px !important;
    filter: none !important;
    box-shadow: none !important;
}
.sg-player-shell #sgSeek::-webkit-slider-runnable-track {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    filter: none !important;
}
.sg-player-shell #sgSeek::-moz-range-track {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}
.sg-player-shell #sgSeek::-webkit-slider-thumb {
    width: 14px !important;
    height: 14px !important;
    margin-top: -5px !important;
    border: 2px solid rgba(255,255,255,.90) !important;
    box-shadow: none !important;
    filter: none !important;
}
.sg-player-shell #sgSeek::-moz-range-thumb {
    width: 14px !important;
    height: 14px !important;
    border: 2px solid rgba(255,255,255,.90) !important;
    box-shadow: none !important;
    filter: none !important;
}

/* --- Current quality pill: compact gradient like the requested 1080p reference --- */
.sg-player-shell.has-native-touch-gestures .sg-player-badge,
.sg-player-shell .sg-player-badge.is-quality-trigger,
.sg-player-shell .sg-player-quality-current-trigger {
    min-width: 64px !important;
    width: auto !important;
    height: 29px !important;
    min-height: 29px !important;
    padding: 0 11px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(90deg, #ff4edb 0%, #a553ff 50%, #25d7ff 100%) !important;
    color: #fff !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    font-size: .72rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}
.sg-player-shell .sg-player-badge::before,
.sg-player-shell .sg-player-badge::after { content: none !important; display: none !important; }

/* --- R8-inspired quality cards --- */
.sg-player-shell .sg-player-mobile-quality-option {
    grid-template-columns: 24px minmax(0,1fr) auto !important;
    border: 1px solid rgba(255,255,255,.075) !important;
    background: rgba(14,18,28,.82) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(8px) saturate(115%) !important;
    backdrop-filter: blur(8px) saturate(115%) !important;
}
.sg-player-shell .sg-player-mobile-quality-option.selected {
    border-color: rgba(37,200,255,.50) !important;
    background: linear-gradient(135deg, rgba(37,200,255,.12), rgba(103,92,255,.10)) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 5px 16px rgba(0,0,0,.12) !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge {
    min-width: 74px !important;
    min-height: 30px !important;
    padding: 4px 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    border: 1px solid rgba(255,255,255,.09) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.055) !important;
    color: rgba(255,255,255,.82) !important;
    box-shadow: none !important;
    direction: ltr;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.is-auto-only { min-width: 48px !important; }
.sg-player-shell .sg-player-mobile-quality-badge-resolution {
    color: rgba(255,255,255,.82) !important;
    font-size: .64rem !important;
    font-weight: 900 !important;
}
.sg-player-shell .sg-player-mobile-quality-badge-text {
    min-width: 29px !important;
    height: 20px !important;
    padding: 0 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    font-style: normal !important;
    font-size: .58rem !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    color: #fff !important;
    background: rgba(103,92,255,.78) !important;
    box-shadow: none !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-4k .sg-player-mobile-quality-badge-text {
    background: linear-gradient(135deg,#ffb14d,#f7d66a) !important; color:#271600 !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-fhd .sg-player-mobile-quality-badge-text {
    background: linear-gradient(135deg,#25c8ff,#2b7bff) !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-hd .sg-player-mobile-quality-badge-text {
    background: linear-gradient(135deg,#675cff,#7b5cff) !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-sd .sg-player-mobile-quality-badge-text {
    background: linear-gradient(135deg,#687487,#4d5665) !important;
}
.sg-player-shell .sg-player-mobile-quality-option-badge.badge-auto .sg-player-mobile-quality-badge-text {
    background: linear-gradient(135deg,#ff4edb,#7b5cff) !important;
}
.sg-player-shell .sg-player-mobile-quality-badge-icon { display: none !important; }

/* --- R8-inspired server cards: clean row + compact server badge --- */
.sg-player-shell .sg-player-mobile-source-option {
    grid-template-columns: 26px minmax(0,1fr) 56px !important;
    min-height: 48px !important;
    border: 1px solid rgba(255,255,255,.075) !important;
    background: rgba(14,18,28,.82) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(8px) saturate(115%) !important;
    backdrop-filter: blur(8px) saturate(115%) !important;
}
.sg-player-shell .sg-player-mobile-source-option.selected {
    border-color: rgba(37,200,255,.50) !important;
    background: linear-gradient(135deg, rgba(37,200,255,.12), rgba(103,92,255,.10)) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 5px 16px rgba(0,0,0,.12) !important;
}
.sg-player-shell .sg-player-mobile-server-glyph { display: none !important; }
.sg-player-shell .sg-player-mobile-server-badge-r15 {
    min-width: 50px !important;
    min-height: 30px !important;
    padding: 4px 7px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    border: 1px solid rgba(255,255,255,.09) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.055) !important;
    color: rgba(255,255,255,.82) !important;
    box-shadow: none !important;
}
.sg-player-shell .sg-player-mobile-server-badge-r15 svg {
    width: 14px !important;
    height: 14px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.5 !important;
}
.sg-player-shell .sg-player-mobile-server-badge-r15 span {
    font-size: .59rem !important;
    font-weight: 900 !important;
    direction: ltr;
}
.sg-player-shell .sg-player-mobile-source-option.selected .sg-player-mobile-server-badge-r15 {
    border-color: rgba(37,200,255,.38) !important;
    background: rgba(37,200,255,.12) !important;
    color: #e9fbff !important;
}

@media (prefers-reduced-motion: reduce) {
    .sg-player-shell .sg-player-loader-r15.show,
    .sg-player-shell.is-buffering .sg-player-loader-r15 {
        animation-duration: 1.8s !important;
    }
}

/* R15 loader geometry refinement: while buffering the animated ring replaces the coloured button rim,
   so the viewer never sees two competing circular effects. */
.sg-player-shell.is-buffering .sg-player-main-play,
.sg-player-shell.ui-hidden.is-buffering .sg-player-main-play {
    border: 2px solid rgba(255,255,255,.07) !important;
    background: linear-gradient(155deg, rgba(34,38,46,.94), rgba(16,19,25,.93) 56%, rgba(8,10,14,.92)) padding-box !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -8px 18px rgba(0,0,0,.22), 0 10px 24px rgba(0,0,0,.24) !important;
}
.sg-player-shell .sg-player-loader-r15 {
    inset: -4px !important;
    width: calc(100% + 8px) !important;
    height: calc(100% + 8px) !important;
}
.sg-player-shell .sg-player-loader-r15-track { stroke: rgba(255,255,255,.055) !important; }

/* SPACEGATE_VOD_PRESENTATION_SERVERS_R2_COMPACT
   Presentation only. Intentionally does not change panel/card dimensions,
   padding, typography, positioning or playback behaviour. */
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge {
    direction: ltr;
}
.sg-player-shell.sg-player-presentation-servers .sg-player-country-badge-flag {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #111;
    box-shadow: 0 0 0 1px rgba(255,255,255,.10);
}
.sg-player-shell.sg-player-presentation-servers .sg-player-country-badge-flag .sg-player-server-flag-svg,
.sg-player-shell.sg-player-presentation-servers .sg-player-country-trigger-flag .sg-player-server-flag-svg {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    stroke: none !important;
}
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge .sg-player-server-signal {
    height: 14px;
    display: inline-flex;
    align-items: flex-end;
    gap: 1.5px;
}
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge .sg-player-server-signal i {
    display: block;
    width: 2px;
    border-radius: 99px;
    background: rgba(128,140,158,.28);
}
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge .sg-player-server-signal i:nth-child(1) { height: 4px; }
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge .sg-player-server-signal i:nth-child(2) { height: 7px; }
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge .sg-player-server-signal i:nth-child(3) { height: 10px; }
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge .sg-player-server-signal i:nth-child(4) { height: 13px; }
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-badge .sg-player-server-signal i.is-on {
    background: #25d98b;
}
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-option[data-server-code="DE"] .sg-player-server-signal i.is-on,
.sg-player-shell.sg-player-presentation-servers .sg-player-country-server-option[data-server-code="SG"] .sg-player-server-signal i.is-on {
    background: #f5b323;
}
.sg-player-shell.sg-player-presentation-servers .sg-player-country-code {
    direction: ltr;
    letter-spacing: .04em;
}
.sg-player-shell.sg-player-presentation-servers #sgSourceMobileTrigger.sg-player-country-trigger > svg {
    display: none !important;
}
.sg-player-shell.sg-player-presentation-servers #sgSourceMobileTrigger .sg-player-country-trigger-flag {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #111;
    box-shadow: 0 0 0 1px rgba(255,255,255,.10);
}
/* Use the player\'s pre-existing 30px quality icon slot while keeping the
   original panel width, row height, fonts and badges exactly unchanged. */
.sg-player-shell.sg-player-presentation-servers .sg-player-mobile-quality-option {
    grid-template-columns: 22px 30px minmax(0,1fr) auto !important;
}


/* SPACEGATE_VOD_PRESENTATION_SERVERS_R3_PHONE_FIX
   Presentation only: show quality in the existing secondary server line without
   changing panel/card geometry. On touch/mobile, suppress the decorative brand
   watermark so a delayed/missing cached SVG can never overlap the title bar. */
.sg-player-shell.sg-player-presentation-servers .sg-player-country-code {
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}
@media (pointer: coarse) {
    .sg-player-shell .sg-player-brand-watermark {
        display: none !important;
    }
}
.sg-player-shell.has-native-touch-gestures .sg-player-brand-watermark {
    display: none !important;
}

/* SPACEGATE_VOD_PRESENTATION_R4_MOBILE_LANDSCAPE_FIX
   Player surface only. Keep the player above every fixed application header/
   bottom-nav layer in landscape WebView/TWA, and never let the underlying app
   chrome overlap the player's own title bar. No playback/source logic here. */
.sg-player-layer {
    z-index: 2147483647 !important;
    isolation: isolate;
}
@media (orientation: landscape) {
    body.sg-player-open #nova-global-header,
    body.sg-player-open #nova-bottom-nav-host,
    body.sg-player-open > .sg-layout-bottom-nav,
    body.sg-player-open nav.oscar-bottom-nav.original-bottom-nav {
        display: none !important;
        pointer-events: none !important;
    }
}
@media (orientation: landscape) and (max-height: 760px) {
    .sg-player-shell .sg-player-brand-watermark {
        display: none !important;
    }
}

/* SPACEGATE_PREMIUM_DARK_CINEMA_V61 */
.sg-player-layer,
.sg-player-shell,
.sg-player-shell:fullscreen,
.sg-player-shell:-webkit-full-screen { background: #03050a !important; }
.sg-player-cinema-backdrop {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 1;
    transform: scale(1.012);
    transition: opacity .65s ease, transform 1.1s ease;
}
.sg-player-shell.has-media .sg-player-cinema-backdrop { opacity: .14; transform: scale(1); }
.sg-player-video { z-index: 1; background: transparent !important; }
.sg-player-vignette {
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(2,4,9,.88), rgba(2,4,9,.11) 26%, transparent 50%, rgba(2,4,9,.96) 100%),
        radial-gradient(circle at 50% 52%, transparent 34%, rgba(0,0,0,.34) 100%) !important;
}
.sg-player-topbar {
    z-index: 7;
    padding: calc(12px + env(safe-area-inset-top, 0px)) clamp(14px,2.1vw,30px) 18px;
    background: linear-gradient(180deg, rgba(3,5,10,.94), rgba(3,5,10,.42) 72%, transparent) !important;
}
.sg-player-topbar .sg-player-icon,
.sg-player-topbar .sg-player-select-wrap,
.sg-player-icon,
.sg-player-skip,
.sg-player-quality-wrap {
    border: 1px solid rgba(255,255,255,.11) !important;
    background: linear-gradient(145deg, rgba(24,29,43,.88), rgba(8,11,19,.78)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.055), 0 10px 28px rgba(0,0,0,.24) !important;
    backdrop-filter: blur(18px) saturate(125%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(125%) !important;
}
.sg-player-icon:hover,.sg-player-skip:hover { border-color: rgba(226,195,117,.44) !important; }
.sg-player-back { border-color: transparent !important; background: rgba(4,7,12,.42) !important; }
.sg-player-main-play {
    border: 1px solid rgba(255,255,255,.28) !important;
    background: linear-gradient(138deg,#6676ff,#9664f5 46%,#d2af62) !important;
    box-shadow: 0 0 0 9px rgba(255,255,255,.045),0 18px 54px rgba(83,68,180,.42),inset 0 1px rgba(255,255,255,.34) !important;
}
.sg-player-loader-r15-arc { stroke: #dfc477 !important; }
.sg-player-controls {
    z-index: 7;
    padding-bottom: calc(18px + env(safe-area-inset-bottom,0px));
    background: linear-gradient(0deg,rgba(2,4,8,.96),rgba(2,4,8,.68) 58%,transparent);
}
#sgSeek { box-shadow: 0 1px 8px rgba(0,0,0,.5); }
.sg-player-badge { background: linear-gradient(135deg,#6d7cff,#8064dc 52%,#c9a95e) !important; }
.sg-player-failure {
    position: absolute;
    z-index: 12;
    top: 50%;
    left: 50%;
    width: min(390px,calc(100vw - 36px));
    padding: 24px 24px 22px;
    display: grid;
    justify-items: center;
    gap: 9px;
    direction: rtl;
    text-align: center;
    border: 1px solid rgba(226,195,117,.2);
    border-radius: 24px;
    background: linear-gradient(155deg,rgba(20,25,39,.96),rgba(5,8,14,.97));
    box-shadow: 0 32px 90px rgba(0,0,0,.66),inset 0 1px rgba(255,255,255,.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%,-46%) scale(.96);
    transition: opacity .22s ease,transform .22s ease,visibility .22s;
}
.sg-player-shell.has-failure .sg-player-failure { opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,-50%) scale(1); }
.sg-player-shell.has-failure .sg-player-center { opacity:0;pointer-events:none; }
.sg-player-failure img { width:108px;height:108px;object-fit:contain;filter:drop-shadow(0 16px 28px rgba(0,0,0,.42)); }
.sg-player-failure strong { color:#fff;font-size:1.12rem; }
.sg-player-failure p { margin:0;color:rgba(221,227,241,.68);font-size:.82rem;line-height:1.65; }
.sg-player-failure button {
    min-width:170px;min-height:44px;margin-top:6px;padding:0 20px;border:1px solid rgba(255,255,255,.2);border-radius:999px;
    background:linear-gradient(135deg,#6d7cff,#8a61e6 56%,#c3a45c);color:#fff;font:800 .8rem Arial,"Segoe UI",sans-serif;cursor:pointer;
    box-shadow:0 14px 34px rgba(74,58,160,.34);
}
@media (max-width:600px),(max-height:540px){.sg-player-failure{width:min(340px,calc(100vw - 28px));padding:17px 18px 16px}.sg-player-failure img{width:78px;height:78px}}
@media (prefers-reduced-motion:reduce){.sg-player-cinema-backdrop,.sg-player-failure{transition:none}}
