/* Responsive overlays: avoid intrinsic grid track expansion from file inputs. */
html,body{width:100%;max-width:100%;margin:0;overflow-x:clip;touch-action:manipulation}
#melodyGate,#installWelcome,#birthdaySurprise{display:flex;flex-direction:column;align-items:center;justify-content:safe center;grid-template-columns:minmax(0,1fr);width:100%;max-width:100%;height:100dvh;overflow-y:auto;overflow-x:hidden;padding: max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));}
.melody-card,.welcome31{flex:none;width:100%;max-width:360px;min-width:0;padding:clamp(16px,5vw,26px);overflow-wrap:anywhere;margin:auto;max-height:none;}
.melody-card h2,.welcome31 h1{font-size:clamp(23px,6.5vw,29px)}
.melody-card label,.melody-card input,.welcome31 input,header input{display:block;width:100%;min-width:0;max-width:100%;font-size:16px;}
.melody-card button,.welcome31 button{white-space:normal;max-width:100%;min-width:0;}
main,section,.glass,.hero,.grid>*{min-width:0;max-width:100%;overflow-wrap:anywhere}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}input,textarea{max-width:100%;min-width:0}#introViewport{min-width:0;max-width:100%}#introTrack>div{min-width:0}#story{overflow:auto}button,a{touch-action:manipulation}
