/* Meshi Zahav: canonical styles; media queries retain their cascade order. */
.puzzle-lab{--puzzle-duration:0s;width:100%;background:var(--surface);border:1px solid var(--line);border-radius:23px;padding:23px;isolation:isolate;box-shadow:0 12px 45px #26344206}
.puzzle-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.puzzle-instructions{margin:0;font-size:12px;color:var(--muted);line-height:1.6}
.puzzle-stage{position:relative;direction:ltr;height:376px;overflow:hidden;margin:8px -8px 10px;background-image:radial-gradient(#9aabb32b .8px,transparent 0);background-size:18px 18px;contain:layout;border-radius:12px}
.puzzle-target{position:absolute;pointer-events:none;overflow:visible;opacity:.7;transition:opacity .5s}
.puzzle-target polygon{fill:none;stroke:#a7b2b84a;stroke-width:.65;stroke-dasharray:3 5}
.puzzle-target .puzzle-frame{fill:none;stroke:#acb7be;stroke-width:1;stroke-dasharray:6 7}
.puzzle-piece{position:absolute;left:0;top:0;padding:0;background:transparent;border:0;border-radius:0;direction:rtl;touch-action:none;cursor:grab;transform:translate3d(var(--x),var(--y),0) rotate(var(--angle));transform-origin:center;transition:transform var(--puzzle-duration) cubic-bezier(.2,.9,.22,1);transition-delay:var(--piece-delay,0ms);will-change:transform;-webkit-user-select:none;user-select:none;z-index:2}
.puzzle-piece svg{display:block;width:100%;height:100%;pointer-events:none;overflow:visible}
.puzzle-piece polygon{fill:var(--piece-color);stroke:#fff;stroke-width:1.6;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:stroke .15s;paint-order:fill stroke}
.puzzle-word{position:absolute;font-weight:650;font-size:var(--word-size,14px);line-height:1.2;color:#263a3b;white-space:nowrap;transform:translate(-50%,-50%) rotate(calc(-1 * var(--angle)));transition:transform var(--puzzle-duration) cubic-bezier(.2,.9,.22,1);transition-delay:var(--piece-delay,0ms);pointer-events:none;text-shadow:0 1px 0 #ffffff10}
.puzzle-piece.light-word .puzzle-word{color:#fff5e1}
.puzzle-piece:focus-visible polygon{stroke:#785824;stroke-width:3}
.puzzle-piece:hover polygon{stroke:#785824;stroke-width:3}
.puzzle-piece:focus-visible{outline:none;z-index:6}
.puzzle-piece.is-dragging{cursor:grabbing;z-index:12}
.puzzle-piece.is-snapped{cursor:grab}
.puzzle-piece.is-snapped polygon{stroke:#fff;stroke-width:1.8}
.puzzle-piece.is-snapped:focus-visible polygon{stroke:#785824;stroke-width:3}
.puzzle-lab.motion-enabled .puzzle-piece,.puzzle-lab.motion-enabled .puzzle-word{transition:transform var(--puzzle-duration) cubic-bezier(.2,.9,.22,1)!important;transition-delay:var(--piece-delay,0ms)!important}
.puzzle-lab .puzzle-piece.is-dragging,.puzzle-lab .puzzle-piece.is-dragging .puzzle-word{transition:none!important}
.puzzle-lab.is-solving .puzzle-piece{pointer-events:none}
.puzzle-lab.is-complete .puzzle-target{opacity:1;filter:drop-shadow(0 0 11px #e2b66c65)}
.puzzle-lab.is-complete .puzzle-frame{stroke:#c48a31;stroke-width:2;stroke-dasharray:none}
.puzzle-meter{display:flex;align-items:center;gap:12px;padding-top:12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.puzzle-meter b{color:var(--ink);font-size:17px;font-weight:700}
.puzzle-meter>span:first-child{white-space:nowrap}
.puzzle-progress{height:4px;flex:1;overflow:hidden;border-radius:4px;background:var(--line)}
.puzzle-progress i{display:block;width:0;height:100%;border-radius:4px;background:#b78c4b;transition:width .3s}
.puzzle-square-icon{font-size:23px;line-height:1;color:#b99a6d}
.is-complete .puzzle-square-icon{color:#bc852b}
.puzzle-status{margin:11px 0 13px;min-height:35px;font-size:12px;color:var(--muted);line-height:1.6}
.puzzle-solve,.puzzle-status{display:flex;align-items:center}
.puzzle-solve{width:100%;justify-content:center;gap:17px;min-height:48px;border-radius:11px;padding:12px 14px;background:var(--yellow);color:#34260f;border:1px solid #dfa53f;font:inherit;font-size:16px;font-weight:700;box-shadow:0 4px 13px #dfa23716}
.puzzle-solve span{font-size:21px;line-height:1}
.puzzle-solve:hover{background:#ffbe51}
.puzzle-solve:disabled{background:var(--yellow-soft);border-color:var(--line);color:var(--muted);box-shadow:none;cursor:default}
.dark .puzzle-target polygon{stroke:#aebdc24a}
.dark .puzzle-target .puzzle-frame{stroke:#aebdc2}
.dark .puzzle-piece polygon{stroke:#263239}
.dark .puzzle-piece:focus-visible polygon{stroke:#e9bd74;stroke-width:3}
.dark .puzzle-piece:hover polygon{stroke:#e9bd74;stroke-width:3}
.dark .puzzle-piece.is-snapped polygon{stroke:#263239}
.dark .puzzle-piece.is-snapped:focus-visible polygon{stroke:#e9bd74}
.footer{justify-content:space-between}
}
.puzzle-lab{padding:18px 14px;border-radius:18px}
.puzzle-stage{height:406px;margin-inline:-5px}
.puzzle-instructions{font-size:11px}
.puzzle-solve{font-size:14px;gap:10px;padding-inline:8px}
.puzzle-meter{gap:9px;font-size:11px}
.puzzle-status{font-size:11px;min-height:36px}
.puzzle-word{font-weight:700}
}
@media(min-width:981px){.puzzle-stage{height:320px}
.puzzle-status{min-height:30px}
.puzzle-lab{padding:18px;height:auto}
}
.puzzle-actions{display:flex;align-items:stretch;gap:8px}
.puzzle-actions .puzzle-solve{flex:1;min-width:0;width:auto}
.puzzle-actions .puzzle-reset{flex:0 0 44px;display:grid;place-items:center;width:44px;min-height:48px;padding:0;background:var(--bg);border:1px solid var(--line);border-radius:11px;color:var(--ink);font-size:25px}
.puzzle-actions .puzzle-reset:hover{background:var(--yellow-soft);border-color:#d8b276}
@media(max-width:500px){.puzzle-actions .puzzle-solve>span{display:none}
}

