#crt-content.handheld-view { width: min(96vw, 112dvh); background: transparent; border-radius: 0; pointer-events: auto; }
#handheld-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
#handheld-panel { position: absolute; inset: 14% 5.5%; overflow: hidden; color: #39ff6a; font-family: VT323, "Share Tech Mono", "IBM Plex Mono", monospace; text-shadow: 0 0 3px #39ff6a30; }
#handheld-grid { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: clamp(14px, 2vw, 28px); padding: 12px; scrollbar-width: thin; scrollbar-color: #39ff6a66 #071b1b; }
#handheld-grid a { min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: clamp(15px, 1.7vw, 23px); line-height: 1.25; }
#handheld-grid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
#handheld-grid a:focus-visible { outline-offset: 1px; }
#handheld-grid[hidden], #handheld-player[hidden] { display: none; }
#handheld-player { position: fixed; inset: 0; z-index: 100; width: 100%; height: 100dvh; display: flex; flex-direction: column; background: #000; }
#handheld-player:fullscreen { width: 100%; height: 100%; }
#handheld-game-viewport { flex: 1; min-height: 0; width: 100%; }
#handheld-player iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.handheld-toolbar { position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: 12px; padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left)); background: transparent; text-align: left; }
.handheld-toolbar::before { content: ""; flex: none; width: 216px; height: 44.4px; }
.game-return { position: fixed; top: max(2px, env(safe-area-inset-top)); left: max(6px, env(safe-area-inset-left)); z-index: 110; display: block; width: 216px; max-width: 65vw; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.game-return img { display: block; width: 100%; height: auto; }
.game-return:focus-visible { outline: 2px solid #39ff6a; outline-offset: -2px; }
body.handheld-playing #screen-return, body.retro-playing #screen-return { display: none; }
#handheld-fullscreen-status { color: #caffd8; font: 12px/1.4 monospace; }
body.handheld-playing { overflow: hidden; }
body.handheld-playing .arcade-room, body.handheld-playing .site-footer { visibility: hidden; }
#handheld-status { position: absolute; inset: 0; display: grid; place-content: center; font: inherit; }
#handheld-status[hidden] { display: none; }
@media (max-width: 600px) { #handheld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; padding: 8px; } }

.game-return[hidden] { display: none; }
#screen-return.game-return { position: fixed; top: max(2px, env(safe-area-inset-top)); left: max(6px, env(safe-area-inset-left)); bottom: auto; transform: none; z-index: 110; padding: 0; border: 0; border-radius: 0; background: transparent; }
