.picture-game-area{min-height:0;width:100%;display:grid;place-items:center;gap:12px}
.scratch-stage{position:relative;width:min(100%,680px);aspect-ratio:4/3;background:var(--panel,#eef6f8);border:3px solid var(--accent,#386c85);border-radius:18px;overflow:hidden}
.scratch-stage>img,.scratch-stage>canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.scratch-stage>img{padding:12%;box-sizing:border-box}.scratch-stage>canvas{touch-action:none;cursor:crosshair}
.scratch-stage>canvas[hidden]{display:none}
.picture-card-grid{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.picture-card-grid>button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:100px;aspect-ratio:1;border-radius:16px;font-size:clamp(18px,4vw,40px);padding:8px}
.picture-card-grid img,.picture-card-grid svg{width:100%;height:100%;max-height:160px;object-fit:contain;min-height:0}
.guess-person-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.guess-person-grid>button{font-size:clamp(16px,2vw,24px)}
.guess-person-grid>button:disabled{opacity:.25}
@media(orientation:landscape) and (max-height:600px){.scratch-stage{width:min(100%,400px)}.picture-card-grid>button{min-height:70px;max-height:150px}.picture-card-grid img,.picture-card-grid svg{max-height:100px}}
@media(max-width:420px){.picture-card-grid{gap:7px}.picture-card-grid>button{min-height:70px}.guess-person-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.phonics-grid>button{display:flex;flex-direction:column;align-items:center;gap:8px}.phonics-grid strong{font-size:clamp(28px,4vw,48px)}.phonics-grid img{width:clamp(40px,7vw,80px);height:clamp(40px,7vw,80px);object-fit:contain}.phonics-blend h3{font-size:28px}

/* Picture activities use the same playing area and controls layout as the other games. */
body.game-open .game-primary:has(>.picture-game-area){overflow:auto;align-items:safe center}
body.game-open .game-primary>.picture-game-area{padding:8px;box-sizing:border-box;margin-block:auto}
body.game-open .picture-card-grid>button{aspect-ratio:auto;min-height:clamp(76px,17vh,160px)}
body.game-open .guess-person-grid>button{min-height:clamp(84px,23vh,210px)}
body.game-open .scratch-stage{width:min(100%,680px,68vh)}
@media(orientation:landscape) and (min-height:601px){
  body.game-open .scratch-stage{width:min(100%,72vh)}
}
