/* Jigsaw (js/games/jigsaw.js). Kit styles: css/game.css. */


/* the table */
.jz-room { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: var(--surface-100); }
.jz-board { position: absolute; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.jz-piece { position: absolute; left: 0; top: 0; will-change: transform; cursor: grab; }
.jz-piece.jz-held { cursor: grabbing; }
.jz-piece.jz-placed { cursor: default; pointer-events: none; }
.jz-piece[hidden] { display: none; }
.jz-target {
  position: absolute; z-index: 3; pointer-events: none; border-radius: 6px;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 8px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: jz-pulse 1.1s ease-in-out 3;
}
@keyframes jz-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.jz-nope { animation: jz-shake .38s ease; }
@keyframes jz-shake { 0%, 100% { translate: 0 0; } 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }
/* keyboard play (js/games/keynav.js): the board's places are invisible buttons over the board;
   focus is one ring drawn above the pieces (the toolbar still sits above it) */
.jz-spots { position: absolute; inset: 0; pointer-events: none; }
.jz-spot { position: absolute; pointer-events: none; }
.kn-root .jz-piece:focus, .kn-root .jz-spot:focus { outline: none; }
.jz-room .kn-frame {
  position: absolute; z-index: 6; pointer-events: none; box-sizing: border-box; border-radius: 6px;
  outline: 3px solid var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 3px rgba(0, 0, 0, .35);
}
:root[data-theme="light"] .jz-room .kn-frame { box-shadow: 0 0 0 3px rgba(255, 255, 255, .6); }
.jz-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-6); color: var(--ink-muted); text-align: center; }
.jz-done .jz-board { box-shadow: 0 0 0 2px var(--positive), 0 12px 40px rgba(0, 0, 0, .35); transition: box-shadow .6s ease; }

/* page credits list */
.credits { font-size: .8rem; line-height: 1.5; color: var(--ink-muted); columns: 2 22rem; column-gap: var(--space-6); }
.credits li { break-inside: avoid; margin: 0 0 .4rem; }
.credits a { color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  .jz-target { animation: none; opacity: 1; }
  .jz-nope { animation: none; }
}
