/* Local-only tweaks for static Skyview shell demos (does not touch production). */
.local-filters {
  margin: 0 0 24px;
  padding: 0 20px;
}
.local-filters .filter-row { margin-bottom: 10px; }
.local-filters .filter-label {
  display: block;
  color: var(--tt, #9a9a9a);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.local-filters .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.local-filters .chip {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  color: #cfcfcf;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.local-filters .chip.active,
.local-filters .chip:hover {
  border-color: rgba(255,200,80,.55);
  color: #fff;
  background: rgba(255,180,40,.12);
}

/* Compact filters (collapsed advanced rows + Фильтры toggle) */
.local-filters.is-compact .filters-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.local-filters.is-compact .chips-type {
  margin-bottom: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.local-filters.is-compact .chips { gap: 6px; }
.local-filters.is-compact .filter-more .chips {
  flex-wrap: wrap;
  overflow-x: visible;
}
.local-filters.is-compact .chip {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 12px;
}
.local-filters .filters-toggle {
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--tt-darker, #cfcfcf);
  padding: 5px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.local-filters .filters-toggle small {
  opacity: 0.85;
  margin-left: 4px;
}
.local-filters.is-expanded .filters-toggle {
  border-color: rgba(255, 200, 80, 0.55);
  color: #fff;
  background: rgba(255, 180, 40, 0.18);
}
.local-filters .filter-more {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.local-filters .filter-more[hidden] {
  display: none !important;
}
.local-filters.is-compact .filter-row { margin-bottom: 8px; }
.local-filters.is-compact .filter-row:last-child { margin-bottom: 0; }

/* Flex search box (theme absolute .search-btn often breaks layout) */
.header__search form {
  margin: 0;
  display: block;
  height: 40px;
}
.header__search-box {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  overflow: hidden;
  box-sizing: border-box !important;
}
.header__search input,
.header__search input:focus {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.header__search .search-btn,
.header__search .header__btn-filter {
  position: static !important;
  right: auto !important;
  top: auto !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer;
  box-sizing: border-box !important;
}
.header__btn-filter { display: none !important; }

#heroBg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background-image .35s ease;
}
#heroBg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,15,15,.92) 0%, rgba(15,15,15,.55) 48%, rgba(15,15,15,.25) 100%);
}

/*
 * Legacy theme .big-slider / .bs2-box stays absolute+vertical in skyview-theme.
 * New homepage hero uses .sv-hero only (no theme class collision).
 * Keep mild legacy overrides for dock / older shells that still use bs* markup.
 */
.big-slider {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 18px !important;
  margin-top: 8px !important;
  margin-bottom: 28px !important;
  padding: 0 !important;
  overflow: visible !important;
  width: 100%;
  box-sizing: border-box;
}
.bs2-box {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  display: block !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  box-sizing: border-box;
}
.bs2-box-in {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  height: auto !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  justify-content: flex-start !important;
}

/* —— sv-hero: full-width feature + horizontal rail BELOW —— */
.sv-hero {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  width: 100% !important;
  max-width: 1320px;
  margin: 12px auto 32px;
  padding: 0;
  box-sizing: border-box;
}
.sv-hero__stage {
  position: relative !important;
  width: 100% !important;
  min-height: min(58vh, 520px);
  border-radius: 12px;
  overflow: hidden !important;
  isolation: isolate;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.45);
}
.sv-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.55;
  transition: background-image 0.35s ease;
}
.sv-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(10, 12, 16, 0.96) 0%, rgba(10, 12, 16, 0.78) 46%, rgba(10, 12, 16, 0.4) 100%),
    linear-gradient(0deg, rgba(10, 12, 16, 0.72) 0%, transparent 48%);
}
.sv-hero__inner {
  position: relative !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr) !important;
  gap: clamp(20px, 3vw, 36px);
  align-items: center !important;
  min-height: min(58vh, 520px);
  padding: clamp(22px, 3.5vw, 40px);
  box-sizing: border-box;
}
.sv-hero__poster {
  width: 100% !important;
  max-width: 240px !important;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.sv-hero__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sv-hero__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sv-hero__ratings {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent, #b8ff2c);
}
.sv-hero__title {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--tt, #f2f5f8);
  white-space: normal;
  max-width: 18ch;
}
.sv-hero__eng,
.sv-hero__meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--tt-darker, #a8b3c0);
}
.sv-hero__blurb {
  margin: 2px 0 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tt-darker, #c9d2dc);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sv-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.sv-hero__cta.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 26px;
  text-decoration: none;
  font-weight: 800;
}
.sv-hero__nav.btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}
.sv-hero__rail {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  width: 100% !important;
  height: auto !important;
  padding: 2px 2px 6px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  box-sizing: border-box;
}
.sv-hero__thumb {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 96px !important;
  aspect-ratio: 2 / 3;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0.82;
  outline: 2px solid transparent;
  transition: opacity 0.18s ease, transform 0.18s ease, outline-color 0.18s ease;
}
.sv-hero__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sv-hero__thumb-year {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
}
.sv-hero__thumb.is-active,
.sv-hero__thumb:hover {
  opacity: 1;
  transform: translateY(-3px);
  outline-color: var(--accent, #b8ff2c);
}

@media screen and (max-width: 760px) {
  .sv-hero__inner {
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 0;
    padding: 18px;
  }
  .sv-hero__poster { max-width: 120px; }
  .sv-hero__title { font-size: clamp(22px, 7vw, 32px); max-width: none; }
  .sv-hero__blurb { -webkit-line-clamp: 2; }
  .sv-hero__thumb { width: 78px; }
}
.carousel-poster {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 4px 8px;
}
.carousel-poster > .poster {
  width: calc((100% - 80px) / 6);
  min-width: 140px;
  flex-shrink: 0;
  margin-right: 0;
  text-decoration: none;
  color: inherit;
}
.local-empty {
  color: #9a9a9a;
  text-align: center;
  padding: 24px;
}

/* —— Watch page: unlock document scroll (theme .wrapper { overflow:hidden } clips) —— */
html:has(body[data-page="watch"]),
body[data-page="watch"] {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
body[data-page="watch"] .wrapper {
  overflow-x: hidden;
  overflow-y: visible;
  height: auto;
  min-height: 100%;
}
body[data-page="watch"] .wrapper-main {
  height: auto;
  min-height: auto;
  flex: 0 0 auto;
}
body[data-page="watch"] .local-watch,
body[data-page="watch"] .pmovie {
  height: auto;
  overflow: visible;
}
body[data-page="watch"] .header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Poster fills theme 240×360 slot */
#watchPoster {
  background: #1a1a1a center / cover no-repeat;
}
#watchPoster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Full-width player block under poster+desc (pmovie__stretch already spans grid) */
.local-player-block {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 40px;
}
.local-player {
  width: 100%;
  /* theme .video-responsive uses padding-top:60%; reinforce 16:9 + floor height */
  aspect-ratio: 16 / 9;
  padding-top: 0 !important;
  min-height: 420px;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  position: relative;
}
.local-player > p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #9a9a9a;
  z-index: 1;
}
.local-player .vibix-slot,
.local-player ins,
.local-player iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 0;
  z-index: 2;
}
.local-player .player-hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  margin: 0;
  padding: 4px 8px;
  font-size: 11px;
  color: #aaa;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  pointer-events: none;
}

