.discovery {
  color: var(--text, #f7f3ea);
  overflow-wrap: break-word;
  hyphens: auto;
}
.discovery-filter {
  margin: .5rem var(--pad, 1rem) 1rem;
  border: 1px solid var(--line, #ffffff21);
  border-radius: .8rem;
  background: var(--panel, #1c1d1f);
}
.discovery-filter summary {
  padding: .8rem 1rem;
  min-height: 44px;
  cursor: pointer;
  font-weight: 650;
}
.discovery-filter summary::marker { color: var(--gold, #e7be78); }
.discovery-filter form {
  display: grid;
  gap: 1.25rem;
  padding: .25rem 1rem 1rem;
}
.discovery fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.discovery legend, .discovery-related h3 {
  padding: 0;
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -.015em;
}
.discovery-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: .65rem 1rem;
}
.discovery-filter fieldset:nth-of-type(2) .discovery-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.discovery-filter { container-type: inline-size; }
@container (max-width: 40rem) {
  .discovery-filter fieldset:first-of-type .discovery-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .discovery-filter fieldset:first-of-type label:first-child { grid-column: 1 / -1; }
}
@container (max-width: 14rem) {
  .discovery-filter fieldset:nth-of-type(-n+2) .discovery-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
.discovery label { min-width: 0; display: grid; align-content: start; gap: .25rem; }
.discovery label > span, .discovery small, .discovery-note {
  color: var(--muted, #b7b4ad);
  font-size: .875rem;
}
.discovery input, .discovery select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .5rem .65rem;
  border: 1px solid #66635d;
  border-radius: .45rem;
  background: var(--bg, #101112);
  color: inherit;
  font-size: max(16px, 1rem);
}
.discovery select { text-overflow: ellipsis; }
.discovery-note { margin: .5rem 0 0; }
.discovery-note:empty { margin: 0; }
.discovery-actions, .discovery-choices { display: flex; flex-wrap: wrap; gap: .45rem; }
@container (max-width: 19rem) {
  .discovery-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
}
.discovery-choices:not(:empty) { margin: .35rem 0; }
.discovery button {
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: .55rem .8rem;
  border-radius: .55rem;
  border: 1px solid var(--line, #ffffff21);
  background: #27282a;
  white-space: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}
.discovery button[hidden] { display: none; }
.discovery .discovery-apply { background: var(--gold, #e7be78); color: #211b13; font-weight: 650; }
.discovery :focus-visible { outline: 2px solid var(--gold, #e7be78); outline-offset: 2px; }
.discovery-related {
  margin-block: 1.25rem .5rem;
  min-width: 0;
  container-type: inline-size;
  --credit: var(--gold, #e7be78);
}
.discovery-related .discovery-directors,
.discovery-related .discovery-rail-section,
.discovery-related .discovery-filmography:not(:empty) { margin: 0 0 1rem; }
.discovery-related .discovery-rail-head,
.discovery-directors {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .625rem;
}
.discovery-related .discovery-rail-head h3 {
  margin: 0;
  font: 500 1.4rem/1.15 var(--cinema-title);
  letter-spacing: -.025em;
}
.discovery-related .discovery-directors {
  justify-content: flex-start;
  border-block: 1px solid var(--line, #ffffff21);
}
.discovery-related .discovery-directors h3 {
  flex: none;
  white-space: nowrap;
  margin: 0;
  color: var(--muted, #b7b4ad);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.2;
}
.discovery-directors > div {
  display: flex;
  align-items: center;
  gap: .875rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.discovery-related .discovery-person,
.discovery-rail-nav button,
.discovery-related .discovery-close-credits {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: .25rem .125rem;
}
.discovery-directors .discovery-person {
  display: inline-flex;
  align-items: center;
  gap: .18rem;
  flex: none;
  max-width: none;
  white-space: nowrap;
  font: 500 1.05rem/1.3 var(--cinema-title);
}
.discovery-directors .discovery-person svg { width: .95rem; height: .95rem; color: var(--credit); }
.discovery-rail-nav { display: flex; align-items: center; }
.discovery-rail-nav[hidden] { display: none; }
.discovery-rail-nav button, .discovery-related .discovery-close-credits {
  display: grid;
  place-items: center;
  width: 44px;
  color: var(--credit);
}
.discovery-rail-nav button:disabled { opacity: .28; cursor: default; }
.discovery-related .discovery-close-credits { flex: 0 0 44px; min-height: 44px; }
.discovery-rail-head > div:first-child { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.discovery-rail-nav svg, .discovery-close-credits svg { width: 1.1rem; height: 1.1rem; }
.discovery-rail {
  display: flex;
  align-items: start;
  margin: 0;
  padding: .25rem 2px .4rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 2px;
  scrollbar-width: none;
}
.discovery-rail::-webkit-scrollbar { display: none; }
.discovery-rail > li { flex: none; min-width: 0; scroll-snap-align: start; }
.discovery-cast { gap: .75rem; align-items: start; }
.discovery-cast > li { width: clamp(5.75rem, 30cqi, 7.5rem); }
.discovery-cast .discovery-person {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  width: 100%;
  gap: .4rem;
  padding: 0;
  border-radius: .6rem;
  text-align: start;
  font-size: .94rem;
  line-height: 1.25;
  font-weight: 600;
}
.discovery-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: .6rem;
  background: linear-gradient(145deg, #39312b, #202022);
  box-shadow: inset 0 0 0 1px #ffffff18;
}
.discovery-initials {
  font: 500 1.65rem/1 var(--cinema-title);
  color: #d2c3ae;
}
.discovery-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
}
.discovery-portrait img.is-loaded { opacity: 1; }
.discovery-cast-name { overflow-wrap: break-word; hyphens: auto; }
.discovery-cast .discovery-person[aria-expanded="true"] .discovery-cast-name { color: var(--credit); }
.discovery-cast-retry:not(:empty) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem .65rem;
  margin-bottom: .75rem;
}
.discovery-cast-retry .discovery-note { margin: 0; }
.discovery-cast-retry button {
  background: transparent;
  border: 0;
  color: var(--credit);
  padding-inline: .125rem;
}
.discovery-filmography h3 {
  scroll-margin-top: .75rem;
}
.discovery-posters { gap: .75rem; padding-top: .4rem; }
.discovery-posters > li { width: clamp(6.5rem, 37cqi, 9rem); }
.discovery-poster {
  display: grid;
  align-content: start;
  gap: .35rem;
  color: inherit;
  text-decoration: none;
  border-radius: .55rem;
}
.discovery-art {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: .55rem;
  background: linear-gradient(145deg, #383026, #201f1f 56%, #302a25);
  box-shadow: inset 0 0 0 1px #ffffff14;
}
.discovery-art > span {
  padding-inline: .55rem;
  color: #d2c5b2;
  text-align: center;
  text-wrap: balance;
  font: 500 1rem/1.2 var(--cinema-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.discovery-art > span[hidden] { display: none; }
.discovery-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.discovery-poster-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.25;
}
.discovery-poster-facts {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.discovery-poster-facts span { white-space: nowrap; }
.discovery-poster-facts span[aria-label] { color: var(--credit); }
.discovery-provenance { border-top: 1px solid var(--line, #ffffff21); color: var(--muted, #b7b4ad); }
.discovery-provenance summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  font-size: .875rem;
  cursor: pointer;
  list-style: none;
}
.discovery-provenance summary::-webkit-details-marker { display: none; }
.discovery-provenance summary svg { width: 1rem; height: 1rem; }
.discovery-provenance[open] summary svg { transform: rotate(90deg); }
.discovery-provenance p { margin: .25rem 0 .5rem; font-size: .875rem; }
.discovery-related :is(.discovery-rail, .discovery-directors) :focus-visible {
  outline-offset: -2px;
}
@media (hover: hover) and (pointer: fine) {
  .discovery-related .discovery-person:hover, .discovery-poster:hover .discovery-poster-title { color: var(--credit); }
}
.discovery-movies { list-style: none; margin: 0; padding: 0; }
.discovery-movies button {
  width: 100%;
  padding: .6rem 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  text-align: start;
  border: 0;
  border-bottom: 1px solid var(--line, #ffffff21);
  border-radius: 0;
  background: transparent;
}
.discovery-movies small { font-variant-numeric: tabular-nums; white-space: nowrap; }
.discovery-applied {display:flex;flex-wrap:wrap;gap:4px;margin:0 var(--pad) .75rem}
.discovery-applied:empty {display:none}
.discovery-applied button {padding:.35rem .55rem;font-size:.85rem}
.discovery-role {margin:.15rem 0;color:var(--muted);font-size:.88rem}
.discovery-thumb {width:32px;aspect-ratio:2/3;overflow:hidden;background:var(--panel);border-radius:4px}
.discovery-thumb img {width:100%;height:100%;object-fit:cover}
.discovery-movies button {display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:2px .65rem}
.discovery-movies button>span {grid-column:2;min-width:0;overflow-wrap:break-word;hyphens:auto}
.discovery-movies em {font-style:normal;color:var(--muted);font-size:.85rem}
.discovery-movies time {font-variant-numeric:tabular-nums}
.discovery-movies button>*:nth-child(n+3) {grid-row:2}
.discovery-movies em {grid-column:2}
.discovery-movies time {grid-column:3;grid-row:1!important}
.discovery-movies small {grid-column:3}
.discovery-cast li[hidden] {display:none}
.discovery-rail-section input[type=search] {margin:.5rem 0}
.category-retry {display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:1rem var(--pad)}
.category-layout>* {min-width:0}
.category-criteria {margin-inline:var(--pad)}
.catalog-options {--pad:0px}
.catalog-options>[data-house] {margin-block:.25rem .8rem}
@media(min-width:1000px){
  .category-layout {display:grid;grid-template-columns:clamp(250px,23%,340px) minmax(0,1fr);gap:1.5rem;padding-inline:var(--pad);align-items:start}
  .category-layout:not(:has(.catalog-options[open])) {grid-template-columns:minmax(0,1fr);gap:0}
  .category-criteria {margin:0}
  .category-criteria:has(.catalog-options[open]) {position:sticky;top:0;max-height:72dvh;overflow:auto;scrollbar-width:thin;padding-inline-end:4px}
  .category-criteria .chips {flex-wrap:wrap;gap:.3rem;padding:0;max-height:calc(176px + .9rem);overflow-y:auto;margin-bottom:.65rem;scrollbar-width:thin}
  .category-layout #browseGrid {--pad:0px}
}
@media(min-width:760px){
  .discovery-filmography>.discovery-rail-head {position:sticky;top:0;z-index:1;background:#111214;padding:.35rem 3rem .35rem 0}
  .discovery-filmography .discovery-movies button {grid-template-columns:38px minmax(0,1fr) minmax(6rem,16%) 4ch 5ch;gap:.75rem}
  .discovery-filmography .discovery-movies button>* {grid-column:auto;grid-row:1}
  .discovery-thumb {width:38px}
}
@media (hover: hover) and (pointer: fine) {
  .discovery-movies button:hover > span, .discovery summary:hover { color: var(--gold, #e7be78); }
}
@media (prefers-reduced-motion: no-preference) {
  .discovery button { transition: transform 120ms var(--ease-out); }
  .discovery button:active:not(:focus-visible) { transform: scale(.97); }
  .discovery button:focus-visible:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .discovery button, .discovery button:active { transition: none; transform: none; }
}
