/* PREME's web interpretation of Apple's control-layer material. */
:root {
  --bg: #222729;
  --panel: #242729;
  --raised: #303437;
  --sidebar-width: 230px;
  --gutter: 34px;
  --card-gap: 20px;
  --glass-fill: #25282ae8;
  --glass-edge: #ffffff20;
  --glass-shadow: inset 0 1px 0 #ffffff12, 0 8px 30px #0002;
  --glass-blur: blur(24px) saturate(135%);
}
body.tv-design { background: var(--bg); -webkit-font-smoothing: antialiased; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  :root { --glass-fill: #242729ba; }
}
#header.app-sidebar {
  inset: 8px auto 8px 8px;
  width: calc(var(--sidebar-width) - 16px);
  height: calc(100dvh - 16px);
  padding: 28px 10px 12px;
  border: 1px solid #ffffff29;
  border-radius: 27px;
  background: linear-gradient(155deg, #ffffff09, transparent 42%, #96d9c90a), #101214c7;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 1px #ffffff24, inset 0 -1px 1px #b5f0db0c, 0 12px 32px #0003;
}
#header.app-sidebar .wordmark { font-size: 24px; letter-spacing: -1.1px; margin: 0 11px 26px; }
#header.app-sidebar .sidebar-search { border: 0; background: transparent; margin: 0 0 3px; font-size: 13px; color: #e4e4e6; padding: 9px 10px; }
#header.app-sidebar .nav-label:first-child { display: none; }
#header.app-sidebar nav { gap: 2px; }
#header.app-sidebar nav button { min-height: 36px; padding: 8px 10px; font-size: 13px; font-weight: 500; gap: 10px; border-radius: 9px; }
#header.app-sidebar nav button.active { background: #ffffff0d; font-weight: 500; }
#header.app-sidebar nav button svg { color: #a3a8ab; stroke-width: 1.55; }
#header.app-sidebar nav button.active svg { color: #9bd7c6; }
#header.app-sidebar .nav-label { color: #92979a; font-weight: 400; font-size: 11px; margin: 27px 10px 8px; }
#header.app-sidebar .sidebar-bottom { padding: 24px 9px 0; gap: 8px; }
#header.app-sidebar .sidebar-bottom .studio-button { font-size: 11px; }
#header.app-sidebar .profile-button { width: 34px; height: 34px; border: 1px solid #ffffff24; }
#main { padding-top: 0; }
#main .hero.source-hero {
  margin: 0;
  height: min(78svh, 760px);
  min-height: 560px;
  border-radius: 0 0 12px 12px;
  background: #080a0b;
  box-shadow: none;
}
#main .source-hero .hero-source-window, #main .source-hero .hero-motion { inset: 0; height: 100%; object-position: 62% 38%; }
#main .source-hero:before { background: linear-gradient(0deg, #030506f2, #0305068a 27%, transparent 62%), linear-gradient(90deg, #0006, transparent 70%); }
#main .source-hero .hero-content { padding: 42px var(--gutter); max-width: 470px; }
#main .source-hero .hero-kicker { font-size: 12px; font-weight: 750; letter-spacing: 2.2px; margin-bottom: 12px; }
#main .source-hero #hero-title { font-size: clamp(30px, 2.7vw, 46px); line-height: 1.02; letter-spacing: -1.1px; font-weight: 740; margin: 0 0 13px; }
#main .source-hero #hero-title .hero-subtitle { font-size: .61em; letter-spacing: -.35px; font-weight: 600; margin-top: 7px; }
#main .source-hero .hero-description { font-size: 13px; line-height: 1.45; max-width: 340px; margin-bottom: 9px; }
#main .source-hero .meta { font-size: 11px; gap: 6px; margin-bottom: 17px; }
#main :is(.primary,.secondary), .title-dialog :is(.primary,.secondary) { border-radius: 999px; min-height: 38px; padding: 10px 23px; font-size: 13px; line-height: 1.3; }
#main .source-hero .primary { min-width: 178px; }
#main .source-hero .hero-bottom { inset: 18px 18px auto auto; }
#main .hero-volume, #main .hero-info, .glass-control, .cinema-toolbar .icon-button {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 38px; height: 38px; padding: 9px;
  border: 1px solid var(--glass-edge); border-radius: 50%;
  background: var(--glass-fill); color: #eeeef1;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition: background-color 180ms ease, transform 180ms ease;
}
#main .hero-volume:hover, #main .hero-info:hover, .glass-control:hover, .cinema-toolbar .icon-button:hover { background: #64686b99; transform: scale(1.04); }
.glass-control svg, #main .hero-info svg { width: 19px; height: 19px; }
#main .section { margin-top: 31px; }
#main .section-heading { margin-bottom: 14px; }
#main .section-heading h2 { font-size: 20px; font-weight: 650; letter-spacing: -.35px; }
#main .card { position: relative; border-radius: 13px; overflow: hidden; isolation: isolate; }
#main .card:after { content: ''; position: absolute; z-index: 4; inset: 0; pointer-events: none; border: 1px solid #ffffff29; border-radius: inherit; box-shadow: inset 0 1px 0 #ffffff0c; }
#main .card .card-art { border-radius: inherit; aspect-ratio: 1.52; box-shadow: inset 0 0 0 1px #ffffff0c; transition: filter 200ms ease; background: #171c1e; }
#main .card .card-art img { object-position: center 35%; }
#main .card .card-art:after { background: linear-gradient(0deg, #080a0b26, transparent 55%); }
#main .card:nth-child(n) .card-art .cover-title { display: none; }
#main .card .card-caption { pointer-events: none; position: absolute; z-index: 3; inset: auto 0 0; padding: 12px 14px 12px; gap: 4px; }
/* Keep the frost within the caption, leaving the image above it crisp. */
#main .card .card-caption:before {
  content: ''; position: absolute; z-index: -1; inset: 0 0 -1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, #151719a8 20px, #151719ed);
}
#main .card-caption > strong { font-weight: 500; font-size: 13px; line-height: 1.35; letter-spacing: -.12px; min-height: 0; -webkit-line-clamp: 2; color: #f5f5f7; text-shadow: 0 1px 5px #0004; }
#main .card-caption > small { font-size: 11px; color: #dddde2; text-shadow: 0 1px 4px #0004; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  #main .card .card-caption:before {
    background: linear-gradient(180deg, #17191b00, #17191b30 20px, #17191b82);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 20px);
    mask-image: linear-gradient(180deg, transparent, #000 20px);
  }
  #main .portrait-shelf .card .card-caption:before { -webkit-backdrop-filter: blur(10px) saturate(115%); backdrop-filter: blur(10px) saturate(115%); }
}
/* Typography-led catalog artwork does not need an image-blur layer. */
#main .catalog-only .card-caption:before { background: linear-gradient(180deg, transparent, #15171980 40%, #151719c9); -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none; }
/* Rich cards grow with their full title instead of covering the upper image.
   The spacer reserves clear artwork; the caption is the only frosted area. */
