/* Signature 2.2.1: a compact, touch-friendly Auto switch beside manual Train. */
.train-buttons {
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}
.auto-train {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  width: 66px;
  flex: 0 0 66px;
  min-height: 44px;
  padding: 6px 5px;
  border: 1px solid #e9d5a847;
  border-radius: 12px;
  background: linear-gradient(140deg, #193944f5, #102936f5);
  box-shadow: 0 4px 20px #10253425;
  color: #efe3c5;
  touch-action: manipulation;
  user-select: none;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.auto-train svg { width: 17px; height: 17px; }
.auto-train > span { font-size: 10px; font-weight: 700; letter-spacing: 1px; line-height: 1; }
.auto-train small { font-size: 8px; font-weight: 650; line-height: 1.2; letter-spacing: .5px; }
.auto-train[aria-pressed="true"] {
  border-color: #ade0bd;
  background: linear-gradient(140deg, #245f57f5, #173a3cf5);
  color: #dcffe4;
}
.auto-train[data-mode="paused"] { border-color: #d9c498; color: #f3dfb0; background: #31424bf5; }
.auto-train:focus-visible { outline: 3px solid #f1e2b8; outline-offset: 3px; }
.train.auto-active { border-color: #ade0bd; }
.train-wrap .train-hint { top: calc(100% + 8px); }
@media (hover:hover) {
  .auto-train:hover { border-color: #f1e2b8; }
}
@media (max-width:650px) and (orientation:portrait) {
  /* A separate bottom row keeps Auto/Train clear of the joystick, Run and Jump. */
  .compact-ui .bottom-hud { bottom: max(36px, calc(env(safe-area-inset-bottom) + 26px)); }
  .bottom-hud .equipped { display: none; }
  .auto-train { width: 62px; flex-basis: 62px; border-radius: 10px; }
  .train-buttons { gap: 7px; }
}
@media (orientation:landscape) and (max-height:550px) {
  .auto-train { width: 60px; flex-basis: 60px; border-radius: 10px; gap: 2px; }
  .auto-train svg { width: 14px; height: 14px; }
  .train-buttons { gap: 7px; }
}
@media (prefers-reduced-motion:reduce) { .auto-train { transition: none; } }
