/* FANZANIAN public shell contract - 20260816 U1.5 / SEO-A3 RC2. */
:root {
  --fzn-shell-header-height: 56px;
  --fzn-shell-bottom-nav-height: 62px;
  --fzn-shell-desktop-rail-width: 64px;
  --fzn-shell-gutter: 18px;
  --fzn-shell-line: rgba(255,255,255,.08);
  --fzn-shell-header-bg: rgba(8,8,10,.94);
  --fzn-shell-nav-bg: rgba(8,8,10,.96);
  --fzn-shell-panel-radius: 18px;
}

/* Shared top frame. Page-specific controls may extend beneath this first row. */
.public-shell-header {
  box-sizing: border-box;
  border-bottom: 1px solid var(--fzn-shell-line) !important;
  background: var(--fzn-shell-header-bg) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.public-brand-row {
  box-sizing: border-box;
  min-height: calc(var(--fzn-shell-header-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  gap: 12px;
}
.public-brand-row > * { min-width: 0; }

/* Wordmark: one size/weight/spacing on every public surface. */
.brand,
.brand-wordmark,
.brand:hover,
.brand-wordmark:hover,
.brand:focus-visible,
.brand-wordmark:focus-visible {
  color: #e60012 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .11em !important;
  text-decoration: none !important;
  min-height: 0 !important;
  height: auto !important;
}
.brand { display: inline-flex !important; align-items: center !important; width: fit-content; }
.brand-wordmark { display: inline-flex !important; align-items: center !important; height: 14px !important; }

/* Player: FANZANIAN starts at the same left gutter instead of floating in the center. */
.player-page .feed-header {
  min-height: calc(var(--fzn-shell-header-height) + var(--safe-top)) !important;
  padding-right: max(var(--fzn-shell-gutter), var(--safe-right)) !important;
  padding-left: max(var(--fzn-shell-gutter), var(--safe-left)) !important;
}
.player-page .player-home-brand {
  height: auto !important;
  min-height: 36px !important;
  color: #e60012 !important;
  text-decoration: none !important;
}
.player-page .feed-tabs {
  justify-content: flex-start !important;
  gap: 18px !important;
}
.player-page .feed-tab { flex: 0 0 auto; }

/* Catalog: the first header row is the common 56px brand row; search remains below. */
.catalog-header {
  padding-top: 0 !important;
  padding-right: max(var(--fzn-shell-gutter), var(--safe-right)) !important;
  padding-left: max(var(--fzn-shell-gutter), var(--safe-left)) !important;
}
.catalog-header .header-title.public-brand-row { justify-content: flex-start; }

/* My list: brand row shares the same top geometry while title/tabs stay page-specific. */
.mylist-header {
  padding-top: 0 !important;
  padding-right: max(var(--fzn-shell-gutter), var(--safe-right)) !important;
  padding-left: max(var(--fzn-shell-gutter), var(--safe-left)) !important;
}
.mylist-header > .public-brand-row { justify-content: flex-start; }

/* Exploration / Actress / Work / error: one-row header. */
.exploration-header.public-brand-row,
.page-header.public-brand-row {
  min-height: calc(var(--fzn-shell-header-height) + env(safe-area-inset-top, 0px)) !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
  padding-right: max(var(--fzn-shell-gutter), env(safe-area-inset-right, 0px)) !important;
  padding-left: max(var(--fzn-shell-gutter), env(safe-area-inset-left, 0px)) !important;
}

/* Settings used to be the only page whose wordmark was inset to the 760px content frame. */
.settings-header.public-shell-header {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.settings-header-navigation.public-brand-row {
  justify-content: space-between;
  padding-right: max(var(--fzn-shell-gutter), env(safe-area-inset-right, 0px));
  padding-left: max(var(--fzn-shell-gutter), env(safe-area-inset-left, 0px));
}
.settings-title-block {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 18px;
}
.settings-title-block h1 { margin-top: 0 !important; }
.settings-title-block p { margin-bottom: 0; }

/* Mobile bottom navigation: identical frame, icon size, hit target and typography. */
.bottom-navigation {
  box-sizing: border-box;
  height: calc(var(--fzn-shell-bottom-nav-height) + env(safe-area-inset-bottom, 0px)) !important;
  min-height: calc(var(--fzn-shell-bottom-nav-height) + env(safe-area-inset-bottom, 0px)) !important;
  padding: 7px max(10px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(10px, env(safe-area-inset-left, 0px)) !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  border-top: 1px solid var(--fzn-shell-line) !important;
  background: var(--fzn-shell-nav-bg) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.bottom-navigation a {
  min-width: 0;
  min-height: 48px !important;
  gap: 2px !important;
  color: rgba(255,255,255,.50) !important;
  font-size: 9px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
}
.bottom-navigation a.is-active { color: #fff !important; }
.bottom-navigation svg,
.bottom-navigation .mylist-heart-icon,
.bottom-navigation .settings-gear-icon {
  display: block;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  flex: none;
}
.bottom-navigation svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bottom-navigation a:first-child svg { fill: currentColor; stroke: currentColor; }
.bottom-navigation .mylist-heart-icon { fill: none !important; }

/* Wide screens: all public surfaces use the same 64px six-item left rail. */
@media (min-width: 900px) {
  body:not(.player-page) {
    padding-left: var(--fzn-shell-desktop-rail-width) !important;
    padding-bottom: 0 !important;
  }

  body:not(.player-page) .catalog-header,
  body:not(.player-page) .mylist-header {
    left: 0 !important;
  }

  .bottom-navigation {
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: var(--fzn-shell-desktop-rail-width) !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    padding: 18px 7px !important;
    transform: none !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(6, minmax(48px, max-content)) !important;
    align-content: center !important;
    gap: 14px !important;
    border-top: 0 !important;
    border-right: 1px solid var(--fzn-shell-line) !important;
    background: rgba(6,6,8,.98) !important;
  }

  .player-page .player-app { padding-left: var(--fzn-shell-desktop-rail-width) !important; }
  .player-page .feed-header {
    left: var(--fzn-shell-desktop-rail-width) !important;
    width: calc(100% - var(--fzn-shell-desktop-rail-width)) !important;
  }
  .player-page .feed-panel { width: calc(100vw - var(--fzn-shell-desktop-rail-width)) !important; }
}

@media (max-width: 560px) {
  :root { --fzn-shell-gutter: 14px; }
  .settings-title-block { width: calc(100% - 24px); padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .public-shell-header,
  .bottom-navigation { scroll-behavior: auto; }
}

/* MyList historically mixed -14/-24px tab margins with different header gutters,
   which produced desktop horizontal overflow. Bind the tab lane to the shell gutter. */
.mylist-tabs {
  margin-right: calc(-1 * var(--fzn-shell-gutter)) !important;
  margin-left: calc(-1 * var(--fzn-shell-gutter)) !important;
  padding-right: var(--fzn-shell-gutter) !important;
  padding-left: var(--fzn-shell-gutter) !important;
}

/* R5-A S1: the shared shell owns navigation DOM geometry, not page CSS. */
body:not(.player-page) {
  padding-bottom: calc(var(--fzn-shell-bottom-nav-height) + env(safe-area-inset-bottom, 0px)) !important;
}

.bottom-navigation {
  position: fixed !important;
  z-index: 40 !important;
  top: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  display: grid;
  width: 100% !important;
  transform: none !important;
  align-content: stretch !important;
}
.bottom-navigation a {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
}
.bottom-navigation span {
  display: block;
  font-size: inherit !important;
  line-height: 1.15 !important;
}
.bottom-navigation .settings-gear-icon {
  fill: none !important;
  stroke: currentColor !important;
}
.bottom-navigation a.is-active .mylist-heart-icon {
  fill: currentColor !important;
}

/* Catalog's established content geometry is the R5-A reference for Exploration. */
.public-shell-content {
  box-sizing: border-box;
  width: min(920px, 100%);
  margin-right: auto;
  margin-left: auto;
  padding-top: 12px !important;
  padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
}

@media (max-width: 699px) {
  .public-shell-content {
    padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
    padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
  }
}

@media (min-width: 900px) {
  body:not(.player-page) {
    padding-bottom: 0 !important;
  }
  .bottom-navigation {
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: var(--fzn-shell-desktop-rail-width) !important;
  }
}

/* R3_COMPACT_STICKY_HEADER_CONTRACT: compact_page_mode_sticky_v1 */
.catalog-header.public-shell-header,
.exploration-header.public-shell-header,
.mylist-header.public-shell-header,
.settings-header.public-shell-header {
  position: sticky !important;
  z-index: 30 !important;
  top: 0 !important;
}

.public-shell-header .header-mode {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-height: 0 !important;
  margin: 0 !important;
  color: rgba(255,255,255,.66) !important;
  font-size: 13px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

.catalog-header.public-shell-header {
  display: block !important;
  gap: 0 !important;
  padding-bottom: 0 !important;
}
.mylist-header.public-shell-header {
  gap: 0 !important;
  padding-bottom: 0 !important;
}
.mylist-header .header-mode span {
  color: #ff4f91;
  font-size: .92em;
}
.settings-header-navigation.public-brand-row {
  justify-content: flex-start !important;
}
.settings-header-navigation .settings-back-button {
  margin-left: auto;
}

/* R6_GLOBAL_NAVIGATION_DESKTOP_GEOMETRY: keep the five-item desktop rail centered
   after the later mobile-first shell rule sets align-content: stretch. */
@media (min-width: 900px) {
  .bottom-navigation {
    align-content: center !important;
  }
}


/* 2026-10-08: shared discovery navigation language. */
.discovery-section-nav {
  display: flex;
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
  scrollbar-width: none;
}
.discovery-section-nav::-webkit-scrollbar { display: none; }
.discovery-section-nav a {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 9px 13px;
  border-radius: 9px;
  color: rgba(255,255,255,.55);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}
.discovery-section-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.045);
}
.discovery-section-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,.095);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.045);
}

@media (max-width: 700px) {
  .discovery-section-nav {
    width: calc(100% + 20px);
    margin-left: -10px;
    padding-right: 10px;
    padding-left: 10px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}

/* Player DVD Front Cover R21 START */
/*
 * Exact source crop:
 *
 * viewport aspect = (naturalWidth / naturalHeight) * 0.474
 *
 * With object-fit:cover + object-position:right this exposes exactly the
 * rightmost 47.4% of a classified DVD spread.
 *
 * IMPORTANT:
 * Base rule does NOT depend on actress/right-rail existence.
 */
@media (min-width: 900px) {
  body.player-page
    .panel-content
    .panel-package-poster[data-package-orientation="dvd-spread"] {
    top: 12px !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;

    width: auto !important;
    height: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    max-height: calc(100% - 24px) !important;

    aspect-ratio:
      var(--fzn-player-package-front-aspect) !important;

    padding: 0 !important;
    object-fit: cover !important;
    object-position: right center !important;
    transform: translateX(-50%) !important;
  }

  /*
   * Actress rail changes only available vertical space.
   * It does NOT change crop geometry.
   */
  body.player-page
    .feed-panel.has-desktop-right-rail
    .panel-content
    .panel-package-poster[data-package-orientation="dvd-spread"] {
    top: 10px !important;
    height: calc(46% - 14px) !important;
    max-height: calc(46% - 14px) !important;
  }

  body.player-page
    .feed-panel.has-desktop-right-rail-two
    .panel-content
    .panel-package-poster[data-package-orientation="dvd-spread"] {
    height: calc(38% - 14px) !important;
    max-height: calc(38% - 14px) !important;
  }
}
/* Player DVD Front Cover R21 END */


/* Player No-Actress Package Balance R34 START */
/*
 * When no actress rail exists, do not let a DVD package expand to nearly
 * the full panel height. Keep the package footprint aligned with the
 * one-actress desktop layout so visual scale does not jump by metadata
 * availability alone.
 */
@media (min-width: 900px) {
  body.player-page
    .feed-panel:not(.has-desktop-right-rail)
    .panel-content
    .panel-package-poster[data-package-orientation="dvd-spread"] {
    top: 10px !important;
    bottom: auto !important;
    left: 50% !important;

    width: auto !important;
    height: calc(46% - 14px) !important;
    max-width: calc(100% - 24px) !important;
    max-height: calc(46% - 14px) !important;

    transform: translateX(-50%) !important;
  }
}
/* Player No-Actress Package Balance R34 END */


/* GLOBAL_NAVIGATION_R3 */
.bottom-navigation > a,
.bottom-navigation > .fzn-shell-more-trigger {
  box-sizing: border-box;
}

.bottom-navigation > .fzn-shell-more-trigger {
  display: grid;
  min-width: 0;
  min-height: 48px !important;
  place-items: center;
  gap: 2px !important;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.50) !important;
  font: inherit;
  font-size: 9px !important;
  font-weight: 750 !important;
  cursor: pointer;
}

.bottom-navigation > .fzn-shell-more-trigger.is-active {
  color: #fff !important;
}

.bottom-navigation > .fzn-shell-more-trigger svg {
  display: block;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fzn-shell-more-menu[hidden] {
  display: none !important;
}

.fzn-shell-more-menu {
  position: fixed;
  z-index: 120;
  inset: 0;
}

.fzn-shell-more-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0,0,0,.64);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.fzn-shell-more-panel {
  position: absolute;
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: calc(
    var(--fzn-shell-bottom-nav-height)
    + env(safe-area-inset-bottom, 0px)
    + 10px
  );
  left: max(10px, env(safe-area-inset-left, 0px));
  max-width: 460px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(17,17,21,.98);
  box-shadow: 0 16px 48px rgba(0,0,0,.48);
}

.fzn-shell-more-panel > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.fzn-shell-more-panel > header > strong {
  color: #fff;
  font-size: 14px;
}

.fzn-shell-more-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 21px;
  cursor: pointer;
}

.fzn-shell-more-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1px;
  background: rgba(255,255,255,.07);
}

.fzn-shell-more-link {
  display: flex;
  min-width: 0;
  min-height: 62px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 11px 14px;
  background: #111115;
  color: rgba(255,255,255,.76);
  text-decoration: none;
}

.fzn-shell-more-link strong {
  color: #fff;
  font-size: 13px;
}

.fzn-shell-more-link span {
  overflow: hidden;
  color: rgba(255,255,255,.48);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fzn-shell-more-link.is-active {
  background: rgba(255,255,255,.10);
}

.fzn-shell-more-link.is-active strong {
  color: #fff;
}

body.fzn-shell-more-open {
  overflow: hidden;
}

@media (min-width: 900px) {
  .bottom-navigation > .fzn-shell-more-trigger {
    min-height: 48px !important;
  }

  .fzn-shell-more-panel {
    right: auto;
    bottom: 20px;
    left: calc(
      var(--fzn-shell-desktop-rail-width)
      + 12px
    );
    width: 340px;
    margin: 0;
  }
}

@media (max-width: 360px) {
  .bottom-navigation > a,
  .bottom-navigation > .fzn-shell-more-trigger {
    font-size: 8px !important;
  }

  .fzn-shell-more-links {
    grid-template-columns: 1fr 1fr;
  }

  .fzn-shell-more-link {
    padding-right: 10px;
    padding-left: 10px;
  }
}


/* Player Related Package R12 START */
body.player-page
  .related-card
  > .related-work-image {
  display: block !important;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden !important;
  border-radius: 9px;
  background: #07070a;
  font-size: 0 !important;
  line-height: 0 !important;
  -webkit-line-clamp: unset !important;
}

body.player-page
  .related-card
  > .related-work-image
  > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #07070a;
}
/* Player Related Package R12 END */
