/* Splash до гидрации React: фоны как в src/styles/main.scss (--bg) */
#tm-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
  margin: 0;
  /* Офлайн: не блокируем нажатия по контенту под splash (корень уже отрисован). */
  pointer-events: none;
  transition:
    opacity 0.32s ease,
    visibility 0.32s ease;
}

html[data-theme='light'] #tm-splash {
  background: #f8fafc;
}

html[data-theme='dark'] #tm-splash {
  background: #08090d;
}

.tm-splash-img {
  width: min(42vmin, 200px);
  height: auto;
  max-height: min(42vmin, 200px);
  display: block;
  object-fit: contain;
  pointer-events: none;
}

html[data-theme='light'] #tm-splash .tm-splash-img--dark {
  display: none;
}

html[data-theme='dark'] #tm-splash .tm-splash-img--light {
  display: none;
}

#tm-splash.tm-splash--out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
