/* Constrain iOS embedded documents to their available width, not intrinsic content. */
#timePanel{width:0;min-width:100%;max-width:100%}
@media(max-width:700px){
 html,body{height:auto;min-height:0;overflow:visible}
 main,.play-layout,.board-column,.board-wrap{min-width:0;max-width:100%}
 /* Explicit row tracks avoid Safari's intrinsic button/aspect-ratio sizing. */
 #board{width:100%;aspect-ratio:1 / 1;grid-template-rows:repeat(10,minmax(0,1fr));min-height:0}
 #board button{min-width:0;min-height:0;height:100%;width:100%;aspect-ratio:auto}
 .selection-actions{touch-action:pan-y}
 body:not(.embedded-game) main{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));padding-bottom:env(safe-area-inset-bottom)}
 body:not(.embedded-game) header{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
 dialog{max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;touch-action:pan-y}
}
@media(max-width:420px){body:not(.embedded-game) header{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}}
