:root{--purple:#786096;--paper:#faf8f3;--ink:#53465c}body{background:var(--paper)}.game-header{max-width:1440px;width:100%;margin:auto;padding:16px 30px;border-bottom:1px solid #e9e2d9}.game-title{font-size:20px;font-weight:800}.game-main{max-width:1240px;padding:18px 30px}.new-game .round-heading{margin:0 0 12px}.new-game .round-heading h2{font-size:21px}.round-progress{font-size:14px}.new-game .coach{background:transparent;padding:0;min-height:38px;margin:0 0 12px}.new-game .coach img{width:34px;height:34px}.new-game .coach p{font-size:15px;color:#817187}.visual-board{display:block;min-height:0;border:1px solid #e7dfd3;background:#fffdf9;padding:18px;border-radius:28px;box-shadow:0 12px 40px #65513c05}.puzzle-help{display:flex;align-items:center;gap:16px;margin:0 0 14px}.help-example{display:flex;align-items:center;gap:8px;background:#f2edf6;border-radius:16px;padding:6px 12px;color:#927bab;font-size:23px}.help-example svg{width:34px;height:34px}.help-example .tiny-hole svg{filter:grayscale(1);opacity:.3}.puzzle-help p{margin:0;font-weight:800;font-size:16px}.puzzle-help small{display:block;font-weight:400;color:#938899;font-size:12px;margin-top:4px}.puzzle-workspace{display:grid;grid-template-columns:minmax(0,1fr) 218px;gap:20px;align-items:start}.scene-wrap{position:relative;isolation:isolate;border-radius:22px;overflow:hidden;border:1px solid #e9e0d7;align-self:start}.puzzle-scene{width:100%;display:block;aspect-ratio:8/5}.scene-piece.empty{filter:url(#ghost)}.scene-piece.empty:not(.action){opacity:1}.slot-layer{position:absolute;inset:0}.puzzle-slot{position:absolute;background:transparent;border:2px dashed #aa93ba;border-radius:18%;padding:0;min-height:44px;min-width:44px;cursor:pointer;touch-action:manipulation;transition:background .15s,border-color .15s}.puzzle-slot:not(.filled){background:#fffaf128;box-shadow:inset 0 0 0 3px #fffdf960}.puzzle-slot:hover,.has-selection .puzzle-slot:not(.filled){border-color:#806297;background:#e9ddf348}.puzzle-slot.filled{border-color:transparent;box-shadow:none;opacity:1;background:transparent;pointer-events:none}.puzzle-slot:focus-visible{outline:3px solid #75548f;outline-offset:3px}.puzzle-slot.next-target{border-color:#a7793f;box-shadow:0 0 0 4px #f1d4a04f;background:#fff5d341}.puzzle-slot.action-slot{border-radius:50%;background:#fff5e1d9;min-width:44px;min-height:44px}.piece-panel{min-width:0}.tray-heading{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:800;letter-spacing:.2px;color:#8a7892;margin:3px 0 12px}.piece-count{font-size:12px;color:#a095a4}.puzzle-tray{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.new-game .puzzle-piece{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:100px;min-width:0;padding:10px 7px;border:1px solid #e5dce9;border-radius:18px;background:#faf7fc;box-shadow:0 3px 0 #ede6f0;color:#7a6388;font-size:12px;font-weight:700;touch-action:none;user-select:none;-webkit-user-select:none;transition:background .15s,opacity .15s}.puzzle-piece svg{width:61px;height:61px;pointer-events:none;overflow:visible}.puzzle-piece span{pointer-events:none;white-space:nowrap;font-size:11px}.puzzle-piece:hover{background:#f0e8f6}.puzzle-piece[aria-pressed=true]{border-color:#8963a5;box-shadow:0 0 0 3px #cbb3df;background:#f0e7f7}.puzzle-piece i{display:none}.puzzle-piece.placed{opacity:.25;background:#edf2e7;box-shadow:none}.puzzle-piece.placed i{display:grid;place-items:center;position:absolute;right:5px;top:5px;width:20px;height:20px;border-radius:50%;background:#6f9273;color:white;font-style:normal}.drag-art{display:grid;place-items:center;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;outline:none!important;opacity:1!important}.drag-art>svg,.drag-art>img{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}.drag-art>.card-art{display:block!important}.snapped{animation:snap .35s ease-out;transform-box:fill-box;transform-origin:center}.try-again{animation:nudge .3s}.next-step{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:14px;padding:10px 5px;background:#f9f0dc;border-radius:14px;font-size:12px;color:#a07c4e}.next-step svg{width:32px;height:32px}.next-step strong{font-size:12px}.scene-celebration{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#fffdf2e8;border-radius:30px;padding:10px 20px;font-weight:800;color:#6a8564}.new-game .round-actions{margin-top:14px}.round-actions .secondary-button{font-size:13px;min-height:44px;padding:10px 18px}.puzzle-result{width:min(720px,82vw);margin:20px auto 0;border-radius:24px;overflow:hidden;border:1px solid #e6ded3}.game-intro:has(.puzzle-result){max-width:900px;padding-top:5px}.game-intro:has(.puzzle-result)>img{width:72px;height:72px}.game-intro:has(.puzzle-result)>h2{font-size:27px;margin-top:10px}.game-intro:has(.puzzle-result) .win-stars{font-size:32px;margin:12px 0}.game-intro:has(.puzzle-result) p{font-size:13px}.mixed .scene-pieces{transform-box:fill-box;transform-origin:center;animation:mix .6s}.baked [data-art=cheese]{filter:sepia(.2) saturate(1.4)}.levels{gap:12px}.levels button{border-radius:18px!important}.game-intro>img{filter:drop-shadow(0 10px 18px #b4a0c630)}.game-intro>p{color:#8a7d91}@keyframes snap{0%{transform:scale(.84)}65%{transform:scale(1.06)}100%{transform:scale(1)}}@keyframes nudge{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@keyframes mix{25%{transform:rotate(6deg)}75%{transform:rotate(-6deg)}}
@media(max-width:900px){.puzzle-workspace{grid-template-columns:1fr;gap:14px}.piece-panel{display:block}.puzzle-tray{grid-template-columns:repeat(7,minmax(0,1fr))}.puzzle-tray:has(>button:nth-child(5):last-child){grid-template-columns:repeat(5,minmax(0,1fr))}.puzzle-tray:has(>button:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}.puzzle-tray:has(>button:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}.puzzle-tray:has(>button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}.puzzle-tray:has(>button:only-child){grid-template-columns:1fr;max-width:150px;margin:auto}.new-game .puzzle-piece{min-height:90px;padding:7px}.puzzle-piece svg{width:56px;height:56px}.tray-heading{margin-bottom:9px}.next-step{margin-top:10px;padding:6px}.scene-wrap{width:100%}}
@media(max-width:600px){.game-header{padding:10px 12px;gap:7px}.game-title{font-size:15px;line-height:1.25;max-width:160px}.back-link{min-height:44px}.game-header .icon-button{width:40px;height:40px}.game-main{padding:14px 10px}.new-game .round-heading h2{font-size:17px}.new-game .coach{margin-bottom:8px;gap:8px}.new-game .coach p{font-size:12px}.round-progress{font-size:11px}.visual-board{padding:10px;border-radius:20px}.puzzle-help{gap:9px;margin-bottom:10px}.help-example{padding:5px 7px;gap:3px;border-radius:12px}.help-example svg{width:25px;height:25px}.puzzle-help p{font-size:13px}.puzzle-help small{font-size:10px;line-height:1.35}.puzzle-slot{border-width:1.5px}.puzzle-tray{grid-template-columns:repeat(4,minmax(0,1fr))!important}.puzzle-tray:has(>button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important}.puzzle-tray:has(>button:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))!important}.puzzle-tray:has(>button:only-child){grid-template-columns:1fr!important}.puzzle-piece span{font-size:10px}.new-game .puzzle-piece{min-height:85px;padding:6px 3px;border-radius:13px}.puzzle-piece svg{width:50px;height:50px}.puzzle-tray{gap:8px}.new-game .result-actions{gap:8px}.result-actions .secondary-button,.result-actions .primary-button{font-size:12px;padding:10px 15px;min-height:44px}.game-intro{padding:12px 6px}.puzzle-result{width:90vw}.game-intro:has(.puzzle-result)>img{display:none}}
@media(max-height:600px) and (min-width:650px){.game-header{padding:7px 20px}.game-main{padding:8px 20px}.puzzle-workspace{grid-template-columns:minmax(0,1fr) 218px}.puzzle-tray{grid-template-columns:repeat(2,minmax(0,1fr))!important}.puzzle-scene{max-height:52vh}.scene-wrap{max-width:83.2vh}.new-game .coach{display:none}.puzzle-help small{display:none}.visual-board{padding:10px}.new-game .puzzle-piece{min-height:70px}.puzzle-piece svg{width:44px;height:44px}.puzzle-help{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* The outline follows the object itself; invisible buttons only enlarge touch targets. */
.puzzle-slot:not(.filled),.puzzle-slot:hover,.has-selection .puzzle-slot:not(.filled){border-color:transparent;background:transparent;box-shadow:none}.puzzle-slot.next-target{border:2px dashed #b28c50;background:#fff3c819;box-shadow:none}.puzzle-slot.action-slot{background:#fff5e1cc;border:2px dashed #ad8d5e}.scene-piece.empty{filter:url(#ghost)}
#title:focus,#win-title:focus{outline:none}
