.prowl-touch { overscroll-behavior:none; -webkit-user-select:none; user-select:none; }
.prowl-touch #gl { touch-action:none; height:100dvh; }
.prowl-touch .touch-stick { width:min(var(--touch-stick-size,128px),calc(100vw - 230px),30dvh)!important; height:min(var(--touch-stick-size,128px),calc(100vw - 230px),30dvh)!important; }
#prowl-touch-settings { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:18px; background:#061219c9; backdrop-filter:blur(8px); color:#f0e1bf; font:15px/1.5 sans-serif; }
#prowl-touch-settings[hidden] { display:none; }
#prowl-touch-settings section { box-sizing:border-box; width:min(440px,100%); max-height:90dvh; overflow:auto; border:1px solid #a99160; border-radius:20px; padding:24px; background:linear-gradient(145deg,#263e3d,#12232b); box-shadow:0 20px 80px #0008; }
#prowl-touch-settings h2 { margin:0 0 10px; color:#edcf88; font:600 27px Georgia,serif; }
#prowl-touch-settings label { display:flex; justify-content:space-between; font-weight:600; }
#prowl-touch-settings input { width:100%; min-height:44px; accent-color:#dfc17e; touch-action:pan-x; }
#prowl-touch-settings footer { display:flex; justify-content:space-between; gap:12px; }
#prowl-touch-settings button { min-height:48px; min-width:100px; border:1px solid #af9968; border-radius:12px; background:#3c5548; color:#fff0cd; font:600 15px sans-serif; cursor:pointer; }
.touch-settings-note { font-size:12px; color:#c2cdbd; }
.touch-pad-preview { width:var(--touch-stick-size,128px); height:var(--touch-stick-size,128px); margin:10px auto; border:1px solid #d6c89688; border-radius:50%; display:grid; place-items:center; background:#13232a99; }
.touch-pad-preview i { width:38%; height:38%; border-radius:50%; background:radial-gradient(circle at 35% 25%,#c2bc97bb,#52635cbb); border:1px solid #e3d9b799; }
@media(max-width:400px) { #prowl-device-toolbar { gap:5px; } #prowl-device-toolbar button { font-size:11px; padding:6px 8px; } }
#prowl-touch { position:fixed; inset:0; z-index:12; pointer-events:none; color:#efdfb8; font:13px sans-serif; }
#prowl-touch[hidden] { display:none; }
#prowl-touch button,.touch-stick { pointer-events:auto; touch-action:none; -webkit-tap-highlight-color:transparent; }
#prowl-touch button { min-width:48px; min-height:48px; border:1px solid #bda47299; border-radius:15px; background:linear-gradient(145deg,#314449ee,#101a20ee); color:#f9ebcb; font:600 12px sans-serif; box-shadow:0 3px 12px #0006; }
#prowl-touch button.held { background:#68784e; transform:scale(.94); border-color:#ffe0a2; }
.touch-stick { position:absolute; left:max(24px,env(safe-area-inset-left)); bottom:calc(25px + env(safe-area-inset-bottom)); width:128px; height:128px; border-radius:50%; border:1px solid #ecd6a255; background:radial-gradient(circle,#d7c18c12,#14202577); }
.touch-stick i { position:absolute; left:calc(50% - 25px); top:calc(50% - 25px); width:50px; height:50px; border-radius:50%; background:radial-gradient(circle at 35% 25%,#c2bc97bb,#52635cbb); border:1px solid #e3d9b799; box-shadow:0 4px 14px #0005; }
.touch-actions { position:absolute; right:max(22px,env(safe-area-inset-right)); bottom:calc(25px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(2,62px); gap:10px; }
.touch-menu { position:absolute; right:max(16px,env(safe-area-inset-right)); top:calc(185px + env(safe-area-inset-top)); display:grid; grid-template-columns:repeat(3,48px); gap:6px; }
.touch-help { position:absolute; top:calc(8px + env(safe-area-inset-top)); left:50%; transform:translateX(-50%); width:max-content; max-width:70%; text-align:center; font-size:11px; text-shadow:0 2px 4px #000; }
.prowl-touch { --touch-bar-bottom:170px; }
.prowl-touch #ui .ab { left:50%!important; bottom:calc(var(--touch-bar-bottom) + env(safe-area-inset-bottom))!important; max-width:calc(100vw - 30px); flex-wrap:wrap; justify-content:center; width:max-content; transform:translateX(-50%); }
.prowl-touch #ui .touch-spells { display:grid; grid-template-columns:repeat(var(--touch-columns,6),46px); }
.prowl-touch #ui .touch-spells .slot[data-empty="true"] { display:none; }
.prowl-touch #ui .touch-forms { bottom:calc(var(--touch-bar-bottom) + var(--touch-spells-height,120px) + env(safe-area-inset-bottom))!important; }
.prowl-touch #ui .uf { transform:scale(.65); transform-origin:top left; }
.prowl-touch #ui .uf:nth-child(2) { left:185px!important; }
.prowl-touch #ui .mm { transform:scale(.55); transform-origin:top right; top:60px!important; right:12px!important; }
.prowl-touch #ui .tracker,.prowl-touch #ui .chat,.prowl-touch #ui .micro,.prowl-touch #ui .xp { display:none; }
.prowl-touch #ui .slot,.prowl-touch #ui .slot.small { width:46px; height:46px; touch-action:manipulation; }
.prowl-touch #ui .slot .ic { width:calc(100% - 2px); height:calc(100% - 2px); }
.prowl-touch #ui .win { max-width:calc(100vw - 20px); max-height:calc(100dvh - 30px); overflow:auto; }
.prowl-touch #ui .win .x { width:44px; height:44px; line-height:44px; z-index:2; }
.prowl-touch #shadow-step-button,.prowl-touch #field-guide-button { display:none; }
.prowl-touch #chat-open,.prowl-touch #test-map-button { display:none!important; }
#prowl-touch button:disabled { opacity:.4; }
#prowl-device-toolbar { position:fixed; z-index:90; top:max(10px,env(safe-area-inset-top)); right:max(12px,env(safe-area-inset-right)); display:flex; gap:8px; font:12px sans-serif; }
#prowl-device-toolbar button { min-height:44px; padding:8px 12px; color:#f4e5c1; background:#14252aed; border:1px solid #b8a46d99; border-radius:12px; cursor:pointer; touch-action:manipulation; }
#prowl-display-message { position:absolute; right:0; top:54px; width:min(310px,80vw); padding:15px; border:1px solid #b8a46d; border-radius:12px; background:#14252af5; color:#f4e5c1; line-height:1.5; }
.touch-start-note { max-width:min(490px,85vw); text-align:center; line-height:1.5; color:#e7d9b9; font:14px/1.5 sans-serif; text-shadow:0 2px 4px #000; }
.prowl-touch .start { box-sizing:border-box; padding:70px 14px 20px; overflow:auto; justify-content:center; }
.prowl-touch .start .sub { font-size:clamp(11px,3vw,18px); letter-spacing:.15em; margin-bottom:8px; }
.prowl-touch .start .card { box-sizing:border-box; width:min(560px,100%); max-width:100%!important; flex-shrink:0; }
.prowl-touch .start .body { flex-direction:column; gap:8px!important; }
.prowl-touch .start .dollbox { display:none; }
.prowl-touch .start .side { min-width:0!important; width:100%; }
.prowl-touch .start .nm { width:0; min-width:0; min-height:44px; box-sizing:border-box; font-size:18px; }
.prowl-touch .start .btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; touch-action:manipulation; }
.prowl-touch .start .btn.big { width:100%; min-height:56px; font-size:20px; background:linear-gradient(#526b4b,#263e32); }
.prowl-touch .touch-help { display:none; }
.prowl-touch .touch-actions { grid-template-columns:repeat(3,54px); gap:8px; }
.prowl-touch #ui .touch-spells .slot { width:46px; height:52px; }
.prowl-touch #ui .slot .key { top:auto; bottom:0; left:0; right:0; padding:2px 1px; background:#0a1319df; color:#f6e7c8; font:600 9px/1.1 sans-serif; text-align:center; white-space:normal; }
.prowl-touch #ui .slot .ic { height:calc(100% - 12px); }
.prowl-touch #ui .uf { top:65px!important; }
.prowl-touch #ui .uf:nth-child(2) { left:195px!important; }
.prowl-touch #ui .mm,.prowl-touch #ui .mmz,.prowl-touch #ui .cps { display:none; }
.prowl-touch #ex-compass,.prowl-touch #ex-status,.prowl-touch #ex-tools { display:none; }
.prowl-touch #ex-order { top:124px!important; left:16px!important; right:16px!important; width:auto!important; max-width:400px; padding:8px 12px!important; }
.prowl-touch #ex-order span { display:none; }
.prowl-touch #ex-order small { font-size:9px; }
.prowl-touch #ex-order strong { font-size:13px!important; }
.prowl-touch #ui .zone { top:30%; font-size:28px; }
.prowl-touch #ui .win:not(.card) { left:10px!important; top:65px!important; right:10px!important; width:auto!important; transform:none!important; box-sizing:border-box; max-height:calc(100dvh - 85px); }
.prowl-touch #ui .win .body { overflow:auto; }
.prowl-touch #field-guide .guide-card { box-sizing:border-box; max-height:calc(100dvh - 100px); padding:20px; }
.prowl-touch #ui .btn { min-height:40px; box-sizing:border-box; touch-action:manipulation; }
.touch-only { display:none; }
.prowl-touch .touch-only { display:block; }
.prowl-touch .keyboard-only { display:none; }
@media(min-width:700px) and (min-height:520px) {
  .touch-stick { width:152px; height:152px; left:max(36px,env(safe-area-inset-left)); bottom:calc(40px + env(safe-area-inset-bottom)); }
  .prowl-touch .touch-actions { grid-template-columns:repeat(2,66px); bottom:calc(40px + env(safe-area-inset-bottom)); right:max(36px,env(safe-area-inset-right)); }
  #prowl-touch .touch-actions button { min-height:62px; font-size:14px; }
  .prowl-touch { --touch-bar-bottom:25px; }
  .prowl-touch #ui .ab { max-width:calc(100vw - 410px); }
}
@media(max-height:500px) {
  .touch-stick { width:112px; height:112px; bottom:calc(16px + env(safe-area-inset-bottom)); }
  .touch-actions { bottom:calc(16px + env(safe-area-inset-bottom)); }
  .touch-menu { top:calc(12px + env(safe-area-inset-top)); }
  .prowl-touch { --touch-bar-bottom:12px; }
  .prowl-touch #ui .ab { max-width:calc(100vw - 330px); }
  .touch-help { display:none; }
  .prowl-touch #ui .uf { top:58px!important; transform:scale(.55); }
  .prowl-touch #ex-order { top:107px!important; max-width:240px; }
  .prowl-touch .touch-menu { top:65px; }
  .prowl-touch .touch-actions { grid-template-columns:repeat(2,54px); }
  .prowl-touch .touch-stick { width:112px; height:112px; }
  .prowl-touch .start { justify-content:flex-start; }
  .prowl-touch .start .logo { display:none; }
  .prowl-touch .touch-start-note { margin:6px; font-size:12px; }
}
