: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 {
  color-scheme: light;
  --width: 1280px;
  --gap: 12px;
  --head: 64px;
  --bg: white;
  --panel: #fff;
  --text: #18181b;
  --muted: #696971;
  --line: #e6e5e9;
  --accent: #e64d87;
  --radius: 10px;
}

.topbar {
  background: #fffffff5;
}

.top-inner {
  padding-inline: 12px;
}

.wordmark {
  gap: 8px;
}

.wordmark img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.wordmark strong {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -.045em;
}

.top-nav {
  margin-inline-start: 24px;
}

.top-nav a {
  font-size: 14px;
}

.catalog-search,
.catalog-language select {
  background: #f7f7f8;
}

.channel-bar {
  border-bottom: 1px solid var(--line);
}

.channel-bar nav {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.channel-bar a,
.quick-filters a {
  border-radius: 18px;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 600;
  background: #f5f5f6;
}

.channel-bar a:first-child {
  background: #fcebf2;
  color: #bf326b;
}

.market {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 16px 12px 50px;
}

.refine {
  position: sticky;
  top: 81px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.refine section+section {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-top: 15px;
}

.refine h2 {
  font-size: 14px;
  margin-bottom: 9px;
}

.refine nav {
  display: grid;
  gap: 4px;
}

.refine a {
  font-size: 13px;
}

.refine nav a {
  padding: 6px 10px;
  border-radius: 6px;
}

.refine nav a:first-child {
  background: #faf0f5;
  color: #b92c64;
}

.refine section>div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.refine section>div a {
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 6px;
}

.inventory {
  min-width: 0;
}

.quick-filters {
  display: flex;
  gap: 7px;
  overflow: auto;
  scrollbar-width: none;
  padding: 0 0 11px;
  white-space: nowrap;
}

.quick-filters a {
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
  background: #f6f6f7;
}

.quick-filters a:first-child {
  color: white;
  background: #26262a;
}

.shelf-head h1,
.shelf-head h2 {
  font-size: 16px;
  font-weight: 750;
}

.shelf-head {
  margin-bottom: 10px;
}

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

.inventory .shelf {
  margin: 23px 0 28px;
}

.premieres {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 150px;
  gap: 10px;
  overflow: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.premiere-cover {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  color: white;
  margin-bottom: 5px;
}

.premiere-cover img {
  width: 100%;
  aspect-ratio: 3/4;
  height: auto;
  display: block;
  object-fit: cover;
}

.premiere-cover span,
.premiere-cover small {
  position: absolute;
  inset-inline-start: 6px;
  color: white;
  font-size: 10px;
  border-radius: 3px;
  padding: 1px 5px;
}

.premiere-cover span {
  top: 6px;
  background: #d63e79;
}

.premiere-cover small {
  bottom: 6px;
  background: #202024bb;
}

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

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

.catalog-meta {
  font-size: 12px;
}

.publication {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 45px;
}

.issue-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.portrait-preview {
  width: min(384px, 100%);
  height: min(72vh, 683px);
  aspect-ratio: 9/16;
  margin-inline: auto;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  background: #111;
}

.portrait-preview>img,
.portrait-preview .player-wrap,
.portrait-preview .player-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.start-preview {
  position: absolute;
  display: grid;
  place-items: center;
  inset: 0;
  background: #0002;
  color: white;
}

.start-preview span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #121216a8;
  border: 1px solid #ffffff85;
  font-size: 22px;
}

.publication-copy {
  padding-block: 13px;
}

.publication-copy h1 {
  font-size: clamp(20px, 1.8vw, 27px);
  line-height: 1.35;
}

.publication-copy .synopsis {
  margin: 15px 0;
}

.issue-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  margin-block: 7px 12px;
}

.section-link {
  color: var(--accent);
  font-weight: 650;
}

.issue-sidebar {
  min-width: 0;
}

.issue-sidebar section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0 0 14px;
}

.issue-sidebar h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.issue-sidebar .episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
}

.issue-other {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  font-size: 14px;
}

.issue-other img {
  width: 44px;
  height: 56px;
  object-fit: cover;
  border-radius: 5px;
}

.inventory h1:not(.shelf-head h1) {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.35;
  margin: 6px 0 12px;
}

.app-panel {
  background: #fdf6fa;
}

.app-dock {
  display: none;
}

.site-foot {
  background: #fbfbfc;
}

@media(max-width:980px) {
  .market {
    grid-template-columns: 195px minmax(0, 1fr);
    gap: 14px;
  }

  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media(max-width:720px) {
  .market {
    display: block;
  }

  .refine {
    display: none;
  }

  .issue-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media(max-width:550px) {
  :root {
    --gap: 0px;
  }

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

  .channel-bar nav {
    padding-inline: 12px;
    justify-content: flex-start;
    gap: 6px;
  }

  .channel-bar a {
    font-size: 13px;
    padding: 6px 12px;
  }

  .market {
    padding: 14px 12px 32px;
  }

  .premieres,
  .catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns: auto;
    grid-auto-flow: row;
    gap: 13px 9px;
  }

  .premieres article:nth-child(n+5) {
    display: none;
  }

  .publication {
    width: calc(100% - 24px);
  }

  .publication {
    width: 100%;
  }

  .publication>.trail,
  .publication>.shelf,
  .issue-sidebar,
  .publication-copy {
    margin-inline: 16px;
  }

  .portrait-preview {
    height: min(72vh, 177.78vw);
    border-radius: 0;
  }

  .publication-copy .synopsis {
    font-size: 14px;
  }

  .app-dock {
    display: flex;
    justify-content: space-around;
    background: #fffffff5;
    border-top: 1px solid var(--line);
    position: fixed;
    z-index: 8;
    inset: auto 0 0;
    padding: 5px 3px max(5px, env(safe-area-inset-bottom));
  }

  .app-dock a {
    display: grid;
    justify-items: center;
    gap: 2px;
    font-size: 10px;
    max-width: 24%;
  }

  .app-dock span {
    font-size: 20px;
    line-height: 1.15;
  }

  .site-foot {
    padding: 0 12px 54px;
  }
}

body[data-route="watch"] .topbar {
  display: none;
}

body[data-route="watch"] .publication {
  width: 100%;
}

body[data-route="watch"] .publication>.trail {
  position: absolute;
  z-index: 3;
  top: 8px;
  inset-inline-start: 12px;
  padding: 5px 10px;
  max-width: calc(100% - 32px);
  border-radius: 6px;
  background: #141414b3;
  color: white;
}

body[data-route="watch"] .issue-layout {
  grid-template-columns: minmax(0, 1fr) minmax(290px, 400px);
  gap: 0;
}

body[data-route="watch"] .portrait-preview {
  width: 100%;
  height: 100svh;
  border-radius: 0;
}

body[data-route="watch"] .portrait-preview .player-wrap {
  border-radius: 0;
}

body[data-route="watch"] .issue-sidebar {
  padding: 15px;
}

body[data-route="watch"] .publication-copy,
body[data-route="watch"] .publication>.shelf {
  padding-inline: 16px;
}

@media(max-width:720px) {
  body[data-route="watch"] .issue-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-route="watch"] .publication-copy,
  body[data-route="watch"] .issue-sidebar {
    margin-inline: 0;
  }

  body[data-route="watch"] .app-dock {
    display: none;
  }
}

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