:root {
  --bg: #000;
  --raise: #111;
  --raise2: #1c1c1c;
  --ink: #fff;
  --soft: rgb(255 255 255 / .85);
  --mute: rgb(255 255 255 / .6);
  --gut: 28px;
  --hero: max(460px, min(86vh, 54vw));
  color-scheme: dark;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .2s;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scrollbar-color: #333 var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (scripting: enabled) {
  main img:not(.hero img, .logo) {
    transition: opacity .4s;
  }

  main img:not(.hero img, .logo, .in) {
    opacity: 0;
  }
}

.i {
  flex: none;
}

main {
  min-height: 70vh;
  padding: 0 var(--gut);
}

/* header */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 72px;
  padding: 0 var(--gut);
}

.top::after {
  content: '';
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  background: linear-gradient(rgb(0 0 0 / .8), rgb(0 0 0 / .55) 60%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}

.top.solid::after,
body:not(.over) .top::after {
  opacity: 1;
}

.over main {
  margin-top: -72px;
}

.left,
.right {
  display: flex;
  gap: 6px;
}

.right {
  justify-content: flex-end;
}

.menu {
  position: relative;
}

.ib {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--raise2);
}

.ib:hover,
.ib[aria-expanded="true"] {
  background: #262626;
}

.drop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  border-radius: 8px;
  background: #1b1b1b;
  clip-path: inset(0 0 100% 0 round 8px);
  transition: clip-path .3s cubic-bezier(.32, .72, 0, 1);
}

.drop.open {
  clip-path: inset(0 round 8px);
}

.drop a,
.drop button {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  background: none;
  font-weight: 600;
  text-align: left;
}

.drop a:hover,
.drop button:hover,
.drop a[aria-current] {
  background: #262626;
}

.mark img {
  width: auto;
  height: 46px;
}


.find {
  position: relative;
}

.find input {
  width: 320px;
  height: 42px;
  padding: 0 16px 0 44px;
  border: 0;
  border-radius: 4px;
  background: var(--raise2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center / 18px;
}

.find input:focus {
  outline: 0;
  background-color: #262626;
}

.found {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 420px;
  padding: 6px;
  border-radius: 8px;
  background: #1b1b1b;
}

.found a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px;
  border-radius: 6px;
}

.found a:hover,
.found a[data-on] {
  background: #262626;
}

.thumb {
  position: relative;
  flex: none;
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--raise2);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb .logo {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: auto;
  max-width: 70%;
  height: auto;
  max-height: 40%;
  object-fit: contain;
}

.txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.found b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.found small {
  color: var(--mute);
  font-size: 13px;
}

.found .all {
  justify-content: center;
  height: 42px;
  color: var(--soft);
  font-weight: 600;
}

.found p {
  padding: 12px;
  color: var(--mute);
}

/* hero */

.hero {
  position: relative;
  height: var(--hero);
  margin: 0 calc(var(--gut) * -1);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg), rgb(0 0 0 / .9) 10%, rgb(0 0 0 / .5) 26%, transparent 55%),
    linear-gradient(180deg, rgb(0 0 0 / .5), transparent 30%),
    linear-gradient(90deg, rgb(0 0 0 / .55), transparent 65%);
  pointer-events: none;
}

