dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.pytha-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid #deded8;
  border-radius: 14px;
  background: #fff;
  color: #242824;
  box-shadow: 0 24px 80px #17201a33;
  font: 14px/1.6 Inter, "PingFang SC", system-ui, sans-serif;
}
.pytha-dialog::backdrop { background: #18211d66; }
.pytha-dialog h2 { margin: 0 0 12px; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.pytha-dialog p { margin: 0 0 20px; white-space: pre-wrap; overflow-wrap: anywhere; color: #626962; }
.pytha-dialog label { display: grid; gap: 8px; margin: 0 0 20px; overflow-wrap: anywhere; }
.pytha-dialog input { box-sizing: border-box; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #d3d8d2; border-radius: 8px; font: inherit; }
.pytha-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pytha-dialog button { width: auto; min-height: 40px; margin: 0; padding: 8px 18px; border: 1px solid #dcded8; border-radius: 8px; background: #fff; color: #242824; font: inherit; cursor: pointer; }
.pytha-dialog button.pytha-dialog-submit { background: #303936; border-color: #303936; color: #fff; }
.pytha-dialog :focus-visible { outline: 2px solid #5b7766; outline-offset: 3px; }
iframe.pytha-modal-frame { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100dvh !important; z-index: 200; background: transparent !important; }
html.pytha-modal-frame-content, .pytha-modal-frame-content body { background: transparent !important; }
.pytha-modal-frame-content body > :not(dialog):not(script):not(style):not(link) { visibility: hidden; }
.pytha-embedded-modal-open { overflow: hidden; }
@media (max-width: 560px) { dialog.pytha-dialog { padding: 20px; } }
