.game-area{max-width:900px;padding:20px 24px;margin:12px auto}
.game-area h1{font-size:clamp(1.4rem,3vw,2rem);margin:0 0 10px}
.game-description{max-width:640px;margin:8px auto 12px;line-height:1.7;color:#567467}
.audio-toolbar{display:flex;justify-content:center;gap:8px;margin:10px 0 14px}
.audio-toolbar button{font-size:.8rem;background:#ecf4e4;padding:8px 13px}
.game-stats{display:flex;justify-content:center;gap:12px;margin:12px auto;flex-wrap:wrap}
.game-stat{min-width:90px;padding:9px 16px;border-radius:16px;background:#f0f5e7;color:#6b836d;font-size:.8rem}
.game-stat strong{display:block;font-size:1.45rem;color:#32674b;margin-top:3px}
.arcade-canvas{display:block;width:min(100%,440px,54.56vh);height:auto;margin:0 auto;border-radius:24px;touch-action:none;box-shadow:inset 0 0 0 2px #d5e8c5}
.game-controls{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0 6px}
.direction-button{width:62px;touch-action:none;user-select:none}
.secondary-button{background:#edf3df}
.game-result{min-height:24px;color:#547349;margin:8px 0}
.game-board{display:grid;gap:9px;width:100%;margin:18px auto;max-width:540px}
.puzzle-board{aspect-ratio:1;gap:4px;padding:5px;background:#cfdfbe;border-radius:18px;overflow:hidden}
.puzzle-tile{aspect-ratio:1;padding:0;border-radius:7px;position:relative;min-width:0;touch-action:manipulation;background-image:url('/static/img/naiwa-puzzle.webp');background-repeat:no-repeat}
.puzzle-tile:hover{transform:none;filter:brightness(1.04)}
.puzzle-tile span{position:absolute;bottom:3px;right:4px;min-width:20px;border-radius:6px;font-size:.65rem;padding:2px;background:#fffdf0cf;color:#547043}
.puzzle-empty{visibility:hidden}
.puzzle-preview{width:84px;height:84px;object-fit:cover;border-radius:12px;vertical-align:middle;margin:0 12px}
.game-options{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0}
.game-options label{display:flex;gap:8px;align-items:center;margin:0}
.game-options label select{width:auto;margin:0}
.memory-board{grid-template-columns:repeat(4,minmax(0,1fr));max-width:570px}
.memory-card{aspect-ratio:4/5;min-width:0;border-radius:18px;padding:10px;position:relative;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#b9d7a1,#e4eecb);box-shadow:0 4px 0 #aec88f;color:#6d8b59;font-size:2.3rem;transition:transform .18s,background .18s}
.memory-card img{height:100%;width:100%;object-fit:contain;pointer-events:none}
.memory-card.is-open{background:#fff3cd;transform:rotateY(0);box-shadow:0 4px 0 #e5d397}
.memory-card.is-matched{background:#e1f5cb;box-shadow:0 4px 0 #bedca3}
.memory-card:disabled{cursor:default;opacity:1}
.mole-board{grid-template-columns:repeat(3,minmax(0,1fr));max-width:540px;background:linear-gradient(#eaf3d4,#dae8be);border-radius:28px;padding:16px 12px}
.mole-hole{aspect-ratio:1;min-width:0;background:radial-gradient(ellipse 42% 17% at 50% 79%,#604835 0 72%,#b79b69 73% 96%,transparent 100%);border-radius:20px;padding:0;position:relative;overflow:hidden;touch-action:manipulation}
.mole-hole:hover{background-color:transparent;transform:none}
.mole-hole img{position:absolute;bottom:18%;left:18%;height:80%;width:64%;object-fit:contain;pointer-events:none;animation:mole-up .16s ease-out}
.mole-hole.is-hit:after{content:'+1 ✨';position:absolute;top:5%;left:22%;font-size:1.1rem;color:#ed8e28;font-weight:800}
.embedded-game{width:100%;height:78vh;min-height:480px;border:0;border-radius:20px;background:#faf9ef}
.game-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}
.game-heading h1{margin:0;font-size:1.6rem}
.game-heading .btn{font-size:.85rem}
.game-source{font-size:.8rem;color:#7c8c77;margin:16px 0}
.online-hint{font-size:.85rem;color:#6d826a;margin:10px 0 16px}
@keyframes mole-up{from{transform:translateY(80%)}to{transform:translateY(0)}}
@media(min-width:700px){.memory-board.many-cards{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:600px){.game-area{padding:16px 10px}.game-area h1 .inline-mascot{width:35px;height:40px}.game-description{font-size:.85rem}.audio-toolbar{margin:8px 0}.game-stat{min-width:72px;padding:7px 10px}.game-stat strong{font-size:1.2rem}.game-stats{gap:7px}.memory-card{border-radius:12px;padding:7px}.game-board{gap:7px}.puzzle-board{gap:3px}.mole-board{padding:10px 6px;gap:4px}.embedded-game{min-height:420px;height:76vh}.game-heading h1{font-size:1.3rem}.arcade-canvas{width:min(100%,440px,52.8vh)}}
@media(prefers-reduced-motion:reduce){.hero-mascot,.mole-hole img{animation:none}}
