#toss, #grab {
  position:fixed; inset:0; z-index:2; display:block; width:100%; height:100%;
  pointer-events:none; overflow:hidden; user-select:none; -webkit-user-select:none;
}
#grab { fill:none; stroke:transparent; stroke-linecap:round; stroke-linejoin:round; outline:none }
#grab polyline { pointer-events:stroke; touch-action:none; cursor:grab; -webkit-tap-highlight-color:transparent }
#grab.held, #grab.held polyline { cursor:grabbing }
.stage:has(#grab:focus-visible) #frame:not(.tossing) .photo { outline:2px solid var(--focus); outline-offset:3px; border-radius:12px }
#frame.tossing .bob, #frame.tossing .shadow { opacity:0; animation:none }
.portrait-outline {
  position:absolute; inset:0; width:100%; height:100%; overflow:visible;
  pointer-events:none; fill:currentColor; fill-opacity:.065; stroke:currentColor;
  stroke-linecap:round; stroke-linejoin:round; stroke-width:1.25px;
  opacity:0; transition:opacity .2s, color .14s, fill-opacity .14s;
}
#frame.tossing:not(.hanging) .portrait-outline { opacity:.21 }
#frame.tossing.ready .portrait-outline {
  color:#1aa609; opacity:1; fill-opacity:.13; stroke-width:2px; transition-duration:.07s;
}
[data-theme="dark"] #frame.tossing.ready .portrait-outline { color:#50ff2c }
@media (prefers-reduced-motion:reduce) { .portrait-outline { transition:none } }
