/* ==========================================================================
   Chip Run
   ========================================================================== */

.stage {
  background: #0d1424;
  cursor: pointer;
}

.stage.hit {
  animation: stage-hit 0.45s ease;
}

@keyframes stage-hit {
  0%,
  100% {
    box-shadow: var(--shadow-lg);
  }
  30% {
    box-shadow:
      0 0 0 4px var(--lose),
      var(--shadow-lg);
  }
}

/* A big explicit jump button, because a runner on a phone should never make
   you guess where to tap. Hidden on precise pointers, where space is plenty. */
/* -------------------------------------------------------------- legend --- */

.legend {
  max-width: 640px;
  margin: 26px auto 0;
  padding: 18px 20px;
}

.legend h3 {
  font-size: 1rem;
  color: var(--frimax-amber);
  margin-bottom: 12px;
}

.legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.legend li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.legend b {
  color: var(--text);
}

.legend em {
  color: var(--frimax-amber);
  font-style: normal;
  font-weight: 800;
}

.mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 5px;
}

.mark-crate {
  background: linear-gradient(
    180deg,
    var(--frimax-green),
    var(--frimax-green-deep)
  );
  border: 2px solid var(--frimax-amber);
}

.mark-hazard {
  background: #6b6b6b;
  border: 2px solid var(--lose);
  border-radius: 50%;
}

.mark-chip {
  background: #f5b301;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-radius: 0;
}

/* The taller view on an upright phone (see the top of the script). Set here
   as well as in the script so the playfield's box is already the right shape
   when the page first paints, instead of jumping as the script loads. The
   condition is the same one the script tests. */
@media (max-width: 699px) and (orientation: portrait) {
  .cab #stage {
    --ar: 520 / 440 !important;
  }
}
