
.pz-shell{max-width:1240px;margin:0 auto;padding:24px 18px 40px;color:inherit}.pz-shell *{box-sizing:border-box}.pz-shell h1{font-size:clamp(2rem,5vw,3.6rem);margin:.25em 0}.pz-shell h2{font-size:clamp(1.4rem,3.5vw,2rem)}.pz-shell p{line-height:1.6}.pz-shell button,.pz-shell select{font:inherit;min-height:46px;border-radius:16px;padding:10px 15px;border:1px solid #ded7df;cursor:pointer}.pz-button{background:#713c96;color:#fff;font-weight:700}.pz-secondary{background:#f2e8f8;color:#523367}.pz-shell button:disabled{opacity:.5;cursor:default}.pz-shell button:focus-visible,.pz-shell [tabindex]:focus-visible{outline:3px solid #db9d21;outline-offset:3px}.pz-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.pz-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:20px;margin:24px 0}.pz-card{background:#fff;border:1px solid #eee0d3;border-radius:24px;padding:16px;box-shadow:0 8px 24px #4d2f6210;overflow:hidden}.pz-card>img{width:100%;aspect-ratio:4/3;object-fit:contain;border-radius:16px;background:#fffaf3}.pz-card h2{font-size:1.35rem;margin:.7em 0 .25em}.pz-card progress{width:100%;accent-color:#713c96}.pz-lock{font-size:.9rem;color:#6b5c71}.pz-note{font-size:.9rem;color:#655d6b}.pz-empty{padding:36px;border-radius:24px;background:#f5edf8;text-align:center}.pz-levels{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.pz-levels button{background:#fff;border:2px solid #e9dced;display:grid;gap:5px;text-align:left;padding:18px}.pz-levels strong{font-size:1.1rem;color:#603487}.pz-levels small{color:#655d6b}.pz-game{background:#fffaf3;border-radius:24px;padding:14px;background-position:center;background-size:cover}.pz-tools{margin-bottom:12px;padding:10px;border-radius:18px;background:#fffc;gap:8px}.pz-tools button{min-width:46px;padding:8px 12px}.pz-counter{font-weight:700;margin:0 8px}.pz-play-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:14px;align-items:start}.pz-stage{position:relative;min-width:0;border:2px solid #d5c5df;border-radius:20px;overflow:hidden;background:#e9e3ee;box-shadow:inset 0 0 25px #4633520b}.pz-board{display:block;width:100%;height:560px;max-height:72vh;touch-action:none;user-select:none}.pz-board .pz-piece{cursor:grab;outline:none}.pz-board .pz-piece:active{cursor:grabbing}.pz-piece.pz-selected>path{stroke:#f49b19;stroke-width:4}.pz-piece.pz-locked{cursor:default}.pz-piece-path{stroke:#473a59;stroke-width:.8;vector-effect:non-scaling-stroke;stroke-linejoin:round}.pz-plate{fill:#fff;stroke:#a392b2;stroke-width:2}.pz-grid-path{fill:none;stroke:#b1a3b8;stroke-width:1;vector-effect:non-scaling-stroke}.pz-reserve{background:#fffd;border-radius:18px;padding:12px;min-width:0}.pz-reserve h3{margin:4px 0 10px}.pz-reserve .pz-row{gap:5px}.pz-reserve select{max-width:100%;width:100%;margin-bottom:8px}.pz-tray{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;min-height:80px;margin:10px 0}.pz-tray button{padding:4px;min-height:90px;height:98px;background:#fff;border:2px solid #e4dbe8;border-radius:12px;touch-action:none;position:relative;user-select:none}.pz-tray button[aria-pressed=true]{border-color:#bd7808;box-shadow:0 0 0 2px #ffe2a5}.pz-tray svg{width:100%;height:100%;pointer-events:none;display:block}.pz-badge{position:absolute;right:2px;bottom:1px;background:#fff9;border-radius:4px;padding:1px 5px;font-size:.7rem}.pz-pages{display:flex;justify-content:space-between;align-items:center;gap:4px}.pz-pages button{min-width:42px;padding:6px}.pz-selected-info{min-height:28px;font-size:.9rem;font-weight:700}.pz-help{font-size:.88rem;color:#55445e;padding:8px;background:#fffd;border-radius:10px}.pz-live{margin:12px 0;min-height:24px;font-weight:600}.pz-error{color:#9f3321}.pz-victory{background:#f7e4a7;padding:22px;border-radius:22px;text-align:center;animation:pz-cheer .7s ease-out}.pz-victory h2{margin-top:0}.pz-settings{margin-top:24px;font-size:.9rem}.pz-settings summary{cursor:pointer;padding:10px}.pz-shell dialog{max-width:min(90vw,850px);border:1px solid #d9c9e3;border-radius:24px;padding:22px;color:#463d58;max-height:90vh;overflow:auto;background:#fffaf3}.pz-shell dialog::backdrop{background:#24112a99}.pz-shell dialog img{display:block;max-width:100%;max-height:65vh;object-fit:contain;margin:12px auto}.pz-sorting-label{font-weight:700;color:#5f4471}.pz-hint{fill:#ffc74044;stroke:#d78200;stroke-width:3;vector-effect:non-scaling-stroke;pointer-events:none}.pz-gesture-note{margin:4px 0 10px}.pz-standalone{font-family:system-ui,sans-serif;background:#fffaf3;margin:0}.pz-model-layer{pointer-events:none}.pz-group-count{font-size:.8rem}.pz-small-tray{display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:5px}.pz-small-tray button{min-width:90px;flex:0 0 90px;scroll-snap-align:start;touch-action:pan-x}
@keyframes pz-cheer{from{transform:scale(.96);opacity:.3}to{transform:scale(1);opacity:1}}
@media(max-width:850px){.pz-play-layout{grid-template-columns:1fr}.pz-board{height:440px;max-height:62vh}.pz-reserve{width:100%}.pz-tray{grid-template-columns:repeat(4,minmax(0,1fr));min-height:80px}.pz-tray button{height:86px;min-height:78px}.pz-tools{padding:8px;gap:6px}.pz-tools button{font-size:.9rem}.pz-shell{padding:18px 12px 30px}.pz-counter{font-size:.88rem}.pz-small-tray{display:flex}.pz-game{padding:10px}.pz-shell dialog{padding:18px}.pz-row>select{max-width:100%}}
@media(max-width:380px){.pz-tray{grid-template-columns:repeat(3,minmax(0,1fr))}.pz-small-tray{display:flex}.pz-board{height:370px}.pz-tools button{padding:7px 10px}}
@media(prefers-reduced-motion:reduce){.pz-shell *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Présentation finale : les effets de sélection ne concernent plus le puzzle gagné. */
.pz-board.pz-finished .pz-piece-path{stroke:#49434d;stroke-opacity:.45;stroke-width:.65;fill:transparent}
.pz-board.pz-finished .pz-piece{cursor:default;outline:none}
.pz-board.pz-finished .pz-hint{display:none}
.pz-complete .pz-play-layout{grid-template-columns:minmax(0,1fr)}
.pz-complete .pz-reserve,.pz-complete .pz-tools{display:none}
.pz-complete .pz-board{height:min(65vh,640px);height:min(65svh,640px);max-height:none}
.pz-complete{scroll-margin-top:90px}
#pz-admire-back{margin-bottom:12px}
#pz-victory .pz-victory{margin-top:16px;animation:none}
.pz-celebration{position:absolute;inset:4px;pointer-events:none;overflow:hidden;border-radius:16px}
.pz-celebration::after{content:"";position:absolute;inset:3px;border:2px solid #e5b74a;border-radius:14px;opacity:0;animation:pz-finish-glow 1.1s ease-out both}
.pz-celebration span{position:absolute;color:#d6a52e;font-size:clamp(18px,3vw,28px);line-height:1;opacity:0;animation:pz-finish-spark 1.15s ease-out both}
.pz-celebration span:nth-child(1){left:8%;top:12%}.pz-celebration span:nth-child(2){left:35%;top:4%;animation-delay:80ms}
.pz-celebration span:nth-child(3){right:8%;top:12%;animation-delay:40ms}.pz-celebration span:nth-child(4){right:3%;top:45%;animation-delay:100ms}
.pz-celebration span:nth-child(5){right:12%;bottom:8%;animation-delay:60ms}.pz-celebration span:nth-child(6){left:38%;bottom:3%;animation-delay:100ms}
.pz-celebration span:nth-child(7){left:8%;bottom:12%;animation-delay:30ms}.pz-celebration span:nth-child(8){left:3%;top:45%;animation-delay:90ms}
@keyframes pz-finish-spark{0%{opacity:0;transform:translateY(6px) scale(.65)}30%{opacity:.9;transform:translateY(-3px) scale(1)}100%{opacity:0;transform:translateY(-18px) scale(.85)}}
@keyframes pz-finish-glow{0%,100%{opacity:0}35%{opacity:.65}}
#milo-puzzles.pz-admiring .pz-shell{max-width:none;padding:12px}
#milo-puzzles.pz-admiring .pz-shell>:not(.pz-game){display:none}
#milo-puzzles.pz-admiring .pz-board{height:calc(100vh - 190px);height:calc(100svh - 190px);max-height:none;min-height:240px}
@media(prefers-reduced-motion:reduce){.pz-celebration{display:none}.pz-celebration::after,.pz-celebration span{animation:none!important}}

.pz-board.pz-finished{touch-action:pan-y}

/* Cartes mystères et révélations communes aux jeux, sans illustration cachée en arrière-plan. */
.milo-mystery-art{display:grid;place-items:center;aspect-ratio:4/3;background:linear-gradient(145deg,#f6eddf,#e7e0ee);color:#68517b;border-radius:16px;overflow:hidden}
.milo-mystery-art svg{width:42%;max-width:150px;height:auto}
.mm-theme>.milo-mystery-art{height:230px;aspect-ratio:auto;border-radius:0}
.milo-reveal{max-width:620px;margin:20px auto;padding:20px;border:1px solid #c6ac69;border-radius:24px;background:#fffaf3;color:#343044;text-align:center;overflow:hidden}
.milo-reveal-picture{position:relative;max-width:420px;margin:auto;isolation:isolate}
.milo-reveal-picture>.milo-mystery-art{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0}
.milo-reveal-identity{aspect-ratio:4/3;display:grid;place-items:center;background:#f4ecdf;border-radius:16px;overflow:hidden}
.milo-reveal-identity img{width:100%;height:100%;object-fit:contain}
.milo-reveal-stars{position:absolute;inset:5% 0 auto;z-index:3;color:#9a6c15;pointer-events:none;opacity:0;font-size:28px}
.milo-reveal h2{margin:16px 0 8px;overflow-wrap:anywhere}
.milo-reveal p{line-height:1.5;overflow-wrap:anywhere}
.milo-reveal-next{font:inherit;font-weight:700;padding:12px 18px;min-height:48px;border:1px solid #68517b;border-radius:20px;background:#68517b;color:#fff;cursor:pointer}
.milo-reveal-next:focus-visible{outline:3px solid #a86c10;outline-offset:4px}
.milo-reveal-enter .milo-mystery-art{animation:milo-unlock .85s ease-out both}
.milo-reveal-enter .milo-reveal-identity{animation:milo-discover .85s ease-out both}
.milo-reveal-enter .milo-reveal-stars{animation:milo-stars 1.1s ease-out both}
@keyframes milo-unlock{0%,20%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.04)}}
@keyframes milo-discover{0%,20%{opacity:0;transform:scale(.98)}100%{opacity:1;transform:scale(1)}}
@keyframes milo-stars{0%,100%{opacity:0;transform:translateY(0)}40%{opacity:1;transform:translateY(-8px)}}
@media(max-width:600px){.mm-theme>.milo-mystery-art{height:210px}.milo-reveal{padding:16px}}
@media(prefers-reduced-motion:reduce){.milo-reveal-enter *{animation:none!important;transition:none!important}.milo-reveal-picture>.milo-mystery-art,.milo-reveal-stars{display:none}}

.milo-reveal-enter h2{animation:milo-discover .85s ease-out both}
