@font-face{font-family:PuzzleYekan;src:url('../fonts/BYekan.ttf');font-display:swap}
body.puzzle-adventure .wrapper{background:#24bbb4!important}
#puzzleWorld,#puzzleWorld *{box-sizing:border-box;font-family:PuzzleYekan,Tahoma,sans-serif}
#puzzleWorld{width:calc(100% - 24px);max-width:1200px;margin:20px auto;padding:16px;background:#fff5cf;border:4px solid white;border-radius:27px;box-shadow:0 8px #128b99;color:#573b73}
#puzzleWorld header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding:12px;background:linear-gradient(#a975ef,#824ad3);border:3px solid #dec0ff;border-radius:18px;box-shadow:0 4px #603293}
#puzzleWorld h1{color:white;text-shadow:0 3px #603293;margin:0;font-size:28px}
#puzzleWorld header a{justify-self:start;color:#563813;text-decoration:none}#puzzleWorld header button{justify-self:end}
#puzzleWorld button,#puzzleWorld header a,#puzzleWorld .pz-upload{border:2px solid white;border-radius:12px;padding:8px 13px;background:linear-gradient(#ffe779,#ffbf25);box-shadow:0 4px #c99013;color:#513b12;cursor:pointer;font-size:15px;transition:transform .18s}
#puzzleWorld button:hover{transform:translateY(-2px)}#puzzleWorld :focus-visible{outline:3px solid #f338a2;outline-offset:3px}
#puzzleWorld .pz-settings,#puzzleWorld .pz-actions{display:flex;justify-content:center;align-items:center;gap:14px;flex-wrap:wrap;margin:16px 0}
#puzzleWorld label{margin:0;font-size:14px}#puzzleWorld select{padding:7px;border:2px solid #b384dd;border-radius:10px;background:white;color:#513568;max-width:100%}
#puzzleWorld .pz-upload{background:linear-gradient(#44ddc0,#12ad8c);color:white;box-shadow:0 4px #098167;position:relative;overflow:hidden}#pzUpload{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}#puzzleWorld .pz-upload:focus-within{outline:3px solid #f338a2}
#pzStatus{text-align:center;font-size:17px;min-height:28px;margin:12px 0}#pzCount{text-align:center;margin:6px}
#puzzleWorld .pz-progress{height:10px;background:#e2cc89;border-radius:20px;max-width:650px;margin:auto;overflow:hidden}#pzProgress{display:block;background:linear-gradient(90deg,#ff70b4,#a652e7);height:100%;width:0;transition:width .3s}
#puzzleWorld .pz-work{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:15px;direction:ltr;align-items:start}
#puzzleWorld .pz-board-scroll{overflow:auto;border:5px solid #d3b3f2;border-radius:14px;background:#c4eadf;max-height:75vh;padding:8px;direction:ltr}
#pzBoardWrap{min-width:100%;aspect-ratio:1;background:#fffaf0;box-shadow:0 4px 14px #48326233}
#pzBoard{display:block;width:100%;height:100%;overflow:visible}
#pzBoard [data-slot]{cursor:pointer}#pzBoard [data-slot]:focus{fill:#ffbde2;outline:none;stroke:#cb2297;stroke-width:5}
#puzzleWorld aside{direction:rtl;background:#e8ddff;border:3px solid white;border-radius:17px;padding:9px}#puzzleWorld h2{font-size:18px;text-align:center;margin:4px 0 10px}
#pzTray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:66vh;overflow:auto;padding:5px;align-content:start}
#puzzleWorld .pz-piece{aspect-ratio:1;padding:2px;border:2px solid transparent;background:#fff9;box-shadow:none;min-width:0;border-radius:10px;touch-action:none}
#puzzleWorld .pz-piece svg{display:block;width:100%;height:100%;filter:drop-shadow(0 3px 2px #49345355)}
#puzzleWorld .pz-piece[aria-pressed=true]{border-color:#e938a7;background:#ffe990;box-shadow:0 0 0 2px #ffc82c}
.pz-drag{position:fixed;width:100px;height:100px;transform:translate(-50%,-50%);pointer-events:none;z-index:20000;border:0;background:transparent;filter:drop-shadow(0 5px 7px #0005)}.pz-drag svg{width:100%;height:100%}
#pzSave{text-align:center;font-size:13px;color:#196b51;margin:15px 0 7px}#puzzleWorld>small{display:block;text-align:center;font-size:12px;line-height:1.8}
#pzSound{position:relative;font-size:23px!important}#pzSound.muted:after{content:'';position:absolute;left:4px;right:4px;top:50%;height:3px;background:#c51e5b;transform:rotate(-45deg)}
.pz-heart{position:fixed;pointer-events:none;z-index:25000;font-size:29px}
#puzzleWorld .pz-tray-nav{display:flex;gap:5px;justify-content:center;margin-top:10px}#puzzleWorld .pz-tray-nav button{font-size:11px;padding:6px}
.pz-wrong{animation:pzWiggle .3s}@keyframes pzWiggle{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@media(max-width:720px){#puzzleWorld{padding:9px;margin:10px 6px;width:calc(100% - 12px)}#puzzleWorld h1{font-size:19px}#puzzleWorld header{padding:8px;gap:5px}#puzzleWorld header a{font-size:10px;padding:7px}#puzzleWorld .pz-settings,#puzzleWorld .pz-actions{gap:8px;margin:12px 0}#puzzleWorld label,#puzzleWorld select{font-size:12px}#puzzleWorld .pz-work{grid-template-columns:1fr}#pzTray{grid-template-columns:repeat(5,minmax(0,1fr));max-height:260px}#puzzleWorld .pz-board-scroll{max-height:65vh}#pzStatus{font-size:14px}#puzzleWorld button{font-size:13px}}
@media(prefers-reduced-motion:reduce){#puzzleWorld *{animation:none!important;transition:none!important}.pz-heart{display:none}}
