/* Native Jellyfin pages in the Cinema presentation. GPL-2.0-or-later.
 * Original buttons, menus, navigation, permissions and player remain active.
 * ?cinema=off restores the unstyled original client on this browser.
 */
html:not(.native-cinema-disabled) {
    --cinema-pad: clamp(16px, 3.125vw, 60px);
    --jf-palette-background-default: #141414;
    --jf-palette-background-paper: #232323;
    --jf-palette-background-paperChannel: 35 35 35;
    --jf-palette-primary-main: #e50914;
    --jf-palette-primary-mainChannel: 229 9 20;
    --jf-palette-primary-dark: #b20710;
    --jf-palette-primary-contrastText: #ffffff;
    --jf-palette-secondary-main: #ffffff;
    --jf-palette-secondary-mainChannel: 255 255 255;
    --jf-palette-secondary-contrastText: #141414;
    --jf-palette-text-primary: #f5f5f1;
    --jf-palette-text-secondary: #cccccc;
    --jf-palette-AppBar-defaultBg: transparent;
    --jf-palette-AppBar-transparentBg: transparent;
    --jf-palette-AppBar-gradient: none;
    --jf-card-borderRadius: 12px;
    --jf-palette-background-defaultImage: radial-gradient(ellipse 90% 650px at 50% 0, #242424, transparent);
    color-scheme: dark;
    background: radial-gradient(ellipse 90% 650px at 50% 0, #242424, transparent), #141414;
}
html:not(.native-cinema-disabled) body { font-family: Arial, Helvetica, sans-serif; }
html.native-cinema-enabled,
html.native-cinema-enabled body,
html.native-cinema-enabled .mainAnimatedPage { overflow-anchor: none; }
html.native-cinema-enabled { scroll-behavior: auto; }
/* The actual entry document loads this before the original client scripts.
   A Cinema skeleton occupies the page until the prepared view is revealed. */
html.native-cinema-boot .mainAnimatedPage { visibility: hidden !important; }
.native-cinema-loading { position: fixed; inset: 80px 0 0; z-index: 1000; padding: 0 var(--cinema-pad,3.125vw); background: radial-gradient(ellipse 90% 650px at 50% -80px,#242424,transparent),#141414; color: #eee; }
.native-cinema-loading-hero { height: min(48vw,690px); min-height: 360px; border-radius: 24px; background: linear-gradient(110deg,#222 20%,#292929 45%,#222 65%); }
.native-cinema-loading-row { display: flex; gap: 8px; margin-top: 32px; }
.native-cinema-loading-row span { flex: 1; aspect-ratio: 16/9; border-radius: 12px; background: #242424; }
.native-cinema-loading button { background: white; color: #141414; padding: 12px 22px; border: 0; border-radius: 30px; cursor: pointer; }
html:not(.native-cinema-disabled) .pageTitleWithDefaultLogo { background-image: none; }
html:not(.native-cinema-disabled) .pageTitleWithDefaultLogo::before { content:'JELLYFIN'; color:#ff0011; font:24px/1 Impact,Haettenschweiler,'Arial Narrow Bold',sans-serif; }
html:not(.native-cinema-disabled) .backgroundContainer {
    background: radial-gradient(ellipse 90% 650px at 50% 0, #242424, transparent), #141414;
}
/* There is no separate black strip at the top of the page. */
html:not(.native-cinema-disabled) :is(header.MuiAppBar-root, .skinHeader) {
    background: transparent !important;
    background-image: none !important;
    color: #f5f5f1 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}
html.native-cinema-scrolled:not(.native-cinema-disabled) header.MuiAppBar-root { background: #141414 !important; }
html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:first-child {
    min-height: 64px;
    padding: 10px var(--cinema-pad);
    gap: 20px;
    box-sizing: border-box;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButton-root {
    color: #cccccc !important;
    border-radius: 30px !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    padding: 11px 15px;
    white-space: nowrap;
}
/* The native home link remains the home link, including its accessible name. */
html:not(.native-cinema-disabled) header.MuiAppBar-root a.MuiButton-sizeLarge[href="#/"] {
    min-width: 76px;
    padding: 0;
    margin-right: 12px;
    font-size: 0;
    background: none !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root a.MuiButton-sizeLarge[href="#/"] .MuiButton-startIcon { display: none; }
html:not(.native-cinema-disabled) header.MuiAppBar-root a.MuiButton-sizeLarge[href="#/"]::before {
    content: 'JELLYFIN';
    display: block;
    color: #ff0011;
    font: 24px/1 Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    letter-spacing: -0.6px;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButton-root:not(.MuiButton-sizeLarge):hover { background: #ffffff25 !important; color: white !important; }
html:not(.native-cinema-disabled) header.MuiAppBar-root :is(.MuiButton-root.MuiButton-colorPrimary, .MuiButton-root.MuiButton-colorPrimary:hover, .MuiButton-root[aria-current="page"]) {
    color: white !important; background: #303030 !important; font-weight: 700;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiIconButton-root { color: white !important; }
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiIconButton-root:hover { background: #ffffff18 !important; }
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiAvatar-colorDefault { background: #e50914; color: white; }
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiAvatar-root { border-radius: 5px; }
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiBadge-colorPrimary { background: #e50914 !important; }
html:not(.native-cinema-disabled) :is(a,button,input,select,textarea):focus-visible { outline-color: #fff; outline-offset: 3px; }

/* Library tools keep their original buttons and handlers. Play and shuffle
   form one white split button; other actions have their own round targets. */
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiStack-root:has(> .MuiButtonGroup-root.MuiButtonGroup-text) {
    column-gap: 12px; row-gap: 8px; align-items: center;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-horizontal {
    display: inline-flex; align-items: center; flex-shrink: 0;
    gap: 8px; padding: 0; margin: 0; border: 0; box-shadow: none;
    background: none;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-horizontal > button.MuiButton-root {
    box-sizing: border-box; height: 44px; min-width: 44px;
    margin: 0 !important; padding: 0;
    border: 1px solid #ffffff1a !important; border-radius: 50% !important;
    background: #ffffff06 !important; background-image: none !important;
    color: #eeeeec !important; box-shadow: none !important;
    font: 600 14px/1 Arial,Helvetica,sans-serif; letter-spacing: 0;
    text-transform: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-horizontal > button.MuiButton-root svg { width: 20px; height: 20px; }
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-horizontal > button.MuiButton-root:hover {
    background: #ffffff18 !important; border-color: #ffffff40 !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-text > button.MuiButton-root:is([aria-expanded="true"],[aria-pressed="true"],.Mui-selected) {
    background: #ffffff20 !important; border-color: #ffffff66 !important; color: white !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-horizontal > button.MuiButton-root.Mui-disabled {
    color: #686868 !important; background: transparent !important; border-color: #ffffff0a !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-horizontal > button.MuiButton-root:focus-visible {
    outline: 2px solid white; outline-offset: 3px; z-index: 1;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained {
    gap: 0; border-radius: 24px; background: #f5f5f1;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root {
    background: #f5f5f1 !important; color: #141414 !important;
    border: 0 !important; border-radius: 0 !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root:first-child {
    padding: 0 18px; border-radius: 24px 0 0 24px !important; font-weight: 700;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root:last-child {
    min-width: 48px; border-left: 1px solid #14141426 !important;
    border-radius: 0 24px 24px 0 !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root:only-child {
    border: 0 !important; border-radius: 24px !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root .MuiButton-startIcon {
    margin-left: 0; margin-right: 9px;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root:hover {
    background: #dededb !important; color: #141414 !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root.Mui-disabled {
    background: #ccccca !important; color: #777 !important;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root:has(svg[data-testid="NavigateNextIcon"]) {
    padding-left: 12px; margin-left: 4px; border-left: 1px solid #ffffff1f;
}
@media (max-width: 600px) {
    html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiStack-root:has(> .MuiButtonGroup-root.MuiButtonGroup-text) {
        flex-wrap: wrap; justify-content: flex-end; column-gap: 8px;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-text { gap: 4px; }
    html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root:first-child { padding: 0 12px; }
    html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-contained > button.MuiButton-root:last-child { min-width: 44px; }
    html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root:has(svg[data-testid="NavigateNextIcon"]) { padding-left: 8px; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButtonGroup-root.MuiButtonGroup-horizontal > button.MuiButton-root { transition: none; }
}

/* Cinema notification bell: same icon, red unread count and recent-film list. */
html:not(.native-cinema-disabled) .native-cinema-news { display: inline-flex; position: relative; flex: none; align-items: center; }
html:not(.native-cinema-disabled) .native-cinema-news-button {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%;
    background: transparent; color: white; cursor: pointer;
}
html:not(.native-cinema-disabled) .native-cinema-news-button:is(:hover,[aria-expanded="true"]) { background: #ffffff18; }
html:not(.native-cinema-disabled) .native-cinema-news-button svg { width: 24px; height: 24px; }
html:not(.native-cinema-disabled) .native-cinema-news-badge {
    position: absolute; right: -1px; top: 2px; min-width: 16px; height: 16px;
    box-sizing: border-box; padding: 0 4px; border-radius: 9px;
    background: #e50914; color: white; font: 700 10px/16px Arial,Helvetica,sans-serif; text-align: center;
}
html:not(.native-cinema-disabled) .native-cinema-news-panel {
    position: fixed; z-index: 1200; box-sizing: border-box; width: 360px;
    max-width: calc(100vw - 32px); overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: #777 transparent;
    border: 1px solid #ffffff24; border-radius: 10px; background: #232323; color: white;
    box-shadow: 0 18px 55px #0009; font: 13px/1.4 Arial,Helvetica,sans-serif;
}
html:not(.native-cinema-disabled) :is(.native-cinema-news-panel,.native-cinema-news-badge,.native-cinema-news-image)[hidden] { display: none !important; }
html:not(.native-cinema-disabled) .native-cinema-news-item {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px;
    border: 0; border-bottom: 1px solid #ffffff08; border-radius: 0;
    background: transparent; color: white; text-align: left; font: inherit; cursor: pointer;
}
html:not(.native-cinema-disabled) .native-cinema-news-item:last-child { border-bottom: 0; }
html:not(.native-cinema-disabled) .native-cinema-news-item:hover { background: #ffffff0c; }
html:not(.native-cinema-disabled) :is(.native-cinema-news-button,.native-cinema-news-item):focus-visible { outline: 2px solid white; outline-offset: -3px; }
html:not(.native-cinema-disabled) .native-cinema-news-picture { display: block; flex: 0 0 112px; width: 112px; height: 64px; overflow: hidden; border-radius: 4px; background: #151515; }
html:not(.native-cinema-disabled) .native-cinema-news-image { width: 100%; height: 100%; object-fit: cover; }
html:not(.native-cinema-disabled) .native-cinema-news-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
html:not(.native-cinema-disabled) .native-cinema-news-copy strong { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
html:not(.native-cinema-disabled) .native-cinema-news-copy small { font-size: 11px; color: #aaa; }
html:not(.native-cinema-disabled) .native-cinema-news-empty { margin: 0; padding: 18px; color: #bbb; }

/* Big still-image preview; no preview player, sound toggle or autoplay. */
html:not(.native-cinema-disabled) .native-cinema-featured-placeholder {
    position: relative; overflow: hidden; margin: 10px var(--cinema-pad) 10px;
    height: calc(var(--native-cinema-viewport-height,100svh) - var(--native-cinema-header-height,70px) - 20px);
    border-radius: 24px; background: linear-gradient(115deg,#252525,#1d1d1d);
}
html:not(.native-cinema-disabled) .native-cinema-featured-placeholder-copy { position: absolute; left: clamp(24px,3vw,50px); bottom: 45px; width: min(58%,500px); display: grid; gap: 16px; }
html:not(.native-cinema-disabled) .native-cinema-featured-placeholder-copy span { display: block; height: 20px; width: 95%; border-radius: 8px; background: #ffffff10; }
html:not(.native-cinema-disabled) .native-cinema-featured-placeholder-copy span:first-child { width: 70%; height: 55px; }
html:not(.native-cinema-disabled) .native-cinema-featured-placeholder-copy span:last-child { width: 145px; height: 43px; border-radius: 24px; }
html:not(.native-cinema-disabled) .native-cinema-hero {
    position: relative; isolation: isolate; overflow: hidden;
    margin: 10px var(--cinema-pad) 34px;
    height: min(48vw, 690px); min-height: 360px;
    border-radius: 24px; background: #292929; box-shadow: 0 15px 45px #0005;
}
html:not(.native-cinema-disabled) :is(.native-cinema-hero-image,.native-cinema-hero-shade) { position: absolute; inset: 0; width: 100%; height: 100%; }
html:not(.native-cinema-disabled) .native-cinema-hero-image { object-fit: cover; object-position: center 30%; }
html:not(.native-cinema-disabled) .native-cinema-hero-shade { background: linear-gradient(0deg,#000e,transparent 85%),linear-gradient(90deg,#0008,transparent 78%); pointer-events: none; }
html:not(.native-cinema-disabled) .native-cinema-hero-copy { position: absolute; left: clamp(24px,3vw,50px); bottom: clamp(25px,3vw,45px); width: 58%; max-width: 680px; z-index: 1; }
html:not(.native-cinema-disabled) .native-cinema-hero-title { margin: 0 0 18px; font-size: clamp(30px,4vw,64px); line-height: 1.05; color: white; text-shadow: 0 3px 18px #0009; }
html:not(.native-cinema-disabled) .native-cinema-hero-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html:not(.native-cinema-disabled) .native-cinema-hero-logo { width: min(90%,480px); height: clamp(70px,12vw,180px); object-fit: contain; object-position: left bottom; margin-bottom: 22px; }
html:not(.native-cinema-disabled) .native-cinema-hero [hidden] { display: none !important; }
html:not(.native-cinema-disabled) .native-cinema-hero-meta { color: #f4f4f4; font-size: clamp(13px,1.25vw,18px); font-weight: 600; margin-bottom: 16px; }
html:not(.native-cinema-disabled) .native-cinema-hero-overview { color: white; font-size: clamp(14px,1.5vw,22px); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 25px; text-shadow: 0 2px 5px #0008; }
html:not(.native-cinema-disabled) .native-cinema-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Cinema uses the actual viewport minus the measured native header. */
html:not(.native-cinema-disabled) .native-cinema-hero-page .native-cinema-hero {
    height: calc(var(--native-cinema-viewport-height,100svh) - var(--native-cinema-header-height,70px) - 20px);
    min-height: 0; max-height: none; margin-top: 10px; margin-bottom: 10px;
}
html:not(.native-cinema-disabled) [data-native-cinema-catalog] {
    min-height: calc(var(--native-cinema-viewport-height,100svh) - var(--native-cinema-header-height,70px)); overflow-anchor: none;
}
html:not(.native-cinema-disabled) :is(.native-cinema-primary,.native-cinema-secondary) { padding: 12px 22px; border: 0; border-radius: 30px; font: 700 15px Arial,Helvetica,sans-serif; text-decoration: none; min-height: 43px; box-sizing: border-box; cursor: pointer; }
html:not(.native-cinema-disabled) .native-cinema-primary { background: white; color: #151515; }
html:not(.native-cinema-disabled) .native-cinema-secondary { background: #ffffff30; color: white; }
html:not(.native-cinema-disabled) :is(.native-cinema-primary,.native-cinema-secondary):hover { filter: brightness(.85); }

/* Native media cards and their original play/favourite/context controls. */
html:not(.native-cinema-disabled) .cardScalable { border-radius: 12px; }
html:not(.native-cinema-disabled) :is(.cardImageContainer,.cardContent,.cardOverlayContainer,.blurhash-canvas) { border-radius: 12px; }
html:not(.native-cinema-disabled) .cardScalable { background: #262626; }
html:not(.native-cinema-disabled) .card[data-native-cinema-wide] .cardPadder { padding-bottom: 56.25% !important; }
/* Latest-series rows can mix series, episodes and seasons. Reserve the same
   landscape box before metadata arrives; keep music and other card types native. */
html.native-cinema-enabled #homeTab .card:is([data-type="Movie"],[data-type="Series"],[data-type="Episode"],[data-type="Season"]) .cardPadder { padding-bottom: 56.25% !important; }
html:not(.native-cinema-disabled) .native-cinema-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; opacity: 0; pointer-events: none; }
html:not(.native-cinema-disabled) [data-native-cinema-ready] .native-cinema-art { opacity: 1; }
html:not(.native-cinema-disabled) .cardText { color: #eee; line-height: 1.4; }
html:not(.native-cinema-disabled) .cardText-secondary { color: #aaa; }
html:not(.native-cinema-disabled) .cardOverlayContainer { background: linear-gradient(transparent,#000b); }
html:not(.native-cinema-disabled) .cardOverlayFab-primary { background: white !important; color: #141414 !important; }
html:not(.native-cinema-disabled) :is(.itemProgressBarForeground,.sliderBubble,.mdl-slider-background-lower) { background: #e50914 !important; }
html:not(.native-cinema-disabled) :is(.countIndicator,.playedIndicator,.fullSyncIndicator) { background: #e50914 !important; color: white !important; }
html:not(.native-cinema-disabled) .sectionTitle { color: #f5f5f1; font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
html:not(.native-cinema-disabled) .verticalSection { margin-bottom: 30px; }
/* Library shortcuts already live in the header; omit My Media on Home. */
html:not(.native-cinema-disabled) #homeTab .homeSectionsContainer > .verticalSection:has(.card[data-type="CollectionFolder"]) { display: none !important; }
html:not(.native-cinema-disabled) .cardText bdi { display: block; overflow: hidden; text-overflow: ellipsis; }
html:not(.native-cinema-disabled):not(.native-cinema-catalog-visible) .mainAnimatedPage:has(> :is(.native-cinema-hero,.native-cinema-featured-placeholder)) .alphaPicker-fixed-right { visibility: hidden; }
html:not(.native-cinema-disabled) .alphaPicker-fixed-right :is(.MuiToggleButton-root.Mui-selected,.alphaPickerButton-selected) { background-color: #e50914 !important; color: #fff !important; font-weight: 700; }
html:not(.native-cinema-disabled) .alphaPicker-fixed-right :is(.MuiToggleButton-root.Mui-selected,.alphaPickerButton-selected):hover { background-color: #b20710 !important; }

/* Native detail pages retain all selectors and action buttons. */
html:not(.native-cinema-disabled) .detailPageWrapperContainer { background: #181818 !important; }
html:not(.native-cinema-disabled) .detailRibbon { background: #181818d9; }
html:not(.native-cinema-disabled) .detailPagePrimaryContent { color: #eee; }
html:not(.native-cinema-disabled) .detailPagePrimaryContent .nameContainer { color: white; }
html:not(.native-cinema-disabled) .itemDetailPage .detailImageContainer .cardScalable { box-shadow: 0 15px 45px #0005; }

/* Compact Cinema surfaces for original menus, forms, drawers and dialogs. */
html:not(.native-cinema-disabled) :is(.MuiMenu-paper,.MuiPopover-paper,.dialog,.mainDrawer,.MuiDrawer-paper) { background-color: #232323 !important; color: #f5f5f1; background-image: none; }
html:not(.native-cinema-disabled) :is(.MuiMenu-paper,.MuiPopover-paper,.dialog) { border: 1px solid #ffffff24; border-radius: 12px; box-shadow: 0 18px 55px #0009; }
html:not(.native-cinema-disabled) :is(.MuiListItemIcon-root,.fieldDescription,.inputLabel,.textareaLabel,.selectLabel) { color: #ccc; }
html:not(.native-cinema-disabled) :is(.MuiMenuItem-root,.listItem):hover { background-color: #ffffff10; }
html:not(.native-cinema-disabled) :is(.MuiDivider-root,.listItem-border) { border-color: #ffffff18; }
html:not(.native-cinema-disabled) :is(.emby-input,.emby-textarea,.emby-select-withcolor) { background: #2b2b2b; color: white; border: 1px solid #666; border-radius: 5px; }
html:not(.native-cinema-disabled) :is(.emby-input,.emby-textarea,.emby-select-withcolor):focus { border-color: white !important; }
html:not(.native-cinema-disabled) :is(.button-submit,.MuiButton-containedPrimary) { background: #f5f5f1 !important; color: #141414 !important; border-radius: 30px; }
html:not(.native-cinema-disabled) :is(.raised,.MuiButton-containedInherit) { background: #ffffff20; color: white; border-radius: 30px; }
html:not(.native-cinema-disabled) .userPreferencesPage .readOnlyContent { background: #181818; padding: 24px; border-radius: 20px; box-sizing: border-box; }

/* Floating expansion lives outside native rails/grids, so it is never clipped. */
html:not(.native-cinema-disabled) .native-cinema-hover { position: fixed; z-index: 1090; margin: 0; padding: 0; border-radius: 9px; overflow: hidden; background: #181818; color: #eee; box-shadow: 0 18px 55px #000b,0 2px 12px #0008; font: 15px Arial,Helvetica,sans-serif; }
html:not(.native-cinema-disabled) .native-cinema-hover.is-closing { pointer-events: none; }
html:not(.native-cinema-disabled) .native-cinema-hover-art { position: relative; display: block; aspect-ratio: 16/9; width: 100%; padding: 0; border: 0; background: #262626; cursor: pointer; }
html:not(.native-cinema-disabled) .native-cinema-hover-image { display: block; width: 100%; height: 100%; object-fit: cover; }
html:not(.native-cinema-disabled) .native-cinema-hover-body { padding: 20px 16px 24px; }
html:not(.native-cinema-disabled) .native-cinema-hover-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
html:not(.native-cinema-disabled) .native-cinema-action { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; padding: 5px; border: 2px solid #888; border-radius: 50%; background: #242424; color: #f4f4f4; cursor: pointer; }
html:not(.native-cinema-disabled) .native-cinema-action svg { display: block; width: 24px; height: 24px; pointer-events: none; }
html:not(.native-cinema-disabled) .native-cinema-action:hover { border-color: white; background: #333; }
html:not(.native-cinema-disabled) .native-cinema-action.is-primary { background: white; color: #141414; border-color: white; }
html:not(.native-cinema-disabled) .native-cinema-action.is-more { margin-left: auto; }
html:not(.native-cinema-disabled) .native-cinema-hover-name { display: block; font-size: 15px; line-height: 1.4; margin-bottom: 8px; }
html:not(.native-cinema-disabled) .native-cinema-hover-meta { color: #bcbcbc; font-size: 14px; line-height: 22px; }
html:not(.native-cinema-disabled) .native-cinema-hover-genres { font-size: 15px; line-height: 24px; margin-top: 12px; }

/* Cinema information sheet; original advanced details remain one link away. */
html:not(.native-cinema-disabled) .native-cinema-info { box-sizing: border-box; position: fixed; inset: 32px 0 auto; width: min(900px,calc(100vw - 48px)); max-width: none; max-height: calc(100svh - 64px); margin: 0 auto; padding: 0; border: 0; border-radius: 12px; overflow-y: auto; overscroll-behavior: contain; background: #181818; color: #eee; box-shadow: 0 30px 100px #000c; font: 15px Arial,Helvetica,sans-serif; }
.native-cinema-info::backdrop { background: #000b; backdrop-filter: blur(5px); animation: native-cinema-backdrop-in 360ms ease-out both; }
@keyframes native-cinema-backdrop-in { from { opacity: 0; backdrop-filter: blur(0); } to { opacity: 1; backdrop-filter: blur(5px); } }
.native-cinema-info.is-closing::backdrop { animation: native-cinema-backdrop-out 260ms ease-in both; }
@keyframes native-cinema-backdrop-out { from { background-color: #000b; backdrop-filter: blur(5px); } to { background-color: #0000; backdrop-filter: blur(0); } }
html:not(.native-cinema-disabled) .native-cinema-info.is-closing { pointer-events: none; }
html:not(.native-cinema-disabled) .native-cinema-info:has(.native-cinema-info-loading-art) { min-height: min(640px,calc(100svh - 64px)); }
html:not(.native-cinema-disabled) .native-cinema-info-close { position: absolute; right: 16px; top: 16px; z-index: 4; background: #181818cc; border: 0; }
html:not(.native-cinema-disabled) .native-cinema-info-art { position: relative; aspect-ratio: 16/9; background: #252525; }
html:not(.native-cinema-disabled) .native-cinema-info-image { display: block; width: 100%; height: 100%; object-fit: cover; }
html:not(.native-cinema-disabled) .native-cinema-info-shade { position: absolute; inset: 0; background: linear-gradient(0deg,#181818 0%,transparent 80%); pointer-events: none; }
html:not(.native-cinema-disabled) .native-cinema-info-copy { position: absolute; left: clamp(24px,4vw,48px); right: 48px; bottom: 32px; }
html:not(.native-cinema-disabled) .native-cinema-info-name { margin: 0 0 25px; color: white; font-size: clamp(26px,4vw,46px); line-height: 1.12; }
html:not(.native-cinema-disabled) .native-cinema-info-logo { width: min(60%,400px); height: 140px; object-fit: contain; object-position: left bottom; margin-bottom: 25px; }
html:not(.native-cinema-disabled) .native-cinema-info [hidden] { display: none !important; }
html:not(.native-cinema-disabled) .native-cinema-info .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html:not(.native-cinema-disabled) .native-cinema-info-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
html:not(.native-cinema-disabled) .native-cinema-info-body { padding: 0 clamp(24px,4vw,48px) 40px; }
html:not(.native-cinema-disabled) .native-cinema-info-overview { font-size: 16px; line-height: 1.55; }
html:not(.native-cinema-disabled) :is(.native-cinema-info-facts,.native-cinema-info-people,.native-cinema-info-genres) { color: #bcbcbc; line-height: 1.5; }
html:not(.native-cinema-disabled) .native-cinema-original-details { color: #ddd; text-underline-offset: 3px; display: inline-block; margin: 12px 0; }
html:not(.native-cinema-disabled) .native-cinema-info-status { padding: 32px; margin: 0; line-height: 1.5; }
html:not(.native-cinema-disabled) .native-cinema-episodes { margin-top: 30px; }
html:not(.native-cinema-disabled) .native-cinema-season { width: 100%; max-width: 330px; padding: 12px; border: 1px solid #555; border-radius: 4px; color: white; background: #242424; font: inherit; }
html:not(.native-cinema-disabled) .native-cinema-episode { display: flex; gap: 18px; width: 100%; padding: 22px 0; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #333; color: white; font: inherit; cursor: pointer; }
html:not(.native-cinema-disabled) .native-cinema-episode-image { width: 140px; aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; }
html:not(.native-cinema-disabled) .native-cinema-episode-copy { display: grid; gap: 8px; line-height: 1.5; min-width: 0; }
html:not(.native-cinema-disabled) .native-cinema-episode-copy span { color: #bbb; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html:not(.native-cinema-disabled) .native-cinema-load-more { width: 100%; padding: 14px; margin-top: 18px; border: 1px solid #555; border-radius: 4px; background: #242424; color: white; cursor: pointer; }

@media(min-width:1101px) {
    html:not(.native-cinema-disabled) :is(#tvshowsPage,#moviesPage) :is(.card[data-native-cinema-wide],.card.backdropCard[data-type="Movie"],.card.backdropCard[data-type="Series"]) { width: 14.285714%; }
}
@media(max-width:1100px) {
    html:not(.native-cinema-disabled) header.MuiAppBar-root .MuiButton-root { font-size: 14px; padding: 10px 12px; }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:first-child { gap: 10px; }
    html:not(.native-cinema-disabled) .native-cinema-hero-copy { width: 70%; }
    html:not(.native-cinema-disabled) :is(#tvshowsPage,#moviesPage) :is(.card[data-native-cinema-wide],.card.backdropCard[data-type="Movie"],.card.backdropCard[data-type="Series"]) { width: 25%; }
}
@media(max-width:650px) {
    /* The phone app adds Back beside Menu. Reserve one compact row for all
       seven actions, including the Cinema bell and the original user menu. */
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:first-child {
        flex-wrap: nowrap; gap: 4px; padding: 6px 8px; min-height: 56px;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:first-child .MuiIconButton-root,
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:first-child .native-cinema-news-button {
        flex: 0 0 40px; width: 40px; min-width: 40px; height: 40px;
        padding: 8px; margin: 0;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:first-child .MuiAvatar-root {
        width: 32px; height: 32px;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:first-child > .MuiBox-root {
        min-width: 0; flex-shrink: 0;
    }
    /* Keep the native title/count row followed by one complete controls row.
       Override Stack's child margins as well as the desktop-sized spacing. */
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root:has(> .MuiStack-root > .MuiButtonGroup-text) {
        --native-cinema-mobile-tool-size: clamp(36px,12vw,44px);
        padding: 4px 8px 8px; column-gap: 4px; row-gap: 4px;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root:has(> .MuiButtonGroup-text) {
        flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-end;
        min-width: 0; max-width: 100%; column-gap: 4px; row-gap: 0;
        margin-top: 4px; margin-bottom: 0;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root:has(> .MuiButtonGroup-text) > * {
        margin-inline: 0 !important;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root:has(> .MuiButtonGroup-text) > .MuiBox-root {
        min-width: 0;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root .MuiButtonGroup-horizontal {
        gap: 3px;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root .MuiButtonGroup-contained {
        gap: 0;
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root .MuiButtonGroup-horizontal > button.MuiButton-root {
        height: var(--native-cinema-mobile-tool-size); min-width: var(--native-cinema-mobile-tool-size);
    }
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root .MuiButtonGroup-root:has(svg[data-testid="NavigateNextIcon"]) {
        padding-left: 5px; margin-left: 0;
    }
    html:not(.native-cinema-disabled) .native-cinema-featured-placeholder { border-radius: 18px; }
    .native-cinema-loading { inset: 64px 0 0; padding: 0 16px; }
    .native-cinema-loading-hero { min-height: 380px; height: min(620px,calc(100svh - 140px)); border-radius: 18px; }
    html:not(.native-cinema-disabled) .native-cinema-info { inset: 12px 0 auto; width: calc(100vw - 16px); max-height: calc(100svh - 24px); }
    html:not(.native-cinema-disabled) .native-cinema-info-copy { left: 24px; right: 24px; bottom: 16px; }
    html:not(.native-cinema-disabled) .native-cinema-info-logo { height: 80px; margin-bottom: 15px; }
    html:not(.native-cinema-disabled) .native-cinema-episode-image { width: 90px; }
    html:not(.native-cinema-disabled) .native-cinema-hero { min-height: 380px; height: min(620px,calc(100svh - 140px)); border-radius: 18px; margin: 10px 16px 28px; }
    html:not(.native-cinema-disabled) .native-cinema-hero-copy { width: auto; left: 22px; right: 22px; bottom: 28px; }
    html:not(.native-cinema-disabled) .native-cinema-hero-logo { height: 105px; width: 85%; }
    html:not(.native-cinema-disabled) .native-cinema-hero-title { font-size: 32px; }
    html:not(.native-cinema-disabled) .native-cinema-hero-overview { font-size: 14px; }
    html:not(.native-cinema-disabled) :is(#tvshowsPage,#moviesPage) :is(.card[data-native-cinema-wide],.card.backdropCard[data-type="Movie"],.card.backdropCard[data-type="Series"]) { width: 50%; }
    /* Phone libraries wrap original media cards into two columns. Home keeps its rails;
       native list views and non-media tabs keep their original layout. */
    html:not(.native-cinema-disabled) :is(#tvshowsPage,#moviesPage) .itemsContainer:not(.vertical-list):has(> .card:is([data-type="Movie"],[data-type="Series"],[data-type="Episode"],[data-type="Season"])) {
        display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start;
        box-sizing: border-box; width: 100%; max-width: 100%;
        white-space: normal;
    }
    html:not(.native-cinema-disabled) :is(#tvshowsPage,#moviesPage) .itemsContainer:not(.vertical-list) > .card:is([data-type="Movie"],[data-type="Series"],[data-type="Episode"],[data-type="Season"]) {
        box-sizing: border-box; width: 100% !important;
        min-width: 0 !important; max-width: 100%; margin-inline: 0;
    }
    html:not(.native-cinema-disabled) .sectionTitle { font-size: 20px; }
}
@media(max-width:599px) {
    html:not(.native-cinema-disabled) header.MuiAppBar-root > .MuiToolbar-root > .MuiStack-root .MuiButtonGroup-contained > button.MuiButton-root:first-child {
        padding: 0;
    }
}
@media(max-height:500px) {
    html:not(.native-cinema-disabled) .native-cinema-hero-page .native-cinema-hero-overview { display: none; }
    html:not(.native-cinema-disabled) .native-cinema-hero-page .native-cinema-hero-logo { height: min(18svh,72px); margin-bottom: 8px; }
    html:not(.native-cinema-disabled) .native-cinema-hero-page .native-cinema-hero-title { font-size: clamp(22px,4.5vh,36px); margin-bottom: 8px; }
    html:not(.native-cinema-disabled) .native-cinema-hero-page .native-cinema-hero-meta { font-size: 12px; margin-bottom: 8px; }
    html:not(.native-cinema-disabled) .native-cinema-hero-page .native-cinema-hero-copy { bottom: 18px; }
}
@media(prefers-reduced-motion:reduce) {
    html:not(.native-cinema-disabled) .native-cinema-art { transition: none; }
    .native-cinema-info::backdrop,.native-cinema-info.is-closing::backdrop { animation: none; }
}

/* BEGIN NATIVE CINEMA ORIGINAL LOGO */
html:not(.native-cinema-disabled) { --native-cinema-brand-logo: url("cinema-logo.png?v=270d566d"); }
html:not(.native-cinema-disabled) .pageTitleWithDefaultLogo::before,
html:not(.native-cinema-disabled) header.MuiAppBar-root a.MuiButton-sizeLarge[href="#/"]::before {
    content: '' !important; display: block; width: 90px; height: 36px; flex: 0 0 90px;
    background-image: var(--native-cinema-brand-logo); background-size: 116% auto; background-position: center; background-repeat: no-repeat;
}
html:not(.native-cinema-disabled) header.MuiAppBar-root a.MuiButton-sizeLarge[href="#/"] { min-width: 90px; }
/* Preserve the native home link and the actual server version in the drawer. */
html:not(.native-cinema-disabled) .MuiDrawer-paper > .MuiList-root:first-child > .MuiListItem-root:has(> a[href="#/"] > .MuiListItemIcon-root > img) { padding: 0; }
html:not(.native-cinema-disabled) .MuiDrawer-paper > .MuiList-root:first-child a[href="#/"]:has(> .MuiListItemIcon-root > img) {
    min-height: 88px; box-sizing: border-box; padding: 24px 16px; display: flex; align-items: center; gap: 12px;
}
html:not(.native-cinema-disabled) .MuiDrawer-paper > .MuiList-root:first-child a[href="#/"]:has(> .MuiListItemIcon-root > img) > .MuiListItemIcon-root {
    width: 90px; min-width: 90px; height: 36px; flex: 0 0 90px; margin: 0;
    background-image: var(--native-cinema-brand-logo); background-size: 116% auto; background-position: center; background-repeat: no-repeat;
}
html:not(.native-cinema-disabled) .MuiDrawer-paper > .MuiList-root:first-child a[href="#/"] > .MuiListItemIcon-root > img { display: none; }
html:not(.native-cinema-disabled) .MuiDrawer-paper > .MuiList-root:first-child a[href="#/"]:has(> .MuiListItemIcon-root > img) > .MuiListItemText-root { margin: 0; flex: 0 0 auto; }
html:not(.native-cinema-disabled) .MuiDrawer-paper > .MuiList-root:first-child a[href="#/"]:has(> .MuiListItemIcon-root > img) .MuiListItemText-primary {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
html:not(.native-cinema-disabled) .MuiDrawer-paper > .MuiList-root:first-child a[href="#/"]:has(> .MuiListItemIcon-root > img) .MuiListItemText-secondary {
    font: 13px/1.4 Arial,Helvetica,sans-serif; color: #ccc; white-space: nowrap;
}
/* END NATIVE CINEMA ORIGINAL LOGO */
