* {
  box-sizing: border-box;
}
html {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #101112;
  color: #f1eee8;
  color-scheme: dark;
}
body {
  margin: 0;
  --gutter: clamp(1rem, 4vw, 5.5rem);
  --gold: #ffd193;
  --muted: #b8b7b2;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: #353638;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.68rem 1rem;
  font-weight: 600;
}
button:hover {
  background: #494949;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
video:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
button[aria-current="true"],
.primary {
  background: var(--gold);
  color: #221a12;
}
.primary:hover {
  background: #ffe1bb;
}
header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 4.1rem;
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 2vw, 2rem);
  padding: 0.55rem var(--gutter);
  background: #121315f5;
  flex-wrap: wrap;
}
button.brand {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  font:
    700 1.55rem Georgia,
    serif;
  letter-spacing: -0.055em;
  color: var(--gold);
  background: none;
  padding: 0;
}
.brand img {
  width: 1.8rem;
  height: 1.8rem;
}
nav {
  display: flex;
  gap: 0.2rem;
  overflow: auto;
  scrollbar-width: thin;
}
nav button {
  background: transparent;
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.48rem 0.75rem;
}
#profile {
  margin-left: auto;
  max-width: 12rem;
  text-overflow: ellipsis;
  overflow: hidden;
}
main {
  min-height: calc(100svh - 4.1rem);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font:
    600 clamp(2.6rem, 5.4vw, 6rem)/0.98 Georgia,
    serif;
  letter-spacing: -0.055em;
}
h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.85rem);
  letter-spacing: -0.035em;
}
p {
  line-height: 1.55;
}
.muted,
small {
  color: var(--muted);
}
.hero,
.signin {
  background-size: cover;
  background-position: center 32%;
  display: grid;
  align-content: end;
  padding: clamp(3rem, 7vw, 8rem) var(--gutter);
  gap: 1rem;
  min-height: clamp(25rem, 57svh, 48rem);
}
.hero h1,
.hero p {
  max-width: 48rem;
}
.hero p {
  max-width: 40rem;
  text-shadow: 0 1px 5px #000;
}
.signin {
  min-height: calc(100svh - 4.1rem);
  align-content: center;
  background-image:
    linear-gradient(90deg, #101112f5, #101112a0 42%, #10111222), url(cinema.jpg);
}
form,
.stack {
  display: grid;
  gap: 1rem;
}
form {
  width: min(100%, 24rem);
}
label {
  display: grid;
  gap: 0.4rem;
}
input,
select {
  color: inherit;
  background: #242629;
  border: 1px solid #5a5a58;
  border-radius: 0.45rem;
  padding: 0.65rem;
  min-width: 0;
}
.check {
  display: flex;
  align-items: center;
}
.profiles {
  padding: 12svh var(--gutter);
  text-align: center;
}
.profiles h1 {
  font-family: inherit;
  font-weight: 450;
  font-size: clamp(2rem, 4vw, 4rem);
}
.choices,
.actions,
.filters {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}
.choices {
  justify-content: center;
  gap: 1.5rem;
  margin: 2.5rem auto;
}
.choice {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  background: transparent;
}
.tile {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--tint, #966247), #26292f);
  width: clamp(5rem, 8vw, 8rem);
  aspect-ratio: 1;
  border-radius: 18%;
  font: 600 2.1rem Georgia;
}
.section {
  padding: 1.5rem var(--gutter);
}
.section > h2 {
  margin-bottom: 1rem;
}
.rail,
.grid {
  display: grid;
  gap: clamp(0.7rem, 1.1vw, 1.2rem);
}
.rail {
  grid-auto-flow: column;
  grid-auto-columns: clamp(8.4rem, 13vw, 15.5rem);
  overflow-x: auto;
  padding: 0.35rem 0.2rem 0.8rem;
  scroll-snap-type: x proximity;
}
.grid {
  grid-template-columns: repeat(auto-fill, minmax(min(10rem, 42%), 1fr));
}
.card {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  align-items: stretch;
  background: transparent;
  text-align: left;
  scroll-snap-align: start;
}
.card:hover {
  background: transparent;
  color: var(--gold);
}
.poster {
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  aspect-ratio: 2/3;
  background: linear-gradient(155deg, #514539, #222428);
  display: grid;
  place-items: center;
}
.poster b {
  padding: 0.7rem;
  text-align: center;
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card strong,
.card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}
progress {
  height: 0.28rem;
  accent-color: var(--gold);
  border: 0;
}
.filters {
  margin: 1.1rem 0;
}
.filters input {
  flex: 1;
  max-width: 23rem;
}
dialog {
  color: inherit;
  background: #1c1e20;
  padding: 0;
  border: 1px solid #454749;
  border-radius: 1rem;
  width: min(47rem, 94vw);
  max-height: 89svh;
}
dialog::backdrop {
  background: #000b;
}
.close {
  position: sticky;
  top: 0.7rem;
  z-index: 1;
  float: right;
  margin: 0.7rem 0.7rem -3.5rem 0;
  border-radius: 2rem;
  background: #161719e8;
}
.body {
  padding: clamp(1.15rem, 3vw, 2.2rem);
}
.detailhero {
  padding: 6rem 1.2rem 1.5rem;
  border-radius: 0.65rem;
  background-size: cover;
  background-position: center;
}
.detailhero h2 {
  font:
    600 clamp(2rem, 4vw, 3.6rem)/1.03 Georgia,
    serif;
}
.episodes {
  display: grid;
  gap: 0.45rem;
}
.episode {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-top: 1px solid #393a3b;
  padding: 0.65rem 0;
}
.episode .take {
  flex: 1;
  text-align: left;
  background: transparent;
  padding: 0.25rem;
  display: grid;
  gap: 0.25rem;
}
.episode progress {
  width: min(10rem, 90%);
}
.episode .mark {
  font-size: 0.8rem;
}
.results {
  display: grid;
  gap: 0.6rem;
}
.result {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #393939;
}
.result strong {
  margin-right: auto;
}
#screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
}
#screen[open] {
  display: grid;
  place-items: center;
}
#screen .close {
  position: absolute;
  left: 1rem;
  top: 1rem;
  margin: 0;
  float: none;
}
video {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
}
#playerinfo {
  position: absolute;
  bottom: 4rem;
  background: #141519d9;
  border-radius: 0.45rem;
}
#toast {
  position: fixed;
  z-index: 10;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #343638;
  padding: 0.8rem 1.3rem;
  border-radius: 0.65rem;
  max-width: 95vw;
}
.loading {
  padding: var(--gutter);
}
[hidden] {
  display: none !important;
}
@media (max-width: 48rem) {
  header {
    gap: 0.45rem;
  }
  nav:not(:empty) {
    order: 3;
    width: 100%;
  }
  .hero {
    min-height: 24rem;
  }
  .section {
    padding-block: 1rem;
  }
  .episode .mark {
    padding: 0.5rem;
  }
  .signin {
    background-position: 64% center;
  }
}
#screen .audio-picker {
  position: absolute;
  right: 1rem;
  top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #151617d9;
  border-radius: 0.5rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
}
#screen select {
  max-width: 40vw;
}
