
.play-upper,.play-controls{display:contents}.mobile-launch,.mobile-exit,.rotate-phone{display:none}.c64-pad{margin:12px 0}.c64-pad>div{display:flex;justify-content:center;gap:3px;margin:3px 0}.c64-pad button{padding:7px;flex:1;max-width:65px;touch-action:none;font-size:10px;background:#403b37;border-color:#938776}.c64-pad button.held{background:#ffb548;color:#071426}
@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}
.mobile-player #player{position:fixed;inset:0;max-width:none;margin:0;height:100dvh;display:grid;grid-template-rows:75% 25%;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);background:#071426}
.mobile-player header,.mobile-player footer,.mobile-player .help{display:none}
.mobile-player .play-upper{display:flex;align-items:flex-start;min-height:0;overflow:hidden;gap:8px;padding:4px}
.mobile-player .screen{flex:none;width:var(--display-width);height:var(--display-height);margin:0;max-width:none;box-shadow:none;border:0}
.mobile-player canvas{width:100%;height:100%;object-fit:contain}
.mobile-player .play-controls{display:flex;flex:1;min-width:0;height:100%;flex-direction:column;overflow:auto;padding-right:38px;gap:3px}
.mobile-player #status{font-size:9px;margin:0;min-height:0;line-height:1.2}
.mobile-player .tools,.mobile-player .transport{margin:0;gap:4px}.mobile-player .tools button,.mobile-player .transport button{padding:6px;font-size:9px;min-height:29px}.mobile-player .tools input{width:65px}
.mobile-player #keys{height:100%;min-height:0;margin:0;width:100%;grid-row:2;align-self:stretch}
.mobile-player .piano-key{padding-bottom:max(2px,env(safe-area-inset-bottom));font-size:10px;gap:0;border-radius:0}.mobile-player .piano-key span{font-size:8px}
.mobile-player #curtain{padding:5px}.mobile-player #curtain strong{font-size:20px}.mobile-player #start{font-size:12px;margin-top:8px;padding:10px}.mobile-player #curtain p{margin:4px 0}
.mobile-player .mobile-exit{display:block;position:fixed;z-index:9;top:5px;right:max(4px,env(safe-area-inset-right));padding:8px;font-size:12px}
.mobile-player .pad{display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(3,32px);gap:3px;margin:0 auto;width:100%;max-width:360px}
.mobile-player .pad button{min-height:0;min-width:0;padding:3px;font-size:10px}
.mobile-player [data-pad=up]{grid-area:1/2}.mobile-player [data-pad=left]{grid-area:2/1}.mobile-player [data-pad=down]{grid-area:3/2}.mobile-player [data-pad=right]{grid-area:2/3}.mobile-player [data-pad=A]{grid-area:1/5/3/6;border-radius:50%;align-self:center;height:44px}.mobile-player [data-pad=B]{grid-area:2/4/4/5;border-radius:50%;align-self:center;height:44px;font-size:0}.mobile-player [data-pad=B]:after{content:'B';font-size:12px}.mobile-player [data-pad=select]{grid-area:3/4;transform:translateY(30px)}.mobile-player [data-pad=start]{grid-area:3/5;transform:translateY(30px)}
.mobile-player .pad{margin-bottom:30px}
.mobile-player .c64-pad{margin:0}.mobile-player .c64-pad>div{gap:2px;margin:2px 0}.mobile-player .c64-pad button{padding:3px 1px;min-height:24px;max-width:none;font-size:9px}
}
@media(pointer:coarse) and (orientation:portrait) and (max-width:1400px){.mobile-player .rotate-phone{display:flex;position:fixed;inset:0;z-index:8;background:#071426;align-items:center;justify-content:center;text-align:center;flex-direction:column;padding:30px;font-size:20px;color:#ffb548}.rotate-phone small{font-size:12px;line-height:1.8;margin-top:20px}}

.mobile-player .pad [data-pad=B]{font-size:0}.mobile-player .pad [data-pad=B]:after{font-size:12px}
