.host-touch-active { touch-action: none; overscroll-behavior: none; }
.host-touch-active body { touch-action: none; overscroll-behavior: none; }
.host-touch-active canvas { width: 100vw; height: 100dvh; touch-action: none; }
.host-touch-active footer { display: none; }
.host-touch-active .debug-hud { top: calc(env(safe-area-inset-top) + 46px); left: calc(env(safe-area-inset-left) + 12px); max-width: 43vw; pointer-events: none; }
.host-touch-active .debug-location { padding: 4px 6px; font-size: 8px; pointer-events: none; }
.host-touch-active .debug-location output { font-size: 8px; line-height: 1.35; }
.host-touch-active .debug-location button { display: none; }
.host-touch-active .state { left: calc(env(safe-area-inset-left) + 14px); right: auto; top: calc(env(safe-area-inset-top) + 16px); font-size: 10px; }
.host-touch-active .encounter { left: auto; top: calc(env(safe-area-inset-top) + 57px); right: calc(env(safe-area-inset-right) + 12px); max-width: 44vw; padding: 6px 8px; font-size: 9px; }
.host-touch-active details { z-index: 30; top: calc(env(safe-area-inset-top) + 66px); right: calc(env(safe-area-inset-right) + 12px); bottom: auto; max-height: calc(100dvh - 250px); max-width: min(340px, 88vw); }
.host-touch-active details:not([open]) { display: none; }
#host-touch-controls { --host-brass: #deb766; --host-slate: #10262be6; position: fixed; inset: 0; z-index: 20; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; font: 11px Verdana, sans-serif; color: #f3dfb8; }
#host-touch-controls button { margin: 0; color: inherit; background: var(--host-slate); border: 1px solid #d8ba7c99; padding: 0; font: inherit; cursor: pointer; pointer-events: auto; touch-action: none; }
#host-touch-controls button:disabled { opacity: .35; }
#host-touch-controls button.is-held, #host-touch-controls button[aria-pressed=true] { background: #6e572ce6; border-color: #ffe1a3; box-shadow: 0 0 0 3px #deb76622; }
.host-stick-zone { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 20px); left: calc(env(safe-area-inset-left) + 22px); width: 132px; height: 166px; pointer-events: none; text-align: center; }
.host-stick { position: absolute; left: 0; bottom: 18px; width: 132px; height: 132px; border: 1px solid #d8ba7c80; border-radius: 50%; background: #10262b88; pointer-events: auto; touch-action: none; }
.host-stick::after { content: ''; position: absolute; inset: 17px; border: 1px solid #d8ba7c22; border-radius: 50%; }
.host-stick-directions { position: absolute; inset: 7px; color: #f3dfb866; font-size: 15px; line-height: 37px; }
.host-stick-thumb { position: absolute; width: 48px; height: 48px; top: 41px; left: 41px; border: 1px solid #f3d28d; border-radius: 50%; background: #a2834088; box-shadow: inset 0 0 0 7px #10262b55; pointer-events: none; }
.host-stick-label { position: absolute; bottom: 0; left: 0; width: 100%; font-size: 10px; letter-spacing: 1px; color: #e3d0a999; }
#host-touch-controls .host-walk { position: absolute; right: -26px; top: -35px; width: 56px; height: 54px; border-radius: 28px; font-size: 10px; }
.host-actions { position: absolute; right: calc(env(safe-area-inset-right) + 18px); bottom: calc(env(safe-area-inset-bottom) + 27px); width: 190px; height: 160px; }
.host-actions button { position: absolute; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.host-actions span { display: block; font-size: 8px; color: #dfcdaaaa; }
.host-actions .host-jump { right: 0; bottom: 0; width: 72px; height: 72px; border: 2px solid #e3bf72; background: #4e482de6; font-size: 12px; }
.host-actions .host-special { right: 2px; top: 0; width: 62px; height: 62px; }
.host-actions .host-attack { left: 40px; top: 52px; width: 62px; height: 62px; }
.host-actions .host-drop { left: 4px; bottom: 0; width: 52px; height: 52px; font-size: 10px; }
#host-touch-controls .host-menu { position: absolute; right: calc(env(safe-area-inset-right) + 12px); top: calc(env(safe-area-inset-top) + 10px); width: 64px; height: 44px; border-radius: 4px; }
.host-touch-active .host-copy-location { display: block; margin: 12px 0 8px; min-height: 44px; }
.host-look-hint { position: absolute; top: 40%; right: 12%; color: #f3dfb866; font-size: 10px; text-shadow: 0 1px 3px #000; }
.host-loading { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 12px); left: 50%; transform: translateX(-50%); max-width: 65vw; text-align: center; background: var(--host-slate); padding: 8px 10px; border: 1px solid #d8ba7c55; font-size: 10px; }
.host-loading[hidden] { display: none; }
@media (max-height: 470px) {
  .host-stick-zone { transform: scale(.82); transform-origin: bottom left; bottom: calc(env(safe-area-inset-bottom) + 10px); }
  .host-actions { transform: scale(.86); transform-origin: bottom right; bottom: calc(env(safe-area-inset-bottom) + 10px); }
  .host-touch-active .debug-hud { max-width: 35vw; }
  .host-touch-active details { max-height: calc(100dvh - 100px); }
}
@media (max-width: 380px) {
  .host-stick-zone { left: 12px; transform: scale(.86); transform-origin: bottom left; }
  .host-actions { right: 10px; transform: scale(.86); transform-origin: bottom right; }
}
