/* Bouncy Circle: "press, hold and flick" intro hint. UI chrome only, the circle itself is untouched. */
.bc-hint { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: 20;
  opacity: 0; transition: opacity .4s ease; }
.bc-hint.is-on { opacity: 1; }
.bc-hint[hidden] { display: none; }

/* Hand + ring, centred on the circle by JS (left/top = circle centre). */
.bc-hint-demo { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.bc-hint-ring { position: absolute; left: -34px; top: -34px; width: 68px; height: 68px; border-radius: 50%;
  border: 3px solid var(--lab-accent); box-sizing: border-box; opacity: 0;
  animation: bc-ring 2.8s ease-in-out infinite; }
.bc-hint-trail { position: absolute; left: 0; top: -2px; width: 110px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--lab-accent-2));
  transform-origin: 0 50%; transform: rotate(-38deg) scaleX(0); opacity: 0;
  animation: bc-trail 2.8s ease-out infinite; }
.bc-hint-hand { position: absolute; left: -14px; top: -3px; width: 46px; height: 54px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
  transform-origin: 14px 3px; animation: bc-hand 2.8s ease-in-out infinite; }
.bc-hint-hand path { fill: var(--lab-paper); stroke: var(--lab-paper-ink); stroke-width: 2; stroke-linejoin: round; }

/* Caption: a .lab-panel placed below (or above) the circle by JS. */
.bc-hint-panel { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 12px; white-space: nowrap; pointer-events: auto;
  font: 700 var(--lab-font-size)/1.3 var(--lab-font); color: var(--lab-ink); }
.bc-hint-panel b { color: var(--lab-accent); font-weight: 800; }
.bc-hint-close { min-height: 0; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  font: 700 16px/24px var(--lab-font); text-align: center; color: var(--lab-muted); background: transparent; }
.bc-hint-close:hover { color: var(--lab-ink); background: var(--lab-panel-2); }

/* 0-12% reach in, 12-20% press, 20-55% hold (ring fills), 55-66% flick out, rest: pause */
@keyframes bc-hand {
  0%   { transform: translate(46px, 52px) scale(1); opacity: 0; }
  12%  { transform: translate(0, 0) scale(1); opacity: 1; }
  20%  { transform: translate(0, 0) scale(.86); opacity: 1; }
  55%  { transform: translate(0, 0) scale(.86); opacity: 1; }
  66%  { transform: translate(96px, -76px) scale(.92) rotate(-12deg); opacity: 0; }
  100% { transform: translate(96px, -76px) scale(.92) rotate(-12deg); opacity: 0; }
}
@keyframes bc-ring {
  0%, 18% { transform: scale(.4); opacity: 0; }
  24%     { transform: scale(.7); opacity: .9; }
  55%     { transform: scale(1); opacity: 1; }
  64%     { transform: scale(1.25); opacity: 0; }
  100%    { transform: scale(1.25); opacity: 0; }
}
@keyframes bc-trail {
  0%, 55% { transform: rotate(-38deg) scaleX(0); opacity: 0; }
  60%     { transform: rotate(-38deg) scaleX(1); opacity: .9; }
  72%     { transform: rotate(-38deg) scaleX(1); opacity: 0; }
  100%    { transform: rotate(-38deg) scaleX(1); opacity: 0; }
}

/* Reduced motion: a still "pressed" hand, a full ring and the flick direction, no loop. */
@media (prefers-reduced-motion: reduce) {
  .bc-hint { transition: none; }
  .bc-hint-hand, .bc-hint-ring, .bc-hint-trail { animation: none; }
  .bc-hint-hand { transform: scale(.86); }
  .bc-hint-ring { opacity: 1; }
  .bc-hint-trail { left: 30px; top: -26px; width: 60px; transform: rotate(-38deg); opacity: .9; }
}
