/* 雙搖桿：左右兩支、各方向寫著會做什麼，行走、配置、投。 */

.deck.dual { grid-template-rows: 48px 1fr; height: calc(232px + var(--safe-b)); }

.deck.dual .stick { grid-row: 2; width: min(36vw, 150px); }
.deck.dual .stick.left { grid-column: 1; }
.deck.dual .stick.right { grid-column: 3; }
.deck.dual .side { grid-row: 2; }
.deck.dual .stick-knob { width: 40%; height: 40%; margin: -20% 0 0 -20%; }

.stick-label {
  position: absolute;
  color: var(--soft);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
}
.stick-label.up, .stick-label.down { left: 50%; transform: translateX(-50%); }
.stick-label.up { top: 10px; }
.stick-label.down { bottom: 10px; }
.stick-label.left, .stick-label.right { top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; }
.stick-label.left { left: 8px; }
.stick-label.right { right: 8px; }
.deck.dual .stick::before { content: none; }       /* the words mark the four directions */

.dual-tools { grid-row: 1; grid-column: 1; display: flex; gap: 6px; }
.dual-tools .small { min-height: 38px; padding: 0 10px; touch-action: none; }
.dual-travel.on { border-color: var(--yellow); background: var(--yellow); color: var(--ink); font-weight: 700; }

.fire {
  grid-row: 1;
  grid-column: 3;
  width: 96px;
  height: 42px;
  border: 3px solid #8a6800;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  touch-action: none;
}
.fire.held { transform: scale(.94); filter: brightness(.9); }
.fire.off { border-color: #2c3034; background: #3a3e42; color: #868b91; }

/* sideways: the sticks in the bottom corners, 行走 and 投 above them, the round buttons between */
@media (orientation: landscape) {
  .deck.dual { height: auto; }
  .deck.dual .stick { width: min(40vh, 156px); }
  .deck.dual .stick.left { left: calc(18px + var(--safe-l)); }
  .deck.dual .stick.right { right: calc(18px + var(--safe-r)); left: auto; }
  .deck.dual .side { right: auto; left: 50%; transform: translateX(-50%); }
  .dual-tools, .fire {
    position: absolute;
    bottom: calc(14px + var(--safe-b) + min(40vh, 156px) + 10px);
  }
  .dual-tools { left: calc(18px + var(--safe-l)); }
  .dual-tools .small { background: rgba(32, 35, 39, .82); }
  .dual-tools .dual-travel.on { background: var(--yellow); }
  .fire { right: calc(18px + var(--safe-r) + (min(40vh, 156px) - 96px) / 2); }
}
