/* Phone aiming (client-mobile-aim.js): the target button over the spell arc
   and the cancel mark shown while a ground spell is dragged. */

html:not(.touch-play) #touch-tab,
html:not(.touch-play) #touch-aim-cancel { display: none !important; }

#touch-tab {
  position: absolute;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #ffe9b8;
  background: radial-gradient(circle at 50% 35%, #3a2a14 0%, #1a1008 70%);
  border: 2px solid #c9a24a;
  box-shadow: 0 3px 0 #120a04, 0 0 0 2px rgba(60, 40, 12, 0.85), inset 0 1px 0 rgba(255, 230, 170, 0.25);
}
#touch-tab .tab-ring {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffd774;
  box-shadow: 0 0 6px rgba(255, 200, 90, 0.55);
  pointer-events: none;
}
#touch-tab .tab-ring::before,
#touch-tab .tab-ring::after {
  content: "";
  position: absolute;
  background: #ffd774;
  left: 50%;
  top: 50%;
}
#touch-tab .tab-ring::before { width: 22px; height: 2px; transform: translate(-50%, -50%); }
#touch-tab .tab-ring::after { width: 2px; height: 22px; transform: translate(-50%, -50%); }
#touch-tab .tab-word {
  font: 700 7px "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.12em;
  pointer-events: none;
}
#touch-tab.pressed { transform: scale(0.92); border-color: #fff1c0; }
html.touch-swap #touch-tab .tab-word { transform: scaleX(-1); }
html.touch-play #screen-match.ascent-play #touch-tab { display: none !important; }

#touch-aim-cancel {
  position: fixed;
  z-index: 60;
  right: calc(var(--sar, 0px) + 84px);
  bottom: calc(var(--sab, 0px) + 232px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 6px;
  border-radius: 18px;
  color: #f6dccc;
  font: 700 11px "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(44, 16, 10, 0.92), rgba(20, 8, 6, 0.92));
  border: 2px solid #8a3a28;
  box-shadow: 0 3px 0 #1a0806, 0 0 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: transform 0.08s ease-out, border-color 0.08s, background 0.08s;
}
#touch-aim-cancel .x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5a1a10;
  color: #ffd2c2;
  font-size: 12px;
}
#touch-aim-cancel.hot {
  transform: scale(1.14);
  border-color: #ff6a4a;
  background: linear-gradient(180deg, rgba(128, 26, 12, 0.96), rgba(64, 10, 6, 0.96));
}
#touch-aim-cancel.hidden { display: none; }
html.touch-swap #touch-aim-cancel {
  right: auto;
  left: calc(var(--sal, 0px) + 84px);
}

/* The player's own buffs sit beside the player frame, clear of the party frames. */
html.touch-play #player-auras {
  left: calc(136px + var(--sal)) !important;
  top: calc(4px + var(--sat)) !important;
}
#touch-aim-cancel.tappable { pointer-events: auto; }
