.avp {
  --avp-accent: #e32636;
  --avp-gap: 20px;
  --avp-card-width: 280px;
  --avp-radius: 16px;
  --avp-player-bg: #121820;
  --avp-player-color: #fff;
  --avp-floating-width: 384px;
  --avp-floating-mobile-width: 240px;
  color: #18202a;
  min-width: 0;
  padding: 20px 0;
  font-family: inherit;
}
.avp *,
.avp-player * {
  box-sizing: border-box;
}
.avp [hidden],
.avp-player[hidden],
.avp-player [hidden] {
  display: none !important;
}
.avp__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.avp__header h2 {
  font-family: inherit;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
  color: inherit;
}
.avp__header > div {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.avp__header button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dce0e5;
  border-radius: 50%;
  background: #fff;
  color: #18202a;
  font-size: 22px;
  cursor: pointer;
}
.avp__header button:hover {
  color: #fff;
  background: var(--avp-accent);
}
.avp__header button svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.avp__header button i {
  font-size: inherit;
}
.avp__header button:disabled {
  opacity: 0.3;
  cursor: default;
}
.avp--side-navigation .avp__header > div {
  position: fixed;
  z-index: 99991;
  top: var(--avp-navigation-y, 50vh);
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  transform: translateY(-50%);
  justify-content: space-between;
  pointer-events: none;
}
.avp--side-navigation .avp__header button {
  pointer-events: auto;
}
.avp__track {
  display: flex;
  gap: var(--avp-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--avp-accent) transparent;
}
.avp__item {
  flex: 0 0 min(var(--avp-card-width), 85vw);
  scroll-snap-align: start;
  min-width: 0;
}
.avp__card {
  display: block;
  height: 100%;
  border-radius: var(--avp-radius);
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  background: #f4f5f7;
  transition:
    background 0.18s,
    box-shadow 0.18s;
}
.avp__card:hover {
  background: #e9ecf0;
}
.avp__card[aria-current="true"] {
  outline: 3px solid var(--avp-accent);
  outline-offset: -3px;
}
.avp__cover {
  display: block;
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #18202a;
}
.avp__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.avp__card:hover img {
  transform: scale(1.035);
}
.avp__play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: var(--avp-accent);
  font-size: 15px;
}
.avp__title {
  display: block;
  padding: 14px 16px 6px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  color: inherit;
}
.avp__play svg { display: block; width: 18px; height: 18px; flex: none; }
.avp__date { display: block; padding: 0 16px 16px; color: #647080; font-size: 12px; line-height: 1.4; }
.avp__channel {
  display: block;
  padding: 0 16px 16px;
  font-size: 12px;
  line-height: 1.4;
  color: #647080;
}
.avp__stage {
  width: 100%;
  max-width: calc((100svh - 200px) * 16 / 9);
  height: auto;
  aspect-ratio: 16/9;
  min-height: 200px;
  margin: 0 auto 110px;
  scroll-margin-top: 80px;
}
.avp__metadata { display: flex; flex-direction: column; padding: 14px 16px 16px; }
.avp__metadata > .avp__title,
.avp__metadata > .avp__channel,
.avp__metadata > .avp__date { padding: 0; }
.avp__metadata > :not(:last-child) { margin-bottom: 6px; }
.avp button:focus-visible,
.avp a:focus-visible,
.avp-player button:focus-visible,
.avp-player a:focus-visible {
  outline: 3px solid #287df0;
  outline-offset: 3px;
}
.avp-player {
  position: fixed;
  z-index: 99990;
  background: var(--avp-player-bg, #121820);
  color: var(--avp-player-color, #fff);
  box-shadow: 0 12px 48px #0005;
  border-radius: 12px;
  overflow: hidden;
  font:
    14px/1.4 system-ui,
    sans-serif;
}
.avp-player__screen {
  aspect-ratio: 16/9;
  min-height: 200px;
  background: #000;
}
.avp-player__screen iframe,
.avp-player__mount {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: block;
  border: 0;
  aspect-ratio: 16/9;
}
.avp-player__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
}
.avp-player__name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avp-player button {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font:
    22px/1 system-ui,
    sans-serif;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  border-radius: 6px;
}
.avp-player button:hover {
  background: #ffffff26;
}
.avp-player__status {
  margin: 0;
  padding: 4px 12px;
  font-size: 12px;
  color: inherit;
}
.avp-player__fallback {
  display: block;
  padding: 4px 12px 10px;
  font-size: 11px;
  color: inherit;
  text-decoration: underline;
}
.avp-player.is-floating {
  width: min(var(--avp-floating-width, 384px), calc(100vw - 24px));
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  top: auto;
  left: auto;
}
.avp-player.is-floating[data-position="left"] {
  left: 12px;
  right: auto;
}
@media (max-width: 767px) {
  .avp {
    --avp-card-width: 240px;
    --avp-gap: 12px;
  }
  .avp__header h2 {
    font-size: 23px;
  }
  .avp__stage {
    min-height: 200px;
  }
  .avp-player.is-floating,
  .avp-player.is-floating[data-position="left"] {
    width: min(var(--avp-floating-mobile-width, 240px), calc(100vw - 24px));
    right: max(12px, env(safe-area-inset-right));
    left: auto;
  }
  .avp-player.is-floating .avp-player__name {
    display: none;
  }
  .avp-player.is-floating .avp-player__bar {
    justify-content: flex-end;
    padding: 0 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .avp__card,
  .avp__cover img {
    transition: none;
  }
  .avp__track {
    scroll-behavior: auto;
  }
}
