.wx-dialog.wx-free-test-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  height: min(850px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  background: #f5f6fc;
  display: none;
  flex-direction: column;
}

.wx-dialog.wx-free-test-dialog[open] {
  display: flex;
  animation: wx-free-test-enter .22s cubic-bezier(.2,.75,.25,1) both;
}

.wx-free-test-dialog::backdrop {
  background: rgb(17 22 50 / 58%);
  backdrop-filter: blur(6px);
  animation: wx-free-test-backdrop .18s ease-out both;
}

.wx-free-test-head {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 104px;
  padding: 18px 68px 16px 28px;
  border-bottom: 1px solid #e5e7f1;
  background: #fff;
}

.wx-free-test-head small {
  display: block;
  margin-bottom: 3px;
  color: #5950e8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.wx-free-test-head h2 {
  margin: 0;
  color: #161b36;
  font-size: 21px;
  line-height: 1.45;
}

.wx-free-test-head p {
  margin: 4px 0 0;
  color: #69718b;
  font-size: 12px;
  line-height: 1.6;
}

.wx-free-test-dialog > .dialog-close {
  top: 22px;
  right: 20px;
  z-index: 1;
  border: 1px solid #e5e7f1;
  background: #f7f8fc;
  color: #69718b;
  cursor: pointer;
}

.wx-free-test-dialog > .dialog-close:hover {
  background: #eeecff;
  color: #5950e8;
}

.wx-free-test-dialog iframe {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #f5f6fc;
}

@keyframes wx-free-test-enter {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wx-free-test-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .wx-dialog.wx-free-test-dialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .wx-free-test-head {
    min-height: 106px;
    padding: 16px 54px 14px 18px;
  }

  .wx-free-test-head h2 { font-size: 18px; }
  .wx-free-test-head p { max-width: 38ch; font-size: 11px; }
  .wx-free-test-dialog > .dialog-close { top: 16px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .wx-free-test-dialog[open],
  .wx-free-test-dialog::backdrop { animation: none; }
}
