/* Phone controls (touch.js). Only on touch screens; the keyboard version is unchanged. */
.t-on,.t-on body{position:fixed;inset:0;overscroll-behavior:none;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.t-on canvas{touch-action:none}
#t-layer{position:fixed;inset:0;z-index:5;pointer-events:none;font:700 15px/1.1 -apple-system,system-ui,sans-serif;color:#fff}
#t-stick{position:absolute;left:0;bottom:0;width:45%;height:78%;pointer-events:auto;touch-action:none}
#t-ring,#t-knob{position:absolute;border-radius:50%;pointer-events:none;transform:translate(-50%,-50%)}
#t-ring{width:128px;height:128px;border:3px solid #ffffff66;background:#ffffff14}
#t-knob{width:60px;height:60px;background:#ffffff80;box-shadow:0 2px 8px #0008}
#t-ring.pad::before{content:"▲\A◀   ▶\A▼";white-space:pre;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.5;color:#ffffffb0;font-size:16px}
#t-btns{position:absolute;right:calc(10px + env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom));display:flex;flex-wrap:wrap-reverse;flex-direction:row-reverse;justify-content:flex-start;align-items:flex-end;gap:8px;max-width:min(52vw,264px);pointer-events:none}
.t-b{min-width:60px;min-height:60px;padding:0 6px;border-radius:30px;border:2px solid #ffffff70;background:#10141ccc;color:#fff;font:inherit;pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent}
.t-b.main{min-width:84px;min-height:84px;border-radius:42px;background:#1f7a4dd9;font-size:18px}
.t-b.num{min-width:56px;min-height:56px;border-radius:14px;font-size:20px}
.t-b.down{transform:scale(.94);background:#ffffff40}
#t-kb{position:fixed;left:50%;top:0;width:1px;height:1px;opacity:0;font-size:16px;border:0;padding:0;pointer-events:none}
#t-rot{position:absolute;left:12px;right:80px;top:calc(54px + env(safe-area-inset-top));padding:12px;border-radius:12px;background:#10141ce6;border:1px solid #ffffff50;text-align:center;pointer-events:auto;font-size:16px}
@media (orientation:landscape){#t-rot{display:none}}
#t-hud{position:absolute;left:0;top:0;width:100%;height:calc(46px + env(safe-area-inset-top));pointer-events:none}
#t-zoom{position:absolute;right:calc(10px + env(safe-area-inset-right));top:calc(52px + env(safe-area-inset-top));min-width:56px;min-height:56px;border-radius:28px}
.t-wait .t-b{opacity:.4}
#t-drag{position:absolute;inset:0;pointer-events:auto;touch-action:none}
