#ping{position:fixed;z-index:4;width:64px;height:64px;pointer-events:none;}
#ping .ping-face{position:relative;display:block;width:64px;height:64px;padding:0;border:0;background:transparent;box-shadow:none;touch-action:none;cursor:grab;pointer-events:auto;user-select:none;}
#ping .ping-face:active{cursor:grabbing}#ping .ping-face:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
#ping .ping-face > img:first-child{width:58px;height:58px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 3px #0004)}
#ping .ping-face .ping-hand{position:absolute;width:26px;height:26px;right:0;bottom:0}
#ping .ping-bubble{position:absolute;bottom:100%;left:0;width:min(200px,calc(100vw - 16px));max-width:calc(100vw - 16px);padding:8px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--shadow);font-size:.85rem;overflow-wrap:anywhere;pointer-events:none}
#ping .ping-bubble.left{left:auto;right:0}#ping .ping-bubble.below{bottom:auto;top:100%}
@media print{#ping{display:none!important}}

#ping .ping-face[data-motion=wave] .ping-hand{animation:ping-wave .35s ease-in-out 3 alternate;transform-origin:bottom center}#ping .ping-face[data-motion=celebrate] img:first-child{animation:ping-hop .5s ease-in-out 2}#ping .ping-face[data-motion=sad] img:first-child{animation:ping-sad 1s ease-in-out}#ping .ping-face[data-motion=think] img:first-child{animation:ping-think .6s ease-in-out 2 alternate}#ping .ping-face[data-motion=breathe] img:first-child{animation:ping-breathe 1s ease-in-out}@keyframes ping-wave{from{transform:rotate(-12deg)}to{transform:rotate(24deg)}}@keyframes ping-hop{50%{transform:translateY(-7px)}}@keyframes ping-sad{50%{transform:translateY(3px) scale(.96)}}@keyframes ping-think{to{transform:rotate(-9deg)}}@keyframes ping-breathe{50%{transform:scale(1.05)}}@media(prefers-reduced-motion:reduce){#ping .ping-face img{animation:none!important}}

#ping .ping-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
#ping[hidden]{display:none!important}#ping[data-animations=false] img{animation:none!important}#ping[data-size=small],#ping[data-size=small] .ping-face{width:48px;height:48px}#ping[data-size=small] .ping-face > img:first-child{width:44px;height:44px}#ping[data-size=small] .ping-face .ping-hand{width:20px;height:20px}#ping[data-size=large],#ping[data-size=large] .ping-face{width:88px;height:88px}#ping[data-size=large] .ping-face > img:first-child{width:80px;height:80px}#ping[data-size=large] .ping-face .ping-hand{width:34px;height:34px}

#ping .ping-face .ping-prop{position:absolute;left:0;bottom:0;width:42%;height:42%;object-fit:contain;z-index:2}#ping .ping-prop[hidden]{display:none!important}

#ping .ping-face .ping-prop-0{left:0;bottom:0;width:38%;height:38%;animation:ping-prop-in .22s ease-out}#ping .ping-face .ping-prop-1{left:auto;right:0;bottom:38%;width:34%;height:34%;animation:ping-prop-in .22s ease-out}@keyframes ping-prop-in{from{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}

.ping-role-button{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-inline-start:8px;width:36px;height:36px;padding:4px;border:1px solid var(--border);border-radius:8px;background:transparent;cursor:pointer}.ping-role-button img{width:26px;height:26px;object-fit:contain}.ping-role-button:focus-visible{outline:2px solid currentColor;outline-offset:2px}@media print{.ping-role-button{display:none!important}}
.entertainment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-block:8px}.entertainment-grid button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;white-space:normal;text-align:center}.entertainment-grid img{width:36px;height:36px;object-fit:contain;flex:none}@media print{.entertainment-grid{display:none}}

#ping[data-expressivity=minimal] .ping-hand,#ping[data-expressivity=minimal] .ping-prop{display:none!important}#ping[data-expressivity=minimal] img{animation:none!important}

/* Independent accessory slots; mobile scenes keep the face unobstructed. */
#ping .ping-face{isolation:isolate;min-width:0;min-height:0;overflow:visible}
#ping .ping-face > img{object-fit:contain;pointer-events:none;max-width:none;filter:drop-shadow(0 2px 3px #0004)}
#ping .ping-face > img:first-child{position:relative;z-index:1}
#ping .ping-face .ping-hand{z-index:2}
#ping .ping-face .ping-prop{z-index:3}
@media (max-width:600px), (hover:none) and (pointer:coarse){
  #ping .ping-face:has(.ping-prop:not([hidden])) > img:first-child{position:absolute;left:15%;top:0;width:70%;height:70%;z-index:2}
  #ping .ping-face:has(.ping-prop:not([hidden])) .ping-hand{left:37%;right:auto;bottom:0;width:26%;height:26%;z-index:1}
  #ping .ping-face .ping-prop-0{left:0;right:auto;bottom:0;width:29%;height:29%;z-index:3}
  #ping .ping-face .ping-prop-1{left:auto;right:0;bottom:0;width:29%;height:29%;z-index:3}
  #ping[data-size=small] .ping-face:has(.ping-prop:not([hidden])) > img:first-child,
  #ping[data-size=large] .ping-face:has(.ping-prop:not([hidden])) > img:first-child{width:70%;height:70%}
  #ping[data-size=small] .ping-face:has(.ping-prop:not([hidden])) .ping-hand,
  #ping[data-size=large] .ping-face:has(.ping-prop:not([hidden])) .ping-hand{width:26%;height:26%}
}
