/*
  The web build's loading screen (client/README.md, "Loading screen in the web build"): the
  app's own backdrop (lib/theme/luxe_widgets.dart AppBackdrop: the brand's background, a felt
  glow from the bottom, a faint gold light from the top left), its icon, a spinner and one
  line, from the page's first paint until Flutter's first frame (splash.js). System fonts only:
  nothing to download before the game.
*/
html,
body {
  margin: 0;
  height: 100%;
  background: #0c0e11;
}

.splash,
.splash-noscript {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 16px;
  overflow: auto;
  color: #e8e6e1;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  text-align: center;
  background:
    radial-gradient(circle 110vmin at -10% -10%, rgba(184, 148, 90, 0.08), rgba(184, 148, 90, 0)),
    radial-gradient(ellipse at 50% 112%, #0d281d 0%, #0c1314 55%, #0c0e11 100%) #0c0e11;
}

.splash-noscript {
  z-index: 2147483001;
}

.splash-icon {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

.splash-spinner {
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border: 2px solid rgba(184, 148, 90, 0.22);
  border-top-color: #e2c68d;
  border-radius: 50%;
  animation: splash-spin 0.9s linear infinite;
}

.splash-text,
.splash-note {
  margin: 0;
  max-width: 28em;
  overflow-wrap: anywhere;
}

.splash-text {
  letter-spacing: 0.02em;
}

.splash-note {
  color: #9aa0a6;
}

.splash-button {
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid #b8945a;
  border-radius: 22px;
  background: transparent;
  color: #e2c68d;
  font: inherit;
  cursor: pointer;
}

.splash-button:hover {
  background: rgba(184, 148, 90, 0.12);
}

.splash-button:focus-visible {
  outline: 2px solid #e2c68d;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* Failed: the spinner stops, the message stays. */
.splash-failed .splash-spinner {
  display: none;
}

/* Flutter has drawn: fade out without catching a tap, then splash.js removes it. */
.splash-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

@keyframes splash-spin {
  to {
    transform: rotate(360deg);
  }
}

/* A phone held sideways: smaller, closer. */
@media (max-height: 420px) {
  .splash {
    gap: 12px;
  }

  .splash-icon {
    width: 64px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-spinner {
    animation: none;
    border-color: rgba(184, 148, 90, 0.5);
  }

  .splash-done {
    transition: none;
  }
}
