/* =============================================================
   GAME: Sky Hop
   ============================================================= */
.board-skyhop { display: flex; flex-direction: column; align-items: center; gap: 10px; outline: none; max-width: 100%; }
.sh-stage { position: relative; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sh-canvas {
  display: block; width: 320px; height: 480px; border-radius: 14px; background: #070a2e;
  box-shadow: 0 0 0 2px #5ec8ff, 0 0 26px rgba(94, 200, 255, .35);
}
.board-skyhop:focus-visible .sh-canvas { box-shadow: 0 0 0 3px #fff, 0 0 26px rgba(94, 200, 255, .55); }
.sh-msg {
  position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); width: max-content; max-width: 84%;
  padding: 10px 16px; border-radius: 12px; background: rgba(7, 10, 46, .84); color: #e3f6ff; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 1px rgba(94, 200, 255, .55); pointer-events: none;
}
.sh-msg[hidden] { display: none; }
.sh-pop {
  position: absolute; left: 0; right: 0; top: 24%; text-align: center; pointer-events: none; opacity: 0;
  font: 800 1.25rem var(--font-head, system-ui); text-transform: uppercase; color: #fff; text-shadow: 0 0 14px #5ec8ff, 0 0 30px #5ec8ff;
}
.sh-pop[data-medal="bronze"] { text-shadow: 0 0 14px #ff9a4d, 0 0 30px #ff9a4d; }
.sh-pop[data-medal="silver"] { text-shadow: 0 0 14px #cfe3ff, 0 0 30px #9fb8ff; }
.sh-pop[data-medal="gold"] { text-shadow: 0 0 14px #ffd23f, 0 0 30px #ffb800; }
.sh-pop[data-medal="platinum"] { text-shadow: 0 0 14px #9ff5ff, 0 0 30px #ff7ad9; }
.sh-pop.show { animation: shPop 1.4s ease-out forwards; }
@keyframes shPop { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: 1; transform: scale(1.08); } 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .sh-pop.show { animation: shFade 1.4s linear forwards; } }
@keyframes shFade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.sh-num { color: #9fe6ff; font-variant-numeric: tabular-nums; }
.sh-medal { font-weight: 700; }
.sh-medal-bronze { color: #ffb27a; }
.sh-medal-silver { color: #dfe9ff; }
.sh-medal-gold { color: #ffd23f; }
.sh-medal-platinum { color: #9ff5ff; }

/* on-screen buttons: phones and tablets only */
.sh-pad { display: none; align-items: center; gap: 10px; width: min(100%, 360px); touch-action: none; }
.sh-key {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 58px; border: 0; border-radius: 16px; cursor: pointer;
  color: #9fe6ff; background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(94, 200, 255, .5), 0 4px 0 rgba(0, 0, 0, .35);
  font: 800 1rem var(--font-head, system-ui); text-transform: uppercase; letter-spacing: .04em;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.sh-key svg { width: 24px; height: 24px; fill: currentColor; }
.sh-key-pause { width: 58px; flex: none; color: var(--ink); border-radius: 50%; }
.sh-key-pause svg { width: 20px; height: 20px; }
.sh-key-flap { flex: 1; }
.sh-key:active { background: #10305a; transform: translateY(2px); box-shadow: inset 0 0 0 1px #5ec8ff, 0 2px 0 rgba(0, 0, 0, .35); }
@media (pointer: coarse) { .sh-pad { display: flex; } .board-skyhop { gap: 8px; } }

/* crash: a short shake of the frame (off when motion is reduced) */
.sh-crash .sh-canvas { box-shadow: 0 0 0 2px #ff5d76, 0 0 30px rgba(255, 93, 118, .55); transition: box-shadow .3s; }
.sh-crash { animation: shShake .4s cubic-bezier(.36, .07, .19, .97); }
@keyframes shShake { 15%, 55% { translate: -5px 0; } 35%, 75% { translate: 5px 0; } 90% { translate: -2px 0; } }
@media (prefers-reduced-motion: reduce) { .sh-crash { animation: none; } }
