/* Memotest de Piru · Cartas ilustradas y reglas acotadas al juego. */
.pmm-game{--pmm-ink:#254c40;--pmm-muted:#64746c;--pmm-green:#2d6b53;--pmm-line:#dce7dd;--pmm-gold:#e9ad45;max-width:860px;margin:0 auto;color:var(--pmm-ink);font:inherit}
.pmm-game *, .pmm-game *::before,.pmm-game *::after{box-sizing:border-box}
.pmm-game [hidden]{display:none!important}
.pmm-game button{font-family:inherit;-webkit-tap-highlight-color:transparent}
.pmm-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.pmm-intro p{margin:4px 0 0;font-size:13px!important;line-height:1.6!important;color:var(--pmm-muted)}
.pmm-intro strong,.pmm-intro h3{display:block;margin:0;font-size:15px;line-height:1.4;font-weight:850;color:var(--pmm-ink)}
.pmm-kicker{font-size:10px;font-weight:850;letter-spacing:.12em;color:#697057;text-transform:uppercase}
.pmm-intro .pmm-eyebrow{font-size:10px!important;font-weight:850;letter-spacing:.12em;color:#587356;margin:0 0 3px}
.pmm-round-chip{flex:none;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e7ddc4;border-radius:30px;padding:8px 12px;background:#fff9e9;color:#806225;font-size:11px;font-weight:800;white-space:nowrap}
.pmm-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:5px;border:1px solid var(--pmm-line);border-radius:19px;background:#f0f5ef;margin-bottom:16px}
.pmm-levels button{position:relative;appearance:none;min-width:0;min-height:66px;padding:10px 8px;border:1px solid transparent;border-radius:14px;background:transparent;color:#607366;cursor:pointer;transition:background .18s,box-shadow .18s}
.pmm-levels button>span{display:block;font-size:16px;font-weight:850;line-height:1.25}
.pmm-levels button>small{display:block;margin-top:5px;font-size:11px;line-height:1.25;font-weight:600}
.pmm-levels button[aria-pressed="true"]{background:#fff;border-color:#d8e4d5;color:var(--pmm-green);box-shadow:0 3px 9px #2f513b0c}
.pmm-levels button:hover{background:#ffffffaa}
.pmm-levels button[aria-pressed="true"]::after{content:"";position:absolute;width:5px;height:5px;border-radius:50%;background:var(--pmm-gold);right:12px;top:12px}
.pmm-dashboard{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:9px;margin-bottom:16px}
.pmm-stat,.pmm-dashboard>div{min-width:0;padding:12px 14px;border:1px solid #e9e8dd;border-radius:15px;background:#fffdf8}
.pmm-dashboard>div:first-child{background:#f0f7ee;border-color:#dce8d7}
.pmm-dashboard>div:nth-child(2){background:#f4f1fa;border-color:#e7e1f1}
.pmm-dashboard>div:nth-child(3){background:#fff6e9;border-color:#f1e3cc}
.pmm-dashboard small,.pmm-stat-label,.pmm-stat>span{display:block;margin:0 0 4px;font-size:10px;font-weight:750;letter-spacing:.07em;line-height:1.4;color:#68746c;text-transform:uppercase}
.pmm-dashboard strong{display:block;font-size:23px;font-weight:850;line-height:1.2;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.pmm-dashboard>div:nth-child(2) strong{color:#6e568a}.pmm-dashboard>div:nth-child(3) strong{color:#98712f}
.pmm-board-wrap{padding:19px;border:1px solid #e8e6da;border-radius:24px;background:#faf9f3;box-shadow:0 12px 34px #3f51310a;isolation:isolate}
.pmm-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;max-width:620px;margin:0 auto;align-items:stretch}
.pmm-grid[data-level="easy"]{max-width:500px}
.pmm-grid[data-level="hard"]{grid-template-columns:repeat(6,minmax(0,1fr));max-width:780px;gap:10px}
.pmm-card{position:relative;display:block;appearance:none;aspect-ratio:4/5;width:100%;min-width:0;min-height:44px;padding:0;border:0;border-radius:16px;background:transparent;perspective:900px;cursor:pointer;touch-action:manipulation;outline-offset:4px}
.pmm-card-inner{position:absolute;inset:0;display:block;transform-style:preserve-3d;transition:transform .34s cubic-bezier(.2,.7,.2,1)}
.pmm-back,.pmm-front{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:16px;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;box-shadow:0 3px 0 #203c3020,0 5px 12px #2645370d}
.pmm-back{gap:3px;padding:8px;border:1px solid #376c56;background:#326d58;color:#fff;transform:rotateY(0deg)}
.pmm-back::before{content:"";position:absolute;inset:6px;border:1px solid #ffffff40;border-radius:11px;pointer-events:none}
.pmm-back::after{content:"";position:absolute;inset:0;background-image:radial-gradient(circle,#ffffff1a 1px,transparent 1.5px);background-size:13px 13px;pointer-events:none;z-index:0}
.pmm-avatar{position:relative;z-index:1;width:50%;height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 2px 1px #153b3525)}
.pmm-question{position:relative;z-index:1;display:block;color:#ffe6a3;font-size:clamp(18px,2.5vw,28px);line-height:1;font-weight:850}
.pmm-card-number{position:absolute;left:12px;top:11px;font-size:9px;line-height:1;color:#ffffffa6;font-variant-numeric:tabular-nums;z-index:1}
.pmm-front{gap:5px;padding:9px 6px;border:1px solid #dfe5db;background:#fff;transform:rotateY(180deg)}
.pmm-picture{display:block;max-width:86%;width:100%;height:68%;object-fit:contain;aspect-ratio:1}
.pmm-label{display:flex;align-items:center;justify-content:center;min-height:1.9em;max-width:100%;text-align:center;font-size:11px;line-height:1.12;font-weight:750;color:#4c6255;overflow-wrap:break-word}
.pmm-card.is-flipped .pmm-card-inner,.pmm-card.is-matched .pmm-card-inner{transform:rotateY(180deg)}
.pmm-card.is-matched{cursor:default}
.pmm-card.is-matched .pmm-front{background:#f2f9ef;border-color:#81b787;box-shadow:0 0 0 2px #9dc79c,0 3px 0 #81a98420}
.pmm-match-check{display:none}
.pmm-card.is-matched .pmm-match-check{position:absolute;right:6px;top:5px;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#40865b;color:#fff;font-size:11px;font-weight:850;line-height:1}
.pmm-card:not(.is-flipped):not(.is-matched):hover .pmm-back{background:#3b7a62;border-color:#2d654e}
.pmm-game button:focus-visible{outline:3px solid #d59b39;outline-offset:4px}
.pmm-status{min-height:24px;margin:16px 3px 13px;text-align:center;font-size:13px!important;line-height:1.6!important;color:#657568}
.pmm-actions{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px 17px}
.pmm-actions p{margin:0;color:#71806d;font-size:11px!important;line-height:1.55!important}
.pmm-actions button,.pmm-result-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:12px 22px;border:1px solid #d7e2d4;border-radius:13px;background:#fff;color:var(--pmm-green);font-size:13px;font-weight:800;line-height:1.4;cursor:pointer}
.pmm-actions button{min-width:200px;background:#2d6b53;border-color:#2d6b53;color:#fff}
.pmm-actions button:hover{background:#235943}
.pmm-actions button svg,.pmm-result-actions button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pmm-result{position:relative;display:flex;align-items:center;justify-content:space-between;gap:22px;margin-top:22px;padding:24px;border:1px solid #dce5c5;border-radius:20px;background:#f5f8e9}
.pmm-result[hidden]{display:none!important}
.pmm-result-star{flex:none;color:#b59a4c;font-size:33px;line-height:1}
.pmm-result-copy h3,.pmm-result-copy strong{display:block;margin:0 0 6px;font-size:24px;line-height:1.2;letter-spacing:-.03em;color:#47663a}
.pmm-result-copy p{margin:0;color:#6a795c;font-size:13px!important;line-height:1.6!important}
.pmm-result-actions{display:flex;flex-direction:column;gap:8px;flex:none}
.pmm-result-actions button[data-memory-next]{background:#2d6b53;border-color:#2d6b53;color:#fff}
.pmm-result-actions button:hover{box-shadow:0 3px 10px #2d51351a}
.pmm-result:focus{outline:none}.pmm-result:focus-visible{outline:3px solid #d59b39;outline-offset:4px}
.pmm-loading,.pmm-error,.pmm-unavailable{padding:30px 20px;border:1px solid var(--pmm-line);border-radius:18px;background:#f7faf4;color:var(--pmm-muted);text-align:center;font-size:14px;line-height:1.7}
@media(max-width:600px){
 .pmm-intro{align-items:flex-start;gap:9px;margin-bottom:14px}.pmm-intro p{font-size:12px!important}.pmm-intro strong,.pmm-intro h3{font-size:14px}.pmm-round-chip{font-size:10px;padding:7px 9px}
 .pmm-levels{gap:3px;padding:4px;border-radius:16px}.pmm-levels button{min-height:60px;padding:9px 5px;border-radius:12px}.pmm-levels button>span{font-size:15px}.pmm-levels button>small{font-size:10px}.pmm-levels button[aria-pressed="true"]::after{right:7px;top:8px;width:4px;height:4px}
 .pmm-dashboard{gap:7px;margin-bottom:12px}.pmm-dashboard>div{padding:10px 11px;border-radius:12px}.pmm-dashboard small,.pmm-stat-label,.pmm-stat>span{font-size:8px;letter-spacing:.05em}.pmm-dashboard strong{font-size:21px}
 .pmm-board-wrap{padding:12px;border-radius:19px}.pmm-grid,.pmm-grid[data-level="hard"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .pmm-card,.pmm-back,.pmm-front{border-radius:12px}.pmm-back{padding:6px;gap:2px}.pmm-back::before{inset:5px;border-radius:8px}.pmm-avatar{width:54%}.pmm-question{font-size:20px}.pmm-card-number{left:9px;top:8px;font-size:8px}
 .pmm-front{padding:6px 4px;gap:2px}.pmm-picture{max-width:94%;height:70%}.pmm-label{font-size:9px}.pmm-card.is-matched .pmm-match-check{width:14px;height:14px;right:4px;top:4px;font-size:9px}
 .pmm-status{font-size:12px!important;min-height:38px;margin:13px 1px 10px}.pmm-actions button{width:100%;min-height:47px}.pmm-actions p{text-align:center}.pmm-actions p br{display:none}
 .pmm-result{padding:20px 17px;flex-direction:column;align-items:stretch;gap:16px}.pmm-result-star{display:none}.pmm-result-copy h3,.pmm-result-copy strong{font-size:23px}.pmm-result-actions{flex-direction:row;flex-wrap:wrap}.pmm-result-actions button{flex:1;padding:11px 12px;font-size:12px}
}
@media(max-width:380px){.pmm-intro{flex-wrap:wrap}.pmm-round-chip{padding:5px 9px}.pmm-board-wrap{padding:10px}.pmm-grid,.pmm-grid[data-level="hard"]{gap:7px}.pmm-label{display:none}.pmm-picture{height:88%;max-width:94%}.pmm-dashboard>div{padding:10px 8px}.pmm-dashboard strong{font-size:19px}.pmm-dashboard small,.pmm-stat-label{letter-spacing:0}.pmm-card.is-matched .pmm-front{box-shadow:0 0 0 1.5px #9dc79c}.pmm-result-actions{flex-direction:column}}
@media(prefers-reduced-motion:reduce){.pmm-card-inner,.pmm-levels button{transition:none}}
