[x-cloak] { display: none !important; }

:root {
  color-scheme: dark;
  --ink: 9 9 11;
  --panel: 24 24 27;
  --fg: 250 250 250;
  --muted: 161 161 170;
  --line: 255 255 255;
  --accent: 250 250 250;
  --accent-fg: 9 9 11;
  --chip: 255 255 255;
  --field: 39 39 42;
}

@media (prefers-color-scheme: light) {
  :root:not([data-resolved="dark"]) {
    color-scheme: light;
    --ink: 244 244 245;
    --panel: 255 255 255;
    --fg: 24 24 27;
    --muted: 82 82 91;
    --line: 24 24 27;
    --accent: 24 24 27;
    --accent-fg: 250 250 250;
    --chip: 24 24 27;
    --field: 255 255 255;
  }
}

html[data-resolved="light"] {
  color-scheme: light;
  --ink: 244 244 245;
  --panel: 255 255 255;
  --fg: 24 24 27;
  --muted: 82 82 91;
  --line: 24 24 27;
  --accent: 24 24 27;
  --accent-fg: 250 250 250;
  --chip: 24 24 27;
  --field: 255 255 255;
}

html[data-resolved="dark"] {
  color-scheme: dark;
  --ink: 9 9 11;
  --panel: 24 24 27;
  --fg: 250 250 250;
  --muted: 161 161 170;
  --line: 255 255 255;
  --accent: 250 250 250;
  --accent-fg: 9 9 11;
  --chip: 255 255 255;
  --field: 39 39 42;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-width: 0;
  overflow-x: clip;
  overflow-wrap: break-word;
  background: rgb(var(--ink));
  color: rgb(var(--fg));
}

img,
video {
  max-width: 100%;
}

.shell {
  --shell-pad: clamp(1rem, 3.5vw, 2rem);
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.hero-stage {
  position: relative;
  min-width: 0;
}

.hero-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 1rem;
  background: rgb(var(--chip) / 0.05);
  scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: #0b0b0f;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-slide img {
  flex: none;
  height: auto;
  aspect-ratio: 3 / 4;
  object-position: center 28%;
}

.hero-copy {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.85rem 1rem 1rem;
  background: #0b0b0f;
}

.hero-title {
  color: #fff;
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.65);
}

.hero-synopsis {
  display: -webkit-box;
  overflow: hidden;
  color: rgb(255 255 255 / 0.9);
  font-size: clamp(0.85rem, 1.15vw, 1rem);
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-thumb-frame {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.hero-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-thumb-title {
  display: block;
  padding: 0.35rem 0.4rem 0.45rem;
  background: #0b0b0f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.hero-rail {
  display: none;
}

.site-header {
  background: rgb(var(--ink) / 0.92);
  border-bottom: 1px solid rgb(var(--line) / 0.08);
  backdrop-filter: blur(16px);
}

.site-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 4rem;
}

.head-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  color: rgb(var(--fg));
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.head-mark {
  width: auto;
  height: 2.25rem;
  flex: none;
}

.head-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.75rem;
}

.head-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.7rem;
  border: 0;
  background: transparent;
  color: rgb(var(--fg) / 0.82);
  font-size: 0.95rem;
}

.head-link.is-on,
.head-link:hover {
  color: #e5484d;
}

.head-tools {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
}

.head-icon,
.head-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(var(--fg) / 0.92);
}

.head-icon svg,
.head-lang svg {
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
}

.head-icon.is-on,
.head-icon:hover,
.head-lang:hover {
  color: #e5484d;
}

.head-wide {
  display: none;
}

.head-lang {
  gap: 0.4rem;
  padding-inline: 0.45rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.head-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  margin-left: 0.35rem;
  padding: 0 1.05rem;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 650;
}

.head-menu {
  display: inline-flex;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.75rem), 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.5rem;
}

.poster {
  display: block;
  width: 100%;
  min-width: 0;
}

