[hidden]{display:none!important}
.back-games{width:42px;height:42px;flex:none;border:2px solid #0b809e;border-radius:9px;background:white;color:#075d7b;font-size:2rem;font-weight:900;line-height:1;box-shadow:0 3px #086b88}
.game-choice{position:relative;z-index:25;min-height:100dvh;display:grid;place-items:center;padding:30px 18px;background:linear-gradient(180deg,#a8e8fb,#f6fdff 58%,#ffe1a3)}
.choice-inner{width:min(100%,430px);text-align:center}.choice-inner>img{width:120px;height:120px;object-fit:cover;border:6px solid white;border-radius:50%;box-shadow:0 7px 0 #eeb74e}.choice-inner h2{margin:22px 0 4px;color:#075d7b;font-size:2rem;line-height:1.1;font-weight:1000}.choice-inner p{margin:0 0 24px;color:#386879;font-weight:750}.choice-card{display:flex;align-items:center;gap:14px;width:100%;min-height:98px;margin:12px 0;padding:12px 15px;background:#fff;border:3px solid #53bcda;border-radius:8px;box-shadow:0 6px 0 #1385a8;text-align:left;color:#084e67}.choice-card:nth-of-type(2){border-color:#ffbd6c;box-shadow:0 6px 0 #d28d40}.choice-icon{width:58px;height:58px;flex:none;display:grid;place-items:center;background:#d8f6ff;border-radius:8px;font-size:2rem}.choice-card:nth-of-type(2) .choice-icon{background:#fff0ce}.choice-card strong{display:block;font-size:1.06rem;font-weight:1000}.choice-card small{display:block;margin-top:4px;font-size:.8rem;font-weight:700;color:#53727a}.choice-card b{margin-left:auto;font-size:2rem}
.memory-game{position:relative;z-index:1;min-height:100dvh;padding:calc(env(safe-area-inset-top) + 16px) 14px calc(env(safe-area-inset-bottom) + 20px);background:linear-gradient(180deg,#a8e8fb 0%,#e6f9ff 62%,#ffe0a0 100%)}.memory-header{display:flex;align-items:center;gap:10px;justify-content:space-between}.memory-header h1{flex:1;max-width:none;font-size:1.34rem}.memory-stats{display:flex;align-items:center;gap:8px;margin:18px 0 12px}.memory-stats span{display:flex;align-items:center;gap:4px;min-height:41px;padding:5px 10px;background:white;border:2px solid #8ed4e8;border-radius:8px;color:#085e79;font-size:.87rem;white-space:nowrap}.memory-stats strong{font-size:.9rem}.memory-stats button{margin-left:auto;width:40px;height:40px;flex:none;border:2px solid #0b809e;border-radius:8px;background:#fff;color:#075d7b;font-size:1.8rem;font-weight:900;line-height:1}.memory-toast{height:31px;margin:0 0 5px;text-align:center;color:#075d7b;font-weight:1000;font-size:.94rem;opacity:0;transition:opacity .2s}.memory-toast.show{opacity:1}
.memory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;perspective:900px}.memory-grid.medium,.memory-grid.hard{grid-template-columns:repeat(4,minmax(0,1fr))}.memory-card{position:relative;aspect-ratio:.79;min-width:0;padding:0;border:0;border-radius:8px;background:transparent;perspective:700px;touch-action:manipulation}.memory-card-inner{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .42s cubic-bezier(.2,.75,.2,1)}.memory-card.flipped .memory-card-inner,.memory-card.matched .memory-card-inner{transform:rotateY(180deg)}.memory-card-face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden;border:3px solid #fff;border-radius:8px;box-shadow:0 4px 0 #0c779b,0 5px 10px #15607c40}.memory-card-back{display:grid;place-items:center;background:radial-gradient(circle at 23% 18%,#ffffff55 0 5px,transparent 6px),radial-gradient(circle at 75% 72%,#ffffff55 0 4px,transparent 5px),repeating-linear-gradient(30deg,#0c92bc 0 18px,#1184af 18px 36px);color:#fff}.memory-card-back span{width:70%;aspect-ratio:1;display:grid;place-items:center;border:3px solid #b8effb;border-radius:50%;background:#087097;font-size:clamp(1.6rem,7vw,2.5rem);text-shadow:0 2px #045b7c}.memory-card-front{transform:rotateY(180deg);display:flex;flex-direction:column;align-items:center;background:#fffaf0;border-color:#fff}.memory-art{width:100%;flex:1;display:grid;place-items:center;min-height:0;padding:5px;background:#dff5f8}.memory-art svg,.memory-art img{width:100%;height:100%;max-height:120px;object-fit:cover}.memory-label{width:100%;min-height:27px;display:grid;place-items:center;padding:3px 1px;background:#fff7e0;color:#084e68;font-size:clamp(.55rem,2.3vw,.82rem);font-weight:1000;line-height:1}.memory-card.matched .memory-card-face{border-color:#ffcb60;box-shadow:0 4px 0 #d59030,0 0 15px #f9d871}.memory-card.matched{animation:match-pop .45s ease}.memory-bottom{display:flex;align-items:center;justify-content:center;gap:10px;margin:18px 0 0;color:#236577;font-size:.82rem;font-weight:800}.memory-bottom img{width:37px;height:37px;object-fit:cover;border-radius:50%;border:2px solid #fff}.memory-modal .level-picker button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px}.memory-modal .level-picker small{font-size:.68rem}.memory-secondary{width:100%;margin-top:10px;padding:11px;border:2px solid #1493b8;border-radius:8px;background:#fff;color:#08627f;font-size:.85rem;font-weight:1000}.memory-game .memory-grid.hard .memory-label{font-size:clamp(.52rem,2vw,.75rem)}
@keyframes match-pop{50%{transform:scale(1.08)}}
@media(max-width:380px){.memory-header h1{font-size:1.12rem}.memory-grid{gap:6px}.memory-card-face{border-width:2px}.memory-art{padding:3px}.memory-stats{gap:5px}.memory-stats span{padding:4px 6px;font-size:.75rem}.memory-stats strong{font-size:.8rem}}
@media(max-height:700px){.memory-game{padding-top:8px}.memory-stats{margin:8px 0 4px}.memory-toast{height:24px}.memory-grid{gap:5px}.memory-art{padding:3px}.memory-label{min-height:22px}.memory-bottom{margin-top:7px}}
