.mb-3 { margin-bottom: 1rem; font-family: sans-serif; }
        .fw-semibold { font-weight: 600; }
        .mt-1 { margin-top: 0.25rem; }
        .form-text { font-size: 0.875rem; color: #6c757d; }

        /* The Container */
        .gender-checkbox-list {
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 0.5rem 0.75rem;
            margin-top: 0.75rem;
            width: 100%;
        }

        /* Desktop: Exactly 4 per row
           We use (100% / 4) and subtract the proportional gap to ensure it fits.
           (0.75rem * 3) / 4 = 0.5625rem
        */
        /* Desktop: 3 per row */
        .gender-checkbox-item {
            display: flex !important;
            align-items: center;
            gap: 0.45rem;
            cursor: pointer;
            padding: 4px;
            box-sizing: border-box !important;
            /*
            flex: 0 0 calc(25% - 0.57rem) !important;
            max-width: calc(25% - 0.57rem) !important;
             */
            flex: 0 0 calc(33.333% - 0.51rem) !important;
            max-width: calc(33.333% - 0.51rem) !important;
            margin-bottom: 0 !important;
            overflow: hidden;
        }

        /* Tablet: 3 per row */
        @media (max-width: 991px) {
            .gender-checkbox-item {
                flex: 0 0 calc(33.333% - 0.51rem) !important;
                max-width: calc(33.333% - 0.51rem) !important;
            }
        }

        /* Mobile: 2 per row */
        @media (max-width: 575px) {
            .gender-checkbox-item {
                flex: 0 0 calc(50% - 0.38rem) !important;
                max-width: calc(50% - 0.38rem) !important;
            }
        }

        .gender-checkbox-item span {
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .gender-checkbox-item input {
            cursor: pointer;
            margin: 0 !important;
            flex-shrink: 0;
        }

        #profile_selected_genders {
            font-weight: 500;
            color: #212529;
        }