/* Founder stick pass: a floating movement stick over the open lower-left floor.
   #stickZone is an invisible touch area sized by play.js (layoutStickZone) to stay clear of every HUD panel.
   #stick stays hidden until a thumb lands in the zone, appears under it, and fades out ~0.3 s after release. */
#touchControls #stickZone{position:fixed;left:0;top:60%;width:45vw;height:40%;margin:0;pointer-events:auto;touch-action:none;
  background:transparent;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
body #touchControls #stick{position:fixed;left:16px;top:70%;margin:0;pointer-events:none;
  opacity:0;transition:opacity .3s ease-out;
  background:radial-gradient(circle,rgba(28,32,29,.3),rgba(12,15,14,.5) 70%,rgba(12,15,14,.2));
  border:2px solid rgba(243,220,162,.55);box-shadow:0 0 0 1px rgba(0,0,0,.25),0 0 18px rgba(255,220,150,.12)}
body #touchControls #stick.on{opacity:.92;transition:opacity .08s ease-out}
#touchControls #stick small{display:none}
#touchControls #stickKnob{opacity:.88;box-shadow:0 3px 10px rgba(0,0,0,.45)}
#touchControls #stick:not(.on) #stickKnob{transition:transform .25s ease-out}
body #touchControls #stick.g92-dim{opacity:0}
body #touchControls #stick.on.g92-dim{opacity:.6}

/* first dungeon entry: a soft glowing circle where the thumb rests; fades after the first move */
#stickHint{position:fixed;z-index:1;width:0;height:0;pointer-events:none}
#stickHint[hidden],.stick-hint[hidden]{display:none}
#stickHint i,.stick-hint i{position:absolute;left:-44px;top:-44px;width:88px;height:88px;border-radius:50%;
  border:2px solid rgba(255,228,160,.55);background:radial-gradient(circle,rgba(255,226,150,.22),rgba(255,226,150,.04) 70%);
  box-shadow:0 0 22px rgba(255,214,120,.35);animation:stickHintPulse 1.8s ease-in-out infinite}
#stickHint b,.stick-hint b{position:absolute;left:-60px;width:120px;top:-8px;text-align:center;font-size:11px;letter-spacing:.06em;font-weight:700;
  color:#fff3d2;text-shadow:0 1px 4px #000,0 0 8px rgba(0,0,0,.8);white-space:nowrap}
#stickHint{animation:stickHintIn .6s ease-out both}
#stickHint.bye{opacity:0;transition:opacity .6s ease-out}
@keyframes stickHintPulse{0%,100%{transform:scale(.92);opacity:.7}50%{transform:scale(1.04);opacity:1}}
@keyframes stickHintIn{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){#stickHint i,#stickHint,.stick-hint i,.stick-hint{animation:none}}

/* controller and keyboard players never see it */
html.pad-mode #stickHint,html.kb-input #stickHint,html.pad-bar #touchControls #stickZone{display:none !important}

/* phones: in a run, Chat moves off the lower-left floor to the end of the objective row; its menu opens downward */
html.stick-float body.run16 #qcBtn.in-run{left:var(--qc-x,200px);top:var(--qc-y,190px);bottom:auto;min-height:40px}
html.stick-float body.run16 #qcBtn.in-run+#qcMenu{left:var(--qc-x,200px);top:calc(var(--qc-y,190px) + 48px);bottom:auto;
  width:min(440px,calc(100vw - var(--qc-x,200px) - 16px))}
@media (orientation:portrait){
  html.stick-float body.run16 #qcBtn.in-run+#qcMenu{left:max(14px,env(safe-area-inset-left));width:min(360px,calc(100vw - 28px))}
}

/* View setting "Thumbstick: Fixed": the stick stays shown at its rest spot on the floor */
html.stick-fixed body #touchControls #stick:not(.on){opacity:.5}

/* Base Camp: the same hidden floating stick (camp.js). The ring never takes touches itself; the camp canvas does. */
#campView .camp-joy{pointer-events:none;opacity:0;transition:opacity .3s ease-out;
  background:radial-gradient(circle,rgba(255,231,180,.06),rgba(16,19,17,.3) 70%,rgba(16,19,17,.1));border-color:rgba(243,220,162,.55)}
