/* Pepper the opossum (the walking one, the admin previews and the lost-page picture share these rules) */
.pep svg { width: 100%; height: 100%; overflow: visible; display: block; }
.pep .leg { transform-box: fill-box; transform-origin: 50% 0; }
.pep .tail { transform-box: fill-box; transform-origin: 100% 20%; }
.pep .head { transform-box: fill-box; transform-origin: 10% 60%; transition: transform .25s; }
.pep .pose { transform-box: fill-box; transform-origin: 50% 62%; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.pep .eye-x, .pep .eye-shut, .pep .tongue, .pep .hat, .pep .turkey, .pep .winter, .pep .joeys { display: none; }
.pep.dead .eye-x, .pep.dead .tongue, .pep.asleep .eye-shut, .pep.hat-on .hat, .pep.turkey-on .turkey, .pep.winter-on .winter, .pep.joeys-on .joeys { display: block; }
.pep.dead .joeys .eye-open, .pep.asleep .joeys .eye-open { display: none; }
.pep.dead .joeys .eye-x, .pep.asleep .joeys .eye-shut { display: block; }
/* always a little alive: blinking, breathing, an ear flick now and then */
.pep .eye-open { transform-box: fill-box; transform-origin: 50% 55%; animation: blink 4.600s infinite; }
.pep .joeys .eye-open { animation-delay: -1.700s; }
.pep .bodybob { transform-box: fill-box; transform-origin: 50% 100%; }
.pep:not(.walking):not(.dead) .bodybob { animation: breathe 2.600s ease-in-out infinite alternate; }
.pep .ear { transform-box: fill-box; transform-origin: 50% 90%; animation: earflick 6.500s infinite; }
.pep .ear + .ear { animation-delay: -2.300s; }
.pep.sniffing .tail, .pep:not(.walking):not(.dead):not(.asleep):not(.held) .tail { animation: wag 2.400s ease-in-out infinite alternate; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes breathe { from { transform: scale(1, 1); } to { transform: scale(1.012, 1.03); } }
@keyframes earflick { 0%, 85%, 91%, 100% { transform: rotate(0); } 88% { transform: rotate(-14deg); } }
.pep.dead .eye-open, .pep.asleep .eye-open { display: none; }
.pep.dead .pose { transform: rotate(180deg) translateY(-6px); }
.pep.asleep .pose { transform: translateY(7px); }
.pep.asleep .head { transform: rotate(13deg); }
.pep.asleep .leg { transform: scaleY(.35); }
.pep.looking .head { transform: rotate(-26deg); }
.pep.walking .leg-a { animation: step .42s ease-in-out infinite alternate; }
.pep.walking .leg-b { animation: step .42s ease-in-out infinite alternate-reverse; }
.pep.walking .bodybob { animation: bob .42s ease-in-out infinite alternate; }
.pep.walking .tail, .pep.looking .tail { animation: wag .84s ease-in-out infinite alternate; }
.pep.sniffing .head { animation: sniff .5s ease-in-out infinite alternate; }
.pep.dead .leg { animation: twitch 1.400s ease-in-out infinite; }
.pep.held .pose { transform: rotate(98deg) translate(-4px, 6px); transition: transform .2s; }
.pep.held .leg, .pep.flying .leg { animation: step .3s ease-in-out infinite alternate; }
.pep.hop .flip { animation: hop .4s ease-out 3; }
@keyframes step { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-1.600px); } }
@keyframes wag { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }
@keyframes sniff { from { transform: rotate(4deg); } to { transform: rotate(14deg); } }
@keyframes twitch { 0%, 80%, 100% { transform: rotate(0); } 88% { transform: rotate(10deg); } 94% { transform: rotate(-6deg); } }
@keyframes hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -22px; } }

