/* These inner groups travel with the host's one touch-control node. */
.expedition-touch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.expedition-touch[hidden],
.expedition-touch > [hidden] { display: none !important; }
.expedition-touch > .touch-movement,
.expedition-touch > .touch-actions {
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: stretch;
  pointer-events: none;
}
.expedition-touch > .touch-movement { grid-template-columns: repeat(2, 46px); }
.expedition-touch > .touch-actions { grid-template-columns: repeat(2, minmax(88px, 1fr)); margin-left: auto; }
.expedition-touch > .touch-dpad [data-expedition-key="ArrowUp"] { grid-area: 1 / 1 / 2 / 3; justify-self: center; }
.expedition-touch > .touch-dpad [data-expedition-key="ArrowLeft"] { grid-area: 2 / 1; }
.expedition-touch > .touch-dpad [data-expedition-key="ArrowRight"] { grid-area: 2 / 2; }
.expedition-touch > .touch-dpad [data-expedition-key="ArrowDown"] { grid-area: 3 / 1 / 4 / 3; justify-self: center; }
.expedition-touch .expedition-touch-key {
  min-width: 44px;
  min-height: 46px;
  margin: 0;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: contain;
}
.expedition-touch > .touch-dpad .expedition-touch-key { width: 46px; padding: 8px 5px; font-size: 19px; }
.expedition-touch-hint {
  grid-column: 1 / -1;
  margin: 0;
  max-width: 220px;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  color: var(--muted, #61717b);
  pointer-events: none;
}
/* The mobile-play host owns the surface position and keeps the middle clear. */
body.wide-play .expedition-touch { pointer-events: none; }
body.wide-play .expedition-touch > .touch-movement,
body.wide-play .expedition-touch > .touch-actions {
  flex: 0 0 102px;
  width: 102px;
  max-width: 102px;
  gap: 6px;
  pointer-events: none;
}
body.wide-play .expedition-touch > .touch-movement { grid-template-columns: repeat(2, 48px); }
body.wide-play .expedition-touch > .touch-actions { grid-template-columns: minmax(0, 1fr); }
body.wide-play .expedition-touch .expedition-touch-key {
  min-width: 44px;
  min-height: 46px;
  padding: 9px 5px;
  border-radius: 12px;
  pointer-events: auto;
  font-size: 12px;
  line-height: 1.15;
}
body.wide-play .expedition-touch > .touch-dpad .expedition-touch-key { width: 48px; font-size: 20px; }
body.wide-play .expedition-touch > .touch-pair .expedition-touch-key { width: 48px; font-size: 11px; }
body.wide-play .expedition-touch-hint { width: 102px; font-size: 10px; line-height: 1.3; }
