.detail-heading {
  display: contents;
}

@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .home-curation-card:not(.is-selected) {
    transition: flex-basis 0s, transform .22s !important;
  }
}

@media (min-width: 761px) and (min-height: 521px) {
  .detail-dialog.web-desktop-series-wide[open],
  .detail-dialog.web-desktop-series-wide.has-trailer[open] {
    display: block !important;
    width: min(1120px, 94vw);
    max-height: calc(100dvh - 20px);
    overflow: hidden;
  }

  .detail-dialog.web-desktop-series-wide .detail-poster {
    display: none !important;
  }

  .detail-dialog.web-desktop-series-wide .detail-content,
  .detail-dialog.web-desktop-series-wide .detail-content.has-trailer {
    width: 100%;
    max-height: calc(100dvh - 20px);
    box-sizing: border-box;
    overflow-y: auto;
  }

  .detail-dialog.web-desktop-series-wide.has-tmdb-backdrop .detail-content {
    background-image:
      linear-gradient(#080b109e, #080b109e),
      var(--tmdb-backdrop) !important;
    background-position: center top, center top !important;
    background-size: 100% 100%, 100% auto !important;
  }
}

@media (max-width: 760px), (max-width: 960px) and (max-height: 520px) {
  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal)[open] {
    display: block !important;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal) .detail-poster {
    display: none !important;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal).has-tmdb-backdrop .detail-content {
    min-height: 100%;
    background-image: none !important;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal):not(.has-trailer) .detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-height: 100%;
    padding: 20px;
    overflow-y: auto;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal).has-trailer .detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal).has-tmdb-backdrop:not(.has-trailer) .detail-content::before {
    content: "";
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: calc(100% + 40px);
    aspect-ratio: 16 / 9;
    margin: -20px -20px 0;
    border-radius: 19px 19px 0 0;
    background-color: #05070a;
    background-image:
      linear-gradient(180deg, #05070a00 55%, #080b10 100%),
      var(--tmdb-backdrop);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal).has-trailer .trailer-shell {
    grid-column: 1;
    grid-row: 1;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal).has-tmdb-backdrop .detail-heading {
    display: flex;
    z-index: 3;
    width: calc(100% + 40px);
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
    margin: 0 -20px;
    padding: 42px 20px 17px;
    background: linear-gradient(180deg, transparent 0%, #080b10d9 68%, #080b10f5 100%);
    pointer-events: none;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal):not(.has-tmdb-backdrop) .detail-heading {
    display: block;
    grid-column: 1;
    grid-row: 1;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal).has-tmdb-backdrop.has-trailer .detail-heading {
    width: calc(100% + 32px);
    margin: 0 -16px 10px;
    padding: 44px 16px 13px;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal) .detail-heading .eyebrow {
    margin: 0 0 3px;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal) .detail-heading h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(20px, 6.5vw, 30px);
    line-height: 1.04;
    text-shadow: 0 3px 14px #000;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal) .detail-heading .detail-meta,
  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal) .detail-heading .detail-tmdb-facts {
    margin-top: 3px;
    text-shadow: 0 2px 10px #000;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal) .detail-content > #detailDescription {
    grid-column: 1;
    grid-row: 2;
    margin-top: 12px;
  }

  .detail-dialog:is(.mobile-series-horizontal, .mobile-movie-horizontal).has-trailer .trailer-shell > span {
    left: 16px !important;
  }
}
/* Scoped twice to override legacy mobile/APK detail rules, never landscape. */
html body #detailDialog.detail-portrait-sheet.detail-portrait-sheet[open] {
  display:block!important;position:fixed!important;inset:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)!important;
  width:100%!important;max-width:840px!important;height:calc(100% - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
  max-height:none!important;min-height:0!important;margin:0 auto!important;padding:0!important;
  border:0!important;border-radius:16px 16px 0 0!important;background:#050505!important;
  overflow:hidden!important;transform:none!important;box-sizing:border-box!important;
}
html body #detailDialog.detail-portrait-sheet::before,
html body #detailDialog.detail-portrait-sheet::after,
html body #detailDialog.detail-portrait-sheet .detail-content::before,
html body #detailDialog.detail-portrait-sheet .detail-content::after {display:none!important;content:none!important;}
@supports (height:100dvh) {
  html body #detailDialog.detail-portrait-sheet.detail-portrait-sheet[open] {
    height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
  }
}
html body #detailDialog.detail-portrait-sheet.detail-portrait-sheet .detail-content {
  display:block!important;position:relative!important;width:100%!important;height:100%!important;max-height:100%!important;
  margin:0!important;padding:0!important;overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch;scroll-behavior:auto!important;
  background:transparent!important;border:0!important;box-sizing:border-box!important;
}
html body #detailDialog.detail-portrait-sheet .detail-content > :not(.portrait-detail-stage):not(.portrait-detail-body),
html body #detailDialog.detail-portrait-sheet > .apk-detail-side,
html body #detailDialog.detail-portrait-sheet > .apk-detail-actions,
html body #detailDialog.detail-portrait-sheet > .apk-detail-visual,
html body #detailDialog.detail-portrait-sheet #detailPoster,
html body #detailDialog.detail-portrait-sheet #silkDetailScrollControls {display:none!important;}
html body #detailDialog.detail-portrait-sheet .portrait-detail-stage {
  display:block!important;position:relative!important;width:100%!important;height:auto!important;
  aspect-ratio:16/9;min-height:0!important;overflow:hidden!important;background:#0b0b0b;
}
@supports not (aspect-ratio:16/9) {
  html body #detailDialog.detail-portrait-sheet .portrait-detail-stage {height:0!important;padding-top:56.25%!important;}
}
html body #detailDialog.detail-portrait-sheet .portrait-detail-art {
  position:absolute;inset:0;background-size:cover;background-position:center;background-repeat:no-repeat;
}
html body #detailDialog.detail-portrait-sheet #trailerShell:not([hidden]) {
  display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:0!important;aspect-ratio:auto!important;background:transparent!important;
}
html body #detailDialog.detail-portrait-sheet #trailerShell.is-error {visibility:hidden!important;}
html body #detailDialog.detail-portrait-sheet #detailTrailer,
html body #detailDialog.detail-portrait-sheet #detailTrailerEmbed {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;
  object-fit:contain!important;transform:none!important;border:0!important;border-radius:0!important;
}
html body #detailDialog.detail-portrait-sheet #trailerShell > span {display:none!important;}
html body #detailDialog.detail-portrait-sheet #detailTrailerStatus {font-size:13px!important;}
html body #detailDialog.detail-portrait-sheet #closeDetail {
  position:absolute!important;inset:10px 10px auto auto!important;display:grid!important;place-items:center!important;
  width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
  margin:0!important;padding:0!important;border:1px solid #ffffff38!important;border-radius:50%!important;
  background:#151515df!important;color:#fff!important;font:30px/1 sans-serif!important;
  z-index:10030!important;transform:none!important;box-shadow:none!important;cursor:pointer!important;
}
html body #detailDialog.detail-portrait-sheet .portrait-detail-body {
  display:flex;flex-direction:column;gap:14px;position:relative;min-width:0;min-height:calc(100% - 56.25vw);
  padding:18px 16px 28px;box-sizing:border-box;background:#050505;color:#fff;
}
html body #detailDialog.detail-portrait-sheet .portrait-detail-body > * {min-width:0;flex:none;}
html body #detailDialog.detail-portrait-sheet.detail-portrait-sheet .detail-heading {
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
  padding:0!important;margin:0!important;grid-area:auto!important;align-self:stretch!important;background:none!important;
}
html body #detailDialog.detail-portrait-sheet #detailTitle {
  display:block!important;margin:0 0 8px!important;padding:0!important;font-size:clamp(24px,5vw,34px)!important;
  line-height:1.14!important;font-weight:750!important;letter-spacing:-.02em!important;color:#fff!important;
  max-height:none!important;overflow:visible!important;overflow-wrap:anywhere!important;-webkit-line-clamp:unset!important;
}
html body #detailDialog.detail-portrait-sheet .detail-meta-row {gap:6px!important;flex-wrap:wrap!important;}
html body #detailDialog.detail-portrait-sheet #detailMeta,
html body #detailDialog.detail-portrait-sheet #detailType {font-size:11px!important;line-height:1.4!important;}
html body #detailDialog.detail-portrait-sheet #detailTmdbFacts:not([hidden]) {display:flex!important;gap:5px!important;flex-wrap:wrap!important;margin:8px 0 0!important;max-height:none!important;}
html body #detailDialog.detail-portrait-sheet #detailTmdbFacts > span {
  font-size:10px!important;line-height:1.25!important;padding:3px 6px!important;border:1px solid #ffffff2a!important;
  border-radius:4px!important;background:#ffffff0c!important;max-width:100%!important;white-space:normal!important;
}
html body #detailDialog.detail-portrait-sheet #detailTmdbFacts > span:empty {display:none!important;}
html body #detailDialog.detail-portrait-sheet .portrait-detail-settings {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;}
html body #detailDialog.detail-portrait-sheet .portrait-detail-settings .subtitle-control:not([hidden]) {
  display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;
  margin:0!important;padding:0!important;width:100%!important;min-width:0!important;background:transparent!important;border:0!important;
}
html body #detailDialog.detail-portrait-sheet .subtitle-control strong {font-size:12px!important;color:#d5d5d5!important;}
html body #detailDialog.detail-portrait-sheet .subtitle-control small {display:none!important;}
html body #detailDialog.detail-portrait-sheet select {
  width:100%!important;max-width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;
  padding:7px 24px 7px 9px!important;margin:0!important;font-size:16px!important;line-height:1.2!important;
  border:1px solid #ffffff45!important;border-radius:8px!important;color:#fff!important;background-color:#242424!important;text-overflow:ellipsis!important;
}
html body #detailDialog.detail-portrait-sheet #detailPlay {
  display:flex!important;align-items:center!important;justify-content:center!important;position:static!important;
  width:100%!important;max-width:none!important;min-width:0!important;min-height:48px!important;height:auto!important;
  margin:0!important;padding:12px 16px!important;background:#fff!important;color:#080808!important;
  border:0!important;border-radius:28px!important;box-shadow:none!important;transform:none!important;
  font-size:17px!important;line-height:1.3!important;font-weight:750!important;letter-spacing:0!important;
}
html body #detailDialog.detail-portrait-sheet #detailPlay:disabled {opacity:.55!important;}
html body #detailDialog.detail-portrait-sheet #detailDescription {
  display:block!important;max-height:none!important;overflow:visible!important;-webkit-line-clamp:unset!important;
  margin:0!important;padding:0!important;font-size:16px!important;line-height:1.5!important;color:#eee!important;overflow-wrap:anywhere!important;
}
html body #detailDialog.detail-portrait-sheet .portrait-detail-favorites {display:flex;align-items:center;}
html body #detailDialog.detail-portrait-sheet #detailFavorite {
  display:grid!important;position:static!important;place-items:center!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;
  margin:0!important;padding:0!important;border:1px solid #ffffff50!important;border-radius:50%!important;
  background:transparent!important;color:#fff!important;font-size:0!important;box-shadow:none!important;
}
html body #detailDialog.detail-portrait-sheet #detailFavorite::before {content:'♡';font:30px/1 sans-serif;}
html body #detailDialog.detail-portrait-sheet #detailFavorite.is-favorite::before {content:'♥';color:#f5d878;}
html body #detailDialog.detail-portrait-sheet #seriesControl:not([hidden]) {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px 10px!important;margin:0!important;padding:0!important;border:0!important;background:none!important;}
html body #detailDialog.detail-portrait-sheet #seriesControl label {min-width:0!important;gap:5px!important;}
html body #detailDialog.detail-portrait-sheet #seriesControl label > span {font-size:12px!important;}
html body #detailDialog.detail-portrait-sheet #seriesHint {grid-column:1/-1!important;font-size:11px!important;}
html body #detailDialog.detail-portrait-sheet #episodeMetadata:not([hidden]) {display:block!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;}
html body #detailDialog.detail-portrait-sheet #episodeMetadataImage,
html body #detailDialog.detail-portrait-sheet #episodeMetadataFacts,
html body #detailDialog.detail-portrait-sheet #episodeMetadataLabel {display:none!important;}
html body #detailDialog.detail-portrait-sheet #episodeMetadataOverview {display:block!important;font-size:13px!important;line-height:1.45!important;margin:5px 0 0!important;-webkit-line-clamp:unset!important;max-height:none!important;overflow:visible!important;}
html body #detailDialog.detail-portrait-sheet #episodeMetadataTitle {font-size:12px!important;margin:0!important;padding:0!important;}
html body #detailDialog.detail-portrait-sheet #seriesContinue:not([hidden]) {display:flex!important;gap:10px!important;margin:0!important;padding:8px 2px!important;min-width:0!important;border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;}
html body #detailDialog.detail-portrait-sheet .series-continue-icon {display:grid!important;place-items:center!important;width:36px!important;height:36px!important;flex:0 0 36px!important;border-radius:50%!important;background:#ffffff20!important;color:#fff!important;font-size:14px!important;}
html body #detailDialog.detail-portrait-sheet #seriesContinue:focus-visible .series-continue-icon {outline:2px solid #f5d878;outline-offset:2px;}
html body #detailDialog.detail-portrait-sheet .series-continue-copy {min-width:0!important;gap:3px!important;}
html body #detailDialog.detail-portrait-sheet .series-continue-copy small,
html body #detailDialog.detail-portrait-sheet #seriesContinueTime {font-size:11px!important;}
html body #detailDialog.detail-portrait-sheet #seriesContinueEpisode {font-size:13px!important;overflow-wrap:anywhere!important;}
html body #detailDialog.detail-portrait-sheet .series-continue-action {display:none!important;}
html body #detailDialog.detail-portrait-sheet button:focus-visible,
html body #detailDialog.detail-portrait-sheet select:focus-visible {outline:2px solid #f5d878;outline-offset:2px;}
html.apk-detail-native-backdrop body #detailDialog.detail-portrait-sheet.detail-portrait-sheet[open],
html.apk-detail-native-backdrop #detailDialog.detail-portrait-sheet .portrait-detail-stage {background:transparent!important;}
html.apk-detail-native-backdrop #detailDialog.detail-portrait-sheet .portrait-detail-art {visibility:hidden!important;}
html.apk-detail-native-backdrop #detailDialog.detail-portrait-sheet::backdrop {background:transparent!important;backdrop-filter:none!important;}
