.ytmodal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  /* 16:9 responsive */ }
  .ytmodal.is-open {
    display: block; }
  .ytmodal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85); }
  .ytmodal__panel {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    max-width: 960px;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 1em;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    /*width: min(960px, calc(100% - 32px));
    margin: 6vh auto 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);*/ }
  .ytmodal__ratio {
    position: relative;
    padding-top: 56.25%; }
  .ytmodal__ratio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0; }
  .ytmodal__close {
    max-width: 2em;
    max-height: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(12px, 1.4vw, 32px);
    padding: 1em;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    position: absolute;
    top: -2.5em;
    right: 0;
    z-index: 1; }
    .ytmodal__close:hover {
      color: #000;
      background: rgba(255, 255, 255, 0.8); }
  .ytmodal__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px; }

@media screen and (max-width: 768px) {
  .ytmodal__close {
    font-size: clamp(12px, 5vw, 32px);
    right: .5em; } }
