/* Keep text-entry controls readable at the size iOS Safari requires to avoid focus zoom. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

input, textarea, select {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1023.98px), (pointer: coarse) {
    :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]), textarea, select, [contenteditable="true"]) {
        font-size: max(16px, 1rem) !important;
    }

    /* The fixed tab bar must not compete with a phone's software keyboard. */
    body.is-editing .mobile-command-nav {
        display: none !important;
    }
}

/* Flex and grid children may otherwise retain the intrinsic width of a long code. */
.portal-content main,
.price-page,
.price-page .barcode-row,
.price-page .barcode-row > *,
.wallet-page,
.wallet-header > div,
.wallet-section-header > div,
.wallet-card-middle > .wallet-member-details,
.wallet-gift-bottom > div,
.gc-page,
.gc-form-card,
.gc-input-wrap,
.edit-profile-shell,
.edit-profile-card {
    min-width: 0;
}

.wallet-gift-bottom > div > span,
.wallet-gift-main strong,
.wallet-card-footer strong,
.gc-dialog-code {
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .wallet-header,
    .wallet-section-header {
        flex-wrap: wrap;
    }

    .wallet-count,
    .wallet-card-type {
        white-space: normal;
        text-align: center;
    }

    .price-page .scanner-overlay {
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: max(.75rem, env(safe-area-inset-bottom));
    }
}
