.nemo-page:has(#play:not([hidden])){height:100dvh;min-height:0;padding:20px;overflow:hidden}
.handheld:has(#play:not([hidden])){width:min(100%,1100px);height:calc(100dvh - 40px);min-height:0;padding:20px;display:flex;flex-direction:column;border-radius:20px}
.handheld:has(#play:not([hidden])) .game-header{flex-shrink:0;margin-bottom:16px}
.handheld:has(#play:not([hidden]))>.brand-footer{display:none}
#play{display:flex;flex-direction:column;flex:1;min-height:0}
#play>.play-heading{flex-shrink:0;min-height:40px;margin:0 2px 12px}
#play>.screen-frame{display:flex;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:8px;border-radius:14px}
#play .screen{flex:1;width:100%;height:100%;min-height:0;aspect-ratio:auto;border-radius:5px}
#game canvas{margin:0!important}
/* Keep desktop play compact and centered instead of filling the window. */
@media(min-width:1024px) and (hover:hover) and (pointer:fine){
 .handheld:has(#play:not([hidden])){width:min(100%,920px);height:min(880px,calc(100dvh - 40px))}
}
@media(max-height:500px){
 .nemo-page:has(#play:not([hidden])){padding:12px}
 .handheld:has(#play:not([hidden])){height:calc(100dvh - 24px);padding:12px}
 .handheld:has(#play:not([hidden])) .game-header{margin-bottom:6px}
 .handheld:has(#play:not([hidden])) .eyebrow{display:none}
 .handheld:has(#play:not([hidden])) h1{margin:0;font-size:18px}
 #play>.play-heading{min-height:32px;margin-bottom:6px}
 #play .text-button{min-height:32px;padding:6px}
}
@media(max-width:600px){
 .nemo-page:has(#play:not([hidden])){padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
 .handheld:has(#play:not([hidden])){width:100%;height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:14px;border:0;border-radius:0;box-shadow:none}
 .handheld:has(#play:not([hidden])) .game-header{margin-bottom:12px}
 #play>.play-heading{margin-bottom:8px}
 #play>.screen-frame{padding:6px;border-radius:12px}
}

.scene-toast{position:absolute;z-index:1;left:50%;bottom:20px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:9px 14px;border:1px solid #f8efce66;border-radius:20px;background:#203a36e8;color:#fff7df;font-size:12px;line-height:1.5;text-align:center;pointer-events:none;animation:scene-toast 3.6s both}
.screen:has(.scene-toast) .context-hint{bottom:70px}
@keyframes scene-toast{0%{opacity:0;transform:translate(-50%,6px)}10%,85%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-3px)}}
@media(prefers-reduced-motion:reduce){.scene-toast{animation:none}}
