/* Piru · Laberinto con trazado. Reglas acotadas para no afectar otros juegos. */
.pm-game{--pm-green:#316751;--pm-ink:#244c3d;--pm-line:#dbe6d9;--pm-paper:#fffdf5;max-width:680px;margin:0 auto;color:var(--pm-ink);font:inherit}
.pm-game button{font-family:inherit;box-sizing:border-box}
.pm-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px;flex-wrap:wrap}
.pm-eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:10px;font-weight:900;letter-spacing:.12em;color:#58755d}
.pm-eyebrow svg{width:20px;height:20px;fill:#deecd3;stroke:#5d865c;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pm-state{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;padding:7px 11px;border-radius:999px;background:#edf3e7;color:#537045;white-space:nowrap}
.pm-state:before{content:"";width:6px;height:6px;background:#9aaf6d;border-radius:50%}
.pm-state.is-complete{background:#fff0b8;color:#7c641e}.pm-state.is-complete:before{background:#c49b21}
.pm-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:5px;border:1px solid var(--pm-line);border-radius:18px;background:#eff4ed;margin-bottom:16px}
.pm-levels button{appearance:none;min-width:0;min-height:60px;border:1px solid transparent;border-radius:13px;background:transparent;cursor:pointer;padding:9px 7px;color:#526d59;transition:background .18s,box-shadow .18s}
.pm-levels button span{display:block;font-size:15px;font-weight:900;line-height:1.2}
.pm-levels button small{display:block;font-size:10px;font-weight:550;margin-top:4px;line-height:1.3}
.pm-levels button[aria-pressed=true]{background:#fff;border-color:#d9e3d4;color:#255f45;box-shadow:0 3px 8px #23452d0c}
.pm-levels button:hover{background:#fff9}.pm-levels button[aria-pressed=true]:hover{background:#fff}
.pm-map-frame{padding:13px 12px 10px;border:1px solid #d9e5d6;background:linear-gradient(145deg,#f1f6e9,#e9f1e3);border-radius:25px;box-shadow:0 12px 30px #355c3610;overflow:hidden}
.pm-map-labels{display:flex;align-items:center;justify-content:space-between;padding:1px 12px 5px;gap:16px;color:#557052;font-size:9px;font-weight:900;letter-spacing:.1em}
.pm-map-labels span{display:flex;align-items:center;gap:7px}.pm-label-dot{width:7px;height:7px;background:#d9a247;border-radius:50%}
.pm-map-labels svg{width:17px;height:17px;fill:none;stroke:#7b925e;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pm-board{width:min(100%,550px);aspect-ratio:1;margin:0 auto;position:relative;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;border-radius:21px;outline-offset:3px}
.pm-board.is-drawing{cursor:grabbing}.pm-board:focus-visible{outline:3px solid #d59e42}
.pm-map{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
.pm-lawn{fill:#e0ecd4}.pm-corridors{fill:var(--pm-paper)}
.pm-hedge-shadow{fill:none;stroke:#d4dfc9;stroke-width:21;stroke-linecap:round;stroke-linejoin:round}
.pm-hedges{fill:none;stroke:#527c5b;stroke-width:11;stroke-linecap:round;stroke-linejoin:round}
.pm-trail{fill:none;stroke:#e6a249;stroke-width:14;stroke-linecap:round;stroke-linejoin:round;opacity:.94}
.pm-origin{fill:#f9f0da;stroke:#dacb9c;stroke-width:3;stroke-dasharray:4 6}
.pm-player{filter:drop-shadow(0 3px 2px #59753b26)}
.pm-board.is-blocked .pm-player>circle{stroke:#bf6a4c}.pm-board.is-complete .pm-trail{stroke:#76a669}
.pm-map-caption{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:5px 11px 0;color:#6c8065;font-size:11px;line-height:1.4}
.pm-step-count{font-weight:850;color:#3c6145}
.pm-status{text-align:center;font-size:13px;font-weight:650;line-height:1.5;color:#4c6c53;min-height:40px;margin:14px 8px 9px}
.pm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pm-action{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid #d6e1d2;border-radius:13px;background:#fff;min-height:47px;padding:10px;color:#48664d;font-weight:800;font-size:12px;cursor:pointer}
.pm-action svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pm-action-new{background:#2f694e;border-color:#2f694e;color:#fff}.pm-action:hover{box-shadow:0 3px 12px #3253331a}
.pm-game button:focus-visible{outline:3px solid #dba64f;outline-offset:3px}
.pm-play-help{display:flex;align-items:center;gap:20px;padding:19px 0 4px}
.pm-play-help p{font-size:12px!important;line-height:1.65!important;color:#6e7b6d;margin:0;flex:1;max-width:440px}
.pm-play-help strong{display:block;color:#426149;font-weight:850;margin-bottom:4px}
.pm-direction-pad{display:grid;grid-template-columns:repeat(3,37px);grid-template-rows:repeat(3,37px);gap:3px;flex:none}
.pm-direction-pad button{display:grid;place-items:center;width:37px;height:37px;min-width:0;min-height:0;border:1px solid #dbe5d6;border-radius:10px;background:#f8fbf5;color:#58785a;padding:6px;cursor:pointer}
.pm-direction-pad button:hover{background:#e8f0e2}.pm-direction-pad svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pm-up{grid-column:2;grid-row:1}.pm-left{grid-column:1;grid-row:2}.pm-right{grid-column:3;grid-row:2}.pm-down{grid-column:2;grid-row:3}
.pm-pad-center{grid-column:2;grid-row:2;align-self:center;text-align:center;color:#9bb189;font-size:17px}
.pm-celebration{display:flex;align-items:center;gap:14px;border:1px solid #d4e5bd;background:#f1f8e5;border-radius:17px;padding:17px 20px;margin-top:18px}
.pm-celebration[hidden]{display:none!important}.pm-celebration-star{font-size:36px;color:#ad903b;line-height:1;flex:none}
.pm-celebration strong{display:block;font-size:18px;line-height:1.3;color:#355d3f}.pm-celebration p{font-size:13px!important;line-height:1.5!important;margin:5px 0 0;color:#6c7f5e}
@media(max-width:600px){.pm-map-frame{padding:9px 5px 9px;border-radius:19px}.pm-topline{gap:8px;margin-bottom:13px}.pm-eyebrow{font-size:9px;letter-spacing:.08em}.pm-state{font-size:10px;padding:6px 9px}.pm-levels{gap:3px;padding:4px;border-radius:15px;margin-bottom:12px}.pm-levels button{padding:8px 4px;min-height:57px;border-radius:11px}.pm-levels button span{font-size:14px}.pm-levels button small{font-size:9px}.pm-map-labels{font-size:8px;padding:1px 10px 2px}.pm-map-caption{font-size:10px;gap:5px;padding:3px 9px 0}.pm-map-caption>span:last-child{font-size:9px}.pm-actions{gap:7px}.pm-action{font-size:11px;gap:6px;padding:9px 6px}.pm-action svg{width:16px;height:16px}.pm-play-help{gap:12px;align-items:flex-start;padding-top:16px}.pm-play-help p{font-size:11px!important;line-height:1.6!important}.pm-direction-pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px)}.pm-direction-pad button{width:44px;height:44px}.pm-status{font-size:12px;min-height:39px;margin:12px 3px 8px}.pm-celebration{padding:15px;gap:11px}.pm-celebration strong{font-size:17px}}
@media(max-width:380px){.pm-topline{justify-content:center}.pm-play-help{flex-direction:column;align-items:center;gap:12px}.pm-play-help p{max-width:none;text-align:center}.pm-levels button small{font-size:8px}.pm-map-caption{font-size:9px}.pm-map-caption>span:last-child{font-size:8px}}
@media(prefers-reduced-motion:reduce){.pm-levels button{transition:none}}
