: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: 1260px;
  --gap: 24px;
  --head: 72px;
  --bg: #0a0a0a;
  --panel: #181818;
  --line: #303030;
  --accent: #fe6938;
  --muted: #aaa;
  --radius: 8px;
}

.wordmark img {
  height: 38px;
}

.triple {
  margin: 24px auto 0;
  border-radius: 12px;
  background: #101010;
  overflow: hidden;
}

.filmstrip {
  height: clamp(175px, 18.6vw, 251px);
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
}

.frame {
  position: absolute;
  left: 50%;
  width: 51%;
  height: calc(100% - 15px);
  top: 12px;
  margin-left: -25.5%;
  border-radius: 10px;
  overflow: hidden;
  background: #242426;
  box-shadow: 0 0 0 1px #ffffff0f;
}

.frame>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}

.frame>div {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 35px 19px 14px;
  background: linear-gradient(transparent, #000c);
}

.frame-play {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
}

.frame small,
.chart small {
  display: block;
  color: #ccc;
  font-size: 12px;
}

.frame[data-offset="1"] {
  transform: translateX(102%) scale(.96);
}

.frame[data-offset="-1"] {
  transform: translateX(-102%) scale(.96);
}

.frame:not([data-offset="0"]) {
  filter: brightness(.67);
}

.frame:is([data-offset="-2"], [data-offset="2"]) {
  visibility: hidden;
}

.switches {
  height: 26px;
}

.switches button:not(.pip) {
  font-size: 18px;
}

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

.shortcuts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 24px 0 16px;
}

.shortcuts>div {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  text-align: center;
  position: relative;
  color: #e5e5e5;
  font-size: 14px;
}

.shortcuts>div span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(130deg, #ff956e, #e14126);
  font-size: 26px;
  font-weight: 800;
}

.shortcuts>div:nth-child(2n) span {
  background: linear-gradient(130deg, #faa631, #e46619);
}

.shortcuts>div:nth-child(3n) span {
  background: linear-gradient(130deg, #9391fb, #674ad8);
}

.shortcuts a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.shelf-head h2 {
  font-size: 24px;
}

.shelf-head h2::before,
.chart h2::before,
.story-box h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: .85em;
  background: var(--accent);
  border-radius: 2px;
  margin-inline-end: 9px;
}

.catalog-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 12px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 2.28fr) minmax(215px, 1fr);
  align-items: start;
  gap: 27px;
  margin-block: 18px 50px;
}

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

.feature-grid {
  display: grid;
  grid-template-columns: minmax(148px, 37%) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.feature-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 5/7;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.feature-grid h1 {
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.35;
}

.feature-grid .facts {
  margin: 16px 0 22px;
}

.story-box,
.chart {
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.story-box h2,
.chart h2 {
  font-size: 21px;
  margin-bottom: 10px;
}

.chart {
  margin-top: 44px;
}

.chart a {
  display: grid;
  grid-template-columns: 21px 43px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  line-height: 1.4;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.chart a img {
  width: 43px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
}

.chart strong {
  color: var(--accent);
}

.watching h1 {
  margin-top: 14px;
}

.list-panel {
  margin-bottom: 50px;
}

.bottom-dock {
  display: none;
}

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

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

  .chart {
    margin-top: 0;
  }
}

@media(max-width:550px) {
  :root {
    --gap: 16px;
    --head: 48px;
  }

  .wordmark img {
    height: 27px;
  }

  .triple {
    margin-top: 12px;
  }

  .filmstrip {
    height: clamp(112px, 34.8vw, 180px);
  }

  .frame {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .frame>div {
    padding: 24px 12px 9px;
    gap: 8px;
  }

  .frame-play {
    width: 27px;
    height: 27px;
  }

  .switches {
    height: 20px;
  }

  .switches .pip {
    width: 6px;
    height: 6px;
  }

  .shortcuts {
    padding: 15px 0 7px;
    gap: 3px;
  }

  .shortcuts>div {
    font-size: 11px;
  }

  .shortcuts>div span {
    width: 34px;
    height: 34px;
    font-size: 20px;
    border-radius: 10px;
  }

  .shelf-head h2 {
    font-size: 19px;
  }

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

  .feature-grid {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
  }

  .feature-grid .facts {
    margin: 7px 0 12px;
    font-size: 12px;
  }

  .two-col {
    margin-top: 0;
  }

  .bottom-dock {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    z-index: 8;
    inset: auto 0 0;
    min-height: 46px;
    padding: 6px 3px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #171717f5;
    font-size: 12px;
  }

  .bottom-dock a {
    max-width: 25%;
    text-align: center;
  }

  .site-foot {
    padding-bottom: 52px;
  }
}

@media(prefers-reduced-motion:no-preference) {
  .frame {
    transition: transform .42s, filter .42s;
  }
}

@media(min-width:551px) {
  .watching .player-wrap video {
    height: auto;
    aspect-ratio: 1.62;
  }
}

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

  .watching {
    width: 100%;
  }

  .watching article {
    position: relative;
  }

  .watching article>.trail {
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    padding: 12px 16px 24px;
    background: linear-gradient(#000c, transparent);
    color: white;
    pointer-events: none;
  }

  .watching .trail a {
    pointer-events: auto;
  }

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

  .watching .player-wrap video {
    height: calc(100svh - 54px);
  }

  .watching article> :not(.player-wrap):not(.trail),
  .watching .chart {
    margin-inline: 16px;
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--ink, #fff);
  white-space: nowrap;
}

.wordmark img {
  width: 34px;
  height: 34px;
}

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

@media (max-width: 360px) {
  .wordmark {
    gap: 4px;
  }

  .wordmark img {
    width: 26px;
    height: 26px;
  }

  .wordmark strong {
    font-size: 16px;
  }
}
