/* HTML-сплэш до первого кадра Flutter (SCR-01). Цвета из токенов Modernist,
   раскладка как у экрана старта Flutter (BrandMark 56: квадрат, 10 px,
   название стилем title), чтобы на первом кадре ничего не прыгало.
   Тема: системная (prefers-color-scheme); в Mini App splash.js ставит
   data-theme по colorScheme Telegram, и он главнее системной.
   Ошибка загрузки (splash-failed) повторяет StatusScreen: заголовок h4,
   текст body, кнопка primary large (48, подпись влево, радиус 0). */
:root {
  --splash-bg: #f3f2f2;
  --splash-ink: #201e1d;
  --splash-ink-secondary: rgba(32, 30, 29, 0.7);
  --splash-accent: #ec3013;
  --splash-accent-hover: #dd2b0f;
  --splash-accent-pressed: #ae1800;
  --splash-on-accent: #f3f2f2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --splash-bg: #1a1817;
    --splash-ink: #f3f2f2;
    --splash-ink-secondary: rgba(243, 242, 242, 0.7);
    --splash-accent-hover: #ff563c;
    --splash-accent-pressed: #ff9783;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --splash-bg: #1a1817;
  --splash-ink: #f3f2f2;
  --splash-ink-secondary: rgba(243, 242, 242, 0.7);
  --splash-accent-hover: #ff563c;
  --splash-accent-pressed: #ff9783;
  color-scheme: dark;
}
html, body { margin: 0; height: 100%; background: var(--splash-bg); }
#splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: opacity 200ms ease;
}
#splash .splash-mark {
  flex: none;
  width: 56px;
  height: 56px;
  background: var(--splash-accent);
}
#splash .splash-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--splash-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#splash.splash-hidden { opacity: 0; }
#splash .splash-error {
  width: 100%;
  max-width: 400px;
  color: var(--splash-ink);
}
#splash .splash-error-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
#splash .splash-error-message {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--splash-ink-secondary);
}
#splash .splash-button {
  display: block;
  margin-top: 24px;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--splash-accent);
  color: var(--splash-on-accent);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
#splash .splash-button:hover { background: var(--splash-accent-hover); }
#splash .splash-button:active { background: var(--splash-accent-pressed); }
#splash .splash-button:focus-visible { outline: 2px solid var(--splash-accent); outline-offset: 2px; }