.shelf-scroller {
  --poster-gap: 0.75rem;
  --poster-w: calc((100% - 2 * var(--poster-gap)) / 2.15);
}

.shelf-nav {
  top: calc(var(--poster-w) * 2 / 3);
}

.posters-row {
  display: flex;
  max-width: 100%;
  gap: var(--poster-gap, 0.75rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.posters-row::-webkit-scrollbar {
  display: none;
}

.posters-row > li {
  display: contents;
}

.posters-row .poster {
  width: var(--poster-w, clamp(7.25rem, 42vw, 10.5rem));
  flex: none;
  scroll-snap-align: start;
}

.poster-tags {
  display: none;
}

.poster-tags span + span::before {
  content: " · ";
}

.shelf-scroller.is-raised {
  z-index: 20;
}

.poster-pop {
  position: absolute;
  z-index: 20;
  overflow: hidden;
  border: 1px solid rgb(var(--line) / 0.12);
  border-radius: 1rem;
  background: rgb(var(--panel));
  color: rgb(var(--fg));
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
}

.poster-pop-link {
  display: block;
}

.poster-pop-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: rgb(var(--chip) / 0.1);
}

.poster-pop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-pop-plays {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
  font-size: 0.75rem;
}

.poster-pop-title {
  display: -webkit-box;
  margin: 0.75rem 0.85rem 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poster-pop-link:hover .poster-pop-title {
  color: #e5484d;
}

.poster-pop-tags {
  margin: 0.3rem 0.85rem 0;
  overflow: hidden;
  color: rgb(var(--muted));
  font-size: 0.75rem;
  line-height: 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.poster-pop-synopsis {
  display: -webkit-box;
  margin: 0.5rem 0.85rem 0;
  overflow: hidden;
  color: rgb(var(--fg) / 0.75);
  font-size: 0.8125rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poster-pop-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.85rem 0.85rem 0.9rem;
}

.poster-pop-play {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: rgb(var(--fg));
  color: rgb(var(--ink));
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
}

.poster-pop-play:hover {
  background: rgb(var(--fg) / 0.86);
}

.poster-pop-play svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.poster-pop-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgb(var(--line) / 0.2);
  border-radius: 999px;
  background: transparent;
  color: rgb(var(--fg));
}

.poster-pop-icon:hover {
  background: rgb(var(--chip) / 0.08);
}

.poster-pop-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.poster-pop-icon[aria-pressed="true"] {
  color: #e5484d;
}

.poster-pop-icon[aria-pressed="true"] svg {
  fill: currentColor;
}

.poster-pop-note {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  pointer-events: none;
}

.poster-pop-note > span {
  display: block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  background: rgb(var(--fg));
  color: rgb(var(--ink));
  font-size: 0.75rem;
  white-space: nowrap;
}

.cat-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  color: rgb(var(--muted));
  font-size: 0.8125rem;
}

.cat-crumbs li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cat-crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: rgb(var(--fg) / 0.3);
}

.cat-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.cat-crumbs a:hover {
  color: rgb(var(--fg));
}

.cat-crumbs [aria-current] {
  color: rgb(var(--fg) / 0.85);
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  border-bottom: 1px solid rgb(var(--line) / 0.1);
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: rgb(var(--muted));
  font-size: 1rem;
  font-weight: 500;
}

.cat-tab:hover {
  color: rgb(var(--fg));
}

.cat-tab[aria-current] {
  border-bottom-color: #e5484d;
  color: #e5484d;
  font-weight: 650;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid rgb(var(--line) / 0.14);
  border-radius: 999px;
  background: rgb(var(--chip) / 0.06);
  color: rgb(var(--fg) / 0.85);
  font-size: 0.875rem;
}

.cat-chip:hover {
  background: rgb(var(--chip) / 0.12);
}

.cat-chip[aria-current] {
  border-color: rgb(var(--fg));
  background: rgb(var(--fg));
  color: rgb(var(--ink));
  box-shadow: inset 0 2px 5px rgb(0 0 0 / 0.3);
  font-weight: 600;
}

