.modal {
  width: min(920px, calc(100% - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: #171717;
}
.modal::backdrop { background: #000c; }
html:has(.modal[open]) { overflow: hidden; }

.modal .close {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  border: 1px solid #bbb;
  background: #fff;
  color: #171717;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}

.modal-scroll {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.dialog {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
}
.dialog:has(.modal-images[hidden]) { grid-template-columns: minmax(0, 1fr); }

.modal-images {
  position: relative;
  min-height: 300px;
  background: #111;
}
.modal-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .8s;
}
.modal-images img.active { opacity: 1; }

.modal-copy { padding: 56px 34px 32px; overflow-wrap: anywhere; }
.modal-copy h2 { font: 700 clamp(28px, 4vw, 44px)/1.1 Georgia, serif; margin: 8px 0 18px; }
.modal-copy p { line-height: 1.65; color: #4d4a46; margin: 0 0 1em; }
#modal-social .btn { margin-top: 4px; }

@media (max-width: 650px) {
  .dialog { grid-template-columns: minmax(0, 1fr); }
  .modal-images { min-height: 0; height: min(220px, 32vh); }
  .modal-copy { padding: 24px 20px; }
  .dialog:has(.modal-images[hidden]) .modal-copy { padding-top: 56px; }
}
