@layer components {
  /* Видео: постер + кнопка (.vid). YouTube-iframe создаётся только по нажатию
     (Stimulus video-poster), до этого с youtube.com ничего не грузится. */
  .video-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--r-card);
    background: repeating-linear-gradient(135deg, #1B3F4A 0 12px, #1F4652 12px 24px) var(--video-bg);
    color: #fff;
    text-decoration: none;
  }
  .video-poster:hover { color: #fff; }
  .prose .video-poster { margin: 2em 0; }
  .prose action-text-attachment .video-poster { margin: 0; }
  .video-poster__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
  }
  /* Треугольник «play» — CSS, без svg: svg вырезал бы санитайзер Action Text */
  .video-poster__play::before {
    content: "";
    position: absolute;
    left: 31px;
    top: 25px;
    width: 26px;
    height: 30px;
    background: var(--accent-ink);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
  }
  .video-poster:hover .video-poster__play { transform: scale(1.06); }
  .video-poster__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 22px;
    background: rgb(10 30 36 / 0.72);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.4;
  }
  .video-poster__note { display: block; font-weight: 400; font-size: 14px; opacity: 0.85; }
  .video-poster iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

  @media (max-width: 820px) {
    .video-poster__play { width: 56px; height: 56px; margin: -40px 0 0 -28px; }
    .video-poster__play::before { left: 22px; top: 17px; width: 18px; height: 22px; }
    .video-poster__caption { padding: 10px 14px; font-size: 15px; line-height: 1.3; }
    .video-poster__note { font-size: 13px; }
  }
}
