.demo-modal {
  width: min(1120px, calc(100vw - 48px), calc((100dvh - 176px) * 1.77778));
  height: fit-content;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #ece7db;
  background: #0a0b10;
  border: 1px solid rgba(34, 224, 200, .45);
  border-radius: 8px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .65), 0 0 40px rgba(34, 224, 200, .06);
  font-family: 'Archivo', system-ui, sans-serif;
}
.demo-modal[open] { display: flex; flex-direction: column; }
.demo-modal::backdrop {
  background: rgba(4, 5, 9, .8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.demo-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(236, 231, 219, .14);
}
.demo-modal__heading { min-width: 0; }
.demo-modal__eyebrow, .demo-modal__footer, .demo-modal__loading {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
}
.demo-modal__eyebrow { color: #22e0c8; }
.demo-modal h2 { margin: 6px 0 0; font-size: clamp(18px, 2.4vw, 24px); line-height: 1.2; }
.demo-modal__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  color: #ece7db;
  border: 1px solid rgba(236, 231, 219, .25);
  border-radius: 4px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
}
.demo-modal__close:hover { color: #22e0c8; border-color: #22e0c8; }
.demo-modal__close:focus-visible { outline: 2px solid #22e0c8; outline-offset: 3px; }
.demo-modal__stage { position: relative; flex: none; aspect-ratio: 16 / 9; background: #040309; }
.demo-modal__stage iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.demo-modal__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #22e0c8;
  background: #040309;
  pointer-events: none;
}
.demo-modal__loading[hidden] { display: none; }
.demo-modal__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 12px 20px;
  color: rgba(236, 231, 219, .5);
  border-top: 1px solid rgba(236, 231, 219, .14);
}
@media (max-width: 600px) {
  .demo-modal { width: min(calc(100vw - 24px), calc((100dvh - 140px) * 1.77778)); }
  .demo-modal__header { padding: 12px; gap: 12px; }
  .demo-modal__footer { padding: 12px; font-size: 8px; letter-spacing: .04em; }
}
@media (max-height: 500px) {
  .demo-modal { width: min(1120px, calc(100vw - 24px), calc((100dvh - 76px) * 1.77778)); }
  .demo-modal__header { padding: 6px 12px; }
  .demo-modal__eyebrow, .demo-modal__footer { display: none; }
  .demo-modal h2 { margin: 0; font-size: 18px; }
}
