@import url("../gayboy/emulator/player.css") (pointer:coarse) and (max-width:1400px);
.play-upper,.play-controls,.shell-frame,.mono-shell,.gamepad .dpad,.gamepad .ab-buttons,.gamepad .system-buttons{display:contents}.screen-label,.handheld-brand,.dpad>span,.mobile-launch,.mobile-exit{display:none}
@media(pointer:coarse) and (max-width:1400px){
body.mobile-embedded .mobile-launch{display:block;padding:18px;width:100%;margin:10px 0;background:#ffb548;color:#071426;font-size:15px}
body.mobile-embedded .play-upper,body.mobile-embedded #keys,body.mobile-embedded .help,body.mobile-embedded footer{display:none}
body.mobile-player{padding:0;overflow:hidden;height:100dvh;overscroll-behavior:none;background:#210331}
.mobile-player #player{position:fixed;inset:0;max-width:none;margin:0;width:100%;height:100dvh;display:grid;grid-template-columns:75% 25%;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#210331}
.mobile-player header,.mobile-player footer,.mobile-player .help{display:none}
.mobile-player .play-upper{display:flex;grid-column:1;grid-row:1;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:0;gap:12px;overflow:hidden;padding:8px}
.mobile-player .shell-frame{display:block;flex:none;position:relative}
.mobile-player .mono-shell{display:block;position:absolute;top:0;left:0;width:430px;max-width:none;margin:0;padding:17px 20px 30px;transform:scale(var(--shell-scale,.6));transform-origin:top left}
.mobile-player .screen-label{display:block}.mobile-player .handheld-brand{display:flex}
.mobile-player .screen{width:100%;height:auto;max-width:none;margin:0;box-shadow:0 0 0 1px #358f88}
.mobile-player canvas{width:100%;height:auto;aspect-ratio:160/144}
.mobile-player .gamepad{display:grid;margin:0;max-width:none;gap:12px}.mobile-player .gamepad .dpad{display:grid}.mobile-player .dpad>span{display:grid}.mobile-player .gamepad .ab-buttons,.mobile-player .gamepad .system-buttons{display:flex}
.mobile-player .gamepad button{padding:0}.mobile-player .gamepad .system-buttons button{padding:5px}
.mobile-player .gamepad .ab-buttons button{font-size:19px;min-width:52px;min-height:52px;width:52px;height:52px}
.mobile-player .gamepad .dpad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px)}
.mobile-player .play-controls{display:flex;flex:none;flex-direction:column;width:100%;gap:5px;max-height:30dvh;overflow:auto}
.mobile-player #status{font-size:9px;min-height:0;margin:0;line-height:1.3;color:#c9eadd}
.mobile-player .tools{margin:0;gap:4px}.mobile-player .tools button{padding:7px 5px;font-size:9px;min-height:30px}.mobile-player .tools input{width:70px}
.mobile-player #keys{display:flex;flex-direction:column-reverse;grid-column:2;grid-row:1;width:100%;height:100%;min-height:0;margin:0;align-self:stretch;overflow:hidden}
.mobile-player .piano-key{flex-direction:row;justify-content:flex-end;gap:5px;border-radius:0;font-size:10px}
.mobile-player .piano-key.white{flex:1;width:100%;min-height:0;padding:0 5px 0 0;border:1px solid #071426}
.mobile-player .piano-key.black{width:62%;height:5.5%;left:0;padding:0 3px 0 0}.mobile-player .piano-key span{font-size:8px}
.mobile-player #curtain{padding:12px}.mobile-player #curtain strong{font-size:30px}.mobile-player #start{font-size:16px;margin-top:12px;padding:16px}.mobile-player #curtain p{font-size:12px}
.mobile-player .mobile-exit{display:block;position:fixed;z-index:9;top:max(4px,env(safe-area-inset-top));left:4px;padding:7px;font-size:10px}
}

.control-tips{margin:10px auto;max-width:560px;font:11px/1.4 'Courier New',monospace;color:#c9eadd}.control-tips dl{margin:0}.control-tips dl>div{display:grid;grid-template-columns:145px 1fr;gap:8px;margin:7px 0}.control-tips dt{color:#ffb548;font-weight:bold}.control-tips dd{margin:0}.control-tips p{font-size:10px;color:#96b9ca}
@media(pointer:coarse) and (max-width:1400px){.mobile-player .control-tips{width:100%;margin:0;font-size:10px;line-height:1.35}.mobile-player .control-tips dl>div{grid-template-columns:85px 1fr;gap:6px;margin:5px 0}.mobile-player .control-tips dt{font-size:9px}.mobile-player .control-tips p{font-size:9px;margin:6px 0 0}.mobile-player .play-controls{max-height:38dvh}.mobile-player #status{font-size:9px}}

/* Keep A/B comfortably tappable after the complete shell is scaled to a phone. */
@media(pointer:coarse) and (max-width:1400px){.mobile-player .gamepad .ab-buttons{gap:10px;transform:rotate(-12deg)}.mobile-player .gamepad .ab-buttons button{width:clamp(72px,calc(44px / var(--shell-scale,.6)),96px);height:clamp(72px,calc(44px / var(--shell-scale,.6)),96px);min-width:72px;min-height:72px;flex-shrink:0;font-size:24px}}
