body {
  margin: 0;
}

html:has(#loading-bg),
body:has(#loading-bg) {
  overflow: hidden !important;
}

#loading-bg {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--initial-loader-bg, #6D757E);
  block-size: 100%;
  inline-size: 100%;
}

.loading-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 74px;
  user-select: none;
}

.animated-logo-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* Неоновый ореол луча */
.ecg-pulse-beam-glow {
  stroke-dasharray: 240 1000;
  animation: ecg-beam-travel 1.55s cubic-bezier(0.3, 0, 0.2, 1) infinite;
  will-change: stroke-dashoffset, opacity;
  opacity: 0.95;
}

/* Яркое световое ядро луча */
.ecg-pulse-beam-core {
  stroke-dasharray: 200 1000;
  animation: ecg-beam-travel 1.55s cubic-bezier(0.3, 0, 0.2, 1) infinite;
  will-change: stroke-dashoffset, opacity;
}

/* Движение луча по щели кардиограммы слева направо */
@keyframes ecg-beam-travel {
  0% {
    stroke-dashoffset: 240;
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  74% {
    stroke-dashoffset: -1000;
    opacity: 1;
  }
  84%, 100% {
    stroke-dashoffset: -1000;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animated-logo-svg {
    animation: none;
    transform: none;
  }
  .ecg-pulse-beam-glow,
  .ecg-pulse-beam-core {
    animation: none;
    opacity: 0;
  }
}
