:root {
  --plf-bg: #f6f5f2;
  --plf-text: #141414;
  --plf-muted: #625f5a;
  --plf-line: rgba(20, 20, 20, 0.14);
  --plf-accent: #ffd21e;
  --plf-focus: #1f5eff;
  --plf-footer-text: rgba(113, 110, 104, 0.5);
  --plf-gutter: clamp(20px, 4vw, 40px);
  --plf-wide: 860px;
  --plf-motion: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--plf-bg);
  color: var(--plf-text);
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--plf-bg);
  color: var(--plf-text);
  font-family: "YS Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--plf-focus);
  outline-offset: 3px;
}

.plf-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--plf-text);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform calc(160ms * var(--plf-motion)) ease;
}

.plf-skip-link:focus {
  transform: translateY(0);
}

.plf-page {
  min-height: 100dvh;
  padding: 36px var(--plf-gutter) 56px;
}

.plf-shell,
.plf-inner {
  width: min(100%, var(--plf-wide));
  margin: 0 auto;
}

.plf-brand {
  display: block;
  width: max-content;
  margin: 0 0 28px;
  color: #181614;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.plf-brand span {
  color: #f4aa2c;
}

.plf-hero {
  text-align: center;
}

.plf-hero h1 {
  max-width: 720px;
  margin: 0 auto;
  font-family: "YS Display", "YS Text", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 650;
  line-height: 1.08;
}

.plf-lede {
  max-width: 680px;
  margin: 14px auto 0;
  color: #353535;
  font-size: 20px;
  line-height: 1.45;
}

.plf-sequence {
  margin-top: 28px;
}

.plf-landscape-close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--plf-line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.plf-landscape-close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.plf-episode-rail {
  display: grid;
  grid-template-columns: repeat(var(--plf-episode-count), 132px);
  margin: 0;
  gap: 14px;
  justify-content: center;
  padding: 3px;
  list-style: none;
}

.plf-episode-item {
  min-width: 0;
}

.plf-episode-button {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  gap: 7px;
  text-align: center;
}

.plf-episode-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.plf-episode-button[data-locked="true"] {
  display: flex;
  min-height: 98px;
  padding: 0 4px;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.plf-episode-poster {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #e8e5df;
}

.plf-episode-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plf-episode-button[data-active="true"] .plf-episode-poster {
  outline: 3px solid var(--plf-accent);
  outline-offset: 2px;
}

.plf-lock-icon {
  flex: 0 0 auto;
}

.plf-lock-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.plf-episode-label {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plf-episode-button[data-active="true"] .plf-episode-label {
  font-weight: 650;
}

.plf-player-section {
  margin-top: 28px;
}

.plf-player-shell {
  position: relative;
  width: 100%;
  border-radius: 12px;
}

.plf-player-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: inherit;
  background:
    var(--plf-player-poster, none) center / cover no-repeat,
    #161616;
  isolation: isolate;
}

.plf-player-mount,
.plf-kinescope-target,
.plf-player-mount > iframe,
.plf-player-mount > div {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.plf-player-mount {
  z-index: 1;
}

.plf-player-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.2);
  pointer-events: none;
}

.plf-player-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: plf-spin calc(720ms * var(--plf-motion)) linear infinite;
}

.plf-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes plf-spin {
  to {
    transform: rotate(360deg);
  }
}

.plf-player-message {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.45);
  color: #ffffff;
  font-size: 15px;
}

.plf-player-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  padding: 24px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: rgba(14, 14, 14, 0.9);
  color: #ffffff;
  text-align: center;
}

.plf-player-error p {
  margin: 0;
}

.plf-player-error button {
  min-height: 44px;
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #141414;
  cursor: pointer;
  font-size: 15px;
}

.plf-landscape-close {
  position: fixed;
  display: none;
}

.plf-cta-reveal {
  margin-top: 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity calc(260ms * var(--plf-motion)) ease-out,
    transform calc(260ms * var(--plf-motion)) ease-out;
}

.plf-cta-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.plf-cta-button {
  display: inline-flex;
  min-height: 52px;
  padding: 14px 23px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--plf-accent);
  color: #111111;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
}

.plf-footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid rgba(20, 20, 20, 0.24);
  color: var(--plf-footer-text);
  display: grid;
  justify-items: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.plf-footer p,
.plf-footer nav {
  margin: 0;
}

.plf-footer-links,
.plf-footer-requisites {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.plf-footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.plf-noscript {
  max-width: 700px;
  margin: 24px auto;
  padding: 16px;
  color: var(--plf-text);
}

@media (max-width: 760px) {
  .plf-page {
    padding: 24px var(--plf-gutter) 40px;
  }

  .plf-brand {
    font-size: 20px;
  }

  .plf-hero h1 {
    font-size: 27px;
    line-height: 1.12;
  }

  .plf-lede {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.5;
  }

  .plf-sequence {
    margin-top: 24px;
  }

  .plf-episode-rail {
    grid-template-columns: repeat(
      var(--plf-episode-count),
      minmax(0, 1fr)
    );
    gap: 8px;
  }

  .plf-episode-button[data-locked="true"] {
    min-height: 64px;
    padding: 0;
  }

  .plf-player-section {
    margin-top: 24px;
  }

  .plf-player-shell {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
  }

  .plf-cta-button {
    width: 100%;
  }

  .plf-footer {
    margin-top: 64px;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 960px) {
  body.plf-landscape-player-open {
    overflow: hidden;
  }

  .plf-player-shell.is-landscape-active {
    position: fixed;
    inset: 0;
    z-index: 1500;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    background: #000000;
  }

  .plf-player-shell.is-landscape-active .plf-player-viewport {
    width: 100%;
    height: 100dvh;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .plf-player-shell.is-landscape-active .plf-landscape-close {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    z-index: 10;
    display: inline-flex;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(20, 20, 20, 0.76);
    color: #ffffff;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --plf-motion: 0;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