.slides {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.slides.drag {
  cursor: grabbing;
  scroll-snap-type: none;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.slide > img,
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.copy {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 7%;
  max-width: 640px;
  transform: translateY(-42%);
}

.copy h1,
.copy h2 {
  font-size: clamp(36px, 4vw, 60px);
}

.copy .logo {
  max-width: 440px;
  max-height: 150px;
  object-fit: contain;
  object-position: left bottom;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px;
  border-radius: 4px;
  background: #000;
  color: #ccc;
  font-size: 13px;
  font-weight: 700;
}

.chips .i {
  fill: currentColor;
  stroke: none;
}

.blurb {
  max-width: 58ch;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgb(0 0 0 / .9);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crew {
  margin-top: 10px;
  color: var(--soft);
  text-shadow: 0 1px 3px rgb(0 0 0 / .9);
}

.acts {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

/* buttons */

.play,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  font-weight: 700;
}

.play {
  min-width: 220px;
  background: linear-gradient(#fff, #bdbdbd);
  color: #111;
  font-size: 17px;
  box-shadow: 0 8px 24px -10px rgb(0 0 0 / .8);
}

.play:hover {
  background: linear-gradient(#fff, #d6d6d6);
}

.play:disabled {
  opacity: .6;
}

.play .i {
  fill: currentColor;
}

.ghost {
  background: var(--raise2);
}

.ghost:hover {
  background: #262626;
}

.round {
  width: 48px;
  padding: 0;
}

.round span {
  display: none;
}

.save .i + .i,
.save[aria-pressed="true"] .i:first-child {
  display: none;
}

.save[aria-pressed="true"] .i + .i {
  display: block;
}

/* rows and cards */

.row {
  margin-bottom: 40px;
}

.head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.head h2 {
  font-size: 28px;
  font-weight: 400;
}

.head > a {
  margin-left: auto;
  color: var(--mute);
}

.head > a:hover {
  color: var(--ink);
}

.seg {
  display: flex;
  gap: 8px;
}

.seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--raise2);
  color: #ccc;
  font-size: 14px;
  font-weight: 600;
}

.seg [aria-selected="true"] {
  background: var(--ink);
  color: #111;
}

.wall,
.grid {
  display: grid;
  gap: 24px 12px;
}

.wall {
  grid-template-columns: repeat(10, 1fr);
}

.wall:not(:has(> :nth-child(20))) > :nth-child(n+11) {
  display: none;
}

.grid {
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
}

.card {
  min-width: 0;
}

.art {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--raise);
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.card:hover .art img {
  transform: scale(1.04);
}

.word {
  position: absolute;
  inset: auto 12px 12px;
  font-size: 18px;
  font-weight: 700;
}

.bar {
  position: absolute;
  inset: auto 10px 10px;
  height: 3px;
  border-radius: 2px;
  background: rgb(255 255 255 / .3);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.name {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  color: var(--mute);
  font-size: 12.5px;
}

.sub > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.sub i {
  width: 3px;
  height: 3px;
  margin: 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.r {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: inherit;
}

.r::before {
  content: '';
  width: 12px;
  height: 12px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.type {
  padding: 0 6px;
  border-radius: 3px;
  background: var(--raise2);
  color: var(--soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 19px;
}

/* browse, search, list, history */

.browse {
  padding-top: 32px;
}

.title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.title h1 {
  font-size: 44px;
}

.sorts,
.genres,
.seasons {
  display: flex;
  gap: 8px;
}

.genres {
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.sorts a,
.genres a,
.seasons a {
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--raise2);
  color: var(--soft);
  font-weight: 600;
}

.sorts a:hover,
.genres a:hover,
.seasons a:hover {
  background: #262626;
}

.sorts [aria-current],
.genres [aria-current],
.seasons [aria-current] {
  background: var(--ink);
  color: #111;
}

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin-top: 48px;
  color: var(--mute);
}

.pager a:last-child {
  justify-self: end;
}

.empty {
  padding: 40px 0;
  color: var(--mute);
}

/* details */

.season {
  margin-bottom: 40px;
}

.seasons {
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.eps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.still {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--raise);
}

.still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seen .still {
  opacity: .5;
}

.ep {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.ep small,
.ep span {
  color: var(--mute);
  font-size: 13px;
}

.ep span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cast {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.face {
  display: flex;
  flex: 0 0 120px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--raise);
}

.pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.face b {
  margin-top: 8px;
  font-size: 14px;
}

.face small {
  color: var(--mute);
  font-size: 13px;
}

/* settings */

.sets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 640px;
}

.sets h2 {
  margin: 24px 0 4px;
  color: var(--mute);
  font-size: 15px;
}

.row-set,
.acct {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--raise);
}

.row-set {
  cursor: pointer;
}

.row-set input {
  position: absolute;
  opacity: 0;
}

.switch {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  background: #333;
  transition: background .2s;
}

.switch::after {
  content: '';
  position: absolute;
  inset: 3px auto auto 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}

input:checked + .switch {
  background: var(--ink);
}

input:checked + .switch::after {
  background: var(--bg);
  transform: translateX(18px);
}

input:focus-visible + .switch {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.row-set select {
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--raise2);
}

.acct {
  padding: 16px 18px;
}

/* sign in */

.auth {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(420px, 100%);
  margin: 8vh auto 0;
  padding: 32px;
  border-radius: 10px;
  background: var(--raise);
}

.auth h1 {
  font-size: 30px;
}

.auth label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--soft);
  font-weight: 600;
}

.auth input {
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--raise2);
  font: 700 20px ui-monospace, Consolas, monospace;
  letter-spacing: .08em;
  text-align: center;
}

.auth input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 0;
}

.err {
  color: #ff6b6b;
}

.auth .play,
.auth .ghost {
  width: 100%;
  min-width: 0;
}

.number {
  padding: 18px 0;
  border-radius: 6px;
  background: var(--raise2);
  font: 700 26px ui-monospace, Consolas, monospace;
  letter-spacing: .08em;
  text-align: center;
}

.note {
  color: var(--mute);
}

/* footer */

.foot {
  margin-top: 64px;
  padding: 40px var(--gut) 56px;
}

.cols {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(0, 1fr)) auto;
  gap: 32px;
}

