/* Physical CSS-pixel controls: stay usable even when the game HUD scales down. */
/* Allow menu scrolling, but never hand double taps or pinches to page zoom. */
html { touch-action: pan-x pan-y; }
.iw-main__platform { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; max-width: calc(100% - 48px); }
.iw-main__platform-note { color: #ffd9b0; font: 600 12px/1.5 system-ui, sans-serif; letter-spacing: 0; text-shadow: 0 1px 3px #000; }
.iw-main__promo { position: absolute; right: calc(var(--u) * 3.2); top: 50%; width: auto; min-height: 38px; padding: 8px 16px; font-size: 14px; }
.iw-main__promo .iw-btn__icon { width: 20px; height: 20px; }
@media (max-width: 600px) {
  .iw-mobile .iw-main__promo { top: 68px; right: 20px; bottom: auto; min-height: 34px; padding: 6px 12px; font-size: 12px; }
}
.iw-touch[hidden] { display: none !important; }
.iw-touch { position: fixed; inset: 0; z-index: 16; pointer-events: none; font: 700 13px/1.2 system-ui, sans-serif; color: white; user-select: none; -webkit-user-select: none; }
.iw-touch * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.iw-touch__look { position: absolute; inset: 0; pointer-events: auto; touch-action: none; }
.iw-touch button, .iw-touch__stick { pointer-events: auto; touch-action: none; border: 2px solid #fff8; color: white; background: #17132ba8; box-shadow: 0 2px 8px #0005; }
.iw-touch button { min-width: 48px; min-height: 46px; border-radius: 18px; font: inherit; padding: 8px; }
.iw-touch button.is-held, .iw-touch button[aria-pressed="true"] { background: #e97912dc; border-color: white; }
.iw-touch__stick { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(28px, env(safe-area-inset-bottom)); width: clamp(108px, 18vmin, 142px); height: clamp(108px, 18vmin, 142px); border-radius: 50%; display: grid; place-items: center; }
.iw-touch__stick i { width: 44%; height: 44%; border-radius: 50%; background: #fff8; border: 2px solid white; pointer-events: none; }
.iw-touch__stick span { position: absolute; bottom: 5px; font-size: 11px; pointer-events: none; }
.iw-touch__actions { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 64px 64px; gap: 9px; align-items: center; }
.iw-touch__actions .iw-touch__fire { grid-column: 1; grid-row: 1 / 3; height: 82px; border-radius: 50%; background: #b65110bb; }
.iw-touch__tools { position: absolute; right: max(12px, env(safe-area-inset-right)); top: calc(100px + env(safe-area-inset-top)); display: flex; gap: 8px; }
.iw-touch__tools button { font-size: 12px; min-height: 44px; }
.iw-touch__hint { position: absolute; bottom: max(4px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); text-align: center; width: min(400px, 60%); font-size: 10px; text-shadow: 0 1px 3px black; opacity: .85; }
.iw-mobile #app canvas { touch-action: none; }
/* The map owns touch targeting; gameplay controls must not cover its pins. */
.iw-mobile.iw-dio-on .iw-touch__look,
.iw-mobile.iw-dio-on .iw-touch__stick,
.iw-mobile.iw-dio-on .iw-touch__actions,
.iw-mobile.iw-dio-on .iw-touch__hint { display: none; }
.iw-mobile .iw-dio.is-on .iw-pin:not(.iw-pin--self) .iw-pin__badge { pointer-events: auto; touch-action: manipulation; min-width: 44px; min-height: 44px; scale: 1; }
.iw-mobile .iw-dio .iw-pin__badge > * { pointer-events: none; }
.iw-mobile .iw-dio .iw-pin__key { display: none; }
.iw-mobile .iw-prompts { display: none; }
.iw-mobile .iw-ui { --u: clamp(7px, min(1vw, 1.7778vh), 13px); }
.iw-mobile .iw-ui__layer { overflow: auto; overscroll-behavior: contain; }
.iw-mobile .iw-screen { min-height: 470px; overflow: visible; }
.iw-mobile .iw-btn, .iw-mobile .iw-backbtn, .iw-mobile .iw-seg__opt { min-height: 42px; }
.iw-mobile input { font-size: 16px; }
.iw-mobile .iw-minibtn { min-height: 44px; }
.iw-mobile .iw-minibtn.is-go.is-ready { animation: none; }
.iw-mobile .iw-btn--ready, .iw-mobile .iw-btn--lobstart { animation: none !important; }
.iw-mobile .iw-main__menu .iw-btn { min-height: 42px; font-size: 16px; }
.iw-mobile .iw-main__menu { gap: 10px; }
.iw-mobile .iw-main { min-height: 560px; }
.iw-mobile .iw-main__menu { top: 118px; transform: none; }
.iw-mobile .iw-main__menu .iw-btn--xl, .iw-mobile .iw-main__menu .iw-btn--online { min-height: 64px; }
.iw-mobile .iw-main__menu .iw-btn { transform: none; }
.iw-mobile .iw-main__menu .iw-btn__sub { white-space: normal; line-height: 1.3; font-size: 11px; }
.iw-mobile .iw-cursor { display: none; }
.iw-mobile .iw-map:not(.is-expanded) { transform: translate(12px, 70px) scale(.65) !important; transform-origin: top left; }
.iw-touch-code, .iw-mobile-roster { display: none; }
.iw-mobile .iw-touch-code { display: block; box-sizing: border-box; width: 100%; min-height: 48px; margin-top: 14px; padding: 8px 14px; border: 2px solid #aaa0ca; border-radius: 12px; background: #151021; color: white; font: 700 22px/1.4 system-ui; letter-spacing: .25em; user-select: text; -webkit-user-select: text; }
.iw-mobile .iw-hubcard--join .iw-code { display: none; }
.iw-mobile .iw-pause { min-height: 350px; }
.iw-mobile .iw-pause__col { top: 24px; transform: none; }
.iw-mobile .iw-hud__top { top: max(6px, env(safe-area-inset-top)); }
.iw-mobile .iw-sp { top: max(8px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); }
.iw-mobile .iw-main__desc { display: none; }
@media (max-width: 600px) {
  .iw-mobile .iw-screen { padding-bottom: 24px; }
  .iw-mobile .iw-main__logo { top: 18px; left: 24px; }
  .iw-mobile .iw-main__menu { left: 24px; right: 24px; top: 118px; width: auto; transform: none; }
  .iw-mobile .iw-main__side { display: none; }
  .iw-mobile .iw-modesel__row { position: relative; inset: auto; translate: none; margin: 28px 24px; flex-direction: column; gap: 28px; }
  .iw-mobile .iw-modesel__row .iw-mode { width: 100%; height: 320px; flex-shrink: 0; }
  .iw-mobile .iw-results .iw-res__body { position: relative; inset: auto; margin: 300px 20px 24px; }
  .iw-mobile .iw-res__teams { grid-template-columns: 1fr; }
  .iw-mobile .iw-res__foot { flex-wrap: wrap; gap: 16px; }
  .iw-mobile .iw-hub__metag { display: none; }
  .iw-mobile .iw-hub__chips { position: relative; right: auto; bottom: auto; width: auto; margin: 24px 20px; flex-wrap: wrap; }
  .iw-mobile .iw-hub__me { position: relative; }
  .iw-mobile .iw-head { position: relative; left: auto; top: auto; margin: 22px 20px; }
  .iw-mobile .iw-head__title { font-size: 28px; }
  .iw-mobile .iw-head__sub { font-size: 12px; }
  .iw-mobile .iw-head__titles { min-width: 0; }
  .iw-mobile .iw-head__sub { overflow-wrap: anywhere; }
  .iw-mobile .iw-prev, .iw-mobile .iw-locker__body, .iw-mobile .iw-ltag,
  .iw-mobile .iw-ss__left, .iw-mobile .iw-ss__hero, .iw-mobile .iw-ss__foot {
    position: relative; inset: auto; width: auto; margin: 24px 20px; max-width: none;
  }
  .iw-mobile .iw-ss__list { max-height: none; }
  .iw-mobile .iw-ss__left { bottom: auto; }
  .iw-mobile .iw-ss__left > .iw-ss__list { flex: none; }
  .iw-mobile .iw-ticket { min-height: 44px; }
  .iw-mobile .iw-ss__hero { height: 270px; }
  .iw-mobile .iw-ss__caption { left: 16px; right: 16px; bottom: 16px; }
  .iw-mobile .iw-ss__layout { display: none; }
  .iw-mobile .iw-ss__foot { flex-wrap: wrap; gap: 16px; padding-bottom: 24px; }
  .iw-mobile .iw-settings__foot { flex-wrap: wrap; }
  .iw-mobile .iw-tab { min-height: 44px; font-size: 12px; }
  .iw-mobile .iw-tabs__hint { display: none; }
  .iw-mobile .iw-loadout__practice.iw-btn { position: relative; inset: auto; width: auto; height: 54px; margin: 24px 20px; }
  .iw-mobile .iw-setup__body, .iw-mobile .iw-settings__panel, .iw-mobile .iw-loadout__body, .iw-mobile .iw-hub__body, .iw-mobile .iw-howto__body {
    position: relative; left: auto; top: auto; right: auto; width: auto; margin: 24px 20px; max-width: none;
  }
  .iw-mobile .iw-setup__maps { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .iw-mobile .iw-setup__foot { flex-wrap: wrap; }
  .iw-mobile .iw-loadout__look, .iw-mobile .iw-pause__ref { display: none; }
  .iw-mobile .iw-pause__col { left: 24px; right: 24px; width: auto; }
  .iw-mobile .iw-pmatch { position: relative; top: auto; left: auto; right: auto; transform: none; margin: 330px 20px 24px; width: auto; }
  .iw-mobile .iw-lob__top, .iw-mobile .iw-lob__status, .iw-mobile .iw-lob__side, .iw-mobile .iw-lob__bar { position: relative; inset: auto; width: auto; margin: 26px 20px; }
  .iw-mobile .iw-lob__status { align-items: flex-start; }
  .iw-mobile .iw-lob__bar { flex-wrap: wrap; gap: 18px; padding-bottom: 20px; }
  .iw-mobile .iw-lob__grow { display: none; }
  .iw-mobile .iw-lob__plates { display: none; }
  .iw-mobile .iw-mobile-roster { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 22px 20px; }
  .iw-mobile-roster > div { padding: 10px; border-radius: 10px; background: #171127ed; min-width: 0; }
  .iw-mobile-roster b, .iw-mobile-roster span { display: block; overflow-wrap: anywhere; font-size: 12px; }
  .iw-mobile-roster span { color: #ffbd7c; margin-top: 5px; }
  .iw-mobile .iw-btn--lobstart, .iw-mobile .iw-btn--ready { min-height: 56px; }
  .iw-mobile .iw-howto__body { grid-template-columns: 1fr; }
  .iw-mobile .iw-touch__hint { bottom: 190px; width: 90%; }
}
@media (max-height: 360px) {
  .iw-touch__tools { top: max(56px, env(safe-area-inset-top)); }
  .iw-touch__actions { bottom: max(12px, env(safe-area-inset-bottom)); }
}
