/* Only explicitly adapted tables, only on phones. Desktop DOM is restored by the controller. */
@media(max-width:768px) {
  /* WebKit needs a definite dialog height to allocate its shrinking flex body. */
  #dnDialog[open]:has(.qt-table) { height:92vh; height:92dvh; }
  #dnDlgBody:has(.qt-table) .dn-scroll { display:flex; flex-direction:column; }
  #dnDlgBody .dn-tabw:has(> .qt-frame) { display:flex; flex-direction:column; flex:1; min-height:200px; }
  #dnDlgBody .dn-tabw > .qt-frame { flex:1; min-height:160px; }
  #dnDlgBody .dn-tabw > .qt-hint { flex:none; }
  table.qt-table { border:0 !important; }
  table.qt-table > :is(thead,tbody,tfoot) > tr > .pc-only { display:table-cell !important; }
  table.qt-table > :is(tbody,tfoot) > tr > td :is(span,div,small,b,strong,a,label,input,select,button,textarea) { font-weight:inherit !important; }
  table.qt-table textarea { font-size:17px !important; min-height:44px; box-sizing:border-box; }
  table.qt-table .bar { min-width:110px; flex-shrink:0; }
  .qt-frame { width:100%; min-width:0; max-width:100%; box-sizing:border-box; overflow:auto !important; max-height:60vh !important; max-height:60dvh !important; overscroll-behavior:contain; touch-action:pan-x pan-y pinch-zoom; position:relative; isolation:isolate; border:1px solid var(--border,#444); border-radius:8px; }
  .qt-frame:focus-visible { outline:2px solid var(--accent,#8bd5c5); }
  table.qt-table { table-layout:fixed !important; min-width:0 !important; max-width:none !important; margin:0 !important; border-collapse:separate !important; border-spacing:0 !important; overflow:visible !important; font-size:17px !important; line-height:1.4 !important; font-variant-numeric:tabular-nums; }
  table.qt-table > thead, table.qt-table > thead > tr { position:static !important; }
  table.qt-table > :is(thead,tbody,tfoot) > tr > :is(th,td) { padding:8px !important; width:auto !important; min-width:0 !important; max-width:none !important; box-sizing:border-box; height:44px; vertical-align:middle; font-size:17px !important; line-height:1.4; text-overflow:clip !important; overflow:visible !important; border-bottom:1px solid var(--border,#444); }
  table.qt-table > thead > tr > th { position:sticky !important; top:0; left:auto; z-index:2 !important; background:var(--bg3,#243247) !important; color:var(--text,#eee); font-weight:600 !important; text-transform:none; }
  table.qt-table > :is(tbody,tfoot) > tr > td { position:static !important; font-weight:400 !important; background:var(--card,#1c2430); white-space:normal !important; overflow-wrap:break-word; word-break:normal !important; }
  table.qt-table > :is(tbody,tfoot) > tr > td :is(b,strong) { font-weight:500; }
  table.qt-table > :is(tbody,tfoot) > tr > td :is(span,div,small,b,strong,a,label,input,select,button) { font-size:17px !important; }
  table.qt-table > :is(tbody,tfoot) > tr > td :is(input,select,button) { min-height:44px; box-sizing:border-box; }
  table.qt-table > :is(thead,tbody,tfoot) > tr > [data-qt-kind="number"] { white-space:nowrap !important; }
  table.qt-table > :is(thead,tbody,tfoot) > tr > .qt-identifier { position:sticky !important; left:0; z-index:1; box-shadow:2px 0 0 var(--border,#444); font-weight:500 !important; }
  table.qt-table > thead > tr > .qt-identifier { z-index:3 !important; }
  table.qt-table > tbody > .qt-detail > td { position:static !important; }
  table.qt-table > tbody > .qt-detail .qt-frame { max-width:calc(100vw - 64px); }
  .qt-title { display:block; white-space:normal; min-height:24px; }
  .qt-filter { margin-top:8px; } .qt-filter select { min-height:44px; font-size:17px !important; }
  .qt-controls { display:flex; justify-content:space-between; align-items:center; gap:0; margin:-4px -2px 4px; }
  .qt-controls .qt-handle { display:inline-flex !important; flex:0 0 44px; width:44px !important; min-width:44px !important; max-width:44px !important; height:44px !important; min-height:44px !important; padding:0 !important; margin:0 !important; align-items:center; justify-content:center; border:1px solid var(--border,#444); border-radius:6px; font-size:22px !important; font-weight:500; line-height:1; color:var(--text,#eee); background:var(--card,#1c2430); touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
  .qt-move { cursor:grab; } .qt-resize { cursor:ew-resize; }
  .qt-fixed-note { font-size:13px; color:var(--text-secondary,#b0bac8); font-weight:400; }
  .qt-hint { position:relative; font-size:15px; line-height:1.4; color:var(--text-secondary,#b0bac8); margin:8px 0; }
  .qt-status { position:absolute; left:0; right:0; bottom:0; background:var(--card,#1c2430); color:var(--text,#eee); }
  .qt-status:empty { display:none; }
  .qt-handle:focus-visible { outline:2px solid var(--accent,#8bd5c5); }
  table.qt-table th.qt-active { box-shadow:inset 0 0 0 2px var(--accent,#8bd5c5); }
  table.qt-table th.qt-before { box-shadow:inset 4px 0 0 var(--accent,#8bd5c5); }
  table.qt-table th.qt-after { box-shadow:inset -4px 0 0 var(--accent,#8bd5c5); }
}
