/* touch.css — сенсорне керування для 3D-ігор (телефони/планшети).
   Елементи створюються лише коли основний вказівник — палець, тож на ПК
   цей файл ні на що не впливає. */

/* Віртуальний джойстик (рух) */
.tj-base {
  position: fixed;
  left: 22px;
  bottom: 24px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(16, 26, 38, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 15;
  pointer-events: auto;
  touch-action: none;
}
.tj-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Контекстні кнопки дій (праворуч унизу, під великий палець) */
.touch-actions {
  position: fixed;
  right: 18px;
  bottom: 34px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

/* Постійні кнопки (журнал тощо) — праворуч угорі, під посиланням «Меню» */
.touch-side {
  position: fixed;
  right: 16px;
  top: 70px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

.tbtn {
  pointer-events: auto;
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(16, 26, 38, 0.8);
  color: #eaf2f8;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.tbtn:active { transform: scale(0.95); }
.tbtn.primary {
  background: linear-gradient(90deg, #33c2b0, #4aa3df);
  color: #06231f;
  border: none;
}
.tbtn.round {
  width: 54px;
  height: 54px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
}

/* Розкладка під сенсорний режим */
body.touch { user-select: none; -webkit-user-select: none; }
body.touch #scene { touch-action: none; }           /* тягнемо камеру, а не сторінку */
body.touch .hud-held { bottom: 170px; }             /* не перекривати джойстик */
body.touch .hud-prompt { bottom: 175px; max-width: 62vw; }
