.jig-game{--jig-table:min(100%, 25rem, max(12rem, calc(var(--game-top-height,100dvh) - 22rem)));--jig-cell:calc(var(--jig-table) / var(--jig-size));--jig-grain:repeating-radial-gradient(ellipse 135% 14% at -22% 30%, #41201634 0 1px, transparent 2px 7px, #ffd4932e 9px, transparent 10px 15px), repeating-radial-gradient(ellipse 120% 9% at 116% 72%, #4a22183b 0 2px, transparent 3px 9px, #ffe0ab20 10px, transparent 11px 19px);user-select:none;isolation:isolate;background:var(--jig-grain), radial-gradient(ellipse at 26% 8%, #bd7844, #94532e 43%, #522d22 93%);border-radius:1rem;gap:.3rem;width:min(100%,29rem);margin-inline:auto;padding:.25rem .5rem .5rem;display:grid;position:relative;box-shadow:inset 0 1px #ffdb9e8c,inset 0 0 0 1px #64351f,inset 0 -3px #30171180}.jig-game:before{content:"";z-index:-1;border-radius:inherit;pointer-events:none;background:radial-gradient(at 28% 8%,#ffe0a83b,#0000 60%);position:absolute;inset:0}.jig-game[data-visible]:not([data-complete]):before{animation:9s ease-in-out infinite jig-lamplight}.pj-shell:fullscreen .jig-game{--game-top-height:100dvh}.jig-game .jig-defs{pointer-events:none;position:absolute;inset:0}.jig-game .jig-table{width:var(--jig-table);aspect-ratio:1;touch-action:none;background:repeating-linear-gradient(0deg,#906c3b0e 0 1px,#0000 1px 3px),repeating-linear-gradient(90deg,#fff9e75c 0 1px,#0000 1px 4px),radial-gradient(at 38% 28%,#fff2d6,#f1dcb7 65%,#d9bb8d);border-radius:.4rem;justify-self:center;position:relative;overflow:hidden;box-shadow:inset 0 0 0 1px #633a22ab,inset 0 3px 10px #59331659,0 0 0 1px #794123,0 -1px 0 3px #edba72,0 1px 0 4px #b8783d,0 3px 0 4px #62351f,0 5px 8px 3px #2d150fa6}.pj-shell .jig-game .jig-table:focus-visible{outline-offset:-3px;outline:3px solid #275658}.jig-game .jig-preview{pointer-events:none;opacity:.42;width:100%;height:100%;position:absolute;inset:0}.jig-game .jig-preview[data-complete]{opacity:1}.jig-game :is(.jig-set,.jig-loose,.jig-cursor,.jig-ghost){aspect-ratio:1;width:calc(100% / var(--jig-size));grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;display:grid;position:absolute;translate:-50% -50%}.jig-game :is(.jig-set,.jig-cursor,.jig-ghost){pointer-events:none}.pj-shell .jig-game :is(.jig-loose,.jig-tray button){cursor:grab;touch-action:none;min-width:0;min-height:0;box-shadow:none;background:0 0;border:0;padding:0}.jig-game .jig-art{pointer-events:none;transform-origin:50%;width:100%;transition:transform .18s;display:block;overflow:visible}.jig-game :is(.jig-set,.jig-loose,.jig-cursor,.jig-ghost) .jig-art{width:148%}.jig-game .jig-seam{fill:none;stroke-width:1.7px;stroke-linejoin:round}.jig-game .jig-cursor{z-index:1;outline-offset:-2px;background:#37867b26;outline:2px dashed #275658;box-shadow:inset 0 0 0 3px #fff4d9,0 0 9px #357c6f73}.jig-game .jig-cursor .jig-art{opacity:.65}.jig-game .jig-ghost{z-index:2;width:var(--jig-cell)}.jig-game .jig-controls{align-items:center;gap:.25rem;display:flex}.jig-game .jig-name{text-overflow:ellipsis;white-space:nowrap;color:#fff4df;text-shadow:0 1px 2px #35190f;flex:1;min-width:0;padding-left:.2rem;font-size:.8rem;font-weight:875;overflow:hidden}.pj-shell .jig-game :is(.jig-controls,.jig-pages) button{color:#fff4df;background:linear-gradient(#3d7973,#275956 54%,#1c4647);border:1px solid #98bd9e75;border-radius:.55rem;padding:0 .35rem;font-size:.8rem;font-weight:900;transition:transform .15s;box-shadow:inset 0 1px #d4ebbb59,inset 0 -2px #102d30,0 2px 3px #33190f80}.jig-game .jig-drawer{background:var(--jig-grain), linear-gradient(165deg, #c5874b, #92532e 54%, #673922);border-radius:.6rem;grid-template-columns:1fr 44px;gap:.25rem;padding:.25rem;display:grid;box-shadow:inset 0 1px #ffdfa6a6,inset 0 0 0 1px #f4ba7959,0 2px #4d291b,0 4px 7px #33180f8c}.jig-game .jig-tray{background:repeating-linear-gradient(25deg,#b9ddb51a 0 1px,#0000 1px 3px),repeating-linear-gradient(115deg,#12352e33 0 1px,#0000 1px 4px),radial-gradient(at 34% 22%,#509589,#32746e 55%,#22514f);border-radius:.35rem;grid-template:repeat(2,52px)/repeat(6,minmax(0,1fr));display:grid;box-shadow:inset 0 0 0 1px #203d32,inset 0 2px 7px #132e2bb3,0 1px #ffce8d96}.jig-game .jig-tray>span{color:#fff4df;grid-column:1/-1;align-self:center;padding:.25rem;font-size:.85rem}.jig-game .jig-tray button{border-radius:.3rem}.jig-game .jig-tray .jig-art{max-width:50px;margin-inline:auto}.jig-game .jig-pages{font-variant-numeric:tabular-nums;color:#fff4df;text-shadow:0 1px 2px #35190f;grid-template-rows:44px 16px 44px;place-items:center;font-size:.72rem;font-weight:850;display:grid}.pj-shell .jig-game .jig-pages button{color:#3b2215;background:linear-gradient(#ffe1a0,#d79852 57%,#b87539);border-color:#f7d18c;width:44px;font-size:1.25rem;line-height:1;box-shadow:inset 0 1px #fff7cc,inset 0 -3px #87491f,0 2px 3px #31190f80}.jig-game .jig-grid{pointer-events:none;fill:none;stroke:#7c563a;opacity:.36;width:100%;height:100%;stroke-width:calc(var(--jig-size) * .43);position:absolute;inset:0}.jig-game .jig-thickness{fill:#866849;stroke:#513d32;stroke-width:1px;stroke-linejoin:round}.jig-game .jig-set .jig-art{filter:drop-shadow(0 1px .5px #43291759)}.jig-game .jig-loose .jig-art,.jig-game .jig-tray .jig-art{filter:drop-shadow(0 2px 1px #291b15a6)drop-shadow(0 4px 3px #16282166)}.pj-shell .jig-game :is(.jig-loose,.jig-tray button):focus-visible{outline-offset:-2px;background:#78ae962e;outline:2px solid #275658}.pj-shell .jig-game :is(.jig-loose,.jig-tray button)[aria-pressed=true]{background:#ffe8b733;box-shadow:inset 0 0 0 2px #305f56,inset 0 0 0 4px #ffe8b0,inset 0 0 12px #ffc97766}.jig-game :is(.jig-loose,.jig-tray button)[aria-pressed=true] .jig-art{filter:drop-shadow(0 4px 2px #21333777);transform:translateY(-2px)scale(1.04)}.jig-game :is(.jig-loose,.jig-tray button):active{cursor:grabbing}.jig-game :is(.jig-loose,.jig-tray button):active .jig-art{transform:translateY(1px)scale(.97)}.jig-game .jig-ghost .jig-art{filter:drop-shadow(0 9px 5px #102a3480)drop-shadow(0 2px 1px #102a3440);transform:translateY(-4px)rotate(-2deg)scale(1.08)}.pj-shell .jig-game .jig-controls button[aria-pressed=true]{color:#263f42;background:linear-gradient(#f6d9a4,#dcb77c);border-color:#ffe8b6;box-shadow:inset 0 1px 3px #80623a66}.pj-shell .jig-game :is(.jig-controls,.jig-pages) button:active:not(:disabled){transform:translateY(1px)scale(.97);box-shadow:inset 0 2px 4px #3e261f66}.pj-shell .jig-game button:focus-visible{outline-offset:1px;outline:2px solid #fff0b6}.pj-shell .jig-game button:disabled{opacity:.4;filter:saturate(.5);cursor:default}.jig-game :is(.jig-spark,.jig-finish){pointer-events:none;position:absolute}.jig-game .jig-spark{width:calc(100% / var(--jig-size));aspect-ratio:1;translate:-50% -50%}.jig-game .jig-spark:before{content:"";background:radial-gradient(#fff7d270,#ffe6a000 70%);border-radius:40%;animation:.65s ease-out both jig-snap-glint;position:absolute;inset:-12%}.jig-game .jig-spark i{aspect-ratio:1;clip-path:polygon(50% 0,62% 37%,100% 50%,62% 63%,50% 100%,38% 63%,0 50%,38% 37%);background:#fff0b7;width:7px;animation:.7s ease-out both jig-sparkle;position:absolute;top:8%;left:78%}.jig-game .jig-spark i:nth-child(2){animation-delay:70ms;top:24%;left:8%}.jig-game .jig-spark i:nth-child(3){width:5px;animation-delay:.14s;top:81%;left:65%}.jig-game .jig-set[data-snap]{z-index:1;animation:.32s ease-out both jig-fit}.jig-game .jig-finish{inset:0;overflow:hidden;box-shadow:inset 0 0 0 2px #fff0bb9c,inset 0 0 18px #fff0bb3b}.jig-game .jig-finish:after{content:"";background:linear-gradient(110deg,#0000 40%,#fff8d855 49%,#fff8d899 50%,#0000 60%);position:absolute;inset:-50%;transform:translate(-80%)}.jig-game[data-complete][data-visible] .jig-finish:after{animation:1.7s ease-in-out .1s both jig-finish-shine}.jig-game .jig-glint{fill:none;stroke:#fff4c8;stroke-width:2.5px;stroke-linejoin:round;animation:.65s ease-out both jig-edge-glint}.pj-shell .jig-game .jig-tray button:focus-visible{outline-color:#fff1bc;box-shadow:inset 0 0 0 4px #24464e}@media (hover:hover){.jig-game :is(.jig-loose,.jig-tray button):hover:not(:disabled):not(:active) .jig-art{filter:drop-shadow(0 5px 3px #21333788);transform:translateY(-3px)rotate(-1deg)scale(1.04)}.pj-shell .jig-game .jig-controls button:hover:not(:disabled){background:linear-gradient(#46847a,#2b625d 54%,#20504e)}.pj-shell .jig-game .jig-pages button:hover:not(:disabled){background:linear-gradient(#ffedbc,#e7aa5e 57%,#c18240)}.pj-shell .jig-game .jig-controls button[aria-pressed=true]:hover{background:linear-gradient(#ffe5b5,#e9c589)}}@keyframes jig-fit{0%{scale:1.06}60%{scale:.98}to{scale:1}}@keyframes jig-snap-glint{0%{opacity:1;scale:.7}to{opacity:0;scale:1.3}}@keyframes jig-sparkle{0%{opacity:0;scale:.3}25%{opacity:1}to{opacity:0;transform:translateY(-12px)rotate(35deg)}}@keyframes jig-finish-shine{to{transform:translate(80%)}}@keyframes jig-lamplight{50%{opacity:.48}}@keyframes jig-edge-glint{0%{opacity:1}to{opacity:0}}@media (height<=38rem){.jig-game{gap:2px;padding-block:2px}.jig-game .jig-drawer{padding-block:2px}}@media (prefers-reduced-motion:reduce){.jig-game :is(.jig-spark,.jig-glint){display:none}.jig-game:before,.jig-game *,.jig-game :before,.jig-game :after{transition:none!important;animation:none!important}.jig-game :is(.jig-art,button){transform:none!important}}
