/* Estilos isolados dos quebra-cabeças; a prévia do menu continua no fluxo. */
.puzzle-game{max-width:760px;margin:auto}.puzzle-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.puzzle-toolbar h2{font-size:25px;line-height:1.15;text-align:center;margin:0}.puzzle-toolbar .game-button{flex-shrink:0}.puzzle-controls{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 8px}.puzzle-difficulty{display:flex;padding:3px;gap:3px;border-radius:13px;background:#eaf1fb}.puzzle-difficulty button{min-height:44px;min-width:79px;padding:6px 10px;border-radius:10px;background:transparent;font-size:14px;font-weight:750;color:#536579}.puzzle-difficulty button[aria-pressed=true]{background:#536579;color:#fff}.puzzle-help{min-height:44px;padding:7px 12px;border:1px solid #89a2c3;border-radius:12px;background:#fffef7;font-size:13px;font-weight:700;color:#536579}.puzzle-help[aria-pressed=true]{background:#eaf1fb}.puzzle-caption{display:flex;align-items:center;justify-content:center;gap:13px;font-size:17px;color:#536579;margin-bottom:9px}.puzzle-caption span{font-size:13px;color:#536579}.puzzle-workspace{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:14px;align-items:center}.puzzle-stage{min-width:0;width:100%;display:flex;align-items:center;justify-content:center}.puzzle-board{position:relative;flex-shrink:0;width:100%;max-width:430px;aspect-ratio:6/5;background:#eaf1fb;border:2px solid #89a2c3;border-radius:18px;box-shadow:0 5px 0 #eaf1fb;overflow:hidden;touch-action:manipulation}.puzzle-board-art,.puzzle-slots{position:absolute;inset:0}.puzzle-board-art{pointer-events:none}.puzzle-board-art>svg{display:block;width:100%;height:100%;overflow:visible}.puzzle-outline{fill:none;stroke:#89a2c3;stroke-width:2.2;stroke-dasharray:5 4;stroke-linejoin:round}.puzzle-outline.is-placed{stroke:#eaf1fb;stroke-width:1.5;stroke-dasharray:none}.puzzle-outline.is-selected{stroke:#3566a8;stroke-width:4;stroke-dasharray:none;filter:drop-shadow(0 0 3px #c9d8ed)}.puzzle-outline.is-hovered{stroke:#3566a8;stroke-width:5}.puzzle-slot{position:absolute;min-width:44px;min-height:44px;border:0;padding:0;background:transparent;touch-action:manipulation;border-radius:18px;z-index:1}.puzzle-slot.is-selected{background:#eaf1fb2b;box-shadow:inset 0 0 0 2px #89a2c377}.puzzle-slot.is-selected::after{content:"";position:absolute;inset:5px;border:2px dashed transparent;border-radius:18px;pointer-events:none}.puzzle-slot.is-hovered{background:#eaf1fb66;z-index:3}.puzzle-slot.is-hovered::after{inset:0;border-color:#3566a8}.puzzle-slot:focus-visible{outline:4px solid #2b72c1;outline-offset:-5px}.puzzle-slot:disabled{pointer-events:none;opacity:1!important}.puzzle-parts-wrap{min-width:0;width:100%}.puzzle-parts-title{text-align:center;font-size:13px;font-weight:700;color:#536579;margin:0 0 7px}.puzzle-parts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch}.puzzle-piece{position:relative;overflow:hidden;width:100%;display:flex;align-items:center;justify-content:center;min-width:0;min-height:96px;aspect-ratio:1/1.03;padding:4px;border:2px solid #c9d8ed;border-bottom-width:4px;border-radius:16px;background:#fffef8;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.puzzle-piece-art{display:block;overflow:hidden;width:100%;height:100%;pointer-events:none}.puzzle-piece-art>svg{width:100%;height:100%;display:block;pointer-events:none;overflow:hidden}.puzzle-piece.is-selected{border-color:#536579;background:#eaf1fb;box-shadow:0 0 0 2px #c9d8ed}.puzzle-piece.is-dragging{opacity:.45}.puzzle-piece.is-used{opacity:.4}.puzzle-check{position:absolute;right:5px;bottom:1px;font-weight:800;color:#3566a8;font-size:20px}.puzzle-message{min-height:20px;margin:11px 0 0;font-size:13px;line-height:1.4;color:#536579;font-weight:600;text-align:center}.puzzle-complete-label{position:absolute;bottom:7px;left:50%;transform:translateX(-50%);padding:4px 12px;border-radius:12px;background:#fffff4e8;color:#3566a8;font-size:17px;line-height:1.25;font-weight:750;white-space:nowrap;pointer-events:none}.puzzle-complete-label:empty{display:none}.puzzle-drag-ghost{position:fixed;z-index:85;pointer-events:none;transform:translate(-50%,-50%);filter:drop-shadow(0 3px 4px #53657945)}.puzzle-drag-ghost>svg{width:100%;height:100%;display:block;overflow:visible}.puzzle-fireworks{position:absolute;inset:0;z-index:5;overflow:hidden;pointer-events:none}.puzzle-fireworks>span{position:absolute;width:1px;height:1px}.puzzle-fireworks i{position:absolute;width:5px;height:11px;border-radius:5px;background:var(--color);opacity:0;animation:puzzle-soft-firework 2s var(--delay) ease-out 1}.puzzle-fireworks i:nth-child(even){width:6px;height:6px}@keyframes puzzle-soft-firework{0%{opacity:0;transform:rotate(var(--angle)) translateY(0)}12%{opacity:.8}80%{opacity:.4}100%{opacity:0;transform:rotate(var(--angle)) translateY(-84px)}}
.puzzle-picker,.puzzle-success{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:18px;background:#3566a870;overflow-y:auto}.puzzle-picker-card,.puzzle-success-card{position:relative;width:min(100%,440px);max-height:calc(100vh - 36px);overflow:auto;padding:20px;border-radius:26px;border:3px solid #c9d8ed;background:#fffef7;box-shadow:0 15px 35px #24344b33;text-align:center}.puzzle-picker h3,.puzzle-success h3{margin:0 0 14px;color:#3566a8;font-size:25px}.puzzle-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.puzzle-figures button{min-width:0;padding:6px 4px 9px;border:2px solid #c9d8ed;border-radius:15px;background:#fff;font-weight:700;font-size:12px}.puzzle-figures button[aria-current=true]{border-color:#536579;background:#eaf1fb}.puzzle-figures button>svg{display:block;width:100%;height:auto;aspect-ratio:6/5;pointer-events:none;border-radius:9px;overflow:hidden}.puzzle-figures button>span{display:block;margin-top:4px}.puzzle-picker-close{margin-top:15px;width:100%}.puzzle-success-card{width:min(100%,365px)}.puzzle-success-star{display:block;font-size:45px;line-height:1;color:#d8af4c}.puzzle-success h3{margin:8px 0 7px;font-size:28px}.puzzle-success p{font-size:15px;color:#536579;margin:0 0 17px}.puzzle-restart{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;width:100%;min-height:138px;border:2px solid #3566a8;border-bottom-width:5px;border-radius:22px;background:#3566a8;color:white}.puzzle-restart>span{font-family:Arial,sans-serif;font-size:72px;line-height:1}.puzzle-restart strong{font-size:20px}.puzzle-next{min-height:50px;width:100%;margin-top:11px;border:2px solid #c9d8ed;border-radius:13px;background:#eaf1fb;color:#536579;font-size:16px;font-weight:750}.puzzle-return{min-height:44px;width:100%;margin-top:6px;background:transparent;font-size:13px;color:#536579}
@media(max-width:649px){.puzzle-toolbar h2{font-size:21px}.puzzle-toolbar .game-button{padding:7px 9px;font-size:12px}.puzzle-controls{gap:8px;margin-bottom:7px}.puzzle-difficulty button{font-size:13px;min-width:75px}.puzzle-help{font-size:12px;padding:7px 9px}.puzzle-workspace{display:flex;flex-direction:column;gap:12px}.puzzle-caption{margin-bottom:7px}.puzzle-parts-title{margin-bottom:4px;font-size:12px}.puzzle-parts{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.puzzle-game[data-puzzle-count="6"] .puzzle-parts{grid-template-columns:repeat(3,minmax(0,1fr))}.puzzle-piece{min-height:68px;aspect-ratio:1.1/1;padding:2px;border-radius:12px}.puzzle-game[data-puzzle-count="6"] .puzzle-piece{aspect-ratio:1.8/1;min-height:62px}.puzzle-message{font-size:12px;margin-top:8px}.puzzle-board{border-radius:15px}.puzzle-complete-label{font-size:15px}}
@media(max-width:360px){.puzzle-toolbar{gap:4px}.puzzle-toolbar h2{font-size:18px}.puzzle-toolbar .game-button{font-size:11px;padding:6px 7px}.puzzle-controls{gap:6px}.puzzle-difficulty button{min-width:67px;padding:5px 8px;font-size:12px}.puzzle-help{font-size:11px;padding:5px 8px}.puzzle-caption{font-size:16px}.puzzle-parts{gap:4px}.puzzle-piece{min-height:64px}.puzzle-picker-card{padding:14px}.puzzle-figures{gap:5px}.puzzle-figures button{font-size:10px}}
@media(max-height:650px){.puzzle-playing .header{display:none}.puzzle-playing .shell{padding-top:7px}.puzzle-toolbar{margin-bottom:5px}.puzzle-caption{margin-bottom:6px}.puzzle-workspace{gap:8px}.puzzle-message{margin-top:7px}}
@media(max-height:500px) and (orientation:landscape){.puzzle-toolbar h2{font-size:20px}.puzzle-toolbar .game-button{min-height:36px;padding:5px 9px}.puzzle-controls{margin-bottom:4px;gap:9px}.puzzle-difficulty{padding:2px}.puzzle-difficulty button{min-height:35px}.puzzle-help{min-height:37px}.puzzle-caption{font-size:15px;margin-bottom:5px}.puzzle-workspace{grid-template-columns:minmax(0,1fr) minmax(220px,.85fr);gap:14px;align-items:start}.puzzle-parts{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.puzzle-piece{aspect-ratio:auto;height:var(--puzzle-compact-piece-height,62px);min-height:44px;max-height:94px;padding:2px}.puzzle-parts-title{font-size:11px;margin-bottom:4px}.puzzle-message{font-size:11px;min-height:15px;margin-top:4px}.puzzle-picker-card{max-width:600px;padding:13px}.puzzle-figures{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.puzzle-picker h3{font-size:21px;margin-bottom:9px}.puzzle-picker-close{margin-top:9px;min-height:35px}.puzzle-success{padding:10px}.puzzle-success-card{max-height:calc(100vh - 20px);padding:11px 18px}.puzzle-success-star{font-size:24px}.puzzle-success h3{font-size:23px;margin:4px 0}.puzzle-success p{font-size:13px;margin-bottom:9px}.puzzle-restart{min-height:95px}.puzzle-restart>span{font-size:52px}.puzzle-restart strong{font-size:17px}.puzzle-next{min-height:42px;margin-top:7px;font-size:14px}.puzzle-return{min-height:36px;margin-top:4px}}
.high-contrast .puzzle-board,.high-contrast .puzzle-piece,.high-contrast .puzzle-figures button{border-color:#89a2c3}.high-contrast .puzzle-outline{stroke:#536579}.high-contrast .puzzle-outline.is-selected{stroke:#24344b}.high-contrast .puzzle-caption span,.high-contrast .puzzle-message{color:#24344b}
@media(prefers-reduced-motion:reduce){.puzzle-fireworks{display:none}.puzzle-drag-ghost,.puzzle-piece,.puzzle-slot{transition:none!important;animation:none!important}}

/* A softly lit puzzle board and thick, tactile pieces, with unchanged tabs. */
.puzzle-board{background:#edf2f8;border-color:#afc1d8;box-shadow:0 5px 0 #ccd8e6,0 10px 18px #24344b0e}
.puzzle-piece{background:linear-gradient(145deg,#ffffff,#edf3fa);border-color:#c2d2e6;box-shadow:inset 0 1px 0 #fff,0 3px 5px #24344b0b}
.puzzle-game .puzzle-piece.is-selected{background:linear-gradient(145deg,#f7fbff,#e1edff);border-color:#3566a8;box-shadow:0 0 0 3px #3566a81e,inset 0 1px 0 #fff}
.puzzle-piece-art{filter:drop-shadow(0 1px 1px #3e567019)}
.puzzle-piece.is-used{box-shadow:none}
.puzzle-outline{stroke:#8fa5bd;stroke-width:2;stroke-dasharray:5 4}
.puzzle-outline.is-placed{stroke:#f9fcff;stroke-width:1.5;stroke-dasharray:none}
.puzzle-outline.is-selected{fill:#d8eaff45;stroke:#3566a8;stroke-width:4;filter:drop-shadow(0 0 2px #8cadd24d)}
.puzzle-slot.is-selected{background:#dcecff1a;box-shadow:none}
.puzzle-slot.is-selected::after{border-color:transparent}
.puzzle-outline.is-hovered{fill:#cce3ff66;stroke:#28548b;stroke-width:4.5}
.puzzle-slot.is-hovered{background:#e9f3ff22}
.puzzle-slot.is-hovered::after{border-color:transparent}
.puzzle-placed-surface,.puzzle-board-art>svg{transform-box:fill-box;transform-origin:center}
.puzzle-figures button{background:linear-gradient(145deg,#ffffff,#f0f5fc);border-color:#c2d2e6;box-shadow:0 2px 0 #d7e2ef}
.puzzle-figures button[aria-current=true]{border-color:#3566a8;background:#e8f1ff}
.high-contrast .puzzle-piece,.high-contrast .puzzle-board{border-color:#536b86}
.high-contrast .puzzle-outline.is-selected,.high-contrast .puzzle-outline.is-hovered{stroke:#244b80;fill:#d2e5ff66;filter:none}
.high-contrast .puzzle-game .puzzle-piece.is-selected{border-color:#244b80;background:#e8f1ff}

/* Eighteen painted toy illustrations; shared visual controls keep their names
   for assistive technology without requiring the child to read a button. */
.puzzle-toolbar{display:grid;grid-template-columns:64px minmax(0,1fr) 64px;gap:8px;align-items:center}
.puzzle-toolbar h2{font-size:23px;overflow-wrap:normal;line-height:1.1}
.puzzle-toolbar .game-icon-button{width:64px;height:64px;min-height:64px;padding:10px}
.puzzle-controls{gap:9px;min-height:64px;justify-content:center}
.puzzle-toolbar-restart{flex:0 0 64px}
.puzzle-difficulty button{min-width:61px;padding:5px 6px;font-size:12px}
.puzzle-help{width:69px;padding:5px;font-size:11px;line-height:1.2}
.puzzle-piece-art image,.puzzle-board-art image{pointer-events:none}
.puzzle-picker-card{width:min(100%,760px);padding:18px;background:#f7faff}
.puzzle-picker-heading{display:flex;gap:12px;align-items:center;margin-bottom:16px}
.puzzle-picker-heading h3{flex:1;margin:0;padding-right:64px;font-size:24px}
.puzzle-picker-heading .puzzle-picker-close{flex:0 0 64px;width:64px;height:64px;margin:0}
.puzzle-figures{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.puzzle-figures button{padding:5px 5px 9px;font-size:13px;border-width:2px;border-bottom-width:4px;border-radius:17px;overflow:hidden;color:#24344b;box-shadow:0 4px 8px #24344b0b}
.puzzle-figures button>svg{border-radius:11px;aspect-ratio:6/5}
.puzzle-figures button>span{margin-top:6px}
.puzzle-success-card .puzzle-restart{width:124px;height:124px;min-height:124px;border-radius:28px;display:flex;align-items:center;justify-content:center;margin:0 auto;padding:18px;background:linear-gradient(145deg,#4d86cf,#3566a8);color:white;border:2px solid #29598f;border-bottom-width:5px}
.puzzle-success-card .puzzle-restart svg{width:82px;height:82px}
.puzzle-success-options{display:flex;align-items:center;justify-content:center;gap:15px;margin-top:16px}
.puzzle-success-options .puzzle-next,.puzzle-success-options .puzzle-return{width:64px;height:64px;min-height:64px;margin:0;padding:10px;border:2px solid #afc1d8;border-bottom-width:4px;border-radius:17px;background:#edf4ff;color:#3566a8}
.puzzle-success-options svg{width:40px;height:40px}
@media(max-width:400px){.puzzle-toolbar h2{font-size:18px}.puzzle-toolbar{gap:4px}.puzzle-controls{gap:6px}.puzzle-difficulty button{min-width:56px;padding:5px 4px;font-size:11px}.puzzle-help{width:61px;padding:4px;font-size:10px}.puzzle-picker-card{padding:12px}.puzzle-picker-heading{gap:8px}.puzzle-picker-heading h3{font-size:19px;padding-right:0}.puzzle-figures{gap:7px}.puzzle-figures button{font-size:11px;padding:4px 4px 7px;border-radius:12px}}
@media(max-height:500px) and (orientation:landscape){.puzzle-toolbar{grid-template-columns:64px minmax(0,1fr) 64px;margin-bottom:4px}.puzzle-controls{min-height:64px;margin-bottom:4px}.puzzle-toolbar h2{font-size:22px}.puzzle-picker-card{max-width:760px;padding:12px}.puzzle-figures{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.puzzle-picker-heading{margin-bottom:9px}.puzzle-success-card{padding:12px 20px}.puzzle-success-card .puzzle-restart{width:100px;height:100px;min-height:100px}.puzzle-success-card .puzzle-restart svg{width:64px;height:64px}.puzzle-success-options{margin-top:10px}}
/* Keep two full rows of pieces above navigation in short landscape windows.
   The controls remain comfortably larger than the 44px touch minimum. */
@media(max-height:500px) and (min-width:650px){
  .puzzle-toolbar{grid-template-columns:48px minmax(0,1fr) 48px}
  .puzzle-toolbar .game-icon-button,.puzzle-controls .puzzle-toolbar-restart{width:48px;min-width:48px;height:48px;min-height:48px}
  .puzzle-controls{min-height:48px}
  .puzzle-toolbar-restart{flex-basis:48px}
  .puzzle-difficulty button,.puzzle-help{min-height:44px}
}
