.iw-touch, .iw-rotate { position: absolute; inset: 0; pointer-events: none; }
.iw-touch { z-index: 15; font: 800 12px/1 'Rubik', system-ui, sans-serif; }
.iw-touch[hidden] { display: none; }
.iw-touch [data-touch] { pointer-events: auto; touch-action: none; }
.iw-touch__look { position: absolute; inset: 0 0 0 48%; }
.iw-touch__stick {
  position: absolute; left: max(10px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid; place-items: center; width: clamp(82px, 27dvh, 126px); aspect-ratio: 1;
  border-radius: 50%; border: 2px solid #fffe; box-sizing: border-box; background: #15121c70;
}
.iw-touch__stick i {
  pointer-events: none; width: 40%; aspect-ratio: 1; border-radius: 50%;
  background: #fff9; border: 2px solid #fff;
}
.iw-touch__actions, .iw-touch__top { position: absolute; display: grid; gap: 6px; }
.iw-touch__actions {
  bottom: max(10px, env(safe-area-inset-bottom)); right: max(10px, env(safe-area-inset-right));
  grid-template-columns: repeat(2, clamp(49px, 15dvh, 64px));
}
.iw-touch__top {
  top: max(6px, env(safe-area-inset-top)); left: max(6px, env(safe-area-inset-left)); grid-auto-flow: column;
}
.iw-touch button {
  box-sizing: border-box; border-radius: 16px; border: 1.5px solid #fffd;
  background: #15121caa; color: white; font: inherit; min-width: 44px; min-height: 44px; padding: 0;
}
.iw-touch__top button { min-height: 38px; }
.iw-touch [data-touch="fire"] {
  grid-column: 1 / -1; min-height: 52px; border-radius: 999px; background: #873700dd;
}
.iw-touch button.is-held, .iw-touch button[aria-pressed="true"] { background: #ffc04a; color: #15121c; }
.iw-rotate { display: none; }
@media (pointer: coarse) {
  html, body { overscroll-behavior: none; }
  #ui-root { inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .iw-ui, .iw-hud, .iw-hud-over { --u: min(1vw, 1.70dvh); }
  .iw-ui .iw-screen { overflow-y: auto; overscroll-behavior: contain; }
  .iw-touch__top { top: 6px; left: 6px; }
  .iw-touch__stick { bottom: 12px; left: 10px; }
  .iw-touch__actions { bottom: 10px; right: 10px; }
}
@media (pointer: coarse) and (orientation: portrait) {
  .iw-rotate {
    z-index: 80; display: grid; place-content: center; gap: 12px; text-align: center;
    pointer-events: auto; background: #15121c; color: white; font: 600 18px/1.4 system-ui, sans-serif;
  }
  .iw-rotate strong { color: #ffc04a; font-size: 26px; }
}
