/* Activities. Shared .a-* pieces first, then one block per activity. */

.a-stage { position: relative; width: 100%; height: 100%; overflow: hidden; background: #fff;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.a-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.a-num { font: 800 26px 'Varela Round', system-ui, sans-serif; fill: #262626; }

/* The guest's reactions (on the middle group of the guest drawing). */
.a-anim { transform-box: fill-box; transform-origin: 50% 100%; }
.a-wobble { animation: a-wobble .45s ease-in-out; }
.a-hop { animation: a-hop .38s ease-out 2; }
.a-squish { animation: a-squish .35s ease-out; }
.a-nod { animation: a-squish .2s ease-out; }
@keyframes a-wobble { 20% { transform: rotate(-7deg) translateX(-4px); } 45% { transform: rotate(6deg) translateX(4px); } 70% { transform: rotate(-3deg); } }
@keyframes a-hop { 40% { transform: translateY(-16%) scale(.98, 1.03); } 80% { transform: translateY(0) scale(1.04, .96); } }
@keyframes a-squish { 40% { transform: scale(1.05, .93); } }

/* Floating hearts, stars and notes; sparks bursting outward. */
.a-float { animation: a-float .9s ease-out forwards; }
.a-faint { opacity: .55; }
@keyframes a-float { from { transform: translateY(0) scale(.5); opacity: 0; } 20% { transform: translateY(-10px) scale(1.1); opacity: 1; } to { transform: translateY(-70px) scale(1); opacity: 0; } }
.a-spark { animation: a-spark .6s ease-out forwards; }
@keyframes a-spark { from { transform: translate(0, 0) scale(.6); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }

/* The hand ghost: taps in place. */
.a-ghost-tap { animation: a-ghost-tap 1s ease-in-out infinite; opacity: .85; }
.a-ghost-tap.a-late { animation-delay: .5s; }
@keyframes a-ghost-tap { 0%, 100% { transform: translate(6px, 10px) scale(1); } 45% { transform: translate(0, 0) scale(.92); } 55% { transform: translate(0, 0) scale(.92); } }

/* Feed */
.a-feed-plate { cursor: pointer; }
.a-feed-bob { animation: a-feed-bob 1.6s ease-in-out infinite; }
.a-feed-picked .a-feed-bob { animation: none; }
@keyframes a-feed-bob { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-10px); } 90% { transform: translateY(0); } }
.a-feed-dim { opacity: .3; transition: opacity .3s; }

/* Pet */
.a-pet-chev { animation: a-pet-chev 1.2s ease-in-out infinite; opacity: .55; }
@keyframes a-pet-chev { 0%, 100% { opacity: .25; } 40% { opacity: .8; } }
.a-pet-ghost { animation: a-pet-ghost 1.4s ease-in-out infinite; }
@keyframes a-pet-ghost { 0% { transform: translateX(-10px); opacity: 0; } 15% { opacity: .9; } 75% { transform: translateX(var(--run)); opacity: .9; } 100% { transform: translateX(var(--run)); opacity: 0; } }
.a-pet-warn .a-pet-chev { animation: a-pet-flash .5s; }
@keyframes a-pet-flash { 30% { opacity: 1; stroke-width: 4.6; } }

