/* Screen typography is independent of thermal receipts, labels and document editors. */
@media screen {
    :root {
        --app-system-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    }
    html body {
        --font-family-base: var(--app-system-font) !important;
        --font-family-heading: var(--app-system-font) !important;
        --font-sans: var(--app-system-font) !important;
        --font-heading: var(--app-system-font) !important;
        --ui-font: var(--app-system-font) !important;
        --pos-font-family: var(--app-system-font) !important;
        --bs-body-font-family: var(--app-system-font) !important;
        font-family: var(--app-system-font) !important;
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    html body :is(h1,h2,h3,h4,h5,h6,p,label,legend,summary,button,input,select,textarea,table,th,td,.btn,.form-control,.form-select,.dropdown-menu,.nav-link,.navbar,.sidebar,.topbar,.main-content,.modal,.toast,.select2-container,.permission-workspace,.global-listing-page,.pos-app) {
        font-family: var(--app-system-font) !important;
    }
    /* Keep icon fonts, monospace codes and explicitly formatted editor content intact. */
    html body :is(.navbar,.sidebar,.topbar,.main-content,.modal) :is(a,.nav-text,.menu-title,.dropdown-item) {
        font-family: var(--app-system-font) !important;
    }
    html body :is(header,footer,nav,main,section,article,div,a,small,strong,em):not(.ql-editor):not(.ql-editor *):not([contenteditable=true]):not([contenteditable=true] *):not(pre *):not(code *) {
        font-family: var(--app-system-font) !important;
    }
    html body :is(input,select,textarea,button) { letter-spacing: normal; }
    html body :is(th,.badge,.nav-link,.dropdown-item) { line-height: 1.4; }
    html body :is(.table,.tabular-nums,.amount,.price) { font-variant-numeric: tabular-nums; }
    @media (max-width: 767px) {
        /* Avoid automatic field zoom on iPhone without disabling user zoom. */
        html body :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: max(1rem, 16px); }
    }
}
