.relay-stage > .relay-plane {
  padding: 0;
  border: 0;
  border-radius: .3rem;
  background: transparent;
  line-height: 0;
  pointer-events: auto;
}
.relay-plane img { width: 100%; height: auto; }
.relay-plane::after { content: ''; position: absolute; inset: -10px; }
.relay-plane:enabled:hover img, .relay-plane:focus-visible img { filter: drop-shadow(1px 2px 0 #257CA6); }
body:has(.plane-game[open]) .relay-plane { visibility: hidden; }
.plane-peek { display: none; }
@media (pointer: coarse), (hover: none) {
  .plane-peek:not([hidden]) {
    display: block;
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: 0;
    z-index: 6;
    width: 58px;
    height: calc(48px + env(safe-area-inset-bottom));
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
    touch-action: manipulation;
  }
  .plane-peek img {
    position: absolute;
    top: 13px;
    left: 3px;
    width: 60px;
    max-width: none;
    height: auto;
    transform: rotate(-52deg);
    filter: drop-shadow(2px 2px 0 #15344855);
  }
  body:has(dialog[open]) .plane-peek { visibility: hidden; }
}
.plane-game[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
  isolation: isolate;
  overscroll-behavior: contain;
}
.plane-game::backdrop { background: transparent; }
.plane-aim, .plane-stage, .plane-round { position: absolute; inset: 0; width: 100%; height: 100%; }
.plane-aim { z-index: 1; padding: 0; border: 0; border-radius: 0; background: none; outline: 0; touch-action: manipulation; cursor: default; }
.plane-aim:focus-visible { outline: 0; }
.plane-game[data-input="mouse"][data-phase="aim"] .plane-aim { cursor: url('assets/cursore-aereo.png') 38 9, crosshair; }
.plane-aim:focus-visible ~ .plane-toolbar .plane-tip { outline: 2px solid #087FAA; outline-offset: 3px; }
.plane-stage, .plane-in-hand { pointer-events: none; user-select: none; }
.plane-stage { z-index: 2; overflow: hidden; }
.plane-toolbar {
  position: absolute;
  z-index: 4;
  top: max(1rem, env(safe-area-inset-top));
  left: max(.8rem, env(safe-area-inset-left));
  right: max(.8rem, env(safe-area-inset-right));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: .55rem;
  padding-inline: 5.5rem;
  pointer-events: none;
}
.plane-tip, .plane-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  border-radius: 2rem;
  background: var(--paper);
  box-shadow: 2px 3px 0 var(--ink);
  padding: .65rem 1rem;
  font: 600 .9rem/1.3 var(--body);
}
.plane-tip { text-align: center; background: #C6EEA5; }
.plane-exit { position: absolute; right: 0; pointer-events: auto; gap: .25rem; min-height: 44px; }
.plane-exit .icon { width: 1rem; height: 1rem; }
.plane-game:not([data-phase="aim"]) .plane-tip { opacity: 0; }
.plane-in-hand { display: none; }
.plane-game[data-input="touch"][data-phase="aim"] .plane-in-hand {
  display: block;
  position: absolute;
  z-index: 3;
  bottom: max(-34px, calc(env(safe-area-inset-bottom) - 35px));
  left: 50%;
  height: auto;
  width: 110px;
  translate: -50% 0;
  transform: rotate(-56deg);
  filter: drop-shadow(3px 3px 0 #15344855);
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-still]) .plane-game[data-input="touch"][data-phase="aim"] .plane-in-hand { animation: ready-plane .32s ease-out both; }
  @keyframes ready-plane { from { transform: translateY(90%) rotate(-56deg); } to { transform: translateY(0) rotate(-56deg); } }
}
.plane-projectile, .plane-impact, .plane-actor { position: absolute; left: 0; top: 0; }
.plane-projectile { width: clamp(58px, 10vmin, 96px); height: auto; translate: -50% -50%; }
.plane-impact { width: 0; height: 0; }
.plane-crumple, .plane-burst { position: absolute; left: 0; top: 0; height: auto; max-width: none; translate: -50% -50%; }
.plane-crumple { width: clamp(50px, 8vmin, 78px); }
.plane-burst { width: clamp(98px, 16vmin, 164px); }
.plane-actor { width: clamp(100px, 22vmin, 166px); aspect-ratio: 720 / 652; }
.plane-body, .plane-runner, .plane-picker { width: 100%; height: 100%; }
.plane-body { position: relative; transform-origin: 50% 94%; }
.plane-picker, .plane-runner { position: absolute; inset: 0; object-fit: contain; z-index: 1; }
.plane-actor.from-left .plane-runner, .plane-actor.from-right .plane-picker { transform: scaleX(-1); }
.plane-body .plane-crumple { z-index: 0; }
@media (max-width: 420px) {
  .plane-toolbar { justify-content: space-between; padding-inline: 0; }
  .plane-exit { position: static; }
  .plane-tip, .plane-exit { font-size: .81rem; padding: .6rem .78rem; min-height: 44px; }
}
