/* Фон ДО прихода основного css (вынесено из index.html 03.09.2026 ради строгой CSP). */
/* Фон ДО прихода основного css: он render-blocking, и первые кадры
   страница стояла белой. Значение то же, что `--ui-bg`. */
html,
body {
  background: #f2f2f7;
}
/* Тема ставится в <head> (boot_head.js) до первого кадра. С 10.10.2026 по
   умолчанию белая; розовая — только выбранная вручную. */
html[data-theme="light"]:not([data-palette="white"]),
html[data-theme="light"]:not([data-palette="white"]) body {
  background: #f7d7e8;
}
/* Обе тёмные — чисто чёрный фон iOS (16.10.2026; «Тёмная» была #151015). */
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #000000;
}
/* Английский интерфейс: пока i18n_dom.js не подставил перевод, размеченные
   подписи (таббар, боковое меню) не показываем — иначе мигнёт русский.
   Класс ставит boot_head.js только для английского, снимает i18n_dom.js. */
html.impito-i18n-pending [data-i18n] {
  visibility: hidden;
}

/* Keep the site shell measurable for the router, but out of view until the
   session check selects the signed-in app or its gate. */
#impito-session-loading {
  display: none;
}
html.impito-session-pending body > :not(.impito-gate):not(#impito-session-loading),
html.impito-session-pending body::before,
html.impito-session-pending body::after {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
html.impito-session-pending:not(.impito-gate-open) #impito-session-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}