.cat-heading {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cat-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.cat-card {
  display: grid;
  grid-template-columns: clamp(5rem, 24vw, 7rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgb(var(--line) / 0.08);
  border-radius: 1rem;
  background: rgb(var(--panel));
}

.cat-card-media,
.cat-card-body {
  align-self: start;
  min-width: 0;
}

.cat-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.6rem;
  background: rgb(var(--chip) / 0.1);
}

.cat-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
  margin-top: 0.4rem;
  color: rgb(var(--muted));
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.cat-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.cat-stats svg {
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
}

.cat-card-body {
  padding-top: 0.25rem;
}

.cat-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cat-title a:hover {
  color: #e5484d;
}

.cat-synopsis {
  display: -webkit-box;
  margin-top: 0.4rem;
  overflow: hidden;
  color: rgb(var(--fg) / 0.7);
  font-size: 0.8125rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cat-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  background: rgb(var(--fg));
  color: rgb(var(--ink));
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
}

.cat-watch:hover {
  background: rgb(var(--fg) / 0.86);
}

.cat-watch svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.series-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.series-cover {
  width: min(50vw, 12rem);
  margin-inline: auto;
}

.series-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.series-play {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-weight: 650;
}

.series-play:hover {
  background: #d93d42;
}

.series-play svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

.series-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid rgb(var(--line) / 0.2);
  border-radius: 999px;
}

.series-ghost:hover {
  background: rgb(var(--chip) / 0.08);
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.episode-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  border: 1px solid rgb(var(--line) / 0.1);
  border-radius: 0.75rem;
  background: rgb(var(--chip) / 0.04);
  color: rgb(var(--fg));
}

.episode-row:hover {
  background: rgb(var(--chip) / 0.09);
}

.episode-row:focus-visible {
  outline: 2px solid #e5484d;
  outline-offset: 1px;
}

.episode-cover {
  position: relative;
  flex: none;
  width: 2.5rem;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.4rem;
  background: rgb(var(--chip) / 0.12);
}

.episode-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.35rem;
  border-radius: 0.5rem;
  background: rgb(var(--chip) / 0.1);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.episode-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.875rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.episode-state {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1rem;
}

.episode-state svg {
  width: 0.85rem;
  height: 0.85rem;
}

.episode-state.is-free {
  background: rgb(229 72 77 / 0.12);
  color: #e5484d;
}

.episode-state.is-locked {
  color: rgb(var(--muted));
}

.episode-row[data-locked] .episode-num {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgb(var(--line) / 0.14);
  color: rgb(var(--muted));
}

.episode-row[data-locked] .episode-title {
  color: rgb(var(--fg) / 0.7);
}

.episode-row[aria-current] {
  border-color: #e5484d;
  background: rgb(229 72 77 / 0.1);
}

.episode-row[aria-current] .episode-num {
  background: #e5484d;
  box-shadow: none;
  color: #fff;
}

.episode-row[aria-current] .episode-title {
  color: rgb(var(--fg));
  font-weight: 600;
}

body:has(.watch-layout) {
  --ink: 0 0 0;
  --panel: 24 24 27;
  --fg: 250 250 250;
  --muted: 161 161 170;
  --line: 255 255 255;
  --accent: 250 250 250;
  --accent-fg: 9 9 11;
  --chip: 255 255 255;
  --field: 39 39 42;
  background: #000;
  color: rgb(var(--fg));
  color-scheme: dark;
}

.watch-layout {
  --ink: 0 0 0;
  --panel: 24 24 27;
  --fg: 250 250 250;
  --muted: 161 161 170;
  --line: 255 255 255;
  --accent: 250 250 250;
  --accent-fg: 9 9 11;
  --chip: 255 255 255;
  --field: 39 39 42;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
  margin-inline: calc(var(--shell-pad, 1rem) * -1);
  padding: 1rem var(--shell-pad, 1rem) 2rem;
  background: #000;
  color: rgb(var(--fg));
  color-scheme: dark;
}

