/* 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 .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(5, 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 five-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(5, 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;
  }
}
