/* v0.24.7 iPhone Safari PWA mobile layout, no overlapping goal strip. */
@media (pointer:coarse) and (orientation:landscape) and (max-width:1280px){
 /* Strict 5 rows; research title and wave support are hidden on mobile only. */
 body>.app-shell .side-panel[data-view="research"] .research-panel{display:flex!important;flex-direction:column!important;padding:3px!important;overflow:hidden!important;min-height:0!important;}
 body>.app-shell .side-panel[data-view="research"] .research-panel>h2{display:none!important;}
 body>.app-shell .side-panel[data-view="research"] .research-panel>.wave-support{display:none!important;}
 body>.app-shell .side-panel[data-view="research"] .research-panel>.research-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:repeat(5,minmax(0,1fr))!important;flex:1 1 auto!important;height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;gap:3px!important;padding:0!important;}
 body>.app-shell .side-panel[data-view="research"] .research-panel .research-item{width:100%!important;min-width:0!important;min-height:0!important;max-height:100%!important;height:100%!important;flex:none!important;overflow:hidden!important;}
 /* Reserve a real dedicated gutter to the right of the canvas. No goal overlays. */
 body>.app-shell #canvasWrap{display:flex!important;align-items:center!important;justify-content:flex-start!important;padding:0!important;gap:0!important;}
 body>.app-shell #canvasWrap #gameCanvas{display:block!important;box-sizing:border-box!important;width:calc(100% - 106px)!important;max-width:calc(100% - 106px)!important;height:auto!important;max-height:100%!important;aspect-ratio:3 / 2!important;flex:0 0 auto!important;margin:0!important;}
 body>.app-shell #canvasWrap #goalIndicator{position:absolute!important;right:4px!important;left:auto!important;width:98px!important;max-width:98px!important;min-width:0!important;top:4px!important;bottom:auto!important;max-height:calc(100% - 40px)!important;overflow-y:auto!important;backdrop-filter:none!important;z-index:44!important;}
 body>.app-shell #canvasWrap #readyFusionIndicator{position:absolute!important;left:auto!important;right:4px!important;width:98px!important;max-width:98px!important;min-width:0!important;bottom:4px!important;z-index:45!important;}
 body>.app-shell #canvasWrap #goalIndicator .goal-target-chip{min-width:0!important;width:100%!important;}
 body>.app-shell #canvasWrap #goalIndicator .goal-target-chip span{overflow:hidden!important;text-overflow:ellipsis!important;}
}
@media (pointer:coarse) and (orientation:portrait) and (max-width:700px){
 body>.app-shell .side-panel[data-view="research"] .research-panel>h2,body>.app-shell .side-panel[data-view="research"] .research-panel>.wave-support{display:none!important;}
 body>.app-shell .side-panel[data-view="research"] .research-panel .research-list{display:grid!important;grid-template-rows:repeat(5,minmax(46px,1fr))!important;gap:4px!important;}
 body>.app-shell #canvasWrap #goalIndicator{position:relative!important;right:auto!important;left:auto!important;}
}