.watch-layout .note-error {
  color: rgb(252 165 165);
}

.watch-back {
  position: absolute;
  z-index: 10;
  top: 1.5rem;
  left: calc(var(--shell-pad, 1rem) + 0.5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  backdrop-filter: blur(8px);
}

.watch-back:hover {
  background: rgb(255 255 255 / 0.14);
}

.watch-back svg {
  width: 1.35rem;
  height: 1.35rem;
}

.player-frame {
  width: min(100%, 26.25rem);
  margin-inline: auto;
  color-scheme: dark;
}

.watch-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 2px solid rgb(255 255 255 / 0.85);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.45);
  color: #fff;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
}

.watch-play:hover {
  border-color: #e5484d;
  background: #e5484d;
}

.watch-play svg {
  width: 2rem;
  height: 2rem;
  margin-left: 0.2rem;
}

.watch-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.watch-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgb(var(--muted));
  font-size: 0.8125rem;
}

.watch-crumbs li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.watch-crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: rgb(var(--fg) / 0.3);
}

.watch-crumbs a:hover {
  color: rgb(var(--fg));
}

.watch-crumbs [aria-current] {
  color: rgb(var(--fg) / 0.85);
}

.watch-title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.watch-series {
  display: block;
  margin-top: 0.3rem;
  color: rgb(var(--muted));
  font-size: 0.95rem;
  font-weight: 500;
}

.watch-label {
  font-size: 0.95rem;
  font-weight: 650;
}

.watch-count {
  margin-left: 0.25rem;
  color: rgb(var(--muted));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.watch-synopsis {
  display: -webkit-box;
  margin-top: 0.4rem;
  overflow: hidden;
  color: rgb(var(--fg) / 0.75);
  font-size: 0.875rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.watch-synopsis.is-open {
  display: block;
  -webkit-line-clamp: unset;
}

.watch-more {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e5484d;
  font-size: 0.875rem;
  font-weight: 600;
}

.watch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.watch-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgb(var(--chip) / 0.1);
  font-size: 0.8125rem;
}

.watch-tags a:hover {
  background: rgb(var(--chip) / 0.18);
}

.watch-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  padding-block: 0.25rem;
  border-block: 1px solid rgb(var(--line) / 0.12);
}

.watch-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  min-height: 4rem;
  padding: 0.5rem 0.25rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: rgb(var(--fg) / 0.85);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.watch-stat svg {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}

.watch-stat:first-child svg,
.watch-stat[aria-pressed="true"] svg {
  color: #e5484d;
}

.watch-stat[aria-pressed="true"] svg {
  fill: currentColor;
}

button.watch-stat:hover {
  background: rgb(var(--chip) / 0.06);
  color: rgb(var(--fg));
}

.watch-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.watch-range a {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 2.75rem;
  color: rgb(var(--muted));
  font-size: 0.875rem;
}

.watch-range a:hover {
  color: rgb(var(--fg));
}

.watch-range svg {
  width: 1rem;
  height: 1rem;
}

.watch-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.watch-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  border-radius: 0.5rem;
  background: rgb(var(--chip) / 0.08);
  color: rgb(var(--fg));
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.watch-cell:hover {
  background: rgb(var(--chip) / 0.16);
}

.watch-cell:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.watch-cell[data-locked] {
  color: rgb(var(--fg) / 0.6);
}

.watch-cell svg {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 0.7rem;
  height: 0.7rem;
}

.watch-cell[aria-current] {
  background: #e5484d;
  color: #fff;
}

.store-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}

.store-grid > .store-note {
  grid-column: 1 / -1;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 7rem;
  font-size: 0.875rem;
  color: rgb(var(--muted));
}

.toast-bar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(5rem + env(safe-area-inset-bottom));
  width: min(calc(100% - 1.5rem), 40rem);
  transform: translateX(-50%);
}

