/* The loading scene uses the existing approved splash artwork.
   It changes only the HTML overlay; Unity owns the next interactive screen. */
#loading {
  z-index: 2;
  align-content: end;
  gap: 12px;
  padding: 28px 0 max(32px, env(safe-area-inset-bottom));
  background: #132719;
  container-type: size;
  --loading-art: url("loading-scene-ru.webp");
  isolation: isolate;
}
html:lang(en) #loading {
  --loading-art: url("loading-scene-en.webp");
}
#loading::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto auto 50%;
  width: min(100cqw, calc((100cqh - 74px) * 780 / 1420));
  height: auto;
  aspect-ratio: 780 / 1420;
  transform: translateX(-50%);
  pointer-events: none;
  /* Keep every pet in the approved art. Its baked Start button is hidden by
     the crop below the pets while the real loading status stays in the footer. */
  background-image: linear-gradient(180deg, transparent 94%, #132719 100%), var(--loading-art);
  background-position: center top;
  background-size: 100% 100%, 100% auto;
  background-repeat: no-repeat;
}
#loading .brand {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#loading .track {
  order: 2;
  width: min(280px, 84%);
  height: 9px;
  border: 1px solid rgba(255, 221, 139, .66);
  background: rgba(7, 20, 12, .82);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
#loading #progress {
  background: linear-gradient(90deg, #c28c2e, #ffcf65 70%, #ffe6a4);
  transition: transform .18s linear;
}
#loading #loading-copy {
  order: 1;
  color: #fff1cb;
  opacity: 1;
  font-size: clamp(13px, 3.6cqw, 17px);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 3px #07170c;
}
#loading #loading-copy::before {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 9px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='%23ffcf65'%3E%3Cellipse cx='8' cy='15' rx='4' ry='6' transform='rotate(-28 8 15)'/%3E%3Cellipse cx='16' cy='9' rx='4' ry='6' transform='rotate(-9 16 9)'/%3E%3Cellipse cx='26' cy='10' rx='4' ry='6' transform='rotate(12 26 10)'/%3E%3Cellipse cx='33' cy='18' rx='4' ry='6' transform='rotate(30 33 18)'/%3E%3Cpath d='M10 29c0-6 6-14 11-14s11 9 11 14c0 8-8 4-11 4s-11 4-11-4Z'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) {
  #loading #progress { transition: none; }
}
@media (max-height: 660px) {
  #loading { gap: 9px; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  #loading #loading-copy::before { width: 24px; height: 24px; margin-bottom: 5px; }
}
