/*
 * WolfStorm — Wolf Territories Grid Web Viewer
 * Copyright (C) 2026 Wolf Territories Grid / IntelligentWolf Ltd.
 * All rights reserved.
 *
 * An original work. Interoperates with OpenSimulator grids by implementing the
 * publicly documented LLUDP and HTTP capability protocols; protocol
 * interoperability does not imply shared authorship or a shared code base.
 *
 * Unauthorised copying, redistribution or modification of this file, in whole or
 * in part, is prohibited without the written permission of IntelligentWolf Ltd.
 * See COPYRIGHT in the project root. https://wolfterritories.org
 */
#touch-controls{position:fixed;inset:0;z-index:995;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}#touch-controls .touch-panel{position:absolute;pointer-events:auto;touch-action:none;right:calc(16px + env(safe-area-inset-right, 0px));bottom:calc(var(--ws-toolbar-h, 60px) + 14px + env(safe-area-inset-bottom, 0px));display:flex;flex-direction:column;gap:8px;padding:8px 10px 10px;border-radius:14px;background:rgba(20, 26, 38, 0.52);border:1px solid rgba(160, 200, 255, 0.4);box-shadow:0 6px 22px rgba(0, 0, 0, 0.5);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}#camera-controls [hidden],#touch-controls [hidden]{display:none!important}.ctl-tabs{display:flex;gap:2px;padding:2px;border-radius:9px;background:rgba(8, 12, 20, 0.55);border:1px solid rgba(160, 200, 255, 0.25)}.ctl-tab{flex:1 1 0;min-height:28px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:#c9dcf5;font:600 12px/1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:0.02em;cursor:pointer;touch-action:manipulation}.ctl-tab:hover{background:rgba(60, 90, 140, 0.35);color:#fff}.ctl-tab[aria-selected="true"]{background:rgba(60, 100, 180, 0.92);color:#fff}.ctl-tab:focus-visible{outline:2px solid #9ccfff;outline-offset:1px}#touch-controls .touch-pane-sticks{display:flex;align-items:flex-end;gap:12px}#touch-controls .touch-stick{position:relative;flex:0 0 auto;width:132px;height:132px;border-radius:50%;background:rgba(20, 26, 38, 0.42);border:1px solid rgba(160, 200, 255, 0.45);box-shadow:inset 0 0 14px rgba(0, 0, 0, 0.35)}#touch-controls .touch-stick.active{background:rgba(30, 44, 68, 0.58);border-color:rgba(190, 225, 255, 0.75)}#touch-controls .touch-stick-ring{position:absolute;left:50%;top:50%;width:20px;height:20px;margin:-10px 0 0 -10px;border-radius:50%;border:1px dashed rgba(200, 225, 255, 0.35)}#touch-controls .touch-stick-knob{position:absolute;left:50%;top:50%;width:54px;height:54px;border-radius:50%;transform:translate(-50%, -50%);background:radial-gradient(circle at 35% 30%,
        rgba(235, 245, 255, 0.98), rgba(120, 165, 220, 0.95));border:1px solid rgba(255, 255, 255, 0.85);box-shadow:0 3px 10px rgba(0, 0, 0, 0.55)}#touch-controls .touch-buttons{display:flex;flex-direction:column;gap:10px}#touch-controls .touch-btn{width:56px;height:56px;border-radius:50%;border:1px solid rgba(160, 200, 255, 0.5);background:rgba(20, 26, 38, 0.62);color:#f0f6ff;font-size:22px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}#touch-controls .touch-pane-buttons{display:flex;flex-direction:column;gap:8px}#touch-controls .touch-dpad{display:grid;grid-template-columns:repeat(4, 48px);grid-auto-rows:48px;gap:6px}#touch-controls .touch-mode-btn,#touch-controls .touch-pad-btn{border-radius:10px;border:1px solid rgba(160, 200, 255, 0.5);background:rgba(20, 26, 38, 0.62);color:#f0f6ff;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer}#touch-controls .touch-pad-btn{font-size:20px;line-height:1}#touch-controls .touch-pad-vert{margin-left:6px}#touch-controls .touch-modes{display:flex;gap:6px}#touch-controls .touch-mode-btn{flex:1 1 0;min-height:34px;font:600 12px/1 system-ui,-apple-system,"Segoe UI",sans-serif}#touch-controls .touch-btn:hover,#touch-controls .touch-mode-btn:hover,#touch-controls .touch-pad-btn:hover{background:rgba(42, 62, 96, 0.82);border-color:rgba(190, 225, 255, 0.7)}#touch-controls .touch-btn.active,#touch-controls .touch-pad-btn.active{background:rgba(60, 100, 180, 0.92);border-color:rgba(180, 220, 255, 0.9);transform:scale(0.94)}#touch-controls .touch-btn.toggled,#touch-controls .touch-mode-btn.toggled{background:rgba(46, 132, 70, 0.92);border-color:rgba(150, 245, 175, 0.85);color:#fff}#touch-controls .touch-btn:focus-visible,#touch-controls .touch-mode-btn:focus-visible,#touch-controls .touch-pad-btn:focus-visible{outline:2px solid #9ccfff;outline-offset:2px}@media (max-height: 480px){#touch-controls .touch-panel{bottom:calc(64px + env(safe-area-inset-bottom, 0px));gap:5px;padding:5px 7px 7px}.ctl-tab{min-height:24px;font-size:11px}#touch-controls .touch-stick{width:104px;height:104px}#touch-controls .touch-stick-knob{width:44px;height:44px}#touch-controls .touch-buttons{flex-direction:row;gap:8px}#touch-controls .touch-btn{width:48px;height:48px;font-size:19px}#touch-controls .touch-dpad{grid-template-columns:repeat(4, 42px);grid-auto-rows:42px;gap:5px}#touch-controls .touch-mode-btn{min-height:28px}}@media (prefers-reduced-motion: reduce){#touch-controls .touch-btn.active,#touch-controls .touch-pad-btn.active{transform:none}}