dialog.modal {
  width: min(calc(100% - 2rem), 28rem);
  max-width: calc(100% - 2rem);
  max-height: min(calc(100dvh - 2rem), 42rem);
  margin: auto;
  overflow: auto;
  padding: 0;
  border: 1px solid rgb(var(--line) / 0.16);
  border-radius: 1rem;
  background: rgb(var(--panel));
  color: rgb(var(--fg));
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.45);
}

dialog.modal::backdrop {
  background: rgb(0 0 0 / 0.72);
}

.field {
  width: 100%;
  margin-top: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(var(--line) / 0.16);
  background: rgb(var(--field));
  color: rgb(var(--fg));
  padding: 0.75rem 0.85rem;
}

.field::placeholder {
  color: rgb(var(--muted));
}

.search-field {
  min-height: 2.75rem;
  margin-top: 0;
  border-radius: 9999px;
  background: rgb(var(--chip) / 0.06);
  padding-block: 0.55rem;
}

.note-warn { color: rgb(161 98 7); }
.note-error { color: rgb(185 28 28); }

html[data-resolved="dark"] .note-warn { color: rgb(253 230 138); }
html[data-resolved="dark"] .note-error { color: rgb(252 165 165); }

.on-media {
  color: #fff;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.72);
}

.subtitle-cue {
  color: #fff;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.8);
}

video {
  background: #000;
}

@media (min-width: 520px) {
  .hero-slide img {
    aspect-ratio: 4 / 5;
  }
}

@media (min-width: 640px) {
  .series-layout {
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  }

  .series-cover {
    width: 100%;
    margin-inline: 0;
  }

  .series-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .series-play {
    min-width: 12rem;
  }

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

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

@media (min-width: 768px) {
  .shelf-scroller {
    --poster-w: calc((100% - 4 * var(--poster-gap)) / 4.5);
  }

  .poster-tags {
    display: block;
    margin-top: 0.25rem;
    overflow: hidden;
    color: rgb(var(--muted));
    font-size: 0.75rem;
    line-height: 1rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 7.5rem;
    gap: 1rem;
    align-items: stretch;
  }

  .hero-slide {
    display: block;
    aspect-ratio: 16 / 9;
  }

  .hero-slide img {
    height: 100%;
    aspect-ratio: auto;
  }

  .hero-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    max-width: 40rem;
    padding: 4.75rem 1.25rem 1.15rem;
    background: linear-gradient(to top, rgb(0 0 0 / 0.96) 0%, rgb(0 0 0 / 0.94) 42%, rgb(0 0 0 / 0.55) 70%, transparent);
  }

  .hero-rail {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
  }

  .hero-thumbs {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .hero-thumb {
    position: relative;
    display: flex;
    flex: none;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    padding: 0;
    background: #0b0b0f;
  }

  .hero-thumb.is-on {
    border-color: #e5484d;
  }

  .site-footer {
    padding-bottom: 2.5rem;
  }

  .toast-bar {
    bottom: 1rem;
  }
}

@media (min-width: 800px) {
  .cat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .head-nav,
  .head-wide {
    display: inline-flex;
  }

  .head-menu {
    display: none;
  }

  .series-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 2rem;
  }

  .watch-layout {
    grid-template-columns: 2.75rem minmax(0, 1fr) minmax(18rem, 26rem);
    column-gap: 2rem;
    padding-block: 1.5rem 2.5rem;
  }

  .watch-back {
    position: static;
  }

  .player-frame {
    justify-self: center;
    width: min(100%, 26.25rem, max(16rem, calc((100vh - 8rem) * 9 / 16)));
    width: min(100%, 26.25rem, max(16rem, calc((100dvh - 8rem) * 9 / 16)));
    margin-inline: 0;
  }

  .watch-title {
    font-size: 1.6rem;
  }

  .watch-grid {
    max-height: 17.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

@media (min-width: 1100px) {
  .store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .shelf-scroller {
    --poster-w: calc((100% - 6 * var(--poster-gap)) / 6.5);
  }
}