/* BR flyroll: out of player flow, corner marker only */
.local-flyroll-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 120px;
  height: 68px;
  z-index: 40;
  pointer-events: none;
}
.local-flyroll-host .flyroll-slot,
.local-player .flyroll-slot {
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(255, 77, 122, 0.45);
  border-radius: 8px;
  background: rgba(20, 8, 12, 0.75);
  display: grid;
  place-items: center;
  color: #ffb0c4;
  font-size: 11px;
  opacity: 0.55;
}
/* If mountPlayer still injects flyroll inside #player, yank it out of the 16:9 box */
.local-player .flyroll-slot {
  position: fixed !important;
  right: 16px;
  bottom: 16px;
  left: auto;
  top: auto;
  width: 120px;
  height: 68px;
  z-index: 40;
}

.local-watch-meta {
  padding: 0 0 8px;
  line-height: 1.5;
}
.local-watch-meta .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.local-watch-meta .tag {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #cfcfcf;
}
.local-watch-meta .tag.accent { border-color: rgba(255,200,80,.5); color: #ffd27a; }
.local-watch-meta .lead { color: var(--tt-darker); margin: 12px 0 8px; }
.local-watch-meta .full { color: var(--tt-darkest); font-size: 14px; margin: 0 0 12px; }
.local-watch-meta .check {
  margin-top: 16px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
}
.local-watch-meta .check h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--tt-darker);
}
.local-watch-meta .check ul { margin: 0; padding: 0; }
.local-watch-meta .check li { margin: 6px 0; color: #d7dde8; }

@media (max-width: 980px) {
  .bs2-box { display: none; }
  .carousel-poster > .poster { width: calc((100% - 32px) / 3); }
  .local-player { min-height: 240px; }
}
