.action-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  max-width: 32rem;
  margin: auto;
}
.action-pad .action-key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.6rem;
  border: 2px solid #45365d;
  background: #f3edf9;
  color: #312442;
  box-shadow: 0 3px #443650;
  touch-action: manipulation;
}
.action-pad #jump { min-width: 0; }
.action-key kbd {
  display: inline-grid;
  place-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: .32rem;
  background: #fff9;
  border: 1px solid #8c809b;
  font: 800 .8rem/1 system-ui,sans-serif;
}
.action-pad .action-key:active { translate: 0 2px; box-shadow: 0 1px #443650; }
.action-pad .action-key.ready, .action-pad #jump.ready {
  border-color: #714717;
  color: #35260f;
  background: #ffda71;
  box-shadow: 0 3px #8b5b24, inset 0 0 0 2px #ffeeaa;
}
#action-cue { min-height: 1.6em; color: #433255; }
#obstacle, #star-shot {
  position: absolute;
  pointer-events: none;
  transform: translateX(-50%);
}
#obstacle { bottom: 15%; z-index: 1; }
#obstacle svg { display: none; overflow: visible; width: 100%; height: 100%; }
#obstacle[data-kind="jump"] { width: clamp(2.1rem, 6%, 4rem); }
#obstacle[data-kind="slide"] { height: clamp(3.85rem, 32%, 7rem); aspect-ratio: 100/64; }
#obstacle[data-kind="shoot"] {
  height: clamp(2rem, 18%, 4rem);
  bottom: 30%;
  aspect-ratio: 44/54;
  filter: drop-shadow(0 3px 2px #123c4855);
}
#obstacle[data-kind="jump"] .thorns-art, #obstacle[data-kind="slide"] .branch-art,
#obstacle[data-kind="shoot"] .crystal-art { display: block; }
#obstacle[data-kind="shoot"][data-result="clear"] .crystal-art { animation: crack-crystal .22s ease-out both; }
@keyframes crack-crystal {
  to { transform: scale(1.35) rotate(9deg); opacity: 0; }
}
#star-shot {
  z-index: 3;
  bottom: 34%;
  font: 900 clamp(1.2rem, 4vw, 2.2rem)/1 system-ui,sans-serif;
  color: #fff2a6;
  text-shadow: 0 0 2px #533819, -3px 0 #e99231;
}
#star-shot::before {
  content: "";
  position: absolute;
  right: 65%;
  top: 45%;
  width: 1.15em;
  height: .16em;
  background: linear-gradient(90deg, transparent, #ffe289);
}
.paused #obstacle svg { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  #obstacle[data-kind="shoot"][data-result="clear"] .crystal-art { animation: none; opacity: 0; }
}