/* Surf */
.a-surf-line { animation: a-surf-line 3s linear infinite; }
@keyframes a-surf-line { to { transform: translateX(-120px); } }
.a-surf-cue { transition: opacity .2s; opacity: .45; }
.a-surf-cue > * { transform-box: fill-box; }
.a-surf:not(.a-surf-go) .a-surf-cue { animation: a-surf-cue .9s ease-in-out infinite; }
@keyframes a-surf-cue { 50% { opacity: 1; } }
.a-surf-cue.a-on { opacity: 1; }
.a-surf-cue.a-on circle { fill: #ffe36e; }
.a-surf-done .a-surf-cue { opacity: 0; }

/* Paddle race */
.a-paddle-bob { animation: a-paddle-bob 1s ease-in-out infinite; }
@keyframes a-paddle-bob { 50% { transform: translateY(-3px) rotate(-2deg); } }
.a-paddle-padin { transform-box: fill-box; transform-origin: center; }
.a-paddle-pad.a-hit .a-paddle-padin { animation: a-paddle-press .18s ease-out; }
@keyframes a-paddle-press { 50% { transform: scale(.9); } }
.a-paddle-ring { opacity: 0; transform-box: fill-box; transform-origin: center; }
.a-paddle-pad.a-next .a-paddle-ring { animation: a-paddle-ring .9s ease-out infinite; }
.a-paddle-pad.a-next circle:first-child { fill: #ffe36e; }
@keyframes a-paddle-ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
.a-paddle-oar { transform-box: view-box; transform-origin: 0 -20px; }
.a-paddle-oar.a-pull { animation: a-paddle-pull .3s ease-out; }
.a-paddle-oar[data-side="-1"].a-pull { animation-name: a-paddle-pull-l; }
@keyframes a-paddle-pull { 50% { transform: rotate(-35deg); } }
@keyframes a-paddle-pull-l { 50% { transform: rotate(35deg); } }
.a-paddle-count { font: 800 72px 'Varela Round', system-ui, sans-serif; fill: #262626; }
.a-paddle-count.a-pop { animation: a-paddle-pop .45s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes a-paddle-pop { from { transform: scale(1.6); opacity: 0; } 40% { opacity: 1; } }

/* Scoop stack */
.a-scoop-x { opacity: 0; transition: opacity .2s; }
.a-scoop-x.a-on { opacity: 1; }
.a-scoop-land { animation: a-scoop-land .3s ease-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes a-scoop-land { 35% { transform: scale(1.12, .82); } 70% { transform: scale(.96, 1.05); } }
.a-scoop-fall { animation: a-scoop-fall .6s ease-in forwards; transform-box: fill-box; transform-origin: center; }
@keyframes a-scoop-fall { to { transform: translate(calc(var(--dir) * 90px), 260px) rotate(calc(var(--dir) * 120deg)); opacity: 0; } }
.a-scoop-eat { animation: a-scoop-eat .25s ease-in forwards !important; transform-box: fill-box; transform-origin: center; }
@keyframes a-scoop-eat { to { transform: scale(0); opacity: 0; } }

/* Karaoke */
.a-karaoke-target { transform-box: fill-box; transform-origin: center; }
.a-karaoke-target.a-press { animation: a-karaoke-press .15s ease-out; }
@keyframes a-karaoke-press { 50% { transform: scale(.92); } }
.a-karaoke-pad.a-hit { animation: a-karaoke-hit .3s ease-out; }
@keyframes a-karaoke-hit { from { fill: #ffe36e; } }
.a-karaoke-ghost { animation: a-karaoke-ghost .6s ease-in-out infinite; opacity: .85; }
@keyframes a-karaoke-ghost { 0%, 100% { transform: translate(0, 0) scale(.92); } 50% { transform: translate(6px, 12px) scale(1); } }

/* Sunbathe */
.a-sunbathe-rays { animation: a-sunbathe-spin 12s linear infinite; }
@keyframes a-sunbathe-spin { to { transform: rotate(360deg); } }
.a-sunbathe-me, .a-sunbathe-top { pointer-events: none; transition: filter .2s; }
.a-sunbathe-flip.a-flip-up { animation: a-sunbathe-up .45s ease-out forwards; }
.a-sunbathe-flip.a-flip-down { animation: a-sunbathe-down .45s ease-out forwards; }
@keyframes a-sunbathe-up { from { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-50px) rotate(90deg); } to { transform: translateY(0) rotate(180deg); } }
@keyframes a-sunbathe-down { from { transform: translateY(0) rotate(180deg); } 50% { transform: translateY(-50px) rotate(270deg); } to { transform: translateY(0) rotate(360deg); } }
.a-sunbathe-ghost { opacity: .35; transition: opacity .15s; }
.a-sunbathe-ghost .a-ghost-tap { animation-play-state: paused; }
.a-sunbathe-ghost.a-on { opacity: .9; }
.a-sunbathe-ghost.a-on .a-ghost-tap { animation-play-state: running; animation-duration: .5s; }

/* Dig */
.a-dig-sand { position: absolute; inset: 0; width: 100%; height: 100%; }
.a-dig-top { pointer-events: none; }
.a-dig-find { transform-box: fill-box; transform-origin: center; }
.a-dig-find.a-on { animation: a-dig-pop .5s ease-out; }
@keyframes a-dig-pop { 40% { transform: scale(1.35) rotate(-8deg); } }
.a-dig-ghost { animation: a-dig-ghost 1.1s ease-in-out infinite; }
@keyframes a-dig-ghost { 0%, 100% { transform: translate(-24px, 4px); } 50% { transform: translate(24px, -4px); } }
