/* Load after page styles so compact fields also remain readable on phones. */
@media (max-width: 991.98px), (hover: none) and (pointer: coarse) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Small field text triggers iOS focus zoom. Keep the size stable before,
       during, and after focus, including fields opened dynamically in modals.
       Leave browser pinch zoom available through the existing viewport meta. */
    html body :is(
        input:not([type]),
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="search"],
        input[type="tel"],
        input[type="url"],
        input[type="number"],
        input[type="date"],
        input[type="time"],
        input[type="datetime-local"],
        input[type="month"],
        input[type="week"],
        select,
        textarea,
        [contenteditable=""],
        [contenteditable="true"],
        [contenteditable="plaintext-only"]
    ) {
        font-size: max(16px, 1em) !important;
    }
}
