:root { --overlay: rgba(0,0,0,.56); --radius: 16px; }
  body.modal-open { overflow: hidden; }

  /* Modal shell */
  .modal {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--overlay); z-index: 9999;
    visibility: hidden; opacity: 0;
    transition: opacity .3s ease;
  }
  .modal.show { visibility: visible; opacity: 1; }

  .modal__dialog {
    position: relative;
    width: min(96vw, 960px); height: min(75vh, 720px);
    background: #fff; border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.25); overflow: hidden;
    transform: translateY(-30px) scale(.95);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
  }
  .modal.show .modal__dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .modal__close {
    position: absolute; top: 10px; right: 10px;
    appearance:none; border:0; background:rgba(0,0,0,.6); color:#fff;
    border-radius: 50%; padding:.4rem; cursor:pointer;
    line-height:0;
  }
  .modal__close svg { width: 22px; height: 22px; pointer-events: none; }

  .modal__body { width:100%; height:100%; }
  .modal__iframe { width:100%; height:100%; border:0; display:block; background:#fff; }