.puzzle-grid{display:grid;gap:4px;max-width:520px;margin:16px auto}.puzzle-n3{grid-template-columns:repeat(3,1fr)}.puzzle-n4{grid-template-columns:repeat(4,1fr)}.puzzle-n6{grid-template-columns:repeat(6,1fr)}.puzzle-n7{grid-template-columns:repeat(7,1fr);gap:0}.puzzle-tile,.puzzle-piece,.puzzle-pipe,.puzzle-car{aspect-ratio:1;min-width:0;padding:0;overflow:hidden;border-radius:6px;background:#edf4fa;border:2px solid #d1ddea;color:#234665;font-size:clamp(18px,4vw,36px)}.puzzle-tile svg,.puzzle-pipe svg,.puzzle-piece svg{display:block;width:100%;height:100%}.puzzle-selected{outline:4px solid #df9c1d;outline-offset:-4px}.puzzle-blank{background:#d2deea}.puzzle-preview{max-width:200px;margin:16px auto}.puzzle-preview svg{width:100%}.puzzle-turn1{transform:rotate(90deg)}.puzzle-turn2{transform:rotate(180deg)}.puzzle-turn3{transform:rotate(270deg)}.puzzle-pipe path{fill:none;stroke:#188f94;stroke-width:16;stroke-linecap:round}.puzzle-maze{aspect-ratio:1;border:0;border-radius:0;background:#e7eff5;color:#127d68;padding:0;font-size:22px;min-width:0}.wall-0{border-top:2px solid #263b53}.wall-1{border-right:2px solid #263b53}.wall-2{border-bottom:2px solid #263b53}.wall-3{border-left:2px solid #263b53}.puzzle-maze.visited{background:#c7e8db}.puzzle-car{font-size:18px;background:#c9d9e8}.red-car{background:#f49090}.puzzle-dots{width:100%;max-width:600px;display:block;margin:auto}.puzzle-dots circle{fill:#297ab5}.puzzle-dots text{fill:white;font-size:22px;pointer-events:none}.puzzle-dots polyline{fill:none;stroke:#edaa40;stroke-width:5}.puzzle-dots g{cursor:pointer}.pc-0{fill:#e74c3c}.pc-1{fill:#2075cb}.pc-2{fill:#149b73}.pc-3{fill:#dd9a16}.pc-4{fill:#914bc0}.pc-5{fill:#e56a98}.pc-6{fill:#397985}.puzzle-outline svg{fill:none;stroke:#60778e;stroke-width:2}.puzzle-matched{background:#c7eadb}.pattern-sequence{display:flex;align-items:center;justify-content:center;gap:8px}.pattern-sequence svg{width:9%;max-width:60px}.pattern-sequence strong{font-size:28px}.puzzle-scenes{display:flex;gap:12px;justify-content:center}.puzzle-scene{width:100%;max-width:450px;min-width:0;cursor:crosshair}.scene-background{fill:#e9f1f9}.found-ring{fill:none;stroke:#1b8c60;stroke-width:10}.puzzle-wanted{display:flex;gap:12px;justify-content:center}.puzzle-wanted svg{width:48px}.tangram-target{max-width:360px;margin:auto}.tangram-target svg{width:100%}.tangram-target polygon{stroke:#263b53;stroke-width:3;cursor:pointer}.tangram-empty{fill:#e3eaf2}.tangram-pieces{display:flex;flex-wrap:wrap;gap:6px;margin:12px auto}.tangram-pieces button{width:90px}.puzzle-metrics{font-weight:600}@media(max-width:600px){.puzzle-scenes{flex-direction:column;align-items:center}.puzzle-scene{max-width:300px}.tangram-pieces button{width:70px}}

#game:has(#puzzle-play) .logic-feedback:empty{display:none}
