body:has(.demo-modal[open]) { overflow: hidden; }

.demo-modal {
  width: min(1480px, calc(100vw - 48px));
  height: min(900px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #333;
  border-radius: 20px;
  color: #fff;
  background: #111;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .6);
  overflow: hidden;
}

.demo-modal::backdrop {
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(10px);
}

.demo-modal-shell { display: flex; flex-direction: column; width: 100%; height: 100%; }
.demo-modal-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 24px;
  padding: 10px 22px;
  font: 600 15px/1.4 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
}
.demo-modal-bar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #444;
  border-radius: 999px;
  color: #fff;
  background: #252525;
  cursor: pointer;
}
.demo-modal-bar button:hover { background: #383838; }
.demo-modal-bar button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.demo-modal-bar button span { font-size: 20px; line-height: .8; }
.demo-modal iframe { display: block; flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #f2f1ed; }

@media (max-width: 767px) {
  .demo-modal { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .demo-modal-bar { min-height: 56px; padding: 8px 16px; font-size: 14px; }
}