#campView .camp-joy.on{opacity:.85;transition:opacity .08s ease-out}
#campView .camp-joy:not(.on) span{transition:transform .25s ease-out}
#campView .stick-hint{position:absolute;z-index:2;width:0;height:0;pointer-events:none;animation:stickHintIn .6s ease-out both}
#campView.training .stick-hint,html.pad-mode #campView .stick-hint,html.kb-input #campView .stick-hint{display:none !important}
@media (pointer:coarse){
  html.stick-float body:has(#campView:not([hidden])) #qcBtn{left:var(--qcc-x,180px);top:var(--qcc-y,10px);bottom:auto;min-height:40px}
  html.stick-float body:has(#campView:not([hidden])) #qcBtn+#qcMenu{top:calc(var(--qcc-y,10px) + 48px);bottom:auto}
}

/* Compact party column during runs on every screen (founder: "Smaller"). Slim 20px rows: role chip, short name, thin bar. */
body.run16 #statusCol{width:min(130px,17vw);gap:3px}
body.run16 #partyVitals{gap:2px}
body.run16 #partyVitals .pf{min-height:0;height:20px;padding:0 5px;gap:4px;font-size:9.5px;line-height:1;
  grid-template-columns:13px minmax(0,1fr) 38px;align-items:center;border-radius:6px;overflow:hidden}
body.run16 #partyVitals .pf .role{width:13px;height:13px;font-size:8px;line-height:13px;padding:0}
body.run16 #partyVitals .pf b{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.run16 #partyVitals .pf b em{display:none}
body.run16 #partyVitals .pf-hp{height:5px;border-radius:3px;align-self:center}
body.run16 #partyVitals .pf-hp small{display:none}
body.run16 #partyVitals .pf .buffs,body.run16 #partyVitals .pf .buff{display:none}
body.run16 #encounter{max-width:130px;padding:3px 6px}
body.run16 #encounter strong{font-size:10.5px}
body.run16 #objective{font-size:10px;max-width:none}
@media (min-height:700px){
  body.run16 #partyVitals .pf{height:26px;font-size:12px}
  body.run16 #partyVitals .pf b{font-size:12px}
  body.run16 #statusCol{width:min(170px,17vw)}
}

/* stick-fix2: iPhone "add to Home Screen" card for the Full screen button */
#a2hsCard{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9999;isolation:isolate;width:min(340px,calc(100vw - 32px));
  padding:14px 16px 12px;border-radius:12px;background:#0e1110;border:1px solid rgba(201,168,92,.55);
  color:#efe6cf;font:500 13.5px/1.4 "IBM Plex Sans",system-ui,sans-serif;box-shadow:0 10px 40px rgba(0,0,0,.6);text-align:center}
#a2hsCard[hidden]{display:none}
#a2hsCard p{margin:0 0 10px}
#a2hsCard .a2hs-steps{display:flex;align-items:center;justify-content:center;gap:6px;margin-bottom:10px}
#a2hsCard .a2hs-steps span{display:flex;flex-direction:column;align-items:center;gap:3px;width:78px}
#a2hsCard .a2hs-steps svg{width:30px;height:30px;fill:none;stroke:#7fb4ff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#a2hsCard .a2hs-steps img{width:30px;height:30px;border-radius:7px}
#a2hsCard .a2hs-steps small{font-size:10.5px;color:#cfc4a8;line-height:1.2}
#a2hsCard .a2hs-steps i{font-style:normal;color:#c9a85c;font-size:18px}
#a2hsCard button{min-height:36px;padding:0 18px;border-radius:8px;border:1px solid #c9a85c;background:#2a2416;color:#f4e7c4;font-weight:600}

/* Menu in a run sits above the combat buttons; the buttons fade and ignore taps while it is open. */
body.run16.menu16 #sideCol{position:relative;z-index:40}
body.run16.menu16 #sideCol .tools{position:relative;z-index:41;background:rgba(14,12,10,.92);border-radius:10px;padding:6px;box-shadow:0 6px 18px rgba(0,0,0,.55)}
body.run16.menu16 #touchControls > button,body.run16.menu16 #touchControls [id$="Btn"]{opacity:.25;pointer-events:none}
