/* Loaded before the game bundle so the splash can render immediately. */
#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(4vh, env(safe-area-inset-top)) 20px max(6vh, env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
  color: #4f2a18;
  background: #a3c9e6;
  font-family: 'Segoe UI', sans-serif;
  transition: opacity 280ms ease;
}
#boot-splash,
#boot-splash * {
  box-sizing: border-box;
}
#boot-splash.boot-ready {
  opacity: 0;
  pointer-events: none;
}
.boot-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.boot-logo {
  margin: 0;
  width: min(68vw, 42vh, 540px);
}
.boot-logo img {
  display: block;
  width: 100%;
  height: auto;
}
#boot-splash::before {
  position: absolute;
  z-index: -1;
  inset: 58% 0 0;
  background: linear-gradient(transparent, #211a19a6);
  content: '';
  pointer-events: none;
}
.boot-status {
  position: relative;
  width: min(540px, 90vw, 120vh);
  color: #792e1d;
}
.boot-caption {
  position: absolute;
  inset: 9% 13% auto;
  min-height: 25%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  font:
    italic 700 clamp(16px, 4vw, 24px)/1.05 Georgia,
    serif;
}
#boot-label {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
#boot-percent {
  flex-shrink: 0;
  font-size: 1.32em;
  font-variant-numeric: lining-nums tabular-nums;
}
#boot-progress {
  --progress: 0.08;
  position: relative;
  filter: drop-shadow(0 4px 6px #3d281e72);
}
#boot-progress img {
  display: block;
  width: 100%;
  height: auto;
}
.boot-puzzle-pending {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mask-image: linear-gradient(transparent 36%, #000 44%);
  pointer-events: none;
}
.boot-puzzle-pending image {
  filter: grayscale(1) sepia(0.65) contrast(0.65) brightness(0.96);
}
#boot-pending-seasons path {
  fill: white;
  opacity: clamp(0, 1 + var(--season-index, 0) - 4 * var(--progress), 1);
  transition: opacity 280ms ease;
}
#boot-pending-seasons path:nth-child(2) {
  --season-index: 1;
}
#boot-pending-seasons path:nth-child(3) {
  --season-index: 2;
}
#boot-pending-seasons path:nth-child(4) {
  --season-index: 3;
}
.boot-preview #boot-pending-seasons path {
  transition: none;
}
.boot-status:has(#boot-progress[hidden]) {
  padding: 14px;
  border-radius: 12px;
  background: #fff0d7;
}
.boot-status:has(#boot-progress[hidden]) .boot-caption {
  position: static;
  margin-bottom: 12px;
}
#boot-retry {
  min-height: 44px;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: #8d351c;
  color: #fff9eb;
  font: inherit;
  cursor: pointer;
}
#boot-retry:focus-visible {
  outline: 3px solid #8d351c;
  outline-offset: 3px;
}
@media (max-aspect-ratio: 4/5) {
  .boot-scene {
    object-position: 88% center;
  }
  .boot-logo {
    width: min(84vw, 35vh);
  }
}
@media (prefers-reduced-motion: reduce) {
  #boot-splash,
  #boot-pending-seasons path {
    transition: none;
  }
}
