.rl-catalog {
  display: grid;
  gap: var(--rh-space-5);
}

.rl-catalog__head h1 {
  margin: 0;
  font-family: var(--rh-font-display);
  font-weight: var(--rh-weight-black);
  font-size: var(--rh-text-3xl);
  color: var(--rh-text-strong);
}

.rl-filters {
  display: grid;
  gap: var(--rh-space-3);
  padding: var(--rh-space-4);
  border: var(--rh-border-width) solid var(--rh-border);
  border-radius: var(--rh-radius-lg);
  background: var(--rh-surface-subtle);
}

.rl-filters__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--rh-space-3);
}

.rl-older-filter {
  display: flex;
  align-items: center;
  align-self: end;
  gap: var(--rh-space-2);
  padding-block: var(--rh-space-2);
  font-size: var(--rh-text-sm);
  cursor: pointer;
}

.rl-older-filter input {
  margin: 0;
  inline-size: var(--rh-space-4);
  block-size: var(--rh-space-4);
  accent-color: var(--rh-accent);
}

.rl-filters__actions {
  display: flex;
  gap: var(--rh-space-2);
}

.rl-field {
  display: grid;
  gap: var(--rh-space-1);
  align-content: start;
}

.rl-input {
  font: inherit;
  font-size: var(--rh-text-sm);
  padding: var(--rh-space-2) var(--rh-space-3);
  border: var(--rh-border-width) solid var(--rh-border-strong);
  border-radius: var(--rh-radius-md);
  background: var(--rh-surface);
  color: var(--rh-text);
  width: 100%;
  box-sizing: border-box;
}

.rl-input:focus-visible,
.rl-multi summary:focus-visible {
  outline: none;
  box-shadow: var(--rh-shadow-focus);
}

.rl-multi {
  position: relative;
}

.rl-multi summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  gap: var(--rh-space-1);
  padding: var(--rh-space-2) var(--rh-space-3);
  border: var(--rh-border-width) solid var(--rh-border-strong);
  border-radius: var(--rh-radius-md);
  background: var(--rh-surface);
}

.rl-multi summary::-webkit-details-marker { display: none; }

.rl-multi__chosen {
  font-size: var(--rh-text-sm);
  color: var(--rh-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rl-multi fieldset {
  position: absolute;
  z-index: 5;
  inset-inline: 0;
  top: calc(100% + var(--rh-space-1));
  margin: 0;
  display: grid;
  gap: var(--rh-space-2);
  max-height: 18rem;
  overflow-y: auto;
  padding: var(--rh-space-3);
  border: var(--rh-border-width) solid var(--rh-border-strong);
  border-radius: var(--rh-radius-md);
  background: var(--rh-surface);
  box-shadow: var(--rh-shadow-md);
}

.rl-multi:not([open]) fieldset {
  display: none;
}

.rl-multi label {
  display: flex;
  gap: var(--rh-space-2);
  align-items: center;
  font-size: var(--rh-text-sm);
  cursor: pointer;
}

.rl-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--rh-space-2);
  font-size: var(--rh-text-sm);
  color: var(--rh-text-muted);
}

.rl-results a { color: var(--rh-text-accent); }

.rl-results__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rh-space-2);
}

.rl-active {
  display: inline-flex;
  align-items: center;
  gap: var(--rh-space-1);
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: var(--rh-space-1) var(--rh-space-1) var(--rh-space-1) var(--rh-space-3);
  font-size: var(--rh-text-xs);
  line-height: 1;
  border: var(--rh-border-width) solid var(--rh-accent);
  border-radius: var(--rh-radius-full);
  background: var(--rh-accent-tint);
  color: var(--rh-accent);
}

.rl-results .rl-active a {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: var(--rh-radius-full);
  color: inherit;
  text-decoration: none;
}

.rl-active a:hover,
.rl-active a:focus-visible {
  outline: none;
  background: var(--rh-surface);
}

.rl-active svg {
  width: 10px;
  height: 10px;
}

.rl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: var(--rh-space-5);
  align-items: stretch;
}

.rl-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--rh-space-1);
}

.rl-pager a,
.rl-pager__here {
  min-width: 2.25rem;
  padding: var(--rh-space-2) var(--rh-space-3);
  text-align: center;
  font-size: var(--rh-text-sm);
  border: var(--rh-border-width) solid var(--rh-border);
  border-radius: var(--rh-radius-md);
  color: var(--rh-text);
  text-decoration: none;
}

.rl-pager__here {
  background: var(--rh-surface-inverse);
  color: var(--rh-text-inverse);
  border-color: var(--rh-surface-inverse);
}

.rl-player {
  position: fixed;
  inset: 0;
  z-index: 50;
  box-sizing: border-box;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  max-block-size: none;
  margin: 0;
  padding: var(--rh-space-4);
  border: 0;
  background: var(--rh-surface-overlay);
  color: var(--rh-text);
}

.rl-player[open] {
  display: grid;
  place-items: center;
}

.rl-player::backdrop {
  background: transparent;
}

html:has(.rl-player[open]) {
  overflow: hidden;
}

.rl-player__box {
  display: grid;
  inline-size: min(54rem, 100%);
  max-block-size: 100%;
  overflow: auto;
  border-radius: var(--rh-radius-xl);
  background: var(--rh-surface);
  box-shadow: var(--rh-shadow-xl);
}

.rl-player__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rh-space-4);
  padding: var(--rh-space-3) var(--rh-space-4);
  border-bottom: var(--rh-border-width) solid var(--rh-border);
}

.rl-player__title {
  margin: 0;
  font-family: var(--rh-font-display);
  font-size: var(--rh-text-md);
  font-weight: var(--rh-weight-bold);
  line-height: var(--rh-leading-snug);
  color: var(--rh-text-strong);
}

.rl-player__close {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: var(--rh-space-8);
  block-size: var(--rh-space-8);
  border-radius: var(--rh-radius-md);
  font-size: var(--rh-text-sm);
  color: var(--rh-text-muted);
}

.rl-player__close:hover,
.rl-player__close:focus-visible {
  background: var(--rh-surface-subtle);
  color: var(--rh-text-strong);
}

.rl-player__close:focus-visible {
  outline: none;
  box-shadow: var(--rh-shadow-focus);
}

.rl-player__close svg {
  inline-size: 1em;
  block-size: 1em;
}

.rl-player__video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-inline-size: 100%;
  background: var(--rh-black);
}

.rl-player__video iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

.rl-player__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--rh-space-2) var(--rh-space-4);
  padding: var(--rh-space-4);
  font-size: var(--rh-text-sm);
}

.rl-player__body p {
  margin: 0;
  max-inline-size: var(--rl-measure);
  color: var(--rh-text);
}

.rl-player__watch {
  display: inline-flex;
  align-items: center;
  gap: var(--rh-space-1);
  color: var(--rh-accent);
  text-decoration: none;
  white-space: nowrap;
}

.rl-player__watch:hover {
  text-decoration: underline;
}

.rl-player__watch:focus-visible {
  outline: none;
  box-shadow: var(--rh-shadow-focus);
}

.rl-player__watch svg {
  inline-size: 1em;
  block-size: 1em;
}

@media (max-width: 600px) {
  .rl-player { padding: 0; }
  .rl-player[open] { place-items: stretch; }
  .rl-player__box { inline-size: 100%; block-size: 100%; max-block-size: none; align-content: start; border-radius: 0; }
}
