/* GRUMPY//NET v2 — Gary the Brain in his jar, animated (0.8.0).
   Two pictures (the empty jar + the brain) and a mask cut from the jar's real
   inside shape (img/gary-jar-mask.png), so the brain and the bubbles can never
   show outside the glass. The brain bobs and tilts, bubbles fade in at the bottom
   of the water and pop under the water line; a new line gives him a little squish
   (class talk-a / talk-b, switched by js/ui/gary.js).
   0.8.1: --gjd (set by gary.js) keeps the bob in time with the clock, so a redraw never makes him skip.
   Calm mode (html.v2-calm, base.css) and "reduce motion" keep him still. Prefix: gj- */
.gj{position:relative;flex:none;display:block;aspect-ratio:600/607}
.gj-jar,.gj-glass{position:absolute;inset:0;background:url(/v2/img/gary-jar-empty.webp) center/contain no-repeat;pointer-events:none}
.gj-glass{opacity:.3;mix-blend-mode:screen}
.gj-in{position:absolute;inset:0;-webkit-mask:url(/v2/img/gary-jar-mask.png) center/100% 100% no-repeat;mask:url(/v2/img/gary-jar-mask.png) center/100% 100% no-repeat}
.gj-brain{position:absolute;left:23%;width:52%;top:37%;aspect-ratio:480/378;background:url(/v2/img/gary-brain.webp) center/contain no-repeat;animation:gjBob 3.4s ease-in-out var(--gjd,0s) infinite;filter:drop-shadow(0 0 6px rgba(60,170,220,.35))}
.gj-b{position:absolute;top:86%;aspect-ratio:1;border-radius:50%;border:1.5px solid rgba(200,240,255,.85);background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.9) 0 18%,rgba(160,220,255,.15) 40%,transparent 70%);opacity:0;animation:gjRise linear infinite}
.gj.talk-a .gj-brain{animation:gjBob 3.4s ease-in-out var(--gjd,0s) infinite,gjTalkA .55s ease-out}
.gj.talk-b .gj-brain{animation:gjBob 3.4s ease-in-out var(--gjd,0s) infinite,gjTalkB .55s ease-out}
.gj.talk-a .gj-b,.gj.talk-b .gj-b{animation-duration:1.3s !important}
@keyframes gjBob{0%,100%{transform:translateY(-4%) rotate(-2.5deg)}50%{transform:translateY(5%) rotate(2.5deg)}}
@keyframes gjRise{0%{top:86%;opacity:0;transform:translateX(0) scale(.8)}15%{opacity:.9}50%{transform:translateX(35%) scale(1)}88%{opacity:.85;transform:translateX(-15%) scale(1.05)}100%{top:31%;opacity:0;transform:translateX(0) scale(1.25)}}
@keyframes gjTalkA{0%{scale:1}35%{scale:1.07}70%{scale:.97}100%{scale:1}}
@keyframes gjTalkB{0%{scale:1}35%{scale:1.07}70%{scale:.97}100%{scale:1}}
html.v2-calm .gj-b,.gj.still .gj-b{display:none}
.gj.still .gj-brain{animation:none}
@media (prefers-reduced-motion:reduce){.gj-brain,.gj-b{animation:none !important}.gj-b{display:none}}
/* Gary's speech bubble (Store, Sell to Gary) */
.gsay{position:relative;display:flex;flex-direction:column;gap:4px;padding:10px 14px;border-radius:14px;background:#0f1d24;border:1px solid #1f4a55;min-width:0}
.gsay::before{content:"";position:absolute;left:-8px;top:50%;margin-top:-8px;border:8px solid transparent;border-left:0;border-right-color:#1f4a55}
.gsay p{margin:0;font-size:14px;line-height:1.45;color:#d8f3f7}
