/* Keep pinch zoom available while avoiding accidental double-tap zoom. */
html { touch-action:manipulation; }
.app,.app>main,.content,.content>* { min-width:0; }
.app>main { max-width:calc(100% - 252px); }
.content img { max-width:100%; }
.content :is(.scroll,.clients-table-wrapper,.devices-table-wrapper,.workspace-table-wrap,.experiment-table,.checklist-scroll) { max-width:100%;overflow-x:auto; }
.content :is(pre,.api-key-box) { max-width:100%;overflow-x:auto; }
@media(max-width:760px) {
    html body .app>main { width:100%;max-width:100%;margin-inline:0; }
    .content { width:100%;padding:20px 14px 32px;box-sizing:border-box; }
    .content :is(.extractor-header,.workspace-heading,.result-head,.cardhead,.tools-header,.notebooks-header,.settings-header) { flex-wrap:wrap;gap:12px; }
    .content :is(.extractor-actions,.result-actions,.workspace-actions,.clients-header-actions,.client-form-actions) { flex-wrap:wrap;max-width:100%; }
    .content :is(.extractor-input,.settings-field,.workspace-field,.workspace-fields>*,.settings-grid>*,.extractor-card,.workspace-card) { min-width:0;max-width:100%; }
    .content :is(.settings-grid,.workspace-fields,.workspace-three) { grid-template-columns:minmax(0,1fr); }
    .content :is(input,select,textarea) { max-width:100%;box-sizing:border-box; }
    /* Safari otherwise zooms the viewport when a small text field receives focus. */
    html body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=color]):not([type=range]),textarea,select) { font-size:16px!important; }
    .content :is(h1,h2,h3,p,.settings-help,.workspace-help) { overflow-wrap:anywhere; }
    .content :is(button,.settings-btn,.extractor-file,.workspace-button) { min-height:40px; }
    .sidebar { height:100dvh;padding-bottom:max(20px,env(safe-area-inset-bottom)); }
    .mobile-navigation { padding-top:max(10px,env(safe-area-inset-top)); }
    .content .workspace-heading h1 { font-size:22px; }
}
