:root {
  color-scheme: dark;
  --bg: #111;
  --panel: #1c1c20;
  --text: #f5f5f6;
  --muted: #b6b5bb;
  --line: #323237;
  --accent: #ee418c;
  --width: 1200px;
  --gap: 24px;
  --radius: 9px;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-wrap: anywhere;
}

a {
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.wrap {
  width: min(var(--width), calc(100% - 2 * var(--gap)));
  margin-inline: auto;
}

.topbar {
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 12;
  border-bottom: 1px solid var(--line);
}

.top-inner,
.top-nav,
.tools,
.wordmark,
.shelf-head,
.switches,
.site-foot nav,
.facts,
.stores,
.trail {
  display: flex;
  align-items: center;
}

.top-inner {
  justify-content: space-between;
  gap: 22px;
  min-height: var(--head, 64px);
}

.top-nav,
.tools {
  gap: clamp(8px, 1.8vw, 28px);
}

.top-nav,
.wordmark,
.tools {
  flex-shrink: 0;
}

.wordmark {
  gap: 9px;
  line-height: 1;
}

.wordmark img {
  width: auto;
  height: var(--logo, 36px);
  object-fit: contain;
  display: block;
}

.wordmark strong {
  font-size: 21px;
  letter-spacing: .02em;
}

.wordmark small {
  display: block;
  letter-spacing: .2em;
  margin-top: 5px;
  font-size: 9px;
}

.top-nav {
  font-size: 15px;
  font-weight: 600;
}

.tools {
  margin-inline-start: auto;
  gap: 12px;
}

.tools .catalog-search {
  max-width: clamp(100px, 13vw, 190px);
}

.catalog-search {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1px 5px 1px 8px;
}

.catalog-search input {
  border: 0;
  background: transparent;
  padding: 6px;
}

.catalog-search button {
  display: grid;
  place-items: center;
}

.catalog-language select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 110px;
}

.nav-menu {
  display: none;
  position: relative;
}

.nav-menu summary {
  list-style: none;
  padding: 5px 7px;
  font-size: 21px;
  line-height: 1;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu>div {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 13px);
  width: min(270px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 10px 28px #0004;
}

.nav-menu nav {
  display: grid;
  margin: 8px 0;
}

.nav-menu nav a {
  padding: 5px 0;
}

.shelf {
  margin: 32px 0 44px;
  min-width: 0;
}

.shelf-head {
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.shelf-head h2 {
  font-size: clamp(19px, 2vw, 29px);
  line-height: 1.3;
}

.shelf-head>a,
.catalog-meta,
.trail,
.engagement {
  color: var(--muted);
  font-size: 14px;
}

.catalog-cover {
  border-radius: var(--radius);
  background: var(--panel);
}

.catalog-cover img {
  object-position: center top;
}

.catalog-title {
  font-size: 16px;
  line-height: 1.36;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.facts,
.filter-row,
.site-foot nav,
.stores,
.trail {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.facts,
.filter-row {
  font-size: 14px;
  color: var(--muted);
}

.filter-row {
  display: flex;
  margin-block: 18px 24px;
}

.facts a,
.filter-row a {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2px 10px;
}

.trail {
  padding: 16px 0;
}

.action,
.stores a {
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 8px 17px;
  display: inline-block;
}

.action:hover,
.stores a:hover {
  color: #fff;
  filter: brightness(1.1);
}

.synopsis {
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-line;
}

.engagement span a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.series-gallery,
.episode-picker {
  margin-block: 25px;
  min-width: 0;
}

.series-gallery h2,
.episode-picker h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.episode {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
  min-width: 43px;
  justify-content: center;
}

.episode.active {
  border-color: var(--accent);
  color: var(--accent);
}

.trail a,
.engagement a {
  color: inherit;
}

.site-foot {
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.site-foot>div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 30px;
  align-items: center;
  justify-content: space-between;
  padding-block: 30px;
}

.site-foot nav,
.site-foot small {
  color: var(--muted);
  font-size: 13px;
}

.app-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 6vw, 80px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: clamp(22px, 4vw, 60px);
  background: var(--panel);
}

.app-info p {
  margin: 10px 0 20px;
  color: var(--muted);
}

.switches {
  justify-content: center;
  gap: 8px;
}

.switches button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 24px;
  line-height: 1;
}

.switches .pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #98989d;
}

.switches .pip[aria-pressed=true] {
  background: var(--accent);
}

.title-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 650;
}

.quiet-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media(max-width:1080px) {
  .top-nav {
    display: none;
  }

  .nav-menu {
    display: block;
  }
}

