/* ============================================================
   CATBACK catbuddy — the ambient cat assistant (catbuddy.js).
   The layer is pointer-transparent; only the cat button itself
   is interactive. All motion is transform/opacity only.
   ============================================================ */

#catbuddy-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-buddy);
  pointer-events: none;
  overflow: hidden;               /* off-screen walk-ins never cause scrollbars */
}

/* the cat IS a real button: keyboard reachable, padded hit area
   (padding is set inline by catbuddy.js: >= 40px target normally,
   exactly cat-sized while sitting on the ATM) */
.catbuddy {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  appearance: none;
  background: transparent;
  border: 0;
  margin: 0;
  line-height: 0;
  cursor: pointer;
  will-change: transform;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 1;
  transition: opacity 320ms var(--ease-mech);
}
.catbuddy.cb-fade { opacity: 0; }

.catbuddy:focus-visible {
  outline: 2px solid var(--terminal);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59, 240, 125, 0.25);
}

.catbuddy canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

/* conjured pixel note (chase) + popped heart: decorative only */
.cb-note,
.cb-heart {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.cb-note { will-change: transform; }

.cb-heart {
  animation: cb-heart-pop 900ms var(--ease-snap) forwards;
}
@keyframes cb-heart-pop {
  0%   { transform: translate(-50%, 0) scale(0); opacity: 1; }
  60%  { transform: translate(-50%, -24px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -38px) scale(1); opacity: 0; }
}

/* reduced motion: the buddy never appears (JS enforces; belt & braces) */
body[data-motion="reduce"] #catbuddy-layer { display: none; }