.pepper-walker { position: fixed; left: 0; bottom: 0; width: 138px; height: 88px; z-index: 40; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; will-change: transform; background: none; border: 0; padding: 0; }
.pepper-walker:focus-visible { outline: 3px solid var(--yellow, #FFD43B); outline-offset: 2px; border-radius: 8px; }
.pepper-walker .flip { width: 100%; height: 100%; transition: transform .18s; }
.pepper-walker.left .flip { transform: scaleX(-1); }
.pepper-walker.held { cursor: grabbing; }
.pepper-walker .say { position: absolute; bottom: 92%; left: 50%; transform: translateX(-50%); background: var(--yellow, #FFD43B); color: var(--navy, #0F1A33); font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.35rem; line-height: 1.05; padding: 6px 12px; border-radius: 14px; width: max-content; max-width: 230px; text-align: center; opacity: 0; transition: opacity .2s; pointer-events: none; }
.pepper-walker .say.on { opacity: 1; }
.pepper-walker .say.edge-l { left: 4px; transform: none; }
.pepper-walker .say.edge-r { left: auto; right: 4px; transform: none; }
.pepper-tools { position: fixed; right: 12px; bottom: 12px; z-index: 41; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pepper-shoo, .pepper-grapebtn { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; font-weight: 700; background: var(--navy-deep, #091226); color: var(--cream, #FFF4E4); border: 1px solid var(--navy-line, #2B3D69); border-radius: 999px; padding: 0 16px; min-height: 44px; cursor: pointer; }
.pepper-shoo:hover, .pepper-grapebtn:hover { border-color: var(--yellow, #FFD43B); }
.pepper-shoo:focus-visible, .pepper-grapebtn:focus-visible { outline: 3px solid var(--yellow, #FFD43B); outline-offset: 2px; }
@media (max-width: 600px) { .pepper-walker { width: 110px; height: 70px; } }
.pepper-grapebtn { width: 44px; padding: 0; justify-content: center; font-size: 1.35rem; line-height: 1; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
/* the blanket parachute, folded away until she needs it */
.pepper-walker .chute { position: absolute; left: 50%; bottom: 52%; width: 112%; aspect-ratio: 120 / 92; transform: translateX(-50%) scale(.15, .05); transform-origin: 50% 100%; opacity: 0; transition: transform .35s cubic-bezier(.3,1.5,.5,1), opacity .2s; pointer-events: none; }
.pepper-walker .chute svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pepper-walker.chute-on { transform-origin: 50% -40%; }
.pepper-walker.chute-on .chute { opacity: 1; transform: translateX(-50%) scale(1); }
/* grapes */
.pepper-grape { position: fixed; left: 0; bottom: 0; width: 26px; height: 26px; z-index: 39; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; will-change: transform; }
.pepper-grape svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.pepper-grape.held { cursor: grabbing; z-index: 42; }
.pepper-grape.eaten svg { transition: transform .6s ease-in, opacity .6s; transform: scale(.1); opacity: 0; }
.pepper-grape:focus-visible { outline: 3px solid var(--yellow, #FFD43B); outline-offset: 2px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) {
  .pep .eye-open, .pep .bodybob, .pep .ear, .pep .tail { animation: none !important; }
  .pep.walking .leg-a, .pep.walking .leg-b, .pep.walking .bodybob, .pep.walking .tail, .pep.looking .tail, .pep.sniffing .head, .pep.dead .leg, .pep.held .leg, .pep.hop .flip { animation: none; }
  .pep .pose, .pep .head, .pepper-walker .flip { transition: none; }
}
.pepper-lost { width: 210px; height: 132px; flex: none; }

/* peeking out from behind a market card or camera */
.pepper-peek { position: absolute; z-index: 30; overflow: hidden; pointer-events: none; }
.pepper-peek__head { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; transform: translateX(-200%); -webkit-tap-highlight-color: transparent; }
.pepper-peek__head .flip { width: 100%; height: 100%; }
.pepper-peek__head:focus-visible { outline: 3px solid var(--yellow, #FFD43B); outline-offset: -3px; border-radius: 8px; }
/* hanging by her tail from the Message us button, swinging gently */
.pepper-hang { position: fixed; z-index: 40; width: 0; height: 0; transform-origin: 0 0; }
.pepper-hang__swing { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; animation: hangswing 2.200s ease-in-out infinite alternate; }
.pepper-hang--held { z-index: 43; pointer-events: none; }
.pepper-hang--held .pepper-hang__swing { animation-duration: 2.600s; animation-name: hangswing-soft; }
.pepper-hang .say { position: absolute; left: 20px; top: -44px; background: var(--yellow, #FFD43B); color: var(--navy, #0F1A33); font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.35rem; line-height: 1.05; padding: 6px 12px; border-radius: 14px; width: max-content; max-width: 200px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.pepper-hang .say.on { opacity: 1; }
@keyframes hangswing-soft { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.pepper-hang__tail { position: absolute; left: -10px; top: -10px; width: 24px; height: 46px; overflow: visible; }
.pepper-hang__pep { position: absolute; left: 0; top: 0; width: 138px; height: 88px; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 21.9% 63%; transform: translate(-21.9%, calc(34px - 63%)) rotate(90deg); -webkit-tap-highlight-color: transparent; }
.pepper-hang__pep .tail { display: none; }
.pepper-hang__pep:focus-visible { outline: 3px solid var(--yellow, #FFD43B); outline-offset: 2px; border-radius: 8px; }
@keyframes hangswing { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@media (max-width: 600px) { .pepper-hang__pep { width: 110px; height: 70px; } }
@media (prefers-reduced-motion: reduce) { .pepper-hang__swing { animation: none; } }
