#game.christmas-game {
  overflow: hidden;
  isolation: isolate;
  background: #080a0b;
}

.christmas-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.christmas-game[aria-busy="true"] .christmas-canvas { opacity: 0; }
.christmas-game[aria-busy="false"] .christmas-canvas {
  animation: christmas-reveal 1050ms ease-out both;
}

@keyframes christmas-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.christmas-game:focus-visible {
  outline: 2px solid var(--accent, #6be8ff);
  outline-offset: -4px;
}

.christmas-loader {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 154px;
  height: 12px;
  padding: 2px;
  border: 1px solid white;
  box-sizing: border-box;
  pointer-events: none;
}

.christmas-loader span {
  display: block;
  width: 0;
  height: 100%;
  background: white;
  transition: width .12s linear;
}

.christmas-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  color: #fff;
  text-align: center;
  font: 700 1.15rem/1.4 Roboto, system-ui, sans-serif;
}

.christmas-result-error {
  position: absolute;
  inset-inline: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 3;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  padding: .65rem 1rem;
  background: #080a0b;
  color: white;
  text-align: center;
  border-radius: .35rem;
}

.christmas-result-error button { margin: .35rem; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .christmas-game[aria-busy="false"] .christmas-canvas { animation: none; }
  .christmas-loader span { transition: none; }
}