.foot .mark {
  align-self: start;
}

.foot nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot h3 {
  font-size: 15px;
}

.foot nav a {
  color: var(--mute);
}

.foot nav a:hover {
  color: var(--ink);
}

.up {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--raise2);
}

/* shortcuts */

.keys {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: var(--gut);
  background: rgb(0 0 0 / .6);
}

.box {
  width: min(360px, 100%);
  padding: 20px;
  border-radius: 8px;
  background: var(--raise);
}

.box h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.box dl {
  margin: 0 0 16px;
}

.box dl div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.box dt {
  color: var(--mute);
}

.box dd {
  display: flex;
  gap: 4px;
  margin: 0;
}

kbd {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--raise2);
  font: 700 13px/1.5 Arial, Helvetica, sans-serif;
  text-align: center;
}

.lay {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lay span {
  margin-right: auto;
  color: var(--mute);
}

.lay button {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--raise2);
  color: var(--mute);
  font-weight: 700;
}

.lay [aria-pressed="true"] {
  background: var(--ink);
  color: #111;
}

/* smaller screens */

@media (max-width: 1600px) {
  .wall {
    grid-template-columns: repeat(8, 1fr);
  }

  .wall > :nth-child(n+17),
  .wall:not(:has(> :nth-child(16))) > :nth-child(n+9) {
    display: none;
  }
}

@media (max-width: 1280px) {
  .wall {
    grid-template-columns: repeat(6, 1fr);
  }

  .wall > :nth-child(n+13) {
    display: none;
  }
}

@media (max-width: 900px) {
  .cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  :root {
    --gut: 16px;
    --hero: max(440px, 72vh);
  }

  .top {
    height: 60px;
  }

  .over main {
    margin-top: -60px;
  }

  .mark img {
    height: 36px;
  }

  .find input {
    width: 44px;
    padding: 0;
    color: transparent;
    background-position: center;
  }

  .find input::placeholder {
    color: transparent;
  }

  .find:focus-within {
    position: absolute;
    inset: 9px var(--gut) auto;
    z-index: 2;
  }

  .find:focus-within input {
    width: 100%;
    padding: 0 16px 0 44px;
    color: var(--ink);
    background-position: 14px center;
  }

  .found {
    position: fixed;
    top: 64px;
    left: var(--gut);
    right: var(--gut);
    width: auto;
  }

  .copy {
    top: auto;
    left: var(--gut);
    right: var(--gut);
    bottom: 40px;
    transform: none;
  }

  .copy .logo {
    max-width: 78%;
    max-height: 110px;
  }

  .acts .play {
    min-width: 0;
    flex: 1;
  }

  .wall,
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 10px;
  }

  .sub .type {
    display: none;
  }

  .title h1 {
    font-size: 32px;
  }

  .genres {
    flex-wrap: nowrap;
    margin: 0 calc(var(--gut) * -1) 24px;
    padding: 0 var(--gut);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .genres a {
    flex: none;
  }
}
