/* Zoknipár — prefix sk- */
.sk-frame {
  width: min(560px, 100cqw); display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  user-select: none; -webkit-user-select: none;
}
.sk-top { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }

/* The washing line with the sock to match, held by two pegs. */
.sk-line { position: relative; width: 100%; height: var(--line-h, 92px); transition: height .3s var(--ease-out); }
.sk-rope { position: absolute; left: 0; top: 0; width: 100%; height: 26px; overflow: visible; }
.sk-rope path { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.sk-hang { position: absolute; left: 50%; top: 9px; width: 48px; height: 80px; margin-left: -20px; transform-origin: 20px 0; animation: sk-sway 4s ease-in-out infinite; }
.sk-target { position: absolute; inset: 0; }
.sk-target .sk-svg { width: 100%; height: 100%; display: block; }
/* Pegs grip the rope and just the top edge of the cuff. */
.sk-peg { position: absolute; top: -5px; width: 4px; height: 9px; border-radius: 1.5px; background: var(--game); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); z-index: 1; }
.sk-peg:nth-of-type(2) { left: 11px; }
.sk-peg:nth-of-type(3) { left: 25px; }
.sk-hang:has(.sk-happy) { animation: sk-hop .5s var(--ease-spring); }
.sk-target.sk-look { animation: sk-look 1.2s ease-in-out 2; }
@keyframes sk-sway { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
@keyframes sk-hop { 40% { translate: 0 -8px; scale: 1.08; } }
@keyframes sk-look { 50% { scale: 1.18; filter: drop-shadow(0 0 8px var(--gold)); } }
.sk-round { font-size: .86rem; color: var(--muted); font-weight: 500; }

/* The pile: every sock a button on a jittered grid (socks.js sizes it off the box). */
.sk-pile { position: relative; min-height: 200px; overflow-x: hidden; overflow-y: auto; border-radius: 18px; background: rgba(255, 255, 255, .04); }
.sk-inner { position: relative; width: 100%; }
.sk-sock {
  position: absolute; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.sk-sock .sk-svg { height: var(--sock-h, 60px); width: auto; display: block; rotate: var(--rot, 0deg); transition: transform .2s var(--ease-spring), opacity .25s; }
.sk-sock:hover .sk-svg { transform: scale(1.08); }
.sk-sock:active .sk-svg { transform: scale(.94); }
.sk-sock.sk-focus { outline: 2px solid var(--accent, #fff); outline-offset: -2px; border-radius: 10px; }
.sk-sock.sk-dim .sk-svg { opacity: .18; }
.sk-sock:disabled { cursor: default; }
.sk-sock.fx-shake .sk-svg { animation: sk-shake .4s ease-in-out; }
@keyframes sk-shake { 20% { translate: -5px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.sk-sock.sk-paired { z-index: 5; transition: transform .5s var(--ease-out); transform: translate(var(--dx), var(--dy)) scale(.9); }
.sk-in .sk-sock .sk-svg { animation: sk-drop .45s var(--ease-spring) both; animation-delay: calc(min(var(--n), 30) * 12ms); }
@keyframes sk-drop { from { opacity: 0; translate: 0 -14px; } }

@media (max-height: 640px) {
  .sk-hang { width: 38px; height: 64px; margin-left: -16px; transform-origin: 16px 0; }
  .sk-peg:nth-of-type(2) { left: 8.5px; }
  .sk-peg:nth-of-type(3) { left: 19.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-hang, .sk-in .sk-sock .sk-svg { animation: none; }
  .sk-sock.sk-paired { transition: none; }
}
