#game #scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background-repeat: no-repeat;
  background-color: #1a120e;
  z-index: 0;
  pointer-events: none;
}
#game #scene.bad { visibility: hidden; }
#game #arena {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}
#game .hud, #game #announcement { z-index: 3; }
#game .controls { z-index: 4; }
#game #progress {
  position: static;
  display: block;
}

/* Keep the interactive cabinet face opaque over any controls in the artwork. */
#game .controls {
  height: calc(min(30vw, 19vh, 132px) + 48px + env(safe-area-inset-bottom));
  background: linear-gradient(165deg,#29252a,#16161d 70%);
  border-top: 2px solid #bd7848;
  box-shadow: 0 -3px 10px #15101866;
}
#game .hud { background: linear-gradient(#15141df5 65%,transparent); padding-bottom: 8px; }
#game .health { border-width: 1px; border-color: #e6ddd8aa; }
#game .health > div { transition: width .12s ease-out; }
#game .controls::after {
  content: '靠近对手\a 按住连击'; white-space: pre; text-align: center;
  position: absolute; bottom: calc(48px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  font-size: 12px; line-height: 1.7; color: #ecddd4; pointer-events: none;
}
@media (pointer:fine) { #game .controls::after { content: '方向键移动\a J 键攻击'; } }
#game #stick { background: radial-gradient(circle at 36% 28%,#ffd298,#ff8a3d 54%,#ac4c20); box-shadow: 0 3px 5px #0008; }
#game #attack { background: linear-gradient(#ffb878,#ff8a3d 75%); border-color:#f7d0ab; }
#game #progress { font-variant-numeric: tabular-nums; border: 1px solid #eeac7255; }
@media (max-height:640px) { #game .controls { height:calc(138px + env(safe-area-inset-bottom)); } }
