/* The GBA workspace and shared site palette own the player presentation. */
.rom-player[data-player=n64] .screen-shell{aspect-ratio:4/3;min-height:0;--screen-w:calc(var(--screen-base-w) * var(--screen-scale));--screen-h:calc(var(--screen-base-h) * var(--screen-scale));container-type:inline-size;container-name:n64-stage}
.rom-player[data-player=n64] #screen{object-fit:contain;background:#000;image-rendering:pixelated}
.n64-touch .n64-stick{position:absolute;left:4%;bottom:12%;width:110px;height:110px;border:2px solid var(--site-line);border-radius:50%;background:#20282099;touch-action:none;pointer-events:auto}
.n64-stick span{position:absolute;width:42px;height:42px;left:34px;top:34px;border-radius:50%;background:#cad3c699;pointer-events:none}
.n64-touch-face{position:absolute;right:3%;bottom:10%;display:grid;grid-template-columns:repeat(3,48px);gap:6px}
.n64-touch-face button{height:48px;padding:0;touch-action:none;pointer-events:auto;background:#273028c9;color:#fff;border:1px solid #758475;border-radius:50%}
.n64-touch .touch-menu-buttons{bottom:3%}.n64-touch [data-button]{touch-action:none}
.n64-touch .touch-shoulder{top:10px;bottom:auto;width:56px;height:30px}
.rom-player[data-player=n64] .screen-shell.touch-controls-enabled .screen-fullscreen-btn{left:50%;right:auto;transform:translateX(-50%)}
.n64-touch-dpad{position:absolute;left:4%;top:15%;display:grid;grid-template-columns:repeat(3,30px);grid-template-rows:repeat(3,30px);gap:3px}
.n64-touch-dpad button{width:30px;height:30px;min-width:0;padding:0;border-radius:7px;pointer-events:auto;background:#273028c9;color:#fff;border:1px solid #758475}
.n64-touch-dpad [data-button="2048"]{grid-area:1/2}.n64-touch-dpad [data-button="512"]{grid-area:2/1}.n64-touch-dpad [data-button="256"]{grid-area:2/3}.n64-touch-dpad [data-button="1024"]{grid-area:3/2}
#diagnostics{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;font-variant-numeric:tabular-nums}
#cartridgeStatus{overflow-wrap:anywhere}
/* Size controls against the actual player, including explicit 1x on desktop. */
@container n64-stage (max-width:400px){
  .n64-touch .n64-stick{width:76px;height:76px;bottom:16%}
  .n64-stick span{width:32px;height:32px;left:20px;top:20px}
  .n64-touch-face{grid-template-columns:repeat(3,30px);gap:4px}
  .n64-touch-face button{height:30px;font-size:11px}
  .n64-touch-dpad{top:20%;grid-template-columns:repeat(3,22px);grid-template-rows:repeat(3,22px);gap:3px}
  .n64-touch-dpad button{width:22px;height:22px;font-size:11px}
  .n64-touch .touch-menu-buttons{gap:6px}
  .n64-touch .touch-menu-buttons button{min-width:48px;width:48px;height:26px;padding:0;font-size:11px}
}