@media(max-width:620px) {
  :root {
    --gap: 14px;
  }

  .top-inner {
    gap: 9px;
  }

  .tools {
    gap: 6px;
  }

  .tools>.catalog-language {
    display: none;
  }

  .tools .catalog-search {
    max-width: 115px;
  }

  .shelf {
    margin-block: 22px 30px;
  }

  .catalog-meta,
  .shelf-head>a {
    font-size: 12px;
  }

  .catalog-title {
    font-size: 14px;
  }

  .site-foot>div {
    flex-direction: column;
    align-items: flex-start;
  }

  .series-gallery>div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-wrap video {
    height: clamp(220px, 48vh, 460px);
  }
}

@media(prefers-reduced-motion:no-preference) {

  .action,
  .filter-row a,
  .top-nav a,
  .episode,
  .catalog-title,
  .stores a {
    transition: color .18s, background .18s, filter .18s, border-color .18s;
  }

  .catalog-card .catalog-cover img {
    transition: transform .3s ease-out;
  }
}

:root {
  --width: 1173px;
  --gap: 22px;
  --head: 62px;
  --panel: #1a1b1e;
  --accent: #f42d8e;
  --radius: 7px;
}

.cinema {
  position: relative;
  background: #151518;
}

.stage {
  height: clamp(380px, 38vw, 500px);
  position: relative;
}

.stage article {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.stage article[data-offset="0"] {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.backdrop,
.backdrop::after {
  position: absolute;
  inset: 0;
}

.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
}

.backdrop::after {
  content: "";
  background: linear-gradient(0deg, #111 0%, #1118 37%, transparent 80%), linear-gradient(90deg, #15121b80, transparent 70%);
}

.scene-copy {
  position: absolute;
  inset-inline: 0;
  bottom: 35px;
  display: grid;
  grid-template-columns: 139px minmax(0, 680px);
  align-items: end;
  gap: 24px;
  pointer-events: none;
}

.scene-copy a {
  pointer-events: auto;
}

.scene-poster img,
.cover-small img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 7px;
}

.hot-rank {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #fbb2cc;
}

.scene-copy h2 {
  font-size: clamp(23px, 2.6vw, 38px);
  margin: 5px 0 10px;
}

.scene-copy .facts a {
  background: #2b252b;
  color: #fff;
}

.scene-copy p {
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #d9d5d8;
}

.cinema .switches {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  inset-inline: 0;
}

.programmes .shelf {
  margin-top: 32px;
}

.programmes .shelf-head {
  margin-bottom: 19px;
}

.catalog-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 25px 14px;
}

.programme-intro {
  display: grid;
  grid-template-columns: 154px minmax(0, 720px);
  align-items: center;
  gap: 24px;
  padding: 12px 0 30px;
}

.programme-intro h1 {
  font-size: clamp(22px, 2.7vw, 36px);
}

.programme-intro .facts {
  margin: 9px 0 16px;
}

.story {
  margin: 26px 0;
}

.story h2,
.watch-page h1 {
  margin-bottom: 12px;
}

.listing {
  padding-bottom: 45px;
}

@media(max-width:780px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media(max-width:550px) {
  :root {
    --gap: 10px;
    --logo: 31px;
  }

  .stage {
    height: 315px;
  }

  .backdrop {
    height: 166px;
  }

  .backdrop::after {
    background: linear-gradient(0deg, #151518, transparent 55%);
  }

  .scene-copy {
    bottom: auto;
    top: 126px;
    grid-template-columns: 73px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .scene-copy>div {
    padding-top: 14px;
  }

  .scene-copy .facts {
    font-size: 12px;
    gap: 3px 6px;
  }

  .scene-copy .facts a:nth-of-type(n+3) {
    display: none;
  }

  .scene-copy h2 {
    font-size: 20px;
    line-height: 1.22;
    margin: 4px 0 6px;
  }

  .scene-copy p {
    font-size: 13px;
    line-height: 1.5;
  }

  .cinema .switches {
    bottom: 8px;
  }

  .programmes .shelf {
    margin-top: 16px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 9px;
  }

  .programme-intro {
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }
}

@media(prefers-reduced-motion:no-preference) {
  .stage article {
    transition: opacity .5s;
  }
}

.screenwall {
  position: relative;
  background: #000;
}

.screenwall .player-wrap {
  border-radius: 0;
}

.screenwall .player-wrap video {
  height: calc(100svh - var(--head));
}

.return-show {
  position: absolute;
  inset: 12px auto auto 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #14141487;
  color: white;
  font-size: 29px;
  line-height: 1;
}

@media(max-width:550px) {
  body[data-route="watch"] .topbar {
    display: none;
  }

  .screenwall .player-wrap video {
    height: 100svh;
  }
}

.wordmark img[src="/assets/site-fruit.svg"] { width: 36px; height: 36px; object-fit: contain; }
.wordmark strong { white-space: nowrap; }