#main .card.rich-card { display: flex; flex-direction: column; }
#main .card.rich-card:before { content: ''; display: block; flex: 1 0 auto; width: 100%; aspect-ratio: 16 / 8.5; }
#main .card.rich-card .card-art { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
#main .card.rich-card .card-caption { position: relative; inset: auto; padding: 13px 14px 14px; gap: 6px; }
#main .card.rich-card .card-caption > strong { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 14px; line-height: 1.35; }
#main .card.rich-card .card-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; font-size: 12px; line-height: 1.4; color: #e0e0e5; text-shadow: 0 1px 4px #0004; }
#main .card:has(.card-art:hover), #main .card:has(.card-art:focus-visible) { box-shadow: 0 0 0 1px #ffffff42, 0 7px 20px #0002; }
#main .card .card-art:hover, #main .card .card-art:focus-visible { transform: none; box-shadow: none; filter: brightness(1.09); }
#main .card .card-art:focus-visible { outline-offset: -3px; }
#main .card .card-progress { bottom: 4px; left: 13px; right: 13px; }
#main .shelf-arrow { top: calc(50% - 28px); bottom: auto; width: 40px; height: 56px; border: 1px solid var(--glass-edge); border-radius: 22px; box-shadow: var(--glass-shadow); background: var(--glass-fill); }
#main .portrait-shelf .shelf > .card { flex-basis: calc((100vw - var(--sidebar-width) - 2 * var(--gutter) - 6 * var(--card-gap)) / 7); }
#main .portrait-shelf .card .card-art { aspect-ratio: 2/3; }
#main .portrait-shelf .card .card-art img { object-position: 50% 40%; }
#main .portrait-shelf .card-caption { padding: 12px 12px 13px; }
#main .portrait-shelf .card-caption > strong { font-size: 12px; font-weight: 600; }
#main .portrait-shelf .card-caption > small { font-size: 10px; }
#main .archive-cover { padding: 18px; }
#main .archive-cover-title { display: none; }
#main .archive-cover-year { font-family: var(--font); font-size: 77px; top: 24px; left: 12px; right: auto; font-weight: 700; opacity: .12; letter-spacing: -4px; }
#main .archive-cover:after { display: none; }
#main .archive-cover-line { font-size: 7px; top: 17px; }
#main .catalog-only .card-art:after { display: block; }
#main .grid { gap: 24px var(--card-gap); }
#main .page-head h1 { font-size: 29px; font-weight: 650; }
#main .page-head .eyebrow { display: none; }
#main .page-head p { font-size: 13px; line-height: 1.5; }
.year-feature { margin-top: 34px; padding-top: 25px; }
.year-feature > div:first-child { padding-bottom: 20px; }
.year-feature > div:first-child .eyebrow { display: none; }
.year-feature h2 { font-size: 22px; }
.year-feature h2 br { display: none; }
.year-feature p { font-size: 12px; }
.decade-grid .decade-tile { min-height: 106px; border-radius: 12px; padding: 18px; }
.decade-tile strong { font-size: 28px; }
.decade-tile > span:last-child { margin-top: 12px; }
.catalog-toolbar input, .catalog-toolbar select { background: #ffffff07; }
.decade-tabs button { border-radius: 999px; background: #ffffff07; }
.year-group > h2 { font-size: 21px; }
#main .voices-feature { background: var(--bg); }
#main .voices-feature:before { opacity: .5; }
/* Title browsing remains alongside the app navigation instead of a centered popup. */
.title-detail-overlay { inset: 0 0 0 var(--sidebar-width); padding: 0; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; display: block; overflow-y: auto; overscroll-behavior: contain; }
.dialog.title-dialog { width: 100%; max-width: none; min-height: 100%; border: 0; border-radius: 0; background: var(--bg); box-shadow: none; overflow: visible; animation: title-arrive 220ms ease-out both; }
.detail-toolbar { position: sticky; top: 0; z-index: 8; height: 64px; margin-bottom: -64px; display: flex; align-items: center; gap: 13px; padding: 10px 14px; background: #22272970; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.detail-toolbar > span { font-size: 12px; font-weight: 550; color: #c4c7c9; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: min(60%,600px); }
.detail-toolbar > div { margin-left: auto; display: flex; gap: 8px; }
.title-dialog .detail-art { height: min(78svh, 750px); min-height: 550px; padding: 90px var(--gutter) 34px; border-radius: 0 0 12px 12px; background: #080a0b; overflow: hidden; }
.title-dialog .detail-art img { opacity: 1; object-position: center 35%; }
.title-dialog .detail-art:after { z-index: 0; background: linear-gradient(0deg, #020404fa 0%, #020404a0 27%, #02040415 64%),linear-gradient(90deg,#0005,transparent 80%); }
.title-dialog .detail-art > div { z-index: 2; width: 100%; }
.title-dialog .detail-art .hero-kicker { font-size: 10px; font-weight: 550; letter-spacing: .9px; margin-bottom: 10px; }
.title-dialog .detail-art h2 { font-size: clamp(29px, 2.6vw, 45px); font-weight: 720; line-height: 1.06; letter-spacing: -.9px; max-width: 540px; margin: 0 0 11px; text-wrap: balance; }
.title-dialog .detail-synopsis { color: #d0d2d4; font-size: 13px; line-height: 1.4; max-width: 420px; margin: 0 0 10px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.title-dialog .detail-hero-meta { font-size: 11px; gap: 6px; color: #abb2b5; margin-bottom: 18px; }
.title-dialog .detail-art .actions { flex-wrap: wrap; gap: 10px; }
.title-dialog .detail-art .actions .circle { width: 38px; height: 38px; border: 1px solid var(--glass-edge); background: var(--glass-fill); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); }
.title-dialog .detail-art .detail-rent { display: flex; align-items: center; gap: 6px; opacity: .55; }
.detail-rent small { font-size: 9px; }
.title-dialog .detail-art .primary { min-width: 138px; }
.title-dialog .detail-body { padding: 25px var(--gutter) 40px; }
.title-dialog .detail-body > .meta { font-size: 12px; color: #b1b6b8; }
.title-dialog .detail-columns { margin: 20px 0; padding-top: 20px; gap: 32px; }
.title-dialog .detail-columns p { font-size: 13px; line-height: 1.5; }
.title-dialog .access-options { grid-template-columns: repeat(3,minmax(0,300px)); gap: 18px; margin: 16px 0 20px; }
.title-dialog .access-option { border: 0; background: #191d20; border-radius: 13px; padding: 17px; min-height: 133px; }
.title-dialog .access-option strong { font-size: 15px; }
.title-dialog .access-option p { font-size: 11px; }
.title-dialog .access-option :is(.primary,.secondary) { border-radius: 999px; min-height: 34px; font-size: 12px; }
.title-dialog .detail-body h3 { font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
.detail-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 0; background: #000; }
/* The poster remains beneath the preview, including after a source failure. */
.title-dialog .catalog-detail-art .archive-cover { z-index: 0; }
.title-dialog .catalog-detail-art .archive-cover-line { display: none; }
.detail-related { margin-top: 34px; }
.detail-related-row { display: grid; grid-auto-columns: calc((100% - 4 * var(--card-gap))/5); grid-auto-flow: column; gap: var(--card-gap); overflow-x: auto; scrollbar-width: none; padding: 3px 0 10px; }
.related-title { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; font-size: 12px; line-height: 1.4; color: #ccd0d2; }
.related-title img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; }
.related-title:hover img { filter: brightness(1.12); }
.related-title span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* Playback only carries a floating control layer. */
.cinema-toolbar { background: linear-gradient(#0008, transparent); padding: 16px 22px; height: 74px; }
.cinema-toolbar h2 { font-size: 12px; color: #e1e4e5; }
.uses-native .cinema-toolbar h2 { display: none; }
.cinema-player-host .preme-player-heading { display: block; }
.cinema-player-host .preme-player-options { margin-left: auto; }
.cinema-tools { border-radius: 999px; gap: 3px; }
.cinema-tools .icon-button { width: 38px; height: 38px; }
.cinema-toolbar > .icon-button { width: 40px; height: 40px; }
.watch-drawer { background: #242729f2; }
.watch-drawer-heading { background: #242729; }
@keyframes title-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width:1700px) { :root { --sidebar-width: 238px; --gutter: 38px; } }
@media (min-width:701px) and (max-width:1200px) {
  :root { --sidebar-width: 206px; --gutter: 27px; }
  #main .portrait-shelf .shelf > .card { flex-basis: calc((100vw - var(--sidebar-width) - 2 * var(--gutter) - 4 * var(--card-gap))/5); }
  .detail-related-row { grid-auto-columns: calc((100% - 2 * var(--card-gap))/3); }
}
@media (min-width:701px) and (max-width:900px) {
  :root { --sidebar-width: 190px; --gutter: 22px; --shelf-columns: 2; }
  #main .hero.source-hero { min-height: 510px; height: 78svh; }
  #main .portrait-shelf .shelf > .card { flex-basis: calc((100vw - var(--sidebar-width) - 2 * var(--gutter) - 2 * var(--card-gap))/3); }
  .title-dialog .detail-columns, .title-dialog .access-options { grid-template-columns: 1fr; }
  .title-dialog .access-option { min-height: 100px; flex-direction: row; align-items: center; gap: 18px; }
  .title-dialog .access-option > div { flex: 1; }
  .title-dialog .access-option :is(.primary,.secondary) { width: auto; min-width: 110px; }
  .detail-related-row { grid-auto-columns: calc((100% - var(--card-gap))/2); }
  .decade-grid { display: flex; overflow-x: auto; scrollbar-width: none; }
  .decade-grid .decade-tile { flex: 0 0 155px; }
}
@media (max-width:700px) {
  :root { --sidebar-width: 0px; --gutter: 24px; }
  #header.app-sidebar { position: sticky; inset: 0; width: 100%; height: 113px; min-height: 113px; border-radius: 0 0 18px 18px; padding: 16px var(--gutter) 0; border: 0; border-bottom: 1px solid var(--glass-edge); }
  #header.app-sidebar .wordmark { margin: 0; font-size: 24px; }
  #header.app-sidebar .sidebar-search { width: 36px; margin: 0 0 0 auto; }
  #header.app-sidebar nav { flex-direction: row; gap: 5px; }
  #header.app-sidebar nav button { width: auto; white-space: nowrap; min-height: 38px; padding: 8px 12px; font-size: 12px; }
  #header.app-sidebar .sidebar-bottom { padding: 0; }
  #main .hero.source-hero { min-height: 480px; height: min(70svh,650px); }
  #main .source-hero .hero-content { max-width: 450px; padding: 35px var(--gutter); }
  .title-detail-overlay { top: 113px; }
  .title-dialog .detail-art { min-height: 490px; height: 68svh; }
  #main .portrait-shelf .shelf > .card { flex-basis: calc((100vw - 2 * var(--gutter) - 3 * var(--card-gap))/4); }
}
@media (max-width:600px) {
  :root { --gutter: 19px; --card-gap: 12px; }
  #header.app-sidebar { padding-inline: 18px; }
  #main .hero.source-hero { min-height: 480px; height: calc(80svh - 113px); }
  #main .source-hero .hero-motion, #main .source-hero .hero-source-window { object-position: 61% 32%; }
  #main .source-hero .hero-content { padding: 30px var(--gutter); max-width: 340px; }
  #main .source-hero #hero-title { font-size: 33px; }
  #main .source-hero .hero-description { font-size: 12px; max-width: 285px; }
  #main .hero-volume, #main .hero-info { width: 44px; height: 44px; }
  #main .source-hero .primary { min-height: 44px; }
  #main .section-heading h2 { font-size: 18px; }
  #main .shelf > .card { flex-basis: 76vw; }
  #main .portrait-shelf .shelf > .card { flex-basis: 38vw; }
  #main .grid .card .card-art { aspect-ratio: 1.1; }
  #main .card .card-caption { padding: 10px 10px 11px; }
  #main .card.rich-card .card-caption { padding: 12px 11px; }
  #main .card.rich-card .card-caption > strong { font-size: 13px; }
  #main .grid .card-caption strong { font-size: 11px; }
  #main .grid .card-caption small { font-size: 9px; }
  #main .archive-cover-year { font-size: 60px; top: 35px; }
  #main .archive-cover-line { font-size: 6px; left: 10px; letter-spacing: 1px; }
  .title-dialog .detail-art { height: auto; min-height: 520px; padding: 95px var(--gutter) 28px; }
  .title-dialog .detail-art h2 { font-size: 31px; max-width: 320px; }
  .detail-toolbar { height: 62px; margin-bottom: -62px; padding: 9px 12px; gap: 9px; }
  .detail-toolbar > span { font-size: 11px; }
  .detail-toolbar > div { gap: 5px; }
  .glass-control { width: 44px; height: 44px; }
  .title-dialog .detail-art .actions { gap: 8px; }
  .title-dialog .detail-art .primary { min-width: 100px; min-height: 42px; padding: 11px 18px; }
  .title-dialog .detail-art .actions .circle { width: 44px; height: 44px; }
  .title-dialog .detail-rent { min-height: 42px; }
  .title-dialog .detail-body { padding: 18px var(--gutter) 34px; }
  .title-dialog .detail-columns { grid-template-columns: 1fr; gap: 15px; }
  .title-dialog .access-options { grid-template-columns: 1fr; gap: 10px; }
  .title-dialog .access-option { flex-direction: row; align-items: center; min-height: 96px; gap: 15px; }
  .title-dialog .access-option > div { flex: 1; min-width: 0; }
  .title-dialog .access-option :is(.primary,.secondary) { width: auto; min-width: 106px; max-width: 45%; min-height: 42px; }
  .detail-related-row { grid-auto-columns: 65%; }
  .cinema-toolbar { padding: 12px; }
  .cinema-toolbar > .icon-button, .cinema-tools .icon-button { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion:reduce) {
  .dialog.title-dialog { animation: none; }
  .tv-design *, .tv-design *:before, .tv-design *:after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
@media (prefers-reduced-transparency:reduce), (prefers-contrast:more) {
  :root { --glass-fill: #262a2d; --glass-edge: #ffffff80; --glass-blur: none; }
  .detail-toolbar { background: #262a2d; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #header.app-sidebar { background: #262a2d; }
  #main .card .card-caption:before { inset: 0 0 -1px; background: #25282b; -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none; }
  #main .card-caption > strong, #main .card-caption > small, #main .card.rich-card .card-description { color: #fff; text-shadow: none; }
  #main .card:after { border-color: #ffffff80; }
}
@media (forced-colors:active) {
  .glass-control, #header.app-sidebar, .detail-toolbar, #main .hero-volume, #main .hero-info { border: 1px solid ButtonText; background: Canvas; color: CanvasText; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #main .card .card-caption:before { inset: 0 0 -1px; background: Canvas; -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none; }
  #main .card-caption > strong, #main .card-caption > small, #main .card.rich-card .card-description { color: CanvasText; text-shadow: none; }
  #main .card:after { border-color: ButtonText; box-shadow: none; }
}
