/* Zoya's Big Day Out — everything outside the canvas.
 *
 * This is the one game in the arcade that is not set at night. The shared
 * tokens paint the page deep indigo with two magenta/cyan pools behind it;
 * here that is overridden with a sunset, because the game is sunshine and a
 * dark frame around it would look like a mistake rather than a choice.
 *
 * The .back pill still comes from tokens.css. Only its colours are retuned so
 * it reads against warm orange instead of indigo.
 */

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  /* place-items:center rather than flex, because Phaser's FIT scale mode
     reports a canvas size that a grid centres without any margin games. */
  display: grid;
  place-items: center;
  background: #ffb066;
}

/* The tokens sheet paints two cool pools over the whole page. Replaced here
   with a warm sky so the area around the canvas on a wide screen reads as
   more of the same afternoon. */
body::before {
  background:
    radial-gradient(70vw 60vw at 50% 0%, rgba(255, 216, 150, 0.9), transparent 72%),
    radial-gradient(60vw 50vw at 15% 100%, rgba(255, 122, 122, 0.55), transparent 70%);
}

#stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

#stage canvas {
  display: block;
  /* Without this a bounce tap can also scroll or zoom the page on a phone. */
  touch-action: none;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(120, 52, 16, 0.32);
}

/* The back pill inherits its shape from tokens.css; only the colours move,
   so a warm page does not get a cold indigo lozenge stuck to the corner. */
.back {
  background: rgba(255, 252, 244, 0.86);
  border-color: rgba(190, 106, 46, 0.4);
  color: #9a4f16;
}
.back:hover { color: #5e2c06; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- end card ----------
 *
 * Deliberately tiny: a joke, two numbers, one button. Anything more would be
 * a debrief, and this game does not have one. */

.over {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 158, 92, 0.55);
  backdrop-filter: blur(10px);
  animation: zoya-fade 0.22s var(--ease-out) both;
}

.over[hidden] { display: none; }

.over-card {
  width: min(360px, 100%);
  padding: 30px 26px 26px;
  border-radius: 26px;
  background: #fffaf0;
  border: 1px solid rgba(190, 106, 46, 0.22);
  box-shadow: 0 22px 60px rgba(120, 52, 16, 0.3);
  text-align: center;
  color: #5e2c06;
  animation: zoya-pop 0.34s var(--ease-snap) both;
}

/* The caption is the whole point of the card, so it gets the size. */
.over-line {
  margin: 0 0 22px;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #7a3a0c;
}

.over-nums {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
}

.over-num {
  display: block;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  color: #e2621f;
}

/* The best score is present but quieter than the run just played. */
.over-nums div:last-child .over-num { color: #c69a6a; }

.over-lab {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b78a5c;
}

.retry {
  width: 100%;
  min-height: var(--thumb);
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9a4d, #f2701c);
  color: #fffaf0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 0 #c4520d;
  transition: transform 0.12s var(--ease-snap), box-shadow 0.12s var(--ease-snap);
}

.retry:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #c4520d;
}

@keyframes zoya-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoya-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* tokens.css already flattens animation durations under reduce; this also
   drops the card's entrance offset so nothing slides at all. */
@media (prefers-reduced-motion: reduce) {
  .over, .over-card { animation: none; }
  .retry { transition: none; }
}
