:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --soft: #f6f8fc;
  --blue: #1d4ed8;
  --red: #e11d2e;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--soft);
  font-family: Arial, Helvetica, sans-serif;
}

iframe {
  width: 100%;
  height: 100vh;
  border: 0;
  display: block;
  opacity: 0;
  transform: scale(0.992);
  transition: opacity 360ms ease, transform 360ms ease;
}

iframe.ready {
  opacity: 1;
  transform: scale(1);
}

.fallback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(29, 78, 216, 0.10), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f6f8fc 58%, #eef3fb 100%);
  z-index: 1;
  opacity: 1;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.fallback::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: conic-gradient(from 160deg, rgba(225, 29, 46, 0.16), rgba(29, 78, 216, 0.16), rgba(225, 29, 46, 0.16));
  filter: blur(36px);
  opacity: 0.55;
  animation: halo 4.8s linear infinite;
}

.fallback.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: min(420px, calc(100vw - 48px));
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: rise 520ms ease both;
}

.loading-mark {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.12);
}

.loading-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  border: 4px solid rgba(29, 78, 216, 0.14);
  border-top-color: var(--blue);
  border-right-color: var(--red);
  animation: spin 900ms linear infinite;
}

.loading-mark span {
  position: absolute;
  inset: 28px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--red), var(--blue));
  animation: breathe 1.5s ease-in-out infinite;
}

.loading-message {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.78); opacity: 0.75; }
  50% { transform: scale(1); opacity: 1; }
}

@keyframes halo {
  to { transform: rotate(360deg); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .loading-shell {
    gap: 20px;
  }

}
