/* Mobile safety net for the dashboard: nothing may be wider than the screen (iOS zooms the whole page out when it is). */
html,body{max-width:100%;overflow-x:clip}
.main,.content,.as-main,.as-log,.as-a,.as-res,.as-run,.as-text,.as-side,.card{min-width:0;max-width:100%}
.as-q,.as-text,.as-text *,.as-run-h,.as-threads a span,.notice{overflow-wrap:anywhere;word-break:break-word}
.tl-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.as-text pre,.as-text code{white-space:pre-wrap}
.as-text table{display:block;max-width:100%;overflow-x:auto}
img,video,svg,canvas{max-width:100%}
@media (max-width:1000px){.as-wrap{grid-template-columns:minmax(0,1fr)!important}}
@media (max-width:900px){
  .shell{grid-template-columns:minmax(0,1fr)!important}
  .topbar{padding:0 12px!important;gap:8px;min-width:0}.topbar>*{min-width:0}
  .content{padding:14px 12px!important}
  .as-q{max-width:92%}
  .as-run-h{gap:6px}.as-exp{margin-left:0;flex-wrap:wrap}
  .as-threads a{display:block;max-width:100%}
  .as-threads a span{display:block;white-space:normal}
  label input,label select,label textarea{max-width:100%;min-width:0}
  .grid,.row{min-width:0}.grid>*,.row>*{min-width:0}
  table:not(.tbl){max-width:100%}
  .afd-tbl{display:block;overflow-x:auto;white-space:nowrap}
  .tbl.kv th{white-space:normal;word-break:break-word}
}
@media (max-width:900px){
  .topbar{padding-left:60px!important}   /* room for the fixed menu button so it never covers the title/logo */
  .ps-cg{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .grid.g2,.grid.g3,.grid.g4{grid-template-columns:minmax(0,1fr)!important}
}
@media (max-width:420px){.ps-cg{grid-template-columns:minmax(0,1fr)!important}}
